cortex-react-components 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/dist/{chunk-XI5H6WLY.mjs → chunk-2GZQYAN3.mjs} +1 -1
  2. package/dist/chunk-2VR4KIQL.mjs +4 -0
  3. package/dist/{chunk-WHDJPD5E.mjs → chunk-45DDMEV4.mjs} +1 -1
  4. package/dist/{chunk-HH3AWPYB.mjs → chunk-5KS3DITB.mjs} +1 -1
  5. package/dist/{chunk-G6ED5Z4J.mjs → chunk-66ODXUVL.mjs} +1 -1
  6. package/dist/{chunk-LAQ3QAUW.mjs → chunk-75WE6ZXB.mjs} +1 -1
  7. package/dist/{chunk-PLTKMHUH.mjs → chunk-BDNY6OKE.mjs} +1 -1
  8. package/dist/{chunk-IUT6JJHY.mjs → chunk-BGADMIWV.mjs} +1 -1
  9. package/dist/{chunk-DUEPJ3F4.mjs → chunk-BN747TQM.mjs} +1 -1
  10. package/dist/{chunk-A3SUL73A.mjs → chunk-FXTFE74U.mjs} +1 -1
  11. package/dist/{chunk-KXZFR7TI.mjs → chunk-GH3F4DKW.mjs} +1 -1
  12. package/dist/{chunk-6T4OEOJH.mjs → chunk-GIL2SMPM.mjs} +1 -1
  13. package/dist/{chunk-XBCYPOFD.mjs → chunk-GTK2SGS5.mjs} +1 -1
  14. package/dist/{chunk-U7GAPI7X.mjs → chunk-I4LKRX2X.mjs} +1 -1
  15. package/dist/{chunk-ISBVFNWD.mjs → chunk-IDG2O4B7.mjs} +1 -1
  16. package/dist/chunk-IPV2NFB6.mjs +1 -0
  17. package/dist/chunk-JHSHXYPK.mjs +4 -0
  18. package/dist/{chunk-VKJ7E6OL.mjs → chunk-JLUX7EHB.mjs} +1 -1
  19. package/dist/{chunk-436WKDWG.mjs → chunk-JT65KF7C.mjs} +1 -1
  20. package/dist/chunk-LUPNE23E.mjs +1 -0
  21. package/dist/{chunk-KJMXSFJA.mjs → chunk-M74BIPBM.mjs} +1 -1
  22. package/dist/{chunk-OJYMSL24.mjs → chunk-NBWEIVGC.mjs} +1 -1
  23. package/dist/{chunk-EVZSRWUW.mjs → chunk-NXG2Y4N4.mjs} +1 -1
  24. package/dist/chunk-PA4ZBJDO.mjs +1 -0
  25. package/dist/{chunk-QDAJ7QAD.mjs → chunk-PRK2XFAZ.mjs} +1 -1
  26. package/dist/{chunk-EG646342.mjs → chunk-RVDQVN5C.mjs} +1 -1
  27. package/dist/{chunk-LC2RBE7W.mjs → chunk-S5BLSQXV.mjs} +1 -1
  28. package/dist/chunk-SWA5TRPZ.mjs +4 -0
  29. package/dist/{chunk-S562PA5P.mjs → chunk-T36QUKC6.mjs} +1 -1
  30. package/dist/{chunk-UIMLXZPF.mjs → chunk-TCXAETN2.mjs} +1 -1
  31. package/dist/{chunk-V2KCUPP5.mjs → chunk-TRFGSHZW.mjs} +1 -1
  32. package/dist/{chunk-TO2UDP5T.mjs → chunk-UA76VX54.mjs} +1 -1
  33. package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
  34. package/dist/{chunk-OEFXIEY3.mjs → chunk-V5W32NJ4.mjs} +1 -1
  35. package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
  36. package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
  37. package/dist/{chunk-IQ3TUH7O.mjs → chunk-WDZOGIT2.mjs} +1 -1
  38. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  39. package/dist/{chunk-M4NJB4NN.mjs → chunk-Y62OBV2E.mjs} +1 -1
  40. package/dist/chunk-ZCEVYZEO.mjs +4 -0
  41. package/dist/{chunk-DY2G774J.mjs → chunk-ZZ6VZFRV.mjs} +1 -1
  42. package/dist/components/AdvancedComponents/sidebar.js +1 -1
  43. package/dist/components/AdvancedComponents/sidebar.mjs +3 -1
  44. package/dist/components/Blocks/Banner.mjs +1 -1
  45. package/dist/components/Blocks/CallToAction.mjs +1 -1
  46. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  47. package/dist/components/Blocks/Content.mjs +1 -1
  48. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  49. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  50. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  51. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  52. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  53. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  54. package/dist/components/Blocks/index.mjs +1 -1
  55. package/dist/components/Cards/ContentCard.mjs +1 -1
  56. package/dist/components/Cards/FeatureCard.mjs +1 -1
  57. package/dist/components/Cards/index.mjs +1 -1
  58. package/dist/components/Chat/CAPABILITIES_README.js +12 -5
  59. package/dist/components/Chat/CAPABILITIES_README.mjs +12 -5
  60. package/dist/components/Chat/{EnhancedChatInterface.d.ts → ChatInterface.d.ts} +4 -6
  61. package/dist/components/Chat/ChatInterface.js +5 -0
  62. package/dist/components/Chat/ChatInterface.mjs +1 -0
  63. package/dist/components/Chat/CopilotInterface.d.ts +27 -86
  64. package/dist/components/Chat/CopilotInterface.js +1 -1
  65. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  66. package/dist/components/Chat/chat-session-sidebar.d.ts +0 -2
  67. package/dist/components/Chat/chat-session-sidebar.js +1 -1
  68. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  69. package/dist/components/Chat/demo.d.ts +7 -0
  70. package/dist/components/Chat/demo.js +5 -0
  71. package/dist/components/Chat/demo.mjs +1 -0
  72. package/dist/components/Chat/example-usage.d.ts +39 -0
  73. package/dist/components/Chat/example-usage.js +5 -0
  74. package/dist/components/Chat/example-usage.mjs +1 -0
  75. package/dist/components/Chat/index.d.ts +2 -0
  76. package/dist/components/Chat/index.js +2 -2
  77. package/dist/components/Chat/index.mjs +1 -1
  78. package/dist/components/Chat/types.d.ts +16 -0
  79. package/dist/components/Chat/types.js +1 -0
  80. package/dist/components/Chat/types.mjs +1 -0
  81. package/dist/components/DigitalColleagues/DigitalColleageusLayout.d.ts +2 -1
  82. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  83. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  84. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  85. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  86. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  87. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  88. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  89. package/dist/components/DigitalColleagues/sidebar-favorites-readme.js +228 -0
  90. package/dist/components/DigitalColleagues/sidebar-favorites-readme.mjs +228 -0
  91. package/dist/components/{dc-temp/sidebar.d.ts → DigitalColleagues/sidebar-new.d.ts} +3 -2
  92. package/dist/components/DigitalColleagues/sidebar-new.js +5 -0
  93. package/dist/components/DigitalColleagues/sidebar-new.mjs +4 -0
  94. package/dist/components/DigitalColleagues/sidebar.css +1 -0
  95. package/dist/components/DigitalColleagues/sidebar.d.ts +17 -0
  96. package/dist/components/DigitalColleagues/sidebar.js +5 -0
  97. package/dist/components/DigitalColleagues/sidebar.mjs +2 -0
  98. package/dist/components/DigitalColleagues/test-data.js +1 -1
  99. package/dist/components/DigitalColleagues/test-data.mjs +1 -1
  100. package/dist/components/DigitalColleagues/types.d.ts +3 -0
  101. package/dist/components/DigitalColleagues/types.js +1 -1
  102. package/dist/components/HeaderFooter/Header.mjs +1 -1
  103. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  104. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  105. package/dist/components/HeaderFooter/enhanced-header.css +1 -0
  106. package/dist/components/HeaderFooter/index.mjs +1 -1
  107. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  108. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  109. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  110. package/dist/components/Heros/RenderHero.mjs +1 -1
  111. package/dist/components/Heros/index.mjs +1 -1
  112. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  113. package/dist/components/Holidays/index.mjs +1 -1
  114. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  115. package/dist/components/Layouts/Print.mjs +1 -1
  116. package/dist/components/Layouts/SlideShow.mjs +1 -1
  117. package/dist/components/Layouts/index.mjs +1 -1
  118. package/dist/components/Payload/Card/index.mjs +1 -1
  119. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  120. package/dist/components/Payload/Media/index.mjs +1 -1
  121. package/dist/components/Payload/RichText/index.mjs +1 -1
  122. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  123. package/dist/components/Payload/index.mjs +1 -1
  124. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  125. package/dist/components/Projects/ProjectPage.js +1 -1
  126. package/dist/components/Projects/ProjectPage.mjs +1 -1
  127. package/dist/components/Projects/ProjectView.mjs +1 -1
  128. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  129. package/dist/components/dc-temp/index.mjs +1 -1
  130. package/dist/components/index.d.ts +0 -1
  131. package/dist/components/index.js +10 -10
  132. package/dist/components/index.mjs +1 -1
  133. package/dist/globals.css +1 -1
  134. package/dist/index.js +15 -15
  135. package/dist/index.mjs +1 -1
  136. package/dist/metafile-cjs.json +1 -1
  137. package/dist/metafile-esm.json +1 -1
  138. package/dist/pages/Blog.mjs +1 -1
  139. package/dist/pages/Documentation.mjs +1 -1
  140. package/dist/pages/IndexPage.mjs +1 -1
  141. package/dist/pages/Intranet.mjs +1 -1
  142. package/dist/pages/LandingPage.mjs +1 -1
  143. package/dist/pages/Page.mjs +1 -1
  144. package/dist/pages/Publish.mjs +1 -1
  145. package/dist/pages/Website.mjs +1 -1
  146. package/dist/sections/AboutSection.mjs +1 -1
  147. package/dist/sections/BlogDetail.mjs +1 -1
  148. package/dist/sections/BlogList.mjs +1 -1
  149. package/dist/sections/ContactSection.mjs +1 -1
  150. package/dist/sections/PageSections.mjs +1 -1
  151. package/dist/sections/PricingSection.mjs +1 -1
  152. package/dist/sections/ServiceDetail.mjs +1 -1
  153. package/dist/sections/ServiceDetailSection.mjs +1 -1
  154. package/dist/sections/ServiceSection.mjs +1 -1
  155. package/dist/sections/index.mjs +1 -1
  156. package/package.json +6 -2
  157. package/dist/chunk-5Z5PL7N3.mjs +0 -1
  158. package/dist/chunk-DLUWDQSW.mjs +0 -4
  159. package/dist/chunk-R7LPCFUJ.mjs +0 -4
  160. package/dist/chunk-TO7KJNKC.mjs +0 -4
  161. package/dist/chunk-UNS6CTQZ.mjs +0 -4
  162. package/dist/components/.archive/ai-chat-interface.d.ts +0 -70
  163. package/dist/components/Chat/EnhancedChatInterface.js +0 -5
  164. package/dist/components/Chat/EnhancedChatInterface.mjs +0 -4
  165. package/dist/components/Chat/ai-chat-interface.d.ts +0 -70
  166. package/dist/components/Chat/ai-chat-interface.js +0 -5
  167. package/dist/components/Chat/ai-chat-interface.mjs +0 -4
  168. package/dist/components/dc-temp/sidebar.js +0 -5
  169. package/dist/components/dc-temp/sidebar.mjs +0 -4
  170. /package/dist/components/Chat/{EnhancedChatInterface.css → ChatInterface.css} +0 -0
  171. /package/dist/components/Chat/{ai-chat-interface.css → demo.css} +0 -0
  172. /package/dist/components/{dc-temp/enhanced-header.css → Chat/example-usage.css} +0 -0
  173. /package/dist/components/{dc-temp/sidebar.css → DigitalColleagues/sidebar-new.css} +0 -0
  174. /package/dist/components/{dc-temp → HeaderFooter}/enhanced-header.d.ts +0 -0
  175. /package/dist/components/{dc-temp → HeaderFooter}/enhanced-header.js +0 -0
  176. /package/dist/components/{dc-temp → HeaderFooter}/enhanced-header.mjs +0 -0
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  'use client'
4
4
 
5
- "use strict";"use client";var xa=Object.create;var _e=Object.defineProperty;var Ca=Object.getOwnPropertyDescriptor;var Na=Object.getOwnPropertyNames;var ka=Object.getPrototypeOf,Da=Object.prototype.hasOwnProperty;var Pa=(e,t)=>{for(var a in t)_e(e,a,{get:t[a],enumerable:!0})},At=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Na(t))!Da.call(e,r)&&r!==a&&_e(e,r,{get:()=>t[r],enumerable:!(i=Ca(t,r))||i.enumerable});return e};var Q=(e,t,a)=>(a=e!=null?xa(ka(e)):{},At(t||!e||!e.__esModule?_e(a,"default",{value:e,enumerable:!0}):a,e)),Sa=e=>At(_e({},"__esModule",{value:!0}),e);var Ni={};Pa(Ni,{default:()=>va});module.exports=Sa(Ni);var le=require("react"),pt=require("framer-motion"),ha=require("lucide-react");var Ut=require("clsx");var bt="-",Aa=e=>{let t=Ra(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{let n=c.split(bt);return n[0]===""&&n.length!==1&&n.shift(),Tt(n,t)||Ma(c)},getConflictingClassGroupIds:(c,n)=>{let N=a[c]||[];return n&&i[c]?[...N,...i[c]]:N}}},Tt=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],i=t.nextPart.get(a),r=i?Tt(e.slice(1),i):void 0;if(r)return r;if(t.validators.length===0)return;let o=e.join(bt);return t.validators.find(({validator:c})=>c(o))?.classGroupId},Mt=/^\[(.+)\]$/,Ma=e=>{if(Mt.test(e)){let t=Mt.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Ra=e=>{let{theme:t,prefix:a}=e,i={nextPart:new Map,validators:[]};return Ia(Object.entries(e.classGroups),a).forEach(([o,c])=>{ft(c,i,o,t)}),i},ft=(e,t,a,i)=>{e.forEach(r=>{if(typeof r=="string"){let o=r===""?t:Rt(t,r);o.classGroupId=a;return}if(typeof r=="function"){if(Ta(r)){ft(r(i),t,a,i);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([o,c])=>{ft(c,Rt(t,o),a,i)})})},Rt=(e,t)=>{let a=e;return t.split(bt).forEach(i=>{a.nextPart.has(i)||a.nextPart.set(i,{nextPart:new Map,validators:[]}),a=a.nextPart.get(i)}),a},Ta=e=>e.isThemeGetter,Ia=(e,t)=>t?e.map(([a,i])=>{let r=i.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([c,n])=>[t+c,n])):o);return[a,r]}):e,Ba=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,i=new Map,r=(o,c)=>{a.set(o,c),t++,t>e&&(t=0,i=a,a=new Map)};return{get(o){let c=a.get(o);if(c!==void 0)return c;if((c=i.get(o))!==void 0)return r(o,c),c},set(o,c){a.has(o)?a.set(o,c):r(o,c)}}},It="!",za=e=>{let{separator:t,experimentalParseClassName:a}=e,i=t.length===1,r=t[0],o=t.length,c=n=>{let N=[],p=0,f=0,g;for(let m=0;m<n.length;m++){let b=n[m];if(p===0){if(b===r&&(i||n.slice(m,m+o)===t)){N.push(n.slice(f,m)),f=m+o;continue}if(b==="/"){g=m;continue}}b==="["?p++:b==="]"&&p--}let B=N.length===0?n:n.substring(f),F=B.startsWith(It),z=F?B.substring(1):B,u=g&&g>f?g-f:void 0;return{modifiers:N,hasImportantModifier:F,baseClassName:z,maybePostfixModifierPosition:u}};return a?n=>a({className:n,parseClassName:c}):c},La=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(i=>{i[0]==="["?(t.push(...a.sort(),i),a=[]):a.push(i)}),t.push(...a.sort()),t},Ea=e=>({cache:Ba(e.cacheSize),parseClassName:za(e),...Aa(e)}),Ua=/\s+/,ja=(e,t)=>{let{parseClassName:a,getClassGroupId:i,getConflictingClassGroupIds:r}=t,o=[],c=e.trim().split(Ua),n="";for(let N=c.length-1;N>=0;N-=1){let p=c[N],{modifiers:f,hasImportantModifier:g,baseClassName:B,maybePostfixModifierPosition:F}=a(p),z=!!F,u=i(z?B.substring(0,F):B);if(!u){if(!z){n=p+(n.length>0?" "+n:n);continue}if(u=i(B),!u){n=p+(n.length>0?" "+n:n);continue}z=!1}let m=La(f).join(":"),b=g?m+It:m,S=b+u;if(o.includes(S))continue;o.push(S);let A=r(u,z);for(let L=0;L<A.length;++L){let W=A[L];o.push(b+W)}n=p+(n.length>0?" "+n:n)}return n};function Fa(){let e=0,t,a,i="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Bt(t))&&(i&&(i+=" "),i+=a);return i}var Bt=e=>{if(typeof e=="string")return e;let t,a="";for(let i=0;i<e.length;i++)e[i]&&(t=Bt(e[i]))&&(a&&(a+=" "),a+=t);return a};function Ha(e,...t){let a,i,r,o=c;function c(N){let p=t.reduce((f,g)=>g(f),e());return a=Ea(p),i=a.cache.get,r=a.cache.set,o=n,n(N)}function n(N){let p=i(N);if(p)return p;let f=ja(N,a);return r(N,f),f}return function(){return o(Fa.apply(null,arguments))}}var I=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},zt=/^\[(?:([a-z-]+):)?(.+)\]$/i,Oa=/^\d+\/\d+$/,$a=new Set(["px","full","screen"]),Ga=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Va=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(Ft|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Wa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ka=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_a=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,de=e=>Ie(e)||$a.has(e)||Oa.test(e),be=e=>Be(e,"length",ti),Ie=e=>!!e&&!Number.isNaN(Number(e)),gt=e=>Be(e,"number",Ie),Ue=e=>!!e&&Number.isInteger(Number(e)),qa=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),C=e=>zt.test(e),he=e=>Ga.test(e),Ja=new Set(["length","size","percentage"]),Xa=e=>Be(e,Ja,Lt),Qa=e=>Be(e,"position",Lt),Ya=new Set(["image","url"]),Za=e=>Be(e,Ya,ii),ei=e=>Be(e,"",ai),je=()=>!0,Be=(e,t,a)=>{let i=zt.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):a(i[2]):!1},ti=e=>Va.test(e)&&!Wa.test(e),Lt=()=>!1,ai=e=>Ka.test(e),ii=e=>_a.test(e);var oi=()=>{let e=I("colors"),t=I("spacing"),a=I("blur"),i=I("brightness"),r=I("borderColor"),o=I("borderRadius"),c=I("borderSpacing"),n=I("borderWidth"),N=I("contrast"),p=I("grayscale"),f=I("hueRotate"),g=I("invert"),B=I("gap"),F=I("gradientColorStops"),z=I("gradientColorStopPositions"),u=I("inset"),m=I("margin"),b=I("opacity"),S=I("padding"),A=I("saturate"),L=I("scale"),W=I("sepia"),K=I("skew"),_=I("space"),X=I("translate"),$=()=>["auto","contain","none"],te=()=>["auto","hidden","clip","visible","scroll"],h=()=>["auto",C,t],d=()=>[C,t],T=()=>["",de,be],ce=()=>["auto",Ie,C],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["solid","dashed","dotted","double","none"],Ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>["start","end","center","between","around","evenly","stretch"],Pe=()=>["","0",C],mt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[Ie,C];return{cacheSize:500,separator:":",theme:{colors:[je],spacing:[de,be],blur:["none","",he,C],brightness:oe(),borderColor:[e],borderRadius:["none","","full",he,C],borderSpacing:d(),borderWidth:T(),contrast:oe(),grayscale:Pe(),hueRotate:oe(),invert:Pe(),gap:d(),gradientColorStops:[e],gradientColorStopPositions:[qa,be],inset:h(),margin:h(),opacity:oe(),padding:d(),saturate:oe(),scale:oe(),sepia:Pe(),skew:oe(),space:d(),translate:d()},classGroups:{aspect:[{aspect:["auto","square","video",C]}],container:["container"],columns:[{columns:[he]}],"break-after":[{"break-after":mt()}],"break-before":[{"break-before":mt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...We(),C]}],overflow:[{overflow:te()}],"overflow-Ft":[{"overflow-Ft":te()}],"overflow-Ft":[{"overflow-Ft":te()}],overscroll:[{overscroll:$()}],"overscroll-Ft":[{"overscroll-Ft":$()}],"overscroll-Ft":[{"overscroll-Ft":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[u]}],"inset-Ft":[{"inset-Ft":[u]}],"inset-Ft":[{"inset-Ft":[u]}],start:[{start:[u]}],end:[{end:[u]}],top:[{top:[u]}],right:[{right:[u]}],bottom:[{bottom:[u]}],left:[{left:[u]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ue,C]}],basis:[{basis:h()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",C]}],grow:[{grow:Pe()}],shrink:[{shrink:Pe()}],order:[{order:["first","last","none",Ue,C]}],"grid-cols":[{"grid-cols":[je]}],"col-start-end":[{col:["auto",{span:["full",Ue,C]},C]}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[je]}],"row-start-end":[{row:["auto",{span:[Ue,C]},C]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",C]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",C]}],gap:[{gap:[B]}],"gap-Ft":[{"gap-Ft":[B]}],"gap-Ft":[{"gap-Ft":[B]}],"justify-content":[{justify:["normal",...Ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-Ft":[{"space-Ft":[_]}],"space-Ft-reverse":["space-Ft-reverse"],"space-Ft":[{"space-Ft":[_]}],"space-Ft-reverse":["space-Ft-reverse"],Ft:[{Ft:["auto","min","max","fit","svw","lvw","dvw",C,t]}],"min-Ft":[{"min-Ft":[C,t,"min","max","fit"]}],"max-Ft":[{"max-Ft":[C,t,"none","full","min","max","fit","prose",{screen:[he]},he]}],h:[{h:[C,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[C,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[C,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[C,t,"auto","min","max","fit"]}],"font-size":[{text:["base",he,be]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gt]}],"font-family":[{font:[je]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",C]}],"line-clamp":[{"line-clamp":["none",Ie,gt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",de,C]}],"list-image":[{"list-image":["none",C]}],"list-style-type":[{list:["none","disc","decimal",C]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",de,be]}],"underline-offset":[{"underline-offset":["auto",de,C]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:d()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",C]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),Qa]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","Ft","Ft","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Xa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","Ft","tl"]},Za]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[z]}],"gradient-via-pos":[{via:[z]}],"gradient-to-pos":[{to:[z]}],"gradient-from":[{from:[F]}],"gradient-via":[{via:[F]}],"gradient-to":[{to:[F]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-Ft":[{"rounded-Ft":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-pt":[{"rounded-pt":[o]}],"rounded-Ft":[{"rounded-Ft":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-Ft":[{border:[n]}],"border-Ft-Ft":[{"border-Ft":[n]}],"border-Ft-Ft":[{"border-Ft":[n]}],"border-Ft-s":[{"border-s":[n]}],"border-Ft-e":[{"border-e":[n]}],"border-Ft-t":[{"border-t":[n]}],"border-Ft-r":[{"border-r":[n]}],"border-Ft-b":[{"border-b":[n]}],"border-Ft-Ft":[{"border-Ft":[n]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...De(),"hidden"]}],"divide-Ft":[{"divide-Ft":[n]}],"divide-Ft-reverse":["divide-Ft-reverse"],"divide-Ft":[{"divide-Ft":[n]}],"divide-Ft-reverse":["divide-Ft-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:De()}],"border-color":[{border:[r]}],"border-color-Ft":[{"border-Ft":[r]}],"border-color-Ft":[{"border-Ft":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-Ft":[{"border-Ft":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...De()]}],"outline-offset":[{"outline-offset":[de,C]}],"outline-Ft":[{outline:[de,be]}],"outline-color":[{outline:[e]}],"ring-Ft":[{ring:T()}],"ring-Ft-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-Ft":[{"ring-offset":[de,be]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",he,ei]}],"shadow-color":[{shadow:[je]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...Ke(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ke()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[i]}],contrast:[{contrast:[N]}],"drop-shadow":[{"drop-shadow":["","none",he,C]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[g]}],saturate:[{saturate:[A]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[N]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-Ft":[{"border-spacing-Ft":[c]}],"border-spacing-Ft":[{"border-spacing-Ft":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",C]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",C]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",C]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-Ft":[{"scale-Ft":[L]}],"scale-Ft":[{"scale-Ft":[L]}],rotate:[{rotate:[Ue,C]}],"translate-Ft":[{"translate-Ft":[X]}],"translate-Ft":[{"translate-Ft":[X]}],"skew-Ft":[{"skew-Ft":[K]}],"skew-Ft":[{"skew-Ft":[K]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",C]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","Ft-resize","ne-resize","nw-resize","pt-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",C]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","Ft","Ft",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":d()}],"scroll-mx":[{"scroll-mx":d()}],"scroll-my":[{"scroll-my":d()}],"scroll-ms":[{"scroll-ms":d()}],"scroll-me":[{"scroll-me":d()}],"scroll-mt":[{"scroll-mt":d()}],"scroll-mr":[{"scroll-mr":d()}],"scroll-mb":[{"scroll-mb":d()}],"scroll-ml":[{"scroll-ml":d()}],"scroll-p":[{"scroll-p":d()}],"scroll-px":[{"scroll-px":d()}],"scroll-py":[{"scroll-py":d()}],"scroll-ps":[{"scroll-ps":d()}],"scroll-pe":[{"scroll-pe":d()}],"scroll-pt":[{"scroll-pt":d()}],"scroll-pr":[{"scroll-pr":d()}],"scroll-pb":[{"scroll-pb":d()}],"scroll-pl":[{"scroll-pl":d()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","Ft","Ft","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-Ft":[{"touch-pan":["Ft","left","right"]}],"touch-Ft":[{"touch-pan":["Ft","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",C]}],fill:[{fill:[e,"none"]}],"stroke-Ft":[{stroke:[de,be,gt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-Ft","overflow-Ft"],overscroll:["overscroll-Ft","overscroll-Ft"],inset:["inset-Ft","inset-Ft","start","end","top","right","bottom","left"],"inset-Ft":["right","left"],"inset-Ft":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-Ft","gap-Ft"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["Ft","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-Ft","rounded-ss","rounded-pt","rounded-Ft","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-pt","rounded-Ft"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-Ft":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-Ft","border-spacing-Ft"],"border-Ft":["border-Ft-s","border-Ft-e","border-Ft-t","border-Ft-r","border-Ft-b","border-Ft-Ft"],"border-Ft-Ft":["border-Ft-r","border-Ft-Ft"],"border-Ft-Ft":["border-Ft-t","border-Ft-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-Ft"],"border-color-Ft":["border-color-r","border-color-Ft"],"border-color-Ft":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-Ft","touch-Ft","touch-pz"],"touch-Ft":["touch"],"touch-Ft":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Et=Ha(oi);function s(...e){return Et((0,Ut.clsx)(e))}var Yt=Q(require("react")),xt=Q(require("next/link"));var jt=require("class-variance-authority");var Ft=require("react/jsx-runtime"),ni=(0,jt.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ve({className:e,variant:t,...a}){return(0,Ft.jsx)("div",{className:s(ni({variant:t}),e),...a})}var Ht=require("@radix-ui/react-slot"),$t=Q(require("react")),ri=(0,jt.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 Ft-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),M=$t.forwardRef(({asChild:e=!1,className:t,size:a,variant:i,...r},o)=>(0,Ft.jsx)(e?Ht.Slot:"button",{className:s(ri({className:t,size:a,variant:i})),ref:o,...r}));M.displayName="Button";var Vt=Q(require("react"));var Fe=Vt.forwardRef(({className:e,type:t,...a},i)=>(0,Ft.jsx)("input",{type:t,className:s("flex h-9 Ft-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...a}));Fe.displayName="Input";var ht=Q(require("react")),Z=Q(require("@radix-ui/react-scroll-area"));var pe=ht.forwardRef(({className:e,children:t,...a},i)=>(0,Ft.jsxs)(Z.Root,{ref:i,className:s("relative overflow-hidden",e),...a,children:[(0,Ft.jsx)(Z.Viewport,{className:"h-full Ft-full rounded-[inherit]",children:t}),(0,Ft.jsx)(Kt,{}),(0,Ft.jsx)(Z.Corner,{})]}));pe.displayName=Z.Root.displayName;var Kt=ht.forwardRef(({className:e,orientation:t="vertical",...a},i)=>(0,Ft.jsx)(Z.ScrollAreaScrollbar,{ref:i,orientation:t,className:s("flex touch-none select-none transition-colors",t==="vertical"&&"h-full Ft-2.5 border-Ft border-Ft-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,Ft.jsx)(Z.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Kt.displayName=Z.ScrollAreaScrollbar.displayName;var me=Q(require("react")),D=Q(require("@radix-ui/react-dropdown-menu")),ze=require("@radix-ui/react-icons");var qe=D.Root,Je=D.Trigger;var si=me.forwardRef(({className:e,inset:t,children:a,...i},r)=>(0,Ft.jsxs)(D.SubTrigger,{ref:r,className:s("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[a,(0,Ft.jsx)(ze.ChevronRightIcon,{className:"ml-auto"})]}));si.displayName=D.SubTrigger.displayName;var li=me.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)(D.SubContent,{ref:a,className:s("z-50 min-Ft-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));li.displayName=D.SubContent.displayName;var He=me.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,Ft.jsx)(D.Portal,{children:(0,Ft.jsx)(D.Content,{ref:i,sideOffset:t,className:s("z-50 min-Ft-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));He.displayName=D.Content.displayName;var Oe=me.forwardRef(({className:e,inset:t,...a},i)=>(0,Ft.jsx)(D.Item,{ref:i,className:s("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Oe.displayName=D.Item.displayName;var ci=me.forwardRef(({className:e,children:t,checked:a,...i},r)=>(0,Ft.jsxs)(D.CheckboxItem,{ref:r,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...i,children:[(0,Ft.jsx)("span",{className:"absolute left-2 flex h-3.5 Ft-3.5 items-center justify-center",children:(0,Ft.jsx)(D.ItemIndicator,{children:(0,Ft.jsx)(ze.CheckIcon,{className:"h-4 Ft-4"})})}),t]}));ci.displayName=D.CheckboxItem.displayName;var di=me.forwardRef(({className:e,children:t,...a},i)=>(0,Ft.jsxs)(D.RadioItem,{ref:i,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,Ft.jsx)("span",{className:"absolute left-2 flex h-3.5 Ft-3.5 items-center justify-center",children:(0,Ft.jsx)(D.ItemIndicator,{children:(0,Ft.jsx)(ze.DotFilledIcon,{className:"h-4 Ft-4 fill-current"})})}),t]}));di.displayName=D.RadioItem.displayName;var vt=me.forwardRef(({className:e,inset:t,...a},i)=>(0,Ft.jsx)(D.Label,{ref:i,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));vt.displayName=D.Label.displayName;var yt=me.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)(D.Separator,{ref:a,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));yt.displayName=D.Separator.displayName;var pi=({className:e,...t})=>(0,Ft.jsx)("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});pi.displayName="DropdownMenuShortcut";function qt({currentUnit:e,businessUnits:t,onUnitChange:a,className:i}){let[r,o]=(0,le.useState)(!1);return(0,Ft.jsxs)(qe,{open:r,onOpenChange:o,children:[(0,Ft.jsx)(Je,{asChild:!0,children:(0,Ft.jsxs)(M,{variant:"ghost",role:"combobox","aria-expanded":r,className:s("Ft-full justify-between rounded-2xl px-3 py-2 h-auto min-h-[44px] hover:bg-muted/50",i),children:[(0,Ft.jsxs)("div",{className:"flex items-center gap-3 min-Ft-0 flex-1",children:[(0,Ft.jsx)("div",{className:s("flex h-8 Ft-8 items-center justify-center rounded-lg text-white",e.color),children:e.icon}),(0,Ft.jsxs)("div",{className:"flex flex-col items-start min-Ft-0 flex-1",children:[(0,Ft.jsx)("span",{className:"font-medium text-sm truncate Ft-full text-left",children:e.name}),(0,Ft.jsx)("span",{className:"text-xs text-muted-foreground truncate Ft-full text-left",children:e.description})]})]}),(0,Ft.jsx)(ha.ChevronDown,{className:"ml-2 h-4 Ft-4 shrink-0 opacity-50"})]})}),(0,Ft.jsxs)(He,{className:"Ft-[280px] p-2",align:"start",children:[(0,Ft.jsx)(vt,{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Switch Business Unit"}),(0,Ft.jsx)(yt,{}),(0,Ft.jsx)("div",{className:"grid gap-1",children:t&&t.length>0?t.map(c=>(0,Ft.jsxs)(Oe,{className:"flex items-center gap-3 p-2 rounded-lg cursor-pointer",onSelect:()=>{a(c),o(!1)},children:[(0,Ft.jsx)("div",{className:s("flex h-8 Ft-8 items-center justify-center rounded-lg text-white",c.color),children:c.icon}),(0,Ft.jsxs)("div",{className:"flex flex-col items-start min-Ft-0 flex-1",children:[(0,Ft.jsxs)("div",{className:"flex items-center gap-2 Ft-full",children:[(0,Ft.jsx)("span",{className:"font-medium text-sm truncate",children:c.name}),e.id===c.id&&(0,Ft.jsx)(ha.Check,{className:"h-4 Ft-4 text-primary"})]}),(0,Ft.jsx)("span",{className:"text-xs text-muted-foreground truncate Ft-full",children:c.description})]})]},c.id)):(0,Ft.jsx)("div",{className:"flex items-center justify-center p-4 text-sm text-muted-foreground",children:"No business units available"})})]})]})}var ne=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),Xt=[{title:"Home",icon:(0,Ft.jsx)(ha.Home,{}),isActive:!0},{title:"Teams",icon:(0,Ft.jsx)(ha.Users,{}),url:"/teams",items:[{title:"Design",url:"#"},{title:"Marketing",url:"#"},{title:"Finance",url:"#"}]},{title:"Projects",icon:(0,Ft.jsx)(ha.Layers,{}),badge:"4",items:[{title:"Active Projects",url:"#",badge:"4"},{title:"Archived",url:"#"},{title:"Templates",url:"#"}]},{title:"Copilot",icon:(0,Ft.jsx)(ha.Bot,{}),url:"/copilot"},{title:"Knowledge",icon:(0,Ft.jsx)(ha.FileText,{}),url:"/knowledge"}],Qt=[{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")}],at=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Ft.jsx)(ha.Palette,{className:"h-4 Ft-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Ft.jsx)(ha.Code,{className:"h-4 Ft-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Ft.jsx)(ha.TrendingUp,{className:"h-4 Ft-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Ft.jsx)(ha.DollarSign,{className:"h-4 Ft-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,Ft.jsx)(ha.Users,{className:"h-4 Ft-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Ft.jsx)(ha.Wrench,{className:"h-4 Ft-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Ft.jsx)(ha.Scale,{className:"h-4 Ft-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Ft.jsx)(ha.Package,{className:"h-4 Ft-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Ft.jsx)(ha.Zap,{className:"h-4 Ft-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Ft.jsx)(ha.Building2,{className:"h-4 Ft-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Ze=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var wt=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Qe=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],tt=[{id:"1",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],mi=[...tt,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],ui=[...Ze,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Ye={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:[]},Jt={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:tt.filter(e=>e.epicId==="1")};var qi={empty:{initialProjects:Ye.projects,initialEpics:Ye.epics,initialSprints:Ye.sprints,initialTasks:Ye.tasks},default:{initialProjects:Ze,initialEpics:wt,initialSprints:Qe,initialTasks:tt},highDensity:{initialProjects:Ze,initialEpics:wt,initialSprints:Qe,initialTasks:mi},singleEpic:{initialProjects:Ze,initialEpics:Jt.epics,initialSprints:Qe,initialTasks:Jt.tasks},multipleProjects:{initialProjects:ui,initialEpics:wt,initialSprints:Qe,initialTasks:tt}},et=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(ne),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(ne),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(ne),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(ne),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","Ft","Statistics"].map(ne),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(ne),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(ne),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(ne),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(ne),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(ne),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Ji=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:et.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:et.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:et.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Xi=et.filter(e=>e.type==="digital");function Ct({items:e,isOpen:t,isMobile:a=!1,onClose:i,currentBusinessUnit:r=at[0],onBusinessUnitChange:o,className:c,logo:n="/headerlogo.png",appName:N="Nuvia",tagline:p="Collaboration Platform"}){let[f,g]=Yt.useState({}),B=m=>{g(b=>({...b,[m]:!b[m]}))},F=m=>{o?.(m)},z=m=>{let b=(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsxs)("div",{className:"flex items-center gap-3",children:[m.icon,(0,Ft.jsx)("span",{children:m.title})]}),m.badge&&(0,Ft.jsx)(ve,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:m.badge}),m.items&&(0,Ft.jsx)(ha.ChevronDown,{className:s("ml-2 h-4 Ft-4 transition-transform",f[m.title]?"rotate-180":"")})]}),S=s("flex Ft-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",m.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return m.url?(0,Ft.jsx)(xt.default,{href:m.url,className:S,onClick:a?i:void 0,children:b}):(0,Ft.jsx)("button",{className:S,onClick:()=>m.items&&B(m.title),children:b})},u=(0,Ft.jsxs)("div",{className:"flex h-full flex-col border-r bg-background",children:[(0,Ft.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Ft.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ft.jsx)("div",{className:"flex h-14 Ft-14 items-center justify-center ",children:(0,Ft.jsx)("img",{src:n,alt:"Header Logo",className:"h-14 Ft-14 object-contain"})}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsxs)("h2",{className:"font-semibold",children:[N,(0,Ft.jsx)("br",{})]}),(0,Ft.jsxs)("p",{className:"text-xs text-muted-foreground",children:[p,(0,Ft.jsx)("br",{})]})]})]}),a&&(0,Ft.jsx)(M,{variant:"ghost",size:"icon",onClick:i,children:(0,Ft.jsx)(ha.X,{className:"h-5 Ft-5"})})]}),(0,Ft.jsx)("div",{className:"px-3 py-2",children:(0,Ft.jsxs)("div",{className:"relative",children:[(0,Ft.jsx)(ha.Search,{className:"absolute left-3 top-3 h-4 Ft-4 text-muted-foreground"}),(0,Ft.jsx)(Fe,{type:"search",placeholder:"Search...",className:"Ft-full rounded-2xl bg-muted pl-9 pr-4 py-2"})]})}),(0,Ft.jsx)("div",{className:"px-3 pb-2",children:(0,Ft.jsx)(qt,{currentUnit:r,onUnitChange:F})}),(0,Ft.jsx)(pe,{className:"flex-1 px-3 py-2",children:(0,Ft.jsx)("div",{className:"space-Ft-1",children:e.map(m=>(0,Ft.jsxs)("div",{className:"mb-1",children:[z(m),m.items&&f[m.title]&&(0,Ft.jsx)("div",{className:"mt-1 ml-6 space-Ft-1 border-Ft pl-3",children:m.items.map(b=>(0,Ft.jsxs)(xt.default,{href:b.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?i:void 0,children:[b.title,b.badge&&(0,Ft.jsx)(ve,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:b.badge})]},b.title))})]},m.title))})}),(0,Ft.jsx)("div",{className:"border-t p-3",children:(0,Ft.jsx)("div",{className:"space-Ft-1",children:(0,Ft.jsxs)("button",{className:"flex Ft-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Ft.jsx)(ha.Settings,{className:"h-5 Ft-5"}),(0,Ft.jsx)("span",{children:"Settings"})]})})})]});return a?(0,Ft.jsx)("div",{className:s("fixed inset-Ft-0 left-0 z-50 Ft-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-Ft-0":"-translate-Ft-full",c),children:u}):(0,Ft.jsx)("div",{className:s("fixed inset-Ft-0 left-0 z-30 Ft-64 transform border-r bg-background transition-transform duration-300 ease-in-out",t?"translate-Ft-0":"-translate-Ft-full",c),children:u})}var it=Q(require("react")),ue=Q(require("@radix-ui/react-avatar"));var Se=it.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)(ue.Root,{ref:a,className:s("relative flex h-10 Ft-10 shrink-0 overflow-hidden rounded-full",e),...t}));Se.displayName=ue.Root.displayName;var Nt=it.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)(ue.Image,{ref:a,className:s("aspect-square h-full Ft-full",e),...t}));Nt.displayName=ue.Image.displayName;var xe=it.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)(ue.Fallback,{ref:a,className:s("flex h-full Ft-full items-center justify-center rounded-full bg-muted",e),...t}));xe.displayName=ue.Fallback.displayName;var Zt=Q(require("react")),ae=Q(require("@radix-ui/react-tooltip"));var nt=ae.Provider,rt=ae.Root,st=ae.Trigger,$e=Zt.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,Ft.jsx)(ae.Portal,{children:(0,Ft.jsx)(ae.Content,{ref:i,sideOffset:t,className:s("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));$e.displayName=ae.Content.displayName;var ea=require("next-themes");function ta(){let{setTheme:e,theme:t}=(0,ea.useTheme)();return(0,Ft.jsx)(nt,{children:(0,Ft.jsxs)(rt,{children:[(0,Ft.jsx)(st,{asChild:!0,children:(0,Ft.jsxs)(M,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Ft.jsx)(ha.Sun,{className:"h-5 Ft-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Ft.jsx)(ha.Moon,{className:"absolute h-5 Ft-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Ft.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Ft.jsx)($e,{children:"Toggle theme"})]})})}function aa({notifications:e,open:t,onClose:a,onNotificationRemove:i,onRemoveAll:r,className:o}){let c=e.filter(p=>!p.read),n=c.length,N=p=>{switch(p){case"info":return(0,Ft.jsx)(ha.Info,{className:"h-5 Ft-5 text-blue-500"});case"success":return(0,Ft.jsx)(ha.Check,{className:"h-5 Ft-5 text-green-500"});case"warning":return(0,Ft.jsx)(ha.AlertTriangle,{className:"h-5 Ft-5 text-amber-500"});case"error":return(0,Ft.jsx)(ha.AlertTriangle,{className:"h-5 Ft-5 text-red-500"})}};return(0,Ft.jsx)(pt.AnimatePresence,{children:t&&(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(pt.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,Ft.jsx)(pt.motion.div,{initial:{Ft:"100%"},animate:{Ft:0},exit:{Ft:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:s("fixed inset-Ft-0 right-0 z-50 Ft-full max-Ft-sm border-Ft bg-background shadow-lg md:Ft-96",o),children:(0,Ft.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Ft.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,Ft.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ft.jsx)(ha.Bell,{className:"h-5 Ft-5"}),(0,Ft.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),n>0&&(0,Ft.jsxs)(ve,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[n," new"]})]}),(0,Ft.jsxs)(M,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Ft.jsx)(ha.X,{className:"h-5 Ft-5"}),(0,Ft.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n>0&&(0,Ft.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,Ft.jsxs)("span",{className:"text-sm text-muted-foreground",children:[n," unread notification",n!==1?"s":""]}),(0,Ft.jsx)(M,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),c.length>0?(0,Ft.jsx)(pe,{className:"flex-1",children:(0,Ft.jsx)("div",{className:"divide-Ft",children:c.map(p=>(0,Ft.jsxs)("div",{className:s("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Ft.jsx)("div",{className:"flex h-10 Ft-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:N(p.type)}),(0,Ft.jsxs)("div",{className:"flex-1 space-Ft-1",children:[(0,Ft.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ft.jsx)("p",{className:"font-medium",children:p.title}),(0,Ft.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ft.jsx)("p",{className:"text-xs text-muted-foreground",children:p.time}),(0,Ft.jsx)(M,{variant:"ghost",size:"sm",className:"h-6 Ft-6 p-0",onClick:()=>i?.(p.id),title:"Dismiss",children:(0,Ft.jsx)(ha.Check,{className:"h-3 Ft-3"})})]})]}),(0,Ft.jsx)("p",{className:"text-sm text-muted-foreground",children:p.description}),p.actionLabel&&(0,Ft.jsxs)(M,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:p.onAction,children:[p.actionLabel,(0,Ft.jsx)(ha.ChevronRight,{className:"ml-1 h-3 Ft-3"})]})]})]},p.id))})}):(0,Ft.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Ft.jsx)("div",{className:"flex h-16 Ft-16 items-center justify-center rounded-full bg-muted",children:(0,Ft.jsx)(ha.Bell,{className:"h-8 Ft-8 text-muted-foreground"})}),(0,Ft.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,Ft.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Ae=Q(require("@radix-ui/react-tabs"));function ia({className:e,...t}){return(0,Ft.jsx)(Ae.Root,{"data-slot":"tabs",className:s("flex flex-col gap-2",e),...t})}function oa({className:e,...t}){return(0,Ft.jsx)(Ae.List,{"data-slot":"tabs-list",className:s("bg-muted text-muted-foreground inline-flex h-9 Ft-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function na({className:e,...t}){return(0,Ft.jsx)(Ae.Trigger,{"data-slot":"tabs-trigger",className:s("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function sa({activeTab:e,onTabChange:t,tabOptions:a,className:i="",maxWidth:r="700px",gridCols:o=6}){let c=a.find(n=>n.value===e);return(0,Ft.jsxs)(pt.motion.div,{className:`flex-1 flex justify-center ${i}`,initial:{opacity:0,Ft:-20},animate:{opacity:1,Ft:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Ft.jsx)("div",{className:"hidden md:block",children:(0,Ft.jsx)(ia,{value:e,onValueChange:t,children:(0,Ft.jsx)(oa,{className:"grid Ft-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(o,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,Ft.jsx)(pt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Ft.jsx)(na,{value:n.value,className:"Ft-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,Ft.jsx)("div",{className:"md:hidden",children:(0,Ft.jsxs)(qe,{children:[(0,Ft.jsx)(Je,{asChild:!0,children:(0,Ft.jsxs)(M,{variant:"outline",className:"rounded-2xl min-Ft-[140px] justify-between",children:[c?.label||"Select",(0,Ft.jsx)(ha.ChevronDown,{className:"h-4 Ft-4 ml-2"})]})}),(0,Ft.jsx)(He,{align:"center",className:"Ft-[180px]",children:a.map(n=>(0,Ft.jsx)(Oe,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function la({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:i,sidebarOpen:r=!0,className:o,activeTab:c="assistant",onTabChange:n,showTabs:N=!0,tabOptions:p=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:f,actionIcon:g=(0,Ft.jsx)(ha.Bot,{className:"mr-2 h-4 Ft-4"}),actionText:B="Action",onNotificationRemove:F,onRemoveAll:z,logo:u="/headerlogo.png",appName:m="Nuvia",tagline:b="Collaboration Platform"}){let[S,A]=(0,le.useState)(!1),[L,W]=(0,le.useState)(t),K=L.filter($=>!$.read).length,_=$=>{W(te=>te.filter(h=>h.id!==$)),F?.($)},X=()=>{W($=>$.filter(te=>te.read)),z?.()};return(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 border-b bg-background/95 px-4 backdrop-blur ${o||""}`,children:[(0,Ft.jsx)(M,{variant:"ghost",size:"icon",className:"md:hidden",onClick:i,children:(0,Ft.jsx)(ha.Menu,{className:"h-5 Ft-5"})}),(0,Ft.jsx)(M,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Ft.jsx)(ha.PanelLeft,{className:"h-5 Ft-5"})}),!r&&(0,Ft.jsxs)(pt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,Ft:-20},animate:{opacity:1,Ft:0},transition:{duration:.3},children:[(0,Ft.jsx)("div",{className:"flex h-10 Ft-10 items-center justify-center",children:(0,Ft.jsx)("img",{src:u,alt:"Logo",className:"h-10 Ft-10 object-contain"})}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)("h2",{className:"font-semibold text-sm",children:m}),(0,Ft.jsx)("p",{className:"text-xs text-muted-foreground",children:b})]})]}),(0,Ft.jsxs)("div",{className:"flex flex-1 items-center",children:[N&&(0,Ft.jsx)(sa,{activeTab:c,onTabChange:n,tabOptions:p}),(0,Ft.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Ft.jsx)(pt.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,Ft:20},animate:{opacity:1,Ft:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,Ft.jsx)(pt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ft.jsxs)(M,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:f,children:[g,B]})})}),(0,Ft.jsx)(ta,{}),(0,Ft.jsx)(nt,{children:(0,Ft.jsxs)(rt,{children:[(0,Ft.jsx)(st,{asChild:!0,children:(0,Ft.jsx)(pt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ft.jsxs)(M,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>A(!0),children:[(0,Ft.jsx)(pt.motion.div,{animate:K>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:K>0?1/0:0,repeatDelay:3},children:(0,Ft.jsx)(ha.Bell,{className:"h-5 Ft-5"})}),K>0&&(0,Ft.jsx)(pt.motion.span,{className:"absolute -right-1 -top-1 flex h-5 Ft-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:K})]})})}),(0,Ft.jsx)($e,{children:"Notifications"})]})}),(0,Ft.jsx)(pt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ft.jsxs)(Se,{className:"h-9 Ft-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Ft.jsx)(Nt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Ft.jsx)(xe,{})]})})]})]})]}),(0,Ft.jsx)(aa,{notifications:L,open:S,onClose:()=>A(!1),onNotificationRemove:_,onRemoveAll:X})]})}var ca=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Ft.jsx)(ha.User,{className:"h-4 Ft-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function pa({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:i=[],currentBusinessUnit:r=ca[0],onBusinessUnitChange:o,businessUnits:c=ca,activeTab:n,onTabChange:N,showTabs:p=!1,onActionClick:f,actionIcon:g,actionText:B="Action",onNotificationRemove:F,onRemoveAll:z,logo:u="/headerlogo.png",appName:m="Nuvia",tagline:b="Collaboration Platform"}){let[S,A]=(0,le.useState)(!0),[L,W]=(0,le.useState)(!1),[K,_]=(0,le.useState)(r),X=$=>{_($),o?.($)};return(0,Ft.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl border bg-background Ft-[]",children:[L&&(0,Ft.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>W(!1)}),(0,Ft.jsx)("div",{className:"md:hidden",children:(0,Ft.jsx)(Ct,{items:e,isOpen:L,isMobile:!0,onClose:()=>W(!1),currentBusinessUnit:K,onBusinessUnitChange:X,logo:u,appName:m,tagline:b})}),(0,Ft.jsx)("div",{className:"hidden md:block",children:(0,Ft.jsx)(Ct,{items:e,isOpen:S,isMobile:!1,currentBusinessUnit:K,onBusinessUnitChange:X,logo:u,appName:m,tagline:b})}),(0,Ft.jsxs)("div",{className:s("min-h-screen fixed Ft-full transition-all duration-300 ease-in-out",S?"md:pl-64":"md:pl-0"),children:[(0,Ft.jsx)(la,{title:a,notifications:i,onToggleSidebar:()=>A(!S),onToggleMobileMenu:()=>W(!0),sidebarOpen:S,activeTab:n,onTabChange:N,showTabs:p,onActionClick:f,actionIcon:g,actionText:B,onNotificationRemove:F,onRemoveAll:z,logo:u,appName:m,tagline:b}),(0,Ft.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var Me=Q(require("react"));var Ve=Me.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)("div",{ref:a,className:s("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ve.displayName="Card";var gi=Me.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)("div",{ref:a,className:s("flex flex-col space-Ft-1.5 p-6",e),...t}));gi.displayName="CardHeader";var fi=Me.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)("div",{ref:a,className:s("font-semibold leading-none tracking-tight",e),...t}));fi.displayName="CardTitle";var bi=Me.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)("div",{ref:a,className:s("text-sm text-muted-foreground",e),...t}));bi.displayName="CardDescription";var hi=Me.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)("div",{ref:a,className:s("p-6 pt-0",e),...t}));hi.displayName="CardContent";var vi=Me.forwardRef(({className:e,...t},a)=>(0,Ft.jsx)("div",{ref:a,className:s("flex items-center p-6 pt-0",e),...t}));vi.displayName="CardFooter";function ma({sessions:e,currentSession:t,teams:a,onNewChat:i,onSessionSelect:r,onSessionEdit:o,onSessionDelete:c,className:n}){let N=p=>{let g=Math.floor((new Date().getTime()-p.getTime())/(1e3*60));return g<1?"Just now":g<60?`${g}m ago`:g<1440?`${Math.floor(g/60)}h ago`:`${Math.floor(g/1440)}d ago`};return(0,Ft.jsx)("div",{className:`space-Ft-4 ${n||""}`,children:(0,Ft.jsxs)(Ve,{className:"shadow-sm",children:[(0,Ft.jsx)("div",{className:"p-4 border-b",children:(0,Ft.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ft.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Ft.jsx)(ha.Clock,{className:"h-4 Ft-4"}),"Recent Chats"]}),(0,Ft.jsxs)(M,{onClick:i,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,Ft.jsx)(ha.Plus,{className:"h-3 Ft-3"}),"New"]})]})}),(0,Ft.jsx)(pe,{className:"h-[600px]",children:(0,Ft.jsx)("div",{className:"p-2",children:e.length===0?(0,Ft.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(p=>{let f=a.find(g=>g.id===p.teamId);return(0,Ft.jsx)("div",{className:s("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===p.id&&"bg-muted border"),onClick:()=>r(p),children:(0,Ft.jsx)("div",{className:"flex items-start gap-3",children:(0,Ft.jsxs)("div",{className:"flex-1 min-Ft-0",children:[(0,Ft.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,Ft.jsx)("h4",{className:"font-medium text-sm truncate",children:p.title}),(0,Ft.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ft.jsx)("span",{className:"text-xs text-muted-foreground flex-shrink-0",children:N(p.timestamp)}),(0,Ft.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[o&&(0,Ft.jsx)(M,{variant:"ghost",size:"icon",className:"h-5 Ft-5 rounded",onClick:g=>{g.stopPropagation(),o(p.id)},children:(0,Ft.jsx)(ha.Edit3,{className:"h-3 Ft-3"})}),c&&(0,Ft.jsx)(M,{variant:"ghost",size:"icon",className:"h-5 Ft-5 rounded text-destructive hover:text-destructive",onClick:g=>{g.stopPropagation(),c(p.id)},children:(0,Ft.jsx)(ha.Trash2,{className:"h-3 Ft-3"})})]})]})]}),(0,Ft.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:p.lastMessage})]})})},p.id)})})})]})})}var ua={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},St=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function ga(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function fa({capabilities:e,isOpen:t,onToggle:a,onActionSelect:i,onContextChange:r,colorScheme:o=ua,className:c}){let[n,N]=(0,le.useState)([]),[p,f]=(0,le.useState)([]),g=n[n.length-1],B=g?.children||e,F=(A,L)=>{switch(A.type){case"category":return o.categories[L%o.categories.length];case"list":return o.lists[L%o.lists.length];case"item":return o.items[L%o.items.length];default:return o.primary}},z=(0,le.useMemo)(()=>({path:n,selectedItems:p,filters:{}}),[n,p]);(0,le.useEffect)(()=>{r&&r(z)},[z,r]);let u=A=>{A.type==="category"||A.type==="list"?N([...n,A]):A.type==="item"&&f([...p,A])},m=()=>{N(n.slice(0,-1))},b=A=>{N(n.slice(0,A+1))},S=()=>g?.actions?g.actions:[];return t?(0,Ft.jsxs)("div",{className:s("Ft-full",c),children:[(0,Ft.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ft.jsxs)("div",{className:"flex items-center gap-2",children:[n.length>0&&(0,Ft.jsx)(pt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:m,className:s("group p-1 h-6 Ft-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ft.jsx)(ha.ChevronLeft,{className:s("h-3 Ft-3 transition-transform duration-300 ease-in-out","group-hover:-translate-Ft-0.5")})}),(0,Ft.jsx)("h4",{className:"font-medium text-sm",children:g?.name||"Capabilities"})]}),(0,Ft.jsx)(pt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:s("group p-1 h-6 Ft-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ft.jsx)(ha.X,{className:s("h-3 Ft-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),n.length>0&&(0,Ft.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Ft.jsx)(pt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>N([]),className:s("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ft.jsxs)("span",{className:"relative",children:["Capabilities",(0,Ft.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Ft-0 h-0.5 bg-accent transform -translate-Ft-1/2 transition-all duration-300 ease-in-out group-hover:Ft-full"})]})}),n.map((A,L)=>(0,Ft.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ft.jsx)(ha.ChevronRight,{className:"h-2 Ft-2"}),(0,Ft.jsx)(pt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>b(L),className:s("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ft.jsxs)("span",{className:"relative",children:[A.name,(0,Ft.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Ft-0 h-0.5 bg-accent transform -translate-Ft-1/2 transition-all duration-300 ease-in-out group-hover:Ft-full"})]})})]},A.id))]}),(0,Ft.jsx)("div",{className:"max-h-40 overflow-Ft-auto",children:(0,Ft.jsx)(pt.AnimatePresence,{mode:"wait",children:(0,Ft.jsx)(pt.motion.div,{initial:{opacity:0,Ft:-4},animate:{opacity:1,Ft:0},exit:{opacity:0,Ft:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:g?.type==="list"&&g.data?(0,Ft.jsx)(xi,{data:g.data,onItemSelect:A=>f([...p,A]),colorScheme:o}):(0,Ft.jsx)(yi,{capabilities:B,onSelect:u,colorScheme:o})},g?.id||"root")})})]}):(0,Ft.jsxs)(M,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Ft.jsx)(ha.Menu,{className:"h-4 Ft-4"}),(0,Ft.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function yi({capabilities:e,onSelect:t,colorScheme:a}){return(0,Ft.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((i,r)=>(0,Ft.jsx)(wi,{capability:i,onClick:()=>t(i),color:a.categories[r%a.categories.length]},i.id))})}function wi({capability:e,onClick:t,selected:a,color:i}){return(0,Ft.jsxs)(pt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:s("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,Ft.jsx)("div",{className:s("Ft-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",i)}),(0,Ft.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Ft.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Ft-0 h-0.5 bg-accent transform -translate-Ft-1/2 transition-all duration-300 ease-in-out group-hover:Ft-full"})]}),(e.children||e.data)&&(0,Ft.jsx)(ha.ChevronRight,{className:s("h-3 Ft-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-Ft-0.5")}),e.type==="list"&&e.data&&(0,Ft.jsx)(ve,{variant:"secondary",className:s("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function xi({data:e,onItemSelect:t,colorScheme:a}){return(0,Ft.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((i,r)=>(0,Ft.jsxs)(pt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:s("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(i),children:[(0,Ft.jsx)("div",{className:s("Ft-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[r%a.items.length])}),(0,Ft.jsxs)("div",{className:"flex-1 min-Ft-0",children:[(0,Ft.jsxs)("span",{className:"truncate relative font-medium",children:[i.title,(0,Ft.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 Ft-0 h-0.5 bg-accent transform -translate-Ft-1/2 transition-all duration-300 ease-in-out group-hover:Ft-full"})]}),i.subtitle&&(0,Ft.jsx)("div",{className:s("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:i.subtitle})]}),i.value&&(0,Ft.jsx)(ve,{variant:"secondary",className:s("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:i.value})]},i.id))})}function ba({messages:e,input:t,isTyping:a=!1,selectedTeam:i,currentSessionTitle:r,capabilities:o,showCapabilities:c=!0,onInputChange:n,onSendMessage:N,onKeyPress:p,fileUploads:f=[],isDragOver:g=!1,enableFileUpload:B=!1,onFileUpload:F,onRemoveFile:z,onDragOver:u,className:m}){let b=(0,le.useRef)(null),[S,A]=(0,le.useState)(!1),[L,W]=(0,le.useState)({path:[],selectedItems:[],filters:{}}),K=()=>{b.current?.scrollIntoView({behavior:"smooth"})};(0,le.useEffect)(()=>{K()},[e]);let _=(h,d)=>{console.log("Capability action:",h,d);let T=`Executing ${h} with context: ${JSON.stringify(d.path.map(ce=>ce.name))}`;A(!1)},X=(0,le.useCallback)(h=>{W(h)},[]),$=()=>ga(L),te=()=>{let h=[];return o.forEach(d=>{d.actions&&d.actions.forEach(T=>{h.push({label:T.label,action:()=>_(T.id,{path:[d],selectedItems:[],filters:{}})})}),d.children&&d.children.forEach(T=>{T.type==="list"&&T.data&&h.push({label:`View ${T.name}`,action:()=>A(!0)})})}),h.slice(0,5)};return(0,Ft.jsxs)(Ve,{className:`h-full flex flex-col shadow-sm ${m||""}`,children:[(0,Ft.jsx)(pe,{className:"flex-1 p-4",children:(0,Ft.jsxs)("div",{className:"space-Ft-4",children:[(0,Ft.jsx)(pt.AnimatePresence,{children:e.map(h=>{let d=h;return(0,Ft.jsxs)(pt.motion.div,{initial:{opacity:0,Ft:10},animate:{opacity:1,Ft:0},className:s("flex gap-3",h.type==="user"?"flex-row-reverse":"flex-row"),children:[(0,Ft.jsx)(Se,{className:"h-8 Ft-8",children:h.type==="user"?(0,Ft.jsx)(xe,{children:(0,Ft.jsx)(ha.User,{className:"h-4 Ft-4"})}):(0,Ft.jsx)(xe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ft.jsx)(ha.Bot,{className:"h-4 Ft-4"})})}),(0,Ft.jsxs)("div",{className:s("max-Ft-[80%] rounded-2xl px-4 py-3 shadow-sm",h.type==="user"?"bg-primary text-primary-foreground":"bg-muted"),children:[d.messageType==="image"&&d.image&&(0,Ft.jsx)("div",{className:"mb-2",children:(0,Ft.jsx)("img",{src:d.image.url,alt:d.image.alt||"Uploaded image",className:"max-Ft-full h-auto max-h-48 rounded-lg"})}),d.messageType==="file"&&d.file&&(0,Ft.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Ft.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ft.jsx)("span",{className:"text-sm font-medium",children:d.file.name}),(0,Ft.jsxs)("span",{className:"text-xs opacity-70",children:[(d.file.size/1024/1024).toFixed(1),"MB"]})]})}),d.messageType==="card"&&d.card&&(0,Ft.jsx)("div",{className:"mb-2",children:(0,Ft.jsxs)("div",{className:"p-3 bg-background/50 rounded-lg",children:[(0,Ft.jsx)("h4",{className:"font-medium",children:d.card.title}),d.card.description&&(0,Ft.jsx)("p",{className:"text-sm opacity-70 mt-1",children:d.card.description})]})}),d.messageType==="reference"&&d.references&&(0,Ft.jsx)("div",{className:"mb-2 space-Ft-1",children:d.references.map(T=>(0,Ft.jsxs)("div",{className:"p-2 bg-background/50 rounded-lg",children:[(0,Ft.jsx)("p",{className:"text-sm font-medium",children:T.title}),T.description&&(0,Ft.jsx)("p",{className:"text-xs opacity-70",children:T.description})]},T.id))}),d.messageType==="menu"&&d.menu&&(0,Ft.jsxs)("div",{className:"mb-2",children:[(0,Ft.jsx)("p",{className:"text-sm font-medium mb-2",children:d.menu.title}),(0,Ft.jsx)("div",{className:"space-Ft-1",children:d.menu.items.map(T=>(0,Ft.jsxs)("button",{onClick:T.action,className:"Ft-full text-left p-2 bg-background/50 rounded-lg hover:bg-background/70 transition-colors",children:[(0,Ft.jsx)("p",{className:"text-sm font-medium",children:T.label}),T.description&&(0,Ft.jsx)("p",{className:"text-xs opacity-70",children:T.description})]},T.id))})]}),(0,Ft.jsx)("p",{className:"text-sm leading-relaxed",children:h.content}),(0,Ft.jsx)("p",{className:"text-xs opacity-70 mt-2",children:h.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]},h.id)})}),c&&S&&(0,Ft.jsxs)(pt.motion.div,{initial:{opacity:0,Ft:10},animate:{opacity:1,Ft:0},exit:{opacity:0,Ft:-10},className:"flex gap-3",children:[(0,Ft.jsx)(Se,{className:"h-8 Ft-8",children:(0,Ft.jsx)(xe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ft.jsx)(ha.Bot,{className:"h-4 Ft-4"})})}),(0,Ft.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ft.jsx)(fa,{capabilities:o,isOpen:S,onToggle:()=>A(!S),onActionSelect:_,onContextChange:X,className:"Ft-full"})})]}),a&&(0,Ft.jsxs)(pt.motion.div,{initial:{opacity:0,Ft:10},animate:{opacity:1,Ft:0},className:"flex gap-3",children:[(0,Ft.jsx)(Se,{className:"h-8 Ft-8",children:(0,Ft.jsx)(xe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ft.jsx)(ha.Bot,{className:"h-4 Ft-4"})})}),(0,Ft.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ft.jsxs)("div",{className:"flex space-Ft-1",children:[(0,Ft.jsx)("div",{className:"Ft-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Ft.jsx)("div",{className:"Ft-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Ft.jsx)("div",{className:"Ft-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]}),(0,Ft.jsx)("div",{ref:b})]})}),f&&f.length>0&&(0,Ft.jsx)("div",{className:"border-t p-4 bg-muted/10",children:(0,Ft.jsx)("div",{className:"flex flex-wrap gap-2",children:f.map(h=>(0,Ft.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[(0,Ft.jsx)("span",{className:"text-sm font-medium",children:h.file.name}),(0,Ft.jsxs)("span",{className:"text-xs text-muted-foreground",children:[(h.file.size/1024/1024).toFixed(1),"MB"]}),(0,Ft.jsx)(M,{variant:"ghost",size:"sm",onClick:()=>z?.(h.id),className:"h-6 Ft-6 p-0",children:(0,Ft.jsx)(ha.X,{className:"h-4 Ft-4"})})]},h.id))})}),(0,Ft.jsxs)("div",{className:"border-t p-4 bg-muted/20",children:[(0,Ft.jsxs)("div",{className:"flex gap-3",children:[(0,Ft.jsx)(Fe,{value:t,onChange:h=>n(h.target.value),onKeyPress:p,placeholder:i?`Ask me about ${i.name.toLowerCase()}...`:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),B&&(0,Ft.jsx)(M,{variant:"outline",size:"icon",onClick:()=>{let h=document.createElement("input");h.type="file",h.multiple=!0,h.onchange=d=>{let T=d.target.files;F?.(T)},h.click()},className:"rounded-2xl h-10 Ft-10 shadow-sm",children:(0,Ft.jsx)(ha.Paperclip,{className:"h-4 Ft-4"})}),(0,Ft.jsx)(M,{onClick:N,disabled:!t.trim()&&(!f||f.length===0)||a,size:"icon",className:"rounded-2xl h-10 Ft-10 shadow-sm",children:(0,Ft.jsx)(ha.Send,{className:"h-4 Ft-4"})})]}),c&&(0,Ft.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Ft.jsxs)(M,{onClick:()=>A(!S),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Ft.jsx)(ha.Menu,{className:"h-3 Ft-3 mr-1"}),S?"Hide":"Show"," Capabilities"]}),(0,Ft.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[$().map((h,d)=>(0,Ft.jsx)(M,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>_(h.id,L),children:h.label},`context-${h.id}`)),$().length===0&&te().map((h,d)=>(0,Ft.jsx)(M,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:h.action,children:h.label},`suggestion-${d}`))]})]})]})]})}var Ci=[{id:"1",title:"Logo Design Review",lastMessage:"The color palette looks great! Let's refine the typography...",timestamp:new Date(Date.now()-1e3*60*30),teamId:"design"},{id:"2",title:"React Component Optimization",lastMessage:"Here's how you can improve the performance of your component...",timestamp:new Date(Date.now()-1e3*60*60*2),teamId:"engineering"},{id:"3",title:"Campaign Strategy Discussion",lastMessage:"The target audience analysis shows promising results...",timestamp:new Date(Date.now()-1e3*60*60*24),teamId:"marketing"},{id:"4",title:"Product Roadmap Planning",lastMessage:"Based on user feedback, I recommend prioritizing...",timestamp:new Date(Date.now()-1e3*60*60*24*2),teamId:"product"}];function va({initialTeam:e="design",initialMessages:t,initialSessions:a,showCapabilities:i=!0,title:r="Digital Colleagues",businessUnits:o=at,enableFileUpload:c=!0,maxFileSize:n=10,allowedFileTypes:N=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]}={}){let[p,f]=(0,le.useState)(t||[{id:"1",role:"assistant",type:"text",content:"Hi! I'm your AI assistant with advanced capabilities. I can help with various tasks, access data, and provide contextual actions. What would you like to work on today?",timestamp:new Date}]),[g,B]=(0,le.useState)(""),[F,z]=(0,le.useState)(!1),[u,m]=(0,le.useState)(o.find(v=>v.id===e)||o[0]),[b,S]=(0,le.useState)(null),[A,L]=(0,le.useState)(a||Ci),[W,K]=(0,le.useState)(o.find(v=>v.id===e)||o[0]),[_,X]=(0,le.useState)([]),[$,te]=(0,le.useState)(!1),h=v=>{if(!v||!c)return;let E=[];Array.from(v).forEach(U=>{if(U.size>n*1024*1024){alert(`File ${U.name} is too large. Maximum size is ${n}MB.`);return}if(N.length>0&&!N.some(H=>U.type.match(H))){alert(`File type ${U.type} is not allowed.`);return}let G={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:U,status:"pending",progress:0};if(U.type.startsWith("image/")){let H=new FileReader;H.onload=ya=>{X(wa=>wa.map(ut=>ut.id===G.id?{...ut,preview:ya.target?.result}:ut))},H.readAsDataURL(U)}E.push(G)}),X(U=>[...U,...E])},d=v=>{X(E=>E.filter(U=>U.id!==v))},T=p.map(v=>({id:v.id,content:v.content,type:v.role==="user"?"user":"ai",timestamp:v.timestamp,role:v.role,messageType:v.type,data:v.data,image:v.image,file:v.file,card:v.card,references:v.references,menu:v.menu})),ce=async()=>{if(!g.trim()&&_.length===0)return;let v={id:Date.now().toString(),role:"user",type:"text",content:g,timestamp:new Date};f(E=>[...E,v]),_.length>0&&_.forEach(E=>{if(E.file.type.startsWith("image/")){let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),role:"user",type:"image",content:`Uploaded image: ${E.file.name}`,image:{url:E.preview||"",alt:E.file.name,width:0,height:0},timestamp:new Date};f(G=>[...G,U])}else{let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),role:"user",type:"file",content:`Uploaded file: ${E.file.name}`,file:{name:E.file.name,size:E.file.size,type:E.file.type,url:URL.createObjectURL(E.file)},timestamp:new Date};f(G=>[...G,U])}}),B(""),X([]),z(!0),setTimeout(()=>{let E=St.filter(G=>G.name.toLowerCase().includes(u.name.toLowerCase())||u.name.toLowerCase().includes(G.name.toLowerCase())),U=Math.random();if(U<.3){let G={id:(Date.now()+1).toString(),role:"assistant",type:"text",content:`I can help you with ${u.name.toLowerCase()} tasks. Here are some capabilities I have: ${E.map(H=>H.name).join(", ")}`,timestamp:new Date};f(H=>[...H,G])}else if(U<.5){let G={id:(Date.now()+1).toString(),role:"assistant",type:"card",content:`Here's a ${u.name.toLowerCase()} task I created for you:`,card:{title:`${u.name} Task`,description:`A new task for ${u.name.toLowerCase()} team`,variant:"task",data:{id:Math.floor(Math.random()*1e3),name:`${u.name} Task`,description:`Complete this ${u.name.toLowerCase()} task`,status:"todo",dateLogged:new Date().toISOString(),project:{id:1,name:`${u.name} Project`}}},timestamp:new Date};f(H=>[...H,G])}else if(U<.7){let G={id:(Date.now()+1).toString(),role:"assistant",type:"menu",content:`Here are some ${u.name.toLowerCase()} options:`,menu:{title:`${u.name} Options`,items:E.slice(0,3).map(H=>({id:H.id,label:H.name,description:H.description,value:H.id}))},timestamp:new Date};f(H=>[...H,G])}else{let G={id:(Date.now()+1).toString(),role:"assistant",type:"reference",content:`Here are some helpful ${u.name.toLowerCase()} resources:`,references:[{id:"1",title:`${u.name} Best Practices`,description:`Guidelines for ${u.name.toLowerCase()} work`,type:"document"},{id:"2",title:`${u.name} Tools`,description:`Recommended tools for ${u.name.toLowerCase()}`,type:"link"}],timestamp:new Date};f(H=>[...H,G])}z(!1)},1500)},We=v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),ce())},De=()=>{S(null),f([{id:"1",role:"assistant",type:"text",content:`Hi! I'm your ${u.name} AI assistant with advanced capabilities. I can help with ${u.name.toLowerCase()} tasks, access relevant data, and provide contextual actions. What would you like to work on today?`,timestamp:new Date}])},Ke=v=>{S(v);let E=o.find(U=>U.id===v.teamId)||o[0];m(E),K(E),f([{id:"1",role:"assistant",type:"text",content:v.lastMessage,timestamp:v.timestamp}])},Ee=v=>{L(E=>E.filter(U=>U.id!==v)),b?.id===v&&De()},Pe=v=>{console.log("Edit session:",v)};return(0,Ft.jsx)(pa,{sidebarItems:Xt,title:r,notifications:Qt,businessUnits:o,currentBusinessUnit:W,onBusinessUnitChange:v=>{K(v),m(v),console.log("Business unit changed to:",v.name)},showTabs:!1,onActionClick:()=>{console.log("Copilot clicked from header")},actionIcon:(0,Ft.jsx)(ha.Users,{className:"mr-2 h-4 Ft-4"}),actionText:"Collaborate",onNotificationRemove:v=>{console.log("Notification removed:",v)},onRemoveAll:()=>{console.log("All notifications removed")},logo:"/headerlogo.png",appName:"Nuvia",tagline:"AI-Powered Workspace",children:(0,Ft.jsx)(pt.AnimatePresence,{mode:"wait",children:(0,Ft.jsx)(pt.motion.div,{className:"flex-1 h-full",initial:{opacity:0,Ft:10},animate:{opacity:1,Ft:0},exit:{opacity:0,Ft:-10},transition:{duration:.2},children:(0,Ft.jsxs)("div",{className:"h-full flex",children:[(0,Ft.jsx)("div",{className:"Ft-80 bg-muted/50 flex-shrink-0 h-full p-2",children:(0,Ft.jsx)(ma,{sessions:A,currentSession:b,teams:o,onNewChat:De,onSessionSelect:Ke,onSessionEdit:Pe,onSessionDelete:Ee})}),(0,Ft.jsx)("div",{className:"flex-1 h-full p-2",children:(0,Ft.jsx)(ba,{messages:T,input:g,isTyping:F,selectedTeam:u,currentSessionTitle:b?.title,capabilities:St,showCapabilities:i,onInputChange:B,onSendMessage:ce,onKeyPress:We,fileUploads:_,isDragOver:$,enableFileUpload:c,onFileUpload:h,onRemoveFile:d,onDragOver:te})})]})},"chat-interface")})})}
5
+ "use strict";"use client";var qa=Object.create;var nt=Object.defineProperty;var Ja=Object.getOwnPropertyDescriptor;var Xa=Object.getOwnPropertyNames;var Qa=Object.getPrototypeOf,Ya=Object.prototype.hasOwnProperty;var Za=(e,t)=>{for(var a in t)nt(e,a,{get:t[a],enumerable:!0})},$t=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Xa(t))!Ya.call(e,l)&&l!==a&&nt(e,l,{get:()=>t[l],enumerable:!(o=Ja(t,l))||o.enumerable});return e};var _=(e,t,a)=>(a=e!=null?qa(Qa(e)):{},$t(t||!e||!e.__esModule?nt(a,"default",{value:e,enumerable:!0}):a,e)),eo=e=>$t(nt({},"__esModule",{value:!0}),e);var Zo={};Za(Zo,{CopilotInterface:()=>Yo});module.exports=eo(Zo);var qe=require("react"),Nt=require("framer-motion"),$a=require("lucide-react");var ea=require("clsx");var St="-",to=e=>{let t=oo(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let r=c.split(St);return r[0]===""&&r.length!==1&&r.shift(),qt(r,t)||ao(c)},getConflictingClassGroupIds:(c,r)=>{let u=a[c]||[];return r&&o[c]?[...u,...o[c]]:u}}},qt=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),l=o?qt(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(St);return t.validators.find(({validator:c})=>c(n))?.classGroupId},Kt=/^\[(.+)\]$/,ao=e=>{if(Kt.test(e)){let t=Kt.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},oo=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return ro(Object.entries(e.classGroups),a).forEach(([n,c])=>{Pt(c,o,n,t)}),o},Pt=(e,t,a,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:_t(t,l);n.classGroupId=a;return}if(typeof l=="function"){if(io(l)){Pt(l(o),t,a,o);return}t.validators.push({validator:l,classGroupId:a});return}Object.entries(l).forEach(([n,c])=>{Pt(c,_t(t,n),a,o)})})},_t=(e,t)=>{let a=e;return t.split(St).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},io=e=>e.isThemeGetter,ro=(e,t)=>t?e.map(([a,o])=>{let l=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,r])=>[t+c,r])):n);return[a,l]}):e,no=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,l=(n,c)=>{a.set(n,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(n){let c=a.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return l(n,c),c},set(n,c){a.has(n)?a.set(n,c):l(n,c)}}},Jt="!",so=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,l=t[0],n=t.length,c=r=>{let u=[],p=0,T=0,v;for(let w=0;w<r.length;w++){let R=r[w];if(p===0){if(R===l&&(o||r.slice(w,w+n)===t)){u.push(r.slice(T,w)),T=w+n;continue}if(R==="/"){v=w;continue}}R==="["?p++:R==="]"&&p--}let k=u.length===0?r:r.substring(T),P=k.startsWith(Jt),E=P?k.substring(1):k,D=v&&v>T?v-T:void 0;return{modifiers:u,hasImportantModifier:P,baseClassName:E,maybePostfixModifierPosition:D}};return a?r=>a({className:r,parseClassName:c}):c},lo=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},co=e=>({cache:no(e.cacheSize),parseClassName:so(e),...to(e)}),mo=/\s+/,po=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],c=e.trim().split(mo),r="";for(let u=c.length-1;u>=0;u-=1){let p=c[u],{modifiers:T,hasImportantModifier:v,baseClassName:k,maybePostfixModifierPosition:P}=a(p),E=!!P,D=o(E?k.substring(0,P):k);if(!D){if(!E){r=p+(r.length>0?" "+r:r);continue}if(D=o(k),!D){r=p+(r.length>0?" "+r:r);continue}E=!1}let w=lo(T).join(":"),R=v?w+Jt:w,M=R+D;if(n.includes(M))continue;n.push(M);let y=l(D,E);for(let U=0;U<y.length;++U){let X=y[U];n.push(R+X)}r=p+(r.length>0?" "+r:r)}return r};function uo(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Xt(t))&&(o&&(o+=" "),o+=a);return o}var Xt=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Xt(e[o]))&&(a&&(a+=" "),a+=t);return a};function go(e,...t){let a,o,l,n=c;function c(u){let p=t.reduce((T,v)=>v(T),e());return a=co(p),o=a.cache.get,l=a.cache.set,n=r,r(u)}function r(u){let p=o(u);if(p)return p;let T=po(u,a);return l(u,T),T}return function(){return n(uo.apply(null,arguments))}}var F=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Qt=/^\[(?:([a-$a-]+):)?(.+)\]$/aa,fo=/^\d+\/\d+$/,bo=new Set(["px","full","screen"]),vo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ho=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|aa|aa|min|max))|\aa(calc|min|max|clamp)\(.+\)|^0$/,yo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,xo=/^(inset_)?-?((\d+)?\.?(\d+)[a-$a]+|0)_-?((\d+)?\.?(\d+)[a-$a]+|0)/,wo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ke=e=>Ge(e)||bo.has(e)||fo.test(e),Ae=e=>We(e,"length",Ro),Ge=e=>!!e&&!Number.isNaN(Number(e)),Dt=e=>We(e,"number",Ge),Xe=e=>!!e&&Number.isInteger(Number(e)),Co=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),h=e=>Qt.test(e),Me=e=>vo.test(e),No=new Set(["length","size","percentage"]),ko=e=>We(e,No,Yt),Do=e=>We(e,"position",Yt),Po=new Set(["image","url"]),So=e=>We(e,Po,Mo),To=e=>We(e,"",Ao),Qe=()=>!0,We=(e,t,a)=>{let o=Qt.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Ro=e=>ho.test(e)&&!yo.test(e),Yt=()=>!1,Ao=e=>xo.test(e),Mo=e=>wo.test(e);var Io=()=>{let e=F("colors"),t=F("spacing"),a=F("blur"),o=F("brightness"),l=F("borderColor"),n=F("borderRadius"),c=F("borderSpacing"),r=F("borderWidth"),u=F("contrast"),p=F("grayscale"),T=F("hueRotate"),v=F("invert"),k=F("gap"),P=F("gradientColorStops"),E=F("gradientColorStopPositions"),D=F("inset"),w=F("margin"),R=F("opacity"),M=F("padding"),y=F("saturate"),U=F("scale"),X=F("sepia"),K=F("skew"),re=F("space"),J=F("translate"),G=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto",h,t],I=()=>[h,t],Ne=()=>["",ke,Ae],d=()=>["auto",Ge,h],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],m=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",h],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Ge,h];return{cacheSize:500,separator:":",theme:{colors:[Qe],spacing:[ke,Ae],blur:["none","",Me,h],brightness:V(),borderColor:[e],borderRadius:["none","","full",Me,h],borderSpacing:I(),borderWidth:Ne(),contrast:V(),grayscale:H(),hueRotate:V(),invert:H(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Co,Ae],inset:Z(),margin:Z(),opacity:V(),padding:I(),saturate:V(),scale:V(),sepia:H(),skew:V(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[Me]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...A(),h]}],overflow:[{overflow:Q()}],"overflow-aa":[{"overflow-aa":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:G()}],"overscroll-aa":[{"overscroll-aa":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[D]}],"inset-aa":[{"inset-aa":[D]}],"inset-y":[{"inset-y":[D]}],start:[{start:[D]}],end:[{end:[D]}],top:[{top:[D]}],right:[{right:[D]}],bottom:[{bottom:[D]}],left:[{left:[D]}],visibility:["visible","invisible","collapse"],$a:[{$a:["auto",Xe,h]}],basis:[{basis:Z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Xe,h]}],"grid-cols":[{"grid-cols":[Qe]}],"col-start-end":[{col:["auto",{span:["full",Xe,h]},h]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[Qe]}],"row-start-end":[{row:["auto",{span:[Xe,h]},h]}],"row-start":[{"row-start":d()}],"row-end":[{"row-end":d()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",h]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",h]}],gap:[{gap:[k]}],"gap-aa":[{"gap-aa":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],aa:[{aa:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-aa":[{"space-aa":[re]}],"space-aa-reverse":["space-aa-reverse"],"space-y":[{"space-y":[re]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,t]}],"min-w":[{"min-w":[h,t,"min","max","fit"]}],"max-w":[{"max-w":[h,t,"none","full","min","max","fit","prose",{screen:[Me]},Me]}],h:[{h:[h,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[h,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Me,Ae]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Dt]}],"font-family":[{font:[Qe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",Ge,Dt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ke,h]}],"list-image":[{"list-image":["none",h]}],"list-style-type":[{list:["none","disc","decimal",h]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ke,Ae]}],"underline-offset":[{"underline-offset":["auto",ke,h]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),Do]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","aa","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ko]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","aa","bl","l","tl"]},So]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-to":[{to:[P]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-aa":[{"rounded-aa":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[r]}],"border-w-aa":[{"border-aa":[r]}],"border-w-y":[{"border-y":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-aa":[{"border-aa":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...L(),"hidden"]}],"divide-aa":[{"divide-aa":[r]}],"divide-aa-reverse":["divide-aa-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:L()}],"border-color":[{border:[l]}],"border-color-aa":[{"border-aa":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-aa":[{"border-aa":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[ke,h]}],"outline-w":[{outline:[ke,Ae]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[ke,Ae]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Me,To]}],"shadow-color":[{shadow:[Qe]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...m(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":m()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Me,h]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[T]}],invert:[{invert:[v]}],saturate:[{saturate:[y]}],sepia:[{sepia:[X]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[T]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-aa":[{"border-spacing-aa":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[U]}],"scale-aa":[{"scale-aa":[U]}],"scale-y":[{"scale-y":[U]}],rotate:[{rotate:[Xe,h]}],"translate-aa":[{"translate-aa":[J]}],"translate-y":[{"translate-y":[J]}],"skew-aa":[{"skew-aa":[K]}],"skew-y":[{"skew-y":[K]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","aa",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-aa":[{"scroll-aa":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","aa","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-aa":[{"touch-pan":["aa","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ke,Ae,Dt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-aa","overflow-y"],overscroll:["overscroll-aa","overscroll-y"],inset:["inset-aa","inset-y","start","end","top","right","bottom","left"],"inset-aa":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-aa","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","aa","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-aa","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-aa":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-aa","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-aa","border-w-l"],"border-w-aa":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-aa"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-aa","border-color-l"],"border-color-aa":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-aa"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-aa","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-aa","touch-y","touch-pz"],"touch-aa":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Zt=go(Io);function s(...e){return Zt((0,ea.clsx)(e))}var gt=_(require("react")),Lt=_(require("next/link"));var ta=require("class-variance-authority");var aa=require("react/jsx-runtime"),Bo=(0,ta.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function se({className:e,variant:t,...a}){return(0,aa.jsx)("div",{className:s(Bo({variant:t}),e),...a})}var oa=require("@radix-ui/react-slot"),ra=_(require("react")),Lo=(0,ta.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),S=ra.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...l},n)=>(0,aa.jsx)(e?oa.Slot:"button",{className:s(Lo({className:t,size:a,variant:o})),ref:n,...l}));S.displayName="Button";var sa=_(require("react"));var Ye=sa.forwardRef(({className:e,type:t,...a},o)=>(0,aa.jsx)("input",{type:t,className:s("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));Ye.displayName="Input";var Tt=_(require("react")),de=_(require("@radix-ui/react-scroll-area"));var ve=Tt.forwardRef(({className:e,children:t,...a},o)=>(0,aa.jsxs)(de.Root,{ref:o,className:s("relative overflow-hidden",e),...a,children:[(0,aa.jsx)(de.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,aa.jsx)(ca,{}),(0,aa.jsx)(de.Corner,{})]}));ve.displayName=de.Root.displayName;var ca=Tt.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,aa.jsx)(de.ScrollAreaScrollbar,{ref:o,orientation:t,className:s("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,aa.jsx)(de.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ca.displayName=de.ScrollAreaScrollbar.displayName;var Ze=_(require("react")),W=_(require("@radix-ui/react-dialog"));var ma=W.Root;var zo=W.Portal;var pa=Ze.forwardRef(({className:e,...t},a)=>(0,aa.jsx)(W.Overlay,{ref:a,className:s("fixed inset-0 $a-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));pa.displayName=W.Overlay.displayName;var Rt=Ze.forwardRef(({className:e,children:t,...a},o)=>(0,aa.jsxs)(zo,{children:[(0,aa.jsx)(pa,{}),(0,aa.jsxs)(W.Content,{ref:o,className:s("fixed left-[50%] top-[50%] $a-50 grid w-full max-w-lg translate-aa-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,aa.jsxs)(W.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,aa.jsx)($a.X,{className:"h-4 w-4"}),(0,aa.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Rt.displayName=W.Content.displayName;var At=({className:e,...t})=>(0,aa.jsx)("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});At.displayName="DialogHeader";var Eo=({className:e,...t})=>(0,aa.jsx)("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-aa-2",e),...t});Eo.displayName="DialogFooter";var Mt=Ze.forwardRef(({className:e,...t},a)=>(0,aa.jsx)(W.Title,{ref:a,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));Mt.displayName=W.Title.displayName;var Uo=Ze.forwardRef(({className:e,...t},a)=>(0,aa.jsx)(W.Description,{ref:a,className:s("text-sm text-muted-foreground",e),...t}));Uo.displayName=W.Description.displayName;var et=_(require("@radix-ui/react-checkbox")),ga=_(require("react")),It=ga.forwardRef(({className:e,...t},a)=>(0,aa.jsx)(et.Root,{className:s("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,aa.jsx)(et.Indicator,{className:s("flex items-center justify-center text-current"),children:(0,aa.jsx)($a.Check,{className:"h-4 w-4"})})}));It.displayName=et.Root.displayName;var he=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var ba=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,aa.jsx)($a.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,aa.jsx)($a.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,aa.jsx)($a.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,aa.jsx)($a.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,aa.jsx)($a.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,aa.jsx)($a.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,aa.jsx)($a.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,aa.jsx)($a.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,aa.jsx)($a.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,aa.jsx)($a.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],dt=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var Bt=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],lt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],pt=[{id:"1",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],Fo=[...pt,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],jo=[...dt,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],ct={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:[]},fa={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:pt.filter(e=>e.epicId==="1")};var wi={empty:{initialProjects:ct.projects,initialEpics:ct.epics,initialSprints:ct.sprints,initialTasks:ct.tasks},default:{initialProjects:dt,initialEpics:Bt,initialSprints:lt,initialTasks:pt},highDensity:{initialProjects:dt,initialEpics:Bt,initialSprints:lt,initialTasks:Fo},singleEpic:{initialProjects:dt,initialEpics:fa.epics,initialSprints:lt,initialTasks:fa.tasks},multipleProjects:{initialProjects:jo,initialEpics:Bt,initialSprints:lt,initialTasks:pt}},mt=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(he),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(he),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(he),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(he),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(he),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(he),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(he),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(he),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(he),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(he),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Ci=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:mt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:mt.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:mt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Ni=mt.filter(e=>e.type==="digital");function va(e,t){let[a,o]=(0,qe.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),l=n=>{try{o(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,qe.useEffect)(()=>{l(a)},[]),[a,l]}function zt({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:l=ba[0],onBusinessUnitChange:n,onSearch:c,className:r,logo:u="/headerlogo.png",appName:p="Nuvia",tagline:T="Collaboration Platform"}){let[v,k]=gt.useState({}),[P,E]=va("sidebar-favorites",{}),[D,w]=gt.useState(null),[R,M]=gt.useState(""),y=d=>{k(A=>({...A,[d]:!A[d]}))},U=d=>{n?.(d)},X=()=>{R.trim()&&c?.(R.trim())},K=d=>{d.key==="Enter"&&(d.preventDefault(),X())},re=(d,A)=>{let L=P[d]||[],m=L.includes(A)?L.filter(B=>B!==A):L.concat(A);E({...P,[d]:m})},J=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let A=P[d.id]||[],L=d.items.filter(B=>A.includes(B.id)),m=d.items.filter(B=>!A.includes(B.id));return[...L,...m].slice(0,d.maxItems)},G=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,Q=e,Z=d=>{let A=G(d),L=J(d),m=(0,aa.jsxs)(aa.Fragment,{children:[(0,aa.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,aa.jsx)("span",{children:d.title})]}),d.badge&&(0,aa.jsx)(se,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,aa.jsx)($a.ChevronDown,{className:s("ml-2 h-4 w-4 transition-transform",v[d.title]?"rotate-180":"")})]}),B=s("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",d.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return d.url?(0,aa.jsx)(Lt.default,{href:d.url,className:B,onClick:a?o:void 0,children:m}):(0,aa.jsx)("button",{className:B,onClick:()=>d.items&&y(d.title),children:m})},I=()=>{let d=e.find(L=>L.id===D);if(!d||!d.items||!d.maxItems)return null;let A=P[d.id]||[];return(0,aa.jsx)(ma,{open:!!D,onOpenChange:L=>!L&&w(null),children:(0,aa.jsxs)(Rt,{className:"sm:max-w-md",children:[(0,aa.jsxs)(At,{children:[(0,aa.jsxs)(Mt,{children:["Manage ",d.title," Favorites"]}),(0,aa.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,aa.jsx)(ve,{className:"max-h-96 pr-4",children:(0,aa.jsx)("div",{className:"space-y-4",children:d.items.map(L=>(0,aa.jsxs)("div",{className:"flex items-center space-aa-2",children:[(0,aa.jsx)(It,{id:L.id,checked:A.includes(L.id),onCheckedChange:()=>re(d.id,L.id),disabled:!A.includes(L.id)&&A.length>=(d.maxItems||0)}),(0,aa.jsxs)("label",{htmlFor:L.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[L.title,L.badge&&(0,aa.jsx)(se,{variant:"outline",className:"text-xs",children:L.badge})]})]},L.id))})})]})})},Ne=(0,aa.jsxs)("div",{className:"flex h-full flex-col border-r bg-background",children:[(0,aa.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,aa.jsxs)("div",{className:"flex items-center gap-3",children:[(0,aa.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,aa.jsx)("img",{src:u,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,aa.jsxs)("div",{children:[(0,aa.jsx)("h2",{className:"font-semibold",children:p}),(0,aa.jsx)("p",{className:"text-xs text-muted-foreground",children:T})]})]}),a&&(0,aa.jsx)(S,{variant:"ghost",size:"icon",onClick:o,children:(0,aa.jsx)($a.X,{className:"h-5 w-5"})})]}),(0,aa.jsx)("div",{className:"px-3 py-2",children:(0,aa.jsxs)("div",{className:"relative",children:[(0,aa.jsx)($a.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,aa.jsx)(Ye,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:R,onChange:d=>M(d.target.value),onKeyPress:K})]})}),(0,aa.jsx)(ve,{className:"flex-1 px-3 py-2",children:(0,aa.jsx)("div",{className:"space-y-1",children:Q.map(d=>(0,aa.jsxs)("div",{className:"mb-1",children:[Z(d),d.items&&v[d.title]&&(0,aa.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[J(d).map(A=>(0,aa.jsxs)(Lt.default,{href:A.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[A.title,A.badge&&(0,aa.jsx)(se,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:A.badge})]},A.id)),G(d)&&d.items&&d.items.length>J(d).length&&(0,aa.jsxs)("button",{onClick:()=>w(d.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",d.items.length-J(d).length," more available"]})]})]},d.id))})}),(0,aa.jsx)("div",{className:"border-t p-3",children:(0,aa.jsx)("div",{className:"space-y-1",children:(0,aa.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,aa.jsx)($a.Settings,{className:"h-5 w-5"}),(0,aa.jsx)("span",{children:"Settings"})]})})}),(0,aa.jsx)(I,{})]});return a?(0,aa.jsx)("div",{className:s("fixed inset-y-0 left-0 $a-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-aa-0":"-translate-aa-full",r),children:Ne}):(0,aa.jsx)("div",{className:s("fixed inset-y-0 left-0 $a-30 w-64 transform border-r bg-background transition-transform duration-300 ease-in-out",t?"translate-aa-0":"-translate-aa-full",r),children:Ne})}var ft=_(require("react")),De=_(require("@radix-ui/react-avatar"));var Ue=ft.forwardRef(({className:e,...t},a)=>(0,aa.jsx)(De.Root,{ref:a,className:s("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ue.displayName=De.Root.displayName;var Et=ft.forwardRef(({className:e,...t},a)=>(0,aa.jsx)(De.Image,{ref:a,className:s("aspect-square h-full w-full",e),...t}));Et.displayName=De.Image.displayName;var Fe=ft.forwardRef(({className:e,...t},a)=>(0,aa.jsx)(De.Fallback,{ref:a,className:s("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Fe.displayName=De.Fallback.displayName;var ha=_(require("react")),ge=_(require("@radix-ui/react-tooltip"));var vt=ge.Provider,ht=ge.Root,yt=ge.Trigger,tt=ha.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,aa.jsx)(ge.Portal,{children:(0,aa.jsx)(ge.Content,{ref:o,sideOffset:t,className:s("$a-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));tt.displayName=ge.Content.displayName;var ya=require("next-themes");function xa(){let{setTheme:e,theme:t}=(0,ya.useTheme)();return(0,aa.jsx)(vt,{children:(0,aa.jsxs)(ht,{children:[(0,aa.jsx)(yt,{asChild:!0,children:(0,aa.jsxs)(S,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,aa.jsx)($a.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,aa.jsx)($a.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,aa.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,aa.jsx)(tt,{children:"Toggle theme"})]})})}function wa({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:l,className:n}){let c=e.filter(p=>!p.read),r=c.length,u=p=>{switch(p){case"info":return(0,aa.jsx)($a.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,aa.jsx)($a.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,aa.jsx)($a.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,aa.jsx)($a.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,aa.jsx)(Nt.AnimatePresence,{children:t&&(0,aa.jsxs)(aa.Fragment,{children:[(0,aa.jsx)(Nt.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 $a-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,aa.jsx)(Nt.motion.div,{initial:{aa:"100%"},animate:{aa:0},exit:{aa:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:s("fixed inset-y-0 right-0 $a-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",n),children:(0,aa.jsxs)("div",{className:"flex h-full flex-col",children:[(0,aa.jsxs)("div",{className:"flex items-center justify-between border-aa p-4",children:[(0,aa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,aa.jsx)($a.Bell,{className:"h-5 w-5"}),(0,aa.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,aa.jsxs)(se,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,aa.jsxs)(S,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,aa.jsx)($a.X,{className:"h-5 w-5"}),(0,aa.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,aa.jsxs)("div",{className:"flex items-center justify-between border-aa p-2",children:[(0,aa.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,aa.jsx)(S,{variant:"ghost",size:"sm",onClick:l,className:"text-sm",children:"Dismiss all"})]}),c.length>0?(0,aa.jsx)(ve,{className:"flex-1",children:(0,aa.jsx)("div",{className:"divide-y",children:c.map(p=>(0,aa.jsxs)("div",{className:s("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,aa.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:u(p.type)}),(0,aa.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,aa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,aa.jsx)("p",{className:"font-medium",children:p.title}),(0,aa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,aa.jsx)("p",{className:"text-xs text-muted-foreground",children:p.time}),(0,aa.jsx)(S,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(p.id),title:"Dismiss",children:(0,aa.jsx)($a.Check,{className:"h-3 w-3"})})]})]}),(0,aa.jsx)("p",{className:"text-sm text-muted-foreground",children:p.description}),p.actionLabel&&(0,aa.jsxs)(S,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:p.onAction,children:[p.actionLabel,(0,aa.jsx)($a.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},p.id))})}):(0,aa.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,aa.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,aa.jsx)($a.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,aa.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,aa.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var je=_(require("@radix-ui/react-tabs"));function Ca({className:e,...t}){return(0,aa.jsx)(je.Root,{"data-slot":"tabs",className:s("flex flex-col gap-2",e),...t})}function Na({className:e,...t}){return(0,aa.jsx)(je.List,{"data-slot":"tabs-list",className:s("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function ka({className:e,...t}){return(0,aa.jsx)(je.Trigger,{"data-slot":"tabs-trigger",className:s("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Pe=_(require("react")),C=_(require("@radix-ui/react-dropdown-menu")),$e=require("@radix-ui/react-icons");var Da=C.Root,Pa=C.Trigger;var Ho=Pe.forwardRef(({className:e,inset:t,children:a,...o},l)=>(0,$.jsxs)(C.SubTrigger,{ref:l,className:s("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,$.jsx)($e.ChevronRightIcon,{className:"ml-auto"})]}));Ho.displayName=C.SubTrigger.displayName;var Oo=Pe.forwardRef(({className:e,...t},a)=>(0,$.jsx)(C.SubContent,{ref:a,className:s("$a-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Oo.displayName=C.SubContent.displayName;var Ft=Pe.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,$.jsx)(C.Portal,{children:(0,$.jsx)(C.Content,{ref:o,sideOffset:t,className:s("$a-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Ft.displayName=C.Content.displayName;var jt=Pe.forwardRef(({className:e,inset:t,...a},o)=>(0,$.jsx)(C.Item,{ref:o,className:s("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));jt.displayName=C.Item.displayName;var Vo=Pe.forwardRef(({className:e,children:t,checked:a,...o},l)=>(0,$.jsxs)(C.CheckboxItem,{ref:l,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,$.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$.jsx)(C.ItemIndicator,{children:(0,$.jsx)($e.CheckIcon,{className:"h-4 w-4"})})}),t]}));Vo.displayName=C.CheckboxItem.displayName;var Go=Pe.forwardRef(({className:e,children:t,...a},o)=>(0,$.jsxs)(C.RadioItem,{ref:o,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,$.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$.jsx)(C.ItemIndicator,{children:(0,$.jsx)($e.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Go.displayName=C.RadioItem.displayName;var Wo=Pe.forwardRef(({className:e,inset:t,...a},o)=>(0,$.jsx)(C.Label,{ref:o,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Wo.displayName=C.Label.displayName;var $o=Pe.forwardRef(({className:e,...t},a)=>(0,$.jsx)(C.Separator,{ref:a,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));$o.displayName=C.Separator.displayName;var Ko=({className:e,...t})=>(0,$.jsx)("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});Ko.displayName="DropdownMenuShortcut";function Ta({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:l="700px",gridCols:n=6}){let c=a.find(r=>r.value===e);return(0,aa.jsxs)(Nt.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,aa.jsx)("div",{className:"hidden md:block",children:(0,aa.jsx)(Ca,{value:e,onValueChange:t,children:(0,aa.jsx)(Na,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:l,gridTemplateColumns:`repeat(${Math.min(n,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,aa.jsx)(Nt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,aa.jsx)(ka,{value:r.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:r.label})},r.value))})})}),(0,aa.jsx)("div",{className:"md:hidden",children:(0,aa.jsxs)(Da,{children:[(0,aa.jsx)(Pa,{asChild:!0,children:(0,aa.jsxs)(S,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,aa.jsx)($a.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,aa.jsx)(Ft,{align:"center",className:"w-[180px]",children:a.map(r=>(0,aa.jsx)(jt,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function Ra({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:l=!0,className:n,activeTab:c="assistant",onTabChange:r,showTabs:u=!0,tabOptions:p=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:T,actionIcon:v=(0,aa.jsx)($a.Bot,{className:"mr-2 h-4 w-4"}),actionText:k="Action",onNotificationRemove:P,onRemoveAll:E,logo:D="/headerlogo.png",appName:w="Nuvia",tagline:R="Collaboration Platform"}){let[M,y]=(0,qe.useState)(!1),[U,X]=(0,qe.useState)(t),K=U.filter(G=>!G.read).length,re=G=>{X(Q=>Q.filter(Z=>Z.id!==G)),P?.(G)},J=()=>{X(G=>G.filter(Q=>Q.read)),E?.()};return(0,aa.jsxs)(aa.Fragment,{children:[(0,aa.jsxs)("header",{className:`sticky top-0 $a-10 flex h-16 items-center gap-3 border-aa bg-background/95 px-4 backdrop-blur ${n||""}`,children:[(0,aa.jsx)(S,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,aa.jsx)($a.Menu,{className:"h-5 w-5"})}),(0,aa.jsx)(S,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,aa.jsx)($a.PanelLeft,{className:"h-5 w-5"})}),!l&&(0,aa.jsxs)(Nt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,aa:-20},animate:{opacity:1,aa:0},transition:{duration:.3},children:[(0,aa.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,aa.jsx)("img",{src:D,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,aa.jsxs)("div",{children:[(0,aa.jsx)("h2",{className:"font-semibold text-sm",children:w}),(0,aa.jsx)("p",{className:"text-xs text-muted-foreground",children:R})]})]}),(0,aa.jsxs)("div",{className:"flex flex-1 items-center",children:[u&&(0,aa.jsx)(Ta,{activeTab:c,onTabChange:r,tabOptions:p}),(0,aa.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,aa.jsx)(Nt.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,aa:20},animate:{opacity:1,aa:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,aa.jsx)(Nt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,aa.jsxs)(S,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:T,children:[v,k]})})}),(0,aa.jsx)(xa,{}),(0,aa.jsx)(vt,{children:(0,aa.jsxs)(ht,{children:[(0,aa.jsx)(yt,{asChild:!0,children:(0,aa.jsx)(Nt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,aa.jsxs)(S,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>y(!0),children:[(0,aa.jsx)(Nt.motion.div,{animate:K>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:K>0?1/0:0,repeatDelay:3},children:(0,aa.jsx)($a.Bell,{className:"h-5 w-5"})}),K>0&&(0,aa.jsx)(Nt.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:K})]})})}),(0,aa.jsx)(tt,{children:"Notifications"})]})}),(0,aa.jsx)(Nt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,aa.jsxs)(Ue,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,aa.jsx)(Et,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,aa.jsx)(Fe,{})]})})]})]})]}),(0,aa.jsx)(wa,{notifications:U,open:M,onClose:()=>y(!1),onNotificationRemove:re,onRemoveAll:J})]})}var Aa=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,aa.jsx)($a.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ia({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:l=Aa[0],onBusinessUnitChange:n,onSearch:c,businessUnits:r=Aa,activeTab:u,onTabChange:p,showTabs:T=!1,onActionClick:v,actionIcon:k,actionText:P="Action",onNotificationRemove:E,onRemoveAll:D,logo:w="/headerlogo.png",appName:R="Nuvia",tagline:M="Collaboration Platform"}){let[y,U]=(0,qe.useState)(!0),[X,K]=(0,qe.useState)(!1),[re,J]=(0,qe.useState)(l),G=Q=>{J(Q),n?.(Q)};return(0,aa.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl border bg-background w-[]",children:[X&&(0,aa.jsx)("div",{className:"fixed inset-0 $a-40 bg-black/50 md:hidden",onClick:()=>K(!1)}),(0,aa.jsx)("div",{className:"md:hidden",children:(0,aa.jsx)(zt,{items:e,isOpen:X,isMobile:!0,onClose:()=>K(!1),currentBusinessUnit:re,onBusinessUnitChange:G,onSearch:c,logo:w,appName:R,tagline:M})}),(0,aa.jsx)("div",{className:"hidden md:block",children:(0,aa.jsx)(zt,{items:e,isOpen:y,isMobile:!1,currentBusinessUnit:re,onBusinessUnitChange:G,onSearch:c,logo:w,appName:R,tagline:M})}),(0,aa.jsxs)("div",{className:s("min-h-screen fixed w-full transition-all duration-300 ease-in-out",y?"md:pl-64":"md:pl-0"),children:[(0,aa.jsx)(Ra,{title:a,notifications:o,onToggleSidebar:()=>U(!y),onToggleMobileMenu:()=>K(!0),sidebarOpen:y,activeTab:u,onTabChange:p,showTabs:T,onActionClick:v,actionIcon:k,actionText:P,onNotificationRemove:E,onRemoveAll:D,logo:w,appName:R,tagline:M}),(0,aa.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var He=_(require("react"));var ce=He.forwardRef(({className:e,...t},a)=>(0,aa.jsx)("div",{ref:a,className:s("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ce.displayName="Card";var Se=He.forwardRef(({className:e,...t},a)=>(0,aa.jsx)("div",{ref:a,className:s("flex flex-col space-y-1.5 p-6",e),...t}));Se.displayName="CardHeader";var Te=He.forwardRef(({className:e,...t},a)=>(0,aa.jsx)("div",{ref:a,className:s("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var Vt=He.forwardRef(({className:e,...t},a)=>(0,aa.jsx)("div",{ref:a,className:s("text-sm text-muted-foreground",e),...t}));Vt.displayName="CardDescription";var xe=He.forwardRef(({className:e,...t},a)=>(0,aa.jsx)("div",{ref:a,className:s("p-6 pt-0",e),...t}));xe.displayName="CardContent";var ot=He.forwardRef(({className:e,...t},a)=>(0,aa.jsx)("div",{ref:a,className:s("flex items-center p-6 pt-0",e),...t}));ot.displayName="CardFooter";function Ba({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:l,onSessionEdit:n,onSessionDelete:c,className:r}){return(0,aa.jsx)("div",{className:`space-y-4 ${r||""}`,children:(0,aa.jsxs)(ce,{className:"shadow-sm",children:[(0,aa.jsx)("div",{className:"p-4 border-aa",children:(0,aa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,aa.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,aa.jsx)($a.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,aa.jsxs)(S,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,aa.jsx)($a.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,aa.jsx)(ve,{className:"h-[600px]",children:(0,aa.jsx)("div",{className:"p-2",children:e.length===0?(0,aa.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(u=>(0,aa.jsx)("div",{className:s("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===u.id&&"bg-muted border"),onClick:()=>l(u),children:(0,aa.jsx)("div",{className:"flex items-start gap-3",children:(0,aa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,aa.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,aa.jsx)("h4",{className:"font-medium text-sm truncate",children:u.title}),(0,aa.jsx)("div",{className:"flex items-center gap-1",children:(0,aa.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[n&&(0,aa.jsx)(S,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded",onClick:p=>{p.stopPropagation(),n(u.id)},children:(0,aa.jsx)($a.Edit3,{className:"h-3 w-3"})}),c&&(0,aa.jsx)(S,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded text-destructive hover:text-destructive",onClick:p=>{p.stopPropagation(),c(u.id)},children:(0,aa.jsx)($a.Trash2,{className:"h-3 w-3"})})]})})]}),(0,aa.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:u.lastMessage})]})})},u.id))})})]})})}var La={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]};function Gt(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function za({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:l,colorScheme:n=La,className:c}){let[r,u]=(0,qe.useState)([]),[p,T]=(0,qe.useState)([]),v=r[r.length-1],k=v?.children||e,P=(y,U)=>{switch(y.type){case"category":return n.categories[U%n.categories.length];case"list":return n.lists[U%n.lists.length];case"item":return n.items[U%n.items.length];default:return n.primary}},E=(0,qe.useMemo)(()=>({path:r,selectedItems:p,filters:{}}),[r,p]);(0,qe.useEffect)(()=>{l&&l(E)},[E,l]);let D=y=>{y.type==="category"||y.type==="list"?u([...r,y]):y.type==="item"&&T([...p,y])},w=()=>{u(r.slice(0,-1))},R=y=>{u(r.slice(0,y+1))},M=()=>v?.actions?v.actions:[];return t?(0,aa.jsxs)("div",{className:s("w-full",c),children:[(0,aa.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,aa.jsxs)("div",{className:"flex items-center gap-2",children:[r.length>0&&(0,aa.jsx)(Nt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:w,className:s("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,aa.jsx)($a.ChevronLeft,{className:s("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-aa-0.5")})}),(0,aa.jsx)("h4",{className:"font-medium text-sm",children:v?.name||"Capabilities"})]}),(0,aa.jsx)(Nt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:s("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,aa.jsx)($a.X,{className:s("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),r.length>0&&(0,aa.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,aa.jsx)(Nt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>u([]),className:s("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,aa.jsxs)("span",{className:"relative",children:["Capabilities",(0,aa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-aa-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),r.map((y,U)=>(0,aa.jsxs)("div",{className:"flex items-center gap-1",children:[(0,aa.jsx)($a.ChevronRight,{className:"h-2 w-2"}),(0,aa.jsx)(Nt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>R(U),className:s("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,aa.jsxs)("span",{className:"relative",children:[y.name,(0,aa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-aa-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},y.id))]}),(0,aa.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,aa.jsx)(Nt.AnimatePresence,{mode:"wait",children:(0,aa.jsx)(Nt.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:v?.type==="list"&&v.data?(0,aa.jsx)(Jo,{data:v.data,onItemSelect:y=>T([...p,y]),colorScheme:n}):(0,aa.jsx)(_o,{capabilities:k,onSelect:D,colorScheme:n})},v?.id||"root")})})]}):(0,aa.jsxs)(S,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,aa.jsx)($a.Menu,{className:"h-4 w-4"}),(0,aa.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function _o({capabilities:e,onSelect:t,colorScheme:a}){return(0,aa.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,aa.jsx)(qo,{capability:o,onClick:()=>t(o),color:a.categories[l%a.categories.length]},o.id))})}function qo({capability:e,onClick:t,selected:a,color:o}){return(0,aa.jsxs)(Nt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:s("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,aa.jsx)("div",{className:s("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,aa.jsxs)("span",{className:"truncate relative",children:[e.name,(0,aa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-aa-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,aa.jsx)($a.ChevronRight,{className:s("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-aa-0.5")}),e.type==="list"&&e.data&&(0,aa.jsx)(se,{variant:"secondary",className:s("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function Jo({data:e,onItemSelect:t,colorScheme:a}){return(0,aa.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,aa.jsxs)(Nt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:s("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,aa.jsx)("div",{className:s("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[l%a.items.length])}),(0,aa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,aa.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,aa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-aa-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,aa.jsx)("div",{className:s("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,aa.jsx)(se,{variant:"secondary",className:s("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var Fa=require("date-fns");function Ea({taskId:e,polling:t=!0,system:a="payload"}){let[o,l]=(0,qe.useState)(null),[n,c]=(0,qe.useState)(!1),[r,u]=(0,qe.useState)(null),p=async(v=!0)=>{if(e){v&&c(!0);try{let k=await fetch(`/api/tasks/${e}`);if(!k.ok)throw new Error(`Failed to fetch task: ${k.statusText}`);let P=await k.json();l(P)}catch(k){console.error("Error fetching task:",k),u(k instanceof Error?k:new Error("Unknown error occurred"))}finally{v&&c(!1)}}},T=()=>p(!1);return(0,qe.useEffect)(()=>{e&&p(!0);let v=null;return e&&t&&(v=setInterval(T,5e3)),()=>{v&&clearInterval(v)}},[e,t]),{task:o,loading:n,error:r}}var Xo=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},Qo=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function ja({data:e}){let{id:t,system:a,fetchLatest:o,taskData:l,error:n}=e||{};if(!t)return null;let c=null,r=!0,u=n,p=o!==void 0?o:!0;if(c=l||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:p,taskData:c,error:u}),p){let{task:P,loading:E,error:D}=Ea({taskId:t,system:a});c=P,r=E,u=D}else r=!1;let T=Xo(c?.status||"todo"),v=Qo(c?.status||"todo"),k=c?.dateLogged||new Date().toISOString();try{let P=new Date(c?.dateLogged||"");isNaN(P.getTime())||(k=(0,Fa.formatDistanceToNow)(P,{addSuffix:!0}))}catch{}return(0,aa.jsxs)(ce,{className:s("w-full max-w-md shadow-md",u&&"border border-destructive"),children:[(0,aa.jsxs)(Se,{className:"pb-2",children:[(0,aa.jsxs)("div",{className:"flex justify-between items-start",children:[(0,aa.jsx)(Te,{className:"text-lg font-semibold",children:r?"Loading...":c?.name||"Task"}),(0,aa.jsx)(se,{className:`${T}`,children:v})]}),c?.project&&(0,aa.jsxs)(Vt,{className:"text-sm text-gray-500",children:["Project: ",c.project.name]})]}),(0,aa.jsx)(xe,{className:"pb-2",children:r?(0,aa.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):u?(0,aa.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,aa.jsx)("p",{className:"text-sm text-foreground",children:c?.description||"......."})}),(0,aa.jsx)(ot,{className:"pt-2 flex items-center justify-between",children:(0,aa.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,aa.jsx)($a.Clock,{className:"h-3 w-3 mr-1"}),(0,aa.jsxs)("span",{children:["Created ",k]}),(0,aa.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,aa.jsxs)("span",{children:["Task #",t]})]})})]})}function Va({artefact:e,taskId:t,taskData:a,loading:o=!1,error:l=null}){let n=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},c=n.dateLogged;try{let r=new Date(n.dateLogged);isNaN(r.getTime())||(c=(0,Fa.formatDistanceToNow)(r,{addSuffix:!0}))}catch{}return(0,aa.jsxs)(ce,{className:"w-full max-w-md shadow-md",children:[(0,aa.jsx)(Se,{className:"pb-2",children:(0,aa.jsx)("div",{className:"flex justify-between items-start",children:(0,aa.jsx)(Te,{className:"text-lg font-semibold",children:o?"Loading...":n.name})})}),(0,aa.jsx)(xe,{className:"pb-2",children:o?(0,aa.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):l?(0,aa.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,aa.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,aa.jsx)(ot,{className:"pt-2 flex items-center justify-between",children:(0,aa.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,aa.jsx)($a.Clock,{className:"h-3 w-3 mr-1"}),(0,aa.jsxs)("span",{children:["Created ",c]}),(0,aa.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,aa.jsxs)("span",{children:["Task #",n.id]})]})})]})}function Ga(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Wa({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:l,fileUploads:n,isDragOver:c,enableFileUpload:r,onInputChange:u,onSendMessage:p,onKeyPress:T,onFileUpload:v,onRemoveFile:k,onDragOver:P,className:E}){let D=(0,qe.useRef)(null),w=(0,qe.useRef)(null),R=(0,qe.useRef)(null),[M,y]=(0,qe.useState)(!1),[U,X]=(0,qe.useState)({path:[],selectedItems:[],filters:{}});(0,qe.useEffect)(()=>{D.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,qe.useEffect)(()=>{M&&setTimeout(()=>{D.current?.scrollIntoView({behavior:"smooth"})},100)},[M]);let K=()=>Gt(U),re=()=>{let m=[];return l.forEach(B=>{B.actions&&B.actions.forEach(H=>{m.push({label:H.label,action:()=>J(H.id,{path:[B],selectedItems:[],filters:{}})})}),B.children&&B.children.forEach(H=>{H.type==="list"&&H.data&&m.push({label:`View ${H.name}`,action:()=>y(!0)})})}),m.slice(0,5)},J=(m,B)=>{console.log("Capability action:",m,B);let H=`Executing ${m} with context: ${JSON.stringify(B.path.map(ee=>ee.name))}`;y(!1)},G=Gt({path:[],selectedItems:[],filters:{}}),Q=m=>{v(m.target.files),m.target.files&&(m.target.value="")},Z=m=>{m.preventDefault(),P(!0)},I=m=>{m.preventDefault(),P(!1)},Ne=m=>{m.preventDefault(),P(!1),v(m.dataTransfer.files)},d=m=>{if(m===0)return"0 Bytes";let B=1024,H=["Bytes","KB","MB","GB"],ee=Math.floor(Math.log(m)/Math.log(B));return parseFloat((m/Math.pow(B,ee)).toFixed(2))+" "+H[ee]},A=m=>m.startsWith("image/")?(0,aa.jsx)($a.Image,{className:"h-4 w-4"}):m.startsWith("text/")?(0,aa.jsx)($a.FileText,{className:"h-4 w-4"}):(0,aa.jsx)($a.File,{className:"h-4 w-4"}),L=m=>{let B=m.role==="assistant",H=m.role==="user",ee=Ga(m);return(0,aa.jsxs)("div",{className:s("flex items-start gap-3",H?"flex-row-reverse":""),children:[(0,aa.jsx)(Ue,{className:"h-8 w-8 shrink-0",children:(0,aa.jsx)(Fe,{className:s(H?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:H?(0,aa.jsx)($a.User,{className:"h-4 w-4"}):(0,aa.jsx)($a.Bot,{className:"h-4 w-4"})})}),(0,aa.jsxs)("div",{className:s("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",H?"bg-primary text-primary-foreground":"bg-muted"),children:[ee&&(0,aa.jsx)("div",{className:"mb-2 last:mb-0",children:(0,aa.jsx)("p",{className:"text-sm",children:ee})}),m.parts.map((V,ne)=>{if(V.type==="text")return null;if(V.type==="file"){let N=V;return(0,aa.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,aa.jsxs)("div",{className:"flex items-center gap-2",children:[A(N.mimeType||"application/octet-stream"),(0,aa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,aa.jsx)("p",{className:"text-sm font-medium truncate",children:N.name||N.url?.split("/").pop()||"File"}),N.size&&(0,aa.jsx)("p",{className:"text-xs opacity-70",children:d(N.size)}),N.mimeType&&(0,aa.jsx)("p",{className:"text-xs opacity-70",children:N.mimeType})]}),N.url&&(0,aa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>window.open(N.url,"_blank"),className:"h-8 w-8 p-0",children:(0,aa.jsx)($a.Download,{className:"h-4 w-4"})})]})},ne)}if(V.type.startsWith("tool-")){let N=V,be=V.type.replace("tool-","");if(be==="task")switch(N.state){case"input-available":return(0,aa.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},ne);case"output-available":return(0,aa.jsx)("div",{className:"mb-2",children:(0,aa.jsx)(ja,{data:{id:N.output?.id||N.input?.id,fetchLatest:!1,taskData:N.output||N.input}})},ne);case"output-error":return(0,aa.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",N.errorText]},ne);default:return null}if(be==="artefact")switch(N.state){case"input-available":return(0,aa.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},ne);case"output-available":return(0,aa.jsx)("div",{className:"mb-2",children:(0,aa.jsx)(Va,{artefact:N.output?.description||"",taskId:N.output?.id||N.input?.id,taskData:N.output||N.input})},ne);case"output-error":return(0,aa.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",N.errorText]},ne);default:return null}return(0,aa.jsx)("div",{className:"mb-2",children:(0,aa.jsxs)(ce,{className:"w-full max-w-md",children:[(0,aa.jsx)(Se,{children:(0,aa.jsx)(Te,{className:"text-lg",children:be})}),(0,aa.jsxs)(xe,{children:[N.state==="input-available"&&(0,aa.jsxs)("p",{className:"text-sm",children:["Processing ",be,"..."]}),N.state==="output-available"&&(0,aa.jsx)("pre",{className:"text-sm",children:JSON.stringify(N.output,null,2)}),N.state==="output-error"&&(0,aa.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",N.errorText]})]})]})},ne)}if(V.type.startsWith("data-")){let N=V,be=V.type.replace("data-","");return be==="reference"?(0,aa.jsx)("div",{className:"mb-2",children:(0,aa.jsx)(ce,{className:"w-full",children:(0,aa.jsx)(xe,{className:"p-4",children:(0,aa.jsx)("div",{className:"space-y-2",children:N.data?.references?.map((oe,Je)=>(0,aa.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,aa.jsx)(se,{variant:"outline",children:oe.type||"link"}),(0,aa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,aa.jsx)("p",{className:"text-sm font-medium truncate",children:oe.title}),oe.description&&(0,aa.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:oe.description})]}),oe.url&&(0,aa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>window.open(oe.url,"_blank"),className:"h-8 w-8 p-0",children:(0,aa.jsx)($a.ExternalLink,{className:"h-4 w-4"})})]},Je))})})})},ne):be==="menu"?(0,aa.jsx)("div",{className:"mb-2",children:(0,aa.jsxs)(ce,{className:"w-full",children:[(0,aa.jsx)(Se,{children:(0,aa.jsx)(Te,{className:"text-lg",children:N.data?.title})}),(0,aa.jsx)(xe,{children:(0,aa.jsx)("div",{className:"space-y-2",children:N.data?.items?.map((oe,Je)=>(0,aa.jsx)(S,{variant:"outline",className:"w-full justify-start",onClick:oe.action,children:(0,aa.jsxs)("div",{className:"text-left",children:[(0,aa.jsx)("p",{className:"font-medium",children:oe.label}),oe.description&&(0,aa.jsx)("p",{className:"text-xs text-muted-foreground",children:oe.description})]})},Je))})})]})},ne):(0,aa.jsx)("div",{className:"mb-2",children:(0,aa.jsxs)(ce,{className:"w-full max-w-md",children:[(0,aa.jsx)(Se,{children:(0,aa.jsx)(Te,{className:"text-lg",children:be})}),(0,aa.jsx)(xe,{children:(0,aa.jsx)("pre",{className:"text-sm",children:JSON.stringify(N.data,null,2)})})]})},ne)}return null})]})]})};return(0,aa.jsxs)(ce,{className:`h-full flex flex-col shadow-sm ${E||""}`,children:[(0,aa.jsxs)(ve,{ref:w,className:"flex-1 p-4",onDragOver:Z,onDragLeave:I,onDrop:Ne,children:[(0,aa.jsxs)("div",{className:s("space-y-4",c&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,aa.jsx)(Nt.AnimatePresence,{children:e.map(m=>(0,aa.jsx)(Nt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:s("flex gap-3",m.role==="user"?"flex-row-reverse":"flex-row"),children:L(m)},m.id))}),M&&(0,aa.jsxs)(Nt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,aa.jsx)(Ue,{className:"h-8 w-8",children:(0,aa.jsx)(Fe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,aa.jsx)($a.Bot,{className:"h-4 w-4"})})}),(0,aa.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,aa.jsx)(za,{capabilities:l,isOpen:M,onToggle:()=>y(!M),onActionSelect:J,className:"w-full"})})]}),a&&(0,aa.jsxs)(Nt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,aa.jsx)(Ue,{className:"h-8 w-8",children:(0,aa.jsx)(Fe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,aa.jsx)($a.Bot,{className:"h-4 w-4"})})}),(0,aa.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,aa.jsxs)("div",{className:"flex space-aa-1",children:[(0,aa.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,aa.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,aa.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,aa.jsx)("div",{ref:D})]}),n.length>0&&(0,aa.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,aa.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(m=>(0,aa.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[A(m.file.type),(0,aa.jsx)("span",{className:"text-sm font-medium",children:m.file.name}),(0,aa.jsx)("span",{className:"text-xs text-muted-foreground",children:d(m.file.size)}),(0,aa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>k(m.id),className:"h-6 w-6 p-0",children:(0,aa.jsx)($a.X,{className:"h-4 w-4"})})]},m.id))})}),(0,aa.jsxs)("div",{className:"border-t p-4 bg-muted/20",children:[(0,aa.jsxs)("div",{className:"flex gap-3",children:[(0,aa.jsx)(Ye,{value:t,onChange:m=>u(m.target.value),onKeyPress:T,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),r&&(0,aa.jsx)(S,{variant:"outline",size:"icon",onClick:()=>R.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,aa.jsx)($a.Paperclip,{className:"h-4 w-4"})}),(0,aa.jsx)(S,{onClick:p,disabled:!t.trim()&&n.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,aa.jsx)($a.Send,{className:"h-4 w-4"})})]}),(0,aa.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,aa.jsxs)(S,{onClick:()=>y(!M),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,aa.jsx)($a.Menu,{className:"h-3 w-3 mr-1"}),M?"Hide":"Show"," Capabilities"]}),(0,aa.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[K().map((m,B)=>(0,aa.jsx)(S,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>J(m.id,U),children:m.label},`context-${m.id}`)),K().length===0&&re().map((m,B)=>(0,aa.jsx)(S,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:m.action,children:m.label},`suggestion-${B}`))]})]}),r&&(0,aa.jsx)("input",{ref:R,type:"file",multiple:!0,onChange:Q,className:"hidden"})]})]})}function Yo({messages:e=[],businessUnits:t=[],capabilities:a=[],sidebarItems:o=[],notifications:l=[],sessions:n=[],onNewChat:c,onSessionSelect:r,onSessionDelete:u,onSessionEdit:p=()=>console.log("Session edit not implemented"),onBusinessUnitChange:T=()=>{},onNotificationRemove:v=()=>{},onRemoveAll:k=()=>{},onActionClick:P=()=>{},onSearch:E=Z=>console.log("Search query:",Z),initialTeam:D="design",currentSession:w=null,showCapabilities:R=!0,title:M="Digital Colleagues",enableFileUpload:y=!0,maxFileSize:U=10,allowedFileTypes:X=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:K="/headerlogo.png",appName:re="Nuvia",tagline:J="AI-Powered Workspace",actionIcon:G=(0,aa.jsx)($a.Users,{className:"mr-2 h-4 w-4"}),actionText:Q="Collaborate"}){let[Z,I]=(0,qe.useState)(""),[Ne,d]=(0,qe.useState)(!1),A=t||[],L={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[m,B]=(0,qe.useState)(()=>A.length===0?L:A.find(ie=>ie.id===D)||A[0]),[H,ee]=(0,qe.useState)([]),[V,ne]=(0,qe.useState)(!1),N=ie=>{if(!ie||!y)return;let it=[];Array.from(ie).forEach(pe=>{if(pe.size>U*1024*1024){alert(`File ${pe.name} is too large. Maximum size is ${U}MB.`);return}if(X.length>0&&!X.some(rt=>pe.type.match(rt))){alert(`File type ${pe.type} is not allowed.`);return}let Wt={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:pe,status:"pending",progress:0};if(pe.type.startsWith("image/")){let rt=new FileReader;rt.onload=Ka=>{ee(_a=>_a.map(kt=>kt.id===Wt.id?{...kt,preview:Ka.target?.result}:kt))},rt.readAsDataURL(pe)}it.push(Wt)}),ee(pe=>[...pe,...it])},be=ie=>{ee(it=>it.filter(pe=>pe.id!==ie))},oe=()=>{!Z.trim()&&H.length===0||(console.log("Message to send:",Z),console.log("Files to upload:",H),I(""),ee([]),d(!0),setTimeout(()=>{d(!1)},1500))},Je=ie=>{ie.key==="Enter"&&!ie.shiftKey&&(ie.preventDefault(),oe())};return(0,aa.jsx)(Ia,{sidebarItems:o||[],title:M,notifications:l||[],businessUnits:A,currentBusinessUnit:m,onBusinessUnitChange:ie=>{ie&&(B(ie),T?.(ie))},onSearch:E,showTabs:!1,onActionClick:P,actionIcon:G,actionText:Q,onNotificationRemove:v,onRemoveAll:k,logo:K,appName:re,tagline:J,children:(0,aa.jsx)(Nt.AnimatePresence,{mode:"wait",children:(0,aa.jsx)(Nt.motion.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:(0,aa.jsxs)("div",{className:"h-full flex",children:[(0,aa.jsx)("div",{className:"w-80 bg-muted/50 flex-shrink-0 h-full p-2",children:(0,aa.jsx)(Ba,{sessions:n||[],currentSession:w,teams:A,onNewChat:c,onSessionSelect:r,onSessionEdit:p,onSessionDelete:u})}),(0,aa.jsx)("div",{className:"flex-1 h-full p-2",children:(0,aa.jsx)(Wa,{messages:e||[],input:Z,isTyping:Ne,currentSessionTitle:w?.title,capabilities:a||[],onInputChange:I,onSendMessage:oe,onKeyPress:Je,fileUploads:H,isDragOver:V,enableFileUpload:y,onFileUpload:N,onRemoveFile:be,onDragOver:ne})})]})},"chat-interface")})})}0&&(module.exports={CopilotInterface});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-UNS6CTQZ.mjs";import"../../chunk-TO7KJNKC.mjs";import"../../chunk-A2AEX4YB.mjs";import"../../chunk-R7LPCFUJ.mjs";import"../../chunk-PM35MWKG.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-M245YHYF.mjs";import"../../chunk-3KITWLRN.mjs";import"../../chunk-DLUWDQSW.mjs";import"../../chunk-HNCC3AOT.mjs";import"../../chunk-5Z5PL7N3.mjs";import"../../chunk-Q2DPE66H.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
2
+ "use strict";import{a}from"../../chunk-ZCEVYZEO.mjs";import"../../chunk-JHSHXYPK.mjs";import"../../chunk-SWA5TRPZ.mjs";import"../../chunk-2VR4KIQL.mjs";import"../../chunk-IPV2NFB6.mjs";import"../../chunk-A2AEX4YB.mjs";import"../../chunk-LUPNE23E.mjs";import"../../chunk-I3E2TYYZ.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-DBY4SXQI.mjs";import"../../chunk-PM35MWKG.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-M245YHYF.mjs";import"../../chunk-3KITWLRN.mjs";import"../../chunk-PA4ZBJDO.mjs";import"../../chunk-Q2DPE66H.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as CopilotInterface};
@@ -3,8 +3,6 @@ export interface ChatSession {
3
3
  id: string;
4
4
  title: string;
5
5
  lastMessage: string;
6
- timestamp: Date;
7
- teamId: string;
8
6
  }
9
7
  interface ChatSessionSidebarProps {
10
8
  sessions: ChatSession[];