cortex-react-components 2.0.7 → 2.0.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 (88) hide show
  1. package/dist/{chunk-5G3COZF4.mjs → chunk-2EC6ZHJE.mjs} +1 -1
  2. package/dist/{chunk-FHJ4MHLT.mjs → chunk-6NUBCZJ5.mjs} +1 -1
  3. package/dist/{chunk-5RDLHKTK.mjs → chunk-ABGNIQRP.mjs} +1 -1
  4. package/dist/{chunk-67YQLYKU.mjs → chunk-D4D2LBHI.mjs} +1 -1
  5. package/dist/chunk-GJFUSE32.mjs +4 -0
  6. package/dist/{chunk-AL6YBBXL.mjs → chunk-GNDJVL3O.mjs} +1 -1
  7. package/dist/{chunk-MMOATE43.mjs → chunk-MNRBHZ2Y.mjs} +1 -1
  8. package/dist/{chunk-2SAKLSZ4.mjs → chunk-PZXOH6CZ.mjs} +1 -1
  9. package/dist/{chunk-5JQAH3EN.mjs → chunk-Q3SBG7S7.mjs} +1 -1
  10. package/dist/{chunk-HKM6FA5J.mjs → chunk-QIFJ7LRG.mjs} +1 -1
  11. package/dist/{chunk-4RYG24IZ.mjs → chunk-QTILVWJA.mjs} +1 -1
  12. package/dist/{chunk-XIGBDWYI.mjs → chunk-RAGDUV7M.mjs} +1 -1
  13. package/dist/{chunk-E64KWNOT.mjs → chunk-TK4JC5PG.mjs} +1 -1
  14. package/dist/{chunk-OEFXIEY3.mjs → chunk-V5W32NJ4.mjs} +1 -1
  15. package/dist/{chunk-2L2HGIOO.mjs → chunk-Y7XREGJN.mjs} +1 -1
  16. package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  17. package/dist/components/Chat/CopilotInterface.js +1 -1
  18. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  19. package/dist/components/Chat/FILE_UPLOAD_GUIDE.js +219 -0
  20. package/dist/components/Chat/FILE_UPLOAD_GUIDE.mjs +219 -0
  21. package/dist/components/Chat/demo.js +1 -1
  22. package/dist/components/Chat/demo.mjs +1 -1
  23. package/dist/components/Chat/example-usage.js +1 -1
  24. package/dist/components/Chat/example-usage.mjs +1 -1
  25. package/dist/components/Chat/example-with-file-uploads.css +1 -0
  26. package/dist/components/Chat/example-with-file-uploads.d.ts +54 -0
  27. package/dist/components/Chat/example-with-file-uploads.js +2 -0
  28. package/dist/components/Chat/example-with-file-uploads.mjs +2 -0
  29. package/dist/components/Chat/example-with-vercel-ai.d.ts +4 -0
  30. package/dist/components/Chat/example-with-vercel-ai.js +1 -1
  31. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  32. package/dist/components/Chat/index.js +2 -2
  33. package/dist/components/Chat/index.mjs +1 -1
  34. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  35. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  36. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  37. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  38. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  39. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  40. package/dist/components/HeaderFooter/Header.mjs +1 -1
  41. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  42. package/dist/components/HeaderFooter/index.mjs +1 -1
  43. package/dist/components/Heros/PostHero/index.mjs +1 -1
  44. package/dist/components/Heros/RenderHero.mjs +1 -1
  45. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  46. package/dist/components/Heros/index.mjs +1 -1
  47. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  48. package/dist/components/Holidays/index.mjs +1 -1
  49. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  50. package/dist/components/Layouts/Print.mjs +1 -1
  51. package/dist/components/Layouts/SlideShow.mjs +1 -1
  52. package/dist/components/Layouts/index.mjs +1 -1
  53. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  54. package/dist/components/Menus/SidebarRight.mjs +1 -1
  55. package/dist/components/Menus/index.mjs +1 -1
  56. package/dist/components/Other/index.mjs +1 -1
  57. package/dist/components/Payload/index.mjs +1 -1
  58. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  59. package/dist/components/Projects/ProjectPage.mjs +1 -1
  60. package/dist/components/Projects/ProjectView.mjs +1 -1
  61. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  62. package/dist/components/index.js +9 -9
  63. package/dist/components/index.mjs +1 -1
  64. package/dist/components/ui/index.mjs +1 -1
  65. package/dist/components/ui/sidebar.mjs +1 -1
  66. package/dist/globals.css +1 -1
  67. package/dist/index.js +10 -10
  68. package/dist/index.mjs +1 -1
  69. package/dist/metafile-cjs.json +1 -1
  70. package/dist/metafile-esm.json +1 -1
  71. package/dist/pages/Blog.mjs +1 -1
  72. package/dist/pages/Documentation.mjs +1 -1
  73. package/dist/pages/IndexPage.mjs +1 -1
  74. package/dist/pages/Intranet.mjs +1 -1
  75. package/dist/pages/LandingPage.mjs +1 -1
  76. package/dist/pages/Page.mjs +1 -1
  77. package/dist/pages/Publish.mjs +1 -1
  78. package/dist/pages/Website.mjs +1 -1
  79. package/dist/sections/AboutSection.mjs +1 -1
  80. package/dist/sections/BlogDetail.mjs +1 -1
  81. package/dist/sections/BlogList.mjs +1 -1
  82. package/dist/sections/BlogListSection.mjs +1 -1
  83. package/dist/sections/PageSections.mjs +1 -1
  84. package/dist/sections/PricingSection.mjs +1 -1
  85. package/dist/sections/ServiceSection.mjs +1 -1
  86. package/dist/sections/index.mjs +1 -1
  87. package/package.json +1 -1
  88. package/dist/chunk-6RXY6Z7T.mjs +0 -4
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  'use client'
4
4
 
5
- "use strict";"use client";var uo=Object.create;var gt=Object.defineProperty;var go=Object.getOwnPropertyDescriptor;var fo=Object.getOwnPropertyNames;var bo=Object.getPrototypeOf,vo=Object.prototype.hasOwnProperty;var ho=(e,t)=>{for(var a in t)gt(e,a,{get:t[a],enumerable:!0})},ta=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of fo(t))!vo.call(e,l)&&l!==a&&gt(e,l,{get:()=>t[l],enumerable:!(o=go(t,l))||o.enumerable});return e};var J=(e,t,a)=>(a=e!=null?uo(bo(e)):{},ta(t||!e||!e.__esModule?gt(a,"default",{value:e,enumerable:!0}):a,e)),yo=e=>ta(gt({},"__esModule",{value:!0}),e);var wi={};ho(wi,{AdvancedAICopilot:()=>yi,CustomAICopilot:()=>vi,DemoCopilot:()=>hi,FocusedChatCopilot:()=>xi,SimpleAICopilot:()=>bi});module.exports=yo(wi);var ao=require("@ai-sdk/react");var Ye=require("react"),It=require("framer-motion"),to=require("lucide-react");var da=require("clsx");var Et="-",xo=e=>{let t=Co(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let r=c.split(Et);return r[0]===""&&r.length!==1&&r.shift(),ia(r,t)||wo(c)},getConflictingClassGroupIds:(c,r)=>{let u=a[c]||[];return r&&o[c]?[...u,...o[c]]:u}}},ia=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),l=o?ia(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(Et);return t.validators.find(({validator:c})=>c(n))?.classGroupId},aa=/^\[(.+)\]$/,wo=e=>{if(aa.test(e)){let t=aa.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Co=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return ko(Object.entries(e.classGroups),a).forEach(([n,c])=>{Ut(c,o,n,t)}),o},Ut=(e,t,a,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:oa(t,l);n.classGroupId=a;return}if(typeof l=="function"){if(No(l)){Ut(l(o),t,a,o);return}t.validators.push({validator:l,classGroupId:a});return}Object.entries(l).forEach(([n,c])=>{Ut(c,oa(t,n),a,o)})})},oa=(e,t)=>{let a=e;return t.split(Et).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},No=e=>e.isThemeGetter,ko=(e,t)=>t?e.map(([a,o])=>{let l=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,r])=>[t+c,r])):n);return[a,l]}):e,Do=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,l=(n,c)=>{a.set(n,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(n){let c=a.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return l(n,c),c},set(n,c){a.has(n)?a.set(n,c):l(n,c)}}},ra="!",Po=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,l=t[0],n=t.length,c=r=>{let u=[],p=0,A=0,v;for(let x=0;x<r.length;x++){let S=r[x];if(p===0){if(S===l&&(o||r.slice(x,x+n)===t)){u.push(r.slice(A,x)),A=x+n;continue}if(S==="/"){v=x;continue}}S==="["?p++:S==="]"&&p--}let k=u.length===0?r:r.substring(A),P=k.startsWith(ra),z=P?k.substring(1):k,D=v&&v>A?v-A:void 0;return{modifiers:u,hasImportantModifier:P,baseClassName:z,maybePostfixModifierPosition:D}};return a?r=>a({className:r,parseClassName:c}):c},So=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},To=e=>({cache:Do(e.cacheSize),parseClassName:Po(e),...xo(e)}),Ro=/\s+/,Ao=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],c=e.trim().split(Ro),r="";for(let u=c.length-1;u>=0;u-=1){let p=c[u],{modifiers:A,hasImportantModifier:v,baseClassName:k,maybePostfixModifierPosition:P}=a(p),z=!!P,D=o(z?k.substring(0,P):k);if(!D){if(!z){r=p+(r.length>0?" "+r:r);continue}if(D=o(k),!D){r=p+(r.length>0?" "+r:r);continue}z=!1}let x=So(A).join(":"),S=v?x+ra:x,B=S+D;if(n.includes(B))continue;n.push(B);let C=l(D,z);for(let E=0;E<C.length;++E){let ie=C[E];n.push(S+ie)}r=p+(r.length>0?" "+r:r)}return r};function Io(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=na(t))&&(o&&(o+=" "),o+=a);return o}var na=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=na(e[o]))&&(a&&(a+=" "),a+=t);return a};function Mo(e,...t){let a,o,l,n=c;function c(u){let p=t.reduce((A,v)=>v(A),e());return a=To(p),o=a.cache.get,l=a.cache.set,n=r,r(u)}function r(u){let p=o(u);if(p)return p;let A=Ao(u,a);return l(u,A),A}return function(){return n(Io.apply(null,arguments))}}var F=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},sa=/^\[(?:([a-z-]+):)?(.+)\]$/pa,Bo=/^\d+\/\d+$/,Lo=new Set(["px","full","screen"]),Uo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Eo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|pa|pa|min|max))|\pa(calc|min|max|clamp)\(.+\)|^0$/,zo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ke=e=>We(e)||Lo.has(e)||Bo.test(e),Ae=e=>$e(e,"length",_o),We=e=>!!e&&!Number.isNaN(Number(e)),Lt=e=>$e(e,"number",We),at=e=>!!e&&Number.isInteger(Number(e)),Ho=e=>e.endsWith("%")&&We(e.slice(0,-1)),h=e=>sa.test(e),Ie=e=>Uo.test(e),Oo=new Set(["length","size","percentage"]),Vo=e=>$e(e,Oo,la),Go=e=>$e(e,"position",la),Wo=new Set(["image","url"]),$o=e=>$e(e,Wo,Jo),Ko=e=>$e(e,"",qo),ot=()=>!0,$e=(e,t,a)=>{let o=sa.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},_o=e=>Eo.test(e)&&!zo.test(e),la=()=>!1,qo=e=>Fo.test(e),Jo=e=>jo.test(e);var Xo=()=>{let e=F("colors"),t=F("spacing"),a=F("blur"),o=F("brightness"),l=F("borderColor"),n=F("borderRadius"),c=F("borderSpacing"),r=F("borderWidth"),u=F("contrast"),p=F("grayscale"),A=F("hueRotate"),v=F("invert"),k=F("gap"),P=F("gradientColorStops"),z=F("gradientColorStopPositions"),D=F("inset"),x=F("margin"),S=F("opacity"),B=F("padding"),C=F("saturate"),E=F("scale"),ie=F("sepia"),K=F("skew"),te=F("space"),G=F("translate"),_=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",h,t],L=()=>[h,t],Ne=()=>["",ke,Ae],d=()=>["auto",We,h],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],m=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",h],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[We,h];return{cacheSize:500,separator:":",theme:{colors:[ot],spacing:[ke,Ae],blur:["none","",Ie,h],brightness:V(),borderColor:[e],borderRadius:["none","","full",Ie,h],borderSpacing:L(),borderWidth:Ne(),contrast:V(),grayscale:O(),hueRotate:V(),invert:O(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Ho,Ae],inset:re(),margin:re(),opacity:V(),padding:L(),saturate:V(),scale:V(),sepia:O(),skew:V(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[Ie]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"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:[...U(),h]}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-pa":[{"overflow-pa":Q()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-pa":[{"overscroll-pa":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[D]}],"inset-x":[{"inset-x":[D]}],"inset-pa":[{"inset-pa":[D]}],start:[{start:[D]}],end:[{end:[D]}],top:[{top:[D]}],right:[{right:[D]}],bottom:[{bottom:[D]}],left:[{left:[D]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",at,h]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",at,h]}],"grid-cols":[{"grid-cols":[ot]}],"col-start-end":[{col:["auto",{span:["full",at,h]},h]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[ot]}],"row-start-end":[{row:["auto",{span:[at,h]},h]}],"row-start":[{"row-start":d()}],"row-end":[{"row-end":d()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",h]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",h]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-pa":[{"gap-pa":[k]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],pe:[{pe:[B]}],pt:[{pt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[te]}],"space-x-reverse":["space-x-reverse"],"space-pa":[{"space-pa":[te]}],"space-pa-reverse":["space-pa-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,t]}],"min-w":[{"min-w":[h,t,"min","max","fit"]}],"max-w":[{"max-w":[h,t,"none","full","min","max","fit","prose",{screen:[Ie]},Ie]}],h:[{h:[h,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[h,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ie,Ae]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Lt]}],"font-family":[{font:[ot]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",We,Lt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ke,h]}],"list-image":[{"list-image":["none",h]}],"list-style-type":[{list:["none","disc","decimal",h]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ke,Ae]}],"underline-offset":[{"underline-offset":["auto",ke,h]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),Go]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","pa","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","pa","bl","l","tl"]},$o]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[z]}],"gradient-via-pos":[{via:[z]}],"gradient-to-pos":[{to:[z]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-to":[{to:[P]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-pa":[{"rounded-pa":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-pa":[{"rounded-pa":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-pa":[{"border-pa":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-pa":[{"border-pa":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-pa":[{"divide-pa":[r]}],"divide-pa-reverse":["divide-pa-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:I()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-pa":[{"border-pa":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-pa":[{"border-pa":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[ke,h]}],"outline-w":[{outline:[ke,Ae]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[ke,Ae]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ie,Ko]}],"shadow-color":[{shadow:[ot]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...m(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":m()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ie,h]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[A]}],invert:[{invert:[v]}],saturate:[{saturate:[C]}],sepia:[{sepia:[ie]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[A]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-pa":[{"border-spacing-pa":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-pa":[{"scale-pa":[E]}],rotate:[{rotate:[at,h]}],"translate-x":[{"translate-x":[G]}],"translate-pa":[{"translate-pa":[G]}],"skew-x":[{"skew-x":[K]}],"skew-pa":[{"skew-pa":[K]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","pa","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","pa","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-pa":[{"touch-pan":["pa","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ke,Ae,Lt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-pa"],overscroll:["overscroll-x","overscroll-pa"],inset:["inset-x","inset-pa","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-pa":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-pa"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["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-pa","rounded-l","rounded-ss","rounded-se","rounded-pa","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-pa"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-pa":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-pa"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-pa","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-pa":["border-w-t","border-w-pa"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-pa","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-pa":["border-color-t","border-color-pa"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-pa","touch-pz"],"touch-x":["touch"],"touch-pa":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ca=Mo(Xo);function s(...e){return ca((0,da.clsx)(e))}var Ct=J(require("react")),Gt=J(require("next/link"));var ma=require("class-variance-authority");var pa=require("react/jsx-runtime"),Qo=(0,ma.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 ce({className:e,variant:t,...a}){return(0,pa.jsx)("div",{className:s(Qo({variant:t}),e),...a})}var ua=require("@radix-ui/react-slot"),fa=J(require("react")),Yo=(0,ma.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"}}}),T=fa.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...l},n)=>(0,pa.jsx)(e?ua.Slot:"button",{className:s(Yo({className:t,size:a,variant:o})),ref:n,...l}));T.displayName="Button";var va=J(require("react"));var it=va.forwardRef(({className:e,type:t,...a},o)=>(0,pa.jsx)("input",{type:t,className:s("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));it.displayName="Input";var zt=J(require("react")),pe=J(require("@radix-ui/react-scroll-area"));var ve=zt.forwardRef(({className:e,children:t,...a},o)=>(0,pa.jsxs)(pe.Root,{ref:o,className:s("relative overflow-hidden",e),...a,children:[(0,pa.jsx)(pe.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,pa.jsx)(ya,{}),(0,pa.jsx)(pe.Corner,{})]}));ve.displayName=pe.Root.displayName;var ya=zt.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,pa.jsx)(pe.ScrollAreaScrollbar,{ref:o,orientation:t,className:s("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,pa.jsx)(pe.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ya.displayName=pe.ScrollAreaScrollbar.displayName;var rt=J(require("react")),W=J(require("@radix-ui/react-dialog"));var wa=W.Root;var Zo=W.Portal;var Ca=rt.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(W.Overlay,{ref:a,className:s("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}));Ca.displayName=W.Overlay.displayName;var Ft=rt.forwardRef(({className:e,children:t,...a},o)=>(0,pa.jsxs)(Zo,{children:[(0,pa.jsx)(Ca,{}),(0,pa.jsxs)(W.Content,{ref:o,className:s("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-pa-[-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,pa.jsxs)(W.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,pa.jsx)(to.pa,{className:"h-4 w-4"}),(0,pa.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ft.displayName=W.Content.displayName;var jt=({className:e,...t})=>(0,pa.jsx)("div",{className:s("flex flex-col space-pa-1.5 text-center sm:text-left",e),...t});jt.displayName="DialogHeader";var ei=({className:e,...t})=>(0,pa.jsx)("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ei.displayName="DialogFooter";var Ht=rt.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(W.Title,{ref:a,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));Ht.displayName=W.Title.displayName;var ti=rt.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(W.Description,{ref:a,className:s("text-sm text-muted-foreground",e),...t}));ti.displayName=W.Description.displayName;var nt=J(require("@radix-ui/react-checkbox")),ka=J(require("react")),Ot=ka.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(nt.Root,{className:s("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,pa.jsx)(nt.Indicator,{className:s("flex items-center justify-center text-current"),children:(0,pa.jsx)(to.Check,{className:"h-4 w-4"})})}));Ot.displayName=nt.Root.displayName;var he=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),Ke=[{id:"home",title:"Home",icon:(0,pa.jsx)(to.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,pa.jsx)(to.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,pa.jsx)(to.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 pa",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,pa.jsx)(to.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,pa.jsx)(to.FileText,{}),url:"/knowledge"}],_e=[{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")}],Be=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,pa.jsx)(to.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,pa.jsx)(to.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,pa.jsx)(to.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,pa.jsx)(to.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,pa.jsx)(to.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,pa.jsx)(to.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,pa.jsx)(to.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,pa.jsx)(to.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,pa.jsx)(to.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,pa.jsx)(to.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],ht=[{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 Vt=[{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}],bt=[{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",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],ai=[...xt,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],oi=[...ht,{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}],vt={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:[]},Da={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 Gi={empty:{initialProjects:vt.projects,initialEpics:vt.epics,initialSprints:vt.sprints,initialTasks:vt.tasks},default:{initialProjects:ht,initialEpics:Vt,initialSprints:bt,initialTasks:xt},highDensity:{initialProjects:ht,initialEpics:Vt,initialSprints:bt,initialTasks:ai},singleEpic:{initialProjects:ht,initialEpics:Da.epics,initialSprints:bt,initialTasks:Da.tasks},multipleProjects:{initialProjects:oi,initialEpics:Vt,initialSprints:bt,initialTasks:xt}},yt=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(he),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(he),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(he),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(he),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","to","Statistics"].map(he),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(he),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(he),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(he),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(he),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(he),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Wi=[{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:yt.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:yt.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:yt.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 $pa=yt.filter(e=>e.type==="digital");function Pa(e,t){let[a,o]=(0,Ye.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),l=n=>{try{o(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,Ye.useEffect)(()=>{l(a)},[]),[a,l]}function Wt({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:l=Be[0],onBusinessUnitChange:n,onSearch:c,className:r,logo:u="/headerlogo.png",appName:p="Nuvia",tagline:A="Collaboration Platform"}){let[v,k]=Ct.useState({}),[P,z]=Pa("sidebar-favorites",{}),[D,x]=Ct.useState(null),[S,B]=Ct.useState(""),C=d=>{k(U=>({...U,[d]:!U[d]}))},E=d=>{n?.(d)},ie=()=>{S.trim()&&c?.(S.trim())},K=d=>{d.key==="Enter"&&(d.preventDefault(),ie())},te=(d,U)=>{let I=P[d]||[],m=I.includes(U)?I.filter(M=>M!==U):I.concat(U);z({...P,[d]:m})},G=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let U=P[d.id]||[],I=d.items.filter(M=>U.includes(M.id)),m=d.items.filter(M=>!U.includes(M.id));return[...I,...m].slice(0,d.maxItems)},_=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,Q=e,re=d=>{let U=_(d),I=G(d),m=(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,pa.jsx)("span",{children:d.title})]}),d.badge&&(0,pa.jsx)(ce,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,pa.jsx)(to.ChevronDown,{className:s("ml-2 h-4 w-4 transition-transform",v[d.title]?"rotate-180":"")})]}),M=s("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",d.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return d.url?(0,pa.jsx)(Gt.default,{href:d.url,className:M,onClick:a?o:void 0,children:m}):(0,pa.jsx)("button",{className:M,onClick:()=>d.items&&C(d.title),children:m})},L=()=>{let d=e.find(I=>I.id===D);if(!d||!d.items||!d.maxItems)return null;let U=P[d.id]||[];return(0,pa.jsx)(wa,{open:!!D,onOpenChange:I=>!I&&x(null),children:(0,pa.jsxs)(Ft,{className:"sm:max-w-md",children:[(0,pa.jsxs)(jt,{children:[(0,pa.jsxs)(Ht,{children:["Manage ",d.title," Favorites"]}),(0,pa.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,pa.jsx)(ve,{className:"max-h-96 pr-4",children:(0,pa.jsx)("div",{className:"space-pa-4",children:d.items.map(I=>(0,pa.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,pa.jsx)(Ot,{id:I.id,checked:U.includes(I.id),onCheckedChange:()=>te(d.id,I.id),disabled:!U.includes(I.id)&&U.length>=(d.maxItems||0)}),(0,pa.jsxs)("label",{htmlFor:I.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:[I.title,I.badge&&(0,pa.jsx)(ce,{variant:"outline",className:"text-xs",children:I.badge})]})]},I.id))})})]})})},Ne=(0,pa.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,pa.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,pa.jsxs)("div",{className:"flex items-center gap-3",children:[(0,pa.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,pa.jsx)("img",{src:u,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,pa.jsxs)("div",{children:[(0,pa.jsx)("h2",{className:"font-semibold",children:p}),(0,pa.jsx)("p",{className:"text-xs text-muted-foreground",children:A})]})]}),a&&(0,pa.jsx)(T,{variant:"ghost",size:"icon",onClick:o,children:(0,pa.jsx)(to.pa,{className:"h-5 w-5"})})]}),(0,pa.jsx)("div",{className:"px-3 py-2",children:(0,pa.jsxs)("div",{className:"relative",children:[(0,pa.jsx)(to.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,pa.jsx)(it,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:S,onChange:d=>B(d.target.value),onKeyPress:K})]})}),(0,pa.jsx)(ve,{className:"flex-1 px-3 py-2",children:(0,pa.jsx)("div",{className:"space-pa-1",children:Q.map(d=>(0,pa.jsxs)("div",{className:"mb-1",children:[re(d),d.items&&v[d.title]&&(0,pa.jsxs)("div",{className:"mt-1 ml-6 space-pa-1 border-l pl-3",children:[G(d).map(U=>(0,pa.jsxs)(Gt.default,{href:U.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[U.title,U.badge&&(0,pa.jsx)(ce,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:U.badge})]},U.id)),_(d)&&d.items&&d.items.length>G(d).length&&(0,pa.jsxs)("button",{onClick:()=>x(d.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",d.items.length-G(d).length," more available"]})]})]},d.id))})}),(0,pa.jsx)("div",{className:"p-3",children:(0,pa.jsx)("div",{className:"space-pa-1",children:(0,pa.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,pa.jsx)(to.Settings,{className:"h-5 w-5"}),(0,pa.jsx)("span",{children:"Settings"})]})})}),(0,pa.jsx)(L,{})]});return a?(0,pa.jsx)("div",{className:s("fixed inset-pa-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Ne}):(0,pa.jsx)("div",{className:s("fixed inset-pa-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Ne})}var Nt=J(require("react")),De=J(require("@radix-ui/react-avatar"));var Fe=Nt.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(De.Root,{ref:a,className:s("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Fe.displayName=De.Root.displayName;var $t=Nt.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(De.Image,{ref:a,className:s("aspect-square h-full w-full",e),...t}));$t.displayName=De.Image.displayName;var je=Nt.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(De.Fallback,{ref:a,className:s("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));je.displayName=De.Fallback.displayName;var Sa=J(require("react")),fe=J(require("@radix-ui/react-tooltip"));var Dt=fe.Provider,Pt=fe.Root,St=fe.Trigger,st=Sa.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,pa.jsx)(fe.Portal,{children:(0,pa.jsx)(fe.Content,{ref:o,sideOffset:t,className:s("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));st.displayName=fe.Content.displayName;var Ta=require("next-themes");function Ra(){let{setTheme:e,theme:t}=(0,Ta.useTheme)();return(0,pa.jsx)(Dt,{children:(0,pa.jsxs)(Pt,{children:[(0,pa.jsx)(St,{asChild:!0,children:(0,pa.jsxs)(T,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,pa.jsx)(to.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,pa.jsx)(to.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,pa.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,pa.jsx)(st,{children:"Toggle theme"})]})})}function Aa({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:l,className:n}){let c=e.filter(p=>!p.read),r=c.length,u=p=>{switch(p){case"info":return(0,pa.jsx)(to.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,pa.jsx)(to.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,pa.jsx)(to.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,pa.jsx)(to.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,pa.jsx)(It.AnimatePresence,{children:t&&(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(It.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,pa.jsx)(It.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:s("fixed inset-pa-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",n),children:(0,pa.jsxs)("div",{className:"flex h-full flex-col",children:[(0,pa.jsxs)("div",{className:"flex items-center justify-between border-pa p-4",children:[(0,pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,pa.jsx)(to.Bell,{className:"h-5 w-5"}),(0,pa.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,pa.jsxs)(ce,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,pa.jsxs)(T,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,pa.jsx)(to.pa,{className:"h-5 w-5"}),(0,pa.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,pa.jsxs)("div",{className:"flex items-center justify-between border-pa p-2",children:[(0,pa.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,pa.jsx)(T,{variant:"ghost",size:"sm",onClick:l,className:"text-sm",children:"Dismiss all"})]}),c.length>0?(0,pa.jsx)(ve,{className:"flex-1",children:(0,pa.jsx)("div",{className:"divide-pa",children:c.map(p=>(0,pa.jsxs)("div",{className:s("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,pa.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:u(p.type)}),(0,pa.jsxs)("div",{className:"flex-1 space-pa-1",children:[(0,pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,pa.jsx)("p",{className:"font-medium",children:p.title}),(0,pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,pa.jsx)("p",{className:"text-xs text-muted-foreground",children:p.time}),(0,pa.jsx)(T,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(p.id),title:"Dismiss",children:(0,pa.jsx)(to.Check,{className:"h-3 w-3"})})]})]}),(0,pa.jsx)("p",{className:"text-sm text-muted-foreground",children:p.description}),p.actionLabel&&(0,pa.jsxs)(T,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:p.onAction,children:[p.actionLabel,(0,pa.jsx)(to.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},p.id))})}):(0,pa.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,pa.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,pa.jsx)(to.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,pa.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,pa.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var He=J(require("@radix-ui/react-tabs"));function Ia({className:e,...t}){return(0,pa.jsx)(He.Root,{"data-slot":"tabs",className:s("flex flex-col gap-2",e),...t})}function Ma({className:e,...t}){return(0,pa.jsx)(He.List,{"data-slot":"tabs-list",className:s("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Ba({className:e,...t}){return(0,pa.jsx)(He.Trigger,{"data-slot":"tabs-trigger",className:s("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Pe=J(require("react")),w=J(require("@radix-ui/react-dropdown-menu")),qe=require("@radix-ui/react-icons");var La=w.Root,Ua=w.Trigger;var ii=Pe.forwardRef(({className:e,inset:t,children:a,...o},l)=>(0,$.jsxs)(w.SubTrigger,{ref:l,className:s("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,$.jsx)(qe.ChevronRightIcon,{className:"ml-auto"})]}));ii.displayName=w.SubTrigger.displayName;var ri=Pe.forwardRef(({className:e,...t},a)=>(0,$.jsx)(w.SubContent,{ref:a,className:s("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}));ri.displayName=w.SubContent.displayName;var _t=Pe.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,$.jsx)(w.Portal,{children:(0,$.jsx)(w.Content,{ref:o,sideOffset:t,className:s("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})}));_t.displayName=w.Content.displayName;var qt=Pe.forwardRef(({className:e,inset:t,...a},o)=>(0,$.jsx)(w.Item,{ref:o,className:s("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));qt.displayName=w.Item.displayName;var ni=Pe.forwardRef(({className:e,children:t,checked:a,...o},l)=>(0,$.jsxs)(w.CheckboxItem,{ref:l,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,$.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$.jsx)(w.ItemIndicator,{children:(0,$.jsx)(qe.CheckIcon,{className:"h-4 w-4"})})}),t]}));ni.displayName=w.CheckboxItem.displayName;var si=Pe.forwardRef(({className:e,children:t,...a},o)=>(0,$.jsxs)(w.RadioItem,{ref:o,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,$.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$.jsx)(w.ItemIndicator,{children:(0,$.jsx)(qe.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));si.displayName=w.RadioItem.displayName;var li=Pe.forwardRef(({className:e,inset:t,...a},o)=>(0,$.jsx)(w.Label,{ref:o,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));li.displayName=w.Label.displayName;var ci=Pe.forwardRef(({className:e,...t},a)=>(0,$.jsx)(w.Separator,{ref:a,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));ci.displayName=w.Separator.displayName;var di=({className:e,...t})=>(0,$.jsx)("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});di.displayName="DropdownMenuShortcut";function za({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:l="700px",gridCols:n=6}){let c=a.find(r=>r.value===e);return(0,pa.jsxs)(It.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,pa:-20},animate:{opacity:1,pa:0},transition:{duration:.3,ease:"easeOut"},children:[(0,pa.jsx)("div",{className:"hidden md:block",children:(0,pa.jsx)(Ia,{value:e,onValueChange:t,children:(0,pa.jsx)(Ma,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:l,gridTemplateColumns:`repeat(${Math.min(n,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,pa.jsx)(It.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,pa.jsx)(Ba,{value:r.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:r.label})},r.value))})})}),(0,pa.jsx)("div",{className:"md:hidden",children:(0,pa.jsxs)(La,{children:[(0,pa.jsx)(Ua,{asChild:!0,children:(0,pa.jsxs)(T,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,pa.jsx)(to.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,pa.jsx)(_t,{align:"center",className:"w-[180px]",children:a.map(r=>(0,pa.jsx)(qt,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function Fa({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:l=!0,className:n,activeTab:c="assistant",onTabChange:r,showTabs:u=!0,tabOptions:p=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:A,actionIcon:v=(0,pa.jsx)(to.Bot,{className:"mr-2 h-4 w-4"}),actionText:k="Action",onNotificationRemove:P,onRemoveAll:z,logo:D="/headerlogo.png",appName:x="Nuvia",tagline:S="Collaboration Platform"}){let[B,C]=(0,Ye.useState)(!1),[E,ie]=(0,Ye.useState)(t),K=E.filter(_=>!_.read).length,te=_=>{ie(Q=>Q.filter(re=>re.id!==_)),P?.(_)},G=()=>{ie(_=>_.filter(Q=>Q.read)),z?.()};return(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${n||""}`,children:[(0,pa.jsx)(T,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,pa.jsx)(to.Menu,{className:"h-5 w-5"})}),(0,pa.jsx)(T,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,pa.jsx)(to.PanelLeft,{className:"h-5 w-5"})}),!l&&(0,pa.jsxs)(It.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,pa.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,pa.jsx)("img",{src:D,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,pa.jsxs)("div",{children:[(0,pa.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,pa.jsx)("p",{className:"text-xs text-muted-foreground",children:S})]})]}),(0,pa.jsxs)("div",{className:"flex flex-1 items-center",children:[u&&(0,pa.jsx)(za,{activeTab:c,onTabChange:r,tabOptions:p}),(0,pa.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,pa.jsx)(It.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,pa.jsx)(It.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,pa.jsxs)(T,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:A,children:[v,k]})})}),(0,pa.jsx)(Ra,{}),(0,pa.jsx)(Dt,{children:(0,pa.jsxs)(Pt,{children:[(0,pa.jsx)(St,{asChild:!0,children:(0,pa.jsx)(It.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,pa.jsxs)(T,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,pa.jsx)(It.motion.div,{animate:K>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:K>0?1/0:0,repeatDelay:3},children:(0,pa.jsx)(to.Bell,{className:"h-5 w-5"})}),K>0&&(0,pa.jsx)(It.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:K})]})})}),(0,pa.jsx)(st,{children:"Notifications"})]})}),(0,pa.jsx)(It.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,pa.jsxs)(Fe,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,pa.jsx)($t,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,pa.jsx)(je,{})]})})]})]})]}),(0,pa.jsx)(Aa,{notifications:E,open:B,onClose:()=>C(!1),onNotificationRemove:te,onRemoveAll:G})]})}var ja=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,pa.jsx)(to.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Oa({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:l=ja[0],onBusinessUnitChange:n,onSearch:c,businessUnits:r=ja,activeTab:u,onTabChange:p,showTabs:A=!1,onActionClick:v,actionIcon:k,actionText:P="Action",onNotificationRemove:z,onRemoveAll:D,logo:x="/headerlogo.png",appName:S="Nuvia",tagline:B="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[E,ie]=(0,Ye.useState)(!C),[K,te]=(0,Ye.useState)(!1),[G,_]=(0,Ye.useState)(l),Q=re=>{_(re),n?.(re)};return(0,pa.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[K&&(0,pa.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>te(!1)}),(0,pa.jsx)("div",{className:"md:hidden",children:(0,pa.jsx)(Wt,{items:e,isOpen:K,isMobile:!0,onClose:()=>te(!1),currentBusinessUnit:G,onBusinessUnitChange:Q,onSearch:c,logo:x,appName:S,tagline:B})}),(0,pa.jsx)("div",{className:"hidden md:block",children:(0,pa.jsx)(Wt,{items:e,isOpen:E,isMobile:!1,currentBusinessUnit:G,onBusinessUnitChange:Q,onSearch:c,logo:x,appName:S,tagline:B})}),(0,pa.jsxs)("div",{className:s("min-h-screen fixed w-full transition-all duration-300 ease-in-out",E?"md:pl-64":"md:pl-0"),children:[(0,pa.jsx)(Fa,{title:a,notifications:o,onToggleSidebar:()=>ie(!E),onToggleMobileMenu:()=>te(!0),sidebarOpen:E,activeTab:u,onTabChange:p,showTabs:A,onActionClick:v,actionIcon:k,actionText:P,onNotificationRemove:z,onRemoveAll:D,logo:x,appName:S,tagline:B}),(0,pa.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var Oe=J(require("react"));var me=Oe.forwardRef(({className:e,...t},a)=>(0,pa.jsx)("div",{ref:a,className:s("rounded-xl border bg-card text-card-foreground shadow",e),...t}));me.displayName="Card";var Se=Oe.forwardRef(({className:e,...t},a)=>(0,pa.jsx)("div",{ref:a,className:s("flex flex-col space-pa-1.5 p-6",e),...t}));Se.displayName="CardHeader";var Te=Oe.forwardRef(({className:e,...t},a)=>(0,pa.jsx)("div",{ref:a,className:s("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var Qt=Oe.forwardRef(({className:e,...t},a)=>(0,pa.jsx)("div",{ref:a,className:s("text-sm text-muted-foreground",e),...t}));Qt.displayName="CardDescription";var xe=Oe.forwardRef(({className:e,...t},a)=>(0,pa.jsx)("div",{ref:a,className:s("p-6 pt-0",e),...t}));xe.displayName="CardContent";var ct=Oe.forwardRef(({className:e,...t},a)=>(0,pa.jsx)("div",{ref:a,className:s("flex items-center p-6 pt-0",e),...t}));ct.displayName="CardFooter";function Va({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:l,onSessionEdit:n,onSessionDelete:c,className:r}){return(0,pa.jsx)("div",{className:`space-pa-4 h-full ${r||""}`,children:(0,pa.jsxs)(me,{className:"shadow-sm h-full",children:[(0,pa.jsx)("div",{className:"p-4 border-pa",children:(0,pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,pa.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,pa.jsx)(to.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,pa.jsxs)(T,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,pa.jsx)(to.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,pa.jsx)(ve,{className:"h-[600px]",children:(0,pa.jsx)("div",{className:"p-2",children:e.length===0?(0,pa.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(u=>(0,pa.jsx)("div",{className:s("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===u.id&&"bg-muted border"),onClick:()=>l(u),children:(0,pa.jsx)("div",{className:"flex items-start gap-3",children:(0,pa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,pa.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,pa.jsx)("h4",{className:"font-medium text-sm truncate",children:u.title}),(0,pa.jsx)("div",{className:"flex items-center gap-1",children:(0,pa.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[n&&(0,pa.jsx)(T,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded",onClick:p=>{p.stopPropagation(),n(u.id)},children:(0,pa.jsx)(to.Edit3,{className:"h-3 w-3"})}),c&&(0,pa.jsx)(T,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded text-destructive hover:text-destructive",onClick:p=>{p.stopPropagation(),c(u.id)},children:(0,pa.jsx)(to.Trash2,{className:"h-3 w-3"})})]})})]}),(0,pa.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:u.lastMessage})]})})},u.id))})})]})})}var Ga={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},Je=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function Yt(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Wa({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:l,colorScheme:n=Ga,className:c}){let[r,u]=(0,Ye.useState)([]),[p,A]=(0,Ye.useState)([]),v=r[r.length-1],k=v?.children||e,P=(C,E)=>{switch(C.type){case"category":return n.categories[E%n.categories.length];case"list":return n.lists[E%n.lists.length];case"item":return n.items[E%n.items.length];default:return n.primary}},z=(0,Ye.useMemo)(()=>({path:r,selectedItems:p,filters:{}}),[r,p]);(0,Ye.useEffect)(()=>{l&&l(z)},[z,l]);let D=C=>{C.type==="category"||C.type==="list"?u([...r,C]):C.type==="item"&&A([...p,C])},x=()=>{u(r.slice(0,-1))},S=C=>{u(r.slice(0,C+1))},B=()=>v?.actions?v.actions:[];return t?(0,pa.jsxs)("div",{className:s("w-full",c),children:[(0,pa.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,pa.jsxs)("div",{className:"flex items-center gap-2",children:[r.length>0&&(0,pa.jsx)(It.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:x,className:s("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,pa.jsx)(to.ChevronLeft,{className:s("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,pa.jsx)("h4",{className:"font-medium text-sm",children:v?.name||"Capabilities"})]}),(0,pa.jsx)(It.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:s("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,pa.jsx)(to.pa,{className:s("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),r.length>0&&(0,pa.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,pa.jsx)(It.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>u([]),className:s("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,pa.jsxs)("span",{className:"relative",children:["Capabilities",(0,pa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),r.map((C,E)=>(0,pa.jsxs)("div",{className:"flex items-center gap-1",children:[(0,pa.jsx)(to.ChevronRight,{className:"h-2 w-2"}),(0,pa.jsx)(It.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>S(E),className:s("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,pa.jsxs)("span",{className:"relative",children:[C.name,(0,pa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.id))]}),(0,pa.jsx)("div",{className:"max-h-40 overflow-pa-auto",children:(0,pa.jsx)(It.AnimatePresence,{mode:"wait",children:(0,pa.jsx)(It.motion.div,{initial:{opacity:0,pa:-4},animate:{opacity:1,pa:0},exit:{opacity:0,pa:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:v?.type==="list"&&v.data?(0,pa.jsx)(ui,{data:v.data,onItemSelect:C=>A([...p,C]),colorScheme:n}):(0,pa.jsx)(mi,{capabilities:k,onSelect:D,colorScheme:n})},v?.id||"root")})})]}):(0,pa.jsxs)(T,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,pa.jsx)(to.Menu,{className:"h-4 w-4"}),(0,pa.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function mi({capabilities:e,onSelect:t,colorScheme:a}){return(0,pa.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,pa.jsx)(pi,{capability:o,onClick:()=>t(o),color:a.categories[l%a.categories.length]},o.id))})}function pi({capability:e,onClick:t,selected:a,color:o}){return(0,pa.jsxs)(It.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:s("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,pa.jsx)("div",{className:s("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,pa.jsxs)("span",{className:"truncate relative",children:[e.name,(0,pa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,pa.jsx)(to.ChevronRight,{className:s("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,pa.jsx)(ce,{variant:"secondary",className:s("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function ui({data:e,onItemSelect:t,colorScheme:a}){return(0,pa.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,pa.jsxs)(It.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:s("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,pa.jsx)("div",{className:s("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[l%a.items.length])}),(0,pa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,pa.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,pa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,pa.jsx)("div",{className:s("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,pa.jsx)(ce,{variant:"secondary",className:s("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var _a=require("date-fns");function $a({taskId:e,polling:t=!0,system:a="payload"}){let[o,l]=(0,Ye.useState)(null),[n,c]=(0,Ye.useState)(!1),[r,u]=(0,Ye.useState)(null),p=async(v=!0)=>{if(e){v&&c(!0);try{let k=await fetch(`/api/tasks/${e}`);if(!k.ok)throw new Error(`Failed to fetch task: ${k.statusText}`);let P=await k.json();l(P)}catch(k){console.error("Error fetching task:",k),u(k instanceof Error?k:new Error("Unknown error occurred"))}finally{v&&c(!1)}}},A=()=>p(!1);return(0,Ye.useEffect)(()=>{e&&p(!0);let v=null;return e&&t&&(v=setInterval(A,5e3)),()=>{v&&clearInterval(v)}},[e,t]),{task:o,loading:n,error:r}}var gi=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},fi=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function qa({data:e}){let{id:t,system:a,fetchLatest:o,taskData:l,error:n}=e||{};if(!t)return null;let c=null,r=!0,u=n,p=o!==void 0?o:!0;if(c=l||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:p,taskData:c,error:u}),p){let{task:P,loading:z,error:D}=$a({taskId:t,system:a});c=P,r=z,u=D}else r=!1;let A=gi(c?.status||"todo"),v=fi(c?.status||"todo"),k=c?.dateLogged||new Date().toISOString();try{let P=new Date(c?.dateLogged||"");isNaN(P.getTime())||(k=(0,_a.formatDistanceToNow)(P,{addSuffix:!0}))}catch{}return(0,pa.jsxs)(me,{className:s("w-full max-w-md shadow-md",u&&"border border-destructive"),children:[(0,pa.jsxs)(Se,{className:"pb-2",children:[(0,pa.jsxs)("div",{className:"flex justify-between items-start",children:[(0,pa.jsx)(Te,{className:"text-lg font-semibold",children:r?"Loading...":c?.name||"Task"}),(0,pa.jsx)(ce,{className:`${A}`,children:v})]}),c?.project&&(0,pa.jsxs)(Qt,{className:"text-sm text-gray-500",children:["Project: ",c.project.name]})]}),(0,pa.jsx)(xe,{className:"pb-2",children:r?(0,pa.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):u?(0,pa.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,pa.jsx)("p",{className:"text-sm text-foreground",children:c?.description||"......."})}),(0,pa.jsx)(ct,{className:"pt-2 flex items-center justify-between",children:(0,pa.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,pa.jsx)(to.Clock,{className:"h-3 w-3 mr-1"}),(0,pa.jsxs)("span",{children:["Created ",k]}),(0,pa.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,pa.jsxs)("span",{children:["Task #",t]})]})})]})}function Qa({artefact:e,taskId:t,taskData:a,loading:o=!1,error:l=null}){let n=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},c=n.dateLogged;try{let r=new Date(n.dateLogged);isNaN(r.getTime())||(c=(0,_a.formatDistanceToNow)(r,{addSuffix:!0}))}catch{}return(0,pa.jsxs)(me,{className:"w-full max-w-md shadow-md",children:[(0,pa.jsx)(Se,{className:"pb-2",children:(0,pa.jsx)("div",{className:"flex justify-between items-start",children:(0,pa.jsx)(Te,{className:"text-lg font-semibold",children:o?"Loading...":n.name})})}),(0,pa.jsx)(xe,{className:"pb-2",children:o?(0,pa.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):l?(0,pa.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,pa.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,pa.jsx)(ct,{className:"pt-2 flex items-center justify-between",children:(0,pa.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,pa.jsx)(to.Clock,{className:"h-3 w-3 mr-1"}),(0,pa.jsxs)("span",{children:["Created ",c]}),(0,pa.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,pa.jsxs)("span",{children:["Task #",n.id]})]})})]})}function Ya(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Za({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:l,fileUploads:n,isDragOver:c,enableFileUpload:r,onInputChange:u,onSendMessage:p,onKeyPress:A,onFileUpload:v,onRemoveFile:k,onDragOver:P,className:z}){let D=(0,Ye.useRef)(null),x=(0,Ye.useRef)(null),S=(0,Ye.useRef)(null),[B,C]=(0,Ye.useState)(!1),[E,ie]=(0,Ye.useState)({path:[],selectedItems:[],filters:{}});(0,Ye.useEffect)(()=>{D.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Ye.useEffect)(()=>{B&&setTimeout(()=>{D.current?.scrollIntoView({behavior:"smooth"})},100)},[B]);let K=()=>Yt(E),te=()=>{let m=[];return l.forEach(M=>{M.actions&&M.actions.forEach(O=>{m.push({label:O.label,action:()=>G(O.id,{path:[M],selectedItems:[],filters:{}})})}),M.children&&M.children.forEach(O=>{O.type==="list"&&O.data&&m.push({label:`View ${O.name}`,action:()=>C(!0)})})}),m.slice(0,5)},G=(m,M)=>{console.log("Capability action:",m,M);let O=`Executing ${m} with context: ${JSON.stringify(M.path.map(se=>se.name))}`;C(!1)},_=Yt({path:[],selectedItems:[],filters:{}}),Q=m=>{v(m.target.files),m.target.files&&(m.target.value="")},re=m=>{m.preventDefault(),P(!0)},L=m=>{m.preventDefault(),P(!1)},Ne=m=>{m.preventDefault(),P(!1),v(m.dataTransfer.files)},d=m=>{if(m===0)return"0 Bytes";let M=1024,O=["Bytes","KB","MB","GB"],se=Math.floor(Math.log(m)/Math.log(M));return parseFloat((m/Math.pow(M,se)).toFixed(2))+" "+O[se]},U=m=>m.startsWith("image/")?(0,pa.jsx)(to.Image,{className:"h-4 w-4"}):m.startsWith("text/")?(0,pa.jsx)(to.FileText,{className:"h-4 w-4"}):(0,pa.jsx)(to.File,{className:"h-4 w-4"}),I=m=>{let M=m.role==="assistant",O=m.role==="user",se=Ya(m);return(0,pa.jsxs)("div",{className:s("flex items-start gap-3",O?"flex-row-reverse":""),children:[(0,pa.jsx)(Fe,{className:"h-8 w-8 shrink-0",children:(0,pa.jsx)(je,{className:s(O?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:O?(0,pa.jsx)(to.User,{className:"h-4 w-4"}):(0,pa.jsx)(to.Bot,{className:"h-4 w-4"})})}),(0,pa.jsxs)("div",{className:s("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",O?"bg-primary text-primary-foreground":"bg-muted"),children:[se&&(0,pa.jsx)("div",{className:"mb-2 last:mb-0",children:(0,pa.jsx)("p",{className:"text-sm",children:se})}),m.parts.map((V,Y)=>{if(V.type==="text")return null;if(V.type==="file"){let N=V;return(0,pa.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,pa.jsxs)("div",{className:"flex items-center gap-2",children:[U(N.mimeType||"application/octet-stream"),(0,pa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,pa.jsx)("p",{className:"text-sm font-medium truncate",children:N.name||N.url?.split("/").pop()||"File"}),N.size&&(0,pa.jsx)("p",{className:"text-xs opacity-70",children:d(N.size)}),N.mimeType&&(0,pa.jsx)("p",{className:"text-xs opacity-70",children:N.mimeType})]}),N.url&&(0,pa.jsx)(T,{variant:"ghost",size:"sm",onClick:()=>window.open(N.url,"_blank"),className:"h-8 w-8 p-0",children:(0,pa.jsx)(to.Download,{className:"h-4 w-4"})})]})},Y)}if(V.type.startsWith("tool-")){let N=V,ne=V.type.replace("tool-","");if(ne==="task")switch(N.state){case"input-available":return(0,pa.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},Y);case"output-available":return(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsx)(qa,{data:{id:N.output?.id||N.input?.id,fetchLatest:!1,taskData:N.output||N.input}})},Y);case"output-error":return(0,pa.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",N.errorText]},Y);default:return null}if(ne==="artefact")switch(N.state){case"input-available":return(0,pa.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},Y);case"output-available":return(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsx)(Qa,{artefact:N.output?.description||"",taskId:N.output?.id||N.input?.id,taskData:N.output||N.input})},Y);case"output-error":return(0,pa.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",N.errorText]},Y);default:return null}return(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsxs)(me,{className:"w-full max-w-md",children:[(0,pa.jsx)(Se,{children:(0,pa.jsx)(Te,{className:"text-lg",children:ne})}),(0,pa.jsxs)(xe,{children:[N.state==="input-available"&&(0,pa.jsxs)("p",{className:"text-sm",children:["Processing ",ne,"..."]}),N.state==="output-available"&&(0,pa.jsx)("pre",{className:"text-sm",children:JSON.stringify(N.output,null,2)}),N.state==="output-error"&&(0,pa.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",N.errorText]})]})]})},Y)}if(V.type.startsWith("data-")){let N=V,ne=V.type.replace("data-","");return ne==="reference"?(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsx)(me,{className:"w-full",children:(0,pa.jsx)(xe,{className:"p-4",children:(0,pa.jsx)("div",{className:"space-pa-2",children:N.data?.references?.map((le,tt)=>(0,pa.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,pa.jsx)(ce,{variant:"outline",children:le.type||"link"}),(0,pa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,pa.jsx)("p",{className:"text-sm font-medium truncate",children:le.title}),le.description&&(0,pa.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:le.description})]}),le.url&&(0,pa.jsx)(T,{variant:"ghost",size:"sm",onClick:()=>window.open(le.url,"_blank"),className:"h-8 w-8 p-0",children:(0,pa.jsx)(to.ExternalLink,{className:"h-4 w-4"})})]},tt))})})})},Y):ne==="menu"?(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsxs)(me,{className:"w-full",children:[(0,pa.jsx)(Se,{children:(0,pa.jsx)(Te,{className:"text-lg",children:N.data?.title})}),(0,pa.jsx)(xe,{children:(0,pa.jsx)("div",{className:"space-pa-2",children:N.data?.items?.map((le,tt)=>(0,pa.jsx)(T,{variant:"outline",className:"w-full justify-start",onClick:le.action,children:(0,pa.jsxs)("div",{className:"text-left",children:[(0,pa.jsx)("p",{className:"font-medium",children:le.label}),le.description&&(0,pa.jsx)("p",{className:"text-xs text-muted-foreground",children:le.description})]})},tt))})})]})},Y):(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsxs)(me,{className:"w-full max-w-md",children:[(0,pa.jsx)(Se,{children:(0,pa.jsx)(Te,{className:"text-lg",children:ne})}),(0,pa.jsx)(xe,{children:(0,pa.jsx)("pre",{className:"text-sm",children:JSON.stringify(N.data,null,2)})})]})},Y)}return null})]})]})};return(0,pa.jsxs)(me,{className:`h-full flex flex-col shadow-sm ${z||""}`,children:[(0,pa.jsxs)(ve,{ref:x,className:"flex-1 p-4",onDragOver:re,onDragLeave:L,onDrop:Ne,children:[(0,pa.jsxs)("div",{className:s("space-pa-4",c&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,pa.jsx)(It.AnimatePresence,{children:e.map(m=>(0,pa.jsx)(It.motion.div,{initial:{opacity:0,pa:10},animate:{opacity:1,pa:0},className:s("flex gap-3",m.role==="user"?"flex-row-reverse":"flex-row"),children:I(m)},m.id))}),B&&(0,pa.jsxs)(It.motion.div,{initial:{opacity:0,pa:10},animate:{opacity:1,pa:0},exit:{opacity:0,pa:-10},className:"flex gap-3",children:[(0,pa.jsx)(Fe,{className:"h-8 w-8",children:(0,pa.jsx)(je,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,pa.jsx)(to.Bot,{className:"h-4 w-4"})})}),(0,pa.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,pa.jsx)(Wa,{capabilities:l,isOpen:B,onToggle:()=>C(!B),onActionSelect:G,className:"w-full"})})]}),a&&(0,pa.jsxs)(It.motion.div,{initial:{opacity:0,pa:10},animate:{opacity:1,pa:0},className:"flex gap-3",children:[(0,pa.jsx)(Fe,{className:"h-8 w-8",children:(0,pa.jsx)(je,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,pa.jsx)(to.Bot,{className:"h-4 w-4"})})}),(0,pa.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,pa.jsxs)("div",{className:"flex space-x-1",children:[(0,pa.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,pa.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,pa.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,pa.jsx)("div",{ref:D})]}),n.length>0&&(0,pa.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,pa.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(m=>(0,pa.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[U(m.file.type),(0,pa.jsx)("span",{className:"text-sm font-medium",children:m.file.name}),(0,pa.jsx)("span",{className:"text-xs text-muted-foreground",children:d(m.file.size)}),(0,pa.jsx)(T,{variant:"ghost",size:"sm",onClick:()=>k(m.id),className:"h-6 w-6 p-0",children:(0,pa.jsx)(to.pa,{className:"h-4 w-4"})})]},m.id))})}),(0,pa.jsxs)("div",{className:"border-t p-4 bg-muted/20",children:[(0,pa.jsxs)("div",{className:"flex gap-3",children:[(0,pa.jsx)(it,{value:t,onChange:m=>u(m.target.value),onKeyPress:A,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),r&&(0,pa.jsx)(T,{variant:"outline",size:"icon",onClick:()=>S.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,pa.jsx)(to.Paperclip,{className:"h-4 w-4"})}),(0,pa.jsx)(T,{onClick:p,disabled:!t.trim()&&n.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,pa.jsx)(to.Send,{className:"h-4 w-4"})})]}),(0,pa.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,pa.jsxs)(T,{onClick:()=>C(!B),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,pa.jsx)(to.Menu,{className:"h-3 w-3 mr-1"}),B?"Hide":"Show"," Capabilities"]}),(0,pa.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[K().map((m,M)=>(0,pa.jsx)(T,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>G(m.id,E),children:m.label},`context-${m.id}`)),K().length===0&&te().map((m,M)=>(0,pa.jsx)(T,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:m.action,children:m.label},`suggestion-${M}`))]})]}),r&&(0,pa.jsx)("input",{ref:S,type:"file",multiple:!0,onChange:Q,className:"hidden"})]})]})}function Ze({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:l=[],capabilities:n=[],sidebarItems:c=[],notifications:r=[],sessions:u=[],onNewChat:p,onSessionSelect:A,onSessionDelete:v,onSessionEdit:k=()=>console.log("Session edit not implemented"),onBusinessUnitChange:P=()=>{},onNotificationRemove:z=()=>{},onRemoveAll:D=()=>{},onActionClick:x=()=>{},onSearch:S=U=>console.log("Search query:",U),initialTeam:B="design",currentSession:C=null,showCapabilities:E=!0,title:ie="Digital Colleagues",enableFileUpload:K=!0,maxFileSize:te=10,allowedFileTypes:G=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:_="/headerlogo.png",appName:Q="Nuvia",tagline:re="AI-Powered Workspace",actionIcon:L=(0,pa.jsx)(to.Users,{className:"mr-2 h-4 w-4"}),actionText:Ne="Collaborate",sidebarInitiallyClosed:d=!1}){let U=(0,ao.useChat)(e||{}),I=a?t||U:null,[m,M]=(0,Ye.useState)(""),[O,se]=(0,Ye.useState)(!1),V=I?.messages||o,Y=m,N=I?.status==="submitted"||O,ne=l||[],le={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[tt,oo]=(0,Ye.useState)(()=>ne.length===0?le:ne.find(q=>q.id===B)||ne[0]),[Mt,mt]=(0,Ye.useState)([]),[io,ro]=(0,Ye.useState)(!1),no=q=>{if(!q||!K)return;let pt=[];Array.from(q).forEach(ge=>{if(ge.size>te*1024*1024){alert(`File ${ge.name} is too large. Maximum size is ${te}MB.`);return}if(G.length>0&&!G.some(ut=>ge.type.match(ut))){alert(`File type ${ge.type} is not allowed.`);return}let ea={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ge,status:"pending",progress:0};if(ge.type.startsWith("image/")){let ut=new FileReader;ut.onload=mo=>{mt(po=>po.map(Bt=>Bt.id===ea.id?{...Bt,preview:mo.target?.result}:Bt))},ut.readAsDataURL(ge)}pt.push(ea)}),mt(ge=>[...ge,...pt])},so=q=>{mt(pt=>pt.filter(ge=>ge.id!==q))},Zt=()=>{if(!(!Y.trim()&&Mt.length===0)){if(I){let q={id:Date.now().toString(),role:"user",parts:[{type:"text",text:Y}]};I.sendMessage(q),M("")}else console.log("Message to send:",Y),console.log("Files to upload:",Mt),M(""),se(!0),setTimeout(()=>{se(!1)},1500);mt([])}},lo=q=>{q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),Zt())},co=q=>{M(q)};return(0,pa.jsx)(Oa,{sidebarItems:c||[],title:ie,notifications:r||[],businessUnits:ne,currentBusinessUnit:tt,onBusinessUnitChange:q=>{q&&(oo(q),P?.(q))},onSearch:S,showTabs:!1,onActionClick:x,actionIcon:L,actionText:Ne,onNotificationRemove:z,onRemoveAll:D,logo:_,appName:Q,tagline:re,sidebarInitiallyClosed:d,children:(0,pa.jsx)(It.AnimatePresence,{mode:"wait",children:(0,pa.jsx)(It.motion.div,{className:"flex-1 h-full",initial:{opacity:0,pa:10},animate:{opacity:1,pa:0},exit:{opacity:0,pa:-10},transition:{duration:.2},children:(0,pa.jsxs)("div",{className:"h-full flex",children:[(0,pa.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,pa.jsx)(Va,{sessions:u||[],currentSession:C,teams:ne,onNewChat:p,onSessionSelect:A,onSessionEdit:k,onSessionDelete:v})}),(0,pa.jsx)("div",{className:"flex-1 h-full p-2",children:(0,pa.jsx)(Za,{messages:V||[],input:Y,isTyping:N,currentSessionTitle:C?.title,capabilities:n||[],onInputChange:co,onSendMessage:Zt,onKeyPress:lo,fileUploads:Mt,isDragOver:io,enableFileUpload:K,onFileUpload:no,onRemoveFile:so,onDragOver:ro})})]})},"chat-interface")})})}var dt=[{id:"1",title:"AI Assistant Chat",lastMessage:"How can I help you today?"}];function bi(){return(0,pa.jsx)(Ze,{businessUnits:Be,capabilities:Je,sidebarItems:Ke,notifications:_e,sessions:dt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"AI-Powered Copilot"})}function vi(){return(0,pa.jsx)(Ze,{aiConfig:{onError:e=>console.error("Chat error:",e)},businessUnits:Be,capabilities:Je,sidebarItems:Ke,notifications:_e,sessions:dt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Custom AI Copilot"})}function hi(){return(0,pa.jsx)(Ze,{enableAI:!1,messages:[{id:"1",role:"assistant",parts:[{type:"text",text:"This is demo mode - no AI involved!"}]}],businessUnits:Be,capabilities:Je,sidebarItems:Ke,notifications:_e,sessions:dt,onNewChat:()=>console.log("New chat started"),onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Demo Copilot"})}function yi(){let e=(0,ao.useChat)({onError:t=>console.error("Custom chat error:",t)});return(0,pa.jsx)(Ze,{useCustomChat:e,businessUnits:Be,capabilities:Je,sidebarItems:Ke,notifications:_e,sessions:dt,onNewChat:()=>{e.setMessages([]),console.log("New chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Advanced AI Copilot"})}function xi(){return(0,pa.jsx)(Ze,{sidebarInitiallyClosed:!0,businessUnits:Be,capabilities:Je,sidebarItems:Ke,notifications:_e,sessions:dt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Focused AI Chat"})}0&&(module.exports={AdvancedAICopilot,CustomAICopilot,DemoCopilot,FocusedChatCopilot,SimpleAICopilot});
5
+ "use strict";"use client";var go=Object.create;var ft=Object.defineProperty;var fo=Object.getOwnPropertyDescriptor;var bo=Object.getOwnPropertyNames;var vo=Object.getPrototypeOf,ho=Object.prototype.hasOwnProperty;var yo=(e,t)=>{for(var a in t)ft(e,a,{get:t[a],enumerable:!0})},aa=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of bo(t))!ho.call(e,l)&&l!==a&&ft(e,l,{get:()=>t[l],enumerable:!(o=fo(t,l))||o.enumerable});return e};var J=(e,t,a)=>(a=e!=null?go(vo(e)):{},aa(t||!e||!e.__esModule?ft(a,"default",{value:e,enumerable:!0}):a,e)),xo=e=>aa(ft({},"__esModule",{value:!0}),e);var Ni={};yo(Ni,{AdvancedAICopilot:()=>xi,CustomAICopilot:()=>hi,DemoCopilot:()=>yi,FileUploadAICopilot:()=>Ci,FocusedChatCopilot:()=>wi,SimpleAICopilot:()=>vi});module.exports=xo(Ni);var Zt=require("@ai-sdk/react");var tt=require("react"),Mt=require("framer-motion"),ao=require("lucide-react");var pa=require("clsx");var Et="-",wo=e=>{let t=No(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let r=c.split(Et);return r[0]===""&&r.length!==1&&r.shift(),ra(r,t)||Co(c)},getConflictingClassGroupIds:(c,r)=>{let u=a[c]||[];return r&&o[c]?[...u,...o[c]]:u}}},ra=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),l=o?ra(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let s=e.join(Et);return t.validators.find(({validator:c})=>c(s))?.classGroupId},oa=/^\[(.+)\]$/,Co=e=>{if(oa.test(e)){let t=oa.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},No=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Do(Object.entries(e.classGroups),a).forEach(([s,c])=>{Ut(c,o,s,t)}),o},Ut=(e,t,a,o)=>{e.forEach(l=>{if(typeof l=="string"){let s=l===""?t:ia(t,l);s.classGroupId=a;return}if(typeof l=="function"){if(ko(l)){Ut(l(o),t,a,o);return}t.validators.push({validator:l,classGroupId:a});return}Object.entries(l).forEach(([s,c])=>{Ut(c,ia(t,s),a,o)})})},ia=(e,t)=>{let a=e;return t.split(Et).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},ko=e=>e.isThemeGetter,Do=(e,t)=>t?e.map(([a,o])=>{let l=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([c,r])=>[t+c,r])):s);return[a,l]}):e,Po=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,l=(s,c)=>{a.set(s,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let c=a.get(s);if(c!==void 0)return c;if((c=o.get(s))!==void 0)return l(s,c),c},set(s,c){a.has(s)?a.set(s,c):l(s,c)}}},sa="!",So=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,l=t[0],s=t.length,c=r=>{let u=[],m=0,A=0,v;for(let x=0;x<r.length;x++){let S=r[x];if(m===0){if(S===l&&(o||r.slice(x,x+s)===t)){u.push(r.slice(A,x)),A=x+s;continue}if(S==="/"){v=x;continue}}S==="["?m++:S==="]"&&m--}let k=u.length===0?r:r.substring(A),P=k.startsWith(sa),z=P?k.substring(1):k,D=v&&v>A?v-A:void 0;return{modifiers:u,hasImportantModifier:P,baseClassName:z,maybePostfixModifierPosition:D}};return a?r=>a({className:r,parseClassName:c}):c},To=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},Ro=e=>({cache:Po(e.cacheSize),parseClassName:So(e),...wo(e)}),Ao=/\s+/,Io=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:l}=t,s=[],c=e.trim().split(Ao),r="";for(let u=c.length-1;u>=0;u-=1){let m=c[u],{modifiers:A,hasImportantModifier:v,baseClassName:k,maybePostfixModifierPosition:P}=a(m),z=!!P,D=o(z?k.substring(0,P):k);if(!D){if(!z){r=m+(r.length>0?" "+r:r);continue}if(D=o(k),!D){r=m+(r.length>0?" "+r:r);continue}z=!1}let x=To(A).join(":"),S=v?x+sa:x,B=S+D;if(s.includes(B))continue;s.push(B);let C=l(D,z);for(let E=0;E<C.length;++E){let ie=C[E];s.push(S+ie)}r=m+(r.length>0?" "+r:r)}return r};function Mo(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=na(t))&&(o&&(o+=" "),o+=a);return o}var na=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=na(e[o]))&&(a&&(a+=" "),a+=t);return a};function Bo(e,...t){let a,o,l,s=c;function c(u){let m=t.reduce((A,v)=>v(A),e());return a=Ro(m),o=a.cache.get,l=a.cache.set,s=r,r(u)}function r(u){let m=o(u);if(m)return m;let A=Io(u,a);return l(u,A),A}return function(){return s(Mo.apply(null,arguments))}}var F=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},la=/^\[(?:([a-z-]+):)?(.+)\]$/ua,Lo=/^\d+\/\d+$/,Uo=new Set(["px","full","screen"]),Eo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|Mt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|ua|ua|min|max))|\ua(calc|min|max|clamp)\(.+\)|^0$/,Fo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,jo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ho=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,De=e=>Xe(e)||Uo.has(e)||Lo.test(e),Me=e=>Qe(e,"length",qo),Xe=e=>!!e&&!Number.isNaN(Number(e)),Lt=e=>Qe(e,"number",Xe),rt=e=>!!e&&Number.isInteger(Number(e)),Oo=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),h=e=>la.test(e),Be=e=>Eo.test(e),Vo=new Set(["length","size","percentage"]),Go=e=>Qe(e,Vo,ca),Wo=e=>Qe(e,"position",ca),$o=new Set(["image","url"]),Ko=e=>Qe(e,$o,Xo),_o=e=>Qe(e,"",Jo),st=()=>!0,Qe=(e,t,a)=>{let o=la.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},qo=e=>zo.test(e)&&!Fo.test(e),ca=()=>!1,Jo=e=>jo.test(e),Xo=e=>Ho.test(e);var Qo=()=>{let e=F("colors"),t=F("spacing"),a=F("blur"),o=F("brightness"),l=F("borderColor"),s=F("borderRadius"),c=F("borderSpacing"),r=F("borderWidth"),u=F("contrast"),m=F("grayscale"),A=F("hueRotate"),v=F("invert"),k=F("gap"),P=F("gradientColorStops"),z=F("gradientColorStopPositions"),D=F("inset"),x=F("margin"),S=F("opacity"),B=F("padding"),C=F("saturate"),E=F("scale"),ie=F("sepia"),_=F("skew"),te=F("space"),W=F("translate"),q=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",h,t],L=()=>[h,t],Ne=()=>["",De,Me],d=()=>["auto",Xe,h],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],p=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",h],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Xe,h];return{cacheSize:500,separator:":",theme:{colors:[st],spacing:[De,Me],blur:["none","",Be,h],brightness:V(),borderColor:[e],borderRadius:["none","","full",Be,h],borderSpacing:L(),borderWidth:Ne(),contrast:V(),grayscale:O(),hueRotate:V(),invert:O(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Oo,Me],inset:re(),margin:re(),opacity:V(),padding:L(),saturate:V(),scale:V(),sepia:O(),skew:V(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[Be]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"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:[...U(),h]}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-ua":[{"overflow-ua":Q()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-ua":[{"overscroll-ua":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[D]}],"inset-x":[{"inset-x":[D]}],"inset-ua":[{"inset-ua":[D]}],start:[{start:[D]}],end:[{end:[D]}],top:[{top:[D]}],right:[{right:[D]}],bottom:[{bottom:[D]}],left:[{left:[D]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",rt,h]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",rt,h]}],"grid-cols":[{"grid-cols":[st]}],"col-start-end":[{col:["auto",{span:["full",rt,h]},h]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[st]}],"row-start-end":[{row:["auto",{span:[rt,h]},h]}],"row-start":[{"row-start":d()}],"row-end":[{"row-end":d()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",h]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",h]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-ua":[{"gap-ua":[k]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],ua:[{ua:[B]}],Mt:[{Mt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[te]}],"space-x-reverse":["space-x-reverse"],"space-ua":[{"space-ua":[te]}],"space-ua-reverse":["space-ua-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,t]}],"min-w":[{"min-w":[h,t,"min","max","fit"]}],"max-w":[{"max-w":[h,t,"none","full","min","max","fit","prose",{screen:[Be]},Be]}],h:[{h:[h,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[h,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[h,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Be,Me]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Lt]}],"font-family":[{font:[st]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",Xe,Lt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",De,h]}],"list-image":[{"list-image":["none",h]}],"list-style-type":[{list:["none","disc","decimal",h]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",De,Me]}],"underline-offset":[{"underline-offset":["auto",De,h]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),Wo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","ua","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Go]}],"bg-image":[{bg:["none",{"gradient-Zt":["t","tr","r","br","ua","bl","l","tl"]},Ko]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[z]}],"gradient-via-pos":[{via:[z]}],"gradient-Zt-pos":[{Zt:[z]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-Zt":[{Zt:[P]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-ua":[{"rounded-ua":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ua":[{"rounded-ua":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-ua":[{"border-ua":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-ua":[{"border-ua":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-ua":[{"divide-ua":[r]}],"divide-ua-reverse":["divide-ua-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:I()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-ua":[{"border-ua":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-ua":[{"border-ua":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[De,h]}],"outline-w":[{outline:[De,Me]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[De,Me]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Be,_o]}],"shadow-color":[{shadow:[st]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...p(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":p()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Be,h]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[A]}],invert:[{invert:[v]}],saturate:[{saturate:[C]}],sepia:[{sepia:[ie]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[A]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-ua":[{"border-spacing-ua":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-ua":[{"scale-ua":[E]}],rotate:[{rotate:[rt,h]}],"translate-x":[{"translate-x":[W]}],"translate-ua":[{"translate-ua":[W]}],"skew-x":[{"skew-x":[_]}],"skew-ua":[{"skew-ua":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","ua","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-ua":[{"scroll-ua":L()}],"scroll-Mt":[{"scroll-Mt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","ua","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-ua":[{"touch-pan":["ua","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[De,Me,Lt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-ua"],overscroll:["overscroll-x","overscroll-ua"],inset:["inset-x","inset-ua","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-ua":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-ua"],p:["px","py","ps","ua","Mt","pr","pb","pl"],px:["pr","pl"],py:["Mt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-ua","rounded-l","rounded-ss","rounded-se","rounded-ua","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ua"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-ua":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-ua"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-ua","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-ua":["border-w-t","border-w-ua"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-ua","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-ua":["border-color-t","border-color-ua"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-ua","scroll-Mt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-Mt","scroll-pb"],touch:["touch-x","touch-ua","touch-pz"],"touch-x":["touch"],"touch-ua":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var da=Bo(Qo);function n(...e){return da((0,pa.clsx)(e))}var Nt=J(require("react")),Gt=J(require("next/link"));var ma=require("class-variance-authority");var ua=require("react/jsx-runtime"),Yo=(0,ma.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 de({className:e,variant:t,...a}){return(0,ua.jsx)("div",{className:n(Yo({variant:t}),e),...a})}var ga=require("@radix-ui/react-slot"),ba=J(require("react")),Zo=(0,ma.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"}}}),T=ba.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...l},s)=>(0,ua.jsx)(e?ga.Slot:"button",{className:n(Zo({className:t,size:a,variant:o})),ref:s,...l}));T.displayName="Button";var ha=J(require("react"));var nt=ha.forwardRef(({className:e,type:t,...a},o)=>(0,ua.jsx)("input",{type:t,className:n("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}));nt.displayName="Input";var zt=J(require("react")),ue=J(require("@radix-ui/react-scroll-area"));var ve=zt.forwardRef(({className:e,children:t,...a},o)=>(0,ua.jsxs)(ue.Root,{ref:o,className:n("relative overflow-hidden",e),...a,children:[(0,ua.jsx)(ue.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ua.jsx)(xa,{}),(0,ua.jsx)(ue.Corner,{})]}));ve.displayName=ue.Root.displayName;var xa=zt.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,ua.jsx)(ue.ScrollAreaScrollbar,{ref:o,orientation:t,className:n("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,ua.jsx)(ue.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));xa.displayName=ue.ScrollAreaScrollbar.displayName;var lt=J(require("react")),$=J(require("@radix-ui/react-dialog"));var Ca=$.Root;var ei=$.Portal;var Na=lt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)($.Overlay,{ref:a,className:n("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}));Na.displayName=$.Overlay.displayName;var Ft=lt.forwardRef(({className:e,children:t,...a},o)=>(0,ua.jsxs)(ei,{children:[(0,ua.jsx)(Na,{}),(0,ua.jsxs)($.Content,{ref:o,className:n("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-ua-[-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-Zt-left-1/2 data-[state=closed]:slide-out-Zt-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,ua.jsxs)($.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,ua.jsx)(ao.ua,{className:"h-4 w-4"}),(0,ua.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ft.displayName=$.Content.displayName;var jt=({className:e,...t})=>(0,ua.jsx)("div",{className:n("flex flex-col space-ua-1.5 text-center sm:text-left",e),...t});jt.displayName="DialogHeader";var ti=({className:e,...t})=>(0,ua.jsx)("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ti.displayName="DialogFooter";var Ht=lt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)($.Title,{ref:a,className:n("text-lg font-semibold leading-none tracking-tight",e),...t}));Ht.displayName=$.Title.displayName;var ai=lt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)($.Description,{ref:a,className:n("text-sm text-muted-foreground",e),...t}));ai.displayName=$.Description.displayName;var ct=J(require("@radix-ui/react-checkbox")),Da=J(require("react")),Ot=Da.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(ct.Root,{className:n("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,ua.jsx)(ct.Indicator,{className:n("flex items-center justify-center text-current"),children:(0,ua.jsx)(ao.Check,{className:"h-4 w-4"})})}));Ot.displayName=ct.Root.displayName;var he=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),je=[{id:"home",title:"Home",icon:(0,ua.jsx)(ao.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,ua.jsx)(ao.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,ua.jsx)(ao.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,ua.jsx)(ao.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,ua.jsx)(ao.FileText,{}),url:"/knowledge"}],He=[{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 Zt 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")}],Pe=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,ua.jsx)(ao.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,ua.jsx)(ao.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,ua.jsx)(ao.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,ua.jsx)(ao.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,ua.jsx)(ao.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,ua.jsx)(ao.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,ua.jsx)(ao.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,ua.jsx)(ao.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,ua.jsx)(ao.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,ua.jsx)(ao.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],yt=[{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 Vt=[{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 Zt 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}],wt=[{id:"1",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],oi=[...wt,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],ii=[...yt,{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}],ht={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:[]},Pa={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:wt.filter(e=>e.epicId==="1")};var $ua={empty:{initialProjects:ht.projects,initialEpics:ht.epics,initialSprints:ht.sprints,initialTasks:ht.tasks},default:{initialProjects:yt,initialEpics:Vt,initialSprints:vt,initialTasks:wt},highDensity:{initialProjects:yt,initialEpics:Vt,initialSprints:vt,initialTasks:oi},singleEpic:{initialProjects:yt,initialEpics:Pa.epics,initialSprints:vt,initialTasks:Pa.tasks},multipleProjects:{initialProjects:ii,initialEpics:Vt,initialSprints:vt,initialTasks:wt}},xt=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(he),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(he),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(he),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(he),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated Zt 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","ao","Statistics"].map(he),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(he),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(he),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(he),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond Zt customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases Zt human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(he),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(he),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Ki=[{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:xt.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:xt.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 Zt production",description:"Deploy the latest version Zt production environment",dueDate:new Date,dueTime:"16:00",colleague:xt.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 _i=xt.filter(e=>e.type==="digital");function Sa(e,t){let[a,o]=(0,tt.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),l=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,tt.useEffect)(()=>{l(a)},[]),[a,l]}function Wt({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:l=Pe[0],onBusinessUnitChange:s,onSearch:c,className:r,logo:u="/headerlogo.png",appName:m="Nuvia",tagline:A="Collaboration Platform"}){let[v,k]=Nt.useState({}),[P,z]=Sa("sidebar-favorites",{}),[D,x]=Nt.useState(null),[S,B]=Nt.useState(""),C=d=>{k(U=>({...U,[d]:!U[d]}))},E=d=>{s?.(d)},ie=()=>{S.trim()&&c?.(S.trim())},_=d=>{d.key==="Enter"&&(d.preventDefault(),ie())},te=(d,U)=>{let I=P[d]||[],p=I.includes(U)?I.filter(M=>M!==U):I.concat(U);z({...P,[d]:p})},W=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let U=P[d.id]||[],I=d.items.filter(M=>U.includes(M.id)),p=d.items.filter(M=>!U.includes(M.id));return[...I,...p].slice(0,d.maxItems)},q=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,Q=e,re=d=>{let U=q(d),I=W(d),p=(0,ua.jsxs)(ua.Fragment,{children:[(0,ua.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,ua.jsx)("span",{children:d.title})]}),d.badge&&(0,ua.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,ua.jsx)(ao.ChevronDown,{className:n("ml-2 h-4 w-4 transition-transform",v[d.title]?"rotate-180":"")})]}),M=n("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",d.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return d.url?(0,ua.jsx)(Gt.default,{href:d.url,className:M,onClick:a?o:void 0,children:p}):(0,ua.jsx)("button",{className:M,onClick:()=>d.items&&C(d.title),children:p})},L=()=>{let d=e.find(I=>I.id===D);if(!d||!d.items||!d.maxItems)return null;let U=P[d.id]||[];return(0,ua.jsx)(Ca,{open:!!D,onOpenChange:I=>!I&&x(null),children:(0,ua.jsxs)(Ft,{className:"sm:max-w-md",children:[(0,ua.jsxs)(jt,{children:[(0,ua.jsxs)(Ht,{children:["Manage ",d.title," Favorites"]}),(0,ua.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up Zt ",d.maxItems," items Zt show in ",d.title.toLowerCase(),"."]})]}),(0,ua.jsx)(ve,{className:"max-h-96 pr-4",children:(0,ua.jsx)("div",{className:"space-ua-4",children:d.items.map(I=>(0,ua.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ua.jsx)(Ot,{id:I.id,checked:U.includes(I.id),onCheckedChange:()=>te(d.id,I.id),disabled:!U.includes(I.id)&&U.length>=(d.maxItems||0)}),(0,ua.jsxs)("label",{htmlFor:I.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:[I.title,I.badge&&(0,ua.jsx)(de,{variant:"outline",className:"text-xs",children:I.badge})]})]},I.id))})})]})})},Ne=(0,ua.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,ua.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ua.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,ua.jsx)("img",{src:u,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,ua.jsxs)("div",{children:[(0,ua.jsx)("h2",{className:"font-semibold",children:m}),(0,ua.jsx)("p",{className:"text-xs text-muted-foreground",children:A})]})]}),a&&(0,ua.jsx)(T,{variant:"ghost",size:"icon",onClick:o,children:(0,ua.jsx)(ao.ua,{className:"h-5 w-5"})})]}),(0,ua.jsx)("div",{className:"px-3 py-2",children:(0,ua.jsxs)("div",{className:"relative",children:[(0,ua.jsx)(ao.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ua.jsx)(nt,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:S,onChange:d=>B(d.target.value),onKeyPress:_})]})}),(0,ua.jsx)(ve,{className:"flex-1 px-3 py-2",children:(0,ua.jsx)("div",{className:"space-ua-1",children:Q.map(d=>(0,ua.jsxs)("div",{className:"mb-1",children:[re(d),d.items&&v[d.title]&&(0,ua.jsxs)("div",{className:"mt-1 ml-6 space-ua-1 border-l pl-3",children:[W(d).map(U=>(0,ua.jsxs)(Gt.default,{href:U.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[U.title,U.badge&&(0,ua.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:U.badge})]},U.id)),q(d)&&d.items&&d.items.length>W(d).length&&(0,ua.jsxs)("button",{onClick:()=>x(d.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",d.items.length-W(d).length," more available"]})]})]},d.id))})}),(0,ua.jsx)("div",{className:"p-3",children:(0,ua.jsx)("div",{className:"space-ua-1",children:(0,ua.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,ua.jsx)(ao.Settings,{className:"h-5 w-5"}),(0,ua.jsx)("span",{children:"Settings"})]})})}),(0,ua.jsx)(L,{})]});return a?(0,ua.jsx)("div",{className:n("fixed inset-ua-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Ne}):(0,ua.jsx)("div",{className:n("fixed inset-ua-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Ne})}var kt=J(require("react")),Se=J(require("@radix-ui/react-avatar"));var Oe=kt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(Se.Root,{ref:a,className:n("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Oe.displayName=Se.Root.displayName;var $t=kt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(Se.Image,{ref:a,className:n("aspect-square h-full w-full",e),...t}));$t.displayName=Se.Image.displayName;var Ve=kt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(Se.Fallback,{ref:a,className:n("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ve.displayName=Se.Fallback.displayName;var Ta=J(require("react")),fe=J(require("@radix-ui/react-tooltip"));var Pt=fe.Provider,St=fe.Root,Tt=fe.Trigger,dt=Ta.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ua.jsx)(fe.Portal,{children:(0,ua.jsx)(fe.Content,{ref:o,sideOffset:t,className:n("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})}));dt.displayName=fe.Content.displayName;var Ra=require("next-themes");function Aa(){let{setTheme:e,theme:t}=(0,Ra.useTheme)();return(0,ua.jsx)(Pt,{children:(0,ua.jsxs)(St,{children:[(0,ua.jsx)(Tt,{asChild:!0,children:(0,ua.jsxs)(T,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,ua.jsx)(ao.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,ua.jsx)(ao.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,ua.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,ua.jsx)(dt,{children:"Toggle theme"})]})})}function Ia({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:l,className:s}){let c=e.filter(m=>!m.read),r=c.length,u=m=>{switch(m){case"info":return(0,ua.jsx)(ao.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,ua.jsx)(ao.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,ua.jsx)(ao.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,ua.jsx)(ao.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,ua.jsx)(Mt.AnimatePresence,{children:t&&(0,ua.jsxs)(ua.Fragment,{children:[(0,ua.jsx)(Mt.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,ua.jsx)(Mt.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:n("fixed inset-ua-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",s),children:(0,ua.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between border-ua p-4",children:[(0,ua.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ua.jsx)(ao.Bell,{className:"h-5 w-5"}),(0,ua.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,ua.jsxs)(de,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,ua.jsxs)(T,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,ua.jsx)(ao.ua,{className:"h-5 w-5"}),(0,ua.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,ua.jsxs)("div",{className:"flex items-center justify-between border-ua p-2",children:[(0,ua.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,ua.jsx)(T,{variant:"ghost",size:"sm",onClick:l,className:"text-sm",children:"Dismiss all"})]}),c.length>0?(0,ua.jsx)(ve,{className:"flex-1",children:(0,ua.jsx)("div",{className:"divide-ua",children:c.map(m=>(0,ua.jsxs)("div",{className:n("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,ua.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:u(m.type)}),(0,ua.jsxs)("div",{className:"flex-1 space-ua-1",children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ua.jsx)("p",{className:"font-medium",children:m.title}),(0,ua.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ua.jsx)("p",{className:"text-xs text-muted-foreground",children:m.time}),(0,ua.jsx)(T,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(m.id),title:"Dismiss",children:(0,ua.jsx)(ao.Check,{className:"h-3 w-3"})})]})]}),(0,ua.jsx)("p",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,ua.jsxs)(T,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,ua.jsx)(ao.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},m.id))})}):(0,ua.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,ua.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,ua.jsx)(ao.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,ua.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,ua.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Ge=J(require("@radix-ui/react-tabs"));function Ma({className:e,...t}){return(0,ua.jsx)(Ge.Root,{"data-slot":"tabs",className:n("flex flex-col gap-2",e),...t})}function Ba({className:e,...t}){return(0,ua.jsx)(Ge.List,{"data-slot":"tabs-list",className:n("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function La({className:e,...t}){return(0,ua.jsx)(Ge.Trigger,{"data-slot":"tabs-trigger",className:n("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 Te=J(require("react")),w=J(require("@radix-ui/react-dropdown-menu")),Ye=require("@radix-ui/react-icons");var Ua=w.Root,Ea=w.Trigger;var ri=Te.forwardRef(({className:e,inset:t,children:a,...o},l)=>(0,ua.jsxs)(w.SubTrigger,{ref:l,className:n("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,ua.jsx)(Ye.ChevronRightIcon,{className:"ml-auto"})]}));ri.displayName=w.SubTrigger.displayName;var si=Te.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(w.SubContent,{ref:a,className:n("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}));si.displayName=w.SubContent.displayName;var _t=Te.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ua.jsx)(w.Portal,{children:(0,ua.jsx)(w.Content,{ref:o,sideOffset:t,className:n("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})}));_t.displayName=w.Content.displayName;var qt=Te.forwardRef(({className:e,inset:t,...a},o)=>(0,ua.jsx)(w.Item,{ref:o,className:n("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}));qt.displayName=w.Item.displayName;var ni=Te.forwardRef(({className:e,children:t,checked:a,...o},l)=>(0,ua.jsxs)(w.CheckboxItem,{ref:l,className:n("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,ua.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ua.jsx)(w.ItemIndicator,{children:(0,ua.jsx)(Ye.CheckIcon,{className:"h-4 w-4"})})}),t]}));ni.displayName=w.CheckboxItem.displayName;var li=Te.forwardRef(({className:e,children:t,...a},o)=>(0,ua.jsxs)(w.RadioItem,{ref:o,className:n("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,ua.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ua.jsx)(w.ItemIndicator,{children:(0,ua.jsx)(Ye.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));li.displayName=w.RadioItem.displayName;var ci=Te.forwardRef(({className:e,inset:t,...a},o)=>(0,ua.jsx)(w.Label,{ref:o,className:n("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));ci.displayName=w.Label.displayName;var di=Te.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(w.Separator,{ref:a,className:n("-mx-1 my-1 h-px bg-muted",e),...t}));di.displayName=w.Separator.displayName;var pi=({className:e,...t})=>(0,ua.jsx)("span",{className:n("ml-auto text-xs tracking-widest opacity-60",e),...t});pi.displayName="DropdownMenuShortcut";function Fa({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:l="700px",gridCols:s=6}){let c=a.find(r=>r.value===e);return(0,ua.jsxs)(Mt.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,ua:-20},animate:{opacity:1,ua:0},transition:{duration:.3,ease:"easeOut"},children:[(0,ua.jsx)("div",{className:"hidden md:block",children:(0,ua.jsx)(Ma,{value:e,onValueChange:t,children:(0,ua.jsx)(Ba,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:l,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,ua.jsx)(Mt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,ua.jsx)(La,{value:r.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:r.label})},r.value))})})}),(0,ua.jsx)("div",{className:"md:hidden",children:(0,ua.jsxs)(Ua,{children:[(0,ua.jsx)(Ea,{asChild:!0,children:(0,ua.jsxs)(T,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,ua.jsx)(ao.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,ua.jsx)(_t,{align:"center",className:"w-[180px]",children:a.map(r=>(0,ua.jsx)(qt,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function ja({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:l=!0,className:s,activeTab:c="assistant",onTabChange:r,showTabs:u=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:A,actionIcon:v=(0,ua.jsx)(ao.Bot,{className:"mr-2 h-4 w-4"}),actionText:k="Action",onNotificationRemove:P,onRemoveAll:z,logo:D="/headerlogo.png",appName:x="Nuvia",tagline:S="Collaboration Platform"}){let[B,C]=(0,tt.useState)(!1),[E,ie]=(0,tt.useState)(t),_=E.filter(q=>!q.read).length,te=q=>{ie(Q=>Q.filter(re=>re.id!==q)),P?.(q)},W=()=>{ie(q=>q.filter(Q=>Q.read)),z?.()};return(0,ua.jsxs)(ua.Fragment,{children:[(0,ua.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${s||""}`,children:[(0,ua.jsx)(T,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,ua.jsx)(ao.Menu,{className:"h-5 w-5"})}),(0,ua.jsx)(T,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,ua.jsx)(ao.PanelLeft,{className:"h-5 w-5"})}),!l&&(0,ua.jsxs)(Mt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,ua.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,ua.jsx)("img",{src:D,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,ua.jsxs)("div",{children:[(0,ua.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,ua.jsx)("p",{className:"text-xs text-muted-foreground",children:S})]})]}),(0,ua.jsxs)("div",{className:"flex flex-1 items-center",children:[u&&(0,ua.jsx)(Fa,{activeTab:c,onTabChange:r,tabOptions:m}),(0,ua.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,ua.jsx)(Mt.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,ua.jsx)(Mt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ua.jsxs)(T,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:A,children:[v,k]})})}),(0,ua.jsx)(Aa,{}),(0,ua.jsx)(Pt,{children:(0,ua.jsxs)(St,{children:[(0,ua.jsx)(Tt,{asChild:!0,children:(0,ua.jsx)(Mt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ua.jsxs)(T,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,ua.jsx)(Mt.motion.div,{animate:_>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:_>0?1/0:0,repeatDelay:3},children:(0,ua.jsx)(ao.Bell,{className:"h-5 w-5"})}),_>0&&(0,ua.jsx)(Mt.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,ua.jsx)(dt,{children:"Notifications"})]})}),(0,ua.jsx)(Mt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ua.jsxs)(Oe,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,ua.jsx)($t,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,ua.jsx)(Ve,{})]})})]})]})]}),(0,ua.jsx)(Ia,{notifications:E,open:B,onClose:()=>C(!1),onNotificationRemove:te,onRemoveAll:W})]})}var Ha=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,ua.jsx)(ao.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Va({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:l=Ha[0],onBusinessUnitChange:s,onSearch:c,businessUnits:r=Ha,activeTab:u,onTabChange:m,showTabs:A=!1,onActionClick:v,actionIcon:k,actionText:P="Action",onNotificationRemove:z,onRemoveAll:D,logo:x="/headerlogo.png",appName:S="Nuvia",tagline:B="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[E,ie]=(0,tt.useState)(!C),[_,te]=(0,tt.useState)(!1),[W,q]=(0,tt.useState)(l),Q=re=>{q(re),s?.(re)};return(0,ua.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[_&&(0,ua.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>te(!1)}),(0,ua.jsx)("div",{className:"md:hidden",children:(0,ua.jsx)(Wt,{items:e,isOpen:_,isMobile:!0,onClose:()=>te(!1),currentBusinessUnit:W,onBusinessUnitChange:Q,onSearch:c,logo:x,appName:S,tagline:B})}),(0,ua.jsx)("div",{className:"hidden md:block",children:(0,ua.jsx)(Wt,{items:e,isOpen:E,isMobile:!1,currentBusinessUnit:W,onBusinessUnitChange:Q,onSearch:c,logo:x,appName:S,tagline:B})}),(0,ua.jsxs)("div",{className:n("min-h-screen fixed w-full transition-all duration-300 ease-in-out",E?"md:pl-64":"md:pl-0"),children:[(0,ua.jsx)(ja,{title:a,notifications:o,onToggleSidebar:()=>ie(!E),onToggleMobileMenu:()=>te(!0),sidebarOpen:E,activeTab:u,onTabChange:m,showTabs:A,onActionClick:v,actionIcon:k,actionText:P,onNotificationRemove:z,onRemoveAll:D,logo:x,appName:S,tagline:B}),(0,ua.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var We=J(require("react"));var me=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:n("rounded-xl border bg-card text-card-foreground shadow",e),...t}));me.displayName="Card";var Re=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:n("flex flex-col space-ua-1.5 p-6",e),...t}));Re.displayName="CardHeader";var Ae=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:n("font-semibold leading-none tracking-tight",e),...t}));Ae.displayName="CardTitle";var Qt=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:n("text-sm text-muted-foreground",e),...t}));Qt.displayName="CardDescription";var xe=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:n("p-6 Mt-0",e),...t}));xe.displayName="CardContent";var mt=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:n("flex items-center p-6 Mt-0",e),...t}));mt.displayName="CardFooter";function Ga({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:l,onSessionEdit:s,onSessionDelete:c,className:r}){return(0,ua.jsx)("div",{className:`space-ua-4 h-full ${r||""}`,children:(0,ua.jsxs)(me,{className:"shadow-sm h-full",children:[(0,ua.jsx)("div",{className:"p-4 border-ua",children:(0,ua.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ua.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,ua.jsx)(ao.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,ua.jsxs)(T,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,ua.jsx)(ao.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,ua.jsx)(ve,{className:"h-[600px]",children:(0,ua.jsx)("div",{className:"p-2",children:e.length===0?(0,ua.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(u=>(0,ua.jsx)("div",{className:n("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===u.id&&"bg-muted border"),onClick:()=>l(u),children:(0,ua.jsx)("div",{className:"flex items-start gap-3",children:(0,ua.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,ua.jsx)("h4",{className:"font-medium text-sm truncate",children:u.title}),(0,ua.jsx)("div",{className:"flex items-center gap-1",children:(0,ua.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[s&&(0,ua.jsx)(T,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded",onClick:m=>{m.stopPropagation(),s(u.id)},children:(0,ua.jsx)(ao.Edit3,{className:"h-3 w-3"})}),c&&(0,ua.jsx)(T,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded text-destructive hover:text-destructive",onClick:m=>{m.stopPropagation(),c(u.id)},children:(0,ua.jsx)(ao.Trash2,{className:"h-3 w-3"})})]})})]}),(0,ua.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:u.lastMessage})]})})},u.id))})})]})})}var Wa={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},Ke=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function Yt(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function $a({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:l,colorScheme:s=Wa,className:c}){let[r,u]=(0,tt.useState)([]),[m,A]=(0,tt.useState)([]),v=r[r.length-1],k=v?.children||e,P=(C,E)=>{switch(C.type){case"category":return s.categories[E%s.categories.length];case"list":return s.lists[E%s.lists.length];case"item":return s.items[E%s.items.length];default:return s.primary}},z=(0,tt.useMemo)(()=>({path:r,selectedItems:m,filters:{}}),[r,m]);(0,tt.useEffect)(()=>{l&&l(z)},[z,l]);let D=C=>{C.type==="category"||C.type==="list"?u([...r,C]):C.type==="item"&&A([...m,C])},x=()=>{u(r.slice(0,-1))},S=C=>{u(r.slice(0,C+1))},B=()=>v?.actions?v.actions:[];return t?(0,ua.jsxs)("div",{className:n("w-full",c),children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ua.jsxs)("div",{className:"flex items-center gap-2",children:[r.length>0&&(0,ua.jsx)(Mt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:x,className:n("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ua.jsx)(ao.ChevronLeft,{className:n("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,ua.jsx)("h4",{className:"font-medium text-sm",children:v?.name||"Capabilities"})]}),(0,ua.jsx)(Mt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:n("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ua.jsx)(ao.ua,{className:n("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),r.length>0&&(0,ua.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,ua.jsx)(Mt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>u([]),className:n("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ua.jsxs)("span",{className:"relative",children:["Capabilities",(0,ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),r.map((C,E)=>(0,ua.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ua.jsx)(ao.ChevronRight,{className:"h-2 w-2"}),(0,ua.jsx)(Mt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>S(E),className:n("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ua.jsxs)("span",{className:"relative",children:[C.name,(0,ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.id))]}),(0,ua.jsx)("div",{className:"max-h-40 overflow-ua-auto",children:(0,ua.jsx)(Mt.AnimatePresence,{mode:"wait",children:(0,ua.jsx)(Mt.motion.div,{initial:{opacity:0,ua:-4},animate:{opacity:1,ua:0},exit:{opacity:0,ua:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:v?.type==="list"&&v.data?(0,ua.jsx)(gi,{data:v.data,onItemSelect:C=>A([...m,C]),colorScheme:s}):(0,ua.jsx)(mi,{capabilities:k,onSelect:D,colorScheme:s})},v?.id||"root")})})]}):(0,ua.jsxs)(T,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,ua.jsx)(ao.Menu,{className:"h-4 w-4"}),(0,ua.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function mi({capabilities:e,onSelect:t,colorScheme:a}){return(0,ua.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,ua.jsx)(ui,{capability:o,onClick:()=>t(o),color:a.categories[l%a.categories.length]},o.id))})}function ui({capability:e,onClick:t,selected:a,color:o}){return(0,ua.jsxs)(Mt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:n("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,ua.jsx)("div",{className:n("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,ua.jsxs)("span",{className:"truncate relative",children:[e.name,(0,ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,ua.jsx)(ao.ChevronRight,{className:n("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,ua.jsx)(de,{variant:"secondary",className:n("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function gi({data:e,onItemSelect:t,colorScheme:a}){return(0,ua.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,ua.jsxs)(Mt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:n("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,ua.jsx)("div",{className:n("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[l%a.items.length])}),(0,ua.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ua.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,ua.jsx)("div",{className:n("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,ua.jsx)(de,{variant:"secondary",className:n("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var qa=require("date-fns");function Ka({taskId:e,polling:t=!0,system:a="payload"}){let[o,l]=(0,tt.useState)(null),[s,c]=(0,tt.useState)(!1),[r,u]=(0,tt.useState)(null),m=async(v=!0)=>{if(e){v&&c(!0);try{let k=await fetch(`/api/tasks/${e}`);if(!k.ok)throw new Error(`Failed Zt fetch task: ${k.statusText}`);let P=await k.json();l(P)}catch(k){console.error("Error fetching task:",k),u(k instanceof Error?k:new Error("Unknown error occurred"))}finally{v&&c(!1)}}},A=()=>m(!1);return(0,tt.useEffect)(()=>{e&&m(!0);let v=null;return e&&t&&(v=setInterval(A,5e3)),()=>{v&&clearInterval(v)}},[e,t]),{task:o,loading:s,error:r}}var fi=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},bi=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Ja({data:e}){let{id:t,system:a,fetchLatest:o,taskData:l,error:s}=e||{};if(!t)return null;let c=null,r=!0,u=s,m=o!==void 0?o:!0;if(c=l||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:m,taskData:c,error:u}),m){let{task:P,loading:z,error:D}=Ka({taskId:t,system:a});c=P,r=z,u=D}else r=!1;let A=fi(c?.status||"todo"),v=bi(c?.status||"todo"),k=c?.dateLogged||new Date().toISOString();try{let P=new Date(c?.dateLogged||"");isNaN(P.getTime())||(k=(0,qa.formatDistanceToNow)(P,{addSuffix:!0}))}catch{}return(0,ua.jsxs)(me,{className:n("w-full max-w-md shadow-md",u&&"border border-destructive"),children:[(0,ua.jsxs)(Re,{className:"pb-2",children:[(0,ua.jsxs)("div",{className:"flex justify-between items-start",children:[(0,ua.jsx)(Ae,{className:"text-lg font-semibold",children:r?"Loading...":c?.name||"Task"}),(0,ua.jsx)(de,{className:`${A}`,children:v})]}),c?.project&&(0,ua.jsxs)(Qt,{className:"text-sm text-gray-500",children:["Project: ",c.project.name]})]}),(0,ua.jsx)(xe,{className:"pb-2",children:r?(0,ua.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):u?(0,ua.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ua.jsx)("p",{className:"text-sm text-foreground",children:c?.description||"......."})}),(0,ua.jsx)(mt,{className:"Mt-2 flex items-center justify-between",children:(0,ua.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ua.jsx)(ao.Clock,{className:"h-3 w-3 mr-1"}),(0,ua.jsxs)("span",{children:["Created ",k]}),(0,ua.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ua.jsxs)("span",{children:["Task #",t]})]})})]})}function Ya({artefact:e,taskId:t,taskData:a,loading:o=!1,error:l=null}){let s=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},c=s.dateLogged;try{let r=new Date(s.dateLogged);isNaN(r.getTime())||(c=(0,qa.formatDistanceToNow)(r,{addSuffix:!0}))}catch{}return(0,ua.jsxs)(me,{className:"w-full max-w-md shadow-md",children:[(0,ua.jsx)(Re,{className:"pb-2",children:(0,ua.jsx)("div",{className:"flex justify-between items-start",children:(0,ua.jsx)(Ae,{className:"text-lg font-semibold",children:o?"Loading...":s.name})})}),(0,ua.jsx)(xe,{className:"pb-2",children:o?(0,ua.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):l?(0,ua.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ua.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,ua.jsx)(mt,{className:"Mt-2 flex items-center justify-between",children:(0,ua.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ua.jsx)(ao.Clock,{className:"h-3 w-3 mr-1"}),(0,ua.jsxs)("span",{children:["Created ",c]}),(0,ua.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ua.jsxs)("span",{children:["Task #",s.id]})]})})]})}function Za(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function eo({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:l,fileUploads:s,isDragOver:c,enableFileUpload:r,onInputChange:u,onSendMessage:m,onKeyPress:A,onFileUpload:v,onRemoveFile:k,onDragOver:P,className:z}){let D=(0,tt.useRef)(null),x=(0,tt.useRef)(null),S=(0,tt.useRef)(null),[B,C]=(0,tt.useState)(!1),[E,ie]=(0,tt.useState)({path:[],selectedItems:[],filters:{}});(0,tt.useEffect)(()=>{D.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,tt.useEffect)(()=>{B&&setTimeout(()=>{D.current?.scrollIntoView({behavior:"smooth"})},100)},[B]);let _=()=>Yt(E),te=()=>{let p=[];return l.forEach(M=>{M.actions&&M.actions.forEach(O=>{p.push({label:O.label,action:()=>W(O.id,{path:[M],selectedItems:[],filters:{}})})}),M.children&&M.children.forEach(O=>{O.type==="list"&&O.data&&p.push({label:`View ${O.name}`,action:()=>C(!0)})})}),p.slice(0,5)},W=(p,M)=>{console.log("Capability action:",p,M);let O=`Executing ${p} with context: ${JSON.stringify(M.path.map(ne=>ne.name))}`;C(!1)},q=Yt({path:[],selectedItems:[],filters:{}}),Q=p=>{v(p.target.files),p.target.files&&(p.target.value="")},re=p=>{p.preventDefault(),P(!0)},L=p=>{p.preventDefault(),P(!1)},Ne=p=>{p.preventDefault(),P(!1),v(p.dataTransfer.files)},d=p=>{if(p===0)return"0 Bytes";let M=1024,O=["Bytes","KB","MB","GB"],ne=Math.floor(Math.log(p)/Math.log(M));return parseFloat((p/Math.pow(M,ne)).toFixed(2))+" "+O[ne]},U=p=>p.startsWith("image/")?(0,ua.jsx)(ao.Image,{className:"h-4 w-4"}):p.startsWith("text/")?(0,ua.jsx)(ao.FileText,{className:"h-4 w-4"}):(0,ua.jsx)(ao.File,{className:"h-4 w-4"}),I=p=>{let M=p.role==="assistant",O=p.role==="user",ne=Za(p);return(0,ua.jsxs)("div",{className:n("flex items-start gap-3",O?"flex-row-reverse":""),children:[(0,ua.jsx)(Oe,{className:"h-8 w-8 shrink-0",children:(0,ua.jsx)(Ve,{className:n(O?"bg-primary text-primary-foreground":"bg-gradient-Zt-br from-purple-600 Zt-blue-600 text-white"),children:O?(0,ua.jsx)(ao.User,{className:"h-4 w-4"}):(0,ua.jsx)(ao.Bot,{className:"h-4 w-4"})})}),(0,ua.jsxs)("div",{className:n("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",O?"bg-primary text-primary-foreground":"bg-muted"),children:[ne&&(0,ua.jsx)("div",{className:"mb-2 last:mb-0",children:(0,ua.jsx)("p",{className:"text-sm",children:ne})}),p.parts.map((V,Y)=>{if(V.type==="text")return null;if(V.type==="file"){let N=V;return(0,ua.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,ua.jsxs)("div",{className:"flex items-center gap-2",children:[U(N.mimeType||"application/octet-stream"),(0,ua.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ua.jsx)("p",{className:"text-sm font-medium truncate",children:N.name||N.url?.split("/").pop()||"File"}),N.size&&(0,ua.jsx)("p",{className:"text-xs opacity-70",children:d(N.size)}),N.mimeType&&(0,ua.jsx)("p",{className:"text-xs opacity-70",children:N.mimeType})]}),N.url&&(0,ua.jsx)(T,{variant:"ghost",size:"sm",onClick:()=>window.open(N.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ua.jsx)(ao.Download,{className:"h-4 w-4"})})]})},Y)}if(V.type.startsWith("tool-")){let N=V,se=V.type.replace("tool-","");if(se==="task")switch(N.state){case"input-available":return(0,ua.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},Y);case"output-available":return(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsx)(Ja,{data:{id:N.output?.id||N.input?.id,fetchLatest:!1,taskData:N.output||N.input}})},Y);case"output-error":return(0,ua.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",N.errorText]},Y);default:return null}if(se==="artefact")switch(N.state){case"input-available":return(0,ua.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},Y);case"output-available":return(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsx)(Ya,{artefact:N.output?.description||"",taskId:N.output?.id||N.input?.id,taskData:N.output||N.input})},Y);case"output-error":return(0,ua.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",N.errorText]},Y);default:return null}return(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsxs)(me,{className:"w-full max-w-md",children:[(0,ua.jsx)(Re,{children:(0,ua.jsx)(Ae,{className:"text-lg",children:se})}),(0,ua.jsxs)(xe,{children:[N.state==="input-available"&&(0,ua.jsxs)("p",{className:"text-sm",children:["Processing ",se,"..."]}),N.state==="output-available"&&(0,ua.jsx)("pre",{className:"text-sm",children:JSON.stringify(N.output,null,2)}),N.state==="output-error"&&(0,ua.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",N.errorText]})]})]})},Y)}if(V.type.startsWith("data-")){let N=V,se=V.type.replace("data-","");return se==="reference"?(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsx)(me,{className:"w-full",children:(0,ua.jsx)(xe,{className:"p-4",children:(0,ua.jsx)("div",{className:"space-ua-2",children:N.data?.references?.map((le,ot)=>(0,ua.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,ua.jsx)(de,{variant:"outline",children:le.type||"link"}),(0,ua.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ua.jsx)("p",{className:"text-sm font-medium truncate",children:le.title}),le.description&&(0,ua.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:le.description})]}),le.url&&(0,ua.jsx)(T,{variant:"ghost",size:"sm",onClick:()=>window.open(le.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ua.jsx)(ao.ExternalLink,{className:"h-4 w-4"})})]},ot))})})})},Y):se==="menu"?(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsxs)(me,{className:"w-full",children:[(0,ua.jsx)(Re,{children:(0,ua.jsx)(Ae,{className:"text-lg",children:N.data?.title})}),(0,ua.jsx)(xe,{children:(0,ua.jsx)("div",{className:"space-ua-2",children:N.data?.items?.map((le,ot)=>(0,ua.jsx)(T,{variant:"outline",className:"w-full justify-start",onClick:le.action,children:(0,ua.jsxs)("div",{className:"text-left",children:[(0,ua.jsx)("p",{className:"font-medium",children:le.label}),le.description&&(0,ua.jsx)("p",{className:"text-xs text-muted-foreground",children:le.description})]})},ot))})})]})},Y):(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsxs)(me,{className:"w-full max-w-md",children:[(0,ua.jsx)(Re,{children:(0,ua.jsx)(Ae,{className:"text-lg",children:se})}),(0,ua.jsx)(xe,{children:(0,ua.jsx)("pre",{className:"text-sm",children:JSON.stringify(N.data,null,2)})})]})},Y)}return null})]})]})};return(0,ua.jsxs)(me,{className:`h-full flex flex-col shadow-sm ${z||""}`,children:[(0,ua.jsxs)(ve,{ref:x,className:"flex-1 p-4",onDragOver:re,onDragLeave:L,onDrop:Ne,children:[(0,ua.jsxs)("div",{className:n("space-ua-4",c&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,ua.jsx)(Mt.AnimatePresence,{children:e.map(p=>(0,ua.jsx)(Mt.motion.div,{initial:{opacity:0,ua:10},animate:{opacity:1,ua:0},className:n("flex gap-3",p.role==="user"?"flex-row-reverse":"flex-row"),children:I(p)},p.id))}),B&&(0,ua.jsxs)(Mt.motion.div,{initial:{opacity:0,ua:10},animate:{opacity:1,ua:0},exit:{opacity:0,ua:-10},className:"flex gap-3",children:[(0,ua.jsx)(Oe,{className:"h-8 w-8",children:(0,ua.jsx)(Ve,{className:"bg-gradient-Zt-br from-purple-600 Zt-blue-600 text-white",children:(0,ua.jsx)(ao.Bot,{className:"h-4 w-4"})})}),(0,ua.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ua.jsx)($a,{capabilities:l,isOpen:B,onToggle:()=>C(!B),onActionSelect:W,className:"w-full"})})]}),a&&(0,ua.jsxs)(Mt.motion.div,{initial:{opacity:0,ua:10},animate:{opacity:1,ua:0},className:"flex gap-3",children:[(0,ua.jsx)(Oe,{className:"h-8 w-8",children:(0,ua.jsx)(Ve,{className:"bg-gradient-Zt-br from-purple-600 Zt-blue-600 text-white",children:(0,ua.jsx)(ao.Bot,{className:"h-4 w-4"})})}),(0,ua.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ua.jsxs)("div",{className:"flex space-x-1",children:[(0,ua.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,ua.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,ua.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,ua.jsx)("div",{ref:D})]}),s.length>0&&(0,ua.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,ua.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(p=>(0,ua.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[U(p.file.type),(0,ua.jsx)("span",{className:"text-sm font-medium",children:p.file.name}),(0,ua.jsx)("span",{className:"text-xs text-muted-foreground",children:d(p.file.size)}),(0,ua.jsx)(T,{variant:"ghost",size:"sm",onClick:()=>k(p.id),className:"h-6 w-6 p-0",children:(0,ua.jsx)(ao.ua,{className:"h-4 w-4"})})]},p.id))})}),(0,ua.jsxs)("div",{className:"border-t p-4 bg-muted/20",children:[(0,ua.jsxs)("div",{className:"flex gap-3",children:[(0,ua.jsx)(nt,{value:t,onChange:p=>u(p.target.value),onKeyPress:A,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),r&&(0,ua.jsx)(T,{variant:"outline",size:"icon",onClick:()=>S.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ua.jsx)(ao.Paperclip,{className:"h-4 w-4"})}),(0,ua.jsx)(T,{onClick:m,disabled:!t.trim()&&s.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ua.jsx)(ao.Send,{className:"h-4 w-4"})})]}),(0,ua.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,ua.jsxs)(T,{onClick:()=>C(!B),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,ua.jsx)(ao.Menu,{className:"h-3 w-3 mr-1"}),B?"Hide":"Show"," Capabilities"]}),(0,ua.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[_().map((p,M)=>(0,ua.jsx)(T,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>W(p.id,E),children:p.label},`context-${p.id}`)),_().length===0&&te().map((p,M)=>(0,ua.jsx)(T,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:p.action,children:p.label},`suggestion-${M}`))]})]}),r&&(0,ua.jsx)("input",{ref:S,type:"file",multiple:!0,onChange:Q,className:"hidden"})]})]})}function qe({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:l=[],capabilities:s=[],sidebarItems:c=[],notifications:r=[],sessions:u=[],onNewChat:m,onSessionSelect:A,onSessionDelete:v,onSessionEdit:k=()=>{},onBusinessUnitChange:P=()=>{},onNotificationRemove:z=()=>{},onRemoveAll:D=()=>{},onActionClick:x=()=>{},onSearch:S=U=>console.log("Search query:",U),initialTeam:B="design",currentSession:C=null,showCapabilities:E=!0,title:ie="Digital Colleagues",enableFileUpload:_=!0,maxFileSize:te=10,allowedFileTypes:W=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:q="/headerlogo.png",appName:Q="Nuvia",tagline:re="AI-Powered Workspace",actionIcon:L=(0,ua.jsx)(ao.Users,{className:"mr-2 h-4 w-4"}),actionText:Ne="Collaborate",sidebarInitiallyClosed:d=!1}){let U=(0,Zt.useChat)(e||{}),I=a?t||U:null,[p,M]=(0,tt.useState)(""),[O,ne]=(0,tt.useState)(!1),V=I?.messages||o,Y=p,N=I?.status==="submitted"||O,se=l||[],le={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ot,oo]=(0,tt.useState)(()=>se.length===0?le:se.find(G=>G.id===B)||se[0]),[it,ut]=(0,tt.useState)([]),[io,ro]=(0,tt.useState)(!1),so=G=>{if(!G||!_)return;let ke=[];Array.from(G).forEach(ce=>{if(ce.size>te*1024*1024){alert(`File ${ce.name} is too large. Maximum size is ${te}MB.`);return}if(W.length>0&&!W.some(gt=>ce.type.match(gt))){alert(`File type ${ce.type} is not allowed.`);return}let ta={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ce,status:"pending",progress:0};if(ce.type.startsWith("image/")){let gt=new FileReader;gt.onload=mo=>{ut(uo=>uo.map(Bt=>Bt.id===ta.id?{...Bt,preview:mo.target?.result}:Bt))},gt.readAsDataURL(ce)}ke.push(ta)}),ut(ce=>[...ce,...ke])},no=G=>{ut(ke=>ke.filter(ce=>ce.id!==G))},ea=()=>{if(!(!Y.trim()&&it.length===0)){if(I){let G=it.length>0?lo(it.map(ke=>ke.file)):void 0;I.sendMessage({text:Y,files:G},{body:{timestamp:Date.now()}}),M("")}else console.log("Message Zt send:",Y),console.log("Files Zt upload:",it),M(""),ne(!0),setTimeout(()=>{ne(!1)},1500);ut([])}},lo=G=>{let ke=new DataTransfer;return G.forEach(ce=>ke.items.add(ce)),ke.files},co=G=>{G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),ea())},po=G=>{M(G)};return(0,ua.jsx)(Va,{sidebarItems:c||[],title:ie,notifications:r||[],businessUnits:se,currentBusinessUnit:ot,onBusinessUnitChange:G=>{G&&(oo(G),P?.(G))},onSearch:S,showTabs:!1,onActionClick:x,actionIcon:L,actionText:Ne,onNotificationRemove:z,onRemoveAll:D,logo:q,appName:Q,tagline:re,sidebarInitiallyClosed:d,children:(0,ua.jsx)(Mt.AnimatePresence,{mode:"wait",children:(0,ua.jsx)(Mt.motion.div,{className:"flex-1 h-full",initial:{opacity:0,ua:10},animate:{opacity:1,ua:0},exit:{opacity:0,ua:-10},transition:{duration:.2},children:(0,ua.jsxs)("div",{className:"h-full flex",children:[(0,ua.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,ua.jsx)(Ga,{sessions:u||[],currentSession:C,teams:se,onNewChat:m,onSessionSelect:A,onSessionEdit:k,onSessionDelete:v})}),(0,ua.jsx)("div",{className:"flex-1 h-full p-2",children:(0,ua.jsx)(eo,{messages:V||[],input:Y,isTyping:N,currentSessionTitle:C?.title,capabilities:s||[],onInputChange:po,onSendMessage:ea,onKeyPress:co,fileUploads:it,isDragOver:io,enableFileUpload:_,onFileUpload:so,onRemoveFile:no,onDragOver:ro})})]})},"chat-interface")})})}var at=[{id:"1",title:"AI Assistant Chat",lastMessage:"How can I help you today?"}];function vi(){return(0,ua.jsx)(qe,{businessUnits:Pe,capabilities:Ke,sidebarItems:je,notifications:He,sessions:at,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"AI-Powered Copilot"})}function hi(){return(0,ua.jsx)(qe,{aiConfig:{onError:e=>console.error("Chat error:",e)},businessUnits:Pe,capabilities:Ke,sidebarItems:je,notifications:He,sessions:at,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Custom AI Copilot"})}function yi(){return(0,ua.jsx)(qe,{enableAI:!1,messages:[{id:"1",role:"assistant",parts:[{type:"text",text:"This is demo mode - no AI involved!"}]}],businessUnits:Pe,capabilities:Ke,sidebarItems:je,notifications:He,sessions:at,onNewChat:()=>console.log("New chat started"),onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Demo Copilot"})}function xi(){let e=(0,Zt.useChat)({onError:t=>console.error("Custom chat error:",t)});return(0,ua.jsx)(qe,{useCustomChat:e,businessUnits:Pe,capabilities:Ke,sidebarItems:je,notifications:He,sessions:at,onNewChat:()=>{e.setMessages([]),console.log("New chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Advanced AI Copilot"})}function wi(){return(0,ua.jsx)(qe,{sidebarInitiallyClosed:!0,businessUnits:Pe,capabilities:Ke,sidebarItems:je,notifications:He,sessions:at,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Focused AI Chat"})}function Ci(){let e=(0,Zt.useChat)({onError:t=>console.error("File upload chat error:",t),onFinish:t=>console.log("Message with files completed:",t)});return(0,ua.jsx)(qe,{useCustomChat:e,enableAI:!0,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["image/*","text/*","application/pdf"],businessUnits:Pe,capabilities:Ke,sidebarItems:je,notifications:He,sessions:at,onNewChat:()=>{e.setMessages([]),console.log("New file upload chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"AI Copilot with File Uploads"})}0&&(module.exports={AdvancedAICopilot,CustomAICopilot,DemoCopilot,FileUploadAICopilot,FocusedChatCopilot,SimpleAICopilot});