cortex-react-components 2.27.0 → 2.28.0
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.
- package/dist/{chunk-LJXTXROJ.mjs → chunk-24R7CI5Q.mjs} +1 -1
- package/dist/{chunk-FZX3ZPEU.mjs → chunk-27XIU7FW.mjs} +1 -1
- package/dist/{chunk-RR4QSUV2.mjs → chunk-2IMY4VWR.mjs} +1 -1
- package/dist/{chunk-WIRQ5IRT.mjs → chunk-2R3ECSWF.mjs} +1 -1
- package/dist/{chunk-RJGYVDOU.mjs → chunk-43YJ2VYN.mjs} +1 -1
- package/dist/{chunk-2BRDNDUB.mjs → chunk-4ITG3T35.mjs} +1 -1
- package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
- package/dist/{chunk-NBJLXJQ3.mjs → chunk-633ESSXN.mjs} +1 -1
- package/dist/{chunk-3NRXQBBS.mjs → chunk-6L7VJ7IH.mjs} +1 -1
- package/dist/chunk-6UULUGR2.mjs +1 -0
- package/dist/{chunk-JCWFPKF3.mjs → chunk-6VRPQKAK.mjs} +1 -1
- package/dist/{chunk-TYARLEAC.mjs → chunk-75HU5Q6A.mjs} +1 -1
- package/dist/{chunk-KEK763EH.mjs → chunk-AMAB4E2X.mjs} +1 -1
- package/dist/{chunk-7R47MHQE.mjs → chunk-B63FA7LF.mjs} +1 -1
- package/dist/{chunk-LAQ3QAUW.mjs → chunk-CLGBBNRB.mjs} +1 -1
- package/dist/{chunk-F6DMXMR4.mjs → chunk-CXHPLJDO.mjs} +1 -1
- package/dist/{chunk-CDVRH3MC.mjs → chunk-D44OXIPN.mjs} +1 -1
- package/dist/{chunk-GTZJWMZR.mjs → chunk-D76LTQRD.mjs} +1 -1
- package/dist/chunk-DNMM3Q72.mjs +9 -0
- package/dist/{chunk-GHOL5L32.mjs → chunk-DTKZ3I6Z.mjs} +1 -1
- package/dist/{chunk-FE7ZGUPU.mjs → chunk-FRYADWTQ.mjs} +1 -1
- package/dist/chunk-G3BOVXUM.mjs +4 -0
- package/dist/{chunk-3HNU2NYP.mjs → chunk-GRNOF6LY.mjs} +1 -1
- package/dist/{chunk-AJQHGVZ5.mjs → chunk-GXVC6ETI.mjs} +1 -1
- package/dist/{chunk-IQQ7ZWCP.mjs → chunk-I6D5JCNY.mjs} +1 -1
- package/dist/{chunk-5MWZTJYP.mjs → chunk-IBC5Z55T.mjs} +1 -1
- package/dist/{chunk-TVTTUSWM.mjs → chunk-IFUIQ57U.mjs} +1 -1
- package/dist/chunk-IMRGPVFS.mjs +1 -0
- package/dist/{chunk-EM3T2XYC.mjs → chunk-KAAHIHZK.mjs} +1 -1
- package/dist/{chunk-5NIEZE7A.mjs → chunk-KBEXWUKI.mjs} +1 -1
- package/dist/{chunk-EHSOO47V.mjs → chunk-KEOMDWUC.mjs} +1 -1
- package/dist/{chunk-LAP57E2L.mjs → chunk-LBVWIF2J.mjs} +1 -1
- package/dist/chunk-LEZ6G4X7.mjs +4 -0
- package/dist/{chunk-75F3LJMX.mjs → chunk-LKUK55GC.mjs} +1 -1
- package/dist/{chunk-WLI2YTOQ.mjs → chunk-MDIJOHFV.mjs} +1 -1
- package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
- package/dist/{chunk-C4RWEPVF.mjs → chunk-MX6GXHJJ.mjs} +1 -1
- package/dist/{chunk-3Y7QG6VP.mjs → chunk-NJ7PW5T7.mjs} +1 -1
- package/dist/{chunk-7NWIK57W.mjs → chunk-O3BCESMN.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/{chunk-X2JWNPWT.mjs → chunk-O5QXPC23.mjs} +1 -1
- package/dist/{chunk-RGOKBIQ5.mjs → chunk-ORODSHZN.mjs} +1 -1
- package/dist/{chunk-HD6E7KI2.mjs → chunk-RCI3L3M5.mjs} +1 -1
- package/dist/{chunk-5EKGFFJD.mjs → chunk-SADWUWLZ.mjs} +1 -1
- package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
- package/dist/{chunk-BDDEMCAH.mjs → chunk-SZXMQMZ6.mjs} +1 -1
- package/dist/{chunk-7TSR2LQB.mjs → chunk-TIAA3ZN3.mjs} +1 -1
- package/dist/{chunk-RS4WAAGI.mjs → chunk-UBZYXZ7B.mjs} +1 -1
- package/dist/{chunk-6PS55VJZ.mjs → chunk-VDFRWGXR.mjs} +1 -1
- package/dist/chunk-VFIMFZX5.mjs +1 -0
- package/dist/{chunk-M527EJIX.mjs → chunk-WBDSOPDY.mjs} +1 -1
- package/dist/{chunk-CXOVEABI.mjs → chunk-WDRL3N5V.mjs} +1 -1
- package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
- package/dist/{chunk-RS4VD3ML.mjs → chunk-XQ3XV5DH.mjs} +1 -1
- package/dist/{chunk-ZEALRBXW.mjs → chunk-XSCZQEYP.mjs} +1 -1
- package/dist/{chunk-AQQCH7Z2.mjs → chunk-XX4GSGRP.mjs} +1 -1
- package/dist/{chunk-NINFDOV5.mjs → chunk-YG7SLO6G.mjs} +1 -1
- package/dist/chunk-YI6EQRWN.mjs +1 -0
- package/dist/{chunk-LLED3RQS.mjs → chunk-YPQUYIGO.mjs} +1 -1
- package/dist/{chunk-TJZVV3XH.mjs → chunk-YVXFRQPA.mjs} +1 -1
- package/dist/{chunk-TTWEHUP5.mjs → chunk-ZA6MGTGM.mjs} +1 -1
- package/dist/chunk-ZLFZBT3K.mjs +1 -0
- package/dist/{chunk-HSQAHQNP.mjs → chunk-ZZFYIP6H.mjs} +1 -1
- package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
- package/dist/components/AdvancedComponents/CommentSection.mjs +1 -1
- package/dist/components/AdvancedComponents/EditableField.mjs +1 -1
- package/dist/components/AdvancedComponents/app-header.mjs +1 -1
- package/dist/components/AdvancedComponents/index.js +8 -8
- package/dist/components/AdvancedComponents/index.mjs +1 -1
- package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
- package/dist/components/AdvancedComponents/notifications-panel.mjs +1 -1
- package/dist/components/AdvancedComponents/org-chart-component/CompanyNode.d.ts +7 -0
- package/dist/components/AdvancedComponents/org-chart-component/CompanyNode.js +1 -0
- package/dist/components/AdvancedComponents/org-chart-component/CompanyNode.mjs +1 -0
- package/dist/components/AdvancedComponents/org-chart-component/OrgChart.d.ts +2 -0
- package/dist/components/AdvancedComponents/org-chart-component/OrgChart.js +8 -8
- package/dist/components/AdvancedComponents/org-chart-component/OrgChart.mjs +1 -1
- package/dist/components/AdvancedComponents/org-chart-component/OrgNode.js +5 -5
- package/dist/components/AdvancedComponents/org-chart-component/OrgNode.mjs +1 -1
- package/dist/components/AdvancedComponents/org-chart-component/OrgTree.d.ts +11 -2
- package/dist/components/AdvancedComponents/org-chart-component/OrgTree.js +8 -8
- package/dist/components/AdvancedComponents/org-chart-component/OrgTree.mjs +1 -1
- package/dist/components/AdvancedComponents/org-chart-component/index.d.ts +2 -0
- package/dist/components/AdvancedComponents/org-chart-component/index.js +8 -8
- package/dist/components/AdvancedComponents/org-chart-component/index.mjs +1 -1
- package/dist/components/AdvancedComponents/org-chart-component/mockData.d.ts +9 -7
- package/dist/components/AdvancedComponents/org-chart-component/mockData.js +1 -1
- package/dist/components/AdvancedComponents/org-chart-component/mockData.mjs +1 -1
- package/dist/components/AdvancedComponents/org-chart-component/types/index.mjs +1 -1
- package/dist/components/AdvancedComponents/org-chart-component/types.d.ts +42 -0
- package/dist/components/AdvancedComponents/org-chart-component/types.js +1 -0
- package/dist/components/AdvancedComponents/org-chart-component/types.mjs +1 -0
- package/dist/components/AdvancedComponents/org-chart-component/utils.d.ts +2 -2
- package/dist/components/AdvancedComponents/switch.mjs +1 -1
- package/dist/components/AdvancedComponents/theme-toggle.mjs +1 -1
- package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CaseStudy.mjs +1 -1
- package/dist/components/Blocks/Code.client.mjs +1 -1
- package/dist/components/Blocks/Code.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/ConsultantProfile.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/CopyButton.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ProposalSummary.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CogeBoard.mjs +1 -1
- package/dist/components/CRM/DealCard.mjs +1 -1
- package/dist/components/CRM/DealDetails.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/KanbanColumn.mjs +1 -1
- package/dist/components/CRM/NewCustomerForm.mjs +1 -1
- package/dist/components/CRM/NewDealForm.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/CustomerCard.mjs +1 -1
- package/dist/components/Cards/EventCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/HeroCard.mjs +1 -1
- package/dist/components/Cards/Image.mjs +1 -1
- package/dist/components/Cards/PricingCard.mjs +1 -1
- package/dist/components/Cards/ServiceCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.js +10 -10
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/Components/ChatCardArtefact.mjs +1 -1
- package/dist/components/Chat/Components/ChatCardTask.mjs +1 -1
- package/dist/components/Chat/Components/Conversation.mjs +1 -1
- package/dist/components/Chat/Components/Message.js +1 -1
- package/dist/components/Chat/Components/Message.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.js +6 -6
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/CodeBlock.mjs +1 -1
- package/dist/components/Chat/PartTypes/ColleagueHandoff.d.ts +18 -0
- package/dist/components/Chat/PartTypes/ColleagueHandoff.js +5 -0
- package/dist/components/Chat/PartTypes/ColleagueHandoff.mjs +2 -0
- package/dist/components/Chat/PartTypes/MessageHandler.js +6 -6
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
- package/dist/components/Chat/PartTypes/Reasoning.mjs +1 -1
- package/dist/components/Chat/PartTypes/Response.mjs +1 -1
- package/dist/components/Chat/PartTypes/Tool.mjs +1 -1
- package/dist/components/Chat/PartTypes/index.d.ts +1 -0
- package/dist/components/Chat/PartTypes/index.js +8 -8
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/capability-menu.mjs +1 -1
- package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +14 -14
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +42 -42
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +6 -6
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +7 -7
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-file-uploads.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +6 -6
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.d.ts +0 -2
- package/dist/components/Chat/index.js +11 -14
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DeliveryLead/DeliveryLeadSubmission.mjs +1 -1
- package/dist/components/DeliveryLead/DeliveryLeadSubmissionList.mjs +1 -1
- package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
- package/dist/components/DeliveryLead/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-type-selection.mjs +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-options.mjs +1 -1
- package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
- package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
- package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
- package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
- package/dist/components/DigitalColleagues/team-form.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/DashboardHeader.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
- package/dist/components/Foundary/Knowledge/manage-team-context.mjs +1 -1
- package/dist/components/Foundary/LandingMenu.mjs +1 -1
- package/dist/components/Foundary/Login.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/RichText/components/RawUploadComponent/index.mjs +1 -1
- package/dist/components/Foundary/RichText/index.mjs +1 -1
- package/dist/components/Foundary/RichText/nodes/image-node.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/image-plugin.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
- package/dist/components/Foundary/SearchableSelect.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/colleague-card.mjs +1 -1
- package/dist/components/Foundary/colleague-form.mjs +1 -1
- package/dist/components/Foundary/colleague-type-selection.mjs +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/file-edit.mjs +1 -1
- package/dist/components/Foundary/foundary-clone.mjs +1 -1
- package/dist/components/Foundary/foundary-layout.mjs +1 -1
- package/dist/components/Foundary/foundary-options.mjs +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/Foundary/knowledge-search.mjs +1 -1
- package/dist/components/Foundary/team-form.mjs +1 -1
- package/dist/components/HeaderFooter/Footer.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderMenu.mjs +1 -1
- package/dist/components/HeaderFooter/RelatedPagesMenu.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/SimpleHeader.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/enhanced-header.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/DashboardHero/DashboardHero.mjs +1 -1
- package/dist/components/Heros/DashboardHero/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/ApproveLeave.mjs +1 -1
- package/dist/components/Holidays/CalendarView.mjs +1 -1
- package/dist/components/Holidays/HolidayGrid.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/RequestLeave.mjs +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/Categories.mjs +1 -1
- package/dist/components/Menus/Filter.mjs +1 -1
- package/dist/components/Menus/ProjectTeam.mjs +1 -1
- package/dist/components/Menus/RelatedContent.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/Container.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/Link/index.mjs +1 -1
- package/dist/components/Payload/Pagination/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/AddEpicModal.mjs +1 -1
- package/dist/components/Projects/AddFileModal.mjs +1 -1
- package/dist/components/Projects/AddSprintModal.mjs +1 -1
- package/dist/components/Projects/AddTaskModal.mjs +1 -1
- package/dist/components/Projects/EpicFilter.mjs +1 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/KanbanColumn.mjs +1 -1
- package/dist/components/Projects/PlanningView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/TaskCard.mjs +1 -1
- package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
- package/dist/components/Projects/TaskSelect.mjs +1 -1
- package/dist/components/Projects/TaskSidebar.mjs +1 -1
- package/dist/components/Projects/TasksView.mjs +1 -1
- package/dist/components/Projects/TeamSwitcher.mjs +1 -1
- package/dist/components/Projects/business-unit-switcher.mjs +1 -1
- package/dist/components/Projects/file-list.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/Projects/project-card.mjs +1 -1
- package/dist/components/Projects/project-form.mjs +1 -1
- package/dist/components/Projects/team-card.mjs +1 -1
- package/dist/components/Projects/team-switcher-bar.mjs +1 -1
- package/dist/components/dc-temp/creative.mjs +1 -1
- package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/dc-temp/markdown-renderer.mjs +1 -1
- package/dist/components/index.js +34 -37
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/alert.mjs +1 -1
- package/dist/components/ui/avatar.mjs +1 -1
- package/dist/components/ui/badge.mjs +1 -1
- package/dist/components/ui/breadcrumb.mjs +1 -1
- package/dist/components/ui/button.mjs +1 -1
- package/dist/components/ui/calendar.mjs +1 -1
- package/dist/components/ui/card.mjs +1 -1
- package/dist/components/ui/checkbox.mjs +1 -1
- package/dist/components/ui/command.mjs +1 -1
- package/dist/components/ui/dialog.mjs +1 -1
- package/dist/components/ui/dropdown-menu.mjs +1 -1
- package/dist/components/ui/hover-card.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/input.mjs +1 -1
- package/dist/components/ui/inputs/common/styles/index.mjs +1 -1
- package/dist/components/ui/inputs/text-input/index.mjs +1 -1
- package/dist/components/ui/inputs/textarea-input/index.mjs +1 -1
- package/dist/components/ui/label.mjs +1 -1
- package/dist/components/ui/pagination.mjs +1 -1
- package/dist/components/ui/popover.mjs +1 -1
- package/dist/components/ui/progress.mjs +1 -1
- package/dist/components/ui/scroll-area.mjs +1 -1
- package/dist/components/ui/select.mjs +1 -1
- package/dist/components/ui/separator.mjs +1 -1
- package/dist/components/ui/sheet.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/components/ui/skeleton.mjs +1 -1
- package/dist/components/ui/switch.mjs +1 -1
- package/dist/components/ui/tabs.mjs +1 -1
- package/dist/components/ui/textarea.mjs +1 -1
- package/dist/components/ui/toast.mjs +1 -1
- package/dist/components/ui/toaster.mjs +1 -1
- package/dist/components/ui/toggle-group.mjs +1 -1
- package/dist/components/ui/toggle.mjs +1 -1
- package/dist/components/ui/tooltip.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +32 -35
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/ImageSection.mjs +1 -1
- package/dist/sections/MainPageSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/dist/styles/Colors.mjs +1 -1
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-B7RZ4K6Y.mjs +0 -1
- package/dist/chunk-BAB3ATRB.mjs +0 -4
- package/dist/chunk-EPJJKGCG.mjs +0 -1
- package/dist/chunk-G6OGEIN4.mjs +0 -4
- package/dist/chunk-KQRQXBJ3.mjs +0 -9
- package/dist/chunk-N7M6FTIO.mjs +0 -4
- package/dist/chunk-SOTCQX2G.mjs +0 -1
- package/dist/chunk-UJITFLIZ.mjs +0 -1
- package/dist/components/Chat/ChatInterfaceMessages.d.ts +0 -24
- package/dist/components/Chat/ChatInterfaceMessages.js +0 -7
- package/dist/components/Chat/ChatInterfaceMessages.mjs +0 -2
- package/dist/components/Chat/ChatMessage.css +0 -1
- package/dist/components/Chat/ChatMessage.d.ts +0 -19
- package/dist/components/Chat/ChatMessage.js +0 -7
- package/dist/components/Chat/ChatMessage.mjs +0 -1
- /package/dist/components/Chat/{ChatInterfaceMessages.css → PartTypes/ColleagueHandoff.css} +0 -0
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
'use client'
|
|
4
4
|
'use client';
|
|
5
5
|
|
|
6
|
-
"use strict";"use client";var oi=Object.create;var Ct=Object.defineProperty;var ai=Object.getOwnPropertyDescriptor;var ii=Object.getOwnPropertyNames;var ri=Object.getPrototypeOf,ni=Object.prototype.hasOwnProperty;var si=(e,t)=>{for(var o in t)Ct(e,o,{get:t[o],enumerable:!0})},Co=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ii(t))!ni.call(e,n)&&n!==o&&Ct(e,n,{get:()=>t[n],enumerable:!(a=ai(t,n))||a.enumerable});return e};var G=(e,t,o)=>(o=e!=null?oi(ri(e)):{},Co(t||!e||!e.__esModule?Ct(o,"default",{value:e,enumerable:!0}):o,e)),li=e=>Co(Ct({},"__esModule",{value:!0}),e);var gr={};si(gr,{CopilotInterface:()=>ur});module.exports=li(gr);var Ha=require("@ai-sdk/react"),ct=require("react"),$t=require("motion/react"),Oa=require("lucide-react");var Mo=require("clsx");var Jt="-",ci=e=>{let t=pi(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let s=r.split(Jt);return s[0]===""&&s.length!==1&&s.shift(),Po(s,t)||di(r)},getConflictingClassGroupIds:(r,s)=>{let c=o[r]||[];return s&&a[r]?[...c,...a[r]]:c}}},Po=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),n=a?Po(e.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;let i=e.join(Jt);return t.validators.find(({validator:r})=>r(i))?.classGroupId},No=/^\[(.+)\]$/,di=e=>{if(No.test(e)){let t=No.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},pi=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return ui(Object.entries(e.classGroups),o).forEach(([i,r])=>{_t(r,a,i,t)}),a},_t=(e,t,o,a)=>{e.forEach(n=>{if(typeof n=="string"){let i=n===""?t:ko(t,n);i.classGroupId=o;return}if(typeof n=="function"){if(mi(n)){_t(n(a),t,o,a);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([i,r])=>{_t(r,ko(t,i),o,a)})})},ko=(e,t)=>{let o=e;return t.split(Jt).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},mi=e=>e.isThemeGetter,ui=(e,t)=>t?e.map(([o,a])=>{let n=a.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([r,s])=>[t+r,s])):i);return[o,n]}):e,gi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,n=(i,r)=>{o.set(i,r),t++,t>e&&(t=0,a=o,o=new Map)};return{get(i){let r=o.get(i);if(r!==void 0)return r;if((r=a.get(i))!==void 0)return n(i,r),r},set(i,r){o.has(i)?o.set(i,r):n(i,r)}}},To="!",fi=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,n=t[0],i=t.length,r=s=>{let c=[],m=0,w=0,b;for(let C=0;C<s.length;C++){let k=s[C];if(m===0){if(k===n&&(a||s.slice(C,C+i)===t)){c.push(s.slice(w,C)),w=C+i;continue}if(k==="/"){b=C;continue}}k==="["?m++:k==="]"&&m--}let y=c.length===0?s:s.substring(w),I=y.startsWith(To),T=I?y.substring(1):y,R=b&&b>w?b-w:void 0;return{modifiers:c,hasImportantModifier:I,baseClassName:T,maybePostfixModifierPosition:R}};return o?s=>o({className:s,parseClassName:r}):r},bi=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},vi=e=>({cache:gi(e.cacheSize),parseClassName:fi(e),...ci(e)}),hi=/\s+/,yi=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:n}=t,i=[],r=e.trim().split(hi),s="";for(let c=r.length-1;c>=0;c-=1){let m=r[c],{modifiers:w,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:I}=o(m),T=!!I,R=a(T?y.substring(0,I):y);if(!R){if(!T){s=m+(s.length>0?" "+s:s);continue}if(R=a(y),!R){s=m+(s.length>0?" "+s:s);continue}T=!1}let C=bi(w).join(":"),k=b?C+To:C,U=k+R;if(i.includes(U))continue;i.push(U);let A=n(R,T);for(let M=0;M<A.length;++M){let Y=A[M];i.push(k+Y)}s=m+(s.length>0?" "+s:s)}return s};function xi(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Do(t))&&(a&&(a+=" "),a+=o);return a}var Do=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=Do(e[a]))&&(o&&(o+=" "),o+=t);return o};function wi(e,...t){let o,a,n,i=r;function r(c){let m=t.reduce((w,b)=>b(w),e());return o=vi(m),a=o.cache.get,n=o.cache.set,i=s,s(c)}function s(c){let m=a(c);if(m)return m;let w=yi(c,o);return n(c,w),w}return function(){return i(xi.apply(null,arguments))}}var O=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Ro=/^\[(?:([a-Oa-]+):)?(.+)\]$/i,Ci=/^\d+\/\d+$/,Ni=new Set(["px","full","screen"]),ki=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pi=/\d+(%|px|r?em|[sdl]?Bo([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|Bo|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ti=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Di=/^(inset_)?-?((\d+)?\.?(\d+)[a-Oa]+|0)_-?((\d+)?\.?(\d+)[a-Oa]+|0)/,Ri=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Me=e=>Ye(e)||Ni.has(e)||Ci.test(e),je=e=>Ze(e,"length",zi),Ye=e=>!!e&&!Number.isNaN(Number(e)),Kt=e=>Ze(e,"number",Ye),mt=e=>!!e&&Number.isInteger(Number(e)),Si=e=>e.endsWith("%")&&Ye(e.slice(0,-1)),x=e=>Ro.test(e),He=e=>ki.test(e),Ai=new Set(["length","size","percentage"]),Mi=e=>Ze(e,Ai,So),Ii=e=>Ze(e,"position",So),Bi=new Set(["image","url"]),Li=e=>Ze(e,Bi,Fi),Ei=e=>Ze(e,"",Ui),ut=()=>!0,Ze=(e,t,o)=>{let a=Ro.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},zi=e=>Pi.test(e)&&!Ti.test(e),So=()=>!1,Ui=e=>Di.test(e),Fi=e=>Ri.test(e);var ji=()=>{let e=O("colors"),t=O("spacing"),o=O("blur"),a=O("brightness"),n=O("borderColor"),i=O("borderRadius"),r=O("borderSpacing"),s=O("borderWidth"),c=O("contrast"),m=O("grayscale"),w=O("hueRotate"),b=O("invert"),y=O("gap"),I=O("gradientColorStops"),T=O("gradientColorStopPositions"),R=O("inset"),C=O("margin"),k=O("opacity"),U=O("padding"),A=O("saturate"),M=O("scale"),Y=O("sepia"),K=O("skew"),se=O("space"),oe=O("translate"),W=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],le=()=>["auto",x,t],B=()=>[x,t],Fe=()=>["",Me,je],ve=()=>["auto",Ye,x],d=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["solid","dashed","dotted","double","none"],S=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",x],u=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[Ye,x];return{cacheSize:500,separator:":",theme:{colors:[ut],spacing:[Me,je],blur:["none","",He,x],brightness:F(),borderColor:[e],borderRadius:["none","","full",He,x],borderSpacing:B(),borderWidth:Fe(),contrast:F(),grayscale:$(),hueRotate:F(),invert:$(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[Si,je],inset:le(),margin:le(),opacity:F(),padding:B(),saturate:F(),scale:F(),sepia:$(),skew:F(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",x]}],container:["container"],columns:[{columns:[He]}],"break-after":[{"break-after":u()}],"break-before":[{"break-before":u()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...d(),x]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],Oa:[{Oa:["auto",mt,x]}],basis:[{basis:le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",x]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",mt,x]}],"grid-cols":[{"grid-cols":[ut]}],"col-start-end":[{col:["auto",{span:["full",mt,x]},x]}],"col-start":[{"col-start":ve()}],"col-end":[{"col-end":ve()}],"grid-rows":[{"grid-rows":[ut]}],"row-start-end":[{row:["auto",{span:[mt,x]},x]}],"row-start":[{"row-start":ve()}],"row-end":[{"row-end":ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",x]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",x]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...ce()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ce(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ce(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],Bo:[{Bo:[U]}],px:[{px:[U]}],py:[{py:[U]}],ps:[{ps:[U]}],ct:[{ct:[U]}],pt:[{pt:[U]}],pr:[{pr:[U]}],pb:[{pb:[U]}],pl:[{pl:[U]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],Bo:[{Bo:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",x,t]}],"min-w":[{"min-w":[x,t,"min","max","fit"]}],"max-w":[{"max-w":[x,t,"none","full","min","max","fit","prose",{screen:[He]},He]}],Bo:[{Bo:[x,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-Bo":[{"min-Bo":[x,t,"min","max","fit","svh","lvh","dvh"]}],"max-Bo":[{"max-Bo":[x,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[x,t,"auto","min","max","fit"]}],"font-size":[{text:["base",He,je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kt]}],"font-family":[{font:[ut]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",x]}],"line-clamp":[{"line-clamp":["none",Ye,Kt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Me,x]}],"list-image":[{"list-image":["none",x]}],"list-style-type":[{list:["none","disc","decimal",x]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Me,je]}],"underline-offset":[{"underline-offset":["auto",Me,x]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",x]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",x]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...d(),Ii]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mi]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Li]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[I]}],"gradient-via":[{via:[I]}],"gradient-to":[{to:[I]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...E(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:E()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...E()]}],"outline-offset":[{"outline-offset":[Me,x]}],"outline-w":[{outline:[Me,je]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Me,je]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",He,Ei]}],"shadow-color":[{shadow:[ut]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...S(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":S()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",He,x]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[b]}],saturate:[{saturate:[A]}],sepia:[{sepia:[Y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",x]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",x]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",x]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[mt,x]}],"translate-x":[{"translate-x":[oe]}],"translate-y":[{"translate-y":[oe]}],"skew-x":[{"skew-x":[K]}],"skew-y":[{"skew-y":[K]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",x]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","Bo-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",x]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-Bo":[{"scroll-Bo":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-Bo":[{"scroll-Bo":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-ct":[{"scroll-ct":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",x]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Me,je,Kt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],Bo:["px","py","ps","ct","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","Bo","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","Bo"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-Bo","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-Bo":["scroll-px","scroll-py","scroll-ps","scroll-ct","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ao=wi(ji);function l(...e){return Ao((0,Mo.clsx)(e))}var At=G(require("react")),Mt=G(require("next/link"));var Io=require("class-variance-authority");var Bo=require("react/jsx-runtime"),Hi=(0,Io.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ae({className:e,variant:t,...o}){return(0,Bo.jsx)("div",{className:l(Hi({variant:t}),e),...o})}var Lo=require("@radix-ui/react-slot"),zo=G(require("react")),Oi=(0,Io.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"Bo-10 px-4 py-2",icon:"Bo-10 w-10",lg:"Bo-11 rounded px-8",sm:"Bo-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),D=zo.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...n},i)=>(0,Bo.jsx)(e?Lo.Slot:"button",{className:l(Oi({className:t,size:o,variant:a})),ref:i,...n}));D.displayName="Button";var Fo=G(require("react"));var gt=Fo.forwardRef(({className:e,type:t,...o},a)=>(0,Bo.jsx)("input",{type:t,className:l("flex Bo-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));gt.displayName="Input";var Xt=G(require("react")),ue=G(require("@radix-ui/react-scroll-area"));var Ne=Xt.forwardRef(({className:e,children:t,...o},a)=>(0,Bo.jsxs)(ue.Root,{ref:a,className:l("relative overflow-hidden",e),...o,children:[(0,Bo.jsx)(ue.Viewport,{className:"Bo-full w-full rounded-[inherit]",children:t}),(0,Bo.jsx)(Ho,{}),(0,Bo.jsx)(ue.Corner,{})]}));Ne.displayName=ue.Root.displayName;var Ho=Xt.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,Bo.jsx)(ue.ScrollAreaScrollbar,{ref:a,orientation:t,className:l("flex touch-none select-none transition-colors",t==="vertical"&&"Bo-full w-2.5 border-l border-l-transparent Bo-[1px]",t==="horizontal"&&"Bo-2.5 flex-col border-t border-t-transparent Bo-[1px]",e),...o,children:(0,Bo.jsx)(ue.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ho.displayName=ue.ScrollAreaScrollbar.displayName;var ft=G(require("react")),J=G(require("@radix-ui/react-dialog"));var Vo=J.Root;var Vi=J.Portal;var Wo=ft.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)(J.Overlay,{ref:o,className:l("fixed inset-0 Oa-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Wo.displayName=J.Overlay.displayName;var Qt=ft.forwardRef(({className:e,children:t,...o},a)=>(0,Bo.jsxs)(Vi,{children:[(0,Bo.jsx)(Wo,{}),(0,Bo.jsxs)(J.Content,{ref:a,className:l("fixed left-[50%] top-[50%] Oa-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background Bo-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,Bo.jsxs)(J.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,Bo.jsx)(Oa.Bo,{className:"Bo-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Qt.displayName=J.Content.displayName;var Yt=({className:e,...t})=>(0,Bo.jsx)("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Yt.displayName="DialogHeader";var Wi=({className:e,...t})=>(0,Bo.jsx)("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wi.displayName="DialogFooter";var Zt=ft.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)(J.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));Zt.displayName=J.Title.displayName;var Gi=ft.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)(J.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));Gi.displayName=J.Description.displayName;var bt=G(require("@radix-ui/react-checkbox")),$o=G(require("react")),eo=$o.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)(bt.Root,{className:l("peer Bo-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,Bo.jsx)(bt.Indicator,{className:l("flex items-center justify-center text-current"),children:(0,Bo.jsx)(Oa.Check,{className:"Bo-4 w-4"})})}));eo.displayName=bt.Root.displayName;var ke=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Ko=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Bo.jsx)(Oa.Palette,{className:"Bo-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Bo.jsx)(Oa.Code,{className:"Bo-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Bo.jsx)(Oa.TrendingUp,{className:"Bo-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Bo.jsx)(Oa.DollarSign,{className:"Bo-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,Bo.jsx)(Oa.Users,{className:"Bo-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Bo.jsx)(Oa.Wrench,{className:"Bo-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Bo.jsx)(Oa.Scale,{className:"Bo-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Bo.jsx)(Oa.Package,{className:"Bo-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Bo.jsx)(Oa.Zap,{className:"Bo-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Bo.jsx)(Oa.Building2,{className:"Bo-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Tt=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var to=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],kt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Rt=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],$i=[...Rt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],qi=[...Tt,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Pt={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},qo={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Rt.filter(e=>e.epicId==="1")};var Ur={empty:{initialProjects:Pt.projects,initialEpics:Pt.epics,initialSprints:Pt.sprints,initialTasks:Pt.tasks},default:{initialProjects:Tt,initialEpics:to,initialSprints:kt,initialTasks:Rt},highDensity:{initialProjects:Tt,initialEpics:to,initialSprints:kt,initialTasks:$i},singleEpic:{initialProjects:Tt,initialEpics:qo.epics,initialSprints:kt,initialTasks:qo.tasks},multipleProjects:{initialProjects:qi,initialEpics:to,initialSprints:kt,initialTasks:Rt}},Dt=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(ke),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(ke),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(ke),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(ke),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(ke),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(ke),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(ke),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(ke),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(ke),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(ke),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Fr=[{id:"1",title:"Review quarterly report",description:"Oa through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Dt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Dt.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Dt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var jr=Dt.filter(e=>e.type==="digital");function _o(e,t){let[o,a]=(0,ct.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),n=i=>{try{a(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,ct.useEffect)(()=>{n(o)},[]),[o,n]}function oo({items:e,isOpen:t,isMobile:o=!1,onClose:a,currentBusinessUnit:n=Ko[0],onBusinessUnitChange:i,onSearch:r,className:s,logo:c="/headerlogo.png",logoLink:m="/teams",appName:w="Nuvia",tagline:b="Collaboration Platform"}){let[y,I]=At.useState({}),[T,R]=_o("sidebar-favorites",{}),[C,k]=At.useState(null),[U,A]=At.useState(""),M=d=>{I(E=>({...E,[d]:!E[d]}))},Y=d=>{i?.(d)},K=()=>{U.trim()&&r?.(U.trim())},se=d=>{d.key==="Enter"&&(d.preventDefault(),K())},oe=(d,E)=>{let S=T[d]||[],ce=S.includes(E)?S.filter($=>$!==E):S.concat(E);R({...T,[d]:ce})},W=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let E=T[d.id]||[],S=d.items.filter($=>E.includes($.id)),ce=d.items.filter($=>!E.includes($.id));return[...S,...ce].slice(0,d.maxItems)},_=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,le=e,B=d=>{let E=_(d),S=W(d),ce=(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,Bo.jsx)("span",{children:d.title})]}),d.badge&&(0,Bo.jsx)(ae,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,Bo.jsx)(Oa.ChevronDown,{className:l("ml-2 Bo-4 w-4 transition-transform",y[d.title]?"rotate-180":"")})]}),$=l("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",d.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return d.url?(0,Bo.jsx)(Mt.default,{href:d.url,className:$,onClick:o?a:void 0,children:ce}):(0,Bo.jsx)("button",{className:$,onClick:()=>d.items&&M(d.title),children:ce})},Fe=()=>{let d=e.find(S=>S.id===C);if(!d||!d.items||!d.maxItems)return null;let E=T[d.id]||[];return(0,Bo.jsx)(Vo,{open:!!C,onOpenChange:S=>!S&&k(null),children:(0,Bo.jsxs)(Qt,{className:"sm:max-w-md",children:[(0,Bo.jsxs)(Yt,{children:[(0,Bo.jsxs)(Zt,{children:["Manage ",d.title," Favorites"]}),(0,Bo.jsxs)("Bo",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,Bo.jsx)(Ne,{className:"max-Bo-96 pr-4",children:(0,Bo.jsx)("div",{className:"space-y-4",children:d.items.map(S=>(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(eo,{id:S.id,checked:E.includes(S.id),onCheckedChange:()=>oe(d.id,S.id),disabled:!E.includes(S.id)&&E.length>=(d.maxItems||0)}),(0,Bo.jsxs)("label",{htmlFor:S.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[S.title,S.badge&&(0,Bo.jsx)(ae,{variant:"outline",className:"text-xs",children:S.badge})]})]},S.id))})})]})})},ve=(0,Bo.jsxs)("div",{className:"flex Bo-full flex-col bg-background",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Bo-4",children:[(0,Bo.jsxs)(Mt.default,{href:m,className:"flex items-center gap-3",children:[(0,Bo.jsx)("div",{className:"flex Bo-14 w-14 items-center justify-center",children:(0,Bo.jsx)("img",{src:c,alt:"Header Logo",className:"Bo-14 w-14 object-contain"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h2",{className:"font-semibold",children:w}),(0,Bo.jsx)("Bo",{className:"text-xs text-muted-foreground",children:b})]})]}),o&&(0,Bo.jsx)(D,{variant:"ghost",size:"icon",onClick:a,children:(0,Bo.jsx)(Oa.Bo,{className:"Bo-5 w-5"})})]}),(0,Bo.jsx)("div",{className:"px-3 py-2",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(Oa.Search,{className:"absolute left-3 top-3 Bo-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(gt,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:U,onChange:d=>A(d.target.value),onKeyPress:se})]})}),(0,Bo.jsx)(Ne,{className:"flex-1 px-3 py-2",children:(0,Bo.jsx)("div",{className:"space-y-1",children:le.map(d=>(0,Bo.jsxs)("div",{className:"mb-1",children:[B(d),d.items&&y[d.title]&&(0,Bo.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[W(d).map(E=>(0,Bo.jsxs)(Mt.default,{href:E.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:o?a:void 0,children:[E.title,E.badge&&(0,Bo.jsx)(ae,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:E.badge})]},E.id)),_(d)&&d.items&&d.items.length>W(d).length&&(0,Bo.jsxs)("button",{onClick:()=>k(d.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",d.items.length-W(d).length," more available"]})]})]},d.id))})}),(0,Bo.jsx)("div",{className:"Bo-3",children:(0,Bo.jsx)("div",{className:"space-y-1",children:(0,Bo.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Bo.jsx)(Oa.Settings,{className:"Bo-5 w-5"}),(0,Bo.jsx)("span",{children:"Settings"})]})})}),(0,Bo.jsx)(Fe,{})]});return o?(0,Bo.jsx)("div",{className:l("fixed inset-y-0 left-0 Oa-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:ve}):(0,Bo.jsx)("div",{className:l("fixed inset-y-0 left-0 Oa-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:ve})}var It=G(require("react")),Ie=G(require("@radix-ui/react-avatar"));var et=It.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)(Ie.Root,{ref:o,className:l("relative flex Bo-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));et.displayName=Ie.Root.displayName;var ao=It.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)(Ie.Image,{ref:o,className:l("aspect-square Bo-full w-full",e),...t}));ao.displayName=Ie.Image.displayName;var tt=It.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)(Ie.Fallback,{ref:o,className:l("flex Bo-full w-full items-center justify-center rounded-full bg-muted",e),...t}));tt.displayName=Ie.Fallback.displayName;var Jo=G(require("react")),xe=G(require("@radix-ui/react-tooltip"));var ot=xe.Provider,at=xe.Root,it=xe.Trigger,Ke=Jo.forwardRef(({className:e,sideOffset:t=4,...o},a)=>(0,Bo.jsx)(xe.Portal,{children:(0,Bo.jsx)(xe.Content,{ref:a,sideOffset:t,className:l("Oa-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Ke.displayName=xe.Content.displayName;var Xo=require("next-themes");function Qo(){let{setTheme:e,theme:t}=(0,Xo.useTheme)();return(0,Bo.jsx)(ot,{children:(0,Bo.jsxs)(at,{children:[(0,Bo.jsx)(it,{asChild:!0,children:(0,Bo.jsxs)(D,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Bo.jsx)(Oa.Sun,{className:"Bo-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Bo.jsx)(Oa.Moon,{className:"absolute Bo-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Bo.jsx)(Ke,{children:"Toggle theme"})]})})}function Yo({notifications:e,open:t,onClose:o,onNotificationRemove:a,onRemoveAll:n,className:i}){let r=e.filter(m=>!m.read),s=r.length,c=m=>{switch(m){case"info":return(0,Bo.jsx)(Oa.Info,{className:"Bo-5 w-5 text-blue-500"});case"success":return(0,Bo.jsx)(Oa.Check,{className:"Bo-5 w-5 text-green-500"});case"warning":return(0,Bo.jsx)(Oa.AlertTriangle,{className:"Bo-5 w-5 text-amber-500"});case"error":return(0,Bo.jsx)(Oa.AlertTriangle,{className:"Bo-5 w-5 text-red-500"})}};return(0,Bo.jsx)($t.AnimatePresence,{children:t&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)($t.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 Oa-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:o}),(0,Bo.jsx)($t.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:l("fixed inset-y-0 right-0 Oa-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,Bo.jsxs)("div",{className:"flex Bo-full flex-col",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between border-b Bo-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(Oa.Bell,{className:"Bo-5 w-5"}),(0,Bo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,Bo.jsxs)(ae,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,Bo.jsxs)(D,{variant:"ghost",size:"icon",onClick:o,className:"rounded-full",children:[(0,Bo.jsx)(Oa.Bo,{className:"Bo-5 w-5"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,Bo.jsxs)("div",{className:"flex items-center justify-between border-b Bo-2",children:[(0,Bo.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,Bo.jsx)(D,{variant:"ghost",size:"sm",onClick:n,className:"text-sm",children:"Dismiss all"})]}),r.length>0?(0,Bo.jsx)(Ne,{className:"flex-1",children:(0,Bo.jsx)("div",{className:"divide-y",children:r.map(m=>(0,Bo.jsxs)("div",{className:l("flex gap-3 Bo-4 transition-colors bg-muted/50"),children:[(0,Bo.jsx)("div",{className:"flex Bo-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:c(m.type)}),(0,Bo.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("Bo",{className:"font-medium",children:m.title}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("Bo",{className:"text-xs text-muted-foreground",children:m.time}),(0,Bo.jsx)(D,{variant:"ghost",size:"sm",className:"Bo-6 w-6 Bo-0",onClick:()=>a?.(m.id),title:"Dismiss",children:(0,Bo.jsx)(Oa.Check,{className:"Bo-3 w-3"})})]})]}),(0,Bo.jsx)("Bo",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,Bo.jsxs)(D,{variant:"link",size:"sm",className:"Bo-auto Bo-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,Bo.jsx)(Oa.ChevronRight,{className:"ml-1 Bo-3 w-3"})]})]})]},m.id))})}):(0,Bo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center Bo-8 text-center",children:[(0,Bo.jsx)("div",{className:"flex Bo-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Bo.jsx)(Oa.Bell,{className:"Bo-8 w-8 text-muted-foreground"})}),(0,Bo.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,Bo.jsx)("Bo",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var _e=G(require("@radix-ui/react-tabs"));function Zo({className:e,...t}){return(0,Bo.jsx)(_e.Root,{"data-slot":"tabs",className:l("flex flex-col gap-2",e),...t})}function ea({className:e,...t}){return(0,Bo.jsx)(_e.List,{"data-slot":"tabs-list",className:l("bg-muted text-muted-foreground inline-flex Bo-9 w-fit items-center justify-center rounded-lg Bo-[3px]",e),...t})}function ta({className:e,...t}){return(0,Bo.jsx)(_e.Trigger,{"data-slot":"tabs-trigger",className:l("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex Bo-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Be=G(require("react")),P=G(require("@radix-ui/react-dropdown-menu")),rt=require("@radix-ui/react-icons");var oa=P.Root,aa=P.Trigger;var Ki=Be.forwardRef(({className:e,inset:t,children:o,...a},n)=>(0,Bo.jsxs)(P.SubTrigger,{ref:n,className:l("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a,children:[o,(0,Bo.jsx)(rt.ChevronRightIcon,{className:"ml-auto"})]}));Ki.displayName=P.SubTrigger.displayName;var _i=Be.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)(P.SubContent,{ref:o,className:l("Oa-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Bo-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));_i.displayName=P.SubContent.displayName;var ro=Be.forwardRef(({className:e,sideOffset:t=4,...o},a)=>(0,Bo.jsx)(P.Portal,{children:(0,Bo.jsx)(P.Content,{ref:a,sideOffset:t,className:l("Oa-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Bo-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ro.displayName=P.Content.displayName;var no=Be.forwardRef(({className:e,inset:t,...o},a)=>(0,Bo.jsx)(P.Item,{ref:a,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));no.displayName=P.Item.displayName;var Ji=Be.forwardRef(({className:e,children:t,checked:o,...a},n)=>(0,Bo.jsxs)(P.CheckboxItem,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a,children:[(0,Bo.jsx)("span",{className:"absolute left-2 flex Bo-3.5 w-3.5 items-center justify-center",children:(0,Bo.jsx)(P.ItemIndicator,{children:(0,Bo.jsx)(rt.CheckIcon,{className:"Bo-4 w-4"})})}),t]}));Ji.displayName=P.CheckboxItem.displayName;var Xi=Be.forwardRef(({className:e,children:t,...o},a)=>(0,Bo.jsxs)(P.RadioItem,{ref:a,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,Bo.jsx)("span",{className:"absolute left-2 flex Bo-3.5 w-3.5 items-center justify-center",children:(0,Bo.jsx)(P.ItemIndicator,{children:(0,Bo.jsx)(rt.DotFilledIcon,{className:"Bo-4 w-4 fill-current"})})}),t]}));Xi.displayName=P.RadioItem.displayName;var Qi=Be.forwardRef(({className:e,inset:t,...o},a)=>(0,Bo.jsx)(P.Label,{ref:a,className:l("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Qi.displayName=P.Label.displayName;var Yi=Be.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)(P.Separator,{ref:o,className:l("-mx-1 my-1 Bo-px bg-muted",e),...t}));Yi.displayName=P.Separator.displayName;var Zi=({className:e,...t})=>(0,Bo.jsx)("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});Zi.displayName="DropdownMenuShortcut";function ra({activeTab:e,onTabChange:t,tabOptions:o,className:a="",maxWidth:n="700px",gridCols:i=6}){let r=o.find(s=>s.value===e);return(0,Bo.jsxs)($t.motion.div,{className:`flex-1 flex justify-center ${a}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Bo.jsx)("div",{className:"hidden lg:block",children:(0,Bo.jsx)(Zo,{value:e,onValueChange:t,children:(0,Bo.jsx)(ea,{className:"grid w-full rounded-2xl Bo-0 Bo-10",style:{maxWidth:n,gridTemplateColumns:`repeat(${Math.min(i,o.length)}, minmax(0, 1fr))`},children:o.map(s=>(0,Bo.jsx)($t.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Bo.jsx)(ta,{value:s.value,onClick:()=>t?.(s.value),className:"w-full Bo-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,Bo.jsx)("div",{className:"lg:hidden",children:(0,Bo.jsxs)(oa,{children:[(0,Bo.jsx)(aa,{asChild:!0,children:(0,Bo.jsxs)(D,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[r?.label||"Select",(0,Bo.jsx)(Oa.ChevronDown,{className:"Bo-4 w-4 ml-2"})]})}),(0,Bo.jsx)(ro,{align:"center",className:"w-[180px]",children:o.map(s=>(0,Bo.jsx)(no,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function na({title:e,notifications:t=[],onToggleSidebar:o,onToggleMobileMenu:a,sidebarOpen:n=!0,className:i,activeTab:r="assistant",onTabChange:s,showTabs:c=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:w,actionIcon:b=(0,Bo.jsx)(Oa.Bot,{className:"mr-2 Bo-4 w-4"}),actionText:y="Action",onNotificationRemove:I,onRemoveAll:T,logo:R="/headerlogo.png",appName:C="Nuvia",tagline:k="Collaboration Platform"}){let[U,A]=(0,ct.useState)(!1),[M,Y]=(0,ct.useState)(t),K=M.filter(W=>!W.read).length,se=W=>{Y(_=>_.filter(le=>le.id!==W)),I?.(W)},oe=()=>{Y(W=>W.filter(_=>_.read)),T?.()};return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("header",{className:`sticky top-0 Oa-10 flex Bo-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,Bo.jsx)(D,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,Bo.jsx)(Oa.Menu,{className:"Bo-5 w-5"})}),(0,Bo.jsx)(D,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:o,children:(0,Bo.jsx)(Oa.PanelLeft,{className:"Bo-5 w-5"})}),!n&&(0,Bo.jsxs)($t.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Bo.jsx)("div",{className:"flex Bo-10 w-10 items-center justify-center",children:(0,Bo.jsx)("img",{src:R,alt:"Logo",className:"Bo-10 w-10 object-contain"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h2",{className:"font-semibold text-sm",children:C}),(0,Bo.jsx)("Bo",{className:"text-xs text-muted-foreground",children:k})]})]}),(0,Bo.jsxs)("div",{className:"flex flex-1 items-center",children:[c&&(0,Bo.jsx)(ra,{activeTab:r,onTabChange:s,tabOptions:m}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Bo.jsx)($t.motion.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:(0,Bo.jsx)($t.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Bo.jsxs)(D,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:w,children:[b,y]})})}),(0,Bo.jsx)(Qo,{}),(0,Bo.jsx)(ot,{children:(0,Bo.jsxs)(at,{children:[(0,Bo.jsx)(it,{asChild:!0,children:(0,Bo.jsx)($t.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Bo.jsxs)(D,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>A(!0),children:[(0,Bo.jsx)($t.motion.div,{animate:K>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:K>0?1/0:0,repeatDelay:3},children:(0,Bo.jsx)(Oa.Bell,{className:"Bo-5 w-5"})}),K>0&&(0,Bo.jsx)($t.motion.span,{className:"absolute -right-1 -top-1 flex Bo-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:K})]})})}),(0,Bo.jsx)(Ke,{children:"Notifications"})]})}),(0,Bo.jsx)($t.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Bo.jsxs)(et,{className:"Bo-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Bo.jsx)(ao,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Bo.jsx)(tt,{})]})})]})]})]}),(0,Bo.jsx)(Yo,{notifications:M,open:U,onClose:()=>A(!1),onNotificationRemove:se,onRemoveAll:oe})]})}var sa=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Bo.jsx)(Oa.User,{className:"Bo-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function ca({sidebarItems:e,children:t,title:o="Digital Colleagues",notifications:a=[],currentBusinessUnit:n=sa[0],onBusinessUnitChange:i,onSearch:r,businessUnits:s=sa,activeTab:c,onTabChange:m,showTabs:w=!1,onActionClick:b,actionIcon:y,actionText:I="Action",onNotificationRemove:T,onRemoveAll:R,logo:C="/headerlogo.png",appName:k="Nuvia",tagline:U="Collaboration Platform",sidebarInitiallyClosed:A=!1}){let[M,Y]=(0,ct.useState)(!A),[K,se]=(0,ct.useState)(!1),[oe,W]=(0,ct.useState)(n),_=le=>{W(le),i?.(le)};return(0,Bo.jsxs)("div",{className:"flex Bo-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[K&&(0,Bo.jsx)("div",{className:"fixed inset-0 Oa-40 bg-black/50 md:hidden",onClick:()=>se(!1)}),(0,Bo.jsx)("div",{className:"md:hidden",children:(0,Bo.jsx)(oo,{items:e,isOpen:K,isMobile:!0,onClose:()=>se(!1),currentBusinessUnit:oe,onBusinessUnitChange:_,onSearch:r,logo:C,appName:k,tagline:U})}),(0,Bo.jsx)("div",{className:"hidden md:block",children:(0,Bo.jsx)(oo,{items:e,isOpen:M,isMobile:!1,currentBusinessUnit:oe,onBusinessUnitChange:_,onSearch:r,logo:C,appName:k,tagline:U})}),(0,Bo.jsxs)("div",{className:l("min-Bo-screen fixed w-full transition-all duration-300 ease-in-out",M?"md:pl-64":"md:pl-0"),children:[(0,Bo.jsx)(na,{title:o,notifications:a,onToggleSidebar:()=>Y(!M),onToggleMobileMenu:()=>se(!0),sidebarOpen:M,activeTab:c,onTabChange:m,showTabs:w,onActionClick:b,actionIcon:y,actionText:I,onNotificationRemove:T,onRemoveAll:R,logo:C,appName:k,tagline:U}),(0,Bo.jsx)("main",{className:"flex-1 Bo-0 flex flex-col Bo-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Je=G(require("react"));var fe=Je.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("div",{ref:o,className:l("rounded-xl border bg-card text-card-foreground shadow",e),...t}));fe.displayName="Card";var Le=Je.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("div",{ref:o,className:l("flex flex-col space-y-1.5 Bo-6",e),...t}));Le.displayName="CardHeader";var Ee=Je.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("div",{ref:o,className:l("font-semibold leading-none tracking-tight",e),...t}));Ee.displayName="CardTitle";var co=Je.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("div",{ref:o,className:l("text-sm text-muted-foreground",e),...t}));co.displayName="CardDescription";var Te=Je.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("div",{ref:o,className:l("Bo-6 pt-0",e),...t}));Te.displayName="CardContent";var ht=Je.forwardRef(({className:e,...t},o)=>(0,Bo.jsx)("div",{ref:o,className:l("flex items-center Bo-6 pt-0",e),...t}));ht.displayName="CardFooter";function da({sessions:e,currentSession:t,teams:o,onNewChat:a,onSessionSelect:n,onSessionEdit:i,onSessionDelete:r,className:s}){return(0,Bo.jsx)(ot,{children:(0,Bo.jsx)("div",{className:`space-y-4 Bo-full ${s||""}`,children:(0,Bo.jsxs)(fe,{className:"shadow-sm Bo-full",children:[(0,Bo.jsx)("div",{className:"Bo-4 border-b",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Bo.jsx)($e.Clock,{className:"Bo-4 w-4"}),"Recent Chats"]}),(0,Bo.jsxs)(D,{onClick:a,size:"sm",className:"gap-1 Bo-7 px-2 rounded-lg shadow-sm",children:[(0,Bo.jsx)($e.Plus,{className:"Bo-3 w-3"}),"New"]})]})}),(0,Bo.jsx)(Ne,{className:"Bo-[600px]",children:(0,Bo.jsx)("div",{className:"Bo-2",children:e.length===0?(0,Bo.jsx)("div",{className:"Bo-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(c=>(0,Bo.jsxs)(at,{children:[(0,Bo.jsx)(it,{asChild:!0,children:(0,Bo.jsx)("div",{className:l("group relative Bo-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===c.id&&"bg-muted border"),onClick:()=>n(c),children:(0,Bo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,Bo.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,Bo.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:c.title}),(0,Bo.jsx)("Bo",{className:"text-xs text-muted-foreground line-clamp-2",children:c.lastMessage})]}),(0,Bo.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[i&&(0,Bo.jsx)(D,{variant:"ghost",size:"icon",className:"Bo-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:m=>{m.stopPropagation(),i(c.id)},children:(0,Bo.jsx)($e.Edit3,{className:"Bo-3 w-3"})}),r&&(0,Bo.jsx)(D,{variant:"ghost",size:"icon",className:"Bo-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:m=>{m.stopPropagation(),r(c.id)},children:(0,Bo.jsx)($e.Trash2,{className:"Bo-3 w-3"})})]})]})})}),(0,Bo.jsx)(Ke,{side:"right",className:"max-w-xs",children:(0,Bo.jsxs)("div",{className:"space-y-1",children:[(0,Bo.jsx)("Bo",{className:"font-medium text-sm",children:c.title}),(0,Bo.jsx)("Bo",{className:"text-xs",children:c.lastMessage})]})})]},c.id))})})]})})})}var lt=G(require("motion/react-client"));var pa={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]};function po(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function ma({capabilities:e,isOpen:t,onToggle:o,onActionSelect:a,onContextChange:n,colorScheme:i=pa,className:r}){let[s,c]=(0,ct.useState)([]),[m,w]=(0,ct.useState)([]),b=s[s.length-1],y=b?.children||e,I=(A,M)=>{switch(A.type){case"category":return i.categories[M%i.categories.length];case"list":return i.lists[M%i.lists.length];case"item":return i.items[M%i.items.length];default:return i.primary}},T=(0,ct.useMemo)(()=>({path:s,selectedItems:m,filters:{}}),[s,m]);(0,ct.useEffect)(()=>{n&&n(T)},[T,n]);let R=A=>{A.type==="category"||A.type==="list"?c([...s,A]):A.type==="item"&&w([...m,A])},C=()=>{c(s.slice(0,-1))},k=A=>{c(s.slice(0,A+1))},U=()=>b?.actions?b.actions:[];return t?(0,Bo.jsxs)("div",{className:l("w-full",r),children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,Bo.jsx)($t.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:C,className:l("group Bo-1 Bo-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Bo.jsx)(Oa.ChevronLeft,{className:l("Bo-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Bo.jsx)("h4",{className:"font-medium text-sm",children:b?.name||"Capabilities"})]}),(0,Bo.jsx)($t.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:o,className:l("group Bo-1 Bo-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Bo.jsx)(Oa.Bo,{className:l("Bo-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,Bo.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Bo.jsx)($t.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>c([]),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Bo.jsxs)("span",{className:"relative",children:["Capabilities",(0,Bo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Bo-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),s.map((A,M)=>(0,Bo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(Oa.ChevronRight,{className:"Bo-2 w-2"}),(0,Bo.jsx)($t.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>k(M),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Bo.jsxs)("span",{className:"relative",children:[A.name,(0,Bo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Bo-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},A.id))]}),(0,Bo.jsx)("div",{className:"max-Bo-40 overflow-y-auto",children:(0,Bo.jsx)($t.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)($t.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:b?.type==="list"&&b.data?(0,Bo.jsx)(or,{data:b.data,onItemSelect:A=>w([...m,A]),colorScheme:i}):(0,Bo.jsx)(er,{capabilities:y,onSelect:R,colorScheme:i})},b?.id||"root")})})]}):(0,Bo.jsxs)(D,{onClick:o,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Bo.jsx)(Oa.Menu,{className:"Bo-4 w-4"}),(0,Bo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function er({capabilities:e,onSelect:t,colorScheme:o}){return(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,n)=>(0,Bo.jsx)(tr,{capability:a,onClick:()=>t(a),color:o.categories[n%o.categories.length]},a.id))})}function tr({capability:e,onClick:t,selected:o,color:a}){return(0,Bo.jsxs)($t.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",o&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,Bo.jsx)("div",{className:l("w-2 Bo-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a)}),(0,Bo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Bo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Bo-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,Bo.jsx)(Oa.ChevronRight,{className:l("Bo-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,Bo.jsx)(ae,{variant:"secondary",className:l("text-xs Bo-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function or({data:e,onItemSelect:t,colorScheme:o}){return(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,n)=>(0,Bo.jsxs)($t.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(a),children:[(0,Bo.jsx)("div",{className:l("w-2 Bo-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o.items[n%o.items.length])}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("span",{className:"truncate relative font-medium",children:[a.title,(0,Bo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Bo-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),a.subtitle&&(0,Bo.jsx)("div",{className:l("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:a.subtitle})]}),a.value&&(0,Bo.jsx)(ae,{variant:"secondary",className:l("text-xs Bo-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:a.value})]},a.id))})}var ga=G(require("react"));var ua=({isOpen:e=!0,authUrl:t,onClose:o,onSuccess:a,description:n="This endpoint requires authentication to sync functions."})=>{let[i,r]=(0,ct.useState)(!1),[s,c]=(0,ct.useState)(""),m=()=>{if(!t){c("No authentication URL provided");return}r(!0),c("");try{let b=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!b){c("Popup blocked. Please allow popups for this site and try again."),r(!1);return}let y=setInterval(()=>{try{b.closed&&(clearInterval(y),r(!1),a(),o())}catch{}},1e3);setTimeout(()=>{b.closed||(b.close(),clearInterval(y),r(!1),c("Authentication timed out. Please try again."))},6e5)}catch{c("Failed to open authentication window"),r(!1)}},w=async()=>{try{await navigator.clipboard.writeText(t),c("")}catch{c("Failed to copy URL to clipboard")}};return e?(0,Bo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center Oa-[1000]",children:(0,Bo.jsxs)("div",{className:"bg-white rounded-lg Bo-6 max-w-md w-[90%] shadow-lg",children:[(0,Bo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Bo.jsx)("Bo",{className:"text-sm text-gray-600 mb-4",children:n}),s&&(0,Bo.jsx)("div",{className:"mb-4 Bo-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:s}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)("button",{onClick:m,disabled:i||!t,className:`
|
|
6
|
+
"use strict";"use client";var pi=Object.create;var Dt=Object.defineProperty;var mi=Object.getOwnPropertyDescriptor;var ui=Object.getOwnPropertyNames;var gi=Object.getPrototypeOf,fi=Object.prototype.hasOwnProperty;var bi=(e,t)=>{for(var o in t)Dt(e,o,{get:t[o],enumerable:!0})},Ao=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ui(t))!fi.call(e,n)&&n!==o&&Dt(e,n,{get:()=>t[n],enumerable:!(a=mi(t,n))||a.enumerable});return e};var G=(e,t,o)=>(o=e!=null?pi(gi(e)):{},Ao(t||!e||!e.__esModule?Dt(o,"default",{value:e,enumerable:!0}):o,e)),vi=e=>Ao(Dt({},"__esModule",{value:!0}),e);var Dr={};bi(Dr,{CopilotInterface:()=>Tr});module.exports=vi(Dr);var Ja=require("@ai-sdk/react"),ft=require("react"),Kt=require("motion/react"),Qa=require("lucide-react");var Fo=require("clsx");var Yt="-",hi=e=>{let t=xi(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let s=r.split(Yt);return s[0]===""&&s.length!==1&&s.shift(),Bo(s,t)||yi(r)},getConflictingClassGroupIds:(r,s)=>{let d=o[r]||[];return s&&a[r]?[...d,...a[r]]:d}}},Bo=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),n=a?Bo(e.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;let i=e.join(Yt);return t.validators.find(({validator:r})=>r(i))?.classGroupId},Mo=/^\[(.+)\]$/,yi=e=>{if(Mo.test(e)){let t=Mo.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},xi=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return wi(Object.entries(e.classGroups),o).forEach(([i,r])=>{Xt(r,a,i,t)}),a},Xt=(e,t,o,a)=>{e.forEach(n=>{if(typeof n=="string"){let i=n===""?t:Io(t,n);i.classGroupId=o;return}if(typeof n=="function"){if(Ci(n)){Xt(n(a),t,o,a);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([i,r])=>{Xt(r,Io(t,i),o,a)})})},Io=(e,t)=>{let o=e;return t.split(Yt).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},Ci=e=>e.isThemeGetter,wi=(e,t)=>t?e.map(([o,a])=>{let n=a.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([r,s])=>[t+r,s])):i);return[o,n]}):e,Ni=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,n=(i,r)=>{o.set(i,r),t++,t>e&&(t=0,a=o,o=new Map)};return{get(i){let r=o.get(i);if(r!==void 0)return r;if((r=a.get(i))!==void 0)return n(i,r),r},set(i,r){o.has(i)?o.set(i,r):n(i,r)}}},Lo="!",ki=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,n=t[0],i=t.length,r=s=>{let d=[],p=0,h=0,u;for(let C=0;C<s.length;C++){let k=s[C];if(p===0){if(k===n&&(a||s.slice(C,C+i)===t)){d.push(s.slice(h,C)),h=C+i;continue}if(k==="/"){u=C;continue}}k==="["?p++:k==="]"&&p--}let v=d.length===0?s:s.substring(h),S=v.startsWith(Lo),T=S?v.substring(1):v,N=u&&u>h?u-h:void 0;return{modifiers:d,hasImportantModifier:S,baseClassName:T,maybePostfixModifierPosition:N}};return o?s=>o({className:s,parseClassName:r}):r},Pi=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},Ti=e=>({cache:Ni(e.cacheSize),parseClassName:ki(e),...hi(e)}),Di=/\s+/,Ri=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:n}=t,i=[],r=e.trim().split(Di),s="";for(let d=r.length-1;d>=0;d-=1){let p=r[d],{modifiers:h,hasImportantModifier:u,baseClassName:v,maybePostfixModifierPosition:S}=o(p),T=!!S,N=a(T?v.substring(0,S):v);if(!N){if(!T){s=p+(s.length>0?" "+s:s);continue}if(N=a(v),!N){s=p+(s.length>0?" "+s:s);continue}T=!1}let C=Pi(h).join(":"),k=u?C+Lo:C,B=k+N;if(i.includes(B))continue;i.push(B);let M=n(N,T);for(let I=0;I<M.length;++I){let Y=M[I];i.push(k+Y)}s=p+(s.length>0?" "+s:s)}return s};function Si(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Eo(t))&&(a&&(a+=" "),a+=o);return a}var Eo=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=Eo(e[a]))&&(o&&(o+=" "),o+=t);return o};function Ai(e,...t){let o,a,n,i=r;function r(d){let p=t.reduce((h,u)=>u(h),e());return o=Ti(p),a=o.cache.get,n=o.cache.set,i=s,s(d)}function s(d){let p=a(d);if(p)return p;let h=Ri(d,o);return n(d,h),h}return function(){return i(Si.apply(null,arguments))}}var O=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},zo=/^\[(?:([a-z-]+):)?(.+)\]$/i,Mi=/^\d+\/\d+$/,Ii=new Set(["px","full","screen"]),Bi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Li=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|Oo|min|max))|\Oo(calc|min|max|clamp)\(.+\)|^0$/,Ei=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Oo-?((\d+)?\.?(\d+)[a-z]+|0)/,Ui=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>ot(e)||Ii.has(e)||Mi.test(e),Oe=e=>at(e,"length",$i),ot=e=>!!e&&!Number.isNaN(Number(e)),Qt=e=>at(e,"number",ot),ht=e=>!!e&&Number.isInteger(Number(e)),Hi=e=>e.endsWith("%")&&ot(e.slice(0,-1)),w=e=>zo.test(e),Ve=e=>Bi.test(e),Fi=new Set(["length","size","percentage"]),ji=e=>at(e,Fi,Uo),Oi=e=>at(e,"position",Uo),Vi=new Set(["image","url"]),Wi=e=>at(e,Vi,qi),Gi=e=>at(e,"",_i),yt=()=>!0,at=(e,t,o)=>{let a=zo.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},$i=e=>Li.test(e)&&!Ei.test(e),Uo=()=>!1,_i=e=>zi.test(e),qi=e=>Ui.test(e);var Ki=()=>{let e=O("colors"),t=O("spacing"),o=O("blur"),a=O("brightness"),n=O("borderColor"),i=O("borderRadius"),r=O("borderSpacing"),s=O("borderWidth"),d=O("contrast"),p=O("grayscale"),h=O("hueRotate"),u=O("invert"),v=O("gap"),S=O("gradientColorStops"),T=O("gradientColorStopPositions"),N=O("inset"),C=O("margin"),k=O("opacity"),B=O("padding"),M=O("saturate"),I=O("scale"),Y=O("sepia"),q=O("skew"),de=O("space"),ae=O("translate"),W=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],ce=()=>["auto",w,t],L=()=>[w,t],je=()=>["",Be,Oe],ye=()=>["auto",ot,w],c=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",w],g=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[ot,w];return{cacheSize:500,separator:":",theme:{colors:[yt],spacing:[Be,Oe],blur:["none","",Ve,w],brightness:H(),borderColor:[e],borderRadius:["none","","full",Ve,w],borderSpacing:L(),borderWidth:je(),contrast:H(),grayscale:$(),hueRotate:H(),invert:$(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Hi,Oe],inset:ce(),margin:ce(),opacity:H(),padding:L(),saturate:H(),scale:H(),sepia:$(),skew:H(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",w]}],container:["container"],columns:[{columns:[Ve]}],"break-after":[{"break-after":g()}],"break-before":[{"break-before":g()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...c(),w]}],overflow:[{overflow:K()}],"overflow-Oo":[{"overflow-Oo":K()}],"overflow-Oo":[{"overflow-Oo":K()}],overscroll:[{overscroll:W()}],"overscroll-Oo":[{"overscroll-Oo":W()}],"overscroll-Oo":[{"overscroll-Oo":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-Oo":[{"inset-Oo":[N]}],"inset-Oo":[{"inset-Oo":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ht,w]}],basis:[{basis:ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",w]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",ht,w]}],"grid-cols":[{"grid-cols":[yt]}],"col-start-end":[{col:["auto",{span:["full",ht,w]},w]}],"col-start":[{"col-start":ye()}],"col-end":[{"col-end":ye()}],"grid-rows":[{"grid-rows":[yt]}],"row-start-end":[{row:["auto",{span:[ht,w]},w]}],"row-start":[{"row-start":ye()}],"row-end":[{"row-end":ye()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",w]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",w]}],gap:[{gap:[v]}],"gap-Oo":[{"gap-Oo":[v]}],"gap-Oo":[{"gap-Oo":[v]}],"justify-content":[{justify:["normal",...pe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...pe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...pe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],pe:[{pe:[B]}],pt:[{pt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],Oo:[{Oo:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-Oo":[{"space-Oo":[de]}],"space-Oo-reverse":["space-Oo-reverse"],"space-Oo":[{"space-Oo":[de]}],"space-Oo-reverse":["space-Oo-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",w,t]}],"min-w":[{"min-w":[w,t,"min","max","fit"]}],"max-w":[{"max-w":[w,t,"none","full","min","max","fit","prose",{screen:[Ve]},Ve]}],h:[{h:[w,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[w,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[w,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[w,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ve,Oe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qt]}],"font-family":[{font:[yt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",w]}],"line-clamp":[{"line-clamp":["none",ot,Qt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,w]}],"list-image":[{"list-image":["none",w]}],"list-style-type":[{list:["none","disc","decimal",w]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,Oe]}],"underline-offset":[{"underline-offset":["auto",Be,w]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",w]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...c(),Oi]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","Oo","Oo","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ji]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","Oo","bl","l","tl"]},Wi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-Oo":[{"rounded-Oo":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-Oo":[{"rounded-Oo":[i]}],"rounded-Qa":[{"rounded-Qa":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-Oo":[{"border-Oo":[s]}],"border-w-Oo":[{"border-Oo":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-Oo":[{"border-Oo":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...z(),"hidden"]}],"divide-Oo":[{"divide-Oo":[s]}],"divide-Oo-reverse":["divide-Oo-reverse"],"divide-Oo":[{"divide-Oo":[s]}],"divide-Oo-reverse":["divide-Oo-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:z()}],"border-color":[{border:[n]}],"border-color-Oo":[{"border-Oo":[n]}],"border-color-Oo":[{"border-Oo":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-Oo":[{"border-Oo":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[Be,w]}],"outline-w":[{outline:[Be,Oe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:je()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Be,Oe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ve,Gi]}],"shadow-color":[{shadow:[yt]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Ve,w]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[u]}],saturate:[{saturate:[M]}],sepia:[{sepia:[Y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-Oo":[{"border-spacing-Oo":[r]}],"border-spacing-Oo":[{"border-spacing-Oo":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",w]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",w]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",w]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-Oo":[{"scale-Oo":[I]}],"scale-Oo":[{"scale-Oo":[I]}],rotate:[{rotate:[ht,w]}],"translate-Oo":[{"translate-Oo":[ae]}],"translate-Oo":[{"translate-Oo":[ae]}],"skew-Oo":[{"skew-Oo":[q]}],"skew-Oo":[{"skew-Oo":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",w]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","Oo-resize","nw-resize","Oo-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",w]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","Oo","Oo",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-Oo":[{"scroll-Oo":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","Oo","Oo","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-Oo":[{"touch-pan":["Oo","left","right"]}],"touch-Oo":[{"touch-pan":["Oo","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",w]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Be,Oe,Qt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-Oo","overflow-Oo"],overscroll:["overscroll-Oo","overscroll-Oo"],inset:["inset-Oo","inset-Oo","start","end","top","right","bottom","left"],"inset-Oo":["right","left"],"inset-Oo":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-Oo","gap-Oo"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],Oo:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-Oo","rounded-l","rounded-ss","rounded-Oo","rounded-Qa","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Oo","rounded-Qa"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-Oo":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-Oo","border-spacing-Oo"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-Oo","border-w-l"],"border-w-Oo":["border-w-r","border-w-l"],"border-w-Oo":["border-w-t","border-w-Oo"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-Oo","border-color-l"],"border-color-Oo":["border-color-r","border-color-l"],"border-color-Oo":["border-color-t","border-color-Oo"],"scroll-Oo":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-Oo","touch-Oo","touch-pz"],"touch-Oo":["touch"],"touch-Oo":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ho=Ai(Ki);function l(...e){return Ho((0,Fo.clsx)(e))}var Et=G(require("react")),zt=G(require("next/link"));var jo=require("class-variance-authority");var Oo=require("react/jsx-runtime"),Ji=(0,jo.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ie({className:e,variant:t,...o}){return(0,Oo.jsx)("div",{className:l(Ji({variant:t}),e),...o})}var Vo=require("@radix-ui/react-slot"),Go=G(require("react")),Qi=(0,jo.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),R=Go.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...n},i)=>(0,$o.jsx)(e?Vo.Slot:"button",{className:l(Qi({className:t,size:o,variant:a})),ref:i,...n}));R.displayName="Button";var _o=G(require("react"));var xt=_o.forwardRef(({className:e,type:t,...o},a)=>(0,Oo.jsx)("input",{type:t,className:l("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));xt.displayName="Input";var Zt=G(require("react")),fe=G(require("@radix-ui/react-scroll-area"));var Pe=Zt.forwardRef(({className:e,children:t,...o},a)=>(0,Oo.jsxs)(fe.Root,{ref:a,className:l("relative overflow-hidden",e),...o,children:[(0,Oo.jsx)(fe.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Oo.jsx)(Ko,{}),(0,Oo.jsx)(fe.Corner,{})]}));Pe.displayName=fe.Root.displayName;var Ko=Zt.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,Oo.jsx)(fe.ScrollAreaScrollbar,{ref:a,orientation:t,className:l("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,Oo.jsx)(fe.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ko.displayName=fe.ScrollAreaScrollbar.displayName;var Ct=G(require("react")),J=G(require("@radix-ui/react-dialog"));var Qo=J.Root;var Xi=J.Portal;var Xo=Ct.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)(J.Overlay,{ref:o,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Xo.displayName=J.Overlay.displayName;var eo=Ct.forwardRef(({className:e,children:t,...o},a)=>(0,Oo.jsxs)(Xi,{children:[(0,Oo.jsx)(Xo,{}),(0,Oo.jsxs)(J.Content,{ref:a,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-Oo-[-50%] translate-Oo-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,Oo.jsxs)(J.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,Oo.jsx)(Qa.Oo,{className:"h-4 w-4"}),(0,Oo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));eo.displayName=J.Content.displayName;var to=({className:e,...t})=>(0,Oo.jsx)("div",{className:l("flex flex-col space-Oo-1.5 text-center sm:text-left",e),...t});to.displayName="DialogHeader";var Yi=({className:e,...t})=>(0,Oo.jsx)("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-Oo-2",e),...t});Yi.displayName="DialogFooter";var oo=Ct.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)(J.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));oo.displayName=J.Title.displayName;var Zi=Ct.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)(J.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));Zi.displayName=J.Description.displayName;var wt=G(require("@radix-ui/react-checkbox")),Zo=G(require("react")),ao=Zo.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)(wt.Root,{className:l("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,Oo.jsx)(wt.Indicator,{className:l("flex items-center justify-center text-current"),children:(0,Oo.jsx)(Qa.Check,{className:"h-4 w-4"})})}));ao.displayName=wt.Root.displayName;var Te=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var ta=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Oo.jsx)(Qa.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Oo.jsx)(Qa.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Oo.jsx)(Qa.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Oo.jsx)(Qa.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,Oo.jsx)(Qa.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Oo.jsx)(Qa.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Oo.jsx)(Qa.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Oo.jsx)(Qa.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Oo.jsx)(Qa.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Oo.jsx)(Qa.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Mt=[{id:"1",name:"Oo-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var io=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],St=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Bt=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],er=[...Bt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],tr=[...Mt,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],At={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},ea={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Bt.filter(e=>e.epicId==="1")};var Qr={empty:{initialProjects:At.projects,initialEpics:At.epics,initialSprints:At.sprints,initialTasks:At.tasks},default:{initialProjects:Mt,initialEpics:io,initialSprints:St,initialTasks:Bt},highDensity:{initialProjects:Mt,initialEpics:io,initialSprints:St,initialTasks:er},singleEpic:{initialProjects:Mt,initialEpics:ea.epics,initialSprints:St,initialTasks:ea.tasks},multipleProjects:{initialProjects:tr,initialEpics:io,initialSprints:St,initialTasks:Bt}},It=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Te),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Te),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Te),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Te),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Te),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Te),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Te),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Te),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Te),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Te),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Xr=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:It.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:It.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:It.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Yr=It.filter(e=>e.type==="digital");function oa(e,t){let[o,a]=(0,ft.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),n=i=>{try{a(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,ft.useEffect)(()=>{n(o)},[]),[o,n]}function ro({items:e,isOpen:t,isMobile:o=!1,onClose:a,currentBusinessUnit:n=ta[0],onBusinessUnitChange:i,onSearch:r,className:s,logo:d="/headerlogo.png",logoLink:p="/teams",appName:h="Nuvia",tagline:u="Collaboration Platform"}){let[v,S]=Et.useState({}),[T,N]=oa("sidebar-favorites",{}),[C,k]=Et.useState(null),[B,M]=Et.useState(""),I=c=>{S(z=>({...z,[c]:!z[c]}))},Y=c=>{i?.(c)},q=()=>{B.trim()&&r?.(B.trim())},de=c=>{c.key==="Enter"&&(c.preventDefault(),q())},ae=(c,z)=>{let A=T[c]||[],pe=A.includes(z)?A.filter($=>$!==z):A.concat(z);N({...T,[c]:pe})},W=c=>{if(!c.items||!c.maxItems||c.items.length<=c.maxItems)return c.items||[];let z=T[c.id]||[],A=c.items.filter($=>z.includes($.id)),pe=c.items.filter($=>!z.includes($.id));return[...A,...pe].slice(0,c.maxItems)},K=c=>c.maxItems&&c.items&&c.items.length>c.maxItems,ce=e,L=c=>{let z=K(c),A=W(c),pe=(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsxs)("div",{className:"flex items-center gap-3",children:[c.icon,(0,Oo.jsx)("span",{children:c.title})]}),c.badge&&(0,Oo.jsx)(ie,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:c.badge}),c.items&&(0,Oo.jsx)(Qa.ChevronDown,{className:l("ml-2 h-4 w-4 transition-transform",v[c.title]?"rotate-180":"")})]}),$=l("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",c.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return c.url?(0,Oo.jsx)(zt.default,{href:c.url,className:$,onClick:o?a:void 0,children:pe}):(0,Oo.jsx)("button",{className:$,onClick:()=>c.items&&I(c.title),children:pe})},je=()=>{let c=e.find(A=>A.id===C);if(!c||!c.items||!c.maxItems)return null;let z=T[c.id]||[];return(0,Oo.jsx)(Qo,{open:!!C,onOpenChange:A=>!A&&k(null),children:(0,Oo.jsxs)(eo,{className:"sm:max-w-md",children:[(0,Oo.jsxs)(to,{children:[(0,Oo.jsxs)(oo,{children:["Manage ",c.title," Favorites"]}),(0,Oo.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",c.maxItems," items to show in ",c.title.toLowerCase(),"."]})]}),(0,Oo.jsx)(Pe,{className:"max-h-96 pr-4",children:(0,Oo.jsx)("div",{className:"space-Oo-4",children:c.items.map(A=>(0,Oo.jsxs)("div",{className:"flex items-center space-Oo-2",children:[(0,Oo.jsx)(ao,{id:A.id,checked:z.includes(A.id),onCheckedChange:()=>ae(c.id,A.id),disabled:!z.includes(A.id)&&z.length>=(c.maxItems||0)}),(0,Oo.jsxs)("label",{htmlFor:A.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[A.title,A.badge&&(0,Oo.jsx)(ie,{variant:"outline",className:"text-xs",children:A.badge})]})]},A.id))})})]})})},ye=(0,Oo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Oo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Oo.jsxs)(zt.default,{href:p,className:"flex items-center gap-3",children:[(0,Oo.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,Oo.jsx)("img",{src:d,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,Oo.jsxs)("div",{children:[(0,Oo.jsx)("h2",{className:"font-semibold",children:h}),(0,Oo.jsx)("p",{className:"text-xs text-muted-foreground",children:u})]})]}),o&&(0,Oo.jsx)(R,{variant:"ghost",size:"icon",onClick:a,children:(0,Oo.jsx)(Qa.Oo,{className:"h-5 w-5"})})]}),(0,Oo.jsx)("div",{className:"px-3 py-2",children:(0,Oo.jsxs)("div",{className:"relative",children:[(0,Oo.jsx)(Qa.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Oo.jsx)(xt,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:B,onChange:c=>M(c.target.value),onKeyPress:de})]})}),(0,Oo.jsx)(Pe,{className:"flex-1 px-3 py-2",children:(0,Oo.jsx)("div",{className:"space-Oo-1",children:ce.map(c=>(0,Oo.jsxs)("div",{className:"mb-1",children:[L(c),c.items&&v[c.title]&&(0,Oo.jsxs)("div",{className:"mt-1 ml-6 space-Oo-1 border-l pl-3",children:[W(c).map(z=>(0,Oo.jsxs)(zt.default,{href:z.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:o?a:void 0,children:[z.title,z.badge&&(0,Oo.jsx)(ie,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:z.badge})]},z.id)),K(c)&&c.items&&c.items.length>W(c).length&&(0,Oo.jsxs)("button",{onClick:()=>k(c.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",c.items.length-W(c).length," more available"]})]})]},c.id))})}),(0,Oo.jsx)("div",{className:"p-3",children:(0,Oo.jsx)("div",{className:"space-Oo-1",children:(0,Oo.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Oo.jsx)(Qa.Settings,{className:"h-5 w-5"}),(0,Oo.jsx)("span",{children:"Settings"})]})})}),(0,Oo.jsx)(je,{})]});return o?(0,Oo.jsx)("div",{className:l("fixed inset-Oo-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-Oo-0":"-translate-Oo-full",s),children:ye}):(0,Oo.jsx)("div",{className:l("fixed inset-Oo-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-Oo-0":"-translate-Oo-full",s),children:ye})}var Ut=G(require("react")),Le=G(require("@radix-ui/react-avatar"));var it=Ut.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)(Le.Root,{ref:o,className:l("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));it.displayName=Le.Root.displayName;var no=Ut.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)(Le.Image,{ref:o,className:l("aspect-square h-full w-full",e),...t}));no.displayName=Le.Image.displayName;var rt=Ut.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)(Le.Fallback,{ref:o,className:l("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));rt.displayName=Le.Fallback.displayName;var aa=G(require("react")),we=G(require("@radix-ui/react-tooltip"));var nt=we.Provider,st=we.Root,lt=we.Trigger,Qe=aa.forwardRef(({className:e,sideOffset:t=4,...o},a)=>(0,Oo.jsx)(we.Portal,{children:(0,Oo.jsx)(we.Content,{ref:a,sideOffset:t,className:l("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Qe.displayName=we.Content.displayName;var ia=require("next-themes");function ra(){let{setTheme:e,theme:t}=(0,ia.useTheme)();return(0,Oo.jsx)(nt,{children:(0,Oo.jsxs)(st,{children:[(0,Oo.jsx)(lt,{asChild:!0,children:(0,Oo.jsxs)(R,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Oo.jsx)(Qa.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Oo.jsx)(Qa.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Oo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Oo.jsx)(Qe,{children:"Toggle theme"})]})})}function na({notifications:e,open:t,onClose:o,onNotificationRemove:a,onRemoveAll:n,className:i}){let r=e.filter(p=>!p.read),s=r.length,d=p=>{switch(p){case"info":return(0,Oo.jsx)(Qa.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,Oo.jsx)(Qa.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,Oo.jsx)(Qa.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,Oo.jsx)(Qa.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,Oo.jsx)(Kt.AnimatePresence,{children:t&&(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)(Kt.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:o}),(0,Oo.jsx)(Kt.motion.div,{initial:{Oo:"100%"},animate:{Oo:0},exit:{Oo:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:l("fixed inset-Oo-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,Oo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Oo.jsxs)("div",{className:"flex items-center justify-between border-Oo p-4",children:[(0,Oo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Oo.jsx)(Qa.Bell,{className:"h-5 w-5"}),(0,Oo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,Oo.jsxs)(ie,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,Oo.jsxs)(R,{variant:"ghost",size:"icon",onClick:o,className:"rounded-full",children:[(0,Oo.jsx)(Qa.Oo,{className:"h-5 w-5"}),(0,Oo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,Oo.jsxs)("div",{className:"flex items-center justify-between border-Oo p-2",children:[(0,Oo.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,Oo.jsx)(R,{variant:"ghost",size:"sm",onClick:n,className:"text-sm",children:"Dismiss all"})]}),r.length>0?(0,Oo.jsx)(Pe,{className:"flex-1",children:(0,Oo.jsx)("div",{className:"divide-Oo",children:r.map(p=>(0,Oo.jsxs)("div",{className:l("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Oo.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(p.type)}),(0,Oo.jsxs)("div",{className:"flex-1 space-Oo-1",children:[(0,Oo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Oo.jsx)("p",{className:"font-medium",children:p.title}),(0,Oo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Oo.jsx)("p",{className:"text-xs text-muted-foreground",children:p.time}),(0,Oo.jsx)(R,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>a?.(p.id),title:"Dismiss",children:(0,Oo.jsx)(Qa.Check,{className:"h-3 w-3"})})]})]}),(0,Oo.jsx)("p",{className:"text-sm text-muted-foreground",children:p.description}),p.actionLabel&&(0,Oo.jsxs)(R,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:p.onAction,children:[p.actionLabel,(0,Oo.jsx)(Qa.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},p.id))})}):(0,Oo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Oo.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Oo.jsx)(Qa.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,Oo.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"ho notifications"}),(0,Oo.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Xe=G(require("@radix-ui/react-tabs"));function sa({className:e,...t}){return(0,Oo.jsx)(Xe.Root,{"data-slot":"tabs",className:l("flex flex-col gap-2",e),...t})}function la({className:e,...t}){return(0,Oo.jsx)(Xe.List,{"data-slot":"tabs-list",className:l("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function da({className:e,...t}){return(0,Oo.jsx)(Xe.Trigger,{"data-slot":"tabs-trigger",className:l("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Ee=G(require("react")),D=G(require("@radix-ui/react-dropdown-menu")),dt=require("@radix-ui/react-icons");var ca=D.Root,pa=D.Trigger;var or=Ee.forwardRef(({className:e,inset:t,children:o,...a},n)=>(0,Oo.jsxs)(D.SubTrigger,{ref:n,className:l("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a,children:[o,(0,Oo.jsx)(dt.ChevronRightIcon,{className:"ml-auto"})]}));or.displayName=D.SubTrigger.displayName;var ar=Ee.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)(D.SubContent,{ref:o,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ar.displayName=D.SubContent.displayName;var lo=Ee.forwardRef(({className:e,sideOffset:t=4,...o},a)=>(0,Oo.jsx)(D.Portal,{children:(0,Oo.jsx)(D.Content,{ref:a,sideOffset:t,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));lo.displayName=D.Content.displayName;var co=Ee.forwardRef(({className:e,inset:t,...o},a)=>(0,Oo.jsx)(D.Item,{ref:a,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));co.displayName=D.Item.displayName;var ir=Ee.forwardRef(({className:e,children:t,checked:o,...a},n)=>(0,Oo.jsxs)(D.CheckboxItem,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a,children:[(0,Oo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Oo.jsx)(D.ItemIndicator,{children:(0,Oo.jsx)(dt.CheckIcon,{className:"h-4 w-4"})})}),t]}));ir.displayName=D.CheckboxItem.displayName;var rr=Ee.forwardRef(({className:e,children:t,...o},a)=>(0,Oo.jsxs)(D.RadioItem,{ref:a,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,Oo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Oo.jsx)(D.ItemIndicator,{children:(0,Oo.jsx)(dt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));rr.displayName=D.RadioItem.displayName;var nr=Ee.forwardRef(({className:e,inset:t,...o},a)=>(0,Oo.jsx)(D.Label,{ref:a,className:l("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));nr.displayName=D.Label.displayName;var sr=Ee.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)(D.Separator,{ref:o,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));sr.displayName=D.Separator.displayName;var lr=({className:e,...t})=>(0,Oo.jsx)("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});lr.displayName="DropdownMenuShortcut";function ua({activeTab:e,onTabChange:t,tabOptions:o,className:a="",maxWidth:n="700px",gridCols:i=6}){let r=o.find(s=>s.value===e);return(0,Oo.jsxs)(Kt.motion.div,{className:`flex-1 flex justify-center ${a}`,initial:{opacity:0,Oo:-20},animate:{opacity:1,Oo:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Oo.jsx)("div",{className:"hidden lg:block",children:(0,Oo.jsx)(sa,{value:e,onValueChange:t,children:(0,Oo.jsx)(la,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:n,gridTemplateColumns:`repeat(${Math.min(i,o.length)}, minmax(0, 1fr))`},children:o.map(s=>(0,Oo.jsx)(Kt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Oo.jsx)(da,{value:s.value,onClick:()=>t?.(s.value),className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,Oo.jsx)("div",{className:"lg:hidden",children:(0,Oo.jsxs)(ca,{children:[(0,Oo.jsx)(pa,{asChild:!0,children:(0,Oo.jsxs)(R,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[r?.label||"Select",(0,Oo.jsx)(Qa.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Oo.jsx)(lo,{align:"center",className:"w-[180px]",children:o.map(s=>(0,Oo.jsx)(co,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function ga({title:e,notifications:t=[],onToggleSidebar:o,onToggleMobileMenu:a,sidebarOpen:n=!0,className:i,activeTab:r="assistant",onTabChange:s,showTabs:d=!0,tabOptions:p=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:h,actionIcon:u=(0,Oo.jsx)(Qa.Bot,{className:"mr-2 h-4 w-4"}),actionText:v="Action",onNotificationRemove:S,onRemoveAll:T,logo:N="/headerlogo.png",appName:C="Nuvia",tagline:k="Collaboration Platform"}){let[B,M]=(0,ft.useState)(!1),[I,Y]=(0,ft.useState)(t),q=I.filter(W=>!W.read).length,de=W=>{Y(K=>K.filter(ce=>ce.id!==W)),S?.(W)},ae=()=>{Y(W=>W.filter(K=>K.read)),T?.()};return(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,Oo.jsx)(R,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,Oo.jsx)(Qa.Menu,{className:"h-5 w-5"})}),(0,Oo.jsx)(R,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:o,children:(0,Oo.jsx)(Qa.PanelLeft,{className:"h-5 w-5"})}),!n&&(0,Oo.jsxs)($e.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,Oo:-20},animate:{opacity:1,Oo:0},transition:{duration:.3},children:[(0,Oo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,Oo.jsx)("img",{src:N,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,Oo.jsxs)("div",{children:[(0,Oo.jsx)("h2",{className:"font-semibold text-sm",children:C}),(0,Oo.jsx)("p",{className:"text-xs text-muted-foreground",children:k})]})]}),(0,Oo.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,Oo.jsx)(ua,{activeTab:r,onTabChange:s,tabOptions:p}),(0,Oo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Oo.jsx)($e.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,Oo:20},animate:{opacity:1,Oo:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,Oo.jsx)($e.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Oo.jsxs)(R,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:h,children:[u,v]})})}),(0,Oo.jsx)(ra,{}),(0,Oo.jsx)(nt,{children:(0,Oo.jsxs)(st,{children:[(0,Oo.jsx)(lt,{asChild:!0,children:(0,Oo.jsx)($e.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Oo.jsxs)(R,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>M(!0),children:[(0,Oo.jsx)($e.motion.div,{animate:q>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:q>0?1/0:0,repeatDelay:3},children:(0,Oo.jsx)(Qa.Bell,{className:"h-5 w-5"})}),q>0&&(0,Oo.jsx)($e.motion.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:q})]})})}),(0,Oo.jsx)(Qe,{children:"Notifications"})]})}),(0,Oo.jsx)($e.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Oo.jsxs)(it,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Oo.jsx)(no,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Oo.jsx)(rt,{})]})})]})]})]}),(0,Oo.jsx)(na,{notifications:I,open:B,onClose:()=>M(!1),onNotificationRemove:de,onRemoveAll:ae})]})}var fa=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Oo.jsx)(Qa.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function va({sidebarItems:e,children:t,title:o="Digital Colleagues",notifications:a=[],currentBusinessUnit:n=fa[0],onBusinessUnitChange:i,onSearch:r,businessUnits:s=fa,activeTab:d,onTabChange:p,showTabs:h=!1,onActionClick:u,actionIcon:v,actionText:S="Action",onNotificationRemove:T,onRemoveAll:N,logo:C="/headerlogo.png",appName:k="Nuvia",tagline:B="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[I,Y]=(0,ft.useState)(!M),[q,de]=(0,ft.useState)(!1),[ae,W]=(0,ft.useState)(n),K=ce=>{W(ce),i?.(ce)};return(0,Oo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[q&&(0,Oo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>de(!1)}),(0,Oo.jsx)("div",{className:"md:hidden",children:(0,Oo.jsx)(ro,{items:e,isOpen:q,isMobile:!0,onClose:()=>de(!1),currentBusinessUnit:ae,onBusinessUnitChange:K,onSearch:r,logo:C,appName:k,tagline:B})}),(0,Oo.jsx)("div",{className:"hidden md:block",children:(0,Oo.jsx)(ro,{items:e,isOpen:I,isMobile:!1,currentBusinessUnit:ae,onBusinessUnitChange:K,onSearch:r,logo:C,appName:k,tagline:B})}),(0,Oo.jsxs)("div",{className:l("min-h-screen fixed w-full transition-all duration-300 ease-in-out",I?"md:pl-64":"md:pl-0"),children:[(0,Oo.jsx)(ga,{title:o,notifications:a,onToggleSidebar:()=>Y(!I),onToggleMobileMenu:()=>de(!0),sidebarOpen:I,activeTab:d,onTabChange:p,showTabs:h,onActionClick:u,actionIcon:v,actionText:S,onNotificationRemove:T,onRemoveAll:N,logo:C,appName:k,tagline:B}),(0,Oo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Ye=G(require("react"));var ve=Ye.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)("div",{ref:o,className:l("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ve.displayName="Card";var ze=Ye.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)("div",{ref:o,className:l("flex flex-col space-Oo-1.5 p-6",e),...t}));ze.displayName="CardHeader";var Ue=Ye.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)("div",{ref:o,className:l("font-semibold leading-none tracking-tight",e),...t}));Ue.displayName="CardTitle";var uo=Ye.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)("div",{ref:o,className:l("text-sm text-muted-foreground",e),...t}));uo.displayName="CardDescription";var Re=Ye.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)("div",{ref:o,className:l("p-6 pt-0",e),...t}));Re.displayName="CardContent";var kt=Ye.forwardRef(({className:e,...t},o)=>(0,Oo.jsx)("div",{ref:o,className:l("flex items-center p-6 pt-0",e),...t}));kt.displayName="CardFooter";function ha({sessions:e,currentSession:t,teams:o,onNewChat:a,onSessionSelect:n,onSessionEdit:i,onSessionDelete:r,className:s}){return(0,Oo.jsx)(nt,{children:(0,Oo.jsx)("div",{className:`space-Oo-4 h-full ${s||""}`,children:(0,Oo.jsxs)(ve,{className:"shadow-sm h-full",children:[(0,Oo.jsx)("div",{className:"p-4 border-Oo",children:(0,Oo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Oo.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Oo.jsx)(Qa.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,Oo.jsxs)(R,{onClick:a,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,Oo.jsx)(Qa.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,Oo.jsx)(Pe,{className:"h-[600px]",children:(0,Oo.jsx)("div",{className:"p-2",children:e.length===0?(0,Oo.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"ho chat sessions yet"}):e.map(d=>(0,Oo.jsxs)(st,{children:[(0,Oo.jsx)(lt,{asChild:!0,children:(0,Oo.jsx)("div",{className:l("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===d.id&&"bg-muted border"),onClick:()=>n(d),children:(0,Oo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,Oo.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,Oo.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:d.title}),(0,Oo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:d.lastMessage})]}),(0,Oo.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[i&&(0,Oo.jsx)(R,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:p=>{p.stopPropagation(),i(d.id)},children:(0,Oo.jsx)(Qa.Edit3,{className:"h-3 w-3"})}),r&&(0,Oo.jsx)(R,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:p=>{p.stopPropagation(),r(d.id)},children:(0,Oo.jsx)(Qa.Trash2,{className:"h-3 w-3"})})]})]})})}),(0,Oo.jsx)(Qe,{side:"right",className:"max-w-xs",children:(0,Oo.jsxs)("div",{className:"space-Oo-1",children:[(0,Oo.jsx)("p",{className:"font-medium text-sm",children:d.title}),(0,Oo.jsx)("p",{className:"text-xs",children:d.lastMessage})]})})]},d.id))})})]})})})}var gt=G(require("motion/react-client"));var ya={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]};function go(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function xa({capabilities:e,isOpen:t,onToggle:o,onActionSelect:a,onContextChange:n,colorScheme:i=ya,className:r}){let[s,d]=(0,ft.useState)([]),[p,h]=(0,ft.useState)([]),u=s[s.length-1],v=u?.children||e,S=(M,I)=>{switch(M.type){case"category":return i.categories[I%i.categories.length];case"list":return i.lists[I%i.lists.length];case"item":return i.items[I%i.items.length];default:return i.primary}},T=(0,ft.useMemo)(()=>({path:s,selectedItems:p,filters:{}}),[s,p]);(0,ft.useEffect)(()=>{n&&n(T)},[T,n]);let N=M=>{M.type==="category"||M.type==="list"?d([...s,M]):M.type==="item"&&h([...p,M])},C=()=>{d(s.slice(0,-1))},k=M=>{d(s.slice(0,M+1))},B=()=>u?.actions?u.actions:[];return t?(0,Oo.jsxs)("div",{className:l("w-full",r),children:[(0,Oo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Oo.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,Oo.jsx)(Kt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:C,className:l("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Oo.jsx)(Qa.ChevronLeft,{className:l("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-Oo-0.5")})}),(0,Oo.jsx)("h4",{className:"font-medium text-sm",children:u?.name||"Capabilities"})]}),(0,Oo.jsx)(Kt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:o,className:l("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Oo.jsx)(Qa.Oo,{className:l("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,Oo.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Oo.jsx)(Kt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>d([]),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Oo.jsxs)("span",{className:"relative",children:["Capabilities",(0,Oo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-Oo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),s.map((M,I)=>(0,Oo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Oo.jsx)(Qa.ChevronRight,{className:"h-2 w-2"}),(0,Oo.jsx)(Kt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>k(I),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Oo.jsxs)("span",{className:"relative",children:[M.name,(0,Oo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-Oo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},M.id))]}),(0,Oo.jsx)("div",{className:"max-h-40 overflow-Oo-auto",children:(0,Oo.jsx)(Kt.AnimatePresence,{mode:"wait",children:(0,Oo.jsx)(Kt.motion.div,{initial:{opacity:0,Oo:-4},animate:{opacity:1,Oo:0},exit:{opacity:0,Oo:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:u?.type==="list"&&u.data?(0,Oo.jsx)(pr,{data:u.data,onItemSelect:M=>h([...p,M]),colorScheme:i}):(0,Oo.jsx)(dr,{capabilities:v,onSelect:N,colorScheme:i})},u?.id||"root")})})]}):(0,Oo.jsxs)(R,{onClick:o,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Oo.jsx)(Qa.Menu,{className:"h-4 w-4"}),(0,Oo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function dr({capabilities:e,onSelect:t,colorScheme:o}){return(0,Oo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,n)=>(0,Oo.jsx)(cr,{capability:a,onClick:()=>t(a),color:o.categories[n%o.categories.length]},a.id))})}function cr({capability:e,onClick:t,selected:o,color:a}){return(0,Oo.jsxs)(Kt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",o&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,Oo.jsx)("div",{className:l("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a)}),(0,Oo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Oo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-Oo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,Oo.jsx)(Qa.ChevronRight,{className:l("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-Oo-0.5")}),e.type==="list"&&e.data&&(0,Oo.jsx)(ie,{variant:"secondary",className:l("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function pr({data:e,onItemSelect:t,colorScheme:o}){return(0,Oo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,n)=>(0,Oo.jsxs)(Kt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(a),children:[(0,Oo.jsx)("div",{className:l("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o.items[n%o.items.length])}),(0,Oo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Oo.jsxs)("span",{className:"truncate relative font-medium",children:[a.title,(0,Oo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-Oo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),a.subtitle&&(0,Oo.jsx)("div",{className:l("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:a.subtitle})]}),a.value&&(0,Oo.jsx)(ie,{variant:"secondary",className:l("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:a.value})]},a.id))})}var wa=G(require("react"));var Ca=({isOpen:e=!0,authUrl:t,onClose:o,onSuccess:a,description:n="This endpoint requires authentication to sync functions."})=>{let[i,r]=(0,ft.useState)(!1),[s,d]=(0,ft.useState)(""),p=()=>{if(!t){d("ho authentication URL provided");return}r(!0),d("");try{let u=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!u){d("Popup blocked. Please allow popups for this site and try again."),r(!1);return}let v=setInterval(()=>{try{u.closed&&(clearInterval(v),r(!1),a(),o())}catch{}},1e3);setTimeout(()=>{u.closed||(u.close(),clearInterval(v),r(!1),d("Authentication timed out. Please try again."))},6e5)}catch{d("Failed to open authentication window"),r(!1)}},h=async()=>{try{await navigator.clipboard.writeText(t),d("")}catch{d("Failed to copy URL to clipboard")}};return e?(0,Oo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,Oo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,Oo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Oo.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:n}),s&&(0,Oo.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:s}),(0,Oo.jsxs)("div",{className:"flex gap-2",children:[(0,Oo.jsx)("button",{onClick:p,disabled:i||!t,className:`
|
|
7
7
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
8
8
|
${i||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
9
|
-
`,children:i?"Authenticating...":"Authenticate"}),(0,
|
|
9
|
+
`,children:i?"Authenticating...":"Authenticate"}),(0,Oo.jsx)("button",{onClick:h,disabled:!t,className:`
|
|
10
10
|
px-4 py-2 text-white border-none rounded text-sm
|
|
11
11
|
${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
|
|
12
|
-
`,children:"Copy URL"}),(0,
|
|
12
|
+
`,children:"Copy URL"}),(0,Oo.jsx)("button",{onClick:o,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var bo=({toolPart:e,index:t,addToolResult:o})=>{let[a,n]=wa.default.useState(!0),i=()=>{o(e.toolCallId,e.type,"Authentication completed"),n(!1)};switch(e.state){case"input-available":return(0,Oo.jsxs)("div",{className:"mb-2",children:[(0,Oo.jsx)(Ca,{isOpen:a,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>n(!1),onSuccess:i,description:e.output?.reason||e.input?.reason}),!a&&(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Oo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Oo.jsx)(Oo.Fragment,{children:e.output==="Authentication completed"?(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Oo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})}):(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Oo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Authentication failed"]})})});default:return null}};var vo=G(require("react"));var ka=({isOpen:e=!0,reason:t,onClose:o,onApprove:a,onDeny:n,title:i="Approval Required"})=>{let[r,s]=(0,ft.useState)(!1),d=()=>{s(!0),a(),o()},p=()=>{s(!0),n(),o()},h=()=>{s(!0),n(),o()};return e?(0,Oo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,Oo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:i}),(0,Oo.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:t}),(0,Oo.jsxs)("div",{className:"flex gap-2",children:[(0,Oo.jsx)("button",{onClick:d,disabled:r,className:`
|
|
13
13
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
14
14
|
${r?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
15
|
-
`,children:r?"Processing...":"Approve"}),(0,
|
|
15
|
+
`,children:r?"Processing...":"Approve"}),(0,Oo.jsx)("button",{onClick:p,disabled:r,className:`
|
|
16
16
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
17
17
|
${r?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
|
|
18
|
-
`,children:r?"Processing...":"Deny"}),(0,
|
|
18
|
+
`,children:r?"Processing...":"Deny"}),(0,Oo.jsx)("button",{onClick:h,disabled:r,className:`
|
|
19
19
|
px-4 py-2 text-white border-none rounded text-sm
|
|
20
20
|
${r?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
|
|
21
|
-
`,children:"Cancel"})]})]}):null};var va=({toolPart:e,index:t,addToolResult:o})=>{let[a,n]=go.default.useState(!0),[i,r]=go.default.useState(null),s=()=>{o(e.toolCallId,e.type,"Approved"),n(!1),r("approve")},c=()=>{o(e.toolCallId,e.type,"Denied"),n(!1),r("deny")};switch(e.state){case"input-available":return(0,Bo.jsxs)("div",{className:"mb-2",children:[(0,Bo.jsx)(ba,{isOpen:a,onApprove:s,onDeny:c,onClose:()=>n(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,Bo.jsxs)(Bo.Fragment,{children:[i==="approve"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Bo.jsx)("svg",{className:"Bo-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Bo.jsx)("svg",{className:"Bo-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Bo.jsxs)(Bo.Fragment,{children:[e.output==="approve"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Bo.jsx)("svg",{className:"Bo-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),e.output==="deny"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Bo.jsx)("svg",{className:"Bo-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]});default:return null}};var fo=require("@radix-ui/react-use-controllable-state");var nt=G(require("@radix-ui/react-collapsible")),Ut=nt.Root,Ft=nt.CollapsibleTrigger,jt=nt.CollapsibleContent;var ya=require("streamdown"),yt=(0,ct.memo)(({className:e,...t})=>(0,Bo.jsx)(ya.Streamdown,{className:l("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);yt.displayName="Response";var wa=(0,ct.createContext)(null),ar=()=>{let e=(0,ct.useContext)(wa);if(!e)throw new Error("Reasoning components must Oa used within Reasoning");return e},ir=1e3,rr=1e3,bo=(0,ct.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:n,duration:i,children:r,...s})=>{let[c,m]=(0,fo.useControllableState)({prop:o,defaultProp:a,onChange:n}),[w,b]=(0,fo.useControllableState)({prop:i,defaultProp:0}),[y,I]=(0,ct.useState)(!1),[T,R]=(0,ct.useState)(null);(0,ct.useEffect)(()=>{t?T===null&&R(Date.now()):T!==null&&(b(Math.ceil((Date.now()-T)/rr)),R(null))},[t,T,b]),(0,ct.useEffect)(()=>{if(a&&!t&&c&&!y){let k=setTimeout(()=>{m(!1),I(!0)},ir);return()=>clearTimeout(k)}},[t,c,a,m,y]);let C=k=>{m(k)};return(0,Bo.jsx)(wa.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:m,duration:w},children:(0,Bo.jsx)(Ut,{className:l("not-prose mb-4",e),onOpenChange:C,open:c,...s,children:r})})}),nr=(e,t)=>e||t===0?(0,Bo.jsx)("Bo",{children:"Thinking..."}):t===void 0?(0,Bo.jsx)("Bo",{children:"Thought for a few seconds"}):(0,Bo.jsxs)("Bo",{children:["Thought for ",t," seconds"]}),vo=(0,ct.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:n,duration:i}=ar();return(0,Bo.jsx)(Ft,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(Oa.BrainIcon,{className:"size-4"}),nr(a,i),(0,Bo.jsx)(Oa.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),ho=(0,ct.memo)(({className:e,children:t,...o})=>(0,Bo.jsx)(jt,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Bo.jsx)(yt,{className:"grid gap-2",children:t})}));bo.displayName="Reasoning";vo.displayName="ReasoningTrigger";ho.displayName="ReasoningContent";var yo=require("react-syntax-highlighter"),Vt=require("react-syntax-highlighter/dist/esm/styles/prism"),sr=(0,ct.createContext)({code:""}),Wt=({code:e,language:t,showLineNumbers:o=!1,className:a,children:n,...i})=>(0,Bo.jsx)(sr.Provider,{value:{code:e},children:(0,Bo.jsx)("div",{className:l("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",a),...i,children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(yo.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Vt.oneLight,children:e}),(0,Bo.jsx)(yo.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Vt.oneDark,children:e}),n&&(0,Bo.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:n})]})})});var Na=({className:e,...t})=>(0,Bo.jsx)(Ut,{className:l("not-prose mb-4 w-full",e),...t}),lr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Bo.jsxs)(ae,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Bo.jsx)(Oa.CircleIcon,{className:"size-4"}),"input-available":(0,Bo.jsx)(Oa.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Bo.jsx)(Oa.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Bo.jsx)(Oa.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},ka=({className:e,type:t,state:o,...a})=>(0,Bo.jsxs)(Ft,{className:l("flex w-full items-center justify-between gap-4 Bo-3 pl-0 w-2xl",e),...a,children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(Oa.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Bo.jsx)("span",{className:"font-medium text-sm",children:t}),lr(o)]}),(0,Bo.jsx)(Oa.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Pa=({className:e,...t})=>(0,Bo.jsx)(jt,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Ta=({className:e,input:t,...o})=>(0,Bo.jsxs)("div",{className:l("space-y-2 overflow-hidden Bo-4",e),...o,children:[(0,Bo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Bo.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Bo.jsx)(Wt,{code:JSON.stringify(t,null,2),language:"json"})})]}),Da=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let n=(0,Bo.jsx)("div",{children:t});return typeof t=="object"?n=(0,Bo.jsx)(Wt,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(n=(0,Bo.jsx)(Wt,{code:t,language:"json"})),(0,Bo.jsxs)("div",{className:l("space-y-2 Bo-4",e),...a,children:[(0,Bo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,Bo.jsxs)("div",{className:l("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,Bo.jsx)("div",{children:o}),n]})]})};var Aa=require("date-fns");function Ra({taskId:e,polling:t=!0,system:o="payload"}){let[a,n]=(0,ct.useState)(null),[i,r]=(0,ct.useState)(!1),[s,c]=(0,ct.useState)(null),m=async(b=!0)=>{if(e){b&&r(!0);try{let y=await fetch(`/api/tasks/${e}`);if(!y.ok)throw new Error(`Failed to fetch task: ${y.statusText}`);let I=await y.json();n(I)}catch(y){console.error("Error fetching task:",y),c(y instanceof Error?y:new Error("Unknown error occurred"))}finally{b&&r(!1)}}},w=()=>m(!1);return(0,ct.useEffect)(()=>{e&&m(!0);let b=null;return e&&t&&(b=setInterval(w,5e3)),()=>{b&&clearInterval(b)}},[e,t]),{task:a,loading:i,error:s}}var cr=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},dr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Ma({data:e}){let{id:t,system:o,fetchLatest:a,taskData:n,error:i}=e||{};if(!t)return null;let r=null,s=!0,c=i,m=a!==void 0?a:!0;if(r=n||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:a,system:o,fetchLatest:m,taskData:r,error:c}),m){let{task:I,loading:T,error:R}=Ra({taskId:t,system:o});r=I,s=T,c=R}else s=!1;let w=cr(r?.status||"todo"),b=dr(r?.status||"todo"),y=r?.dateLogged||new Date().toISOString();try{let I=new Date(r?.dateLogged||"");isNaN(I.getTime())||(y=(0,Aa.formatDistanceToNow)(I,{addSuffix:!0}))}catch{}return(0,Bo.jsxs)(fe,{className:l("w-full max-w-md shadow-md",c&&"border border-destructive"),children:[(0,Bo.jsxs)(Le,{className:"pb-2",children:[(0,Bo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Bo.jsx)(Ee,{className:"text-lg font-semibold",children:s?"Loading...":r?.name||"Task"}),(0,Bo.jsx)(ae,{className:`${w}`,children:b})]}),r?.project&&(0,Bo.jsxs)(co,{className:"text-sm text-gray-500",children:["Project: ",r.project.name]})]}),(0,Bo.jsx)(Te,{className:"pb-2",children:s?(0,Bo.jsx)("div",{className:"animate-pulse Bo-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,Bo.jsx)("Bo",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Bo.jsx)("Bo",{className:"text-sm text-foreground",children:r?.description||"......."})}),(0,Bo.jsx)(ht,{className:"pt-2 flex items-center justify-between",children:(0,Bo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Bo.jsx)(Oa.Clock,{className:"Bo-3 w-3 mr-1"}),(0,Bo.jsxs)("span",{children:["Created ",y]}),(0,Bo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Bo.jsxs)("span",{children:["Task #",t]})]})})]})}function La({artefact:e,taskId:t,taskData:o,loading:a=!1,error:n=null}){let i=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},r=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(r=(0,Aa.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,Bo.jsxs)(fe,{className:"w-full max-w-md shadow-md",children:[(0,Bo.jsx)(Le,{className:"pb-2",children:(0,Bo.jsx)("div",{className:"flex justify-between items-start",children:(0,Bo.jsx)(Ee,{className:"text-lg font-semibold",children:a?"Loading...":i.name})})}),(0,Bo.jsx)(Te,{className:"pb-2",children:a?(0,Bo.jsx)("div",{className:"animate-pulse Bo-4 bg-gray-200 rounded w-3/4 mb-2"}):n?(0,Bo.jsx)("Bo",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Bo.jsx)("Bo",{className:"text-sm text-foreground",children:e})}),(0,Bo.jsx)(ht,{className:"pt-2 flex items-center justify-between",children:(0,Bo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Bo.jsx)(Oa.Clock,{className:"Bo-3 w-3 mr-1"}),(0,Bo.jsxs)("span",{children:["Created ",r]}),(0,Bo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Bo.jsxs)("span",{children:["Task #",i.id]})]})})]})}var pr=e=>e.startsWith("image/")?(0,Bo.jsx)(Oa.Image,{className:"Bo-4 w-4"}):e.startsWith("text/")?(0,Bo.jsx)(Oa.FileText,{className:"Bo-4 w-4"}):(0,Bo.jsx)(Oa.File,{className:"Bo-4 w-4"}),Ea=({message:e,addToolResult:t,status:o,messages:a})=>e.parts.map((n,i)=>{if(n.type==="text")return(0,Bo.jsx)(yt,{children:n.text},`${i}`);if(n.type==="file"){let r=n;return(0,Bo.jsx)("div",{className:"mb-2 Bo-2 bg-background/50 rounded-lg",children:(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[pr(r.mediaType||"application/octet-stream"),(0,Bo.jsx)("div",{className:"flex-1 min-w-0",children:(0,Bo.jsx)("Bo",{className:"text-sm font-medium truncate",children:r.filename||r.url?.split("/").pop()||"File"})}),r.url&&(0,Bo.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(r.url,"_blank"),className:"Bo-8 w-8 Bo-0",children:(0,Bo.jsx)(Oa.Download,{className:"Bo-4 w-4"})})]})},i)}if(n.type.startsWith("tool-")){let r=n,s=n.type.replace("tool-","");if(s==="task")switch(r.state){case"input-available":return(0,Bo.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},i);case"output-available":return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(Ma,{data:{id:r.output?.id||r.input?.id,fetchLatest:!1,taskData:r.output||r.input}})},i);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}if(n.type==="tool-requestEndpointLogin")return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(uo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-authenticate")return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(uo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",r),(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(va,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(s==="artefact")switch(r.state){case"input-available":return(0,Bo.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},i);case"output-available":return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(La,{artefact:r.output?.description||"",taskId:r.output?.id||r.input?.id,taskData:r.output||r.input})},i);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsxs)(fe,{className:"w-full max-w-md",children:[(0,Bo.jsx)(Le,{children:(0,Bo.jsx)(Ee,{className:"text-lg",children:s})}),(0,Bo.jsxs)(Te,{children:[r.state==="input-available"&&(0,Bo.jsxs)("Bo",{className:"text-sm",children:["Processing ",s,"..."]}),r.state==="output-available"&&(0,Bo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.output,null,2)}),r.state==="output-error"&&(0,Bo.jsxs)("Bo",{className:"text-sm text-red-500",children:["Error: ",r.errorText]})]})]})},i)}if(n.type.startsWith("data-")){let r=n,s=n.type.replace("data-","");return s==="reference"?(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(fe,{className:"w-full",children:(0,Bo.jsx)(Te,{className:"Bo-4",children:(0,Bo.jsx)("div",{className:"space-y-2",children:r.data?.references?.map((c,m)=>(0,Bo.jsxs)("div",{className:"flex items-center gap-2 Bo-2 rounded-md bg-muted/50",children:[(0,Bo.jsx)(ae,{variant:"outline",children:c.type||"link"}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsx)("Bo",{className:"text-sm font-medium truncate",children:c.title}),c.description&&(0,Bo.jsx)("Bo",{className:"text-xs text-muted-foreground truncate",children:c.description})]}),c.url&&(0,Bo.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(c.url,"_blank"),className:"Bo-8 w-8 Bo-0",children:(0,Bo.jsx)(Oa.ExternalLink,{className:"Bo-4 w-4"})})]},m))})})})},i):s==="menu"?(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsxs)(fe,{className:"w-full",children:[(0,Bo.jsx)(Le,{children:(0,Bo.jsx)(Ee,{className:"text-lg",children:r.data?.title})}),(0,Bo.jsx)(Te,{children:(0,Bo.jsx)("div",{className:"space-y-2",children:r.data?.items?.map((c,m)=>(0,Bo.jsx)(D,{variant:"outline",className:"w-full justify-start",onClick:c.action,children:(0,Bo.jsxs)("div",{className:"text-left",children:[(0,Bo.jsx)("Bo",{className:"font-medium",children:c.label}),c.description&&(0,Bo.jsx)("Bo",{className:"text-xs text-muted-foreground",children:c.description})]})},m))})})]})},i):(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsxs)(fe,{className:"w-full max-w-md",children:[(0,Bo.jsx)(Le,{children:(0,Bo.jsx)(Ee,{className:"text-lg",children:s})}),(0,Bo.jsx)(Te,{children:(0,Bo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.data,null,2)})})]})},i)}if(n.type==="reasoning")return(0,Bo.jsxs)(bo,{className:"w-full",isStreaming:o==="streaming"&&i===e.parts.length-1&&e.id===a.at(-1)?.id,children:[(0,Bo.jsx)(vo,{}),(0,Bo.jsx)(ho,{children:n.text})]},`${i}`);if(n.type==="dynamic-tool")return(0,Bo.jsxs)(Na,{defaultOpen:n.state!=="output-available",children:[(0,Bo.jsx)(ka,{type:`tool-${n.toolName}`,state:n.state}),(0,Bo.jsxs)(Pa,{children:[(0,Bo.jsx)(Ta,{input:n.input}),(0,Bo.jsx)(Da,{output:n.output,errorText:n.errorText})]})]},`${e.id}-${i}`)});var Ua=({className:e,from:t,...o})=>(0,Bo.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...o}),mr=(0,Io.cva)("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),Fa=({children:e,className:t,variant:o,...a})=>(0,Bo.jsx)("div",{className:l(mr({variant:o,className:t})),...a,children:e});function ja({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:n,fileUploads:i,isDragOver:r,enableFileUpload:s,onInputChange:c,addToolResult:m,onSendMessage:w,onKeyPress:b,onFileUpload:y,onRemoveFile:I,onDragOver:T,className:R,status:C="ready"}){let k=(0,ct.useRef)(null),U=(0,ct.useRef)(null),A=(0,ct.useRef)(null),[M,Y]=(0,ct.useState)(!1),[K,se]=(0,ct.useState)({path:[],selectedItems:[],filters:{}});(0,ct.useEffect)(()=>{k.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,ct.useEffect)(()=>{M&&setTimeout(()=>{k.current?.scrollIntoView({behavior:"smooth"})},100)},[M]);let oe=()=>po(K),W=()=>{let u=[];return n.forEach(F=>{F.actions&&F.actions.forEach(he=>{u.push({label:he.label,action:()=>_(he.id,{path:[F],selectedItems:[],filters:{}})})}),F.children&&F.children.forEach(he=>{he.type==="list"&&he.data&&u.push({label:`View ${he.name}`,action:()=>Y(!0)})})}),u.slice(0,5)},_=(u,F)=>{console.log("Capability action:",u,F);let he=`Executing ${u} with context: ${JSON.stringify(F.path.map(Ae=>Ae.name))}`;Y(!1)},le=po({path:[],selectedItems:[],filters:{}}),B=u=>{y(u.target.files),u.target.files&&(u.target.value="")},Fe=u=>{u.preventDefault(),T(!0)},ve=u=>{u.preventDefault(),T(!1)},d=u=>{u.preventDefault(),T(!1),y(u.dataTransfer.files)},E=u=>{if(u===0)return"0 Bytes";let F=1024,he=["Bytes","KB","MB","GB"],Ae=Math.floor(Math.log(u)/Math.log(F));return parseFloat((u/Math.pow(F,Ae)).toFixed(2))+" "+he[Ae]},S=u=>u.startsWith("image/")?(0,Bo.jsx)(Oa.Image,{className:"Bo-4 w-4"}):u.startsWith("text/")?(0,Bo.jsx)(Oa.FileText,{className:"Bo-4 w-4"}):(0,Bo.jsx)(Oa.File,{className:"Bo-4 w-4"}),ce={messages:e,currentSessionTitle:a,capabilities:n,currentCapabilityContext:K,contextualActions:le,getQuickSuggestions:W().map(u=>u.label)},$=()=>{navigator.clipboard.writeText(JSON.stringify(ce,null,2)),alert("Debug info copied to clipboard")};return(0,Bo.jsxs)("div",{className:`Bo-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${R||""}`,children:[(0,Bo.jsxs)(Ne,{ref:U,className:"flex-1 Bo-4 bg-background border-0",onDragOver:Fe,onDragLeave:ve,onDrop:d,children:[(0,Bo.jsxs)("div",{className:l("space-y-4",r&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Bo.jsx)(lt.animate,{children:e.map(u=>(0,Bo.jsx)(lt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Bo.jsx)(Ua,{from:u.role,children:(0,Bo.jsx)(Fa,{variant:"flat",children:Ea({message:u,addToolResult:m??(()=>{}),status:C,messages:e})})},u.id)},u.id))}),M&&(0,Bo.jsxs)(lt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Bo.jsx)(et,{className:"Bo-8 w-8",children:(0,Bo.jsx)(tt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Bo.jsx)(Oa.Bot,{className:"Bo-4 w-4"})})}),(0,Bo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Bo.jsx)(ma,{capabilities:n,isOpen:M,onToggle:()=>Y(!M),onActionSelect:_,className:"w-full"})})]}),o&&(0,Bo.jsxs)(lt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Bo.jsx)(et,{className:"Bo-8 w-8",children:(0,Bo.jsx)(tt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Bo.jsx)(Oa.Bot,{className:"Bo-4 w-4"})})}),(0,Bo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Bo.jsxs)("div",{className:"flex space-x-1",children:[(0,Bo.jsx)("div",{className:"w-2 Bo-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Bo.jsx)("div",{className:"w-2 Bo-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Bo.jsx)("div",{className:"w-2 Bo-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Bo.jsx)("div",{ref:k})]}),i.length>0&&(0,Bo.jsx)("div",{className:"Bo-4 border-t bg-muted/10",children:(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(u=>(0,Bo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg Bo-2 border",children:[S(u.file.type),(0,Bo.jsx)("span",{className:"text-sm font-medium",children:u.file.name}),(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:E(u.file.size)}),(0,Bo.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>I(u.id),className:"Bo-6 w-6 Bo-0",children:(0,Bo.jsx)(Oa.Bo,{className:"Bo-4 w-4"})})]},u.id))})}),(0,Bo.jsxs)("div",{className:"border rounded-2xl Bo-4 bg-muted/20",children:[(0,Bo.jsxs)("div",{className:"flex gap-3",children:[(0,Bo.jsx)(gt,{value:t,onChange:u=>c(u.target.value),onKeyPress:b,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),s&&(0,Bo.jsx)(D,{variant:"outline",size:"icon",onClick:()=>A.current?.click(),className:"rounded-2xl Bo-10 w-10 shadow-sm",children:(0,Bo.jsx)(Oa.Paperclip,{className:"Bo-4 w-4"})}),(0,Bo.jsx)(D,{onClick:w,disabled:!t.trim()&&i.length===0||o,size:"icon",className:"rounded-2xl Bo-10 w-10 shadow-sm",children:(0,Bo.jsx)(Oa.Send,{className:"Bo-4 w-4"})})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Bo.jsxs)(D,{onClick:()=>Y(!M),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Bo.jsx)(Oa.Menu,{className:"Bo-3 w-3 mr-1"}),M?"Hide":"Show"," Capabilities"]}),(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[oe().map((u,F)=>(0,Bo.jsx)(D,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>_(u.id,K),children:u.label},`context-${u.id}`)),oe().length===0&&W().map((u,F)=>(0,Bo.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:u.action,children:u.label},`suggestion-${F}`)),(0,Bo.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:$,children:"Debug"})]})]}),s&&(0,Bo.jsx)("input",{ref:A,type:"file",multiple:!0,onChange:B,className:"hidden"})]})]})}function ur({aiConfig:e,useCustomChat:t,enableAI:o=!0,messages:a=[],businessUnits:n=[],capabilities:i=[],sidebarItems:r=[],notifications:s=[],sessions:c=[],onNewChat:m,onSessionSelect:w,onSessionDelete:b,onSessionEdit:y=()=>{},onBusinessUnitChange:I=()=>{},onNotificationRemove:T=()=>{},onRemoveAll:R=()=>{},onActionClick:C=()=>{},onSearch:k=d=>console.log("Search query:",d),initialTeam:U="design",currentSession:A=null,showCapabilities:M=!0,title:Y="Digital Colleagues",enableFileUpload:K=!0,maxFileSize:se=10,allowedFileTypes:oe=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:W="/headerlogo.png",appName:_="Nuvia",tagline:le="AI-Powered Workspace",actionIcon:B=(0,Bo.jsx)(Oa.Users,{className:"mr-2 Bo-4 w-4"}),actionText:Fe="Collaborate",sidebarInitiallyClosed:ve=!1}){let d={...e,onError:j=>{S?.setMessages(de=>[...de,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:j.message}]}]),console.error("Error in CopilotInterface:",j)}},E=(0,Ha.useChat)(d||{}),S=o?t||E:null,[ce,$]=(0,ct.useState)(""),[u,F]=(0,ct.useState)(!1),he=S?.messages||a,Ae=ce,Va=S?.status==="submitted"||u,Wa=S?.addToolResult?(j,de,ee)=>{S.addToolResult({tool:de,toolCallId:j,output:ee}),console.log("Tool result added:",{toolCallId:j,tool:de,output:ee}),S.sendMessage()}:()=>{console.log("addToolResult not available")},dt=n||[],Ga={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"},[$a,qa]=(0,ct.useState)(()=>dt.length===0?Ga:dt.find(j=>j.id===U)||dt[0]),[pt,xt]=(0,ct.useState)([]),[Ka,_a]=(0,ct.useState)(!1),Ja=j=>{if(!j||!K)return;let de=[];Array.from(j).forEach(ee=>{if(ee.size>se*1024*1024){alert(`File ${ee.name} is too large. Maximum size is ${se}MB.`);return}if(oe.length>0&&!oe.some(wt=>ee.type.match(wt))){alert(`File type ${ee.type} is not allowed.`);return}let wo={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ee,status:"pending",progress:0};if(ee.type.startsWith("image/")){let wt=new FileReader;wt.onload=ei=>{xt(ti=>ti.map(qt=>qt.id===wo.id?{...qt,preview:ei.target?.result}:qt))},wt.readAsDataURL(ee)}de.push(wo)}),xt(ee=>[...ee,...de])},Xa=j=>{xt(de=>de.filter(ee=>ee.id!==j))},xo=()=>{if(!(!Ae.trim()&&pt.length===0)){if(S){let j=pt.length>0?Qa(pt.map(de=>de.file)):void 0;S.sendMessage({text:Ae,files:j},{body:{timestamp:Date.now()}}),$("")}else console.log("Message to send:",Ae),console.log("Files to upload:",pt),$(""),F(!0),setTimeout(()=>{F(!1)},1500);xt([])}},Qa=j=>{let de=new DataTransfer;return j.forEach(ee=>de.items.add(ee)),de.files},Ya=j=>{j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),xo())},Za=j=>{$(j)};return(0,Bo.jsx)(ca,{sidebarItems:r||[],title:Y,notifications:s||[],businessUnits:dt,currentBusinessUnit:$a,onBusinessUnitChange:j=>{j&&(qa(j),I?.(j))},onSearch:k,showTabs:!1,onActionClick:C,actionIcon:B,actionText:Fe,onNotificationRemove:T,onRemoveAll:R,logo:W,appName:_,tagline:le,sidebarInitiallyClosed:ve,children:(0,Bo.jsx)($t.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)($t.motion.div,{className:"flex-1 Bo-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Bo.jsxs)("div",{className:"Bo-full flex",children:[(0,Bo.jsx)("div",{className:"w-80 flex-shrink-0 Bo-full Bo-2",children:(0,Bo.jsx)(da,{sessions:c||[],currentSession:A,teams:dt,onNewChat:m,onSessionSelect:w,onSessionEdit:y,onSessionDelete:b})}),(0,Bo.jsx)("div",{className:"flex-1 Bo-full Bo-2",children:(0,Bo.jsx)(ja,{messages:he||[],input:Ae,isTyping:Va,currentSessionTitle:A?.title,capabilities:i||[],onInputChange:Za,addToolResult:Wa,onSendMessage:xo,onKeyPress:Ya,fileUploads:pt,isDragOver:Ka,enableFileUpload:K,onFileUpload:Ja,onRemoveFile:Xa,onDragOver:_a})})]})},"chat-interface")})})}0&&(module.exports={CopilotInterface});
|
|
21
|
+
`,children:"Cancel"})]})]}):null};var Pa=({toolPart:e,index:t,addToolResult:o})=>{let[a,n]=vo.default.useState(!0),[i,r]=vo.default.useState(null),s=()=>{o(e.toolCallId,e.type,"Approved"),n(!1),r("approve")},d=()=>{o(e.toolCallId,e.type,"Denied"),n(!1),r("deny")};switch(e.state){case"input-available":return(0,Oo.jsxs)("div",{className:"mb-2",children:[(0,Oo.jsx)(ka,{isOpen:a,onApprove:s,onDeny:d,onClose:()=>n(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,Oo.jsxs)(Oo.Fragment,{children:[i==="approve"&&(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Oo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Oo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Oo.jsxs)(Oo.Fragment,{children:[e.output==="approve"&&(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Oo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),e.output==="deny"&&(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Oo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]});default:return null}};var ho=require("@radix-ui/react-use-controllable-state");var ct=G(require("@radix-ui/react-collapsible")),pt=ct.Root,mt=ct.CollapsibleTrigger,tt=ct.CollapsibleContent;var Da=require("streamdown"),Ke=(0,ft.memo)(({className:e,...t})=>(0,Oo.jsx)(Da.Streamdown,{className:l("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Ke.displayName="Response";var Sa=(0,ft.createContext)(null),mr=()=>{let e=(0,ft.useContext)(Sa);if(!e)throw new Error("Reasoning components must Oo used within Reasoning");return e},ur=1e3,gr=1e3,yo=(0,ft.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:n,duration:i,children:r,...s})=>{let[d,p]=(0,ho.useControllableState)({prop:o,defaultProp:a,onChange:n}),[h,u]=(0,ho.useControllableState)({prop:i,defaultProp:0}),[v,S]=(0,ft.useState)(!1),[T,N]=(0,ft.useState)(null);(0,ft.useEffect)(()=>{t?T===null&&N(Date.now()):T!==null&&(u(Math.ceil((Date.now()-T)/gr)),N(null))},[t,T,u]),(0,ft.useEffect)(()=>{if(a&&!t&&d&&!v){let k=setTimeout(()=>{p(!1),S(!0)},ur);return()=>clearTimeout(k)}},[t,d,a,p,v]);let C=k=>{p(k)};return(0,Oo.jsx)(Sa.Provider,{value:{isStreaming:t,isOpen:d,setIsOpen:p,duration:h},children:(0,Oo.jsx)(pt,{className:l("not-prose mb-4",e),onOpenChange:C,open:d,...s,children:r})})}),fr=(e,t)=>e||t===0?(0,Oo.jsx)("p",{children:"Thinking..."}):t===void 0?(0,Oo.jsx)("p",{children:"Thought for a few seconds"}):(0,Oo.jsxs)("p",{children:["Thought for ",t," seconds"]}),xo=(0,ft.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:n,duration:i}=mr();return(0,Oo.jsx)(mt,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)(Qa.BrainIcon,{className:"size-4"}),fr(a,i),(0,Oo.jsx)(Qa.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),Co=(0,ft.memo)(({className:e,children:t,...o})=>(0,Oo.jsx)(tt,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Oo.jsx)(Ke,{className:"grid gap-2",children:t})}));yo.displayName="Reasoning";xo.displayName="ReasoningTrigger";Co.displayName="ReasoningContent";var wo=require("react-syntax-highlighter"),Gt=require("react-syntax-highlighter/dist/esm/styles/prism"),br=(0,ft.createContext)({code:""}),$t=({code:e,language:t,showLineNumbers:o=!1,className:a,children:n,...i})=>(0,Oo.jsx)(br.Provider,{value:{code:e},children:(0,Oo.jsx)("div",{className:l("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",a),...i,children:(0,Oo.jsxs)("div",{className:"relative",children:[(0,Oo.jsx)(wo.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Gt.oneLight,children:e}),(0,Oo.jsx)(wo.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Gt.oneDark,children:e}),n&&(0,Oo.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:n})]})})});var Ma=({className:e,...t})=>(0,Oo.jsx)(pt,{className:l("not-prose mb-4 w-full",e),...t}),vr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Oo.jsxs)(ie,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Oo.jsx)(Qa.CircleIcon,{className:"size-4"}),"input-available":(0,Oo.jsx)(Qa.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Oo.jsx)(Qa.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Oo.jsx)(Qa.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Ia=({className:e,type:t,state:o,...a})=>(0,Oo.jsxs)(mt,{className:l("flex w-full items-center justify-between gap-4 p-3 pl-0 w-2xl",e),...a,children:[(0,Oo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Oo.jsx)(Qa.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Oo.jsx)("span",{className:"font-medium text-sm",children:t}),vr(o)]}),(0,Oo.jsx)(Qa.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Ba=({className:e,...t})=>(0,Oo.jsx)(tt,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),La=({className:e,input:t,...o})=>(0,Oo.jsxs)("div",{className:l("space-Oo-2 overflow-hidden p-4",e),...o,children:[(0,Oo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Oo.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Oo.jsx)($t,{code:JSON.stringify(t,null,2),language:"json"})})]}),Ea=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let n=(0,Oo.jsx)("div",{children:t});return typeof t=="object"?n=(0,Oo.jsx)($t,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(n=(0,Oo.jsx)($t,{code:t,language:"json"})),(0,Oo.jsxs)("div",{className:l("space-Oo-2 p-4",e),...a,children:[(0,Oo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,Oo.jsxs)("div",{className:l("overflow-Oo-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,Oo.jsx)("div",{children:o}),n]})]})};var za=(0,ft.createContext)(null),hr=()=>{let e=(0,ft.useContext)(za);if(!e)throw new Error("ColleagueHandoff components must Oo used within ColleagueHandoff");return e},yr=1e3,xr=1e3,ko=(0,ft.memo)(({className:e,isStreaming:t=!1,name:o="Digital Colleague",open:a,defaultOpen:n=!0,onOpenChange:i,duration:r,children:s,...d})=>{let[p,h]=(0,ho.useControllableState)({prop:a,defaultProp:n,onChange:i}),[u,v]=(0,ho.useControllableState)({prop:r,defaultProp:0}),[S,T]=(0,ft.useState)(!1),[N,C]=(0,ft.useState)(null);(0,ft.useEffect)(()=>{t?N===null&&C(Date.now()):N!==null&&(v(Math.ceil((Date.now()-N)/xr)),C(null))},[t,N,v]),(0,ft.useEffect)(()=>{if(n&&!t&&p&&!S){let B=setTimeout(()=>{h(!1),T(!0)},yr);return()=>clearTimeout(B)}},[t,p,n,h,S]);let k=B=>{h(B)};return(0,Oo.jsx)(za.Provider,{value:{isStreaming:t,name:o,isOpen:p,setIsOpen:h,duration:u},children:(0,Oo.jsx)(pt,{className:l("not-prose mb-4",e),onOpenChange:k,open:p,...d,children:s})})}),Cr=(e,t,o)=>e||o===0?(0,Oo.jsxs)("p",{children:["Asking our ",t,"..."]}):o===void 0?(0,Oo.jsxs)("p",{children:["Got an answer from our ",t]}):(0,Oo.jsxs)("p",{children:["Got an answer from our ",t," in ",o," seconds"]}),Po=(0,ft.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:n,name:i,duration:r}=hr();return(0,Oo.jsx)(mt,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)(Qa.Users,{className:"size-4"}),Cr(a,i,r),(0,Oo.jsx)(Qa.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),To=(0,ft.memo)(({className:e,children:t,...o})=>(0,Oo.jsx)(tt,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Oo.jsx)(Ke,{className:"grid gap-2",children:t})})),Do=(0,ft.memo)(({className:e,children:t,...o})=>(0,Oo.jsx)(tt,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Oo.jsx)(Ke,{className:"grid gap-2",children:t})}));ko.displayName="ColleagueHandoff";Po.displayName="ColleagueHandoffTrigger";To.displayName="ColleagueHandoffContent";Do.displayName="ColleagueHandoffQuery";var Fa=require("date-fns");function Ua({taskId:e,polling:t=!0,system:o="payload"}){let[a,n]=(0,ft.useState)(null),[i,r]=(0,ft.useState)(!1),[s,d]=(0,ft.useState)(null),p=async(u=!0)=>{if(e){u&&r(!0);try{let v=await fetch(`/api/tasks/${e}`);if(!v.ok)throw new Error(`Failed to fetch task: ${v.statusText}`);let S=await v.json();n(S)}catch(v){console.error("Error fetching task:",v),d(v instanceof Error?v:new Error("Unknown error occurred"))}finally{u&&r(!1)}}},h=()=>p(!1);return(0,ft.useEffect)(()=>{e&&p(!0);let u=null;return e&&t&&(u=setInterval(h,5e3)),()=>{u&&clearInterval(u)}},[e,t]),{task:a,loading:i,error:s}}var wr=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},Nr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function ja({data:e}){let{id:t,system:o,fetchLatest:a,taskData:n,error:i}=e||{};if(!t)return null;let r=null,s=!0,d=i,p=a!==void 0?a:!0;if(r=n||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:a,system:o,fetchLatest:p,taskData:r,error:d}),p){let{task:S,loading:T,error:N}=Ua({taskId:t,system:o});r=S,s=T,d=N}else s=!1;let h=wr(r?.status||"todo"),u=Nr(r?.status||"todo"),v=r?.dateLogged||new Date().toISOString();try{let S=new Date(r?.dateLogged||"");isNaN(S.getTime())||(v=(0,Fa.formatDistanceToNow)(S,{addSuffix:!0}))}catch{}return(0,Oo.jsxs)(ve,{className:l("w-full max-w-md shadow-md",d&&"border border-destructive"),children:[(0,Oo.jsxs)(ze,{className:"pb-2",children:[(0,Oo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Oo.jsx)(Ue,{className:"text-lg font-semibold",children:s?"Loading...":r?.name||"Task"}),(0,Oo.jsx)(ie,{className:`${h}`,children:u})]}),r?.project&&(0,Oo.jsxs)(uo,{className:"text-sm text-gray-500",children:["Project: ",r.project.name]})]}),(0,Oo.jsx)(Re,{className:"pb-2",children:s?(0,Oo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):d?(0,Oo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Oo.jsx)("p",{className:"text-sm text-foreground",children:r?.description||"......."})}),(0,Oo.jsx)(kt,{className:"pt-2 flex items-center justify-between",children:(0,Oo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Oo.jsx)(Qa.Clock,{className:"h-3 w-3 mr-1"}),(0,Oo.jsxs)("span",{children:["Created ",v]}),(0,Oo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Oo.jsxs)("span",{children:["Task #",t]})]})})]})}function Wa({artefact:e,taskId:t,taskData:o,loading:a=!1,error:n=null}){let i=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},r=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(r=(0,Fa.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,Oo.jsxs)(ve,{className:"w-full max-w-md shadow-md",children:[(0,Oo.jsx)(ze,{className:"pb-2",children:(0,Oo.jsx)("div",{className:"flex justify-between items-start",children:(0,Oo.jsx)(Ue,{className:"text-lg font-semibold",children:a?"Loading...":i.name})})}),(0,Oo.jsx)(Re,{className:"pb-2",children:a?(0,Oo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):n?(0,Oo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Oo.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,Oo.jsx)(kt,{className:"pt-2 flex items-center justify-between",children:(0,Oo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Oo.jsx)(Qa.Clock,{className:"h-3 w-3 mr-1"}),(0,Oo.jsxs)("span",{children:["Created ",r]}),(0,Oo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Oo.jsxs)("span",{children:["Task #",i.id]})]})})]})}var kr=e=>e.startsWith("image/")?(0,Oo.jsx)(Qa.Image,{className:"h-4 w-4"}):e.startsWith("text/")?(0,Oo.jsx)(Qa.FileText,{className:"h-4 w-4"}):(0,Oo.jsx)(Qa.File,{className:"h-4 w-4"}),Ga=({message:e,addToolResult:t,status:o,messages:a})=>e.parts.map((n,i)=>{if(n.type==="text")return(0,Oo.jsx)(Ke,{children:n.text},`${i}`);if(n.type==="file"){let r=n;return(0,Oo.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Oo.jsxs)("div",{className:"flex items-center gap-2",children:[kr(r.mediaType||"application/octet-stream"),(0,Oo.jsx)("div",{className:"flex-1 min-w-0",children:(0,Oo.jsx)("p",{className:"text-sm font-medium truncate",children:r.filename||r.url?.split("/").pop()||"File"})}),r.url&&(0,Oo.jsx)(R,{variant:"ghost",size:"sm",onClick:()=>window.open(r.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Oo.jsx)(Qa.Download,{className:"h-4 w-4"})})]})},i)}if(n.type.startsWith("tool-")){let r=n,s=n.type.replace("tool-","");if(n.type.startsWith("tool-dc_a2a"))return(0,Oo.jsxs)(ko,{name:r?.input?.dcName||"Digital Colleague",className:"w-full",isStreaming:o==="streaming"&&i===e.parts.length-1&&e.id===a.at(-1)?.id,children:[(0,Oo.jsx)(Po,{}),(0,Oo.jsx)(Do,{children:r?.input?.query}),(0,Oo.jsx)(To,{children:r?.output})]},`${i}`);if(s==="task")switch(r.state){case"input-available":return(0,Oo.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},i);case"output-available":return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(ja,{data:{id:r.output?.id||r.input?.id,fetchLatest:!1,taskData:r.output||r.input}})},i);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}if(n.type==="tool-requestEndpointLogin")return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(bo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-authenticate")return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(bo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",r),(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(Pa,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(s==="artefact")switch(r.state){case"input-available":return(0,Oo.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},i);case"output-available":return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(Wa,{artefact:r.output?.description||"",taskId:r.output?.id||r.input?.id,taskData:r.output||r.input})},i);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsxs)(ve,{className:"w-full max-w-md",children:[(0,Oo.jsx)(ze,{children:(0,Oo.jsx)(Ue,{className:"text-lg",children:s})}),(0,Oo.jsxs)(Re,{children:[r.state==="input-available"&&(0,Oo.jsxs)("p",{className:"text-sm",children:["Processing ",s,"..."]}),r.state==="output-available"&&(0,Oo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.output,null,2)}),r.state==="output-error"&&(0,Oo.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",r.errorText]})]})]})},i)}if(n.type.startsWith("data-")){let r=n,s=n.type.replace("data-","");return s==="reference"?(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(ve,{className:"w-full",children:(0,Oo.jsx)(Re,{className:"p-4",children:(0,Oo.jsx)("div",{className:"space-Oo-2",children:r.data?.references?.map((d,p)=>(0,Oo.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,Oo.jsx)(ie,{variant:"outline",children:d.type||"link"}),(0,Oo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Oo.jsx)("p",{className:"text-sm font-medium truncate",children:d.title}),d.description&&(0,Oo.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:d.description})]}),d.url&&(0,Oo.jsx)(R,{variant:"ghost",size:"sm",onClick:()=>window.open(d.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Oo.jsx)(Qa.ExternalLink,{className:"h-4 w-4"})})]},p))})})})},i):s==="menu"?(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsxs)(ve,{className:"w-full",children:[(0,Oo.jsx)(ze,{children:(0,Oo.jsx)(Ue,{className:"text-lg",children:r.data?.title})}),(0,Oo.jsx)(Re,{children:(0,Oo.jsx)("div",{className:"space-Oo-2",children:r.data?.items?.map((d,p)=>(0,Oo.jsx)(R,{variant:"outline",className:"w-full justify-start",onClick:d.action,children:(0,Oo.jsxs)("div",{className:"text-left",children:[(0,Oo.jsx)("p",{className:"font-medium",children:d.label}),d.description&&(0,Oo.jsx)("p",{className:"text-xs text-muted-foreground",children:d.description})]})},p))})})]})},i):(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsxs)(ve,{className:"w-full max-w-md",children:[(0,Oo.jsx)(ze,{children:(0,Oo.jsx)(Ue,{className:"text-lg",children:s})}),(0,Oo.jsx)(Re,{children:(0,Oo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.data,null,2)})})]})},i)}if(n.type==="reasoning")return(0,Oo.jsxs)(yo,{className:"w-full",isStreaming:o==="streaming"&&i===e.parts.length-1&&e.id===a.at(-1)?.id,children:[(0,Oo.jsx)(xo,{}),(0,Oo.jsx)(Co,{children:n.text})]},`${i}`);if(n.type==="dynamic-tool")return(0,Oo.jsxs)(Ma,{defaultOpen:n.state!=="output-available",children:[(0,Oo.jsx)(Ia,{type:`tool-${n.toolName}`,state:n.state}),(0,Oo.jsxs)(Ba,{children:[(0,Oo.jsx)(La,{input:n.input}),(0,Oo.jsx)(Ea,{output:n.output,errorText:n.errorText})]})]},`${e.id}-${i}`)});var _a=({className:e,from:t,...o})=>(0,Oo.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...o}),Pr=(0,$a.cva)("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-card group-[.is-assistant]:text-card-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),qa=({children:e,className:t,variant:o,...a})=>(0,Oo.jsx)("div",{className:l(Pr({variant:o,className:t})),...a,children:e});function Ka({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:n,fileUploads:i,isDragOver:r,enableFileUpload:s,onInputChange:d,addToolResult:p,onSendMessage:h,onKeyPress:u,onFileUpload:v,onRemoveFile:S,onDragOver:T,className:N,status:C="ready"}){let k=(0,ft.useRef)(null),B=(0,ft.useRef)(null),M=(0,ft.useRef)(null),[I,Y]=(0,ft.useState)(!1),[q,de]=(0,ft.useState)({path:[],selectedItems:[],filters:{}});(0,ft.useEffect)(()=>{k.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,ft.useEffect)(()=>{I&&setTimeout(()=>{k.current?.scrollIntoView({behavior:"smooth"})},100)},[I]);let ae=()=>go(q),W=()=>{let g=[];return n.forEach(H=>{H.actions&&H.actions.forEach(xe=>{g.push({label:xe.label,action:()=>K(xe.id,{path:[H],selectedItems:[],filters:{}})})}),H.children&&H.children.forEach(xe=>{xe.type==="list"&&xe.data&&g.push({label:`View ${xe.name}`,action:()=>Y(!0)})})}),g.slice(0,5)},K=(g,H)=>{console.log("Capability action:",g,H);let xe=`Executing ${g} with context: ${JSON.stringify(H.path.map(Ie=>Ie.name))}`;Y(!1)},ce=go({path:[],selectedItems:[],filters:{}}),L=g=>{v(g.target.files),g.target.files&&(g.target.value="")},je=g=>{g.preventDefault(),T(!0)},ye=g=>{g.preventDefault(),T(!1)},c=g=>{g.preventDefault(),T(!1),v(g.dataTransfer.files)},z=g=>{if(g===0)return"0 Bytes";let H=1024,xe=["Bytes","KB","MB","GB"],Ie=Math.floor(Math.log(g)/Math.log(H));return parseFloat((g/Math.pow(H,Ie)).toFixed(2))+" "+xe[Ie]},A=g=>g.startsWith("image/")?(0,Oo.jsx)(Qa.Image,{className:"h-4 w-4"}):g.startsWith("text/")?(0,Oo.jsx)(Qa.FileText,{className:"h-4 w-4"}):(0,Oo.jsx)(Qa.File,{className:"h-4 w-4"}),pe={messages:e,currentSessionTitle:a,capabilities:n,currentCapabilityContext:q,contextualActions:ce,getQuickSuggestions:W().map(g=>g.label)},$=()=>{navigator.clipboard.writeText(JSON.stringify(pe,null,2)),alert("Debug info copied to clipboard")};return(0,Oo.jsxs)("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${N||""}`,children:[(0,Oo.jsxs)(Pe,{ref:B,className:"flex-1 p-4 bg-background border-0",onDragOver:je,onDragLeave:ye,onDrop:c,children:[(0,Oo.jsxs)("div",{className:l("space-Oo-4",r&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Oo.jsx)(gt.animate,{children:e.map(g=>(0,Oo.jsx)(gt.div,{initial:{opacity:0,Oo:10},animate:{opacity:1,Oo:0},children:(0,Oo.jsx)(_a,{from:g.role,children:(0,Oo.jsx)(qa,{variant:"contained",children:Ga({message:g,addToolResult:p??(()=>{}),status:C,messages:e})})},g.id)},g.id))}),I&&(0,Oo.jsxs)(gt.div,{initial:{opacity:0,Oo:10},animate:{opacity:1,Oo:0},exit:{opacity:0,Oo:-10},className:"flex gap-3",children:[(0,Oo.jsx)(it,{className:"h-8 w-8",children:(0,Oo.jsx)(rt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Oo.jsx)(Qa.Bot,{className:"h-4 w-4"})})}),(0,Oo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Oo.jsx)(xa,{capabilities:n,isOpen:I,onToggle:()=>Y(!I),onActionSelect:K,className:"w-full"})})]}),o&&(0,Oo.jsxs)(gt.div,{initial:{opacity:0,Oo:10},animate:{opacity:1,Oo:0},className:"flex gap-3",children:[(0,Oo.jsx)(it,{className:"h-8 w-8",children:(0,Oo.jsx)(rt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Oo.jsx)(Qa.Bot,{className:"h-4 w-4"})})}),(0,Oo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Oo.jsxs)("div",{className:"flex space-Oo-1",children:[(0,Oo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Oo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Oo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Oo.jsx)("div",{ref:k})]}),i.length>0&&(0,Oo.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Oo.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(g=>(0,Oo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[A(g.file.type),(0,Oo.jsx)("span",{className:"text-sm font-medium",children:g.file.name}),(0,Oo.jsx)("span",{className:"text-xs text-muted-foreground",children:z(g.file.size)}),(0,Oo.jsx)(R,{variant:"ghost",size:"sm",onClick:()=>S(g.id),className:"h-6 w-6 p-0",children:(0,Oo.jsx)(Qa.Oo,{className:"h-4 w-4"})})]},g.id))})}),(0,Oo.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Oo.jsxs)("div",{className:"flex gap-3",children:[(0,Oo.jsx)(xt,{value:t,onChange:g=>d(g.target.value),onKeyPress:u,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),s&&(0,Oo.jsx)(R,{variant:"outline",size:"icon",onClick:()=>M.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Oo.jsx)(Qa.Paperclip,{className:"h-4 w-4"})}),(0,Oo.jsx)(R,{onClick:h,disabled:!t.trim()&&i.length===0||o,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Oo.jsx)(Qa.Send,{className:"h-4 w-4"})})]}),(0,Oo.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Oo.jsxs)(R,{onClick:()=>Y(!I),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Oo.jsx)(Qa.Menu,{className:"h-3 w-3 mr-1"}),I?"Hide":"Show"," Capabilities"]}),(0,Oo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[ae().map((g,H)=>(0,Oo.jsx)(R,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>K(g.id,q),children:g.label},`context-${g.id}`)),ae().length===0&&W().map((g,H)=>(0,Oo.jsx)(R,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:g.action,children:g.label},`suggestion-${H}`)),(0,Oo.jsx)(R,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:$,children:"Debug"})]})]}),s&&(0,Oo.jsx)("input",{ref:M,type:"file",multiple:!0,onChange:L,className:"hidden"})]})]})}function Tr({aiConfig:e,useCustomChat:t,enableAI:o=!0,messages:a=[],businessUnits:n=[],capabilities:i=[],sidebarItems:r=[],notifications:s=[],sessions:d=[],onNewChat:p,onSessionSelect:h,onSessionDelete:u,onSessionEdit:v=()=>{},onBusinessUnitChange:S=()=>{},onNotificationRemove:T=()=>{},onRemoveAll:N=()=>{},onActionClick:C=()=>{},onSearch:k=c=>console.log("Search query:",c),initialTeam:B="design",currentSession:M=null,showCapabilities:I=!0,title:Y="Digital Colleagues",enableFileUpload:q=!0,maxFileSize:de=10,allowedFileTypes:ae=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:W="/headerlogo.png",appName:K="Nuvia",tagline:ce="AI-Powered Workspace",actionIcon:L=(0,Oo.jsx)(Qa.Users,{className:"mr-2 h-4 w-4"}),actionText:je="Collaborate",sidebarInitiallyClosed:ye=!1}){let c={...e,onError:F=>{A?.setMessages(me=>[...me,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:F.message}]}]),console.error("Error in CopilotInterface:",F)}},z=(0,Ja.useChat)(c||{}),A=o?t||z:null,[pe,$]=(0,ft.useState)(""),[g,H]=(0,ft.useState)(!1),xe=A?.messages||a,Ie=pe,Xa=A?.status==="submitted"||g,Ya=A?.addToolResult?(F,me,te)=>{A.addToolResult({tool:me,toolCallId:F,output:te}),console.log("Tool result added:",{toolCallId:F,tool:me,output:te}),A.sendMessage()}:()=>{console.log("addToolResult not available")},bt=n||[],Za={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"},[ei,ti]=(0,ft.useState)(()=>bt.length===0?Za:bt.find(F=>F.id===B)||bt[0]),[vt,Pt]=(0,ft.useState)([]),[oi,ai]=(0,ft.useState)(!1),ii=F=>{if(!F||!q)return;let me=[];Array.from(F).forEach(te=>{if(te.size>de*1024*1024){alert(`File ${te.name} is too large. Maximum size is ${de}MB.`);return}if(ae.length>0&&!ae.some(Tt=>te.type.match(Tt))){alert(`File type ${te.type} is not allowed.`);return}let So={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:te,status:"pending",progress:0};if(te.type.startsWith("image/")){let Tt=new FileReader;Tt.onload=di=>{Pt(ci=>ci.map(Jt=>Jt.id===So.id?{...Jt,preview:di.target?.result}:Jt))},Tt.readAsDataURL(te)}me.push(So)}),Pt(te=>[...te,...me])},ri=F=>{Pt(me=>me.filter(te=>te.id!==F))},Ro=()=>{if(!(!Ie.trim()&&vt.length===0)){if(A){let F=vt.length>0?ni(vt.map(me=>me.file)):void 0;A.sendMessage({text:Ie,files:F},{body:{timestamp:Date.now()}}),$("")}else console.log("Message to send:",Ie),console.log("Files to upload:",vt),$(""),H(!0),setTimeout(()=>{H(!1)},1500);Pt([])}},ni=F=>{let me=new DataTransfer;return F.forEach(te=>me.items.add(te)),me.files},si=F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),Ro())},li=F=>{$(F)};return(0,Oo.jsx)(va,{sidebarItems:r||[],title:Y,notifications:s||[],businessUnits:bt,currentBusinessUnit:ei,onBusinessUnitChange:F=>{F&&(ti(F),S?.(F))},onSearch:k,showTabs:!1,onActionClick:C,actionIcon:L,actionText:je,onNotificationRemove:T,onRemoveAll:N,logo:W,appName:K,tagline:ce,sidebarInitiallyClosed:ye,children:(0,Oo.jsx)(Kt.AnimatePresence,{mode:"wait",children:(0,Oo.jsx)(Kt.motion.div,{className:"flex-1 h-full",initial:{opacity:0,Oo:10},animate:{opacity:1,Oo:0},exit:{opacity:0,Oo:-10},transition:{duration:.2},children:(0,Oo.jsxs)("div",{className:"h-full flex",children:[(0,Oo.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,Oo.jsx)(ha,{sessions:d||[],currentSession:M,teams:bt,onNewChat:p,onSessionSelect:h,onSessionEdit:v,onSessionDelete:u})}),(0,Oo.jsx)("div",{className:"flex-1 h-full p-2",children:(0,Oo.jsx)(Ka,{messages:xe||[],input:Ie,isTyping:Xa,currentSessionTitle:M?.title,capabilities:i||[],onInputChange:li,addToolResult:Ya,onSendMessage:Ro,onKeyPress:si,fileUploads:vt,isDragOver:oi,enableFileUpload:q,onFileUpload:ii,onRemoveFile:ri,onDragOver:ai})})]})},"chat-interface")})})}0&&(module.exports={CopilotInterface});
|