cortex-react-components 2.13.8 → 2.13.9

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 (148) hide show
  1. package/dist/{chunk-NPGGDQ6F.mjs → chunk-2GM2LPLB.mjs} +1 -1
  2. package/dist/{chunk-6FHRZHAJ.mjs → chunk-2HWSTGAP.mjs} +1 -1
  3. package/dist/{chunk-B2TBKNIJ.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
  4. package/dist/{chunk-FX6IXEMQ.mjs → chunk-4SRUEQTP.mjs} +1 -1
  5. package/dist/{chunk-KBEXWUKI.mjs → chunk-5NIEZE7A.mjs} +1 -1
  6. package/dist/{chunk-SPAOEUCG.mjs → chunk-7OMPPFGG.mjs} +1 -1
  7. package/dist/{chunk-M527EJIX.mjs → chunk-AMVJPDM3.mjs} +1 -1
  8. package/dist/{chunk-XX4GSGRP.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  9. package/dist/{chunk-KY3ELFX5.mjs → chunk-BQQ4V4PX.mjs} +1 -1
  10. package/dist/chunk-CJDUN6R4.mjs +4 -0
  11. package/dist/{chunk-LAQ3QAUW.mjs → chunk-CLGBBNRB.mjs} +1 -1
  12. package/dist/{chunk-MAZGVZJN.mjs → chunk-DMCFEJ2C.mjs} +1 -1
  13. package/dist/{chunk-7V2BDLRI.mjs → chunk-DPZHVBGG.mjs} +1 -1
  14. package/dist/{chunk-QWFFSMKK.mjs → chunk-F64CA5CH.mjs} +1 -1
  15. package/dist/{chunk-K4MFTVNB.mjs → chunk-FEWOSBUJ.mjs} +1 -1
  16. package/dist/{chunk-FRXZ2OKW.mjs → chunk-FYQBRCQM.mjs} +1 -1
  17. package/dist/chunk-G34OMFQI.mjs +4 -0
  18. package/dist/{chunk-57PJ7CHJ.mjs → chunk-GAZHKHGB.mjs} +1 -1
  19. package/dist/{chunk-VBSFVJM5.mjs → chunk-GETYSIZV.mjs} +1 -1
  20. package/dist/{chunk-DHXQXFOB.mjs → chunk-GLBQHEMQ.mjs} +1 -1
  21. package/dist/chunk-GS3P2V76.mjs +4 -0
  22. package/dist/{chunk-S4ES6P3Y.mjs → chunk-HDKHF3EA.mjs} +1 -1
  23. package/dist/{chunk-N52FSTLG.mjs → chunk-HKMNAXLM.mjs} +1 -1
  24. package/dist/{chunk-LAQHJZ32.mjs → chunk-JGX2G2OC.mjs} +1 -1
  25. package/dist/{chunk-MUHR5KA5.mjs → chunk-KZAYLEFB.mjs} +1 -1
  26. package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
  27. package/dist/{chunk-BDDEMCAH.mjs → chunk-MFCVMJBO.mjs} +1 -1
  28. package/dist/{chunk-RUZVSK25.mjs → chunk-MO4HRQEL.mjs} +1 -1
  29. package/dist/{chunk-4IVQWIYV.mjs → chunk-OQCMTGML.mjs} +1 -1
  30. package/dist/{chunk-Q7KKN6MH.mjs → chunk-P6OSMPUQ.mjs} +1 -1
  31. package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
  32. package/dist/{chunk-2VOOH4YJ.mjs → chunk-PNUBVBSR.mjs} +1 -1
  33. package/dist/{chunk-TUACRDU3.mjs → chunk-PTZT4QJW.mjs} +1 -1
  34. package/dist/{chunk-3MCZBHGA.mjs → chunk-QQFIVSBW.mjs} +1 -1
  35. package/dist/chunk-R5SXUWYU.mjs +4 -0
  36. package/dist/{chunk-6DQ7FEQQ.mjs → chunk-R6AYIVIR.mjs} +1 -1
  37. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  38. package/dist/{chunk-75XBZHOC.mjs → chunk-U3FYDDE2.mjs} +1 -1
  39. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  40. package/dist/chunk-Y7H3EUBR.mjs +4 -0
  41. package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  42. package/dist/components/AdvancedComponents/user-selection.d.ts +1 -1
  43. package/dist/components/AdvancedComponents/user-selection.js +1 -1
  44. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  45. package/dist/components/Blocks/Banner.mjs +1 -1
  46. package/dist/components/Blocks/CallToAction.mjs +1 -1
  47. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  48. package/dist/components/Blocks/Content.mjs +1 -1
  49. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  50. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  51. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  52. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  53. package/dist/components/Blocks/index.mjs +1 -1
  54. package/dist/components/CRM/CogeBoard.mjs +1 -1
  55. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  56. package/dist/components/CRM/index.mjs +1 -1
  57. package/dist/components/Cards/ContentCard.mjs +1 -1
  58. package/dist/components/Cards/FeatureCard.mjs +1 -1
  59. package/dist/components/Cards/index.mjs +1 -1
  60. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  61. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  62. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  63. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  64. package/dist/components/DigitalColleagues/Views/ColleaguesView.d.ts +1 -1
  65. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
  66. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  67. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  68. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  69. package/dist/components/DigitalColleagues/colleague-form.d.ts +1 -1
  70. package/dist/components/DigitalColleagues/colleague-form.js +1 -1
  71. package/dist/components/DigitalColleagues/digital-colleague-clone.d.ts +1 -1
  72. package/dist/components/DigitalColleagues/digital-colleague-clone.js +1 -2
  73. package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
  74. package/dist/components/DigitalColleagues/index.js +1 -1
  75. package/dist/components/DigitalColleagues/index.mjs +1 -1
  76. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  77. package/dist/components/Foundary/MainPage.mjs +1 -1
  78. package/dist/components/Foundary/Pages/dashboardpage.d.ts +1 -1
  79. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  80. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  81. package/dist/components/Foundary/Views/ColleaguesView.d.ts +1 -1
  82. package/dist/components/Foundary/Views/ColleaguesView.js +1 -1
  83. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  84. package/dist/components/Foundary/Views/index.js +1 -1
  85. package/dist/components/Foundary/Views/index.mjs +1 -1
  86. package/dist/components/Foundary/index.js +1 -1
  87. package/dist/components/Foundary/index.mjs +1 -1
  88. package/dist/components/HeaderFooter/Header.mjs +1 -1
  89. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  90. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  91. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  92. package/dist/components/HeaderFooter/index.mjs +1 -1
  93. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  94. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  95. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  96. package/dist/components/Heros/PostHero/index.mjs +1 -1
  97. package/dist/components/Heros/RenderHero.mjs +1 -1
  98. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  99. package/dist/components/Heros/index.mjs +1 -1
  100. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  101. package/dist/components/Layouts/Print.mjs +1 -1
  102. package/dist/components/Layouts/SlideShow.mjs +1 -1
  103. package/dist/components/Layouts/index.mjs +1 -1
  104. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  105. package/dist/components/Menus/SidebarRight.mjs +1 -1
  106. package/dist/components/Menus/index.mjs +1 -1
  107. package/dist/components/Other/index.mjs +1 -1
  108. package/dist/components/Payload/RichText/index.mjs +1 -1
  109. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  110. package/dist/components/Payload/index.mjs +1 -1
  111. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  112. package/dist/components/Projects/ProjectPage.mjs +1 -1
  113. package/dist/components/Projects/ProjectView.mjs +1 -1
  114. package/dist/components/Projects/index.mjs +1 -1
  115. package/dist/components/index.js +14 -14
  116. package/dist/components/index.mjs +1 -1
  117. package/dist/components/ui/index.mjs +1 -1
  118. package/dist/components/ui/sidebar.mjs +1 -1
  119. package/dist/index.js +19 -19
  120. package/dist/index.mjs +1 -1
  121. package/dist/metafile-cjs.json +1 -1
  122. package/dist/metafile-esm.json +1 -1
  123. package/dist/pages/Blog.mjs +1 -1
  124. package/dist/pages/Documentation.mjs +1 -1
  125. package/dist/pages/IndexPage.mjs +1 -1
  126. package/dist/pages/Intranet.mjs +1 -1
  127. package/dist/pages/LandingPage.mjs +1 -1
  128. package/dist/pages/Page.mjs +1 -1
  129. package/dist/pages/Publish.mjs +1 -1
  130. package/dist/pages/Website.mjs +1 -1
  131. package/dist/sections/AboutSection.mjs +1 -1
  132. package/dist/sections/BlogDetail.mjs +1 -1
  133. package/dist/sections/BlogList.mjs +1 -1
  134. package/dist/sections/BlogListSection.mjs +1 -1
  135. package/dist/sections/ContactSection.mjs +1 -1
  136. package/dist/sections/PageSections.mjs +1 -1
  137. package/dist/sections/PricingSection.mjs +1 -1
  138. package/dist/sections/ServiceDetail.mjs +1 -1
  139. package/dist/sections/ServiceDetailSection.mjs +1 -1
  140. package/dist/sections/ServiceSection.mjs +1 -1
  141. package/dist/sections/form/index.mjs +1 -1
  142. package/dist/sections/index.mjs +1 -1
  143. package/package.json +1 -1
  144. package/dist/chunk-LVXEY6OU.mjs +0 -4
  145. package/dist/chunk-QW5KPNB3.mjs +0 -4
  146. package/dist/chunk-USOGZB6R.mjs +0 -4
  147. package/dist/chunk-XADBBCGL.mjs +0 -4
  148. package/dist/chunk-ZB7RDJRP.mjs +0 -4
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  "use client"
4
4
 
5
- "use strict";"use client";var mi=Object.create;var Ot=Object.defineProperty;var pi=Object.getOwnPropertyDescriptor;var ui=Object.getOwnPropertyNames;var gi=Object.getPrototypeOf,fi=Object.prototype.hasOwnProperty;var vi=(e,t)=>{for(var a in t)Ot(e,a,{get:t[a],enumerable:!0})},Ha=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ui(t))!fi.call(e,r)&&r!==a&&Ot(e,r,{get:()=>t[r],enumerable:!(o=pi(t,r))||o.enumerable});return e};var Y=(e,t,a)=>(a=e!=null?mi(gi(e)):{},Ha(t||!e||!e.__esModule?Ot(a,"default",{value:e,enumerable:!0}):a,e)),hi=e=>Ha(Ot({},"__esModule",{value:!0}),e);var vr={};vi(vr,{default:()=>li});module.exports=hi(vr);var Ua=require("react"),fa=require("motion/react"),si=require("lucide-react");var Ja=require("clsx");var ya="-",bi=e=>{let t=wi(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let n=s.split(ya);return n[0]===""&&n.length!==1&&n.shift(),Va(n,t)||yi(s)},getConflictingClassGroupIds:(s,n)=>{let h=a[s]||[];return n&&o[s]?[...h,...o[s]]:h}}},Va=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Va(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(ya);return t.validators.find(({validator:s})=>s(i))?.classGroupId},Oa=/^\[(.+)\]$/,yi=e=>{if(Oa.test(e)){let t=Oa.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},wi=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Ci(Object.entries(e.classGroups),a).forEach(([i,s])=>{ba(s,o,i,t)}),o},ba=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:Ka(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(xi(r)){ba(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,s])=>{ba(s,Ka(t,i),a,o)})})},Ka=(e,t)=>{let a=e;return t.split(ya).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},xi=e=>e.isThemeGetter,Ci=(e,t)=>t?e.map(([a,o])=>{let r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,n])=>[t+s,n])):i);return[a,r]}):e,Ni=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,s)=>{a.set(i,s),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let s=a.get(i);if(s!==void 0)return s;if((s=o.get(i))!==void 0)return r(i,s),s},set(i,s){a.has(i)?a.set(i,s):r(i,s)}}},Wa="!",Di=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,s=n=>{let h=[],d=0,N=0,v;for(let p=0;p<n.length;p++){let x=n[p];if(d===0){if(x===r&&(o||n.slice(p,p+i)===t)){h.push(n.slice(N,p)),N=p+i;continue}if(x==="/"){v=p;continue}}x==="["?d++:x==="]"&&d--}let D=h.length===0?n:n.substring(N),g=D.startsWith(Wa),k=g?D.substring(1):D,l=v&&v>N?v-N:void 0;return{modifiers:h,hasImportantModifier:g,baseClassName:k,maybePostfixModifierPosition:l}};return a?n=>a({className:n,parseClassName:s}):s},Si=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},ki=e=>({cache:Ni(e.cacheSize),parseClassName:Di(e),...bi(e)}),Pi=/\s+/,Ai=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],s=e.trim().split(Pi),n="";for(let h=s.length-1;h>=0;h-=1){let d=s[h],{modifiers:N,hasImportantModifier:v,baseClassName:D,maybePostfixModifierPosition:g}=a(d),k=!!g,l=o(k?D.substring(0,g):D);if(!l){if(!k){n=d+(n.length>0?" "+n:n);continue}if(l=o(D),!l){n=d+(n.length>0?" "+n:n);continue}k=!1}let p=Si(N).join(":"),x=v?p+Wa:p,I=x+l;if(i.includes(I))continue;i.push(I);let J=r(l,k);for(let _=0;_<J.length;++_){let V=J[_];i.push(x+V)}n=d+(n.length>0?" "+n:n)}return n};function Ti(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=$a(t))&&(o&&(o+=" "),o+=a);return o}var $a=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=$a(e[o]))&&(a&&(a+=" "),a+=t);return a};function Ri(e,...t){let a,o,r,i=s;function s(h){let d=t.reduce((N,v)=>v(N),e());return a=ki(d),o=a.cache.get,r=a.cache.set,i=n,n(h)}function n(h){let d=o(h);if(d)return d;let N=Ai(h,a);return r(h,N),N}return function(){return i(Ti.apply(null,arguments))}}var Q=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ga=/^\[(?:([a-Ya-]+):)?(.+)\]$/i,Ii=/^\d+\/\d+$/,Mi=new Set(["px","full","screen"]),Bi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ji=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|Ua|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Li=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ei=/^(inset_)?-?((\d+)?\.?(\d+)[a-Ya]+|0)_-?((\d+)?\.?(\d+)[a-Ya]+|0)/,zi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,He=e=>gt(e)||Mi.has(e)||Ii.test(e),$e=e=>ft(e,"length",$i),gt=e=>!!e&&!Number.isNaN(Number(e)),ha=e=>ft(e,"number",gt),St=e=>!!e&&Number.isInteger(Number(e)),Fi=e=>e.endsWith("%")&&gt(e.slice(0,-1)),E=e=>Ga.test(e),Ge=e=>Bi.test(e),Ui=new Set(["length","size","percentage"]),Hi=e=>ft(e,Ui,_a),Oi=e=>ft(e,"position",_a),Ki=new Set(["image","url"]),Vi=e=>ft(e,Ki,_i),Wi=e=>ft(e,"",Gi),kt=()=>!0,ft=(e,t,a)=>{let o=Ga.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},$i=e=>ji.test(e)&&!Li.test(e),_a=()=>!1,Gi=e=>Ei.test(e),_i=e=>zi.test(e);var qi=()=>{let e=Q("colors"),t=Q("spacing"),a=Q("blur"),o=Q("brightness"),r=Q("borderColor"),i=Q("borderRadius"),s=Q("borderSpacing"),n=Q("borderWidth"),h=Q("contrast"),d=Q("grayscale"),N=Q("hueRotate"),v=Q("invert"),D=Q("gap"),g=Q("gradientColorStops"),k=Q("gradientColorStopPositions"),l=Q("inset"),p=Q("margin"),x=Q("opacity"),I=Q("padding"),J=Q("saturate"),_=Q("scale"),V=Q("sepia"),$=Q("skew"),ge=Q("space"),A=Q("translate"),H=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",E,t],f=()=>[E,t],je=()=>["",He,$e],m=()=>["auto",gt,E],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],Le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>["start","end","center","between","around","evenly","stretch"],tt=()=>["","0",E],Dt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Ae=()=>[gt,E];return{cacheSize:500,separator:":",theme:{colors:[kt],spacing:[He,$e],blur:["none","",Ge,E],brightness:Ae(),borderColor:[e],borderRadius:["none","","full",Ge,E],borderSpacing:f(),borderWidth:je(),contrast:Ae(),grayscale:tt(),hueRotate:Ae(),invert:tt(),gap:f(),gradientColorStops:[e],gradientColorStopPositions:[Fi,$e],inset:X(),margin:X(),opacity:Ae(),padding:f(),saturate:Ae(),scale:Ae(),sepia:tt(),skew:Ae(),space:f(),translate:f()},classGroups:{aspect:[{aspect:["auto","square","video",E]}],container:["container"],columns:[{columns:[Ge]}],"break-after":[{"break-after":Dt()}],"break-before":[{"break-before":Dt()}],"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:[...W(),E]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-Ya":[{"overflow-Ya":M()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-Ya":[{"overscroll-Ya":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[l]}],"inset-x":[{"inset-x":[l]}],"inset-Ya":[{"inset-Ya":[l]}],start:[{start:[l]}],end:[{end:[l]}],top:[{top:[l]}],right:[{right:[l]}],bottom:[{bottom:[l]}],left:[{left:[l]}],visibility:["visible","invisible","collapse"],Ya:[{Ya:["auto",St,E]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",E]}],grow:[{grow:tt()}],shrink:[{shrink:tt()}],order:[{order:["first","last","none",St,E]}],"grid-cols":[{"grid-cols":[kt]}],"col-start-end":[{col:["auto",{span:["full",St,E]},E]}],"col-start":[{"col-start":m()}],"col-end":[{"col-end":m()}],"grid-rows":[{"grid-rows":[kt]}],"row-start-end":[{row:["auto",{span:[St,E]},E]}],"row-start":[{"row-start":m()}],"row-end":[{"row-end":m()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",E]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",E]}],gap:[{gap:[D]}],"gap-x":[{"gap-x":[D]}],"gap-Ya":[{"gap-Ya":[D]}],"justify-content":[{justify:["normal",...be()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...be(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...be(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],Ya:[{Ya:[I]}],Ua:[{Ua:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[p]}],mx:[{mx:[p]}],my:[{my:[p]}],ms:[{ms:[p]}],me:[{me:[p]}],fa:[{fa:[p]}],mr:[{mr:[p]}],mb:[{mb:[p]}],ml:[{ml:[p]}],"space-x":[{"space-x":[ge]}],"space-x-reverse":["space-x-reverse"],"space-Ya":[{"space-Ya":[ge]}],"space-Ya-reverse":["space-Ya-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",E,t]}],"min-w":[{"min-w":[E,t,"min","max","fit"]}],"max-w":[{"max-w":[E,t,"none","full","min","max","fit","prose",{screen:[Ge]},Ge]}],h:[{h:[E,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[E,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[E,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[E,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ge,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ha]}],"font-family":[{font:[kt]}],"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",E]}],"line-clamp":[{"line-clamp":["none",gt,ha]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",He,E]}],"list-image":[{"list-image":["none",E]}],"list-style-type":[{list:["none","disc","decimal",E]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",He,$e]}],"underline-offset":[{"underline-offset":["auto",He,E]}],"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:f()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E]}],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",E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),Oi]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","Ya","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Hi]}],"bg-image":[{bg:["none",{"gradient-Ya":["t","tr","r","br","b","bl","l","tl"]},Vi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-Ya-pos":[{Ya:[k]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-Ya":[{Ya:[g]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-Ya":[{"rounded-Ya":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-Ya":[{"border-Ya":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-Ya":[{"divide-Ya":[n]}],"divide-Ya-reverse":["divide-Ya-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:G()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-Ya":[{"border-Ya":[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-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[He,E]}],"outline-w":[{outline:[He,$e]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:je()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[He,$e]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ge,Wi]}],"shadow-color":[{shadow:[kt]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...Le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Le()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Ge,E]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[N]}],invert:[{invert:[v]}],saturate:[{saturate:[J]}],sepia:[{sepia:[V]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[J]}],"backdrop-sepia":[{"backdrop-sepia":[V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-Ya":[{"border-spacing-Ya":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",E]}],duration:[{duration:Ae()}],ease:[{ease:["linear","in","out","in-out",E]}],delay:[{delay:Ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",E]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-Ya":[{"scale-Ya":[_]}],rotate:[{rotate:[St,E]}],"translate-x":[{"translate-x":[A]}],"translate-Ya":[{"translate-Ya":[A]}],"skew-x":[{"skew-x":[$]}],"skew-Ya":[{"skew-Ya":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",E]}],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","Ya-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",E]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","Ya","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":f()}],"scroll-mx":[{"scroll-mx":f()}],"scroll-my":[{"scroll-my":f()}],"scroll-ms":[{"scroll-ms":f()}],"scroll-me":[{"scroll-me":f()}],"scroll-fa":[{"scroll-fa":f()}],"scroll-mr":[{"scroll-mr":f()}],"scroll-mb":[{"scroll-mb":f()}],"scroll-ml":[{"scroll-ml":f()}],"scroll-p":[{"scroll-p":f()}],"scroll-px":[{"scroll-px":f()}],"scroll-py":[{"scroll-py":f()}],"scroll-ps":[{"scroll-ps":f()}],"scroll-Ya":[{"scroll-Ya":f()}],"scroll-Ua":[{"scroll-Ua":f()}],"scroll-pr":[{"scroll-pr":f()}],"scroll-pb":[{"scroll-pb":f()}],"scroll-pl":[{"scroll-pl":f()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","Ya","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-Ya":[{"touch-pan":["Ya","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",E]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[He,$e,ha]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-Ya"],overscroll:["overscroll-x","overscroll-Ya"],inset:["inset-x","inset-Ya","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-Ya":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-Ya"],p:["px","py","ps","Ya","Ua","pr","pb","pl"],px:["pr","pl"],py:["Ua","pb"],m:["mx","my","ms","me","fa","mr","mb","ml"],mx:["mr","ml"],my:["fa","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-b","rounded-l","rounded-ss","rounded-Ya","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Ya","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-Ya"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-Ya":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-Ya":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-fa","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-fa","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Ya","scroll-Ua","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-Ua","scroll-pb"],touch:["touch-x","touch-Ya","touch-pz"],"touch-x":["touch"],"touch-Ya":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var qa=Ri(qi);function c(...e){return qa((0,Ja.clsx)(e))}var Xt=Y(require("react")),ka=Y(require("next/link"));var Xa=require("class-variance-authority");var Ya=require("react/jsx-runtime"),Ji=(0,Xa.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 ne({className:e,variant:t,...a}){return(0,Ya.jsx)("div",{className:c(Ji({variant:t}),e),...a})}var Qa=require("@radix-ui/react-slot"),eo=Y(require("react")),Xi=(0,Xa.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"}}}),w=eo.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,Ya.jsx)(e?Qa.Slot:"button",{className:c(Xi({className:t,size:a,variant:o})),ref:i,...r}));w.displayName="Button";var ao=Y(require("react"));var fe=ao.forwardRef(({className:e,type:t,...a},o)=>(0,Ya.jsx)("input",{type:t,className:c("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}));fe.displayName="Input";var wa=Y(require("react")),De=Y(require("@radix-ui/react-scroll-area"));var qe=wa.forwardRef(({className:e,children:t,...a},o)=>(0,Ya.jsxs)(De.Root,{ref:o,className:c("relative overflow-hidden",e),...a,children:[(0,Ya.jsx)(De.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ya.jsx)(io,{}),(0,Ya.jsx)(De.Corner,{})]}));qe.displayName=De.Root.displayName;var io=wa.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Ya.jsx)(De.ScrollAreaScrollbar,{ref:o,orientation:t,className:c("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,Ya.jsx)(De.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));io.displayName=De.ScrollAreaScrollbar.displayName;var Pt=Y(require("react")),le=Y(require("@radix-ui/react-dialog"));var no=le.Root;var Yi=le.Portal;var so=Pt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(le.Overlay,{ref:a,className:c("fixed inset-0 Ya-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}));so.displayName=le.Overlay.displayName;var xa=Pt.forwardRef(({className:e,children:t,...a},o)=>(0,Ya.jsxs)(Yi,{children:[(0,Ya.jsx)(so,{}),(0,Ya.jsxs)(le.Content,{ref:o,className:c("fixed left-[50%] top-[50%] Ya-50 grid w-full max-w-lg translate-x-[-50%] translate-Ya-[-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-Ya-left-1/2 data-[state=closed]:slide-out-Ya-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,Ya.jsxs)(le.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,Ya.jsx)(si.X,{className:"h-4 w-4"}),(0,Ya.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));xa.displayName=le.Content.displayName;var Ca=({className:e,...t})=>(0,Ya.jsx)("div",{className:c("flex flex-col space-Ya-1.5 text-center sm:text-left",e),...t});Ca.displayName="DialogHeader";var Qi=({className:e,...t})=>(0,Ya.jsx)("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Qi.displayName="DialogFooter";var Na=Pt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(le.Title,{ref:a,className:c("text-lg font-semibold leading-none tracking-tight",e),...t}));Na.displayName=le.Title.displayName;var Zi=Pt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(le.Description,{ref:a,className:c("text-sm text-muted-foreground",e),...t}));Zi.displayName=le.Description.displayName;var At=Y(require("@radix-ui/react-checkbox")),co=Y(require("react")),Da=co.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(At.Root,{className:c("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,Ya.jsx)(At.Indicator,{className:c("flex items-center justify-center text-current"),children:(0,Ya.jsx)(si.Check,{className:"h-4 w-4"})})}));Da.displayName=At.Root.displayName;var Ee=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var po=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Ya.jsx)(si.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,Ya.jsx)(si.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,Ya.jsx)(si.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,Ya.jsx)(si.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,Ya.jsx)(si.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,Ya.jsx)(si.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,Ya.jsx)(si.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,Ya.jsx)(si.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,Ya.jsx)(si.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,Ya.jsx)(si.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],$t=[{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 Sa=[{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}],Vt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned Ya 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}],_t=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],er=[..._t,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],tr=[...$t,{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}],Wt={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:[]},mo={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:_t.filter(e=>e.epicId==="1")};var Fr={empty:{initialProjects:Wt.projects,initialEpics:Wt.epics,initialSprints:Wt.sprints,initialTasks:Wt.tasks},default:{initialProjects:$t,initialEpics:Sa,initialSprints:Vt,initialTasks:_t},highDensity:{initialProjects:$t,initialEpics:Sa,initialSprints:Vt,initialTasks:er},singleEpic:{initialProjects:$t,initialEpics:mo.epics,initialSprints:Vt,initialTasks:mo.tasks},multipleProjects:{initialProjects:tr,initialEpics:Sa,initialSprints:Vt,initialTasks:_t}},Gt=[{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(Ee),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Ee),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(Ee),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Ee),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 Ya 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","Ya","Statistics"].map(Ee),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Ee),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(Ee),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Ee),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 Ya customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases Ya human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Ee),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Ee),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Ur=[{id:"1",title:"Review quarterly report",description:"Ya through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Gt.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:Gt.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 Ya production",description:"Deploy the latest version Ya production environment",dueDate:new Date,dueTime:"16:00",colleague:Gt.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 Hr=Gt.filter(e=>e.type==="digital");function Jt(e,t){let[a,o]=(0,Ua.useState)(()=>{if(typeof window>"Ya")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{o(i),typeof window<"Ya"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Ua.useEffect)(()=>{r(a)},[]),[a,r]}function Pa({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=po[0],onBusinessUnitChange:i,onSearch:s,className:n,logo:h="/headerlogo.png",appName:d="Nuvia",tagline:N="Collaboration Platform"}){let[v,D]=Xt.useState({}),[g,k]=Jt("sidebar-favorites",{}),[l,p]=Xt.useState(null),[x,I]=Xt.useState(""),J=m=>{D(W=>({...W,[m]:!W[m]}))},_=m=>{i?.(m)},V=()=>{x.trim()&&s?.(x.trim())},$=m=>{m.key==="Enter"&&(m.preventDefault(),V())},ge=(m,W)=>{let G=g[m]||[],Le=G.includes(W)?G.filter(be=>be!==W):G.concat(W);k({...g,[m]:Le})},A=m=>{if(!m.items||!m.maxItems||m.items.length<=m.maxItems)return m.items||[];let W=g[m.id]||[],G=m.items.filter(be=>W.includes(be.id)),Le=m.items.filter(be=>!W.includes(be.id));return[...G,...Le].slice(0,m.maxItems)},H=m=>m.maxItems&&m.items&&m.items.length>m.maxItems,M=e,X=m=>{let W=H(m),G=A(m),Le=(0,Ya.jsxs)(Ya.Fragment,{children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-3",children:[m.icon,(0,Ya.jsx)("span",{children:m.title})]}),m.badge&&(0,Ya.jsx)(ne,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:m.badge}),m.items&&(0,Ya.jsx)(si.ChevronDown,{className:c("ml-2 h-4 w-4 transition-transform",v[m.title]?"rotate-180":"")})]}),be=c("flex w-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,Ya.jsx)(ka.default,{href:m.url,className:be,onClick:a?o:void 0,children:Le}):(0,Ya.jsx)("button",{className:be,onClick:()=>m.items&&J(m.title),children:Le})},f=()=>{let m=e.find(G=>G.id===l);if(!m||!m.items||!m.maxItems)return null;let W=g[m.id]||[];return(0,Ya.jsx)(no,{open:!!l,onOpenChange:G=>!G&&p(null),children:(0,Ya.jsxs)(xa,{className:"sm:max-w-md",children:[(0,Ya.jsxs)(Ca,{children:[(0,Ya.jsxs)(Na,{children:["Manage ",m.title," Favorites"]}),(0,Ya.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up Ya ",m.maxItems," items Ya show in ",m.title.toLowerCase(),"."]})]}),(0,Ya.jsx)(qe,{className:"max-h-96 pr-4",children:(0,Ya.jsx)("div",{className:"space-Ya-4",children:m.items.map(G=>(0,Ya.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ya.jsx)(Da,{id:G.id,checked:W.includes(G.id),onCheckedChange:()=>ge(m.id,G.id),disabled:!W.includes(G.id)&&W.length>=(m.maxItems||0)}),(0,Ya.jsxs)("label",{htmlFor:G.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:[G.title,G.badge&&(0,Ya.jsx)(ne,{variant:"outline",className:"text-xs",children:G.badge})]})]},G.id))})})]})})},je=(0,Ya.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Ya.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ya.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,Ya.jsx)("img",{src:h,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("h2",{className:"font-semibold",children:d}),(0,Ya.jsx)("p",{className:"text-xs text-muted-foreground",children:N})]})]}),a&&(0,Ya.jsx)(w,{variant:"ghost",size:"icon",onClick:o,children:(0,Ya.jsx)(si.X,{className:"h-5 w-5"})})]}),(0,Ya.jsx)("div",{className:"px-3 py-2",children:(0,Ya.jsxs)("div",{className:"relative",children:[(0,Ya.jsx)(si.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Ya.jsx)(fe,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:x,onChange:m=>I(m.target.value),onKeyPress:$})]})}),(0,Ya.jsx)(qe,{className:"flex-1 px-3 py-2",children:(0,Ya.jsx)("div",{className:"space-Ya-1",children:M.map(m=>(0,Ya.jsxs)("div",{className:"mb-1",children:[X(m),m.items&&v[m.title]&&(0,Ya.jsxs)("div",{className:"fa-1 ml-6 space-Ya-1 border-l pl-3",children:[A(m).map(W=>(0,Ya.jsxs)(ka.default,{href:W.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[W.title,W.badge&&(0,Ya.jsx)(ne,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:W.badge})]},W.id)),H(m)&&m.items&&m.items.length>A(m).length&&(0,Ya.jsxs)("button",{onClick:()=>p(m.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:["...",m.items.length-A(m).length," more available"]})]})]},m.id))})}),(0,Ya.jsx)("div",{className:"p-3",children:(0,Ya.jsx)("div",{className:"space-Ya-1",children:(0,Ya.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,Ya.jsx)(si.Settings,{className:"h-5 w-5"}),(0,Ya.jsx)("span",{children:"Settings"})]})})}),(0,Ya.jsx)(f,{})]});return a?(0,Ya.jsx)("div",{className:c("fixed inset-Ya-0 left-0 Ya-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:je}):(0,Ya.jsx)("div",{className:c("fixed inset-Ya-0 left-0 Ya-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:je})}var Yt=Y(require("react")),Oe=Y(require("@radix-ui/react-avatar"));var at=Yt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(Oe.Root,{ref:a,className:c("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));at.displayName=Oe.Root.displayName;var Tt=Yt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(Oe.Image,{ref:a,className:c("aspect-square h-full w-full",e),...t}));Tt.displayName=Oe.Image.displayName;var ot=Yt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(Oe.Fallback,{ref:a,className:c("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ot.displayName=Oe.Fallback.displayName;var uo=Y(require("react")),Re=Y(require("@radix-ui/react-tooltip"));var Zt=Re.Provider,ea=Re.Root,ta=Re.Trigger,Rt=uo.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ya.jsx)(Re.Portal,{children:(0,Ya.jsx)(Re.Content,{ref:o,sideOffset:t,className:c("Ya-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})}));Rt.displayName=Re.Content.displayName;var go=require("next-themes");function fo(){let{setTheme:e,theme:t}=(0,go.useTheme)();return(0,Ya.jsx)(Zt,{children:(0,Ya.jsxs)(ea,{children:[(0,Ya.jsx)(ta,{asChild:!0,children:(0,Ya.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Ya.jsx)(si.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Ya.jsx)(si.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Ya.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Ya.jsx)(Rt,{children:"Toggle theme"})]})})}function vo({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let s=e.filter(d=>!d.read),n=s.length,h=d=>{switch(d){case"info":return(0,Ya.jsx)(si.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,Ya.jsx)(si.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,Ya.jsx)(si.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,Ya.jsx)(si.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,Ya.jsx)(fa.AnimatePresence,{children:t&&(0,Ya.jsxs)(Ya.Fragment,{children:[(0,Ya.jsx)(fa.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 Ya-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,Ya.jsx)(fa.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:c("fixed inset-Ya-0 right-0 Ya-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,Ya.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Ya.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ya.jsx)(si.Bell,{className:"h-5 w-5"}),(0,Ya.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),n>0&&(0,Ya.jsxs)(ne,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[n," new"]})]}),(0,Ya.jsxs)(w,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Ya.jsx)(si.X,{className:"h-5 w-5"}),(0,Ya.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n>0&&(0,Ya.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,Ya.jsxs)("span",{className:"text-sm text-muted-foreground",children:[n," unread notification",n!==1?"s":""]}),(0,Ya.jsx)(w,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),s.length>0?(0,Ya.jsx)(qe,{className:"flex-1",children:(0,Ya.jsx)("div",{className:"divide-Ya",children:s.map(d=>(0,Ya.jsxs)("div",{className:c("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Ya.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:h(d.type)}),(0,Ya.jsxs)("div",{className:"flex-1 space-Ya-1",children:[(0,Ya.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ya.jsx)("p",{className:"font-medium",children:d.title}),(0,Ya.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ya.jsx)("p",{className:"text-xs text-muted-foreground",children:d.time}),(0,Ya.jsx)(w,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(d.id),title:"Dismiss",children:(0,Ya.jsx)(si.Check,{className:"h-3 w-3"})})]})]}),(0,Ya.jsx)("p",{className:"text-sm text-muted-foreground",children:d.description}),d.actionLabel&&(0,Ya.jsxs)(w,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:d.onAction,children:[d.actionLabel,(0,Ya.jsx)(si.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},d.id))})}):(0,Ya.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Ya.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Ya.jsx)(si.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,Ya.jsx)("h3",{className:"fa-4 text-lg font-medium",children:"si notifications"}),(0,Ya.jsx)("p",{className:"fa-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var it=Y(require("@radix-ui/react-tabs"));function ho({className:e,...t}){return(0,Ya.jsx)(it.Root,{"data-slot":"tabs",className:c("flex flex-col gap-2",e),...t})}function bo({className:e,...t}){return(0,Ya.jsx)(it.List,{"data-slot":"tabs-list",className:c("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function yo({className:e,...t}){return(0,Ya.jsx)(it.Trigger,{"data-slot":"tabs-trigger",className:c("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 Ke=Y(require("react")),O=Y(require("@radix-ui/react-dropdown-menu")),vt=require("@radix-ui/react-icons");var ia=O.Root,ra=O.Trigger;var ar=Ke.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,Ya.jsxs)(O.SubTrigger,{ref:r,className:c("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,Ya.jsx)(vt.ChevronRightIcon,{className:"ml-auto"})]}));ar.displayName=O.SubTrigger.displayName;var or=Ke.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(O.SubContent,{ref:a,className:c("Ya-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}));or.displayName=O.SubContent.displayName;var Mt=Ke.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ya.jsx)(O.Portal,{children:(0,Ya.jsx)(O.Content,{ref:o,sideOffset:t,className:c("Ya-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})}));Mt.displayName=O.Content.displayName;var rt=Ke.forwardRef(({className:e,inset:t,...a},o)=>(0,Ya.jsx)(O.Item,{ref:o,className:c("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}));rt.displayName=O.Item.displayName;var ir=Ke.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,Ya.jsxs)(O.CheckboxItem,{ref:r,className:c("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,Ya.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ya.jsx)(O.ItemIndicator,{children:(0,Ya.jsx)(vt.CheckIcon,{className:"h-4 w-4"})})}),t]}));ir.displayName=O.CheckboxItem.displayName;var rr=Ke.forwardRef(({className:e,children:t,...a},o)=>(0,Ya.jsxs)(O.RadioItem,{ref:o,className:c("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,Ya.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ya.jsx)(O.ItemIndicator,{children:(0,Ya.jsx)(vt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));rr.displayName=O.RadioItem.displayName;var nr=Ke.forwardRef(({className:e,inset:t,...a},o)=>(0,Ya.jsx)(O.Label,{ref:o,className:c("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));nr.displayName=O.Label.displayName;var sr=Ke.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(O.Separator,{ref:a,className:c("-mx-1 my-1 h-px bg-muted",e),...t}));sr.displayName=O.Separator.displayName;var lr=({className:e,...t})=>(0,Ya.jsx)("span",{className:c("ml-auto text-xs tracking-widest opacity-60",e),...t});lr.displayName="DropdownMenuShortcut";function na({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let s=a.find(n=>n.value===e);return(0,Ya.jsxs)(fa.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,Ya:-20},animate:{opacity:1,Ya:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Ya.jsx)("div",{className:"hidden lg:block",children:(0,Ya.jsx)(ho,{value:e,onValueChange:t,children:(0,Ya.jsx)(bo,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Ya.jsx)(yo,{value:n.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:n.label})},n.value))})})}),(0,Ya.jsx)("div",{className:"lg:hidden",children:(0,Ya.jsxs)(ia,{children:[(0,Ya.jsx)(ra,{asChild:!0,children:(0,Ya.jsxs)(w,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[s?.label||"Select",(0,Ya.jsx)(si.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Ya.jsx)(Mt,{align:"center",className:"w-[180px]",children:a.map(n=>(0,Ya.jsx)(rt,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function xo({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:s="assistant",onTabChange:n,showTabs:h=!0,tabOptions:d=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:N,actionIcon:v=(0,Ya.jsx)(si.Bot,{className:"mr-2 h-4 w-4"}),actionText:D="Action",onNotificationRemove:g,onRemoveAll:k,logo:l="/headerlogo.png",appName:p="Nuvia",tagline:x="Collaboration Platform"}){let[I,J]=(0,Ua.useState)(!1),[_,V]=(0,Ua.useState)(t),$=_.filter(H=>!H.read).length,ge=H=>{V(M=>M.filter(X=>X.id!==H)),g?.(H)},A=()=>{V(H=>H.filter(M=>M.read)),k?.()};return(0,Ya.jsxs)(Ya.Fragment,{children:[(0,Ya.jsxs)("header",{className:`sticky top-0 Ya-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,Ya.jsx)(w,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Ya.jsx)(si.Menu,{className:"h-5 w-5"})}),(0,Ya.jsx)(w,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Ya.jsx)(si.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,Ya.jsxs)(fa.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Ya.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,Ya.jsx)("img",{src:l,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("h2",{className:"font-semibold text-sm",children:p}),(0,Ya.jsx)("p",{className:"text-xs text-muted-foreground",children:x})]})]}),(0,Ya.jsxs)("div",{className:"flex flex-1 items-center",children:[h&&(0,Ya.jsx)(na,{activeTab:s,onTabChange:n,tabOptions:d}),(0,Ya.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Ya.jsx)(fa.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ya.jsxs)(w,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:N,children:[v,D]})})}),(0,Ya.jsx)(fo,{}),(0,Ya.jsx)(Zt,{children:(0,Ya.jsxs)(ea,{children:[(0,Ya.jsx)(ta,{asChild:!0,children:(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ya.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>J(!0),children:[(0,Ya.jsx)(fa.motion.div,{animate:$>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:$>0?1/0:0,repeatDelay:3},children:(0,Ya.jsx)(si.Bell,{className:"h-5 w-5"})}),$>0&&(0,Ya.jsx)(fa.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:$})]})})}),(0,Ya.jsx)(Rt,{children:"Notifications"})]})}),(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ya.jsxs)(at,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Ya.jsx)(Tt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Ya.jsx)(ot,{})]})})]})]})]}),(0,Ya.jsx)(vo,{notifications:_,open:I,onClose:()=>J(!1),onNotificationRemove:ge,onRemoveAll:A})]})}var Co=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Ya.jsx)(si.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Do({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=Co[0],onBusinessUnitChange:i,onSearch:s,businessUnits:n=Co,activeTab:h,onTabChange:d,showTabs:N=!1,onActionClick:v,actionIcon:D,actionText:g="Action",onNotificationRemove:k,onRemoveAll:l,logo:p="/headerlogo.png",appName:x="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:J=!1}){let[_,V]=(0,Ua.useState)(!J),[$,ge]=(0,Ua.useState)(!1),[A,H]=(0,Ua.useState)(r),M=X=>{H(X),i?.(X)};return(0,Ya.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[$&&(0,Ya.jsx)("div",{className:"fixed inset-0 Ya-40 bg-black/50 md:hidden",onClick:()=>ge(!1)}),(0,Ya.jsx)("div",{className:"md:hidden",children:(0,Ya.jsx)(Pa,{items:e,isOpen:$,isMobile:!0,onClose:()=>ge(!1),currentBusinessUnit:A,onBusinessUnitChange:M,onSearch:s,logo:p,appName:x,tagline:I})}),(0,Ya.jsx)("div",{className:"hidden md:block",children:(0,Ya.jsx)(Pa,{items:e,isOpen:_,isMobile:!1,currentBusinessUnit:A,onBusinessUnitChange:M,onSearch:s,logo:p,appName:x,tagline:I})}),(0,Ya.jsxs)("div",{className:c("min-h-screen fixed w-full transition-all duration-300 ease-in-out",_?"md:pl-64":"md:pl-0"),children:[(0,Ya.jsx)(xo,{title:a,notifications:o,onToggleSidebar:()=>V(!_),onToggleMobileMenu:()=>ge(!0),sidebarOpen:_,activeTab:h,onTabChange:d,showTabs:N,onActionClick:v,actionIcon:D,actionText:g,onNotificationRemove:k,onRemoveAll:l,logo:p,appName:x,tagline:I}),(0,Ya.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var la=require("react-icons/fa");function ke({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:s,className:n}){let[h,d]=Jt(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),N=!r&&!t||h;return(0,Ya.jsxs)(fa.motion.div,{initial:{opacity:0,Ya:20},animate:{opacity:1,Ya:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${n||""}`,children:[(0,Ya.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Ya.jsx)(ne,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Ya.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Ya.jsxs)("div",{className:"flex items-center gap-3",children:[N&&o&&(0,Ya.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,Ya.jsx)("button",{"aria-label":h?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>d(!h),style:{lineHeight:0},children:h?(0,Ya.jsx)(la.FaChevronDown,{size:22}):(0,Ya.jsx)(la.FaChevronUp,{size:22})})]})]}),!N&&(0,Ya.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Ya.jsxs)("div",{className:"space-Ya-4",children:[(0,Ya.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Ya.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Ya.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,Ya.jsx)(w,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),s&&(0,Ya.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var nt=Y(require("react"));var Z=nt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)("div",{ref:a,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Z.displayName="Card";var ie=nt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)("div",{ref:a,className:c("flex flex-col space-Ya-1.5 p-6",e),...t}));ie.displayName="CardHeader";var me=nt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)("div",{ref:a,className:c("font-semibold leading-none tracking-tight",e),...t}));me.displayName="CardTitle";var Bt=nt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)("div",{ref:a,className:c("text-sm text-muted-foreground",e),...t}));Bt.displayName="CardDescription";var ee=nt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)("div",{ref:a,className:c("p-6 Ua-0",e),...t}));ee.displayName="CardContent";var jt=nt.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)("div",{ref:a,className:c("flex items-center p-6 Ua-0",e),...t}));jt.displayName="CardFooter";var ko=Y(require("react")),Lt=Y(require("@radix-ui/react-progress"));var Et=ko.forwardRef(({className:e,value:t,...a},o)=>(0,Ya.jsx)(Lt.Root,{ref:o,className:c("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Ya.jsx)(Lt.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Et.displayName=Lt.Root.displayName;function Ma({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.02,Ya:-5},whileTap:{scale:.98},className:r,children:(0,Ya.jsxs)(Z,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Ya.jsx)(ie,{className:"pb-2",children:(0,Ya.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ya.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Ya.jsx)(ne,{className:"rounded-xl bg-amber-500",children:"New"}):(0,Ya.jsx)(w,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Ya.jsx)(si.Star,{className:"h-4 w-4"})})]})}),(0,Ya.jsxs)(ee,{className:"pb-2",children:[(0,Ya.jsx)(me,{className:"text-lg",children:e.name}),(0,Ya.jsx)(Bt,{children:e.description}),o&&e.progress<100&&(0,Ya.jsxs)("div",{className:"fa-2",children:[(0,Ya.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ya.jsx)("span",{children:"Installation"}),(0,Ya.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Ya.jsx)(Et,{value:e.progress,className:"h-2 fa-1 rounded-xl"})]})]}),(0,Ya.jsx)(jt,{children:(0,Ya.jsx)(w,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function Io({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:i}){return(0,Ya.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[r&&(0,Ya.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Ya.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Ya.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Ya.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Ya.jsx)("div",{className:"divide-Ya",children:e.map(s=>(0,Ya.jsxs)(fa.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(s),children:[(0,Ya.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Ya.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Ya.jsx)("div",{children:(0,Ya.jsx)("p",{className:"font-medium",children:s.name})})]}),(0,Ya.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:s.filesize}),(0,Ya.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Ya.jsx)("span",{className:"text-sm md:text-base",children:typeof s.createdAt=="string"?s.createdAt:new Date(s.createdAt).toLocaleDateString()}),(0,Ya.jsx)("div",{className:"flex gap-1",children:(0,Ya.jsx)(w,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:n=>{n.stopPropagation(),o?.(s)},children:(0,Ya.jsx)(si.Trash2,{className:"h-4 w-4"})})})]})]},s.name))})]})}function Bo({project:e,onOpen:t,onShare:a,className:o}){return(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.02,Ya:-5},whileTap:{scale:.98},className:o,children:(0,Ya.jsxs)(Z,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Ya.jsxs)(ie,{children:[(0,Ya.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ya.jsx)(me,{children:e.name}),(0,Ya.jsxs)(ne,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Ya.jsx)(Bt,{children:e.description})]}),(0,Ya.jsxs)(ee,{className:"space-Ya-4",children:[(0,Ya.jsxs)("div",{className:"space-Ya-2",children:[(0,Ya.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ya.jsx)("span",{children:"Progress"}),(0,Ya.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Ya.jsx)(Et,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,Ya.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Ya.jsxs)("div",{className:"flex items-center",children:[(0,Ya.jsx)(si.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,Ya.jsxs)("div",{className:"flex items-center",children:[(0,Ya.jsx)(si.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,Ya.jsxs)(jt,{className:"flex gap-2",children:[(0,Ya.jsx)(w,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Ya.jsx)(w,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Ya.jsx)(si.Share2,{className:"h-4 w-4"})})]})]})})}var Ba=[{name:"PixelMaster",icon:(0,Ya.jsx)(si.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Ya.jsx)(si.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Ya.jsx)(si.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Ya.jsx)(si.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Ya.jsx)(si.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Ya.jsx)(si.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Ya.jsx)(si.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Ya.jsx)(si.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Ya.jsx)(si.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Ya.jsx)(si.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Ya.jsx)(si.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Ya.jsx)(si.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],jo=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var Lo=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var zo=[{id:"home",title:"Home",icon:(0,Ya.jsx)(si.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Ya.jsx)(si.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,Ya.jsx)(si.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Ua",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,Ya.jsx)(si.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Ya.jsx)(si.FileText,{}),url:"/knowledge"}],Fo=[{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 Ya 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'si 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")}];var yt=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var ja=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],da=[{id:1,name:"Backlog",description:"Tasks not yet assigned Ya a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],pa=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],dr=[...pa,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],cr=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],ca={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:[]},Eo={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:pa.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var ps={empty:{initialProjects:ca.projects,initialEpics:ca.epics,initialSprints:ca.sprints,initialTasks:ca.tasks},default:{initialProjects:yt,initialEpics:ja,initialSprints:da,initialTasks:pa},highDensity:{initialProjects:yt,initialEpics:ja,initialSprints:da,initialTasks:dr},singleEpic:{initialProjects:yt,initialEpics:Eo.epics,initialSprints:da,initialTasks:Eo.tasks},multipleProjects:{initialProjects:cr,initialEpics:ja,initialSprints:da,initialTasks:pa}},ma=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond Ya customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases Ya human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],us=[{id:1,title:"Review quarterly report",description:"Ya through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:ma.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:yt[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:ma.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:yt[0]},{id:3,title:"Deploy Ya production",description:"Deploy the latest version Ya production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:ma.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:yt[0]}];var gs=ma.filter(e=>e.type==="digital");var K=Y(require("@radix-ui/react-select")),Qe=Y(require("react")),zt=K.Root;var Ft=K.Value,wt=Qe.forwardRef(({children:e,className:t,...a},o)=>(0,Ya.jsxs)(K.Trigger,{className:c("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,Ya.jsx)(K.Icon,{asChild:!0,children:(0,Ya.jsx)(si.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));wt.displayName=K.Trigger.displayName;var Uo=Qe.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(K.ScrollUpButton,{className:c("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Ya.jsx)(si.ChevronUp,{className:"h-4 w-4"})}));Uo.displayName=K.ScrollUpButton.displayName;var Ho=Qe.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(K.ScrollDownButton,{className:c("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Ya.jsx)(si.ChevronDown,{className:"h-4 w-4"})}));Ho.displayName=K.ScrollDownButton.displayName;var xt=Qe.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,Ya.jsx)(K.Portal,{children:(0,Ya.jsxs)(K.Content,{className:c("relative Ya-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-Ya-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-Ya-1",t),position:a,ref:r,...o,children:[(0,Ya.jsx)(Uo,{}),(0,Ya.jsx)(K.Viewport,{className:c("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Ya.jsx)(Ho,{})]})}));xt.displayName=K.Content.displayName;var mr=Qe.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(K.Label,{className:c("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));mr.displayName=K.Label.displayName;var Fe=Qe.forwardRef(({children:e,className:t,...a},o)=>(0,Ya.jsxs)(K.Item,{className:c("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,Ya.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ya.jsx)(K.ItemIndicator,{children:(0,Ya.jsx)(si.Check,{className:"h-4 w-4"})})}),(0,Ya.jsx)(K.ItemText,{children:e})]}));Fe.displayName=K.Item.displayName;var pr=Qe.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(K.Separator,{className:c("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));pr.displayName=K.Separator.displayName;function ua({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:s}){let[n,h]=(0,Ua.useState)(!1),d=D=>{switch(D){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},N=D=>{switch(D){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},v=D=>{if(!D)return"Never";let k=Math.floor((new Date().getTime()-D.getTime())/(1e3*60));return k<1?"Just now":k<60?`${k}m ago`:k<1440?`${Math.floor(k/60)}h ago`:`${Math.floor(k/1440)}d ago`};return(0,Ya.jsxs)(Z,{className:c("hover:shadow-md transition-shadow",i&&"p-2",s),children:[(0,Ya.jsx)(ie,{className:c("pb-3",i&&"pb-2"),children:(0,Ya.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ya.jsx)("div",{className:"relative",children:(0,Ya.jsxs)(at,{className:c("h-12 w-12",i&&"h-8 w-8"),children:[(0,Ya.jsx)(Tt,{src:"/placeholder.svg",alt:e.name||"name"}),(0,Ya.jsx)(ot,{children:e.name?.split(" ").map(D=>D[0]).join("")})]})}),(0,Ya.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ya.jsx)("h3",{className:c("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,Ya.jsx)(si.Bot,{className:c("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,Ya.jsx)(si.User,{className:c("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,Ya.jsx)("p",{className:c("text-sm text-muted-foreground truncate",i&&"text-xs")}),!i&&(0,Ya.jsx)("div",{className:"flex items-center gap-2 fa-1"})]})]}),r&&(0,Ya.jsxs)(ia,{children:[(0,Ya.jsx)(ra,{asChild:!0,children:(0,Ya.jsx)(w,{variant:"ghost",size:"icon",className:c("h-8 w-8",i&&"h-6 w-6"),children:(0,Ya.jsx)(si.MoreHorizontal,{className:c("h-4 w-4",i&&"h-3 w-3")})})}),(0,Ya.jsxs)(Mt,{align:"end",children:[e.type==="digital"&&(0,Ya.jsxs)(Ya.Fragment,{children:[(0,Ya.jsxs)(rt,{onClick:()=>o?.(e),children:[(0,Ya.jsx)(si.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,Ya.jsxs)(rt,{onClick:()=>t?.(e),children:[(0,Ya.jsx)(si.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]})]}),(0,Ya.jsxs)(rt,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,Ya.jsx)(si.Trash2,{className:"h-4 w-4 mr-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,Ya.jsxs)(ee,{className:"Ua-0",children:[(0,Ya.jsx)("div",{className:"space-Ya-2 text-sm",children:e.type==="human"&&(0,Ya.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Ya.jsx)(si.Mail,{className:"h-3 w-3"}),(0,Ya.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,Ya.jsx)("div",{className:"fa-3",children:(0,Ya.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,n?e.capabilities.length:2).map(D=>(0,Ya.jsx)(ne,{variant:"outline",className:"text-xs",children:typeof D.value=="number"?D.value:D.value.name},typeof D.value=="number"?D.value:D.value.name)),(e.capabilities?.length||0)>2&&(0,Ya.jsx)(w,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>h(!n),children:n?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}var Ko=Y(require("react")),La=Y(require("@radix-ui/react-label"));var ur=(0,Xa.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),dt=Ko.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)(La.Root,{ref:a,className:c(ur(),e),...t}));dt.displayName=La.Root.displayName;var $o=Y(require("react")),Ze=$o.forwardRef(({className:e,...t},a)=>(0,Ya.jsx)("textarea",{className:c("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Ze.displayName="Textarea";function Ea({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:s="Cancel",readOnly:n=!1,availableKnowledgeDocuments:h=[]}){let[d,N]=(0,Ua.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,...e}),[v,D]=(0,Ua.useState)(""),[g,k]=(0,Ua.useState)(""),[l,p]=(0,Ua.useState)(!n);(0,Ua.useEffect)(()=>{e&&N(e)},[e]);let x=A=>{A.preventDefault();let H={id:d.id||parseInt(Date.now().toString()),name:d.name,type:"digital",description:d.description,jobDescription:d.jobDescription||"",workInstructions:d.workInstructions||"",capabilities:d.capabilities||[],capabilityLevel:d.capabilityLevel||0};t(H)},I=(A,H,M)=>{if(!H.trim())return;let X=d[A]||[];N({...d,[A]:[...X,H.trim()]}),M("")},J=(A,H)=>{let M=d[A]||[];N({...d,[A]:M.filter((X,f)=>f!==H)})},_=A=>{A.preventDefault(),p(!l)},V=(A,H,M,X,f)=>{let je=d[A]||[];return(0,Ya.jsxs)("div",{className:"space-Ya-2",children:[(0,Ya.jsx)(dt,{children:H}),l&&(0,Ya.jsxs)("div",{className:"flex gap-2",children:[(0,Ya.jsx)(fe,{value:M,onChange:m=>X(m.target.value),placeholder:f,onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),I(A,M,X))},disabled:o}),(0,Ya.jsx)(w,{type:"button",variant:"outline",size:"icon",onClick:()=>I(A,M,X),disabled:o,children:(0,Ya.jsx)(si.Plus,{className:"h-4 w-4"})})]}),(0,Ya.jsx)("div",{className:"flex flex-wrap gap-2",children:je.map((m,W)=>(0,Ya.jsxs)(ne,{className:"gap-1",children:[m,l&&(0,Ya.jsx)(w,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>J(A,W),disabled:o,children:(0,Ya.jsx)(si.X,{className:"h-3 w-3"})})]},`${A}-${W}-${m}`))})]})},$=r||(l?e?"Edit Colleague":"Add New Colleague":"View Colleague"),ge=i||(e?"Update Colleague":"Add Colleague");return(0,Ya.jsxs)(Z,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,Ya.jsx)(ie,{children:(0,Ya.jsxs)(me,{className:"flex items-center gap-2",children:[(0,Ya.jsx)(si.Bot,{className:"h-5 w-5"}),$]})}),(0,Ya.jsx)(ee,{children:(0,Ya.jsxs)("form",{onSubmit:x,className:"space-Ya-6",children:[(0,Ya.jsxs)("div",{className:"space-Ya-4",children:[(0,Ya.jsxs)("div",{className:"space-Ya-2",children:[(0,Ya.jsx)(dt,{htmlFor:"name",children:"Name *"}),(0,Ya.jsx)(fe,{id:"name",value:d.name||"",onChange:A=>N({...d,name:A.target.value}),required:!0,disabled:o||!l})]}),(0,Ya.jsxs)("div",{className:"space-Ya-2",children:[(0,Ya.jsx)(dt,{htmlFor:"description",children:"Description"}),(0,Ya.jsx)(Ze,{id:"description",value:d.description||"",onChange:A=>N({...d,description:A.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!l})]})]}),(0,Ya.jsxs)("div",{className:"space-Ya-4",children:[(0,Ya.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Ya.jsxs)("div",{className:"space-Ya-2",children:[(0,Ya.jsx)(dt,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Ya.jsx)(Ze,{id:"jobDescription",value:d.jobDescription||"",onChange:A=>N({...d,jobDescription:A.target.value}),rows:4,required:d.type==="digital",disabled:o||!l})]}),(0,Ya.jsxs)("div",{className:"space-Ya-2",children:[(0,Ya.jsx)(dt,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Ya.jsx)(Ze,{id:"workInstructions",value:d.workInstructions||"",onChange:A=>N({...d,workInstructions:A.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!l})]}),V("capabilities","Capabilities",g,k,"Add capability")]}),(0,Ya.jsxs)("div",{className:"flex justify-end gap-2 Ua-4 border-t",children:[(0,Ya.jsx)(w,{type:"button",variant:"outline",onClick:a,disabled:o,children:l?s:"Close"}),l?(0,Ya.jsx)(w,{type:"submit",disabled:o,children:o?"Saving...":ge}):(0,Ya.jsxs)(w,{type:"button",onClick:_,disabled:o,className:"gap-2",children:[(0,Ya.jsx)(si.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function _o({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,Ua.useState)(""),[s,n]=(0,Ua.useState)("all"),h=(0,Ua.useMemo)(()=>e.filter(v=>v.name.toLowerCase().includes(r.toLowerCase())||v.jobDescription?.toLowerCase().includes(r.toLowerCase())||v.workInstructions?.toLowerCase().includes(r.toLowerCase())),[e,r,s]),d=v=>{let D={...v,name:`${v.name} (Copy)`};t(D)},N=v=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(v);return(0,Ya.jsx)("div",{className:"px-2 md:px-4 py-4 space-Ya-6",children:(0,Ya.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Ya.jsxs)(fa.motion.div,{initial:{opacity:0,Ya:10},animate:{opacity:1,Ya:0},exit:{opacity:0,Ya:-10},transition:{duration:.2},children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Ya.jsxs)(w,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Ya.jsx)(si.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Ya.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague Ya clone"})]})]}),(0,Ya.jsx)(Z,{children:(0,Ya.jsx)(ee,{className:"Ua-6",children:(0,Ya.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Ya.jsx)("div",{className:"flex-1",children:(0,Ya.jsxs)("div",{className:"relative",children:[(0,Ya.jsx)(si.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Ya.jsx)(fe,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:v=>i(v.target.value),className:"pl-9"})]})}),(0,Ya.jsxs)("select",{value:s,onChange:v=>n(v.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,Ya.jsx)("option",{value:"all",children:"All Status"}),(0,Ya.jsx)("option",{value:"active",children:"Active"}),(0,Ya.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Ya.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:h.map(v=>(0,Ya.jsx)(fa.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Ya.jsxs)(Z,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===v.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>d(v),children:[(0,Ya.jsx)(ie,{className:"pb-3",children:(0,Ya.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ya.jsx)(at,{children:(0,Ya.jsx)(ot,{className:"bg-blue-100",children:(0,Ya.jsx)(si.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,Ya.jsx)("div",{children:(0,Ya.jsx)(me,{className:"text-lg flex items-center gap-2",children:v.name})})]}),(0,Ya.jsxs)(w,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:D=>{D.stopPropagation(),d(v)},children:[(0,Ya.jsx)(si.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,Ya.jsx)(ee,{className:"Ua-0",children:(0,Ya.jsxs)("div",{className:"space-Ya-3",children:[(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Ya.jsx)("p",{className:"text-sm line-clamp-2",children:v.jobDescription})]}),v.capabilities&&v.capabilities.length>0&&(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,Ya.jsx)("div",{className:"flex flex-wrap gap-1",children:v.capabilities.length>3&&(0,Ya.jsxs)(ne,{variant:"outline",className:"text-xs",children:["+",v.capabilities.length-3]})})]}),(0,Ya.jsx)("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),v.workInstructions&&(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Ya.jsx)("p",{className:"text-xs line-clamp-2",children:v.workInstructions})]})]})})]})},v.id))}),h.length===0&&(0,Ya.jsx)(Z,{children:(0,Ya.jsx)(ee,{className:"Ua-6",children:(0,Ya.jsxs)("div",{className:"text-center py-8",children:[(0,Ya.jsx)(si.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Ya.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"si digital colleagues found"}),(0,Ya.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function qo({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Ya.jsx)("div",{className:"px-2 md:px-4 py-4 space-Ya-6",children:(0,Ya.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Ya.jsxs)(fa.motion.div,{initial:{opacity:0,Ya:10},animate:{opacity:1,Ya:0},exit:{opacity:0,Ya:-10},transition:{duration:.2},children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Ya.jsxs)(w,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Ya.jsx)(si.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Ya.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague Ya add"})]})]}),(0,Ya.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Ya.jsxs)(Z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Ya.jsxs)(ie,{className:"text-center pb-4",children:[(0,Ya.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Ya.jsx)(si.User,{className:"h-8 w-8 text-blue-600"})}),(0,Ya.jsx)(me,{className:"text-xl",children:"Add Human Colleague"})]}),(0,Ya.jsxs)(ee,{className:"text-center",children:[(0,Ya.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization Ya add as team members."}),(0,Ya.jsxs)("div",{className:"space-Ya-2 text-sm",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ya.jsx)(si.Users,{className:"h-4 w-4 text-blue-600"}),(0,Ya.jsx)("span",{children:"Browse existing users"})]}),(0,Ya.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ya.jsx)(si.User,{className:"h-4 w-4 text-blue-600"}),(0,Ya.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Ya.jsx)(w,{className:"fa-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Ya.jsxs)(Z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Ya.jsxs)(ie,{className:"text-center pb-4",children:[(0,Ya.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Ya.jsx)(si.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,Ya.jsx)(me,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,Ya.jsxs)(ee,{className:"text-center",children:[(0,Ya.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,Ya.jsxs)("div",{className:"space-Ya-2 text-sm",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ya.jsx)(si.Bot,{className:"h-4 w-4 text-purple-600"}),(0,Ya.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Ya.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ya.jsx)(si.Users,{className:"h-4 w-4 text-purple-600"}),(0,Ya.jsx)("span",{children:"Create from templates"})]})]}),(0,Ya.jsx)(w,{className:"fa-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Jo({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Ya.jsx)("div",{className:"px-2 md:px-4 py-4 space-Ya-6",children:(0,Ya.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Ya.jsxs)(fa.motion.div,{initial:{opacity:0,Ya:10},animate:{opacity:1,Ya:0},exit:{opacity:0,Ya:-10},transition:{duration:.2},children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Ya.jsxs)(w,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Ya.jsx)(si.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Ya.jsx)("p",{className:"text-muted-foreground",children:"Choose how Ya create your digital colleague"})]})]}),(0,Ya.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Ya.jsxs)(Z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Ya.jsxs)(ie,{className:"text-center pb-4",children:[(0,Ya.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Ya.jsx)(si.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,Ya.jsx)(me,{className:"text-xl",children:"Clone Existing"})]}),(0,Ya.jsxs)(ee,{className:"text-center",children:[(0,Ya.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize it for your needs."}),(0,Ya.jsxs)("div",{className:"space-Ya-2 text-sm",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ya.jsx)(si.Bot,{className:"h-4 w-4 text-blue-600"}),(0,Ya.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Ya.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ya.jsx)(si.Copy,{className:"h-4 w-4 text-blue-600"}),(0,Ya.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Ya.jsx)(w,{className:"fa-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Ya.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Ya.jsxs)(Z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Ya.jsxs)(ie,{className:"text-center pb-4",children:[(0,Ya.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Ya.jsx)(si.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,Ya.jsx)(me,{className:"text-xl",children:"Create New"})]}),(0,Ya.jsxs)(ee,{className:"text-center",children:[(0,Ya.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Ya.jsxs)("div",{className:"space-Ya-2 text-sm",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ya.jsx)(si.Plus,{className:"h-4 w-4 text-green-600"}),(0,Ya.jsx)("span",{children:"Custom job description"})]}),(0,Ya.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Ya.jsx)(si.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,Ya.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Ya.jsx)(w,{className:"fa-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}function za({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:s,availableUsers:n=[],existingDigitalColleagues:h=[]}){let[d,N]=(0,Ua.useState)(e||[]),[v,D]=(0,Ua.useState)(""),[g,k]=(0,Ua.useState)("all"),[l,p]=(0,Ua.useState)("all"),[x,I]=(0,Ua.useState)("all"),[J,_]=(0,Ua.useState)(null),[V,$]=(0,Ua.useState)(null);(0,Ua.useEffect)(()=>{N(e||[])},[e]);let ge=Array.isArray(n)?n:[],A=Array.isArray(h)?h:[],[H,M]=(0,Ua.useState)("main"),X=d.filter(b=>!b||!b.name?!1:b.name.toLowerCase().includes(v.toLowerCase())||b.type==="human"&&b.email?.toLowerCase().includes(v.toLowerCase())||b.type==="digital"&&b.jobDescription?.toLowerCase().includes(v.toLowerCase())),f=X.filter(b=>b.type==="human"),je=X.filter(b=>b.type==="digital"),m=()=>{M("typeSelection")},W=b=>{b.type==="digital"&&(_(b),M("form")),console.log("Editing colleague:",b),a?.(b)},G=b=>{b.type==="digital"&&($(b),M("view"))},Le=b=>{let we={id:`human-${Date.now()}`,type:"human",name:b.name,email:b.email,updatedAt:b.updatedAt,createdAt:b.createdAt,accounts:b.accounts};N(ut=>[...ut,we]),t?.(we),M("main")},be=b=>{if(!b||!b.id){console.error("Invalid cloned colleague provided Ya handleDigitalColleagueClone:",b);return}N(we=>[...we,{...b,type:"digital"}]),t?.({...b,type:"digital"}),M("main")},tt=()=>{_(null),M("form")},Dt=b=>{if(!b||!b.id){console.error("Invalid colleague provided Ya handleSaveColleague:",b);return}J?(N(we=>we.map(ut=>ut.id===b.id?{...b,type:"digital"}:ut)),a?.({...b,type:"digital"})):(N(we=>[...we,{...b,type:"digital"}]),t?.({...b,type:"digital"})),M("main"),_(null)},Ae=()=>{M("main"),_(null),$(null)},di=()=>{M("main"),$(null)},hr=()=>{V&&(_(V),$(null),M("form"))},va=b=>{o?.(b,d.find(we=>we.id===b).type),N(we=>we.filter(ut=>ut.id!==b))},ci=()=>{D(""),k("all"),p("all")};return H==="typeSelection"?(0,Ya.jsx)(qo,{onSelectHuman:()=>M("userSelection"),onSelectDigital:()=>M("digitalOptions"),onCancel:()=>M("main")}):H==="userSelection"?(0,Ya.jsx)("h1",{children:"User selection"}):H==="digitalOptions"?(0,Ya.jsx)(Jo,{onCloneExisting:()=>M("digitalClone"),onCreateNew:tt,onCancel:()=>M("typeSelection")}):H==="digitalClone"?(0,Ya.jsx)(_o,{digitalColleagues:A,onColleagueClone:be,onCancel:()=>M("digitalOptions")}):H==="form"?(0,Ya.jsx)(Ea,{colleague:J||void 0,onSave:Dt,onCancel:Ae}):H==="view"?(0,Ya.jsx)(Ea,{colleague:V||void 0,onSave:Dt,onCancel:di,readOnly:!0}):(0,Ya.jsx)("div",{className:"px-2 md:px-4 py-4 space-Ya-8",children:(0,Ya.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Ya.jsx)(fa.motion.div,{initial:{opacity:0,Ya:10},animate:{opacity:1,Ya:0},exit:{opacity:0,Ya:-10},transition:{duration:.2},children:(0,Ya.jsxs)("div",{className:`space-Ya-6 ${s||""}`,children:[(0,Ya.jsx)(ke,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-Ya-r from-green-600 via-emerald-600 Ya-teal-600",primaryAction:{label:"Add colleague",onClick:m}}),(0,Ya.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Ya.jsxs)(Z,{children:[(0,Ya.jsxs)(ie,{className:"flex flex-row items-center justify-between space-Ya-0 pb-2",children:[(0,Ya.jsx)(me,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Ya.jsx)(si.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Ya.jsxs)(ee,{children:[(0,Ya.jsx)("div",{className:"text-2xl font-bold",children:d.length}),(0,Ya.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),(0,Ya.jsxs)(Z,{children:[(0,Ya.jsxs)(ie,{className:"flex flex-row items-center justify-between space-Ya-0 pb-2",children:[(0,Ya.jsx)(me,{className:"text-sm font-medium",children:"Human Members"}),(0,Ya.jsx)(si.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Ya.jsxs)(ee,{children:[(0,Ya.jsx)("div",{className:"text-2xl font-bold",children:d.filter(b=>b.type==="human").length}),(0,Ya.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),(0,Ya.jsxs)(Z,{children:[(0,Ya.jsxs)(ie,{className:"flex flex-row items-center justify-between space-Ya-0 pb-2",children:[(0,Ya.jsx)(me,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Ya.jsx)(si.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Ya.jsxs)(ee,{children:[(0,Ya.jsx)("div",{className:"text-2xl font-bold",children:d.filter(b=>b.type==="digital").length}),(0,Ya.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),(0,Ya.jsx)(Z,{children:(0,Ya.jsx)(ee,{className:"Ua-6",children:(0,Ya.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Ya.jsx)("div",{className:"flex-1",children:(0,Ya.jsxs)("div",{className:"relative",children:[(0,Ya.jsx)(si.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Ya.jsx)(fe,{placeholder:"Search colleagues...",value:v,onChange:b=>D(b.target.value),className:"pl-9"})]})}),(0,Ya.jsxs)(zt,{value:g,onValueChange:k,children:[(0,Ya.jsx)(wt,{className:"w-full md:w-[180px]",children:(0,Ya.jsx)(Ft,{placeholder:"Department"})}),(0,Ya.jsxs)(xt,{children:[(0,Ya.jsx)(Fe,{value:"all",children:"All Departments"}),i.map(b=>(0,Ya.jsx)(Fe,{value:b,children:b},b))]})]}),(0,Ya.jsxs)(zt,{value:l,onValueChange:p,children:[(0,Ya.jsx)(wt,{className:"w-full md:w-[140px]",children:(0,Ya.jsx)(Ft,{placeholder:"Status"})}),(0,Ya.jsxs)(xt,{children:[(0,Ya.jsx)(Fe,{value:"all",children:"All Status"}),(0,Ya.jsx)(Fe,{value:"active",children:"Active"}),(0,Ya.jsx)(Fe,{value:"inactive",children:"Inactive"})]})]}),(v||g!=="all"||l!=="all")&&(0,Ya.jsxs)(w,{variant:"outline",onClick:ci,className:"gap-2",children:[(0,Ya.jsx)(si.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Ya.jsxs)("div",{className:"space-Ya-4",children:[(0,Ya.jsx)(na,{activeTab:x,onTabChange:I,tabOptions:[{value:"all",label:`All (${X.length})`},{value:"human",label:`Human (${f.length})`},{value:"digital",label:`Digital (${je.length})`}],maxWidth:"400px",gridCols:3}),x==="all"&&(0,Ya.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:X.map(b=>(0,Ya.jsx)(ua,{colleague:b,onEdit:W,onDelete:va,onViewDetails:G,compact:r},`${b}-${b.id}`))}),x==="human"&&(0,Ya.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:f.map(b=>(0,Ya.jsx)(ua,{colleague:b,onEdit:W,onDelete:va,onViewDetails:G,compact:r},b.id))}),x==="digital"&&(0,Ya.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:je.map(b=>(0,Ya.jsx)(ua,{colleague:b,onEdit:W,onDelete:va,onViewDetails:G,compact:r},b.id))})]}),X.length===0&&(0,Ya.jsx)(Z,{children:(0,Ya.jsx)(ee,{className:"Ua-6",children:(0,Ya.jsxs)("div",{className:"text-center py-8",children:[(0,Ya.jsx)(si.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Ya.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"si colleagues found"}),(0,Ya.jsx)("p",{className:"text-muted-foreground mb-4",children:v||g!=="all"||l!=="all"?"Try adjusting your filters Ya see more results.":"Get started by adding your first colleague."}),(0,Ya.jsxs)(w,{onClick:m,className:"gap-2",children:[(0,Ya.jsx)(si.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function Qo({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:r=[]}){let[i,s]=(0,Ua.useState)({...e,updatedAt:new Date}),n=()=>{let l=new Set,p=new Set;return r.forEach(x=>{x.menuConfig.groupBy.forEach(I=>l.add(I))}),o.forEach(x=>{x.metadata&&Object.keys(x.metadata).forEach(I=>p.add(I))}),{contextKeys:Array.from(l).sort(),documentKeys:Array.from(p).sort(),allKeys:Array.from(new Set([...l,...p])).sort()}},h=l=>{let p=new Set;return o.forEach(x=>{x.metadata?.[l]&&p.add(String(x.metadata[l]))}),Array.from(p).sort()},d=n(),N=()=>{t(i)},v=(l,p)=>{s(x=>({...x,metadata:{...x.metadata,[l]:p}}))},D=(l,p)=>{p==="__custom__"?v(l,""):v(l,p)},g=()=>{let l=`field_${Date.now()}`;v(l,"")},k=l=>{s(p=>{let x={...p.metadata};return delete x[l],{...p,metadata:x}})};return(0,Ya.jsxs)(fa.motion.div,{initial:{opacity:0,Ya:20},animate:{opacity:1,Ya:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ya.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Ya.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Ya.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ya.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Ya.jsx)(si.Edit3,{className:"h-6 w-6 text-primary"})}),(0,Ya.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Ya.jsxs)("div",{className:"flex gap-2",children:[(0,Ya.jsxs)(w,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,Ya.jsx)(si.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Ya.jsxs)(w,{size:"sm",onClick:N,className:"gap-2",children:[(0,Ya.jsx)(si.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Ya.jsxs)("div",{className:"space-Ya-4",children:[(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Ya.jsx)(fe,{value:i.title,onChange:l=>s(p=>({...p,title:l.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Ya.jsx)(Ze,{value:i.description||"",onChange:l=>s(p=>({...p,description:l.target.value})),placeholder:"Document description...",rows:2})]}),(0,Ya.jsxs)("div",{children:[(0,Ya.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ya.jsxs)("div",{children:[(0,Ya.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),d.contextKeys.length>0&&(0,Ya.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",d.contextKeys.slice(0,4).join(", "),d.contextKeys.length>4&&` +${d.contextKeys.length-4}`]})]}),(0,Ya.jsxs)(w,{type:"button",variant:"outline",size:"sm",onClick:g,className:"gap-1 h-8",children:[(0,Ya.jsx)(si.Plus,{className:"h-3 w-3"}),"Add"]})]}),i.metadata&&Object.keys(i.metadata).length>0?(0,Ya.jsx)("div",{className:"space-Ya-2",children:Object.entries(i.metadata).map(([l,p])=>{let x=h(l);return(0,Ya.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Ya.jsx)(fe,{value:l,onChange:I=>{let J=I.target.value,_=i.metadata?.[l];s(V=>{let $={...V.metadata};return delete $[l],J&&($[J]=_||""),{...V,metadata:$}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${l}`}),(0,Ya.jsx)("datalist",{id:`metadata-keys-${l}`,children:d.allKeys.map(I=>(0,Ya.jsx)("option",{value:I},I))}),(0,Ya.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),x.length>0?(0,Ya.jsxs)(zt,{value:String(p||""),onValueChange:I=>D(l,I),children:[(0,Ya.jsx)(wt,{className:"flex-1 h-8 text-sm",children:(0,Ya.jsx)(Ft,{placeholder:"Value"})}),(0,Ya.jsxs)(xt,{children:[x.map(I=>(0,Ya.jsx)(Fe,{value:I,children:I},I)),(0,Ya.jsx)(Fe,{value:"__custom__",children:(0,Ya.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Ya.jsx)(fe,{value:String(p||""),onChange:I=>v(l,I.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Ya.jsx)(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(l),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Ya.jsx)(si.X,{className:"h-3 w-3"})})]},l)})}):(0,Ya.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Ya.jsx)("p",{className:"text-xs text-muted-foreground",children:'si metadata \u2022 Click "Add" Ya create fields'})})]}),(0,Ya.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ya.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Ya.jsx)(ne,{variant:"secondary",className:"font-mono",children:i.format.toUpperCase()})]})]})]}),(0,Ya.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ya.jsxs)("div",{className:"p-8",children:[(0,Ya.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Ya.jsx)(Ze,{value:i.content||"",onChange:l=>s(p=>({...p,content:l.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var ai=e=>(0,Ya.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),Zo=e=>(0,Ya.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),gr=e=>(0,Ya.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Ya.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,Ya.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Ya.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Ya.jsx)("pre",{className:"text-sm",children:e})]}),fr=e=>(0,Ya.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Ya.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Ya.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Ya.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),ai(e)]});function oi({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:r=[],knowledgeContexts:i=[]}){let[s,n]=(0,Ua.useState)(!1),h=g=>{switch(g){case"markdown":case"mdx":return(0,Ya.jsx)(si.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Ya.jsx)(si.File,{className:"h-6 w-6 text-success"});case"text":return(0,Ya.jsx)(si.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Ya.jsx)(si.File,{className:"h-6 w-6 text-muted-foreground"})}},d=g=>{switch(g){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},N=(g,k)=>{let l={markdown:ai,mdx:fr,richtext:gr,text:Zo},p=o?.[k]||l[k];return p?p(g):Zo(g)},v=g=>{n(!1),t?.(g)},D=()=>{n(!1)};return s?(0,Ya.jsx)(Qo,{document:e,onSave:v,onCancel:D,availableDocuments:r,knowledgeContexts:i}):(0,Ya.jsxs)(fa.motion.div,{initial:{opacity:0,Ya:20},animate:{opacity:1,Ya:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Ya.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Ya.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Ya.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Ya.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:h(e.format)}),(0,Ya.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ya.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Ya.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,Ya.jsx)("div",{className:"flex-shrink-0",children:(0,Ya.jsxs)(w,{variant:"outline",size:"sm",onClick:()=>n(!0),className:"gap-2",children:[(0,Ya.jsx)(si.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,Ya.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Ya.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${d(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(g=>(0,Ya.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",g]},g))]})]}),(0,Ya.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Ya.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Ya.jsxs)("div",{className:"mb-6",children:[(0,Ya.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Ya.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Ya.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-Ya-1 text-xs",children:Object.entries(e.metadata).map(([g,k])=>(0,Ya.jsxs)("div",{className:"flex gap-1",children:[(0,Ya.jsxs)("span",{className:"text-muted-foreground font-medium",children:[g.replace(/([A-Z])/g," $1").trim(),":"]}),(0,Ya.jsx)("span",{className:"text-foreground truncate",children:String(k)})]},g))})})]}),(0,Ya.jsx)("div",{className:"space-Ya-4",children:e.content?(0,Ya.jsx)("div",{className:"relative",children:(0,Ya.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:N(e.content,e.format)})}):(0,Ya.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Ya.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Ya.jsx)(si.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Ya.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"si content available"}),(0,Ya.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function ii({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:s=!0}){let[n,h]=(0,Ua.useState)(o===0),d=a&&Object.keys(a).length>0,N=t.length+(a?Object.values(a).reduce((g,k)=>g+k.documents.length,0):0),v=g=>{switch(g){case"markdown":case"mdx":return(0,Ya.jsx)(si.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,Ya.jsx)(si.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Ya.jsx)(si.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},D=g=>{let k=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return k[g%k.length]};return(0,Ya.jsxs)("div",{className:"space-Ya-1",children:[(d||t.length>0)&&(0,Ya.jsxs)(fa.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${n?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>h(!n),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Ya.jsx)("div",{className:`w-1 h-6 rounded-full ${D(o)}`}),(0,Ya.jsx)(fa.motion.div,{animate:{rotate:n?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Ya.jsx)(si.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Ya.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Ya.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Ya.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),s&&N>0&&(0,Ya.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Ya.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:N})})]})]}),(0,Ya.jsx)(fa.motion.div,{initial:!1,animate:{height:n?"auto":0,opacity:n?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Ya.jsxs)("div",{className:"Ua-2 space-Ya-1",children:[t.map((g,k)=>(0,Ya.jsxs)(fa.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:k*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===g.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(g),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Ya.jsx)("div",{className:"flex-shrink-0",children:v(g.format)}),(0,Ya.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ya.jsx)("p",{className:`text-sm truncate transition-colors ${i===g.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:g.title}),g.description&&(0,Ya.jsx)("p",{className:"text-xs text-muted-foreground truncate fa-0.5",children:g.description})]}),g.tags&&g.tags.length>0&&(0,Ya.jsx)("div",{className:"flex-shrink-0",children:(0,Ya.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:g.tags[0]})})]},g.id)),a&&Object.entries(a).map(([g,k])=>(0,Ya.jsx)(ii,{label:g,documents:k.documents,children:k.children,level:o+1,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:s},g))]})})]})}function ri({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:i,className:s,editable:n=!0}){let[h,d]=(0,Ua.useState)(""),[N,v]=(0,Ua.useState)(null),D=(0,Ua.useMemo)(()=>h?e.filter(l=>l.title.toLowerCase().includes(h.toLowerCase())||l.description?.toLowerCase().includes(h.toLowerCase())||l.tags?.some(p=>p.toLowerCase().includes(h.toLowerCase()))||Object.values(l.metadata||{}).some(p=>String(p).toLowerCase().includes(h.toLowerCase()))):e,[e,h]),g=(0,Ua.useMemo)(()=>{let l=(p,x)=>{if(x.length===0)return{};let[I,...J]=x;return p.reduce((V,$)=>{let ge=$.metadata?.[I]||"Uncategorized",A=String(ge);if(V[A]||(V[A]={documents:[],children:{}}),J.length===0)V[A].documents.push($);else{let H=l([$],J),M=Object.keys(H)[0];M&&(V[A].children||(V[A].children={}),V[A].children[M]?V[A].children[M].documents.push(...H[M].documents):V[A].children[M]=H[M])}return V},{})};return l(D,t.groupBy)},[D,t.groupBy]),k=l=>{v(l),a?.(l)};return(0,Ya.jsxs)("div",{className:`flex h-full ${s||""}`,children:[(0,Ya.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Ya.jsx)("div",{className:"p-6 border-b border-border",children:(0,Ya.jsxs)("div",{className:"relative",children:[(0,Ya.jsx)("div",{className:"absolute inset-Ya-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Ya.jsx)(si.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Ya.jsx)(fe,{placeholder:"Search knowledge base...",value:h,onChange:l=>d(l.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Ya.jsx)(qe,{className:"h-[calc(100%-100px)]",children:(0,Ya.jsxs)("div",{className:"p-4 space-Ya-3",children:[Object.entries(g).map(([l,p])=>(0,Ya.jsx)(ii,{label:l,documents:p.documents,children:p.children,level:0,onDocumentClick:k,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},l)),Object.keys(g).length===0&&(0,Ya.jsxs)(fa.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Ya.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Ya.jsx)(si.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Ya.jsx)("p",{className:"text-sm font-medium",children:"si documents found"}),(0,Ya.jsx)("p",{className:"text-xs fa-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Ya.jsx)("div",{className:"flex-1 bg-background",children:N?(0,Ya.jsx)(oi,{document:N,onDocumentUpdate:r,editable:n}):(0,Ya.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Ya.jsxs)(fa.motion.div,{initial:{opacity:0,Ya:20},animate:{opacity:1,Ya:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Ya.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Ya.jsx)(si.FileText,{className:"h-10 w-10 text-primary"})}),(0,Ya.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Ya.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base Ya view its content and details"})]})})})]})}function Fa({documents:e=[],contexts:t=[],onDocumentClick:a=s=>console.log("Document clicked:",s),onDocumentShare:o=s=>console.log("Share document:",s),onLoadDocumentContent:r,selectedDocumentId:i}){let[s,n]=(0,Ua.useState)(t[0]);return!t||t.length===0?(0,Ya.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Ya.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Ya.jsx)(ke,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-Ya-r from-teal-600 via-cyan-600 Ya-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Ya.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Ya.jsx)("p",{className:"text-muted-foreground",children:"si contexts available"})})]}):(0,Ya.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Ya.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Ya.jsx)(ke,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-Ya-r from-teal-600 via-cyan-600 Ya-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Ya.jsxs)("div",{className:"fa-6",children:[(0,Ya.jsx)("div",{className:"border-b border-border",children:(0,Ya.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(h=>(0,Ya.jsxs)("button",{onClick:()=>n(h),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${s.id===h.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[h.icon,h.label]},h.id))})}),s.description&&(0,Ya.jsx)("div",{className:"fa-3 px-1",children:(0,Ya.jsx)("p",{className:"text-sm text-muted-foreground",children:s.description})})]})]}),(0,Ya.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Ya.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Ya.jsx)(ri,{documents:e,menuConfig:s.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function li({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:r,onCreateProject:i,onOpenProject:s,sidebarItems:n,initialColleagues:h,users:d,onColleagueAdd:N,onColleagueEdit:v,onColleagueDelete:D}){let[g,k]=(0,Ua.useState)("home"),[l,p]=(0,Ua.useState)(t[0]),x=f=>{console.log("Opening app:",f.name)},I=f=>{console.log("Favoriting app:",f.name)},J=f=>{console.log("Opening file:",f.name)},_=f=>{console.log("Sharing file:",f.name)},V=f=>{console.log("Opening project:",f.name),s(f)},$=f=>{console.log("Sharing project:",f.name)},ge=f=>{p(f),console.log("Business unit changed Ya:",f.name)},A=()=>{console.log("Copilot clicked - navigating Ya chat"),k("chat")},H=f=>{console.log("Notification removed:",f)},M=()=>{console.log("All notifications removed")},X=()=>{switch(g){case"home":return(0,Ya.jsxs)("div",{className:"px-2 md:px-4 py-4 space-Ya-8",children:[(0,Ya.jsxs)("section",{className:"text-center py-12",children:[(0,Ya.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome Ya the ",l.name," team"]}),(0,Ya.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,Ya.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,Ya.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Ya.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,Ya.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,Ya.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Ya.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Ya.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,Ya.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,Ya.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Ya.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Ya.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,Ya.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,Ya.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Ya.jsx)(ke,{title:"Chat with your team",gradient:"bg-gradient-Ya-r from-pink-600 via-red-600 Ya-orange-600",primaryAction:{label:"Ya",onClick:()=>k("chat")}})]});case"colleagues":return(0,Ya.jsx)(za,{initialColleagues:h,availableUsers:d,onColleagueAdd:N,onColleagueEdit:v,onColleagueDelete:D});case"chat":return(0,Ya.jsxs)("div",{className:"px-2 md:px-4 py-4 space-Ya-8",children:[(0,Ya.jsxs)("section",{className:"text-center py-12",children:[(0,Ya.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,Ya.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),(0,Ya.jsx)(ke,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-Ya-r from-blue-600 via-purple-600 Ya-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,Ya.jsxs)("div",{className:"space-Ya-8",children:[(0,Ya.jsx)(ke,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-Ya-r from-pink-600 via-red-600 Ya-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,Ya.jsxs)("section",{className:"space-Ya-4",children:[(0,Ya.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Ya.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Ba.filter(f=>f.new).map(f=>(0,Ya.jsx)(Ma,{app:f,showProgress:!0,onOpen:x,onFavorite:I},f.name))})]}),(0,Ya.jsxs)("section",{className:"space-Ya-4",children:[(0,Ya.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Ya.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Ba.map(f=>(0,Ya.jsx)(Ma,{app:f,onOpen:x,onFavorite:I},f.name))})]})]});case"knowledge":return(0,Ya.jsx)(Fa,{});case"files":return(0,Ya.jsxs)("div",{className:"px-2 md:px-4 py-4 space-Ya-8",children:[(0,Ya.jsx)(ke,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-Ya-r from-teal-600 via-cyan-600 Ya-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,Ya.jsxs)("section",{className:"space-Ya-4",children:[(0,Ya.jsx)("div",{className:"flex items-center justify-between",children:(0,Ya.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Ya.jsx)(Io,{files:jo,onFileClick:J})]})]});case"projects":return(0,Ya.jsxs)("div",{className:"px-2 md:px-4 py-4 space-Ya-8",children:[(0,Ya.jsx)(ke,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-Ya-r from-purple-600 via-violet-600 Ya-indigo-600",primaryAction:{label:"New Project",onClick:i}}),(0,Ya.jsxs)("section",{className:"space-Ya-4",children:[(0,Ya.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Ya.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:a.map(f=>(0,Ya.jsx)(Bo,{project:f,onOpen:V,onShare:$},f.name))})]})]});case"learn":return(0,Ya.jsxs)("div",{className:"space-Ya-8",children:[(0,Ya.jsx)(ke,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-Ya-r from-green-600 via-emerald-600 Ya-teal-600",primaryAction:{label:"Upgrade Ya Pro",onClick:()=>console.log("Upgrade Ya pro clicked")}}),(0,Ya.jsxs)("section",{className:"space-Ya-4",children:[(0,Ya.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Ya.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Lo.slice(0,3).map(f=>(0,Ya.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,Ya.jsx)("h3",{className:"font-semibold mb-2",children:f.title}),(0,Ya.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:f.description}),(0,Ya.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ya.jsx)("span",{children:f.duration}),(0,Ya.jsx)("span",{children:f.level})]})]},f.title))})]})]});default:return null}};return(0,Ya.jsx)(Do,{sidebarItems:zo,title:e,notifications:Fo,businessUnits:t,currentBusinessUnit:l,onBusinessUnitChange:ge,activeTab:g,onTabChange:k,showTabs:!0,onActionClick:A,actionIcon:(0,Ya.jsx)(si.Bot,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:M,children:(0,Ya.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Ya.jsx)(fa.motion.div,{className:"flex-1 h-full",initial:{opacity:0,Ya:10},animate:{opacity:1,Ya:0},exit:{opacity:0,Ya:-10},transition:{duration:.2},children:X()},g)})})}
5
+ "use strict";"use client";var vi=Object.create;var Wt=Object.defineProperty;var hi=Object.getOwnPropertyDescriptor;var bi=Object.getOwnPropertyNames;var yi=Object.getPrototypeOf,wi=Object.prototype.hasOwnProperty;var xi=(e,t)=>{for(var a in t)Wt(e,a,{get:t[a],enumerable:!0})},Wa=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of bi(t))!wi.call(e,r)&&r!==a&&Wt(e,r,{get:()=>t[r],enumerable:!(o=hi(t,r))||o.enumerable});return e};var ee=(e,t,a)=>(a=e!=null?vi(yi(e)):{},Wa(t||!e||!e.__esModule?Wt(a,"default",{value:e,enumerable:!0}):a,e)),Ci=e=>Wa(Wt({},"__esModule",{value:!0}),e);var xr={};xi(xr,{default:()=>ui});module.exports=Ci(xr);var Va=require("react"),ya=require("motion/react"),pi=require("lucide-react");var Za=require("clsx");var Na="-",Ni=e=>{let t=Si(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let n=s.split(Na);return n[0]===""&&n.length!==1&&n.shift(),_a(n,t)||Di(s)},getConflictingClassGroupIds:(s,n)=>{let p=a[s]||[];return n&&o[s]?[...p,...o[s]]:p}}},_a=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?_a(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(Na);return t.validators.find(({validator:s})=>s(i))?.classGroupId},$a=/^\[(.+)\]$/,Di=e=>{if($a.test(e)){let t=$a.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Si=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Pi(Object.entries(e.classGroups),a).forEach(([i,s])=>{Ca(s,o,i,t)}),o},Ca=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:Ga(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(ki(r)){Ca(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,s])=>{Ca(s,Ga(t,i),a,o)})})},Ga=(e,t)=>{let a=e;return t.split(Na).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},ki=e=>e.isThemeGetter,Pi=(e,t)=>t?e.map(([a,o])=>{let r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,n])=>[t+s,n])):i);return[a,r]}):e,Ai=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,s)=>{a.set(i,s),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let s=a.get(i);if(s!==void 0)return s;if((s=o.get(i))!==void 0)return r(i,s),s},set(i,s){a.has(i)?a.set(i,s):r(i,s)}}},qa="!",Ti=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,s=n=>{let p=[],d=0,N=0,h;for(let u=0;u<n.length;u++){let x=n[u];if(d===0){if(x===r&&(o||n.slice(u,u+i)===t)){p.push(n.slice(N,u)),N=u+i;continue}if(x==="/"){h=u;continue}}x==="["?d++:x==="]"&&d--}let D=p.length===0?n:n.substring(N),f=D.startsWith(qa),k=f?D.substring(1):D,l=h&&h>N?h-N:void 0;return{modifiers:p,hasImportantModifier:f,baseClassName:k,maybePostfixModifierPosition:l}};return a?n=>a({className:n,parseClassName:s}):s},Ri=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},Ii=e=>({cache:Ai(e.cacheSize),parseClassName:Ti(e),...Ni(e)}),Mi=/\s+/,Bi=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],s=e.trim().split(Mi),n="";for(let p=s.length-1;p>=0;p-=1){let d=s[p],{modifiers:N,hasImportantModifier:h,baseClassName:D,maybePostfixModifierPosition:f}=a(d),k=!!f,l=o(k?D.substring(0,f):D);if(!l){if(!k){n=d+(n.length>0?" "+n:n);continue}if(l=o(D),!l){n=d+(n.length>0?" "+n:n);continue}k=!1}let u=Ri(N).join(":"),x=h?u+qa:u,I=x+l;if(i.includes(I))continue;i.push(I);let Q=r(l,k);for(let X=0;X<Q.length;++X){let W=Q[X];i.push(x+W)}n=d+(n.length>0?" "+n:n)}return n};function ji(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ja(t))&&(o&&(o+=" "),o+=a);return o}var Ja=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ja(e[o]))&&(a&&(a+=" "),a+=t);return a};function Li(e,...t){let a,o,r,i=s;function s(p){let d=t.reduce((N,h)=>h(N),e());return a=Ii(d),o=a.cache.get,r=a.cache.set,i=n,n(p)}function n(p){let d=o(p);if(d)return d;let N=Bi(p,a);return r(p,N),N}return function(){return i(ji.apply(null,arguments))}}var te=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Xa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ei=/^\d+\/\d+$/,zi=new Set(["px","full","screen"]),Fi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ui=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|Va|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Hi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Oi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ki=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oe=e=>vt(e)||zi.has(e)||Ei.test(e),Je=e=>ht(e,"length",Xi),vt=e=>!!e&&!Number.isNaN(Number(e)),xa=e=>ht(e,"number",vt),Pt=e=>!!e&&Number.isInteger(Number(e)),Vi=e=>e.endsWith("%")&&vt(e.slice(0,-1)),z=e=>Xa.test(e),Xe=e=>Fi.test(e),Wi=new Set(["length","size","percentage"]),$i=e=>ht(e,Wi,Ya),Gi=e=>ht(e,"position",Ya),_i=new Set(["image","url"]),qi=e=>ht(e,_i,Qi),Ji=e=>ht(e,"",Yi),At=()=>!0,ht=(e,t,a)=>{let o=Xa.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Xi=e=>Ui.test(e)&&!Hi.test(e),Ya=()=>!1,Yi=e=>Oi.test(e),Qi=e=>Ki.test(e);var Zi=()=>{let e=te("colors"),t=te("spacing"),a=te("blur"),o=te("brightness"),r=te("borderColor"),i=te("borderRadius"),s=te("borderSpacing"),n=te("borderWidth"),p=te("contrast"),d=te("grayscale"),N=te("hueRotate"),h=te("invert"),D=te("gap"),f=te("gradientColorStops"),k=te("gradientColorStopPositions"),l=te("inset"),u=te("margin"),x=te("opacity"),I=te("padding"),Q=te("saturate"),X=te("scale"),W=te("sepia"),G=te("skew"),fe=te("space"),A=te("translate"),O=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto",z,t],v=()=>[z,t],Ee=()=>["",Oe,Je],m=()=>["auto",vt,z],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>["start","end","center","between","around","evenly","stretch"],rt=()=>["","0",z],kt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Re=()=>[vt,z];return{cacheSize:500,separator:":",theme:{colors:[At],spacing:[Oe,Je],blur:["none","",Xe,z],brightness:Re(),borderColor:[e],borderRadius:["none","","full",Xe,z],borderSpacing:v(),borderWidth:Ee(),contrast:Re(),grayscale:rt(),hueRotate:Re(),invert:rt(),gap:v(),gradientColorStops:[e],gradientColorStopPositions:[Vi,Je],inset:Z(),margin:Z(),opacity:Re(),padding:v(),saturate:Re(),scale:Re(),sepia:rt(),skew:Re(),space:v(),translate:v()},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[Xe]}],"break-after":[{"break-after":kt()}],"break-before":[{"break-before":kt()}],"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:[...$(),z]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-to":[{"overflow-to":M()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-to":[{"overscroll-to":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[l]}],"inset-x":[{"inset-x":[l]}],"inset-to":[{"inset-to":[l]}],start:[{start:[l]}],end:[{end:[l]}],top:[{top:[l]}],right:[{right:[l]}],bottom:[{bottom:[l]}],left:[{left:[l]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pt,z]}],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",z]}],grow:[{grow:rt()}],shrink:[{shrink:rt()}],order:[{order:["first","last","none",Pt,z]}],"grid-cols":[{"grid-cols":[At]}],"col-start-end":[{col:["auto",{span:["full",Pt,z]},z]}],"col-start":[{"col-start":m()}],"col-end":[{"col-end":m()}],"grid-rows":[{"grid-rows":[At]}],"row-start-end":[{row:["auto",{span:[Pt,z]},z]}],"row-start":[{"row-start":m()}],"row-end":[{"row-end":m()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[D]}],"gap-x":[{"gap-x":[D]}],"gap-to":[{"gap-to":[D]}],"justify-content":[{justify:["normal",...ye()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ye(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ye(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],to:[{to:[I]}],Va:[{Va:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],to:[{to:[u]}],mt:[{mt:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-x":[{"space-x":[fe]}],"space-x-reverse":["space-x-reverse"],"space-to":[{"space-to":[fe]}],"space-to-reverse":["space-to-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z,t]}],"min-w":[{"min-w":[z,t,"min","max","fit"]}],"max-w":[{"max-w":[z,t,"none","full","min","max","fit","prose",{screen:[Xe]},Xe]}],h:[{h:[z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xe,Je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xa]}],"font-family":[{font:[At]}],"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",z]}],"line-clamp":[{"line-clamp":["none",vt,xa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Oe,z]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Oe,Je]}],"underline-offset":[{"underline-offset":["auto",Oe,z]}],"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:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z]}],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",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),Gi]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","to","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$i]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-to":[{"rounded-to":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-to":[{"border-to":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-to":[{"divide-to":[n]}],"divide-to-reverse":["divide-to-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:_()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-to":[{"border-to":[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-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[Oe,z]}],"outline-w":[{outline:[Oe,Je]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Oe,Je]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xe,Ji]}],"shadow-color":[{shadow:[At]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...Te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Te()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",Xe,z]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[N]}],invert:[{invert:[h]}],saturate:[{saturate:[Q]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[Q]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-to":[{"border-spacing-to":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z]}],duration:[{duration:Re()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:Re()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[X]}],"scale-x":[{"scale-x":[X]}],"scale-to":[{"scale-to":[X]}],rotate:[{rotate:[Pt,z]}],"translate-x":[{"translate-x":[A]}],"translate-to":[{"translate-to":[A]}],"skew-x":[{"skew-x":[G]}],"skew-to":[{"skew-to":[G]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],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","to-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","to","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-to":[{"scroll-to":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-to":[{"scroll-to":v()}],"scroll-Va":[{"scroll-Va":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","to","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-to":[{"touch-pan":["to","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Oe,Je,xa]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-to"],overscroll:["overscroll-x","overscroll-to"],inset:["inset-x","inset-to","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-to":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-to"],p:["px","py","ps","to","Va","pr","pb","pl"],px:["pr","pl"],py:["Va","pb"],m:["mx","my","ms","to","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-b","rounded-l","rounded-ss","rounded-to","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-to","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-to"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-to":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-to":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-to","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-to","scroll-Va","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-Va","scroll-pb"],touch:["touch-x","touch-to","touch-pz"],"touch-x":["touch"],"touch-to":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Qa=Li(Zi);function c(...e){return Qa((0,Za.clsx)(e))}var Zt=ee(require("react")),Ra=ee(require("next/link"));var eo=require("class-variance-authority");var to=require("react/jsx-runtime"),er=(0,eo.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 le({className:e,variant:t,...a}){return(0,to.jsx)("div",{className:c(er({variant:t}),e),...a})}var ao=require("@radix-ui/react-slot"),io=ee(require("react")),tr=(0,eo.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"}}}),w=io.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,to.jsx)(e?ao.Slot:"button",{className:c(tr({className:t,size:a,variant:o})),ref:i,...r}));w.displayName="Button";var no=ee(require("react"));var ve=no.forwardRef(({className:e,type:t,...a},o)=>(0,to.jsx)("input",{type:t,className:c("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}));ve.displayName="Input";var Da=ee(require("react")),Se=ee(require("@radix-ui/react-scroll-area"));var Qe=Da.forwardRef(({className:e,children:t,...a},o)=>(0,to.jsxs)(Se.Root,{ref:o,className:c("relative overflow-hidden",e),...a,children:[(0,to.jsx)(Se.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,to.jsx)(lo,{}),(0,to.jsx)(Se.Corner,{})]}));Qe.displayName=Se.Root.displayName;var lo=Da.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,to.jsx)(Se.ScrollAreaScrollbar,{ref:o,orientation:t,className:c("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,to.jsx)(Se.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));lo.displayName=Se.ScrollAreaScrollbar.displayName;var Tt=ee(require("react")),ce=ee(require("@radix-ui/react-dialog"));var mo=ce.Root;var ar=ce.Portal;var po=Tt.forwardRef(({className:e,...t},a)=>(0,to.jsx)(ce.Overlay,{ref:a,className:c("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));po.displayName=ce.Overlay.displayName;var Sa=Tt.forwardRef(({className:e,children:t,...a},o)=>(0,to.jsxs)(ar,{children:[(0,to.jsx)(po,{}),(0,to.jsxs)(ce.Content,{ref:o,className:c("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-to-[-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,to.jsxs)(ce.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,to.jsx)(pi.X,{className:"h-4 w-4"}),(0,to.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Sa.displayName=ce.Content.displayName;var ka=({className:e,...t})=>(0,to.jsx)("div",{className:c("flex flex-col space-to-1.5 text-center sm:text-left",e),...t});ka.displayName="DialogHeader";var or=({className:e,...t})=>(0,to.jsx)("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});or.displayName="DialogFooter";var Pa=Tt.forwardRef(({className:e,...t},a)=>(0,to.jsx)(ce.Title,{ref:a,className:c("text-lg font-semibold leading-none tracking-tight",e),...t}));Pa.displayName=ce.Title.displayName;var ir=Tt.forwardRef(({className:e,...t},a)=>(0,to.jsx)(ce.Description,{ref:a,className:c("text-sm text-muted-foreground",e),...t}));ir.displayName=ce.Description.displayName;var Rt=ee(require("@radix-ui/react-checkbox")),go=ee(require("react")),Aa=go.forwardRef(({className:e,...t},a)=>(0,$t.jsx)(Rt.Root,{className:c("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,$t.jsx)(Rt.Indicator,{className:c("flex items-center justify-center text-current"),children:(0,$t.jsx)(pi.Check,{className:"h-4 w-4"})})}));Aa.displayName=Rt.Root.displayName;var ze=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var vo=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,to.jsx)(pi.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,to.jsx)(pi.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,to.jsx)(pi.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,to.jsx)(pi.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,to.jsx)(pi.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,to.jsx)(pi.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,to.jsx)(pi.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,to.jsx)(pi.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"pi",name:"IT Support",description:"Information technology and infrastructure",icon:(0,to.jsx)(pi.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,to.jsx)(pi.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],qt=[{id:"1",name:"to-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 Ta=[{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}],Gt=[{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}],Xt=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],rr=[...Xt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],nr=[...qt,{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}],_t={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:[]},fo={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:Xt.filter(e=>e.epicId==="1")};var Vr={empty:{initialProjects:_t.projects,initialEpics:_t.epics,initialSprints:_t.sprints,initialTasks:_t.tasks},default:{initialProjects:qt,initialEpics:Ta,initialSprints:Gt,initialTasks:Xt},highDensity:{initialProjects:qt,initialEpics:Ta,initialSprints:Gt,initialTasks:rr},singleEpic:{initialProjects:qt,initialEpics:fo.epics,initialSprints:Gt,initialTasks:fo.tasks},multipleProjects:{initialProjects:nr,initialEpics:Ta,initialSprints:Gt,initialTasks:Xt}},Jt=[{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(ze),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(ze),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(ze),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(ze),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","to","Statistics"].map(ze),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(ze),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(ze),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(ze),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(ze),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(ze),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Wr=[{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:Jt.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:Jt.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:Jt.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 $r=Jt.filter(e=>e.type==="digital");function Qt(e,t){let[a,o]=(0,Va.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Va.useEffect)(()=>{r(a)},[]),[a,r]}function Ia({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=vo[0],onBusinessUnitChange:i,onSearch:s,className:n,logo:p="/headerlogo.png",appName:d="Nuvia",tagline:N="Collaboration Platform"}){let[h,D]=Zt.useState({}),[f,k]=Qt("sidebar-favorites",{}),[l,u]=Zt.useState(null),[x,I]=Zt.useState(""),Q=m=>{D($=>({...$,[m]:!$[m]}))},X=m=>{i?.(m)},W=()=>{x.trim()&&s?.(x.trim())},G=m=>{m.key==="Enter"&&(m.preventDefault(),W())},fe=(m,$)=>{let _=f[m]||[],Te=_.includes($)?_.filter(ye=>ye!==$):_.concat($);k({...f,[m]:Te})},A=m=>{if(!m.items||!m.maxItems||m.items.length<=m.maxItems)return m.items||[];let $=f[m.id]||[],_=m.items.filter(ye=>$.includes(ye.id)),Te=m.items.filter(ye=>!$.includes(ye.id));return[..._,...Te].slice(0,m.maxItems)},O=m=>m.maxItems&&m.items&&m.items.length>m.maxItems,M=e,Z=m=>{let $=O(m),_=A(m),Te=(0,to.jsxs)(to.Fragment,{children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[m.icon,(0,to.jsx)("span",{children:m.title})]}),m.badge&&(0,to.jsx)(le,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:m.badge}),m.items&&(0,to.jsx)(pi.ChevronDown,{className:c("ml-2 h-4 w-4 transition-transform",h[m.title]?"rotate-180":"")})]}),ye=c("flex w-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,to.jsx)(Ra.default,{href:m.url,className:ye,onClick:a?o:void 0,children:Te}):(0,to.jsx)("button",{className:ye,onClick:()=>m.items&&Q(m.title),children:Te})},v=()=>{let m=e.find(_=>_.id===l);if(!m||!m.items||!m.maxItems)return null;let $=f[m.id]||[];return(0,to.jsx)(mo,{open:!!l,onOpenChange:_=>!_&&u(null),children:(0,to.jsxs)(Sa,{className:"sm:max-w-md",children:[(0,to.jsxs)(ka,{children:[(0,to.jsxs)(Pa,{children:["Manage ",m.title," Favorites"]}),(0,to.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",m.maxItems," items to show in ",m.title.toLowerCase(),"."]})]}),(0,to.jsx)(Qe,{className:"max-h-96 pr-4",children:(0,to.jsx)("div",{className:"space-to-4",children:m.items.map(_=>(0,to.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,to.jsx)(Aa,{id:_.id,checked:$.includes(_.id),onCheckedChange:()=>fe(m.id,_.id),disabled:!$.includes(_.id)&&$.length>=(m.maxItems||0)}),(0,to.jsxs)("label",{htmlFor:_.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:[_.title,_.badge&&(0,to.jsx)(le,{variant:"outline",className:"text-xs",children:_.badge})]})]},_.id))})})]})})},Ee=(0,to.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[(0,to.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,to.jsx)("img",{src:p,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h2",{className:"font-semibold",children:d}),(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:N})]})]}),a&&(0,to.jsx)(w,{variant:"ghost",size:"icon",onClick:o,children:(0,to.jsx)(pi.X,{className:"h-5 w-5"})})]}),(0,to.jsx)("div",{className:"px-3 py-2",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)(pi.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,to.jsx)(ve,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:x,onChange:m=>I(m.target.value),onKeyPress:G})]})}),(0,to.jsx)(Qe,{className:"flex-1 px-3 py-2",children:(0,to.jsx)("div",{className:"space-to-1",children:M.map(m=>(0,to.jsxs)("div",{className:"mb-1",children:[Z(m),m.items&&h[m.title]&&(0,to.jsxs)("div",{className:"mt-1 ml-6 space-to-1 border-l pl-3",children:[A(m).map($=>(0,to.jsxs)(Ra.default,{href:$.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[$.title,$.badge&&(0,to.jsx)(le,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:$.badge})]},$.id)),O(m)&&m.items&&m.items.length>A(m).length&&(0,to.jsxs)("button",{onClick:()=>u(m.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:["...",m.items.length-A(m).length," more available"]})]})]},m.id))})}),(0,to.jsx)("div",{className:"p-3",children:(0,to.jsx)("div",{className:"space-to-1",children:(0,to.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,to.jsx)(pi.Settings,{className:"h-5 w-5"}),(0,to.jsx)("span",{children:"Settings"})]})})}),(0,to.jsx)(v,{})]});return a?(0,to.jsx)("div",{className:c("fixed inset-to-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:Ee}):(0,to.jsx)("div",{className:c("fixed inset-to-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:Ee})}var ea=ee(require("react")),Ke=ee(require("@radix-ui/react-avatar"));var Ve=ea.forwardRef(({className:e,...t},a)=>(0,to.jsx)(Ke.Root,{ref:a,className:c("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ve.displayName=Ke.Root.displayName;var It=ea.forwardRef(({className:e,...t},a)=>(0,to.jsx)(Ke.Image,{ref:a,className:c("aspect-square h-full w-full",e),...t}));It.displayName=Ke.Image.displayName;var We=ea.forwardRef(({className:e,...t},a)=>(0,to.jsx)(Ke.Fallback,{ref:a,className:c("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));We.displayName=Ke.Fallback.displayName;var ho=ee(require("react")),Me=ee(require("@radix-ui/react-tooltip"));var aa=Me.Provider,oa=Me.Root,ia=Me.Trigger,Mt=ho.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,to.jsx)(Me.Portal,{children:(0,to.jsx)(Me.Content,{ref:o,sideOffset:t,className:c("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})}));Mt.displayName=Me.Content.displayName;var bo=require("next-themes");function yo(){let{setTheme:e,theme:t}=(0,bo.useTheme)();return(0,to.jsx)(aa,{children:(0,to.jsxs)(oa,{children:[(0,to.jsx)(ia,{asChild:!0,children:(0,to.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,to.jsx)(pi.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,to.jsx)(pi.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,to.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,to.jsx)(Mt,{children:"Toggle theme"})]})})}function wo({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let s=e.filter(d=>!d.read),n=s.length,p=d=>{switch(d){case"info":return(0,to.jsx)(pi.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,to.jsx)(pi.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,to.jsx)(pi.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,to.jsx)(pi.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,to.jsx)(ya.AnimatePresence,{children:t&&(0,to.jsxs)(to.Fragment,{children:[(0,to.jsx)(ya.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,to.jsx)(ya.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:c("fixed inset-to-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,to.jsxs)("div",{className:"flex h-full flex-col",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2",children:[(0,to.jsx)(pi.Bell,{className:"h-5 w-5"}),(0,to.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),n>0&&(0,to.jsxs)(le,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[n," new"]})]}),(0,to.jsxs)(w,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,to.jsx)(pi.X,{className:"h-5 w-5"}),(0,to.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n>0&&(0,to.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,to.jsxs)("span",{className:"text-sm text-muted-foreground",children:[n," unread notification",n!==1?"s":""]}),(0,to.jsx)(w,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),s.length>0?(0,to.jsx)(Qe,{className:"flex-1",children:(0,to.jsx)("div",{className:"divide-to",children:s.map(d=>(0,to.jsxs)("div",{className:c("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,to.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:p(d.type)}),(0,to.jsxs)("div",{className:"flex-1 space-to-1",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between",children:[(0,to.jsx)("p",{className:"font-medium",children:d.title}),(0,to.jsxs)("div",{className:"flex items-center gap-2",children:[(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:d.time}),(0,to.jsx)(w,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(d.id),title:"Dismiss",children:(0,to.jsx)(pi.Check,{className:"h-3 w-3"})})]})]}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:d.description}),d.actionLabel&&(0,to.jsxs)(w,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:d.onAction,children:[d.actionLabel,(0,to.jsx)(pi.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},d.id))})}):(0,to.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,to.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,to.jsx)(pi.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,to.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,to.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var nt=ee(require("@radix-ui/react-tabs"));function xo({className:e,...t}){return(0,to.jsx)(nt.Root,{"data-slot":"tabs",className:c("flex flex-col gap-2",e),...t})}function Co({className:e,...t}){return(0,to.jsx)(nt.List,{"data-slot":"tabs-list",className:c("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function No({className:e,...t}){return(0,to.jsx)(nt.Trigger,{"data-slot":"tabs-trigger",className:c("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 $e=ee(require("react")),K=ee(require("@radix-ui/react-dropdown-menu")),bt=require("@radix-ui/react-icons");var sa=K.Root,la=K.Trigger;var sr=$e.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,to.jsxs)(K.SubTrigger,{ref:r,className:c("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,to.jsx)(bt.ChevronRightIcon,{className:"ml-auto"})]}));sr.displayName=K.SubTrigger.displayName;var lr=$e.forwardRef(({className:e,...t},a)=>(0,to.jsx)(K.SubContent,{ref:a,className:c("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));lr.displayName=K.SubContent.displayName;var jt=$e.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,to.jsx)(K.Portal,{children:(0,to.jsx)(K.Content,{ref:o,sideOffset:t,className:c("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));jt.displayName=K.Content.displayName;var st=$e.forwardRef(({className:e,inset:t,...a},o)=>(0,to.jsx)(K.Item,{ref:o,className:c("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}));st.displayName=K.Item.displayName;var dr=$e.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,to.jsxs)(K.CheckboxItem,{ref:r,className:c("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,to.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,to.jsx)(K.ItemIndicator,{children:(0,to.jsx)(bt.CheckIcon,{className:"h-4 w-4"})})}),t]}));dr.displayName=K.CheckboxItem.displayName;var cr=$e.forwardRef(({className:e,children:t,...a},o)=>(0,to.jsxs)(K.RadioItem,{ref:o,className:c("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,to.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,to.jsx)(K.ItemIndicator,{children:(0,to.jsx)(bt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));cr.displayName=K.RadioItem.displayName;var mr=$e.forwardRef(({className:e,inset:t,...a},o)=>(0,to.jsx)(K.Label,{ref:o,className:c("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));mr.displayName=K.Label.displayName;var pr=$e.forwardRef(({className:e,...t},a)=>(0,to.jsx)(K.Separator,{ref:a,className:c("-mx-1 my-1 h-px bg-muted",e),...t}));pr.displayName=K.Separator.displayName;var ur=({className:e,...t})=>(0,to.jsx)("span",{className:c("ml-auto text-xs tracking-widest opacity-60",e),...t});ur.displayName="DropdownMenuShortcut";function da({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let s=a.find(n=>n.value===e);return(0,to.jsxs)(ya.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,to:-20},animate:{opacity:1,to:0},transition:{duration:.3,ease:"easeOut"},children:[(0,to.jsx)("div",{className:"hidden lg:block",children:(0,to.jsx)(xo,{value:e,onValueChange:t,children:(0,to.jsx)(Co,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,to.jsx)(No,{value:n.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:n.label})},n.value))})})}),(0,to.jsx)("div",{className:"lg:hidden",children:(0,to.jsxs)(sa,{children:[(0,to.jsx)(la,{asChild:!0,children:(0,to.jsxs)(w,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[s?.label||"Select",(0,to.jsx)(pi.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,to.jsx)(jt,{align:"center",className:"w-[180px]",children:a.map(n=>(0,to.jsx)(st,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function So({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:s="assistant",onTabChange:n,showTabs:p=!0,tabOptions:d=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:N,actionIcon:h=(0,to.jsx)(pi.Bot,{className:"mr-2 h-4 w-4"}),actionText:D="Action",onNotificationRemove:f,onRemoveAll:k,logo:l="/headerlogo.png",appName:u="Nuvia",tagline:x="Collaboration Platform"}){let[I,Q]=(0,Va.useState)(!1),[X,W]=(0,Va.useState)(t),G=X.filter(O=>!O.read).length,fe=O=>{W(M=>M.filter(Z=>Z.id!==O)),f?.(O)},A=()=>{W(O=>O.filter(M=>M.read)),k?.()};return(0,to.jsxs)(to.Fragment,{children:[(0,to.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,to.jsx)(w,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,to.jsx)(pi.Menu,{className:"h-5 w-5"})}),(0,to.jsx)(w,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,to.jsx)(pi.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,to.jsxs)(ya.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,to.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,to.jsx)("img",{src:l,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h2",{className:"font-semibold text-sm",children:u}),(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:x})]})]}),(0,to.jsxs)("div",{className:"flex flex-1 items-center",children:[p&&(0,to.jsx)(da,{activeTab:s,onTabChange:n,tabOptions:d}),(0,to.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,to.jsx)(ya.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,to.jsxs)(w,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:N,children:[h,D]})})}),(0,to.jsx)(yo,{}),(0,to.jsx)(aa,{children:(0,to.jsxs)(oa,{children:[(0,to.jsx)(ia,{asChild:!0,children:(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,to.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>Q(!0),children:[(0,to.jsx)(ya.motion.div,{animate:G>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:G>0?1/0:0,repeatDelay:3},children:(0,to.jsx)(pi.Bell,{className:"h-5 w-5"})}),G>0&&(0,to.jsx)(ya.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:G})]})})}),(0,to.jsx)(Mt,{children:"Notifications"})]})}),(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,to.jsxs)(Ve,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,to.jsx)(It,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,to.jsx)(We,{})]})})]})]})]}),(0,to.jsx)(wo,{notifications:X,open:I,onClose:()=>Q(!1),onNotificationRemove:fe,onRemoveAll:A})]})}var ko=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,to.jsx)(pi.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ao({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=ko[0],onBusinessUnitChange:i,onSearch:s,businessUnits:n=ko,activeTab:p,onTabChange:d,showTabs:N=!1,onActionClick:h,actionIcon:D,actionText:f="Action",onNotificationRemove:k,onRemoveAll:l,logo:u="/headerlogo.png",appName:x="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:Q=!1}){let[X,W]=(0,Va.useState)(!Q),[G,fe]=(0,Va.useState)(!1),[A,O]=(0,Va.useState)(r),M=Z=>{O(Z),i?.(Z)};return(0,to.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[G&&(0,to.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>fe(!1)}),(0,to.jsx)("div",{className:"md:hidden",children:(0,to.jsx)(Ia,{items:e,isOpen:G,isMobile:!0,onClose:()=>fe(!1),currentBusinessUnit:A,onBusinessUnitChange:M,onSearch:s,logo:u,appName:x,tagline:I})}),(0,to.jsx)("div",{className:"hidden md:block",children:(0,to.jsx)(Ia,{items:e,isOpen:X,isMobile:!1,currentBusinessUnit:A,onBusinessUnitChange:M,onSearch:s,logo:u,appName:x,tagline:I})}),(0,to.jsxs)("div",{className:c("min-h-screen fixed w-full transition-all duration-300 ease-in-out",X?"md:pl-64":"md:pl-0"),children:[(0,to.jsx)(So,{title:a,notifications:o,onToggleSidebar:()=>W(!X),onToggleMobileMenu:()=>fe(!0),sidebarOpen:X,activeTab:p,onTabChange:d,showTabs:N,onActionClick:h,actionIcon:D,actionText:f,onNotificationRemove:k,onRemoveAll:l,logo:u,appName:x,tagline:I}),(0,to.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var ma=require("react-icons/fa");function Pe({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:s,className:n}){let[p,d]=Qt(`hero-section-minimized-${e.replace(/\s+/to,"-").toLowerCase()}`,!r&&!t),N=!r&&!t||p;return(0,to.jsxs)(ya.motion.div,{initial:{opacity:0,to:20},animate:{opacity:1,to:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${n||""}`,children:[(0,to.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,to.jsx)(le,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,to.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[N&&o&&(0,to.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,to.jsx)("button",{"aria-label":p?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>d(!p),style:{lineHeight:0},children:p?(0,to.jsx)(ma.FaChevronDown,{size:22}):(0,to.jsx)(ma.FaChevronUp,{size:22})})]})]}),!N&&(0,to.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,to.jsxs)("div",{className:"space-to-4",children:[(0,to.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,to.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,to.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,to.jsx)(w,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),s&&(0,to.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var lt=ee(require("react"));var q=lt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));q.displayName="Card";var ie=lt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:c("flex flex-col space-to-1.5 p-6",e),...t}));ie.displayName="CardHeader";var ne=lt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:c("font-semibold leading-none tracking-tight",e),...t}));ne.displayName="CardTitle";var Lt=lt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:c("text-sm text-muted-foreground",e),...t}));Lt.displayName="CardDescription";var J=lt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:c("p-6 Va-0",e),...t}));J.displayName="CardContent";var Et=lt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:c("flex items-center p-6 Va-0",e),...t}));Et.displayName="CardFooter";var Ro=ee(require("react")),zt=ee(require("@radix-ui/react-progress"));var Ft=Ro.forwardRef(({className:e,value:t,...a},o)=>(0,to.jsx)(zt.Root,{ref:o,className:c("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,to.jsx)(zt.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ft.displayName=zt.Root.displayName;function Ea({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.02,to:-5},whileTap:{scale:.98},className:r,children:(0,to.jsxs)(q,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,to.jsx)(ie,{className:"pb-2",children:(0,to.jsxs)("div",{className:"flex items-center justify-between",children:[(0,to.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,to.jsx)(le,{className:"rounded-xl bg-amber-500",children:"New"}):(0,to.jsx)(w,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,to.jsx)(pi.Star,{className:"h-4 w-4"})})]})}),(0,to.jsxs)(J,{className:"pb-2",children:[(0,to.jsx)(ne,{className:"text-lg",children:e.name}),(0,to.jsx)(Lt,{children:e.description}),o&&e.progress<100&&(0,to.jsxs)("div",{className:"mt-2",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,to.jsx)("span",{children:"Installation"}),(0,to.jsxs)("span",{children:[e.progress,"%"]})]}),(0,to.jsx)(Ft,{value:e.progress,className:"h-2 mt-1 rounded-xl"})]})]}),(0,to.jsx)(Et,{children:(0,to.jsx)(w,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function Lo({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:i}){return(0,to.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[r&&(0,to.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,to.jsx)("div",{className:"col-span-6",children:"Name"}),(0,to.jsx)("div",{className:"col-span-2",children:"Size"}),(0,to.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,to.jsx)("div",{className:"divide-to",children:e.map(s=>(0,to.jsxs)(ya.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(s),children:[(0,to.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,to.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,to.jsx)("div",{children:(0,to.jsx)("p",{className:"font-medium",children:s.name})})]}),(0,to.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:s.filesize}),(0,to.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,to.jsx)("span",{className:"text-sm md:text-base",children:typeof s.createdAt=="string"?s.createdAt:new Date(s.createdAt).toLocaleDateString()}),(0,to.jsx)("div",{className:"flex gap-1",children:(0,to.jsx)(w,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:n=>{n.stopPropagation(),o?.(s)},children:(0,to.jsx)(pi.Trash2,{className:"h-4 w-4"})})})]})]},s.name))})]})}function zo({project:e,onOpen:t,onShare:a,className:o}){return(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.02,to:-5},whileTap:{scale:.98},className:o,children:(0,to.jsxs)(q,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,to.jsxs)(ie,{children:[(0,to.jsxs)("div",{className:"flex items-center justify-between",children:[(0,to.jsx)(ne,{children:e.name}),(0,to.jsxs)(le,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,to.jsx)(Lt,{children:e.description})]}),(0,to.jsxs)(J,{className:"space-to-4",children:[(0,to.jsxs)("div",{className:"space-to-2",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,to.jsx)("span",{children:"Progress"}),(0,to.jsxs)("span",{children:[e.progress,"%"]})]}),(0,to.jsx)(Ft,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,to.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,to.jsxs)("div",{className:"flex items-center",children:[(0,to.jsx)(pi.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,to.jsxs)("div",{className:"flex items-center",children:[(0,to.jsx)(pi.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,to.jsxs)(Et,{className:"flex gap-2",children:[(0,to.jsx)(w,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,to.jsx)(w,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,to.jsx)(pi.Share2,{className:"h-4 w-4"})})]})]})})}var za=[{name:"PixelMaster",icon:(0,to.jsx)(pi.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,to.jsx)(pi.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,to.jsx)(pi.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,to.jsx)(pi.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,to.jsx)(pi.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,to.jsx)(pi.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,to.jsx)(pi.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,to.jsx)(pi.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,to.jsx)(pi.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,to.jsx)(pi.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,to.jsx)(pi.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,to.jsx)(pi.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],Fo=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var Uo=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var Oo=[{id:"home",title:"Home",icon:(0,to.jsx)(pi.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,to.jsx)(pi.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,to.jsx)(pi.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,to.jsx)(pi.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,to.jsx)(pi.FileText,{}),url:"/knowledge"}],Ko=[{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")}];var xt=[{id:1,name:"to-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var Fa=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],pa=[{id:1,name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],fa=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],gr=[...fa,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],fr=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],ua={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:[]},Ho={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:fa.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var hs={empty:{initialProjects:ua.projects,initialEpics:ua.epics,initialSprints:ua.sprints,initialTasks:ua.tasks},default:{initialProjects:xt,initialEpics:Fa,initialSprints:pa,initialTasks:fa},highDensity:{initialProjects:xt,initialEpics:Fa,initialSprints:pa,initialTasks:gr},singleEpic:{initialProjects:xt,initialEpics:Ho.epics,initialSprints:pa,initialTasks:Ho.tasks},multipleProjects:{initialProjects:fr,initialEpics:Fa,initialSprints:pa,initialTasks:fa}},ga=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],bs=[{id:1,title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:ga.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:xt[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:ga.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:xt[0]},{id:3,title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:ga.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:xt[0]}];var ys=ga.filter(e=>e.type==="digital");var V=ee(require("@radix-ui/react-select")),at=ee(require("react")),Ut=V.Root;var Ht=V.Value,Ct=at.forwardRef(({children:e,className:t,...a},o)=>(0,to.jsxs)(V.Trigger,{className:c("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,to.jsx)(V.Icon,{asChild:!0,children:(0,to.jsx)(pi.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ct.displayName=V.Trigger.displayName;var Vo=at.forwardRef(({className:e,...t},a)=>(0,to.jsx)(V.ScrollUpButton,{className:c("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,to.jsx)(pi.ChevronUp,{className:"h-4 w-4"})}));Vo.displayName=V.ScrollUpButton.displayName;var Wo=at.forwardRef(({className:e,...t},a)=>(0,to.jsx)(V.ScrollDownButton,{className:c("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,to.jsx)(pi.ChevronDown,{className:"h-4 w-4"})}));Wo.displayName=V.ScrollDownButton.displayName;var Nt=at.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,to.jsx)(V.Portal,{children:(0,to.jsxs)(V.Content,{className:c("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-to-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-to-1",t),position:a,ref:r,...o,children:[(0,to.jsx)(Vo,{}),(0,to.jsx)(V.Viewport,{className:c("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,to.jsx)(Wo,{})]})}));Nt.displayName=V.Content.displayName;var vr=at.forwardRef(({className:e,...t},a)=>(0,to.jsx)(V.Label,{className:c("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));vr.displayName=V.Label.displayName;var Ue=at.forwardRef(({children:e,className:t,...a},o)=>(0,to.jsxs)(V.Item,{className:c("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,to.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,to.jsx)(V.ItemIndicator,{children:(0,to.jsx)(pi.Check,{className:"h-4 w-4"})})}),(0,to.jsx)(V.ItemText,{children:e})]}));Ue.displayName=V.Item.displayName;var hr=at.forwardRef(({className:e,...t},a)=>(0,to.jsx)(V.Separator,{className:c("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));hr.displayName=V.Separator.displayName;function va({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:s}){let[n,p]=(0,$o.useState)(!1),d=D=>{switch(D){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},N=D=>{switch(D){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},h=D=>{if(!D)return"Never";let k=Math.floor((new Date().getTime()-D.getTime())/(1e3*60));return k<1?"Just now":k<60?`${k}m ago`:k<1440?`${Math.floor(k/60)}h ago`:`${Math.floor(k/1440)}d ago`};return(0,to.jsxs)(q,{className:c("hover:shadow-md transition-shadow",i&&"p-2",s),children:[(0,to.jsx)(ie,{className:c("pb-3",i&&"pb-2"),children:(0,to.jsxs)("div",{className:"flex items-start justify-between",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[(0,to.jsx)("div",{className:"relative",children:(0,to.jsxs)(Ve,{className:c("h-12 w-12",i&&"h-8 w-8"),children:[(0,to.jsx)(It,{src:"/placeholder.svg",alt:e.name||"name"}),(0,to.jsx)(We,{children:e.name?.split(" ").map(D=>D[0]).join("")})]})}),(0,to.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2",children:[(0,to.jsx)("h3",{className:c("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,to.jsx)(pi.Bot,{className:c("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,to.jsx)(pi.User,{className:c("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,to.jsx)("p",{className:c("text-sm text-muted-foreground truncate",i&&"text-xs")}),!i&&(0,to.jsx)("div",{className:"flex items-center gap-2 mt-1"})]})]}),r&&(0,to.jsxs)(sa,{children:[(0,to.jsx)(la,{asChild:!0,children:(0,to.jsx)(w,{variant:"ghost",size:"icon",className:c("h-8 w-8",i&&"h-6 w-6"),children:(0,to.jsx)(pi.MoreHorizontal,{className:c("h-4 w-4",i&&"h-3 w-3")})})}),(0,to.jsxs)(jt,{align:"end",children:[e.type==="digital"&&(0,to.jsxs)(to.Fragment,{children:[(0,to.jsxs)(st,{onClick:()=>o?.(e),children:[(0,to.jsx)(pi.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,to.jsxs)(st,{onClick:()=>t?.(e),children:[(0,to.jsx)(pi.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]})]}),(0,to.jsxs)(st,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,to.jsx)(pi.Trash2,{className:"h-4 w-4 mr-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,to.jsxs)(J,{className:"Va-0",children:[(0,to.jsx)("div",{className:"space-to-2 text-sm",children:e.type==="human"&&(0,to.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,to.jsx)(pi.Mail,{className:"h-3 w-3"}),(0,to.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,to.jsx)("div",{className:"mt-3",children:(0,to.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,n?e.capabilities.length:2).map(D=>(0,to.jsx)(le,{variant:"outline",className:"text-xs",children:typeof D.value=="number"?D.value:D.value.name},typeof D.value=="number"?D.value:D.value.name)),(e.capabilities?.length||0)>2&&(0,to.jsx)(w,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>p(!n),children:n?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}var Go=ee(require("react")),Ua=ee(require("@radix-ui/react-label"));var br=(0,eo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),mt=Go.forwardRef(({className:e,...t},a)=>(0,to.jsx)(Ua.Root,{ref:a,className:c(br(),e),...t}));mt.displayName=Ua.Root.displayName;var Jo=ee(require("react")),ot=Jo.forwardRef(({className:e,...t},a)=>(0,to.jsx)("textarea",{className:c("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));ot.displayName="Textarea";function Ha({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:s="Cancel",readOnly:n=!1,availableKnowledgeDocuments:p=[]}){let[d,N]=(0,Va.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,...e}),[h,D]=(0,Va.useState)(""),[f,k]=(0,Va.useState)(""),[l,u]=(0,Va.useState)(!n);(0,Va.useEffect)(()=>{e&&N(e)},[e]);let x=A=>{A.preventDefault();let O={id:d.id||parseInt(Date.now().toString()),name:d.name,type:"digital",description:d.description,jobDescription:d.jobDescription||"",workInstructions:d.workInstructions||"",capabilities:d.capabilities||[],capabilityLevel:d.capabilityLevel||0};t(O)},I=(A,O,M)=>{if(!O.trim())return;let Z=d[A]||[];N({...d,[A]:[...Z,O.trim()]}),M("")},Q=(A,O)=>{let M=d[A]||[];N({...d,[A]:M.filter((Z,v)=>v!==O)})},X=A=>{A.preventDefault(),u(!l)},W=(A,O,M,Z,v)=>{let Ee=d[A]||[];return(0,to.jsxs)("div",{className:"space-to-2",children:[(0,to.jsx)(mt,{children:O}),l&&(0,to.jsxs)("div",{className:"flex gap-2",children:[(0,to.jsx)(ve,{value:M,onChange:m=>Z(m.target.value),placeholder:v,onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),I(A,M,Z))},disabled:o}),(0,to.jsx)(w,{type:"button",variant:"outline",size:"icon",onClick:()=>I(A,M,Z),disabled:o,children:(0,to.jsx)(pi.Plus,{className:"h-4 w-4"})})]}),(0,to.jsx)("div",{className:"flex flex-wrap gap-2",children:Ee.map((m,$)=>(0,to.jsxs)(le,{className:"gap-1",children:[m,l&&(0,to.jsx)(w,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>Q(A,$),disabled:o,children:(0,to.jsx)(pi.X,{className:"h-3 w-3"})})]},`${A}-${$}-${m}`))})]})},G=r||(l?e?"Edit Colleague":"Add New Colleague":"View Colleague"),fe=i||(e?"Update Colleague":"Add Colleague");return(0,to.jsxs)(q,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,to.jsx)(ie,{children:(0,to.jsxs)(ne,{className:"flex items-center gap-2",children:[(0,to.jsx)(pi.Bot,{className:"h-5 w-5"}),G]})}),(0,to.jsx)(J,{children:(0,to.jsxs)("form",{onSubmit:x,className:"space-to-6",children:[(0,to.jsxs)("div",{className:"space-to-4",children:[(0,to.jsxs)("div",{className:"space-to-2",children:[(0,to.jsx)(mt,{htmlFor:"name",children:"Name *"}),(0,to.jsx)(ve,{id:"name",value:d.name||"",onChange:A=>N({...d,name:A.target.value}),required:!0,disabled:o||!l})]}),(0,to.jsxs)("div",{className:"space-to-2",children:[(0,to.jsx)(mt,{htmlFor:"description",children:"Description"}),(0,to.jsx)(ot,{id:"description",value:d.description||"",onChange:A=>N({...d,description:A.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!l})]})]}),(0,to.jsxs)("div",{className:"space-to-4",children:[(0,to.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,to.jsxs)("div",{className:"space-to-2",children:[(0,to.jsx)(mt,{htmlFor:"jobDescription",children:"Job Description *"}),(0,to.jsx)(ot,{id:"jobDescription",value:d.jobDescription||"",onChange:A=>N({...d,jobDescription:A.target.value}),rows:4,required:d.type==="digital",disabled:o||!l})]}),(0,to.jsxs)("div",{className:"space-to-2",children:[(0,to.jsx)(mt,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,to.jsx)(ot,{id:"workInstructions",value:d.workInstructions||"",onChange:A=>N({...d,workInstructions:A.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!l})]}),W("capabilities","Capabilities",f,k,"Add capability")]}),(0,to.jsxs)("div",{className:"flex justify-end gap-2 Va-4 border-t",children:[(0,to.jsx)(w,{type:"button",variant:"outline",onClick:a,disabled:o,children:l?s:"Close"}),l?(0,to.jsx)(w,{type:"submit",disabled:o,children:o?"Saving...":fe}):(0,to.jsxs)(w,{type:"button",onClick:X,disabled:o,className:"gap-2",children:[(0,to.jsx)(pi.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Yo({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,i]=(0,Va.useState)(""),s=(0,Va.useMemo)(()=>e.filter(p=>p.name?.toLowerCase().includes(r.toLowerCase())||p.email.toLowerCase().includes(r.toLowerCase())),[e,r]),n=p=>{t(p)};return(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-to-6",children:(0,to.jsx)(ya.AnimatePresence,{mode:"wait",children:(0,to.jsxs)(ya.motion.div,{initial:{opacity:0,to:10},animate:{opacity:1,to:0},exit:{opacity:0,to:-10},transition:{duration:.2},children:[(0,to.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,to.jsxs)(w,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,to.jsx)(pi.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),(0,to.jsx)(q,{className:"container",children:(0,to.jsx)(J,{className:"Va-6",children:(0,to.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,to.jsx)("div",{className:"flex-1",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)(pi.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,to.jsx)(ve,{placeholder:"Search users by name, email, role, or skills...",value:r,onChange:p=>i(p.target.value),className:"pl-9"})]})})})})}),(0,to.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:s.map(p=>(0,to.jsx)(ya.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,to.jsxs)(q,{className:`cursor-pointer transition-all hover:shadow-lg ${o===p.id?"ring-2 ring-primary":""}`,onClick:()=>n(p),children:[(0,to.jsx)(ie,{className:"pb-3",children:(0,to.jsxs)("div",{className:"flex items-start justify-between",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[(0,to.jsx)(Ve,{children:(0,to.jsx)(We,{children:(0,to.jsx)(pi.User,{className:"h-4 w-4"})})}),(0,to.jsx)("div",{children:(0,to.jsx)(ne,{className:"text-lg",children:p.name})})]}),o===p.id&&(0,to.jsx)(pi.Check,{className:"h-5 w-5 text-primary"})]})}),(0,to.jsx)(J,{className:"Va-0",children:(0,to.jsxs)("div",{className:"space-to-3",children:[(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,to.jsx)("p",{className:"text-sm font-medium",children:p.email})]}),(0,to.jsx)("div",{children:(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},p.id))}),s.length===0&&(0,to.jsx)(q,{className:"container mt-4",children:(0,to.jsx)(J,{className:"Va-6",children:(0,to.jsxs)("div",{className:"text-center py-8",children:[(0,to.jsx)(pi.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function Qo({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,Va.useState)(""),[s,n]=(0,Va.useState)("all"),p=(0,Va.useMemo)(()=>e.filter(h=>h.name.toLowerCase().includes(r.toLowerCase())||h.jobDescription?.toLowerCase().includes(r.toLowerCase())||h.workInstructions?.toLowerCase().includes(r.toLowerCase())),[e,r,s]),d=h=>{let D={...h,name:`${h.name} (Copy)`};t(D)},N=h=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(h);return(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-to-6",children:(0,to.jsx)(ya.AnimatePresence,{mode:"wait",children:(0,to.jsxs)(ya.motion.div,{initial:{opacity:0,to:10},animate:{opacity:1,to:0},exit:{opacity:0,to:-10},transition:{duration:.2},children:[(0,to.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,to.jsxs)(w,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,to.jsx)(pi.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,to.jsx)(q,{children:(0,to.jsx)(J,{className:"Va-6",children:(0,to.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,to.jsx)("div",{className:"flex-1",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)(pi.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,to.jsx)(ve,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:h=>i(h.target.value),className:"pl-9"})]})}),(0,to.jsxs)("select",{value:s,onChange:h=>n(h.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,to.jsx)("option",{value:"all",children:"All Status"}),(0,to.jsx)("option",{value:"active",children:"Active"}),(0,to.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,to.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:p.map(h=>(0,to.jsx)(ya.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,to.jsxs)(q,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===h.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>d(h),children:[(0,to.jsx)(ie,{className:"pb-3",children:(0,to.jsxs)("div",{className:"flex items-start justify-between",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[(0,to.jsx)(Ve,{children:(0,to.jsx)(We,{className:"bg-blue-100",children:(0,to.jsx)(pi.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,to.jsx)("div",{children:(0,to.jsx)(ne,{className:"text-lg flex items-center gap-2",children:h.name})})]}),(0,to.jsxs)(w,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:D=>{D.stopPropagation(),d(h)},children:[(0,to.jsx)(pi.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,to.jsx)(J,{className:"Va-0",children:(0,to.jsxs)("div",{className:"space-to-3",children:[(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,to.jsx)("p",{className:"text-sm line-clamp-2",children:h.jobDescription})]}),h.capabilities&&h.capabilities.length>0&&(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,to.jsx)("div",{className:"flex flex-wrap gap-1",children:h.capabilities.length>3&&(0,to.jsxs)(le,{variant:"outline",className:"text-xs",children:["+",h.capabilities.length-3]})})]}),(0,to.jsx)("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),h.workInstructions&&(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,to.jsx)("p",{className:"text-xs line-clamp-2",children:h.workInstructions})]})]})})]})},h.id))}),p.length===0&&(0,to.jsx)(q,{children:(0,to.jsx)(J,{className:"Va-6",children:(0,to.jsxs)("div",{className:"text-center py-8",children:[(0,to.jsx)(pi.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Zo({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-to-6",children:(0,to.jsx)(ya.AnimatePresence,{mode:"wait",children:(0,to.jsxs)(ya.motion.div,{initial:{opacity:0,to:10},animate:{opacity:1,to:0},exit:{opacity:0,to:-10},transition:{duration:.2},children:[(0,to.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,to.jsxs)(w,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,to.jsx)(pi.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,to.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,to.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,to.jsxs)(ie,{className:"text-center pb-4",children:[(0,to.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,to.jsx)(pi.User,{className:"h-8 w-8 text-blue-600"})}),(0,to.jsx)(ne,{className:"text-xl",children:"Add Human Colleague"})]}),(0,to.jsxs)(J,{className:"text-center",children:[(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add as team members."}),(0,to.jsxs)("div",{className:"space-to-2 text-sm",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(pi.Users,{className:"h-4 w-4 text-blue-600"}),(0,to.jsx)("span",{children:"Browse existing users"})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(pi.User,{className:"h-4 w-4 text-blue-600"}),(0,to.jsx)("span",{children:"Import user details automatically"})]})]}),(0,to.jsx)(w,{className:"mt-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,to.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,to.jsxs)(ie,{className:"text-center pb-4",children:[(0,to.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,to.jsx)(pi.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,to.jsx)(ne,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,to.jsxs)(J,{className:"text-center",children:[(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,to.jsxs)("div",{className:"space-to-2 text-sm",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(pi.Bot,{className:"h-4 w-4 text-purple-600"}),(0,to.jsx)("span",{children:"Clone existing colleagues"})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(pi.Users,{className:"h-4 w-4 text-purple-600"}),(0,to.jsx)("span",{children:"Create from templates"})]})]}),(0,to.jsx)(w,{className:"mt-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function ei({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-to-6",children:(0,to.jsx)(ya.AnimatePresence,{mode:"wait",children:(0,to.jsxs)(ya.motion.div,{initial:{opacity:0,to:10},animate:{opacity:1,to:0},exit:{opacity:0,to:-10},transition:{duration:.2},children:[(0,to.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,to.jsxs)(w,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,to.jsx)(pi.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,to.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,to.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,to.jsxs)(ie,{className:"text-center pb-4",children:[(0,to.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,to.jsx)(pi.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,to.jsx)(ne,{className:"text-xl",children:"Clone Existing"})]}),(0,to.jsxs)(J,{className:"text-center",children:[(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize pi for your needs."}),(0,to.jsxs)("div",{className:"space-to-2 text-sm",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(pi.Bot,{className:"h-4 w-4 text-blue-600"}),(0,to.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(pi.Copy,{className:"h-4 w-4 text-blue-600"}),(0,to.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,to.jsx)(w,{className:"mt-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,to.jsx)(ya.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,to.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,to.jsxs)(ie,{className:"text-center pb-4",children:[(0,to.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,to.jsx)(pi.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,to.jsx)(ne,{className:"text-xl",children:"Create New"})]}),(0,to.jsxs)(J,{className:"text-center",children:[(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,to.jsxs)("div",{className:"space-to-2 text-sm",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(pi.Plus,{className:"h-4 w-4 text-green-600"}),(0,to.jsx)("span",{children:"Custom job description"})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(pi.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,to.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,to.jsx)(w,{className:"mt-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}function Oa({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:s,availableUsers:n=[],existingDigitalColleagues:p=[]}){let[d,N]=(0,Va.useState)(e||[]),[h,D]=(0,Va.useState)(""),[f,k]=(0,Va.useState)("all"),[l,u]=(0,Va.useState)("all"),[x,I]=(0,Va.useState)("all"),[Q,X]=(0,Va.useState)(null),[W,G]=(0,Va.useState)(null);(0,Va.useEffect)(()=>{N(e||[])},[e]);let fe=Array.isArray(n)?n:[],A=Array.isArray(p)?p:[],[O,M]=(0,Va.useState)("main"),Z=d.filter(b=>!b||!b.name?!1:b.name.toLowerCase().includes(h.toLowerCase())||b.type==="human"&&b.email?.toLowerCase().includes(h.toLowerCase())||b.type==="digital"&&b.jobDescription?.toLowerCase().includes(h.toLowerCase())),v=Z.filter(b=>b.type==="human"),Ee=Z.filter(b=>b.type==="digital"),m=()=>{M("typeSelection")},$=b=>{b.type==="digital"&&(X(b),M("form")),console.log("Editing colleague:",b),a?.(b)},_=b=>{b.type==="digital"&&(G(b),M("view"))},Te=b=>{let xe={id:`human-${Date.now()}`,type:"human",name:b.name,email:b.email,updatedAt:b.updatedAt,createdAt:b.createdAt,accounts:b.accounts};N(ft=>[...ft,xe]),t?.(xe),M("main")},ye=b=>{if(!b||!b.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",b);return}N(xe=>[...xe,{...b,type:"digital"}]),t?.({...b,type:"digital"}),M("main")},rt=()=>{X(null),M("form")},kt=b=>{if(!b||!b.id){console.error("Invalid colleague provided to handleSaveColleague:",b);return}Q?(N(xe=>xe.map(ft=>ft.id===b.id?{...b,type:"digital"}:ft)),a?.({...b,type:"digital"})):(N(xe=>[...xe,{...b,type:"digital"}]),t?.({...b,type:"digital"})),M("main"),X(null)},Re=()=>{M("main"),X(null),G(null)},gi=()=>{M("main"),G(null)},Cr=()=>{W&&(X(W),G(null),M("form"))},wa=b=>{console.log("deleting",b,d),o?.(b,d.find(xe=>xe.id.toString()===b.toString())?.type),N(xe=>xe.filter(ft=>ft.id!==b))},fi=()=>{D(""),k("all"),u("all")};return O==="typeSelection"?(0,to.jsx)(Zo,{onSelectHuman:()=>M("userSelection"),onSelectDigital:()=>M("digitalOptions"),onCancel:()=>M("main")}):O==="userSelection"?(0,to.jsx)(Yo,{users:fe,onUserSelect:Te,onCancel:()=>M("typeSelection")}):O==="digitalOptions"?(0,to.jsx)(ei,{onCloneExisting:()=>M("digitalClone"),onCreateNew:rt,onCancel:()=>M("typeSelection")}):O==="digitalClone"?(0,to.jsx)(Qo,{digitalColleagues:A,onColleagueClone:ye,onCancel:()=>M("digitalOptions")}):O==="form"?(0,to.jsx)(Ha,{colleague:Q||void 0,onSave:kt,onCancel:Re}):O==="view"?(0,to.jsx)(Ha,{colleague:W||void 0,onSave:kt,onCancel:gi,readOnly:!0}):(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-to-8",children:(0,to.jsx)(ya.AnimatePresence,{mode:"wait",children:(0,to.jsx)(ya.motion.div,{initial:{opacity:0,to:10},animate:{opacity:1,to:0},exit:{opacity:0,to:-10},transition:{duration:.2},children:(0,to.jsxs)("div",{className:`space-to-6 ${s||""}`,children:[(0,to.jsx)(Pe,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:m}}),(0,to.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,to.jsxs)(q,{children:[(0,to.jsxs)(ie,{className:"flex flex-row items-center justify-between space-to-0 pb-2",children:[(0,to.jsx)(ne,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,to.jsx)(pi.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,to.jsxs)(J,{children:[(0,to.jsx)("div",{className:"text-2xl font-bold",children:d.length}),(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),(0,to.jsxs)(q,{children:[(0,to.jsxs)(ie,{className:"flex flex-row items-center justify-between space-to-0 pb-2",children:[(0,to.jsx)(ne,{className:"text-sm font-medium",children:"Human Members"}),(0,to.jsx)(pi.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,to.jsxs)(J,{children:[(0,to.jsx)("div",{className:"text-2xl font-bold",children:d.filter(b=>b.type==="human").length}),(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),(0,to.jsxs)(q,{children:[(0,to.jsxs)(ie,{className:"flex flex-row items-center justify-between space-to-0 pb-2",children:[(0,to.jsx)(ne,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,to.jsx)(pi.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,to.jsxs)(J,{children:[(0,to.jsx)("div",{className:"text-2xl font-bold",children:d.filter(b=>b.type==="digital").length}),(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),(0,to.jsx)(q,{children:(0,to.jsx)(J,{className:"Va-6",children:(0,to.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,to.jsx)("div",{className:"flex-1",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)(pi.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,to.jsx)(ve,{placeholder:"Search colleagues...",value:h,onChange:b=>D(b.target.value),className:"pl-9"})]})}),(0,to.jsxs)(Ut,{value:f,onValueChange:k,children:[(0,to.jsx)(Ct,{className:"w-full md:w-[180px]",children:(0,to.jsx)(Ht,{placeholder:"Department"})}),(0,to.jsxs)(Nt,{children:[(0,to.jsx)(Ue,{value:"all",children:"All Departments"}),i.map(b=>(0,to.jsx)(Ue,{value:b,children:b},b))]})]}),(0,to.jsxs)(Ut,{value:l,onValueChange:u,children:[(0,to.jsx)(Ct,{className:"w-full md:w-[140px]",children:(0,to.jsx)(Ht,{placeholder:"Status"})}),(0,to.jsxs)(Nt,{children:[(0,to.jsx)(Ue,{value:"all",children:"All Status"}),(0,to.jsx)(Ue,{value:"active",children:"Active"}),(0,to.jsx)(Ue,{value:"inactive",children:"Inactive"})]})]}),(h||f!=="all"||l!=="all")&&(0,to.jsxs)(w,{variant:"outline",onClick:fi,className:"gap-2",children:[(0,to.jsx)(pi.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,to.jsxs)("div",{className:"space-to-4",children:[(0,to.jsx)(da,{activeTab:x,onTabChange:I,tabOptions:[{value:"all",label:`All (${Z.length})`},{value:"human",label:`Human (${v.length})`},{value:"digital",label:`Digital (${Ee.length})`}],maxWidth:"400px",gridCols:3}),x==="all"&&(0,to.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:Z.map(b=>(0,to.jsx)(va,{colleague:b,onEdit:$,onDelete:wa,onViewDetails:_,compact:r},`${b}-${b.id}`))}),x==="human"&&(0,to.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:v.map(b=>(0,to.jsx)(va,{colleague:b,onEdit:$,onDelete:wa,onViewDetails:_,compact:r},b.id))}),x==="digital"&&(0,to.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:Ee.map(b=>(0,to.jsx)(va,{colleague:b,onEdit:$,onDelete:wa,onViewDetails:_,compact:r},b.id))})]}),Z.length===0&&(0,to.jsx)(q,{children:(0,to.jsx)(J,{className:"Va-6",children:(0,to.jsxs)("div",{className:"text-center py-8",children:[(0,to.jsx)(pi.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:h||f!=="all"||l!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,to.jsxs)(w,{onClick:m,className:"gap-2",children:[(0,to.jsx)(pi.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function oi({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:r=[]}){let[i,s]=(0,Va.useState)({...e,updatedAt:new Date}),n=()=>{let l=new Set,u=new Set;return r.forEach(x=>{x.menuConfig.groupBy.forEach(I=>l.add(I))}),o.forEach(x=>{x.metadata&&Object.keys(x.metadata).forEach(I=>u.add(I))}),{contextKeys:Array.from(l).sort(),documentKeys:Array.from(u).sort(),allKeys:Array.from(new Set([...l,...u])).sort()}},p=l=>{let u=new Set;return o.forEach(x=>{x.metadata?.[l]&&u.add(String(x.metadata[l]))}),Array.from(u).sort()},d=n(),N=()=>{t(i)},h=(l,u)=>{s(x=>({...x,metadata:{...x.metadata,[l]:u}}))},D=(l,u)=>{u==="__custom__"?h(l,""):h(l,u)},f=()=>{let l=`field_${Date.now()}`;h(l,"")},k=l=>{s(u=>{let x={...u.metadata};return delete x[l],{...u,metadata:x}})};return(0,to.jsxs)(ya.motion.div,{initial:{opacity:0,to:20},animate:{opacity:1,to:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,to.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,to.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[(0,to.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,to.jsx)(pi.Edit3,{className:"h-6 w-6 text-primary"})}),(0,to.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,to.jsxs)("div",{className:"flex gap-2",children:[(0,to.jsxs)(w,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,to.jsx)(pi.X,{className:"h-4 w-4"}),"Cancel"]}),(0,to.jsxs)(w,{size:"sm",onClick:N,className:"gap-2",children:[(0,to.jsx)(pi.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,to.jsxs)("div",{className:"space-to-4",children:[(0,to.jsxs)("div",{children:[(0,to.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,to.jsx)(ve,{value:i.title,onChange:l=>s(u=>({...u,title:l.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,to.jsx)(ot,{value:i.description||"",onChange:l=>s(u=>({...u,description:l.target.value})),placeholder:"Document description...",rows:2})]}),(0,to.jsxs)("div",{children:[(0,to.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,to.jsxs)("div",{children:[(0,to.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),d.contextKeys.length>0&&(0,to.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",d.contextKeys.slice(0,4).join(", "),d.contextKeys.length>4&&` +${d.contextKeys.length-4}`]})]}),(0,to.jsxs)(w,{type:"button",variant:"outline",size:"sm",onClick:f,className:"gap-1 h-8",children:[(0,to.jsx)(pi.Plus,{className:"h-3 w-3"}),"Add"]})]}),i.metadata&&Object.keys(i.metadata).length>0?(0,to.jsx)("div",{className:"space-to-2",children:Object.entries(i.metadata).map(([l,u])=>{let x=p(l);return(0,to.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,to.jsx)(ve,{value:l,onChange:I=>{let Q=I.target.value,X=i.metadata?.[l];s(W=>{let G={...W.metadata};return delete G[l],Q&&(G[Q]=X||""),{...W,metadata:G}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${l}`}),(0,to.jsx)("datalist",{id:`metadata-keys-${l}`,children:d.allKeys.map(I=>(0,to.jsx)("option",{value:I},I))}),(0,to.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),x.length>0?(0,to.jsxs)(Ut,{value:String(u||""),onValueChange:I=>D(l,I),children:[(0,to.jsx)(Ct,{className:"flex-1 h-8 text-sm",children:(0,to.jsx)(Ht,{placeholder:"Value"})}),(0,to.jsxs)(Nt,{children:[x.map(I=>(0,to.jsx)(Ue,{value:I,children:I},I)),(0,to.jsx)(Ue,{value:"__custom__",children:(0,to.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,to.jsx)(ve,{value:String(u||""),onChange:I=>h(l,I.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,to.jsx)(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(l),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,to.jsx)(pi.X,{className:"h-3 w-3"})})]},l)})}):(0,to.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:'No metadata \u2022 Click "Add" to create fields'})})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2",children:[(0,to.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,to.jsx)(le,{variant:"secondary",className:"font-mono",children:i.format.toUpperCase()})]})]})]}),(0,to.jsx)("div",{className:"flex-1 overflow-auto",children:(0,to.jsxs)("div",{className:"p-8",children:[(0,to.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,to.jsx)(ot,{value:i.content||"",onChange:l=>s(u=>({...u,content:l.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var si=e=>(0,to.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/to,"<br>").replace(/\*\*(.*?)\*\*/to,"<strong>$1</strong>").replace(/\*(.*?)\*/to,"<em>$1</em>").replace(/`(.*?)`/to,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),ii=e=>(0,to.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),yr=e=>(0,to.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,to.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,to.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,to.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,to.jsx)("pre",{className:"text-sm",children:e})]}),wr=e=>(0,to.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,to.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,to.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,to.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),si(e)]});function li({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:r=[],knowledgeContexts:i=[]}){let[s,n]=(0,Va.useState)(!1),p=f=>{switch(f){case"markdown":case"mdx":return(0,to.jsx)(pi.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,to.jsx)(pi.File,{className:"h-6 w-6 text-success"});case"text":return(0,to.jsx)(pi.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,to.jsx)(pi.File,{className:"h-6 w-6 text-muted-foreground"})}},d=f=>{switch(f){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},N=(f,k)=>{let l={markdown:si,mdx:wr,richtext:yr,text:ii},u=o?.[k]||l[k];return u?u(f):ii(f)},h=f=>{n(!1),t?.(f)},D=()=>{n(!1)};return s?(0,to.jsx)(oi,{document:e,onSave:h,onCancel:D,availableDocuments:r,knowledgeContexts:i}):(0,to.jsxs)(ya.motion.div,{initial:{opacity:0,to:20},animate:{opacity:1,to:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,to.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,to.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,to.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,to.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:p(e.format)}),(0,to.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,to.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,to.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,to.jsx)("div",{className:"flex-shrink-0",children:(0,to.jsxs)(w,{variant:"outline",size:"sm",onClick:()=>n(!0),className:"gap-2",children:[(0,to.jsx)(pi.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,to.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,to.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${d(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(f=>(0,to.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",f]},f))]})]}),(0,to.jsx)("div",{className:"flex-1 overflow-auto",children:(0,to.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,to.jsxs)("div",{className:"mb-6",children:[(0,to.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,to.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,to.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-to-1 text-xs",children:Object.entries(e.metadata).map(([f,k])=>(0,to.jsxs)("div",{className:"flex gap-1",children:[(0,to.jsxs)("span",{className:"text-muted-foreground font-medium",children:[f.replace(/([A-Z])/to," $1").trim(),":"]}),(0,to.jsx)("span",{className:"text-foreground truncate",children:String(k)})]},f))})})]}),(0,to.jsx)("div",{className:"space-to-4",children:e.content?(0,to.jsx)("div",{className:"relative",children:(0,to.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:N(e.content,e.format)})}):(0,to.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,to.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,to.jsx)(pi.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,to.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,to.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function di({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:s=!0}){let[n,p]=(0,Va.useState)(o===0),d=a&&Object.keys(a).length>0,N=t.length+(a?Object.values(a).reduce((f,k)=>f+k.documents.length,0):0),h=f=>{switch(f){case"markdown":case"mdx":return(0,to.jsx)(pi.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,to.jsx)(pi.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,to.jsx)(pi.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},D=f=>{let k=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return k[f%k.length]};return(0,to.jsxs)("div",{className:"space-to-1",children:[(d||t.length>0)&&(0,to.jsxs)(ya.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${n?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>p(!n),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,to.jsx)("div",{className:`w-1 h-6 rounded-full ${D(o)}`}),(0,to.jsx)(ya.motion.div,{animate:{rotate:n?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,to.jsx)(pi.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,to.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,to.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,to.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),s&&N>0&&(0,to.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,to.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:N})})]})]}),(0,to.jsx)(ya.motion.div,{initial:!1,animate:{height:n?"auto":0,opacity:n?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,to.jsxs)("div",{className:"Va-2 space-to-1",children:[t.map((f,k)=>(0,to.jsxs)(ya.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:k*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===f.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,to.jsx)("div",{className:"flex-shrink-0",children:h(f.format)}),(0,to.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,to.jsx)("p",{className:`text-sm truncate transition-colors ${i===f.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,to.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,to.jsx)("div",{className:"flex-shrink-0",children:(0,to.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.id)),a&&Object.entries(a).map(([f,k])=>(0,to.jsx)(di,{label:f,documents:k.documents,children:k.children,level:o+1,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:s},f))]})})]})}function ci({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:i,className:s,editable:n=!0}){let[p,d]=(0,Va.useState)(""),[N,h]=(0,Va.useState)(null),D=(0,Va.useMemo)(()=>p?e.filter(l=>l.title.toLowerCase().includes(p.toLowerCase())||l.description?.toLowerCase().includes(p.toLowerCase())||l.tags?.some(u=>u.toLowerCase().includes(p.toLowerCase()))||Object.values(l.metadata||{}).some(u=>String(u).toLowerCase().includes(p.toLowerCase()))):e,[e,p]),f=(0,Va.useMemo)(()=>{let l=(u,x)=>{if(x.length===0)return{};let[I,...Q]=x;return u.reduce((W,G)=>{let fe=G.metadata?.[I]||"Uncategorized",A=String(fe);if(W[A]||(W[A]={documents:[],children:{}}),Q.length===0)W[A].documents.push(G);else{let O=l([G],Q),M=Object.keys(O)[0];M&&(W[A].children||(W[A].children={}),W[A].children[M]?W[A].children[M].documents.push(...O[M].documents):W[A].children[M]=O[M])}return W},{})};return l(D,t.groupBy)},[D,t.groupBy]),k=l=>{h(l),a?.(l)};return(0,to.jsxs)("div",{className:`flex h-full ${s||""}`,children:[(0,to.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,to.jsx)("div",{className:"p-6 border-b border-border",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)("div",{className:"absolute inset-to-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,to.jsx)(pi.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,to.jsx)(ve,{placeholder:"Search knowledge base...",value:p,onChange:l=>d(l.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,to.jsx)(Qe,{className:"h-[calc(100%-100px)]",children:(0,to.jsxs)("div",{className:"p-4 space-to-3",children:[Object.entries(f).map(([l,u])=>(0,to.jsx)(di,{label:l,documents:u.documents,children:u.children,level:0,onDocumentClick:k,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},l)),Object.keys(f).length===0&&(0,to.jsxs)(ya.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,to.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,to.jsx)(pi.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,to.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,to.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,to.jsx)("div",{className:"flex-1 bg-background",children:N?(0,to.jsx)(li,{document:N,onDocumentUpdate:r,editable:n}):(0,to.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,to.jsxs)(ya.motion.div,{initial:{opacity:0,to:20},animate:{opacity:1,to:0},transition:{duration:.4},className:"max-w-sm",children:[(0,to.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,to.jsx)(pi.FileText,{className:"h-10 w-10 text-primary"})}),(0,to.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,to.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function Ka({documents:e=[],contexts:t=[],onDocumentClick:a=s=>console.log("Document clicked:",s),onDocumentShare:o=s=>console.log("Share document:",s),onLoadDocumentContent:r,selectedDocumentId:i}){let[s,n]=(0,Va.useState)(t[0]);return!t||t.length===0?(0,to.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,to.jsx)(Pe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,to.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,to.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,to.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,to.jsx)(Pe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,to.jsxs)("div",{className:"mt-6",children:[(0,to.jsx)("div",{className:"border-b border-border",children:(0,to.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(p=>(0,to.jsxs)("button",{onClick:()=>n(p),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${s.id===p.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[p.icon,p.label]},p.id))})}),s.description&&(0,to.jsx)("div",{className:"mt-3 px-1",children:(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:s.description})})]})]}),(0,to.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,to.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,to.jsx)(ci,{documents:e,menuConfig:s.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function ui({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:r,onCreateProject:i,onOpenProject:s,sidebarItems:n,initialColleagues:p,users:d,onColleagueAdd:N,onColleagueEdit:h,onColleagueDelete:D}){let[f,k]=(0,Va.useState)("home"),[l,u]=(0,Va.useState)(t[0]),x=v=>{console.log("Opening app:",v.name)},I=v=>{console.log("Favoriting app:",v.name)},Q=v=>{console.log("Opening file:",v.name)},X=v=>{console.log("Sharing file:",v.name)},W=v=>{console.log("Opening project:",v.name),s(v)},G=v=>{console.log("Sharing project:",v.name)},fe=v=>{u(v),console.log("Business unit changed to:",v.name)},A=()=>{console.log("Copilot clicked - navigating to chat"),k("chat")},O=v=>{console.log("Notification removed:",v)},M=()=>{console.log("All notifications removed")},Z=()=>{switch(f){case"home":return(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 space-to-8",children:[(0,to.jsxs)("section",{className:"text-center py-12",children:[(0,to.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),(0,to.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,to.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,to.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,to.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,to.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,to.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,to.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,to.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,to.jsx)(Pe,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>k("chat")}})]});case"colleagues":return(0,to.jsx)(Oa,{initialColleagues:p,availableUsers:d,onColleagueAdd:N,onColleagueEdit:h,onColleagueDelete:D});case"chat":return(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 space-to-8",children:[(0,to.jsxs)("section",{className:"text-center py-12",children:[(0,to.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,to.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),(0,to.jsx)(Pe,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,to.jsxs)("div",{className:"space-to-8",children:[(0,to.jsx)(Pe,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,to.jsxs)("section",{className:"space-to-4",children:[(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,to.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:za.filter(v=>v.new).map(v=>(0,to.jsx)(Ea,{app:v,showProgress:!0,onOpen:x,onFavorite:I},v.name))})]}),(0,to.jsxs)("section",{className:"space-to-4",children:[(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,to.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:za.map(v=>(0,to.jsx)(Ea,{app:v,onOpen:x,onFavorite:I},v.name))})]})]});case"knowledge":return(0,to.jsx)(Ka,{});case"files":return(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 space-to-8",children:[(0,to.jsx)(Pe,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,to.jsxs)("section",{className:"space-to-4",children:[(0,to.jsx)("div",{className:"flex items-center justify-between",children:(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,to.jsx)(Lo,{files:Fo,onFileClick:Q})]})]});case"projects":return(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 space-to-8",children:[(0,to.jsx)(Pe,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:i}}),(0,to.jsxs)("section",{className:"space-to-4",children:[(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,to.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:a.map(v=>(0,to.jsx)(zo,{project:v,onOpen:W,onShare:G},v.name))})]})]});case"learn":return(0,to.jsxs)("div",{className:"space-to-8",children:[(0,to.jsx)(Pe,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),(0,to.jsxs)("section",{className:"space-to-4",children:[(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,to.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Uo.slice(0,3).map(v=>(0,to.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,to.jsx)("h3",{className:"font-semibold mb-2",children:v.title}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:v.description}),(0,to.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,to.jsx)("span",{children:v.duration}),(0,to.jsx)("span",{children:v.level})]})]},v.title))})]})]});default:return null}};return(0,to.jsx)(Ao,{sidebarItems:Oo,title:e,notifications:Ko,businessUnits:t,currentBusinessUnit:l,onBusinessUnitChange:fe,activeTab:f,onTabChange:k,showTabs:!0,onActionClick:A,actionIcon:(0,to.jsx)(pi.Bot,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:O,onRemoveAll:M,children:(0,to.jsx)(ya.AnimatePresence,{mode:"wait",children:(0,to.jsx)(ya.motion.div,{className:"flex-1 h-full",initial:{opacity:0,to:10},animate:{opacity:1,to:0},exit:{opacity:0,to:-10},transition:{duration:.2},children:Z()},f)})})}