cortex-react-components 2.23.1 → 2.24.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.
Files changed (141) hide show
  1. package/dist/{chunk-GZ7FGBTR.mjs → chunk-5EM6P7SU.mjs} +1 -1
  2. package/dist/{chunk-UECG3SCG.mjs → chunk-6DDMDQLX.mjs} +1 -1
  3. package/dist/{chunk-TSFX33PR.mjs → chunk-BGQC6IQK.mjs} +1 -1
  4. package/dist/{chunk-XJKRA2AE.mjs → chunk-CMU5JFUC.mjs} +1 -1
  5. package/dist/chunk-GCIEF545.mjs +4 -0
  6. package/dist/{chunk-INBT5E6T.mjs → chunk-GPFPTU7U.mjs} +1 -1
  7. package/dist/{chunk-LEUI66J6.mjs → chunk-GULRIPMU.mjs} +1 -1
  8. package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
  9. package/dist/chunk-ICFBQXVC.mjs +4 -0
  10. package/dist/{chunk-CQAMS7RZ.mjs → chunk-JOG27B7P.mjs} +1 -1
  11. package/dist/chunk-M7KIL6AS.mjs +9 -0
  12. package/dist/{chunk-B7AXSCTN.mjs → chunk-M7ZG6HLI.mjs} +1 -1
  13. package/dist/{chunk-JTMIQ7MK.mjs → chunk-NXAQ6ESJ.mjs} +1 -1
  14. package/dist/{chunk-I4GYQZGM.mjs → chunk-QY3UXH77.mjs} +1 -1
  15. package/dist/{chunk-L5NPH5RX.mjs → chunk-RQLUMNJE.mjs} +1 -1
  16. package/dist/{chunk-IAFKJKBN.mjs → chunk-SDKKYDWS.mjs} +1 -1
  17. package/dist/{chunk-W4OD5UUE.mjs → chunk-UTJZH3X5.mjs} +1 -1
  18. package/dist/{chunk-AF3FLXBA.mjs → chunk-VATGKKXW.mjs} +1 -1
  19. package/dist/chunk-VTFO5GXK.mjs +4 -0
  20. package/dist/{chunk-AHMDJQZI.mjs → chunk-XDW3TPGL.mjs} +1 -1
  21. package/dist/{chunk-OWC4BAX6.mjs → chunk-YJ7XPZWV.mjs} +1 -1
  22. package/dist/components/Blocks/Banner.mjs +1 -1
  23. package/dist/components/Blocks/CallToAction.mjs +1 -1
  24. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  25. package/dist/components/Blocks/Content.mjs +1 -1
  26. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  27. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  28. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  29. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  30. package/dist/components/Blocks/index.mjs +1 -1
  31. package/dist/components/CRM/index.mjs +1 -1
  32. package/dist/components/Cards/ContentCard.mjs +1 -1
  33. package/dist/components/Cards/FeatureCard.mjs +1 -1
  34. package/dist/components/Cards/index.mjs +1 -1
  35. package/dist/components/Chat/ChatInterface.mjs +1 -1
  36. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  37. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  38. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  39. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  40. package/dist/components/Chat/demo-tests.mjs +1 -1
  41. package/dist/components/Chat/demo.mjs +1 -1
  42. package/dist/components/Chat/example-usage.mjs +1 -1
  43. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  44. package/dist/components/Chat/index.mjs +1 -1
  45. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  46. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +6 -1
  47. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  48. package/dist/components/DigitalColleagues/Views/index.js +6 -1
  49. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  50. package/dist/components/DigitalColleagues/index.js +6 -1
  51. package/dist/components/DigitalColleagues/index.mjs +1 -1
  52. package/dist/components/Foundary/MainPage.mjs +1 -1
  53. package/dist/components/Foundary/Pages/dashboardpage.js +6 -1
  54. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  55. package/dist/components/Foundary/RichText/index.js +1 -1
  56. package/dist/components/Foundary/RichText/index.mjs +1 -1
  57. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  58. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  59. package/dist/components/Foundary/Views/KnowledgeView.js +1 -1
  60. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  61. package/dist/components/Foundary/Views/index.js +6 -1
  62. package/dist/components/Foundary/Views/index.mjs +1 -1
  63. package/dist/components/Foundary/document-edit.js +1 -1
  64. package/dist/components/Foundary/document-edit.mjs +1 -1
  65. package/dist/components/Foundary/document-preview-examples.js +3 -3
  66. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  67. package/dist/components/Foundary/document-preview.js +1 -1
  68. package/dist/components/Foundary/document-preview.mjs +1 -1
  69. package/dist/components/Foundary/file-edit.css +1 -0
  70. package/dist/components/Foundary/file-edit.d.ts +9 -0
  71. package/dist/components/Foundary/file-edit.js +9 -0
  72. package/dist/components/Foundary/file-edit.mjs +2 -0
  73. package/dist/components/Foundary/index.js +6 -1
  74. package/dist/components/Foundary/index.mjs +1 -1
  75. package/dist/components/Foundary/knowledge-browser.js +1 -1
  76. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  77. package/dist/components/Foundary/test-data.js +1 -1
  78. package/dist/components/Foundary/test-data.mjs +1 -1
  79. package/dist/components/Foundary/types.d.ts +42 -0
  80. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  81. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  82. package/dist/components/HeaderFooter/index.mjs +1 -1
  83. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  84. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  85. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  86. package/dist/components/Heros/RenderHero.mjs +1 -1
  87. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  88. package/dist/components/Heros/index.mjs +1 -1
  89. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  90. package/dist/components/Layouts/Print.mjs +1 -1
  91. package/dist/components/Layouts/SlideShow.mjs +1 -1
  92. package/dist/components/Layouts/index.mjs +1 -1
  93. package/dist/components/Menus/index.mjs +1 -1
  94. package/dist/components/Other/index.mjs +1 -1
  95. package/dist/components/Payload/RichText/index.mjs +1 -1
  96. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  97. package/dist/components/Payload/index.mjs +1 -1
  98. package/dist/components/Projects/FileView.d.ts +2 -1
  99. package/dist/components/Projects/FileView.js +6 -1
  100. package/dist/components/Projects/FileView.mjs +1 -1
  101. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  102. package/dist/components/Projects/ProjectPage.js +6 -1
  103. package/dist/components/Projects/ProjectPage.mjs +1 -1
  104. package/dist/components/Projects/ProjectView.js +6 -1
  105. package/dist/components/Projects/ProjectView.mjs +1 -1
  106. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  107. package/dist/components/Projects/file-list.d.ts +2 -2
  108. package/dist/components/Projects/file-list.js +6 -1
  109. package/dist/components/Projects/file-list.mjs +1 -1
  110. package/dist/components/Projects/index.mjs +1 -1
  111. package/dist/components/dc-temp/index.js +6 -1
  112. package/dist/components/dc-temp/index.mjs +1 -1
  113. package/dist/components/index.js +25 -20
  114. package/dist/components/index.mjs +1 -1
  115. package/dist/index.js +35 -30
  116. package/dist/index.mjs +1 -1
  117. package/dist/metafile-cjs.json +1 -1
  118. package/dist/metafile-esm.json +1 -1
  119. package/dist/pages/Blog.mjs +1 -1
  120. package/dist/pages/Documentation.mjs +1 -1
  121. package/dist/pages/IndexPage.mjs +1 -1
  122. package/dist/pages/Intranet.mjs +1 -1
  123. package/dist/pages/LandingPage.mjs +1 -1
  124. package/dist/pages/Page.mjs +1 -1
  125. package/dist/pages/Publish.mjs +1 -1
  126. package/dist/pages/Website.mjs +1 -1
  127. package/dist/sections/AboutSection.mjs +1 -1
  128. package/dist/sections/BlogDetail.mjs +1 -1
  129. package/dist/sections/BlogList.mjs +1 -1
  130. package/dist/sections/BlogListSection.mjs +1 -1
  131. package/dist/sections/ContactSection.mjs +1 -1
  132. package/dist/sections/PageSections.mjs +1 -1
  133. package/dist/sections/PricingSection.mjs +1 -1
  134. package/dist/sections/ServiceDetail.mjs +1 -1
  135. package/dist/sections/ServiceDetailSection.mjs +1 -1
  136. package/dist/sections/ServiceSection.mjs +1 -1
  137. package/dist/sections/index.mjs +1 -1
  138. package/package.json +1 -1
  139. package/dist/chunk-JXQRVEQB.mjs +0 -4
  140. package/dist/chunk-NAGBKKTZ.mjs +0 -4
  141. package/dist/chunk-PZFYJ5FS.mjs +0 -4
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as $}from"./chunk-XJKRA2AE.mjs";import{a as O}from"./chunk-FT3AE7L2.mjs";import{a as H}from"./chunk-L5JPAKPM.mjs";import{motion as v}from"motion/react";import{ChevronRight as A,File as M,FileText as K,Search as Q}from"lucide-react";import{useState as N,useMemo as P,useEffect as T}from"react";import{Fragment as E,jsx as e,jsxs as r}from"react/jsx-runtime";function j({label:x,documents:a,children:l,level:p,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y=!0}){let[c,i]=N(p===0),D=l&&Object.keys(l).length>0,u=a.length+(l?Object.values(l).reduce((t,n)=>t+n.documents.length,0):0),b=t=>{switch(t){case"markdown":case"mdx":return e(K,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"})}},g=t=>{let n=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return n[t%n.length]};return r("div",{className:"space-y-1",children:[(D||a.length>0)&&r(v.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${c?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${p*20}px`},onClick:()=>i(!c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:`w-1 h-6 rounded-full ${g(p)}`}),e(v.div,{animate:{rotate:c?90:0},transition:{duration:.2},className:"flex-shrink-0",children:e(A,{className:"h-4 w-4 text-muted-foreground"})}),r("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center gap-2 min-w-0",children:e("span",{className:"font-medium text-foreground truncate",children:x})}),y&&u>0&&e("div",{className:"flex-shrink-0 ml-2",children:e("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:u})})]})]}),e(v.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:r("div",{className:"pt-2 space-y-1",children:[a.map((t,n)=>r(v.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:n*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${f===t.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${p*20+20}px`},onClick:()=>w?.(t),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:"flex-shrink-0",children:b(t.format)}),r("div",{className:"flex-1 min-w-0",children:[e("p",{className:`text-sm truncate transition-colors ${f===t.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:t.title}),t.description&&e("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t.description})]}),t.tags&&t.tags.length>0&&e("div",{className:"flex-shrink-0",children:e("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:t.tags[0]})})]},t.id)),l&&Object.entries(l).map(([t,n])=>e(j,{label:t,documents:n.documents,children:n.children,level:p+1,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y},t))]})})]})}function Z({documents:x,menuConfig:a,onDocumentClick:l,onDocumentShare:p,onDocumentUpdate:w,selectedDocumentId:f,className:y,editable:c=!0}){let[i,D]=N(""),[u,b]=N(null),[g,t]=N(x);T(()=>{t(x)},[x]),T(()=>{if(u?.id){let o=g.find(s=>s.id===u.id);o&&b(o)}},[g]);let n=P(()=>i?g.filter(o=>o.title.toLowerCase().includes(i.toLowerCase())||o.description?.toLowerCase().includes(i.toLowerCase())||o.tags?.some(s=>s.toLowerCase().includes(i.toLowerCase()))||Object.values(o.metadata||{}).some(s=>String(s).toLowerCase().includes(i.toLowerCase()))):g,[g,i]),S=P(()=>{let o=(s,L)=>{if(L.length===0)return{};let[F,...B]=L;return s.reduce((d,C)=>{let U=C.metadata?.[F]||"Uncategorized",m=String(U);if(d[m]||(d[m]={documents:[],children:{}}),B.length===0)d[m].documents.push(C);else{let k=o([C],B),h=Object.keys(k)[0];h&&(d[m].children||(d[m].children={}),d[m].children[h]?d[m].children[h].documents.push(...k[h].documents):d[m].children[h]=k[h])}return d},{})};return o(n,a.groupBy)},[n,a.groupBy]),I=o=>{b(o),l?.(o)};return r("div",{className:`flex h-full ${y||""}`,children:[r("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[e("div",{className:"p-6 border-b border-border",children:r("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e(Q,{className:"h-4 w-4 text-muted-foreground"})}),e(H,{placeholder:"Search knowledge base...",value:i,onChange:o=>D(o.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),e(O,{className:"h-[calc(100%-100px)]",children:e("div",{className:"p-4 space-y-3",children:a.groupBy.length===0?e(E,{children:e(j,{label:"Document",documents:n,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},"Document")}):r(E,{children:[Object.entries(S).map(([o,s])=>e(j,{label:o,documents:s.documents,children:s.children,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},o)),Object.keys(S).length===0&&r(v.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("p",{className:"text-sm font-medium",children:"No documents found"}),e("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})})]}),e("div",{className:"flex-1 bg-background overflow-scroll",children:u?e($,{document:u,onDocumentUpdate:w,editable:c}):e("div",{className:"h-full flex items-center justify-center text-center",children:r(v.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[e("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:e(K,{className:"h-10 w-10 text-primary"})}),e("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),e("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}export{Z as a};
4
+ import{a as $}from"./chunk-CMU5JFUC.mjs";import{a as O}from"./chunk-FT3AE7L2.mjs";import{a as H}from"./chunk-L5JPAKPM.mjs";import{motion as v}from"motion/react";import{ChevronRight as A,File as M,FileText as K,Search as Q}from"lucide-react";import{useState as N,useMemo as P,useEffect as T}from"react";import{Fragment as E,jsx as e,jsxs as r}from"react/jsx-runtime";function j({label:x,documents:a,children:l,level:p,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y=!0}){let[c,i]=N(p===0),D=l&&Object.keys(l).length>0,u=a.length+(l?Object.values(l).reduce((t,n)=>t+n.documents.length,0):0),b=t=>{switch(t){case"markdown":case"mdx":return e(K,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"})}},g=t=>{let n=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return n[t%n.length]};return r("div",{className:"space-y-1",children:[(D||a.length>0)&&r(v.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${c?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${p*20}px`},onClick:()=>i(!c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:`w-1 h-6 rounded-full ${g(p)}`}),e(v.div,{animate:{rotate:c?90:0},transition:{duration:.2},className:"flex-shrink-0",children:e(A,{className:"h-4 w-4 text-muted-foreground"})}),r("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center gap-2 min-w-0",children:e("span",{className:"font-medium text-foreground truncate",children:x})}),y&&u>0&&e("div",{className:"flex-shrink-0 ml-2",children:e("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:u})})]})]}),e(v.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:r("div",{className:"pt-2 space-y-1",children:[a.map((t,n)=>r(v.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:n*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${f===t.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${p*20+20}px`},onClick:()=>w?.(t),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:"flex-shrink-0",children:b(t.format)}),r("div",{className:"flex-1 min-w-0",children:[e("p",{className:`text-sm truncate transition-colors ${f===t.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:t.title}),t.description&&e("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t.description})]}),t.tags&&t.tags.length>0&&e("div",{className:"flex-shrink-0",children:e("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:t.tags[0]})})]},t.id)),l&&Object.entries(l).map(([t,n])=>e(j,{label:t,documents:n.documents,children:n.children,level:p+1,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y},t))]})})]})}function Z({documents:x,menuConfig:a,onDocumentClick:l,onDocumentShare:p,onDocumentUpdate:w,selectedDocumentId:f,className:y,editable:c=!0}){let[i,D]=N(""),[u,b]=N(null),[g,t]=N(x);T(()=>{t(x)},[x]),T(()=>{if(u?.id){let o=g.find(s=>s.id===u.id);o&&b(o)}},[g]);let n=P(()=>i?g.filter(o=>o.title.toLowerCase().includes(i.toLowerCase())||o.description?.toLowerCase().includes(i.toLowerCase())||o.tags?.some(s=>s.toLowerCase().includes(i.toLowerCase()))||Object.values(o.metadata||{}).some(s=>String(s).toLowerCase().includes(i.toLowerCase()))):g,[g,i]),S=P(()=>{let o=(s,L)=>{if(L.length===0)return{};let[F,...B]=L;return s.reduce((d,C)=>{let U=C.metadata?.[F]||"Uncategorized",m=String(U);if(d[m]||(d[m]={documents:[],children:{}}),B.length===0)d[m].documents.push(C);else{let k=o([C],B),h=Object.keys(k)[0];h&&(d[m].children||(d[m].children={}),d[m].children[h]?d[m].children[h].documents.push(...k[h].documents):d[m].children[h]=k[h])}return d},{})};return o(n,a.groupBy)},[n,a.groupBy]),I=o=>{b(o),l?.(o)};return r("div",{className:`flex h-full ${y||""}`,children:[r("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[e("div",{className:"p-6 border-b border-border",children:r("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e(Q,{className:"h-4 w-4 text-muted-foreground"})}),e(H,{placeholder:"Search knowledge base...",value:i,onChange:o=>D(o.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),e(O,{className:"h-[calc(100%-100px)]",children:e("div",{className:"p-4 space-y-3",children:a.groupBy.length===0?e(E,{children:e(j,{label:"Document",documents:n,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},"Document")}):r(E,{children:[Object.entries(S).map(([o,s])=>e(j,{label:o,documents:s.documents,children:s.children,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},o)),Object.keys(S).length===0&&r(v.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("p",{className:"text-sm font-medium",children:"No documents found"}),e("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})})]}),e("div",{className:"flex-1 bg-background overflow-scroll",children:u?e($,{document:u,onDocumentUpdate:w,editable:c}):e("div",{className:"h-full flex items-center justify-center text-center",children:r(v.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[e("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:e(K,{className:"h-10 w-10 text-primary"})}),e("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),e("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}export{Z as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as Q}from"./chunk-QOZ2O3FG.mjs";import{a as z}from"./chunk-L5NPH5RX.mjs";import{a as L}from"./chunk-2R3MJSQ7.mjs";import{a as J}from"./chunk-6PS55VJZ.mjs";import{a as q}from"./chunk-L3V5YDPH.mjs";import{a as W}from"./chunk-QC2UWZWL.mjs";import{a as H}from"./chunk-NAGBKKTZ.mjs";import{a as K}from"./chunk-EOR2BAI2.mjs";import{a as O}from"./chunk-UVHMI3PU.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Je}from"next/navigation";import{jsx as a,jsxs as Qe}from"react/jsx-runtime";function Le({title:Xe="",initialTasks:f=[],initialEpics:h=[],initialSprints:A=[],initialProjects:D=[],initialReminders:v=[],initialColleagues:S=[],initialUsers:E=[],initialFiles:w=[],initialView:C="kanban",onAddTask:X,onUpdateTask:Y,onDeleteTask:Z,onTaskClick:Ye,onAddEpic:_,onUpdateEpic:$,onDeleteEpic:ee,onAddTaskToEpic:Ze,onAddSprint:te,onUpdateSprint:ne,onDeleteSprint:ie,onAddProject:se,onUpdateProject:ae,onDeleteProject:oe,onFileAdd:de,onFileEdit:re,onFileDelete:le,onFileClick:ce,onAddReminder:pe,onUpdateReminder:me,onDeleteReminder:ke,onViewChange:Te,onToggleMobileMenu:ue,onTeamClick:_e,onTeamChange:$e,onCopilotClick:et,handleAddComment:ge}){let[c,d]=s(f),[l,p]=s(h),[m,k]=s(A),[fe,T]=s(D),[he,u]=s(v),[P,Ae]=s(S),[F,De]=s(E),[ve,y]=s(w),[Se,R]=s(!1),[Ee,M]=s(!1),[we,N]=s(null),[Ce,Pe]=s(null),[V,j]=s(null),[r,I]=s(C||"kanban"),[tt,Ue]=s(!1),be=Je();o(()=>{d(f)},[f]),o(()=>{k(A)},[A]),o(()=>{p(h)},[h]),o(()=>{T(D)},[D]),o(()=>{y(w)},[w]),o(()=>{De(E)},[E]),o(()=>{Ae(S)},[S]),o(()=>{u(v)},[v]),o(()=>{I(C)},[C]);let Oe=c.filter(e=>{}),nt=e=>Oe.filter(t=>t.status===e),it=e=>{let t={};return l.forEach(n=>{}),t},st=e=>{j(e)},at=e=>{V&&(d(t=>t.map(n=>n.id===V.id?{...n,status:e}:n)),j(null))},B=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};d(n=>[...n,t]),X?.(t)},g=async(e,t)=>(d(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),await Y?.(e,t)),ot=async(e,t)=>{g(e,t)},x=e=>{d(t=>t.filter(n=>n.id!==Number(e))),we?.id===Number(e)&&N(null),Z?.(e)},dt=async e=>{x(e)},rt=e=>{let t={...e,id:Date.now()};T(n=>[...n,t]),se?.(e)},lt=(e,t)=>{T(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ae?.(e,t)},ct=e=>{T(t=>t.filter(n=>n.id!==Number(e))),oe?.(e)},G=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(n=>[...n,t]),_?.({...t})},Fe=()=>{M(!0)},ye=(e,t)=>{p(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),$?.(e,t)},Re=e=>{p(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.filter(n=>O(n.epic)!==Number(e))),ee?.(e)},Me=e=>{let t={...e,id:Date.now()};k(n=>[...n,t]),te?.(e)},Ne=(e,t)=>{k(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ne?.(e,t)},Ve=e=>{e==="backlog"||e==="all-tasks"||(k(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.map(n=>O(n.sprint)===Number(e)?{...n,sprint:void 0}:n)),ie?.(e))},U=e=>{N(e)},je=e=>{e==="planning"&&window.innerWidth<768||(I(e),Te?.(e))},pt=()=>{Ue(e=>!e),ue?.()},mt=()=>{be.push("/")},kt=e=>{console.log("Switching to team:",e)},Tt=e=>{console.log("Switching to team:",e)},Ie=e=>{R(!0)},Be=()=>{R(!1),Pe(null)},xe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString()};u(n=>[...n,t]),pe?.(e)},Ge=(e,t)=>{u(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),me?.(e,t)},He=e=>{u(t=>t.filter(n=>n.id!==Number(e))),ke?.(e)},Ke=()=>{de?.()},We=e=>{re?.(e)},qe=e=>{y(t=>t.filter(n=>n.name!==e)),le?.(e)},ze=e=>{ce?.(e)},ut=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],gt=()=>{switch(r){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},b=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ft=b.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=b.length>3,At=b.slice(3);return Qe(K,{currentView:r,onViewChange:je,children:[r==="kanban"&&a("div",{className:"h-full overflow-hidden",children:a(z,{initialProjects:fe,initialEpics:l,initialSprints:m.map(e=>({...e,isSelected:!1})),initialTasks:c,initialColleagues:P,initialUsers:F,onAddTask:B,onUpdateTask:g,onDeleteTask:x,onTaskClick:U,onAddEpic:G,onAddComment:ge})}),r==="planning"&&a("div",{className:"hidden md:block h-full",children:a(L,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddSprint:Me,onUpdateSprint:Ne,onDeleteSprint:Ve})}),r==="tasks"&&a("div",{className:"h-full",children:a(Q,{initialReminders:he,initialColleagues:P,onAddReminder:xe,onUpdateReminder:Ge,onDeleteReminder:He})}),r==="files"&&a("div",{className:"h-full",children:a(H,{initialFiles:ve,onFileAdd:Ke,onFileEdit:We,onFileDelete:qe,onFileClick:ze,compactView:!1})}),r==="epics"&&a("div",{className:"h-full",children:a(J,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddTaskToEpic:Ie,onAddEpic:Fe,onUpdateEpic:ye,onDeleteEpic:Re})}),a(W,{isOpen:Se,onClose:Be,onAddTask:B,epics:l,sprints:m,assignees:[...P,...F],defaultEpicId:Ce||void 0}),a(q,{isOpen:Ee,onClose:()=>M(!1),onAddEpic:G})]})}export{Le as a};
4
+ import{a as Q}from"./chunk-QOZ2O3FG.mjs";import{a as J}from"./chunk-6PS55VJZ.mjs";import{a as H}from"./chunk-GCIEF545.mjs";import{a as z}from"./chunk-RQLUMNJE.mjs";import{a as L}from"./chunk-2R3MJSQ7.mjs";import{a as q}from"./chunk-L3V5YDPH.mjs";import{a as W}from"./chunk-QC2UWZWL.mjs";import{a as K}from"./chunk-EOR2BAI2.mjs";import{a as O}from"./chunk-UVHMI3PU.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Je}from"next/navigation";import{jsx as a,jsxs as Qe}from"react/jsx-runtime";function Le({title:Xe="",initialTasks:f=[],initialEpics:h=[],initialSprints:A=[],initialProjects:D=[],initialReminders:v=[],initialColleagues:S=[],initialUsers:E=[],initialFiles:w=[],initialView:C="kanban",onAddTask:X,onUpdateTask:Y,onDeleteTask:Z,onTaskClick:Ye,onAddEpic:_,onUpdateEpic:$,onDeleteEpic:ee,onAddTaskToEpic:Ze,onAddSprint:te,onUpdateSprint:ne,onDeleteSprint:ie,onAddProject:se,onUpdateProject:ae,onDeleteProject:oe,onFileAdd:de,onFileEdit:re,onFileDelete:le,onFileClick:ce,onAddReminder:pe,onUpdateReminder:me,onDeleteReminder:ke,onViewChange:Te,onToggleMobileMenu:ue,onTeamClick:_e,onTeamChange:$e,onCopilotClick:et,handleAddComment:ge}){let[c,d]=s(f),[l,p]=s(h),[m,k]=s(A),[fe,T]=s(D),[he,u]=s(v),[P,Ae]=s(S),[F,De]=s(E),[ve,y]=s(w),[Se,R]=s(!1),[Ee,M]=s(!1),[we,N]=s(null),[Ce,Pe]=s(null),[V,j]=s(null),[r,I]=s(C||"kanban"),[tt,Ue]=s(!1),be=Je();o(()=>{d(f)},[f]),o(()=>{k(A)},[A]),o(()=>{p(h)},[h]),o(()=>{T(D)},[D]),o(()=>{y(w)},[w]),o(()=>{De(E)},[E]),o(()=>{Ae(S)},[S]),o(()=>{u(v)},[v]),o(()=>{I(C)},[C]);let Oe=c.filter(e=>{}),nt=e=>Oe.filter(t=>t.status===e),it=e=>{let t={};return l.forEach(n=>{}),t},st=e=>{j(e)},at=e=>{V&&(d(t=>t.map(n=>n.id===V.id?{...n,status:e}:n)),j(null))},B=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};d(n=>[...n,t]),X?.(t)},g=async(e,t)=>(d(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),await Y?.(e,t)),ot=async(e,t)=>{g(e,t)},x=e=>{d(t=>t.filter(n=>n.id!==Number(e))),we?.id===Number(e)&&N(null),Z?.(e)},dt=async e=>{x(e)},rt=e=>{let t={...e,id:Date.now()};T(n=>[...n,t]),se?.(e)},lt=(e,t)=>{T(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ae?.(e,t)},ct=e=>{T(t=>t.filter(n=>n.id!==Number(e))),oe?.(e)},G=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(n=>[...n,t]),_?.({...t})},Fe=()=>{M(!0)},ye=(e,t)=>{p(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),$?.(e,t)},Re=e=>{p(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.filter(n=>O(n.epic)!==Number(e))),ee?.(e)},Me=e=>{let t={...e,id:Date.now()};k(n=>[...n,t]),te?.(e)},Ne=(e,t)=>{k(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ne?.(e,t)},Ve=e=>{e==="backlog"||e==="all-tasks"||(k(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.map(n=>O(n.sprint)===Number(e)?{...n,sprint:void 0}:n)),ie?.(e))},U=e=>{N(e)},je=e=>{e==="planning"&&window.innerWidth<768||(I(e),Te?.(e))},pt=()=>{Ue(e=>!e),ue?.()},mt=()=>{be.push("/")},kt=e=>{console.log("Switching to team:",e)},Tt=e=>{console.log("Switching to team:",e)},Ie=e=>{R(!0)},Be=()=>{R(!1),Pe(null)},xe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString()};u(n=>[...n,t]),pe?.(e)},Ge=(e,t)=>{u(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),me?.(e,t)},He=e=>{u(t=>t.filter(n=>n.id!==Number(e))),ke?.(e)},Ke=()=>{de?.()},We=e=>{re?.(e)},qe=e=>{y(t=>t.filter(n=>n.name!==e)),le?.(e)},ze=e=>{ce?.(e)},ut=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],gt=()=>{switch(r){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},b=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ft=b.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=b.length>3,At=b.slice(3);return Qe(K,{currentView:r,onViewChange:je,children:[r==="kanban"&&a("div",{className:"h-full overflow-hidden",children:a(z,{initialProjects:fe,initialEpics:l,initialSprints:m.map(e=>({...e,isSelected:!1})),initialTasks:c,initialColleagues:P,initialUsers:F,onAddTask:B,onUpdateTask:g,onDeleteTask:x,onTaskClick:U,onAddEpic:G,onAddComment:ge})}),r==="planning"&&a("div",{className:"hidden md:block h-full",children:a(L,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddSprint:Me,onUpdateSprint:Ne,onDeleteSprint:Ve})}),r==="tasks"&&a("div",{className:"h-full",children:a(Q,{initialReminders:he,initialColleagues:P,onAddReminder:xe,onUpdateReminder:Ge,onDeleteReminder:He})}),r==="files"&&a("div",{className:"h-full",children:a(H,{initialFiles:ve,onFileAdd:Ke,onFileEdit:We,onFileDelete:qe,onFileClick:ze,compactView:!1})}),r==="epics"&&a("div",{className:"h-full",children:a(J,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddTaskToEpic:Ie,onAddEpic:Fe,onUpdateEpic:ye,onDeleteEpic:Re})}),a(W,{isOpen:Se,onClose:Be,onAddTask:B,epics:l,sprints:m,assignees:[...P,...F],defaultEpicId:Ce||void 0}),a(q,{isOpen:Ee,onClose:()=>M(!1),onAddEpic:G})]})}export{Le as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as w}from"./chunk-I6XKBCH4.mjs";import{a as x}from"./chunk-WLI2YTOQ.mjs";import{a as f}from"./chunk-GZ7FGBTR.mjs";import{a as c,b as p,i as u,j as m}from"./chunk-OCPX4QPC.mjs";import{b as g}from"./chunk-ZUA4KNIR.mjs";import{useEffect as S,useState as l}from"react";import{ChevronDown as j,Loader2 as P}from"lucide-react";import{Fragment as B,jsx as e,jsxs as t}from"react/jsx-runtime";function U({documents:v=[],contexts:o=[],onDocumentClick:C=n=>console.log("Document clicked:",n),onDocumentShare:D=n=>console.log("Share document:",n),onLoadDocumentContent:L,selectedDocumentId:K,onAddKnowledge:s,onDocumentUpdate:b,onAddTeamContext:h,onUpdateTeamContext:N,onDeleteTeamContext:y}){let[n,i]=l(o[0]),[M,r]=l(!1),[A,a]=l(!1),[k,I]=l(!1);S(()=>{if(!n&&o&&o.length>0)i(o[0]);else{let d=o.find(O=>O.id===n?.id);i(d||o[0])}},[o]);let T=d=>{s&&(I(!0),s(d)),r(!1)};return t("div",{className:"flex flex-col h-full",children:[t("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[k&&t("div",{className:"absolute inset-0 bg-background/90 z-[9999] flex flex-col items-center justify-center gap-4",children:[e(P,{className:"h-8 w-8 animate-spin text-primary"}),e("p",{className:"font-semibold text-lg",children:"Initializing document..."})]}),o&&o.length>0&&t("div",{className:"",children:[e("div",{className:"",children:t("nav",{className:"-mb-px flex justify-between items-center",children:[e("div",{className:"flex space-x-8 overflow-x-auto",children:o.map(d=>t("button",{onClick:()=>i(d),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n?.id===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))}),t(c,{children:[e(p,{children:t("div",{className:"inline-flex border border-primary rounded-xl items-center justify-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:["Actions ",e(j,{className:"h-4 w-4"})]})}),t(u,{children:[e(m,{onClick:()=>r(!0),children:"Add Knowledge"}),e(m,{onClick:()=>a(!0),children:"Manage Contexts"})]})]})]})}),n?.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-primary",children:n?.description})})]})]}),n?e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-xl border overflow-hidden",children:e(f,{documents:v,menuConfig:n?.menuConfig,onDocumentClick:C,onDocumentShare:D,selectedDocumentId:K,onDocumentUpdate:b})})}):t("div",{children:[e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e("p",{className:"text-muted-foreground",children:"No contexts available"})}),e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e(g,{onClick:()=>a(!0),children:"Add Context"})})]}),t(B,{children:[e(x,{isOpen:A,onClose:()=>a(!1),knowledgeSources:o,onCreate:h,onUpdate:N,onDelete:y}),e(w,{isOpen:M,onClose:()=>r(!1),onAddKnowledge:T,knowledgeContexts:o})]})]})}export{U as a};
4
+ import{a as w}from"./chunk-I6XKBCH4.mjs";import{a as x}from"./chunk-WLI2YTOQ.mjs";import{a as f}from"./chunk-5EM6P7SU.mjs";import{a as c,b as p,i as u,j as m}from"./chunk-OCPX4QPC.mjs";import{b as g}from"./chunk-ZUA4KNIR.mjs";import{useEffect as S,useState as l}from"react";import{ChevronDown as j,Loader2 as P}from"lucide-react";import{Fragment as B,jsx as e,jsxs as t}from"react/jsx-runtime";function U({documents:v=[],contexts:o=[],onDocumentClick:C=n=>console.log("Document clicked:",n),onDocumentShare:D=n=>console.log("Share document:",n),onLoadDocumentContent:L,selectedDocumentId:K,onAddKnowledge:s,onDocumentUpdate:b,onAddTeamContext:h,onUpdateTeamContext:N,onDeleteTeamContext:y}){let[n,i]=l(o[0]),[M,r]=l(!1),[A,a]=l(!1),[k,I]=l(!1);S(()=>{if(!n&&o&&o.length>0)i(o[0]);else{let d=o.find(O=>O.id===n?.id);i(d||o[0])}},[o]);let T=d=>{s&&(I(!0),s(d)),r(!1)};return t("div",{className:"flex flex-col h-full",children:[t("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[k&&t("div",{className:"absolute inset-0 bg-background/90 z-[9999] flex flex-col items-center justify-center gap-4",children:[e(P,{className:"h-8 w-8 animate-spin text-primary"}),e("p",{className:"font-semibold text-lg",children:"Initializing document..."})]}),o&&o.length>0&&t("div",{className:"",children:[e("div",{className:"",children:t("nav",{className:"-mb-px flex justify-between items-center",children:[e("div",{className:"flex space-x-8 overflow-x-auto",children:o.map(d=>t("button",{onClick:()=>i(d),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n?.id===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))}),t(c,{children:[e(p,{children:t("div",{className:"inline-flex border border-primary rounded-xl items-center justify-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:["Actions ",e(j,{className:"h-4 w-4"})]})}),t(u,{children:[e(m,{onClick:()=>r(!0),children:"Add Knowledge"}),e(m,{onClick:()=>a(!0),children:"Manage Contexts"})]})]})]})}),n?.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-primary",children:n?.description})})]})]}),n?e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-xl border overflow-hidden",children:e(f,{documents:v,menuConfig:n?.menuConfig,onDocumentClick:C,onDocumentShare:D,selectedDocumentId:K,onDocumentUpdate:b})})}):t("div",{children:[e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e("p",{className:"text-muted-foreground",children:"No contexts available"})}),e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e(g,{onClick:()=>a(!0),children:"Add Context"})})]}),t(B,{children:[e(x,{isOpen:A,onClose:()=>a(!1),knowledgeSources:o,onCreate:h,onUpdate:N,onDelete:y}),e(w,{isOpen:M,onClose:()=>r(!1),onAddKnowledge:T,knowledgeContexts:o})]})]})}export{U as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as C}from"./chunk-JTMIQ7MK.mjs";import{a as D}from"./chunk-PZFYJ5FS.mjs";import{a as w,c as y,e as k}from"./chunk-3UMMMQEH.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import{a as N}from"./chunk-MDJREBVI.mjs";import{motion as R}from"motion/react";import{File as T,FileText as K,Edit3 as A,Type as G,ChevronDown as L,ChevronRight as Z,Info as P,Loader2 as H}from"lucide-react";import{startTransition as M,useEffect as Q,useMemo as V,useRef as W,useState as c}from"react";import*as E from"@radix-ui/react-dialog";import Y from"react-markdown";import _ from"remark-gfm";import{Fragment as ae,jsx as e,jsxs as o}from"react/jsx-runtime";var S=s=>e(Y,{remarkPlugins:[_],components:{h1:({children:t})=>e("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>e("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>e("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>e("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>e("ol",{className:"list-decimal",children:t}),ul:({children:t})=>e("ul",{className:"list-disc",children:t}),li:({children:t})=>e("li",{className:"ml-4",children:t}),p:({children:t})=>e("p",{className:"mb-4",children:t}),a:({children:t,href:i})=>e("a",{href:i,className:"text-blue-500",children:t}),img:({src:t,alt:i})=>e("img",{src:t,alt:i,className:"mb-4"}),blockquote:({children:t})=>e("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4",children:t})},children:s}),O=s=>e("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:s}),ee=s=>e("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:s&&e(D,{value:JSON.stringify(s),editable:!1,name:"richTextContent"},JSON.stringify(s))}),te=s=>o("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:o("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[e("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),S(s)]});function pe({document:s,onDocumentUpdate:t,editable:i=!0,mode:g="view",renderers:j,availableDocuments:I=[],knowledgeContexts:B=[]}){let[$,x]=c(!1),[d,q]=c(!1),[a,m]=c(s),[z,p]=c(!1),u=W(null),b=a.format==="richText"?a.richTextContent:a.content,F=V(()=>`${a.format}:${JSON.stringify(b)}`,[a.format,b]);Q(()=>{m(s)},[s]);let re=r=>{switch(r){case"markdown":case"mdx":return e(K,{className:"h-6 w-6 text-primary"});case"richText":return e(T,{className:"h-6 w-6 text-success"});case"text":return e(G,{className:"h-6 w-6 text-muted-foreground"});default:return e(T,{className:"h-6 w-6 text-muted-foreground"})}},J=r=>{switch(r){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},X=(r,n)=>{let l={markdown:S,mdx:te,text:O},h=j?.[n]||l[n];if(n==="richText"&&typeof r=="object")return ee(r);if(h&&typeof r=="string")return h(r);if(typeof r=="string")return O(r)},U=async(r,n="save")=>{n==="save"&&p(!0),u.current=a,M(()=>{m({...r,richTextContent:r.richTextContent?structuredClone(r.richTextContent):void 0})});try{let l=await t?.(r);if(n==="save"&&p(!1),!l)throw new Error("save failed")}catch{u.current&&M(()=>m(u.current))}},v=()=>{x(!1)};return o(ae,{children:[e(w,{open:$||g==="create",onOpenChange:r=>!r&&v(),children:o(y,{children:[e(k,{}),o(E.Content,{className:N("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[z&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center",children:e(H,{className:"h-8 w-8 animate-spin text-primary"})}),e(C,{mode:g==="create"?"create":"edit",document:a,onSave:U,onCancel:v,availableDocuments:I,knowledgeContexts:B})]})]})}),o(R.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[o("div",{className:"border-b border-border bg-card p-8 pb-6",children:[o("div",{className:"flex items-start justify-between gap-4",children:[e("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:o("div",{className:"flex-1 min-w-0",children:[o("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[a.title,e("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${J(a.format)}`,children:a.format.toUpperCase()})]}),a.description&&e("p",{className:"text-muted-foreground text-lg leading-relaxed",children:a.description})]})}),o("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[a.metadata&&Object.keys(a.metadata).length>0&&o(f,{variant:"ghost",size:"sm",onClick:()=>q(!d),className:"gap-2",children:[e(P,{className:"h-4 w-4"}),"Metadata",d?e(L,{className:"h-4 w-4"}):e(Z,{className:"h-4 w-4"})]}),i&&o(f,{variant:"outline",size:"sm",onClick:()=>x(!0),className:"gap-2",children:[e(A,{className:"h-4 w-4"}),"Edit"]})]})]}),a.metadata&&Object.keys(a.metadata).length>0&&e(R.div,{initial:!1,animate:{height:d?"auto":0,opacity:d?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:o("div",{className:"pt-4 border-t border-border mt-4",children:[o("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[e(P,{className:"h-4 w-4"}),"Document Metadata"]}),e("div",{className:"bg-muted rounded-lg p-4 border border-border",children:e("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(a.metadata).map(([r,n])=>o("div",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:r.replace(/([A-Z])/g," $1").trim()}),e("span",{className:"text-foreground font-medium",children:String(n)})]},r))})})]})})]}),e("div",{className:"flex-1 ",children:e("div",{className:"py-4 h-full",children:e("div",{className:"space-y-4",children:a.content||a.richTextContent?e("div",{className:"relative",children:e("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:X(a.format==="richText"?a.richTextContent:a.content,a.format)})},F):o("div",{className:"text-center p-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),e("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}export{pe as a};
4
+ import{a as C}from"./chunk-NXAQ6ESJ.mjs";import{a as D}from"./chunk-VTFO5GXK.mjs";import{a as w,c as y,e as k}from"./chunk-3UMMMQEH.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import{a as N}from"./chunk-MDJREBVI.mjs";import{motion as R}from"motion/react";import{File as T,FileText as K,Edit3 as A,Type as G,ChevronDown as L,ChevronRight as Z,Info as P,Loader2 as H}from"lucide-react";import{startTransition as M,useEffect as Q,useMemo as V,useRef as W,useState as c}from"react";import*as E from"@radix-ui/react-dialog";import Y from"react-markdown";import _ from"remark-gfm";import{Fragment as ae,jsx as e,jsxs as o}from"react/jsx-runtime";var S=s=>e(Y,{remarkPlugins:[_],components:{h1:({children:t})=>e("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>e("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>e("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>e("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>e("ol",{className:"list-decimal",children:t}),ul:({children:t})=>e("ul",{className:"list-disc",children:t}),li:({children:t})=>e("li",{className:"ml-4",children:t}),p:({children:t})=>e("p",{className:"mb-4",children:t}),a:({children:t,href:i})=>e("a",{href:i,className:"text-blue-500",children:t}),img:({src:t,alt:i})=>e("img",{src:t,alt:i,className:"mb-4"}),blockquote:({children:t})=>e("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4",children:t})},children:s}),O=s=>e("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:s}),ee=s=>e("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:s&&e(D,{value:JSON.stringify(s),editable:!1,name:"richTextContent"},JSON.stringify(s))}),te=s=>o("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:o("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[e("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),S(s)]});function pe({document:s,onDocumentUpdate:t,editable:i=!0,mode:g="view",renderers:j,availableDocuments:I=[],knowledgeContexts:B=[]}){let[$,x]=c(!1),[d,q]=c(!1),[a,m]=c(s),[z,p]=c(!1),u=W(null),b=a.format==="richText"?a.richTextContent:a.content,F=V(()=>`${a.format}:${JSON.stringify(b)}`,[a.format,b]);Q(()=>{m(s)},[s]);let re=r=>{switch(r){case"markdown":case"mdx":return e(K,{className:"h-6 w-6 text-primary"});case"richText":return e(T,{className:"h-6 w-6 text-success"});case"text":return e(G,{className:"h-6 w-6 text-muted-foreground"});default:return e(T,{className:"h-6 w-6 text-muted-foreground"})}},J=r=>{switch(r){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},X=(r,n)=>{let l={markdown:S,mdx:te,text:O},h=j?.[n]||l[n];if(n==="richText"&&typeof r=="object")return ee(r);if(h&&typeof r=="string")return h(r);if(typeof r=="string")return O(r)},U=async(r,n="save")=>{n==="save"&&p(!0),u.current=a,M(()=>{m({...r,richTextContent:r.richTextContent?structuredClone(r.richTextContent):void 0})});try{let l=await t?.(r);if(n==="save"&&p(!1),!l)throw new Error("save failed")}catch{u.current&&M(()=>m(u.current))}},v=()=>{x(!1)};return o(ae,{children:[e(w,{open:$||g==="create",onOpenChange:r=>!r&&v(),children:o(y,{children:[e(k,{}),o(E.Content,{className:N("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[z&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center",children:e(H,{className:"h-8 w-8 animate-spin text-primary"})}),e(C,{mode:g==="create"?"create":"edit",document:a,onSave:U,onCancel:v,availableDocuments:I,knowledgeContexts:B})]})]})}),o(R.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[o("div",{className:"border-b border-border bg-card p-8 pb-6",children:[o("div",{className:"flex items-start justify-between gap-4",children:[e("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:o("div",{className:"flex-1 min-w-0",children:[o("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[a.title,e("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${J(a.format)}`,children:a.format.toUpperCase()})]}),a.description&&e("p",{className:"text-muted-foreground text-lg leading-relaxed",children:a.description})]})}),o("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[a.metadata&&Object.keys(a.metadata).length>0&&o(f,{variant:"ghost",size:"sm",onClick:()=>q(!d),className:"gap-2",children:[e(P,{className:"h-4 w-4"}),"Metadata",d?e(L,{className:"h-4 w-4"}):e(Z,{className:"h-4 w-4"})]}),i&&o(f,{variant:"outline",size:"sm",onClick:()=>x(!0),className:"gap-2",children:[e(A,{className:"h-4 w-4"}),"Edit"]})]})]}),a.metadata&&Object.keys(a.metadata).length>0&&e(R.div,{initial:!1,animate:{height:d?"auto":0,opacity:d?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:o("div",{className:"pt-4 border-t border-border mt-4",children:[o("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[e(P,{className:"h-4 w-4"}),"Document Metadata"]}),e("div",{className:"bg-muted rounded-lg p-4 border border-border",children:e("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(a.metadata).map(([r,n])=>o("div",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:r.replace(/([A-Z])/g," $1").trim()}),e("span",{className:"text-foreground font-medium",children:String(n)})]},r))})})]})})]}),e("div",{className:"flex-1 ",children:e("div",{className:"py-4 h-full",children:e("div",{className:"space-y-4",children:a.content||a.richTextContent?e("div",{className:"relative",children:e("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:X(a.format==="richText"?a.richTextContent:a.content,a.format)})},F):o("div",{className:"text-center p-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),e("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}export{pe as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as d}from"./chunk-ICFBQXVC.mjs";import{a as D}from"./chunk-DCOFQFVJ.mjs";import{a as T}from"./chunk-Z22NSJMF.mjs";import{a as x}from"./chunk-FGEFYI5E.mjs";import{a as A}from"./chunk-L5JPAKPM.mjs";import{b as F}from"./chunk-ZUA4KNIR.mjs";import{a as u,e as g}from"./chunk-YO3GQYRJ.mjs";import{useEffect as V,useRef as j,useState as o}from"react";import{Plus as z,Search as G,File as W,Filter as q}from"lucide-react";import{motion as J,AnimatePresence as K}from"motion/react";import{jsx as e,jsxs as i}from"react/jsx-runtime";function Q({initialFiles:n=[],onFileAdd:k,onFileEdit:E,onFileDelete:S,onFileClick:H,onFileUpdate:c,compactView:m=!1,className:$}){let[I,h]=o(n),[s,v]=o(""),[y,O]=o("all"),[r,P]=o("all"),[B,C]=o(!1),b=j(""),M=l=>l.map(t=>`${t.id}-${new Date(t.createdAt).getTime()}-${new Date(t.updatedAt).getTime()}`).join("-");V(()=>{let l=M(n.map(t=>({...t,updatedAt:new Date().toISOString()})));l!==b.current&&(h(n),b.current=l)},[n]);let a=I.filter(l=>l.name.toLowerCase().includes(s.toLowerCase())),N=a.slice(0,10),U=a.filter(Boolean),w=()=>{C(!0)},X=l=>{E?.(l)},p=l=>{console.log("deleting file",l),h(t=>t.filter(R=>R.name!==l.name)),S?.(l.id.toString())},f=l=>{H?.(l)},L=()=>{v(""),O("all")};return i("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(K,{mode:"wait",children:e(J.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:i("div",{className:`space-y-6 ${$||""}`,children:[e(T,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:w},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),e(u,{children:e(g,{className:"pt-6",children:i("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:i("div",{className:"relative",children:[e(G,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(A,{placeholder:"Search files...",value:s,onChange:l=>v(l.target.value),className:"pl-9"})]})}),(s||y!=="all")&&i(F,{variant:"outline",onClick:L,className:"gap-2",children:[e(q,{className:"h-4 w-4"}),"Clear"]})]})})}),i("div",{className:"space-y-4",children:[e(x,{activeTab:r,onTabChange:P,tabOptions:[{value:"all",label:`All Files (${a.length})`},{value:"recent",label:`Recent (${N.length})`}],maxWidth:"500px",gridCols:3}),r==="all"&&e(d,{files:a,onFileClick:f,onFileUpdate:c,onFileDelete:p,showHeader:!m}),r==="recent"&&e(d,{files:N,onFileClick:f,onFileUpdate:c,onFileDelete:p,showHeader:!m}),r==="shared"&&e(d,{files:U,onFileClick:f,onFileUpdate:c,onFileDelete:p,showHeader:!m})]}),a.length===0&&e(u,{children:e(g,{className:"pt-6",children:i("div",{className:"text-center py-8",children:[e(W,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),e("p",{className:"text-muted-foreground mb-4",children:s||y!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),i(F,{onClick:w,className:"gap-2",children:[e(z,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),e(D,{isOpen:B,onClose:()=>C(!1),onAddFile:k})]})}export{Q as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as K}from"./chunk-GAU24H4A.mjs";import{a as ee}from"./chunk-M2REXGQW.mjs";import{a as x}from"./chunk-HB57GPGK.mjs";import{a as O}from"./chunk-KKW3FINI.mjs";import{a as Z}from"./chunk-FSCDCSVK.mjs";import{a as _}from"./chunk-NDZ26EG6.mjs";import{a as X}from"./chunk-Z22NSJMF.mjs";import{a as le}from"./chunk-Y7H3EUBR.mjs";import{a as Y}from"./chunk-FGEFYI5E.mjs";import{a as U,c as $,d as k,g as F,i as p}from"./chunk-YFAZQYK4.mjs";import{a as R}from"./chunk-L5JPAKPM.mjs";import{b as H}from"./chunk-ZUA4KNIR.mjs";import{a as c,b as h,c as w,e as u}from"./chunk-YO3GQYRJ.mjs";import{useEffect as Ce,useState as o}from"react";import{Plus as fe,Search as ve,Users as te,Bot as ye,User as he,Filter as we}from"lucide-react";import{motion as xe,AnimatePresence as Ne}from"motion/react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function Se({initialColleagues:N,onColleagueAdd:S,onColleagueEdit:I,onColleagueDelete:ae,compactView:n=!1,departments:ie=["Design","Engineering","Marketing","Product","Sales","Operations"],className:oe,availableUsers:L=[],existingDigitalColleagues:P=[],availableKnowledgeDocuments:j=[]}){let[s,r]=o(N||[]),[d,B]=o(""),[b,M]=o("all"),[D,G]=o("all"),[v,ne]=o("all"),[W,C]=o(null),[A,y]=o(null);Ce(()=>{r(N||[])},[N]);let se=Array.isArray(L)?L:[],re=Array.isArray(P)?P:[],[m,a]=o("main"),f=s.filter(e=>!e||!e.name?!1:e.name.toLowerCase().includes(d.toLowerCase())||e.type==="human"&&e.email?.toLowerCase().includes(d.toLowerCase())||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(d.toLowerCase())),q=f.filter(e=>e.type==="human"),z=f.filter(e=>e.type==="digital"),J=()=>{a("typeSelection")},T=e=>{e.type==="digital"&&(C(e),a("form")),console.log("Editing colleague:",e),I?.(e)},E=e=>{e.type==="digital"&&(y(e),a("view"))},de=e=>{let i={id:`human-${Date.now()}`,type:"human",name:e.name,email:e.email,updatedAt:e.updatedAt,createdAt:e.createdAt,accounts:e.accounts};r(g=>[...g,i]),S?.(i),a("main")},me=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"}),a("main")},ge=()=>{C(null),a("form")},Q=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}W?(r(i=>i.map(g=>g.id===e.id?{...e,type:"digital"}:g)),I?.({...e,type:"digital"})):(r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"})),a("main"),C(null)},ce=()=>{a("main"),C(null),y(null)},ue=()=>{a("main"),y(null)},be=()=>{A&&(C(A),y(null),a("form"))},V=e=>{console.log("deleting",e,s),ae?.(e,s.find(i=>i.id.toString()===e.toString())?.type),r(i=>i.filter(g=>g.id!==e))},pe=()=>{B(""),M("all"),G("all")};return m==="typeSelection"?l(Z,{onSelectHuman:()=>a("userSelection"),onSelectDigital:()=>a("digitalOptions"),onCancel:()=>a("main")}):m==="userSelection"?l(le,{users:se,onUserSelect:de,onCancel:()=>a("typeSelection")}):m==="digitalOptions"?l(ee,{onCloneExisting:()=>a("digitalClone"),onCreateNew:ge,onCancel:()=>a("typeSelection")}):m==="digitalClone"?l(_,{digitalColleagues:re,onColleagueClone:me,onCancel:()=>a("digitalOptions")}):m==="form"?l(O,{colleague:W||void 0,onSave:Q,onCancel:ce,availableKnowledgeDocuments:j}):m==="view"?l(O,{colleague:A||void 0,onSave:Q,onCancel:ue,readOnly:!0,availableKnowledgeDocuments:j}):l("div",{className:"px-2 md:px-4 py-4 space-y-8",children:l(Ne,{mode:"wait",children:l(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:t("div",{className:`space-y-6 ${oe||""}`,children:[l(X,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:J}}),t("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Total Colleagues"}),l(te,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Human Members"}),l(he,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.filter(e=>e.type==="human").length}),l("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Digital Colleagues"}),l(ye,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.filter(e=>e.type==="digital").length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),l(c,{children:l(u,{className:"pt-6",children:t("div",{className:"flex flex-col md:flex-row gap-4",children:[l("div",{className:"flex-1",children:t("div",{className:"relative",children:[l(ve,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),l(R,{placeholder:"Search colleagues...",value:d,onChange:e=>B(e.target.value),className:"pl-9"})]})}),t(U,{value:b,onValueChange:M,children:[l(k,{className:"w-full md:w-[180px]",children:l($,{placeholder:"Department"})}),t(F,{children:[l(p,{value:"all",children:"All Departments"}),ie.map(e=>l(p,{value:e,children:e},e))]})]}),t(U,{value:D,onValueChange:G,children:[l(k,{className:"w-full md:w-[140px]",children:l($,{placeholder:"Status"})}),t(F,{children:[l(p,{value:"all",children:"All Status"}),l(p,{value:"active",children:"Active"}),l(p,{value:"inactive",children:"Inactive"})]})]}),(d||b!=="all"||D!=="all")&&t(H,{variant:"outline",onClick:pe,className:"gap-2",children:[l(we,{className:"h-4 w-4"}),"Clear"]})]})})}),t("div",{className:"space-y-4",children:[l(Y,{activeTab:v,onTabChange:ne,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${q.length})`},{value:"digital",label:`Digital (${z.length})`}],maxWidth:"400px",gridCols:3}),v==="all"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:f.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n,className:K([e.type==="digital"&&"border-teal-400"])},`${e}-${e.id}`))}),v==="human"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:q.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n},e.id))}),v==="digital"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:z.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n,className:K([e.type==="digital"&&"border-teal-400"])},e.id))})]}),f.length===0&&l(c,{children:l(u,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[l(te,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),l("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),l("p",{className:"text-muted-foreground mb-4",children:d||b!=="all"||D!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),t(H,{onClick:J,className:"gap-2",children:[l(fe,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{Se as a};
4
+ import{a as K}from"./chunk-GAU24H4A.mjs";import{a as _}from"./chunk-NDZ26EG6.mjs";import{a as ee}from"./chunk-M2REXGQW.mjs";import{a as x}from"./chunk-HB57GPGK.mjs";import{a as O}from"./chunk-KKW3FINI.mjs";import{a as Z}from"./chunk-FSCDCSVK.mjs";import{a as X}from"./chunk-Z22NSJMF.mjs";import{a as le}from"./chunk-Y7H3EUBR.mjs";import{a as Y}from"./chunk-FGEFYI5E.mjs";import{a as U,c as $,d as k,g as F,i as p}from"./chunk-YFAZQYK4.mjs";import{a as R}from"./chunk-L5JPAKPM.mjs";import{b as H}from"./chunk-ZUA4KNIR.mjs";import{a as c,b as h,c as w,e as u}from"./chunk-YO3GQYRJ.mjs";import{useEffect as Ce,useState as o}from"react";import{Plus as fe,Search as ve,Users as te,Bot as ye,User as he,Filter as we}from"lucide-react";import{motion as xe,AnimatePresence as Ne}from"motion/react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function Se({initialColleagues:N,onColleagueAdd:S,onColleagueEdit:I,onColleagueDelete:ae,compactView:n=!1,departments:ie=["Design","Engineering","Marketing","Product","Sales","Operations"],className:oe,availableUsers:L=[],existingDigitalColleagues:P=[],availableKnowledgeDocuments:j=[]}){let[s,r]=o(N||[]),[d,B]=o(""),[b,M]=o("all"),[D,G]=o("all"),[v,ne]=o("all"),[W,C]=o(null),[A,y]=o(null);Ce(()=>{r(N||[])},[N]);let se=Array.isArray(L)?L:[],re=Array.isArray(P)?P:[],[m,a]=o("main"),f=s.filter(e=>!e||!e.name?!1:e.name.toLowerCase().includes(d.toLowerCase())||e.type==="human"&&e.email?.toLowerCase().includes(d.toLowerCase())||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(d.toLowerCase())),q=f.filter(e=>e.type==="human"),z=f.filter(e=>e.type==="digital"),J=()=>{a("typeSelection")},T=e=>{e.type==="digital"&&(C(e),a("form")),console.log("Editing colleague:",e),I?.(e)},E=e=>{e.type==="digital"&&(y(e),a("view"))},de=e=>{let i={id:`human-${Date.now()}`,type:"human",name:e.name,email:e.email,updatedAt:e.updatedAt,createdAt:e.createdAt,accounts:e.accounts};r(g=>[...g,i]),S?.(i),a("main")},me=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"}),a("main")},ge=()=>{C(null),a("form")},Q=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}W?(r(i=>i.map(g=>g.id===e.id?{...e,type:"digital"}:g)),I?.({...e,type:"digital"})):(r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"})),a("main"),C(null)},ce=()=>{a("main"),C(null),y(null)},ue=()=>{a("main"),y(null)},be=()=>{A&&(C(A),y(null),a("form"))},V=e=>{console.log("deleting",e,s),ae?.(e,s.find(i=>i.id.toString()===e.toString())?.type),r(i=>i.filter(g=>g.id!==e))},pe=()=>{B(""),M("all"),G("all")};return m==="typeSelection"?l(Z,{onSelectHuman:()=>a("userSelection"),onSelectDigital:()=>a("digitalOptions"),onCancel:()=>a("main")}):m==="userSelection"?l(le,{users:se,onUserSelect:de,onCancel:()=>a("typeSelection")}):m==="digitalOptions"?l(ee,{onCloneExisting:()=>a("digitalClone"),onCreateNew:ge,onCancel:()=>a("typeSelection")}):m==="digitalClone"?l(_,{digitalColleagues:re,onColleagueClone:me,onCancel:()=>a("digitalOptions")}):m==="form"?l(O,{colleague:W||void 0,onSave:Q,onCancel:ce,availableKnowledgeDocuments:j}):m==="view"?l(O,{colleague:A||void 0,onSave:Q,onCancel:ue,readOnly:!0,availableKnowledgeDocuments:j}):l("div",{className:"px-2 md:px-4 py-4 space-y-8",children:l(Ne,{mode:"wait",children:l(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:t("div",{className:`space-y-6 ${oe||""}`,children:[l(X,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:J}}),t("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Total Colleagues"}),l(te,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Human Members"}),l(he,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.filter(e=>e.type==="human").length}),l("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),t(c,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(w,{className:"text-sm font-medium",children:"Digital Colleagues"}),l(ye,{className:"h-4 w-4 text-muted-foreground"})]}),t(u,{children:[l("div",{className:"text-2xl font-bold",children:s.filter(e=>e.type==="digital").length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),l(c,{children:l(u,{className:"pt-6",children:t("div",{className:"flex flex-col md:flex-row gap-4",children:[l("div",{className:"flex-1",children:t("div",{className:"relative",children:[l(ve,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),l(R,{placeholder:"Search colleagues...",value:d,onChange:e=>B(e.target.value),className:"pl-9"})]})}),t(U,{value:b,onValueChange:M,children:[l(k,{className:"w-full md:w-[180px]",children:l($,{placeholder:"Department"})}),t(F,{children:[l(p,{value:"all",children:"All Departments"}),ie.map(e=>l(p,{value:e,children:e},e))]})]}),t(U,{value:D,onValueChange:G,children:[l(k,{className:"w-full md:w-[140px]",children:l($,{placeholder:"Status"})}),t(F,{children:[l(p,{value:"all",children:"All Status"}),l(p,{value:"active",children:"Active"}),l(p,{value:"inactive",children:"Inactive"})]})]}),(d||b!=="all"||D!=="all")&&t(H,{variant:"outline",onClick:pe,className:"gap-2",children:[l(we,{className:"h-4 w-4"}),"Clear"]})]})})}),t("div",{className:"space-y-4",children:[l(Y,{activeTab:v,onTabChange:ne,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${q.length})`},{value:"digital",label:`Digital (${z.length})`}],maxWidth:"400px",gridCols:3}),v==="all"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:f.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n,className:K([e.type==="digital"&&"border-teal-400"])},`${e}-${e.id}`))}),v==="human"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:q.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n},e.id))}),v==="digital"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:z.map(e=>l(x,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n,className:K([e.type==="digital"&&"border-teal-400"])},e.id))})]}),f.length===0&&l(c,{children:l(u,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[l(te,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),l("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),l("p",{className:"text-muted-foreground mb-4",children:d||b!=="all"||D!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),t(H,{onClick:J,className:"gap-2",children:[l(fe,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{Se as a};
@@ -1 +1 @@
1
- import{a as j,b as B,c as J,d as z,e as G}from"./chunk-HFEN3KJC.mjs";import{a as $}from"./chunk-L2UJOICL.mjs";import{a as L}from"./chunk-T3F3RQIC.mjs";import{a as P}from"./chunk-UP67R64J.mjs";import{a as F}from"./chunk-6QERRKM4.mjs";import{a as H}from"./chunk-VSU7LYXZ.mjs";import{b as E,c as S}from"./chunk-RKS7CWAP.mjs";import{b as _}from"./chunk-BZEGLKRZ.mjs";import{a as U}from"./chunk-IPRG56MW.mjs";import{a as f,b as p,i as u,j as g}from"./chunk-OCPX4QPC.mjs";import{a as I,b as A,c as R,d as O}from"./chunk-KY7WQYN4.mjs";import{a as y}from"./chunk-MDJREBVI.mjs";import{useLexicalComposerContext as he}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext";import{$insertNodeToNearestRoot as Ce,mergeRegister as X}from"@payloadcms/richtext-lexical/lexical/utils";import{$createParagraphNode as ke,$getPreviousSelection as ve,$getRoot as Ne,$getSelection as k,$isParagraphNode as Y,$isRangeSelection as v,CAN_REDO_COMMAND as Te,CAN_UNDO_COMMAND as De,COMMAND_PRIORITY_EDITOR as Me,FORMAT_ELEMENT_COMMAND as m,FORMAT_TEXT_COMMAND as c,SELECTION_CHANGE_COMMAND as xe,UNDO_COMMAND as q}from"@payloadcms/richtext-lexical/lexical";import{$setBlocksType as K}from"@payloadcms/richtext-lexical/lexical/selection";import{INSERT_ORDERED_LIST_COMMAND as we,INSERT_UNORDERED_LIST_COMMAND as ye}from"@payloadcms/richtext-lexical/lexical/list";import{AlignCenter as Ie,AlignJustify as Ae,AlignLeft as Re,AlignRight as Oe,ChevronDown as N,ImageUp as _e,List as Ee,ListOrdered as Se,Plus as Ue,RotateCcw as $e,RotateCw as He}from"lucide-react";import{Fragment as Le,useCallback as Pe,useEffect as Fe,useRef as je,useState as s}from"react";import{$createHeadingNode as Be}from"@payloadcms/richtext-lexical/lexical/rich-text";import{jsx as o,jsxs as a}from"react/jsx-runtime";var T=1;function Je(){return o("span",{className:"border border-[#222222]"})}function ze(){let[t]=he(),Q=je(null),[V,W]=s(!1),[Z,ee]=s(!1),[oe,te]=s(!1),[ie,ne]=s(!1),[ae,se]=s(!1),[re,ce]=s(!1),[le,de]=s(!1),[fe,pe]=s(!1),[D,M]=s(!1),[x,ue]=s("left"),[w,ge]=s("p"),l=e=>{t.update(()=>{let i=k();v(i)&&(e==="p"?K(i,()=>ke()):K(i,()=>Be(e)))})},b=Pe(()=>{let e=k();if(v(e)){te(e.hasFormat("bold")),ne(e.hasFormat("italic")),se(e.hasFormat("underline")),ce(e.hasFormat("strikethrough")),de(e.hasFormat("subscript")),pe(e.hasFormat("superscript"));let i=e.anchor.getNode(),n=i;for(;n&&!Y(n)&&n!==Ne();){let r=n.getParent();r&&(n=r)}if(n){let r=n.getFormatType();ue(r||"left")}let d=i.getTopLevelElement()?.__tag;ge(d||"p")}},[]);Fe(()=>X(t.registerUpdateListener(({editorState:e})=>{e.read(()=>{b()})}),t.registerCommand(xe,(e,i)=>(b(),!1),T),t.registerCommand(De,e=>(W(e),!1),T),t.registerCommand(Te,e=>(ee(e),!1),T),X(t.registerCommand(E,e=>(t.update(()=>{let i=k()||ve();if(v(i)){let n=_({id:e.id,fields:e.fields,relationTo:e.relationTo,value:e.value}),{focus:d}=i,r=d.getNode();Ce(n),Y(r)&&!r.__first&&r.remove()}}),!0),Me))),[t,b]);let me=[[{label:"Undo",icon:o($e,{width:15,height:15}),onClick:()=>{t.dispatchCommand(q,void 0)},disabled:!V},{label:"Redo",icon:o(He,{width:15,height:15}),onClick:()=>{t.dispatchCommand(q,void 0)},disabled:!Z}],[{label:"Bold",icon:o(U,{}),onClick:()=>{t.dispatchCommand(c,"bold")},value:"bold",active:oe},{label:"Italic",icon:o($,{}),onClick:()=>{t.dispatchCommand(c,"italic")},value:"italic",active:ie},{label:"Underline",icon:o(H,{}),onClick:()=>{t.dispatchCommand(c,"underline")},value:"underline",active:ae},{label:"Strikethrough",icon:o(L,{}),onClick:()=>{t.dispatchCommand(c,"strikethrough")},value:"strikethrough",active:re},{label:"Subscript",icon:o(P,{}),onClick:()=>{t.dispatchCommand(c,"subscript")},value:"subscript",active:le},{label:"Superscript",icon:o(F,{}),onClick:()=>{t.dispatchCommand(c,"superscript")},value:"superscript",active:fe}]],h=[{label:"Left Align",direction:"left",icon:o(Re,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"left")}},{label:"Center Align",direction:"center",icon:o(Ie,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"center")}},{label:"Right Align",direction:"right",icon:o(Oe,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"right")}},{label:"Justify Align",direction:"justify",icon:o(Ae,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"justify")}}],C=[{label:"Normal Text",value:"p",icon:o(j,{}),onClick:()=>l("p")},{label:"Heading 1",value:"h1",icon:o(B,{}),onClick:()=>l("h1")},{label:"Heading 2",value:"h2",icon:o(J,{}),onClick:()=>l("h2")},{label:"Heading 3",value:"h3",icon:o(z,{}),onClick:()=>l("h3")},{label:"Heading 4",value:"h4",icon:o(G,{}),onClick:()=>l("h4")},...[{label:"Unordered List",value:"ul",icon:o(Ee,{width:15,height:15}),onClick:()=>{t.dispatchCommand(ye,void 0)}},{label:"Ordered List",value:"ol",icon:o(Se,{width:15,height:15}),onClick:()=>{t.dispatchCommand(we,void 0)}}]],be=[{label:"Insert Image",icon:o(_e,{width:15,height:15}),onClick:()=>{M(!0)},disabled:!1}];return o("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black z-50",children:a("div",{className:"flex gap-2 ",ref:Q,children:[me.map((e,i)=>a(Le,{children:[o("div",{className:"flex items-center gap-2",children:e.map((n,d)=>o("div",{role:"button","aria-disabled":n.disabled||!1,onClick:n.onClick,className:y("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",n.active&&"bg-[#3c3c3c]"),"aria-label":n.label,children:o(I,{children:a(A,{children:[o(R,{className:"text-[#b5b5b5]",children:n.icon}),o(O,{children:o("p",{children:n.label})})]})})},d))}),o(Je,{})]},`toolbar-option-${e.length}-${i}`)),a(f,{children:[a(p,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[h.find(e=>e.direction===x)?.icon,h.find(e=>e.direction===x)?.label,o(N,{width:15,height:15})]}),o(u,{className:"bg-black hover:bg-black",children:h.map((e,i)=>a(g,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`${e.label}-${i}`))})]}),a(f,{children:[a(p,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[C.find(e=>e.value===w)?.icon,C.find(e=>e.value===w)?.label,o(N,{width:15,height:15})]}),o(u,{className:"bg-black hover:bg-black",children:C.map((e,i)=>a(g,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`heading-option-${e.label}-${i}`))})]}),a(f,{children:[a(p,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[o(Ue,{width:15,height:15}),o(N,{width:15,height:15})]}),o(u,{className:"bg-black hover:bg-black",children:be.map((e,i)=>a(g,{onClick:e.onClick,disabled:e.disabled,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},i))})]}),D&&o(S,{activeEditor:t,onClose:()=>{M(!1)},isOpen:D})]})})}export{ze as a};
1
+ import{b as E,c as S}from"./chunk-RKS7CWAP.mjs";import{a as U}from"./chunk-IPRG56MW.mjs";import{a as j,b as B,c as J,d as z,e as G}from"./chunk-HFEN3KJC.mjs";import{a as $}from"./chunk-L2UJOICL.mjs";import{a as L}from"./chunk-T3F3RQIC.mjs";import{a as P}from"./chunk-UP67R64J.mjs";import{a as F}from"./chunk-6QERRKM4.mjs";import{a as H}from"./chunk-VSU7LYXZ.mjs";import{b as _}from"./chunk-BZEGLKRZ.mjs";import{a as f,b as p,i as u,j as g}from"./chunk-OCPX4QPC.mjs";import{a as I,b as A,c as R,d as O}from"./chunk-KY7WQYN4.mjs";import{a as y}from"./chunk-MDJREBVI.mjs";import{useLexicalComposerContext as he}from"@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext";import{$insertNodeToNearestRoot as Ce,mergeRegister as X}from"@payloadcms/richtext-lexical/lexical/utils";import{$createParagraphNode as ke,$getPreviousSelection as ve,$getRoot as Ne,$getSelection as k,$isParagraphNode as Y,$isRangeSelection as v,CAN_REDO_COMMAND as Te,CAN_UNDO_COMMAND as De,COMMAND_PRIORITY_EDITOR as Me,FORMAT_ELEMENT_COMMAND as m,FORMAT_TEXT_COMMAND as c,SELECTION_CHANGE_COMMAND as xe,UNDO_COMMAND as q}from"@payloadcms/richtext-lexical/lexical";import{$setBlocksType as K}from"@payloadcms/richtext-lexical/lexical/selection";import{INSERT_ORDERED_LIST_COMMAND as we,INSERT_UNORDERED_LIST_COMMAND as ye}from"@payloadcms/richtext-lexical/lexical/list";import{AlignCenter as Ie,AlignJustify as Ae,AlignLeft as Re,AlignRight as Oe,ChevronDown as N,ImageUp as _e,List as Ee,ListOrdered as Se,Plus as Ue,RotateCcw as $e,RotateCw as He}from"lucide-react";import{Fragment as Le,useCallback as Pe,useEffect as Fe,useRef as je,useState as s}from"react";import{$createHeadingNode as Be}from"@payloadcms/richtext-lexical/lexical/rich-text";import{jsx as o,jsxs as a}from"react/jsx-runtime";var T=1;function Je(){return o("span",{className:"border border-[#222222]"})}function ze(){let[t]=he(),Q=je(null),[V,W]=s(!1),[Z,ee]=s(!1),[oe,te]=s(!1),[ie,ne]=s(!1),[ae,se]=s(!1),[re,ce]=s(!1),[le,de]=s(!1),[fe,pe]=s(!1),[D,M]=s(!1),[x,ue]=s("left"),[w,ge]=s("p"),l=e=>{t.update(()=>{let i=k();v(i)&&(e==="p"?K(i,()=>ke()):K(i,()=>Be(e)))})},b=Pe(()=>{let e=k();if(v(e)){te(e.hasFormat("bold")),ne(e.hasFormat("italic")),se(e.hasFormat("underline")),ce(e.hasFormat("strikethrough")),de(e.hasFormat("subscript")),pe(e.hasFormat("superscript"));let i=e.anchor.getNode(),n=i;for(;n&&!Y(n)&&n!==Ne();){let r=n.getParent();r&&(n=r)}if(n){let r=n.getFormatType();ue(r||"left")}let d=i.getTopLevelElement()?.__tag;ge(d||"p")}},[]);Fe(()=>X(t.registerUpdateListener(({editorState:e})=>{e.read(()=>{b()})}),t.registerCommand(xe,(e,i)=>(b(),!1),T),t.registerCommand(De,e=>(W(e),!1),T),t.registerCommand(Te,e=>(ee(e),!1),T),X(t.registerCommand(E,e=>(t.update(()=>{let i=k()||ve();if(v(i)){let n=_({id:e.id,fields:e.fields,relationTo:e.relationTo,value:e.value}),{focus:d}=i,r=d.getNode();Ce(n),Y(r)&&!r.__first&&r.remove()}}),!0),Me))),[t,b]);let me=[[{label:"Undo",icon:o($e,{width:15,height:15}),onClick:()=>{t.dispatchCommand(q,void 0)},disabled:!V},{label:"Redo",icon:o(He,{width:15,height:15}),onClick:()=>{t.dispatchCommand(q,void 0)},disabled:!Z}],[{label:"Bold",icon:o(U,{}),onClick:()=>{t.dispatchCommand(c,"bold")},value:"bold",active:oe},{label:"Italic",icon:o($,{}),onClick:()=>{t.dispatchCommand(c,"italic")},value:"italic",active:ie},{label:"Underline",icon:o(H,{}),onClick:()=>{t.dispatchCommand(c,"underline")},value:"underline",active:ae},{label:"Strikethrough",icon:o(L,{}),onClick:()=>{t.dispatchCommand(c,"strikethrough")},value:"strikethrough",active:re},{label:"Subscript",icon:o(P,{}),onClick:()=>{t.dispatchCommand(c,"subscript")},value:"subscript",active:le},{label:"Superscript",icon:o(F,{}),onClick:()=>{t.dispatchCommand(c,"superscript")},value:"superscript",active:fe}]],h=[{label:"Left Align",direction:"left",icon:o(Re,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"left")}},{label:"Center Align",direction:"center",icon:o(Ie,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"center")}},{label:"Right Align",direction:"right",icon:o(Oe,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"right")}},{label:"Justify Align",direction:"justify",icon:o(Ae,{width:15,height:15}),onClick:()=>{t.dispatchCommand(m,"justify")}}],C=[{label:"Normal Text",value:"p",icon:o(j,{}),onClick:()=>l("p")},{label:"Heading 1",value:"h1",icon:o(B,{}),onClick:()=>l("h1")},{label:"Heading 2",value:"h2",icon:o(J,{}),onClick:()=>l("h2")},{label:"Heading 3",value:"h3",icon:o(z,{}),onClick:()=>l("h3")},{label:"Heading 4",value:"h4",icon:o(G,{}),onClick:()=>l("h4")},...[{label:"Unordered List",value:"ul",icon:o(Ee,{width:15,height:15}),onClick:()=>{t.dispatchCommand(ye,void 0)}},{label:"Ordered List",value:"ol",icon:o(Se,{width:15,height:15}),onClick:()=>{t.dispatchCommand(we,void 0)}}]],be=[{label:"Insert Image",icon:o(_e,{width:15,height:15}),onClick:()=>{M(!0)},disabled:!1}];return o("div",{className:"flex justify-between border border-[#222222] py-2 px-2 sticky top-0 bg-black z-50",children:a("div",{className:"flex gap-2 ",ref:Q,children:[me.map((e,i)=>a(Le,{children:[o("div",{className:"flex items-center gap-2",children:e.map((n,d)=>o("div",{role:"button","aria-disabled":n.disabled||!1,onClick:n.onClick,className:y("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",n.active&&"bg-[#3c3c3c]"),"aria-label":n.label,children:o(I,{children:a(A,{children:[o(R,{className:"text-[#b5b5b5]",children:n.icon}),o(O,{children:o("p",{children:n.label})})]})})},d))}),o(Je,{})]},`toolbar-option-${e.length}-${i}`)),a(f,{children:[a(p,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[h.find(e=>e.direction===x)?.icon,h.find(e=>e.direction===x)?.label,o(N,{width:15,height:15})]}),o(u,{className:"bg-black hover:bg-black",children:h.map((e,i)=>a(g,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`${e.label}-${i}`))})]}),a(f,{children:[a(p,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[C.find(e=>e.value===w)?.icon,C.find(e=>e.value===w)?.label,o(N,{width:15,height:15})]}),o(u,{className:"bg-black hover:bg-black",children:C.map((e,i)=>a(g,{onClick:e.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},`heading-option-${e.label}-${i}`))})]}),a(f,{children:[a(p,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[o(Ue,{width:15,height:15}),o(N,{width:15,height:15})]}),o(u,{className:"bg-black hover:bg-black",children:be.map((e,i)=>a(g,{onClick:e.onClick,disabled:e.disabled,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[o("span",{children:e.icon}),o("span",{children:e.label})]},i))})]}),D&&o(S,{activeEditor:t,onClose:()=>{M(!1)},isOpen:D})]})})}export{ze as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as p}from"./chunk-CDVRH3MC.mjs";import{a as d}from"./chunk-KPTGYVDM.mjs";import{a as m}from"./chunk-Z22NSJMF.mjs";import{a as i,f as n,g as s,i as l,j as c}from"./chunk-3UMMMQEH.mjs";import{useState as u}from"react";import{motion as N,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function C({projects:g=[],onAddProject:j,handleProjectOpen:P,handleProjectShare:y}){let[f,t]=u(!1),[b,r]=u(!1),v=async a=>{r(!0);try{await j(a),t(!1)}catch(w){console.error("Error creating project:",w)}finally{r(!1)}},h=()=>{t(!0)};return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:o(N.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(m,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:h}}),o("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:g.map(a=>e(d,{project:a,onOpen:P,onShare:y},a.id))})]})]},"projects-index-view")}),e(i,{open:f,onOpenChange:t,children:o(n,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o(s,{className:"sr-only",children:[e(l,{children:"Create New Project"}),e(c,{children:"Fill out the form below to create a new project."})]}),e(p,{onSubmit:v,onCancel:()=>t(!1),isLoading:b,className:"border-0 shadow-none"})]})})]})}export{C as a};
4
+ import{a as d}from"./chunk-KPTGYVDM.mjs";import{a as p}from"./chunk-CDVRH3MC.mjs";import{a as m}from"./chunk-Z22NSJMF.mjs";import{a as i,f as n,g as s,i as l,j as c}from"./chunk-3UMMMQEH.mjs";import{useState as u}from"react";import{motion as N,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function C({projects:g=[],onAddProject:j,handleProjectOpen:P,handleProjectShare:y}){let[f,t]=u(!1),[b,r]=u(!1),v=async a=>{r(!0);try{await j(a),t(!1)}catch(w){console.error("Error creating project:",w)}finally{r(!1)}},h=()=>{t(!0)};return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:o(N.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(m,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:h}}),o("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:g.map(a=>e(d,{project:a,onOpen:P,onShare:y},a.id))})]})]},"projects-index-view")}),e(i,{open:f,onOpenChange:t,children:o(n,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o(s,{className:"sr-only",children:[e(l,{children:"Create New Project"}),e(c,{children:"Fill out the form below to create a new project."})]}),e(p,{onSubmit:v,onCancel:()=>t(!1),isLoading:b,className:"border-0 shadow-none"})]})})]})}export{C as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as N}from"./chunk-M7KIL6AS.mjs";import{a as u,c as f,e as x}from"./chunk-3UMMMQEH.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{motion as P}from"motion/react";import{Trash2 as T,Edit as z}from"lucide-react";import*as F from"@radix-ui/react-dialog";import{Loader2 as S}from"lucide-react";import{useState as r}from"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var B=a=>{if(!a||a<=0)return"0 KB";let o=a/1024;return o<1024?`${o.toFixed(2)} KB`:`${(o/1024).toFixed(2)} MB`};function U({files:a,onFileClick:o,onFileDelete:m,onFileUpdate:w,showHeader:h=!0,className:b}){let[y,s]=r(!1),[D,c]=r(!1),[p,n]=r(null),v=()=>{s(!1),n(null)},C=()=>{c(!0),setTimeout(()=>{c(!1),s(!1),n(null)},500)},k=i=>{n(i),s(!0)};return t("div",{className:`rounded-3xl border overflow-hidden ${b||""}`,children:[h&&t("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[e("div",{className:"col-span-6",children:"Name"}),e("div",{className:"col-span-2",children:"Size"}),e("div",{className:"col-span-2",children:"Modified"})]}),e("div",{className:"divide-y",children:a.map(i=>t(P.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>o?.(i),children:[t("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),e("div",{children:e("p",{className:"font-medium",children:i.name})})]}),e("div",{className:"col-span-2 text-sm md:text-base",children:B(i.filesize)}),t("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[e("span",{className:"text-sm md:text-base",children:new Date(i.createdAt).toLocaleDateString()}),t("div",{className:"flex gap-1",children:[i.mimeType==="text/markdown"&&e(d,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:l=>{l.stopPropagation(),k(i)},children:e(z,{className:"h-4 w-4"})}),e(d,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:l=>{l.stopPropagation(),m?.(i)},children:e(T,{className:"h-4 w-4"})})]})]})]},i.name))}),e(u,{open:y,onOpenChange:i=>!i&&v(),children:t(f,{children:[e(x,{}),t(F.Content,{className:g("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[D&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:e(S,{className:"h-8 w-8 animate-spin text-primary"})}),p&&e(N,{document:p,onSave:C,onFileUpdate:w,onCancel:v})]})]})})]})}export{U as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as N}from"./chunk-UENQZNU3.mjs";import{a as n}from"./chunk-R4SE63GR.mjs";import{a as v}from"./chunk-KPTGYVDM.mjs";import{a as h}from"./chunk-JXQRVEQB.mjs";import{a as r,b as f,d as y}from"./chunk-DXRAJQMA.mjs";import{a}from"./chunk-Z22NSJMF.mjs";import{a as b}from"./chunk-CTTBF7F4.mjs";import{a as g,b as u}from"./chunk-NPVUICIF.mjs";import{useState as x}from"react";import{motion as R,AnimatePresence as L}from"motion/react";import{Bot as E}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function H({title:C="Digital Colleagues",businessUnits:c,projects:m,fileCount:k,teamMemberCount:A,onCreateProject:w,onOpenProject:P,sidebarItems:M,initialColleagues:V,users:G,onColleagueAdd:Y,onColleagueEdit:z,onColleagueDelete:K}){let[i,s]=x("home"),[l,j]=x(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},F=t=>{console.log("Opening file:",t.name)},W=t=>{console.log("Sharing file:",t.name)},S=t=>{console.log("Opening project:",t.name),P(t)},T=t=>{console.log("Sharing project:",t.name)},I=t=>{j(t),console.log("Business unit changed to:",t.name)},U=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},O=t=>{console.log("Notification removed:",t)},B=()=>{console.log("All notifications removed")},D=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:k}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e("div",{children:e("h1",{children:"Colleagues"})});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(N,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(h,{files:f,onFileClick:F})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:w}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(v,{project:t,onOpen:S,onShare:T},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:y.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(b,{sidebarItems:g,title:C,notifications:u,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:I,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:U,actionIcon:e(E,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:O,onRemoveAll:B,children:e(L,{mode:"wait",children:e(R.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:D()},i)})})}export{H as a};
4
+ import{a as N}from"./chunk-UENQZNU3.mjs";import{a as n}from"./chunk-R4SE63GR.mjs";import{a as r,b as f,d as y}from"./chunk-DXRAJQMA.mjs";import{a as v}from"./chunk-KPTGYVDM.mjs";import{a as h}from"./chunk-ICFBQXVC.mjs";import{a}from"./chunk-Z22NSJMF.mjs";import{a as b}from"./chunk-CTTBF7F4.mjs";import{a as g,b as u}from"./chunk-NPVUICIF.mjs";import{useState as x}from"react";import{motion as R,AnimatePresence as L}from"motion/react";import{Bot as E}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function H({title:C="Digital Colleagues",businessUnits:c,projects:m,fileCount:k,teamMemberCount:A,onCreateProject:w,onOpenProject:P,sidebarItems:M,initialColleagues:V,users:G,onColleagueAdd:Y,onColleagueEdit:z,onColleagueDelete:K}){let[i,s]=x("home"),[l,j]=x(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},F=t=>{console.log("Opening file:",t.name)},W=t=>{console.log("Sharing file:",t.name)},S=t=>{console.log("Opening project:",t.name),P(t)},T=t=>{console.log("Sharing project:",t.name)},I=t=>{j(t),console.log("Business unit changed to:",t.name)},U=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},O=t=>{console.log("Notification removed:",t)},B=()=>{console.log("All notifications removed")},D=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:k}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e("div",{children:e("h1",{children:"Colleagues"})});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(N,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(h,{files:f,onFileClick:F})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:w}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(v,{project:t,onOpen:S,onShare:T},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:y.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(b,{sidebarItems:g,title:C,notifications:u,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:I,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:U,actionIcon:e(E,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:O,onRemoveAll:B,children:e(L,{mode:"wait",children:e(R.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:D()},i)})})}export{H as a};
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as S}from"./chunk-VTFO5GXK.mjs";import{a as F}from"./chunk-DFIXTV2M.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{b}from"./chunk-ZUA4KNIR.mjs";import{motion as E}from"motion/react";import{File as $,FileText as I,Type as L,Loader2 as D,X as K,Save as M}from"lucide-react";import{useEffect as _,useRef as B,useState as w}from"react";import{Fragment as j,jsx as c,jsxs as y}from"react/jsx-runtime";var T=n=>"mimeType"in n&&"url"in n&&!("format"in n),P=n=>{if(!n?.root?.children)return"";let l=[],i=t=>{if(!t)return"";switch(t.type){case"heading":{let e=t.tag?parseInt(t.tag.replace("h","")):1,r=s(t.children||[]);return"#".repeat(e)+" "+r}case"paragraph":return s(t.children||[]);case"list":{let e=[],r=t.listType==="number"?"1.":"-";return t.children?.forEach((d,a)=>{if(d.type==="listitem"){let m=s(d.children||[]),p=t.listType==="number"?`${a+1}.`:r;e.push(`${p} ${m}`)}}),e.join(`
5
+ `)}case"listitem":return s(t.children||[]);case"text":{let e=t.text||"";if(t.format){let r=(t.format&1)!==0,d=(t.format&2)!==0,a=(t.format&4)!==0,m=(t.format&8)!==0;(t.format&16)!==0?e=`\`${e}\``:(r&&(e=`**${e}**`),d&&(e=`*${e}*`),a&&(e=`~~${e}~~`),m&&(e=`<u>${e}</u>`))}return e}default:return t.children?s(t.children):""}},s=t=>t.map(e=>{if(e.type==="text"){let r=e.text||"";if(e.format){let d=(e.format&1)!==0,a=(e.format&2)!==0,m=(e.format&4)!==0,p=(e.format&8)!==0;(e.format&16)!==0?r=`\`${r}\``:(d&&(r=`**${r}**`),a&&(r=`*${r}*`),m&&(r=`~~${r}~~`),p&&(r=`<u>${r}</u>`))}return r}else{if(e.type==="paragraph")return s(e.children||[]);if(e.type==="listitem")return s(e.children||[]);if(e.type==="linebreak")return`
6
+ `}return i(e)}).filter(Boolean).join("");return n.root.children.forEach(t=>{let e=i(t);e&&l.push(e)}),l.join(`
7
+
8
+ `)},v=n=>{let l=[],i=0;for(;i<n.length;){let t=n.slice(i).match(/^<u\s*[^>]*>([\s\S]*?)<\/u>/i);if(t&&t[0]){let o=t[1]||"",f=o?v(o):[];f.length>0?(f.forEach(h=>{h.type==="text"&&(h.format=(h.format||0)|8)}),l.push(...f)):o===""&&l.push({type:"text",text:"",format:8}),i+=t[0].length;continue}if(n.slice(i).startsWith("</u>")){i+=4;continue}let e=n.slice(i).match(/^(`+)([^`]+)\1/);if(e){let o=e[2];o&&l.push({type:"text",text:o,format:16}),i+=e[0].length;continue}let r=n.slice(i).match(/^(~~)(.+?)\1/);if(r){let o=r[2],f=v(o);f.forEach(h=>{h.type==="text"&&(h.format=(h.format||0)|4)}),l.push(...f),i+=r[0].length;continue}let d=n.slice(i).match(/^(\*\*|__)(.+?)\1/);if(d){let o=d[2],f=v(o);f.forEach(h=>{h.type==="text"&&(h.format=(h.format||0)|1)}),l.push(...f),i+=d[0].length;continue}let a=n.slice(i).match(/^(\*|_)([^*_\n]+?)\1(?!\*|_)/);if(a&&a[0].length>2){let o=a[2],f=v(o);f.forEach(h=>{h.type==="text"&&(h.format=(h.format||0)|2)}),l.push(...f),i+=a[0].length;continue}let m=n.length,p=[{pattern:/<u>/i,offset:0},{pattern:/\*\*/,offset:0},{pattern:/__/,offset:0},{pattern:/~~/,offset:0},{pattern:/`+/,offset:0},{pattern:/\*[^*\n]/,offset:0},{pattern:/_[^_\n]/,offset:0}];for(let{pattern:o}of p){let f=n.slice(i+1).search(o);f!==-1&&f+1<m-i&&(m=i+f+1)}let g=n.slice(i,m);g&&l.push({type:"text",text:g,format:0}),i=m}let s=[];for(let t of l)s.length>0&&s[s.length-1].type==="text"&&s[s.length-1].format===t.format?s[s.length-1].text+=t.text:s.push(t);return s.length>0?s:[{type:"text",text:"",format:0}]},U=n=>{let l=n.split(`
9
+ `),i=[],s=[],t=[],e=()=>{if(s.length>0){let d=s.join(" "),a=v(d);i.push({type:"paragraph",children:a.length>0?a:[{type:"text",text:"",format:0}]}),s=[]}},r=()=>{t.length>0&&(i.push({type:"list",listType:"bullet",children:t}),t=[])};for(let d of l){let a=d.trim();if(!a){e(),r();continue}let m=a.match(/^(#{1,6})\s+(.+)$/);if(m){e(),r();let g=m[1].length,o=m[2],f=v(o);i.push({type:"heading",tag:`h${g}`,children:f.length>0?f:[{type:"text",text:"",format:0}]});continue}let p=a.match(/^[-*+]\s+(.+)$/);if(p){e();let g=p[1],o=v(g);t.push({type:"listitem",children:[{type:"paragraph",children:o.length>0?o:[{type:"text",text:"",format:0}]}]});continue}t.length>0&&r(),s.push(a)}return e(),r(),i.length===0&&i.push({type:"paragraph",children:[{type:"text",text:"",format:0}]}),{root:{type:"root",children:i,direction:"ltr",format:"",indent:0,version:1}}},R=async n=>{let l="",i,s="text";if(n.url)try{let t=n.url;!t.startsWith("http://")&&!t.startsWith("https://")&&!t.startsWith("/")&&(t="/"+t),console.log("Fetching file content from URL:",t);let e=await fetch(t);e.ok?(l=await e.text(),console.log("Successfully loaded content, length:",l.length)):console.error("Failed to fetch file content:",e.status,e.statusText)}catch(t){throw console.error("Failed to fetch file content:",t),t}else console.warn("No URL provided for file:",n.name);return n.mimeType==="text/markdown"?(s="richText",console.log("Converting markdown to Lexical, content length:",l.length),i=U(l),console.log("Converted Lexical JSON:",JSON.stringify(i,null,2))):n.mimeType?.startsWith("text/")&&(s="text"),{id:n.id.toString(),title:n.name,description:void 0,content:s==="richText"?void 0:l,richTextContent:s==="richText"?i:void 0,format:s,metadata:{},createdAt:typeof n.createdAt=="string"?new Date(n.createdAt):n.createdAt,updatedAt:new Date}};function G({document:n,onCancel:l,onSave:i,onFileUpdate:s}){let[t,e]=w(T(n)),[r,d]=w(T(n)?{id:n.id.toString(),title:n.name,description:void 0,content:"",format:"text",metadata:{},createdAt:typeof n.createdAt=="string"?new Date(n.createdAt):n.createdAt,updatedAt:new Date}:{...n,updatedAt:new Date}),[a,m]=w(T(n)?void 0:r.richTextContent),[p,g]=w(!1),o=B(T(n)?n:null);_(()=>{T(n)?(e(!0),R(n).then(u=>{console.log("Loaded content:",u),d(u),m(u.richTextContent),e(!1)}).catch(u=>{console.error("Failed to convert file:",u),e(!1)})):(d({...n,updatedAt:new Date}),m(n.richTextContent))},[n]);let f=u=>{switch(u){case"markdown":case"mdx":return c(I,{className:"h-6 w-6 text-primary"});case"richText":return c($,{className:"h-6 w-6 text-success"});case"text":return c(L,{className:"h-6 w-6 text-muted-foreground"});default:return c($,{className:"h-6 w-6 text-muted-foreground"})}},h=u=>{switch(u){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},A=async()=>{g(!0);try{let u,x;if(o.current&&o.current.mimeType==="text/markdown"){let C=a?P(a):"";u={...r,format:"markdown",content:C,richTextContent:void 0},x=C}else u={...r,richTextContent:a},x=r.content||"";let N=o.current?o.current.id.toString():r.id;await Promise.resolve(i()),s?.(N,x)}finally{g(!1)}};return y(E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[c("div",{className:"border-b border-border bg-card p-8 pb-6",children:y("div",{className:"flex items-start justify-between gap-4 mb-4",children:[c("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:c("div",{className:"flex-1 min-w-0",children:y("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[c("div",{className:"flex-1 min-w-0",children:c(F,{fieldName:"title",value:r.title,label:"",onSave:(u,x)=>d(N=>({...N,title:x})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),c("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${h(r.format)} flex-shrink-0 mt-1`,children:r.format.toUpperCase()})]})})}),y("div",{className:"flex items-center gap-2 flex-shrink-0",children:[y(b,{variant:"outline",size:"sm",onClick:l,className:"gap-2",children:[c(K,{className:"h-4 w-4"}),"Close"]}),y(b,{size:"sm",onClick:A,className:"gap-2",disabled:p,children:[p?c(D,{className:"h-4 w-4 animate-spin"}):c(M,{className:"h-4 w-4"}),p?"Saving...":"Save"]})]})]})}),c("div",{className:"flex-1 overflow-hidden",children:c("div",{className:"p-8 pt-0 h-full max-h-full overflow-auto",children:t?c("div",{className:"flex items-center justify-center h-full",children:y("div",{className:"flex flex-col items-center gap-4",children:[c(D,{className:"h-8 w-8 animate-spin text-primary"}),c("p",{className:"text-sm text-muted-foreground",children:"Loading file content..."})]})}):c(j,{children:r.format==="richText"?c(S,{setValue:m,value:a,name:"richTextContent"},`richtext-${r.id}-${t?"loading":"loaded"}`):c(k,{value:r.content||"",onChange:u=>d(x=>({...x,content:u.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})})]})}export{G as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as i}from"./chunk-255P6K5W.mjs";import{a as l}from"./chunk-HKGW6JI2.mjs";import{a as m}from"./chunk-YKG4FNS4.mjs";import{ChevronRightIcon as c,HomeIcon as f}from"@heroicons/react/20/solid";import{Fragment as h,jsx as e,jsxs as a}from"react/jsx-runtime";var d={highImpact:i,lowImpact:l,mediumImpact:m,sectionHero:n},H=t=>{let{type:o}=t||{};if(!o||o==="none")return null;let r=d[o];return r?e(r,{...t}):null};function N({breadcrumbItems:t}){if(t&&t.length>0){let o=t.filter(r=>r.label.toLowerCase()!=="home");return e("nav",{"aria-label":"Breadcrumb",className:"flex",children:a("ol",{role:"list",className:"flex items-center space-x-4",children:[e("li",{children:e("div",{children:a("a",{href:"/",className:"text-foreground hover:text-accent",children:[e(f,{"aria-hidden":"true",className:"size-5 shrink-0"}),e("span",{className:"sr-only",children:"Home"})]})})}),o.map((r,s)=>e("li",{children:a("div",{className:"flex items-center",children:[e(c,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),r.href?e("a",{href:r.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label}):e("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label})]})},s))]})})}return e(h,{})}export{H as a,N as b};
1
+ import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as m}from"./chunk-YKG4FNS4.mjs";import{a as i}from"./chunk-255P6K5W.mjs";import{a as l}from"./chunk-HKGW6JI2.mjs";import{ChevronRightIcon as c,HomeIcon as f}from"@heroicons/react/20/solid";import{Fragment as h,jsx as e,jsxs as a}from"react/jsx-runtime";var d={highImpact:i,lowImpact:l,mediumImpact:m,sectionHero:n},H=t=>{let{type:o}=t||{};if(!o||o==="none")return null;let r=d[o];return r?e(r,{...t}):null};function N({breadcrumbItems:t}){if(t&&t.length>0){let o=t.filter(r=>r.label.toLowerCase()!=="home");return e("nav",{"aria-label":"Breadcrumb",className:"flex",children:a("ol",{role:"list",className:"flex items-center space-x-4",children:[e("li",{children:e("div",{children:a("a",{href:"/",className:"text-foreground hover:text-accent",children:[e(f,{"aria-hidden":"true",className:"size-5 shrink-0"}),e("span",{className:"sr-only",children:"Home"})]})})}),o.map((r,s)=>e("li",{children:a("div",{className:"flex items-center",children:[e(c,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),r.href?e("a",{href:r.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label}):e("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label})]})},s))]})})}return e(h,{})}export{H as a,N as b};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as V}from"./chunk-PZFYJ5FS.mjs";import{a as A}from"./chunk-DFIXTV2M.mjs";import{a as I,c as _,d as L,g as O,i as M}from"./chunk-YFAZQYK4.mjs";import{a as z}from"./chunk-B4H6T2GP.mjs";import{a as k}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{motion as H}from"motion/react";import{Save as oe,X as J,Plus as ie,ChevronDown as le,ChevronRight as de,Info as $,File as P,FileText as ce,Type as me,Loader2 as ue}from"lucide-react";import{useEffect as w,useRef as p,useState as y}from"react";import{jsx as t,jsxs as i}from"react/jsx-runtime";function De({document:C,onSave:S,mode:fe="edit",onCancel:U,availableDocuments:K=[],knowledgeContexts:W=[]}){let[s,l]=y({...C,updatedAt:new Date}),[x,X]=y(!1),[d,q]=y(s.richTextContent),[u,R]=y(!1),he=p(null),v=p(""),T=p(null),f=p(null),F=e=>{let a=new WeakSet,n=r=>r&&typeof r=="object"?a.has(r)?null:(a.add(r),Array.isArray(r)?r.map(n):Object.keys(r).sort().reduce((o,c)=>(o[c]=n(r[c]),o),{})):r;return JSON.stringify(n(e))},h=e=>e?e.replace(/\s+/g," ").trim():"",D=()=>s.format==="richText"?F(d):h(s.content),j=()=>{let e={title:h(s.title),description:h(s.description),format:s.format,content:D()},a=F(e),n=5381;for(let r=0;r<a.length;r++)n=n*33^a.charCodeAt(r);return(n>>>0).toString(16)},G=(e,a)=>{if(e===a)return!1;if(s.format!=="richText"){let n=Q(e),r=D();if(n==null)return!0;let o=n.length,c=r.length,g=Math.abs(c-o),b=o===0?1:g/o;return h(n)===h(r)&&g<3?!1:g>=10||b>=.02}return!0},B=p(new Map),Q=e=>{let a=B.current.get(e);return a==null?null:"x".repeat(a)};w(()=>(f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{let e=j(),a=v.current;if(G(a,e)&&(R(!0),S({...s,richTextContent:d},"autosave"),v.current=e,s.format!=="richText")){let n=D();B.current.set(e,n.length)}},800),()=>{f.current&&clearTimeout(f.current)}),[s.title,s.description,s.format,s.content,s.metadata,d]),w(()=>{let e=()=>{let a=j();a!==v.current&&(S({...s,richTextContent:d},"autosave"),v.current=a)};return window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),()=>{window.removeEventListener("pagehide",e),window.removeEventListener("beforeunload",e)}},[s,d]),w(()=>(u&&(T.current=setTimeout(()=>{R(!1)},2e3)),()=>{T.current&&clearTimeout(T.current)}),[u]),w(()=>{l(C)},[C]);let ge=e=>{switch(e){case"markdown":case"mdx":return t(ce,{className:"h-6 w-6 text-primary"});case"richText":return t(P,{className:"h-6 w-6 text-success"});case"text":return t(me,{className:"h-6 w-6 text-muted-foreground"});default:return t(P,{className:"h-6 w-6 text-muted-foreground"})}},Y=e=>{switch(e){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},Z=()=>{let e=new Set,a=new Set;return W.forEach(n=>{n.menuConfig.groupBy.forEach(r=>e.add(r))}),K.forEach(n=>{n.metadata&&Object.keys(n.metadata).forEach(r=>a.add(r))}),{contextKeys:Array.from(e).sort(),documentKeys:Array.from(a).sort(),allKeys:Array.from(new Set([...e,...a])).sort()}},ee=e=>{let a=new Set;return K.forEach(n=>{n.metadata?.[e]&&a.add(String(n.metadata[e]))}),Array.from(a).sort()},te=Z(),ae=()=>{S({...s,richTextContent:d},"autosave")},N=(e,a)=>{l(n=>({...n,metadata:{...n.metadata,[e]:a}}))},ne=(e,a)=>{a==="__custom__"?N(e,""):N(e,a)},se=()=>{N("","")},re=e=>{l(a=>{let n={...a.metadata};return delete n[e],{...a,metadata:n}})};return i(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[i("div",{className:"border-b border-border bg-card p-8 pb-6",children:[i("div",{className:"flex items-start justify-between gap-4 mb-4",children:[t("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:i("div",{className:"flex-1 min-w-0",children:[i("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[t("div",{className:"flex-1 min-w-0",children:t(A,{fieldName:"title",value:s.title,label:"",onSave:(e,a)=>l(n=>({...n,title:a})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),t("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${Y(s.format)} flex-shrink-0 mt-1`,children:s.format.toUpperCase()})]}),t("div",{className:"mt-2",children:t(A,{fieldName:"description",value:s.description||"Click to add description...",label:"",multiline:!0,onSave:(e,a)=>l(n=>({...n,description:a})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),i("div",{className:"flex items-center gap-2 flex-shrink-0",children:[i(m,{variant:"ghost",size:"sm",onClick:()=>X(!x),className:"gap-2",children:[t($,{className:"h-4 w-4"}),"Metadata",s.metadata&&Object.keys(s.metadata).length>0&&t("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(s.metadata).length}),x?t(le,{className:"h-4 w-4"}):t(de,{className:"h-4 w-4"})]}),i(m,{variant:"outline",size:"sm",onClick:U,className:"gap-2",children:[t(J,{className:"h-4 w-4"}),"Close"]}),i(m,{size:"sm",onClick:ae,className:"gap-2",disabled:u,children:[u?t(ue,{className:"h-4 w-4 animate-spin"}):t(oe,{className:"h-4 w-4"}),u?"Auto-saving...":"Save"]})]})]}),t(H.div,{initial:!1,animate:{height:x?"auto":0,opacity:x?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:i("div",{className:"pt-4 border-t border-border mt-4 max-h-full flex gap-2",children:[t("div",{className:"flex items-center justify-between mb-3",children:i("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[t($,{className:"h-4 w-4"}),"Document Metadata"]})}),i("div",{className:"flex flex-col gap-2",children:[t("div",{className:"bg-muted rounded-lg p-4 border border-border",children:s.metadata&&Object.keys(s.metadata).length>0?t("div",{className:"space-y-2",children:Object.entries(s.metadata).map(([e,a],n)=>{let r=ee(e);return i("div",{className:"flex gap-2 items-center",children:[t(k,{value:e,onChange:o=>{let c=o.target.value||"",g=s.metadata?.[e];l(b=>{let E={...b.metadata};return delete E[e],c&&(E[c]=g||""),{...b,metadata:E}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${e}`}),t("datalist",{id:`metadata-keys-${e}`,children:te.allKeys.map(o=>t("option",{value:o},o))}),t("span",{className:"text-muted-foreground text-sm",children:"="}),r.length>0?i(I,{value:String(a||""),onValueChange:o=>ne(e,o),children:[t(L,{className:"flex-1 h-8 text-sm",children:t(_,{placeholder:"Value"})}),i(O,{children:[r.map(o=>t(M,{value:o,children:o},o)),t(M,{value:"__custom__",children:t("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):t(k,{value:String(a||""),onChange:o=>N(e,o.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),t(m,{type:"button",variant:"ghost",size:"sm",onClick:()=>re(e),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:t(J,{className:"h-3 w-3"})})]},`metadata-key-${n}`)})}):i("div",{className:"text-center py-4",children:[t("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),t("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})}),i(m,{type:"button",variant:"outline",size:"sm",onClick:se,className:"gap-1 h-8",children:[t(ie,{className:"h-3 w-3"}),"Add Field"]})]})]})})]}),t("div",{className:"flex-1 overflow-hidden",children:t("div",{className:"p-8 pt-0 h-full max-h-full overflow-auto",children:s.format==="richText"?t(V,{setValue:q,value:d,name:"richTextContent"}):t(z,{value:s.content||"",onChange:e=>l(a=>({...a,content:e.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}export{De as a};
4
+ import{a as V}from"./chunk-VTFO5GXK.mjs";import{a as A}from"./chunk-DFIXTV2M.mjs";import{a as I,c as _,d as L,g as O,i as M}from"./chunk-YFAZQYK4.mjs";import{a as z}from"./chunk-B4H6T2GP.mjs";import{a as k}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{motion as H}from"motion/react";import{Save as oe,X as J,Plus as ie,ChevronDown as le,ChevronRight as de,Info as $,File as P,FileText as ce,Type as me,Loader2 as ue}from"lucide-react";import{useEffect as w,useRef as p,useState as y}from"react";import{jsx as t,jsxs as i}from"react/jsx-runtime";function De({document:C,onSave:S,mode:fe="edit",onCancel:U,availableDocuments:K=[],knowledgeContexts:W=[]}){let[s,l]=y({...C,updatedAt:new Date}),[x,X]=y(!1),[d,q]=y(s.richTextContent),[u,R]=y(!1),he=p(null),v=p(""),T=p(null),f=p(null),F=e=>{let a=new WeakSet,n=r=>r&&typeof r=="object"?a.has(r)?null:(a.add(r),Array.isArray(r)?r.map(n):Object.keys(r).sort().reduce((o,c)=>(o[c]=n(r[c]),o),{})):r;return JSON.stringify(n(e))},h=e=>e?e.replace(/\s+/g," ").trim():"",D=()=>s.format==="richText"?F(d):h(s.content),j=()=>{let e={title:h(s.title),description:h(s.description),format:s.format,content:D()},a=F(e),n=5381;for(let r=0;r<a.length;r++)n=n*33^a.charCodeAt(r);return(n>>>0).toString(16)},G=(e,a)=>{if(e===a)return!1;if(s.format!=="richText"){let n=Q(e),r=D();if(n==null)return!0;let o=n.length,c=r.length,g=Math.abs(c-o),b=o===0?1:g/o;return h(n)===h(r)&&g<3?!1:g>=10||b>=.02}return!0},B=p(new Map),Q=e=>{let a=B.current.get(e);return a==null?null:"x".repeat(a)};w(()=>(f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{let e=j(),a=v.current;if(G(a,e)&&(R(!0),S({...s,richTextContent:d},"autosave"),v.current=e,s.format!=="richText")){let n=D();B.current.set(e,n.length)}},800),()=>{f.current&&clearTimeout(f.current)}),[s.title,s.description,s.format,s.content,s.metadata,d]),w(()=>{let e=()=>{let a=j();a!==v.current&&(S({...s,richTextContent:d},"autosave"),v.current=a)};return window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),()=>{window.removeEventListener("pagehide",e),window.removeEventListener("beforeunload",e)}},[s,d]),w(()=>(u&&(T.current=setTimeout(()=>{R(!1)},2e3)),()=>{T.current&&clearTimeout(T.current)}),[u]),w(()=>{l(C)},[C]);let ge=e=>{switch(e){case"markdown":case"mdx":return t(ce,{className:"h-6 w-6 text-primary"});case"richText":return t(P,{className:"h-6 w-6 text-success"});case"text":return t(me,{className:"h-6 w-6 text-muted-foreground"});default:return t(P,{className:"h-6 w-6 text-muted-foreground"})}},Y=e=>{switch(e){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},Z=()=>{let e=new Set,a=new Set;return W.forEach(n=>{n.menuConfig.groupBy.forEach(r=>e.add(r))}),K.forEach(n=>{n.metadata&&Object.keys(n.metadata).forEach(r=>a.add(r))}),{contextKeys:Array.from(e).sort(),documentKeys:Array.from(a).sort(),allKeys:Array.from(new Set([...e,...a])).sort()}},ee=e=>{let a=new Set;return K.forEach(n=>{n.metadata?.[e]&&a.add(String(n.metadata[e]))}),Array.from(a).sort()},te=Z(),ae=()=>{S({...s,richTextContent:d},"autosave")},N=(e,a)=>{l(n=>({...n,metadata:{...n.metadata,[e]:a}}))},ne=(e,a)=>{a==="__custom__"?N(e,""):N(e,a)},se=()=>{N("","")},re=e=>{l(a=>{let n={...a.metadata};return delete n[e],{...a,metadata:n}})};return i(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[i("div",{className:"border-b border-border bg-card p-8 pb-6",children:[i("div",{className:"flex items-start justify-between gap-4 mb-4",children:[t("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:i("div",{className:"flex-1 min-w-0",children:[i("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[t("div",{className:"flex-1 min-w-0",children:t(A,{fieldName:"title",value:s.title,label:"",onSave:(e,a)=>l(n=>({...n,title:a})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),t("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${Y(s.format)} flex-shrink-0 mt-1`,children:s.format.toUpperCase()})]}),t("div",{className:"mt-2",children:t(A,{fieldName:"description",value:s.description||"Click to add description...",label:"",multiline:!0,onSave:(e,a)=>l(n=>({...n,description:a})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),i("div",{className:"flex items-center gap-2 flex-shrink-0",children:[i(m,{variant:"ghost",size:"sm",onClick:()=>X(!x),className:"gap-2",children:[t($,{className:"h-4 w-4"}),"Metadata",s.metadata&&Object.keys(s.metadata).length>0&&t("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(s.metadata).length}),x?t(le,{className:"h-4 w-4"}):t(de,{className:"h-4 w-4"})]}),i(m,{variant:"outline",size:"sm",onClick:U,className:"gap-2",children:[t(J,{className:"h-4 w-4"}),"Close"]}),i(m,{size:"sm",onClick:ae,className:"gap-2",disabled:u,children:[u?t(ue,{className:"h-4 w-4 animate-spin"}):t(oe,{className:"h-4 w-4"}),u?"Auto-saving...":"Save"]})]})]}),t(H.div,{initial:!1,animate:{height:x?"auto":0,opacity:x?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:i("div",{className:"pt-4 border-t border-border mt-4 max-h-full flex gap-2",children:[t("div",{className:"flex items-center justify-between mb-3",children:i("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[t($,{className:"h-4 w-4"}),"Document Metadata"]})}),i("div",{className:"flex flex-col gap-2",children:[t("div",{className:"bg-muted rounded-lg p-4 border border-border",children:s.metadata&&Object.keys(s.metadata).length>0?t("div",{className:"space-y-2",children:Object.entries(s.metadata).map(([e,a],n)=>{let r=ee(e);return i("div",{className:"flex gap-2 items-center",children:[t(k,{value:e,onChange:o=>{let c=o.target.value||"",g=s.metadata?.[e];l(b=>{let E={...b.metadata};return delete E[e],c&&(E[c]=g||""),{...b,metadata:E}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${e}`}),t("datalist",{id:`metadata-keys-${e}`,children:te.allKeys.map(o=>t("option",{value:o},o))}),t("span",{className:"text-muted-foreground text-sm",children:"="}),r.length>0?i(I,{value:String(a||""),onValueChange:o=>ne(e,o),children:[t(L,{className:"flex-1 h-8 text-sm",children:t(_,{placeholder:"Value"})}),i(O,{children:[r.map(o=>t(M,{value:o,children:o},o)),t(M,{value:"__custom__",children:t("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):t(k,{value:String(a||""),onChange:o=>N(e,o.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),t(m,{type:"button",variant:"ghost",size:"sm",onClick:()=>re(e),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:t(J,{className:"h-3 w-3"})})]},`metadata-key-${n}`)})}):i("div",{className:"text-center py-4",children:[t("p",{className:"text-sm text-muted-foreground mb-2",children:"No metadata fields"}),t("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})}),i(m,{type:"button",variant:"outline",size:"sm",onClick:se,className:"gap-1 h-8",children:[t(ie,{className:"h-3 w-3"}),"Add Field"]})]})]})})]}),t("div",{className:"flex-1 overflow-hidden",children:t("div",{className:"p-8 pt-0 h-full max-h-full overflow-auto",children:s.format==="richText"?t(V,{setValue:q,value:d,name:"richTextContent"}):t(z,{value:s.content||"",onChange:e=>l(a=>({...a,content:e.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}export{De as a};
@@ -1 +1 @@
1
- import{Home as m,Layers as u,Bot as w,Building2 as D,Code as S,Palette as h,TrendingUp as y,Users as p,Wrench as A,DollarSign as b,Scale as f,Package as k,Zap as v,FileText as g,FileImage as T,FileVideo as x,Music as C,File as j}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var M=[{id:"home",title:"Home",icon:t(m,{}),isActive:!0},{id:"teams",title:"Teams",icon:t(p,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:t(u,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:t(w,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:t(g,{}),url:"/knowledge"}],B=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],N=[{id:"design",name:"Design",description:"Creative and visual design team",icon:t(h,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:t(S,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:t(y,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:t(b,{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:t(p,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:t(A,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:t(f,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:t(k,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:t(v,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:t(D,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],n=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],z=[{id:1,name:"Website Redesign",description:"Complete overhaul of company website",progress:75,dueDate:"June 15, 2025",members:4,files:23},{id:2,name:"Mobile App Launch",description:"Design and assets for new mobile application",progress:60,dueDate:"July 30, 2025",members:6,files:42},{id:3,name:"Brand Identity",description:"New brand guidelines and assets",progress:90,dueDate:"May 25, 2025",members:3,files:18},{id:4,name:"Marketing Campaign",description:"Summer promotion materials",progress:40,dueDate:"August 10, 2025",members:5,files:31}],E=[{id:"1",name:"Product Development",description:"Core product development team responsible for building and maintaining our main platform",humanColleagues:8,digitalColleagues:3,projects:5},{id:"2",name:"Design & UX",description:"Creative team focused on user experience design and visual identity",humanColleagues:5,digitalColleagues:2,projects:3},{id:"3",name:"Marketing",description:"Growth and marketing team driving customer acquisition and retention",humanColleagues:6,digitalColleagues:4,projects:7},{id:"4",name:"Data Science",description:"Analytics and machine learning team providing insights and intelligent features",humanColleagues:4,digitalColleagues:6,projects:2},{id:"5",name:"Customer Success",description:"Support and success team ensuring customer satisfaction and retention",humanColleagues:7,digitalColleagues:2,projects:4},{id:"6",name:"Operations",description:"Infrastructure and operations team maintaining system reliability and performance",humanColleagues:3,digitalColleagues:5,projects:3}],l=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],o=[{id:1,name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],d=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],P=[...d,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],I=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],r={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:[]},c={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:d.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)},R=(e,a)=>e.filter(i=>i.status===a),F=(e,a)=>e.filter(i=>typeof i.epic=="object"?i.epic?.id?.toString()===a:i.epic?.toString()===a),U=(e,a)=>e.filter(i=>typeof i.sprint=="object"?(i.sprint?.id||-1).toString()===a:i.sprint?.toString()===a),V={empty:{initialProjects:r.projects,initialEpics:r.epics,initialSprints:r.sprints,initialTasks:r.tasks},default:{initialProjects:n,initialEpics:l,initialSprints:o,initialTasks:d},highDensity:{initialProjects:n,initialEpics:l,initialSprints:o,initialTasks:P},singleEpic:{initialProjects:n,initialEpics:c.epics,initialSprints:o,initialTasks:c.tasks},multipleProjects:{initialProjects:I,initialEpics:l,initialSprints:o,initialTasks:d}},s=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],q=[{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).toString(),dueTime:"14:30",assignedColleague:s.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:n[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:s.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:n[0]},{id:3,title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:s.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:n[0]}],J=[{name:"Project_Requirements.docx",app:"Word",modified:"2 hours ago",icon:t(g,{className:"h-5 w-5 text-blue-500"}),shared:!0,size:"1.2 MB",collaborators:4},{name:"Sprint_Planning_Notes.pdf",app:"PDF Reader",modified:"1 day ago",icon:t(j,{className:"h-5 w-5 text-red-500"}),shared:!1,size:"245 KB",collaborators:0},{name:"UI_Mockups.fig",app:"Figma",modified:"3 days ago",icon:t(T,{className:"h-5 w-5 text-purple-500"}),shared:!0,size:"5.7 MB",collaborators:6},{name:"Demo_Video.mp4",app:"Video Player",modified:"1 week ago",icon:t(x,{className:"h-5 w-5 text-green-500"}),shared:!1,size:"89 MB",collaborators:0},{name:"Meeting_Recording.m4a",app:"Audio Player",modified:"2 weeks ago",icon:t(C,{className:"h-5 w-5 text-orange-500"}),shared:!0,size:"12 MB",collaborators:2}],O=s.filter(e=>e.type==="digital");export{M as a,B as b,N as c,n as d,z as e,E as f,l as g,o as h,d as i,P as j,I as k,r as l,c as m,R as n,F as o,U as p,V as q,s as r,q as s,J as t,O as u};
1
+ import{Home as m,Layers as u,Bot as w,Building2 as S,Code as D,Palette as y,TrendingUp as h,Users as p,Wrench as k,DollarSign as A,Scale as b,Package as f,Zap as v,FileText as g,FileImage as T,FileVideo as C,Music as x,File as j}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var M=[{id:"home",title:"Home",icon:t(m,{}),isActive:!0},{id:"teams",title:"Teams",icon:t(p,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:t(u,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:t(w,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:t(g,{}),url:"/knowledge"}],U=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],B=[{id:"design",name:"Design",description:"Creative and visual design team",icon:t(y,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:t(D,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:t(h,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:t(A,{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:t(p,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:t(k,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:t(b,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:t(f,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:t(v,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:t(S,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],n=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],N=[{id:1,name:"Website Redesign",description:"Complete overhaul of company website",progress:75,dueDate:"June 15, 2025",members:4,files:23},{id:2,name:"Mobile App Launch",description:"Design and assets for new mobile application",progress:60,dueDate:"July 30, 2025",members:6,files:42},{id:3,name:"Brand Identity",description:"New brand guidelines and assets",progress:90,dueDate:"May 25, 2025",members:3,files:18},{id:4,name:"Marketing Campaign",description:"Summer promotion materials",progress:40,dueDate:"August 10, 2025",members:5,files:31}],z=[{id:"1",name:"Product Development",description:"Core product development team responsible for building and maintaining our main platform",humanColleagues:8,digitalColleagues:3,projects:5},{id:"2",name:"Design & UX",description:"Creative team focused on user experience design and visual identity",humanColleagues:5,digitalColleagues:2,projects:3},{id:"3",name:"Marketing",description:"Growth and marketing team driving customer acquisition and retention",humanColleagues:6,digitalColleagues:4,projects:7},{id:"4",name:"Data Science",description:"Analytics and machine learning team providing insights and intelligent features",humanColleagues:4,digitalColleagues:6,projects:2},{id:"5",name:"Customer Success",description:"Support and success team ensuring customer satisfaction and retention",humanColleagues:7,digitalColleagues:2,projects:4},{id:"6",name:"Operations",description:"Infrastructure and operations team maintaining system reliability and performance",humanColleagues:3,digitalColleagues:5,projects:3}],c=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],o=[{id:1,name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],d=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],I=[...d,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],P=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],r={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:[]},l={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:d.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)},E=(e,i)=>e.filter(a=>a.status===i),R=(e,i)=>e.filter(a=>typeof a.epic=="object"?a.epic?.id?.toString()===i:a.epic?.toString()===i),F=(e,i)=>e.filter(a=>typeof a.sprint=="object"?(a.sprint?.id||-1).toString()===i:a.sprint?.toString()===i),V={empty:{initialProjects:r.projects,initialEpics:r.epics,initialSprints:r.sprints,initialTasks:r.tasks},default:{initialProjects:n,initialEpics:c,initialSprints:o,initialTasks:d},highDensity:{initialProjects:n,initialEpics:c,initialSprints:o,initialTasks:I},singleEpic:{initialProjects:n,initialEpics:l.epics,initialSprints:o,initialTasks:l.tasks},multipleProjects:{initialProjects:P,initialEpics:c,initialSprints:o,initialTasks:d}},s=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1,identity:{id:1,keycloakClientId:"123",keycloakUserId:"456",secretManagementMode:"manual",keycloakClientSecret:"new-secret",keycloakSecretArn:"arn:aws:secretsmanager:us-east-1:123456789012:secret:mysecret",keycloakSecretLocation:"us-east-1",keycloakSecretLastUpdated:new Date().toString(),updatedAt:new Date().toString(),createdAt:new Date().toString()}},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1,identity:{id:1,keycloakClientId:"123",keycloakUserId:"456",secretManagementMode:"manual",keycloakClientSecret:"new-secret",keycloakSecretArn:"arn:aws:secretsmanager:us-east-1:123456789012:secret:mysecret",keycloakSecretLocation:"us-east-1",keycloakSecretLastUpdated:new Date().toString(),updatedAt:new Date().toString(),createdAt:new Date().toString()}},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1,identity:{id:1,keycloakClientId:"123",keycloakUserId:"456",secretManagementMode:"manual",keycloakClientSecret:"new-secret",keycloakSecretArn:"arn:aws:secretsmanager:us-east-1:123456789012:secret:mysecret",keycloakSecretLocation:"us-east-1",keycloakSecretLastUpdated:new Date().toString(),updatedAt:new Date().toString(),createdAt:new Date().toString()}},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1,identity:{id:1,keycloakClientId:"123",keycloakUserId:"456",secretManagementMode:"manual",keycloakClientSecret:"new-secret",keycloakSecretArn:"arn:aws:secretsmanager:us-east-1:123456789012:secret:mysecret",keycloakSecretLocation:"us-east-1",keycloakSecretLastUpdated:new Date().toString(),updatedAt:new Date().toString(),createdAt:new Date().toString()}},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),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:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1,identity:{id:1,keycloakClientId:"123",keycloakUserId:"456",secretManagementMode:"manual",keycloakClientSecret:"new-secret",keycloakSecretArn:"arn:aws:secretsmanager:us-east-1:123456789012:secret:mysecret",keycloakSecretLocation:"us-east-1",keycloakSecretLastUpdated:new Date().toString(),updatedAt:new Date().toString(),createdAt:new Date().toString()}}],q=[{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).toString(),dueTime:"14:30",assignedColleague:s.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:n[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:s.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:n[0]},{id:3,title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:s.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:n[0]}],J=[{name:"Project_Requirements.docx",app:"Word",modified:"2 hours ago",icon:t(g,{className:"h-5 w-5 text-blue-500"}),shared:!0,size:"1.2 MB",collaborators:4},{name:"Sprint_Planning_Notes.pdf",app:"PDF Reader",modified:"1 day ago",icon:t(j,{className:"h-5 w-5 text-red-500"}),shared:!1,size:"245 KB",collaborators:0},{name:"UI_Mockups.fig",app:"Figma",modified:"3 days ago",icon:t(T,{className:"h-5 w-5 text-purple-500"}),shared:!0,size:"5.7 MB",collaborators:6},{name:"Demo_Video.mp4",app:"Video Player",modified:"1 week ago",icon:t(C,{className:"h-5 w-5 text-green-500"}),shared:!1,size:"89 MB",collaborators:0},{name:"Meeting_Recording.m4a",app:"Audio Player",modified:"2 weeks ago",icon:t(x,{className:"h-5 w-5 text-orange-500"}),shared:!0,size:"12 MB",collaborators:2}],O=s.filter(e=>e.type==="digital");export{M as a,U as b,B as c,n as d,N as e,z as f,c as g,o as h,d as i,I as j,P as k,r as l,l as m,E as n,R as o,F as p,V as q,s as r,q as s,J as t,O as u};
@@ -1 +1 @@
1
- import{a as q}from"./chunk-KZCIHFTM.mjs";import{a as J}from"./chunk-UM57PWI7.mjs";import{a as b}from"./chunk-KG7HG2VO.mjs";import{a as Q}from"./chunk-L3V5YDPH.mjs";import{a as G}from"./chunk-QC2UWZWL.mjs";import{a as V}from"./chunk-Z22NSJMF.mjs";import{a as w}from"./chunk-UVHMI3PU.mjs";import{b as F}from"./chunk-CSBGSBEU.mjs";import fe,{useEffect as c,useState as i,useRef as l}from"react";import{jsx as n,jsxs as T}from"react/jsx-runtime";var ye=({initialTasks:m=[],initialEpics:v=[],initialSprints:h=[],initialUsers:ke=[],initialColleagues:A=[],initialProjects:Te=[],onAddTask:W,onUpdateTask:C,onDeleteTask:x,onTaskClick:X,onAddEpic:Y,onAddComment:Z})=>{let[_,p]=i([]),[d,y]=i([]),[O,ee]=i([]),[H,N]=i(!1),[P,M]=i(!1),[r,u]=i(null),[E,B]=i(null),[te,ve]=i([]),[I,se]=i([]),[g,R]=i(0),o=l(null),ae=l(null),ne=fe.useMemo(()=>[...d.map(e=>e.id),0],[d]),U=l(""),j=l(""),$=l(""),K=l(""),f=e=>e.map(t=>`${t.id}-${new Date(t.createdAt).getTime()}-${new Date(t.updatedAt).getTime()}`).join("-");c(()=>{let e=f(m);e!==U.current&&(p(m),r&&u(m.find(t=>t.id===r.id)||null),U.current=e)},[m]),c(()=>{let e=f(v);e!==j.current&&(y(v),j.current=e)},[v]),c(()=>{let e=f(h);e!==$.current&&(ee(h),$.current=e)},[h]),c(()=>{let e=f(A.map(t=>({id:t.id,updatedAt:t.updatedAt,createdAt:t.createdAt})));e!==K.current&&(se(A),K.current=e)},[A]),c(()=>{let e=()=>{if(o.current){let a=o.current.offsetHeight;R(a)}};e();let t=new ResizeObserver(e);o.current&&t.observe(o.current);let s=()=>{setTimeout(e,100)};return window.addEventListener("storage",s),()=>{t.disconnect(),window.removeEventListener("storage",s)}},[]),c(()=>{let e=setTimeout(()=>{o.current&&R(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[H,P]);let ie=_.filter(e=>!0),re=e=>ie.filter(t=>t.status===e),oe=e=>{let t={};return d.forEach(s=>{t[s.id]=e.filter(a=>w(a.epic)===s.id)}),t["no-epic"]=e.filter(s=>!w(s.epic)),t},L=e=>{B(e)},de=e=>{E&&(p(t=>t.map(s=>s.id===E.id?{...s,status:e}:s)),C?.(E.id.toString(),{status:e}),B(null))},ce=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(s=>[...s,t]),W?.(e)},le=async(e,t)=>{p(s=>s.map(a=>a.id===Number(e)?{...a,...t}:a)),C&&await C(e,t),r?.id===Number(e)&&u(s=>({...s,...t}))},pe=async e=>{p(t=>t.filter(s=>s.id!==Number(e))),r?.id===Number(e)&&u(null),x&&await x(e)},ue=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};y(s=>[...s,t]),Y?.(e)},z=e=>{u(e),X?.(e)},me=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ge=g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)";return T("div",{ref:ae,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[n("div",{ref:o,className:"flex-shrink-0",children:n(V,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>N(!0)},secondaryAction:{label:"Add epic",onClick:()=>M(!0)}})}),n("div",{className:"flex-1 min-h-0 mt-8",children:n("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:n("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:me.map(e=>{let t=re(e.status),s=oe(t);return T(q,{title:e.title,status:e.status,taskCount:t.length,onDrop:de,isCompact:e.status==="done",height:ge,children:[s["no-epic"].map(a=>n(b,{epic:null,task:a,onDragStart:L,onTaskClick:z,isCompact:e.status==="done"},a.id)),ne.map(a=>{let D=d.find(k=>k.id===a),S=s[a]||[];return S.length===0?null:T("div",{className:"mb-6",children:[T("div",{className:"flex items-center gap-2 mb-3",children:[n("div",{className:`w-3 h-3 rounded-full ${D?.color}`}),n("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:D?.name||"No Epic"}),n(F,{variant:"secondary",className:"text-xs",children:S.length})]})," ",n("div",{className:"space-y-3",children:S.map(k=>n(b,{task:k,epic:D,onDragStart:L,onTaskClick:z,isCompact:e.status==="done"},k.id))})]},a)})]},e.id)})})})}),n(G,{isOpen:H,onClose:()=>N(!1),onAddTask:ce,assignees:[...I,...te],epics:d,sprints:O}),n(Q,{isOpen:P,onClose:()=>M(!1),onAddEpic:ue}),r&&n(J,{isOpen:!!r,onClose:()=>u(null),initialTask:r,epics:d,sprints:O,onUpdateTask:le,onDeleteTask:pe,colleagues:I,onAddComment:Z})]})};export{ye as a};
1
+ import{a as J}from"./chunk-UM57PWI7.mjs";import{a as b}from"./chunk-KG7HG2VO.mjs";import{a as q}from"./chunk-KZCIHFTM.mjs";import{a as Q}from"./chunk-L3V5YDPH.mjs";import{a as G}from"./chunk-QC2UWZWL.mjs";import{a as V}from"./chunk-Z22NSJMF.mjs";import{a as w}from"./chunk-UVHMI3PU.mjs";import{b as F}from"./chunk-CSBGSBEU.mjs";import fe,{useEffect as c,useState as i,useRef as l}from"react";import{jsx as n,jsxs as T}from"react/jsx-runtime";var ye=({initialTasks:m=[],initialEpics:v=[],initialSprints:h=[],initialUsers:ke=[],initialColleagues:A=[],initialProjects:Te=[],onAddTask:W,onUpdateTask:C,onDeleteTask:x,onTaskClick:X,onAddEpic:Y,onAddComment:Z})=>{let[_,p]=i([]),[d,y]=i([]),[O,ee]=i([]),[H,N]=i(!1),[P,M]=i(!1),[r,u]=i(null),[E,B]=i(null),[te,ve]=i([]),[I,se]=i([]),[g,R]=i(0),o=l(null),ae=l(null),ne=fe.useMemo(()=>[...d.map(e=>e.id),0],[d]),U=l(""),j=l(""),$=l(""),K=l(""),f=e=>e.map(t=>`${t.id}-${new Date(t.createdAt).getTime()}-${new Date(t.updatedAt).getTime()}`).join("-");c(()=>{let e=f(m);e!==U.current&&(p(m),r&&u(m.find(t=>t.id===r.id)||null),U.current=e)},[m]),c(()=>{let e=f(v);e!==j.current&&(y(v),j.current=e)},[v]),c(()=>{let e=f(h);e!==$.current&&(ee(h),$.current=e)},[h]),c(()=>{let e=f(A.map(t=>({id:t.id,updatedAt:t.updatedAt,createdAt:t.createdAt})));e!==K.current&&(se(A),K.current=e)},[A]),c(()=>{let e=()=>{if(o.current){let a=o.current.offsetHeight;R(a)}};e();let t=new ResizeObserver(e);o.current&&t.observe(o.current);let s=()=>{setTimeout(e,100)};return window.addEventListener("storage",s),()=>{t.disconnect(),window.removeEventListener("storage",s)}},[]),c(()=>{let e=setTimeout(()=>{o.current&&R(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[H,P]);let ie=_.filter(e=>!0),re=e=>ie.filter(t=>t.status===e),oe=e=>{let t={};return d.forEach(s=>{t[s.id]=e.filter(a=>w(a.epic)===s.id)}),t["no-epic"]=e.filter(s=>!w(s.epic)),t},L=e=>{B(e)},de=e=>{E&&(p(t=>t.map(s=>s.id===E.id?{...s,status:e}:s)),C?.(E.id.toString(),{status:e}),B(null))},ce=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(s=>[...s,t]),W?.(e)},le=async(e,t)=>{p(s=>s.map(a=>a.id===Number(e)?{...a,...t}:a)),C&&await C(e,t),r?.id===Number(e)&&u(s=>({...s,...t}))},pe=async e=>{p(t=>t.filter(s=>s.id!==Number(e))),r?.id===Number(e)&&u(null),x&&await x(e)},ue=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};y(s=>[...s,t]),Y?.(e)},z=e=>{u(e),X?.(e)},me=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ge=g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)";return T("div",{ref:ae,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[n("div",{ref:o,className:"flex-shrink-0",children:n(V,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>N(!0)},secondaryAction:{label:"Add epic",onClick:()=>M(!0)}})}),n("div",{className:"flex-1 min-h-0 mt-8",children:n("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:n("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:me.map(e=>{let t=re(e.status),s=oe(t);return T(q,{title:e.title,status:e.status,taskCount:t.length,onDrop:de,isCompact:e.status==="done",height:ge,children:[s["no-epic"].map(a=>n(b,{epic:null,task:a,onDragStart:L,onTaskClick:z,isCompact:e.status==="done"},a.id)),ne.map(a=>{let D=d.find(k=>k.id===a),S=s[a]||[];return S.length===0?null:T("div",{className:"mb-6",children:[T("div",{className:"flex items-center gap-2 mb-3",children:[n("div",{className:`w-3 h-3 rounded-full ${D?.color}`}),n("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:D?.name||"No Epic"}),n(F,{variant:"secondary",className:"text-xs",children:S.length})]})," ",n("div",{className:"space-y-3",children:S.map(k=>n(b,{task:k,epic:D,onDragStart:L,onTaskClick:z,isCompact:e.status==="done"},k.id))})]},a)})]},e.id)})})})}),n(G,{isOpen:H,onClose:()=>N(!1),onAddTask:ce,assignees:[...I,...te],epics:d,sprints:O}),n(Q,{isOpen:P,onClose:()=>M(!1),onAddEpic:ue}),r&&n(J,{isOpen:!!r,onClose:()=>u(null),initialTask:r,epics:d,sprints:O,onUpdateTask:le,onDeleteTask:pe,colleagues:I,onAddComment:Z})]})};export{ye as a};