cortex-react-components 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-GP4TAG4X.mjs → chunk-255P6K5W.mjs} +1 -1
- package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
- package/dist/{chunk-JZZS5W5F.mjs → chunk-2RQDJ5XT.mjs} +1 -1
- package/dist/{chunk-PZXOH6CZ.mjs → chunk-2SAKLSZ4.mjs} +1 -1
- package/dist/{chunk-J3UUZDJ7.mjs → chunk-55MVSCX4.mjs} +1 -1
- package/dist/{chunk-SWECU7TM.mjs → chunk-5SHZBJ5R.mjs} +1 -1
- package/dist/{chunk-GQ7ONZTM.mjs → chunk-67QPOSVV.mjs} +1 -1
- package/dist/{chunk-CLGBBNRB.mjs → chunk-75WE6ZXB.mjs} +1 -1
- package/dist/{chunk-Z57EE3LL.mjs → chunk-7GMAMIHM.mjs} +1 -1
- package/dist/chunk-CSDKRMII.mjs +4 -0
- package/dist/{chunk-BZ2WQV4P.mjs → chunk-ERJXTG6X.mjs} +1 -1
- package/dist/{chunk-Q6IE534E.mjs → chunk-FKU4VQR6.mjs} +1 -1
- package/dist/{chunk-W4UCTPLC.mjs → chunk-FQMEHUDP.mjs} +1 -1
- package/dist/{chunk-TN56JEUK.mjs → chunk-FTZRG54P.mjs} +1 -1
- package/dist/chunk-FUEUJPNZ.mjs +1 -0
- package/dist/{chunk-VH6OVYYB.mjs → chunk-H3CJOE6S.mjs} +1 -1
- package/dist/{chunk-ULEGY3LW.mjs → chunk-HKGW6JI2.mjs} +1 -1
- package/dist/{chunk-WSI4B2MA.mjs → chunk-IF3425JX.mjs} +1 -1
- package/dist/{chunk-IDG2O4B7.mjs → chunk-ISBVFNWD.mjs} +1 -1
- package/dist/{chunk-LIVFM3OH.mjs → chunk-LJOWXPWW.mjs} +1 -1
- package/dist/{chunk-FBL3GXOL.mjs → chunk-LJQPLE4S.mjs} +1 -1
- package/dist/{chunk-5ZAEFDWB.mjs → chunk-M7NV6EFH.mjs} +1 -1
- package/dist/{chunk-XW52WZ2B.mjs → chunk-MQA37YMO.mjs} +1 -1
- package/dist/{chunk-FJJXYLRH.mjs → chunk-MXCW6SOT.mjs} +1 -1
- package/dist/{chunk-I2KSLUQI.mjs → chunk-N3B3XNV3.mjs} +1 -1
- package/dist/{chunk-HPYNP5UQ.mjs → chunk-NTS4U2OE.mjs} +1 -1
- package/dist/{chunk-3GYD63ZU.mjs → chunk-PK3OBSCB.mjs} +1 -1
- package/dist/chunk-QM5FOQHG.mjs +10 -0
- package/dist/{chunk-53FA54L3.mjs → chunk-RNMPX2AU.mjs} +1 -1
- package/dist/{chunk-2R2QNFSX.mjs → chunk-RRLXKDET.mjs} +1 -1
- package/dist/{chunk-URYIYEGY.mjs → chunk-SEXSYCWD.mjs} +1 -1
- package/dist/chunk-SIL7AP7H.mjs +1 -0
- package/dist/{chunk-YQWQFS72.mjs → chunk-SW7RYGO6.mjs} +1 -1
- package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
- package/dist/{chunk-GTK2SGS5.mjs → chunk-XBCYPOFD.mjs} +1 -1
- package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
- package/dist/{chunk-IHPO27W4.mjs → chunk-XHR2HXMP.mjs} +1 -1
- package/dist/{chunk-AUYUGOC2.mjs → chunk-YKG4FNS4.mjs} +1 -1
- package/dist/{chunk-ZI4KMPQF.mjs → chunk-ZEPEWKBV.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.d.ts +2 -1
- package/dist/components/Chat/ChatInterface.js +7 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/Components/Oauth.d.ts +11 -0
- package/dist/components/Chat/Components/Oauth.js +10 -0
- package/dist/components/Chat/Components/Oauth.mjs +2 -0
- package/dist/components/Chat/CopilotInterface.js +7 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/PartAuthenticateTool.d.ts +15 -0
- package/dist/components/Chat/PartTypes/PartAuthenticateTool.js +10 -0
- package/dist/components/Chat/PartTypes/PartAuthenticateTool.mjs +1 -0
- package/dist/components/Chat/PartTypes/index.d.ts +1 -0
- package/dist/components/Chat/PartTypes/index.js +10 -0
- package/dist/components/Chat/PartTypes/index.mjs +1 -0
- package/dist/components/Chat/demo-long-messages.js +12 -6
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +26 -20
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +7 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +7 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +7 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.js +8 -2
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/Card/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +16 -10
- package/dist/components/index.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +21 -15
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-FI57DC3P.mjs +0 -1
- package/dist/chunk-H7PR7Q2X.mjs +0 -4
|
@@ -2,4 +2,10 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
'use client'
|
|
4
4
|
|
|
5
|
-
"use strict";"use client";var no=Object.create;var lt=Object.defineProperty;var so=Object.getOwnPropertyDescriptor;var lo=Object.getOwnPropertyNames;var co=Object.getPrototypeOf,mo=Object.prototype.hasOwnProperty;var po=(e,t)=>{for(var a in t)lt(e,a,{get:t[a],enumerable:!0})},qt=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of lo(t))!mo.call(e,l)&&l!==a&<(e,l,{get:()=>t[l],enumerable:!(o=so(t,l))||o.enumerable});return e};var J=(e,t,a)=>(a=e!=null?no(co(e)):{},qt(t||!e||!e.__esModule?lt(a,"default",{value:e,enumerable:!0}):a,e)),uo=e=>qt(lt({},"__esModule",{value:!0}),e);var mi={};po(mi,{CopilotInterface:()=>di});module.exports=uo(mi);var qa=require("@ai-sdk/react"),Je=require("react"),Dt=require("framer-motion"),Ja=require("lucide-react");var oa=require("clsx");var Rt="-",go=e=>{let t=bo(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let r=c.split(Rt);return r[0]===""&&r.length!==1&&r.shift(),Qt(r,t)||fo(c)},getConflictingClassGroupIds:(c,r)=>{let u=a[c]||[];return r&&o[c]?[...u,...o[c]]:u}}},Qt=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),l=o?Qt(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(Rt);return t.validators.find(({validator:c})=>c(n))?.classGroupId},Jt=/^\[(.+)\]$/,fo=e=>{if(Jt.test(e)){let t=Jt.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},bo=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return ho(Object.entries(e.classGroups),a).forEach(([n,c])=>{Tt(c,o,n,t)}),o},Tt=(e,t,a,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:Xt(t,l);n.classGroupId=a;return}if(typeof l=="function"){if(vo(l)){Tt(l(o),t,a,o);return}t.validators.push({validator:l,classGroupId:a});return}Object.entries(l).forEach(([n,c])=>{Tt(c,Xt(t,n),a,o)})})},Xt=(e,t)=>{let a=e;return t.split(Rt).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},vo=e=>e.isThemeGetter,ho=(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,yo=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)}}},Yt="!",xo=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,l=t[0],n=t.length,c=r=>{let u=[],p=0,T=0,v;for(let x=0;x<r.length;x++){let P=r[x];if(p===0){if(P===l&&(o||r.slice(x,x+n)===t)){u.push(r.slice(T,x)),T=x+n;continue}if(P==="/"){v=x;continue}}P==="["?p++:P==="]"&&p--}let N=u.length===0?r:r.substring(T),D=N.startsWith(Yt),U=D?N.substring(1):N,k=v&&v>T?v-T:void 0;return{modifiers:u,hasImportantModifier:D,baseClassName:U,maybePostfixModifierPosition:k}};return a?r=>a({className:r,parseClassName:c}):c},wo=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},Co=e=>({cache:yo(e.cacheSize),parseClassName:xo(e),...go(e)}),No=/\s+/,ko=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],c=e.trim().split(No),r="";for(let u=c.length-1;u>=0;u-=1){let p=c[u],{modifiers:T,hasImportantModifier:v,baseClassName:N,maybePostfixModifierPosition:D}=a(p),U=!!D,k=o(U?N.substring(0,D):N);if(!k){if(!U){r=p+(r.length>0?" "+r:r);continue}if(k=o(N),!k){r=p+(r.length>0?" "+r:r);continue}U=!1}let x=wo(T).join(":"),P=v?x+Yt:x,M=P+k;if(n.includes(M))continue;n.push(M);let C=l(k,U);for(let z=0;z<C.length;++z){let oe=C[z];n.push(P+oe)}r=p+(r.length>0?" "+r:r)}return r};function Do(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Zt(t))&&(o&&(o+=" "),o+=a);return o}var Zt=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Zt(e[o]))&&(a&&(a+=" "),a+=t);return a};function Po(e,...t){let a,o,l,n=c;function c(u){let p=t.reduce((T,v)=>v(T),e());return a=Co(p),o=a.cache.get,l=a.cache.set,n=r,r(u)}function r(u){let p=o(u);if(p)return p;let T=ko(u,a);return l(u,T),T}return function(){return n(Do.apply(null,arguments))}}var F=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},ea=/^\[(?:([a-z-]+):)?(.+)\]$/ra,So=/^\d+\/\d+$/,To=new Set(["px","full","screen"]),Ro=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ao=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|ra|ra|min|max))|\ra(calc|min|max|clamp)\(.+\)|^0$/,Mo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Io=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,De=e=>We(e)||To.has(e)||So.test(e),Me=e=>$e(e,"length",Oo),We=e=>!!e&&!Number.isNaN(Number(e)),St=e=>$e(e,"number",We),Ye=e=>!!e&&Number.isInteger(Number(e)),Lo=e=>e.endsWith("%")&&We(e.slice(0,-1)),h=e=>ea.test(e),Ie=e=>Ro.test(e),Eo=new Set(["length","size","percentage"]),zo=e=>$e(e,Eo,ta),Uo=e=>$e(e,"position",ta),Fo=new Set(["image","url"]),jo=e=>$e(e,Fo,Go),Ho=e=>$e(e,"",Vo),Ze=()=>!0,$e=(e,t,a)=>{let o=ea.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Oo=e=>Ao.test(e)&&!Mo.test(e),ta=()=>!1,Vo=e=>Io.test(e),Go=e=>Bo.test(e);var Wo=()=>{let e=F("colors"),t=F("spacing"),a=F("blur"),o=F("brightness"),l=F("borderColor"),n=F("borderRadius"),c=F("borderSpacing"),r=F("borderWidth"),u=F("contrast"),p=F("grayscale"),T=F("hueRotate"),v=F("invert"),N=F("gap"),D=F("gradientColorStops"),U=F("gradientColorStopPositions"),k=F("inset"),x=F("margin"),P=F("opacity"),M=F("padding"),C=F("saturate"),z=F("scale"),oe=F("sepia"),_=F("skew"),ee=F("space"),W=F("translate"),q=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],ie=()=>["auto",h,t],B=()=>[h,t],Ne=()=>["",De,Me],d=()=>["auto",We,h],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["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"],A=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",h],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[We,h];return{cacheSize:500,separator:":",theme:{colors:[Ze],spacing:[De,Me],blur:["none","",Ie,h],brightness:V(),borderColor:[e],borderRadius:["none","","full",Ie,h],borderSpacing:B(),borderWidth:Ne(),contrast:V(),grayscale:O(),hueRotate:V(),invert:O(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[Lo,Me],inset:ie(),margin:ie(),opacity:V(),padding:B(),saturate:V(),scale:V(),sepia:O(),skew:V(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[Ie]}],"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:[...L(),h]}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-ra":[{"overflow-ra":Q()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-ra":[{"overscroll-ra":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-ra":[{"inset-ra":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ye,h]}],basis:[{basis:ie()}],"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",Ye,h]}],"grid-cols":[{"grid-cols":[Ze]}],"col-start-end":[{col:["auto",{span:["full",Ye,h]},h]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[Ze]}],"row-start-end":[{row:["auto",{span:[Ye,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:[N]}],"gap-x":[{"gap-x":[N]}],"gap-ra":[{"gap-ra":[N]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],ra:[{ra:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],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":[ee]}],"space-x-reverse":["space-x-reverse"],"space-ra":[{"space-ra":[ee]}],"space-ra-reverse":["space-ra-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,Me]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",St]}],"font-family":[{font:[Ze]}],"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,St]}],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":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"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:B()}],"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":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),Uo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","ra","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","ra","bl","l","tl"]},jo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[U]}],"gradient-via-pos":[{via:[U]}],"gradient-to-pos":[{to:[U]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-ra":[{"rounded-ra":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-ra":[{"border-ra":[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-ra":[{"border-ra":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...R(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-ra":[{"divide-ra":[r]}],"divide-ra-reverse":["divide-ra-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:R()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-ra":[{"border-ra":[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-ra":[{"border-ra":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...R()]}],"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":[P]}],"ring-offset-w":[{"ring-offset":[De,Me]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ie,Ho]}],"shadow-color":[{shadow:[Ze]}],opacity:[{opacity:[P]}],"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":[T]}],invert:[{invert:[v]}],saturate:[{saturate:[C]}],sepia:[{sepia:[oe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[T]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-ra":[{"border-spacing-ra":[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:[z]}],"scale-x":[{"scale-x":[z]}],"scale-ra":[{"scale-ra":[z]}],rotate:[{rotate:[Ye,h]}],"translate-x":[{"translate-x":[W]}],"translate-ra":[{"translate-ra":[W]}],"skew-x":[{"skew-x":[_]}],"skew-ra":[{"skew-ra":[_]}],"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","ra","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-ra":[{"scroll-ra":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","ra","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-ra":[{"touch-pan":["ra","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,St]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-ra"],overscroll:["overscroll-x","overscroll-ra"],inset:["inset-x","inset-ra","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-ra":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-ra"],p:["px","py","ps","ra","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-ra","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-ra":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-ra"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-ra","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-ra":["border-w-t","border-w-ra"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-ra","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-ra":["border-color-t","border-color-ra"],"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-ra","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-ra","touch-pz"],"touch-x":["touch"],"touch-ra":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var aa=Po(Wo);function s(...e){return aa((0,oa.clsx)(e))}var bt=J(require("react")),zt=J(require("next/link"));var ia=require("class-variance-authority");var ra=require("react/jsx-runtime"),$o=(0,ia.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,ra.jsx)("div",{className:s($o({variant:t}),e),...a})}var na=require("@radix-ui/react-slot"),la=J(require("react")),Ko=(0,ia.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),S=la.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...l},n)=>(0,ra.jsx)(e?na.Slot:"button",{className:s(Ko({className:t,size:a,variant:o})),ref:n,...l}));S.displayName="Button";var da=J(require("react"));var et=da.forwardRef(({className:e,type:t,...a},o)=>(0,ra.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}));et.displayName="Input";var At=J(require("react")),me=J(require("@radix-ui/react-scroll-area"));var ve=At.forwardRef(({className:e,children:t,...a},o)=>(0,ra.jsxs)(me.Root,{ref:o,className:s("relative overflow-hidden",e),...a,children:[(0,ra.jsx)(me.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ra.jsx)(pa,{}),(0,ra.jsx)(me.Corner,{})]}));ve.displayName=me.Root.displayName;var pa=At.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,ra.jsx)(me.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,ra.jsx)(me.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));pa.displayName=me.ScrollAreaScrollbar.displayName;var tt=J(require("react")),$=J(require("@radix-ui/react-dialog"));var ga=$.Root;var _o=$.Portal;var fa=tt.forwardRef(({className:e,...t},a)=>(0,ra.jsx)($.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}));fa.displayName=$.Overlay.displayName;var Mt=tt.forwardRef(({className:e,children:t,...a},o)=>(0,ra.jsxs)(_o,{children:[(0,ra.jsx)(fa,{}),(0,ra.jsxs)($.Content,{ref:o,className:s("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-ra-[-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,ra.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,ra.jsx)(Ja.ra,{className:"h-4 w-4"}),(0,ra.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Mt.displayName=$.Content.displayName;var It=({className:e,...t})=>(0,ra.jsx)("div",{className:s("flex flex-col space-ra-1.5 text-center sm:text-left",e),...t});It.displayName="DialogHeader";var qo=({className:e,...t})=>(0,ra.jsx)("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});qo.displayName="DialogFooter";var Bt=tt.forwardRef(({className:e,...t},a)=>(0,ra.jsx)($.Title,{ref:a,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));Bt.displayName=$.Title.displayName;var Jo=tt.forwardRef(({className:e,...t},a)=>(0,ra.jsx)($.Description,{ref:a,className:s("text-sm text-muted-foreground",e),...t}));Jo.displayName=$.Description.displayName;var at=J(require("@radix-ui/react-checkbox")),va=J(require("react")),Lt=va.forwardRef(({className:e,...t},a)=>(0,ra.jsx)(at.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,ra.jsx)(at.Indicator,{className:s("flex items-center justify-center text-current"),children:(0,ra.jsx)(Ja.Check,{className:"h-4 w-4"})})}));Lt.displayName=at.Root.displayName;var he=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var ya=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,ra.jsx)(Ja.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,ra.jsx)(Ja.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,ra.jsx)(Ja.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,ra.jsx)(Ja.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,ra.jsx)(Ja.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,ra.jsx)(Ja.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,ra.jsx)(Ja.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,ra.jsx)(Ja.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"Dt",name:"IT Support",description:"Information technology and infrastructure",icon:(0,ra.jsx)(Ja.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,ra.jsx)(Ja.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],pt=[{id:"1",name:"Ja-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 Et=[{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}],dt=[{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}],gt=[{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")}],Xo=[...gt,{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")}],Qo=[...pt,{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}],mt={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:[]},ha={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:gt.filter(e=>e.epicId==="1")};var Bi={empty:{initialProjects:mt.projects,initialEpics:mt.epics,initialSprints:mt.sprints,initialTasks:mt.tasks},default:{initialProjects:pt,initialEpics:Et,initialSprints:dt,initialTasks:gt},highDensity:{initialProjects:pt,initialEpics:Et,initialSprints:dt,initialTasks:Xo},singleEpic:{initialProjects:pt,initialEpics:ha.epics,initialSprints:dt,initialTasks:ha.tasks},multipleProjects:{initialProjects:Qo,initialEpics:Et,initialSprints:dt,initialTasks:gt}},ut=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(he),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(he),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(he),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(he),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(he),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(he),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(he),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(he),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(he),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(he),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Li=[{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:ut.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:ut.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:ut.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 Ei=ut.filter(e=>e.type==="digital");function xa(e,t){let[a,o]=(0,Je.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,Je.useEffect)(()=>{l(a)},[]),[a,l]}function Ut({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:l=ya[0],onBusinessUnitChange:n,onSearch:c,className:r,logo:u="/headerlogo.png",appName:p="Nuvia",tagline:T="Collaboration Platform"}){let[v,N]=bt.useState({}),[D,U]=xa("sidebar-favorites",{}),[k,x]=bt.useState(null),[P,M]=bt.useState(""),C=d=>{N(L=>({...L,[d]:!L[d]}))},z=d=>{n?.(d)},oe=()=>{P.trim()&&c?.(P.trim())},_=d=>{d.key==="Enter"&&(d.preventDefault(),oe())},ee=(d,L)=>{let R=D[d]||[],m=R.includes(L)?R.filter(A=>A!==L):R.concat(L);U({...D,[d]:m})},W=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let L=D[d.id]||[],R=d.items.filter(A=>L.includes(A.id)),m=d.items.filter(A=>!L.includes(A.id));return[...R,...m].slice(0,d.maxItems)},q=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,Q=e,ie=d=>{let L=q(d),R=W(d),m=(0,ra.jsxs)(ra.Fragment,{children:[(0,ra.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,ra.jsx)("span",{children:d.title})]}),d.badge&&(0,ra.jsx)(ce,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,ra.jsx)(Ja.ChevronDown,{className:s("ml-2 h-4 w-4 transition-transform",v[d.title]?"rotate-180":"")})]}),A=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,ra.jsx)(zt.default,{href:d.url,className:A,onClick:a?o:void 0,children:m}):(0,ra.jsx)("button",{className:A,onClick:()=>d.items&&C(d.title),children:m})},B=()=>{let d=e.find(R=>R.id===k);if(!d||!d.items||!d.maxItems)return null;let L=D[d.id]||[];return(0,ra.jsx)(ga,{open:!!k,onOpenChange:R=>!R&&x(null),children:(0,ra.jsxs)(Mt,{className:"sm:max-w-md",children:[(0,ra.jsxs)(It,{children:[(0,ra.jsxs)(Bt,{children:["Manage ",d.title," Favorites"]}),(0,ra.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,ra.jsx)(ve,{className:"max-h-96 pr-4",children:(0,ra.jsx)("div",{className:"space-ra-4",children:d.items.map(R=>(0,ra.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ra.jsx)(Lt,{id:R.id,checked:L.includes(R.id),onCheckedChange:()=>ee(d.id,R.id),disabled:!L.includes(R.id)&&L.length>=(d.maxItems||0)}),(0,ra.jsxs)("label",{htmlFor:R.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:[R.title,R.badge&&(0,ra.jsx)(ce,{variant:"outline",className:"text-xs",children:R.badge})]})]},R.id))})})]})})},Ne=(0,ra.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,ra.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,ra.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ra.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,ra.jsx)("img",{src:u,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,ra.jsxs)("div",{children:[(0,ra.jsx)("h2",{className:"font-semibold",children:p}),(0,ra.jsx)("p",{className:"text-xs text-muted-foreground",children:T})]})]}),a&&(0,ra.jsx)(S,{variant:"ghost",size:"icon",onClick:o,children:(0,ra.jsx)(Ja.ra,{className:"h-5 w-5"})})]}),(0,ra.jsx)("div",{className:"px-3 py-2",children:(0,ra.jsxs)("div",{className:"relative",children:[(0,ra.jsx)(Ja.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ra.jsx)(et,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:P,onChange:d=>M(d.target.value),onKeyPress:_})]})}),(0,ra.jsx)(ve,{className:"flex-1 px-3 py-2",children:(0,ra.jsx)("div",{className:"space-ra-1",children:Q.map(d=>(0,ra.jsxs)("div",{className:"mb-1",children:[ie(d),d.items&&v[d.title]&&(0,ra.jsxs)("div",{className:"mt-1 ml-6 space-ra-1 border-l pl-3",children:[W(d).map(L=>(0,ra.jsxs)(zt.default,{href:L.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[L.title,L.badge&&(0,ra.jsx)(ce,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:L.badge})]},L.id)),q(d)&&d.items&&d.items.length>W(d).length&&(0,ra.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,ra.jsx)("div",{className:"p-3",children:(0,ra.jsx)("div",{className:"space-ra-1",children:(0,ra.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,ra.jsx)(Ja.Settings,{className:"h-5 w-5"}),(0,ra.jsx)("span",{children:"Settings"})]})})}),(0,ra.jsx)(B,{})]});return a?(0,ra.jsx)("div",{className:s("fixed inset-ra-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,ra.jsx)("div",{className:s("fixed inset-ra-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 vt=J(require("react")),Pe=J(require("@radix-ui/react-avatar"));var Fe=vt.forwardRef(({className:e,...t},a)=>(0,ra.jsx)(Pe.Root,{ref:a,className:s("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Fe.displayName=Pe.Root.displayName;var Ft=vt.forwardRef(({className:e,...t},a)=>(0,ra.jsx)(Pe.Image,{ref:a,className:s("aspect-square h-full w-full",e),...t}));Ft.displayName=Pe.Image.displayName;var je=vt.forwardRef(({className:e,...t},a)=>(0,ra.jsx)(Pe.Fallback,{ref:a,className:s("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));je.displayName=Pe.Fallback.displayName;var wa=J(require("react")),fe=J(require("@radix-ui/react-tooltip"));var yt=fe.Provider,xt=fe.Root,wt=fe.Trigger,ot=wa.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ra.jsx)(fe.Portal,{children:(0,ra.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})}));ot.displayName=fe.Content.displayName;var Ca=require("next-themes");function Na(){let{setTheme:e,theme:t}=(0,Ca.useTheme)();return(0,ra.jsx)(yt,{children:(0,ra.jsxs)(xt,{children:[(0,ra.jsx)(wt,{asChild:!0,children:(0,ra.jsxs)(S,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,ra.jsx)(Ja.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,ra.jsx)(Ja.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,ra.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,ra.jsx)(ot,{children:"Toggle theme"})]})})}function ka({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,ra.jsx)(Ja.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,ra.jsx)(Ja.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,ra.jsx)(Ja.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,ra.jsx)(Ja.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,ra.jsx)(Dt.AnimatePresence,{children:t&&(0,ra.jsxs)(ra.Fragment,{children:[(0,ra.jsx)(Dt.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,ra.jsx)(Dt.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:s("fixed inset-ra-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",n),children:(0,ra.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ra.jsxs)("div",{className:"flex items-center justify-between border-ra p-4",children:[(0,ra.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ra.jsx)(Ja.Bell,{className:"h-5 w-5"}),(0,ra.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,ra.jsxs)(ce,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,ra.jsxs)(S,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,ra.jsx)(Ja.ra,{className:"h-5 w-5"}),(0,ra.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,ra.jsxs)("div",{className:"flex items-center justify-between border-ra p-2",children:[(0,ra.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,ra.jsx)(S,{variant:"ghost",size:"sm",onClick:l,className:"text-sm",children:"Dismiss all"})]}),c.length>0?(0,ra.jsx)(ve,{className:"flex-1",children:(0,ra.jsx)("div",{className:"divide-ra",children:c.map(p=>(0,ra.jsxs)("div",{className:s("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,ra.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:u(p.type)}),(0,ra.jsxs)("div",{className:"flex-1 space-ra-1",children:[(0,ra.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ra.jsx)("p",{className:"font-medium",children:p.title}),(0,ra.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ra.jsx)("p",{className:"text-xs text-muted-foreground",children:p.time}),(0,ra.jsx)(S,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(p.id),title:"Dismiss",children:(0,ra.jsx)(Ja.Check,{className:"h-3 w-3"})})]})]}),(0,ra.jsx)("p",{className:"text-sm text-muted-foreground",children:p.description}),p.actionLabel&&(0,ra.jsxs)(S,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:p.onAction,children:[p.actionLabel,(0,ra.jsx)(Ja.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},p.id))})}):(0,ra.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,ra.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,ra.jsx)(Ja.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,ra.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,ra.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 Da({className:e,...t}){return(0,ra.jsx)(He.Root,{"data-slot":"tabs",className:s("flex flex-col gap-2",e),...t})}function Pa({className:e,...t}){return(0,ra.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 Sa({className:e,...t}){return(0,ra.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 Se=J(require("react")),w=J(require("@radix-ui/react-dropdown-menu")),Ke=require("@radix-ui/react-icons");var Ta=w.Root,Ra=w.Trigger;var Yo=Se.forwardRef(({className:e,inset:t,children:a,...o},l)=>(0,ra.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,ra.jsx)(Ke.ChevronRightIcon,{className:"ml-auto"})]}));Yo.displayName=w.SubTrigger.displayName;var Zo=Se.forwardRef(({className:e,...t},a)=>(0,ra.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}));Zo.displayName=w.SubContent.displayName;var Ht=Se.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ra.jsx)(w.Portal,{children:(0,ra.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})}));Ht.displayName=w.Content.displayName;var Ot=Se.forwardRef(({className:e,inset:t,...a},o)=>(0,ra.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}));Ot.displayName=w.Item.displayName;var ei=Se.forwardRef(({className:e,children:t,checked:a,...o},l)=>(0,ra.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,ra.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ra.jsx)(w.ItemIndicator,{children:(0,ra.jsx)(Ke.CheckIcon,{className:"h-4 w-4"})})}),t]}));ei.displayName=w.CheckboxItem.displayName;var ti=Se.forwardRef(({className:e,children:t,...a},o)=>(0,ra.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,ra.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ra.jsx)(w.ItemIndicator,{children:(0,ra.jsx)(Ke.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ti.displayName=w.RadioItem.displayName;var ai=Se.forwardRef(({className:e,inset:t,...a},o)=>(0,ra.jsx)(w.Label,{ref:o,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));ai.displayName=w.Label.displayName;var oi=Se.forwardRef(({className:e,...t},a)=>(0,ra.jsx)(w.Separator,{ref:a,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));oi.displayName=w.Separator.displayName;var ii=({className:e,...t})=>(0,ra.jsx)("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});ii.displayName="DropdownMenuShortcut";function Ma({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:l="700px",gridCols:n=6}){let c=a.find(r=>r.value===e);return(0,ra.jsxs)(Dt.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,ra:-20},animate:{opacity:1,ra:0},transition:{duration:.3,ease:"easeOut"},children:[(0,ra.jsx)("div",{className:"hidden md:block",children:(0,ra.jsx)(Da,{value:e,onValueChange:t,children:(0,ra.jsx)(Pa,{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,ra.jsx)(Dt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,ra.jsx)(Sa,{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,ra.jsx)("div",{className:"md:hidden",children:(0,ra.jsxs)(Ta,{children:[(0,ra.jsx)(Ra,{asChild:!0,children:(0,ra.jsxs)(S,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,ra.jsx)(Ja.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,ra.jsx)(Ht,{align:"center",className:"w-[180px]",children:a.map(r=>(0,ra.jsx)(Ot,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function Ia({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:l=!0,className:n,activeTab:c="assistant",onTabChange:r,showTabs:u=!0,tabOptions:p=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:T,actionIcon:v=(0,ra.jsx)(Ja.Bot,{className:"mr-2 h-4 w-4"}),actionText:N="Action",onNotificationRemove:D,onRemoveAll:U,logo:k="/headerlogo.png",appName:x="Nuvia",tagline:P="Collaboration Platform"}){let[M,C]=(0,Je.useState)(!1),[z,oe]=(0,Je.useState)(t),_=z.filter(q=>!q.read).length,ee=q=>{oe(Q=>Q.filter(ie=>ie.id!==q)),D?.(q)},W=()=>{oe(q=>q.filter(Q=>Q.read)),U?.()};return(0,ra.jsxs)(ra.Fragment,{children:[(0,ra.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${n||""}`,children:[(0,ra.jsx)(S,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,ra.jsx)(Ja.Menu,{className:"h-5 w-5"})}),(0,ra.jsx)(S,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,ra.jsx)(Ja.PanelLeft,{className:"h-5 w-5"})}),!l&&(0,ra.jsxs)(Dt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,ra.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,ra.jsx)("img",{src:k,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,ra.jsxs)("div",{children:[(0,ra.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,ra.jsx)("p",{className:"text-xs text-muted-foreground",children:P})]})]}),(0,ra.jsxs)("div",{className:"flex flex-1 items-center",children:[u&&(0,ra.jsx)(Ma,{activeTab:c,onTabChange:r,tabOptions:p}),(0,ra.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,ra.jsx)(Dt.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,ra.jsx)(Dt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ra.jsxs)(S,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:T,children:[v,N]})})}),(0,ra.jsx)(Na,{}),(0,ra.jsx)(yt,{children:(0,ra.jsxs)(xt,{children:[(0,ra.jsx)(wt,{asChild:!0,children:(0,ra.jsx)(Dt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ra.jsxs)(S,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,ra.jsx)(Dt.motion.div,{animate:_>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:_>0?1/0:0,repeatDelay:3},children:(0,ra.jsx)(Ja.Bell,{className:"h-5 w-5"})}),_>0&&(0,ra.jsx)(Dt.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,ra.jsx)(ot,{children:"Notifications"})]})}),(0,ra.jsx)(Dt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ra.jsxs)(Fe,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,ra.jsx)(Ft,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,ra.jsx)(je,{})]})})]})]})]}),(0,ra.jsx)(ka,{notifications:z,open:M,onClose:()=>C(!1),onNotificationRemove:ee,onRemoveAll:W})]})}var Ba=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,ra.jsx)(Ja.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ea({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:l=Ba[0],onBusinessUnitChange:n,onSearch:c,businessUnits:r=Ba,activeTab:u,onTabChange:p,showTabs:T=!1,onActionClick:v,actionIcon:N,actionText:D="Action",onNotificationRemove:U,onRemoveAll:k,logo:x="/headerlogo.png",appName:P="Nuvia",tagline:M="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[z,oe]=(0,Je.useState)(!C),[_,ee]=(0,Je.useState)(!1),[W,q]=(0,Je.useState)(l),Q=ie=>{q(ie),n?.(ie)};return(0,ra.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[_&&(0,ra.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>ee(!1)}),(0,ra.jsx)("div",{className:"md:hidden",children:(0,ra.jsx)(Ut,{items:e,isOpen:_,isMobile:!0,onClose:()=>ee(!1),currentBusinessUnit:W,onBusinessUnitChange:Q,onSearch:c,logo:x,appName:P,tagline:M})}),(0,ra.jsx)("div",{className:"hidden md:block",children:(0,ra.jsx)(Ut,{items:e,isOpen:z,isMobile:!1,currentBusinessUnit:W,onBusinessUnitChange:Q,onSearch:c,logo:x,appName:P,tagline:M})}),(0,ra.jsxs)("div",{className:s("min-h-screen fixed w-full transition-all duration-300 ease-in-out",z?"md:pl-64":"md:pl-0"),children:[(0,ra.jsx)(Ia,{title:a,notifications:o,onToggleSidebar:()=>oe(!z),onToggleMobileMenu:()=>ee(!0),sidebarOpen:z,activeTab:u,onTabChange:p,showTabs:T,onActionClick:v,actionIcon:N,actionText:D,onNotificationRemove:U,onRemoveAll:k,logo:x,appName:P,tagline:M}),(0,ra.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var Oe=J(require("react"));var ue=Oe.forwardRef(({className:e,...t},a)=>(0,ra.jsx)("div",{ref:a,className:s("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ue.displayName="Card";var Te=Oe.forwardRef(({className:e,...t},a)=>(0,ra.jsx)("div",{ref:a,className:s("flex flex-col space-ra-1.5 p-6",e),...t}));Te.displayName="CardHeader";var Re=Oe.forwardRef(({className:e,...t},a)=>(0,ra.jsx)("div",{ref:a,className:s("font-semibold leading-none tracking-tight",e),...t}));Re.displayName="CardTitle";var Wt=Oe.forwardRef(({className:e,...t},a)=>(0,ra.jsx)("div",{ref:a,className:s("text-sm text-muted-foreground",e),...t}));Wt.displayName="CardDescription";var xe=Oe.forwardRef(({className:e,...t},a)=>(0,ra.jsx)("div",{ref:a,className:s("p-6 pt-0",e),...t}));xe.displayName="CardContent";var rt=Oe.forwardRef(({className:e,...t},a)=>(0,ra.jsx)("div",{ref:a,className:s("flex items-center p-6 pt-0",e),...t}));rt.displayName="CardFooter";function za({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:l,onSessionEdit:n,onSessionDelete:c,className:r}){return(0,ra.jsx)("div",{className:`space-ra-4 h-full ${r||""}`,children:(0,ra.jsxs)(ue,{className:"shadow-sm h-full",children:[(0,ra.jsx)("div",{className:"p-4 border-ra",children:(0,ra.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ra.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,ra.jsx)(Ja.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,ra.jsxs)(S,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,ra.jsx)(Ja.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,ra.jsx)(ve,{className:"h-[600px]",children:(0,ra.jsx)("div",{className:"p-2",children:e.length===0?(0,ra.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(u=>(0,ra.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,ra.jsx)("div",{className:"flex items-start gap-3",children:(0,ra.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ra.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,ra.jsx)("h4",{className:"font-medium text-sm truncate",children:u.title}),(0,ra.jsx)("div",{className:"flex items-center gap-1",children:(0,ra.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[n&&(0,ra.jsx)(S,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded",onClick:p=>{p.stopPropagation(),n(u.id)},children:(0,ra.jsx)(Ja.Edit3,{className:"h-3 w-3"})}),c&&(0,ra.jsx)(S,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded text-destructive hover:text-destructive",onClick:p=>{p.stopPropagation(),c(u.id)},children:(0,ra.jsx)(Ja.Trash2,{className:"h-3 w-3"})})]})})]}),(0,ra.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:u.lastMessage})]})})},u.id))})})]})})}var Ua={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]};function $t(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Fa({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:l,colorScheme:n=Ua,className:c}){let[r,u]=(0,Je.useState)([]),[p,T]=(0,Je.useState)([]),v=r[r.length-1],N=v?.children||e,D=(C,z)=>{switch(C.type){case"category":return n.categories[z%n.categories.length];case"list":return n.lists[z%n.lists.length];case"item":return n.items[z%n.items.length];default:return n.primary}},U=(0,Je.useMemo)(()=>({path:r,selectedItems:p,filters:{}}),[r,p]);(0,Je.useEffect)(()=>{l&&l(U)},[U,l]);let k=C=>{C.type==="category"||C.type==="list"?u([...r,C]):C.type==="item"&&T([...p,C])},x=()=>{u(r.slice(0,-1))},P=C=>{u(r.slice(0,C+1))},M=()=>v?.actions?v.actions:[];return t?(0,ra.jsxs)("div",{className:s("w-full",c),children:[(0,ra.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ra.jsxs)("div",{className:"flex items-center gap-2",children:[r.length>0&&(0,ra.jsx)(Dt.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,ra.jsx)(Ja.ChevronLeft,{className:s("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,ra.jsx)("h4",{className:"font-medium text-sm",children:v?.name||"Capabilities"})]}),(0,ra.jsx)(Dt.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,ra.jsx)(Ja.ra,{className:s("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),r.length>0&&(0,ra.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,ra.jsx)(Dt.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,ra.jsxs)("span",{className:"relative",children:["Capabilities",(0,ra.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,z)=>(0,ra.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ra.jsx)(Ja.ChevronRight,{className:"h-2 w-2"}),(0,ra.jsx)(Dt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>P(z),className:s("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ra.jsxs)("span",{className:"relative",children:[C.name,(0,ra.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,ra.jsx)("div",{className:"max-h-40 overflow-ra-auto",children:(0,ra.jsx)(Dt.AnimatePresence,{mode:"wait",children:(0,ra.jsx)(Dt.motion.div,{initial:{opacity:0,ra:-4},animate:{opacity:1,ra:0},exit:{opacity:0,ra:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:v?.type==="list"&&v.data?(0,ra.jsx)(si,{data:v.data,onItemSelect:C=>T([...p,C]),colorScheme:n}):(0,ra.jsx)(ri,{capabilities:N,onSelect:k,colorScheme:n})},v?.id||"root")})})]}):(0,ra.jsxs)(S,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,ra.jsx)(Ja.Menu,{className:"h-4 w-4"}),(0,ra.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function ri({capabilities:e,onSelect:t,colorScheme:a}){return(0,ra.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,ra.jsx)(ni,{capability:o,onClick:()=>t(o),color:a.categories[l%a.categories.length]},o.id))})}function ni({capability:e,onClick:t,selected:a,color:o}){return(0,ra.jsxs)(Dt.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,ra.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,ra.jsxs)("span",{className:"truncate relative",children:[e.name,(0,ra.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,ra.jsx)(Ja.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,ra.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 si({data:e,onItemSelect:t,colorScheme:a}){return(0,ra.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,ra.jsxs)(Dt.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,ra.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,ra.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ra.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,ra.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,ra.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,ra.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 Oa=require("date-fns");function ja({taskId:e,polling:t=!0,system:a="payload"}){let[o,l]=(0,Je.useState)(null),[n,c]=(0,Je.useState)(!1),[r,u]=(0,Je.useState)(null),p=async(v=!0)=>{if(e){v&&c(!0);try{let N=await fetch(`/api/tasks/${e}`);if(!N.ok)throw new Error(`Failed to fetch task: ${N.statusText}`);let D=await N.json();l(D)}catch(N){console.error("Error fetching task:",N),u(N instanceof Error?N:new Error("Unknown error occurred"))}finally{v&&c(!1)}}},T=()=>p(!1);return(0,Je.useEffect)(()=>{e&&p(!0);let v=null;return e&&t&&(v=setInterval(T,5e3)),()=>{v&&clearInterval(v)}},[e,t]),{task:o,loading:n,error:r}}var li=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"}},ci=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Va({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:D,loading:U,error:k}=ja({taskId:t,system:a});c=D,r=U,u=k}else r=!1;let T=li(c?.status||"todo"),v=ci(c?.status||"todo"),N=c?.dateLogged||new Date().toISOString();try{let D=new Date(c?.dateLogged||"");isNaN(D.getTime())||(N=(0,Oa.formatDistanceToNow)(D,{addSuffix:!0}))}catch{}return(0,ra.jsxs)(ue,{className:s("w-full max-w-md shadow-md",u&&"border border-destructive"),children:[(0,ra.jsxs)(Te,{className:"pb-2",children:[(0,ra.jsxs)("div",{className:"flex justify-between items-start",children:[(0,ra.jsx)(Re,{className:"text-lg font-semibold",children:r?"Loading...":c?.name||"Task"}),(0,ra.jsx)(ce,{className:`${T}`,children:v})]}),c?.project&&(0,ra.jsxs)(Wt,{className:"text-sm text-gray-500",children:["Project: ",c.project.name]})]}),(0,ra.jsx)(xe,{className:"pb-2",children:r?(0,ra.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):u?(0,ra.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ra.jsx)("p",{className:"text-sm text-foreground",children:c?.description||"......."})}),(0,ra.jsx)(rt,{className:"pt-2 flex items-center justify-between",children:(0,ra.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ra.jsx)(Ja.Clock,{className:"h-3 w-3 mr-1"}),(0,ra.jsxs)("span",{children:["Created ",N]}),(0,ra.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ra.jsxs)("span",{children:["Task #",t]})]})})]})}function $a({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,Oa.formatDistanceToNow)(r,{addSuffix:!0}))}catch{}return(0,ra.jsxs)(ue,{className:"w-full max-w-md shadow-md",children:[(0,ra.jsx)(Te,{className:"pb-2",children:(0,ra.jsx)("div",{className:"flex justify-between items-start",children:(0,ra.jsx)(Re,{className:"text-lg font-semibold",children:o?"Loading...":n.name})})}),(0,ra.jsx)(xe,{className:"pb-2",children:o?(0,ra.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):l?(0,ra.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ra.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,ra.jsx)(rt,{className:"pt-2 flex items-center justify-between",children:(0,ra.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ra.jsx)(Ja.Clock,{className:"h-3 w-3 mr-1"}),(0,ra.jsxs)("span",{children:["Created ",c]}),(0,ra.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ra.jsxs)("span",{children:["Task #",n.id]})]})})]})}function Ka(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function _a({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:l,fileUploads:n,isDragOver:c,enableFileUpload:r,onInputChange:u,onSendMessage:p,onKeyPress:T,onFileUpload:v,onRemoveFile:N,onDragOver:D,className:U}){let k=(0,Je.useRef)(null),x=(0,Je.useRef)(null),P=(0,Je.useRef)(null),[M,C]=(0,Je.useState)(!1),[z,oe]=(0,Je.useState)({path:[],selectedItems:[],filters:{}});(0,Je.useEffect)(()=>{k.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Je.useEffect)(()=>{M&&setTimeout(()=>{k.current?.scrollIntoView({behavior:"smooth"})},100)},[M]);let _=()=>$t(z),ee=()=>{let m=[];return l.forEach(A=>{A.actions&&A.actions.forEach(O=>{m.push({label:O.label,action:()=>W(O.id,{path:[A],selectedItems:[],filters:{}})})}),A.children&&A.children.forEach(O=>{O.type==="list"&&O.data&&m.push({label:`View ${O.name}`,action:()=>C(!0)})})}),m.slice(0,5)},W=(m,A)=>{console.log("Capability action:",m,A);let O=`Executing ${m} with context: ${JSON.stringify(A.path.map(ne=>ne.name))}`;C(!1)},q=$t({path:[],selectedItems:[],filters:{}}),Q=m=>{v(m.target.files),m.target.files&&(m.target.value="")},ie=m=>{m.preventDefault(),D(!0)},B=m=>{m.preventDefault(),D(!1)},Ne=m=>{m.preventDefault(),D(!1),v(m.dataTransfer.files)},d=m=>{if(m===0)return"0 Bytes";let A=1024,O=["Bytes","KB","MB","GB"],ne=Math.floor(Math.log(m)/Math.log(A));return parseFloat((m/Math.pow(A,ne)).toFixed(2))+" "+O[ne]},L=m=>m.startsWith("image/")?(0,ra.jsx)(Ja.Image,{className:"h-4 w-4"}):m.startsWith("text/")?(0,ra.jsx)(Ja.FileText,{className:"h-4 w-4"}):(0,ra.jsx)(Ja.File,{className:"h-4 w-4"}),R=m=>{let A=m.role==="assistant",O=m.role==="user",ne=Ka(m);return(0,ra.jsxs)("div",{className:s("flex items-start gap-3",O?"flex-row-reverse":""),children:[(0,ra.jsx)(Fe,{className:"h-8 w-8 shrink-0",children:(0,ra.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,ra.jsx)(Ja.User,{className:"h-4 w-4"}):(0,ra.jsx)(Ja.Bot,{className:"h-4 w-4"})})}),(0,ra.jsxs)("div",{className:s("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",O?"bg-primary text-primary-foreground":"bg-muted"),children:[ne&&(0,ra.jsx)("div",{className:"mb-2 last:mb-0",children:(0,ra.jsx)("p",{className:"text-sm",children:ne})}),m.parts.map((V,Y)=>{if(V.type==="text")return null;if(V.type==="file"){let I=V;return(0,ra.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,ra.jsxs)("div",{className:"flex items-center gap-2",children:[L(I.mediaType||"application/octet-stream"),(0,ra.jsx)("div",{className:"flex-1 min-w-0",children:(0,ra.jsx)("p",{className:"text-sm font-medium truncate",children:I.filename||I.url?.split("/").pop()||"File"})}),I.url&&(0,ra.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>window.open(I.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ra.jsx)(Ja.Download,{className:"h-4 w-4"})})]})},Y)}if(V.type.startsWith("tool-")){let I=V,re=V.type.replace("tool-","");if(re==="task")switch(I.state){case"input-available":return(0,ra.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},Y);case"output-available":return(0,ra.jsx)("div",{className:"mb-2",children:(0,ra.jsx)(Va,{data:{id:I.output?.id||I.input?.id,fetchLatest:!1,taskData:I.output||I.input}})},Y);case"output-error":return(0,ra.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",I.errorText]},Y);default:return null}if(re==="artefact")switch(I.state){case"input-available":return(0,ra.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},Y);case"output-available":return(0,ra.jsx)("div",{className:"mb-2",children:(0,ra.jsx)($a,{artefact:I.output?.description||"",taskId:I.output?.id||I.input?.id,taskData:I.output||I.input})},Y);case"output-error":return(0,ra.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",I.errorText]},Y);default:return null}return(0,ra.jsx)("div",{className:"mb-2",children:(0,ra.jsxs)(ue,{className:"w-full max-w-md",children:[(0,ra.jsx)(Te,{children:(0,ra.jsx)(Re,{className:"text-lg",children:re})}),(0,ra.jsxs)(xe,{children:[I.state==="input-available"&&(0,ra.jsxs)("p",{className:"text-sm",children:["Processing ",re,"..."]}),I.state==="output-available"&&(0,ra.jsx)("pre",{className:"text-sm",children:JSON.stringify(I.output,null,2)}),I.state==="output-error"&&(0,ra.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",I.errorText]})]})]})},Y)}if(V.type.startsWith("data-")){let I=V,re=V.type.replace("data-","");return re==="reference"?(0,ra.jsx)("div",{className:"mb-2",children:(0,ra.jsx)(ue,{className:"w-full",children:(0,ra.jsx)(xe,{className:"p-4",children:(0,ra.jsx)("div",{className:"space-ra-2",children:I.data?.references?.map((se,Xe)=>(0,ra.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,ra.jsx)(ce,{variant:"outline",children:se.type||"link"}),(0,ra.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ra.jsx)("p",{className:"text-sm font-medium truncate",children:se.title}),se.description&&(0,ra.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:se.description})]}),se.url&&(0,ra.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>window.open(se.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ra.jsx)(Ja.ExternalLink,{className:"h-4 w-4"})})]},Xe))})})})},Y):re==="menu"?(0,ra.jsx)("div",{className:"mb-2",children:(0,ra.jsxs)(ue,{className:"w-full",children:[(0,ra.jsx)(Te,{children:(0,ra.jsx)(Re,{className:"text-lg",children:I.data?.title})}),(0,ra.jsx)(xe,{children:(0,ra.jsx)("div",{className:"space-ra-2",children:I.data?.items?.map((se,Xe)=>(0,ra.jsx)(S,{variant:"outline",className:"w-full justify-start",onClick:se.action,children:(0,ra.jsxs)("div",{className:"text-left",children:[(0,ra.jsx)("p",{className:"font-medium",children:se.label}),se.description&&(0,ra.jsx)("p",{className:"text-xs text-muted-foreground",children:se.description})]})},Xe))})})]})},Y):(0,ra.jsx)("div",{className:"mb-2",children:(0,ra.jsxs)(ue,{className:"w-full max-w-md",children:[(0,ra.jsx)(Te,{children:(0,ra.jsx)(Re,{className:"text-lg",children:re})}),(0,ra.jsx)(xe,{children:(0,ra.jsx)("pre",{className:"text-sm",children:JSON.stringify(I.data,null,2)})})]})},Y)}return null})]})]})};return(0,ra.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${U||""}`,children:[(0,ra.jsxs)(ve,{ref:x,className:"flex-1 p-4 bg-background border-0",onDragOver:ie,onDragLeave:B,onDrop:Ne,children:[(0,ra.jsxs)("div",{className:s("space-ra-4",c&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,ra.jsx)(Dt.AnimatePresence,{children:e.map(m=>(0,ra.jsx)(Dt.motion.div,{initial:{opacity:0,ra:10},animate:{opacity:1,ra:0},className:s("flex gap-3",m.role==="user"?"flex-row-reverse":"flex-row"),children:R(m)},m.id))}),M&&(0,ra.jsxs)(Dt.motion.div,{initial:{opacity:0,ra:10},animate:{opacity:1,ra:0},exit:{opacity:0,ra:-10},className:"flex gap-3",children:[(0,ra.jsx)(Fe,{className:"h-8 w-8",children:(0,ra.jsx)(je,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ra.jsx)(Ja.Bot,{className:"h-4 w-4"})})}),(0,ra.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ra.jsx)(Fa,{capabilities:l,isOpen:M,onToggle:()=>C(!M),onActionSelect:W,className:"w-full"})})]}),a&&(0,ra.jsxs)(Dt.motion.div,{initial:{opacity:0,ra:10},animate:{opacity:1,ra:0},className:"flex gap-3",children:[(0,ra.jsx)(Fe,{className:"h-8 w-8",children:(0,ra.jsx)(je,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ra.jsx)(Ja.Bot,{className:"h-4 w-4"})})}),(0,ra.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ra.jsxs)("div",{className:"flex space-x-1",children:[(0,ra.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,ra.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,ra.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,ra.jsx)("div",{ref:k})]}),n.length>0&&(0,ra.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,ra.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(m=>(0,ra.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[L(m.file.type),(0,ra.jsx)("span",{className:"text-sm font-medium",children:m.file.name}),(0,ra.jsx)("span",{className:"text-xs text-muted-foreground",children:d(m.file.size)}),(0,ra.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>N(m.id),className:"h-6 w-6 p-0",children:(0,ra.jsx)(Ja.ra,{className:"h-4 w-4"})})]},m.id))})}),(0,ra.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,ra.jsxs)("div",{className:"flex gap-3",children:[(0,ra.jsx)(et,{value:t,onChange:m=>u(m.target.value),onKeyPress:T,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),r&&(0,ra.jsx)(S,{variant:"outline",size:"icon",onClick:()=>P.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ra.jsx)(Ja.Paperclip,{className:"h-4 w-4"})}),(0,ra.jsx)(S,{onClick:p,disabled:!t.trim()&&n.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ra.jsx)(Ja.Send,{className:"h-4 w-4"})})]}),(0,ra.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,ra.jsxs)(S,{onClick:()=>C(!M),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,ra.jsx)(Ja.Menu,{className:"h-3 w-3 mr-1"}),M?"Hide":"Show"," Capabilities"]}),(0,ra.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[_().map((m,A)=>(0,ra.jsx)(S,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>W(m.id,z),children:m.label},`context-${m.id}`)),_().length===0&&ee().map((m,A)=>(0,ra.jsx)(S,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:m.action,children:m.label},`suggestion-${A}`))]})]}),r&&(0,ra.jsx)("input",{ref:P,type:"file",multiple:!0,onChange:Q,className:"hidden"})]})]})}function di({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:l=[],capabilities:n=[],sidebarItems:c=[],notifications:r=[],sessions:u=[],onNewChat:p,onSessionSelect:T,onSessionDelete:v,onSessionEdit:N=()=>{},onBusinessUnitChange:D=()=>{},onNotificationRemove:U=()=>{},onRemoveAll:k=()=>{},onActionClick:x=()=>{},onSearch:P=L=>console.log("Search query:",L),initialTeam:M="design",currentSession:C=null,showCapabilities:z=!0,title:oe="Digital Colleagues",enableFileUpload:_=!0,maxFileSize:ee=10,allowedFileTypes:W=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:q="/headerlogo.png",appName:Q="Nuvia",tagline:ie="AI-Powered Workspace",actionIcon:B=(0,ra.jsx)(Ja.Users,{className:"mr-2 h-4 w-4"}),actionText:Ne="Collaborate",sidebarInitiallyClosed:d=!1}){let L=(0,qa.useChat)(e||{}),R=a?t||L:null,[m,A]=(0,Je.useState)(""),[O,ne]=(0,Je.useState)(!1),V=R?.messages||o,Y=m,I=R?.status==="submitted"||O,re=l||[],se={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"},[Xe,Xa]=(0,Je.useState)(()=>re.length===0?se:re.find(G=>G.id===M)||re[0]),[Qe,nt]=(0,Je.useState)([]),[Qa,Ya]=(0,Je.useState)(!1),Za=G=>{if(!G||!_)return;let ke=[];Array.from(G).forEach(le=>{if(le.size>ee*1024*1024){alert(`File ${le.name} is too large. Maximum size is ${ee}MB.`);return}if(W.length>0&&!W.some(st=>le.type.match(st))){alert(`File type ${le.type} is not allowed.`);return}let _t={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:le,status:"pending",progress:0};if(le.type.startsWith("image/")){let st=new FileReader;st.onload=io=>{nt(ro=>ro.map(Pt=>Pt.id===_t.id?{...Pt,preview:io.target?.result}:Pt))},st.readAsDataURL(le)}ke.push(_t)}),nt(le=>[...le,...ke])},eo=G=>{nt(ke=>ke.filter(le=>le.id!==G))},Kt=()=>{if(!(!Y.trim()&&Qe.length===0)){if(R){let G=Qe.length>0?to(Qe.map(ke=>ke.file)):void 0;R.sendMessage({text:Y,files:G},{body:{timestamp:Date.now()}}),A("")}else console.log("Message to send:",Y),console.log("Files to upload:",Qe),A(""),ne(!0),setTimeout(()=>{ne(!1)},1500);nt([])}},to=G=>{let ke=new DataTransfer;return G.forEach(le=>ke.items.add(le)),ke.files},ao=G=>{G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),Kt())},oo=G=>{A(G)};return(0,ra.jsx)(Ea,{sidebarItems:c||[],title:oe,notifications:r||[],businessUnits:re,currentBusinessUnit:Xe,onBusinessUnitChange:G=>{G&&(Xa(G),D?.(G))},onSearch:P,showTabs:!1,onActionClick:x,actionIcon:B,actionText:Ne,onNotificationRemove:U,onRemoveAll:k,logo:q,appName:Q,tagline:ie,sidebarInitiallyClosed:d,children:(0,ra.jsx)(Dt.AnimatePresence,{mode:"wait",children:(0,ra.jsx)(Dt.motion.div,{className:"flex-1 h-full",initial:{opacity:0,ra:10},animate:{opacity:1,ra:0},exit:{opacity:0,ra:-10},transition:{duration:.2},children:(0,ra.jsxs)("div",{className:"h-full flex",children:[(0,ra.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,ra.jsx)(za,{sessions:u||[],currentSession:C,teams:re,onNewChat:p,onSessionSelect:T,onSessionEdit:N,onSessionDelete:v})}),(0,ra.jsx)("div",{className:"flex-1 h-full p-2",children:(0,ra.jsx)(_a,{messages:V||[],input:Y,isTyping:I,currentSessionTitle:C?.title,capabilities:n||[],onInputChange:oo,onSendMessage:Kt,onKeyPress:ao,fileUploads:Qe,isDragOver:Qa,enableFileUpload:_,onFileUpload:Za,onRemoveFile:eo,onDragOver:Ya})})]})},"chat-interface")})})}0&&(module.exports={CopilotInterface});
|
|
5
|
+
"use strict";"use client";var go=Object.create;var pt=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)pt(e,a,{get:t[a],enumerable:!0})},Yt=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of bo(t))!ho.call(e,s)&&s!==a&&pt(e,s,{get:()=>t[s],enumerable:!(o=fo(t,s))||o.enumerable});return e};var $=(e,t,a)=>(a=e!=null?go(vo(e)):{},Yt(t||!e||!e.__esModule?pt(a,"default",{value:e,enumerable:!0}):a,e)),xo=e=>Yt(pt({},"__esModule",{value:!0}),e);var hi={};yo(hi,{CopilotInterface:()=>vi});module.exports=xo(hi);var to=require("@ai-sdk/react"),Ye=require("react"),Rt=require("framer-motion"),ao=require("lucide-react");var sa=require("clsx");var It="-",wo=e=>{let t=No(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let n=l.split(It);return n[0]===""&&n.length!==1&&n.shift(),ta(n,t)||Co(l)},getConflictingClassGroupIds:(l,n)=>{let m=a[l]||[];return n&&o[l]?[...m,...o[l]]:m}}},ta=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?ta(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let r=e.join(It);return t.validators.find(({validator:l})=>l(r))?.classGroupId},Zt=/^\[(.+)\]$/,Co=e=>{if(Zt.test(e)){let t=Zt.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(([r,l])=>{Mt(l,o,r,t)}),o},Mt=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let r=s===""?t:ea(t,s);r.classGroupId=a;return}if(typeof s=="function"){if(ko(s)){Mt(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([r,l])=>{Mt(l,ea(t,r),a,o)})})},ea=(e,t)=>{let a=e;return t.split(It).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 s=o.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([l,n])=>[t+l,n])):r);return[a,s]}):e,Po=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(r,l)=>{a.set(r,l),t++,t>e&&(t=0,o=a,a=new Map)};return{get(r){let l=a.get(r);if(l!==void 0)return l;if((l=o.get(r))!==void 0)return s(r,l),l},set(r,l){a.has(r)?a.set(r,l):s(r,l)}}},aa="!",To=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],r=t.length,l=n=>{let m=[],u=0,D=0,f;for(let x=0;x<n.length;x++){let S=n[x];if(u===0){if(S===s&&(o||n.slice(x,x+r)===t)){m.push(n.slice(D,x)),D=x+r;continue}if(S==="/"){f=x;continue}}S==="["?u++:S==="]"&&u--}let y=m.length===0?n:n.substring(D),T=y.startsWith(aa),E=T?y.substring(1):y,R=f&&f>D?f-D:void 0;return{modifiers:m,hasImportantModifier:T,baseClassName:E,maybePostfixModifierPosition:R}};return a?n=>a({className:n,parseClassName:l}):l},Ro=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},So=e=>({cache:Po(e.cacheSize),parseClassName:To(e),...wo(e)}),Ao=/\s+/,Mo=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,r=[],l=e.trim().split(Ao),n="";for(let m=l.length-1;m>=0;m-=1){let u=l[m],{modifiers:D,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:T}=a(u),E=!!T,R=o(E?y.substring(0,T):y);if(!R){if(!E){n=u+(n.length>0?" "+n:n);continue}if(R=o(y),!R){n=u+(n.length>0?" "+n:n);continue}E=!1}let x=Ro(D).join(":"),S=f?x+aa:x,z=S+R;if(r.includes(z))continue;r.push(z);let w=s(R,E);for(let B=0;B<w.length;++B){let X=w[B];r.push(S+X)}n=u+(n.length>0?" "+n:n)}return n};function Io(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=oa(t))&&(o&&(o+=" "),o+=a);return o}var oa=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=oa(e[o]))&&(a&&(a+=" "),a+=t);return a};function Bo(e,...t){let a,o,s,r=l;function l(m){let u=t.reduce((D,f)=>f(D),e());return a=So(u),o=a.cache.get,s=a.cache.set,r=n,n(m)}function n(m){let u=o(m);if(u)return u;let D=Mo(m,a);return s(m,D),D}return function(){return r(Io.apply(null,arguments))}}var U=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},ia=/^\[(?:([a-z-]+):)?(.+)\]$/ca,Lo=/^\d+\/\d+$/,Eo=new Set(["px","full","screen"]),zo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Uo=/\d+(%|px|r?em|[sdl]?ca([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|ca|ca|min|max))|\ca(calc|min|max|clamp)\(.+\)|^0$/,Fo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,jo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)ca-?((\d+)?\.?(\d+)[a-z]+|0)/,Ho=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Te=e=>qe(e)||Eo.has(e)||Lo.test(e),Le=e=>_e(e,"length",_o),qe=e=>!!e&&!Number.isNaN(Number(e)),At=e=>_e(e,"number",qe),tt=e=>!!e&&Number.isInteger(Number(e)),Oo=e=>e.endsWith("%")&&qe(e.slice(0,-1)),h=e=>ia.test(e),Ee=e=>zo.test(e),Vo=new Set(["length","size","percentage"]),Go=e=>_e(e,Vo,ra),Wo=e=>_e(e,"position",ra),$o=new Set(["image","url"]),Ko=e=>_e(e,$o,Xo),qo=e=>_e(e,"",Jo),at=()=>!0,_e=(e,t,a)=>{let o=ia.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},_o=e=>Uo.test(e)&&!Fo.test(e),ra=()=>!1,Jo=e=>jo.test(e),Xo=e=>Ho.test(e);var Qo=()=>{let e=U("colors"),t=U("spacing"),a=U("blur"),o=U("brightness"),s=U("borderColor"),r=U("borderRadius"),l=U("borderSpacing"),n=U("borderWidth"),m=U("contrast"),u=U("grayscale"),D=U("hueRotate"),f=U("invert"),y=U("gap"),T=U("gradientColorStops"),E=U("gradientColorStopPositions"),R=U("inset"),x=U("margin"),S=U("opacity"),z=U("padding"),w=U("saturate"),B=U("scale"),X=U("sepia"),Q=U("skew"),Y=U("space"),J=U("translate"),V=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",h,t],M=()=>[h,t],Pe=()=>["",Te,Le],d=()=>["auto",qe,h],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],p=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",h],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[qe,h];return{cacheSize:500,separator:":",theme:{colors:[at],spacing:[Te,Le],blur:["none","",Ee,h],brightness:W(),borderColor:[e],borderRadius:["none","","full",Ee,h],borderSpacing:M(),borderWidth:Pe(),contrast:W(),grayscale:H(),hueRotate:W(),invert:H(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Oo,Le],inset:ne(),margin:ne(),opacity:W(),padding:M(),saturate:W(),scale:W(),sepia:H(),skew:W(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[Ee]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),h]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",tt,h]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",tt,h]}],"grid-cols":[{"grid-cols":[at]}],"col-start-end":[{col:["auto",{span:["full",tt,h]},h]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[at]}],"row-start-end":[{row:["auto",{span:[tt,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:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...p()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...p(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...p(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[z]}],px:[{px:[z]}],py:[{py:[z]}],ps:[{ps:[z]}],ca:[{ca:[z]}],pt:[{pt:[z]}],pr:[{pr:[z]}],pb:[{pb:[z]}],pl:[{pl:[z]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],ca:[{ca:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[Y]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Y]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,t]}],"min-w":[{"min-w":[h,t,"min","max","fit"]}],"max-w":[{"max-w":[h,t,"none","full","min","max","fit","prose",{screen:[Ee]},Ee]}],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",Ee,Le]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",At]}],"font-family":[{font:[at]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",qe,At]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Te,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:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Te,Le]}],"underline-offset":[{"underline-offset":["auto",Te,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:M()}],"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:[...I(),Wo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Go]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","ca","bl","l","tl"]},Ko]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-ca":[{"rounded-ca":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-se":[{"rounded-se":[r]}],"rounded-ee":[{"rounded-ee":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-ca":[{"border-ca":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:k()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-ca":[{"border-ca":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[Te,h]}],"outline-w":[{outline:[Te,Le]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Te,Le]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ee,qo]}],"shadow-color":[{shadow:[at]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",Ee,h]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[D]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[X]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[B]}],"scale-x":[{"scale-x":[B]}],"scale-y":[{"scale-y":[B]}],rotate:[{rotate:[tt,h]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"skew-x":[{"skew-x":[Q]}],"skew-y":[{"skew-y":[Q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-ca":[{"scroll-ca":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-ca":[{"scroll-ca":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Te,Le,At]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","ca","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","ca","mr","mb","ml"],mx:["mr","ml"],my:["ca","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-ca","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-ca":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-ca","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-ca"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-ca","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-ca"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-ca","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-ca","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-ca","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var na=Bo(Qo);function c(...e){return na((0,sa.clsx)(e))}var yt=$(require("react")),jt=$(require("next/link"));var la=require("class-variance-authority");var ca=require("react/jsx-runtime"),Yo=(0,la.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,ca.jsx)("div",{className:c(Yo({variant:t}),e),...a})}var da=require("@radix-ui/react-slot"),ma=$(require("react")),Zo=(0,la.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"}}}),P=ma.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},r)=>(0,ca.jsx)(e?da.Slot:"button",{className:c(Zo({className:t,size:a,variant:o})),ref:r,...s}));P.displayName="Button";var ga=$(require("react"));var ot=ga.forwardRef(({className:e,type:t,...a},o)=>(0,ca.jsx)("input",{type:t,className:c("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));ot.displayName="Input";var Bt=$(require("react")),me=$(require("@radix-ui/react-scroll-area"));var xe=Bt.forwardRef(({className:e,children:t,...a},o)=>(0,ca.jsxs)(me.Root,{ref:o,className:c("relative overflow-hidden",e),...a,children:[(0,ca.jsx)(me.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ca.jsx)(ba,{}),(0,ca.jsx)(me.Corner,{})]}));xe.displayName=me.Root.displayName;var ba=Bt.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,ca.jsx)(me.ScrollAreaScrollbar,{ref:o,orientation:t,className:c("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,ca.jsx)(me.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ba.displayName=me.ScrollAreaScrollbar.displayName;var it=$(require("react")),K=$(require("@radix-ui/react-dialog"));var ha=K.Root;var ei=K.Portal;var ya=it.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(K.Overlay,{ref:a,className:c("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ya.displayName=K.Overlay.displayName;var Lt=it.forwardRef(({className:e,children:t,...a},o)=>(0,ca.jsxs)(ei,{children:[(0,ca.jsx)(ya,{}),(0,ca.jsxs)(K.Content,{ref:o,className:c("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,ca.jsxs)(K.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,ca.jsx)(ao.X,{className:"h-4 w-4"}),(0,ca.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Lt.displayName=K.Content.displayName;var Et=({className:e,...t})=>(0,ca.jsx)("div",{className:c("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Et.displayName="DialogHeader";var ti=({className:e,...t})=>(0,ca.jsx)("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ti.displayName="DialogFooter";var zt=it.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(K.Title,{ref:a,className:c("text-lg font-semibold leading-none tracking-tight",e),...t}));zt.displayName=K.Title.displayName;var ai=it.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(K.Description,{ref:a,className:c("text-sm text-muted-foreground",e),...t}));ai.displayName=K.Description.displayName;var rt=$(require("@radix-ui/react-checkbox")),wa=$(require("react")),Ut=wa.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(rt.Root,{className:c("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,ca.jsx)(rt.Indicator,{className:c("flex items-center justify-center text-current"),children:(0,ca.jsx)(ao.Check,{className:"h-4 w-4"})})}));Ut.displayName=rt.Root.displayName;var we=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Na=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,ca.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,ca.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,ca.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,ca.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,ca.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,ca.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,ca.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,ca.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,ca.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,ca.jsx)(ao.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],ft=[{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 Ft=[{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}],ut=[{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}],vt=[{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=[...vt,{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=[...ft,{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}],gt={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:[]},Ca={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:vt.filter(e=>e.epicId==="1")};var Hi={empty:{initialProjects:gt.projects,initialEpics:gt.epics,initialSprints:gt.sprints,initialTasks:gt.tasks},default:{initialProjects:ft,initialEpics:Ft,initialSprints:ut,initialTasks:vt},highDensity:{initialProjects:ft,initialEpics:Ft,initialSprints:ut,initialTasks:oi},singleEpic:{initialProjects:ft,initialEpics:Ca.epics,initialSprints:ut,initialTasks:Ca.tasks},multipleProjects:{initialProjects:ii,initialEpics:Ft,initialSprints:ut,initialTasks:vt}},bt=[{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(we),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(we),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(we),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(we),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(we),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(we),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(we),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(we),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(we),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(we),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Oi=[{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:bt.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:bt.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:bt.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 Vi=bt.filter(e=>e.type==="digital");function ka(e,t){let[a,o]=(0,Ye.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),s=r=>{try{o(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,Ye.useEffect)(()=>{s(a)},[]),[a,s]}function Ht({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=Na[0],onBusinessUnitChange:r,onSearch:l,className:n,logo:m="/headerlogo.png",appName:u="Nuvia",tagline:D="Collaboration Platform"}){let[f,y]=yt.useState({}),[T,E]=ka("sidebar-favorites",{}),[R,x]=yt.useState(null),[S,z]=yt.useState(""),w=d=>{y(I=>({...I,[d]:!I[d]}))},B=d=>{r?.(d)},X=()=>{S.trim()&&l?.(S.trim())},Q=d=>{d.key==="Enter"&&(d.preventDefault(),X())},Y=(d,I)=>{let k=T[d]||[],le=k.includes(I)?k.filter(p=>p!==I):k.concat(I);E({...T,[d]:le})},J=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let I=T[d.id]||[],k=d.items.filter(p=>I.includes(p.id)),le=d.items.filter(p=>!I.includes(p.id));return[...k,...le].slice(0,d.maxItems)},V=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,ee=e,ne=d=>{let I=V(d),k=J(d),le=(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,ca.jsx)("span",{children:d.title})]}),d.badge&&(0,ca.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,ca.jsx)(ao.ChevronDown,{className:c("ml-2 h-4 w-4 transition-transform",f[d.title]?"rotate-180":"")})]}),p=c("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,ca.jsx)(jt.default,{href:d.url,className:p,onClick:a?o:void 0,children:le}):(0,ca.jsx)("button",{className:p,onClick:()=>d.items&&w(d.title),children:le})},M=()=>{let d=e.find(k=>k.id===R);if(!d||!d.items||!d.maxItems)return null;let I=T[d.id]||[];return(0,ca.jsx)(ha,{open:!!R,onOpenChange:k=>!k&&x(null),children:(0,ca.jsxs)(Lt,{className:"sm:max-w-md",children:[(0,ca.jsxs)(Et,{children:[(0,ca.jsxs)(zt,{children:["Manage ",d.title," Favorites"]}),(0,ca.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,ca.jsx)(xe,{className:"max-h-96 pr-4",children:(0,ca.jsx)("div",{className:"space-y-4",children:d.items.map(k=>(0,ca.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ca.jsx)(Ut,{id:k.id,checked:I.includes(k.id),onCheckedChange:()=>Y(d.id,k.id),disabled:!I.includes(k.id)&&I.length>=(d.maxItems||0)}),(0,ca.jsxs)("label",{htmlFor:k.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:[k.title,k.badge&&(0,ca.jsx)(de,{variant:"outline",className:"text-xs",children:k.badge})]})]},k.id))})})]})})},Pe=(0,ca.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,ca.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ca.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,ca.jsx)("img",{src:m,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,ca.jsxs)("div",{children:[(0,ca.jsx)("h2",{className:"font-semibold",children:u}),(0,ca.jsx)("p",{className:"text-xs text-muted-foreground",children:D})]})]}),a&&(0,ca.jsx)(P,{variant:"ghost",size:"icon",onClick:o,children:(0,ca.jsx)(ao.X,{className:"h-5 w-5"})})]}),(0,ca.jsx)("div",{className:"px-3 py-2",children:(0,ca.jsxs)("div",{className:"relative",children:[(0,ca.jsx)(ao.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ca.jsx)(ot,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:S,onChange:d=>z(d.target.value),onKeyPress:Q})]})}),(0,ca.jsx)(xe,{className:"flex-1 px-3 py-2",children:(0,ca.jsx)("div",{className:"space-y-1",children:ee.map(d=>(0,ca.jsxs)("div",{className:"mb-1",children:[ne(d),d.items&&f[d.title]&&(0,ca.jsxs)("div",{className:"ca-1 ml-6 space-y-1 border-l pl-3",children:[J(d).map(I=>(0,ca.jsxs)(jt.default,{href:I.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[I.title,I.badge&&(0,ca.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:I.badge})]},I.id)),V(d)&&d.items&&d.items.length>J(d).length&&(0,ca.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-J(d).length," more available"]})]})]},d.id))})}),(0,ca.jsx)("div",{className:"p-3",children:(0,ca.jsx)("div",{className:"space-y-1",children:(0,ca.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,ca.jsx)(ao.Settings,{className:"h-5 w-5"}),(0,ca.jsx)("span",{children:"Settings"})]})})}),(0,ca.jsx)(M,{})]});return a?(0,ca.jsx)("div",{className:c("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:Pe}):(0,ca.jsx)("div",{className:c("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:Pe})}var xt=$(require("react")),Re=$(require("@radix-ui/react-avatar"));var Oe=xt.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(Re.Root,{ref:a,className:c("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Oe.displayName=Re.Root.displayName;var Ot=xt.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(Re.Image,{ref:a,className:c("aspect-square h-full w-full",e),...t}));Ot.displayName=Re.Image.displayName;var Ve=xt.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(Re.Fallback,{ref:a,className:c("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ve.displayName=Re.Fallback.displayName;var Da=$(require("react")),ve=$(require("@radix-ui/react-tooltip"));var Ct=ve.Provider,Nt=ve.Root,kt=ve.Trigger,nt=Da.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ca.jsx)(ve.Portal,{children:(0,ca.jsx)(ve.Content,{ref:o,sideOffset:t,className:c("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));nt.displayName=ve.Content.displayName;var Pa=require("next-themes");function Ta(){let{setTheme:e,theme:t}=(0,Pa.useTheme)();return(0,ca.jsx)(Ct,{children:(0,ca.jsxs)(Nt,{children:[(0,ca.jsx)(kt,{asChild:!0,children:(0,ca.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,ca.jsx)(ao.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,ca.jsx)(ao.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,ca.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,ca.jsx)(nt,{children:"Toggle theme"})]})})}function Ra({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:r}){let l=e.filter(u=>!u.read),n=l.length,m=u=>{switch(u){case"info":return(0,ca.jsx)(ao.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,ca.jsx)(ao.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,ca.jsx)(ao.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,ca.jsx)(ao.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,ca.jsx)(Rt.AnimatePresence,{children:t&&(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsx)(Rt.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,ca.jsx)(Rt.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:c("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",r),children:(0,ca.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between border-ca p-4",children:[(0,ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ca.jsx)(ao.Bell,{className:"h-5 w-5"}),(0,ca.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),n>0&&(0,ca.jsxs)(de,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[n," new"]})]}),(0,ca.jsxs)(P,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,ca.jsx)(ao.X,{className:"h-5 w-5"}),(0,ca.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n>0&&(0,ca.jsxs)("div",{className:"flex items-center justify-between border-ca p-2",children:[(0,ca.jsxs)("span",{className:"text-sm text-muted-foreground",children:[n," unread notification",n!==1?"s":""]}),(0,ca.jsx)(P,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),l.length>0?(0,ca.jsx)(xe,{className:"flex-1",children:(0,ca.jsx)("div",{className:"divide-y",children:l.map(u=>(0,ca.jsxs)("div",{className:c("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,ca.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:m(u.type)}),(0,ca.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ca.jsx)("p",{className:"font-medium",children:u.title}),(0,ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ca.jsx)("p",{className:"text-xs text-muted-foreground",children:u.time}),(0,ca.jsx)(P,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(u.id),title:"Dismiss",children:(0,ca.jsx)(ao.Check,{className:"h-3 w-3"})})]})]}),(0,ca.jsx)("p",{className:"text-sm text-muted-foreground",children:u.description}),u.actionLabel&&(0,ca.jsxs)(P,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:u.onAction,children:[u.actionLabel,(0,ca.jsx)(ao.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},u.id))})}):(0,ca.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,ca.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,ca.jsx)(ao.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,ca.jsx)("h3",{className:"ca-4 text-lg font-medium",children:"No notifications"}),(0,ca.jsx)("p",{className:"ca-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Ge=$(require("@radix-ui/react-tabs"));function Sa({className:e,...t}){return(0,ca.jsx)(Ge.Root,{"data-slot":"tabs",className:c("flex flex-col gap-2",e),...t})}function Aa({className:e,...t}){return(0,ca.jsx)(Ge.List,{"data-slot":"tabs-list",className:c("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Ma({className:e,...t}){return(0,ca.jsx)(Ge.Trigger,{"data-slot":"tabs-trigger",className:c("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Se=$(require("react")),N=$(require("@radix-ui/react-dropdown-menu")),Je=require("@radix-ui/react-icons");var Ia=N.Root,Ba=N.Trigger;var ri=Se.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,ca.jsxs)(N.SubTrigger,{ref:s,className:c("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,ca.jsx)(Je.ChevronRightIcon,{className:"ml-auto"})]}));ri.displayName=N.SubTrigger.displayName;var ni=Se.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(N.SubContent,{ref:a,className:c("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ni.displayName=N.SubContent.displayName;var Gt=Se.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ca.jsx)(N.Portal,{children:(0,ca.jsx)(N.Content,{ref:o,sideOffset:t,className:c("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Gt.displayName=N.Content.displayName;var Wt=Se.forwardRef(({className:e,inset:t,...a},o)=>(0,ca.jsx)(N.Item,{ref:o,className:c("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Wt.displayName=N.Item.displayName;var si=Se.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,ca.jsxs)(N.CheckboxItem,{ref:s,className:c("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,ca.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ca.jsx)(N.ItemIndicator,{children:(0,ca.jsx)(Je.CheckIcon,{className:"h-4 w-4"})})}),t]}));si.displayName=N.CheckboxItem.displayName;var li=Se.forwardRef(({className:e,children:t,...a},o)=>(0,ca.jsxs)(N.RadioItem,{ref:o,className:c("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,ca.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ca.jsx)(N.ItemIndicator,{children:(0,ca.jsx)(Je.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));li.displayName=N.RadioItem.displayName;var ci=Se.forwardRef(({className:e,inset:t,...a},o)=>(0,ca.jsx)(N.Label,{ref:o,className:c("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));ci.displayName=N.Label.displayName;var di=Se.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(N.Separator,{ref:a,className:c("-mx-1 my-1 h-px bg-muted",e),...t}));di.displayName=N.Separator.displayName;var pi=({className:e,...t})=>(0,ca.jsx)("span",{className:c("ml-auto text-xs tracking-widest opacity-60",e),...t});pi.displayName="DropdownMenuShortcut";function Ea({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:r=6}){let l=a.find(n=>n.value===e);return(0,ca.jsxs)($t.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,ca.jsx)("div",{className:"hidden md:block",children:(0,ca.jsx)(Sa,{value:e,onValueChange:t,children:(0,ca.jsx)(Aa,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,ca.jsx)($t.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,ca.jsx)(Ma,{value:n.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,ca.jsx)("div",{className:"md:hidden",children:(0,ca.jsxs)(Ia,{children:[(0,ca.jsx)(Ba,{asChild:!0,children:(0,ca.jsxs)(P,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[l?.label||"Select",(0,ca.jsx)(ao.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,ca.jsx)(Gt,{align:"center",className:"w-[180px]",children:a.map(n=>(0,ca.jsx)(Wt,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function za({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:r,activeTab:l="assistant",onTabChange:n,showTabs:m=!0,tabOptions:u=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:D,actionIcon:f=(0,ca.jsx)(ao.Bot,{className:"mr-2 h-4 w-4"}),actionText:y="Action",onNotificationRemove:T,onRemoveAll:E,logo:R="/headerlogo.png",appName:x="Nuvia",tagline:S="Collaboration Platform"}){let[z,w]=(0,Ye.useState)(!1),[B,X]=(0,Ye.useState)(t),Q=B.filter(V=>!V.read).length,Y=V=>{X(ee=>ee.filter(ne=>ne.id!==V)),T?.(V)},J=()=>{X(V=>V.filter(ee=>ee.read)),E?.()};return(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${r||""}`,children:[(0,ca.jsx)(P,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,ca.jsx)(ao.Menu,{className:"h-5 w-5"})}),(0,ca.jsx)(P,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,ca.jsx)(ao.PanelLeft,{className:"h-5 w-5"})}),!s&&(0,ca.jsxs)(Rt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,ca.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,ca.jsx)("img",{src:R,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,ca.jsxs)("div",{children:[(0,ca.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,ca.jsx)("p",{className:"text-xs text-muted-foreground",children:S})]})]}),(0,ca.jsxs)("div",{className:"flex flex-1 items-center",children:[m&&(0,ca.jsx)(Ea,{activeTab:l,onTabChange:n,tabOptions:u}),(0,ca.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,ca.jsx)(Rt.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,ca.jsx)(Rt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ca.jsxs)(P,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:D,children:[f,y]})})}),(0,ca.jsx)(Ta,{}),(0,ca.jsx)(Ct,{children:(0,ca.jsxs)(Nt,{children:[(0,ca.jsx)(kt,{asChild:!0,children:(0,ca.jsx)(Rt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ca.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>w(!0),children:[(0,ca.jsx)(Rt.motion.div,{animate:Q>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:Q>0?1/0:0,repeatDelay:3},children:(0,ca.jsx)(ao.Bell,{className:"h-5 w-5"})}),Q>0&&(0,ca.jsx)(Rt.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:Q})]})})}),(0,ca.jsx)(nt,{children:"Notifications"})]})}),(0,ca.jsx)(Rt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ca.jsxs)(Oe,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,ca.jsx)(Ot,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,ca.jsx)(Ve,{})]})})]})]})]}),(0,ca.jsx)(Ra,{notifications:B,open:z,onClose:()=>w(!1),onNotificationRemove:Y,onRemoveAll:J})]})}var Ua=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,ca.jsx)(ao.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function ja({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=Ua[0],onBusinessUnitChange:r,onSearch:l,businessUnits:n=Ua,activeTab:m,onTabChange:u,showTabs:D=!1,onActionClick:f,actionIcon:y,actionText:T="Action",onNotificationRemove:E,onRemoveAll:R,logo:x="/headerlogo.png",appName:S="Nuvia",tagline:z="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[B,X]=(0,Ye.useState)(!w),[Q,Y]=(0,Ye.useState)(!1),[J,V]=(0,Ye.useState)(s),ee=ne=>{V(ne),r?.(ne)};return(0,ca.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[Q&&(0,ca.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>Y(!1)}),(0,ca.jsx)("div",{className:"md:hidden",children:(0,ca.jsx)(Ht,{items:e,isOpen:Q,isMobile:!0,onClose:()=>Y(!1),currentBusinessUnit:J,onBusinessUnitChange:ee,onSearch:l,logo:x,appName:S,tagline:z})}),(0,ca.jsx)("div",{className:"hidden md:block",children:(0,ca.jsx)(Ht,{items:e,isOpen:B,isMobile:!1,currentBusinessUnit:J,onBusinessUnitChange:ee,onSearch:l,logo:x,appName:S,tagline:z})}),(0,ca.jsxs)("div",{className:c("min-h-screen fixed w-full transition-all duration-300 ease-in-out",B?"md:pl-64":"md:pl-0"),children:[(0,ca.jsx)(za,{title:a,notifications:o,onToggleSidebar:()=>X(!B),onToggleMobileMenu:()=>Y(!0),sidebarOpen:B,activeTab:m,onTabChange:u,showTabs:D,onActionClick:f,actionIcon:y,actionText:T,onNotificationRemove:E,onRemoveAll:R,logo:x,appName:S,tagline:z}),(0,ca.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var We=$(require("react"));var ge=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ge.displayName="Card";var Ae=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("flex flex-col space-y-1.5 p-6",e),...t}));Ae.displayName="CardHeader";var Me=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("font-semibold leading-none tracking-tight",e),...t}));Me.displayName="CardTitle";var qt=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("text-sm text-muted-foreground",e),...t}));qt.displayName="CardDescription";var Ne=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("p-6 pt-0",e),...t}));Ne.displayName="CardContent";var lt=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("flex items-center p-6 pt-0",e),...t}));lt.displayName="CardFooter";function Ha({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:s,onSessionEdit:r,onSessionDelete:l,className:n}){return(0,ca.jsx)("div",{className:`space-y-4 h-full ${n||""}`,children:(0,ca.jsxs)(ge,{className:"shadow-sm h-full",children:[(0,ca.jsx)("div",{className:"p-4 border-ca",children:(0,ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ca.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,ca.jsx)(ao.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,ca.jsxs)(P,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,ca.jsx)(ao.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,ca.jsx)(xe,{className:"h-[600px]",children:(0,ca.jsx)("div",{className:"p-2",children:e.length===0?(0,ca.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(m=>(0,ca.jsx)("div",{className:c("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===m.id&&"bg-muted border"),onClick:()=>s(m),children:(0,ca.jsx)("div",{className:"flex items-start gap-3",children:(0,ca.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,ca.jsx)("h4",{className:"font-medium text-sm truncate",children:m.title}),(0,ca.jsx)("div",{className:"flex items-center gap-1",children:(0,ca.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[r&&(0,ca.jsx)(P,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded",onClick:u=>{u.stopPropagation(),r(m.id)},children:(0,ca.jsx)(ao.Edit3,{className:"h-3 w-3"})}),l&&(0,ca.jsx)(P,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded text-destructive hover:text-destructive",onClick:u=>{u.stopPropagation(),l(m.id)},children:(0,ca.jsx)(ao.Trash2,{className:"h-3 w-3"})})]})})]}),(0,ca.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:m.lastMessage})]})})},m.id))})})]})})}var Oa={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]};function _t(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Va({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:s,colorScheme:r=Oa,className:l}){let[n,m]=(0,Ye.useState)([]),[u,D]=(0,Ye.useState)([]),f=n[n.length-1],y=f?.children||e,T=(w,B)=>{switch(w.type){case"category":return r.categories[B%r.categories.length];case"list":return r.lists[B%r.lists.length];case"item":return r.items[B%r.items.length];default:return r.primary}},E=(0,Ye.useMemo)(()=>({path:n,selectedItems:u,filters:{}}),[n,u]);(0,Ye.useEffect)(()=>{s&&s(E)},[E,s]);let R=w=>{w.type==="category"||w.type==="list"?m([...n,w]):w.type==="item"&&D([...u,w])},x=()=>{m(n.slice(0,-1))},S=w=>{m(n.slice(0,w+1))},z=()=>f?.actions?f.actions:[];return t?(0,ca.jsxs)("div",{className:c("w-full",l),children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ca.jsxs)("div",{className:"flex items-center gap-2",children:[n.length>0&&(0,ca.jsx)(Rt.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:c("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,ca.jsx)(ao.ChevronLeft,{className:c("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,ca.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,ca.jsx)(Rt.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:c("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,ca.jsx)(ao.X,{className:c("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),n.length>0&&(0,ca.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,ca.jsx)(Rt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>m([]),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ca.jsxs)("span",{className:"relative",children:["Capabilities",(0,ca.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"})]})}),n.map((w,B)=>(0,ca.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ca.jsx)(ao.ChevronRight,{className:"h-2 w-2"}),(0,ca.jsx)(Rt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>S(B),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ca.jsxs)("span",{className:"relative",children:[w.name,(0,ca.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"})]})})]},w.id))]}),(0,ca.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,ca.jsx)(Rt.AnimatePresence,{mode:"wait",children:(0,ca.jsx)(Rt.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:f?.type==="list"&&f.data?(0,ca.jsx)(gi,{data:f.data,onItemSelect:w=>D([...u,w]),colorScheme:r}):(0,ca.jsx)(mi,{capabilities:y,onSelect:R,colorScheme:r})},f?.id||"root")})})]}):(0,ca.jsxs)(P,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,ca.jsx)(ao.Menu,{className:"h-4 w-4"}),(0,ca.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function mi({capabilities:e,onSelect:t,colorScheme:a}){return(0,ca.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,ca.jsx)(ui,{capability:o,onClick:()=>t(o),color:a.categories[s%a.categories.length]},o.id))})}function ui({capability:e,onClick:t,selected:a,color:o}){return(0,ca.jsxs)(Rt.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:c("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,ca.jsx)("div",{className:c("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,ca.jsxs)("span",{className:"truncate relative",children:[e.name,(0,ca.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,ca.jsx)(ao.ChevronRight,{className:c("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,ca.jsx)(de,{variant:"secondary",className:c("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,ca.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,ca.jsxs)(Rt.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:c("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,ca.jsx)("div",{className:c("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[s%a.items.length])}),(0,ca.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ca.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,ca.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,ca.jsx)("div",{className:c("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,ca.jsx)(de,{variant:"secondary",className:c("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 Ga({taskId:e,polling:t=!0,system:a="payload"}){let[o,s]=(0,Ye.useState)(null),[r,l]=(0,Ye.useState)(!1),[n,m]=(0,Ye.useState)(null),u=async(f=!0)=>{if(e){f&&l(!0);try{let y=await fetch(`/api/tasks/${e}`);if(!y.ok)throw new Error(`Failed to fetch task: ${y.statusText}`);let T=await y.json();s(T)}catch(y){console.error("Error fetching task:",y),m(y instanceof Error?y:new Error("Unknown error occurred"))}finally{f&&l(!1)}}},D=()=>u(!1);return(0,Ye.useEffect)(()=>{e&&u(!0);let f=null;return e&&t&&(f=setInterval(D,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:o,loading:r,error:n}}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 Ka({data:e}){let{id:t,system:a,fetchLatest:o,taskData:s,error:r}=e||{};if(!t)return null;let l=null,n=!0,m=r,u=o!==void 0?o:!0;if(l=s||{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:u,taskData:l,error:m}),u){let{task:T,loading:E,error:R}=Ga({taskId:t,system:a});l=T,n=E,m=R}else n=!1;let D=fi(l?.status||"todo"),f=bi(l?.status||"todo"),y=l?.dateLogged||new Date().toISOString();try{let T=new Date(l?.dateLogged||"");isNaN(T.getTime())||(y=(0,$a.formatDistanceToNow)(T,{addSuffix:!0}))}catch{}return(0,ca.jsxs)(ge,{className:c("w-full max-w-md shadow-md",m&&"border border-destructive"),children:[(0,ca.jsxs)(Ae,{className:"pb-2",children:[(0,ca.jsxs)("div",{className:"flex justify-between items-start",children:[(0,ca.jsx)(Me,{className:"text-lg font-semibold",children:n?"Loading...":l?.name||"Task"}),(0,ca.jsx)(de,{className:`${D}`,children:f})]}),l?.project&&(0,ca.jsxs)(qt,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,ca.jsx)(Ne,{className:"pb-2",children:n?(0,ca.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):m?(0,ca.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ca.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,ca.jsx)(lt,{className:"pt-2 flex items-center justify-between",children:(0,ca.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ca.jsx)(ao.Clock,{className:"h-3 w-3 mr-1"}),(0,ca.jsxs)("span",{children:["Created ",y]}),(0,ca.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ca.jsxs)("span",{children:["Task #",t]})]})})]})}function Ja({artefact:e,taskId:t,taskData:a,loading:o=!1,error:s=null}){let r=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=r.dateLogged;try{let n=new Date(r.dateLogged);isNaN(n.getTime())||(l=(0,$a.formatDistanceToNow)(n,{addSuffix:!0}))}catch{}return(0,ca.jsxs)(ge,{className:"w-full max-w-md shadow-md",children:[(0,ca.jsx)(Ae,{className:"pb-2",children:(0,ca.jsx)("div",{className:"flex justify-between items-start",children:(0,ca.jsx)(Me,{className:"text-lg font-semibold",children:o?"Loading...":r.name})})}),(0,ca.jsx)(Ne,{className:"pb-2",children:o?(0,ca.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,ca.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ca.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,ca.jsx)(lt,{className:"pt-2 flex items-center justify-between",children:(0,ca.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ca.jsx)(ao.Clock,{className:"h-3 w-3 mr-1"}),(0,ca.jsxs)("span",{children:["Created ",l]}),(0,ca.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ca.jsxs)("span",{children:["Task #",r.id]})]})})]})}function Xa(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}var Ya=$(require("react"));var Qa=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:s="This endpoint requires authentication to sync functions."})=>{let[r,l]=(0,Ye.useState)(!1),[n,m]=(0,Ye.useState)(""),u=()=>{if(!t){m("No authentication URL provided");return}l(!0),m("");try{let f=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!f){m("Popup blocked. Please allow popups for this site and try again."),l(!1);return}let y=setInterval(()=>{try{f.closed&&(clearInterval(y),l(!1),o(),a())}catch{}},1e3);setTimeout(()=>{f.closed||(f.close(),clearInterval(y),l(!1),m("Authentication timed out. Please try again."))},6e5)}catch{m("Failed to open authentication window"),l(!1)}},D=async()=>{try{await navigator.clipboard.writeText(t),m("")}catch{m("Failed to copy URL to clipboard")}};return e?(0,ca.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,ca.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,ca.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,ca.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s}),n&&(0,ca.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:n}),(0,ca.jsxs)("div",{className:"flex gap-2",children:[(0,ca.jsx)("button",{onClick:u,disabled:r||!t,className:`
|
|
6
|
+
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
7
|
+
${r||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
8
|
+
`,children:r?"Authenticating...":"Authenticate"}),(0,ca.jsx)("button",{onClick:D,disabled:!t,className:`
|
|
9
|
+
px-4 py-2 text-white border-none rounded text-sm
|
|
10
|
+
${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
|
|
11
|
+
`,children:"Copy URL"}),(0,ca.jsx)("button",{onClick:a,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var Za=({toolPart:e,index:t,addToolResult:a})=>{let[o,s]=Ya.default.useState(!0),r=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,ca.jsxs)("div",{className:"mb-2",children:[(0,ca.jsx)(Qa,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:r,description:e.output?.reason||e.input?.reason}),!o&&(0,ca.jsx)("div",{className:"flex items-center justify-center ca-3",children:(0,ca.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,ca.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,ca.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,ca.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};function eo({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:s,fileUploads:r,isDragOver:l,enableFileUpload:n,onInputChange:m,addToolResult:u,onSendMessage:D,onKeyPress:f,onFileUpload:y,onRemoveFile:T,onDragOver:E,className:R}){let x=(0,Ye.useRef)(null),S=(0,Ye.useRef)(null),z=(0,Ye.useRef)(null),[w,B]=(0,Ye.useState)(!1),[X,Q]=(0,Ye.useState)({path:[],selectedItems:[],filters:{}});(0,Ye.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Ye.useEffect)(()=>{w&&setTimeout(()=>{x.current?.scrollIntoView({behavior:"smooth"})},100)},[w]);let Y=()=>_t(X),J=()=>{let p=[];return s.forEach(H=>{H.actions&&H.actions.forEach(G=>{p.push({label:G.label,action:()=>V(G.id,{path:[H],selectedItems:[],filters:{}})})}),H.children&&H.children.forEach(G=>{G.type==="list"&&G.data&&p.push({label:`View ${G.name}`,action:()=>B(!0)})})}),p.slice(0,5)},V=(p,H)=>{console.log("Capability action:",p,H);let G=`Executing ${p} with context: ${JSON.stringify(H.path.map(W=>W.name))}`;B(!1)},ee=_t({path:[],selectedItems:[],filters:{}}),ne=p=>{y(p.target.files),p.target.files&&(p.target.value="")},M=p=>{p.preventDefault(),E(!0)},Pe=p=>{p.preventDefault(),E(!1)},d=p=>{p.preventDefault(),E(!1),y(p.dataTransfer.files)},I=p=>{if(p===0)return"0 Bytes";let H=1024,G=["Bytes","KB","MB","GB"],W=Math.floor(Math.log(p)/Math.log(H));return parseFloat((p/Math.pow(H,W)).toFixed(2))+" "+G[W]},k=p=>p.startsWith("image/")?(0,ca.jsx)(ao.Image,{className:"h-4 w-4"}):p.startsWith("text/")?(0,ca.jsx)(ao.FileText,{className:"h-4 w-4"}):(0,ca.jsx)(ao.File,{className:"h-4 w-4"}),le=p=>{let H=p.role==="assistant",G=p.role==="user",W=Xa(p);return(0,ca.jsxs)("div",{className:c("flex items-start gap-3",G?"flex-row-reverse":""),children:[(0,ca.jsx)(Oe,{className:"h-8 w-8 shrink-0",children:(0,ca.jsx)(Ve,{className:c(G?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:G?(0,ca.jsx)(ao.User,{className:"h-4 w-4"}):(0,ca.jsx)(ao.Bot,{className:"h-4 w-4"})})}),(0,ca.jsxs)("div",{className:c("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",G?"bg-primary text-primary-foreground":"bg-muted"),children:[W&&(0,ca.jsx)("div",{className:"mb-2 last:mb-0",children:(0,ca.jsx)("p",{className:"text-sm",children:W})}),p.parts.map((te,ae)=>{if(te.type==="text")return null;if(te.type==="file"){let A=te;return(0,ca.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,ca.jsxs)("div",{className:"flex items-center gap-2",children:[k(A.mediaType||"application/octet-stream"),(0,ca.jsx)("div",{className:"flex-1 min-w-0",children:(0,ca.jsx)("p",{className:"text-sm font-medium truncate",children:A.filename||A.url?.split("/").pop()||"File"})}),A.url&&(0,ca.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(A.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ca.jsx)(ao.Download,{className:"h-4 w-4"})})]})},ae)}if(te.type.startsWith("tool-")){let A=te,se=te.type.replace("tool-","");if(se==="task")switch(A.state){case"input-available":return(0,ca.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},ae);case"output-available":return(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsx)(Ka,{data:{id:A.output?.id||A.input?.id,fetchLatest:!1,taskData:A.output||A.input}})},ae);case"output-error":return(0,ca.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",A.errorText]},ae);default:return null}if(te.type==="tool-requestEndpointLogin")return(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsx)(Za,{toolPart:A,index:ae,addToolResult:u??(()=>{})})},ae);if(se==="artefact")switch(A.state){case"input-available":return(0,ca.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},ae);case"output-available":return(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsx)(Ja,{artefact:A.output?.description||"",taskId:A.output?.id||A.input?.id,taskData:A.output||A.input})},ae);case"output-error":return(0,ca.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",A.errorText]},ae);default:return null}return(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsxs)(ge,{className:"w-full max-w-md",children:[(0,ca.jsx)(Ae,{children:(0,ca.jsx)(Me,{className:"text-lg",children:se})}),(0,ca.jsxs)(Ne,{children:[A.state==="input-available"&&(0,ca.jsxs)("p",{className:"text-sm",children:["Processing ",se,"..."]}),A.state==="output-available"&&(0,ca.jsx)("pre",{className:"text-sm",children:JSON.stringify(A.output,null,2)}),A.state==="output-error"&&(0,ca.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",A.errorText]})]})]})},ae)}if(te.type.startsWith("data-")){let A=te,se=te.type.replace("data-","");return se==="reference"?(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsx)(ge,{className:"w-full",children:(0,ca.jsx)(Ne,{className:"p-4",children:(0,ca.jsx)("div",{className:"space-y-2",children:A.data?.references?.map((ce,Ze)=>(0,ca.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,ca.jsx)(de,{variant:"outline",children:ce.type||"link"}),(0,ca.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ca.jsx)("p",{className:"text-sm font-medium truncate",children:ce.title}),ce.description&&(0,ca.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:ce.description})]}),ce.url&&(0,ca.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(ce.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ca.jsx)(ao.ExternalLink,{className:"h-4 w-4"})})]},Ze))})})})},ae):se==="menu"?(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsxs)(ge,{className:"w-full",children:[(0,ca.jsx)(Ae,{children:(0,ca.jsx)(Me,{className:"text-lg",children:A.data?.title})}),(0,ca.jsx)(Ne,{children:(0,ca.jsx)("div",{className:"space-y-2",children:A.data?.items?.map((ce,Ze)=>(0,ca.jsx)(P,{variant:"outline",className:"w-full justify-start",onClick:ce.action,children:(0,ca.jsxs)("div",{className:"text-left",children:[(0,ca.jsx)("p",{className:"font-medium",children:ce.label}),ce.description&&(0,ca.jsx)("p",{className:"text-xs text-muted-foreground",children:ce.description})]})},Ze))})})]})},ae):(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsxs)(ge,{className:"w-full max-w-md",children:[(0,ca.jsx)(Ae,{children:(0,ca.jsx)(Me,{className:"text-lg",children:se})}),(0,ca.jsx)(Ne,{children:(0,ca.jsx)("pre",{className:"text-sm",children:JSON.stringify(A.data,null,2)})})]})},ae)}return null})]})]})};return(0,ca.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${R||""}`,children:[(0,ca.jsxs)(xe,{ref:S,className:"flex-1 p-4 bg-background border-0",onDragOver:M,onDragLeave:Pe,onDrop:d,children:[(0,ca.jsxs)("div",{className:c("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,ca.jsx)(Rt.AnimatePresence,{children:e.map(p=>(0,ca.jsx)(Rt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:c("flex gap-3",p.role==="user"?"flex-row-reverse":"flex-row"),children:le(p)},p.id))}),w&&(0,ca.jsxs)(Rt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,ca.jsx)(Oe,{className:"h-8 w-8",children:(0,ca.jsx)(Ve,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ca.jsx)(ao.Bot,{className:"h-4 w-4"})})}),(0,ca.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ca.jsx)(Va,{capabilities:s,isOpen:w,onToggle:()=>B(!w),onActionSelect:V,className:"w-full"})})]}),a&&(0,ca.jsxs)(Rt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,ca.jsx)(Oe,{className:"h-8 w-8",children:(0,ca.jsx)(Ve,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ca.jsx)(ao.Bot,{className:"h-4 w-4"})})}),(0,ca.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ca.jsxs)("div",{className:"flex space-x-1",children:[(0,ca.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,ca.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,ca.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,ca.jsx)("div",{ref:x})]}),r.length>0&&(0,ca.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,ca.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(p=>(0,ca.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[k(p.file.type),(0,ca.jsx)("span",{className:"text-sm font-medium",children:p.file.name}),(0,ca.jsx)("span",{className:"text-xs text-muted-foreground",children:I(p.file.size)}),(0,ca.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>T(p.id),className:"h-6 w-6 p-0",children:(0,ca.jsx)(ao.X,{className:"h-4 w-4"})})]},p.id))})}),(0,ca.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,ca.jsxs)("div",{className:"flex gap-3",children:[(0,ca.jsx)(ot,{value:t,onChange:p=>m(p.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),n&&(0,ca.jsx)(P,{variant:"outline",size:"icon",onClick:()=>z.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ca.jsx)(ao.Paperclip,{className:"h-4 w-4"})}),(0,ca.jsx)(P,{onClick:D,disabled:!t.trim()&&r.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ca.jsx)(ao.Send,{className:"h-4 w-4"})})]}),(0,ca.jsxs)("div",{className:"flex items-center gap-3 ca-3",children:[(0,ca.jsxs)(P,{onClick:()=>B(!w),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,ca.jsx)(ao.Menu,{className:"h-3 w-3 mr-1"}),w?"Hide":"Show"," Capabilities"]}),(0,ca.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Y().map((p,H)=>(0,ca.jsx)(P,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>V(p.id,X),children:p.label},`context-${p.id}`)),Y().length===0&&J().map((p,H)=>(0,ca.jsx)(P,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:p.action,children:p.label},`suggestion-${H}`))]})]}),n&&(0,ca.jsx)("input",{ref:z,type:"file",multiple:!0,onChange:ne,className:"hidden"})]})]})}function vi({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:s=[],capabilities:r=[],sidebarItems:l=[],notifications:n=[],sessions:m=[],onNewChat:u,onSessionSelect:D,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:T=()=>{},onNotificationRemove:E=()=>{},onRemoveAll:R=()=>{},onActionClick:x=()=>{},onSearch:S=I=>console.log("Search query:",I),initialTeam:z="design",currentSession:w=null,showCapabilities:B=!0,title:X="Digital Colleagues",enableFileUpload:Q=!0,maxFileSize:Y=10,allowedFileTypes:J=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:V="/headerlogo.png",appName:ee="Nuvia",tagline:ne="AI-Powered Workspace",actionIcon:M=(0,ca.jsx)(ao.Users,{className:"mr-2 h-4 w-4"}),actionText:Pe="Collaborate",sidebarInitiallyClosed:d=!1}){let I=(0,to.useChat)(e||{}),k=a?t||I:null,[le,p]=(0,Ye.useState)(""),[H,G]=(0,Ye.useState)(!1),W=k?.messages||o,te=le,ae=k?.status==="submitted"||H,A=k?.addToolResult?(O,fe,oe)=>{k.addToolResult({tool:fe,toolCallId:O,output:oe})}:()=>{},se=s||[],ce={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"},[Ze,oo]=(0,Ye.useState)(()=>se.length===0?ce:se.find(O=>O.id===z)||se[0]),[et,ct]=(0,Ye.useState)([]),[io,ro]=(0,Ye.useState)(!1),no=O=>{if(!O||!Q)return;let fe=[];Array.from(O).forEach(oe=>{if(oe.size>Y*1024*1024){alert(`File ${oe.name} is too large. Maximum size is ${Y}MB.`);return}if(J.length>0&&!J.some(dt=>oe.type.match(dt))){alert(`File type ${oe.type} is not allowed.`);return}let Qt={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:oe,status:"pending",progress:0};if(oe.type.startsWith("image/")){let dt=new FileReader;dt.onload=mo=>{ct(uo=>uo.map(St=>St.id===Qt.id?{...St,preview:mo.target?.result}:St))},dt.readAsDataURL(oe)}fe.push(Qt)}),ct(oe=>[...oe,...fe])},so=O=>{ct(fe=>fe.filter(oe=>oe.id!==O))},Xt=()=>{if(!(!te.trim()&&et.length===0)){if(k){let O=et.length>0?lo(et.map(fe=>fe.file)):void 0;k.sendMessage({text:te,files:O},{body:{timestamp:Date.now()}}),p("")}else console.log("Message to send:",te),console.log("Files to upload:",et),p(""),G(!0),setTimeout(()=>{G(!1)},1500);ct([])}},lo=O=>{let fe=new DataTransfer;return O.forEach(oe=>fe.items.add(oe)),fe.files},co=O=>{O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),Xt())},po=O=>{p(O)};return(0,ca.jsx)(ja,{sidebarItems:l||[],title:X,notifications:n||[],businessUnits:se,currentBusinessUnit:Ze,onBusinessUnitChange:O=>{O&&(oo(O),T?.(O))},onSearch:S,showTabs:!1,onActionClick:x,actionIcon:M,actionText:Pe,onNotificationRemove:E,onRemoveAll:R,logo:V,appName:ee,tagline:ne,sidebarInitiallyClosed:d,children:(0,ca.jsx)(Rt.AnimatePresence,{mode:"wait",children:(0,ca.jsx)(Rt.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,ca.jsxs)("div",{className:"h-full flex",children:[(0,ca.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,ca.jsx)(Ha,{sessions:m||[],currentSession:w,teams:se,onNewChat:u,onSessionSelect:D,onSessionEdit:y,onSessionDelete:f})}),(0,ca.jsx)("div",{className:"flex-1 h-full p-2",children:(0,ca.jsx)(eo,{messages:W||[],input:te,isTyping:ae,currentSessionTitle:w?.title,capabilities:r||[],onInputChange:po,addToolResult:A,onSendMessage:Xt,onKeyPress:co,fileUploads:et,isDragOver:io,enableFileUpload:Q,onFileUpload:no,onRemoveFile:so,onDragOver:ro})})]})},"chat-interface")})})}0&&(module.exports={CopilotInterface});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-CSDKRMII.mjs";import"../../chunk-2GNX22CR.mjs";import"../../chunk-5BK3HTPN.mjs";import"../../chunk-FUEUJPNZ.mjs";import"../../chunk-SIL7AP7H.mjs";import"../../chunk-QM5FOQHG.mjs";import"../../chunk-LUPNE23E.mjs";import"../../chunk-A2AEX4YB.mjs";import"../../chunk-DBY4SXQI.mjs";import"../../chunk-I3E2TYYZ.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-BE5B22X7.mjs";import"../../chunk-PA4ZBJDO.mjs";import"../../chunk-CBLP4MXP.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-M245YHYF.mjs";import"../../chunk-3KITWLRN.mjs";import"../../chunk-Q2DPE66H.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as CopilotInterface};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface TaskToolPart {
|
|
3
|
+
type: string;
|
|
4
|
+
state: 'input-available' | 'output-available' | 'output-error';
|
|
5
|
+
input?: any;
|
|
6
|
+
output?: any;
|
|
7
|
+
errorText?: string;
|
|
8
|
+
}
|
|
9
|
+
interface ChatTaskToolRendererProps {
|
|
10
|
+
toolPart: TaskToolPart;
|
|
11
|
+
index: number;
|
|
12
|
+
addToolResult: (toolCallId: string, tool: string, output: any) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const PartAuthenticateTool: React.FC<ChatTaskToolRendererProps>;
|
|
15
|
+
export {};
|