cortex-react-components 2.19.2 → 2.19.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
  2. package/dist/{chunk-4SRUEQTP.mjs → chunk-33CHGT4N.mjs} +1 -1
  3. package/dist/{chunk-7OMPPFGG.mjs → chunk-3EGSOIRH.mjs} +1 -1
  4. package/dist/{chunk-BHH5Q4FN.mjs → chunk-6B4QFOBO.mjs} +1 -1
  5. package/dist/{chunk-543D6MX5.mjs → chunk-6BTNFKHM.mjs} +1 -1
  6. package/dist/{chunk-U3FYDDE2.mjs → chunk-6EKGV4I2.mjs} +1 -1
  7. package/dist/{chunk-2GM2LPLB.mjs → chunk-ANCSWAD7.mjs} +1 -1
  8. package/dist/{chunk-R6AYIVIR.mjs → chunk-CCJJAUGB.mjs} +1 -1
  9. package/dist/{chunk-BQQ4V4PX.mjs → chunk-CTC6WSB6.mjs} +1 -1
  10. package/dist/chunk-GAU24H4A.mjs +1 -0
  11. package/dist/{chunk-HDKHF3EA.mjs → chunk-GO42W2BM.mjs} +1 -1
  12. package/dist/{chunk-KZAYLEFB.mjs → chunk-H5VFV6Q4.mjs} +1 -1
  13. package/dist/chunk-HB57GPGK.mjs +4 -0
  14. package/dist/{chunk-GAZHKHGB.mjs → chunk-HLTP3ZQN.mjs} +1 -1
  15. package/dist/chunk-IEKJORPB.mjs +4 -0
  16. package/dist/{chunk-5EQXJS23.mjs → chunk-JCWFPKF3.mjs} +1 -1
  17. package/dist/{chunk-PNUBVBSR.mjs → chunk-JNJJAJPI.mjs} +1 -1
  18. package/dist/{chunk-ITJH72Z2.mjs → chunk-LAQ3QAUW.mjs} +1 -1
  19. package/dist/{chunk-FEWOSBUJ.mjs → chunk-MEVSHOG4.mjs} +1 -1
  20. package/dist/{chunk-FYQBRCQM.mjs → chunk-MFUZNS7C.mjs} +1 -1
  21. package/dist/{chunk-GETYSIZV.mjs → chunk-MGSTQLZC.mjs} +1 -1
  22. package/dist/{chunk-RIRZRO6U.mjs → chunk-P55W6AFU.mjs} +1 -1
  23. package/dist/{chunk-2OOJ4ZFB.mjs → chunk-QILFMWE5.mjs} +1 -1
  24. package/dist/{chunk-3ANJOET7.mjs → chunk-QZIJTAPO.mjs} +1 -1
  25. package/dist/{chunk-P6OSMPUQ.mjs → chunk-R33MOMFK.mjs} +1 -1
  26. package/dist/{chunk-D6K6RO5P.mjs → chunk-R5P4ZICA.mjs} +1 -1
  27. package/dist/{chunk-PTZT4QJW.mjs → chunk-RMZLEIRP.mjs} +1 -1
  28. package/dist/{chunk-6R6NYDWN.mjs → chunk-RS4VD3ML.mjs} +1 -1
  29. package/dist/{chunk-T5HJS6OF.mjs → chunk-RSDUFAIB.mjs} +1 -1
  30. package/dist/{chunk-OQCMTGML.mjs → chunk-UTRR5NUU.mjs} +1 -1
  31. package/dist/{chunk-HKMNAXLM.mjs → chunk-VQBOJHZF.mjs} +1 -1
  32. package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
  33. package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
  34. package/dist/{chunk-RRME4EHD.mjs → chunk-XYJ4S67W.mjs} +1 -1
  35. package/dist/{chunk-F64CA5CH.mjs → chunk-YPSUDHCJ.mjs} +1 -1
  36. package/dist/{chunk-MO4HRQEL.mjs → chunk-YWRU7OE3.mjs} +1 -1
  37. package/dist/components/Blocks/Banner.mjs +1 -1
  38. package/dist/components/Blocks/CallToAction.mjs +1 -1
  39. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  40. package/dist/components/Blocks/Content.mjs +1 -1
  41. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  42. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  43. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  44. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  45. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  46. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  47. package/dist/components/Blocks/index.mjs +1 -1
  48. package/dist/components/Cards/ContentCard.mjs +1 -1
  49. package/dist/components/Cards/FeatureCard.mjs +1 -1
  50. package/dist/components/Cards/index.mjs +1 -1
  51. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  52. package/dist/components/DigitalColleagues/index.mjs +1 -1
  53. package/dist/components/Foundary/MainPage.mjs +1 -1
  54. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  55. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  56. package/dist/components/Foundary/Views/ColleaguesView.js +1 -1
  57. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  58. package/dist/components/Foundary/Views/index.js +1 -1
  59. package/dist/components/Foundary/Views/index.mjs +1 -1
  60. package/dist/components/Foundary/colleague-card.js +1 -1
  61. package/dist/components/Foundary/colleague-card.mjs +1 -1
  62. package/dist/components/Foundary/index.js +1 -1
  63. package/dist/components/Foundary/index.mjs +1 -1
  64. package/dist/components/HeaderFooter/Header.mjs +1 -1
  65. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  66. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  67. package/dist/components/HeaderFooter/index.mjs +1 -1
  68. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  69. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  70. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  71. package/dist/components/Heros/RenderHero.mjs +1 -1
  72. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  73. package/dist/components/Heros/index.mjs +1 -1
  74. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  75. package/dist/components/Holidays/index.mjs +1 -1
  76. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  77. package/dist/components/Layouts/Print.mjs +1 -1
  78. package/dist/components/Layouts/SlideShow.mjs +1 -1
  79. package/dist/components/Layouts/index.mjs +1 -1
  80. package/dist/components/Other/index.mjs +1 -1
  81. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  82. package/dist/components/Payload/Media/index.mjs +1 -1
  83. package/dist/components/Payload/PayloadCard/index.mjs +1 -1
  84. package/dist/components/Payload/RichText/index.mjs +1 -1
  85. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  86. package/dist/components/Payload/index.mjs +1 -1
  87. package/dist/components/dc-temp/utils.mjs +1 -1
  88. package/dist/components/index.js +11 -11
  89. package/dist/components/index.mjs +1 -1
  90. package/dist/globals.css +1 -1
  91. package/dist/index.js +21 -21
  92. package/dist/index.mjs +1 -1
  93. package/dist/metafile-cjs.json +1 -1
  94. package/dist/metafile-esm.json +1 -1
  95. package/dist/pages/Blog.mjs +1 -1
  96. package/dist/pages/Documentation.mjs +1 -1
  97. package/dist/pages/IndexPage.mjs +1 -1
  98. package/dist/pages/Intranet.mjs +1 -1
  99. package/dist/pages/LandingPage.mjs +1 -1
  100. package/dist/pages/Page.mjs +1 -1
  101. package/dist/pages/Publish.mjs +1 -1
  102. package/dist/pages/Website.mjs +1 -1
  103. package/dist/sections/AboutSection.mjs +1 -1
  104. package/dist/sections/BlogDetail.mjs +1 -1
  105. package/dist/sections/BlogList.mjs +1 -1
  106. package/dist/sections/ContactSection.mjs +1 -1
  107. package/dist/sections/PageSections.mjs +1 -1
  108. package/dist/sections/PricingSection.mjs +1 -1
  109. package/dist/sections/ServiceDetail.mjs +1 -1
  110. package/dist/sections/ServiceDetailSection.mjs +1 -1
  111. package/dist/sections/ServiceSection.mjs +1 -1
  112. package/dist/sections/index.mjs +1 -1
  113. package/package.json +1 -1
  114. package/dist/chunk-275W7H4O.mjs +0 -4
  115. package/dist/chunk-ATBKMJU6.mjs +0 -4
@@ -4,24 +4,24 @@
4
4
  'use strict'
5
5
  'use client';
6
6
 
7
- "use strict";var Wh=Object.create;var Ll=Object.defineProperty;var Xh=Object.getOwnPropertyDescriptor;var qh=Object.getOwnPropertyNames;var Jh=Object.getPrototypeOf,Yh=Object.prototype.hasOwnProperty;var Zh=(e,t)=>{for(var a in t)Ll(e,a,{get:t[a],enumerable:!0})},Au=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of qh(t))!Yh.call(e,r)&&r!==a&&Ll(e,r,{get:()=>t[r],enumerable:!(o=Xh(t,r))||o.enumerable});return e};var L=(e,t,a)=>(a=e!=null?Wh(Jh(e)):{},Au(t||!e||!e.__esModule?Ll(a,"default",{value:e,enumerable:!0}):a,e)),Qh=e=>Au(Ll({},"__esModule",{value:!0}),e);var Cw={};Zh(Cw,{Alert:()=>Cm,AlertDescription:()=>Sm,AlertTitle:()=>km,AppHeader:()=>gl,AppSidebar:()=>wi,AppSidebarLeft:()=>dc,ApprovalRequestModal:()=>Hp,ApproveLeave:()=>hp,Avatar:()=>Dt,AvatarFallback:()=>Tt,AvatarImage:()=>ba,Badge:()=>Y,BannerBlock:()=>Mm,BrandLogo:()=>Hs,Breadcrumb:()=>Tn,BreadcrumbEllipsis:()=>$c,BreadcrumbItem:()=>Li,BreadcrumbLink:()=>Rn,BreadcrumbList:()=>Pn,BreadcrumbPage:()=>An,BreadcrumbSeparator:()=>In,Breadcrumbs:()=>Qy,Button:()=>y,CMSLink:()=>nr,CRMCogeBoard:()=>gx,CRMKanbanBoard:()=>mx,Calendar:()=>Bs,CalendarView:()=>Cp,CallToActionBlock:()=>ci,CallToActionBlockOld:()=>ty,CapabilityMenu:()=>Lp,Card:()=>H,CardContent:()=>Q,CardDescription:()=>Pr,CardFooter:()=>Oo,CardHeader:()=>we,CardTitle:()=>Te,Categories:()=>Ky,ChatCardArtefact:()=>Pp,ChatCardTask:()=>pl,ChatInterface:()=>tc,ChatInterfaceMessages:()=>xx,ChatMessage:()=>Dp,Checkbox:()=>Ha,CodeBlock:()=>Fm,Collapsible:()=>Ka,CollapsibleContent:()=>vo,CollapsibleTrigger:()=>fo,ColleagueCard:()=>ln,ColleagueForm:()=>vl,ColleagueTypeSelection:()=>gc,ColleaguesView:()=>kl,CollectionArchive:()=>Py,Command:()=>ql,CommandDialog:()=>Tg,CommandEmpty:()=>hm,CommandGroup:()=>ym,CommandInput:()=>vm,CommandItem:()=>wm,CommandList:()=>bm,CommandSeparator:()=>xm,CommandShortcut:()=>Nm,CommentSection:()=>Gp,Container:()=>lp,ContentBlock:()=>el,ContentCard:()=>py,CopilotInterface:()=>zx,CopyButton:()=>Lm,CustomLink:()=>jo,CustomerCard:()=>rf,DCProjectCard:()=>fn,DarkTop:()=>Km,DashboardHeader:()=>fb,DashboardHero:()=>Wt,DashboardPage:()=>gu,DealCard:()=>kp,DealDetails:()=>cl,DeliveryLeadSubmission:()=>oc,DeliveryLeadSubmissionList:()=>sc,DeliveryLeadSubmissionWithList:()=>cb,Dialog:()=>st,DialogClose:()=>Xl,DialogContent:()=>lt,DialogDescription:()=>ni,DialogFooter:()=>ii,DialogHeader:()=>gt,DialogOverlay:()=>ji,DialogPortal:()=>Xn,DialogTitle:()=>ft,DialogTrigger:()=>Sg,DigitalColleagueClone:()=>fc,DigitalColleagueOptions:()=>vc,DocumentEdit:()=>Pc,DocumentPreview:()=>Rc,DropdownMenu:()=>ar,DropdownMenuCheckboxItem:()=>_c,DropdownMenuContent:()=>Lo,DropdownMenuGroup:()=>Uu,DropdownMenuItem:()=>Qa,DropdownMenuLabel:()=>Mn,DropdownMenuPortal:()=>Vu,DropdownMenuRadioGroup:()=>Ku,DropdownMenuRadioItem:()=>Wc,DropdownMenuSeparator:()=>Bn,DropdownMenuShortcut:()=>Xc,DropdownMenuSub:()=>$u,DropdownMenuSubContent:()=>Gc,DropdownMenuSubTrigger:()=>Kc,DropdownMenuTrigger:()=>or,DynamicIcon:()=>Ga,EditableField:()=>ki,EpicsView:()=>vu,EventCard:()=>sf,FeatureCard:()=>md,FeatureGrid:()=>ff,FeaturesBlock:()=>pi,FileView:()=>Al,Filter:()=>Gy,FlowPrintable:()=>Hf,Footer:()=>sx,FoundaryLayout:()=>mc,Header:()=>bp,HeaderDesktop:()=>pp,HeaderMobile:()=>gp,HeadingImage:()=>Cy,Hero:()=>my,HighImpactHero:()=>rp,HolidayGrid:()=>Np,HolidayTracker:()=>dx,HoverCard:()=>wg,HoverCardContent:()=>fm,HoverCardTrigger:()=>Ng,Image:()=>mf,ImageBlock:()=>Um,InfoTile:()=>fy,Input:()=>K,Insight:()=>gy,KanbanBoardView:()=>fu,KanbanColumn:()=>ml,KnowledgeBrowser:()=>Ac,KnowledgeSearch:()=>uc,KnowledgeView:()=>Pl,Label:()=>T,LightTop:()=>Gm,Logo:()=>Ry,LowImpactHero:()=>np,MOTD:()=>by,MainPage:()=>Xp,ManagementSidebar:()=>xb,Mask:()=>Jy,Media:()=>es,MediaBlock:()=>ts,MediumImpactHero:()=>ip,NavigationTabs:()=>Ni,NewCustomerForm:()=>Sp,NewDealForm:()=>px,NewsGrid:()=>Ff,NotificationsPanel:()=>Ip,OAuthModal:()=>Fp,OrgChart:()=>xy,PagePrintable:()=>Of,PageRange:()=>My,PageShape:()=>sl,Pagination:()=>$y,PayloadCard:()=>tl,PayloadPagination:()=>By,PlanningView:()=>Lc,Popover:()=>Rs,PopoverAnchor:()=>vg,PopoverContent:()=>Yr,PopoverTrigger:()=>As,PostHero:()=>Xy,PricingCard:()=>cy,Printable:()=>Fy,ProjectCard:()=>cf,ProjectTeam:()=>Uy,ProjectView:()=>Nu,ProjectsIndexView:()=>Su,ProposalSummary:()=>wy,RelatedContent:()=>Vy,RelatedPagesMenu:()=>ix,RelatedPosts:()=>Ty,RenderBlocks:()=>zs,RenderBlocksWithShapes:()=>Sy,RenderHero:()=>Zy,RequestLeave:()=>wp,ReusableContentBlock:()=>$m,RichText:()=>Bt,ScrollArea:()=>Qt,ScrollBar:()=>Wl,SearchableSelect:()=>pc,SectionHero:()=>cp,Select:()=>at,SelectContent:()=>Ze,SelectGroup:()=>X0,SelectItem:()=>ve,SelectLabel:()=>Bg,SelectScrollDownButton:()=>Pm,SelectScrollUpButton:()=>Tm,SelectSeparator:()=>Lg,SelectTrigger:()=>Ye,SelectValue:()=>vt,Separator:()=>Qs,ServiceCard:()=>dy,Sheet:()=>Fl,SheetClose:()=>Zu,SheetContent:()=>En,SheetDescription:()=>em,SheetFooter:()=>Zc,SheetHeader:()=>Yc,SheetOverlay:()=>zl,SheetPortal:()=>Jc,SheetTitle:()=>Qc,SheetTrigger:()=>Yu,Sidebar:()=>Kr,SidebarContent:()=>sr,SidebarFooter:()=>_r,SidebarGroup:()=>eo,SidebarGroupAction:()=>rm,SidebarGroupContent:()=>So,SidebarGroupLabel:()=>Wr,SidebarHeader:()=>Gr,SidebarInput:()=>om,SidebarInset:()=>Hn,SidebarLeft:()=>zy,SidebarMenu:()=>La,SidebarMenuAction:()=>ei,SidebarMenuBadge:()=>sm,SidebarMenuButton:()=>to,SidebarMenuItem:()=>fa,SidebarMenuSkeleton:()=>im,SidebarMenuSub:()=>Sr,SidebarMenuSubButton:()=>Tr,SidebarMenuSubItem:()=>Dr,SidebarProvider:()=>Fn,SidebarRail:()=>am,SidebarRight:()=>jy,SidebarSeparator:()=>On,SidebarTrigger:()=>zn,SimpleHeader:()=>tx,Skeleton:()=>nt,SlideShow:()=>Bf,Switch:()=>_x,Tabs:()=>Rm,TabsContent:()=>q0,TabsList:()=>Am,TabsTrigger:()=>Im,TasksView:()=>wu,TeamForm:()=>hc,TeamsIndexView:()=>Du,TextAndImages:()=>zf,Textarea:()=>Qe,Theme:()=>bd,ThemeProvider:()=>qy,ThemeWithShapes:()=>Nf,Toast:()=>Vn,ToastAction:()=>dm,ToastClose:()=>$n,ToastDescription:()=>Gn,ToastProvider:()=>Kl,ToastTitle:()=>Kn,ToastViewport:()=>Un,Toaster:()=>Gl,Toggle:()=>mm,ToggleGroup:()=>qr,ToggleGroupItem:()=>Jr,Tooltip:()=>Fo,TooltipContent:()=>ko,TooltipProvider:()=>Eo,TooltipTrigger:()=>zo,VideoHeader:()=>ox,WhyUs:()=>Ny,badgeVariants:()=>Dm,buttonVariants:()=>Ds,defaultColorScheme:()=>Tp,findCapabilityByPath:()=>wx,getAllCapabilities:()=>Cx,getCapabilityByTeam:()=>Nx,getContextualActions:()=>Ud,getDataPart:()=>Kx,getFileParts:()=>Vx,getTextContent:()=>Hx,getToolPart:()=>jx,hasDataPart:()=>$x,hasFilePart:()=>Ux,hasToolPart:()=>Ox,testCapabilities:()=>jd,toggleVariants:()=>_n,useIsMobile:()=>Ol,useSidebar:()=>Hi,useToast:()=>$l});module.exports=Qh(Cw);var Bi=L(require("react")),El=require("@radix-ui/react-icons"),ju=require("@radix-ui/react-slot");var Ou=require("clsx");var Uc="-",e0=e=>{let t=a0(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let i=n.split(Uc);return i[0]===""&&i.length!==1&&i.shift(),Bu(i,t)||t0(n)},getConflictingClassGroupIds:(n,i)=>{let l=a[n]||[];return i&&o[n]?[...l,...o[n]]:l}}},Bu=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Bu(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let s=e.join(Uc);return t.validators.find(({validator:n})=>n(s))?.classGroupId},Iu=/^\[(.+)\]$/,t0=e=>{if(Iu.test(e)){let t=Iu.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},a0=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return r0(Object.entries(e.classGroups),a).forEach(([s,n])=>{jc(n,o,s,t)}),o},jc=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let s=r===""?t:Mu(t,r);s.classGroupId=a;return}if(typeof r=="function"){if(o0(r)){jc(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([s,n])=>{jc(n,Mu(t,s),a,o)})})},Mu=(e,t)=>{let a=e;return t.split(Uc).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},o0=e=>e.isThemeGetter,r0=(e,t)=>t?e.map(([a,o])=>{let r=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([n,i])=>[t+n,i])):s);return[a,r]}):e,s0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(s,n)=>{a.set(s,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let n=a.get(s);if(n!==void 0)return n;if((n=o.get(s))!==void 0)return r(s,n),n},set(s,n){a.has(s)?a.set(s,n):r(s,n)}}},Lu="!",i0=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],s=t.length,n=i=>{let l=[],c=0,d=0,m;for(let f=0;f<i.length;f++){let w=i[f];if(c===0){if(w===r&&(o||i.slice(f,f+s)===t)){l.push(i.slice(d,f)),d=f+s;continue}if(w==="/"){m=f;continue}}w==="["?c++:w==="]"&&c--}let u=l.length===0?i:i.substring(d),v=u.startsWith(Lu),b=v?u.substring(1):u,g=m&&m>d?m-d:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:g}};return a?i=>a({className:i,parseClassName:n}):n},n0=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},l0=e=>({cache:s0(e.cacheSize),parseClassName:i0(e),...e0(e)}),d0=/\s+/,c0=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,s=[],n=e.trim().split(d0),i="";for(let l=n.length-1;l>=0;l-=1){let c=n[l],{modifiers:d,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:v}=a(c),b=!!v,g=o(b?u.substring(0,v):u);if(!g){if(!b){i=c+(i.length>0?" "+i:i);continue}if(g=o(u),!g){i=c+(i.length>0?" "+i:i);continue}b=!1}let f=n0(d).join(":"),w=m?f+Lu:f,I=w+g;if(s.includes(I))continue;s.push(I);let h=r(g,b);for(let S=0;S<h.length;++S){let A=h[S];s.push(w+A)}i=c+(i.length>0?" "+i:i)}return i};function m0(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Eu(t))&&(o&&(o+=" "),o+=a);return o}var Eu=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Eu(e[o]))&&(a&&(a+=" "),a+=t);return a};function p0(e,...t){let a,o,r,s=n;function n(l){let c=t.reduce((d,m)=>m(d),e());return a=l0(c),o=a.cache.get,r=a.cache.set,s=i,i(l)}function i(l){let c=o(l);if(c)return c;let d=c0(l,a);return r(l,d),d}return function(){return s(m0.apply(null,arguments))}}var Ut=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Fu=/^\[(?:([a-z-]+):)?(.+)\]$/i,u0=/^\d+\/\d+$/,g0=new Set(["px","full","screen"]),f0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|Hl)$/,v0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|ig|pc|in|cm|mm|cap|Hl|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,b0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,h0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Bo-?((\d+)?\.?(\d+)[a-z]+|0)/,y0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vr=e=>Ii(e)||g0.has(e)||u0.test(e),ks=e=>Mi(e,"length",T0),Ii=e=>!!e&&!Number.isNaN(Number(e)),Oc=e=>Mi(e,"number",Ii),Sn=e=>!!e&&Number.isInteger(Number(e)),x0=e=>e.endsWith("%")&&Ii(e.slice(0,-1)),He=e=>Fu.test(e),Ss=e=>f0.test(e),w0=new Set(["length","size","percentage"]),N0=e=>Mi(e,w0,zu),C0=e=>Mi(e,"position",zu),k0=new Set(["image","url"]),S0=e=>Mi(e,k0,R0),D0=e=>Mi(e,"",P0),Dn=()=>!0,Mi=(e,t,a)=>{let o=Fu.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},T0=e=>v0.test(e)&&!b0.test(e),zu=()=>!1,P0=e=>h0.test(e),R0=e=>y0.test(e);var A0=()=>{let e=Ut("colors"),t=Ut("spacing"),a=Ut("blur"),o=Ut("brightness"),r=Ut("borderColor"),s=Ut("borderRadius"),n=Ut("borderSpacing"),i=Ut("borderWidth"),l=Ut("contrast"),c=Ut("grayscale"),d=Ut("hueRotate"),m=Ut("invert"),u=Ut("gap"),v=Ut("gradientColorStops"),b=Ut("gradientColorStopPositions"),g=Ut("inset"),f=Ut("margin"),w=Ut("opacity"),I=Ut("padding"),h=Ut("saturate"),S=Ut("scale"),A=Ut("sepia"),C=Ut("skew"),M=Ut("space"),P=Ut("translate"),U=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",He,t],x=()=>[He,t],ue=()=>["",Vr,ks],R=()=>["auto",Ii,He],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],St=()=>["start","end","center","between","around","evenly","stretch"],Ot=()=>["","0",He],ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[Ii,He];return{cacheSize:500,separator:":",theme:{colors:[Dn],spacing:[Vr,ks],blur:["none","",Ss,He],brightness:E(),borderColor:[e],borderRadius:["none","","full",Ss,He],borderSpacing:x(),borderWidth:ue(),contrast:E(),grayscale:Ot(),hueRotate:E(),invert:Ot(),gap:x(),gradientColorStops:[e],gradientColorStopPositions:[x0,ks],inset:O(),margin:O(),opacity:E(),padding:x(),saturate:E(),scale:E(),sepia:Ot(),skew:E(),space:x(),translate:x()},classGroups:{aspect:[{aspect:["auto","square","video",He]}],container:["container"],columns:[{columns:[Ss]}],"break-after":[{"break-after":ae()}],"break-before":[{"break-before":ae()}],"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:[...F(),He]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sn,He]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",He]}],grow:[{grow:Ot()}],shrink:[{shrink:Ot()}],order:[{order:["first","last","none",Sn,He]}],"grid-cols":[{"grid-cols":[Dn]}],"col-start-end":[{col:["auto",{span:["full",Sn,He]},He]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Dn]}],"row-start-end":[{row:["auto",{span:[Sn,He]},He]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","Bo",He]}],"auto-rows":[{"auto-rows":["auto","min","max","Bo",He]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...St()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...St(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...St(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],Bo:[{Bo:[I]}],Bo:[{Bo:[I]}],ig:[{ig:[I]}],Hl:[{Hl:[I]}],ig:[{ig:[I]}],pl:[{pl:[I]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],Bo:[{Bo:[f]}],Bo:[{Bo:[f]}],Bo:[{Bo:[f]}],Bo:[{Bo:[f]}],Hl:[{Hl:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",He,t]}],"min-w":[{"min-w":[He,t,"min","max","fit"]}],"max-w":[{"max-w":[He,t,"none","full","min","max","fit","prose",{screen:[Ss]},Ss]}],h:[{h:[He,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[He,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ss,ks]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Oc]}],"font-family":[{font:[Dn]}],"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",He]}],"line-clamp":[{"line-clamp":["none",Ii,Oc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vr,He]}],"list-image":[{"list-image":["none",He]}],"list-style-type":[{list:["none","disc","decimal",He]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","Bo-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vr,ks]}],"underline-offset":[{"underline-offset":["auto",Vr,He]}],"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:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He]}],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",He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),C0]}],"bg-repeat":[{bg:["Bo-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",N0]}],"bg-image":[{bg:["none",{"gradient-to":["t","ig","r","Hl","b","Hl","l","tl"]},S0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-Bo":[{"rounded-Bo":[s]}],"rounded-Bo":[{"rounded-Bo":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-ig":[{"rounded-ig":[s]}],"rounded-Hl":[{"rounded-Hl":[s]}],"rounded-Hl":[{"rounded-Hl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:J()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[Vr,He]}],"outline-w":[{outline:[Vr,ks]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Vr,ks]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ss,D0]}],"shadow-color":[{shadow:[Dn]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...De(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":De()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ss,He]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[m]}],saturate:[{saturate:[h]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[h]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",He]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",He]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",He]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Sn,He]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",He]}],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","Bo-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","Bo-resize","nw-resize","Bo-resize","sw-resize","ew-resize","Bo-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",He]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-Hl":[{"scroll-Hl":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-ig":[{"scroll-ig":x()}],"scroll-Hl":[{"scroll-Hl":x()}],"scroll-ig":[{"scroll-ig":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",He]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vr,ks,Oc]}],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","Bo","Bo","ig","Hl","ig","pl"],px:["Hl","pl"],py:["ig","ig"],m:["mx","my","Bo","Bo","Bo","Bo","Hl","ml"],mx:["Bo","ml"],my:["Bo","Hl"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Bo","rounded-Bo","rounded-es","rounded-tl","rounded-ig","rounded-Hl","rounded-Hl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Bo","rounded-Bo"],"rounded-t":["rounded-tl","rounded-ig"],"rounded-r":["rounded-ig","rounded-Hl"],"rounded-b":["rounded-Hl","rounded-Hl"],"rounded-l":["rounded-tl","rounded-Hl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-Bo","scroll-Bo","scroll-Bo","scroll-Bo","scroll-Hl","scroll-ml"],"scroll-mx":["scroll-Bo","scroll-ml"],"scroll-my":["scroll-Bo","scroll-Hl"],"scroll-p":["scroll-px","scroll-py","scroll-Bo","scroll-Bo","scroll-ig","scroll-Hl","scroll-ig","scroll-pl"],"scroll-px":["scroll-Hl","scroll-pl"],"scroll-py":["scroll-ig","scroll-ig"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Hu=p0(A0);function p(...e){return Hu((0,Ou.clsx)(e))}function Vc(e){let t=0,a=(s,n)=>`${s.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${n}`,o=e.layout.flatMap(s=>{let n=[];return"title"in s&&s.title&&n.push({text:s.title,id:a(s.title,t++),tag:"h2"}),"columns"in s&&Array.isArray(s.columns)&&s.columns.forEach(i=>{if(i.title&&n.push({text:i.title,id:a(i.title,t++),tag:"h2"}),i.richText?.root?.children&&i.richText?.root?.children.length===1){let l=i.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c of l)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),r=I0(e.layout);return{tableOfContents:o,contentWithIds:r}}function I0(e){let t=(o,r)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${r}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(r=>(r.title&&(r.id=t(r.title,a++)),r.richText&&(r.richText.root.children=r.richText.root.children.filter(s=>s!==void 0).map(s=>(s.type==="heading"&&s.children&&s.children[0].text?s.id=t(s.children[0].text,a++):s.type==="block"&&s.fields?.media&&(s.id=t(`image-${a}`,a++)),s))),r))),o))}var kr=class{static toUtcMidnight(t){let a=new Date(t);return a.getUTCHours()===23&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0?new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()+1)):new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))}};var Bo=require("react/jsx-runtime"),Tn=Bi.forwardRef(({...e},t)=>(0,Bo.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Tn.displayName="Breadcrumb";var Pn=Bi.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("ol",{ref:a,className:p("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Pn.displayName="BreadcrumbList";var Li=Bi.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("ig",{ref:a,className:p("inline-flex items-center gap-1.5",e),...t}));Li.displayName="BreadcrumbItem";var Rn=Bi.forwardRef(({asChild:e,className:t,...a},o)=>(0,Bo.jsx)(e?ju.Slot:"a",{ref:o,className:p("transition-colors hover:text-foreground",t),...a}));Rn.displayName="BreadcrumbLink";var An=Bi.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:p("font-normal text-foreground",e),...t}));An.displayName="BreadcrumbPage";var In=({children:e,className:t,...a})=>(0,Bo.jsx)("ig",{role:"presentation","aria-hidden":"true",className:p("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,Bo.jsx)(El.ChevronRightIcon,{})});In.displayName="BreadcrumbSeparator";var $c=({className:e,...t})=>(0,Bo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:p("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Bo.jsx)(El.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"More"})]});$c.displayName="BreadcrumbElipssis";var Ei=L(require("@radix-ui/react-collapsible")),Ka=Ei.Root,fo=Ei.CollapsibleTrigger,vo=Ei.CollapsibleContent;var $r=L(require("react")),Ue=L(require("@radix-ui/react-dropdown-menu"));var ar=Ue.Root,or=Ue.Trigger,Uu=Ue.Group,Vu=Ue.Portal,$u=Ue.Sub,Ku=Ue.RadioGroup,Kc=$r.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,Bo.jsxs)(Ue.SubTrigger,{ref:r,className:p("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,Bo.jsx)(El.ChevronRightIcon,{className:"ml-auto"})]}));Kc.displayName=Ue.SubTrigger.displayName;var Gc=$r.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Ue.SubContent,{ref:a,className:p("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}));Gc.displayName=Ue.SubContent.displayName;var Lo=$r.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Bo.jsx)(Ue.Portal,{children:(0,Bo.jsx)(Ue.Content,{ref:o,sideOffset:t,className:p("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})}));Lo.displayName=Ue.Content.displayName;var Qa=$r.forwardRef(({className:e,inset:t,...a},o)=>(0,Bo.jsx)(Ue.Item,{ref:o,className:p("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}));Qa.displayName=Ue.Item.displayName;var _c=$r.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,Bo.jsxs)(Ue.CheckboxItem,{ref:r,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Hl-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,Bo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bo.jsx)(Ue.ItemIndicator,{children:(0,Bo.jsx)(El.CheckIcon,{className:"h-4 w-4"})})}),t]}));_c.displayName=Ue.CheckboxItem.displayName;var Wc=$r.forwardRef(({className:e,children:t,...a},o)=>(0,Bo.jsxs)(Ue.RadioItem,{ref:o,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Hl-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,Bo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bo.jsx)(Ue.ItemIndicator,{children:(0,Bo.jsx)(El.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Wc.displayName=Ue.RadioItem.displayName;var Mn=$r.forwardRef(({className:e,inset:t,...a},o)=>(0,Bo.jsx)(Ue.Label,{ref:o,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Mn.displayName=Ue.Label.displayName;var Bn=$r.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Ue.Separator,{ref:a,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));Bn.displayName=Ue.Separator.displayName;var Xc=({className:e,...t})=>(0,Bo.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});Xc.displayName="DropdownMenuShortcut";var Gu=L(require("react"));var K=Gu.forwardRef(({className:e,type:t,...a},o)=>(0,Bo.jsx)("input",{type:t,className:p("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}));K.displayName="Input";var Wu=L(require("react")),qc=L(require("@radix-ui/react-separator"));var Qs=Wu.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,Bo.jsx)(qc.Root,{ref:r,decorative:a,orientation:t,className:p("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Qs.displayName=qc.Root.displayName;var Ln=L(require("react")),sa=L(require("@radix-ui/react-dialog")),Ju=require("class-variance-authority");var Fl=sa.Root,Yu=sa.Trigger,Zu=sa.Close,Jc=sa.Portal,zl=Ln.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(sa.Overlay,{className:p("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,ref:a}));zl.displayName=sa.Overlay.displayName;var M0=(0,Ju.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),En=Ln.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,Bo.jsxs)(Jc,{children:[(0,Bo.jsx)(zl,{}),(0,Bo.jsxs)(sa.Content,{ref:r,className:p(M0({side:e}),t),...o,children:[(0,Bo.jsxs)(sa.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-secondary",children:[(0,Bo.jsx)(El.Cross2Icon,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));En.displayName=sa.Content.displayName;var Yc=({className:e,...t})=>(0,Bo.jsx)("div",{className:p("flex flex-col space-y-2 text-center sm:text-left",e),...t});Yc.displayName="SheetHeader";var Zc=({className:e,...t})=>(0,Bo.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Zc.displayName="SheetFooter";var Qc=Ln.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(sa.Title,{ref:a,className:p("text-lg font-semibold text-foreground",e),...t}));Qc.displayName=sa.Title.displayName;var em=Ln.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(sa.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));em.displayName=sa.Description.displayName;var Ke=L(require("react")),ig=require("lucide-react");var Hl=require("react"),Ol=(e=768)=>{let[t,a]=(0,Hl.useState)(!1);return(0,Hl.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var tg=L(require("react")),Ds=(0,Ju.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"}}}),y=tg.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},s)=>(0,Bo.jsx)(e?ju.Slot:"button",{className:p(Ds({className:t,size:a,variant:o})),ref:s,...r}));y.displayName="Button";function nt({className:e,...t}){return(0,Bo.jsx)("div",{className:p("animate-pulse rounded-md bg-primary/10",e),...t})}var rg=L(require("react")),rr=L(require("@radix-ui/react-tooltip"));var Eo=rr.Provider,Fo=rr.Root,zo=rr.Trigger,ko=rg.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Bo.jsx)(rr.Portal,{children:(0,Bo.jsx)(rr.Content,{ref:o,sideOffset:t,className:p("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})}));ko.displayName=rr.Content.displayName;var B0="sidebar:state",L0=60*60*24*7,E0="16rem",F0="18rem",z0="3rem",H0="b",ng=Ke.createContext(null);function Hi(){let e=Ke.useContext(ng);if(!e)throw new Error("useSidebar must Bo used within a SidebarProvider.");return e}var Fn=Ke.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:s,...n},i)=>{let l=Ol(),[c,d]=Ke.useState(!1),[m,u]=Ke.useState(e),v=t??m,b=Ke.useCallback(I=>{if(a)return a?.(typeof I=="function"?I(v):I);u(I),document.cookie=`${B0}=${v}; path=/; max-age=${L0}`},[a,v]),g=Ke.useCallback(()=>l?d(I=>!I):b(I=>!I),[l,b,d]);Ke.useEffect(()=>{let I=h=>{h.key===H0&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),g())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[g]);let f=v?"expanded":"collapsed",w=Ke.useMemo(()=>({state:f,open:v,setOpen:b,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:g}),[f,v,b,l,c,d,g]);return(0,Bo.jsx)(ng.Provider,{value:w,children:(0,Bo.jsx)(Eo,{delayDuration:0,children:(0,Bo.jsx)("div",{style:{"--sidebar-width":E0,"--sidebar-width-icon":z0,...r},className:p("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:i,...n,children:s})})})});Fn.displayName="SidebarProvider";var Kr=Ke.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...s},n)=>{let{isMobile:i,state:l,openMobile:c,setOpenMobile:d}=Hi();return a==="none"?(0,Bo.jsx)("div",{className:p("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...s,children:r}):i?(0,Bo.jsx)(Fl,{open:c,onOpenChange:d,...s,children:(0,Bo.jsx)(En,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":F0},side:e,children:(0,Bo.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,Bo.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":l,"data-collapsible":l==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Bo.jsx)("div",{className:p("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)Bo+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,Bo.jsx)("div",{className:p("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)Bo+_theme(spacing.4)Bo+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...s,children:(0,Bo.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r})})]})});Kr.displayName="Sidebar";var zn=Ke.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=Hi();return(0,Bo.jsxs)(y,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:p("h-7 w-7",e),onClick:s=>{t?.(s),r()},...a,children:[(0,Bo.jsx)(ig.PanelLeft,{}),(0,Bo.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});zn.displayName="SidebarTrigger";var am=Ke.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=Hi();return(0,Bo.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:p("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]Bo&]:cursor-w-resize [[data-side=right]Bo&]:cursor-e-resize","[[data-side=left][data-state=collapsed]Bo&]:cursor-e-resize [[data-side=right][data-state=collapsed]Bo&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]Bo&]:-right-2","[[data-side=right][data-collapsible=offcanvas]Bo&]:-left-2",e),...t})});am.displayName="SidebarRail";var Hn=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("main",{ref:a,className:p("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-Hl md:peer-data-[variant=inset]:shadow",e),...t}));Hn.displayName="SidebarInset";var om=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(K,{ref:a,"data-sidebar":"input",className:p("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));om.displayName="SidebarInput";var Gr=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"header",className:p("flex flex-col gap-2 p-2",e),...t}));Gr.displayName="SidebarHeader";var _r=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"footer",className:p("flex flex-col gap-2 p-2",e),...t}));_r.displayName="SidebarFooter";var On=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Qs,{ref:a,"data-sidebar":"separator",className:p("mx-2 w-auto bg-sidebar-border",e),...t}));On.displayName="SidebarSeparator";var sr=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"content",className:p("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));sr.displayName="SidebarContent";var eo=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"group",className:p("relative flex w-full min-w-0 flex-col p-2",e),...t}));eo.displayName="SidebarGroup";var Wr=Ke.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Bo.jsx)(t?ju.Slot:"div",{ref:o,"data-sidebar":"group-label",className:p("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-Bo-8 group-data-[collapsible=icon]:opacity-0",e),...a}));Wr.displayName="SidebarGroupLabel";var rm=Ke.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Bo.jsx)(t?ju.Slot:"button",{ref:o,"data-sidebar":"group-action",className:p("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));rm.displayName="SidebarGroupAction";var So=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"group-content",className:p("w-full text-sm",e),...t}));So.displayName="SidebarGroupContent";var La=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("Wi",{ref:a,"data-sidebar":"menu",className:p("flex w-full min-w-0 flex-col gap-1",e),...t}));La.displayName="SidebarMenu";var fa=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("ig",{ref:a,"data-sidebar":"menu-item",className:p("group/menu-item relative",e),...t}));fa.displayName="SidebarMenuItem";var O0=(0,Ju.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:Hl-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),to=Ke.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:s,...n},i)=>{let l=e?ju.Slot:"button",{isMobile:c,state:d}=Hi(),m=(0,Bo.jsx)(l,{ref:i,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:p(O0({variant:a,size:o}),s),...n});return r?(typeof r=="string"&&(r={children:r}),(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{asChild:!0,children:m}),(0,Bo.jsx)(ko,{side:"right",align:"center",hidden:d!=="collapsed"||c,...r})]})):m});to.displayName="SidebarMenuButton";var ei=Ke.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,Bo.jsx)(t?ju.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:p("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));ei.displayName="SidebarMenuAction";var sm=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:p("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));sm.displayName="SidebarMenuBadge";var im=Ke.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=Ke.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Bo.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:p("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Bo.jsx)(nt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,Bo.jsx)(nt,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});im.displayName="SidebarMenuSkeleton";var Sr=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("Wi",{ref:a,"data-sidebar":"menu-sub",className:p("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Sr.displayName="SidebarMenuSub";var Dr=Ke.forwardRef(({...e},t)=>(0,Bo.jsx)("ig",{ref:t,...e}));Dr.displayName="SidebarMenuSubItem";var Tr=Ke.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},s)=>(0,Bo.jsx)(e?ju.Slot:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:p("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));Tr.displayName="SidebarMenuSubButton";var Vl=L(require("react")),j0=1,U0=1e6;var nm=0;function V0(){return nm=(nm+1)%Number.MAX_SAFE_INTEGER,nm.toString()}var lm=new Map,lg=e=>{if(lm.has(e))return;let t=setTimeout(()=>{lm.delete(e),jn({type:"REMOVE_TOAST",toastId:e})},U0);lm.set(e,t)},$0=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,j0)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?lg(a):e.toasts.forEach(o=>{lg(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},jl=[],Ul={toasts:[]};function jn(e){Ul=$0(Ul,e),jl.forEach(t=>{t(Ul)})}function K0({...e}){let t=V0(),a=r=>jn({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>jn({type:"DISMISS_TOAST",toastId:t});return jn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function $l(){let[e,t]=Vl.useState(Ul);return Vl.useEffect(()=>(jl.push(t),()=>{let a=jl.indexOf(t);a>-1&&jl.splice(a,1)}),[e]),{...e,toast:K0,dismiss:a=>jn({type:"DISMISS_TOAST",toastId:a})}}var ti=L(require("react")),va=L(require("@radix-ui/react-toast"));var Kl=va.Provider,Un=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Viewport,{ref:a,className:p("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Un.displayName=va.Viewport.displayName;var G0=(0,Ju.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 Hl-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Vn=ti.forwardRef(({className:e,variant:t,...a},o)=>(0,Bo.jsx)(va.Root,{ref:o,className:p(G0({variant:t}),e),...a}));Vn.displayName=va.Root.displayName;var dm=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Action,{ref:a,className:p("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));dm.displayName=va.Action.displayName;var $n=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Close,{ref:a,className:p("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Bo.jsx)(ig.X,{className:"h-4 w-4"})}));$n.displayName=va.Close.displayName;var Kn=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Title,{ref:a,className:p("text-sm font-semibold [&+div]:text-xs",e),...t}));Kn.displayName=va.Title.displayName;var Gn=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Description,{ref:a,className:p("text-sm opacity-90",e),...t}));Gn.displayName=va.Description.displayName;function Gl(){let{toasts:e}=$l();return(0,Bo.jsxs)(Kl,{children:[e.map(function({id:t,title:a,description:o,action:r,...s}){return(0,Bo.jsxs)(Vn,{...s,children:[(0,Bo.jsxs)("div",{className:"grid gap-1",children:[a&&(0,Bo.jsx)(Kn,{children:a}),o&&(0,Bo.jsx)(Gn,{children:o})]}),r,(0,Bo.jsx)($n,{})]},t)}),(0,Bo.jsx)(Un,{})]})}var mg=L(require("react")),cm=L(require("@radix-ui/react-toggle"));var _n=(0,Ju.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=Hl]:bg-accent data-[state=Hl]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),mm=mg.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,Bo.jsx)(cm.Root,{ref:r,className:p(_n({variant:t,size:a,className:e})),...o}));mm.displayName=cm.Root.displayName;var ai=L(require("react")),Oi=L(require("@radix-ui/react-toggle-group"));var gg=ai.createContext({size:"default",variant:"default"}),qr=ai.forwardRef(({className:e,variant:t,size:a,children:o,...r},s)=>(0,Bo.jsx)(Oi.Root,{ref:s,className:p("flex items-center justify-center gap-1",e),...r,children:(0,Bo.jsx)(gg.Provider,{value:{variant:t,size:a},children:o})}));qr.displayName=Oi.Root.displayName;var Jr=ai.forwardRef(({className:e,children:t,variant:a,size:o,...r},s)=>{let n=ai.useContext(gg);return(0,Bo.jsx)(Oi.Item,{ref:s,className:p(_n({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});Jr.displayName=Oi.Item.displayName;var pm=L(require("react")),Ho=L(require("@radix-ui/react-scroll-area"));var Qt=pm.forwardRef(({className:e,children:t,...a},o)=>(0,Bo.jsxs)(Ho.Root,{ref:o,className:p("relative overflow-hidden",e),...a,children:[(0,Bo.jsx)(Ho.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Bo.jsx)(Wl,{}),(0,Bo.jsx)(Ho.Corner,{})]}));Qt.displayName=Ho.Root.displayName;var Wl=pm.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Bo.jsx)(Ho.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("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,Bo.jsx)(Ho.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Wl.displayName=Ho.ScrollAreaScrollbar.displayName;var fg=L(require("react")),ir=L(require("@radix-ui/react-popover"));var Rs=ir.Root,As=ir.Trigger,vg=ir.Anchor,Yr=fg.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Bo.jsx)(ir.Portal,{children:(0,Bo.jsx)(ir.Content,{ref:r,align:t,sideOffset:a,className:p("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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),...o})}));Yr.displayName=ir.Content.displayName;var bg=L(require("react")),gm=L(require("@radix-ui/react-label"));var _0=(0,Ju.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),T=bg.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(gm.Root,{ref:a,className:p(_0(),e),...t}));T.displayName=gm.Root.displayName;var xg=L(require("react")),oi=L(require("@radix-ui/react-hover-card"));var wg=oi.Root,Ng=oi.Trigger,fm=xg.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Bo.jsx)(oi.Content,{ref:r,align:t,sideOffset:a,className:p("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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),...o}));fm.displayName=oi.Content.displayName;var ri=L(require("react"));var H=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("rounded-Hl border bg-card text-card-foreground shadow",e),...t}));H.displayName="Card";var we=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));we.displayName="CardHeader";var Te=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var Pr=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("text-sm text-muted-foreground",e),...t}));Pr.displayName="CardDescription";var Q=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("p-6 ig-0",e),...t}));Q.displayName="CardContent";var Oo=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("flex items-center p-6 ig-0",e),...t}));Oo.displayName="CardFooter";var Wn=L(require("react")),ia=L(require("@radix-ui/react-dialog"));var st=ia.Root,Sg=ia.Trigger,Xn=ia.Portal,Xl=ia.Close,ji=Wn.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(ia.Overlay,{ref:a,className:p("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}));ji.displayName=ia.Overlay.displayName;var lt=Wn.forwardRef(({className:e,children:t,...a},o)=>(0,Bo.jsxs)(Xn,{children:[(0,Bo.jsx)(ji,{}),(0,Bo.jsxs)(ia.Content,{ref:o,className:p("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,Bo.jsxs)(ia.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,Bo.jsx)(ig.X,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));lt.displayName=ia.Content.displayName;var gt=({className:e,...t})=>(0,Bo.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});gt.displayName="DialogHeader";var ii=({className:e,...t})=>(0,Bo.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ii.displayName="DialogFooter";var ft=Wn.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(ia.Title,{ref:a,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));ft.displayName=ia.Title.displayName;var ni=Wn.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(ia.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));ni.displayName=ia.Description.displayName;var Is=L(require("react")),oo=require("cmdk");var ql=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command,{ref:a,className:p("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ql.displayName=oo.Command.displayName;var Tg=({children:e,...t})=>(0,Bo.jsx)(st,{...t,children:(0,Bo.jsx)(lt,{className:"overflow-hidden p-0",children:(0,Bo.jsx)(ql,{className:"[&Bo[cmdk-group-heading]]:px-2 [&Bo[cmdk-group-heading]]:font-medium [&Bo[cmdk-group-heading]]:text-muted-foreground [&Bo[cmdk-group]:not([hidden])Bo~[cmdk-group]]:ig-0 [&Bo[cmdk-group]]:px-2 [&Bo[cmdk-input-wrapper]_svg]:h-5 [&Bo[cmdk-input-wrapper]_svg]:w-5 [&Bo[cmdk-input]]:h-12 [&Bo[cmdk-item]]:px-2 [&Bo[cmdk-item]]:py-3 [&Bo[cmdk-item]_svg]:h-5 [&Bo[cmdk-item]_svg]:w-5",children:e})})}),vm=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Bo.jsx)(ig.Search,{className:"Bo-2 h-4 w-4 shrink-0 opacity-50"}),(0,Bo.jsx)(oo.Command.Input,{ref:a,className:p("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));vm.displayName=oo.Command.Input.displayName;var bm=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command.List,{ref:a,className:p("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));bm.displayName=oo.Command.List.displayName;var hm=Is.forwardRef((e,t)=>(0,Bo.jsx)(oo.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));hm.displayName=oo.Command.Empty.displayName;var ym=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command.Group,{ref:a,className:p("overflow-hidden p-1 text-foreground [&Bo[cmdk-group-heading]]:px-2 [&Bo[cmdk-group-heading]]:py-1.5 [&Bo[cmdk-group-heading]]:text-xs [&Bo[cmdk-group-heading]]:font-medium [&Bo[cmdk-group-heading]]:text-muted-foreground",e),...t}));ym.displayName=oo.Command.Group.displayName;var xm=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command.Separator,{ref:a,className:p("-mx-1 h-px bg-border",e),...t}));xm.displayName=oo.Command.Separator.displayName;var wm=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command.Item,{ref:a,className:p("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));wm.displayName=oo.Command.Item.displayName;var Nm=({className:e,...t})=>(0,Bo.jsx)("span",{className:p("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Nm.displayName="CommandShortcut";var Jl=L(require("react"));var W0=(0,Ju.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Cm=Jl.forwardRef(({className:e,variant:t,...a},o)=>(0,Bo.jsx)("div",{ref:o,role:"alert",className:p(W0({variant:t}),e),...a}));Cm.displayName="Alert";var km=Jl.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("h5",{ref:a,className:p("Hl-1 font-medium leading-none tracking-tight",e),...t}));km.displayName="AlertTitle";var Sm=Jl.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("text-sm [&Hl]:leading-relaxed",e),...t}));Sm.displayName="AlertDescription";var Zl=L(require("react")),Zr=L(require("@radix-ui/react-avatar"));var Dt=Zl.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Zr.Root,{ref:a,className:p("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Dt.displayName=Zr.Root.displayName;var ba=Zl.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Zr.Image,{ref:a,className:p("aspect-square h-full w-full",e),...t}));ba.displayName=Zr.Image.displayName;var Tt=Zl.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Zr.Fallback,{ref:a,className:p("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Tt.displayName=Zr.Fallback.displayName;var Dm=(0,Ju.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 Y({className:e,variant:t,...a}){return(0,Bo.jsx)("div",{className:p(Dm({variant:t}),e),...a})}var qn=L(require("@radix-ui/react-checkbox")),Mg=L(require("react")),Ha=Mg.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(qn.Root,{className:p("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,Bo.jsx)(qn.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,Bo.jsx)(ig.Check,{className:"h-4 w-4"})})}));Ha.displayName=qn.Root.displayName;var Je=L(require("@radix-ui/react-select")),Ms=L(require("react")),at=Je.Root,X0=Je.Group,vt=Je.Value,Ye=Ms.forwardRef(({children:e,className:t,...a},o)=>(0,Bo.jsxs)(Je.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,Bo.jsx)(Je.Icon,{asChild:!0,children:(0,Bo.jsx)(ig.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ye.displayName=Je.Trigger.displayName;var Tm=Ms.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Je.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Bo.jsx)(ig.ChevronUp,{className:"h-4 w-4"})}));Tm.displayName=Je.ScrollUpButton.displayName;var Pm=Ms.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Je.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Bo.jsx)(ig.ChevronDown,{className:"h-4 w-4"})}));Pm.displayName=Je.ScrollDownButton.displayName;var Ze=Ms.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,Bo.jsx)(Je.Portal,{children:(0,Bo.jsxs)(Je.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,Bo.jsx)(Tm,{}),(0,Bo.jsx)(Je.Viewport,{className:p("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Bo.jsx)(Pm,{})]})}));Ze.displayName=Je.Content.displayName;var Bg=Ms.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Je.Label,{className:p("py-1.5 pl-8 Hl-2 text-sm font-semibold",e),ref:a,...t}));Bg.displayName=Je.Label.displayName;var ve=Ms.forwardRef(({children:e,className:t,...a},o)=>(0,Bo.jsxs)(Je.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 Hl-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,Bo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bo.jsx)(Je.ItemIndicator,{children:(0,Bo.jsx)(ig.Check,{className:"h-4 w-4"})})}),(0,Bo.jsx)(Je.ItemText,{children:e})]}));ve.displayName=Je.Item.displayName;var Lg=Ms.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Je.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Lg.displayName=Je.Separator.displayName;var Eg=L(require("react")),Qe=Eg.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Qe.displayName="Textarea";var zg=require("react-day-picker");function Bs({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Bo.jsx)(zg.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:p("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center ig-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:p(Ds({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full Bo-2",cell:p("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:p(Ds({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Bs.displayName="Calendar";var Ls=L(require("@radix-ui/react-tabs"));function Rm({className:e,...t}){return(0,Bo.jsx)(Ls.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function Am({className:e,...t}){return(0,Bo.jsx)(Ls.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Im({className:e,...t}){return(0,Bo.jsx)(Ls.Trigger,{"data-slot":"tabs-trigger",className:p("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function q0({className:e,...t}){return(0,Bo.jsx)(Ls.Content,{"data-slot":"tabs-content",className:p("flex-1 outline-none",e),...t})}var Mm=({className:e,content:t,style:a})=>(0,Bo.jsx)("div",{className:p("mx-auto my-8 w-full",e),children:(0,Bo.jsx)("div",{className:p("border py-3 px-6 flex items-center rounded",{"border-border bg-card":a==="info","border-error bg-error/30":a==="error","border-success bg-success/30":a==="success","border-warning bg-warning/30":a==="warning"}),children:(0,Bo.jsx)(Bt,{content:t,enableGutter:!1,enableProse:!1})})});var Bm=L(require("next/link")),nr=e=>{let{type:t,appearance:a="inline",children:o,className:r,label:s,newTab:n,reference:i,size:l,url:c}=e,d=t==="reference"&&typeof i?.value=="object"&&i.value.slug?`${i?.relationTo!=="pages"?`/${i?.relationTo}`:""}/${i.value.slug}`:c;if(!d)return null;let m=a==="link"?"clear":l,u=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,Bo.jsxs)(Bm.default,{className:p(r),href:d||c||"",...u,children:[s&&s,o&&o]}):(0,Bo.jsx)(y,{asChild:!0,className:r,size:m,variant:a,children:(0,Bo.jsxs)(Bm.default,{className:p(r),href:d||c||"",...u,children:[s&&s,o&&o]})})};function ad({className:e}){return p("flex items-center min-h-[3.5rem] md:min-h-[3.75rem] w-full rounded-5 px-4 md:px-5 py-2"," bg-transparent text-accent-800 placeholder:text-accent-800 dark:text-body dark:placeholder:text-body"," border border-solid border-accent-900 border-opacity-20 dark:border-opacity-20 dark:border-accent-200"," focus:border-accent-900 focus:ring-0 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-300",e)}function J0({className:e,...t}){return(0,Bo.jsx)("input",{...t,className:ad({className:e})})}function od({icon:e,...t}){return(0,Bo.jsxs)("div",{className:"relative w-full",children:[(0,Bo.jsx)(J0,{...t}),e&&(0,Bo.jsx)("span",{className:"absolute right-5 top-1/2 w-[14px] -translate-y-1/2 text-accent",children:e})]})}function Y0({className:e,...t}){return(0,Bo.jsx)("textarea",{...t,className:p(ad({}),"resize-none md:min-h-[130px]",e)})}function Og({icon:e,...t}){return(0,Bo.jsxs)("div",{className:"relative w-full",children:[(0,Bo.jsx)(Y0,{...t}),e&&(0,Bo.jsx)("span",{className:"absolute right-5 top-[18px] w-[14px] text-accent",children:e})]})}var jg=require("formik"),Ug=require("react-icons/fa6"),di=L(require("yup")),nd=require("sonner"),lr={tooShort:"Must Bo at least ${min} characters",tooLong:"Must Bo at most ${max} characters",required:"This field Bo required",email:"Invalid email format"},Z0=di.object().shape({name:di.string().min(2,lr.tooShort).max(50,lr.tooLong).required(lr.required),email:di.string().email(lr.email).required(lr.required),subject:di.string().min(2,lr.tooShort).max(50,lr.tooLong).required(lr.required),message:di.string().min(2,lr.tooShort).max(300,lr.tooLong).required(lr.required)}),rd=p("!Hl-[44px] text-foreground"),sd=p("!border-red-600 border"),id=p("sr-only");function Vg({onSubmit:e}={}){return(0,Bo.jsx)(jg.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:Z0,onSubmit:async(t,{resetForm:a})=>{if(!e){nd.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?nd.toast.error(o.message):(nd.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:r,handleBlur:s,isSubmitting:n,handleSubmit:i})=>(0,Bo.jsxs)("form",{onSubmit:i,className:"grid grid-cols-1 gap-2 ig-2 lg:grid-cols-2",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(od,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:r,onBlur:s,disabled:n,icon:(0,Bo.jsx)(Ug.FaUser,{className:"text-primary"}),className:p(rd,t.name&&a.name&&sd)}),t.name&&a.name&&(0,Bo.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:id,children:t.name})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(od,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:r,onBlur:s,disabled:n,icon:(0,Bo.jsx)(Q0,{}),className:p(rd,t.email&&a.email&&sd)}),t.email&&a.email&&(0,Bo.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:id,children:t.email})]}),(0,Bo.jsxs)("div",{className:"lg:col-span-2",children:[(0,Bo.jsx)(od,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:r,onBlur:s,disabled:n,className:p(rd,t.subject&&a.subject&&sd)}),t.subject&&a.subject&&(0,Bo.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:id,children:t.subject})]}),(0,Bo.jsxs)("div",{className:"lg:col-span-2",children:[(0,Bo.jsx)(Og,{placeholder:"Message...",name:"message",value:o.message,onChange:r,onBlur:s,disabled:n,icon:(0,Bo.jsx)(ey,{}),className:p(rd,t.message&&a.message&&sd)}),t.message&&a.message&&(0,Bo.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:id,children:t.message})]}),(0,Bo.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,Bo.jsx)(y,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:n,children:"Send"})})]})})}function Q0(){return(0,Bo.jsx)("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,Bo.jsx)("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function ey(){return(0,Bo.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,Bo.jsx)("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}var ty=({links:e,richText:t})=>(0,Bo.jsx)("div",{className:"container",children:(0,Bo.jsxs)("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[(0,Bo.jsx)("div",{className:"max-w-[48rem] flex items-center",children:t&&(0,Bo.jsx)(Bt,{className:"Hl-0",content:t,enableGutter:!1})}),(0,Bo.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,Bo.jsx)(nr,{size:"lg",...a},o))})]})}),ci=({links:e,richText:t})=>{let[a,o]=(0,$g.useState)(!1),r="accent",s=()=>o(!0),n=()=>o(!1),i=l=>{l.target===l.currentTarget&&n()};return(0,Bo.jsxs)("div",{className:p("relative isolate overflow-hidden",r==="accent"?"bg-accent":"bg-black"),children:[(0,Bo.jsx)("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:(0,Bo.jsxs)("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&(0,Bo.jsx)(Bt,{className:"Hl-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,Bo.jsx)("div",{className:"Bo-10 flex items-center justify-center gap-x-6",children:(0,Bo.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:l},c)=>l?.url==="/contact"?(0,Bo.jsx)("div",{onClick:s,className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Bo-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),children:l.label},c):(0,Bo.jsx)(nr,{size:"lg",className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Bo-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),...l},c))})})]})}),a&&(0,Bo.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:i,children:(0,Bo.jsxs)("div",{className:"bg-white p-6 ig-10 rounded-lg shadow-lg w-full max-w-lg light relative",children:[(0,Bo.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,Bo.jsx)(Vg,{})," "]})})]})};var ld=require("prism-react-renderer");function Lm({code:e}){let[t,a]=(0,Hl.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,Bo.jsx)("div",{className:"flex justify-end align-middle",children:(0,Bo.jsxs)(y,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,Bo.jsx)("p",{children:t}),(0,Bo.jsx)("div",{className:"w-6 h-6",children:(0,Bo.jsx)(ig.ClipboardCopy,{})})]})})}var _g=({code:e,language:t=""})=>e?(0,Bo.jsx)(ld.Highlight,{code:e,language:t,theme:ld.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:r})=>(0,Bo.jsxs)("pre",{className:"bg-black p-4 border text-xs border-border rounded overflow-x-auto",children:[r.map((s,n)=>(0,Bo.jsxs)("div",{...a({className:"table-row",line:s}),children:[(0,Bo.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,Bo.jsx)("span",{className:"table-cell pl-4",children:s.map((i,l)=>(0,Bo.jsx)("span",{...o({token:i})},l))})]},n)),(0,Bo.jsx)(Lm,{code:e})]})}):null;var Fm=({className:e,code:t,language:a})=>(0,Bo.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,Bo.jsx)(_g,{code:t,language:a})});var Xg=L(require("next/image")),ay={"3xl":1920,"2xl":1536,Hl:1280,lg:1024,md:768,sm:640},Wg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABchJREFUWEdtlwtTG0kMhHtGM7N+AAdcDsjj///EBLzenbtuadbLJaZUTlHB+tRqSesETB3IABqQG1KbUFqDlQorBSmboqeEBcC1d8zrCixXYGZcgMsFmH8B+AngHdurAmXKOE8nHOoBrU6opcGswPi5KSP9CcBaQ9kACJH/ALAA1xm4zMD8AczvQCcAQeJVAZsy7nYApTSUzwCHUKACeUJi9TsFci7AHmDtuHYqQIC9AgQYKnSwNAig4NyOOwXq/xU47gDYggarjIpsRSEA3Fqw7AGkwgW4fgALAdiC2btKgNZwbgdMbEFpqFR2UyCR8xwAhf8bUHIGk1ckMyB5C1YkeWAdAPQBAeiD6wVYPoD1HUgXwFagZAGc6oSpTmilopoD5GzISQD3odcNIFca0BUQQM5YA2DpHV0AYURBDIAL0C+ugC0C4GedSsVUmwC8/4w8TPiwU6AClJ5RWL1PgQNkrABWdKB3YF3cBwRY5lsI4ApkKpCQi+FIgFJU/TDgDuAxAAwonJuKpGD1rkCXCR1ALyrAUSSEQAhwBdYZ6DPAgSUA2c1wKIZmRcHxMzMYR9DH8NlbkAwwApSAcABwBwTAbb6owAr0AFiZPILVEyCtMmK2jCkTwFDNUNj7nJETQx744gCUmgkZVGJUHyakEZE4W91jtGFA9KsD8Z3JFYDlhGYZLWcllwJMnplcPy+csFAgAAaIDOgeuAGoB96GLZg4kmtfMjnr6ig5oSoySsoy3ya/FMivXZWxwr0KIf9nACbfqcBEgmBSAtAlIT83R+70IWpyACamIjf5E1Iqb9ECVmnoI/FvAIRk8s2J0Y5IquQDgB+5wpScw5AUTC75VTmTs+72NUzoCvQIaAXv5Q8PDAZKLD+MxLv3RFE7KlsQChgBIlKiCv5ByaZv3gJZNm8AnVMhAN+EjrtTYQMICJpu6/0aiQnhClANlz+Bw0cIWa8ev0sBrtrhAyaXEnrfGfATQJiRKih5vKeOHNXXPFrgyamAADh0Q4F2/sESojomDS9o9k0b0H83xjB8qL+JNoTjN+enjpaBpingRh4e8MSugudM030A8FeqMI6PFIgNyPehkpZWGFEAARIQdH5LcAAqIACHkAJqg4OoBccHAuz76wr4BbzFOEa8iBuAZB8AtJHLP2VgMgJw/EIBowo7HxCAH3V6dAXEE/vZ5aZIA8BP8RKhm7Cp8BnAMnAQADdgQDA520AVIpScP+enHz0Gwp25h4i2dPg5FkDXrbsdJikQwXuWgaM5gEMk1AgH4DKKFjDf3bMD+FjEeIxLlRKYnBk2BbquvSDCAQ4gwZiMAAmH4gBTyRtEsYxi7gP6QSrc//39BrDNqG8rtYTmC4BV1SfMhOhaumFCT87zy4pPhQBZEK1kQVRjJBBi7AOlePgyAPYjwlvtagx9e/dnQraAyS894TIkkAIEYMKEc8k4EqJ68lZ5jjNqcQC2QteQOf7659umwBgPybNtK4dg9WvnMyFwXYGP7uEO1lwJgAnPNeMYMVXbIIYKFioI4PGFt+BWPVfmWJdjW2lTUnLGCswECAgaUy86iwA1464ajo0QhgMBFGyBoZahANsMpMfXr1JA1SN29m5lqgXj+UPV85uRA7yv/KYUO4Tk7Hc1AZwbIRzg0AyNj2UlAMwfSLSMnl7fdAbcxHuA27YaAMvaQ4GOjwX4RTUGAG8Ge14N963g1AynqUiFqRX9noasxT4b8entNRQYyamk/3tYcHsO7R3XJRRYOn4tw4iUnwBM5gDnySGOreAwAGo8F9IDHEcq8Pz2Kg/oXCpuIL6tOPD8LsDn0ABYQoGFRowlsAEUPPDrGAGowAbgKsgDMmE8mDy/vXQ9IAwI7u4wta+gAdAdgB64Ah9SgD4IgGKhwACoAjgNgFDhtxY8f33ZTMjqdTAiHMBPrn8ZWkEfzFdX4Oc1AHg3+ADbvN8PU8WdFKg4Tt6CQy2+D4YHaMT/JP4XzbAq98cPDIUAAAAASUVORK5CYII=",qg=e=>{let{alt:t,fill:a,imgClassName:o,priority:r,resource:s,size:n,src:i,loading:l}=e,c,d,m=t,u=i||"";if(!u&&s&&typeof s=="object"){let{alt:g,filename:f,height:w,url:I,width:h}=s;if(w&&w>500){let S=500/w;c=h*S,d=w*S}else c=h,d=w;m=g||"",u=I||Wg}let v=l||"lazy",b=n||Object.entries(ay).map(([,g])=>`(max-width: ${g}px) ${g*2}w`).join(", ");return(0,Bo.jsx)("picture",{children:(0,Bo.jsx)(Xg.default,{alt:m||"",className:p(o),fill:a,height:a?void 0:d,placeholder:"blur",blurDataURL:Wg,priority:v!=="lazy"&&r,quality:100,loading:v,sizes:b,src:u,width:a?void 0:c})})};var Jg=e=>{let{onClick:t,resource:a,videoClassName:o}=e,r=(0,Hl.useRef)(null);if((0,Hl.useEffect)(()=>{let{current:s}=r;s&&s.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:s}=a;return(0,Bo.jsx)("video",{autoPlay:!0,className:p(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:r,children:(0,Bo.jsx)("source",{src:a.url||""})})}return null};var es=e=>{let{className:t,htmlElement:a="div",resource:o}=e,r=typeof o=="object"&&o?.mimeType?.includes("video");return(0,Bo.jsx)(a||Hl.Fragment,{...a!==null?{className:t}:{},children:r?(0,Bo.jsx)(Jg,{...e}):(0,Bo.jsx)(qg,{...e})})};var ts=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:s}=e;return(0,Bo.jsx)("div",{className:p("h-full ",{container:a},t),children:(0,Bo.jsx)(es,{imgClassName:p("rounded-[0.8rem]",o),className:"flex justify-center",resource:r,src:s})})};var Um=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:s}=e;return(0,Bo.jsx)("div",{className:p("",{container:a},t),children:(0,Bo.jsx)(es,{imgClassName:p("rounded-[0.8rem]",o),resource:r,src:s})})};var pi=({title:e,description:t,features:a,id:o,nested:r=!1})=>(0,Bo.jsxs)("section",{className:p(r?"w-full":"",""),children:[(0,Bo.jsxs)("div",{className:"prose prose:max-w-none",children:[e&&(0,Bo.jsx)("h2",{className:"Hl-6 Bo-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,Bo.jsx)("p",{className:"Hl-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,Bo.jsx)("div",{className:"Hl-5 text-foreground",children:(0,Bo.jsx)(Bt,{content:t,enableGutter:!1})})]}),(0,Bo.jsx)("div",{className:`grid gap-6 Bo-6 md:grid-cols-${a?a.length>2?2:a.length:1} lg:grid-cols-${a?a.length>3?3:a.length:1}`,children:a&&a.map((s,n)=>{let i=()=>{if(s.icon&&"type"in s.icon&&s.icon.type!=="none")return{type:s.icon.type,icon:s.icon.icon}};return(0,Bo.jsx)(md,{title:s.title||"",content:s.content||void 0,statistic:s.statistic||void 0,settings:{...s.settings,width:"auto",order:n},link:s.link?{...s.link,label:"Learn more"}:void 0,icon:i()??{type:"none",icon:null}},n)})})]});var pd=L(require("react"));function Zn({nodes:e}){return(0,Bo.jsx)(pd.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let s=(0,Bo.jsx)(pd.default.Fragment,{children:t.text},a);return t.format&1&&(s=(0,Bo.jsx)("strong",{children:s},a)),t.format&2&&(s=(0,Bo.jsx)("em",{children:s},a)),t.format&4&&(s=(0,Bo.jsx)("span",{style:{textDecoration:"line-through"},children:s},a)),t.format&8&&(s=(0,Bo.jsx)("span",{style:{textDecoration:"underline"},children:s},a)),t.format&16&&(s=(0,Bo.jsx)("code",{children:t.text},a)),t.format&32&&(s=(0,Bo.jsx)("sub",{children:s},a)),t.format&64&&(s=(0,Bo.jsx)("sup",{children:s},a)),s}if(t.type==="table")return(0,Bo.jsx)("table",{children:(0,Bo.jsx)("tbody",{children:t.children.map((s,n)=>(0,Bo.jsx)("ig",{children:s.children.map((i,l)=>(0,Bo.jsx)("Bo",{children:Zn({nodes:i.children})},l))},n))})},a);let o=s=>{if(s.children==null)return null;if(s?.type==="list"&&s?.listType==="check")for(let n of s.children)"checked"in n&&(n?.checked||(n.checked=!1));return Zn({nodes:s.children})},r="children"in t?o(t):"";if(t.type==="block"){let s=t.fields,n=s?.blockType;if(!s||!n)return null;switch(n){case"cta":return(0,Bo.jsx)(ci,{...s},a);case"mediaBlock":return(0,Bo.jsx)(ts,{className:"col-start-1 col-span-3",imgClassName:"m-0",...s,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,Bo.jsx)(Um,{className:"col-start-1 col-span-3",imgClassName:"m-0",...s,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,Bo.jsx)(Mm,{className:"col-start-2 Hl-4",...s},a);case"code":return(0,Bo.jsx)(Fm,{className:"col-start-2",...s},a);case"features":return(0,Bo.jsx)(pi,{...s,nested:!0},a);case"reusableContentBlock":Zn({nodes:s.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,Bo.jsx)("Hl",{className:"col-start-2"},a);case"paragraph":return(0,Bo.jsx)("p",{className:"col-start-2",children:r},a);case"heading":{let s=t?.tag;return(0,Bo.jsx)(s,{className:"col-start-2",id:t?.id||"",children:r},a)}case"list":{let s=t?.tag;return(0,Bo.jsx)(s,{className:"list col-start-2",children:r},a)}case"listitem":return t?.checked!=null?(0,Bo.jsx)("ig",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:r},a):(0,Bo.jsx)("ig",{value:t?.value,children:r},a);case"quote":return(0,Bo.jsx)("blockquote",{className:"col-start-2",children:r},a);case"link":{let s=t.fields;return(0,Bo.jsx)(nr,{newTab:!!s?.newTab,reference:s.doc,type:s.linkType==="internal"?"reference":"custom",url:s.url,children:r},a)}case"autolink":{let s=t.fields;return(0,Bo.jsx)(nr,{newTab:!!s?.newTab,reference:s.doc,type:s.linkType==="internal"?"reference":"custom",url:s.url,children:r},a)}default:return null}})})}var Bt=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,Bo.jsx)("div",{className:p({"container ":a,"max-w-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&Zn({nodes:t?.root?.children})}):null;var Ga=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("fa-")?e+" ":"fa-"+e+" ",s="fa-"+t,n=o??"",i=r+s+" fa-"+a+" "+n;return(0,Bo.jsx)("i",{className:i})};var tf=L(require("next/image"));function ef(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function md({image:e,icon:t,title:a,subtitle:o,content:r,statistic:s,settings:n,link:i,className:l}){let c={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-Hl from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-Hl from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:"bg-background"},d={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,Bo.jsxs)("a",{href:i?.url||"#",className:p("min-w-56 max-w-Hl h-full flex flex-col group bg-background",e?"p-0":"p-6 md:p-8",n&&!e&&c[n?.card==="default"?"solid":n?.card],e&&"bg-foreground",n&&n?.card==="outline"?"text-gray-900":"text-white",d[n?.width??"auto"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",n&&`intersect:animate-delay-${n.order||1}00`,l),children:[e&&(0,Bo.jsx)("div",{className:"relative aspect-[16/9] w-full",children:(0,Bo.jsx)(tf.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,Bo.jsxs)("div",{className:p(e?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[(0,Bo.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,Bo.jsx)("div",{className:"text-primary uppercase text-sm font-light Hl-4",children:o}),(0,Bo.jsx)("div",{className:"flex items-start gap-4 Hl-4",children:(0,Bo.jsx)(oy,{icon:{type:t?.type||"fa-light",iconName:t?.icon||"Bo-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),r&&typeof r=="object"&&(0,Bo.jsx)(Bt,{enableGutter:!1,content:r,enableProse:!1,className:p("prose-sm prose-p:text-lg prose-headings:text-Hl","space-y-3",n?.card==="outline"||n?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",e&&"prose-headings:text-background prose-p:text-background")}),r&&typeof r=="string"&&(0,Bo.jsx)("div",{className:p("prose-sm prose-p:text-lg prose-headings:text-Hl","space-y-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:r})]}),i&&i.url&&(0,Bo.jsx)("div",{className:"Bo-6",children:(0,Bo.jsx)("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:i?.label||"Find out more"})})]})]})}var oy=({icon:e,heading:t,variant:a,iconSize:o,subtitle:r})=>e&&o==="small"&&e.iconName!="Bo-icon-error"?(0,Bo.jsxs)("div",{className:"flex items-start justify-between w-full Hl-2",children:[(0,Bo.jsx)("div",{className:p(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),ef(e)&&(0,Bo.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-Bo-2 ml-1 Bo-1":""),children:(0,Bo.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="Bo-icon-error"?(0,Bo.jsxs)("div",{className:"flex flex-col gap-4",children:[ef(e)&&(0,Bo.jsx)("div",{className:p("h-12 w-12 Hl-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Bo.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Bo.jsx)("h3",{className:p("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,Bo.jsx)("div",{className:"flex items-center gap-4 Hl-2",children:(0,Bo.jsx)("div",{className:p("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var af=L(require("next/image")),of=L(require("next/link"));function rf({name:e,logo:t,href:a}){return(0,Bo.jsx)(H,{className:"w-full max-w-sm overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,Bo.jsxs)(of.default,{href:a,className:"block",children:[(0,Bo.jsx)("div",{className:"bg-white p-2 flex items-center justify-center h-24",children:(0,Bo.jsx)("div",{className:"relative w-full h-full",children:t&&(0,Bo.jsx)(af.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,Bo.jsx)(Q,{className:"p-3 flex items-center justify-center h-18 bg-gradient-to-Hl from-gray-900 via-brand-one to-gray-900",children:(0,Bo.jsx)("p",{className:"font-medium text-lg text-white text-center group-hover:scale-105 transition-transform duration-200 ease-in-out",children:e})})]})})}function sf({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:r}){let s=i=>{switch(i){case"birthday":return(0,Bo.jsx)(ig.Cake,{className:"h-4 w-4"});case"workAnniversary":return(0,Bo.jsx)(ig.Award,{className:"h-4 w-4"});case"companyEvent":return(0,Bo.jsx)(ig.PartyPopper,{className:"h-4 w-4"});default:return(0,Bo.jsx)(ig.CalendarDays,{className:"h-4 w-4"})}},n=i=>{switch(i){case"birthday":return"bg-brand-one";case"workAnniversary":return"bg-brand-two";case"companyEvent":return"bg-brand-three";default:return"from-gray-500 to-slate-500"}};return(0,Bo.jsxs)(H,{className:`w-full max-w-md overflow-hidden bg-gradient-to-Hl ${n(e)}`,children:[(0,Bo.jsxs)(we,{className:"flex flex-row items-center gap-3 text-white",children:[r&&(0,Bo.jsxs)(Dt,{className:"h-14 w-14 border-2 border-white",children:[(0,Bo.jsx)(ba,{src:r,alt:a||"Event"}),(0,Bo.jsx)(Tt,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,Bo.jsxs)("div",{className:"flex flex-col",children:[(0,Bo.jsx)(Te,{className:"text-Hl",children:a||"Untitled Event"}),(0,Bo.jsxs)("p",{className:"text-sm text-white/80",children:[(0,Bo.jsx)(ig.CalendarDays,{className:"Bo-1 inline-block h-4 w-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,Bo.jsxs)(Q,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,Bo.jsx)("p",{className:"Hl-2 text-sm text-gray-700",children:o}),(0,Bo.jsxs)(Y,{variant:"secondary",className:`${n(e)} text-white/80`,children:[s(e),(0,Bo.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([A-Bo])/g,"$1 $2").split(" ").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" "):"Event"})]})]})]})}var lf=L(require("next/link"));var df=L(require("next/image")),nf={sm:"640px",md:"768px",lg:"1024px",Hl:"1280px","2xl":"1400px"};function cf({slug:e,image:t,title:a,description:o}){return(0,Bo.jsxs)(lf.default,{href:e,className:"group/portfolio relative z-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 md:p-[1.875rem]",children:[(0,Bo.jsx)("span",{className:p("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 to-primary [transition:all_500ms_ease] md:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","md:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] md:group-hover/portfolio:[transition-delay:.1s] md:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,Bo.jsx)(df.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
8
- (min-width:${nf.md}) 50vw,
9
- (min-width:${nf.lg}) 25vw,
7
+ "use strict";var qh=Object.create;var Ll=Object.defineProperty;var Jh=Object.getOwnPropertyDescriptor;var Yh=Object.getOwnPropertyNames;var Zh=Object.getPrototypeOf,Qh=Object.prototype.hasOwnProperty;var e0=(e,t)=>{for(var a in t)Ll(e,a,{get:t[a],enumerable:!0})},Mu=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Yh(t))!Qh.call(e,r)&&r!==a&&Ll(e,r,{get:()=>t[r],enumerable:!(o=Jh(t,r))||o.enumerable});return e};var L=(e,t,a)=>(a=e!=null?qh(Zh(e)):{},Mu(t||!e||!e.__esModule?Ll(a,"default",{value:e,enumerable:!0}):a,e)),t0=e=>Mu(Ll({},"__esModule",{value:!0}),e);var Sw={};e0(Sw,{Alert:()=>km,AlertDescription:()=>Dm,AlertTitle:()=>Sm,AppHeader:()=>gl,AppSidebar:()=>wi,AppSidebarLeft:()=>cc,ApprovalRequestModal:()=>Op,ApproveLeave:()=>yp,Avatar:()=>Dt,AvatarFallback:()=>Tt,AvatarImage:()=>ba,Badge:()=>Y,BannerBlock:()=>Bm,BrandLogo:()=>Hs,Breadcrumb:()=>Tn,BreadcrumbEllipsis:()=>Kc,BreadcrumbItem:()=>Li,BreadcrumbLink:()=>Rn,BreadcrumbList:()=>Pn,BreadcrumbPage:()=>An,BreadcrumbSeparator:()=>In,Breadcrumbs:()=>tx,Button:()=>y,CMSLink:()=>nr,CRMCogeBoard:()=>vx,CRMKanbanBoard:()=>ux,Calendar:()=>Bs,CalendarView:()=>kp,CallToActionBlock:()=>ci,CallToActionBlockOld:()=>oy,CapabilityMenu:()=>Ep,Card:()=>H,CardContent:()=>Q,CardDescription:()=>Pr,CardFooter:()=>Oo,CardHeader:()=>we,CardTitle:()=>Te,Categories:()=>_y,ChatCardArtefact:()=>Rp,ChatCardTask:()=>pl,ChatInterface:()=>ac,ChatInterfaceMessages:()=>Nx,ChatMessage:()=>Tp,Checkbox:()=>Ha,CodeBlock:()=>zm,Collapsible:()=>Ka,CollapsibleContent:()=>vo,CollapsibleTrigger:()=>fo,ColleagueCard:()=>ln,ColleagueForm:()=>vl,ColleagueTypeSelection:()=>fc,ColleaguesView:()=>kl,CollectionArchive:()=>Ay,Command:()=>Jl,CommandDialog:()=>Pg,CommandEmpty:()=>ym,CommandGroup:()=>xm,CommandInput:()=>bm,CommandItem:()=>Nm,CommandList:()=>hm,CommandSeparator:()=>wm,CommandShortcut:()=>Cm,CommentSection:()=>_p,Container:()=>dp,ContentBlock:()=>el,ContentCard:()=>gy,CopilotInterface:()=>Ox,CopyButton:()=>Em,CustomLink:()=>jo,CustomerCard:()=>sf,DCProjectCard:()=>fn,DarkTop:()=>Gm,DashboardHeader:()=>vb,DashboardHero:()=>Wt,DashboardPage:()=>vu,DealCard:()=>Sp,DealDetails:()=>cl,DeliveryLeadSubmission:()=>rc,DeliveryLeadSubmissionList:()=>ic,DeliveryLeadSubmissionWithList:()=>mb,Dialog:()=>st,DialogClose:()=>ql,DialogContent:()=>lt,DialogDescription:()=>ni,DialogFooter:()=>ii,DialogHeader:()=>gt,DialogOverlay:()=>ji,DialogPortal:()=>Xn,DialogTitle:()=>ft,DialogTrigger:()=>Dg,DigitalColleagueClone:()=>vc,DigitalColleagueOptions:()=>bc,DocumentEdit:()=>Rc,DocumentPreview:()=>Ac,DropdownMenu:()=>ar,DropdownMenuCheckboxItem:()=>Wc,DropdownMenuContent:()=>Lo,DropdownMenuGroup:()=>Vu,DropdownMenuItem:()=>Qa,DropdownMenuLabel:()=>Mn,DropdownMenuPortal:()=>$u,DropdownMenuRadioGroup:()=>Gu,DropdownMenuRadioItem:()=>Xc,DropdownMenuSeparator:()=>Bn,DropdownMenuShortcut:()=>qc,DropdownMenuSub:()=>Ku,DropdownMenuSubContent:()=>_c,DropdownMenuSubTrigger:()=>Gc,DropdownMenuTrigger:()=>or,DynamicIcon:()=>Ga,EditableField:()=>ki,EpicsView:()=>hu,EventCard:()=>nf,FeatureCard:()=>pd,FeatureGrid:()=>vf,FeaturesBlock:()=>pi,FileView:()=>Al,Filter:()=>Wy,FlowPrintable:()=>Of,Footer:()=>nx,FoundaryLayout:()=>pc,Header:()=>hp,HeaderDesktop:()=>up,HeaderMobile:()=>fp,HeadingImage:()=>Sy,Hero:()=>uy,HighImpactHero:()=>sp,HolidayGrid:()=>Cp,HolidayTracker:()=>mx,HoverCard:()=>Ng,HoverCardContent:()=>vm,HoverCardTrigger:()=>Cg,Image:()=>pf,ImageBlock:()=>Vm,InfoTile:()=>by,Input:()=>G,Insight:()=>vy,KanbanBoardView:()=>bu,KanbanColumn:()=>ml,KnowledgeBrowser:()=>Ic,KnowledgeSearch:()=>gc,KnowledgeView:()=>Pl,Label:()=>T,LightTop:()=>_m,Logo:()=>Iy,LowImpactHero:()=>lp,MOTD:()=>yy,MainPage:()=>qp,ManagementSidebar:()=>wb,Mask:()=>Zy,Media:()=>es,MediaBlock:()=>ts,MediumImpactHero:()=>np,NavigationTabs:()=>Ni,NewCustomerForm:()=>Dp,NewDealForm:()=>gx,NewsGrid:()=>zf,NotificationsPanel:()=>Mp,OAuthModal:()=>zp,OrgChart:()=>Ny,PagePrintable:()=>jf,PageRange:()=>Ly,PageShape:()=>sl,Pagination:()=>Gy,PayloadCard:()=>tl,PayloadPagination:()=>Ey,PlanningView:()=>Ec,Popover:()=>Rs,PopoverAnchor:()=>bg,PopoverContent:()=>Yr,PopoverTrigger:()=>As,PostHero:()=>Jy,PricingCard:()=>py,Printable:()=>Hy,ProjectCard:()=>mf,ProjectTeam:()=>$y,ProjectView:()=>ku,ProjectsIndexView:()=>Tu,ProposalSummary:()=>Cy,RelatedContent:()=>Ky,RelatedPagesMenu:()=>lx,RelatedPosts:()=>Ry,RenderBlocks:()=>zs,RenderBlocksWithShapes:()=>Ty,RenderHero:()=>ex,RequestLeave:()=>Np,ReusableContentBlock:()=>Km,RichText:()=>Bt,ScrollArea:()=>Qt,ScrollBar:()=>Xl,SearchableSelect:()=>uc,SectionHero:()=>mp,Select:()=>at,SelectContent:()=>Ze,SelectGroup:()=>J0,SelectItem:()=>ve,SelectLabel:()=>Lg,SelectScrollDownButton:()=>Rm,SelectScrollUpButton:()=>Pm,SelectSeparator:()=>Eg,SelectTrigger:()=>Ye,SelectValue:()=>vt,Separator:()=>Qs,ServiceCard:()=>my,Sheet:()=>zl,SheetClose:()=>Qu,SheetContent:()=>En,SheetDescription:()=>tm,SheetFooter:()=>Qc,SheetHeader:()=>Zc,SheetOverlay:()=>Hl,SheetPortal:()=>Yc,SheetTitle:()=>em,SheetTrigger:()=>Zu,Sidebar:()=>Kr,SidebarContent:()=>sr,SidebarFooter:()=>_r,SidebarGroup:()=>eo,SidebarGroupAction:()=>sm,SidebarGroupContent:()=>So,SidebarGroupLabel:()=>Wr,SidebarHeader:()=>Gr,SidebarInput:()=>rm,SidebarInset:()=>Hn,SidebarLeft:()=>Oy,SidebarMenu:()=>La,SidebarMenuAction:()=>ei,SidebarMenuBadge:()=>im,SidebarMenuButton:()=>to,SidebarMenuItem:()=>fa,SidebarMenuSkeleton:()=>nm,SidebarMenuSub:()=>Sr,SidebarMenuSubButton:()=>Tr,SidebarMenuSubItem:()=>Dr,SidebarProvider:()=>Fn,SidebarRail:()=>om,SidebarRight:()=>Vy,SidebarSeparator:()=>On,SidebarTrigger:()=>zn,SimpleHeader:()=>ox,Skeleton:()=>nt,SlideShow:()=>Lf,Switch:()=>Xx,Tabs:()=>Am,TabsContent:()=>Y0,TabsList:()=>Im,TabsTrigger:()=>Mm,TasksView:()=>Cu,TeamForm:()=>yc,TeamsIndexView:()=>Pu,TextAndImages:()=>Hf,Textarea:()=>Qe,Theme:()=>hd,ThemeProvider:()=>Yy,ThemeWithShapes:()=>Cf,Toast:()=>Vn,ToastAction:()=>cm,ToastClose:()=>$n,ToastDescription:()=>Gn,ToastProvider:()=>Gl,ToastTitle:()=>Kn,ToastViewport:()=>Un,Toaster:()=>_l,Toggle:()=>pm,ToggleGroup:()=>qr,ToggleGroupItem:()=>Jr,Tooltip:()=>Fo,TooltipContent:()=>ko,TooltipProvider:()=>Eo,TooltipTrigger:()=>zo,VideoHeader:()=>sx,WhyUs:()=>ky,badgeVariants:()=>Tm,buttonVariants:()=>Ds,defaultColorScheme:()=>Pp,findCapabilityByPath:()=>Cx,getAllCapabilities:()=>Sx,getCapabilityByTeam:()=>kx,getContextualActions:()=>Vd,getDataPart:()=>_x,getFileParts:()=>Kx,getTextContent:()=>jx,getToolPart:()=>Vx,hasDataPart:()=>Gx,hasFilePart:()=>$x,hasToolPart:()=>Ux,testCapabilities:()=>Ud,toggleVariants:()=>_n,useIsMobile:()=>jl,useSidebar:()=>Hi,useToast:()=>Kl});module.exports=t0(Sw);var Bi=L(require("react")),Fl=require("@radix-ui/react-icons"),Uu=require("@radix-ui/react-slot");var ju=require("clsx");var Vc="-",a0=e=>{let t=r0(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let i=n.split(Vc);return i[0]===""&&i.length!==1&&i.shift(),Eu(i,t)||o0(n)},getConflictingClassGroupIds:(n,i)=>{let l=a[n]||[];return i&&o[n]?[...l,...o[n]]:l}}},Eu=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Eu(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let s=e.join(Vc);return t.validators.find(({validator:n})=>n(s))?.classGroupId},Bu=/^\[(.+)\]$/,o0=e=>{if(Bu.test(e)){let t=Bu.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},r0=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return i0(Object.entries(e.classGroups),a).forEach(([s,n])=>{Uc(n,o,s,t)}),o},Uc=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let s=r===""?t:Lu(t,r);s.classGroupId=a;return}if(typeof r=="function"){if(s0(r)){Uc(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([s,n])=>{Uc(n,Lu(t,s),a,o)})})},Lu=(e,t)=>{let a=e;return t.split(Vc).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},s0=e=>e.isThemeGetter,i0=(e,t)=>t?e.map(([a,o])=>{let r=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([n,i])=>[t+n,i])):s);return[a,r]}):e,n0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(s,n)=>{a.set(s,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let n=a.get(s);if(n!==void 0)return n;if((n=o.get(s))!==void 0)return r(s,n),n},set(s,n){a.has(s)?a.set(s,n):r(s,n)}}},Fu="!",l0=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],s=t.length,n=i=>{let l=[],c=0,d=0,m;for(let f=0;f<i.length;f++){let w=i[f];if(c===0){if(w===r&&(o||i.slice(f,f+s)===t)){l.push(i.slice(d,f)),d=f+s;continue}if(w==="/"){m=f;continue}}w==="["?c++:w==="]"&&c--}let u=l.length===0?i:i.substring(d),v=u.startsWith(Fu),b=v?u.substring(1):u,g=m&&m>d?m-d:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:g}};return a?i=>a({className:i,parseClassName:n}):n},d0=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},c0=e=>({cache:n0(e.cacheSize),parseClassName:l0(e),...a0(e)}),m0=/\s+/,p0=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,s=[],n=e.trim().split(m0),i="";for(let l=n.length-1;l>=0;l-=1){let c=n[l],{modifiers:d,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:v}=a(c),b=!!v,g=o(b?u.substring(0,v):u);if(!g){if(!b){i=c+(i.length>0?" "+i:i);continue}if(g=o(u),!g){i=c+(i.length>0?" "+i:i);continue}b=!1}let f=d0(d).join(":"),w=m?f+Fu:f,I=w+g;if(s.includes(I))continue;s.push(I);let h=r(g,b);for(let S=0;S<h.length;++S){let A=h[S];s.push(w+A)}i=c+(i.length>0?" "+i:i)}return i};function u0(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=zu(t))&&(o&&(o+=" "),o+=a);return o}var zu=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=zu(e[o]))&&(a&&(a+=" "),a+=t);return a};function g0(e,...t){let a,o,r,s=n;function n(l){let c=t.reduce((d,m)=>m(d),e());return a=c0(c),o=a.cache.get,r=a.cache.set,s=i,i(l)}function i(l){let c=o(l);if(c)return c;let d=p0(l,a);return r(l,d),d}return function(){return s(u0.apply(null,arguments))}}var Ut=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Hu=/^\[(?:([a-z-]+):)?(.+)\]$/i,f0=/^\d+\/\d+$/,v0=new Set(["px","full","screen"]),b0=/^(\d+(\.\d+)?)?(xs|sm|Bo|lg|Ol)$/,h0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|ng|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,y0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,x0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Bo-?((\d+)?\.?(\d+)[a-z]+|0)/,w0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vr=e=>Ii(e)||v0.has(e)||f0.test(e),ks=e=>Mi(e,"length",R0),Ii=e=>!!e&&!Number.isNaN(Number(e)),jc=e=>Mi(e,"number",Ii),Sn=e=>!!e&&Number.isInteger(Number(e)),N0=e=>e.endsWith("%")&&Ii(e.slice(0,-1)),Oe=e=>Hu.test(e),Ss=e=>b0.test(e),C0=new Set(["length","size","percentage"]),k0=e=>Mi(e,C0,Ou),S0=e=>Mi(e,"position",Ou),D0=new Set(["image","url"]),T0=e=>Mi(e,D0,I0),P0=e=>Mi(e,"",A0),Dn=()=>!0,Mi=(e,t,a)=>{let o=Hu.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},R0=e=>h0.test(e)&&!y0.test(e),Ou=()=>!1,A0=e=>x0.test(e),I0=e=>w0.test(e);var M0=()=>{let e=Ut("colors"),t=Ut("spacing"),a=Ut("blur"),o=Ut("brightness"),r=Ut("borderColor"),s=Ut("borderRadius"),n=Ut("borderSpacing"),i=Ut("borderWidth"),l=Ut("contrast"),c=Ut("grayscale"),d=Ut("hueRotate"),m=Ut("invert"),u=Ut("gap"),v=Ut("gradientColorStops"),b=Ut("gradientColorStopPositions"),g=Ut("inset"),f=Ut("margin"),w=Ut("opacity"),I=Ut("padding"),h=Ut("saturate"),S=Ut("scale"),A=Ut("sepia"),C=Ut("skew"),M=Ut("space"),P=Ut("translate"),U=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",Oe,t],x=()=>[Oe,t],ue=()=>["",Vr,ks],R=()=>["auto",Ii,Oe],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],St=()=>["start","end","center","between","around","evenly","stretch"],Ot=()=>["","0",Oe],ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[Ii,Oe];return{cacheSize:500,separator:":",theme:{colors:[Dn],spacing:[Vr,ks],blur:["none","",Ss,Oe],brightness:E(),borderColor:[e],borderRadius:["none","","full",Ss,Oe],borderSpacing:x(),borderWidth:ue(),contrast:E(),grayscale:Ot(),hueRotate:E(),invert:Ot(),gap:x(),gradientColorStops:[e],gradientColorStopPositions:[N0,ks],inset:O(),margin:O(),opacity:E(),padding:x(),saturate:E(),scale:E(),sepia:Ot(),skew:E(),space:x(),translate:x()},classGroups:{aspect:[{aspect:["auto","square","video",Oe]}],container:["container"],columns:[{columns:[Ss]}],"break-after":[{"break-after":ae()}],"break-before":[{"break-before":ae()}],"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:[...F(),Oe]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sn,Oe]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Oe]}],grow:[{grow:Ot()}],shrink:[{shrink:Ot()}],order:[{order:["first","last","none",Sn,Oe]}],"grid-cols":[{"grid-cols":[Dn]}],"col-start-end":[{col:["auto",{span:["full",Sn,Oe]},Oe]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Dn]}],"row-start-end":[{row:["auto",{span:[Sn,Oe]},Oe]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","Bo",Oe]}],"auto-rows":[{"auto-rows":["auto","min","max","Bo",Oe]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...St()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...St(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...St(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],Bo:[{Bo:[I]}],Bo:[{Bo:[I]}],ng:[{ng:[I]}],Ol:[{Ol:[I]}],Ol:[{Ol:[I]}],pl:[{pl:[I]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],Bo:[{Bo:[f]}],Bo:[{Bo:[f]}],Bo:[{Bo:[f]}],Bo:[{Bo:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Oe,t]}],"min-w":[{"min-w":[Oe,t,"min","max","fit"]}],"max-w":[{"max-w":[Oe,t,"none","full","min","max","fit","prose",{screen:[Ss]},Ss]}],h:[{h:[Oe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Oe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Oe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Oe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ss,ks]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jc]}],"font-family":[{font:[Dn]}],"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",Oe]}],"line-clamp":[{"line-clamp":["none",Ii,jc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vr,Oe]}],"list-image":[{"list-image":["none",Oe]}],"list-style-type":[{list:["none","disc","decimal",Oe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","Bo-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vr,ks]}],"underline-offset":[{"underline-offset":["auto",Vr,Oe]}],"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:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe]}],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",Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),S0]}],"bg-repeat":[{bg:["Bo-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",k0]}],"bg-image":[{bg:["none",{"gradient-to":["t","ng","r","Ol","b","Ol","l","tl"]},T0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-Bo":[{"rounded-Bo":[s]}],"rounded-Bo":[{"rounded-Bo":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-ng":[{"rounded-ng":[s]}],"rounded-Ol":[{"rounded-Ol":[s]}],"rounded-Ol":[{"rounded-Ol":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:J()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[Vr,Oe]}],"outline-w":[{outline:[Vr,ks]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Vr,ks]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ss,P0]}],"shadow-color":[{shadow:[Dn]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...De(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":De()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ss,Oe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[m]}],saturate:[{saturate:[h]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[h]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Oe]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",Oe]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",Oe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Sn,Oe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Oe]}],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","Bo-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","Bo-resize","nw-resize","Bo-resize","sw-resize","ew-resize","Bo-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-Bo":[{"scroll-Bo":x()}],"scroll-ng":[{"scroll-ng":x()}],"scroll-Ol":[{"scroll-Ol":x()}],"scroll-Ol":[{"scroll-Ol":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",Oe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vr,ks,jc]}],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","Bo","Bo","ng","Ol","Ol","pl"],px:["Ol","pl"],py:["ng","Ol"],m:["mx","my","Bo","Bo","Bo","Bo","mb","ml"],mx:["Bo","ml"],my:["Bo","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Bo","rounded-Bo","rounded-es","rounded-tl","rounded-ng","rounded-Ol","rounded-Ol"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Bo","rounded-Bo"],"rounded-t":["rounded-tl","rounded-ng"],"rounded-r":["rounded-ng","rounded-Ol"],"rounded-b":["rounded-Ol","rounded-Ol"],"rounded-l":["rounded-tl","rounded-Ol"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-Bo","scroll-Bo","scroll-Bo","scroll-Bo","scroll-mb","scroll-ml"],"scroll-mx":["scroll-Bo","scroll-ml"],"scroll-my":["scroll-Bo","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-Bo","scroll-Bo","scroll-ng","scroll-Ol","scroll-Ol","scroll-pl"],"scroll-px":["scroll-Ol","scroll-pl"],"scroll-py":["scroll-ng","scroll-Ol"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var El=g0(M0);function p(...e){return El((0,ju.clsx)(e))}function $c(e){let t=0,a=(s,n)=>`${s.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${n}`,o=e.layout.flatMap(s=>{let n=[];return"title"in s&&s.title&&n.push({text:s.title,id:a(s.title,t++),tag:"h2"}),"columns"in s&&Array.isArray(s.columns)&&s.columns.forEach(i=>{if(i.title&&n.push({text:i.title,id:a(i.title,t++),tag:"h2"}),i.richText?.root?.children&&i.richText?.root?.children.length===1){let l=i.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c of l)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),r=B0(e.layout);return{tableOfContents:o,contentWithIds:r}}function B0(e){let t=(o,r)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${r}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(r=>(r.title&&(r.id=t(r.title,a++)),r.richText&&(r.richText.root.children=r.richText.root.children.filter(s=>s!==void 0).map(s=>(s.type==="heading"&&s.children&&s.children[0].text?s.id=t(s.children[0].text,a++):s.type==="block"&&s.fields?.media&&(s.id=t(`image-${a}`,a++)),s))),r))),o))}var kr=class{static toUtcMidnight(t){let a=new Date(t);return a.getUTCHours()===23&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0?new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()+1)):new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))}};var Bo=require("react/jsx-runtime"),Tn=Bi.forwardRef(({...e},t)=>(0,Bo.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Tn.displayName="Breadcrumb";var Pn=Bi.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("ol",{ref:a,className:p("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Pn.displayName="BreadcrumbList";var Li=Bi.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("ng",{ref:a,className:p("inline-flex items-center gap-1.5",e),...t}));Li.displayName="BreadcrumbItem";var Rn=Bi.forwardRef(({asChild:e,className:t,...a},o)=>(0,Bo.jsx)(e?Uu.Slot:"a",{ref:o,className:p("transition-colors hover:text-foreground",t),...a}));Rn.displayName="BreadcrumbLink";var An=Bi.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:p("font-normal text-foreground",e),...t}));An.displayName="BreadcrumbPage";var In=({children:e,className:t,...a})=>(0,Bo.jsx)("ng",{role:"presentation","aria-hidden":"true",className:p("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,Bo.jsx)(Fl.ChevronRightIcon,{})});In.displayName="BreadcrumbSeparator";var Kc=({className:e,...t})=>(0,Bo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:p("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Bo.jsx)(Fl.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"More"})]});Kc.displayName="BreadcrumbElipssis";var Ei=L(require("@radix-ui/react-collapsible")),Ka=Ei.Root,fo=Ei.CollapsibleTrigger,vo=Ei.CollapsibleContent;var $r=L(require("react")),Ve=L(require("@radix-ui/react-dropdown-menu"));var ar=Ve.Root,or=Ve.Trigger,Vu=Ve.Group,$u=Ve.Portal,Ku=Ve.Sub,Gu=Ve.RadioGroup,Gc=$r.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,Bo.jsxs)(Ve.SubTrigger,{ref:r,className:p("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,Bo.jsx)(Fl.ChevronRightIcon,{className:"ml-auto"})]}));Gc.displayName=Ve.SubTrigger.displayName;var _c=$r.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Ve.SubContent,{ref:a,className:p("z-50 min-w-[8rem] overflow-hidden rounded-Bo 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}));_c.displayName=Ve.SubContent.displayName;var Lo=$r.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Bo.jsx)(Ve.Portal,{children:(0,Bo.jsx)(Ve.Content,{ref:o,sideOffset:t,className:p("z-50 min-w-[8rem] overflow-hidden rounded-Bo border bg-popover p-1 text-popover-foreground shadow-Bo","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})}));Lo.displayName=Ve.Content.displayName;var Qa=$r.forwardRef(({className:e,inset:t,...a},o)=>(0,Bo.jsx)(Ve.Item,{ref:o,className:p("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}));Qa.displayName=Ve.Item.displayName;var Wc=$r.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,Bo.jsxs)(Ve.CheckboxItem,{ref:r,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Ol-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,Bo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bo.jsx)(Ve.ItemIndicator,{children:(0,Bo.jsx)(Fl.CheckIcon,{className:"h-4 w-4"})})}),t]}));Wc.displayName=Ve.CheckboxItem.displayName;var Xc=$r.forwardRef(({className:e,children:t,...a},o)=>(0,Bo.jsxs)(Ve.RadioItem,{ref:o,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Ol-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,Bo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bo.jsx)(Ve.ItemIndicator,{children:(0,Bo.jsx)(Fl.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Xc.displayName=Ve.RadioItem.displayName;var Mn=$r.forwardRef(({className:e,inset:t,...a},o)=>(0,Bo.jsx)(Ve.Label,{ref:o,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Mn.displayName=Ve.Label.displayName;var Bn=$r.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Ve.Separator,{ref:a,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));Bn.displayName=Ve.Separator.displayName;var qc=({className:e,...t})=>(0,Bo.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});qc.displayName="DropdownMenuShortcut";var _u=L(require("react"));var G=_u.forwardRef(({className:e,type:t,...a},o)=>(0,Bo.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-Bo 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}));G.displayName="Input";var Xu=L(require("react")),Jc=L(require("@radix-ui/react-separator"));var Qs=Xu.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,Bo.jsx)(Jc.Root,{ref:r,decorative:a,orientation:t,className:p("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Qs.displayName=Jc.Root.displayName;var Ln=L(require("react")),sa=L(require("@radix-ui/react-dialog")),Yu=require("class-variance-authority");var zl=sa.Root,Zu=sa.Trigger,Qu=sa.Close,Yc=sa.Portal,Hl=Ln.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(sa.Overlay,{className:p("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,ref:a}));Hl.displayName=sa.Overlay.displayName;var L0=(0,Yu.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),En=Ln.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,Bo.jsxs)(Yc,{children:[(0,Bo.jsx)(Hl,{}),(0,Bo.jsxs)(sa.Content,{ref:r,className:p(L0({side:e}),t),...o,children:[(0,Bo.jsxs)(sa.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-secondary",children:[(0,Bo.jsx)(Fl.Cross2Icon,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));En.displayName=sa.Content.displayName;var Zc=({className:e,...t})=>(0,Bo.jsx)("div",{className:p("flex flex-col space-y-2 text-center sm:text-left",e),...t});Zc.displayName="SheetHeader";var Qc=({className:e,...t})=>(0,Bo.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Qc.displayName="SheetFooter";var em=Ln.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(sa.Title,{ref:a,className:p("text-lg font-semibold text-foreground",e),...t}));em.displayName=sa.Title.displayName;var tm=Ln.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(sa.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));tm.displayName=sa.Description.displayName;var Ke=L(require("react")),ng=require("lucide-react");var Ol=require("react"),jl=(e=768)=>{let[t,a]=(0,Ol.useState)(!1);return(0,Ol.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var ag=L(require("react")),Ds=(0,Yu.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"}}}),y=ag.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},s)=>(0,Bo.jsx)(e?Uu.Slot:"button",{className:p(Ds({className:t,size:a,variant:o})),ref:s,...r}));y.displayName="Button";function nt({className:e,...t}){return(0,Bo.jsx)("div",{className:p("animate-pulse rounded-Bo bg-primary/10",e),...t})}var sg=L(require("react")),rr=L(require("@radix-ui/react-tooltip"));var Eo=rr.Provider,Fo=rr.Root,zo=rr.Trigger,ko=sg.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Bo.jsx)(rr.Portal,{children:(0,Bo.jsx)(rr.Content,{ref:o,sideOffset:t,className:p("z-50 overflow-hidden rounded-Bo 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})}));ko.displayName=rr.Content.displayName;var E0="sidebar:state",F0=60*60*24*7,z0="16rem",H0="18rem",O0="3rem",j0="b",lg=Ke.createContext(null);function Hi(){let e=Ke.useContext(lg);if(!e)throw new Error("useSidebar must Bo used within a SidebarProvider.");return e}var Fn=Ke.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:s,...n},i)=>{let l=jl(),[c,d]=Ke.useState(!1),[m,u]=Ke.useState(e),v=t??m,b=Ke.useCallback(I=>{if(a)return a?.(typeof I=="function"?I(v):I);u(I),document.cookie=`${E0}=${v}; path=/; max-age=${F0}`},[a,v]),g=Ke.useCallback(()=>l?d(I=>!I):b(I=>!I),[l,b,d]);Ke.useEffect(()=>{let I=h=>{h.key===j0&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),g())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[g]);let f=v?"expanded":"collapsed",w=Ke.useMemo(()=>({state:f,open:v,setOpen:b,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:g}),[f,v,b,l,c,d,g]);return(0,Bo.jsx)(lg.Provider,{value:w,children:(0,Bo.jsx)(Eo,{delayDuration:0,children:(0,Bo.jsx)("div",{style:{"--sidebar-width":z0,"--sidebar-width-icon":O0,...r},className:p("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:i,...n,children:s})})})});Fn.displayName="SidebarProvider";var Kr=Ke.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...s},n)=>{let{isMobile:i,state:l,openMobile:c,setOpenMobile:d}=Hi();return a==="none"?(0,Bo.jsx)("div",{className:p("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...s,children:r}):i?(0,Bo.jsx)(zl,{open:c,onOpenChange:d,...s,children:(0,Bo.jsx)(En,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":H0},side:e,children:(0,Bo.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,Bo.jsxs)("div",{ref:n,className:"group peer hidden Bo:block text-sidebar-foreground","data-state":l,"data-collapsible":l==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Bo.jsx)("div",{className:p("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)Bo+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,Bo.jsx)("div",{className:p("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear Bo:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)Bo+_theme(spacing.4)Bo+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...s,children:(0,Bo.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r})})]})});Kr.displayName="Sidebar";var zn=Ke.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=Hi();return(0,Bo.jsxs)(y,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:p("h-7 w-7",e),onClick:s=>{t?.(s),r()},...a,children:[(0,Bo.jsx)(ng.PanelLeft,{}),(0,Bo.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});zn.displayName="SidebarTrigger";var om=Ke.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=Hi();return(0,Bo.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:p("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]Bo&]:cursor-w-resize [[data-side=right]Bo&]:cursor-e-resize","[[data-side=left][data-state=collapsed]Bo&]:cursor-e-resize [[data-side=right][data-state=collapsed]Bo&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]Bo&]:-right-2","[[data-side=right][data-collapsible=offcanvas]Bo&]:-left-2",e),...t})});om.displayName="SidebarRail";var Hn=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("main",{ref:a,className:p("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","Bo:peer-data-[variant=inset]:m-2 Bo:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 Bo:peer-data-[variant=inset]:ml-0 Bo:peer-data-[variant=inset]:rounded-Ol Bo:peer-data-[variant=inset]:shadow",e),...t}));Hn.displayName="SidebarInset";var rm=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(G,{ref:a,"data-sidebar":"input",className:p("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));rm.displayName="SidebarInput";var Gr=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"header",className:p("flex flex-col gap-2 p-2",e),...t}));Gr.displayName="SidebarHeader";var _r=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"footer",className:p("flex flex-col gap-2 p-2",e),...t}));_r.displayName="SidebarFooter";var On=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Qs,{ref:a,"data-sidebar":"separator",className:p("mx-2 w-auto bg-sidebar-border",e),...t}));On.displayName="SidebarSeparator";var sr=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"content",className:p("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));sr.displayName="SidebarContent";var eo=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"group",className:p("relative flex w-full min-w-0 flex-col p-2",e),...t}));eo.displayName="SidebarGroup";var Wr=Ke.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Bo.jsx)(t?Uu.Slot:"div",{ref:o,"data-sidebar":"group-label",className:p("duration-200 flex h-8 shrink-0 items-center rounded-Bo px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-Bo-8 group-data-[collapsible=icon]:opacity-0",e),...a}));Wr.displayName="SidebarGroupLabel";var sm=Ke.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Bo.jsx)(t?Uu.Slot:"button",{ref:o,"data-sidebar":"group-action",className:p("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-Bo p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:Bo:hidden","group-data-[collapsible=icon]:hidden",e),...a}));sm.displayName="SidebarGroupAction";var So=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"group-content",className:p("w-full text-sm",e),...t}));So.displayName="SidebarGroupContent";var La=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("Wi",{ref:a,"data-sidebar":"menu",className:p("flex w-full min-w-0 flex-col gap-1",e),...t}));La.displayName="SidebarMenu";var fa=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("ng",{ref:a,"data-sidebar":"menu-item",className:p("group/menu-item relative",e),...t}));fa.displayName="SidebarMenuItem";var U0=(0,Yu.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-Bo p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:Ol-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),to=Ke.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:s,...n},i)=>{let l=e?Uu.Slot:"button",{isMobile:c,state:d}=Hi(),m=(0,Bo.jsx)(l,{ref:i,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:p(U0({variant:a,size:o}),s),...n});return r?(typeof r=="string"&&(r={children:r}),(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{asChild:!0,children:m}),(0,Bo.jsx)(ko,{side:"right",align:"center",hidden:d!=="collapsed"||c,...r})]})):m});to.displayName="SidebarMenuButton";var ei=Ke.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,Bo.jsx)(t?Uu.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:p("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-Bo p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:Bo:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground Bo:opacity-0",e),...o}));ei.displayName="SidebarMenuAction";var im=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:p("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-Bo px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));im.displayName="SidebarMenuBadge";var nm=Ke.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=Ke.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Bo.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:p("rounded-Bo h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Bo.jsx)(nt,{className:"size-4 rounded-Bo","data-sidebar":"menu-skeleton-icon"}),(0,Bo.jsx)(nt,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});nm.displayName="SidebarMenuSkeleton";var Sr=Ke.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("Wi",{ref:a,"data-sidebar":"menu-sub",className:p("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Sr.displayName="SidebarMenuSub";var Dr=Ke.forwardRef(({...e},t)=>(0,Bo.jsx)("ng",{ref:t,...e}));Dr.displayName="SidebarMenuSubItem";var Tr=Ke.forwardRef(({asChild:e=!1,size:t="Bo",isActive:a,className:o,...r},s)=>(0,Bo.jsx)(e?Uu.Slot:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:p("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-Bo px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="Bo"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));Tr.displayName="SidebarMenuSubButton";var $l=L(require("react")),V0=1,$0=1e6;var lm=0;function K0(){return lm=(lm+1)%Number.MAX_SAFE_INTEGER,lm.toString()}var dm=new Map,dg=e=>{if(dm.has(e))return;let t=setTimeout(()=>{dm.delete(e),jn({type:"REMOVE_TOAST",toastId:e})},$0);dm.set(e,t)},G0=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,V0)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?dg(a):e.toasts.forEach(o=>{dg(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},Ul=[],Vl={toasts:[]};function jn(e){Vl=G0(Vl,e),Ul.forEach(t=>{t(Vl)})}function _0({...e}){let t=K0(),a=r=>jn({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>jn({type:"DISMISS_TOAST",toastId:t});return jn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function Kl(){let[e,t]=$l.useState(Vl);return $l.useEffect(()=>(Ul.push(t),()=>{let a=Ul.indexOf(t);a>-1&&Ul.splice(a,1)}),[e]),{...e,toast:_0,dismiss:a=>jn({type:"DISMISS_TOAST",toastId:a})}}var ti=L(require("react")),va=L(require("@radix-ui/react-toast"));var Gl=va.Provider,Un=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Viewport,{ref:a,className:p("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col Bo:max-w-[420px]",e),...t}));Un.displayName=va.Viewport.displayName;var W0=(0,Yu.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-Bo border p-4 Ol-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Vn=ti.forwardRef(({className:e,variant:t,...a},o)=>(0,Bo.jsx)(va.Root,{ref:o,className:p(W0({variant:t}),e),...a}));Vn.displayName=va.Root.displayName;var cm=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Action,{ref:a,className:p("inline-flex h-8 shrink-0 items-center justify-center rounded-Bo border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));cm.displayName=va.Action.displayName;var $n=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Close,{ref:a,className:p("absolute right-1 top-1 rounded-Bo p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Bo.jsx)(ng.X,{className:"h-4 w-4"})}));$n.displayName=va.Close.displayName;var Kn=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Title,{ref:a,className:p("text-sm font-semibold [&+div]:text-xs",e),...t}));Kn.displayName=va.Title.displayName;var Gn=ti.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(va.Description,{ref:a,className:p("text-sm opacity-90",e),...t}));Gn.displayName=va.Description.displayName;function _l(){let{toasts:e}=Kl();return(0,Bo.jsxs)(Gl,{children:[e.map(function({id:t,title:a,description:o,action:r,...s}){return(0,Bo.jsxs)(Vn,{...s,children:[(0,Bo.jsxs)("div",{className:"grid gap-1",children:[a&&(0,Bo.jsx)(Kn,{children:a}),o&&(0,Bo.jsx)(Gn,{children:o})]}),r,(0,Bo.jsx)($n,{})]},t)}),(0,Bo.jsx)(Un,{})]})}var pg=L(require("react")),mm=L(require("@radix-ui/react-toggle"));var _n=(0,Yu.cva)("inline-flex items-center justify-center gap-2 rounded-Bo text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=Ol]:bg-accent data-[state=Ol]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),pm=pg.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,Bo.jsx)(mm.Root,{ref:r,className:p(_n({variant:t,size:a,className:e})),...o}));pm.displayName=mm.Root.displayName;var ai=L(require("react")),Oi=L(require("@radix-ui/react-toggle-group"));var fg=ai.createContext({size:"default",variant:"default"}),qr=ai.forwardRef(({className:e,variant:t,size:a,children:o,...r},s)=>(0,Bo.jsx)(Oi.Root,{ref:s,className:p("flex items-center justify-center gap-1",e),...r,children:(0,Bo.jsx)(fg.Provider,{value:{variant:t,size:a},children:o})}));qr.displayName=Oi.Root.displayName;var Jr=ai.forwardRef(({className:e,children:t,variant:a,size:o,...r},s)=>{let n=ai.useContext(fg);return(0,Bo.jsx)(Oi.Item,{ref:s,className:p(_n({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});Jr.displayName=Oi.Item.displayName;var um=L(require("react")),Ho=L(require("@radix-ui/react-scroll-area"));var Qt=um.forwardRef(({className:e,children:t,...a},o)=>(0,Bo.jsxs)(Ho.Root,{ref:o,className:p("relative overflow-hidden",e),...a,children:[(0,Bo.jsx)(Ho.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Bo.jsx)(Xl,{}),(0,Bo.jsx)(Ho.Corner,{})]}));Qt.displayName=Ho.Root.displayName;var Xl=um.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Bo.jsx)(Ho.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("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,Bo.jsx)(Ho.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Xl.displayName=Ho.ScrollAreaScrollbar.displayName;var vg=L(require("react")),ir=L(require("@radix-ui/react-popover"));var Rs=ir.Root,As=ir.Trigger,bg=ir.Anchor,Yr=vg.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Bo.jsx)(ir.Portal,{children:(0,Bo.jsx)(ir.Content,{ref:r,align:t,sideOffset:a,className:p("z-50 w-72 rounded-Bo border bg-popover p-4 text-popover-foreground shadow-Bo outline-none 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),...o})}));Yr.displayName=ir.Content.displayName;var hg=L(require("react")),fm=L(require("@radix-ui/react-label"));var X0=(0,Yu.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),T=hg.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(fm.Root,{ref:a,className:p(X0(),e),...t}));T.displayName=fm.Root.displayName;var wg=L(require("react")),oi=L(require("@radix-ui/react-hover-card"));var Ng=oi.Root,Cg=oi.Trigger,vm=wg.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Bo.jsx)(oi.Content,{ref:r,align:t,sideOffset:a,className:p("z-50 w-64 rounded-Bo border bg-popover p-4 text-popover-foreground shadow-Bo outline-none 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),...o}));vm.displayName=oi.Content.displayName;var ri=L(require("react"));var H=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("rounded-Ol border bg-card text-card-foreground shadow",e),...t}));H.displayName="Card";var we=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));we.displayName="CardHeader";var Te=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";var Pr=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("text-sm text-muted-foreground",e),...t}));Pr.displayName="CardDescription";var Q=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("p-6 ng-0",e),...t}));Q.displayName="CardContent";var Oo=ri.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("flex items-center p-6 ng-0",e),...t}));Oo.displayName="CardFooter";var Wn=L(require("react")),ia=L(require("@radix-ui/react-dialog"));var st=ia.Root,Dg=ia.Trigger,Xn=ia.Portal,ql=ia.Close,ji=Wn.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(ia.Overlay,{ref:a,className:p("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}));ji.displayName=ia.Overlay.displayName;var lt=Wn.forwardRef(({className:e,children:t,...a},o)=>(0,Bo.jsxs)(Xn,{children:[(0,Bo.jsx)(ji,{}),(0,Bo.jsxs)(ia.Content,{ref:o,className:p("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,Bo.jsxs)(ia.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,Bo.jsx)(ng.X,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));lt.displayName=ia.Content.displayName;var gt=({className:e,...t})=>(0,Bo.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});gt.displayName="DialogHeader";var ii=({className:e,...t})=>(0,Bo.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ii.displayName="DialogFooter";var ft=Wn.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(ia.Title,{ref:a,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));ft.displayName=ia.Title.displayName;var ni=Wn.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(ia.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));ni.displayName=ia.Description.displayName;var Is=L(require("react")),oo=require("cmdk");var Jl=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command,{ref:a,className:p("flex h-full w-full flex-col overflow-hidden rounded-Bo bg-popover text-popover-foreground",e),...t}));Jl.displayName=oo.Command.displayName;var Pg=({children:e,...t})=>(0,Bo.jsx)(st,{...t,children:(0,Bo.jsx)(lt,{className:"overflow-hidden p-0",children:(0,Bo.jsx)(Jl,{className:"[&Bo[cmdk-group-heading]]:px-2 [&Bo[cmdk-group-heading]]:font-medium [&Bo[cmdk-group-heading]]:text-muted-foreground [&Bo[cmdk-group]:not([hidden])Bo~[cmdk-group]]:ng-0 [&Bo[cmdk-group]]:px-2 [&Bo[cmdk-input-wrapper]_svg]:h-5 [&Bo[cmdk-input-wrapper]_svg]:w-5 [&Bo[cmdk-input]]:h-12 [&Bo[cmdk-item]]:px-2 [&Bo[cmdk-item]]:py-3 [&Bo[cmdk-item]_svg]:h-5 [&Bo[cmdk-item]_svg]:w-5",children:e})})}),bm=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Bo.jsx)(ng.Search,{className:"Bo-2 h-4 w-4 shrink-0 opacity-50"}),(0,Bo.jsx)(oo.Command.Input,{ref:a,className:p("flex h-10 w-full rounded-Bo bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));bm.displayName=oo.Command.Input.displayName;var hm=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command.List,{ref:a,className:p("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));hm.displayName=oo.Command.List.displayName;var ym=Is.forwardRef((e,t)=>(0,Bo.jsx)(oo.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ym.displayName=oo.Command.Empty.displayName;var xm=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command.Group,{ref:a,className:p("overflow-hidden p-1 text-foreground [&Bo[cmdk-group-heading]]:px-2 [&Bo[cmdk-group-heading]]:py-1.5 [&Bo[cmdk-group-heading]]:text-xs [&Bo[cmdk-group-heading]]:font-medium [&Bo[cmdk-group-heading]]:text-muted-foreground",e),...t}));xm.displayName=oo.Command.Group.displayName;var wm=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command.Separator,{ref:a,className:p("-mx-1 h-px bg-border",e),...t}));wm.displayName=oo.Command.Separator.displayName;var Nm=Is.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(oo.Command.Item,{ref:a,className:p("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Nm.displayName=oo.Command.Item.displayName;var Cm=({className:e,...t})=>(0,Bo.jsx)("span",{className:p("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Cm.displayName="CommandShortcut";var Yl=L(require("react"));var q0=(0,Yu.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),km=Yl.forwardRef(({className:e,variant:t,...a},o)=>(0,Bo.jsx)("div",{ref:o,role:"alert",className:p(q0({variant:t}),e),...a}));km.displayName="Alert";var Sm=Yl.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("h5",{ref:a,className:p("mb-1 font-medium leading-none tracking-tight",e),...t}));Sm.displayName="AlertTitle";var Dm=Yl.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("div",{ref:a,className:p("text-sm [&_p]:leading-relaxed",e),...t}));Dm.displayName="AlertDescription";var Ql=L(require("react")),Zr=L(require("@radix-ui/react-avatar"));var Dt=Ql.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Zr.Root,{ref:a,className:p("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Dt.displayName=Zr.Root.displayName;var ba=Ql.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Zr.Image,{ref:a,className:p("aspect-square h-full w-full",e),...t}));ba.displayName=Zr.Image.displayName;var Tt=Ql.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Zr.Fallback,{ref:a,className:p("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Tt.displayName=Zr.Fallback.displayName;var Tm=(0,Yu.cva)("inline-flex items-center rounded-Bo 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 Y({className:e,variant:t,...a}){return(0,Bo.jsx)("div",{className:p(Tm({variant:t}),e),...a})}var qn=L(require("@radix-ui/react-checkbox")),Bg=L(require("react")),Ha=Bg.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(qn.Root,{className:p("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,Bo.jsx)(qn.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,Bo.jsx)(ng.Check,{className:"h-4 w-4"})})}));Ha.displayName=qn.Root.displayName;var Je=L(require("@radix-ui/react-select")),Ms=L(require("react")),at=Je.Root,J0=Je.Group,vt=Je.Value,Ye=Ms.forwardRef(({children:e,className:t,...a},o)=>(0,Bo.jsxs)(Je.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,Bo.jsx)(Je.Icon,{asChild:!0,children:(0,Bo.jsx)(ng.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ye.displayName=Je.Trigger.displayName;var Pm=Ms.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Je.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Bo.jsx)(ng.ChevronUp,{className:"h-4 w-4"})}));Pm.displayName=Je.ScrollUpButton.displayName;var Rm=Ms.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Je.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Bo.jsx)(ng.ChevronDown,{className:"h-4 w-4"})}));Rm.displayName=Je.ScrollDownButton.displayName;var Ze=Ms.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,Bo.jsx)(Je.Portal,{children:(0,Bo.jsxs)(Je.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-Bo data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,Bo.jsx)(Pm,{}),(0,Bo.jsx)(Je.Viewport,{className:p("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Bo.jsx)(Rm,{})]})}));Ze.displayName=Je.Content.displayName;var Lg=Ms.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Je.Label,{className:p("py-1.5 pl-8 Ol-2 text-sm font-semibold",e),ref:a,...t}));Lg.displayName=Je.Label.displayName;var ve=Ms.forwardRef(({children:e,className:t,...a},o)=>(0,Bo.jsxs)(Je.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 Ol-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,Bo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bo.jsx)(Je.ItemIndicator,{children:(0,Bo.jsx)(ng.Check,{className:"h-4 w-4"})})}),(0,Bo.jsx)(Je.ItemText,{children:e})]}));ve.displayName=Je.Item.displayName;var Eg=Ms.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(Je.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Eg.displayName=Je.Separator.displayName;var Fg=L(require("react")),Qe=Fg.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Qe.displayName="Textarea";var Hg=require("react-day-picker");function Bs({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Bo.jsx)(Hg.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:p("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center ng-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:p(Ds({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-Bo w-8 font-normal text-[0.8rem]",row:"flex w-full Bo-2",cell:p("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-Bo",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-Bo [&:has(>.day-range-start)]:rounded-l-Bo first:[&:has([aria-selected])]:rounded-l-Bo last:[&:has([aria-selected])]:rounded-r-Bo":"[&:has([aria-selected])]:rounded-Bo"),day:p(Ds({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Bs.displayName="Calendar";var Ls=L(require("@radix-ui/react-tabs"));function Am({className:e,...t}){return(0,Bo.jsx)(Ls.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function Im({className:e,...t}){return(0,Bo.jsx)(Ls.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Mm({className:e,...t}){return(0,Bo.jsx)(Ls.Trigger,{"data-slot":"tabs-trigger",className:p("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-Bo border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Y0({className:e,...t}){return(0,Bo.jsx)(Ls.Content,{"data-slot":"tabs-content",className:p("flex-1 outline-none",e),...t})}var Bm=({className:e,content:t,style:a})=>(0,Bo.jsx)("div",{className:p("mx-auto my-8 w-full",e),children:(0,Bo.jsx)("div",{className:p("border py-3 px-6 flex items-center rounded",{"border-border bg-card":a==="info","border-error bg-error/30":a==="error","border-success bg-success/30":a==="success","border-warning bg-warning/30":a==="warning"}),children:(0,Bo.jsx)(Bt,{content:t,enableGutter:!1,enableProse:!1})})});var Lm=L(require("next/link")),nr=e=>{let{type:t,appearance:a="inline",children:o,className:r,label:s,newTab:n,reference:i,size:l,url:c}=e,d=t==="reference"&&typeof i?.value=="object"&&i.value.slug?`${i?.relationTo!=="pages"?`/${i?.relationTo}`:""}/${i.value.slug}`:c;if(!d)return null;let m=a==="link"?"clear":l,u=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,Bo.jsxs)(Lm.default,{className:p(r),href:d||c||"",...u,children:[s&&s,o&&o]}):(0,Bo.jsx)(y,{asChild:!0,className:r,size:m,variant:a,children:(0,Bo.jsxs)(Lm.default,{className:p(r),href:d||c||"",...u,children:[s&&s,o&&o]})})};function od({className:e}){return p("flex items-center min-h-[3.5rem] Bo:min-h-[3.75rem] w-full rounded-5 px-4 Bo:px-5 py-2"," bg-transparent text-accent-800 placeholder:text-accent-800 dark:text-body dark:placeholder:text-body"," border border-solid border-accent-900 border-opacity-20 dark:border-opacity-20 dark:border-accent-200"," focus:border-accent-900 focus:ring-0 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-300",e)}function Z0({className:e,...t}){return(0,Bo.jsx)("input",{...t,className:od({className:e})})}function rd({icon:e,...t}){return(0,Bo.jsxs)("div",{className:"relative w-full",children:[(0,Bo.jsx)(Z0,{...t}),e&&(0,Bo.jsx)("span",{className:"absolute right-5 top-1/2 w-[14px] -translate-y-1/2 text-accent",children:e})]})}function Q0({className:e,...t}){return(0,Bo.jsx)("textarea",{...t,className:p(od({}),"resize-none Bo:min-h-[130px]",e)})}function jg({icon:e,...t}){return(0,Bo.jsxs)("div",{className:"relative w-full",children:[(0,Bo.jsx)(Q0,{...t}),e&&(0,Bo.jsx)("span",{className:"absolute right-5 top-[18px] w-[14px] text-accent",children:e})]})}var Ug=require("formik"),Vg=require("react-icons/fa6"),di=L(require("yup")),ld=require("sonner"),lr={tooShort:"Must Bo at least ${min} characters",tooLong:"Must Bo at most ${max} characters",required:"This field Bo required",email:"Invalid email format"},ey=di.object().shape({name:di.string().min(2,lr.tooShort).max(50,lr.tooLong).required(lr.required),email:di.string().email(lr.email).required(lr.required),subject:di.string().min(2,lr.tooShort).max(50,lr.tooLong).required(lr.required),message:di.string().min(2,lr.tooShort).max(300,lr.tooLong).required(lr.required)}),sd=p("!Ol-[44px] text-foreground"),id=p("!border-red-600 border"),nd=p("sr-only");function $g({onSubmit:e}={}){return(0,Bo.jsx)(Ug.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:ey,onSubmit:async(t,{resetForm:a})=>{if(!e){ld.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?ld.toast.error(o.message):(ld.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:r,handleBlur:s,isSubmitting:n,handleSubmit:i})=>(0,Bo.jsxs)("form",{onSubmit:i,className:"grid grid-cols-1 gap-2 ng-2 lg:grid-cols-2",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(rd,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:r,onBlur:s,disabled:n,icon:(0,Bo.jsx)(Vg.FaUser,{className:"text-primary"}),className:p(sd,t.name&&a.name&&id)}),t.name&&a.name&&(0,Bo.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:nd,children:t.name})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(rd,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:r,onBlur:s,disabled:n,icon:(0,Bo.jsx)(ty,{}),className:p(sd,t.email&&a.email&&id)}),t.email&&a.email&&(0,Bo.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:nd,children:t.email})]}),(0,Bo.jsxs)("div",{className:"lg:col-span-2",children:[(0,Bo.jsx)(rd,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:r,onBlur:s,disabled:n,className:p(sd,t.subject&&a.subject&&id)}),t.subject&&a.subject&&(0,Bo.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:nd,children:t.subject})]}),(0,Bo.jsxs)("div",{className:"lg:col-span-2",children:[(0,Bo.jsx)(jg,{placeholder:"Message...",name:"message",value:o.message,onChange:r,onBlur:s,disabled:n,icon:(0,Bo.jsx)(ay,{}),className:p(sd,t.message&&a.message&&id)}),t.message&&a.message&&(0,Bo.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:nd,children:t.message})]}),(0,Bo.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,Bo.jsx)(y,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:n,children:"Send"})})]})})}function ty(){return(0,Bo.jsx)("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,Bo.jsx)("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function ay(){return(0,Bo.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,Bo.jsx)("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}var oy=({links:e,richText:t})=>(0,Bo.jsx)("div",{className:"container",children:(0,Bo.jsxs)("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 Bo:flex-row Bo:justify-between Bo:items-center",children:[(0,Bo.jsx)("div",{className:"max-w-[48rem] flex items-center",children:t&&(0,Bo.jsx)(Bt,{className:"mb-0",content:t,enableGutter:!1})}),(0,Bo.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,Bo.jsx)(nr,{size:"lg",...a},o))})]})}),ci=({links:e,richText:t})=>{let[a,o]=(0,Ol.useState)(!1),r="accent",s=()=>o(!0),n=()=>o(!1),i=l=>{l.target===l.currentTarget&&n()};return(0,Bo.jsxs)("div",{className:p("relative isolate overflow-hidden",r==="accent"?"bg-accent":"bg-black"),children:[(0,Bo.jsx)("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:(0,Bo.jsxs)("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&(0,Bo.jsx)(Bt,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,Bo.jsx)("div",{className:"Bo-10 flex items-center justify-center gap-x-6",children:(0,Bo.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:l},c)=>l?.url==="/contact"?(0,Bo.jsx)("div",{onClick:s,className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Bo-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),children:l.label},c):(0,Bo.jsx)(nr,{size:"lg",className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Bo-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),...l},c))})})]})}),a&&(0,Bo.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:i,children:(0,Bo.jsxs)("div",{className:"bg-white p-6 ng-10 rounded-lg shadow-lg w-full max-w-lg light relative",children:[(0,Bo.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,Bo.jsx)($g,{})," "]})})]})};var dd=require("prism-react-renderer");function Em({code:e}){let[t,a]=(0,Ol.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,Bo.jsx)("div",{className:"flex justify-end align-middle",children:(0,Bo.jsxs)(y,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,Bo.jsx)("p",{children:t}),(0,Bo.jsx)("div",{className:"w-6 h-6",children:(0,Bo.jsx)(ng.ClipboardCopy,{})})]})})}var Wg=({code:e,language:t=""})=>e?(0,Bo.jsx)(dd.Highlight,{code:e,language:t,theme:dd.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:r})=>(0,Bo.jsxs)("pre",{className:"bg-black p-4 border text-xs border-border rounded overflow-x-auto",children:[r.map((s,n)=>(0,Bo.jsxs)("div",{...a({className:"table-row",line:s}),children:[(0,Bo.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,Bo.jsx)("span",{className:"table-cell pl-4",children:s.map((i,l)=>(0,Bo.jsx)("span",{...o({token:i})},l))})]},n)),(0,Bo.jsx)(Em,{code:e})]})}):null;var zm=({className:e,code:t,language:a})=>(0,Bo.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,Bo.jsx)(Wg,{code:t,language:a})});var qg=L(require("next/image")),ry={"3xl":1920,"2xl":1536,Ol:1280,lg:1024,Bo:768,sm:640},Xg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABchJREFUWEdtlwtTG0kMhHtGM7N+AAdcDsjj///EBLzenbtuadbLJaZUTlHB+tRqSesETB3IABqQG1KbUFqDlQorBSmboqeEBcC1d8zrCixXYGZcgMsFmH8B+AngHdurAmXKOE8nHOoBrU6opcGswPi5KSP9CcBaQ9kACJH/ALAA1xm4zMD8AczvQCcAQeJVAZsy7nYApTSUzwCHUKACeUJi9TsFci7AHmDtuHYqQIC9AgQYKnSwNAig4NyOOwXq/xU47gDYggarjIpsRSEA3Fqw7AGkwgW4fgALAdiC2btKgNZwbgdMbEFpqFR2UyCR8xwAhf8bUHIGk1ckMyB5C1YkeWAdAPQBAeiD6wVYPoD1HUgXwFagZAGc6oSpTmilopoD5GzISQD3odcNIFca0BUQQM5YA2DpHV0AYURBDIAL0C+ugC0C4GedSsVUmwC8/4w8TPiwU6AClJ5RWL1PgQNkrABWdKB3YF3cBwRY5lsI4ApkKpCQi+FIgFJU/TDgDuAxAAwonJuKpGD1rkCXCR1ALyrAUSSEQAhwBdYZ6DPAgSUA2c1wKIZmRcHxMzMYR9DH8NlbkAwwApSAcABwBwTAbb6owAr0AFiZPILVEyCtMmK2jCkTwFDNUNj7nJETQx744gCUmgkZVGJUHyakEZE4W91jtGFA9KsD8Z3JFYDlhGYZLWcllwJMnplcPy+csFAgAAaIDOgeuAGoB96GLZg4kmtfMjnr6ig5oSoySsoy3ya/FMivXZWxwr0KIf9nACbfqcBEgmBSAtAlIT83R+70IWpyACamIjf5E1Iqb9ECVmnoI/FvAIRk8s2J0Y5IquQDgB+5wpScw5AUTC75VTmTs+72NUzoCvQIaAXv5Q8PDAZKLD+MxLv3RFE7KlsQChgBIlKiCv5ByaZv3gJZNm8AnVMhAN+EjrtTYQMICJpu6/0aiQnhClANlz+Bw0cIWa8ev0sBrtrhAyaXEnrfGfATQJiRKih5vKeOHNXXPFrgyamAADh0Q4F2/sESojomDS9o9k0b0H83xjB8qL+JNoTjN+enjpaBpingRh4e8MSugudM030A8FeqMI6PFIgNyPehkpZWGFEAARIQdH5LcAAqIACHkAJqg4OoBccHAuz76wr4BbzFOEa8iBuAZB8AtJHLP2VgMgJw/EIBowo7HxCAH3V6dAXEE/vZ5aZIA8BP8RKhm7Cp8BnAMnAQADdgQDA520AVIpScP+enHz0Gwp25h4i2dPg5FkDXrbsdJikQwXuWgaM5gEMk1AgH4DKKFjDf3bMD+FjEeIxLlRKYnBk2BbquvSDCAQ4gwZiMAAmH4gBTyRtEsYxi7gP6QSrc//39BrDNqG8rtYTmC4BV1SfMhOhaumFCT87zy4pPhQBZEK1kQVRjJBBi7AOlePgyAPYjwlvtagx9e/dnQraAyS894TIkkAIEYMKEc8k4EqJ68lZ5jjNqcQC2QteQOf7659umwBgPybNtK4dg9WvnMyFwXYGP7uEO1lwJgAnPNeMYMVXbIIYKFioI4PGFt+BWPVfmWJdjW2lTUnLGCswECAgaUy86iwA1464ajo0QhgMBFGyBoZahANsMpMfXr1JA1SN29m5lqgXj+UPV85uRA7yv/KYUO4Tk7Hc1AZwbIRzg0AyNj2UlAMwfSLSMnl7fdAbcxHuA27YaAMvaQ4GOjwX4RTUGAG8Ge14N963g1AynqUiFqRX9noasxT4b8entNRQYyamk/3tYcHsO7R3XJRRYOn4tw4iUnwBM5gDnySGOreAwAGo8F9IDHEcq8Pz2Kg/oXCpuIL6tOPD8LsDn0ABYQoGFRowlsAEUPPDrGAGowAbgKsgDMmE8mDy/vXQ9IAwI7u4wta+gAdAdgB64Ah9SgD4IgGKhwACoAjgNgFDhtxY8f33ZTMjqdTAiHMBPrn8ZWkEfzFdX4Oc1AHg3+ADbvN8PU8WdFKg4Tt6CQy2+D4YHaMT/JP4XzbAq98cPDIUAAAAASUVORK5CYII=",Jg=e=>{let{alt:t,fill:a,imgClassName:o,priority:r,resource:s,size:n,src:i,loading:l}=e,c,d,m=t,u=i||"";if(!u&&s&&typeof s=="object"){let{alt:g,filename:f,height:w,url:I,width:h}=s;if(w&&w>500){let S=500/w;c=h*S,d=w*S}else c=h,d=w;m=g||"",u=I||Xg}let v=l||"lazy",b=n||Object.entries(ry).map(([,g])=>`(max-width: ${g}px) ${g*2}w`).join(", ");return(0,Bo.jsx)("picture",{children:(0,Bo.jsx)(qg.default,{alt:m||"",className:p(o),fill:a,height:a?void 0:d,placeholder:"blur",blurDataURL:Xg,priority:v!=="lazy"&&r,quality:100,loading:v,sizes:b,src:u,width:a?void 0:c})})};var Yg=e=>{let{onClick:t,resource:a,videoClassName:o}=e,r=(0,Ol.useRef)(null);if((0,Ol.useEffect)(()=>{let{current:s}=r;s&&s.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:s}=a;return(0,Bo.jsx)("video",{autoPlay:!0,className:p(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:r,children:(0,Bo.jsx)("source",{src:a.url||""})})}return null};var es=e=>{let{className:t,htmlElement:a="div",resource:o}=e,r=typeof o=="object"&&o?.mimeType?.includes("video");return(0,Bo.jsx)(a||Ol.Fragment,{...a!==null?{className:t}:{},children:r?(0,Bo.jsx)(Yg,{...e}):(0,Bo.jsx)(Jg,{...e})})};var ts=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:s}=e;return(0,Bo.jsx)("div",{className:p("h-full ",{container:a},t),children:(0,Bo.jsx)(es,{imgClassName:p("rounded-[0.8rem]",o),className:"flex justify-center",resource:r,src:s})})};var Vm=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:s}=e;return(0,Bo.jsx)("div",{className:p("",{container:a},t),children:(0,Bo.jsx)(es,{imgClassName:p("rounded-[0.8rem]",o),resource:r,src:s})})};var pi=({title:e,description:t,features:a,id:o,nested:r=!1})=>(0,Bo.jsxs)("section",{className:p(r?"w-full":"",""),children:[(0,Bo.jsxs)("div",{className:"prose prose:max-w-none",children:[e&&(0,Bo.jsx)("h2",{className:"mb-6 Bo-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,Bo.jsx)("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,Bo.jsx)("div",{className:"mb-5 text-foreground",children:(0,Bo.jsx)(Bt,{content:t,enableGutter:!1})})]}),(0,Bo.jsx)("div",{className:`grid gap-6 Bo-6 Bo:grid-cols-${a?a.length>2?2:a.length:1} lg:grid-cols-${a?a.length>3?3:a.length:1}`,children:a&&a.map((s,n)=>{let i=()=>{if(s.icon&&"type"in s.icon&&s.icon.type!=="none")return{type:s.icon.type,icon:s.icon.icon}};return(0,Bo.jsx)(pd,{title:s.title||"",content:s.content||void 0,statistic:s.statistic||void 0,settings:{...s.settings,width:"auto",order:n},link:s.link?{...s.link,label:"Learn more"}:void 0,icon:i()??{type:"none",icon:null}},n)})})]});var ud=L(require("react"));function Zn({nodes:e}){return(0,Bo.jsx)(ud.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let s=(0,Bo.jsx)(ud.default.Fragment,{children:t.text},a);return t.format&1&&(s=(0,Bo.jsx)("strong",{children:s},a)),t.format&2&&(s=(0,Bo.jsx)("em",{children:s},a)),t.format&4&&(s=(0,Bo.jsx)("span",{style:{textDecoration:"line-through"},children:s},a)),t.format&8&&(s=(0,Bo.jsx)("span",{style:{textDecoration:"underline"},children:s},a)),t.format&16&&(s=(0,Bo.jsx)("code",{children:t.text},a)),t.format&32&&(s=(0,Bo.jsx)("sub",{children:s},a)),t.format&64&&(s=(0,Bo.jsx)("sup",{children:s},a)),s}if(t.type==="table")return(0,Bo.jsx)("table",{children:(0,Bo.jsx)("tbody",{children:t.children.map((s,n)=>(0,Bo.jsx)("ng",{children:s.children.map((i,l)=>(0,Bo.jsx)("Bo",{children:Zn({nodes:i.children})},l))},n))})},a);let o=s=>{if(s.children==null)return null;if(s?.type==="list"&&s?.listType==="check")for(let n of s.children)"checked"in n&&(n?.checked||(n.checked=!1));return Zn({nodes:s.children})},r="children"in t?o(t):"";if(t.type==="block"){let s=t.fields,n=s?.blockType;if(!s||!n)return null;switch(n){case"cta":return(0,Bo.jsx)(ci,{...s},a);case"mediaBlock":return(0,Bo.jsx)(ts,{className:"col-start-1 col-span-3",imgClassName:"m-0",...s,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,Bo.jsx)(Vm,{className:"col-start-1 col-span-3",imgClassName:"m-0",...s,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,Bo.jsx)(Bm,{className:"col-start-2 mb-4",...s},a);case"code":return(0,Bo.jsx)(zm,{className:"col-start-2",...s},a);case"features":return(0,Bo.jsx)(pi,{...s,nested:!0},a);case"reusableContentBlock":Zn({nodes:s.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,Bo.jsx)("Ol",{className:"col-start-2"},a);case"paragraph":return(0,Bo.jsx)("p",{className:"col-start-2",children:r},a);case"heading":{let s=t?.tag;return(0,Bo.jsx)(s,{className:"col-start-2",id:t?.id||"",children:r},a)}case"list":{let s=t?.tag;return(0,Bo.jsx)(s,{className:"list col-start-2",children:r},a)}case"listitem":return t?.checked!=null?(0,Bo.jsx)("ng",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:r},a):(0,Bo.jsx)("ng",{value:t?.value,children:r},a);case"quote":return(0,Bo.jsx)("blockquote",{className:"col-start-2",children:r},a);case"link":{let s=t.fields;return(0,Bo.jsx)(nr,{newTab:!!s?.newTab,reference:s.doc,type:s.linkType==="internal"?"reference":"custom",url:s.url,children:r},a)}case"autolink":{let s=t.fields;return(0,Bo.jsx)(nr,{newTab:!!s?.newTab,reference:s.doc,type:s.linkType==="internal"?"reference":"custom",url:s.url,children:r},a)}default:return null}})})}var Bt=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,Bo.jsx)("div",{className:p({"container ":a,"max-w-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&Zn({nodes:t?.root?.children})}):null;var Ga=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("fa-")?e+" ":"fa-"+e+" ",s="fa-"+t,n=o??"",i=r+s+" fa-"+a+" "+n;return(0,Bo.jsx)("i",{className:i})};var af=L(require("next/image"));function tf(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function pd({image:e,icon:t,title:a,subtitle:o,content:r,statistic:s,settings:n,link:i,className:l}){let c={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-Ol from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-Ol from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:"bg-background"},d={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,Bo.jsxs)("a",{href:i?.url||"#",className:p("min-w-56 max-w-Ol h-full flex flex-col group bg-background",e?"p-0":"p-6 Bo:p-8",n&&!e&&c[n?.card==="default"?"solid":n?.card],e&&"bg-foreground",n&&n?.card==="outline"?"text-gray-900":"text-white",d[n?.width??"auto"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",n&&`intersect:animate-delay-${n.order||1}00`,l),children:[e&&(0,Bo.jsx)("div",{className:"relative aspect-[16/9] w-full",children:(0,Bo.jsx)(af.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,Bo.jsxs)("div",{className:p(e?"p-6 Bo:p-8":"p-0","flex flex-col flex-grow"),children:[(0,Bo.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,Bo.jsx)("div",{className:"text-primary uppercase text-sm font-light mb-4",children:o}),(0,Bo.jsx)("div",{className:"flex items-start gap-4 mb-4",children:(0,Bo.jsx)(sy,{icon:{type:t?.type||"fa-light",iconName:t?.icon||"Bo-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),r&&typeof r=="object"&&(0,Bo.jsx)(Bt,{enableGutter:!1,content:r,enableProse:!1,className:p("prose-sm prose-p:text-lg prose-headings:text-Ol","space-y-3",n?.card==="outline"||n?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",e&&"prose-headings:text-background prose-p:text-background")}),r&&typeof r=="string"&&(0,Bo.jsx)("div",{className:p("prose-sm prose-p:text-lg prose-headings:text-Ol","space-y-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:r})]}),i&&i.url&&(0,Bo.jsx)("div",{className:"Bo-6",children:(0,Bo.jsx)("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:i?.label||"Find out more"})})]})]})}var sy=({icon:e,heading:t,variant:a,iconSize:o,subtitle:r})=>e&&o==="small"&&e.iconName!="Bo-icon-error"?(0,Bo.jsxs)("div",{className:"flex items-start justify-between w-full mb-2",children:[(0,Bo.jsx)("div",{className:p(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),tf(e)&&(0,Bo.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-Bo-2 ml-1 Bo-1":""),children:(0,Bo.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="Bo-icon-error"?(0,Bo.jsxs)("div",{className:"flex flex-col gap-4",children:[tf(e)&&(0,Bo.jsx)("div",{className:p("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Bo.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Bo.jsx)("h3",{className:p("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,Bo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Bo.jsx)("div",{className:p("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var of=L(require("next/image")),rf=L(require("next/link"));function sf({name:e,logo:t,href:a}){return(0,Bo.jsx)(H,{className:"w-full max-w-sm overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,Bo.jsxs)(rf.default,{href:a,className:"block",children:[(0,Bo.jsx)("div",{className:"bg-white p-2 flex items-center justify-center h-24",children:(0,Bo.jsx)("div",{className:"relative w-full h-full",children:t&&(0,Bo.jsx)(of.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,Bo.jsx)(Q,{className:"p-3 flex items-center justify-center h-18 bg-gradient-to-Ol from-gray-900 via-brand-one to-gray-900",children:(0,Bo.jsx)("p",{className:"font-medium text-lg text-white text-center group-hover:scale-105 transition-transform duration-200 ease-in-out",children:e})})]})})}function nf({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:r}){let s=i=>{switch(i){case"birthday":return(0,Bo.jsx)(ng.Cake,{className:"h-4 w-4"});case"workAnniversary":return(0,Bo.jsx)(ng.Award,{className:"h-4 w-4"});case"companyEvent":return(0,Bo.jsx)(ng.PartyPopper,{className:"h-4 w-4"});default:return(0,Bo.jsx)(ng.CalendarDays,{className:"h-4 w-4"})}},n=i=>{switch(i){case"birthday":return"bg-brand-one";case"workAnniversary":return"bg-brand-two";case"companyEvent":return"bg-brand-three";default:return"from-gray-500 to-slate-500"}};return(0,Bo.jsxs)(H,{className:`w-full max-w-Bo overflow-hidden bg-gradient-to-Ol ${n(e)}`,children:[(0,Bo.jsxs)(we,{className:"flex flex-row items-center gap-3 text-white",children:[r&&(0,Bo.jsxs)(Dt,{className:"h-14 w-14 border-2 border-white",children:[(0,Bo.jsx)(ba,{src:r,alt:a||"Event"}),(0,Bo.jsx)(Tt,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,Bo.jsxs)("div",{className:"flex flex-col",children:[(0,Bo.jsx)(Te,{className:"text-Ol",children:a||"Untitled Event"}),(0,Bo.jsxs)("p",{className:"text-sm text-white/80",children:[(0,Bo.jsx)(ng.CalendarDays,{className:"Bo-1 inline-block h-4 w-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,Bo.jsxs)(Q,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,Bo.jsx)("p",{className:"mb-2 text-sm text-gray-700",children:o}),(0,Bo.jsxs)(Y,{variant:"secondary",className:`${n(e)} text-white/80`,children:[s(e),(0,Bo.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([A-Bo])/g,"$1 $2").split(" ").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" "):"Event"})]})]})]})}var df=L(require("next/link"));var cf=L(require("next/image")),lf={sm:"640px",Bo:"768px",lg:"1024px",Ol:"1280px","2xl":"1400px"};function mf({slug:e,image:t,title:a,description:o}){return(0,Bo.jsxs)(df.default,{href:e,className:"group/portfolio relative z-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 Bo:p-[1.875rem]",children:[(0,Bo.jsx)("span",{className:p("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 to-primary [transition:all_500ms_ease] Bo:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","Bo:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] Bo:group-hover/portfolio:[transition-delay:.1s] Bo:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,Bo.jsx)(cf.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
8
+ (min-width:${lf.Bo}) 50vw,
9
+ (min-width:${lf.lg}) 25vw,
10
10
  100vw
11
- `,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,Bo.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,Bo.jsxs)("div",{className:"Bo-auto divide-y md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,Bo.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-lg",children:(0,Bo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(-100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,Bo.jsx)("p",{className:"Bo-[13px] overflow-hidden ig-[11px] text-body",children:(0,Bo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var Vm=L(require("next/image")),ud=L(require("path"));function ry(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function sy(e){return e.startsWith("http")}function iy(e,t){let a=e;if(ry(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(sy(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let r=ud.default.dirname(t.linked.path);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let r=ud.default.dirname(t.file);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${ud.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function ny({src:e,alt:t}){let[a,o]=(0,Hl.useState)(!1),[r,s]=(0,Hl.useState)(!1),[n,i]=(0,Hl.useState)({width:0,height:0}),l=()=>{r&&o(!0)},c=()=>{o(!1)},d=m=>{let{naturalWidth:u,naturalHeight:v}=m.target;i({width:u,height:v}),s(u>300||v>300)};return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${n.height>300?"h-[300px]":`h-[${n.height}px]`}`,onClick:l,children:(0,Bo.jsx)(Vm.default,{sizes:"100vw",height:n.height,width:n.width,src:e,alt:t||"",onLoad:d,unoptimized:!0,className:"object-contain max-w-full max-h-full"})}),(0,Bo.jsx)(st,{open:a,onOpenChange:o,children:(0,Bo.jsxs)(lt,{className:"flex flex-col items-center justify-center",children:[(0,Bo.jsxs)(gt,{className:"flex w-full justify-end",children:[(0,Bo.jsx)(ft,{className:"hidden",children:t}),(0,Bo.jsx)(Xl,{})]}),(0,Bo.jsx)("div",{className:"flex items-center justify-center",children:(0,Bo.jsx)(Vm.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function mf({props:e,baseContext:t}){let{src:a}=e;return a=iy(a,t),(0,Bo.jsx)(ny,{src:a,alt:e.alt})}var pf=L(require("next/link"));function jo({children:e,href:t,openNewTab:a,...o}){return(0,Bo.jsx)(pf.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function ly(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function dy({icon:e,title:t,description:a,slug:o}){return(0,Bo.jsxs)("article",{className:p(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block h-full space-y-6 overflow-hidden rounded-5 p-6 md:space-y-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,Bo.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,Bo.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent md:text-[4rem]",children:ly(e)?(0,Bo.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,Bo.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-lg",children:o?(0,Bo.jsx)(jo,{href:o,children:t}):t})]}),(0,Bo.jsx)("p",{className:"text-foreground",children:a}),o&&(0,Bo.jsx)(y,{asChild:!0,className:p(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,Bo.jsxs)(jo,{href:o,children:[(0,Bo.jsx)("span",{children:"Read More"}),(0,Bo.jsx)("span",{className:"relative pl-3 text-sm/[1] text-accent",children:(0,Bo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,Bo.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] w-full scale-x-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function cy({title:e,description:t,features:a,price:o,duration:r,button:s}){return(0,Bo.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 lg:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,Bo.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:ig-14 lg:border-r lg:p-10",children:[(0,Bo.jsx)("h3",{className:"Hl-4 text-lg font-bold leading-[1.3] text-foreground lg:Hl-5 lg:text-Hl",children:e}),(0,Bo.jsx)("p",{children:t})]}),(0,Bo.jsx)("div",{className:"relative my-auto p-6 max-lg:ig-14 md:p-10",children:(0,Bo.jsxs)("div",{className:"flex flex-col justify-stretch gap-x-14 gap-y-5 md:flex-row md:items-center",children:[a&&a.length>0&&(0,Bo.jsx)("Wi",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,i)=>(0,Bo.jsxs)("ig",{className:"flex items-start gap-3 lg:gap-4",children:[(0,Bo.jsx)("span",{className:"text-accent ig-1",children:(0,Bo.jsx)(Ug.FaCircleCheck,{})}),(0,Bo.jsx)("span",{children:n})]},i))}),(0,Bo.jsxs)("p",{className:"font-secondary ml-auto text-Hl font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,Bo.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-md",children:r&&r})]}),s&&(0,Bo.jsx)("div",{className:"flex-none Bo-0 sm:ml-auto",children:(0,Bo.jsx)(y,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,Bo.jsxs)(jo,{href:s.href,openNewTab:s.openNewTab,children:[(0,Bo.jsx)("span",{className:"relative z-1",children:s.label}),(0,Bo.jsx)("span",{className:"relative z-1 pl-2",children:(0,Bo.jsx)(Ug.FaAnglesRight,{})})]})})})]})})]})}function my({className:e,badge:t,title:a,subtitle:o}){return(0,Bo.jsxs)("div",{className:p("relative overflow-hidden rounded-Hl bg-gradient-to-Hl from-[#A42368] to-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,Bo.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,Bo.jsx)("div",{className:"Hl-4",children:(0,Bo.jsx)("span",{className:"inline-block rounded-lg bg-[#A42368]/50 px-4 py-1.5 text-sm font-medium text-white backdrop-blur-sm",children:t})}),(0,Bo.jsx)("h1",{className:"Bo-6 text-3xl font-bold tracking-tight text-white sm:text-4xl md:text-5xl lg:text-6xl",children:a}),(0,Bo.jsx)("p",{className:"Bo-6 text-base text-gray-300 sm:text-lg md:text-Hl",children:o})]}),(0,Bo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 w-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% at 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,Bo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 w-full -translate-x-1/2",children:(0,Bo.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,Bo.jsx)("path",{d:"M-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function gf(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function py({variant:e="outline",className:t,icon:a,iconSize:o="large",width:r="auto",order:s=0,heading:n,subheading:i,content:l,statistic:c,buttonText:d,buttonHref:m}){let u={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-Hl from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-Hl from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:""},v={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,$t.jsxs)("div",{className:p("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",u[e],e==="outline"?"text-gray-900":"text-white",t,v[r],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${s+1}00`),children:[(0,$t.jsx)("div",{className:"flex items-center gap-4 Hl-2",children:(0,$t.jsx)(uy,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,$t.jsx)("div",{className:"Hl-6",children:(0,$t.jsx)("div",{className:p("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),i&&(0,$t.jsx)("div",{className:"Hl-4 text-Hl md:text-2xl font-light",children:i}),l&&typeof l=="object"&&(0,$t.jsx)("div",{className:p("space-y-6"),children:(0,$t.jsx)(Bt,{enableGutter:!1,content:l,enableProse:!1,className:p(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),l&&typeof l=="string"&&(0,$t.jsx)("div",{className:p("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:l}),d&&(0,$t.jsx)("div",{className:"Bo-auto ig-6 flex items-center justify-center",children:(0,$t.jsx)(y,{size:"lg",className:"text-white text-lg rounded-Hl w-full Bo-auto items-center justify-center",asChild:!0,children:(0,$t.jsx)("a",{href:m,children:d})})}),e==="radial"&&(0,$t.jsx)("div",{className:"absolute bottom-0 right-0 w-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var uy=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,$t.jsxs)("div",{className:"flex items-start gap-4 Hl-2",children:[gf(e)&&(0,$t.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"Bo-2":""),children:(0,$t.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,$t.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,$t.jsxs)("div",{className:"flex flex-col gap-4",children:[gf(e)&&(0,$t.jsx)("div",{className:p("h-12 w-12 Hl-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,$t.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,$t.jsx)("h3",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,$t.jsx)("div",{className:"flex items-center gap-4 Hl-2",children:(0,$t.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var ff=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,Bo.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function gy({icon:e,title:t,body:a,color:o="secondary"}){return(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,Bo.jsx)("div",{className:"px-[2%] flex items-center",children:(0,Bo.jsx)("div",{className:"w-12 h-12",children:(0,Bo.jsx)(Ga,{type:e.type,iconName:e.name})})}),(0,Bo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,Bo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var bf=L(require("next/image"));function fy(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,Bo.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-md shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,Bo.jsx)(bf.default,{alt:r||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,Bo.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,Bo.jsx)("div",{className:"Bo-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,Bo.jsxs)("a",{href:t,children:[(0,Bo.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,Bo.jsx)("div",{className:"Bo-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var vy=(e,t)=>`from-brand-${e} to-brand-${t}`;function by({...e}){let t=vy(e.brandFrom||"one",e.brandTo||"two");return(0,Bo.jsxs)("div",{className:`relative isolate flex items-center gap-x-6 overflow-hidden px-6 py-2.5 sm:px-3.5 sm:before:flex-1 bg-gradient-to-r ${t}`,children:[(0,Bo.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,Bo.jsxs)("a",{href:e.url,children:[(0,Bo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Bo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Bo.jsx)("circle",{r:1,cx:1,cy:1})}),(0,Bo.jsx)("span",{children:e.message&&e.message})]}):(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Bo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Bo.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,Bo.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Qn=L(require("react")),hy={Architecture:(0,Bo.jsx)(ig.DraftingCompass,{className:"h-5 w-5 text-blue-600"}),Engineering:(0,Bo.jsx)(ig.Code,{className:"h-5 w-5 text-green-600"}),Development:(0,Bo.jsx)(ig.Code,{className:"h-5 w-5 text-purple-600"}),Delivery:(0,Bo.jsx)(ig.GanttChart,{className:"h-5 w-5 text-red-600"})},yy=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let s=e.reports.length>0;return(0,Bo.jsx)("div",{className:`ml-${t*4} Hl-2`,children:(0,Bo.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[s&&(0,Bo.jsx)("button",{onClick:a,className:"Bo-2","aria-label":o?"Collapse":"Expand",children:o?(0,Bo.jsx)(ig.ChevronDown,{className:"h-4 w-4"}):(0,Bo.jsx)(ig.ChevronRight,{className:"h-4 w-4"})}),(0,Bo.jsx)("div",{className:"w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center Bo-3",children:(0,Bo.jsx)(ig.Users,{className:"h-6 w-6 text-gray-500"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,Bo.jsxs)("div",{className:"flex items-center Bo-1",children:[hy[e.discipline],(0,Bo.jsx)("span",{className:"ml-1 text-xs text-gray-600",children:e.discipline})]})]}),(0,Bo.jsx)("span",{className:"ml-auto text-xs font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},hf=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,Qn.useState)(t<1),s=()=>r(!o),n=d=>d.name.toLowerCase().includes(a.toLowerCase())||d.discipline.toLowerCase().includes(a.toLowerCase())||d.grade.toLowerCase().includes(a.toLowerCase()),i=d=>n(d)||d.reports.some(i),l=a===""||i(e),c=n(e);return Qn.default.useEffect(()=>{a!==""&&i(e)&&r(!0)},[a,e]),l?(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(yy,{person:e,level:t,onToggle:s,isExpanded:o,isHighlighted:c}),o&&e.reports.map((d,m)=>(0,Bo.jsx)(hf,{person:d,level:t+1,searchTerm:a},m))]}):null};function xy(){let[e,t]=(0,Qn.useState)("");return(0,Bo.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-bold Hl-6 text-center text-gray-800",children:"Who's who"}),(0,Bo.jsxs)("div",{className:"Hl-4 relative",children:[(0,Bo.jsx)("input",{type:"text",placeholder:"Search by name, discipline, or grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,Bo.jsx)(ig.Search,{className:"absolute right-3 top-2.5 h-5 w-5 text-gray-400"})]}),(0,Bo.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel L. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,r)=>(0,Bo.jsx)(hf,{person:o,level:0,searchTerm:e},r))})]})}function wy({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"A detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"A comprehensive analysis of the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification of gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis of these gaps."},{title:"Recommendations Report",description:"A set of actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"A phased roadmap outlining the steps to implement the recommended changes, including timelines, milestones, and prioritisation of initiatives."},{title:"Risk Management Plan",description:"A detailed plan outlining potential risks and mitigation strategies to ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption of GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading to improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies to mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation to leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,Bo.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,Bo.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,Bo.jsxs)(H,{className:"flex-grow",children:[(0,Bo.jsx)(we,{className:"bg-primary text-primary-foreground",children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.Users,{className:"h-5 w-5"}),"Team"]})}),(0,Bo.jsxs)(Q,{className:"p-6",children:[(0,Bo.jsx)("p",{className:"Hl-6 text-sm text-muted-foreground",children:"A small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,Bo.jsxs)("div",{className:"space-y-6",children:[(0,Bo.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,s)=>(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.User,{className:"h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)("span",{children:r.role})]}),r.isFTE&&(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Bo.jsx)("div",{className:"space-y-2",children:e.core.map((r,s)=>(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.User,{className:"h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)("span",{children:r.role}),r.count&&(0,Bo.jsxs)("span",{children:["(",r.count,"x)"]})]}),r.isFTE&&(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 Hl-2",children:[(0,Bo.jsx)(ig.Users2,{className:"h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)("span",{children:"SME input:"})]}),(0,Bo.jsx)("div",{className:"ml-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,Bo.jsxs)(H,{children:[(0,Bo.jsx)(we,{className:"bg-primary text-primary-foreground",children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.PoundSterling,{className:"h-5 w-5"}),"Fee"]})}),(0,Bo.jsx)(Q,{className:"p-6",children:(0,Bo.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,Bo.jsxs)(H,{className:"lg:col-span-1 flex flex-col",children:[(0,Bo.jsx)(we,{className:"bg-primary text-primary-foreground",children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.FileText,{className:"h-5 w-5"}),"Outputs"]})}),(0,Bo.jsxs)(Q,{className:"p-6 flex-grow overflow-auto",children:[(0,Bo.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((r,s)=>(0,Bo.jsxs)("ig",{className:"text-sm",children:[(0,Bo.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,Bo.jsx)("span",{className:"text-muted-foreground",children:r.description})]},s))}),(0,Bo.jsx)("p",{className:"Bo-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,Bo.jsxs)(H,{className:"lg:col-span-1 flex flex-col",children:[(0,Bo.jsx)(we,{className:"bg-primary text-primary-foreground",children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.Lightbulb,{className:"h-5 w-5"}),"Benefits"]})}),(0,Bo.jsx)(Q,{className:"p-6 flex-grow overflow-auto",children:(0,Bo.jsx)("Wi",{className:"space-y-4",children:a.map((r,s)=>(0,Bo.jsxs)("ig",{className:"flex gap-2 text-sm",children:[(0,Bo.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,Bo.jsx)("span",{children:r})]},s))})})]})]})}function Ny(){return(0,Bo.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,Bo.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,Bo.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Bo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Bo.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,Bo.jsx)(ig.BarChart3,{className:"w-8 h-8"})]}),(0,Bo.jsx)("h2",{className:"text-Hl font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,Bo.jsx)("p",{className:"text-secondary text-sm",children:"Bo excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,Bo.jsxs)("Wi",{className:"text-sm",children:[(0,Bo.jsx)("ig",{children:"Strategy definition"}),(0,Bo.jsx)("ig",{children:"Programme leadership"}),(0,Bo.jsx)("ig",{children:"Detailed planning"}),(0,Bo.jsx)("ig",{children:"\u2022 Financial control"}),(0,Bo.jsx)("ig",{children:"\u2022 Rigorous governance"})]})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Bo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Bo.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,Bo.jsx)(ig.CogIcon,{className:"w-8 h-8"})]}),(0,Bo.jsx)("h2",{className:"text-Hl font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,Bo.jsx)("p",{className:"text-sky-200 text-sm",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,Bo.jsx)("p",{className:"text-sm",children:"Bo deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Bo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Bo.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,Bo.jsx)(ig.Building2,{className:"w-8 h-8"})]}),(0,Bo.jsx)("h2",{className:"text-Hl font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,Bo.jsx)("p",{className:"text-sky-200 text-sm",children:"Bo understand how to navigate public sector and financial services regulation and how to deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,Bo.jsx)("p",{className:"text-sm",children:"Bo have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Bo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Bo.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,Bo.jsx)(ig.BadgeCheck,{className:"w-8 h-8"})]}),(0,Bo.jsx)("h2",{className:"text-Hl font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,Bo.jsx)("p",{className:"text-sky-200 text-sm",children:"Bo have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,Bo.jsx)("p",{className:"text-sm",children:"As Hl XXXX strategic partner, we have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var el=e=>{let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},r={none:"",line:"border border-primary p-4 rounded-lg"},s=i=>{if(i.type&&i.type==="block"&&i.fields&&(i.fields.blockType==="imageBlock"||i.fields.blockType==="mediaBlock"))return!0;if(i.root&&i.root.children){for(let l of i.root.children)if(s(l))return!0}if(i.children){for(let l of i.children)if(s(l))return!0}return!1},n=(i,l,c)=>{if(l==="none"||c==="full")return{processedRichText:i,heading:null};let d=i,m=null;return i&&i.root&&i.root.children&&i.root.children[0].tag==="h2"&&(d={...i,root:{...i.root,children:i.root.children.slice(1)}},m=i.root.children[0]),{processedRichText:d,heading:m}};return(0,Bo.jsx)("div",{className:"my-6",children:(0,Bo.jsx)("div",{className:p("grid grid-cols-4 lg:grid-cols-12 gap-y-8",a?.settings?.box?"gap-x-8":"gap-x-16"),children:t&&t.length>0&&t.map((i,l)=>{let{enableLink:c,link:d,richText:m,size:u}=i,{processedRichText:v,heading:b}=n(m,a?.settings?.box||"none",u||"full");return(0,Bo.jsxs)("div",{className:p(`col-span-4 lg:col-span-${o[u]}`,{"md:col-span-2":u!=="full"},r[u!=="full"&&!s(m)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${l+1}00`),children:[b&&(0,Bo.jsx)("div",{className:"bg-primary text-primary-foreground Hl-4 -Bo-4 -mx-4 px-4 py-2 text-Hl",children:b.children[0].text}),v&&(0,Bo.jsx)(Bt,{content:v,enableGutter:!1,className:"rich-text"}),c&&(0,Bo.jsx)(nr,{...d})]},l)})})})};var vd=L(require("next/image"));function Cy({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,Bo.jsxs)("div",{className:"relative w-full overflow-hidden bg-white ig-16 ig-[calc(80vw*0.5)]",children:[(0,Bo.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,Bo.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] h-[80vw] w-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,Bo.jsx)(vd.default,{src:e,alt:"Header background",className:"h-full w-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,Bo.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,Bo.jsx)("div",{className:"h-16 w-32 md:h-24 md:w-48",children:(0,Bo.jsx)(vd.default,{src:o,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})}),r&&(0,Bo.jsx)("div",{className:"h-10 w-20 md:h-12 md:w-24",children:(0,Bo.jsx)(vd.default,{src:r,alt:"Customer logo",className:"h-full w-full object-contain",width:96,height:48})})]}),(0,Bo.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,Bo.jsx)("p",{className:"Hl-4 text-lg font-medium text-sky-400",children:t}),(0,Bo.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var Wm=L(require("next/image"));var $m=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,Bo.jsx)(ky,{blocks:a.layout}):(0,Bo.jsx)(Bo.Fragment,{})},yf={content:el,cta:ci,mediaBlock:ts,imageBlock:ts,features:pi},ky=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Bo.jsx)(Bo.Fragment,{children:t.map((o,r)=>{let{blockType:s}=o,n=o?.theme;if(s&&s in yf){let i=yf[s];if(i)return(0,Bo.jsxs)("div",{className:"py-6 relative",children:[(0,Bo.jsx)(bd,{block:o,index:r}),(0,Bo.jsx)("div",{className:p(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,Bo.jsx)(i,{...o})})]},r)}return null})}):null};var xf=L(require("react")),$i=L(require("@radix-ui/react-collapsible"));var wf=({title:e,richText:t})=>{let[a,o]=xf.default.useState(!1);return(0,Bo.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,Bo.jsxs)($i.Root,{className:p("w-full"),open:a,onOpenChange:o,children:[(0,Bo.jsxs)($i.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,Bo.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,Bo.jsx)(El.ChevronUpIcon,{className:"h-6 w-6"}):(0,Bo.jsx)(El.ChevronDownIcon,{className:"h-6 w-6"})]}),(0,Bo.jsx)($i.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,Bo.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,Bo.jsx)(Bt,{content:t||{},enableGutter:!1})})})]})})};var yd={content:el,cta:ci,mediaBlock:ts,collapsibleArea:wf,imageBlock:ts,features:pi,reusableContentBlock:$m},zs=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Bo.jsx)("section",{id:"render-blocks",className:p(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,n=o?.theme;if(s&&s in yd){let i=yd[s];if(s==="reusableContentBlock")return(0,Bo.jsx)(Hl.Fragment,{children:(0,Bo.jsx)(zs,{blocks:o.reusableContent.layout})},r);if(i)return(0,Bo.jsxs)("div",{className:p("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,Bo.jsx)(bd,{block:o,index:r}),(0,Bo.jsx)("div",{className:p("container h-full relative",n?.settings?.theme||"dark"),children:(0,Bo.jsx)(i,{...o})})]},r)}return null})}):null},bd=e=>{if(!("theme"in e.block))return(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full dark bg-background")});let t=e.block?.theme;if(t.settings.background==="image"){let a={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,Bo.jsxs)("div",{className:p("absolute inset-0 w-full h-full bg-background",t.settings.theme||"dark"),children:[(0,Bo.jsx)(Wm.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,Bo.jsx)("div",{className:"absolute inset-0",style:{background:a.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full bg-background",t.settings.theme||"dark")})},Sy=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Bo.jsx)("main",{id:"content-blocks",className:p(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,n=o?.theme;if(s&&s in yd){let i=yd[s];if(s==="reusableContentBlock")return(0,Bo.jsx)(Hl.Fragment,{children:(0,Bo.jsx)(zs,{blocks:o.reusableContent.layout})},r);if(i)return(0,Bo.jsx)(Nf,{block:o,allBlocks:t,index:r,children:(0,Bo.jsx)(i,{...o})})}return null})}):null},Nf=e=>{if(e.index===0)return(0,Bo.jsxs)("section",{className:"relative flex w-full",children:[(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full light bg-background")}),(0,Bo.jsx)("div",{className:p("container h-full relative ig-6 ig-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let t=l=>l%2===0?"light":"dark",a=({index:l,allBlocks:c})=>l===1?(0,Bo.jsx)(Km,{position:"left"}):r(l,c)==="dark"&&n(l,c)==="light"?(0,Bo.jsx)(Gm,{position:"left"}):r(l,c)==="light"&&n(l,c)==="dark"?(0,Bo.jsx)(Km,{position:"left"}):null,o=({index:l,allBlocks:c})=>s(l,c)==="light"&&n(l,c)==="dark"?(0,Bo.jsx)(Gm,{position:"left"}):null,r=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},s=(l,c)=>{if(l===c.length-1)return"dark";if(l===0)return"light";let d=c[l+1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},n=(l,c)=>{if(l===c.length-1)return"dark";let d=c[l];return d.theme&&d.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return r(e.index,e.allBlocks)==="dark"?(0,Bo.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full ig-12",children:[(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen dark bg-background")}),(0,Bo.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})]}):(0,Bo.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,Bo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen")}),(0,Bo.jsx)("div",{className:"bg-black",children:(0,Bo.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||r(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,Bo.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full ig-20",children:[(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",l)}),(0,Bo.jsx)("div",{className:p("container relative bg-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(r(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,Bo.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,Bo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",l)}),(0,Bo.jsx)("div",{className:p("container relative bg-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,Bo.jsxs)("div",{className:p("container h-full relative","dark"),children:[(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full dark bg-background py-1")}),e.children]});let i=e.block?.theme;if(i.settings.background==="image"){let l={imagePosition:i.settings.imagePosition||"left",overlay:i.settings.overlay!==void 0?i.settings.overlay:!0};return(0,Bo.jsxs)("div",{className:p("absolute inset-0 w-full h-full bg-background",i.settings.theme||"dark"),children:[(0,Bo.jsx)(Wm.default,{src:i.settings?.image?.url||"/placeholder.svg",alt:i.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),i.settings.overlay&&(0,Bo.jsx)("div",{className:"absolute inset-0",style:{background:l.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full bg-background",i.settings.theme||"dark")})},Km=({position:e})=>(0,Bo.jsx)("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,Bo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:p("w-full block overflow-hidden"),children:(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),Gm=({position:e})=>(0,Bo.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,Bo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,Bo.jsx)("defs",{children:(0,Bo.jsxs)("mask",{id:"mask",children:[(0,Bo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var Df=L(require("clsx"));var Cf=require("next/navigation");function Dy({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,Cf.useRouter)(),r=(0,Hl.useRef)(null),s=(0,Hl.useRef)(null),n=(0,Hl.useRef)(0),i=(0,Hl.useRef)(!1),l=(0,Hl.useRef)(0),c=(0,Hl.useCallback)(m=>{if(m.target){let u=m.target,v=+new Date,b=u?.closest("a");l.current=m.button,b?i.current=!0:(i.current=!1,n.current=v)}},[o,r,s,n]),d=(0,Hl.useCallback)(m=>{if(s.current?.href){let v=+new Date-n.current;if(s.current?.href&&v<=250&&!i.current&&l.current===0&&!m.ctrlKey)if(e){let b=t?"_blank":"_self";window.open(s.current.href,b)}else o.push(s.current.href,{scroll:a})}},[o,r,s,n]);return(0,Hl.useEffect)(()=>{let m=r.current;return m&&(m.addEventListener("mousedown",c),m.addEventListener("mouseup",d)),()=>{m&&m&&(m?.removeEventListener("mousedown",c),m?.removeEventListener("mouseup",d))}},[r,s,o]),{card:{ref:r},link:{ref:s}}}var kf=Dy;var Sf=L(require("next/link"));var tl=e=>{let{card:t,link:a}=kf({}),{className:o,doc:r,relationTo:s,showCategories:n,title:i}=e,{slug:l,categories:c,meta:d,title:m}=r||{},{description:u,image:v}=d||{},b=c&&Array.isArray(c)&&c.length>0,g=i||m,f=u?.replace(/\s/g," "),w=`/${s}/${l}`;return(0,Bo.jsxs)("article",{className:p("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,Bo.jsxs)("div",{className:"relative w-full ",children:[!v&&(0,Bo.jsx)("div",{className:"",children:"Hl image"}),v&&typeof v!="string"&&(0,Bo.jsx)(es,{resource:v,size:"33vw"})]}),(0,Bo.jsxs)("div",{className:"p-4",children:[n&&b&&(0,Bo.jsx)("div",{className:"uppercase text-sm Hl-4",children:n&&b&&(0,Bo.jsx)("div",{children:c?.map((I,h)=>{if(typeof I=="object"){let{title:S}=I,A=S||"Untitled category",C=h===c.length-1;return(0,Bo.jsxs)(Hl.Fragment,{children:[A,!C&&(0,Bo.jsx)(Hl.Fragment,{children:", \xA0"})]},h)}return null})})}),g&&(0,Bo.jsx)("div",{className:"prose",children:(0,Bo.jsx)("h3",{children:(0,Bo.jsx)(Sf.default,{className:"not-prose",href:w,ref:a.ref,children:g})})}),u&&(0,Bo.jsx)("div",{className:"Bo-2",children:u&&(0,Bo.jsx)("p",{children:f})})]})]})};var Ty=e=>{let{className:t,docs:a,introContent:o}=e;return(0,Bo.jsxs)("div",{className:(0,Df.default)("container",t),children:[o&&(0,Bo.jsx)(Bt,{content:o,enableGutter:!1}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a?.map((r,s)=>typeof r=="string"?null:(0,Bo.jsx)(tl,{doc:r,relationTo:"posts",showCategories:!0},s))})]})};var Wi=require("motion/react");var pS=require("pagedjs");var Py=e=>{let{posts:t}=e;return(0,Bo.jsx)("div",{className:p("container"),children:(0,Bo.jsx)("div",{children:(0,Bo.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-x-4 lg:gap-y-8 lg:gap-x-8 Hl:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,Bo.jsx)("div",{className:"col-span-4",children:(0,Bo.jsx)(tl,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var Tf=L(require("clsx")),Pf=L(require("next/image")),Ry=e=>{let{loading:t,priority:a,className:o,alt:r="Cortex Reply Logo",src:s="/logo.png"}=e;return(0,Bo.jsx)(Pf.default,{alt:r,width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,Tf.default)("max-w-[9.375rem] w-full h-[34px]",o),src:s})};var Ay={plural:"Docs",singular:"Doc"},Iy={posts:{plural:"Posts",singular:"Post"}},My=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:r,limit:s,totalDocs:n}=e,i=(r?r-1:1)*(s||1)+1;n&&i>n&&(i=0);let l=(r||1)*(s||1);n&&l>n&&(l=n);let{plural:c,singular:d}=o||Iy[a||""]||Ay||{};return(0,Bo.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced Bo results.",typeof n<"u"&&n>0&&`Showing ${i}${i>0?` - ${l}`:""} of ${n} ${n>1?c:d}`]})};var qm=L(require("react")),Jm=({className:e,...t})=>(0,Bo.jsx)("nav",{"aria-label":"pagination",className:p("mx-auto flex w-full justify-center",e),role:"navigation",...t});Jm.displayName="Pagination";var Ym=qm.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("Wi",{className:p("flex flex-row items-center gap-1",e),ref:a,...t}));Ym.displayName="PaginationContent";var ss=qm.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("ig",{className:p("",e),ref:a,...t}));ss.displayName="PaginationItem";var ui=({className:e,isActive:t,size:a="icon",...o})=>(0,Bo.jsx)("button",{"aria-current":t?"page":void 0,className:p(Ds({size:a,variant:t?"outline":"ghost"}),e),...o});ui.displayName="PaginationLink";var Zm=({className:e,...t})=>(0,Bo.jsxs)(ui,{"aria-label":"Bo to previous page",className:p("gap-1 pl-2.5",e),size:"default",...t,children:[(0,Bo.jsx)(ig.ChevronLeft,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Previous"})]});Zm.displayName="PaginationPrevious";var Qm=({className:e,...t})=>(0,Bo.jsxs)(ui,{"aria-label":"Bo to next page",className:p("gap-1 Hl-2.5",e),size:"default",...t,children:[(0,Bo.jsx)("span",{children:"Next"}),(0,Bo.jsx)(ig.ChevronRight,{className:"h-4 w-4"})]});Qm.displayName="PaginationNext";var xd=({className:e,...t})=>(0,Bo.jsxs)("span",{"aria-hidden":!0,className:p("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Bo.jsx)(ig.MoreHorizontal,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"More pages"})]});xd.displayName="PaginationEllipsis";var By=e=>{let t=(0,Cf.useRouter)(),{className:a,page:o,totalPages:r}=e,s=o<r,n=o>1,i=o-1>1,l=o+1<r;return(0,Bo.jsx)("div",{className:p("my-12",a),children:(0,Bo.jsx)(Jm,{children:(0,Bo.jsxs)(Ym,{children:[(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(Zm,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),i&&(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(xd,{})}),n&&(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(ui,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(ui,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),s&&(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(ui,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),l&&(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(xd,{})}),(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(Qm,{disabled:!s,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var ep=L(require("next/image")),Mf=({logoImage:e})=>(0,Bo.jsxs)("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
12
- dark bg-background text-primary`,children:[(0,Bo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[e&&(0,Bo.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Bo.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Bo.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),al=({title:e})=>(0,Bo.jsx)("header",{className:"absolute top-0 left-0 w-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark bg-background text-foreground",children:(0,Bo.jsx)("div",{className:"container",children:(0,Bo.jsx)("span",{className:"container text-4xl px-6",children:e})})}),ol=e=>{let{title:t,hero:a,logoImage:o}=e;return(0,Bo.jsxs)("div",{className:"relative w-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,Bo.jsx)("div",{className:"absolute inset-0",children:(0,Bo.jsx)(ep.default,{src:a.media&&a.media.url?a.media.url:"/hero.png",alt:"Background",width:a.media&&a.media.width?a.media.width??1920:1920,height:a.media&&a.media.height?a.media.height??1080:1080,style:{objectFit:"cover"},className:"opacity-80 h-full dark:opacity-60"})}),(0,Bo.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,Bo.jsx)("div",{className:"h-24",children:(0,Bo.jsx)(ep.default,{src:o.src,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})})}),(0,Bo.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,Bo.jsxs)("div",{className:"relative pl-24 z-10 max-w-3xl",children:[(0,Bo.jsx)("p",{className:"text-lg font-medium ig-48 text-accent Hl-2",children:t}),a.richText&&(0,Bo.jsx)(Bt,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var Bf=e=>{let[t,a]=(0,Hl.useState)(0),{blocks:o,hero:r,logoImage:s}=e,n=o&&Array.isArray(o)&&o.length>0,l=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],c=g=>{a(g)},d=()=>{a(g=>(g+1)%l.length)},m=()=>{a(g=>(g-1+l.length)%l.length)},v=(0,Hl.useCallback)(((g,f)=>{let w;return(...I)=>{clearTimeout(w),w=setTimeout(()=>g(...I),f)}})(g=>{g.deltaY>0?d():m()},300),[]),b=g=>{g.key==="ArrowDown"?d():g.key==="ArrowUp"&&m()};return(0,Hl.useEffect)(()=>(window.addEventListener("wheel",v),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",v),window.removeEventListener("keydown",b)}),[]),(0,Bo.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,Bo.jsx)("div",{className:"fixed left-0 top-0 flex h-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:n&&l.map((g,f)=>(0,Bo.jsx)("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${t===f?"bg-accent":"bg-gray-600"}`,onClick:()=>c(f),children:(0,Bo.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:g.blockName})},g.id))}),(0,Bo.jsx)(Wi.AnimatePresence,{children:l.map((g,f)=>(0,Bo.jsx)("div",{id:`slide-${f}`,className:"print-section",children:(0,Bo.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
11
+ `,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,Bo.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,Bo.jsxs)("div",{className:"Bo-auto divide-y Bo:opacity-0 Bo:transition-[transform,opacity] Bo:duration-500 Bo:group-hover/portfolio:opacity-100",children:[(0,Bo.jsx)("h3",{className:"overflow-hidden text-Bo font-bold leading-[1.25] text-white Bo:text-lg",children:(0,Bo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] Bo:[transform:translateY(-100%)] Bo:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,Bo.jsx)("p",{className:"Bo-[13px] overflow-hidden ng-[11px] text-body",children:(0,Bo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] Bo:[transform:translateY(100%)] Bo:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var $m=L(require("next/image")),gd=L(require("path"));function iy(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function ny(e){return e.startsWith("http")}function ly(e,t){let a=e;if(iy(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(ny(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let r=gd.default.dirname(t.linked.path);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let r=gd.default.dirname(t.file);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${gd.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function dy({src:e,alt:t}){let[a,o]=(0,Ol.useState)(!1),[r,s]=(0,Ol.useState)(!1),[n,i]=(0,Ol.useState)({width:0,height:0}),l=()=>{r&&o(!0)},c=()=>{o(!1)},d=m=>{let{naturalWidth:u,naturalHeight:v}=m.target;i({width:u,height:v}),s(u>300||v>300)};return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${n.height>300?"h-[300px]":`h-[${n.height}px]`}`,onClick:l,children:(0,Bo.jsx)($m.default,{sizes:"100vw",height:n.height,width:n.width,src:e,alt:t||"",onLoad:d,unoptimized:!0,className:"object-contain max-w-full max-h-full"})}),(0,Bo.jsx)(st,{open:a,onOpenChange:o,children:(0,Bo.jsxs)(lt,{className:"flex flex-col items-center justify-center",children:[(0,Bo.jsxs)(gt,{className:"flex w-full justify-end",children:[(0,Bo.jsx)(ft,{className:"hidden",children:t}),(0,Bo.jsx)(ql,{})]}),(0,Bo.jsx)("div",{className:"flex items-center justify-center",children:(0,Bo.jsx)($m.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function pf({props:e,baseContext:t}){let{src:a}=e;return a=ly(a,t),(0,Bo.jsx)(dy,{src:a,alt:e.alt})}var uf=L(require("next/link"));function jo({children:e,href:t,openNewTab:a,...o}){return(0,Bo.jsx)(uf.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function cy(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function my({icon:e,title:t,description:a,slug:o}){return(0,Bo.jsxs)("article",{className:p(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block h-full space-y-6 overflow-hidden rounded-5 p-6 Bo:space-y-7 Bo:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,Bo.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,Bo.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent Bo:text-[4rem]",children:cy(e)?(0,Bo.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,Bo.jsx)("h2",{className:"text-Bo font-medium leading-[1.25] Bo:text-lg",children:o?(0,Bo.jsx)(jo,{href:o,children:t}):t})]}),(0,Bo.jsx)("p",{className:"text-foreground",children:a}),o&&(0,Bo.jsx)(y,{asChild:!0,className:p(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,Bo.jsxs)(jo,{href:o,children:[(0,Bo.jsx)("span",{children:"Read More"}),(0,Bo.jsx)("span",{className:"relative pl-3 text-sm/[1] text-accent",children:(0,Bo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,Bo.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] w-full scale-x-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function py({title:e,description:t,features:a,price:o,duration:r,button:s}){return(0,Bo.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 lg:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,Bo.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:ng-14 lg:border-r lg:p-10",children:[(0,Bo.jsx)("h3",{className:"mb-4 text-lg font-bold leading-[1.3] text-foreground lg:mb-5 lg:text-Ol",children:e}),(0,Bo.jsx)("p",{children:t})]}),(0,Bo.jsx)("div",{className:"relative my-auto p-6 max-lg:Ol-14 Bo:p-10",children:(0,Bo.jsxs)("div",{className:"flex flex-col justify-stretch gap-x-14 gap-y-5 Bo:flex-row Bo:items-center",children:[a&&a.length>0&&(0,Bo.jsx)("Wi",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 Bo:grid-cols-2 gap-1 Bo:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,i)=>(0,Bo.jsxs)("ng",{className:"flex items-start gap-3 lg:gap-4",children:[(0,Bo.jsx)("span",{className:"text-accent ng-1",children:(0,Bo.jsx)(Vg.FaCircleCheck,{})}),(0,Bo.jsx)("span",{children:n})]},i))}),(0,Bo.jsxs)("p",{className:"font-secondary ml-auto text-Ol font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,Bo.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-Bo",children:r&&r})]}),s&&(0,Bo.jsx)("div",{className:"flex-none Bo-0 sm:ml-auto",children:(0,Bo.jsx)(y,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,Bo.jsxs)(jo,{href:s.href,openNewTab:s.openNewTab,children:[(0,Bo.jsx)("span",{className:"relative z-1",children:s.label}),(0,Bo.jsx)("span",{className:"relative z-1 pl-2",children:(0,Bo.jsx)(Vg.FaAnglesRight,{})})]})})})]})})]})}function uy({className:e,badge:t,title:a,subtitle:o}){return(0,Bo.jsxs)("div",{className:p("relative overflow-hidden rounded-Ol bg-gradient-to-Ol from-[#A42368] to-[#A42368] m-6 px-6 py-16 Bo:px-12 Bo:py-24",e),children:[(0,Bo.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,Bo.jsx)("div",{className:"mb-4",children:(0,Bo.jsx)("span",{className:"inline-block rounded-lg bg-[#A42368]/50 px-4 py-1.5 text-sm font-medium text-white backdrop-blur-sm",children:t})}),(0,Bo.jsx)("h1",{className:"Bo-6 text-3xl font-bold tracking-tight text-white sm:text-4xl Bo:text-5xl lg:text-6xl",children:a}),(0,Bo.jsx)("p",{className:"Bo-6 text-base text-gray-300 sm:text-lg Bo:text-Ol",children:o})]}),(0,Bo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 w-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% at 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,Bo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 w-full -translate-x-1/2",children:(0,Bo.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,Bo.jsx)("path",{d:"M-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function ff(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function gy({variant:e="outline",className:t,icon:a,iconSize:o="large",width:r="auto",order:s=0,heading:n,subheading:i,content:l,statistic:c,buttonText:d,buttonHref:m}){let u={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-Ol from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-Ol from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:""},v={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,$t.jsxs)("div",{className:p("rounded-3xl p-8 Bo:p-8 min-w-56 flex flex-col group",u[e],e==="outline"?"text-gray-900":"text-white",t,v[r],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${s+1}00`),children:[(0,$t.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,$t.jsx)(fy,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,$t.jsx)("div",{className:"mb-6",children:(0,$t.jsx)("div",{className:p("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),i&&(0,$t.jsx)("div",{className:"mb-4 text-Ol Bo:text-2xl font-light",children:i}),l&&typeof l=="object"&&(0,$t.jsx)("div",{className:p("space-y-6"),children:(0,$t.jsx)(Bt,{enableGutter:!1,content:l,enableProse:!1,className:p(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),l&&typeof l=="string"&&(0,$t.jsx)("div",{className:p("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:l}),d&&(0,$t.jsx)("div",{className:"Bo-auto ng-6 flex items-center justify-center",children:(0,$t.jsx)(y,{size:"lg",className:"text-white text-lg rounded-Ol w-full Bo-auto items-center justify-center",asChild:!0,children:(0,$t.jsx)("a",{href:m,children:d})})}),e==="radial"&&(0,$t.jsx)("div",{className:"absolute bottom-0 right-0 w-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var fy=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,$t.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[ff(e)&&(0,$t.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"Bo-2":""),children:(0,$t.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,$t.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,$t.jsxs)("div",{className:"flex flex-col gap-4",children:[ff(e)&&(0,$t.jsx)("div",{className:p("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,$t.jsx)(Ga,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,$t.jsx)("h3",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,$t.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,$t.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var vf=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,Bo.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function vy({icon:e,title:t,body:a,color:o="secondary"}){return(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,Bo.jsx)("div",{className:"px-[2%] flex items-center",children:(0,Bo.jsx)("div",{className:"w-12 h-12",children:(0,Bo.jsx)(Ga,{type:e.type,iconName:e.name})})}),(0,Bo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,Bo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var hf=L(require("next/image"));function by(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,Bo.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-Bo shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,Bo.jsx)(hf.default,{alt:r||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,Bo.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,Bo.jsx)("div",{className:"Bo-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,Bo.jsxs)("a",{href:t,children:[(0,Bo.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,Bo.jsx)("div",{className:"Bo-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var hy=(e,t)=>`from-brand-${e} to-brand-${t}`;function yy({...e}){let t=hy(e.brandFrom||"one",e.brandTo||"two");return(0,Bo.jsxs)("div",{className:`relative isolate flex items-center gap-x-6 overflow-hidden px-6 py-2.5 sm:px-3.5 sm:before:flex-1 bg-gradient-to-r ${t}`,children:[(0,Bo.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,Bo.jsxs)("a",{href:e.url,children:[(0,Bo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Bo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Bo.jsx)("circle",{r:1,cx:1,cy:1})}),(0,Bo.jsx)("span",{children:e.message&&e.message})]}):(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Bo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Bo.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,Bo.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Qn=L(require("react")),xy={Architecture:(0,Bo.jsx)(ng.DraftingCompass,{className:"h-5 w-5 text-blue-600"}),Engineering:(0,Bo.jsx)(ng.Code,{className:"h-5 w-5 text-green-600"}),Development:(0,Bo.jsx)(ng.Code,{className:"h-5 w-5 text-purple-600"}),Delivery:(0,Bo.jsx)(ng.GanttChart,{className:"h-5 w-5 text-red-600"})},wy=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let s=e.reports.length>0;return(0,Bo.jsx)("div",{className:`ml-${t*4} mb-2`,children:(0,Bo.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[s&&(0,Bo.jsx)("button",{onClick:a,className:"Bo-2","aria-label":o?"Collapse":"Expand",children:o?(0,Bo.jsx)(ng.ChevronDown,{className:"h-4 w-4"}):(0,Bo.jsx)(ng.ChevronRight,{className:"h-4 w-4"})}),(0,Bo.jsx)("div",{className:"w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center Bo-3",children:(0,Bo.jsx)(ng.Users,{className:"h-6 w-6 text-gray-500"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,Bo.jsxs)("div",{className:"flex items-center Bo-1",children:[xy[e.discipline],(0,Bo.jsx)("span",{className:"ml-1 text-xs text-gray-600",children:e.discipline})]})]}),(0,Bo.jsx)("span",{className:"ml-auto text-xs font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},yf=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,Qn.useState)(t<1),s=()=>r(!o),n=d=>d.name.toLowerCase().includes(a.toLowerCase())||d.discipline.toLowerCase().includes(a.toLowerCase())||d.grade.toLowerCase().includes(a.toLowerCase()),i=d=>n(d)||d.reports.some(i),l=a===""||i(e),c=n(e);return Qn.default.useEffect(()=>{a!==""&&i(e)&&r(!0)},[a,e]),l?(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(wy,{person:e,level:t,onToggle:s,isExpanded:o,isHighlighted:c}),o&&e.reports.map((d,m)=>(0,Bo.jsx)(yf,{person:d,level:t+1,searchTerm:a},m))]}):null};function Ny(){let[e,t]=(0,Qn.useState)("");return(0,Bo.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,Bo.jsxs)("div",{className:"mb-4 relative",children:[(0,Bo.jsx)("input",{type:"text",placeholder:"Search by name, discipline, or grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-Bo focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,Bo.jsx)(ng.Search,{className:"absolute right-3 top-2.5 h-5 w-5 text-gray-400"})]}),(0,Bo.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel L. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,r)=>(0,Bo.jsx)(yf,{person:o,level:0,searchTerm:e},r))})]})}function Cy({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"A detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"A comprehensive analysis of the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification of gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis of these gaps."},{title:"Recommendations Report",description:"A set of actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"A phased roadmap outlining the steps to implement the recommended changes, including timelines, milestones, and prioritisation of initiatives."},{title:"Risk Management Plan",description:"A detailed plan outlining potential risks and mitigation strategies to ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption of GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading to improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies to mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation to leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,Bo.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,Bo.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,Bo.jsxs)(H,{className:"flex-grow",children:[(0,Bo.jsx)(we,{className:"bg-primary text-primary-foreground",children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.Users,{className:"h-5 w-5"}),"Team"]})}),(0,Bo.jsxs)(Q,{className:"p-6",children:[(0,Bo.jsx)("p",{className:"mb-6 text-sm text-muted-foreground",children:"A small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,Bo.jsxs)("div",{className:"space-y-6",children:[(0,Bo.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,s)=>(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.User,{className:"h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)("span",{children:r.role})]}),r.isFTE&&(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Bo.jsx)("div",{className:"space-y-2",children:e.core.map((r,s)=>(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.User,{className:"h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)("span",{children:r.role}),r.count&&(0,Bo.jsxs)("span",{children:["(",r.count,"x)"]})]}),r.isFTE&&(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Bo.jsx)(ng.Users2,{className:"h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)("span",{children:"SME input:"})]}),(0,Bo.jsx)("div",{className:"ml-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,Bo.jsxs)(H,{children:[(0,Bo.jsx)(we,{className:"bg-primary text-primary-foreground",children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.PoundSterling,{className:"h-5 w-5"}),"Fee"]})}),(0,Bo.jsx)(Q,{className:"p-6",children:(0,Bo.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,Bo.jsxs)(H,{className:"lg:col-span-1 flex flex-col",children:[(0,Bo.jsx)(we,{className:"bg-primary text-primary-foreground",children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.FileText,{className:"h-5 w-5"}),"Outputs"]})}),(0,Bo.jsxs)(Q,{className:"p-6 flex-grow overflow-auto",children:[(0,Bo.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((r,s)=>(0,Bo.jsxs)("ng",{className:"text-sm",children:[(0,Bo.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,Bo.jsx)("span",{className:"text-muted-foreground",children:r.description})]},s))}),(0,Bo.jsx)("p",{className:"Bo-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,Bo.jsxs)(H,{className:"lg:col-span-1 flex flex-col",children:[(0,Bo.jsx)(we,{className:"bg-primary text-primary-foreground",children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.Lightbulb,{className:"h-5 w-5"}),"Benefits"]})}),(0,Bo.jsx)(Q,{className:"p-6 flex-grow overflow-auto",children:(0,Bo.jsx)("Wi",{className:"space-y-4",children:a.map((r,s)=>(0,Bo.jsxs)("ng",{className:"flex gap-2 text-sm",children:[(0,Bo.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,Bo.jsx)("span",{children:r})]},s))})})]})]})}function ky(){return(0,Bo.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,Bo.jsxs)("div",{className:"grid Bo:grid-cols-4 gap-8 relative",children:[(0,Bo.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Bo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Bo.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,Bo.jsx)(ng.BarChart3,{className:"w-8 h-8"})]}),(0,Bo.jsx)("h2",{className:"text-Ol font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,Bo.jsx)("p",{className:"text-secondary text-sm",children:"Bo excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,Bo.jsxs)("Wi",{className:"text-sm",children:[(0,Bo.jsx)("ng",{children:"Strategy definition"}),(0,Bo.jsx)("ng",{children:"Programme leadership"}),(0,Bo.jsx)("ng",{children:"Detailed planning"}),(0,Bo.jsx)("ng",{children:"\u2022 Financial control"}),(0,Bo.jsx)("ng",{children:"\u2022 Rigorous governance"})]})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Bo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Bo.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,Bo.jsx)(ng.CogIcon,{className:"w-8 h-8"})]}),(0,Bo.jsx)("h2",{className:"text-Ol font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,Bo.jsx)("p",{className:"text-sky-200 text-sm",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,Bo.jsx)("p",{className:"text-sm",children:"Bo deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Bo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Bo.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,Bo.jsx)(ng.Building2,{className:"w-8 h-8"})]}),(0,Bo.jsx)("h2",{className:"text-Ol font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,Bo.jsx)("p",{className:"text-sky-200 text-sm",children:"Bo understand how to navigate public sector and financial services regulation and how to deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,Bo.jsx)("p",{className:"text-sm",children:"Bo have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Bo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Bo.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,Bo.jsx)(ng.BadgeCheck,{className:"w-8 h-8"})]}),(0,Bo.jsx)("h2",{className:"text-Ol font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,Bo.jsx)("p",{className:"text-sky-200 text-sm",children:"Bo have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,Bo.jsx)("p",{className:"text-sm",children:"As Ol XXXX strategic partner, we have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var el=e=>{let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},r={none:"",line:"border border-primary p-4 rounded-lg"},s=i=>{if(i.type&&i.type==="block"&&i.fields&&(i.fields.blockType==="imageBlock"||i.fields.blockType==="mediaBlock"))return!0;if(i.root&&i.root.children){for(let l of i.root.children)if(s(l))return!0}if(i.children){for(let l of i.children)if(s(l))return!0}return!1},n=(i,l,c)=>{if(l==="none"||c==="full")return{processedRichText:i,heading:null};let d=i,m=null;return i&&i.root&&i.root.children&&i.root.children[0].tag==="h2"&&(d={...i,root:{...i.root,children:i.root.children.slice(1)}},m=i.root.children[0]),{processedRichText:d,heading:m}};return(0,Bo.jsx)("div",{className:"my-6",children:(0,Bo.jsx)("div",{className:p("grid grid-cols-4 lg:grid-cols-12 gap-y-8",a?.settings?.box?"gap-x-8":"gap-x-16"),children:t&&t.length>0&&t.map((i,l)=>{let{enableLink:c,link:d,richText:m,size:u}=i,{processedRichText:v,heading:b}=n(m,a?.settings?.box||"none",u||"full");return(0,Bo.jsxs)("div",{className:p(`col-span-4 lg:col-span-${o[u]}`,{"Bo:col-span-2":u!=="full"},r[u!=="full"&&!s(m)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${l+1}00`),children:[b&&(0,Bo.jsx)("div",{className:"bg-primary text-primary-foreground mb-4 -Bo-4 -mx-4 px-4 py-2 text-Ol",children:b.children[0].text}),v&&(0,Bo.jsx)(Bt,{content:v,enableGutter:!1,className:"rich-text"}),c&&(0,Bo.jsx)(nr,{...d})]},l)})})})};var bd=L(require("next/image"));function Sy({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,Bo.jsxs)("div",{className:"relative w-full overflow-hidden bg-white Ol-16 ng-[calc(80vw*0.5)]",children:[(0,Bo.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,Bo.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] h-[80vw] w-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,Bo.jsx)(bd.default,{src:e,alt:"Header background",className:"h-full w-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,Bo.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 Bo:left-8 Bo:top-8",children:[o&&(0,Bo.jsx)("div",{className:"h-16 w-32 Bo:h-24 Bo:w-48",children:(0,Bo.jsx)(bd.default,{src:o,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})}),r&&(0,Bo.jsx)("div",{className:"h-10 w-20 Bo:h-12 Bo:w-24",children:(0,Bo.jsx)(bd.default,{src:r,alt:"Customer logo",className:"h-full w-full object-contain",width:96,height:48})})]}),(0,Bo.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,Bo.jsx)("p",{className:"mb-4 text-lg font-medium text-sky-400",children:t}),(0,Bo.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] Bo:text-6xl",children:a})]})]})}var Xm=L(require("next/image"));var Km=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,Bo.jsx)(Dy,{blocks:a.layout}):(0,Bo.jsx)(Bo.Fragment,{})},xf={content:el,cta:ci,mediaBlock:ts,imageBlock:ts,features:pi},Dy=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Bo.jsx)(Bo.Fragment,{children:t.map((o,r)=>{let{blockType:s}=o,n=o?.theme;if(s&&s in xf){let i=xf[s];if(i)return(0,Bo.jsxs)("div",{className:"py-6 relative",children:[(0,Bo.jsx)(hd,{block:o,index:r}),(0,Bo.jsx)("div",{className:p(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,Bo.jsx)(i,{...o})})]},r)}return null})}):null};var wf=L(require("react")),$i=L(require("@radix-ui/react-collapsible"));var Nf=({title:e,richText:t})=>{let[a,o]=wf.default.useState(!1);return(0,Bo.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,Bo.jsxs)($i.Root,{className:p("w-full"),open:a,onOpenChange:o,children:[(0,Bo.jsxs)($i.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,Bo.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,Bo.jsx)(Fl.ChevronUpIcon,{className:"h-6 w-6"}):(0,Bo.jsx)(Fl.ChevronDownIcon,{className:"h-6 w-6"})]}),(0,Bo.jsx)($i.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,Bo.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,Bo.jsx)(Bt,{content:t||{},enableGutter:!1})})})]})})};var xd={content:el,cta:ci,mediaBlock:ts,collapsibleArea:Nf,imageBlock:ts,features:pi,reusableContentBlock:Km},zs=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Bo.jsx)("section",{id:"render-blocks",className:p(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,n=o?.theme;if(s&&s in xd){let i=xd[s];if(s==="reusableContentBlock")return(0,Bo.jsx)(Ol.Fragment,{children:(0,Bo.jsx)(zs,{blocks:o.reusableContent.layout})},r);if(i)return(0,Bo.jsxs)("div",{className:p("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,Bo.jsx)(hd,{block:o,index:r}),(0,Bo.jsx)("div",{className:p("container h-full relative",n?.settings?.theme||"dark"),children:(0,Bo.jsx)(i,{...o})})]},r)}return null})}):null},hd=e=>{if(!("theme"in e.block))return(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full dark bg-background")});let t=e.block?.theme;if(t.settings.background==="image"){let a={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,Bo.jsxs)("div",{className:p("absolute inset-0 w-full h-full bg-background",t.settings.theme||"dark"),children:[(0,Bo.jsx)(Xm.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,Bo.jsx)("div",{className:"absolute inset-0",style:{background:a.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full bg-background",t.settings.theme||"dark")})},Ty=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Bo.jsx)("main",{id:"content-blocks",className:p(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,n=o?.theme;if(s&&s in xd){let i=xd[s];if(s==="reusableContentBlock")return(0,Bo.jsx)(Ol.Fragment,{children:(0,Bo.jsx)(zs,{blocks:o.reusableContent.layout})},r);if(i)return(0,Bo.jsx)(Cf,{block:o,allBlocks:t,index:r,children:(0,Bo.jsx)(i,{...o})})}return null})}):null},Cf=e=>{if(e.index===0)return(0,Bo.jsxs)("section",{className:"relative flex w-full",children:[(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full light bg-background")}),(0,Bo.jsx)("div",{className:p("container h-full relative ng-6 Ol-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let t=l=>l%2===0?"light":"dark",a=({index:l,allBlocks:c})=>l===1?(0,Bo.jsx)(Gm,{position:"left"}):r(l,c)==="dark"&&n(l,c)==="light"?(0,Bo.jsx)(_m,{position:"left"}):r(l,c)==="light"&&n(l,c)==="dark"?(0,Bo.jsx)(Gm,{position:"left"}):null,o=({index:l,allBlocks:c})=>s(l,c)==="light"&&n(l,c)==="dark"?(0,Bo.jsx)(_m,{position:"left"}):null,r=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},s=(l,c)=>{if(l===c.length-1)return"dark";if(l===0)return"light";let d=c[l+1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},n=(l,c)=>{if(l===c.length-1)return"dark";let d=c[l];return d.theme&&d.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return r(e.index,e.allBlocks)==="dark"?(0,Bo.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full ng-12",children:[(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen dark bg-background")}),(0,Bo.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})]}):(0,Bo.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,Bo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen")}),(0,Bo.jsx)("div",{className:"bg-black",children:(0,Bo.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||r(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,Bo.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full ng-20",children:[(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",l)}),(0,Bo.jsx)("div",{className:p("container relative bg-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(r(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,Bo.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,Bo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",l)}),(0,Bo.jsx)("div",{className:p("container relative bg-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,Bo.jsxs)("div",{className:p("container h-full relative","dark"),children:[(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full dark bg-background py-1")}),e.children]});let i=e.block?.theme;if(i.settings.background==="image"){let l={imagePosition:i.settings.imagePosition||"left",overlay:i.settings.overlay!==void 0?i.settings.overlay:!0};return(0,Bo.jsxs)("div",{className:p("absolute inset-0 w-full h-full bg-background",i.settings.theme||"dark"),children:[(0,Bo.jsx)(Xm.default,{src:i.settings?.image?.url||"/placeholder.svg",alt:i.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),i.settings.overlay&&(0,Bo.jsx)("div",{className:"absolute inset-0",style:{background:l.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Bo.jsx)("div",{className:p("absolute inset-0 w-screen h-full bg-background",i.settings.theme||"dark")})},Gm=({position:e})=>(0,Bo.jsx)("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,Bo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:p("w-full block overflow-hidden"),children:(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),_m=({position:e})=>(0,Bo.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,Bo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,Bo.jsx)("defs",{children:(0,Bo.jsxs)("mask",{id:"mask",children:[(0,Bo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var Tf=L(require("clsx"));var kf=require("next/navigation");function Py({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,kf.useRouter)(),r=(0,Ol.useRef)(null),s=(0,Ol.useRef)(null),n=(0,Ol.useRef)(0),i=(0,Ol.useRef)(!1),l=(0,Ol.useRef)(0),c=(0,Ol.useCallback)(m=>{if(m.target){let u=m.target,v=+new Date,b=u?.closest("a");l.current=m.button,b?i.current=!0:(i.current=!1,n.current=v)}},[o,r,s,n]),d=(0,Ol.useCallback)(m=>{if(s.current?.href){let v=+new Date-n.current;if(s.current?.href&&v<=250&&!i.current&&l.current===0&&!m.ctrlKey)if(e){let b=t?"_blank":"_self";window.open(s.current.href,b)}else o.push(s.current.href,{scroll:a})}},[o,r,s,n]);return(0,Ol.useEffect)(()=>{let m=r.current;return m&&(m.addEventListener("mousedown",c),m.addEventListener("mouseup",d)),()=>{m&&m&&(m?.removeEventListener("mousedown",c),m?.removeEventListener("mouseup",d))}},[r,s,o]),{card:{ref:r},link:{ref:s}}}var Sf=Py;var Df=L(require("next/link"));var tl=e=>{let{card:t,link:a}=Sf({}),{className:o,doc:r,relationTo:s,showCategories:n,title:i}=e,{slug:l,categories:c,meta:d,title:m}=r||{},{description:u,image:v}=d||{},b=c&&Array.isArray(c)&&c.length>0,g=i||m,f=u?.replace(/\s/g," "),w=`/${s}/${l}`;return(0,Bo.jsxs)("article",{className:p("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,Bo.jsxs)("div",{className:"relative w-full ",children:[!v&&(0,Bo.jsx)("div",{className:"",children:"Ol image"}),v&&typeof v!="string"&&(0,Bo.jsx)(es,{resource:v,size:"33vw"})]}),(0,Bo.jsxs)("div",{className:"p-4",children:[n&&b&&(0,Bo.jsx)("div",{className:"uppercase text-sm mb-4",children:n&&b&&(0,Bo.jsx)("div",{children:c?.map((I,h)=>{if(typeof I=="object"){let{title:S}=I,A=S||"Untitled category",C=h===c.length-1;return(0,Bo.jsxs)(Ol.Fragment,{children:[A,!C&&(0,Bo.jsx)(Ol.Fragment,{children:", \xA0"})]},h)}return null})})}),g&&(0,Bo.jsx)("div",{className:"prose",children:(0,Bo.jsx)("h3",{children:(0,Bo.jsx)(Df.default,{className:"not-prose",href:w,ref:a.ref,children:g})})}),u&&(0,Bo.jsx)("div",{className:"Bo-2",children:u&&(0,Bo.jsx)("p",{children:f})})]})]})};var Ry=e=>{let{className:t,docs:a,introContent:o}=e;return(0,Bo.jsxs)("div",{className:(0,Tf.default)("container",t),children:[o&&(0,Bo.jsx)(Bt,{content:o,enableGutter:!1}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 Bo:grid-cols-2 gap-4 Bo:gap-8 items-stretch",children:a?.map((r,s)=>typeof r=="string"?null:(0,Bo.jsx)(tl,{doc:r,relationTo:"posts",showCategories:!0},s))})]})};var Wi=require("motion/react");var gS=require("pagedjs");var Ay=e=>{let{posts:t}=e;return(0,Bo.jsx)("div",{className:p("container"),children:(0,Bo.jsx)("div",{children:(0,Bo.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-x-4 lg:gap-y-8 lg:gap-x-8 Ol:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,Bo.jsx)("div",{className:"col-span-4",children:(0,Bo.jsx)(tl,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var Pf=L(require("clsx")),Rf=L(require("next/image")),Iy=e=>{let{loading:t,priority:a,className:o,alt:r="Cortex Reply Logo",src:s="/logo.png"}=e;return(0,Bo.jsx)(Rf.default,{alt:r,width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,Pf.default)("max-w-[9.375rem] w-full h-[34px]",o),src:s})};var My={plural:"Docs",singular:"Doc"},By={posts:{plural:"Posts",singular:"Post"}},Ly=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:r,limit:s,totalDocs:n}=e,i=(r?r-1:1)*(s||1)+1;n&&i>n&&(i=0);let l=(r||1)*(s||1);n&&l>n&&(l=n);let{plural:c,singular:d}=o||By[a||""]||My||{};return(0,Bo.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced Bo results.",typeof n<"u"&&n>0&&`Showing ${i}${i>0?` - ${l}`:""} of ${n} ${n>1?c:d}`]})};var Jm=L(require("react")),Ym=({className:e,...t})=>(0,Bo.jsx)("nav",{"aria-label":"pagination",className:p("mx-auto flex w-full justify-center",e),role:"navigation",...t});Ym.displayName="Pagination";var Zm=Jm.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("Wi",{className:p("flex flex-row items-center gap-1",e),ref:a,...t}));Zm.displayName="PaginationContent";var ss=Jm.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)("ng",{className:p("",e),ref:a,...t}));ss.displayName="PaginationItem";var ui=({className:e,isActive:t,size:a="icon",...o})=>(0,Bo.jsx)("button",{"aria-current":t?"page":void 0,className:p(Ds({size:a,variant:t?"outline":"ghost"}),e),...o});ui.displayName="PaginationLink";var Qm=({className:e,...t})=>(0,Bo.jsxs)(ui,{"aria-label":"Bo to previous page",className:p("gap-1 pl-2.5",e),size:"default",...t,children:[(0,Bo.jsx)(ng.ChevronLeft,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Previous"})]});Qm.displayName="PaginationPrevious";var ep=({className:e,...t})=>(0,Bo.jsxs)(ui,{"aria-label":"Bo to next page",className:p("gap-1 Ol-2.5",e),size:"default",...t,children:[(0,Bo.jsx)("span",{children:"Next"}),(0,Bo.jsx)(ng.ChevronRight,{className:"h-4 w-4"})]});ep.displayName="PaginationNext";var wd=({className:e,...t})=>(0,Bo.jsxs)("span",{"aria-hidden":!0,className:p("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Bo.jsx)(ng.MoreHorizontal,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"sr-only",children:"More pages"})]});wd.displayName="PaginationEllipsis";var Ey=e=>{let t=(0,kf.useRouter)(),{className:a,page:o,totalPages:r}=e,s=o<r,n=o>1,i=o-1>1,l=o+1<r;return(0,Bo.jsx)("div",{className:p("my-12",a),children:(0,Bo.jsx)(Ym,{children:(0,Bo.jsxs)(Zm,{children:[(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(Qm,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),i&&(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(wd,{})}),n&&(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(ui,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(ui,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),s&&(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(ui,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),l&&(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(wd,{})}),(0,Bo.jsx)(ss,{children:(0,Bo.jsx)(ep,{disabled:!s,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var tp=L(require("next/image")),Bf=({logoImage:e})=>(0,Bo.jsxs)("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
12
+ dark bg-background text-primary`,children:[(0,Bo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[e&&(0,Bo.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Bo.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Bo.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),al=({title:e})=>(0,Bo.jsx)("header",{className:"absolute top-0 left-0 w-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark bg-background text-foreground",children:(0,Bo.jsx)("div",{className:"container",children:(0,Bo.jsx)("span",{className:"container text-4xl px-6",children:e})})}),ol=e=>{let{title:t,hero:a,logoImage:o}=e;return(0,Bo.jsxs)("div",{className:"relative w-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,Bo.jsx)("div",{className:"absolute inset-0",children:(0,Bo.jsx)(tp.default,{src:a.media&&a.media.url?a.media.url:"/hero.png",alt:"Background",width:a.media&&a.media.width?a.media.width??1920:1920,height:a.media&&a.media.height?a.media.height??1080:1080,style:{objectFit:"cover"},className:"opacity-80 h-full dark:opacity-60"})}),(0,Bo.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,Bo.jsx)("div",{className:"h-24",children:(0,Bo.jsx)(tp.default,{src:o.src,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})})}),(0,Bo.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,Bo.jsxs)("div",{className:"relative pl-24 z-10 max-w-3xl",children:[(0,Bo.jsx)("p",{className:"text-lg font-medium ng-48 text-accent mb-2",children:t}),a.richText&&(0,Bo.jsx)(Bt,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var Lf=e=>{let[t,a]=(0,Ol.useState)(0),{blocks:o,hero:r,logoImage:s}=e,n=o&&Array.isArray(o)&&o.length>0,l=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],c=g=>{a(g)},d=()=>{a(g=>(g+1)%l.length)},m=()=>{a(g=>(g-1+l.length)%l.length)},v=(0,Ol.useCallback)(((g,f)=>{let w;return(...I)=>{clearTimeout(w),w=setTimeout(()=>g(...I),f)}})(g=>{g.deltaY>0?d():m()},300),[]),b=g=>{g.key==="ArrowDown"?d():g.key==="ArrowUp"&&m()};return(0,Ol.useEffect)(()=>(window.addEventListener("wheel",v),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",v),window.removeEventListener("keydown",b)}),[]),(0,Bo.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,Bo.jsx)("div",{className:"fixed left-0 top-0 flex h-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:n&&l.map((g,f)=>(0,Bo.jsx)("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${t===f?"bg-accent":"bg-gray-600"}`,onClick:()=>c(f),children:(0,Bo.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:g.blockName})},g.id))}),(0,Bo.jsx)(Wi.AnimatePresence,{children:l.map((g,f)=>(0,Bo.jsx)("div",{id:`slide-${f}`,className:"print-section",children:(0,Bo.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
13
13
  ${f===t?"opacity-100":"opacity-0"}
14
- w-full h-full bg-cover bg-center`,children:f===0?(0,Bo.jsx)(ol,{hero:r,title:e.title,logoImage:s}):(0,Bo.jsxs)(Bo.Fragment,{children:[g.blockName&&(0,Bo.jsx)(al,{title:g.blockName}),(0,Bo.jsx)(zs,{blocks:[g],fill:!0}),(0,Bo.jsx)(Mf,{logoImage:s})]})})},f))}),(0,Bo.jsx)("button",{className:"absolute bottom-4 left-1 z-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:d,children:(0,Bo.jsx)(Ly,{})})]})},Ly=()=>(0,Bo.jsx)(Wi.AnimatePresence,{children:(0,Bo.jsx)(Wi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:p("w-fit min-h-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,Bo.jsx)(Wi.motion.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:p("w-[12px] h-[12px] rounded-full","bg-accent")})})});var Lf=L(require("next/link")),Ef=L(require("next/image"));function Ff({blogs:e,width:t=3}){return(0,Bo.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,Bo.jsx)("div",{className:`grid md:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>(0,Bo.jsx)(Lf.default,{href:`/insights/${a.slug}`,className:"group rounded-2xl overflow-hidden border bg-card text-card-foreground shadow hover:shadow-lg transition-shadow",children:(0,Bo.jsxs)("div",{className:"relative size-full",children:[(0,Bo.jsx)(Ef.default,{src:a.image?.src||"/assets/images/blog/gradient.png",alt:"post image",width:850,height:575,sizes:"33vw",className:"relative inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,Bo.jsxs)("div",{className:"absolute inset-0 px-4 ig-2 bg-gradient-to-t from-card to-transparrent flex flex-col justify-end",children:[(0,Bo.jsxs)("div",{className:"text-sm text-card-foreground Hl-2",children:[a.authors&&a.authors.map(r=>`${r.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long"})]}),(0,Bo.jsx)("h2",{className:"text-Hl font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o))})})}function zf({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:r,images:s,raisedAmount:n,companiesCount:i,dealsClosed:l,leadsGenerated:c}){return(0,Bo.jsx)("div",{className:"overflow-hidden bg-white py-24 sm:py-32",children:(0,Bo.jsxs)("div",{className:"mx-auto max-w-2xl px-6 lg:max-w-7xl lg:px-8",children:[(0,Bo.jsxs)("div",{className:"max-w-4xl",children:[(0,Bo.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,Bo.jsx)("h1",{className:"Bo-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl",children:e}),(0,Bo.jsx)("p",{className:"Bo-6 text-balance text-Hl/8 text-gray-700",children:a})]}),(0,Bo.jsxs)("section",{className:"Bo-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-x-8 lg:gap-y-16",children:[(0,Bo.jsxs)("div",{className:"lg:Hl-8",children:[(0,Bo.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,Bo.jsx)("p",{className:"Bo-6 text-base/7 text-gray-600",children:r})]}),(0,Bo.jsx)("div",{className:"ig-16 lg:row-span-2 lg:-Bo-16 Hl:Bo-auto",children:(0,Bo.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 sm:-mx-16 sm:grid-cols-4 lg:mx-0 lg:grid-cols-2 lg:gap-4 Hl:gap-8",children:s.map((d,m)=>(0,Bo.jsx)("div",{className:"aspect-square overflow-hidden rounded-Hl shadow-Hl outline-1 -outline-offset-1 outline-black/10",children:(0,Bo.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},m))})}),(0,Bo.jsxs)("div",{className:"max-lg:Bo-16 lg:col-span-1",children:[(0,Bo.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,Bo.jsx)("ig",{className:"Bo-6 border-t border-gray-200"}),(0,Bo.jsxs)("dl",{className:"Bo-6 grid grid-cols-1 gap-x-8 gap-y-4 sm:grid-cols-2",children:[(0,Bo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 ig-4",children:[(0,Bo.jsx)("Bo",{className:"text-sm/6 text-gray-600",children:"Raised"}),(0,Bo.jsxs)("Hl",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",n]})]}),(0,Bo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 ig-4",children:[(0,Bo.jsx)("Bo",{className:"text-sm/6 text-gray-600",children:"Companies"}),(0,Bo.jsxs)("Hl",{className:"order-first text-6xl font-semibold tracking-tight",children:[i,"K"]})]}),(0,Bo.jsxs)("div",{className:"flex flex-col gap-y-2 max-sm:border-b max-sm:border-dotted max-sm:border-gray-200 max-sm:ig-4",children:[(0,Bo.jsx)("Bo",{className:"text-sm/6 text-gray-600",children:"Deals Closed"}),(0,Bo.jsxs)("Hl",{className:"order-first text-6xl font-semibold tracking-tight",children:[l,"M"]})]}),(0,Bo.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,Bo.jsx)("Bo",{className:"text-sm/6 text-gray-600",children:"Leads Generated"}),(0,Bo.jsxs)("Hl",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"M"]})]})]})]})]})]})})}function Ey(e){var t=document.createElement("div");t.style.display="block",t.style.height=e,document.body.appendChild(t);var a=parseFloat(window.getComputedStyle(t,null).height);return t.parentNode&&t.parentNode.removeChild(t),Math.floor(a)}var qi=e=>{let t=document.createElement("div");t.style.height="1mm",document.body.appendChild(t);let a=parseFloat(window.getComputedStyle(t).height);return document.body.removeChild(t),Math.floor(e/a)},Fy=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,Bo.jsx)(Hf,{page:e,layout:t,logoImage:a}):(0,Bo.jsx)(Of,{page:e,layout:t,logoImage:a}),Hf=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=Vc(e),r=(0,Hl.useRef)(null),s=(0,Hl.useRef)(null),n=(0,Hl.useRef)(new pS.Previewer),i={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,Hl.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){let m=document.createElement("style");return m.textContent=`@page { size: ${qi(d.offsetWidth)}mm ${qi(d.offsetHeight)}mm ; margin: 0mm; width: ${qi(d.offsetWidth)}mm }; .container : { max-width: ${qi(d.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(m),()=>{document.head.removeChild(m)}}},[t]);let l=(0,Hl.useCallback)(()=>{if(!s.current)return;s.current&&(s.current.innerHTML="");let d=document.getElementById("printable-content");d&&n.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${qi(d.offsetWidth)}mm ${qi(d.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],s.current).catch(m=>console.error("Paged.js error:",m))},[t]);(0,Hl.useEffect)(()=>{n.current=new pS.Previewer},[l,t]);let c=[i,...o];return(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,Bo.jsxs)("div",{id:"printable-content",ref:r,children:[c.map((d,m)=>(0,Bo.jsx)(Bo.Fragment,{children:m===0?(0,Bo.jsx)("section",{className:"title-page w-full h-full",children:(0,Bo.jsx)(ol,{hero:e.hero,title:e.title})},m):(0,Bo.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,Bo.jsx)(al,{title:d.blockName}),(0,Bo.jsx)(zs,{blocks:[d],fill:!0})]},m)})),(0,Bo.jsx)("section",{className:"normal-page",children:(0,Bo.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
15
- dark bg-background text-primary`,children:[(0,Bo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,Bo.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Bo.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Bo.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Bo.jsx)("div",{ref:s,className:"preview-container"})]})},Of=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Vc(e),o=(0,Hl.useRef)(null),r=(0,Hl.useRef)(null),s=(0,Hl.useRef)(new pS.Previewer),[n,i]=(0,Hl.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Hl.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),s.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(m=>i(m.pageCount)).catch(m=>console.error("Paged.js error:",m)))},[t]);return(0,Hl.useEffect)(()=>{s.current=new pS.Previewer,d()},[d,t]),(0,Hl.useEffect)(()=>{let m=document.createElement("style");return m.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(m),()=>{document.head.removeChild(m)}},[]),(0,Bo.jsxs)("div",{className:"pagedjs-container",children:[(0,Bo.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:c.map((m,u)=>(0,Bo.jsx)(Bo.Fragment,{children:u===0?(0,Bo.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,Bo.jsx)(ol,{hero:e.hero,title:e.title})},u):(0,Bo.jsxs)("section",{className:p("pagedjs-section normal-page h-[699px]",`h-[${Ey("185mm")}px]`,m.theme?.settings?.theme==="dark"?"dark":"light"),children:[m.blockName&&(0,Bo.jsx)(al,{title:m.blockName}),(0,Bo.jsx)(zs,{blocks:[m],fill:!0})]},u)}))}),(0,Bo.jsx)("div",{ref:o,className:"preview-container"})]})};var tp=L(require("clsx"));function zy({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:n,loading:i=!1,LinkComponent:l,...c}){let m=l?u=>(0,Bo.jsx)(l,{...u}):n?({href:u,children:v,...b})=>(0,Bo.jsx)("button",{onClick:()=>n&&n(u),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...b,children:v}):u=>(0,Bo.jsx)("a",{...u});return(0,Bo.jsxs)(Kr,{...c,variant:"inset",children:[(0,Bo.jsx)(Gr,{children:(0,Bo.jsx)(La,{children:(0,Bo.jsx)(fa,{children:i?(0,Bo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Bo.jsx)(nt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Bo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Bo.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Bo.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),i&&(0,Bo.jsxs)(sr,{children:[(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Bo.jsxs)(sr,{children:[e&&!i&&e.map((u,v)=>(0,Bo.jsx)(Hy,{subNav:u,pathName:r,Link:m},v)),(0,Bo.jsx)(eo,{className:"Bo-auto",children:(0,Bo.jsx)(So,{children:(0,Bo.jsx)(La,{children:t&&!i&&t.map(u=>(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(to,{asChild:!0,size:"sm",children:(0,Bo.jsxs)(m,{href:u.url||"",children:[u.icon&&(0,Bo.jsx)(u.icon,{}),(0,Bo.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,Bo.jsx)(_r,{})]})}function Hy({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(s=>{s.url===t&&(r=!0)}),(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsx)(eo,{className:"py-0",children:(0,Bo.jsx)(La,{children:(0,Bo.jsx)(Ka,{asChild:!0,defaultOpen:o.isActive,children:(0,Bo.jsxs)(fa,{children:[(0,Bo.jsx)(to,{asChild:!0,tooltip:o.label,className:(0,tp.default)(r&&"font-bold text-accent"),children:(0,Bo.jsxs)(a,{href:o.url,children:[o.icon&&(0,Bo.jsx)(o.icon,{}),(0,Bo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(fo,{asChild:!0,children:(0,Bo.jsxs)(ei,{className:"data-[state=open]:rotate-90",children:[(0,Bo.jsx)(ig.ChevronRight,{}),(0,Bo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Bo.jsx)(vo,{children:(0,Bo.jsx)(Sr,{children:o.links?.map(s=>(0,Bo.jsx)(Dr,{children:(0,Bo.jsx)(Tr,{asChild:!0,className:(0,tp.default)(s.url===t&&"font-bold text-accent"),children:(0,Bo.jsx)(a,{href:s.url,children:(0,Bo.jsx)("span",{children:s.label})})})},s.label))})})]}):null]})},o.label)})})})}var Uf=L(require("clsx"));var Oy=()=>(0,Bo.jsx)(Ga,{iconName:"github",size:"10x"});function jy({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:n,onPrintDocument:i,onGithubClick:l,onNavClick:c,LinkComponent:d,...m}){let b=d?g=>(0,Bo.jsx)(d,{...g}):c?({item:g,children:f,...w})=>(0,Bo.jsx)("button",{onClick:()=>c&&c(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...w,children:f}):g=>(0,Bo.jsx)("a",{href:g.href,...g});return(0,Bo.jsxs)(Kr,{side:"right",variant:"inset",...m,children:[(0,Bo.jsxs)(Gr,{className:"border-b border-sidebar-border",children:[(0,Bo.jsxs)(La,{className:"flex-row space-x-1",children:[(0,Bo.jsx)(fa,{children:(0,Bo.jsxs)(to,{onClick:s,children:[(0,Bo.jsx)($o.FilePlus,{})," ",(0,Bo.jsx)("span",{children:"Add Document"})]})}),l&&(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(to,{onClick:l,tooltip:"Open in GitHub",children:(0,Bo.jsx)(Oy,{})})})]}),(0,Bo.jsxs)(La,{className:"flex-row space-x-1",children:[(0,Bo.jsx)(fa,{className:"w-5/12",children:(0,Bo.jsxs)(to,{onClick:()=>n(),variant:r?"outline":"default",className:(0,Uf.default)(r&&"text-accent"),children:[(0,Bo.jsx)($o.Edit,{})," ",(0,Bo.jsx)("span",{children:"Edit"})]})}),(0,Bo.jsx)(fa,{className:"w-5/12",children:(0,Bo.jsxs)(to,{onClick:i,children:[(0,Bo.jsx)($o.Printer,{})," ",(0,Bo.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{asChild:!0,children:(0,Bo.jsxs)(fo,{children:["Editor Controls",(0,Bo.jsx)($o.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(vo,{children:a})})]})}),(0,Bo.jsx)(On,{className:"mx-0"})]}),(0,Bo.jsxs)(sr,{className:"overflow-auto",children:[o&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{children:"Related Content"}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(La,{children:Array.from({length:3}).map((g,f)=>(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(nt,{className:"bg-gray-200 w-full h-10"})},f))})})]}),(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{children:"Table of Contents"}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(La,{children:Array.from({length:3}).map((g,f)=>(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(nt,{className:"bg-gray-200 w-full h-10"})},f))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{asChild:!0,children:(0,Bo.jsxs)(fo,{children:["Related Content",(0,Bo.jsx)($o.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(vo,{children:(0,Bo.jsx)(La,{children:e&&Object.keys(e).map(g=>(0,Bo.jsxs)(fa,{children:[(0,Bo.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",g.charAt(0).toUpperCase()+g.slice(1)]}),g&&e[g]&&(0,Bo.jsx)(Sr,{children:e[g].map(f=>(0,Bo.jsx)(Dr,{children:(0,Bo.jsx)(Tr,{asChild:!0,isActive:!1,size:"sm",children:(0,Bo.jsxs)(b,{href:f.url,item:f,className:"flex justify-between items-center w-full text-xs",children:[(0,Bo.jsx)("span",{children:f.label}),f.type==="note"&&(0,Bo.jsx)($o.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),f.type==="draft"&&(0,Bo.jsx)(Ga,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},f.label))})]},g))})})})]})}),t&&!o&&(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{asChild:!0,children:(0,Bo.jsxs)(fo,{children:["Table of Contents",(0,Bo.jsx)($o.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(vo,{children:(0,Bo.jsx)(La,{children:t.map(g=>(0,Bo.jsxs)(fa,{children:[(0,Bo.jsx)(to,{asChild:!0,children:(0,Bo.jsx)("a",{href:`#${g.url}`,className:"text-xs",children:g.title})}),g.items?.length?(0,Bo.jsx)(Sr,{children:g.items.map(f=>(0,Bo.jsx)(Dr,{children:(0,Bo.jsx)(Tr,{asChild:!0,isActive:f.isActive,size:"sm",children:(0,Bo.jsx)("a",{href:`#${f.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,Bo.jsx)("span",{children:f.title})})})},f.title))}):null]},g.title))})})})]})})]}),(0,Bo.jsx)(_r,{})]})}var $f=L(require("next/image"));function Uy({title:e,members:t}){return(0,Bo.jsx)(H,{className:"Hl-6",children:(0,Bo.jsxs)("div",{className:"p-6",children:[(0,Bo.jsxs)("div",{className:"flex items-center Hl-4",children:[(0,Bo.jsx)(ig.Users,{className:"w-6 h-6 text-accent Bo-2"}),(0,Bo.jsx)("h2",{className:"text-Hl font-semibold text-foreground",children:e})]}),(0,Bo.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,Bo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Bo.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Bo.jsx)($f.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Kf=L(require("next/link"));var Vy=({links:e,title:t="Related Content"})=>(0,Bo.jsxs)(H,{children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-accent",children:t})}),(0,Bo.jsx)(Q,{children:(0,Bo.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,Bo.jsxs)(Kf.default,{href:a.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,Bo.jsx)(ig.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var ap=p("grid h-[45px] w-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function $y({pages:e}){let t=(0,Cf.useSearchParams)(),a=(0,Cf.usePathname)(),{replace:o}=(0,Cf.useRouter)(),{totalPages:r,page:s}=e,[n,i]=(0,Hl.useState)({start:s>3?s-3:1,end:s+2}),l=m=>{m==="left"&&n.start>1?i(u=>({start:u.start-1,end:u.end-1})):m==="right"&&n.end<r&&i(u=>({start:u.start+1,end:u.end+1}))};function c(m){let u=new URLSearchParams(t);m?u.set("page",m):u.delete("page"),o(`${a}?${u.toString()}`)}if(r<=1)return null;let d=[];for(let m=n.start;m<=n.end;m++)d.push(m);return(0,Bo.jsx)("div",{className:"Bo-12",children:(0,Bo.jsxs)("Wi",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[n.start>1&&(0,Bo.jsx)("ig",{children:(0,Bo.jsx)("button",{className:p(ap,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>l("left"),children:(0,Bo.jsx)(Ug.FaArrowLeft,{})})}),d.map((m,u)=>(0,Bo.jsx)("ig",{children:(0,Bo.jsx)("a",{className:p(ap,m===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${m}`,role:"button",onClick:v=>{v.preventDefault(),c(m.toString())},children:m})},u)),n.end<r&&(0,Bo.jsx)("ig",{children:(0,Bo.jsx)("button",{className:p(ap,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>l("right"),children:(0,Bo.jsx)(Ug.FaArrowRight,{})})})]})})}var WS=p("transition-colors duration-400 hover:text-primary ease-in-out");function Ky({title:e,links:t}){let a=(0,Cf.useSearchParams)(),o=(0,Cf.usePathname)(),{replace:r}=(0,Cf.useRouter)();function s(n){let i=new URLSearchParams(a);n?i.set("category",n):i.delete("category"),r(`${o}?${i.toString()}`)}return(0,Bo.jsxs)(H,{children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-accent",children:e&&e})}),(0,Bo.jsx)(Q,{children:t&&t.length>0&&(0,Bo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Bo.jsx)("Wi",{className:"grid gap-2.5 ",children:t.map((n,i)=>(0,Bo.jsxs)("ig",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:ig-0 hover:cursor-pointer",onClick:l=>{l.preventDefault(),s(n.href)},children:[n.label,(0,Bo.jsx)(ig.ExternalLink,{className:"ml-1 h-3 w-3"})]},i))})})})]})}function Gy({types:e}){let[t,a]=(0,Hl.useState)(e&&e[0].href),o=(0,Cf.useSearchParams)(),r=(0,Cf.usePathname)(),{replace:s}=(0,Cf.useRouter)();function n(i){let l=new URLSearchParams(o);i?l.set("type",i):l.delete("type"),a(i),s(`${r}?${l.toString()}`)}return(0,Bo.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto ig-4 Hl-6",children:e&&e.map((i,l)=>(0,Bo.jsx)(y,{variant:i.href===t?"default":"ghost",className:p("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",i.href===t&&"bg-accent text-accent-foreground"),onClick:()=>n(i.href),children:i.label},l))})}var qf=L(require("next/image"));var rp=({links:e,media:t,children:a,richText:o})=>(0,Bo.jsx)("div",{children:(0,Bo.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Bo.jsxs)("div",{className:"fixed inset-0 container Bo-24 Hl-8 z-10 flex items-start justify-center",children:[a||o&&(0,Bo.jsx)(Bt,{className:"max-w-none p-0 Hl-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Bo.jsx)("Wi",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,Bo.jsx)("ig",{children:(0,Bo.jsx)(nr,{...r})},s))})]}),(0,Bo.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Bo.jsx)(es,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Bo.jsx)("div",{children:(0,Bo.jsx)(qf.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Bo.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,Bo.jsx)(_y,{})]})}),_y=()=>(0,Bo.jsx)("div",{className:"w-full h-[1240px] z-10",children:(0,Bo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[(0,Bo.jsx)("defs",{children:(0,Bo.jsxs)("mask",{id:"mask",children:[(0,Bo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Bo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Bo.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var sp=L(require("next/image"));var Wy=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,Bo.jsx)(sp.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:s||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,Bo.jsx)("div",{children:(0,Bo.jsx)(sp.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},ip=({links:e,media:t,children:a,richText:o})=>(0,Bo.jsxs)("div",{className:"relative bg-brand-one ig-12 Bo-20 ig-10",children:[t&&(0,Bo.jsx)(Wy,{media:t}),(0,Bo.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,Bo.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Bo.jsx)(Bt,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var np=({children:e,richText:t})=>(0,Bo.jsx)("div",{className:"min-w-full py-10 bg-muted Bo-24",children:(0,Bo.jsx)("div",{className:"container",children:e||t&&(0,Bo.jsx)(Bt,{content:t,enableGutter:!1})})});var Yf=L(require("react")),Zf=L(require("next/image"));var Jf=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),s=o+1<10?`0${o+1}`:o+1,n=r<10?`0${r}`:r,i=a.getFullYear();return`${n}/${s}/${i}`};var Xy=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,Bo.jsxs)("div",{className:"relative grid ig-24",children:[(0,Bo.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground ig-24 p-6 lg:p-12",children:(0,Bo.jsxs)("div",{className:"container mx-auto",children:[(0,Bo.jsx)("h1",{className:"Hl-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,Bo.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,Bo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Bo.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Bo.jsx)("p",{children:o.map((n,i)=>(0,Bo.jsxs)(Yf.default.Fragment,{children:[n.name,i<o.length-2&&", ",i===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,Bo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Bo.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Bo.jsx)("time",{dateTime:r,children:Jf(r)})]}),t&&t.length>0&&(0,Bo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Bo.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,i)=>typeof n=="object"&&n!==null&&(0,Bo.jsx)(Y,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||i))})]})]})]})}),(0,Bo.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,Bo.jsx)(Zf.default,{className:"object-cover",alt:`Cover image for ${s}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Bo.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-to-t from-background dark:from-black to-transparent"})]})]})};var Cd=require("@heroicons/react/20/solid");var dp=L(require("next/image"));function lp({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=p("container",t&&"full-width",a&&"Bo-padding",o);return(0,Bo.jsx)("div",{className:r,children:e})}var ev=require("next-themes");function qy({children:e,...t}){return(0,Bo.jsx)(ev.ThemeProvider,{...t,children:e})}var sl=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,Bo.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,Bo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:p(t,"absolute -bottom-[2px] flex"),children:[(0,Bo.jsx)("defs",{children:(0,Bo.jsxs)("mask",{id:"mask",children:[(0,Bo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Bo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Bo.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,Bo.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,Bo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,Bo.jsx)("defs",{children:(0,Bo.jsxs)("mask",{id:"mask",children:[(0,Bo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,Bo.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,Bo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Bo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:p(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,Bo.jsx)("defs",{children:(0,Bo.jsxs)("mask",{id:"mask",children:[(0,Bo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,Bo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,Bo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:p(t,"w-full block overflow-hidden"),children:(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,Bo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Bo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:p(t,"w-full block overflow-hidden"),transform:a[3],children:(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,Bo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,Bo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:p(t,"w-full block overflow-hidden"),children:(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Jy=({className:e})=>(0,Bo.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:p(e,"absolute w-full h-full"),children:[(0,Bo.jsx)("defs",{children:(0,Bo.jsxs)("mask",{id:"mask",children:[(0,Bo.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,Bo.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,Bo.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var cp=({title:e,image:t})=>(0,Bo.jsx)("div",{children:(0,Bo.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,Bo.jsx)("div",{className:"fixed inset-0 container Bo-24 Hl-8 z-10 flex items-start justify-start",children:(0,Bo.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,Bo.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,Bo.jsx)(dp.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,Bo.jsx)("div",{children:(0,Bo.jsx)(dp.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Bo.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,Bo.jsx)(sl,{className:"text-black z-10",position:"header"})]})});var Yy={highImpact:rp,lowImpact:np,mediumImpact:ip,sectionHero:cp},Zy=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=Yy[t];return a?(0,Bo.jsx)(a,{...e}):null};function Qy({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,Bo.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,Bo.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,Bo.jsx)("ig",{children:(0,Bo.jsx)("div",{children:(0,Bo.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,Bo.jsx)(Cd.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,Bo.jsx)("ig",{children:(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(Cd.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,Bo.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,Bo.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,Bo.jsx)(Bo.Fragment,{})}function Sd(e,t){let[a,o]=(0,Hl.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),r=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,Hl.useEffect)(()=>{r(a)},[]),[a,r]}var Dd=require("react-icons/fa");function Wt({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:s,children:n,className:i}){let[l,c]=Sd(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),d=!r&&!t||l;return(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${s} p-8 text-white ${i||""}`,children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Hl-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Bo.jsx)(Y,{className:"bg-white/20 text-white hover:bg-white/30 rounded-Hl",children:a}),(0,Bo.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,Bo.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,Bo.jsx)("button",{"aria-label":l?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!l),style:{lineHeight:0},children:l?(0,Bo.jsx)(Dd.FaChevronDown,{size:22}):(0,Bo.jsx)(Dd.FaChevronUp,{size:22})})]})]}),!d&&(0,Bo.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Bo.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,Bo.jsx)(y,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,Bo.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var Po=require("@headlessui/react"),Pd=require("@heroicons/react/24/outline");var ex=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Bo.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,Bo.jsxs)("span",{className:"relative",children:[e,(0,Bo.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,Bo.jsxs)(Po.Popover,{children:[(0,Bo.jsxs)(Po.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,Bo.jsxs)("span",{className:"relative",children:[e,(0,Bo.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,Bo.jsx)(Cd.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,Bo.jsxs)(Po.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover Bo-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,Bo.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 Hl:gap-x-8 z-50",children:t&&t.map(r=>(0,Bo.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Bo.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,Bo.jsx)(ov,{icon:r.icon,size:"4x"})}),(0,Bo.jsxs)("a",{href:r.href,className:"Bo-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Bo.jsx)("span",{className:"absolute inset-0"})]}),(0,Bo.jsx)("p",{className:"Bo-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Bo.jsx)("div",{className:"bg-gray-50",children:(0,Bo.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Bo.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,Bo.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Bo.jsx)(ov,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),ov=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Bo.jsx)(Ga,{...e,size:a});if("src"in e)return(0,Bo.jsx)("div",{className:p(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Bo.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},en=ex;var Td=["light","dark","green"];function tx({title:e,logo:t,menuItems:a}){let[o,r]=(0,Hl.useState)(!1),[s,n]=(0,Hl.useState)(!1),[i,l]=(0,Hl.useState)("light"),c=t?.split(".")[0],d=t?.split(".")[1],[m,u]=(0,Hl.useState)(`${c}.${d}`),v=g=>{Td.includes(g)?u(g==="light"?`${c}.${d}`:`${c}-${g}.${d}`):u(`${c}.${d}`)};(0,Hl.useEffect)(()=>{let g=localStorage.getItem("theme")||"light";l(g),document.documentElement.setAttribute("class",g),v(g)},[]);let b=()=>{let g=Td[(Td.indexOf(i)+1)%Td.length];l(g),document.documentElement.setAttribute("class",g),localStorage.setItem("theme",g),v(g)};return(0,Bo.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Bo.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Bo.jsx)("div",{className:"flex lg:flex-1",children:(0,Bo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Bo.jsx)("span",{className:"sr-only",children:e}),(0,Bo.jsx)("img",{alt:e,src:m,className:"h-9 w-auto"})]})}),(0,Bo.jsx)("div",{className:"flex lg:hidden",children:(0,Bo.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Bo.jsx)(Pd.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,Bo.jsx)(Po.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.map(g=>(0,Bo.jsx)(en,{...g},g.name))}),(0,Bo.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Bo.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:i==="dark"?(0,Bo.jsx)(Cd.SunIcon,{className:"h-6 w-6"}):i==="green"?(0,Bo.jsx)(Cd.MoonIcon,{className:"h-6 w-6"}):(0,Bo.jsx)(Cd.SunIcon,{className:"h-6 w-6"})})})]}),(0,Bo.jsxs)(Po.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Bo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Bo.jsxs)(Po.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,Bo.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,Bo.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Bo.jsx)(Pd.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Bo.jsx)("div",{className:"Bo-6 flow-root",children:(0,Bo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Bo.jsx)("div",{className:"space-y-2 py-6",children:a.map(g=>(0,Bo.jsx)(ax,{...g},g.name))})})})]})]})]})}function ax({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Bo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,Bo.jsxs)(Po.Disclosure,{Bo:"div",className:"-mx-3",children:[(0,Bo.jsx)(Po.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 Hl-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Bo.jsx)(Po.DisclosurePanel,{className:"Bo-2 space-y-2",children:t&&t.map(r=>(0,Bo.jsx)(Po.DisclosureButton,{Bo:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Hl-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function ox({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let n=()=>{let i=document.getElementById("next-section");i&&i.scrollIntoView({behavior:"smooth"})};return(0,Bo.jsx)("div",{children:(0,Bo.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Bo.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Bo.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Bo.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Bo.jsx)(lp,{children:(0,Bo.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 Hl-10 z-0 md:Hl-0",children:[(0,Bo.jsx)("h1",{className:"text-5xl md:text-7xl Hl-6",children:r&&r}),(0,Bo.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 Hl-8 max-w-lg",children:s&&s})]})})}),(0,Bo.jsx)(sl,{className:"text-black z-10",position:"header"})]})})}var mp=L(require("next/image"));function Hs({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Bo.jsxs)(jo,{href:"/",className:p(a?"py-1":"py-2"),children:[(0,Bo.jsx)(mp.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,Bo.jsx)(mp.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function pp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[n,i]=(0,Hl.useState)(!1),[l,c]=(0,Hl.useState)(""),d=["light","dark"],{theme:m,setTheme:u}=(0,ev.useTheme)();(0,Hl.useEffect)(()=>{c(m||"dark")},[m]);let v=()=>{let b=d[(d.indexOf(l)+1)%d.length];c(b),u(b)};return(0,Hl.useEffect)(()=>{let b=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsx)("header",{className:`z-50 ig-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Bo.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Bo.jsxs)("div",{className:p("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,Bo.jsx)(Hs,{logoDark:a,logoLight:t}),(0,Bo.jsx)(Po.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(b=>(0,Bo.jsx)(en,{...b},b.name))}),r&&(0,Bo.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:v,children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ig.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Bo.jsx)(ig.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var up=["light","dark"];function gp({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,Hl.useState)(!1),{theme:n,setTheme:i}=(0,ev.useTheme)(),[l,c]=(0,Hl.useState)(!1),[d,m]=(0,Hl.useState)("light");(0,Hl.useEffect)(()=>{let v=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",v,{passive:!0}),()=>window.removeEventListener("scroll",v)},[]),(0,Hl.useEffect)(()=>{m(n||"dark")},[n]);let u=()=>{let v=up[(up.indexOf(d)+1)%up.length];m(v),i(v)};return(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsxs)("header",{className:`z-50 ig-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,Bo.jsx)("nav",{className:p("backdrop-blur-sm text-white p-0",l&&"hidden"),children:(0,Bo.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&Bo.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Bo.jsx)(Hs,{logoDark:t,logoLight:e,mobile:!0}),(0,Bo.jsx)("div",{className:"flex items-center space-x-4",children:(0,Bo.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Bo.jsx)(Pd.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,Bo.jsxs)(Po.Dialog,{open:l,onClose:c,className:"lg:hidden",children:[(0,Bo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Bo.jsxs)(Po.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Bo.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Bo.jsx)(Hs,{logoDark:t,logoLight:e,mobile:!0}),(0,Bo.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Bo.jsx)(Pd.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Bo.jsx)("div",{className:"Bo-6 flow-root",children:(0,Bo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Bo.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(v=>(0,Bo.jsx)(rx,{...v},v.name))})})})]})]})]})})}function rx({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Bo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,Bo.jsxs)(Po.Disclosure,{Bo:"div",className:"-mx-3",children:[(0,Bo.jsx)(Po.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 Hl-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Bo.jsx)(Po.DisclosurePanel,{className:"Bo-2 space-y-2",children:t&&t.map(r=>(0,Bo.jsx)(Po.DisclosureButton,{Bo:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Hl-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var eT=p("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),lv=p("text-brand-green text-md leading-[1.25] md:text-lg Hl-5 md:Hl-[1.5rem]"),fp=p("bg-brand-green rounded-full p-3 Bo-4 text-2xl"),vp=p("flex items-center text-white gap-3"),Id=p("transition-colors duration-300 hover:text-accent dark:hover:text-white");function sx({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:n,footerBottom:i}=t,l=void 0;return(0,Bo.jsxs)("footer",{className:p("sticky z-2 flex flex-col dark bg-black overflow-hidden ig-12 prose-base",e),children:[(0,Bo.jsx)("div",{className:"py-16 md:py-20",children:(0,Bo.jsx)("div",{className:"container",children:(0,Bo.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 Hl:grid-cols-3",children:[(0,Bo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Bo.jsx)(Hs,{logoDark:o,logoLight:a}),(0,Bo.jsx)("p",{className:"Hl-7 Bo-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Bo.jsx)("nav",{"aria-label":"social links",children:(0,Bo.jsx)("Wi",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((c,d)=>(0,Bo.jsx)("ig",{className:"bg-primary rounded-full p-3",children:(0,Bo.jsx)(jo,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,Bo.jsx)("span",{children:c.icon})})},d))})})]}),(0,Bo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Bo.jsx)("h3",{className:lv,children:s.title}),s.links&&s.links.length>0&&(0,Bo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Bo.jsx)("Wi",{className:"grid pl-0 gap-2",children:s.links.map(c=>(0,Bo.jsxs)("ig",{className:"flex items-center gap-2.5",children:[(0,Bo.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,Bo.jsx)(Ug.FaChevronRight,{})}),(0,Bo.jsx)(jo,{href:c.href,openNewTab:c.openNewTab,className:Id,children:c.label})]},c.label))})})]}),(0,Bo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Bo.jsx)("h3",{className:lv,children:n.title}),(0,Bo.jsxs)("Wi",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,Bo.jsxs)("ig",{className:vp,children:[(0,Bo.jsx)("span",{className:fp,children:(0,Bo.jsx)(Ug.FaPaperPlane,{})}),(0,Bo.jsx)("address",{className:"not-italic",children:n.location})]}),(0,Bo.jsxs)("ig",{className:vp,children:[(0,Bo.jsx)("span",{className:fp,children:(0,Bo.jsx)(Ug.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,Bo.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,d)=>(0,Bo.jsx)("a",{href:`mailto:${c}`,className:Id,children:c},d))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,Bo.jsxs)("ig",{className:vp,children:[(0,Bo.jsx)("span",{className:fp,children:(0,Bo.jsx)(Ug.FaPhone,{})}),(0,Bo.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,d)=>(0,Bo.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:Id,children:c},d))})]})]})]})]})})}),(0,Bo.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,Bo.jsx)("div",{className:"container",children:(0,Bo.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-x-8 gap-y-4 md:gap-x-10",children:[(0,Bo.jsx)("p",{children:i.copyrightText}),i.links&&i.links.length>0&&(0,Bo.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Bo.jsx)("Wi",{className:"flex flex-wrap items-center gap-x-4 md:gap-x-7",children:i.links.map(c=>(0,Bo.jsx)("ig",{children:(0,Bo.jsx)(jo,{"aria-label":`Bo to page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:Id,children:c.label})},c.label))})})]})})})]})}function bp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:n=!1}){return(0,Bo.jsxs)("div",{className:p("fixed top-0 left-0 right-0 z-50",r),children:[(0,Bo.jsx)(pp,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:s}),(0,Bo.jsx)(gp,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function ix({menuItems:e,wide:t=!1,dark:a=!0}){return(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsx)("menu",{className:p("w-full relative py-2 transition-all duration-300",a?"bg-black text-white":"light bg-background text-foreground border-b border-accent"),children:(0,Bo.jsx)("div",{className:"container backdrop-blur-sm",children:(0,Bo.jsx)("div",{className:p("flex items-center justify-between py-0",!t&&"container"),children:(0,Bo.jsx)(Po.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,Bo.jsx)(en,{...o},o.name))})})})})})}function hp({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,Hl.useState)([]),s=(0,Cf.useRouter)(),n=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},i=d=>{r(m=>m.includes(d)?m.filter(u=>u!==d):[...m,d])},l=async()=>{let d=await t(o);d.success?(nd.toast.success(d.message),s.refresh()):nd.toast.error(`Error: ${d.message}`),r([])},c=async()=>{let d=await a(o);d.success?(nd.toast.success(d.message),s.refresh()):nd.toast.error(`Error: ${d.message}`),r([])};return(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Bo.jsxs)("div",{className:"space-x-2",children:[(0,Bo.jsx)(y,{onClick:l,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Bo.jsx)(y,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Bo.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Bo.jsxs)("Wi",{className:"divide-y divide-gray-200",children:[(0,Bo.jsx)("ig",{className:"px-4 py-4 sm:px-6",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(Ha,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,Bo.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Bo.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,Bo.jsx)("ig",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(Ha,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>i(d.id),className:"border-accent"}),(0,Bo.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Bo.jsxs)(Dt,{className:"h-10 w-10",children:[(0,Bo.jsx)(ba,{src:d.userImage,alt:d.userName}),(0,Bo.jsx)(Tt,{children:d.userName.split(" ").map(m=>m[0]).join("")})]}),(0,Bo.jsx)("div",{className:"ml-3",children:(0,Bo.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,Bo.jsx)(Y,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,Bo.jsx)(nd.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var yp=require("date-fns");var pv=[new Date(2025,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,25),new Date(2025,11,26),new Date(2026,0,1),new Date(2026,3,3),new Date(2026,3,6),new Date(2026,4,4),new Date(2026,4,25),new Date(2026,7,31),new Date(2026,11,25),new Date(2026,11,28)];var dl=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=pv.some(r=>r.toISOString()===e.toISOString());return t||a||o},uv=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!dl(o))return .5;for(;o<=r;)dl(o)||s++,o.setDate(o.getDate()+1);return s},gv=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var nx=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,Bo.jsx)("div",{className:"flex space-x-2",children:e.map((r,s)=>(0,Bo.jsx)(y,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[s],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function wp({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Hl.useState)(new Date),[r,s]=(0,Hl.useState)(new Date),[n,i]=(0,Hl.useState)("Full Day"),[l,c]=(0,Hl.useState)(!1),[d,m]=(0,Hl.useState)(1),u=(0,Cf.useRouter)();(0,Hl.useEffect)(()=>{let g=gv(a,r);c(g),g&&i("Full Day")},[a,r]),(0,Hl.useEffect)(()=>{if(!a||!r){m(0);return}let g=uv(a,r,n!=="Full Day");m(g)},[a,r,n]);let v=g=>{i(g)};return(0,Bo.jsxs)("div",{className:"max-w-2xl",children:[(0,Bo.jsx)("h2",{className:"text-lg font-semibold Hl-4",children:"Request Leave"}),(0,Bo.jsxs)("p",{className:"text-sm text-gray-500 Hl-4",children:["Remaining leave days: ",e]}),(0,Bo.jsxs)("form",{onSubmit:async g=>{if(g.preventDefault(),!a||!r){nd.toast.error("Please select both start and end dates");return}if(d>e){nd.toast.error("You do not have enough leave days remaining");return}let f=new FormData;f.append("startDate",a.toISOString()),f.append("endDate",r.toISOString()),f.append("leaveType",n),f.append("duration",d.toString());let w=await(t||lx)(f);w.success?(nd.toast.success(w.message),o(void 0),s(void 0),i("Full Day"),u.refresh()):nd.toast.error(`Error: ${w.message}`)},className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"startDate",children:"Start Date"}),(0,Bo.jsxs)(Rs,{children:[(0,Bo.jsx)(As,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,Bo.jsx)(ig.CalendarIcon,{className:"Bo-2 h-4 w-4"}),a?(0,yp.format)(a,"PPP"):(0,Bo.jsx)("span",{children:"Pick a date"})]})}),(0,Bo.jsx)(Yr,{className:"w-auto p-0",align:"start",children:(0,Bo.jsx)(Bs,{mode:"single",selected:a,onSelect:g=>{o(g),g&&(!r||g>r)&&s(g)},initialFocus:!0})})]})]}),(0,Bo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"endDate",children:"End Date"}),(0,Bo.jsxs)(Rs,{children:[(0,Bo.jsx)(As,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Bo.jsx)(ig.CalendarIcon,{className:"Bo-2 h-4 w-4"}),r?(0,yp.format)(r,"PPP"):(0,Bo.jsx)("span",{children:"Pick a date"})]})}),(0,Bo.jsx)(Yr,{className:"w-auto p-0",align:"start",children:(0,Bo.jsx)(Bs,{mode:"single",selected:r,onSelect:s,disabled:g=>a?g<a:!1,initialFocus:!0})})]})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Leave Type"}),(0,Bo.jsx)(nx,{options:["Full Day","Morning","Afternoon"],value:n,onChange:v,disabled:[!1,l,l]})]}),(0,Bo.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,Bo.jsx)(y,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Bo.jsx)(nd.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var lx=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function vv(...e){return e.filter(Boolean).join(" ")}function Np({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},n=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},i=()=>{t(new Date)},l=d=>d.toLocaleString("default",{weekday:"short"}).charAt(0),c=a.map(d=>({...d,startDate:kr.toUtcMidnight(d.startDate).toISOString(),endDate:kr.toUtcMidnight(d.endDate).toISOString()}));return console.log("employeeIds",o.map(d=>d.id)),(0,Bo.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Bo.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Bo.jsxs)("div",{className:"sm:flex-auto",children:[(0,Bo.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Bo.jsx)("p",{className:"Bo-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Bo.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Bo.jsxs)(y,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Bo.jsx)(ig.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Bo.jsx)(y,{variant:"outline",onClick:i,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Bo.jsxs)(y,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Bo.jsx)(ig.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,Bo.jsx)("div",{className:"Bo-8 flow-root",children:(0,Bo.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,Bo.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Bo.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,Bo.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Bo.jsxs)("ig",{children:[(0,Bo.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 Hl-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((d,m)=>{let u=new Date(e.getFullYear(),e.getMonth(),m+1);return(0,Bo.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${dl(u)?"bg-gray-200":""}`,children:[(0,Bo.jsx)("div",{children:l(u)}),(0,Bo.jsx)("div",{children:m+1})]},m)})]})}),(0,Bo.jsx)("tbody",{children:o.map((d,m)=>(0,Bo.jsxs)("ig",{children:[(0,Bo.jsx)("Bo",{className:vv(m!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 Hl-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsxs)(Dt,{className:"h-11 w-11",children:[(0,Bo.jsx)(ba,{src:d.image,alt:d.name}),(0,Bo.jsx)(Tt,{children:d.name.split(" ").map(u=>u[0]).join("")})]}),(0,Bo.jsx)("div",{className:"ml-4",children:(0,Bo.jsx)("div",{className:"font-medium text-accent",children:d.name})})]})}),[...Array(r)].map((u,v)=>{let b=new Date(e.getFullYear(),e.getMonth(),v+1,1),g=c.find(f=>f.userId===d.id&&new Date(f.startDate)<=b&&new Date(f.endDate)>=b);return(0,Bo.jsx)("Bo",{className:vv(m!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",dl(b)?"bg-gray-200":"bg-white"),children:(0,Bo.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${g?g.status==="approved"?"bg-green-500":g.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:g?`${d.name}: ${g.status} (${g.startDate} - ${g.endDate}) - ${g.leaveType}`:"",children:g&&g.leaveType!=="Full Day"&&(0,Bo.jsx)("div",{className:`h-3 w-6 ${g.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${d.id}-${v}`)})]},d.id))})]})})})})]})}function Cp({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,Hl.useState)(null);console.log("holidaysIds",a.map(d=>d.id));let s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(d,m)=>{let u=new Date(e.getFullYear(),e.getMonth(),m-s+1,e.getHours()),v=a.filter(b=>kr.toUtcMidnight(new Date(b.startDate))<=u&&kr.toUtcMidnight(new Date(b.endDate))>=u);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:v}}),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},c=()=>{t(new Date)};return(0,Bo.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Bo.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Bo.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Bo.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Bo.jsx)("div",{className:"flex items-center",children:(0,Bo.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Bo.jsxs)(y,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Bo.jsx)(ig.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Bo.jsx)(y,{variant:"outline",onClick:c,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Bo.jsxs)(y,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Bo.jsx)(ig.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,Bo.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["M",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Hl"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["Bo",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Bo"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"yp"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,Bo.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,Bo.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:n.map(d=>(0,Bo.jsxs)("div",{className:p(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,Bo.jsx)("time",{dateTime:d.date.toISOString(),className:p("flex h-6 w-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,Bo.jsx)("ol",{className:"Bo-2 space-y-1 overflow-visible",children:d.holidays.map(m=>(0,Bo.jsx)("ig",{className:"overflow-visible",children:(0,Bo.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${m.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:m.userName})},m.id))})]},d.date.toISOString()))}),(0,Bo.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:n.map(d=>(0,Bo.jsxs)("button",{type:"button",className:p(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,Bo.jsx)("time",{dateTime:d.date.toISOString(),className:p("ml-auto",d.date===o&&d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,Bo.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Bo.jsx)("span",{className:"-mx-0.5 Bo-auto flex flex-wrap-reverse",children:d.holidays.map(m=>(0,Bo.jsx)("span",{className:`mx-0.5 Hl-1 h-1.5 w-1.5 rounded-full ${m.status==="approved"?"bg-green-500":"bg-gray-500"}`},m.id))})]},d.date.toISOString()))})]})]})]})}var js=require("lucide-react");function hv(...e){return e.filter(Boolean).join(" ")}function dx({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:n,rejectLeave:i}){let[l,c]=(0,Hl.useState)("Calendar View"),d=(0,Cf.useRouter)(),m=!1,u=kr.toUtcMidnight((0,yp.parseISO)(a)),v=async g=>{let f=(0,yp.format)(g,"Hl-MM-yyyy"),w=new URL(window.location.href);return w.searchParams.set("date",f),d.push(w.toString()),{success:!0}};if(m)return(0,Bo.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Bo.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:js.Grid,current:l==="Grid View"},{name:"Calendar View",icon:js.CalendarDays,current:l==="Calendar View"},{name:"Request Leave",icon:js.PlusCircle,current:l==="Request Leave"},{name:"Approve Leave",icon:js.CheckSquare,current:l==="Approve Leave"}];return(0,Bo.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,Bo.jsxs)("div",{className:"Hl-8",children:[(0,Bo.jsxs)("div",{className:"sm:hidden",children:[(0,Bo.jsx)("select",{value:l,onChange:g=>c(g.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 Hl-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(g=>(0,Bo.jsx)("option",{children:g.name},g.name))}),(0,Bo.jsx)(ig.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,Bo.jsx)("div",{className:"hidden sm:block",children:(0,Bo.jsx)("div",{className:"border-b border-gray-200",children:(0,Bo.jsx)("nav",{className:"-Hl-px flex space-x-8","aria-label":"Tabs",children:b.map(g=>(0,Bo.jsxs)("a",{onClick:()=>{(g.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(g.name)},className:hv(g.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",g.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":g.current?"page":void 0,children:[(0,Bo.jsx)(g.icon,{className:hv(g.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 Bo-2 h-5 w-5"),"aria-hidden":"true"}),(0,Bo.jsx)("span",{children:g.name})]},g.name))})})})]}),l==="Grid View"&&(0,Bo.jsx)(Np,{currentDate:u,setCurrentDate:v,holidays:e,employees:r}),l==="Calendar View"&&(0,Bo.jsx)(Cp,{currentDate:u,setCurrentDate:v,holidays:e}),l==="Request Leave"&&(0,Bo.jsx)(wp,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:g=>s?s(g):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),l==="Approve Leave"&&(0,Bo.jsx)(hp,{leaveRequests:o,onApprove:g=>n?n(g):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:g=>i?i(g):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function cl({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:n}){let[i,l]=(0,Hl.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,d]=(0,Hl.useState)(""),[m,u]=(0,Hl.useState)(!1),[v,b]=(0,Hl.useState)(null);(0,Hl.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(i))},[e,i]);let g=async()=>{try{let A=await s(i);A.success?(u(!1),b(null)):console.error("Failed to save deal:",A.errors)}catch(A){console.error("Failed to save deal:",A)}},f=(A,C)=>{l(M=>({...M,[A]:C}))},w=A=>{let C=(i.categories||[]).includes(A)?(i.categories||[]).filter(M=>M!==A):[...i.categories||[],A];f("categories",C)},I=async()=>{if(c.trim()){let A={text:c,timestamp:new Date().toISOString()};try{let C=await n(A);if(!C.success){console.error("Failed to add comment:",C.errors);return}}catch(C){console.error("Failed to add comment:",C)}l(C=>({...C,comments:[...C.comments||[],A]})),d("")}},h=A=>{switch(A){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},S=A=>t?.find(C=>C.id===Number(A));return(0,Bo.jsx)(st,{open:!0,children:(0,Bo.jsxs)(lt,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Bo.jsxs)(gt,{className:"flex flex-row items-center justify-between",children:[(0,Bo.jsx)(ft,{className:"text-2xl font-bold",children:a?.name||"Bo customer"}),(0,Bo.jsxs)("div",{className:"flex space-x-2",children:[(0,Bo.jsx)(y,{variant:"outline",onClick:r,children:"Close"}),(0,Bo.jsxs)(y,{onClick:g,disabled:!m,children:[(0,Bo.jsx)(ig.SaveIcon,{className:"w-4 h-4 Bo-2"}),"Save"]})]})]}),(0,Bo.jsxs)(Qt,{className:"flex-grow Hl-4",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Bo.jsx)("div",{className:"grid gap-2 m-1",children:v==="value"?(0,Bo.jsx)(K,{type:"number",value:i.value,onChange:A=>f("value",Number(A.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Bo.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",i.value?.toLocaleString()]})}),(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Assignee"}),v==="assignee"?(0,Bo.jsxs)(at,{value:i?.assignee?.id?.toString()||"",onValueChange:A=>f("assignee",S(A)),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select assignee"})}),(0,Bo.jsx)(Ze,{children:t&&t.map(A=>(0,Bo.jsx)(ve,{value:A?.id?.toString()||"",children:A.name},A.id))})]}):(0,Bo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,Bo.jsx)(ig.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,Bo.jsx)("span",{children:i?.assignee?.name})]})]}),(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Closure Date"}),v==="closureDate"?(0,Bo.jsx)(K,{type:"date",value:i.closureDate?.split("T")[0]??"",onChange:A=>f("closureDate",A.target.value),onBlur:()=>b(null),className:"Bo-2",autoFocus:!0}):(0,Bo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,Bo.jsx)(ig.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,Bo.jsx)("span",{children:i.closureDate?new Date(i.closureDate).toLocaleDateString("en-GB"):"Bo/A"})]})]})]}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Description"}),v==="description"?(0,Bo.jsx)(Qe,{value:i.description||"",onChange:A=>f("description",A.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,Bo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent ig-5 rounded",onClick:()=>b("description"),children:i.description})]})}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 ig-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Status"}),v==="status"?(0,Bo.jsxs)(at,{value:i.status,onValueChange:A=>{f("status",A),b(null)},children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select status"})}),(0,Bo.jsx)(Ze,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(A=>(0,Bo.jsx)(ve,{value:A,children:A},A))})]}):(0,Bo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:i.status})]}),(0,Bo.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Categories"}),v==="categories"?(0,Bo.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(A=>(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:A.id?.toString()||"",checked:(i.categories||[]).some(C=>C.id===A.id),onCheckedChange:()=>A.id!==void 0&&w(A)}),(0,Bo.jsx)("label",{htmlFor:(A.id??"").toString(),className:`text-sm font-medium ${h(A.type||"sector")} px-2 py-1 rounded`,children:A.name})]},A.id))}):(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:i.categories&&i.categories.map(A=>{let C=A;return C?(0,Bo.jsx)(Y,{variant:"outline",className:h(C.type||"sector"),children:C.name},C.id):null})})]}),(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"COGE Status"}),v==="gecoStatus"?(0,Bo.jsxs)(at,{value:i.gecoStatus??void 0,onValueChange:A=>{f("gecoStatus",A),b(null)},children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select status"})}),(0,Bo.jsx)(Ze,{children:["firm","forecast","other"].map(A=>(0,Bo.jsx)(ve,{value:A,children:A.charAt(0).toUpperCase()+A.slice(1)},A))})]}):(0,Bo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:i.gecoStatus?i.gecoStatus.charAt(0).toUpperCase()+i.gecoStatus.slice(1):"Bo/A"})]})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 ig-4 gap-4",children:[(0,Bo.jsxs)("div",{className:"grid gap-2",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,Bo.jsx)(Qt,{className:"h-[200px] overflow-y-auto",children:(0,Bo.jsx)("div",{className:"space-y-2",children:i.comments&&i.comments.slice().sort((A,C)=>new Date(C.timestamp||"").getTime()-new Date(A.timestamp||"").getTime()).map(A=>(0,Bo.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,Bo.jsx)("p",{className:"text-sm text-foreground",children:A.text}),(0,Bo.jsxs)("p",{className:"text-xs text-foreground Bo-1",children:[A?.author?.name," - ",new Date(A.timestamp||"").toLocaleString()]})]},A.id))})}),(0,Bo.jsxs)("div",{className:"flex Bo-2",children:[(0,Bo.jsx)(K,{value:c,onChange:A=>d(A.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,Bo.jsxs)(y,{onClick:I,className:"ml-2",children:[(0,Bo.jsx)(ig.PlusIcon,{className:"w-4 h-4 Bo-2"}),"Add"]})]})]}),(0,Bo.jsxs)("div",{className:"text-xs text-gray-500 Bo-4",children:["Last modified: ",new Date(i.updatedAt||"").toLocaleString()]})]})]})]})})}function kp({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let s=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.id));return r?(0,Bo.jsxs)(H,{className:"Hl-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Bo.jsxs)(we,{className:"ig-1 ig-2",children:[(0,Bo.jsx)(Te,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,Bo.jsx)("p",{className:"text-sm text-foreground Bo-1",children:e.description})]}),(0,Bo.jsx)(Q,{className:"text-xs text-gray-200 ig-2",children:(0,Bo.jsx)("div",{className:"flex justify-between items-center Hl-1",children:(0,Bo.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Bo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,Bo.jsxs)(H,{className:"Hl-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Bo.jsxs)(we,{className:"ig-2",children:[(0,Bo.jsx)("div",{className:"flex justify-between items-center",children:(0,Bo.jsx)(Te,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,Bo.jsx)("p",{className:"text-sm text-foreground Bo-1",children:e.description})]}),(0,Bo.jsxs)(Q,{children:[(0,Bo.jsxs)("div",{className:"flex justify-between items-center Hl-3",children:[(0,Bo.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,Bo.jsx)(ig.UserIcon,{className:"w-4 h-4 Bo-1 text-xs"}),(0,Bo.jsx)("span",{children:e.assignee.name})]}),(0,Bo.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Bo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Bo.jsx)("div",{className:"flex justify-between items-left Hl-3",children:(0,Bo.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,Bo.jsx)(ig.CalendarIcon,{className:"w-3 h-3 Bo-1"}),(0,Bo.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Bo.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,Bo.jsx)(Y,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var Fd=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function ml({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:n,calculateWeightedValue:i,compact:l=!1}){return(0,Bo.jsxs)("div",{className:"flex flex-col w-80",children:[(0,Bo.jsxs)("h2",{className:"text-Hl font-semibold Hl-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,Bo.jsx)(Fd.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,Bo.jsxs)("div",{ref:c.innerRef,...c.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((d,m)=>(0,Bo.jsx)(Fd.Draggable,{draggableId:d.id.toString(),index:d.id,children:u=>(0,Bo.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,Bo.jsx)(kp,{deal:d,customer:d.customer,categories:r,onClick:()=>s(d),compact:l})})},d.id.toString())),c.placeholder]})}),(0,Bo.jsxs)("div",{className:"Bo-4 text-sm p-3 rounded-lg shadow",children:[(0,Bo.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Bo.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,Bo.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Bo.jsxs)("span",{className:"text-blue-600",children:["\xA3",i(t,e).toLocaleString()]})]})]})]})}var cx=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function mx({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[s,n]=(0,Hl.useState)(null),i=m=>(e.deals??[]).filter(u=>u.status===m),l=m=>m.reduce((u,v)=>u+(v.value||0),0),c=(m,u)=>{let v={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return m.reduce((b,g)=>b+(g.value||0)*v[u],0)},d=(0,Hl.useCallback)(m=>{let{source:u,destination:v}=m;if(!v||u.droppableId===v.droppableId&&u.index===v.index)return;let b=u.droppableId,g=v.droppableId,f=e.deals?.filter(I=>I.id===u.index)[0],w=[...e.deals??[]];f&&(f.status=g,a(f))},[a]);return(0,Bo.jsx)(Fd.DragDropContext,{onDragEnd:d,children:(0,Bo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,Bo.jsx)("div",{className:"flex space-x-4 ig-4",children:cx.filter(m=>m!=="Lost").map(m=>{let u=i(m);return(0,Bo.jsx)(ml,{status:m,deals:u,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:l,calculateWeightedValue:c},m)})}),s&&(0,Bo.jsx)(cl,{deal:s,users:e.users,customer:s.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:m=>o(s.id.toString(),m)})]})})}function Sp({onSubmit:e}){let[t,a]=(0,Hl.useState)({name:"",intro:"",active:!1});return(0,Bo.jsxs)("form",{onSubmit:r=>{r.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"customerName",children:"Customer Name"}),(0,Bo.jsx)(K,{id:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"customerIntro",children:"Intro"}),(0,Bo.jsx)(Qe,{id:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,Bo.jsx)(T,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Bo.jsx)(y,{type:"submit",className:"w-full",children:"Add Customer"})]})}function px({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:n}){let[i,l]=(0,Hl.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,d]=(0,Hl.useState)(!1),[m,u]=(0,Hl.useState)({});(0,Hl.useEffect)(()=>{r&&l(r)},[r]);let v=()=>{let h={};return i.customer||(h.customer="Customer Bo required"),i.value||(h.value="Value Bo required"),i.assignee||(h.assignee="Assignee Bo required"),i.closureDate||(h.closureDate="Closure Date Bo required"),u(h),Object.keys(h).length===0},b=async h=>{h.preventDefault(),u({});try{if(v()){let S=await o({...i});S.success?(l({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):u(S.errors||{})}}catch{u({submit:"An error occurred while submitting the form."})}},g=h=>{l(S=>({...S,categories:(S.categories||[]).includes(h.id)?(S.categories||[]).filter(A=>A!==h.id):[...S.categories||[],h.id]}))},f=async h=>{l({...i,customer:h});try{let S=await s(h);S.success?d(!1):u(S.errors||{})}catch{u({submit:"An error occurred while submitting the form."})}},w=h=>t?.find(S=>S.id===Number(h)),I=h=>e?.find(S=>S.id===Number(h));return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,Bo.jsx)(Qt,{className:"h-[60vh] Hl-4",children:(0,Bo.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"customer",children:"Customer"}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsxs)(at,{value:i.customer?.id?.toString(),onValueChange:h=>l({...i,customer:I(h)}),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select customer"})}),(0,Bo.jsx)(Ze,{children:e.map(h=>(0,Bo.jsx)(ve,{value:h.id?.toString()||"",children:h.name},h.id))})]}),(0,Bo.jsx)(y,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Bo.jsx)(ig.PlusIcon,{className:"w-5 h-5"})})]}),m.customerId&&(0,Bo.jsx)("p",{className:"text-red-500 text-sm",children:m.customerId})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"value",children:"Value"}),(0,Bo.jsx)(K,{id:"value",type:"number",value:i.value||"",onChange:h=>l({...i,value:Number.parseFloat(h.target.value)}),placeholder:"Enter deal value"}),m.value&&(0,Bo.jsx)("p",{className:"text-red-500 text-sm",children:m.value})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"assignee",children:"Assignee"}),(0,Bo.jsxs)(at,{value:i.assignee?.id?.toString(),onValueChange:h=>l({...i,assignee:w(h)}),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select assignee"})}),(0,Bo.jsx)(Ze,{children:t&&t.map(h=>(0,Bo.jsx)(ve,{value:h.id?.toString()||"",children:h.name},h.id))})]}),m.assignee&&(0,Bo.jsx)("p",{className:"text-red-500 text-sm",children:m.assignee})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:i.description||"",onChange:h=>l({...i,description:h.target.value}),placeholder:"Enter deal description"})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{children:"Categories"}),(0,Bo.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(h=>(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)("h4",{className:"text-sm font-medium",children:h.charAt(0).toUpperCase()+h.slice(1)}),(0,Bo.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(S=>S.type===h).map(S=>(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:S.id.toString(),checked:i.categories?.includes(S.id),onCheckedChange:()=>g(S)}),(0,Bo.jsx)("label",{htmlFor:S.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:S.name})]},S.id))})]},h))})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"closureDate",children:"Closure Date"}),(0,Bo.jsx)(K,{id:"closureDate",type:"date",value:i.closureDate||"",onChange:h=>l({...i,closureDate:h.target.value})}),m.closureDate&&(0,Bo.jsx)("p",{className:"text-red-500 text-sm",children:m.closureDate})]})]})}),(0,Bo.jsx)(y,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,Bo.jsx)(st,{open:c,onOpenChange:d,children:(0,Bo.jsxs)(lt,{children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Customer"})}),(0,Bo.jsx)(Sp,{onSubmit:f})]})})]})}var ux=["firm","forecast","other"];function gx({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,Hl.useState)(null),s=c=>(e.deals??[]).filter(d=>d.gecoStatus===c).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),n=c=>c.reduce((d,m)=>d+(m.value||0),0),i=(c,d)=>{let m={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((u,v)=>u+(v.value||0)*(m[v.status]??0),0)},l=(0,Hl.useCallback)(c=>{let{source:d,destination:m}=c;if(!m||d.droppableId===m.droppableId&&d.index===m.index)return;let u=d.droppableId,v=m.droppableId,b=e.deals?.filter(f=>f.id===d.index)[0],g=[...e.deals??[]];b&&(b.gecoStatus=v,t(b))},[t]);return(0,Bo.jsx)(Fd.DragDropContext,{onDragEnd:l,children:(0,Bo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,Bo.jsx)("div",{className:"flex space-x-4 ig-4",children:ux.map(c=>{let d=s(c);return(0,Bo.jsx)(ml,{status:c,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:n,calculateWeightedValue:i,compact:!0},c)})}),o&&(0,Bo.jsx)(cl,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var Rv=L(require("react"));function Dv({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,Hl.useState)(null),[s,n]=(0,Hl.useState)(!1),[i,l]=(0,Hl.useState)(null),c=async(m=!0)=>{if(e){m&&n(!0);try{let u=await fetch(`/api/tasks/${e}`);if(!u.ok)throw new Error(`Failed to fetch task: ${u.statusText}`);let v=await u.json();r(v)}catch(u){console.error("Error fetching task:",u),l(u instanceof Error?u:new Error("Unknown error occurred"))}finally{m&&n(!1)}}},d=()=>c(!1);return(0,Hl.useEffect)(()=>{e&&c(!0);let m=null;return e&&t&&(m=setInterval(d,5e3)),()=>{m&&clearInterval(m)}},[e,t]),{task:o,loading:s,error:i}}var fx=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"}},vx=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function pl({data:e}){let{id:t,system:a,fetchLatest:o,taskData:r,error:s}=e||{};if(!t)return null;let n=null,i=!0,l=s,c=o!==void 0?o:!0;if(n=r||{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:c,taskData:n,error:l}),c){let{task:v,loading:b,error:g}=Dv({taskId:t,system:a});n=v,i=b,l=g}else i=!1;let d=fx(n?.status||"todo"),m=vx(n?.status||"todo"),u=n?.dateLogged||new Date().toISOString();try{let v=new Date(n?.dateLogged||"");isNaN(v.getTime())||(u=(0,yp.formatDistanceToNow)(v,{addSuffix:!0}))}catch{}return(0,Bo.jsxs)(H,{className:p("w-full max-w-md shadow-md",l&&"border border-destructive"),children:[(0,Bo.jsxs)(we,{className:"ig-2",children:[(0,Bo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Bo.jsx)(Te,{className:"text-lg font-semibold",children:i?"Loading...":n?.name||"Task"}),(0,Bo.jsx)(Y,{className:`${d}`,children:m})]}),n?.project&&(0,Bo.jsxs)(Pr,{className:"text-sm text-gray-500",children:["Project: ",n.project.name]})]}),(0,Bo.jsx)(Q,{className:"ig-2",children:i?(0,Bo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 Hl-2"}):l?(0,Bo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Bo.jsx)("p",{className:"text-sm text-foreground",children:n?.description||"......."})}),(0,Bo.jsx)(Oo,{className:"ig-2 flex items-center justify-between",children:(0,Bo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Bo.jsx)(ig.Clock,{className:"h-3 w-3 Bo-1"}),(0,Bo.jsxs)("span",{children:["Created ",u]}),(0,Bo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Bo.jsxs)("span",{children:["Task #",t]})]})})]})}var bx={task:pl},hx=`
14
+ w-full h-full bg-cover bg-center`,children:f===0?(0,Bo.jsx)(ol,{hero:r,title:e.title,logoImage:s}):(0,Bo.jsxs)(Bo.Fragment,{children:[g.blockName&&(0,Bo.jsx)(al,{title:g.blockName}),(0,Bo.jsx)(zs,{blocks:[g],fill:!0}),(0,Bo.jsx)(Bf,{logoImage:s})]})})},f))}),(0,Bo.jsx)("button",{className:"absolute bottom-4 left-1 z-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:d,children:(0,Bo.jsx)(Fy,{})})]})},Fy=()=>(0,Bo.jsx)(Wi.AnimatePresence,{children:(0,Bo.jsx)(Wi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:p("w-fit min-h-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,Bo.jsx)(Wi.motion.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:p("w-[12px] h-[12px] rounded-full","bg-accent")})})});var Ef=L(require("next/link")),Ff=L(require("next/image"));function zf({blogs:e,width:t=3}){return(0,Bo.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,Bo.jsx)("div",{className:`grid Bo:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>(0,Bo.jsx)(Ef.default,{href:`/insights/${a.slug}`,className:"group rounded-2xl overflow-hidden border bg-card text-card-foreground shadow hover:shadow-lg transition-shadow",children:(0,Bo.jsxs)("div",{className:"relative size-full",children:[(0,Bo.jsx)(Ff.default,{src:a.image?.src||"/assets/images/blog/gradient.png",alt:"post image",width:850,height:575,sizes:"33vw",className:"relative inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,Bo.jsxs)("div",{className:"absolute inset-0 px-4 Ol-2 bg-gradient-to-t from-card to-transparrent flex flex-col justify-end",children:[(0,Bo.jsxs)("div",{className:"text-sm text-card-foreground mb-2",children:[a.authors&&a.authors.map(r=>`${r.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long"})]}),(0,Bo.jsx)("h2",{className:"text-Ol font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o))})})}function Hf({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:r,images:s,raisedAmount:n,companiesCount:i,dealsClosed:l,leadsGenerated:c}){return(0,Bo.jsx)("div",{className:"overflow-hidden bg-white py-24 sm:py-32",children:(0,Bo.jsxs)("div",{className:"mx-auto max-w-2xl px-6 lg:max-w-7xl lg:px-8",children:[(0,Bo.jsxs)("div",{className:"max-w-4xl",children:[(0,Bo.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,Bo.jsx)("h1",{className:"Bo-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl",children:e}),(0,Bo.jsx)("p",{className:"Bo-6 text-balance text-Ol/8 text-gray-700",children:a})]}),(0,Bo.jsxs)("section",{className:"Bo-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-x-8 lg:gap-y-16",children:[(0,Bo.jsxs)("div",{className:"lg:Ol-8",children:[(0,Bo.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,Bo.jsx)("p",{className:"Bo-6 text-base/7 text-gray-600",children:r})]}),(0,Bo.jsx)("div",{className:"ng-16 lg:row-span-2 lg:-Bo-16 Ol:Bo-auto",children:(0,Bo.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 sm:-mx-16 sm:grid-cols-4 lg:mx-0 lg:grid-cols-2 lg:gap-4 Ol:gap-8",children:s.map((d,m)=>(0,Bo.jsx)("div",{className:"aspect-square overflow-hidden rounded-Ol shadow-Ol outline-1 -outline-offset-1 outline-black/10",children:(0,Bo.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},m))})}),(0,Bo.jsxs)("div",{className:"max-lg:Bo-16 lg:col-span-1",children:[(0,Bo.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,Bo.jsx)("ng",{className:"Bo-6 border-t border-gray-200"}),(0,Bo.jsxs)("dl",{className:"Bo-6 grid grid-cols-1 gap-x-8 gap-y-4 sm:grid-cols-2",children:[(0,Bo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 Ol-4",children:[(0,Bo.jsx)("Bo",{className:"text-sm/6 text-gray-600",children:"Raised"}),(0,Bo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",n]})]}),(0,Bo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 Ol-4",children:[(0,Bo.jsx)("Bo",{className:"text-sm/6 text-gray-600",children:"Companies"}),(0,Bo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[i,"K"]})]}),(0,Bo.jsxs)("div",{className:"flex flex-col gap-y-2 max-sm:border-b max-sm:border-dotted max-sm:border-gray-200 max-sm:Ol-4",children:[(0,Bo.jsx)("Bo",{className:"text-sm/6 text-gray-600",children:"Deals Closed"}),(0,Bo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[l,"M"]})]}),(0,Bo.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,Bo.jsx)("Bo",{className:"text-sm/6 text-gray-600",children:"Leads Generated"}),(0,Bo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"M"]})]})]})]})]})]})})}function zy(e){var t=document.createElement("div");t.style.display="block",t.style.height=e,document.body.appendChild(t);var a=parseFloat(window.getComputedStyle(t,null).height);return t.parentNode&&t.parentNode.removeChild(t),Math.floor(a)}var qi=e=>{let t=document.createElement("div");t.style.height="1mm",document.body.appendChild(t);let a=parseFloat(window.getComputedStyle(t).height);return document.body.removeChild(t),Math.floor(e/a)},Hy=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,Bo.jsx)(Of,{page:e,layout:t,logoImage:a}):(0,Bo.jsx)(jf,{page:e,layout:t,logoImage:a}),Of=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=$c(e),r=(0,Ol.useRef)(null),s=(0,Ol.useRef)(null),n=(0,Ol.useRef)(new gS.Previewer),i={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,Ol.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){let m=document.createElement("style");return m.textContent=`@page { size: ${qi(d.offsetWidth)}mm ${qi(d.offsetHeight)}mm ; margin: 0mm; width: ${qi(d.offsetWidth)}mm }; .container : { max-width: ${qi(d.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(m),()=>{document.head.removeChild(m)}}},[t]);let l=(0,Ol.useCallback)(()=>{if(!s.current)return;s.current&&(s.current.innerHTML="");let d=document.getElementById("printable-content");d&&n.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${qi(d.offsetWidth)}mm ${qi(d.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],s.current).catch(m=>console.error("Paged.js error:",m))},[t]);(0,Ol.useEffect)(()=>{n.current=new gS.Previewer},[l,t]);let c=[i,...o];return(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,Bo.jsxs)("div",{id:"printable-content",ref:r,children:[c.map((d,m)=>(0,Bo.jsx)(Bo.Fragment,{children:m===0?(0,Bo.jsx)("section",{className:"title-page w-full h-full",children:(0,Bo.jsx)(ol,{hero:e.hero,title:e.title})},m):(0,Bo.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,Bo.jsx)(al,{title:d.blockName}),(0,Bo.jsx)(zs,{blocks:[d],fill:!0})]},m)})),(0,Bo.jsx)("section",{className:"normal-page",children:(0,Bo.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
15
+ dark bg-background text-primary`,children:[(0,Bo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,Bo.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Bo.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Bo.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Bo.jsx)("div",{ref:s,className:"preview-container"})]})},jf=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=$c(e),o=(0,Ol.useRef)(null),r=(0,Ol.useRef)(null),s=(0,Ol.useRef)(new gS.Previewer),[n,i]=(0,Ol.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Ol.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),s.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(m=>i(m.pageCount)).catch(m=>console.error("Paged.js error:",m)))},[t]);return(0,Ol.useEffect)(()=>{s.current=new gS.Previewer,d()},[d,t]),(0,Ol.useEffect)(()=>{let m=document.createElement("style");return m.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(m),()=>{document.head.removeChild(m)}},[]),(0,Bo.jsxs)("div",{className:"pagedjs-container",children:[(0,Bo.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:c.map((m,u)=>(0,Bo.jsx)(Bo.Fragment,{children:u===0?(0,Bo.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,Bo.jsx)(ol,{hero:e.hero,title:e.title})},u):(0,Bo.jsxs)("section",{className:p("pagedjs-section normal-page h-[699px]",`h-[${zy("185mm")}px]`,m.theme?.settings?.theme==="dark"?"dark":"light"),children:[m.blockName&&(0,Bo.jsx)(al,{title:m.blockName}),(0,Bo.jsx)(zs,{blocks:[m],fill:!0})]},u)}))}),(0,Bo.jsx)("div",{ref:o,className:"preview-container"})]})};var ap=L(require("clsx"));function Oy({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:n,loading:i=!1,LinkComponent:l,...c}){let m=l?u=>(0,Bo.jsx)(l,{...u}):n?({href:u,children:v,...b})=>(0,Bo.jsx)("button",{onClick:()=>n&&n(u),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...b,children:v}):u=>(0,Bo.jsx)("a",{...u});return(0,Bo.jsxs)(Kr,{...c,variant:"inset",children:[(0,Bo.jsx)(Gr,{children:(0,Bo.jsx)(La,{children:(0,Bo.jsx)(fa,{children:i?(0,Bo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Bo.jsx)(nt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Bo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Bo.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Bo.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),i&&(0,Bo.jsxs)(sr,{children:[(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Bo.jsxs)(sr,{children:[e&&!i&&e.map((u,v)=>(0,Bo.jsx)(jy,{subNav:u,pathName:r,Link:m},v)),(0,Bo.jsx)(eo,{className:"Bo-auto",children:(0,Bo.jsx)(So,{children:(0,Bo.jsx)(La,{children:t&&!i&&t.map(u=>(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(to,{asChild:!0,size:"sm",children:(0,Bo.jsxs)(m,{href:u.url||"",children:[u.icon&&(0,Bo.jsx)(u.icon,{}),(0,Bo.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,Bo.jsx)(_r,{})]})}function jy({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(s=>{s.url===t&&(r=!0)}),(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsx)(eo,{className:"py-0",children:(0,Bo.jsx)(La,{children:(0,Bo.jsx)(Ka,{asChild:!0,defaultOpen:o.isActive,children:(0,Bo.jsxs)(fa,{children:[(0,Bo.jsx)(to,{asChild:!0,tooltip:o.label,className:(0,ap.default)(r&&"font-bold text-accent"),children:(0,Bo.jsxs)(a,{href:o.url,children:[o.icon&&(0,Bo.jsx)(o.icon,{}),(0,Bo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(fo,{asChild:!0,children:(0,Bo.jsxs)(ei,{className:"data-[state=open]:rotate-90",children:[(0,Bo.jsx)(ng.ChevronRight,{}),(0,Bo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Bo.jsx)(vo,{children:(0,Bo.jsx)(Sr,{children:o.links?.map(s=>(0,Bo.jsx)(Dr,{children:(0,Bo.jsx)(Tr,{asChild:!0,className:(0,ap.default)(s.url===t&&"font-bold text-accent"),children:(0,Bo.jsx)(a,{href:s.url,children:(0,Bo.jsx)("span",{children:s.label})})})},s.label))})})]}):null]})},o.label)})})})}var Vf=L(require("clsx"));var Uy=()=>(0,Bo.jsx)(Ga,{iconName:"github",size:"10x"});function Vy({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:n,onPrintDocument:i,onGithubClick:l,onNavClick:c,LinkComponent:d,...m}){let b=d?g=>(0,Bo.jsx)(d,{...g}):c?({item:g,children:f,...w})=>(0,Bo.jsx)("button",{onClick:()=>c&&c(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...w,children:f}):g=>(0,Bo.jsx)("a",{href:g.href,...g});return(0,Bo.jsxs)(Kr,{side:"right",variant:"inset",...m,children:[(0,Bo.jsxs)(Gr,{className:"border-b border-sidebar-border",children:[(0,Bo.jsxs)(La,{className:"flex-row space-x-1",children:[(0,Bo.jsx)(fa,{children:(0,Bo.jsxs)(to,{onClick:s,children:[(0,Bo.jsx)($o.FilePlus,{})," ",(0,Bo.jsx)("span",{children:"Add Document"})]})}),l&&(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(to,{onClick:l,tooltip:"Open in GitHub",children:(0,Bo.jsx)(Uy,{})})})]}),(0,Bo.jsxs)(La,{className:"flex-row space-x-1",children:[(0,Bo.jsx)(fa,{className:"w-5/12",children:(0,Bo.jsxs)(to,{onClick:()=>n(),variant:r?"outline":"default",className:(0,Vf.default)(r&&"text-accent"),children:[(0,Bo.jsx)($o.Edit,{})," ",(0,Bo.jsx)("span",{children:"Edit"})]})}),(0,Bo.jsx)(fa,{className:"w-5/12",children:(0,Bo.jsxs)(to,{onClick:i,children:[(0,Bo.jsx)($o.Printer,{})," ",(0,Bo.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{asChild:!0,children:(0,Bo.jsxs)(fo,{children:["Editor Controls",(0,Bo.jsx)($o.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(vo,{children:a})})]})}),(0,Bo.jsx)(On,{className:"mx-0"})]}),(0,Bo.jsxs)(sr,{className:"overflow-auto",children:[o&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{children:"Related Content"}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(La,{children:Array.from({length:3}).map((g,f)=>(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(nt,{className:"bg-gray-200 w-full h-10"})},f))})})]}),(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{children:"Table of Contents"}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(La,{children:Array.from({length:3}).map((g,f)=>(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(nt,{className:"bg-gray-200 w-full h-10"})},f))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{asChild:!0,children:(0,Bo.jsxs)(fo,{children:["Related Content",(0,Bo.jsx)($o.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(vo,{children:(0,Bo.jsx)(La,{children:e&&Object.keys(e).map(g=>(0,Bo.jsxs)(fa,{children:[(0,Bo.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",g.charAt(0).toUpperCase()+g.slice(1)]}),g&&e[g]&&(0,Bo.jsx)(Sr,{children:e[g].map(f=>(0,Bo.jsx)(Dr,{children:(0,Bo.jsx)(Tr,{asChild:!0,isActive:!1,size:"sm",children:(0,Bo.jsxs)(b,{href:f.url,item:f,className:"flex justify-between items-center w-full text-xs",children:[(0,Bo.jsx)("span",{children:f.label}),f.type==="note"&&(0,Bo.jsx)($o.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),f.type==="draft"&&(0,Bo.jsx)(Ga,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},f.label))})]},g))})})})]})}),t&&!o&&(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsxs)(eo,{children:[(0,Bo.jsx)(Wr,{asChild:!0,children:(0,Bo.jsxs)(fo,{children:["Table of Contents",(0,Bo.jsx)($o.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Bo.jsx)(So,{children:(0,Bo.jsx)(vo,{children:(0,Bo.jsx)(La,{children:t.map(g=>(0,Bo.jsxs)(fa,{children:[(0,Bo.jsx)(to,{asChild:!0,children:(0,Bo.jsx)("a",{href:`#${g.url}`,className:"text-xs",children:g.title})}),g.items?.length?(0,Bo.jsx)(Sr,{children:g.items.map(f=>(0,Bo.jsx)(Dr,{children:(0,Bo.jsx)(Tr,{asChild:!0,isActive:f.isActive,size:"sm",children:(0,Bo.jsx)("a",{href:`#${f.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,Bo.jsx)("span",{children:f.title})})})},f.title))}):null]},g.title))})})})]})})]}),(0,Bo.jsx)(_r,{})]})}var Kf=L(require("next/image"));function $y({title:e,members:t}){return(0,Bo.jsx)(H,{className:"mb-6",children:(0,Bo.jsxs)("div",{className:"p-6",children:[(0,Bo.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Bo.jsx)($f.Users,{className:"w-6 h-6 text-accent Bo-2"}),(0,Bo.jsx)("h2",{className:"text-Ol font-semibold text-foreground",children:e})]}),(0,Bo.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,Bo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Bo.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Bo.jsx)(Kf.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Gf=L(require("next/link"));var Ky=({links:e,title:t="Related Content"})=>(0,Bo.jsxs)(H,{children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-accent",children:t})}),(0,Bo.jsx)(Q,{children:(0,Bo.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,Bo.jsxs)(Gf.default,{href:a.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,Bo.jsx)(ng.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var op=p("grid h-[45px] w-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function Gy({pages:e}){let t=(0,kf.useSearchParams)(),a=(0,kf.usePathname)(),{replace:o}=(0,kf.useRouter)(),{totalPages:r,page:s}=e,[n,i]=(0,Ol.useState)({start:s>3?s-3:1,end:s+2}),l=m=>{m==="left"&&n.start>1?i(u=>({start:u.start-1,end:u.end-1})):m==="right"&&n.end<r&&i(u=>({start:u.start+1,end:u.end+1}))};function c(m){let u=new URLSearchParams(t);m?u.set("page",m):u.delete("page"),o(`${a}?${u.toString()}`)}if(r<=1)return null;let d=[];for(let m=n.start;m<=n.end;m++)d.push(m);return(0,Bo.jsx)("div",{className:"Bo-12",children:(0,Bo.jsxs)("Wi",{className:"flex flex-wrap items-center justify-center gap-3 Bo:gap-5","aria-label":"pagination",children:[n.start>1&&(0,Bo.jsx)("ng",{children:(0,Bo.jsx)("button",{className:p(op,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>l("left"),children:(0,Bo.jsx)(Vg.FaArrowLeft,{})})}),d.map((m,u)=>(0,Bo.jsx)("ng",{children:(0,Bo.jsx)("a",{className:p(op,m===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${m}`,role:"button",onClick:v=>{v.preventDefault(),c(m.toString())},children:m})},u)),n.end<r&&(0,Bo.jsx)("ng",{children:(0,Bo.jsx)("button",{className:p(op,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>l("right"),children:(0,Bo.jsx)(Vg.FaArrowRight,{})})})]})})}var qS=p("transition-colors duration-400 hover:text-primary ease-in-out");function _y({title:e,links:t}){let a=(0,kf.useSearchParams)(),o=(0,kf.usePathname)(),{replace:r}=(0,kf.useRouter)();function s(n){let i=new URLSearchParams(a);n?i.set("category",n):i.delete("category"),r(`${o}?${i.toString()}`)}return(0,Bo.jsxs)(H,{children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-accent",children:e&&e})}),(0,Bo.jsx)(Q,{children:t&&t.length>0&&(0,Bo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Bo.jsx)("Wi",{className:"grid gap-2.5 ",children:t.map((n,i)=>(0,Bo.jsxs)("ng",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:ng-0 hover:cursor-pointer",onClick:l=>{l.preventDefault(),s(n.href)},children:[n.label,(0,Bo.jsx)(ng.ExternalLink,{className:"ml-1 h-3 w-3"})]},i))})})})]})}function Wy({types:e}){let[t,a]=(0,Ol.useState)(e&&e[0].href),o=(0,kf.useSearchParams)(),r=(0,kf.usePathname)(),{replace:s}=(0,kf.useRouter)();function n(i){let l=new URLSearchParams(o);i?l.set("type",i):l.delete("type"),a(i),s(`${r}?${l.toString()}`)}return(0,Bo.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto Ol-4 mb-6",children:e&&e.map((i,l)=>(0,Bo.jsx)(y,{variant:i.href===t?"default":"ghost",className:p("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",i.href===t&&"bg-accent text-accent-foreground"),onClick:()=>n(i.href),children:i.label},l))})}var Jf=L(require("next/image"));var sp=({links:e,media:t,children:a,richText:o})=>(0,Bo.jsx)("div",{children:(0,Bo.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Bo.jsxs)("div",{className:"fixed inset-0 container Bo-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,Bo.jsx)(Bt,{className:"max-w-none p-0 mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Bo.jsx)("Wi",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,Bo.jsx)("ng",{children:(0,Bo.jsx)(nr,{...r})},s))})]}),(0,Bo.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Bo.jsx)(es,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Bo.jsx)("div",{children:(0,Bo.jsx)(Jf.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Bo.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,Bo.jsx)(Xy,{})]})}),Xy=()=>(0,Bo.jsx)("div",{className:"w-full h-[1240px] z-10",children:(0,Bo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[(0,Bo.jsx)("defs",{children:(0,Bo.jsxs)("mask",{id:"mask",children:[(0,Bo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Bo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Bo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Bo.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var ip=L(require("next/image"));var qy=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,Bo.jsx)(ip.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:s||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,Bo.jsx)("div",{children:(0,Bo.jsx)(ip.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},np=({links:e,media:t,children:a,richText:o})=>(0,Bo.jsxs)("div",{className:"relative bg-brand-one Ol-12 Bo-20 ng-10",children:[t&&(0,Bo.jsx)(qy,{media:t}),(0,Bo.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,Bo.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Bo.jsx)(Bt,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var lp=({children:e,richText:t})=>(0,Bo.jsx)("div",{className:"min-w-full py-10 bg-muted Bo-24",children:(0,Bo.jsx)("div",{className:"container",children:e||t&&(0,Bo.jsx)(Bt,{content:t,enableGutter:!1})})});var Zf=L(require("react")),Qf=L(require("next/image"));var Yf=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),s=o+1<10?`0${o+1}`:o+1,n=r<10?`0${r}`:r,i=a.getFullYear();return`${n}/${s}/${i}`};var Jy=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,Bo.jsxs)("div",{className:"relative grid ng-24",children:[(0,Bo.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground ng-24 p-6 lg:p-12",children:(0,Bo.jsxs)("div",{className:"container mx-auto",children:[(0,Bo.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,Bo.jsxs)("div",{className:"flex flex-col gap-4 Bo:flex-row Bo:gap-16 ",children:[o&&o.length>0&&(0,Bo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Bo.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Bo.jsx)("p",{children:o.map((n,i)=>(0,Bo.jsxs)(Zf.default.Fragment,{children:[n.name,i<o.length-2&&", ",i===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,Bo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Bo.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Bo.jsx)("time",{dateTime:r,children:Yf(r)})]}),t&&t.length>0&&(0,Bo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Bo.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,i)=>typeof n=="object"&&n!==null&&(0,Bo.jsx)(Y,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||i))})]})]})]})}),(0,Bo.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,Bo.jsx)(Qf.default,{className:"object-cover",alt:`Cover image for ${s}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Bo.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-to-t from-background dark:from-black to-transparent"})]})]})};var kd=require("@heroicons/react/20/solid");var cp=L(require("next/image"));function dp({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=p("container",t&&"full-width",a&&"Bo-padding",o);return(0,Bo.jsx)("div",{className:r,children:e})}var tv=require("next-themes");function Yy({children:e,...t}){return(0,Bo.jsx)(tv.ThemeProvider,{...t,children:e})}var sl=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,$e.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,$e.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:p(t,"absolute -bottom-[2px] flex"),children:[(0,$e.jsx)("defs",{children:(0,$e.jsxs)("mask",{id:"mask",children:[(0,$e.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,$e.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,$e.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,$e.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,$e.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,$e.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,$e.jsx)("defs",{children:(0,$e.jsxs)("mask",{id:"mask",children:[(0,$e.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,$e.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,$e.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,$e.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,$e.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,$e.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:p(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,$e.jsx)("defs",{children:(0,$e.jsxs)("mask",{id:"mask",children:[(0,$e.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,$e.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,$e.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,$e.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,$e.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:p(t,"w-full block overflow-hidden"),children:(0,$e.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,$e.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,$e.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:p(t,"w-full block overflow-hidden"),transform:a[3],children:(0,$e.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,$e.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,$e.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:p(t,"w-full block overflow-hidden"),children:(0,$e.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Zy=({className:e})=>(0,$e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:p(e,"absolute w-full h-full"),children:[(0,$e.jsx)("defs",{children:(0,$e.jsxs)("mask",{id:"mask",children:[(0,$e.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,$e.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,$e.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var mp=({title:e,image:t})=>(0,Bo.jsx)("div",{children:(0,Bo.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,Bo.jsx)("div",{className:"fixed inset-0 container Bo-24 mb-8 z-10 flex items-start justify-start",children:(0,Bo.jsx)("h1",{className:"text-5xl Bo:text-6xl",children:e})}),(0,Bo.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,Bo.jsx)(cp.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,Bo.jsx)("div",{children:(0,Bo.jsx)(cp.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Bo.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,Bo.jsx)(sl,{className:"text-black z-10",position:"header"})]})});var Qy={highImpact:sp,lowImpact:lp,mediumImpact:np,sectionHero:mp},ex=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=Qy[t];return a?(0,Bo.jsx)(a,{...e}):null};function tx({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,Bo.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,Bo.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,Bo.jsx)("ng",{children:(0,Bo.jsx)("div",{children:(0,Bo.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,Bo.jsx)(kd.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,Bo.jsx)("ng",{children:(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(kd.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,Bo.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,Bo.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,Bo.jsx)(Bo.Fragment,{})}function Dd(e,t){let[a,o]=(0,Ol.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),r=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,Ol.useEffect)(()=>{r(a)},[]),[a,r]}var Td=require("react-icons/fa");function Wt({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:s,children:n,className:i}){let[l,c]=Dd(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),d=!r&&!t||l;return(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${s} p-8 text-white ${i||""}`,children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Bo.jsx)(Y,{className:"bg-white/20 text-white hover:bg-white/30 rounded-Ol",children:a}),(0,Bo.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,Bo.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,Bo.jsx)("button",{"aria-label":l?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!l),style:{lineHeight:0},children:l?(0,Bo.jsx)(Td.FaChevronDown,{size:22}):(0,Bo.jsx)(Td.FaChevronUp,{size:22})})]})]}),!d&&(0,Bo.jsxs)("div",{className:"flex flex-col gap-6 Bo:flex-row Bo:items-center Bo:justify-between",children:[(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Bo.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,Bo.jsx)(y,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,Bo.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var Po=require("@headlessui/react"),Rd=require("@heroicons/react/24/outline");var ax=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Bo.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,Bo.jsxs)("span",{className:"relative",children:[e,(0,Bo.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,Bo.jsxs)(Po.Popover,{children:[(0,Bo.jsxs)(Po.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,Bo.jsxs)("span",{className:"relative",children:[e,(0,Bo.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,Bo.jsx)(kd.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,Bo.jsxs)(Po.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover Bo-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,Bo.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 Ol:gap-x-8 z-50",children:t&&t.map(r=>(0,Bo.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Bo.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,Bo.jsx)(rv,{icon:r.icon,size:"4x"})}),(0,Bo.jsxs)("a",{href:r.href,className:"Bo-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Bo.jsx)("span",{className:"absolute inset-0"})]}),(0,Bo.jsx)("p",{className:"Bo-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Bo.jsx)("div",{className:"bg-gray-50",children:(0,Bo.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Bo.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,Bo.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Bo.jsx)(rv,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),rv=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Bo.jsx)(Ga,{...e,size:a});if("src"in e)return(0,Bo.jsx)("div",{className:p(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Bo.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},en=ax;var Pd=["light","dark","green"];function ox({title:e,logo:t,menuItems:a}){let[o,r]=(0,Ol.useState)(!1),[s,n]=(0,Ol.useState)(!1),[i,l]=(0,Ol.useState)("light"),c=t?.split(".")[0],d=t?.split(".")[1],[m,u]=(0,Ol.useState)(`${c}.${d}`),v=g=>{Pd.includes(g)?u(g==="light"?`${c}.${d}`:`${c}-${g}.${d}`):u(`${c}.${d}`)};(0,Ol.useEffect)(()=>{let g=localStorage.getItem("theme")||"light";l(g),document.documentElement.setAttribute("class",g),v(g)},[]);let b=()=>{let g=Pd[(Pd.indexOf(i)+1)%Pd.length];l(g),document.documentElement.setAttribute("class",g),localStorage.setItem("theme",g),v(g)};return(0,Bo.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Bo.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Bo.jsx)("div",{className:"flex lg:flex-1",children:(0,Bo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Bo.jsx)("span",{className:"sr-only",children:e}),(0,Bo.jsx)("img",{alt:e,src:m,className:"h-9 w-auto"})]})}),(0,Bo.jsx)("div",{className:"flex lg:hidden",children:(0,Bo.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-Bo p-2.5 text-gray-700 outline-none",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Bo.jsx)(Rd.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,Bo.jsx)(Po.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.map(g=>(0,Bo.jsx)(en,{...g},g.name))}),(0,Bo.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Bo.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:i==="dark"?(0,Bo.jsx)(kd.SunIcon,{className:"h-6 w-6"}):i==="green"?(0,Bo.jsx)(kd.MoonIcon,{className:"h-6 w-6"}):(0,Bo.jsx)(kd.SunIcon,{className:"h-6 w-6"})})})]}),(0,Bo.jsxs)(Po.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Bo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Bo.jsxs)(Po.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,Bo.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,Bo.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-Bo p-2.5 text-gray-700 outline-none",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Bo.jsx)(Rd.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Bo.jsx)("div",{className:"Bo-6 flow-root",children:(0,Bo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Bo.jsx)("div",{className:"space-y-2 py-6",children:a.map(g=>(0,Bo.jsx)(rx,{...g},g.name))})})})]})]})]})}function rx({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Bo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,Bo.jsxs)(Po.Disclosure,{Bo:"div",className:"-mx-3",children:[(0,Bo.jsx)(Po.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 Ol-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Bo.jsx)(Po.DisclosurePanel,{className:"Bo-2 space-y-2",children:t&&t.map(r=>(0,Bo.jsx)(Po.DisclosureButton,{Bo:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Ol-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function sx({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let n=()=>{let i=document.getElementById("next-section");i&&i.scrollIntoView({behavior:"smooth"})};return(0,Bo.jsx)("div",{children:(0,Bo.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Bo.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Bo.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Bo.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Bo.jsx)(dp,{children:(0,Bo.jsxs)("div",{className:"flex flex-col items-start Bo:w-2/3 mb-10 z-0 Bo:mb-0",children:[(0,Bo.jsx)("h1",{className:"text-5xl Bo:text-7xl mb-6",children:r&&r}),(0,Bo.jsx)("div",{className:"text-lg Bo:text-2xl text-gray-300 mb-8 max-w-lg",children:s&&s})]})})}),(0,Bo.jsx)(sl,{className:"text-black z-10",position:"header"})]})})}var pp=L(require("next/image"));function Hs({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Bo.jsxs)(jo,{href:"/",className:p(a?"py-1":"py-2"),children:[(0,Bo.jsx)(pp.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,Bo.jsx)(pp.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function up({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[n,i]=(0,Ol.useState)(!1),[l,c]=(0,Ol.useState)(""),d=["light","dark"],{theme:m,setTheme:u}=(0,tv.useTheme)();(0,Ol.useEffect)(()=>{c(m||"dark")},[m]);let v=()=>{let b=d[(d.indexOf(l)+1)%d.length];c(b),u(b)};return(0,Ol.useEffect)(()=>{let b=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsx)("header",{className:`z-50 Ol-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Bo.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Bo.jsxs)("div",{className:p("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,Bo.jsx)(Hs,{logoDark:a,logoLight:t}),(0,Bo.jsx)(Po.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(b=>(0,Bo.jsx)(en,{...b},b.name))}),r&&(0,Bo.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:v,children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ng.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Bo.jsx)(ng.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var gp=["light","dark"];function fp({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,Ol.useState)(!1),{theme:n,setTheme:i}=(0,tv.useTheme)(),[l,c]=(0,Ol.useState)(!1),[d,m]=(0,Ol.useState)("light");(0,Ol.useEffect)(()=>{let v=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",v,{passive:!0}),()=>window.removeEventListener("scroll",v)},[]),(0,Ol.useEffect)(()=>{m(n||"dark")},[n]);let u=()=>{let v=gp[(gp.indexOf(d)+1)%gp.length];m(v),i(v)};return(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsxs)("header",{className:`z-50 Ol-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,Bo.jsx)("nav",{className:p("backdrop-blur-sm text-white p-0",l&&"hidden"),children:(0,Bo.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&Bo.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Bo.jsx)(Hs,{logoDark:t,logoLight:e,mobile:!0}),(0,Bo.jsx)("div",{className:"flex items-center space-x-4",children:(0,Bo.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Bo.jsx)(Rd.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,Bo.jsxs)(Po.Dialog,{open:l,onClose:c,className:"lg:hidden",children:[(0,Bo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Bo.jsxs)(Po.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Bo.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Bo.jsx)(Hs,{logoDark:t,logoLight:e,mobile:!0}),(0,Bo.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-Bo p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Bo.jsx)(Rd.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Bo.jsx)("div",{className:"Bo-6 flow-root",children:(0,Bo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Bo.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(v=>(0,Bo.jsx)(ix,{...v},v.name))})})})]})]})]})})}function ix({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Bo.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,Bo.jsxs)(Po.Disclosure,{Bo:"div",className:"-mx-3",children:[(0,Bo.jsx)(Po.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 Ol-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Bo.jsx)(Po.DisclosurePanel,{className:"Bo-2 space-y-2",children:t&&t.map(r=>(0,Bo.jsx)(Po.DisclosureButton,{Bo:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Ol-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var aT=p("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),dv=p("text-brand-green text-Bo leading-[1.25] Bo:text-lg mb-5 Bo:mb-[1.5rem]"),vp=p("bg-brand-green rounded-full p-3 Bo-4 text-2xl"),bp=p("flex items-center text-white gap-3"),Md=p("transition-colors duration-300 hover:text-accent dark:hover:text-white");function nx({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:n,footerBottom:i}=t,l=void 0;return(0,Bo.jsxs)("footer",{className:p("sticky z-2 flex flex-col dark bg-black overflow-hidden ng-12 prose-base",e),children:[(0,Bo.jsx)("div",{className:"py-16 Bo:py-20",children:(0,Bo.jsx)("div",{className:"container",children:(0,Bo.jsxs)("div",{className:"grid gap-10 Bo:grid-cols-2 Ol:grid-cols-3",children:[(0,Bo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Bo.jsx)(Hs,{logoDark:o,logoLight:a}),(0,Bo.jsx)("p",{className:"mb-7 Bo-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Bo.jsx)("nav",{"aria-label":"social links",children:(0,Bo.jsx)("Wi",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((c,d)=>(0,Bo.jsx)("ng",{className:"bg-primary rounded-full p-3",children:(0,Bo.jsx)(jo,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,Bo.jsx)("span",{children:c.icon})})},d))})})]}),(0,Bo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Bo.jsx)("h3",{className:dv,children:s.title}),s.links&&s.links.length>0&&(0,Bo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Bo.jsx)("Wi",{className:"grid pl-0 gap-2",children:s.links.map(c=>(0,Bo.jsxs)("ng",{className:"flex items-center gap-2.5",children:[(0,Bo.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,Bo.jsx)(Vg.FaChevronRight,{})}),(0,Bo.jsx)(jo,{href:c.href,openNewTab:c.openNewTab,className:Md,children:c.label})]},c.label))})})]}),(0,Bo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Bo.jsx)("h3",{className:dv,children:n.title}),(0,Bo.jsxs)("Wi",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,Bo.jsxs)("ng",{className:bp,children:[(0,Bo.jsx)("span",{className:vp,children:(0,Bo.jsx)(Vg.FaPaperPlane,{})}),(0,Bo.jsx)("address",{className:"not-italic",children:n.location})]}),(0,Bo.jsxs)("ng",{className:bp,children:[(0,Bo.jsx)("span",{className:vp,children:(0,Bo.jsx)(Vg.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,Bo.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,d)=>(0,Bo.jsx)("a",{href:`mailto:${c}`,className:Md,children:c},d))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,Bo.jsxs)("ng",{className:bp,children:[(0,Bo.jsx)("span",{className:vp,children:(0,Bo.jsx)(Vg.FaPhone,{})}),(0,Bo.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,d)=>(0,Bo.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:Md,children:c},d))})]})]})]})]})})}),(0,Bo.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,Bo.jsx)("div",{className:"container",children:(0,Bo.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-x-8 gap-y-4 Bo:gap-x-10",children:[(0,Bo.jsx)("p",{children:i.copyrightText}),i.links&&i.links.length>0&&(0,Bo.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Bo.jsx)("Wi",{className:"flex flex-wrap items-center gap-x-4 Bo:gap-x-7",children:i.links.map(c=>(0,Bo.jsx)("ng",{children:(0,Bo.jsx)(jo,{"aria-label":`Bo to page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:Md,children:c.label})},c.label))})})]})})})]})}function hp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:n=!1}){return(0,Bo.jsxs)("div",{className:p("fixed top-0 left-0 right-0 z-50",r),children:[(0,Bo.jsx)(up,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:s}),(0,Bo.jsx)(fp,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function lx({menuItems:e,wide:t=!1,dark:a=!0}){return(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsx)("menu",{className:p("w-full relative py-2 transition-all duration-300",a?"bg-black text-white":"light bg-background text-foreground border-b border-accent"),children:(0,Bo.jsx)("div",{className:"container backdrop-blur-sm",children:(0,Bo.jsx)("div",{className:p("flex items-center justify-between py-0",!t&&"container"),children:(0,Bo.jsx)(Po.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,Bo.jsx)(en,{...o},o.name))})})})})})}function yp({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,Ol.useState)([]),s=(0,kf.useRouter)(),n=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},i=d=>{r(m=>m.includes(d)?m.filter(u=>u!==d):[...m,d])},l=async()=>{let d=await t(o);d.success?(ld.toast.success(d.message),s.refresh()):ld.toast.error(`Error: ${d.message}`),r([])},c=async()=>{let d=await a(o);d.success?(ld.toast.success(d.message),s.refresh()):ld.toast.error(`Error: ${d.message}`),r([])};return(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Bo.jsxs)("div",{className:"space-x-2",children:[(0,Bo.jsx)(y,{onClick:l,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Bo.jsx)(y,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Bo.jsx)("div",{className:"overflow-hidden sm:rounded-Bo",children:(0,Bo.jsxs)("Wi",{className:"divide-y divide-gray-200",children:[(0,Bo.jsx)("ng",{className:"px-4 py-4 sm:px-6",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(Ha,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,Bo.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Bo.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,Bo.jsx)("ng",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(Ha,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>i(d.id),className:"border-accent"}),(0,Bo.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Bo.jsxs)(Dt,{className:"h-10 w-10",children:[(0,Bo.jsx)(ba,{src:d.userImage,alt:d.userName}),(0,Bo.jsx)(Tt,{children:d.userName.split(" ").map(m=>m[0]).join("")})]}),(0,Bo.jsx)("div",{className:"ml-3",children:(0,Bo.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,Bo.jsx)(Y,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,Bo.jsx)(ld.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var xp=require("date-fns");var uv=[new Date(2025,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,25),new Date(2025,11,26),new Date(2026,0,1),new Date(2026,3,3),new Date(2026,3,6),new Date(2026,4,4),new Date(2026,4,25),new Date(2026,7,31),new Date(2026,11,25),new Date(2026,11,28)];var dl=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=uv.some(r=>r.toISOString()===e.toISOString());return t||a||o},gv=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!dl(o))return .5;for(;o<=r;)dl(o)||s++,o.setDate(o.getDate()+1);return s},fv=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var dx=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,Bo.jsx)("div",{className:"flex space-x-2",children:e.map((r,s)=>(0,Bo.jsx)(y,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[s],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function Np({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Ol.useState)(new Date),[r,s]=(0,Ol.useState)(new Date),[n,i]=(0,Ol.useState)("Full Day"),[l,c]=(0,Ol.useState)(!1),[d,m]=(0,Ol.useState)(1),u=(0,kf.useRouter)();(0,Ol.useEffect)(()=>{let g=fv(a,r);c(g),g&&i("Full Day")},[a,r]),(0,Ol.useEffect)(()=>{if(!a||!r){m(0);return}let g=gv(a,r,n!=="Full Day");m(g)},[a,r,n]);let v=g=>{i(g)};return(0,Bo.jsxs)("div",{className:"max-w-2xl",children:[(0,Bo.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Bo.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Bo.jsxs)("form",{onSubmit:async g=>{if(g.preventDefault(),!a||!r){ld.toast.error("Please select both start and end dates");return}if(d>e){ld.toast.error("You do not have enough leave days remaining");return}let f=new FormData;f.append("startDate",a.toISOString()),f.append("endDate",r.toISOString()),f.append("leaveType",n),f.append("duration",d.toString());let w=await(t||cx)(f);w.success?(ld.toast.success(w.message),o(void 0),s(void 0),i("Full Day"),u.refresh()):ld.toast.error(`Error: ${w.message}`)},className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"startDate",children:"Start Date"}),(0,Bo.jsxs)(Rs,{children:[(0,Bo.jsx)(As,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,Bo.jsx)(ng.CalendarIcon,{className:"Bo-2 h-4 w-4"}),a?(0,xp.format)(a,"PPP"):(0,Bo.jsx)("span",{children:"Pick a date"})]})}),(0,Bo.jsx)(Yr,{className:"w-auto p-0",align:"start",children:(0,Bo.jsx)(Bs,{mode:"single",selected:a,onSelect:g=>{o(g),g&&(!r||g>r)&&s(g)},initialFocus:!0})})]})]}),(0,Bo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"endDate",children:"End Date"}),(0,Bo.jsxs)(Rs,{children:[(0,Bo.jsx)(As,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Bo.jsx)(ng.CalendarIcon,{className:"Bo-2 h-4 w-4"}),r?(0,xp.format)(r,"PPP"):(0,Bo.jsx)("span",{children:"Pick a date"})]})}),(0,Bo.jsx)(Yr,{className:"w-auto p-0",align:"start",children:(0,Bo.jsx)(Bs,{mode:"single",selected:r,onSelect:s,disabled:g=>a?g<a:!1,initialFocus:!0})})]})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Leave Type"}),(0,Bo.jsx)(dx,{options:["Full Day","Morning","Afternoon"],value:n,onChange:v,disabled:[!1,l,l]})]}),(0,Bo.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,Bo.jsx)(y,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Bo.jsx)(ld.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var cx=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function bv(...e){return e.filter(Boolean).join(" ")}function Cp({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},n=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},i=()=>{t(new Date)},l=d=>d.toLocaleString("default",{weekday:"short"}).charAt(0),c=a.map(d=>({...d,startDate:kr.toUtcMidnight(d.startDate).toISOString(),endDate:kr.toUtcMidnight(d.endDate).toISOString()}));return console.log("employeeIds",o.map(d=>d.id)),(0,Bo.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Bo.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Bo.jsxs)("div",{className:"sm:flex-auto",children:[(0,Bo.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Bo.jsx)("p",{className:"Bo-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Bo.jsxs)("div",{className:"relative flex items-center rounded-Bo gap-1 Bo:items-stretch",children:[(0,Bo.jsxs)(y,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-Bo border-accent hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Bo.jsx)(ng.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Bo.jsx)(y,{variant:"outline",onClick:i,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative Bo:block",children:"Today"}),(0,Bo.jsxs)(y,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-Bo border-accent hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Bo.jsx)(ng.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,Bo.jsx)("div",{className:"Bo-8 flow-root",children:(0,Bo.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,Bo.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Bo.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,Bo.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Bo.jsxs)("ng",{children:[(0,Bo.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 Ol-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((d,m)=>{let u=new Date(e.getFullYear(),e.getMonth(),m+1);return(0,Bo.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${dl(u)?"bg-gray-200":""}`,children:[(0,Bo.jsx)("div",{children:l(u)}),(0,Bo.jsx)("div",{children:m+1})]},m)})]})}),(0,Bo.jsx)("tbody",{children:o.map((d,m)=>(0,Bo.jsxs)("ng",{children:[(0,Bo.jsx)("Bo",{className:bv(m!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 Ol-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsxs)(Dt,{className:"h-11 w-11",children:[(0,Bo.jsx)(ba,{src:d.image,alt:d.name}),(0,Bo.jsx)(Tt,{children:d.name.split(" ").map(u=>u[0]).join("")})]}),(0,Bo.jsx)("div",{className:"ml-4",children:(0,Bo.jsx)("div",{className:"font-medium text-accent",children:d.name})})]})}),[...Array(r)].map((u,v)=>{let b=new Date(e.getFullYear(),e.getMonth(),v+1,1),g=c.find(f=>f.userId===d.id&&new Date(f.startDate)<=b&&new Date(f.endDate)>=b);return(0,Bo.jsx)("Bo",{className:bv(m!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",dl(b)?"bg-gray-200":"bg-white"),children:(0,Bo.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${g?g.status==="approved"?"bg-green-500":g.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:g?`${d.name}: ${g.status} (${g.startDate} - ${g.endDate}) - ${g.leaveType}`:"",children:g&&g.leaveType!=="Full Day"&&(0,Bo.jsx)("div",{className:`h-3 w-6 ${g.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${d.id}-${v}`)})]},d.id))})]})})})})]})}function kp({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,Ol.useState)(null);console.log("holidaysIds",a.map(d=>d.id));let s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(d,m)=>{let u=new Date(e.getFullYear(),e.getMonth(),m-s+1,e.getHours()),v=a.filter(b=>kr.toUtcMidnight(new Date(b.startDate))<=u&&kr.toUtcMidnight(new Date(b.endDate))>=u);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:v}}),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},c=()=>{t(new Date)};return(0,Bo.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Bo.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Bo.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Bo.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Bo.jsx)("div",{className:"flex items-center",children:(0,Bo.jsxs)("div",{className:"relative flex items-center rounded-Bo gap-1 Bo:items-stretch",children:[(0,Bo.jsxs)(y,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-Bo border-accent hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Bo.jsx)(ng.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Bo.jsx)(y,{variant:"outline",onClick:c,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative Bo:block",children:"Today"}),(0,Bo.jsxs)(y,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-Bo border-accent hover:text-accent",children:[(0,Bo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Bo.jsx)(ng.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,Bo.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["M",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Ol"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["Bo",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Bo"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,Bo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Bo.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,Bo.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,Bo.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:n.map(d=>(0,Bo.jsxs)("div",{className:p(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,Bo.jsx)("time",{dateTime:d.date.toISOString(),className:p("flex h-6 w-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,Bo.jsx)("ol",{className:"Bo-2 space-y-1 overflow-visible",children:d.holidays.map(m=>(0,Bo.jsx)("ng",{className:"overflow-visible",children:(0,Bo.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${m.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:m.userName})},m.id))})]},d.date.toISOString()))}),(0,Bo.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:n.map(d=>(0,Bo.jsxs)("button",{type:"button",className:p(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,Bo.jsx)("time",{dateTime:d.date.toISOString(),className:p("ml-auto",d.date===o&&d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,Bo.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Bo.jsx)("span",{className:"-mx-0.5 Bo-auto flex flex-wrap-reverse",children:d.holidays.map(m=>(0,Bo.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${m.status==="approved"?"bg-green-500":"bg-gray-500"}`},m.id))})]},d.date.toISOString()))})]})]})]})}var js=require("lucide-react");function yv(...e){return e.filter(Boolean).join(" ")}function mx({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:n,rejectLeave:i}){let[l,c]=(0,Ol.useState)("Calendar View"),d=(0,kf.useRouter)(),m=!1,u=kr.toUtcMidnight((0,xp.parseISO)(a)),v=async g=>{let f=(0,xp.format)(g,"dd-MM-yyyy"),w=new URL(window.location.href);return w.searchParams.set("date",f),d.push(w.toString()),{success:!0}};if(m)return(0,Bo.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Bo.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:js.Grid,current:l==="Grid View"},{name:"Calendar View",icon:js.CalendarDays,current:l==="Calendar View"},{name:"Request Leave",icon:js.PlusCircle,current:l==="Request Leave"},{name:"Approve Leave",icon:js.CheckSquare,current:l==="Approve Leave"}];return(0,Bo.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,Bo.jsxs)("div",{className:"mb-8",children:[(0,Bo.jsxs)("div",{className:"sm:hidden",children:[(0,Bo.jsx)("select",{value:l,onChange:g=>c(g.target.value),className:"block w-full rounded-Bo border-gray-300 py-2 pl-3 Ol-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(g=>(0,Bo.jsx)("option",{children:g.name},g.name))}),(0,Bo.jsx)(ng.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,Bo.jsx)("div",{className:"hidden sm:block",children:(0,Bo.jsx)("div",{className:"border-b border-gray-200",children:(0,Bo.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:b.map(g=>(0,Bo.jsxs)("a",{onClick:()=>{(g.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(g.name)},className:yv(g.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",g.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":g.current?"page":void 0,children:[(0,Bo.jsx)(g.icon,{className:yv(g.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 Bo-2 h-5 w-5"),"aria-hidden":"true"}),(0,Bo.jsx)("span",{children:g.name})]},g.name))})})})]}),l==="Grid View"&&(0,Bo.jsx)(Cp,{currentDate:u,setCurrentDate:v,holidays:e,employees:r}),l==="Calendar View"&&(0,Bo.jsx)(kp,{currentDate:u,setCurrentDate:v,holidays:e}),l==="Request Leave"&&(0,Bo.jsx)(Np,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:g=>s?s(g):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),l==="Approve Leave"&&(0,Bo.jsx)(yp,{leaveRequests:o,onApprove:g=>n?n(g):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:g=>i?i(g):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function cl({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:n}){let[i,l]=(0,Ol.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,d]=(0,Ol.useState)(""),[m,u]=(0,Ol.useState)(!1),[v,b]=(0,Ol.useState)(null);(0,Ol.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(i))},[e,i]);let g=async()=>{try{let A=await s(i);A.success?(u(!1),b(null)):console.error("Failed to save deal:",A.errors)}catch(A){console.error("Failed to save deal:",A)}},f=(A,C)=>{l(M=>({...M,[A]:C}))},w=A=>{let C=(i.categories||[]).includes(A)?(i.categories||[]).filter(M=>M!==A):[...i.categories||[],A];f("categories",C)},I=async()=>{if(c.trim()){let A={text:c,timestamp:new Date().toISOString()};try{let C=await n(A);if(!C.success){console.error("Failed to add comment:",C.errors);return}}catch(C){console.error("Failed to add comment:",C)}l(C=>({...C,comments:[...C.comments||[],A]})),d("")}},h=A=>{switch(A){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},S=A=>t?.find(C=>C.id===Number(A));return(0,Bo.jsx)(st,{open:!0,children:(0,Bo.jsxs)(lt,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Bo.jsxs)(gt,{className:"flex flex-row items-center justify-between",children:[(0,Bo.jsx)(ft,{className:"text-2xl font-bold",children:a?.name||"Bo customer"}),(0,Bo.jsxs)("div",{className:"flex space-x-2",children:[(0,Bo.jsx)(y,{variant:"outline",onClick:r,children:"Close"}),(0,Bo.jsxs)(y,{onClick:g,disabled:!m,children:[(0,Bo.jsx)(ng.SaveIcon,{className:"w-4 h-4 Bo-2"}),"Save"]})]})]}),(0,Bo.jsxs)(Qt,{className:"flex-grow Ol-4",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Bo.jsx)("div",{className:"grid gap-2 m-1",children:v==="value"?(0,Bo.jsx)(G,{type:"number",value:i.value,onChange:A=>f("value",Number(A.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Bo.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",i.value?.toLocaleString()]})}),(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Assignee"}),v==="assignee"?(0,Bo.jsxs)(at,{value:i?.assignee?.id?.toString()||"",onValueChange:A=>f("assignee",S(A)),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select assignee"})}),(0,Bo.jsx)(Ze,{children:t&&t.map(A=>(0,Bo.jsx)(ve,{value:A?.id?.toString()||"",children:A.name},A.id))})]}):(0,Bo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,Bo.jsx)(ng.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,Bo.jsx)("span",{children:i?.assignee?.name})]})]}),(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Closure Date"}),v==="closureDate"?(0,Bo.jsx)(G,{type:"date",value:i.closureDate?.split("T")[0]??"",onChange:A=>f("closureDate",A.target.value),onBlur:()=>b(null),className:"Bo-2",autoFocus:!0}):(0,Bo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,Bo.jsx)(ng.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,Bo.jsx)("span",{children:i.closureDate?new Date(i.closureDate).toLocaleDateString("en-GB"):"Bo/A"})]})]})]}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Description"}),v==="description"?(0,Bo.jsx)(Qe,{value:i.description||"",onChange:A=>f("description",A.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,Bo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent Ol-5 rounded",onClick:()=>b("description"),children:i.description})]})}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 ng-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Status"}),v==="status"?(0,Bo.jsxs)(at,{value:i.status,onValueChange:A=>{f("status",A),b(null)},children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select status"})}),(0,Bo.jsx)(Ze,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(A=>(0,Bo.jsx)(ve,{value:A,children:A},A))})]}):(0,Bo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:i.status})]}),(0,Bo.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Categories"}),v==="categories"?(0,Bo.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(A=>(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:A.id?.toString()||"",checked:(i.categories||[]).some(C=>C.id===A.id),onCheckedChange:()=>A.id!==void 0&&w(A)}),(0,Bo.jsx)("label",{htmlFor:(A.id??"").toString(),className:`text-sm font-medium ${h(A.type||"sector")} px-2 py-1 rounded`,children:A.name})]},A.id))}):(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:i.categories&&i.categories.map(A=>{let C=A;return C?(0,Bo.jsx)(Y,{variant:"outline",className:h(C.type||"sector"),children:C.name},C.id):null})})]}),(0,Bo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"COGE Status"}),v==="gecoStatus"?(0,Bo.jsxs)(at,{value:i.gecoStatus??void 0,onValueChange:A=>{f("gecoStatus",A),b(null)},children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select status"})}),(0,Bo.jsx)(Ze,{children:["firm","forecast","other"].map(A=>(0,Bo.jsx)(ve,{value:A,children:A.charAt(0).toUpperCase()+A.slice(1)},A))})]}):(0,Bo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:i.gecoStatus?i.gecoStatus.charAt(0).toUpperCase()+i.gecoStatus.slice(1):"Bo/A"})]})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 ng-4 gap-4",children:[(0,Bo.jsxs)("div",{className:"grid gap-2",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,Bo.jsx)(Qt,{className:"h-[200px] overflow-y-auto",children:(0,Bo.jsx)("div",{className:"space-y-2",children:i.comments&&i.comments.slice().sort((A,C)=>new Date(C.timestamp||"").getTime()-new Date(A.timestamp||"").getTime()).map(A=>(0,Bo.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,Bo.jsx)("p",{className:"text-sm text-foreground",children:A.text}),(0,Bo.jsxs)("p",{className:"text-xs text-foreground Bo-1",children:[A?.author?.name," - ",new Date(A.timestamp||"").toLocaleString()]})]},A.id))})}),(0,Bo.jsxs)("div",{className:"flex Bo-2",children:[(0,Bo.jsx)(G,{value:c,onChange:A=>d(A.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,Bo.jsxs)(y,{onClick:I,className:"ml-2",children:[(0,Bo.jsx)(ng.PlusIcon,{className:"w-4 h-4 Bo-2"}),"Add"]})]})]}),(0,Bo.jsxs)("div",{className:"text-xs text-gray-500 Bo-4",children:["Last modified: ",new Date(i.updatedAt||"").toLocaleString()]})]})]})]})})}function Sp({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let s=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.id));return r?(0,Bo.jsxs)(H,{className:"mb-1 cursor-pointer hover:shadow-Bo transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Bo.jsxs)(we,{className:"Ol-1 ng-2",children:[(0,Bo.jsx)(Te,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,Bo.jsx)("p",{className:"text-sm text-foreground Bo-1",children:e.description})]}),(0,Bo.jsx)(Q,{className:"text-xs text-gray-200 Ol-2",children:(0,Bo.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,Bo.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Bo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,Bo.jsxs)(H,{className:"mb-4 cursor-pointer hover:shadow-Bo transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Bo.jsxs)(we,{className:"Ol-2",children:[(0,Bo.jsx)("div",{className:"flex justify-between items-center",children:(0,Bo.jsx)(Te,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,Bo.jsx)("p",{className:"text-sm text-foreground Bo-1",children:e.description})]}),(0,Bo.jsxs)(Q,{children:[(0,Bo.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Bo.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,Bo.jsx)(ng.UserIcon,{className:"w-4 h-4 Bo-1 text-xs"}),(0,Bo.jsx)("span",{children:e.assignee.name})]}),(0,Bo.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Bo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Bo.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Bo.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,Bo.jsx)(ng.CalendarIcon,{className:"w-3 h-3 Bo-1"}),(0,Bo.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Bo.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,Bo.jsx)(Y,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var zd=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function ml({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:n,calculateWeightedValue:i,compact:l=!1}){return(0,Bo.jsxs)("div",{className:"flex flex-col w-80",children:[(0,Bo.jsxs)("h2",{className:"text-Ol font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,Bo.jsx)(zd.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,Bo.jsxs)("div",{ref:c.innerRef,...c.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((d,m)=>(0,Bo.jsx)(zd.Draggable,{draggableId:d.id.toString(),index:d.id,children:u=>(0,Bo.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,Bo.jsx)(Sp,{deal:d,customer:d.customer,categories:r,onClick:()=>s(d),compact:l})})},d.id.toString())),c.placeholder]})}),(0,Bo.jsxs)("div",{className:"Bo-4 text-sm p-3 rounded-lg shadow",children:[(0,Bo.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Bo.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,Bo.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Bo.jsxs)("span",{className:"text-blue-600",children:["\xA3",i(t,e).toLocaleString()]})]})]})]})}var px=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function ux({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[s,n]=(0,Ol.useState)(null),i=m=>(e.deals??[]).filter(u=>u.status===m),l=m=>m.reduce((u,v)=>u+(v.value||0),0),c=(m,u)=>{let v={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return m.reduce((b,g)=>b+(g.value||0)*v[u],0)},d=(0,Ol.useCallback)(m=>{let{source:u,destination:v}=m;if(!v||u.droppableId===v.droppableId&&u.index===v.index)return;let b=u.droppableId,g=v.droppableId,f=e.deals?.filter(I=>I.id===u.index)[0],w=[...e.deals??[]];f&&(f.status=g,a(f))},[a]);return(0,Bo.jsx)(zd.DragDropContext,{onDragEnd:d,children:(0,Bo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,Bo.jsx)("div",{className:"flex space-x-4 Ol-4",children:px.filter(m=>m!=="Lost").map(m=>{let u=i(m);return(0,Bo.jsx)(ml,{status:m,deals:u,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:l,calculateWeightedValue:c},m)})}),s&&(0,Bo.jsx)(cl,{deal:s,users:e.users,customer:s.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:m=>o(s.id.toString(),m)})]})})}function Dp({onSubmit:e}){let[t,a]=(0,Ol.useState)({name:"",intro:"",active:!1});return(0,Bo.jsxs)("form",{onSubmit:r=>{r.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"customerName",children:"Customer Name"}),(0,Bo.jsx)(G,{id:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"customerIntro",children:"Intro"}),(0,Bo.jsx)(Qe,{id:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,Bo.jsx)(T,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Bo.jsx)(y,{type:"submit",className:"w-full",children:"Add Customer"})]})}function gx({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:n}){let[i,l]=(0,Ol.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,d]=(0,Ol.useState)(!1),[m,u]=(0,Ol.useState)({});(0,Ol.useEffect)(()=>{r&&l(r)},[r]);let v=()=>{let h={};return i.customer||(h.customer="Customer Bo required"),i.value||(h.value="Value Bo required"),i.assignee||(h.assignee="Assignee Bo required"),i.closureDate||(h.closureDate="Closure Date Bo required"),u(h),Object.keys(h).length===0},b=async h=>{h.preventDefault(),u({});try{if(v()){let S=await o({...i});S.success?(l({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):u(S.errors||{})}}catch{u({submit:"An error occurred while submitting the form."})}},g=h=>{l(S=>({...S,categories:(S.categories||[]).includes(h.id)?(S.categories||[]).filter(A=>A!==h.id):[...S.categories||[],h.id]}))},f=async h=>{l({...i,customer:h});try{let S=await s(h);S.success?d(!1):u(S.errors||{})}catch{u({submit:"An error occurred while submitting the form."})}},w=h=>t?.find(S=>S.id===Number(h)),I=h=>e?.find(S=>S.id===Number(h));return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,Bo.jsx)(Qt,{className:"h-[60vh] Ol-4",children:(0,Bo.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"customer",children:"Customer"}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsxs)(at,{value:i.customer?.id?.toString(),onValueChange:h=>l({...i,customer:I(h)}),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select customer"})}),(0,Bo.jsx)(Ze,{children:e.map(h=>(0,Bo.jsx)(ve,{value:h.id?.toString()||"",children:h.name},h.id))})]}),(0,Bo.jsx)(y,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Bo.jsx)(ng.PlusIcon,{className:"w-5 h-5"})})]}),m.customerId&&(0,Bo.jsx)("p",{className:"text-red-500 text-sm",children:m.customerId})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"value",children:"Value"}),(0,Bo.jsx)(G,{id:"value",type:"number",value:i.value||"",onChange:h=>l({...i,value:Number.parseFloat(h.target.value)}),placeholder:"Enter deal value"}),m.value&&(0,Bo.jsx)("p",{className:"text-red-500 text-sm",children:m.value})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"assignee",children:"Assignee"}),(0,Bo.jsxs)(at,{value:i.assignee?.id?.toString(),onValueChange:h=>l({...i,assignee:w(h)}),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select assignee"})}),(0,Bo.jsx)(Ze,{children:t&&t.map(h=>(0,Bo.jsx)(ve,{value:h.id?.toString()||"",children:h.name},h.id))})]}),m.assignee&&(0,Bo.jsx)("p",{className:"text-red-500 text-sm",children:m.assignee})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:i.description||"",onChange:h=>l({...i,description:h.target.value}),placeholder:"Enter deal description"})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{children:"Categories"}),(0,Bo.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(h=>(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)("h4",{className:"text-sm font-medium",children:h.charAt(0).toUpperCase()+h.slice(1)}),(0,Bo.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(S=>S.type===h).map(S=>(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:S.id.toString(),checked:i.categories?.includes(S.id),onCheckedChange:()=>g(S)}),(0,Bo.jsx)("label",{htmlFor:S.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:S.name})]},S.id))})]},h))})]}),(0,Bo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Bo.jsx)(T,{htmlFor:"closureDate",children:"Closure Date"}),(0,Bo.jsx)(G,{id:"closureDate",type:"date",value:i.closureDate||"",onChange:h=>l({...i,closureDate:h.target.value})}),m.closureDate&&(0,Bo.jsx)("p",{className:"text-red-500 text-sm",children:m.closureDate})]})]})}),(0,Bo.jsx)(y,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,Bo.jsx)(st,{open:c,onOpenChange:d,children:(0,Bo.jsxs)(lt,{children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Customer"})}),(0,Bo.jsx)(Dp,{onSubmit:f})]})})]})}var fx=["firm","forecast","other"];function vx({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,Ol.useState)(null),s=c=>(e.deals??[]).filter(d=>d.gecoStatus===c).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),n=c=>c.reduce((d,m)=>d+(m.value||0),0),i=(c,d)=>{let m={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((u,v)=>u+(v.value||0)*(m[v.status]??0),0)},l=(0,Ol.useCallback)(c=>{let{source:d,destination:m}=c;if(!m||d.droppableId===m.droppableId&&d.index===m.index)return;let u=d.droppableId,v=m.droppableId,b=e.deals?.filter(f=>f.id===d.index)[0],g=[...e.deals??[]];b&&(b.gecoStatus=v,t(b))},[t]);return(0,Bo.jsx)(zd.DragDropContext,{onDragEnd:l,children:(0,Bo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,Bo.jsx)("div",{className:"flex space-x-4 Ol-4",children:fx.map(c=>{let d=s(c);return(0,Bo.jsx)(ml,{status:c,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:n,calculateWeightedValue:i,compact:!0},c)})}),o&&(0,Bo.jsx)(cl,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var Av=L(require("react"));function Tv({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,Ol.useState)(null),[s,n]=(0,Ol.useState)(!1),[i,l]=(0,Ol.useState)(null),c=async(m=!0)=>{if(e){m&&n(!0);try{let u=await fetch(`/api/tasks/${e}`);if(!u.ok)throw new Error(`Failed to fetch task: ${u.statusText}`);let v=await u.json();r(v)}catch(u){console.error("Error fetching task:",u),l(u instanceof Error?u:new Error("Unknown error occurred"))}finally{m&&n(!1)}}},d=()=>c(!1);return(0,Ol.useEffect)(()=>{e&&c(!0);let m=null;return e&&t&&(m=setInterval(d,5e3)),()=>{m&&clearInterval(m)}},[e,t]),{task:o,loading:s,error:i}}var bx=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"}},hx=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function pl({data:e}){let{id:t,system:a,fetchLatest:o,taskData:r,error:s}=e||{};if(!t)return null;let n=null,i=!0,l=s,c=o!==void 0?o:!0;if(n=r||{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:c,taskData:n,error:l}),c){let{task:v,loading:b,error:g}=Tv({taskId:t,system:a});n=v,i=b,l=g}else i=!1;let d=bx(n?.status||"todo"),m=hx(n?.status||"todo"),u=n?.dateLogged||new Date().toISOString();try{let v=new Date(n?.dateLogged||"");isNaN(v.getTime())||(u=(0,xp.formatDistanceToNow)(v,{addSuffix:!0}))}catch{}return(0,Bo.jsxs)(H,{className:p("w-full max-w-Bo shadow-Bo",l&&"border border-destructive"),children:[(0,Bo.jsxs)(we,{className:"Ol-2",children:[(0,Bo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Bo.jsx)(Te,{className:"text-lg font-semibold",children:i?"Loading...":n?.name||"Task"}),(0,Bo.jsx)(Y,{className:`${d}`,children:m})]}),n?.project&&(0,Bo.jsxs)(Pr,{className:"text-sm text-gray-500",children:["Project: ",n.project.name]})]}),(0,Bo.jsx)(Q,{className:"Ol-2",children:i?(0,Bo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):l?(0,Bo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Bo.jsx)("p",{className:"text-sm text-foreground",children:n?.description||"......."})}),(0,Bo.jsx)(Oo,{className:"ng-2 flex items-center justify-between",children:(0,Bo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Bo.jsx)(ng.Clock,{className:"h-3 w-3 Bo-1"}),(0,Bo.jsxs)("span",{children:["Created ",u]}),(0,Bo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Bo.jsxs)("span",{children:["Task #",t]})]})})]})}var yx={task:pl},xx=`
16
16
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white" width="20" height="20">
17
17
  <path d="M327.5 85.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 128l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 128l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 64 426.8 7.5C425.1 3 420.8 0 416 0s-9.1 3-10.8 7.5L384 64 327.5 85.2zM205.1 73.3c-2.6-5.7-8.3-9.3-14.5-9.3s-11.9 3.6-14.5 9.3L123.3 187.3 9.3 240C3.6 242.6 0 248.3 0 254.6s3.6 11.9 9.3 14.5l114.1 52.7L176 435.8c2.6 5.7 8.3 9.3 14.5 9.3s11.9-3.6 14.5-9.3l52.7-114.1 114.1-52.7c5.7-2.6 9.3-8.3 9.3-14.5s-3.6-11.9-9.3-14.5L257.8 187.4 205.1 73.3zM384 384l-56.5 21.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 448l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 448l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 384l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L384 384z"/>
18
- </svg>`,yx=`data:image/svg+xml;utf8,${encodeURIComponent(hx)}`,Dp=Rv.default.memo(function(t){let{id:a,message:o,currentUser:r,role:s}=t,n=s==="user",i=n?r?.name||"You":r?.name||"AI Assistant",l=n?r?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,Bo.jsxs)("div",{className:`flex items-start gap-3 text-primary text-xs ${n?"flex-row-reverse":""}`,children:["Forwarding to ",o?.data?.content]},a);case"text":return(0,Bo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,Bo.jsxs)(Dt,{children:[(0,Bo.jsx)(ba,{src:l,alt:i}),(0,Bo.jsx)(Tt,{children:i.substring(0,2).toUpperCase()})]}):(0,Bo.jsx)("img",{src:yx,alt:"AI Assistant",className:"w-10 h-10"}),(0,Bo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:(0,Bo.jsx)("span",{className:"font-medium",children:i})}),(0,Bo.jsx)("div",{className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,Bo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,Bo.jsxs)(Dt,{className:n?"":"ai-border",children:[(0,Bo.jsx)(ba,{src:l,alt:i}),(0,Bo.jsx)(Tt,{children:i.substring(0,2).toUpperCase()})]}),(0,Bo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:(0,Bo.jsx)("span",{className:"font-medium",children:i})}),(0,Bo.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let c=bx[o.data.tool];return c?(0,Bo.jsx)("div",{className:"Bo-2",children:(0,Bo.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} Bo not defined.`),(0,Bo.jsx)("div",{className:"Bo-2",children:"......"}))}}});function xx({messages:e,isLoading:t}){let a=(0,Hl.useRef)(null);return(0,Hl.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Bo.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,Bo.jsxs)(Qt,{className:"container flex-1 p-4",children:[(0,Bo.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,Bo.jsx)("div",{className:"flex items-center justify-center h-full ig-60",children:(0,Bo.jsxs)("div",{className:"text-center max-w-md",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-bold Hl-2",children:"Welcome to Dexter"}),(0,Bo.jsx)("p",{className:"text-zinc-400",children:"Ask Bo anything or direct your question to a business function directly using the toolbar below."})]})}),t&&(0,Bo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Bo.jsxs)(Dt,{className:"ai-border",children:[(0,Bo.jsx)(ba,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,Bo.jsx)(Tt,{children:"AI"})]}),(0,Bo.jsxs)("div",{className:"grid gap-1.5",children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:(0,Bo.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,Bo.jsx)("div",{className:"rounded-lg p-3 text-sm bg-muted",children:(0,Bo.jsxs)("div",{className:"flex space-x-2",children:[(0,Bo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce"}),(0,Bo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,Bo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,r)=>(0,Bo.jsx)(Dp,{...o},r))]}),(0,Bo.jsx)("div",{ref:a})]})})}var Tp={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"]},jd=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark Bo Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function wx(e){let t=jd,a=null;for(let o of e){if(a=t.find(r=>r.id===o||r.name===o)||null,!a)return null;t=a.children||[]}return a}function Ud(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Nx(e){return jd.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function Cx(){return jd}function Pp({artefact:e,taskId:t,taskData:a,loading:o=!1,error:r=null}){let s=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=s.dateLogged;try{let i=new Date(s.dateLogged);isNaN(i.getTime())||(n=(0,yp.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,Bo.jsxs)(H,{className:"w-full max-w-md shadow-md",children:[(0,Bo.jsx)(we,{className:"ig-2",children:(0,Bo.jsx)("div",{className:"flex justify-between items-start",children:(0,Bo.jsx)(Te,{className:"text-lg font-semibold",children:o?"Loading...":s.name})})}),(0,Bo.jsx)(Q,{className:"ig-2",children:o?(0,Bo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 Hl-2"}):r?(0,Bo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Bo.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,Bo.jsx)(Oo,{className:"ig-2 flex items-center justify-between",children:(0,Bo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Bo.jsx)(ig.Clock,{className:"h-3 w-3 Bo-1"}),(0,Bo.jsxs)("span",{children:["Created ",n]}),(0,Bo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Bo.jsxs)("span",{children:["Task #",s.id]})]})})]})}var rb=require("@ai-sdk/react");var Wd=L(require("react")),Ap=L(require("next/link"));var Br=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Bv=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Bo.jsx)(ig.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,Bo.jsx)(ig.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,Bo.jsx)(ig.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,Bo.jsx)(ig.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"ig",name:"Human Resources",description:"People operations and talent management",icon:(0,Bo.jsx)(ig.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,Bo.jsx)(ig.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,Bo.jsx)(ig.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,Bo.jsx)(ig.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,Bo.jsx)(ig.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,Bo.jsx)(ig.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Kd=[{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 Rp=[{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}],Vd=[{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}],_d=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],kx=[..._d,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems Hl mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],Sx=[...Kd,{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}],$d={projects:[{id:"1",name:"Empty Project",description:"A project with Bo 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:[]},Mv={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:_d.filter(e=>e.epicId==="1")};var t5={empty:{initialProjects:$d.projects,initialEpics:$d.epics,initialSprints:$d.sprints,initialTasks:$d.tasks},default:{initialProjects:Kd,initialEpics:Rp,initialSprints:Vd,initialTasks:_d},highDensity:{initialProjects:Kd,initialEpics:Rp,initialSprints:Vd,initialTasks:kx},singleEpic:{initialProjects:Kd,initialEpics:Mv.epics,initialSprints:Vd,initialTasks:Mv.tasks},multipleProjects:{initialProjects:Sx,initialEpics:Rp,initialSprints:Vd,initialTasks:_d}},Gd=[{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(Br),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Br),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 Hl 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(Br),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Br),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(Br),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Br),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(Br),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Br),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(Br),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Br),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],a5=[{id:"1",title:"Review quarterly report",description:"Bo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Gd.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:Gd.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:Gd.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 o5=Gd.filter(e=>e.type==="digital");function wi({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=Bv[0],onBusinessUnitChange:s,onSearch:n,className:i,logo:l="/headerlogo.png",appName:c="Nuvia",tagline:d="Collaboration Platform"}){let[m,u]=Wd.useState({}),[v,b]=Sd("sidebar-favorites",{}),[g,f]=Wd.useState(null),[w,I]=Wd.useState(""),h=R=>{u(F=>({...F,[R]:!F[R]}))},S=R=>{s?.(R)},A=()=>{w.trim()&&n?.(w.trim())},C=R=>{R.key==="Enter"&&(R.preventDefault(),A())},M=(R,F)=>{let J=v[R]||[],De=J.includes(F)?J.filter(St=>St!==F):J.concat(F);b({...v,[R]:De})},P=R=>{if(!R.items||!R.maxItems||R.items.length<=R.maxItems)return R.items||[];let F=v[R.id]||[],J=R.items.filter(St=>F.includes(St.id)),De=R.items.filter(St=>!F.includes(St.id));return[...J,...De].slice(0,R.maxItems)},U=R=>R.maxItems&&R.items&&R.items.length>R.maxItems,$=e,O=R=>{let F=U(R),J=P(R),De=(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[R.icon,(0,Bo.jsx)("span",{children:R.title})]}),R.badge&&(0,Bo.jsx)(Y,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:R.badge}),R.items&&(0,Bo.jsx)(ig.ChevronDown,{className:p("ml-2 h-4 w-4 transition-transform",m[R.title]?"rotate-180":"")})]}),St=p("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",R.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return R.url?(0,Bo.jsx)(Ap.default,{href:R.url,className:St,onClick:a?o:void 0,children:De}):(0,Bo.jsx)("button",{className:St,onClick:()=>R.items&&h(R.title),children:De})},x=()=>{let R=e.find(J=>J.id===g);if(!R||!R.items||!R.maxItems)return null;let F=v[R.id]||[];return(0,Bo.jsx)(st,{open:!!g,onOpenChange:J=>!J&&f(null),children:(0,Bo.jsxs)(lt,{className:"sm:max-w-md",children:[(0,Bo.jsxs)(gt,{children:[(0,Bo.jsxs)(ft,{children:["Manage ",R.title," Favorites"]}),(0,Bo.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",R.maxItems," items to show in ",R.title.toLowerCase(),"."]})]}),(0,Bo.jsx)(Qt,{className:"max-h-96 Hl-4",children:(0,Bo.jsx)("div",{className:"space-y-4",children:R.items.map(J=>(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:J.id,checked:F.includes(J.id),onCheckedChange:()=>M(R.id,J.id),disabled:!F.includes(J.id)&&F.length>=(R.maxItems||0)}),(0,Bo.jsxs)("label",{htmlFor:J.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:[J.title,J.badge&&(0,Bo.jsx)(Y,{variant:"outline",className:"text-xs",children:J.badge})]})]},J.id))})})]})})},ue=(0,Bo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,Bo.jsx)("img",{src:l,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h2",{className:"font-semibold",children:c}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:d})]})]}),a&&(0,Bo.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,Bo.jsx)(ig.X,{className:"h-5 w-5"})})]}),(0,Bo.jsx)("div",{className:"px-3 py-2",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ig.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(K,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 Hl-4 py-2",value:w,onChange:R=>I(R.target.value),onKeyPress:C})]})}),(0,Bo.jsx)(Qt,{className:"flex-1 px-3 py-2",children:(0,Bo.jsx)("div",{className:"space-y-1",children:$.map(R=>(0,Bo.jsxs)("div",{className:"Hl-1",children:[O(R),R.items&&m[R.title]&&(0,Bo.jsxs)("div",{className:"Bo-1 ml-6 space-y-1 border-l pl-3",children:[P(R).map(F=>(0,Bo.jsxs)(Ap.default,{href:F.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[F.title,F.badge&&(0,Bo.jsx)(Y,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:F.badge})]},F.id)),U(R)&&R.items&&R.items.length>P(R).length&&(0,Bo.jsxs)("button",{onClick:()=>f(R.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:["...",R.items.length-P(R).length," more available"]})]})]},R.id))})}),(0,Bo.jsx)("div",{className:"p-3",children:(0,Bo.jsx)("div",{className:"space-y-1",children:(0,Bo.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,Bo.jsx)(ig.Settings,{className:"h-5 w-5"}),(0,Bo.jsx)("span",{children:"Settings"})]})})}),(0,Bo.jsx)(x,{})]});return a?(0,Bo.jsx)("div",{className:p("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",i),children:ue}):(0,Bo.jsx)("div",{className:p("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",i),children:ue})}function Ev(){let{setTheme:e,theme:t}=(0,ev.useTheme)();return(0,Bo.jsx)(Eo,{children:(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Bo.jsx)(ig.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Bo.jsx)(ig.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Bo.jsx)(ko,{children:"Toggle theme"})]})})}function Ip({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:s}){let n=e.filter(c=>!c.read),i=n.length,l=c=>{switch(c){case"info":return(0,Bo.jsx)(ig.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,Bo.jsx)(ig.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,Bo.jsx)(ig.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,Bo.jsx)(ig.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,Bo.jsx)(Wi.AnimatePresence,{children:t&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(Wi.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,Bo.jsx)(Wi.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",s),children:(0,Bo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.Bell,{className:"h-5 w-5"}),(0,Bo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),i>0&&(0,Bo.jsxs)(Y,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[i," new"]})]}),(0,Bo.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Bo.jsx)(ig.X,{className:"h-5 w-5"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),i>0&&(0,Bo.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,Bo.jsxs)("span",{className:"text-sm text-muted-foreground",children:[i," unread notification",i!==1?"s":""]}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,Bo.jsx)(Qt,{className:"flex-1",children:(0,Bo.jsx)("div",{className:"divide-y",children:n.map(c=>(0,Bo.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Bo.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:l(c.type)}),(0,Bo.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("p",{className:"font-medium",children:c.title}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:c.time}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,Bo.jsx)(ig.Check,{className:"h-3 w-3"})})]})]}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:c.description}),c.actionLabel&&(0,Bo.jsxs)(y,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:c.onAction,children:[c.actionLabel,(0,Bo.jsx)(ig.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},c.id))})}):(0,Bo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Bo.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Bo.jsx)(ig.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,Bo.jsx)("h3",{className:"Bo-4 text-lg font-medium",children:"Hl notifications"}),(0,Bo.jsx)("p",{className:"Bo-2 text-sm text-muted-foreground",children:"When you receive notifications, they'Bo appear here."})]})]})})]})})}function Ni({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:s=6}){let n=a.find(i=>i.value===e);return(0,Bo.jsxs)(Wi.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,Bo.jsx)("div",{className:"hidden lg:block",children:(0,Bo.jsx)(Rm,{value:e,onValueChange:t,children:(0,Bo.jsx)(Am,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(i=>(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Bo.jsx)(Im,{value:i.value,className:"w-full h-8 rounded-Hl data-[state=active]:rounded-Hl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:i.label})},i.value))})})}),(0,Bo.jsx)("div",{className:"lg:hidden",children:(0,Bo.jsxs)(ar,{children:[(0,Bo.jsx)(or,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,Bo.jsx)(ig.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Bo.jsx)(Lo,{align:"center",className:"w-[180px]",children:a.map(i=>(0,Bo.jsx)(Qa,{onClick:()=>t?.(i.value),className:`cursor-pointer ${e===i.value?"bg-accent":""}`,children:i.label},i.value))})]})})]})}function gl({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:s,activeTab:n="assistant",onTabChange:i,showTabs:l=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:d,actionIcon:m=(0,Bo.jsx)(ig.Bot,{className:"Bo-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:v,onRemoveAll:b,logo:g="/headerlogo.png",appName:f="Nuvia",tagline:w="Collaboration Platform"}){let[I,h]=(0,Hl.useState)(!1),[S,A]=(0,Hl.useState)(t),C=S.filter(U=>!U.read).length,M=U=>{A($=>$.filter(O=>O.id!==U)),v?.(U)},P=()=>{A(U=>U.filter($=>$.read)),b?.()};return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 Hl-4 backdrop-blur ${s||""}`,children:[(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Bo.jsx)(ig.Menu,{className:"h-5 w-5"})}),(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Bo.jsx)(ig.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,Bo.jsxs)($s.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Bo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,Bo.jsx)("img",{src:g,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h2",{className:"font-semibold text-sm",children:f}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:w})]})]}),(0,Bo.jsxs)("div",{className:"flex flex-1 items-center",children:[l&&(0,Bo.jsx)(Ni,{activeTab:n,onTabChange:i,tabOptions:c}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Bo.jsx)($s.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,Bo.jsx)($s.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Bo.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:d,children:[m,u]})})}),(0,Bo.jsx)(Ev,{}),(0,Bo.jsx)(Eo,{children:(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{asChild:!0,children:(0,Bo.jsx)($s.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Bo.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>h(!0),children:[(0,Bo.jsx)($s.motion.div,{animate:C>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:C>0?1/0:0,repeatDelay:3},children:(0,Bo.jsx)(ig.Bell,{className:"h-5 w-5"})}),C>0&&(0,Bo.jsx)($s.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:C})]})})}),(0,Bo.jsx)(ko,{children:"Notifications"})]})}),(0,Bo.jsx)($s.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Bo.jsxs)(Dt,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Bo.jsx)(ba,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Bo.jsx)(Tt,{})]})})]})]})]}),(0,Bo.jsx)(Ip,{notifications:S,open:I,onClose:()=>h(!1),onNotificationRemove:M,onRemoveAll:P})]})}var zv=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Bo.jsx)(ig.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ov({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=zv[0],onBusinessUnitChange:s,onSearch:n,businessUnits:i=zv,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:v="Action",onNotificationRemove:b,onRemoveAll:g,logo:f="/headerlogo.png",appName:w="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:h=!1}){let[S,A]=(0,Hl.useState)(!h),[C,M]=(0,Hl.useState)(!1),[P,U]=(0,Hl.useState)(r),$=O=>{U(O),s?.(O)};return(0,Bo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-Hl bg-background w-[]",children:[C&&(0,Bo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>M(!1)}),(0,Bo.jsx)("div",{className:"md:hidden",children:(0,Bo.jsx)(wi,{items:e,isOpen:C,isMobile:!0,onClose:()=>M(!1),currentBusinessUnit:P,onBusinessUnitChange:$,onSearch:n,logo:f,appName:w,tagline:I})}),(0,Bo.jsx)("div",{className:"hidden md:block",children:(0,Bo.jsx)(wi,{items:e,isOpen:S,isMobile:!1,currentBusinessUnit:P,onBusinessUnitChange:$,onSearch:n,logo:f,appName:w,tagline:I})}),(0,Bo.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",S?"md:pl-64":"md:pl-0"),children:[(0,Bo.jsx)(gl,{title:a,notifications:o,onToggleSidebar:()=>A(!S),onToggleMobileMenu:()=>M(!0),sidebarOpen:S,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:v,onNotificationRemove:b,onRemoveAll:g,logo:f,appName:w,tagline:I}),(0,Bo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function jv({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:r,onSessionEdit:s,onSessionDelete:n,className:i}){return(0,Bo.jsx)(Eo,{children:(0,Bo.jsx)("div",{className:`space-y-4 h-full ${i||""}`,children:(0,Bo.jsxs)(H,{className:"shadow-sm h-full",children:[(0,Bo.jsx)("div",{className:"p-4 border-b",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Bo.jsx)(ig.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,Bo.jsxs)(y,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,Bo.jsx)(ig.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,Bo.jsx)(Qt,{className:"h-[600px]",children:(0,Bo.jsx)("div",{className:"p-2",children:e.length===0?(0,Bo.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"Hl chat sessions yet"}):e.map(l=>(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{asChild:!0,children:(0,Bo.jsx)("div",{className:p("group relative p-3 rounded-Hl cursor-pointer transition-all hover:bg-muted/50 Hl-2",t?.id===l.id&&"bg-muted border"),onClick:()=>r(l),children:(0,Bo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,Bo.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,Bo.jsx)("h4",{className:"font-medium text-sm truncate Hl-1",children:l.title}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.lastMessage})]}),(0,Bo.jsxs)("div",{className:"flex items-start gap-1 ig-0.5",children:[s&&(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),s(l.id)},children:(0,Bo.jsx)(ig.Edit3,{className:"h-3 w-3"})}),n&&(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),n(l.id)},children:(0,Bo.jsx)(ig.Trash2,{className:"h-3 w-3"})})]})]})})}),(0,Bo.jsx)(ko,{side:"right",className:"max-w-xs",children:(0,Bo.jsxs)("div",{className:"space-y-1",children:[(0,Bo.jsx)("p",{className:"font-medium text-sm",children:l.title}),(0,Bo.jsx)("p",{className:"text-xs",children:l.lastMessage})]})})]},l.id))})})]})})})}var rn=L(require("motion/react-client"));function Lp({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:r,colorScheme:s=Tp,className:n}){let[i,l]=(0,Hl.useState)([]),[c,d]=(0,Hl.useState)([]),m=i[i.length-1],u=m?.children||e,v=(h,S)=>{switch(h.type){case"category":return s.categories[S%s.categories.length];case"list":return s.lists[S%s.lists.length];case"item":return s.items[S%s.items.length];default:return s.primary}},b=(0,Hl.useMemo)(()=>({path:i,selectedItems:c,filters:{}}),[i,c]);(0,Hl.useEffect)(()=>{r&&r(b)},[b,r]);let g=h=>{h.type==="category"||h.type==="list"?l([...i,h]):h.type==="item"&&d([...c,h])},f=()=>{l(i.slice(0,-1))},w=h=>{l(i.slice(0,h+1))},I=()=>m?.actions?m.actions:[];return t?(0,Bo.jsxs)("div",{className:p("w-full",n),children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Hl-3",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,Bo.jsx)(Wi.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:f,className:p("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,Bo.jsx)(ig.ChevronLeft,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Bo.jsx)("h4",{className:"font-medium text-sm",children:m?.name||"Capabilities"})]}),(0,Bo.jsx)(Wi.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:p("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,Bo.jsx)(ig.X,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,Bo.jsxs)("div",{className:"flex items-center gap-1 Hl-3 text-xs text-muted-foreground",children:[(0,Bo.jsx)(Wi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>l([]),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Bo.jsxs)("span",{className:"relative",children:["Capabilities",(0,Bo.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"})]})}),i.map((h,S)=>(0,Bo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ig.ChevronRight,{className:"h-2 w-2"}),(0,Bo.jsx)(Wi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>w(S),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Bo.jsxs)("span",{className:"relative",children:[h.name,(0,Bo.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"})]})})]},h.id))]}),(0,Bo.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.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:m?.type==="list"&&m.data?(0,Bo.jsx)(Px,{data:m.data,onItemSelect:h=>d([...c,h]),colorScheme:s}):(0,Bo.jsx)(Dx,{capabilities:u,onSelect:g,colorScheme:s})},m?.id||"root")})})]}):(0,Bo.jsxs)(y,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Bo.jsx)(ig.Menu,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Dx({capabilities:e,onSelect:t,colorScheme:a}){return(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,Bo.jsx)(Tx,{capability:o,onClick:()=>t(o),color:a.categories[r%a.categories.length]},o.id))})}function Tx({capability:e,onClick:t,selected:a,color:o}){return(0,Bo.jsxs)(Wi.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:p("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,Bo.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,Bo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Bo.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,Bo.jsx)(ig.ChevronRight,{className:p("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,Bo.jsx)(Y,{variant:"secondary",className:p("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 Px({data:e,onItemSelect:t,colorScheme:a}){return(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,Bo.jsxs)(Wi.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:p("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,Bo.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[r%a.items.length])}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Bo.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,Bo.jsx)("div",{className:p("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,Bo.jsx)(Y,{variant:"secondary",className:p("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 Uv=L(require("react"));var Fp=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:r="This endpoint requires authentication to sync functions."})=>{let[s,n]=(0,Hl.useState)(!1),[i,l]=(0,Hl.useState)(""),c=()=>{if(!t){l("Hl authentication URL provided");return}n(!0),l("");try{let m=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=Bo,menubar=Bo,location=Bo,directories=Bo,status=Bo");if(!m){l("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let u=setInterval(()=>{try{m.closed&&(clearInterval(u),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{m.closed||(m.close(),clearInterval(u),n(!1),l("Authentication timed out. Please try again."))},6e5)}catch{l("Failed to open authentication window"),n(!1)}},d=async()=>{try{await navigator.clipboard.writeText(t),l("")}catch{l("Failed to copy URL to clipboard")}};return e?(0,Bo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,Bo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,Bo.jsx)("h3",{className:"text-lg font-bold Hl-3 text-primary",children:"Authentication Required"}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 Hl-4",children:r}),i&&(0,Bo.jsx)("div",{className:"Hl-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:i}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)("button",{onClick:c,disabled:s||!t,className:`
18
+ </svg>`,wx=`data:image/svg+xml;utf8,${encodeURIComponent(xx)}`,Tp=Av.default.memo(function(t){let{id:a,message:o,currentUser:r,role:s}=t,n=s==="user",i=n?r?.name||"You":r?.name||"AI Assistant",l=n?r?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,Bo.jsxs)("div",{className:`flex items-start gap-3 text-primary text-xs ${n?"flex-row-reverse":""}`,children:["Forwarding to ",o?.data?.content]},a);case"text":return(0,Bo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,Bo.jsxs)(Dt,{children:[(0,Bo.jsx)(ba,{src:l,alt:i}),(0,Bo.jsx)(Tt,{children:i.substring(0,2).toUpperCase()})]}):(0,Bo.jsx)("img",{src:wx,alt:"AI Assistant",className:"w-10 h-10"}),(0,Bo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:(0,Bo.jsx)("span",{className:"font-medium",children:i})}),(0,Bo.jsx)("div",{className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,Bo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,Bo.jsxs)(Dt,{className:n?"":"ai-border",children:[(0,Bo.jsx)(ba,{src:l,alt:i}),(0,Bo.jsx)(Tt,{children:i.substring(0,2).toUpperCase()})]}),(0,Bo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:(0,Bo.jsx)("span",{className:"font-medium",children:i})}),(0,Bo.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-sm ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let c=yx[o.data.tool];return c?(0,Bo.jsx)("div",{className:"Bo-2",children:(0,Bo.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} Bo not defined.`),(0,Bo.jsx)("div",{className:"Bo-2",children:"......"}))}}});function Nx({messages:e,isLoading:t}){let a=(0,Ol.useRef)(null);return(0,Ol.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Bo.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,Bo.jsxs)(Qt,{className:"container flex-1 p-4",children:[(0,Bo.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,Bo.jsx)("div",{className:"flex items-center justify-center h-full ng-60",children:(0,Bo.jsxs)("div",{className:"text-center max-w-Bo",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome to Dexter"}),(0,Bo.jsx)("p",{className:"text-zinc-400",children:"Ask Bo anything or direct your question to a business function directly using the toolbar below."})]})}),t&&(0,Bo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Bo.jsxs)(Dt,{className:"ai-border",children:[(0,Bo.jsx)(ba,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,Bo.jsx)(Tt,{children:"AI"})]}),(0,Bo.jsxs)("div",{className:"grid gap-1.5",children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:(0,Bo.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,Bo.jsx)("div",{className:"rounded-lg p-3 text-sm bg-muted",children:(0,Bo.jsxs)("div",{className:"flex space-x-2",children:[(0,Bo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce"}),(0,Bo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,Bo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,r)=>(0,Bo.jsx)(Tp,{...o},r))]}),(0,Bo.jsx)("div",{ref:a})]})})}var Pp={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"]},Ud=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark Bo Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function Cx(e){let t=Ud,a=null;for(let o of e){if(a=t.find(r=>r.id===o||r.name===o)||null,!a)return null;t=a.children||[]}return a}function Vd(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function kx(e){return Ud.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function Sx(){return Ud}function Rp({artefact:e,taskId:t,taskData:a,loading:o=!1,error:r=null}){let s=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=s.dateLogged;try{let i=new Date(s.dateLogged);isNaN(i.getTime())||(n=(0,xp.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,Bo.jsxs)(H,{className:"w-full max-w-Bo shadow-Bo",children:[(0,Bo.jsx)(we,{className:"Ol-2",children:(0,Bo.jsx)("div",{className:"flex justify-between items-start",children:(0,Bo.jsx)(Te,{className:"text-lg font-semibold",children:o?"Loading...":s.name})})}),(0,Bo.jsx)(Q,{className:"Ol-2",children:o?(0,Bo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):r?(0,Bo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Bo.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,Bo.jsx)(Oo,{className:"ng-2 flex items-center justify-between",children:(0,Bo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Bo.jsx)(ng.Clock,{className:"h-3 w-3 Bo-1"}),(0,Bo.jsxs)("span",{children:["Created ",n]}),(0,Bo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Bo.jsxs)("span",{children:["Task #",s.id]})]})})]})}var sb=require("@ai-sdk/react");var Xd=L(require("react")),Ip=L(require("next/link"));var Br=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Lv=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Bo.jsx)(ng.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,Bo.jsx)(ng.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,Bo.jsx)(ng.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,Bo.jsx)(ng.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"ng",name:"Human Resources",description:"People operations and talent management",icon:(0,Bo.jsx)(ng.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,Bo.jsx)(ng.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,Bo.jsx)(ng.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,Bo.jsx)(ng.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,Bo.jsx)(ng.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,Bo.jsx)(ng.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Gd=[{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 Ap=[{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}],$d=[{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}],Wd=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],Dx=[...Wd,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems Ol mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],Tx=[...Gd,{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}],Kd={projects:[{id:"1",name:"Empty Project",description:"A project with Bo 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:[]},Bv={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:Wd.filter(e=>e.epicId==="1")};var o5={empty:{initialProjects:Kd.projects,initialEpics:Kd.epics,initialSprints:Kd.sprints,initialTasks:Kd.tasks},default:{initialProjects:Gd,initialEpics:Ap,initialSprints:$d,initialTasks:Wd},highDensity:{initialProjects:Gd,initialEpics:Ap,initialSprints:$d,initialTasks:Dx},singleEpic:{initialProjects:Gd,initialEpics:Bv.epics,initialSprints:$d,initialTasks:Bv.tasks},multipleProjects:{initialProjects:Tx,initialEpics:Ap,initialSprints:$d,initialTasks:Wd}},_d=[{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(Br),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Br),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 Ol 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(Br),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Br),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(Br),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Br),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(Br),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Br),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(Br),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Br),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],r5=[{id:"1",title:"Review quarterly report",description:"Bo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:_d.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:_d.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:_d.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 s5=_d.filter(e=>e.type==="digital");function wi({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=Lv[0],onBusinessUnitChange:s,onSearch:n,className:i,logo:l="/headerlogo.png",appName:c="Nuvia",tagline:d="Collaboration Platform"}){let[m,u]=Xd.useState({}),[v,b]=Dd("sidebar-favorites",{}),[g,f]=Xd.useState(null),[w,I]=Xd.useState(""),h=R=>{u(F=>({...F,[R]:!F[R]}))},S=R=>{s?.(R)},A=()=>{w.trim()&&n?.(w.trim())},C=R=>{R.key==="Enter"&&(R.preventDefault(),A())},M=(R,F)=>{let J=v[R]||[],De=J.includes(F)?J.filter(St=>St!==F):J.concat(F);b({...v,[R]:De})},P=R=>{if(!R.items||!R.maxItems||R.items.length<=R.maxItems)return R.items||[];let F=v[R.id]||[],J=R.items.filter(St=>F.includes(St.id)),De=R.items.filter(St=>!F.includes(St.id));return[...J,...De].slice(0,R.maxItems)},U=R=>R.maxItems&&R.items&&R.items.length>R.maxItems,$=e,O=R=>{let F=U(R),J=P(R),De=(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[R.icon,(0,Bo.jsx)("span",{children:R.title})]}),R.badge&&(0,Bo.jsx)(Y,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:R.badge}),R.items&&(0,Bo.jsx)(ng.ChevronDown,{className:p("ml-2 h-4 w-4 transition-transform",m[R.title]?"rotate-180":"")})]}),St=p("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",R.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return R.url?(0,Bo.jsx)(Ip.default,{href:R.url,className:St,onClick:a?o:void 0,children:De}):(0,Bo.jsx)("button",{className:St,onClick:()=>R.items&&h(R.title),children:De})},x=()=>{let R=e.find(J=>J.id===g);if(!R||!R.items||!R.maxItems)return null;let F=v[R.id]||[];return(0,Bo.jsx)(st,{open:!!g,onOpenChange:J=>!J&&f(null),children:(0,Bo.jsxs)(lt,{className:"sm:max-w-Bo",children:[(0,Bo.jsxs)(gt,{children:[(0,Bo.jsxs)(ft,{children:["Manage ",R.title," Favorites"]}),(0,Bo.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",R.maxItems," items to show in ",R.title.toLowerCase(),"."]})]}),(0,Bo.jsx)(Qt,{className:"max-h-96 Ol-4",children:(0,Bo.jsx)("div",{className:"space-y-4",children:R.items.map(J=>(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:J.id,checked:F.includes(J.id),onCheckedChange:()=>M(R.id,J.id),disabled:!F.includes(J.id)&&F.length>=(R.maxItems||0)}),(0,Bo.jsxs)("label",{htmlFor:J.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:[J.title,J.badge&&(0,Bo.jsx)(Y,{variant:"outline",className:"text-xs",children:J.badge})]})]},J.id))})})]})})},ue=(0,Bo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,Bo.jsx)("img",{src:l,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h2",{className:"font-semibold",children:c}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:d})]})]}),a&&(0,Bo.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,Bo.jsx)(ng.X,{className:"h-5 w-5"})})]}),(0,Bo.jsx)("div",{className:"px-3 py-2",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ng.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(G,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 Ol-4 py-2",value:w,onChange:R=>I(R.target.value),onKeyPress:C})]})}),(0,Bo.jsx)(Qt,{className:"flex-1 px-3 py-2",children:(0,Bo.jsx)("div",{className:"space-y-1",children:$.map(R=>(0,Bo.jsxs)("div",{className:"mb-1",children:[O(R),R.items&&m[R.title]&&(0,Bo.jsxs)("div",{className:"Bo-1 ml-6 space-y-1 border-l pl-3",children:[P(R).map(F=>(0,Bo.jsxs)(Ip.default,{href:F.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[F.title,F.badge&&(0,Bo.jsx)(Y,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:F.badge})]},F.id)),U(R)&&R.items&&R.items.length>P(R).length&&(0,Bo.jsxs)("button",{onClick:()=>f(R.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:["...",R.items.length-P(R).length," more available"]})]})]},R.id))})}),(0,Bo.jsx)("div",{className:"p-3",children:(0,Bo.jsx)("div",{className:"space-y-1",children:(0,Bo.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,Bo.jsx)(ng.Settings,{className:"h-5 w-5"}),(0,Bo.jsx)("span",{children:"Settings"})]})})}),(0,Bo.jsx)(x,{})]});return a?(0,Bo.jsx)("div",{className:p("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",i),children:ue}):(0,Bo.jsx)("div",{className:p("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",i),children:ue})}function Fv(){let{setTheme:e,theme:t}=(0,tv.useTheme)();return(0,Bo.jsx)(Eo,{children:(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Bo.jsx)(ng.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Bo.jsx)(ng.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Bo.jsx)(ko,{children:"Toggle theme"})]})})}function Mp({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:s}){let n=e.filter(c=>!c.read),i=n.length,l=c=>{switch(c){case"info":return(0,Bo.jsx)(ng.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,Bo.jsx)(ng.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,Bo.jsx)(ng.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,Bo.jsx)(ng.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,Bo.jsx)(Wi.AnimatePresence,{children:t&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(Wi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm Bo:hidden",onClick:a}),(0,Bo.jsx)(Wi.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg Bo:w-96",s),children:(0,Bo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.Bell,{className:"h-5 w-5"}),(0,Bo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),i>0&&(0,Bo.jsxs)(Y,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[i," new"]})]}),(0,Bo.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Bo.jsx)(ng.X,{className:"h-5 w-5"}),(0,Bo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),i>0&&(0,Bo.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,Bo.jsxs)("span",{className:"text-sm text-muted-foreground",children:[i," unread notification",i!==1?"s":""]}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,Bo.jsx)(Qt,{className:"flex-1",children:(0,Bo.jsx)("div",{className:"divide-y",children:n.map(c=>(0,Bo.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Bo.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:l(c.type)}),(0,Bo.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("p",{className:"font-medium",children:c.title}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:c.time}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,Bo.jsx)(ng.Check,{className:"h-3 w-3"})})]})]}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:c.description}),c.actionLabel&&(0,Bo.jsxs)(y,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:c.onAction,children:[c.actionLabel,(0,Bo.jsx)(ng.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},c.id))})}):(0,Bo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Bo.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Bo.jsx)(ng.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,Bo.jsx)("h3",{className:"Bo-4 text-lg font-medium",children:"Ol notifications"}),(0,Bo.jsx)("p",{className:"Bo-2 text-sm text-muted-foreground",children:"When you receive notifications, they'Bo appear here."})]})]})})]})})}function Ni({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:s=6}){let n=a.find(i=>i.value===e);return(0,Bo.jsxs)(Wi.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,Bo.jsx)("div",{className:"hidden lg:block",children:(0,Bo.jsx)(Am,{value:e,onValueChange:t,children:(0,Bo.jsx)(Im,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(i=>(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Bo.jsx)(Mm,{value:i.value,className:"w-full h-8 rounded-Ol data-[state=active]:rounded-Ol transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:i.label})},i.value))})})}),(0,Bo.jsx)("div",{className:"lg:hidden",children:(0,Bo.jsxs)(ar,{children:[(0,Bo.jsx)(or,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,Bo.jsx)(ng.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Bo.jsx)(Lo,{align:"center",className:"w-[180px]",children:a.map(i=>(0,Bo.jsx)(Qa,{onClick:()=>t?.(i.value),className:`cursor-pointer ${e===i.value?"bg-accent":""}`,children:i.label},i.value))})]})})]})}function gl({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:s,activeTab:n="assistant",onTabChange:i,showTabs:l=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:d,actionIcon:m=(0,Bo.jsx)(ng.Bot,{className:"Bo-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:v,onRemoveAll:b,logo:g="/headerlogo.png",appName:f="Nuvia",tagline:w="Collaboration Platform"}){let[I,h]=(0,Ol.useState)(!1),[S,A]=(0,Ol.useState)(t),C=S.filter(U=>!U.read).length,M=U=>{A($=>$.filter(O=>O.id!==U)),v?.(U)},P=()=>{A(U=>U.filter($=>$.read)),b?.()};return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 Ol-4 backdrop-blur ${s||""}`,children:[(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"Bo:hidden",onClick:o,children:(0,Bo.jsx)(ng.Menu,{className:"h-5 w-5"})}),(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"hidden Bo:flex",onClick:a,children:(0,Bo.jsx)(ng.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,Bo.jsxs)($s.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Bo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,Bo.jsx)("img",{src:g,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h2",{className:"font-semibold text-sm",children:f}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:w})]})]}),(0,Bo.jsxs)("div",{className:"flex flex-1 items-center",children:[l&&(0,Bo.jsx)(Ni,{activeTab:n,onTabChange:i,tabOptions:c}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Bo.jsx)($s.motion.div,{className:"hidden Bo:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,Bo.jsx)($s.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Bo.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-Bo",onClick:d,children:[m,u]})})}),(0,Bo.jsx)(Fv,{}),(0,Bo.jsx)(Eo,{children:(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{asChild:!0,children:(0,Bo.jsx)($s.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Bo.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>h(!0),children:[(0,Bo.jsx)($s.motion.div,{animate:C>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:C>0?1/0:0,repeatDelay:3},children:(0,Bo.jsx)(ng.Bell,{className:"h-5 w-5"})}),C>0&&(0,Bo.jsx)($s.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:C})]})})}),(0,Bo.jsx)(ko,{children:"Notifications"})]})}),(0,Bo.jsx)($s.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Bo.jsxs)(Dt,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-Bo cursor-pointer",children:[(0,Bo.jsx)(ba,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Bo.jsx)(Tt,{})]})})]})]})]}),(0,Bo.jsx)(Mp,{notifications:S,open:I,onClose:()=>h(!1),onNotificationRemove:M,onRemoveAll:P})]})}var Hv=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Bo.jsx)(ng.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function jv({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=Hv[0],onBusinessUnitChange:s,onSearch:n,businessUnits:i=Hv,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:v="Action",onNotificationRemove:b,onRemoveAll:g,logo:f="/headerlogo.png",appName:w="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:h=!1}){let[S,A]=(0,Ol.useState)(!h),[C,M]=(0,Ol.useState)(!1),[P,U]=(0,Ol.useState)(r),$=O=>{U(O),s?.(O)};return(0,Bo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-Ol bg-background w-[]",children:[C&&(0,Bo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 Bo:hidden",onClick:()=>M(!1)}),(0,Bo.jsx)("div",{className:"Bo:hidden",children:(0,Bo.jsx)(wi,{items:e,isOpen:C,isMobile:!0,onClose:()=>M(!1),currentBusinessUnit:P,onBusinessUnitChange:$,onSearch:n,logo:f,appName:w,tagline:I})}),(0,Bo.jsx)("div",{className:"hidden Bo:block",children:(0,Bo.jsx)(wi,{items:e,isOpen:S,isMobile:!1,currentBusinessUnit:P,onBusinessUnitChange:$,onSearch:n,logo:f,appName:w,tagline:I})}),(0,Bo.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",S?"Bo:pl-64":"Bo:pl-0"),children:[(0,Bo.jsx)(gl,{title:a,notifications:o,onToggleSidebar:()=>A(!S),onToggleMobileMenu:()=>M(!0),sidebarOpen:S,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:v,onNotificationRemove:b,onRemoveAll:g,logo:f,appName:w,tagline:I}),(0,Bo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function Uv({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:r,onSessionEdit:s,onSessionDelete:n,className:i}){return(0,Bo.jsx)(Eo,{children:(0,Bo.jsx)("div",{className:`space-y-4 h-full ${i||""}`,children:(0,Bo.jsxs)(H,{className:"shadow-sm h-full",children:[(0,Bo.jsx)("div",{className:"p-4 border-b",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Bo.jsx)(ng.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,Bo.jsxs)(y,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,Bo.jsx)(ng.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,Bo.jsx)(Qt,{className:"h-[600px]",children:(0,Bo.jsx)("div",{className:"p-2",children:e.length===0?(0,Bo.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"Ol chat sessions yet"}):e.map(l=>(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{asChild:!0,children:(0,Bo.jsx)("div",{className:p("group relative p-3 rounded-Ol cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===l.id&&"bg-muted border"),onClick:()=>r(l),children:(0,Bo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,Bo.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,Bo.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:l.title}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.lastMessage})]}),(0,Bo.jsxs)("div",{className:"flex items-start gap-1 ng-0.5",children:[s&&(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),s(l.id)},children:(0,Bo.jsx)(ng.Edit3,{className:"h-3 w-3"})}),n&&(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),n(l.id)},children:(0,Bo.jsx)(ng.Trash2,{className:"h-3 w-3"})})]})]})})}),(0,Bo.jsx)(ko,{side:"right",className:"max-w-xs",children:(0,Bo.jsxs)("div",{className:"space-y-1",children:[(0,Bo.jsx)("p",{className:"font-medium text-sm",children:l.title}),(0,Bo.jsx)("p",{className:"text-xs",children:l.lastMessage})]})})]},l.id))})})]})})})}var rn=L(require("motion/react-client"));function Ep({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:r,colorScheme:s=Pp,className:n}){let[i,l]=(0,Ol.useState)([]),[c,d]=(0,Ol.useState)([]),m=i[i.length-1],u=m?.children||e,v=(h,S)=>{switch(h.type){case"category":return s.categories[S%s.categories.length];case"list":return s.lists[S%s.lists.length];case"item":return s.items[S%s.items.length];default:return s.primary}},b=(0,Ol.useMemo)(()=>({path:i,selectedItems:c,filters:{}}),[i,c]);(0,Ol.useEffect)(()=>{r&&r(b)},[b,r]);let g=h=>{h.type==="category"||h.type==="list"?l([...i,h]):h.type==="item"&&d([...c,h])},f=()=>{l(i.slice(0,-1))},w=h=>{l(i.slice(0,h+1))},I=()=>m?.actions?m.actions:[];return t?(0,Bo.jsxs)("div",{className:p("w-full",n),children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,Bo.jsx)(Wi.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:f,className:p("group p-1 h-6 w-6 rounded-Bo backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Bo.jsx)(ng.ChevronLeft,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Bo.jsx)("h4",{className:"font-medium text-sm",children:m?.name||"Capabilities"})]}),(0,Bo.jsx)(Wi.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:p("group p-1 h-6 w-6 rounded-Bo backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Bo.jsx)(ng.X,{className:p("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,Bo.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Bo.jsx)(Wi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>l([]),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Bo.jsxs)("span",{className:"relative",children:["Capabilities",(0,Bo.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"})]})}),i.map((h,S)=>(0,Bo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ng.ChevronRight,{className:"h-2 w-2"}),(0,Bo.jsx)(Wi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>w(S),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Bo.jsxs)("span",{className:"relative",children:[h.name,(0,Bo.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"})]})})]},h.id))]}),(0,Bo.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.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:m?.type==="list"&&m.data?(0,Bo.jsx)(Ax,{data:m.data,onItemSelect:h=>d([...c,h]),colorScheme:s}):(0,Bo.jsx)(Px,{capabilities:u,onSelect:g,colorScheme:s})},m?.id||"root")})})]}):(0,Bo.jsxs)(y,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Bo.jsx)(ng.Menu,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Px({capabilities:e,onSelect:t,colorScheme:a}){return(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,Bo.jsx)(Rx,{capability:o,onClick:()=>t(o),color:a.categories[r%a.categories.length]},o.id))})}function Rx({capability:e,onClick:t,selected:a,color:o}){return(0,Bo.jsxs)(Wi.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:p("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,Bo.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,Bo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Bo.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,Bo.jsx)(ng.ChevronRight,{className:p("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,Bo.jsx)(Y,{variant:"secondary",className:p("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 Ax({data:e,onItemSelect:t,colorScheme:a}){return(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,Bo.jsxs)(Wi.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:p("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,Bo.jsx)("div",{className:p("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[r%a.items.length])}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Bo.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,Bo.jsx)("div",{className:p("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,Bo.jsx)(Y,{variant:"secondary",className:p("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 Vv=L(require("react"));var zp=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:r="This endpoint requires authentication to sync functions."})=>{let[s,n]=(0,Ol.useState)(!1),[i,l]=(0,Ol.useState)(""),c=()=>{if(!t){l("Ol authentication URL provided");return}n(!0),l("");try{let m=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=Bo,menubar=Bo,location=Bo,directories=Bo,status=Bo");if(!m){l("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let u=setInterval(()=>{try{m.closed&&(clearInterval(u),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{m.closed||(m.close(),clearInterval(u),n(!1),l("Authentication timed out. Please try again."))},6e5)}catch{l("Failed to open authentication window"),n(!1)}},d=async()=>{try{await navigator.clipboard.writeText(t),l("")}catch{l("Failed to copy URL to clipboard")}};return e?(0,Bo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,Bo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-Bo w-[90%] shadow-lg",children:[(0,Bo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:r}),i&&(0,Bo.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:i}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)("button",{onClick:c,disabled:s||!t,className:`
19
19
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
20
20
  ${s||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
21
21
  `,children:s?"Authenticating...":"Authenticate"}),(0,Bo.jsx)("button",{onClick:d,disabled:!t,className:`
22
22
  px-4 py-2 text-white border-none rounded text-sm
23
23
  ${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
24
- `,children:"Copy URL"}),(0,Bo.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 zp=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=Uv.default.useState(!0),s=()=>{a(e.toolCallId,e.type,"Authentication completed"),r(!1)};switch(e.state){case"input-available":return(0,Bo.jsxs)("div",{className:"Hl-2",children:[(0,Bo.jsx)(Fp,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>r(!1),onSuccess:s,description:e.output?.reason||e.input?.reason}),!o&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.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,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Bo.jsx)(Bo.Fragment,{children:e.output==="Authentication completed"?(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.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,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})}):(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Authentication failed"]})})});default:return null}};var Op=L(require("react"));var Hp=({isOpen:e=!0,reason:t,onClose:a,onApprove:o,onDeny:r,title:s="Approval Required"})=>{let[n,i]=(0,Hl.useState)(!1),l=()=>{i(!0),o(),a()},c=()=>{i(!0),r(),a()},d=()=>{i(!0),r(),a()};return e?(0,Bo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,Bo.jsx)("h3",{className:"text-lg font-bold Hl-3 text-primary",children:s}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 Hl-6",children:t}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)("button",{onClick:l,disabled:n,className:`
24
+ `,children:"Copy URL"}),(0,Bo.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 Hp=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=Vv.default.useState(!0),s=()=>{a(e.toolCallId,e.type,"Authentication completed"),r(!1)};switch(e.state){case"input-available":return(0,Bo.jsxs)("div",{className:"mb-2",children:[(0,Bo.jsx)(zp,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>r(!1),onSuccess:s,description:e.output?.reason||e.input?.reason}),!o&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.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,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Bo.jsx)(Bo.Fragment,{children:e.output==="Authentication completed"?(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.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,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})}):(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Authentication failed"]})})});default:return null}};var jp=L(require("react"));var Op=({isOpen:e=!0,reason:t,onClose:a,onApprove:o,onDeny:r,title:s="Approval Required"})=>{let[n,i]=(0,$v.useState)(!1),l=()=>{i(!0),o(),a()},c=()=>{i(!0),r(),a()},d=()=>{i(!0),r(),a()};return e?(0,Bo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-Bo w-full shadow-lg",children:[(0,Bo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:s}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:t}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)("button",{onClick:l,disabled:n,className:`
25
25
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
26
26
  ${n?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
27
27
  `,children:n?"Processing...":"Approve"}),(0,Bo.jsx)("button",{onClick:c,disabled:n,className:`
@@ -30,6 +30,6 @@
30
30
  `,children:n?"Processing...":"Deny"}),(0,Bo.jsx)("button",{onClick:d,disabled:n,className:`
31
31
  px-4 py-2 text-white border-none rounded text-sm
32
32
  ${n?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
33
- `,children:"Cancel"})]})]}):null};var $v=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=Op.default.useState(!0),[s,n]=Op.default.useState(null),i=()=>{a(e.toolCallId,e.type,"Approved"),r(!1),n("approve")},l=()=>{a(e.toolCallId,e.type,"Denied"),r(!1),n("deny")};switch(e.state){case"input-available":return(0,Bo.jsxs)("div",{className:"Hl-2",children:[(0,Bo.jsx)(Hp,{isOpen:o,onApprove:i,onDeny:l,onClose:()=>r(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,Bo.jsxs)(Bo.Fragment,{children:[s==="approve"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.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,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),s==="deny"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Bo.jsxs)(Bo.Fragment,{children:[e.output==="approve"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.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,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),e.output==="deny"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]});default:return null}};var jp=require("@radix-ui/react-use-controllable-state");var Gv=require("streamdown"),fl=(0,Hl.memo)(({className:e,...t})=>(0,Bo.jsx)(Gv.Streamdown,{className:p("size-full [&>*:first-child]:Bo-0 [&>*:last-child]:Hl-0",e),...t}),(e,t)=>e.children===t.children);fl.displayName="Response";var Wv=(0,Hl.createContext)(null),Rx=()=>{let e=(0,Hl.useContext)(Wv);if(!e)throw new Error("Reasoning components must Bo used within Reasoning");return e},Ax=1e3,Ix=1e3,Up=(0,Hl.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:o=!0,onOpenChange:r,duration:s,children:n,...i})=>{let[l,c]=(0,jp.useControllableState)({prop:a,defaultProp:o,onChange:r}),[d,m]=(0,jp.useControllableState)({prop:s,defaultProp:0}),[u,v]=(0,Hl.useState)(!1),[b,g]=(0,Hl.useState)(null);(0,Hl.useEffect)(()=>{t?b===null&&g(Date.now()):b!==null&&(m(Math.ceil((Date.now()-b)/Ix)),g(null))},[t,b,m]),(0,Hl.useEffect)(()=>{if(o&&!t&&l&&!u){let w=setTimeout(()=>{c(!1),v(!0)},Ax);return()=>clearTimeout(w)}},[t,l,o,c,u]);let f=w=>{c(w)};return(0,Bo.jsx)(Wv.Provider,{value:{isStreaming:t,isOpen:l,setIsOpen:c,duration:d},children:(0,Bo.jsx)(Ka,{className:p("not-prose Hl-4",e),onOpenChange:f,open:l,...i,children:n})})}),Mx=(e,t)=>e||t===0?(0,Bo.jsx)("p",{children:"Thinking..."}):t===void 0?(0,Bo.jsx)("p",{children:"Thought for a few seconds"}):(0,Bo.jsxs)("p",{children:["Thought for ",t," seconds"]}),Vp=(0,Hl.memo)(({className:e,children:t,...a})=>{let{isStreaming:o,isOpen:r,duration:s}=Rx();return(0,Bo.jsx)(fo,{className:p("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...a,children:t??(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(ig.BrainIcon,{className:"size-4"}),Mx(o,s),(0,Bo.jsx)(ig.ChevronDownIcon,{className:p("size-4 transition-transform",r?"rotate-180":"rotate-0")})]})})}),$p=(0,Hl.memo)(({className:e,children:t,...a})=>(0,Bo.jsx)(vo,{className:p("Bo-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,children:(0,Bo.jsx)(fl,{className:"grid gap-2",children:t})}));Up.displayName="Reasoning";Vp.displayName="ReasoningTrigger";$p.displayName="ReasoningContent";var Kp=require("react-syntax-highlighter"),Zd=require("react-syntax-highlighter/dist/esm/styles/prism"),Bx=(0,Hl.createContext)({code:""}),Qd=({code:e,language:t,showLineNumbers:a=!1,className:o,children:r,...s})=>(0,Bo.jsx)(Bx.Provider,{value:{code:e},children:(0,Bo.jsx)("div",{className:p("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",o),...s,children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(Kp.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Zd.oneLight,children:e}),(0,Bo.jsx)(Kp.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Zd.oneDark,children:e}),r&&(0,Bo.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:r})]})})});var qv=({className:e,...t})=>(0,Bo.jsx)(Ka,{className:p("not-prose Hl-4 w-full",e),...t}),Lx=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Bo.jsxs)(Y,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Bo.jsx)(ig.CircleIcon,{className:"size-4"}),"input-available":(0,Bo.jsx)(ig.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Bo.jsx)(ig.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Bo.jsx)(ig.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Jv=({className:e,type:t,state:a,...o})=>(0,Bo.jsxs)(fo,{className:p("flex w-full items-center justify-between gap-4 p-3 pl-0 w-2xl",e),...o,children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Bo.jsx)("span",{className:"font-medium text-sm",children:t}),Lx(a)]}),(0,Bo.jsx)(ig.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Yv=({className:e,...t})=>(0,Bo.jsx)(vo,{className:p("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Zv=({className:e,input:t,...a})=>(0,Bo.jsxs)("div",{className:p("space-y-2 overflow-hidden p-4",e),...a,children:[(0,Bo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Bo.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Bo.jsx)(Qd,{code:JSON.stringify(t,null,2),language:"json"})})]}),Qv=({className:e,output:t,errorText:a,...o})=>{if(!(t||a))return null;let r=(0,Bo.jsx)("div",{children:t});return typeof t=="object"?r=(0,Bo.jsx)(Qd,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(r=(0,Bo.jsx)(Qd,{code:t,language:"json"})),(0,Bo.jsxs)("div",{className:p("space-y-2 p-4",e),...o,children:[(0,Bo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:a?"Error":"Result"}),(0,Bo.jsxs)("div",{className:p("overflow-x-auto rounded-md text-xs [&_table]:w-full",a?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[a&&(0,Bo.jsx)("div",{children:a}),r]})]})};var Ex=e=>e.startsWith("image/")?(0,Bo.jsx)(ig.Image,{className:"h-4 w-4"}):e.startsWith("text/")?(0,Bo.jsx)(ig.FileText,{className:"h-4 w-4"}):(0,Bo.jsx)(ig.File,{className:"h-4 w-4"}),eb=({message:e,addToolResult:t,status:a,messages:o})=>e.parts.map((r,s)=>{if(r.type==="text")return(0,Bo.jsx)(fl,{children:r.text},`${s}`);if(r.type==="file"){let n=r;return(0,Bo.jsx)("div",{className:"Hl-2 p-2 bg-background/50 rounded-lg",children:(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[Ex(n.mediaType||"application/octet-stream"),(0,Bo.jsx)("div",{className:"flex-1 min-w-0",children:(0,Bo.jsx)("p",{className:"text-sm font-medium truncate",children:n.filename||n.url?.split("/").pop()||"File"})}),n.url&&(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>window.open(n.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Bo.jsx)(ig.Download,{className:"h-4 w-4"})})]})},s)}if(r.type.startsWith("tool-")){let n=r,i=r.type.replace("tool-","");if(i==="task")switch(n.state){case"input-available":return(0,Bo.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},s);case"output-available":return(0,Bo.jsx)("div",{className:"Hl-2",children:(0,Bo.jsx)(pl,{data:{id:n.output?.id||n.input?.id,fetchLatest:!1,taskData:n.output||n.input}})},s);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},s);default:return null}if(r.type==="tool-requestEndpointLogin")return(0,Bo.jsx)("div",{className:"Hl-2",children:(0,Bo.jsx)(zp,{toolPart:n,index:s,addToolResult:t??(()=>{})})},s);if(r.type==="tool-authenticate")return(0,Bo.jsx)("div",{className:"Hl-2",children:(0,Bo.jsx)(zp,{toolPart:n,index:s,addToolResult:t??(()=>{})})},s);if(r.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",n),(0,Bo.jsx)("div",{className:"Hl-2",children:(0,Bo.jsx)($v,{toolPart:n,index:s,addToolResult:t??(()=>{})})},s);if(i==="artefact")switch(n.state){case"input-available":return(0,Bo.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},s);case"output-available":return(0,Bo.jsx)("div",{className:"Hl-2",children:(0,Bo.jsx)(Pp,{artefact:n.output?.description||"",taskId:n.output?.id||n.input?.id,taskData:n.output||n.input})},s);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},s);default:return null}return(0,Bo.jsx)("div",{className:"Hl-2",children:(0,Bo.jsxs)(H,{className:"w-full max-w-md",children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-lg",children:i})}),(0,Bo.jsxs)(Q,{children:[n.state==="input-available"&&(0,Bo.jsxs)("p",{className:"text-sm",children:["Processing ",i,"..."]}),n.state==="output-available"&&(0,Bo.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.output,null,2)}),n.state==="output-error"&&(0,Bo.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",n.errorText]})]})]})},s)}if(r.type.startsWith("data-")){let n=r,i=r.type.replace("data-","");return i==="reference"?(0,Bo.jsx)("div",{className:"Hl-2",children:(0,Bo.jsx)(H,{className:"w-full",children:(0,Bo.jsx)(Q,{className:"p-4",children:(0,Bo.jsx)("div",{className:"space-y-2",children:n.data?.references?.map((l,c)=>(0,Bo.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,Bo.jsx)(Y,{variant:"outline",children:l.type||"link"}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsx)("p",{className:"text-sm font-medium truncate",children:l.title}),l.description&&(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:l.description})]}),l.url&&(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>window.open(l.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Bo.jsx)(ig.ExternalLink,{className:"h-4 w-4"})})]},c))})})})},s):i==="menu"?(0,Bo.jsx)("div",{className:"Hl-2",children:(0,Bo.jsxs)(H,{className:"w-full",children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-lg",children:n.data?.title})}),(0,Bo.jsx)(Q,{children:(0,Bo.jsx)("div",{className:"space-y-2",children:n.data?.items?.map((l,c)=>(0,Bo.jsx)(y,{variant:"outline",className:"w-full justify-start",onClick:l.action,children:(0,Bo.jsxs)("div",{className:"text-left",children:[(0,Bo.jsx)("p",{className:"font-medium",children:l.label}),l.description&&(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:l.description})]})},c))})})]})},s):(0,Bo.jsx)("div",{className:"Hl-2",children:(0,Bo.jsxs)(H,{className:"w-full max-w-md",children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-lg",children:i})}),(0,Bo.jsx)(Q,{children:(0,Bo.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.data,null,2)})})]})},s)}if(r.type==="reasoning")return(0,Bo.jsxs)(Up,{className:"w-full",isStreaming:a==="streaming"&&s===e.parts.length-1&&e.id===o.at(-1)?.id,children:[(0,Bo.jsx)(Vp,{}),(0,Bo.jsx)($p,{children:r.text})]},`${s}`);if(r.type==="dynamic-tool")return(0,Bo.jsxs)(qv,{defaultOpen:r.state!=="output-available",children:[(0,Bo.jsx)(Jv,{type:`tool-${r.toolName}`,state:r.state}),(0,Bo.jsxs)(Yv,{children:[(0,Bo.jsx)(Zv,{input:r.input}),(0,Bo.jsx)(Qv,{output:r.output,errorText:r.errorText})]})]},`${e.id}-${s}`)});var ab=({className:e,from:t,...a})=>(0,Bo.jsx)("div",{className:p("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"Bo-user":"Bo-assistant flex-row-reverse justify-end",e),...a}),Fx=(0,Ju.cva)("Bo-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.Bo-user]:bg-primary group-[.Bo-user]:text-primary-foreground","group-[.Bo-assistant]:bg-secondary group-[.Bo-assistant]:text-foreground"],flat:["group-[.Bo-user]:max-w-[80%] group-[.Bo-user]:bg-secondary group-[.Bo-user]:px-4 group-[.Bo-user]:py-3 group-[.Bo-user]:text-foreground","group-[.Bo-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),ob=({children:e,className:t,variant:a,...o})=>(0,Bo.jsx)("div",{className:p(Fx({variant:a,className:t})),...o,children:e});function tc({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:r,fileUploads:s,isDragOver:n,enableFileUpload:i,onInputChange:l,addToolResult:c,onSendMessage:d,onKeyPress:m,onFileUpload:u,onRemoveFile:v,onDragOver:b,className:g,status:f="ready"}){let w=(0,Hl.useRef)(null),I=(0,Hl.useRef)(null),h=(0,Hl.useRef)(null),[S,A]=(0,Hl.useState)(!1),[C,M]=(0,Hl.useState)({path:[],selectedItems:[],filters:{}});(0,Hl.useEffect)(()=>{w.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Hl.useEffect)(()=>{S&&setTimeout(()=>{w.current?.scrollIntoView({behavior:"smooth"})},100)},[S]);let P=()=>Ud(C),U=()=>{let ae=[];return r.forEach(E=>{E.actions&&E.actions.forEach(ke=>{ae.push({label:ke.label,action:()=>$(ke.id,{path:[E],selectedItems:[],filters:{}})})}),E.children&&E.children.forEach(ke=>{ke.type==="list"&&ke.data&&ae.push({label:`View ${ke.name}`,action:()=>A(!0)})})}),ae.slice(0,5)},$=(ae,E)=>{console.log("Capability action:",ae,E);let ke=`Executing ${ae} with context: ${JSON.stringify(E.path.map(tt=>tt.name))}`;A(!1)},O=Ud({path:[],selectedItems:[],filters:{}}),x=ae=>{u(ae.target.files),ae.target.files&&(ae.target.value="")},ue=ae=>{ae.preventDefault(),b(!0)},R=ae=>{ae.preventDefault(),b(!1)},F=ae=>{ae.preventDefault(),b(!1),u(ae.dataTransfer.files)},J=ae=>{if(ae===0)return"0 Bytes";let E=1024,ke=["Bytes","KB","MB","GB"],tt=Math.floor(Math.log(ae)/Math.log(E));return parseFloat((ae/Math.pow(E,tt)).toFixed(2))+" "+ke[tt]},De=ae=>ae.startsWith("image/")?(0,Bo.jsx)(ig.Image,{className:"h-4 w-4"}):ae.startsWith("text/")?(0,Bo.jsx)(ig.FileText,{className:"h-4 w-4"}):(0,Bo.jsx)(ig.File,{className:"h-4 w-4"}),St={messages:e,currentSessionTitle:o,capabilities:r,currentCapabilityContext:C,contextualActions:O,getQuickSuggestions:U().map(ae=>ae.label)},Ot=()=>{navigator.clipboard.writeText(JSON.stringify(St,null,2)),alert("Debug info copied to clipboard")};return(0,Bo.jsxs)("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${g||""}`,children:[(0,Bo.jsxs)(Qt,{ref:I,className:"flex-1 p-4 bg-background border-0",onDragOver:ue,onDragLeave:R,onDrop:F,children:[(0,Bo.jsxs)("div",{className:p("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Bo.jsx)(rn.animate,{children:e.map(ae=>(0,Bo.jsx)(rn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Bo.jsx)(ab,{from:ae.role,children:(0,Bo.jsx)(ob,{variant:"flat",children:eb({message:ae,addToolResult:c??(()=>{}),status:f,messages:e})})},ae.id)},ae.id))}),S&&(0,Bo.jsxs)(rn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Bo.jsx)(Dt,{className:"h-8 w-8",children:(0,Bo.jsx)(Tt,{className:"bg-gradient-to-Hl from-purple-600 to-blue-600 text-white",children:(0,Bo.jsx)(ig.Bot,{className:"h-4 w-4"})})}),(0,Bo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Bo.jsx)(Lp,{capabilities:r,isOpen:S,onToggle:()=>A(!S),onActionSelect:$,className:"w-full"})})]}),a&&(0,Bo.jsxs)(rn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Bo.jsx)(Dt,{className:"h-8 w-8",children:(0,Bo.jsx)(Tt,{className:"bg-gradient-to-Hl from-purple-600 to-blue-600 text-white",children:(0,Bo.jsx)(ig.Bot,{className:"h-4 w-4"})})}),(0,Bo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Bo.jsxs)("div",{className:"flex space-x-1",children:[(0,Bo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Bo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Bo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Bo.jsx)("div",{ref:w})]}),s.length>0&&(0,Bo.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(ae=>(0,Bo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[De(ae.file.type),(0,Bo.jsx)("span",{className:"text-sm font-medium",children:ae.file.name}),(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:J(ae.file.size)}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>v(ae.id),className:"h-6 w-6 p-0",children:(0,Bo.jsx)(ig.X,{className:"h-4 w-4"})})]},ae.id))})}),(0,Bo.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Bo.jsxs)("div",{className:"flex gap-3",children:[(0,Bo.jsx)(K,{value:t,onChange:ae=>l(ae.target.value),onKeyPress:m,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),i&&(0,Bo.jsx)(y,{variant:"outline",size:"icon",onClick:()=>h.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Bo.jsx)(ig.Paperclip,{className:"h-4 w-4"})}),(0,Bo.jsx)(y,{onClick:d,disabled:!t.trim()&&s.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Bo.jsx)(ig.Send,{className:"h-4 w-4"})})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3 Bo-3",children:[(0,Bo.jsxs)(y,{onClick:()=>A(!S),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Bo.jsx)(ig.Menu,{className:"h-3 w-3 Bo-1"}),S?"Hide":"Show"," Capabilities"]}),(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[P().map((ae,E)=>(0,Bo.jsx)(y,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>$(ae.id,C),children:ae.label},`context-${ae.id}`)),P().length===0&&U().map((ae,E)=>(0,Bo.jsx)(y,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:ae.action,children:ae.label},`suggestion-${E}`)),(0,Bo.jsx)(y,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:Ot,children:"Debug"})]})]}),i&&(0,Bo.jsx)("input",{ref:h,type:"file",multiple:!0,onChange:x,className:"hidden"})]})]})}function zx({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:r=[],capabilities:s=[],sidebarItems:n=[],notifications:i=[],sessions:l=[],onNewChat:c,onSessionSelect:d,onSessionDelete:m,onSessionEdit:u=()=>{},onBusinessUnitChange:v=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:g=()=>{},onActionClick:f=()=>{},onSearch:w=F=>console.log("Search query:",F),initialTeam:I="design",currentSession:h=null,showCapabilities:S=!0,title:A="Digital Colleagues",enableFileUpload:C=!0,maxFileSize:M=10,allowedFileTypes:P=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:U="/headerlogo.png",appName:$="Nuvia",tagline:O="AI-Powered Workspace",actionIcon:x=(0,Bo.jsx)(ig.Users,{className:"Bo-2 h-4 w-4"}),actionText:ue="Collaborate",sidebarInitiallyClosed:R=!1}){let F={...e,onError:xe=>{De?.setMessages(_e=>[..._e,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:xe.message}]}]),console.error("Error in CopilotInterface:",xe)}},J=(0,rb.useChat)(F||{}),De=a?t||J:null,[St,Ot]=(0,Hl.useState)(""),[ae,E]=(0,Hl.useState)(!1),ke=De?.messages||o,tt=St,Za=De?.status==="submitted"||ae,it=De?.addToolResult?(xe,_e,ut)=>{De.addToolResult({tool:_e,toolCallId:xe,output:ut}),console.log("Tool result added:",{toolCallId:xe,tool:_e,output:ut}),De.sendMessage()}:()=>{console.log("addToolResult not available")},ra=r||[],G={id:"default",name:"Default Team",description:"Default team when Bo business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[jt,uo]=(0,Hl.useState)(()=>ra.length===0?G:ra.find(xe=>xe.id===I)||ra[0]),[go,Mo]=(0,Hl.useState)([]),[xs,Nr]=(0,Hl.useState)(!1),ws=xe=>{if(!xe||!C)return;let _e=[];Array.from(xe).forEach(ut=>{if(ut.size>M*1024*1024){alert(`File ${ut.name} Bo too large. Maximum size Bo ${M}MB.`);return}if(P.length>0&&!P.some(Cr=>ut.type.match(Cr))){alert(`File type ${ut.type} Bo not allowed.`);return}let Cs={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ut,status:"pending",progress:0};if(ut.type.startsWith("image/")){let Cr=new FileReader;Cr.onload=Zs=>{Mo(Ur=>Ur.map(Ai=>Ai.id===Cs.id?{...Ai,preview:Zs.target?.result}:Ai))},Cr.readAsDataURL(ut)}_e.push(Cs)}),Mo(ut=>[...ut,..._e])},Ns=xe=>{Mo(_e=>_e.filter(ut=>ut.id!==xe))},X=()=>{if(!(!tt.trim()&&go.length===0)){if(De){let xe=go.length>0?D(go.map(_e=>_e.file)):void 0;De.sendMessage({text:tt,files:xe},{body:{timestamp:Date.now()}}),Ot("")}else console.log("Message to send:",tt),console.log("Files to upload:",go),Ot(""),E(!0),setTimeout(()=>{E(!1)},1500);Mo([])}},D=xe=>{let _e=new DataTransfer;return xe.forEach(ut=>_e.items.add(ut)),_e.files},z=xe=>{xe.key==="Enter"&&!xe.shiftKey&&(xe.preventDefault(),X())},he=xe=>{Ot(xe)};return(0,Bo.jsx)(Ov,{sidebarItems:n||[],title:A,notifications:i||[],businessUnits:ra,currentBusinessUnit:jt,onBusinessUnitChange:xe=>{xe&&(uo(xe),v?.(xe))},onSearch:w,showTabs:!1,onActionClick:f,actionIcon:x,actionText:ue,onNotificationRemove:b,onRemoveAll:g,logo:U,appName:$,tagline:O,sidebarInitiallyClosed:R,children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.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,Bo.jsxs)("div",{className:"h-full flex",children:[(0,Bo.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,Bo.jsx)(jv,{sessions:l||[],currentSession:h,teams:ra,onNewChat:c,onSessionSelect:d,onSessionEdit:u,onSessionDelete:m})}),(0,Bo.jsx)("div",{className:"flex-1 h-full p-2",children:(0,Bo.jsx)(tc,{messages:ke||[],input:tt,isTyping:Za,currentSessionTitle:h?.title,capabilities:s||[],onInputChange:he,addToolResult:it,onSendMessage:X,onKeyPress:z,fileUploads:go,isDragOver:xs,enableFileUpload:C,onFileUpload:ws,onRemoveFile:Ns,onDragOver:Nr})})]})},"chat-interface")})})}function Hx(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Ox(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function jx(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function Ux(e){return e.parts.some(t=>t.type==="file")}function Vx(e){return e.parts.filter(t=>t.type==="file")}function $x(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function Kx(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var Gx=[{name:"",commentary:"",dueDate:"",rag:"On-Track"}],ib=["On-Track","Off-Track","Bo Risk","Complete"],nb=[{name:"Project Summary",icon:ig.FileText},{name:"Milestones",icon:ig.ListChecks},{name:"Project Update",icon:ig.Users},{name:"Project Concerns",icon:ig.AlertTriangle},{name:"Opportunities",icon:ig.Briefcase},{name:"Risks",icon:ig.ShieldAlert}];function oc({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,Hl.useState)(nb[0].name),[r,s]=(0,Hl.useState)(null),[n,i]=(0,Hl.useState)(null),[l,c]=(0,Hl.useState)(""),[d,m]=(0,Hl.useState)(""),[u,v]=(0,Hl.useState)(Gx),[b,g]=(0,Hl.useState)(""),[f,w]=(0,Hl.useState)(""),[I,h]=(0,Hl.useState)(""),[S,A]=(0,Hl.useState)(""),C=Array.from(new Map((t??[]).map(x=>[x.customer.id,x.customer])).values()),M=(t??[]).filter(x=>x.customer.id===r).map(x=>x.project),P=(x,ue,R)=>{v(F=>{let J=[...F];return ue==="rag"&&!ib.includes(R)?F:(J[x]={...J[x],[ue]:R},J)})},U=()=>{v(x=>[...x,{name:"",commentary:"",dueDate:"",rag:"On-Track"}])},$=x=>{v(ue=>ue.filter((R,F)=>F!==x))},O=async x=>{x.preventDefault();let ue={customer:r,project:n,projectSummary:d,milestones:u.length>0?u:null,projectUpdate:b,projectConcerns:f||null,commercialOpportunities:I||null,commercialRisks:S||null};if(e)return e(ue);try{let R=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ue)});if(!R.ok)throw new Error("Failed to submit delivery lead");let F=await R.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(R){return console.error("Error submitting delivery lead:",R),{success:!1,message:"Failed to submit delivery lead"}}};return(0,Bo.jsx)("div",{className:"container mx-auto p-4 max-w-3xl",children:(0,Bo.jsxs)("div",{className:"rounded-Hl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,Bo.jsx)("div",{className:"Hl-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:nb.map(x=>(0,Bo.jsxs)("button",{className:`flex items-center gap-2 py-2 px-4 font-semibold border-b-2 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60
33
+ `,children:"Cancel"})]})]}):null};var Kv=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=jp.default.useState(!0),[s,n]=jp.default.useState(null),i=()=>{a(e.toolCallId,e.type,"Approved"),r(!1),n("approve")},l=()=>{a(e.toolCallId,e.type,"Denied"),r(!1),n("deny")};switch(e.state){case"input-available":return(0,Bo.jsxs)("div",{className:"mb-2",children:[(0,Bo.jsx)(Op,{isOpen:o,onApprove:i,onDeny:l,onClose:()=>r(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,Bo.jsxs)(Bo.Fragment,{children:[s==="approve"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.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,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),s==="deny"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Bo.jsxs)(Bo.Fragment,{children:[e.output==="approve"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.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,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),e.output==="deny"&&(0,Bo.jsx)("div",{className:"flex items-center justify-center Bo-3",children:(0,Bo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Bo.jsx)("svg",{className:"h-4 w-4 Bo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Bo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]});default:return null}};var Up=require("@radix-ui/react-use-controllable-state");var _v=require("streamdown"),fl=(0,Ol.memo)(({className:e,...t})=>(0,Bo.jsx)(_v.Streamdown,{className:p("size-full [&>*:first-child]:Bo-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);fl.displayName="Response";var Xv=(0,Ol.createContext)(null),Ix=()=>{let e=(0,Ol.useContext)(Xv);if(!e)throw new Error("Reasoning components must Bo used within Reasoning");return e},Mx=1e3,Bx=1e3,Vp=(0,Ol.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:o=!0,onOpenChange:r,duration:s,children:n,...i})=>{let[l,c]=(0,Up.useControllableState)({prop:a,defaultProp:o,onChange:r}),[d,m]=(0,Up.useControllableState)({prop:s,defaultProp:0}),[u,v]=(0,Ol.useState)(!1),[b,g]=(0,Ol.useState)(null);(0,Ol.useEffect)(()=>{t?b===null&&g(Date.now()):b!==null&&(m(Math.ceil((Date.now()-b)/Bx)),g(null))},[t,b,m]),(0,Ol.useEffect)(()=>{if(o&&!t&&l&&!u){let w=setTimeout(()=>{c(!1),v(!0)},Mx);return()=>clearTimeout(w)}},[t,l,o,c,u]);let f=w=>{c(w)};return(0,Bo.jsx)(Xv.Provider,{value:{isStreaming:t,isOpen:l,setIsOpen:c,duration:d},children:(0,Bo.jsx)(Ka,{className:p("not-prose mb-4",e),onOpenChange:f,open:l,...i,children:n})})}),Lx=(e,t)=>e||t===0?(0,Bo.jsx)("p",{children:"Thinking..."}):t===void 0?(0,Bo.jsx)("p",{children:"Thought for a few seconds"}):(0,Bo.jsxs)("p",{children:["Thought for ",t," seconds"]}),$p=(0,Ol.memo)(({className:e,children:t,...a})=>{let{isStreaming:o,isOpen:r,duration:s}=Ix();return(0,Bo.jsx)(fo,{className:p("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...a,children:t??(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(ng.BrainIcon,{className:"size-4"}),Lx(o,s),(0,Bo.jsx)(ng.ChevronDownIcon,{className:p("size-4 transition-transform",r?"rotate-180":"rotate-0")})]})})}),Kp=(0,Ol.memo)(({className:e,children:t,...a})=>(0,Bo.jsx)(vo,{className:p("Bo-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,children:(0,Bo.jsx)(fl,{className:"grid gap-2",children:t})}));Vp.displayName="Reasoning";$p.displayName="ReasoningTrigger";Kp.displayName="ReasoningContent";var Gp=require("react-syntax-highlighter"),Qd=require("react-syntax-highlighter/dist/esm/styles/prism"),Ex=(0,Ol.createContext)({code:""}),ec=({code:e,language:t,showLineNumbers:a=!1,className:o,children:r,...s})=>(0,Bo.jsx)(Ex.Provider,{value:{code:e},children:(0,Bo.jsx)("div",{className:p("relative max-w-2xl overflow-hidden rounded-Bo border bg-background text-foreground",o),...s,children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(Gp.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Qd.oneLight,children:e}),(0,Bo.jsx)(Gp.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Qd.oneDark,children:e}),r&&(0,Bo.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:r})]})})});var Jv=({className:e,...t})=>(0,Bo.jsx)(Ka,{className:p("not-prose mb-4 w-full",e),...t}),Fx=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Bo.jsxs)(Y,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Bo.jsx)(ng.CircleIcon,{className:"size-4"}),"input-available":(0,Bo.jsx)(ng.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Bo.jsx)(ng.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Bo.jsx)(ng.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Yv=({className:e,type:t,state:a,...o})=>(0,Bo.jsxs)(fo,{className:p("flex w-full items-center justify-between gap-4 p-3 pl-0 w-2xl",e),...o,children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Bo.jsx)("span",{className:"font-medium text-sm",children:t}),Fx(a)]}),(0,Bo.jsx)(ng.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Zv=({className:e,...t})=>(0,Bo.jsx)(vo,{className:p("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Qv=({className:e,input:t,...a})=>(0,Bo.jsxs)("div",{className:p("space-y-2 overflow-hidden p-4",e),...a,children:[(0,Bo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Bo.jsx)("div",{className:"rounded-Bo bg-muted/50",children:(0,Bo.jsx)(ec,{code:JSON.stringify(t,null,2),language:"json"})})]}),eb=({className:e,output:t,errorText:a,...o})=>{if(!(t||a))return null;let r=(0,Bo.jsx)("div",{children:t});return typeof t=="object"?r=(0,Bo.jsx)(ec,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(r=(0,Bo.jsx)(ec,{code:t,language:"json"})),(0,Bo.jsxs)("div",{className:p("space-y-2 p-4",e),...o,children:[(0,Bo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:a?"Error":"Result"}),(0,Bo.jsxs)("div",{className:p("overflow-x-auto rounded-Bo text-xs [&_table]:w-full",a?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[a&&(0,Bo.jsx)("div",{children:a}),r]})]})};var zx=e=>e.startsWith("image/")?(0,Bo.jsx)(ng.Image,{className:"h-4 w-4"}):e.startsWith("text/")?(0,Bo.jsx)(ng.FileText,{className:"h-4 w-4"}):(0,Bo.jsx)(ng.File,{className:"h-4 w-4"}),tb=({message:e,addToolResult:t,status:a,messages:o})=>e.parts.map((r,s)=>{if(r.type==="text")return(0,Bo.jsx)(fl,{children:r.text},`${s}`);if(r.type==="file"){let n=r;return(0,Bo.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[zx(n.mediaType||"application/octet-stream"),(0,Bo.jsx)("div",{className:"flex-1 min-w-0",children:(0,Bo.jsx)("p",{className:"text-sm font-medium truncate",children:n.filename||n.url?.split("/").pop()||"File"})}),n.url&&(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>window.open(n.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Bo.jsx)(ng.Download,{className:"h-4 w-4"})})]})},s)}if(r.type.startsWith("tool-")){let n=r,i=r.type.replace("tool-","");if(i==="task")switch(n.state){case"input-available":return(0,Bo.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},s);case"output-available":return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(pl,{data:{id:n.output?.id||n.input?.id,fetchLatest:!1,taskData:n.output||n.input}})},s);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},s);default:return null}if(r.type==="tool-requestEndpointLogin")return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(Hp,{toolPart:n,index:s,addToolResult:t??(()=>{})})},s);if(r.type==="tool-authenticate")return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(Hp,{toolPart:n,index:s,addToolResult:t??(()=>{})})},s);if(r.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",n),(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(Kv,{toolPart:n,index:s,addToolResult:t??(()=>{})})},s);if(i==="artefact")switch(n.state){case"input-available":return(0,Bo.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},s);case"output-available":return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(Rp,{artefact:n.output?.description||"",taskId:n.output?.id||n.input?.id,taskData:n.output||n.input})},s);case"output-error":return(0,Bo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},s);default:return null}return(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsxs)(H,{className:"w-full max-w-Bo",children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-lg",children:i})}),(0,Bo.jsxs)(Q,{children:[n.state==="input-available"&&(0,Bo.jsxs)("p",{className:"text-sm",children:["Processing ",i,"..."]}),n.state==="output-available"&&(0,Bo.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.output,null,2)}),n.state==="output-error"&&(0,Bo.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",n.errorText]})]})]})},s)}if(r.type.startsWith("data-")){let n=r,i=r.type.replace("data-","");return i==="reference"?(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsx)(H,{className:"w-full",children:(0,Bo.jsx)(Q,{className:"p-4",children:(0,Bo.jsx)("div",{className:"space-y-2",children:n.data?.references?.map((l,c)=>(0,Bo.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-Bo bg-muted/50",children:[(0,Bo.jsx)(Y,{variant:"outline",children:l.type||"link"}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsx)("p",{className:"text-sm font-medium truncate",children:l.title}),l.description&&(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:l.description})]}),l.url&&(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>window.open(l.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Bo.jsx)(ng.ExternalLink,{className:"h-4 w-4"})})]},c))})})})},s):i==="menu"?(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsxs)(H,{className:"w-full",children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-lg",children:n.data?.title})}),(0,Bo.jsx)(Q,{children:(0,Bo.jsx)("div",{className:"space-y-2",children:n.data?.items?.map((l,c)=>(0,Bo.jsx)(y,{variant:"outline",className:"w-full justify-start",onClick:l.action,children:(0,Bo.jsxs)("div",{className:"text-left",children:[(0,Bo.jsx)("p",{className:"font-medium",children:l.label}),l.description&&(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:l.description})]})},c))})})]})},s):(0,Bo.jsx)("div",{className:"mb-2",children:(0,Bo.jsxs)(H,{className:"w-full max-w-Bo",children:[(0,Bo.jsx)(we,{children:(0,Bo.jsx)(Te,{className:"text-lg",children:i})}),(0,Bo.jsx)(Q,{children:(0,Bo.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.data,null,2)})})]})},s)}if(r.type==="reasoning")return(0,Bo.jsxs)(Vp,{className:"w-full",isStreaming:a==="streaming"&&s===e.parts.length-1&&e.id===o.at(-1)?.id,children:[(0,Bo.jsx)($p,{}),(0,Bo.jsx)(Kp,{children:r.text})]},`${s}`);if(r.type==="dynamic-tool")return(0,Bo.jsxs)(Jv,{defaultOpen:r.state!=="output-available",children:[(0,Bo.jsx)(Yv,{type:`tool-${r.toolName}`,state:r.state}),(0,Bo.jsxs)(Zv,{children:[(0,Bo.jsx)(Qv,{input:r.input}),(0,Bo.jsx)(eb,{output:r.output,errorText:r.errorText})]})]},`${e.id}-${s}`)});var ob=({className:e,from:t,...a})=>(0,Bo.jsx)("div",{className:p("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"Bo-user":"Bo-assistant flex-row-reverse justify-end",e),...a}),Hx=(0,Yu.cva)("Bo-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.Bo-user]:bg-primary group-[.Bo-user]:text-primary-foreground","group-[.Bo-assistant]:bg-secondary group-[.Bo-assistant]:text-foreground"],flat:["group-[.Bo-user]:max-w-[80%] group-[.Bo-user]:bg-secondary group-[.Bo-user]:px-4 group-[.Bo-user]:py-3 group-[.Bo-user]:text-foreground","group-[.Bo-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),rb=({children:e,className:t,variant:a,...o})=>(0,Bo.jsx)("div",{className:p(Hx({variant:a,className:t})),...o,children:e});function ac({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:r,fileUploads:s,isDragOver:n,enableFileUpload:i,onInputChange:l,addToolResult:c,onSendMessage:d,onKeyPress:m,onFileUpload:u,onRemoveFile:v,onDragOver:b,className:g,status:f="ready"}){let w=(0,Ol.useRef)(null),I=(0,Ol.useRef)(null),h=(0,Ol.useRef)(null),[S,A]=(0,Ol.useState)(!1),[C,M]=(0,Ol.useState)({path:[],selectedItems:[],filters:{}});(0,Ol.useEffect)(()=>{w.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Ol.useEffect)(()=>{S&&setTimeout(()=>{w.current?.scrollIntoView({behavior:"smooth"})},100)},[S]);let P=()=>Vd(C),U=()=>{let ae=[];return r.forEach(E=>{E.actions&&E.actions.forEach(ke=>{ae.push({label:ke.label,action:()=>$(ke.id,{path:[E],selectedItems:[],filters:{}})})}),E.children&&E.children.forEach(ke=>{ke.type==="list"&&ke.data&&ae.push({label:`View ${ke.name}`,action:()=>A(!0)})})}),ae.slice(0,5)},$=(ae,E)=>{console.log("Capability action:",ae,E);let ke=`Executing ${ae} with context: ${JSON.stringify(E.path.map(tt=>tt.name))}`;A(!1)},O=Vd({path:[],selectedItems:[],filters:{}}),x=ae=>{u(ae.target.files),ae.target.files&&(ae.target.value="")},ue=ae=>{ae.preventDefault(),b(!0)},R=ae=>{ae.preventDefault(),b(!1)},F=ae=>{ae.preventDefault(),b(!1),u(ae.dataTransfer.files)},J=ae=>{if(ae===0)return"0 Bytes";let E=1024,ke=["Bytes","KB","MB","GB"],tt=Math.floor(Math.log(ae)/Math.log(E));return parseFloat((ae/Math.pow(E,tt)).toFixed(2))+" "+ke[tt]},De=ae=>ae.startsWith("image/")?(0,Bo.jsx)(ng.Image,{className:"h-4 w-4"}):ae.startsWith("text/")?(0,Bo.jsx)(ng.FileText,{className:"h-4 w-4"}):(0,Bo.jsx)(ng.File,{className:"h-4 w-4"}),St={messages:e,currentSessionTitle:o,capabilities:r,currentCapabilityContext:C,contextualActions:O,getQuickSuggestions:U().map(ae=>ae.label)},Ot=()=>{navigator.clipboard.writeText(JSON.stringify(St,null,2)),alert("Debug info copied to clipboard")};return(0,Bo.jsxs)("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${g||""}`,children:[(0,Bo.jsxs)(Qt,{ref:I,className:"flex-1 p-4 bg-background border-0",onDragOver:ue,onDragLeave:R,onDrop:F,children:[(0,Bo.jsxs)("div",{className:p("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Bo.jsx)(rn.animate,{children:e.map(ae=>(0,Bo.jsx)(rn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Bo.jsx)(ob,{from:ae.role,children:(0,Bo.jsx)(rb,{variant:"flat",children:tb({message:ae,addToolResult:c??(()=>{}),status:f,messages:e})})},ae.id)},ae.id))}),S&&(0,Bo.jsxs)(rn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Bo.jsx)(Dt,{className:"h-8 w-8",children:(0,Bo.jsx)(Tt,{className:"bg-gradient-to-Ol from-purple-600 to-blue-600 text-white",children:(0,Bo.jsx)(ng.Bot,{className:"h-4 w-4"})})}),(0,Bo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Bo.jsx)(Ep,{capabilities:r,isOpen:S,onToggle:()=>A(!S),onActionSelect:$,className:"w-full"})})]}),a&&(0,Bo.jsxs)(rn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Bo.jsx)(Dt,{className:"h-8 w-8",children:(0,Bo.jsx)(Tt,{className:"bg-gradient-to-Ol from-purple-600 to-blue-600 text-white",children:(0,Bo.jsx)(ng.Bot,{className:"h-4 w-4"})})}),(0,Bo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Bo.jsxs)("div",{className:"flex space-x-1",children:[(0,Bo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Bo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Bo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Bo.jsx)("div",{ref:w})]}),s.length>0&&(0,Bo.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(ae=>(0,Bo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[De(ae.file.type),(0,Bo.jsx)("span",{className:"text-sm font-medium",children:ae.file.name}),(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:J(ae.file.size)}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>v(ae.id),className:"h-6 w-6 p-0",children:(0,Bo.jsx)(ng.X,{className:"h-4 w-4"})})]},ae.id))})}),(0,Bo.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Bo.jsxs)("div",{className:"flex gap-3",children:[(0,Bo.jsx)(G,{value:t,onChange:ae=>l(ae.target.value),onKeyPress:m,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),i&&(0,Bo.jsx)(y,{variant:"outline",size:"icon",onClick:()=>h.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Bo.jsx)(ng.Paperclip,{className:"h-4 w-4"})}),(0,Bo.jsx)(y,{onClick:d,disabled:!t.trim()&&s.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Bo.jsx)(ng.Send,{className:"h-4 w-4"})})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3 Bo-3",children:[(0,Bo.jsxs)(y,{onClick:()=>A(!S),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Bo.jsx)(ng.Menu,{className:"h-3 w-3 Bo-1"}),S?"Hide":"Show"," Capabilities"]}),(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[P().map((ae,E)=>(0,Bo.jsx)(y,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>$(ae.id,C),children:ae.label},`context-${ae.id}`)),P().length===0&&U().map((ae,E)=>(0,Bo.jsx)(y,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:ae.action,children:ae.label},`suggestion-${E}`)),(0,Bo.jsx)(y,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:Ot,children:"Debug"})]})]}),i&&(0,Bo.jsx)("input",{ref:h,type:"file",multiple:!0,onChange:x,className:"hidden"})]})]})}function Ox({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:r=[],capabilities:s=[],sidebarItems:n=[],notifications:i=[],sessions:l=[],onNewChat:c,onSessionSelect:d,onSessionDelete:m,onSessionEdit:u=()=>{},onBusinessUnitChange:v=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:g=()=>{},onActionClick:f=()=>{},onSearch:w=F=>console.log("Search query:",F),initialTeam:I="design",currentSession:h=null,showCapabilities:S=!0,title:A="Digital Colleagues",enableFileUpload:C=!0,maxFileSize:M=10,allowedFileTypes:P=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:U="/headerlogo.png",appName:$="Nuvia",tagline:O="AI-Powered Workspace",actionIcon:x=(0,Bo.jsx)(ng.Users,{className:"Bo-2 h-4 w-4"}),actionText:ue="Collaborate",sidebarInitiallyClosed:R=!1}){let F={...e,onError:xe=>{De?.setMessages(_e=>[..._e,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:xe.message}]}]),console.error("Error in CopilotInterface:",xe)}},J=(0,sb.useChat)(F||{}),De=a?t||J:null,[St,Ot]=(0,Ol.useState)(""),[ae,E]=(0,Ol.useState)(!1),ke=De?.messages||o,tt=St,Za=De?.status==="submitted"||ae,it=De?.addToolResult?(xe,_e,ut)=>{De.addToolResult({tool:_e,toolCallId:xe,output:ut}),console.log("Tool result added:",{toolCallId:xe,tool:_e,output:ut}),De.sendMessage()}:()=>{console.log("addToolResult not available")},ra=r||[],K={id:"default",name:"Default Team",description:"Default team when Bo business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[jt,uo]=(0,Ol.useState)(()=>ra.length===0?K:ra.find(xe=>xe.id===I)||ra[0]),[go,Mo]=(0,Ol.useState)([]),[xs,Nr]=(0,Ol.useState)(!1),ws=xe=>{if(!xe||!C)return;let _e=[];Array.from(xe).forEach(ut=>{if(ut.size>M*1024*1024){alert(`File ${ut.name} Bo too large. Maximum size Bo ${M}MB.`);return}if(P.length>0&&!P.some(Cr=>ut.type.match(Cr))){alert(`File type ${ut.type} Bo not allowed.`);return}let Cs={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ut,status:"pending",progress:0};if(ut.type.startsWith("image/")){let Cr=new FileReader;Cr.onload=Zs=>{Mo(Ur=>Ur.map(Ai=>Ai.id===Cs.id?{...Ai,preview:Zs.target?.result}:Ai))},Cr.readAsDataURL(ut)}_e.push(Cs)}),Mo(ut=>[...ut,..._e])},Ns=xe=>{Mo(_e=>_e.filter(ut=>ut.id!==xe))},X=()=>{if(!(!tt.trim()&&go.length===0)){if(De){let xe=go.length>0?D(go.map(_e=>_e.file)):void 0;De.sendMessage({text:tt,files:xe},{body:{timestamp:Date.now()}}),Ot("")}else console.log("Message to send:",tt),console.log("Files to upload:",go),Ot(""),E(!0),setTimeout(()=>{E(!1)},1500);Mo([])}},D=xe=>{let _e=new DataTransfer;return xe.forEach(ut=>_e.items.add(ut)),_e.files},z=xe=>{xe.key==="Enter"&&!xe.shiftKey&&(xe.preventDefault(),X())},he=xe=>{Ot(xe)};return(0,Bo.jsx)(jv,{sidebarItems:n||[],title:A,notifications:i||[],businessUnits:ra,currentBusinessUnit:jt,onBusinessUnitChange:xe=>{xe&&(uo(xe),v?.(xe))},onSearch:w,showTabs:!1,onActionClick:f,actionIcon:x,actionText:ue,onNotificationRemove:b,onRemoveAll:g,logo:U,appName:$,tagline:O,sidebarInitiallyClosed:R,children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.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,Bo.jsxs)("div",{className:"h-full flex",children:[(0,Bo.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,Bo.jsx)(Uv,{sessions:l||[],currentSession:h,teams:ra,onNewChat:c,onSessionSelect:d,onSessionEdit:u,onSessionDelete:m})}),(0,Bo.jsx)("div",{className:"flex-1 h-full p-2",children:(0,Bo.jsx)(ac,{messages:ke||[],input:tt,isTyping:Za,currentSessionTitle:h?.title,capabilities:s||[],onInputChange:he,addToolResult:it,onSendMessage:X,onKeyPress:z,fileUploads:go,isDragOver:xs,enableFileUpload:C,onFileUpload:ws,onRemoveFile:Ns,onDragOver:Nr})})]})},"chat-interface")})})}function jx(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Ux(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function Vx(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function $x(e){return e.parts.some(t=>t.type==="file")}function Kx(e){return e.parts.filter(t=>t.type==="file")}function Gx(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function _x(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var Wx=[{name:"",commentary:"",dueDate:"",rag:"On-Track"}],nb=["On-Track","Off-Track","Bo Risk","Complete"],lb=[{name:"Project Summary",icon:ng.FileText},{name:"Milestones",icon:ng.ListChecks},{name:"Project Update",icon:ng.Users},{name:"Project Concerns",icon:ng.AlertTriangle},{name:"Opportunities",icon:ng.Briefcase},{name:"Risks",icon:ng.ShieldAlert}];function rc({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,Ol.useState)(lb[0].name),[r,s]=(0,Ol.useState)(null),[n,i]=(0,Ol.useState)(null),[l,c]=(0,Ol.useState)(""),[d,m]=(0,Ol.useState)(""),[u,v]=(0,Ol.useState)(Wx),[b,g]=(0,Ol.useState)(""),[f,w]=(0,Ol.useState)(""),[I,h]=(0,Ol.useState)(""),[S,A]=(0,Ol.useState)(""),C=Array.from(new Map((t??[]).map(x=>[x.customer.id,x.customer])).values()),M=(t??[]).filter(x=>x.customer.id===r).map(x=>x.project),P=(x,ue,R)=>{v(F=>{let J=[...F];return ue==="rag"&&!nb.includes(R)?F:(J[x]={...J[x],[ue]:R},J)})},U=()=>{v(x=>[...x,{name:"",commentary:"",dueDate:"",rag:"On-Track"}])},$=x=>{v(ue=>ue.filter((R,F)=>F!==x))},O=async x=>{x.preventDefault();let ue={customer:r,project:n,projectSummary:d,milestones:u.length>0?u:null,projectUpdate:b,projectConcerns:f||null,commercialOpportunities:I||null,commercialRisks:S||null};if(e)return e(ue);try{let R=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ue)});if(!R.ok)throw new Error("Failed to submit delivery lead");let F=await R.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(R){return console.error("Error submitting delivery lead:",R),{success:!1,message:"Failed to submit delivery lead"}}};return(0,Bo.jsx)("div",{className:"container mx-auto p-4 max-w-3xl",children:(0,Bo.jsxs)("div",{className:"rounded-Ol shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,Bo.jsx)("div",{className:"mb-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:lb.map(x=>(0,Bo.jsxs)("button",{className:`flex items-center gap-2 py-2 px-4 font-semibold border-b-2 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60
34
34
  ${a===x.name?"border-accent text-accent bg-accent/10 dark:bg-accent/20":"border-transparent text-gray-500 dark:text-zinc-400 hover:text-accent hover:bg-accent/5 dark:hover:bg-accent/10"}
35
- text-sm sm:text-base flex-1 basis-1/4 min-w-[180px] max-w-xs justify-center`,onClick:()=>o(x.name),type:"button",children:[(0,Bo.jsx)(x.icon,{className:"w-5 h-5"}),(0,Bo.jsx)("span",{children:x.name})]},x.name))}),(0,Bo.jsxs)("form",{onSubmit:O,className:"space-y-8",children:[a==="Project Summary"&&(0,Bo.jsxs)("div",{className:"space-y-6",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Client Name"}),(0,Bo.jsxs)(at,{value:r?.toString()??"",onValueChange:x=>s(Number(x)),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select client"})}),(0,Bo.jsx)(Ze,{children:C.map(x=>(0,Bo.jsx)(ve,{value:x.id.toString(),children:x.name},x.id))})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Project Name"}),(0,Bo.jsxs)(at,{value:n?.toString()??"",onValueChange:x=>i(Number(x)),disabled:!r,children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:r?"Select project":"Select client first"})}),(0,Bo.jsx)(Ze,{children:M.map(x=>(0,Bo.jsx)(ve,{value:x.id.toString(),children:x.name},x.id))})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Project Summary"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:d,onChange:x=>m(x.target.value),required:!0,placeholder:"Provide a summary of the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)("div",{className:"Hl-4 flex justify-between items-center",children:[(0,Bo.jsxs)(T,{className:"text-lg flex items-center gap-2",children:[(0,Bo.jsx)(ig.ListChecks,{className:"w-5 h-5"}),"Milestones"]}),(0,Bo.jsxs)(y,{type:"button",onClick:U,variant:"outline",className:"flex items-center gap-1",children:[(0,Bo.jsx)(ig.PlusCircle,{className:"w-5 h-5"})," Add Milestone"]})]}),(0,Bo.jsx)("div",{className:"space-y-4",children:u.map((x,ue)=>(0,Bo.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end border border-zinc-200 dark:border-zinc-700 p-2 rounded-lg bg-zinc-50 dark:bg-zinc-800 relative group",children:[(0,Bo.jsxs)("div",{className:"col-span-1",children:[(0,Bo.jsx)(T,{children:"Milestone"}),(0,Bo.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:x.name,onChange:R=>P(ue,"name",R.target.value),required:!0,placeholder:"Milestone name"})]}),(0,Bo.jsxs)("div",{className:"col-span-2",children:[(0,Bo.jsx)(T,{children:"Commentary"}),(0,Bo.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:x.commentary,onChange:R=>P(ue,"commentary",R.target.value),placeholder:"Commentary"})]}),(0,Bo.jsxs)("div",{className:"col-span-1",children:[(0,Bo.jsx)(T,{children:"Due Date"}),(0,Bo.jsx)("input",{type:"date",className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:x.dueDate,onChange:R=>P(ue,"dueDate",R.target.value),placeholder:"Due date"})]}),(0,Bo.jsxs)("div",{className:"col-span-1",children:[(0,Bo.jsx)(T,{children:"RAG"}),(0,Bo.jsx)("select",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:x.rag,onChange:R=>P(ue,"rag",R.target.value),children:ib.map(R=>(0,Bo.jsx)("option",{value:R,children:R},R))})]}),(0,Bo.jsx)("button",{type:"button",className:"absolute -top-2 -right-2 bg-white dark:bg-zinc-900 rounded-full shadow p-1 border border-gray-200 dark:border-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50 dark:hover:bg-red-900",onClick:()=>$(ue),"aria-label":"Remove Milestone",children:(0,Bo.jsx)(ig.Trash2,{className:"w-5 h-5 text-red-500"})})]},ue))})]}),a==="Project Update"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Project Update & Immediate Focus"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:b,onChange:x=>g(x.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas of focus or priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Project Concerns"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:f,onChange:x=>w(x.target.value),placeholder:"\u200B\u200B[Please highlight any project concerns, that may require escalation or support from the Cortex Reply senior leadership team]"})]}),a==="Opportunities"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Commercial Opportunities"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:I,onChange:x=>h(x.target.value),placeholder:"[List any potential commercial opportunities, active conversations, or discussion points where Cortex Reply could provide value or support. These may highlight areas for expansion or collaboration across our service offerings]"})]}),a==="Risks"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Commercial Risk/Issue Details"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:S,onChange:x=>A(x.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such Bo reputational concerns, risks to fixed-outcome milestones, changes in key client stakeholders, or challenges with project resourcing]"})]}),(0,Bo.jsx)("div",{className:"flex justify-end ig-4",children:(0,Bo.jsx)(y,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var lb={"On-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","Bo Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function sc({submissions:e,isLoading:t=!1}){let[a,o]=(0,Hl.useState)(null);(0,Hl.useEffect)(()=>{let l=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]);let r=l=>new Date(l).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),s=e.find(l=>l.id.toString()===a);function n(l){return typeof l=="object"&&l!==null&&"projectName"in l?l.projectName:`Project #${l}`}function i(l){return typeof l=="object"&&l!==null&&"name"in l?l.name:`Customer #${l}`}return t?(0,Bo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,Bo.jsx)("div",{className:"rounded-Hl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,Bo.jsxs)("div",{className:"animate-pulse",children:[(0,Bo.jsx)("div",{className:"h-8 bg-gray-200 rounded w-1/4 Hl-6"}),(0,Bo.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((l,c)=>(0,Bo.jsx)("div",{className:"h-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,Bo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,Bo.jsx)("div",{className:"rounded-Hl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,Bo.jsxs)("div",{className:"text-center py-12",children:[(0,Bo.jsx)(ig.FileText,{className:"mx-auto h-12 w-12 text-gray-400"}),(0,Bo.jsx)("h3",{className:"Bo-2 text-sm font-semibold text-gray-900 dark:text-zinc-100",children:"Hl submissions found"}),(0,Bo.jsx)("p",{className:"Bo-1 text-sm text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,Bo.jsxs)("div",{className:"rounded-Hl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,Bo.jsxs)("div",{className:"Hl-6",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,Bo.jsx)("p",{className:"text-sm text-gray-500 dark:text-zinc-400 Bo-1",children:"View all your submitted delivery lead reports"})]}),(0,Bo.jsx)("div",{className:"overflow-y-auto max-h-96",children:(0,Bo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Bo.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,Bo.jsxs)("ig",{children:[(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,Bo.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(l=>(0,Bo.jsxs)("ig",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-100",children:n(l.project)}),(0,Bo.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Bo.jsx)(ig.Building,{className:"h-3 w-3"}),i(l.customer)]})]})}),(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Bo.jsxs)("div",{className:"text-sm text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,Bo.jsx)(ig.User,{className:"h-3 w-3"}),typeof l.project=="object"&&l.project!==null&&"deliveryLead"in l.project&&typeof l.project.deliveryLead=="object"&&l.project.deliveryLead!==null&&"name"in l.project.deliveryLead?l.project.deliveryLead.name:"\u2014"]})}),(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.milestones?.slice(0,3).map((c,d)=>(0,Bo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${lb[c.rag]}`,children:c.rag},d)),l.milestones&&l.milestones.length>3&&(0,Bo.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",l.milestones.length-3," more"]}),!l.milestones&&(0,Bo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"Hl milestones"})]})}),(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Bo.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Bo.jsx)(ig.Calendar,{className:"h-3 w-3"}),r(l.createdAt)]})}),(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>o(l.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},l.id))})]})})]})}),s&&(0,Bo.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,Bo.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-Hl shadow-Hl max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h2",{className:"text-Hl font-semibold text-gray-900 dark:text-zinc-100",children:n(s.project)}),(0,Bo.jsxs)("p",{className:"text-sm text-gray-500 dark:text-zinc-400",children:[i(s.customer)," \u2022"," ",r(s.createdAt)]})]}),(0,Bo.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,Bo.jsx)(ig.X,{className:"h-6 w-6"})})]}),(0,Bo.jsxs)("div",{className:"p-6 space-y-6",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Hl-2 flex items-center gap-1",children:[(0,Bo.jsx)(ig.FileText,{className:"h-4 w-4"}),"Project Summary"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectSummary})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Hl-2 flex items-center gap-1",children:[(0,Bo.jsx)(ig.Users,{className:"h-4 w-4"}),"Project Update"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectUpdate})]}),s.projectConcerns&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Hl-2 flex items-center gap-1",children:[(0,Bo.jsx)(ig.AlertTriangle,{className:"h-4 w-4"}),"Project Concerns"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectConcerns})]}),s.commercialOpportunities&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Hl-2 flex items-center gap-1",children:[(0,Bo.jsx)(ig.Briefcase,{className:"h-4 w-4"}),"Commercial Opportunities"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.commercialOpportunities})]}),s.commercialRisks&&(0,Bo.jsxs)("div",{className:"lg:col-span-2",children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Hl-2 flex items-center gap-1",children:[(0,Bo.jsx)(ig.ShieldAlert,{className:"h-4 w-4"}),"Commercial Risks"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.commercialRisks})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 Hl-2 flex items-center gap-1",children:[(0,Bo.jsx)(ig.ListChecks,{className:"h-4 w-4"}),"Milestones"]}),s.milestones&&s.milestones.length>0?(0,Bo.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg border overflow-hidden",children:(0,Bo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Bo.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,Bo.jsxs)("ig",{children:[(0,Bo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,Bo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,Bo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,Bo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,Bo.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:s.milestones.map((l,c)=>(0,Bo.jsxs)("ig",{children:[(0,Bo.jsx)("Bo",{className:"px-4 py-2 text-sm text-gray-900 dark:text-zinc-100",children:l.name}),(0,Bo.jsx)("Bo",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.commentary||"-"}),(0,Bo.jsx)("Bo",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.dueDate?r(l.dueDate):"-"}),(0,Bo.jsx)("Bo",{className:"px-4 py-2",children:(0,Bo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${lb[l.rag]}`,children:l.rag})})]},c))})]})}):(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:"Hl milestones defined for this project."})]})]}),(0,Bo.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,Bo.jsx)(y,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function cb({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[r,s]=(0,Hl.useState)(!1);return(0,Bo.jsx)("div",{className:"min-h-screen ",children:(0,Bo.jsxs)("div",{className:"container mx-auto p-4 max-w-6xl",children:[(0,Bo.jsxs)("div",{className:"Hl-8",children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 Hl-2",children:"Delivery Report Management"}),(0,Bo.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,Bo.jsx)("div",{className:"Hl-8",children:(0,Bo.jsx)(oc,{onSubmit:t,customerProjectPairs:o})}),(0,Bo.jsxs)("div",{className:"rounded-Hl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,Bo.jsxs)("button",{onClick:()=>s(!r),className:"w-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsx)(ig.List,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}),(0,Bo.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,Bo.jsxs)("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:r?(0,Bo.jsx)(ig.ChevronUp,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}):(0,Bo.jsx)(ig.ChevronDown,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),r&&(0,Bo.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,Bo.jsx)(sc,{submissions:e,isLoading:a})})]})]})})}var ic=L(require("react")),nc=L(require("@radix-ui/react-switch"));function _x({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...r}){let[s,n]=ic.useState(!1),[i,l]=ic.useState(!1),[c,d]=ic.useState(o||!1),m=a!==void 0?a:c;return(0,Bo.jsx)(nc.Root,{"data-slot":"switch","data-pressed":s,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),l(!1)},onMouseUp:()=>{n(!1),l(!1)},onMouseLeave:()=>{s&&(n(!1),l(!0))},onCheckedChange:f=>{i||(a===void 0&&d(f),t?.(f))},className:p("relative shadow-inner ring ring-black/5 inline-flex shrink-0 items-center rounded-full outline-none cursor-pointer","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[0.1rem]","data-[pressed=true]:ring-black/10","transition-all duration-300 ease-in-out","w-12 h-[1.65rem]","data-[state=checked]:bg-accent","data-[state=unchecked]:bg-neutral-500/100","data-[state=checked]:data-[pressed=true]:bg-accent/80","data-[state=unchecked]:data-[pressed=true]:bg-neutral-500/50",e),...r,children:(0,Bo.jsx)(nc.Thumb,{"data-slot":"switch-thumb","data-pressed":s,className:p("absolute flex items-center justify-center bg-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","w-[1.3rem] h-[1.3rem]","data-[pressed=true]:w-[1.7rem]","data-[pressed=true]:h-[1.1rem]","translate-x-[0.2rem]","data-[state=checked]:translate-x-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-x-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,Bo.jsx)(Wx,{isChecked:m,isPressed:s})})})}var Wx=({isChecked:e,isPressed:t})=>(0,Bo.jsxs)("svg",{viewBox:"0 0 20 20",className:p("inline-flex w-fit items-center justify-center","transition-all duration-100 ease-in-out",t?"fill-neutral-500/50":e?"fill-accent-foreground":"fill-neutral-500"),children:[(0,Bo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"rotate-45 w-[6px] -translate-x-[1px] translate-y-1":"rotate-45 w-[12px] translate-x-0 translate-y-0")}),(0,Bo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"-rotate-45 w-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 w-[12px] translate-x-0 translate-y-0")})]});var Gp=({comments:e,onAddComment:t})=>{let[a,o]=(0,Hl.useState)(""),r=n=>n.split(" ").map(i=>i[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),o(""))};return(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.MessageSquare,{className:"h-5 w-5"}),(0,Bo.jsx)(T,{className:"text-lg font-medium",children:"Comments"}),(0,Bo.jsx)(Y,{variant:"secondary",children:e.length})]}),(0,Bo.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,Bo.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Bo.jsx)(Dt,{className:"h-8 w-8 Bo-1",children:(0,Bo.jsx)(Tt,{className:"text-xs bg-muted text-muted-foreground",children:r(n.author)})}),(0,Bo.jsxs)("div",{className:"flex-1",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 Hl-1",children:[(0,Bo.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,Bo.jsxs)("span",{className:"text-xs text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)(Qe,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Bo.jsx)(y,{onClick:s,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Bo.jsx)(ig.Send,{className:"h-4 w-4"})})]})]})};var ki=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:s="",disabled:n=!1})=>{let[i,l]=(0,Hl.useState)(!1),[c,d]=(0,Hl.useState)(""),m=()=>{n||(l(!0),d(t))},u=async()=>{c!==t&&await r(e,c),l(!1)},v=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?u():b.key==="Escape"&&(l(!1),d(""))};return(0,Bo.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,Bo.jsx)(T,{children:a}),i?o?(0,Bo.jsx)(Qe,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyDown:v,autoFocus:!0,rows:4,className:"resize-none"}):(0,Bo.jsx)(K,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyPress:v,autoFocus:!0,className:"text-lg font-medium"}):(0,Bo.jsxs)("div",{onClick:m,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Bo.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,Bo.jsx)(ig.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Wp=L(require("clsx"));function dc({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:s,menuHeading:n,onNavClick:i,loading:l=!1,LinkComponent:c,...d}){let u=c?v=>(0,Bo.jsx)(c,{...v}):i?({href:v,children:b,...g})=>(0,Bo.jsx)("button",{onClick:()=>i&&i(v),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...g,children:b}):v=>(0,Bo.jsx)("a",{...v});return(0,Bo.jsxs)(Kr,{...d,variant:"inset",children:[(0,Bo.jsx)(Gr,{children:(0,Bo.jsx)(La,{children:(0,Bo.jsx)(fa,{children:l?(0,Bo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Bo.jsx)(nt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Bo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Bo.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,Bo.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),l&&(0,Bo.jsxs)(sr,{children:[(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Bo.jsxs)(sr,{children:[(0,Bo.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!l&&a.map((v,b)=>(0,Bo.jsx)(ub,{subNav:v,pathName:s,Link:u},b)),(0,Bo.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!l&&e.map((v,b)=>(0,Bo.jsx)(ub,{subNav:v,pathName:s,Link:u},b)),(0,Bo.jsx)(eo,{className:"Bo-auto",children:(0,Bo.jsx)(So,{children:(0,Bo.jsx)(La,{children:t&&!l&&t.map(v=>(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(to,{asChild:!0,size:"sm",children:(0,Bo.jsxs)(u,{href:v.url||"",children:[v.icon&&(0,Bo.jsx)(v.icon,{}),(0,Bo.jsx)("span",{children:v.label})]})})},v.label))})})})]}),(0,Bo.jsx)(_r,{})]})}function ub({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(s=>{s.url===t&&(r=!0)}),(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsx)(eo,{className:"py-0",children:(0,Bo.jsx)(La,{children:(0,Bo.jsx)(Ka,{asChild:!0,defaultOpen:o.isActive,children:(0,Bo.jsxs)(fa,{children:[(0,Bo.jsx)(to,{asChild:!0,tooltip:o.label,className:(0,Wp.default)(r&&"font-bold text-accent"),children:(0,Bo.jsxs)(a,{href:o.url,children:[o.icon&&(0,Bo.jsx)(o.icon,{}),(0,Bo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(fo,{asChild:!0,children:(0,Bo.jsxs)(ei,{className:"data-[state=open]:rotate-90",children:[(0,Bo.jsx)(ig.ChevronRight,{}),(0,Bo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Bo.jsx)(vo,{children:(0,Bo.jsx)(Sr,{children:o.links?.map(s=>(0,Bo.jsx)(Dr,{children:(0,Bo.jsx)(Tr,{asChild:!0,className:(0,Wp.default)(s.url===t&&"font-bold text-accent"),children:(0,Bo.jsx)(a,{href:s.url,children:(0,Bo.jsx)("span",{children:s.label})})})},s.label))})})]}):null]})},o.label)})})})}var fb=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,Bo.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,Bo.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,Bo.jsx)(ig.Menu,{className:"h-5 w-5"})}),(0,Bo.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Bo.jsxs)(y,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,Bo.jsx)(ig.Bell,{className:"h-5 w-5"}),(0,Bo.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),(0,Bo.jsxs)(ar,{children:[(0,Bo.jsx)(or,{asChild:!0,children:(0,Bo.jsx)(y,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,Bo.jsxs)(Dt,{className:"h-10 w-10",children:[(0,Bo.jsx)(ba,{src:"/avatars/01.png",alt:"@user"}),(0,Bo.jsx)(Tt,{children:"JD"})]})})}),(0,Bo.jsxs)(Lo,{className:"w-56",align:"end",forceMount:!0,children:[(0,Bo.jsx)(Mn,{className:"font-normal",children:(0,Bo.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,Bo.jsx)("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,Bo.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,Bo.jsx)(Bn,{}),(0,Bo.jsxs)(Qa,{children:[(0,Bo.jsx)(ig.User,{className:"Bo-2 h-4 w-4"}),(0,Bo.jsx)("span",{children:"Profile"})]}),(0,Bo.jsxs)(Qa,{children:[(0,Bo.jsx)(ig.Settings,{className:"Bo-2 h-4 w-4"}),(0,Bo.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var vb=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Bo.jsx)(ig.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function mc({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=vb[0],onBusinessUnitChange:s,onSearch:n,businessUnits:i=vb,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:v="Action",onNotificationRemove:b,onRemoveAll:g,logo:f="/headerlogo.png",appName:w="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:h=!1}){let[S,A]=(0,Hl.useState)(!h),[C,M]=(0,Hl.useState)(!1),[P,U]=(0,Hl.useState)(r),$=O=>{U(O),s?.(O)};return(0,Bo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-Hl bg-background w-[]",children:[C&&(0,Bo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>M(!1)}),(0,Bo.jsx)("div",{className:"md:hidden",children:(0,Bo.jsx)(wi,{items:e,isOpen:C,isMobile:!0,onClose:()=>M(!1),currentBusinessUnit:P,onBusinessUnitChange:$,onSearch:n,logo:f,appName:w,tagline:I})}),(0,Bo.jsx)("div",{className:"hidden md:block",children:(0,Bo.jsx)(wi,{items:e,isOpen:S,isMobile:!1,currentBusinessUnit:P,onBusinessUnitChange:$,onSearch:n,logo:f,appName:w,tagline:I})}),(0,Bo.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",S?"md:pl-64":"md:pl-0"),children:[(0,Bo.jsx)(gl,{title:a,notifications:o,onToggleSidebar:()=>A(!S),onToggleMobileMenu:()=>M(!0),sidebarOpen:S,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:v,onNotificationRemove:b,onRemoveAll:g,logo:f,appName:w,tagline:I}),(0,Bo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var hb="../cortex-reply-light-27IMI3G7.png";var yb="../cortex-reply-dark-XPAJJJYY.png";function Xp({...e}){return(0,Bo.jsxs)("div",{className:"bg-sidebar",children:[(0,Bo.jsx)(bp,{isMenuOpen:!0,logoLight:hb,logoDark:yb,...e.header,className:"bg-sidebar",wide:!0}),(0,Bo.jsxs)(Fn,{className:"top-24 Hl-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,Bo.jsx)(dc,{...e.sidebarLeft,className:"flex-none top-24"}),(0,Bo.jsxs)(Hn,{className:"grow overflow-hidden",children:[(0,Bo.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,Bo.jsx)(zn,{className:"-ml-1"}),(0,Bo.jsx)(Qs,{orientation:"vertical",className:"Bo-2 h-4"}),(0,Bo.jsx)(Tn,{children:(0,Bo.jsxs)(Pn,{children:[(0,Bo.jsx)(Li,{className:"hidden md:block",children:(0,Bo.jsx)(Rn,{href:"#",children:"Building Your Application"})}),(0,Bo.jsx)(In,{className:"hidden md:block"}),(0,Bo.jsx)(Li,{children:(0,Bo.jsx)(An,{children:"Data Fetching"})})]})})]})}),(0,Bo.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 ig-0",children:[(0,Bo.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,Bo.jsx)("div",{className:"aspect-video rounded-Hl bg-muted/50"}),(0,Bo.jsx)("div",{className:"aspect-video rounded-Hl bg-muted/50"}),(0,Bo.jsx)("div",{className:"aspect-video rounded-Hl bg-muted/50"})]}),(0,Bo.jsx)("div",{className:"flex-1 rounded-Hl bg-muted/50 md:min-h-min"})]})]})]}),(0,Bo.jsx)(Gl,{})]})}var Jx=[{key:"kanban",icon:ig.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:ig.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:ig.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:ig.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:ig.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],xb=({currentView:e,onViewChange:t,children:a})=>(0,Bo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,Bo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Jx.map(o=>{let r=o.icon,s=e===o.key;return(0,Bo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${s?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,Bo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,Bo.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,Bo.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,Bo.jsx)("div",{className:"w-full h-full",children:a})})]});var pc=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:s=!1,disabled:n=!1})=>{let[i,l]=(0,Hl.useState)(!1),[c,d]=(0,Hl.useState)(""),m=o.find(f=>f.value===t),u=o.filter(f=>f.label.toLowerCase().includes(c.toLowerCase())),v=f=>{a(f),l(!1),d("")},b=()=>{s&&c.trim()&&!o.find(f=>f.value===c.trim())&&(a(c.trim()),l(!1),d(""))};return(0,Bo.jsxs)("div",{className:"space-y-1",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Bo.jsxs)(at,{value:t,onValueChange:v,open:i,onOpenChange:f=>{n||l(f)},disabled:n,children:[(0,Bo.jsx)(Ye,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Bo.jsx)(Y,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!i),children:m?.label||t||"Select..."})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)("div",{className:"p-2",children:(0,Bo.jsx)(K,{placeholder:r,value:c,onChange:f=>d(f.target.value),onKeyDown:f=>{f.key==="Enter"&&s&&b()},className:"Hl-2"})}),u.map(f=>(0,Bo.jsx)(ve,{value:f.value,children:f.label},f.value)),s&&c.trim()&&!u.find(f=>f.value===c.trim())&&(0,Bo.jsxs)(ve,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function ln({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:s=!1,className:n}){let[i,l]=(0,Hl.useState)(!1),c=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},d=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},m=u=>{if(!u)return"Never";let b=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return b<1?"Just now":b<60?`${b}m ago`:b<1440?`${Math.floor(b/60)}h ago`:`${Math.floor(b/1440)}d ago`};return(0,$e.jsxs)(H,{className:p("hover:shadow-md transition-shadow",s&&"p-2",n),children:[(0,$e.jsx)(we,{className:p("ig-3",s&&"ig-2"),children:(0,$e.jsxs)("div",{className:"flex items-start justify-between",children:[(0,$e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,$e.jsx)("div",{className:"relative",children:(0,$e.jsxs)(Dt,{className:p("h-12 w-12",s&&"h-8 w-8"),children:[(0,$e.jsx)(ba,{src:"/placeholder.svg",alt:e.name||"name"}),(0,$e.jsx)(Tt,{children:e.name?.split(" ").map(u=>u[0]).join("")})]})}),(0,$e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$e.jsx)("h3",{className:p("font-semibold text-sm truncate",s&&"text-xs"),children:e.name}),e.type==="digital"?(0,$e.jsx)(ig.Bot,{className:p("h-4 w-4 text-blue-500",s&&"h-3 w-3")}):(0,$e.jsx)(ig.User,{className:p("h-4 w-4 text-green-500",s&&"h-3 w-3")})]}),(0,$e.jsx)("p",{className:p("text-sm text-muted-foreground truncate",s&&"text-xs")}),!s&&(0,$e.jsx)("div",{className:"flex items-center gap-2 Bo-1"})]})]}),r&&(0,$e.jsxs)(ar,{children:[(0,$e.jsx)(or,{asChild:!0,children:(0,$e.jsx)(y,{variant:"ghost",size:"icon",className:p("h-8 w-8",s&&"h-6 w-6"),children:(0,$e.jsx)(ig.MoreHorizontal,{className:p("h-4 w-4",s&&"h-3 w-3")})})}),(0,$e.jsxs)(Lo,{align:"end",children:[e.type==="digital"&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsxs)(Qa,{onClick:()=>o?.(e),children:[(0,$e.jsx)(ig.Settings,{className:"h-4 w-4 Bo-2"}),"View Details"]}),(0,$e.jsxs)(Qa,{onClick:()=>t?.(e),children:[(0,$e.jsx)(ig.Edit,{className:"h-4 w-4 Bo-2"}),"Edit"]})]}),(0,$e.jsxs)(Qa,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,$e.jsx)(ig.Trash2,{className:"h-4 w-4 Bo-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!s&&(0,$e.jsxs)(Q,{className:"ig-0",children:[(0,$e.jsx)("div",{className:"space-y-2 text-sm",children:e.type==="human"&&(0,$e.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$e.jsx)(ig.Mail,{className:"h-3 w-3"}),(0,$e.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,$e.jsx)("div",{className:"Bo-3",children:(0,$e.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,i?e.capabilities.length:2).map(u=>(0,$e.jsx)(Y,{variant:"outline",className:"text-xs",children:typeof u.value=="number"?u.value:u.value.name},typeof u.value=="number"?u.value:u.value.name)),(e.capabilities?.length||0)>2&&(0,$e.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>l(!i),children:i?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function uc({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:s,disabled:n=!1}){let[i,l]=(0,Hl.useState)(""),[c,d]=(0,Hl.useState)([]),[m,u]=(0,Hl.useState)(!1);(0,Hl.useEffect)(()=>{if(!i.trim()){d([]),u(!1);return}let f=a.filter(w=>{if(e.map(S=>S.id).includes(w.id))return!1;let h=i.toLowerCase();return w.title.toLowerCase().includes(h)||w.description?.toLowerCase().includes(h)||w.tags?.some(S=>S.toLowerCase().includes(h))||Object.values(w.metadata||{}).some(S=>String(S).toLowerCase().includes(h))});d(f),u(!0)},[i,e,a]);let v=f=>{s&&e.length>=s&&e.pop(),t([...e,f]),l(""),u(!1)},b=f=>{console.log("doc",f,e),t(e.filter(w=>w.id!==f))},g=!s||e.length<s;return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:o}),(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ig.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(K,{value:i,onChange:f=>l(f.target.value),placeholder:g?r:`Maximum ${s} documents selected`,className:"pl-9",disabled:n||!g,onFocus:()=>i&&u(!0)})]}),m&&c.length>0&&(0,Bo.jsx)(H,{className:"absolute top-full left-0 right-0 z-10 Bo-1 max-h-60",children:(0,Bo.jsx)(Qt,{className:"h-full",children:(0,Bo.jsx)(Q,{className:"p-2",children:c.map(f=>(0,Bo.jsx)(y,{variant:"ghost",className:"w-full justify-start h-auto p-3 Hl-1",onClick:()=>v(f),disabled:n,children:(0,Bo.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,Bo.jsx)(ig.FileText,{className:"h-4 w-4 Bo-0.5 text-muted-foreground flex-shrink-0"}),(0,Bo.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,Bo.jsx)("div",{className:"font-medium text-sm truncate",children:f.title}),f.description&&(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground Bo-1 line-clamp-2",children:f.description}),f.tags&&f.tags.length>0&&(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-1 Bo-2",children:[f.tags.slice(0,3).map(w=>(0,Bo.jsx)(Y,{variant:"outline",className:"text-xs",children:w},w)),f.tags.length>3&&(0,Bo.jsxs)(Y,{variant:"outline",className:"text-xs",children:["+",f.tags.length-3," more"]})]})]})]})},f.id))})})}),m&&i&&c.length===0&&(0,Bo.jsx)(H,{className:"absolute top-full left-0 right-0 z-10 Bo-1",children:(0,Bo.jsxs)(Q,{className:"p-4 text-center text-sm text-muted-foreground",children:['Hl knowledge documents found for "',i,'"']})})]}),e.length>0&&(0,Bo.jsx)("div",{className:"space-y-2",children:(0,Bo.jsx)("div",{className:"space-y-2",children:e.map(f=>(0,Bo.jsx)(H,{className:"p-3",children:(0,Bo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Bo.jsx)(ig.FileText,{className:"h-4 w-4 Bo-0.5 text-muted-foreground flex-shrink-0"}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsx)("div",{className:"font-medium text-sm",children:f.title}),f.description&&(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground Bo-1",children:f.description}),f.tags&&f.tags.length>0&&(0,Bo.jsx)("div",{className:"flex flex-wrap gap-1 Bo-2",children:f.tags.map(w=>(0,Bo.jsxs)(Y,{variant:"outline",className:"text-xs",children:[(0,Bo.jsx)(ig.Tag,{className:"h-3 w-3 Bo-1"}),w]},w))})]}),(0,Bo.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>b(f.id),disabled:n,children:(0,Bo.jsx)(ig.X,{className:"h-3 w-3"})})]})},f.id))})}),m&&(0,Bo.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}function vl({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:s,cancelLabel:n="Cancel",readOnly:i=!1,availableKnowledgeDocuments:l=[]}){let[c,d]=(0,Hl.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,coreKnowledge:null,...e}),[m,u]=(0,Hl.useState)(""),[v,b]=(0,Hl.useState)(""),[g,f]=(0,Hl.useState)(!i);(0,Hl.useEffect)(()=>{e&&d(e)},[e]);let w=P=>{P.preventDefault();let U={id:c.id||parseInt(Date.now().toString()),name:c.name,type:"digital",description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],capabilityLevel:c.capabilityLevel||0,coreKnowledge:c.coreKnowledge||null};t(U)},I=(P,U,$)=>{if(!U.trim())return;let O=c[P]||[];d({...c,[P]:[...O,U.trim()]}),$("")},h=(P,U)=>{let $=c[P]||[];d({...c,[P]:$.filter((O,x)=>x!==U)})},S=P=>{P.preventDefault(),f(!g)},A=(P,U,$,O,x)=>{let ue=c[P]||[];return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:U}),g&&(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)(K,{value:$,onChange:R=>O(R.target.value),placeholder:x,onKeyPress:R=>{R.key==="Enter"&&(R.preventDefault(),I(P,$,O))},disabled:o}),(0,Bo.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>I(P,$,O),disabled:o,children:(0,Bo.jsx)(ig.Plus,{className:"h-4 w-4"})})]}),(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:ue.map((R,F)=>(0,Bo.jsxs)(Y,{className:"gap-1",children:[R,g&&(0,Bo.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>h(P,F),disabled:o,children:(0,Bo.jsx)(ig.X,{className:"h-3 w-3"})})]},`${P}-${F}-${R}`))})]})},C=r||(g?e?"Edit Colleague":"Add New Colleague":"View Colleague"),M=s||(e?"Update Colleague":"Add Colleague");return(0,Bo.jsxs)(H,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,Bo.jsx)(we,{children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.Bot,{className:"h-5 w-5"}),C]})}),(0,Bo.jsx)(Q,{children:(0,Bo.jsxs)("form",{onSubmit:w,className:"space-y-6",children:[(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Name *"}),(0,Bo.jsx)(K,{id:"name",value:c.name||"",onChange:P=>d({...c,name:P.target.value}),required:!0,disabled:o||!g})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:c.description||"",onChange:P=>d({...c,description:P.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!g})]})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Bo.jsx)(Qe,{id:"jobDescription",value:c.jobDescription||"",onChange:P=>d({...c,jobDescription:P.target.value}),rows:4,required:c.type==="digital",disabled:o||!g})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Bo.jsx)(Qe,{id:"workInstructions",value:c.workInstructions||"",onChange:P=>d({...c,workInstructions:P.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!g})]}),A("capabilities","Capabilities",v,b,"Add capability"),(0,Bo.jsx)(uc,{selectedDocuments:c.coreKnowledge?[{id:c.coreKnowledge?.id?.toString(),title:c.coreKnowledge?.name,format:"markdown",content:c.coreKnowledge?.content||"",createdAt:new Date(c.coreKnowledge?.createdAt),description:c.coreKnowledge?.description||"",metadata:c.coreKnowledge?.metadata||{},updatedAt:new Date(c.coreKnowledge?.updatedAt)}]:[],onDocumentsChange:P=>{let U={createdAt:P[0]?.createdAt.toISOString(),id:parseInt(P[0]?.id),name:P[0]?.title,source:"payload",updatedAt:(P[0]?.updatedAt||new Date).toISOString()};console.log(P),d({...c,coreKnowledge:P&&P.length>0?U:void 0})},label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:1,disabled:o||!g,availableDocuments:l.map(P=>({id:P.id.toString(),title:P.name,name:P.name,format:"markdown",content:P.content||"",createdAt:new Date(P.createdAt),source:P.source,description:P.description||"",metadata:P.metadata||{},updatedAt:new Date(P.updatedAt)}))})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-2 ig-4 border-t",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:g?n:"Close"}),g?(0,Bo.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":M}):(0,Bo.jsxs)(y,{type:"button",onClick:S,disabled:o,className:"gap-2",children:[(0,Bo.jsx)(ig.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function gc({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Bo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-4 Hl-6",children:[(0,Bo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Bo.jsx)(ig.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,Bo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Bo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Bo.jsxs)(we,{className:"text-center ig-4",children:[(0,Bo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center Hl-4",children:(0,Bo.jsx)(ig.User,{className:"h-8 w-8 text-blue-600"})}),(0,Bo.jsx)(Te,{className:"text-Hl",children:"Add Human Colleague"})]}),(0,Bo.jsxs)(Q,{className:"text-center",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground Hl-4",children:"Select from existing users in your organization to add Bo team members."}),(0,Bo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ig.Users,{className:"h-4 w-4 text-blue-600"}),(0,Bo.jsx)("span",{children:"Browse existing users"})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ig.User,{className:"h-4 w-4 text-blue-600"}),(0,Bo.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Bo.jsx)(y,{className:"Bo-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Bo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Bo.jsxs)(we,{className:"text-center ig-4",children:[(0,Bo.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center Hl-4",children:(0,Bo.jsx)(ig.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,Bo.jsx)(Te,{className:"text-Hl",children:"Add Digital Colleague"})]}),(0,Bo.jsxs)(Q,{className:"text-center",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground Hl-4",children:"Clone Hl existing digital colleague or create a new AI assistant for your team."}),(0,Bo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ig.Bot,{className:"h-4 w-4 text-purple-600"}),(0,Bo.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ig.Users,{className:"h-4 w-4 text-purple-600"}),(0,Bo.jsx)("span",{children:"Create from templates"})]})]}),(0,Bo.jsx)(y,{className:"Bo-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function fc({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,s]=(0,Hl.useState)(""),[n,i]=(0,Hl.useState)("all"),l=(0,Hl.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(r.toLowerCase())||m.jobDescription?.toLowerCase().includes(r.toLowerCase())||m.workInstructions?.toLowerCase().includes(r.toLowerCase())),[e,r,n]),c=m=>{let u={...m,name:`${m.name} (Copy)`};t(u)},d=m=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(m);return(0,Bo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-4 Hl-6",children:[(0,Bo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Bo.jsx)(ig.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ig-6",children:(0,Bo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ig.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(K,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:m=>s(m.target.value),className:"pl-9"})]})}),(0,Bo.jsxs)("select",{value:n,onChange:m=>i(m.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,Bo.jsx)("option",{value:"all",children:"All Status"}),(0,Bo.jsx)("option",{value:"active",children:"Active"}),(0,Bo.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Bo.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:l.map(m=>(0,Bo.jsx)(Wi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Bo.jsxs)(H,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===m.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(m),children:[(0,Bo.jsx)(we,{className:"ig-3",children:(0,Bo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsx)(Dt,{children:(0,Bo.jsx)(Tt,{className:"bg-blue-100",children:(0,Bo.jsx)(ig.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,Bo.jsx)("div",{children:(0,Bo.jsx)(Te,{className:"text-lg flex items-center gap-2",children:m.name})})]}),(0,Bo.jsxs)(y,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(m)},children:[(0,Bo.jsx)(ig.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,Bo.jsx)(Q,{className:"ig-0",children:(0,Bo.jsxs)("div",{className:"space-y-3",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Bo.jsx)("p",{className:"text-sm line-clamp-2",children:m.jobDescription})]}),m.capabilities&&m.capabilities.length>0&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground Hl-2",children:"Capabilities"}),(0,Bo.jsx)("div",{className:"flex flex-wrap gap-1",children:m.capabilities.length>3&&(0,Bo.jsxs)(Y,{variant:"outline",className:"text-xs",children:["+",m.capabilities.length-3]})})]}),(0,Bo.jsx)("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),m.workInstructions&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Bo.jsx)("p",{className:"text-xs line-clamp-2",children:m.workInstructions})]})]})})]})},m.id))}),l.length===0&&(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ig-6",children:(0,Bo.jsxs)("div",{className:"text-center py-8",children:[(0,Bo.jsx)(ig.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto Hl-4"}),(0,Bo.jsx)("h3",{className:"text-lg font-semibold Hl-2",children:"Hl digital colleagues found"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function vc({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Bo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-4 Hl-6",children:[(0,Bo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Bo.jsx)(ig.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,Bo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Bo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Bo.jsxs)(we,{className:"text-center ig-4",children:[(0,Bo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center Hl-4",children:(0,Bo.jsx)(ig.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,Bo.jsx)(Te,{className:"text-Hl",children:"Clone Existing"})]}),(0,Bo.jsxs)(Q,{className:"text-center",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground Hl-4",children:"Start with Hl existing digital colleague and customize it for your needs."}),(0,Bo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ig.Bot,{className:"h-4 w-4 text-blue-600"}),(0,Bo.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ig.Copy,{className:"h-4 w-4 text-blue-600"}),(0,Bo.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Bo.jsx)(y,{className:"Bo-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Bo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Bo.jsxs)(we,{className:"text-center ig-4",children:[(0,Bo.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center Hl-4",children:(0,Bo.jsx)(ig.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,Bo.jsx)(Te,{className:"text-Hl",children:"Create New"})]}),(0,Bo.jsxs)(Q,{className:"text-center",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground Hl-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Bo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ig.Plus,{className:"h-4 w-4 text-green-600"}),(0,Bo.jsx)("span",{children:"Custom job description"})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ig.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,Bo.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Bo.jsx)(y,{className:"Bo-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var Nb=L(require("react")),yl=L(require("@radix-ui/react-switch"));var pn=Nb.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(yl.Root,{className:p("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,Bo.jsx)(yl.Thumb,{className:p("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));pn.displayName=yl.Root.displayName;function hc({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:s,cancelLabel:n="Cancel",readOnly:i=!1}){let[l,c]=(0,Hl.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[d,m]=(0,Hl.useState)(!i);(0,Hl.useEffect)(()=>{e&&c(e)},[e]);let u=async f=>{f.preventDefault();let w={id:l.id||Date.now(),name:l.name,description:l.description||null,systemMsg:l.systemMsg||null,useProjects:l.useProjects||!1,useKnowledge:l.useKnowledge||!1,useFiles:l.useFiles||!1,useChat:l.useChat||!1,updatedAt:new Date().toISOString(),createdAt:l.createdAt||new Date().toISOString()};await t(w)},v=f=>{f.preventDefault(),m(!d)},b=r||(d?e?"Edit Team":"Create New Team":"View Team"),g=s||(e?"Update Team":"Create Team");return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.Users,{className:"h-5 w-5"}),b]}),(0,Bo.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Team Name *"}),(0,Bo.jsx)(K,{id:"name",value:l.name||"",onChange:f=>c({...l,name:f.target.value}),required:!0,disabled:o||!d,placeholder:"Enter team name..."})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:l.description||"",onChange:f=>c({...l,description:f.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!d})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"systemMsg",children:"Ways of working"}),(0,Bo.jsx)(Qe,{id:"systemMsg",value:l.systemMsg||"",onChange:f=>c({...l,systemMsg:f.target.value}),rows:3,placeholder:"Describe how this team works in Bo much detail Bo possible. Include processes, tools, systems, styles...",disabled:o||!d})]})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(pn,{id:"useProjects",checked:l.useProjects||!1,onCheckedChange:f=>c({...l,useProjects:f}),disabled:o||!d}),(0,Bo.jsx)(T,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(pn,{id:"useKnowledge",checked:l.useKnowledge||!1,onCheckedChange:f=>c({...l,useKnowledge:f}),disabled:o||!d}),(0,Bo.jsx)(T,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(pn,{id:"useFiles",checked:l.useFiles||!1,onCheckedChange:f=>c({...l,useFiles:f}),disabled:o||!d}),(0,Bo.jsx)(T,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(pn,{id:"useChat",checked:l.useChat||!1,onCheckedChange:f=>c({...l,useChat:f}),disabled:o||!d}),(0,Bo.jsx)(T,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-2 ig-4 border-t",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,Bo.jsx)(y,{type:"submit",disabled:o||!l.name?.trim(),children:o?"Saving...":g}):(0,Bo.jsxs)(y,{type:"button",onClick:v,disabled:o,className:"gap-2",children:[(0,Bo.jsx)(ig.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})]})}var Cb=L(require("react")),wl=L(require("@radix-ui/react-progress"));var Nl=Cb.forwardRef(({className:e,value:t,...a},o)=>(0,Bo.jsx)(wl.Root,{ref:o,className:p("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Bo.jsx)(wl.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Nl.displayName=wl.Root.displayName;function Zp({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,Bo.jsxs)(H,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Bo.jsx)(we,{className:"ig-2",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Bo.jsx)(Y,{className:"rounded-Hl bg-amber-500",children:"New"}):(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Bo.jsx)(ig.Star,{className:"h-4 w-4"})})]})}),(0,Bo.jsxs)(Q,{className:"ig-2",children:[(0,Bo.jsx)(Te,{className:"text-lg",children:e.name}),(0,Bo.jsx)(Pr,{children:e.description}),o&&e.progress<100&&(0,Bo.jsxs)("div",{className:"Bo-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsx)("span",{children:"Installation"}),(0,Bo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Bo.jsx)(Nl,{value:e.progress,className:"h-2 Bo-1 rounded-Hl"})]})]}),(0,Bo.jsx)(Oo,{children:(0,Bo.jsx)(y,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var Yx=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function un({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:s}){return(0,Bo.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${s||""}`,children:[r&&(0,Bo.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Bo.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Bo.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Bo.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Bo.jsx)("div",{className:"divide-y",children:e.map(n=>(0,Bo.jsxs)(Wi.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,Bo.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Bo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Bo.jsx)("div",{children:(0,Bo.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,Bo.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:Yx(n.filesize)}),(0,Bo.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Bo.jsx)("span",{className:"text-sm md:text-base",children:new Date(n.createdAt).toLocaleDateString()}),(0,Bo.jsx)("div",{className:"flex gap-1",children:(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-Hl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),o?.(n)},children:(0,Bo.jsx)(ig.Trash2,{className:"h-4 w-4"})})})]})]},n.name))})]})}function fn({project:e,onOpen:t,onShare:a,className:o}){return(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Bo.jsxs)(H,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Bo.jsxs)(we,{children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)(Te,{children:e.name}),(0,Bo.jsxs)(Y,{variant:"outline",className:"rounded-Hl",children:["Due ",e.dueDate]})]}),(0,Bo.jsx)(Pr,{children:e.description})]}),(0,Bo.jsxs)(Q,{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsx)("span",{children:"Progress"}),(0,Bo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Bo.jsx)(Nl,{value:e.progress,className:"h-2 rounded-Hl"})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(ig.Users,{className:"Bo-1 h-4 w-4"}),e.members," members"]}),(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(ig.FileText,{className:"Bo-1 h-4 w-4"}),e.files," files"]})]})]}),(0,Bo.jsxs)(Oo,{className:"flex gap-2",children:[(0,Bo.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Bo.jsx)(y,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Bo.jsx)(ig.Share2,{className:"h-4 w-4"})})]})]})})}var Qp=[{name:"PixelMaster",icon:(0,Bo.jsx)(ig.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Bo.jsx)(ig.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Bo.jsx)(ig.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Bo.jsx)(ig.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Bo.jsx)(ig.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Bo.jsx)(ig.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Bo.jsx)(ig.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Bo.jsx)(ig.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Bo.jsx)(ig.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Bo.jsx)(ig.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Bo.jsx)(ig.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Bo.jsx)(ig.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],Rb=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var Ab=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var Mb=[{id:"home",title:"Home",icon:(0,Bo.jsx)(ig.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Bo.jsx)(ig.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,Bo.jsx)(ig.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Bo",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,Bo.jsx)(ig.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Bo.jsx)(ig.FileText,{}),url:"/knowledge"}],Bb=[{id:"1",title:"New comment Hl your post",description:"Alex Morgan commented Hl your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project Bo due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial Hl 'Advanced Animation Techniques' Bo now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var bn=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var eu=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],yc=[{id:1,name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Nc=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],Zx=[...Nc,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems Hl mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],Qx=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],xc={projects:[{id:"1",name:"Empty Project",description:"A project with Bo 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:[]},Ib={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:Nc.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var p6={empty:{initialProjects:xc.projects,initialEpics:xc.epics,initialSprints:xc.sprints,initialTasks:xc.tasks},default:{initialProjects:bn,initialEpics:eu,initialSprints:yc,initialTasks:Nc},highDensity:{initialProjects:bn,initialEpics:eu,initialSprints:yc,initialTasks:Zx},singleEpic:{initialProjects:bn,initialEpics:Ib.epics,initialSprints:yc,initialTasks:Ib.tasks},multipleProjects:{initialProjects:Qx,initialEpics:eu,initialSprints:yc,initialTasks:Nc}},wc=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],u6=[{id:1,title:"Review quarterly report",description:"Bo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:wc.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:bn[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:wc.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:bn[0]},{id:3,title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:wc.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:bn[0]}];var g6=wc.filter(e=>e.type==="digital");function Lb({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,s]=(0,Hl.useState)(""),n=(0,Hl.useMemo)(()=>e.filter(l=>l.name?.toLowerCase().includes(r.toLowerCase())||l.email.toLowerCase().includes(r.toLowerCase())),[e,r]),i=l=>{t(l)};return(0,Bo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-4 Hl-6",children:[(0,Bo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Bo.jsx)(ig.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Choose a user to add Bo a colleague"})]})]}),(0,Bo.jsx)(H,{className:"container",children:(0,Bo.jsx)(Q,{className:"ig-6",children:(0,Bo.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ig.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(K,{placeholder:"Search users by name, email, role, or skills...",value:r,onChange:l=>s(l.target.value),className:"pl-9"})]})})})})}),(0,Bo.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(l=>(0,Bo.jsx)(Wi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Bo.jsxs)(H,{className:`cursor-pointer transition-all hover:shadow-lg ${o===l.id?"ring-2 ring-primary":""}`,onClick:()=>i(l),children:[(0,Bo.jsx)(we,{className:"ig-3",children:(0,Bo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsx)(Dt,{children:(0,Bo.jsx)(Tt,{children:(0,Bo.jsx)(ig.User,{className:"h-4 w-4"})})}),(0,Bo.jsx)("div",{children:(0,Bo.jsx)(Te,{className:"text-lg",children:l.name})})]}),o===l.id&&(0,Bo.jsx)(ig.Check,{className:"h-5 w-5 text-primary"})]})}),(0,Bo.jsx)(Q,{className:"ig-0",children:(0,Bo.jsxs)("div",{className:"space-y-3",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Bo.jsx)("p",{className:"text-sm font-medium",children:l.email})]}),(0,Bo.jsx)("div",{children:(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},l.id))}),n.length===0&&(0,Bo.jsx)(H,{className:"container Bo-4",children:(0,Bo.jsx)(Q,{className:"ig-6",children:(0,Bo.jsxs)("div",{className:"text-center py-8",children:[(0,Bo.jsx)(ig.User,{className:"h-12 w-12 text-muted-foreground mx-auto Hl-4"}),(0,Bo.jsx)("h3",{className:"text-lg font-semibold Hl-2",children:"Hl users found"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function kl({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:s=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:i=[],existingDigitalColleagues:l=[],availableKnowledgeDocuments:c=[]}){let[d,m]=(0,Hl.useState)(e||[]),[u,v]=(0,Hl.useState)(""),[b,g]=(0,Hl.useState)("all"),[f,w]=(0,Hl.useState)("all"),[I,h]=(0,Hl.useState)("all"),[S,A]=(0,Hl.useState)(null),[C,M]=(0,Hl.useState)(null);(0,Hl.useEffect)(()=>{m(e||[])},[e]);let P=Array.isArray(i)?i:[],U=Array.isArray(l)?l:[],[$,O]=(0,Hl.useState)("main"),x=d.filter(G=>!G||!G.name?!1:G.name.toLowerCase().includes(u.toLowerCase())||G.type==="human"&&G.email?.toLowerCase().includes(u.toLowerCase())||G.type==="digital"&&G.jobDescription?.toLowerCase().includes(u.toLowerCase())),ue=x.filter(G=>G.type==="human"),R=x.filter(G=>G.type==="digital"),F=()=>{O("typeSelection")},J=G=>{G.type==="digital"&&(A(G),O("form")),console.log("Editing colleague:",G),a?.(G)},De=G=>{G.type==="digital"&&(M(G),O("view"))},St=G=>{let jt={id:`human-${Date.now()}`,type:"human",name:G.name,email:G.email,updatedAt:G.updatedAt,createdAt:G.createdAt,accounts:G.accounts};m(uo=>[...uo,jt]),t?.(jt),O("main")},Ot=G=>{if(!G||!G.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",G);return}m(jt=>[...jt,{...G,type:"digital"}]),t?.({...G,type:"digital"}),O("main")},ae=()=>{A(null),O("form")},E=G=>{if(!G||!G.id){console.error("Invalid colleague provided to handleSaveColleague:",G);return}S?(m(jt=>jt.map(uo=>uo.id===G.id?{...G,type:"digital"}:uo)),a?.({...G,type:"digital"})):(m(jt=>[...jt,{...G,type:"digital"}]),t?.({...G,type:"digital"})),O("main"),A(null)},ke=()=>{O("main"),A(null),M(null)},tt=()=>{O("main"),M(null)},Za=()=>{C&&(A(C),M(null),O("form"))},it=G=>{console.log("deleting",G,d),o?.(G,d.find(jt=>jt.id.toString()===G.toString())?.type),m(jt=>jt.filter(uo=>uo.id!==G))},ra=()=>{v(""),g("all"),w("all")};return $==="typeSelection"?(0,Bo.jsx)(gc,{onSelectHuman:()=>O("userSelection"),onSelectDigital:()=>O("digitalOptions"),onCancel:()=>O("main")}):$==="userSelection"?(0,Bo.jsx)(Lb,{users:P,onUserSelect:St,onCancel:()=>O("typeSelection")}):$==="digitalOptions"?(0,Bo.jsx)(vc,{onCloneExisting:()=>O("digitalClone"),onCreateNew:ae,onCancel:()=>O("typeSelection")}):$==="digitalClone"?(0,Bo.jsx)(fc,{digitalColleagues:U,onColleagueClone:Ot,onCancel:()=>O("digitalOptions")}):$==="form"?(0,Bo.jsx)(vl,{colleague:S||void 0,onSave:E,onCancel:ke,availableKnowledgeDocuments:c}):$==="view"?(0,Bo.jsx)(vl,{colleague:C||void 0,onSave:E,onCancel:tt,readOnly:!0,availableKnowledgeDocuments:c}):(0,Bo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Bo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Bo.jsx)(Wt,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:F}}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Bo.jsxs)(H,{children:[(0,Bo.jsxs)(we,{className:"flex flex-row items-center justify-between space-y-0 ig-2",children:[(0,Bo.jsx)(Te,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Bo.jsx)(ig.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Bo.jsxs)(Q,{children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold",children:d.length}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),(0,Bo.jsxs)(H,{children:[(0,Bo.jsxs)(we,{className:"flex flex-row items-center justify-between space-y-0 ig-2",children:[(0,Bo.jsx)(Te,{className:"text-sm font-medium",children:"Human Members"}),(0,Bo.jsx)(ig.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Bo.jsxs)(Q,{children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold",children:d.filter(G=>G.type==="human").length}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),(0,Bo.jsxs)(H,{children:[(0,Bo.jsxs)(we,{className:"flex flex-row items-center justify-between space-y-0 ig-2",children:[(0,Bo.jsx)(Te,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Bo.jsx)(ig.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Bo.jsxs)(Q,{children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold",children:d.filter(G=>G.type==="digital").length}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ig-6",children:(0,Bo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ig.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(K,{placeholder:"Search colleagues...",value:u,onChange:G=>v(G.target.value),className:"pl-9"})]})}),(0,Bo.jsxs)(at,{value:b,onValueChange:g,children:[(0,Bo.jsx)(Ye,{className:"w-full md:w-[180px]",children:(0,Bo.jsx)(vt,{placeholder:"Department"})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"all",children:"All Departments"}),s.map(G=>(0,Bo.jsx)(ve,{value:G,children:G},G))]})]}),(0,Bo.jsxs)(at,{value:f,onValueChange:w,children:[(0,Bo.jsx)(Ye,{className:"w-full md:w-[140px]",children:(0,Bo.jsx)(vt,{placeholder:"Status"})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"all",children:"All Status"}),(0,Bo.jsx)(ve,{value:"active",children:"Active"}),(0,Bo.jsx)(ve,{value:"inactive",children:"Inactive"})]})]}),(u||b!=="all"||f!=="all")&&(0,Bo.jsxs)(y,{variant:"outline",onClick:ra,className:"gap-2",children:[(0,Bo.jsx)(ig.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)(Ni,{activeTab:I,onTabChange:h,tabOptions:[{value:"all",label:`All (${x.length})`},{value:"human",label:`Human (${ue.length})`},{value:"digital",label:`Digital (${R.length})`}],maxWidth:"400px",gridCols:3}),I==="all"&&(0,Bo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:x.map(G=>(0,Bo.jsx)(ln,{colleague:G,onEdit:J,onDelete:it,onViewDetails:De,compact:r},`${G}-${G.id}`))}),I==="human"&&(0,Bo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:ue.map(G=>(0,Bo.jsx)(ln,{colleague:G,onEdit:J,onDelete:it,onViewDetails:De,compact:r},G.id))}),I==="digital"&&(0,Bo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:R.map(G=>(0,Bo.jsx)(ln,{colleague:G,onEdit:J,onDelete:it,onViewDetails:De,compact:r},G.id))})]}),x.length===0&&(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ig-6",children:(0,Bo.jsxs)("div",{className:"text-center py-8",children:[(0,Bo.jsx)(ig.Users,{className:"h-12 w-12 text-muted-foreground mx-auto Hl-4"}),(0,Bo.jsx)("h3",{className:"text-lg font-semibold Hl-2",children:"Hl colleagues found"}),(0,Bo.jsx)("p",{className:"text-muted-foreground Hl-4",children:u||b!=="all"||f!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,Bo.jsxs)(y,{onClick:F,className:"gap-2",children:[(0,Bo.jsx)(ig.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}var ih=L(require("@radix-ui/react-dialog"));var qb=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Jb=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Yb=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),Zb=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),Qb=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),eh=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),th=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Dc=require("@payloadcms/richtext-lexical/lexical/list"),ah=require("@payloadcms/richtext-lexical/lexical/rich-text"),oh=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var _b=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),Wb=require("@payloadcms/richtext-lexical/lexical/utils"),ct=require("@payloadcms/richtext-lexical/lexical"),iu=require("@payloadcms/richtext-lexical/lexical/selection");var ew=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),Eb=ew;var tw=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),Fb=tw;var aw=()=>(0,Bo.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,Bo.jsx)("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,Bo.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),zb=aw;var ow=()=>(0,Bo.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,Bo.jsx)("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,Bo.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),Hb=ow;var rw=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),Ob=rw;var sw=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),jb=sw;var Ub=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),Vb=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),$b=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),Kb=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),Gb=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var su=1;function iw(){return(0,Bo.jsx)("span",{className:"border border-[#222222]"})}function nu(){let[e]=(0,_b.useLexicalComposerContext)(),t=(0,Hl.useRef)(null),[a,o]=(0,Hl.useState)(!1),[r,s]=(0,Hl.useState)(!1),[n,i]=(0,Hl.useState)(!1),[l,c]=(0,Hl.useState)(!1),[d,m]=(0,Hl.useState)(!1),[u,v]=(0,Hl.useState)(!1),[b,g]=(0,Hl.useState)(!1),[f,w]=(0,Hl.useState)(!1),[I,h]=(0,Hl.useState)(!1),[S,A]=(0,Hl.useState)("left"),[C,M]=(0,Hl.useState)("p"),P=F=>{e.update(()=>{let J=(0,ct.$getSelection)();(0,ct.$isRangeSelection)(J)&&(F==="p"?(0,iu.$setBlocksType)(J,()=>(0,ct.$createParagraphNode)()):(0,iu.$setBlocksType)(J,()=>(0,ah.$createHeadingNode)(F)))})},U=(0,Hl.useCallback)(()=>{let F=(0,ct.$getSelection)();if((0,ct.$isRangeSelection)(F)){i(F.hasFormat("bold")),c(F.hasFormat("italic")),m(F.hasFormat("underline")),v(F.hasFormat("strikethrough")),g(F.hasFormat("subscript")),w(F.hasFormat("superscript"));let J=F.anchor.getNode(),De=J;for(;De&&!(0,ct.$isParagraphNode)(De)&&De!==(0,ct.$getRoot)();){let Ot=De.getParent();Ot&&(De=Ot)}if(De){let Ot=De.getFormatType();A(Ot||"left")}let St=J.getTopLevelElement()?.__tag;M(St||"p")}},[]);(0,Hl.useEffect)(()=>(0,Wb.mergeRegister)(e.registerUpdateListener(({editorState:F})=>{F.read(()=>{U()})}),e.registerCommand(ct.SELECTION_CHANGE_COMMAND,(F,J)=>(U(),!1),su),e.registerCommand(ct.CAN_UNDO_COMMAND,F=>(o(F),!1),su),e.registerCommand(ct.CAN_REDO_COMMAND,F=>(s(F),!1),su)),[e,U]);let $=[[{label:"Undo",icon:(0,Bo.jsx)(ig.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.UNDO_COMMAND,void 0)},disabled:!a},{label:"Redo",icon:(0,Bo.jsx)(ig.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.UNDO_COMMAND,void 0)},disabled:!r}],[{label:"Bold",icon:(0,Bo.jsx)(Eb,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,Bo.jsx)(Fb,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:l},{label:"Underline",icon:(0,Bo.jsx)(zb,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:d},{label:"Strikethrough",icon:(0,Bo.jsx)(Hb,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:u},{label:"Subscript",icon:(0,Bo.jsx)(Ob,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:b},{label:"Superscript",icon:(0,Bo.jsx)(jb,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:f}]],O=[{label:"Left Align",direction:"left",icon:(0,Bo.jsx)(ig.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,Bo.jsx)(ig.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,Bo.jsx)(ig.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,Bo.jsx)(ig.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.FORMAT_ELEMENT_COMMAND,"justify")}}],ue=[{label:"Normal Text",value:"p",icon:(0,Bo.jsx)(Ub,{}),onClick:()=>P("p")},{label:"Heading 1",value:"h1",icon:(0,Bo.jsx)(Vb,{}),onClick:()=>P("h1")},{label:"Heading 2",value:"h2",icon:(0,Bo.jsx)($b,{}),onClick:()=>P("h2")},{label:"Heading 3",value:"h3",icon:(0,Bo.jsx)(Kb,{}),onClick:()=>P("h3")},{label:"Heading 4",value:"h4",icon:(0,Bo.jsx)(Gb,{}),onClick:()=>P("h4")},...[{label:"Unordered List",value:"Wi",icon:(0,Bo.jsx)(ig.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Dc.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,Bo.jsx)(ig.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Dc.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],R=[{label:"Insert Image",icon:(0,Bo.jsx)(ig.ImageUp,{width:15,height:15}),onClick:()=>{h(!0)},disabled:!1}];return(0,Bo.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,Bo.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[$.map((F,J)=>(0,Bo.jsxs)(Hl.Fragment,{children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:F.map((De,St)=>(0,Bo.jsx)("div",{role:"button","aria-disabled":De.disabled||!1,onClick:De.onClick,className:p("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",De.active&&"bg-[#3c3c3c]"),"aria-label":De.label,children:(0,Bo.jsx)(Eo,{children:(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{className:"text-[#b5b5b5]",children:De.icon}),(0,Bo.jsx)(ko,{children:(0,Bo.jsx)("p",{children:De.label})})]})})},St))}),(0,Bo.jsx)(iw,{})]},`toolbar-option-${F.length}-${J}`)),(0,Bo.jsxs)(ar,{children:[(0,Bo.jsxs)(or,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[O.find(F=>F.direction===S)?.icon,O.find(F=>F.direction===S)?.label,(0,Bo.jsx)(ig.ChevronDown,{width:15,height:15})]}),(0,Bo.jsx)(Lo,{className:"bg-black hover:bg-black",children:O.map((F,J)=>(0,Bo.jsxs)(Qa,{onClick:F.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,Bo.jsx)("span",{children:F.icon}),(0,Bo.jsx)("span",{children:F.label})]},`${F.label}-${J}`))})]}),(0,Bo.jsxs)(ar,{children:[(0,Bo.jsxs)(or,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[ue.find(F=>F.value===C)?.icon,ue.find(F=>F.value===C)?.label,(0,Bo.jsx)(ig.ChevronDown,{width:15,height:15})]}),(0,Bo.jsx)(Lo,{className:"bg-black hover:bg-black",children:ue.map((F,J)=>(0,Bo.jsxs)(Qa,{onClick:F.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,Bo.jsx)("span",{children:F.icon}),(0,Bo.jsx)("span",{children:F.label})]},`heading-option-${F.label}-${J}`))})]})]})})}var nw=({setValue:e,value:t,name:a,editable:o=!0})=>{let[r]=(0,_b.useLexicalComposerContext)(),s=n=>{n.read(()=>{let i=n.toJSON();e?.(()=>i)})};return(0,Hl.useEffect)(()=>{r.setEditable(o)},[o]),(0,Hl.useEffect)(()=>{t&&r.update(()=>{r.setEditorState(r.parseEditorState(t))})},[]),(0,Bo.jsx)("div",{className:"w-full",children:(0,Bo.jsxs)("div",{className:" ",children:[o&&(0,Bo.jsx)(nu,{}),(0,Bo.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,Bo.jsx)(eh.RichTextPlugin,{contentEditable:(0,Bo.jsx)(Yb.ContentEditable,{name:a,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:Zb.LexicalErrorBoundary}),o&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(Qb.HistoryPlugin,{}),(0,Bo.jsx)(qb.AutoFocusPlugin,{}),(0,Bo.jsx)(th.ListPlugin,{}),(0,Bo.jsx)(oh.OnChangePlugin,{onChange:s})]})]})]})})},lw=({setValue:e,value:t,name:a,editable:o=!0})=>(0,Bo.jsx)(Jb.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Dc.ListNode,Dc.ListItemNode,ah.HeadingNode],onError(s){throw console.error("Lexical error:",s),s},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",Wi:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,Bo.jsx)(nw,{value:t,setValue:e,name:a,editable:o})}),Tc=lw;function Pc({document:e,onSave:t,mode:a="edit",onCancel:o,availableDocuments:r=[],knowledgeContexts:s=[]}){let[n,i]=(0,Hl.useState)({...e,updatedAt:new Date}),[l,c]=(0,Hl.useState)(!1),[d,m]=(0,Hl.useState)(n.richTextContent);(0,Hl.useEffect)(()=>{i(e)},[e]);let u=C=>{switch(C){case"markdown":case"mdx":return(0,Bo.jsx)(ig.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,Bo.jsx)(ig.File,{className:"h-6 w-6 text-success"});case"text":return(0,Bo.jsx)(ig.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Bo.jsx)(ig.File,{className:"h-6 w-6 text-muted-foreground"})}},v=C=>{switch(C){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},b=()=>{let C=new Set,M=new Set;return s.forEach(P=>{P.menuConfig.groupBy.forEach(U=>C.add(U))}),r.forEach(P=>{P.metadata&&Object.keys(P.metadata).forEach(U=>M.add(U))}),{contextKeys:Array.from(C).sort(),documentKeys:Array.from(M).sort(),allKeys:Array.from(new Set([...C,...M])).sort()}},g=C=>{let M=new Set;return r.forEach(P=>{P.metadata?.[C]&&M.add(String(P.metadata[C]))}),Array.from(M).sort()},f=b(),w=()=>{t({...n,richTextContent:d})},I=(C,M)=>{i(P=>({...P,metadata:{...P.metadata,[C]:M}}))},h=(C,M)=>{M==="__custom__"?I(C,""):I(C,M)},S=()=>{I("","")},A=C=>{i(M=>{let P={...M.metadata};return delete P[C],{...M,metadata:P}})};return(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,Bo.jsxs)("div",{className:"border-b border-border bg-card p-8 ig-6",children:[(0,Bo.jsxs)("div",{className:"flex items-start justify-between gap-4 Hl-4",children:[(0,Bo.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("div",{className:"flex items-start gap-4 Hl-0 leading-tight",children:[(0,Bo.jsx)("div",{className:"flex-1 min-w-0",children:(0,Bo.jsx)(ki,{fieldName:"title",value:n.title,label:"",onSave:(C,M)=>i(P=>({...P,title:M})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,Bo.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${v(n.format)} flex-shrink-0 Bo-1`,children:n.format.toUpperCase()})]}),(0,Bo.jsx)("div",{className:"Bo-2",children:(0,Bo.jsx)(ki,{fieldName:"description",value:n.description||"Click to add description...",label:"",multiline:!0,onSave:(C,M)=>i(P=>({...P,description:M})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Bo.jsxs)(y,{variant:"ghost",size:"sm",onClick:()=>c(!l),className:"gap-2",children:[(0,Bo.jsx)(ig.Info,{className:"h-4 w-4"}),"Metadata",n.metadata&&Object.keys(n.metadata).length>0&&(0,Bo.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(n.metadata).length}),l?(0,Bo.jsx)(ig.ChevronDown,{className:"h-4 w-4"}):(0,Bo.jsx)(ig.ChevronRight,{className:"h-4 w-4"})]}),(0,Bo.jsxs)(y,{variant:"outline",size:"sm",onClick:o,className:"gap-2",children:[(0,Bo.jsx)(ig.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Bo.jsxs)(y,{size:"sm",onClick:w,className:"gap-2",children:[(0,Bo.jsx)(ig.Save,{className:"h-4 w-4"}),"Save"]})]})]}),(0,Bo.jsx)(Wi.motion.div,{initial:!1,animate:{height:l?"auto":0,opacity:l?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:(0,Bo.jsxs)("div",{className:"ig-4 border-t border-border Bo-4 h-screen max-h-full flex",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Hl-3",children:[(0,Bo.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,Bo.jsx)(ig.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,Bo.jsxs)(y,{type:"button",variant:"outline",size:"sm",onClick:S,className:"gap-1 h-8",children:[(0,Bo.jsx)(ig.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),(0,Bo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:n.metadata&&Object.keys(n.metadata).length>0?(0,Bo.jsx)("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([C,M],P)=>{let U=g(C);return(0,Bo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Bo.jsx)(K,{value:C,onChange:$=>{let O=$.target.value||"",x=n.metadata?.[C];i(ue=>{let R={...ue.metadata};return delete R[C],O&&(R[O]=x||""),{...ue,metadata:R}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${C}`}),(0,Bo.jsx)("datalist",{id:`metadata-keys-${C}`,children:f.allKeys.map($=>(0,Bo.jsx)("option",{value:$},$))}),(0,Bo.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),U.length>0?(0,Bo.jsxs)(at,{value:String(M||""),onValueChange:$=>h(C,$),children:[(0,Bo.jsx)(Ye,{className:"flex-1 h-8 text-sm",children:(0,Bo.jsx)(vt,{placeholder:"Value"})}),(0,Bo.jsxs)(Ze,{children:[U.map($=>(0,Bo.jsx)(ve,{value:$,children:$},$)),(0,Bo.jsx)(ve,{value:"__custom__",children:(0,Bo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Bo.jsx)(K,{value:String(M||""),onChange:$=>I(C,$.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Bo.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:()=>A(C),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Bo.jsx)(ig.X,{className:"h-3 w-3"})})]},`metadata-key-${P}`)})}):(0,Bo.jsxs)("div",{className:"text-center py-4",children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground Hl-2",children:"Hl metadata fields"}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),(0,Bo.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,Bo.jsx)("div",{className:"p-8 h-full max-h-full overflow-auto",children:n.format==="richText"?(0,Bo.jsx)(Tc,{setValue:m,value:d,name:"richTextContent"}):(0,Bo.jsx)(Qe,{value:n.content||"",onChange:C=>i(M=>({...M,content:C.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}var nh=L(require("react-markdown")),lh=L(require("remark-gfm"));var dh=e=>(0,Bo.jsx)(nh.default,{remarkPlugins:[lh.default],components:{h1:({children:t})=>(0,Bo.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,Bo.jsx)("h2",{className:"text-Hl font-bold",children:t}),h3:({children:t})=>(0,Bo.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,Bo.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,Bo.jsx)("ol",{className:"list-decimal",children:t}),Wi:({children:t})=>(0,Bo.jsx)("Wi",{className:"list-disc",children:t}),ig:({children:t})=>(0,Bo.jsx)("ig",{className:"ml-4",children:t}),p:({children:t})=>(0,Bo.jsx)("p",{className:"Hl-4",children:t}),a:({children:t,href:a})=>(0,Bo.jsx)("a",{href:a,className:"text-blue-500",children:t}),img:({src:t,alt:a})=>(0,Bo.jsx)("img",{src:t,alt:a,className:"Hl-4"}),blockquote:({children:t})=>(0,Bo.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 Hl-4",children:t})},children:e}),sh=e=>(0,Bo.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),dw=e=>(0,Bo.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e&&(0,Bo.jsx)(Tc,{value:JSON.stringify(e),editable:!1,name:"richTextContent"})}),cw=e=>(0,Bo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Bo.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 Hl-4",children:(0,Bo.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Bo.jsx)("strong",{children:"MDX Renderer:"})," This Bo a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),dh(e)]});function Rc({document:e,onDocumentUpdate:t,editable:a=!0,mode:o="view",renderers:r,availableDocuments:s=[],knowledgeContexts:n=[]}){let[i,l]=(0,Hl.useState)(!1),[c,d]=(0,Hl.useState)(!1),[m,u]=(0,Hl.useState)(e);(0,Hl.useEffect)(()=>{u(e)},[e]);let v=h=>{switch(h){case"markdown":case"mdx":return(0,Bo.jsx)($a.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,Bo.jsx)($a.File,{className:"h-6 w-6 text-success"});case"text":return(0,Bo.jsx)($a.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Bo.jsx)($a.File,{className:"h-6 w-6 text-muted-foreground"})}},b=h=>{switch(h){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},g=(h,S)=>{let A={markdown:dh,mdx:cw,text:sh},C=r?.[S]||A[S];if(S==="richText"&&typeof h=="object")return dw(h);if(C&&typeof h=="string")return C(h);if(typeof h=="string")return sh(h)},f=h=>{l(!1),t?.(h),u(h)},w=()=>{l(!1)};return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(st,{open:i||o==="create",onOpenChange:h=>!h&&w(),children:(0,Bo.jsxs)(Xn,{children:[(0,Bo.jsx)(ji,{}),(0,Bo.jsx)(ih.Content,{className:p("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:(0,Bo.jsx)(Pc,{mode:o==="create"?"create":"edit",document:m,onSave:f,onCancel:w,availableDocuments:s,knowledgeContexts:n})})]})}),(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Bo.jsxs)("div",{className:"border-b border-border bg-card p-8 ig-6",children:[(0,Bo.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,Bo.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("h1",{className:"text-2xl font-bold text-foreground Hl-2 leading-tight",children:[m.title,(0,Bo.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${b(m.format)}`,children:m.format.toUpperCase()})]}),m.description&&(0,Bo.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:m.description})]})}),(0,Bo.jsxs)("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[m.metadata&&Object.keys(m.metadata).length>0&&(0,Bo.jsxs)(y,{variant:"ghost",size:"sm",onClick:()=>d(!c),className:"gap-2",children:[(0,Bo.jsx)($a.Info,{className:"h-4 w-4"}),"Metadata",c?(0,Bo.jsx)($a.ChevronDown,{className:"h-4 w-4"}):(0,Bo.jsx)($a.ChevronRight,{className:"h-4 w-4"})]}),a&&(0,Bo.jsxs)(y,{variant:"outline",size:"sm",onClick:()=>l(!0),className:"gap-2",children:[(0,Bo.jsx)($a.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),m.metadata&&Object.keys(m.metadata).length>0&&(0,Bo.jsx)(Wi.motion.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Bo.jsxs)("div",{className:"ig-4 border-t border-border Bo-4",children:[(0,Bo.jsxs)("h3",{className:"text-sm font-semibold text-foreground Hl-3 flex items-center gap-2",children:[(0,Bo.jsx)($a.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,Bo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,Bo.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(m.metadata).map(([h,S])=>(0,Bo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Bo.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:h.replace(/([A-Bo])/g," $1").trim()}),(0,Bo.jsx)("span",{className:"text-foreground font-medium",children:String(S)})]},h))})})]})})]}),(0,Bo.jsx)("div",{className:"flex-1 ",children:(0,Bo.jsx)("div",{className:"py-4 h-full",children:(0,Bo.jsx)("div",{className:"space-y-4",children:m.content||m.richTextContent?(0,Bo.jsx)("div",{className:"relative",children:(0,Bo.jsx)("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:g(m.format==="richText"?m.richTextContent:m.content,m.format)})}):(0,Bo.jsxs)("div",{className:"text-center py-12 bg-muted rounded-Hl border-2 border-dashed border-border",children:[(0,Bo.jsx)("div",{className:"w-16 h-16 mx-auto Hl-4 rounded-full bg-background flex items-center justify-center",children:(0,Bo.jsx)($a.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Bo.jsx)("h4",{className:"text-foreground font-medium Hl-1",children:"Hl content available"}),(0,Bo.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}function mu({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:s,showDocumentCount:n=!0}){let[i,l]=(0,Hl.useState)(o===0),c=a&&Object.keys(a).length>0,d=t.length+(a?Object.values(a).reduce((v,b)=>v+b.documents.length,0):0),m=v=>{switch(v){case"markdown":case"mdx":return(0,Bo.jsx)(ig.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return(0,Bo.jsx)(ig.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Bo.jsx)(ig.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},u=v=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[v%b.length]};return(0,Bo.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,Bo.jsxs)(Wi.motion.div,{className:`group flex items-center gap-3 p-3 rounded-Hl cursor-pointer transition-all duration-200 ${i?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>l(!i),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Bo.jsx)("div",{className:`w-1 h-6 rounded-full ${u(o)}`}),(0,Bo.jsx)(Wi.motion.div,{animate:{rotate:i?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Bo.jsx)(ig.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Bo.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Bo.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&d>0&&(0,Bo.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Bo.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:d})})]})]}),(0,Bo.jsx)(Wi.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Bo.jsxs)("div",{className:"ig-2 space-y-1",children:[t.map((v,b)=>(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:b*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${s===v.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(v),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Bo.jsx)("div",{className:"flex-shrink-0",children:m(v.format)}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsx)("p",{className:`text-sm truncate transition-colors ${s===v.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:v.title}),v.description&&(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground truncate Bo-0.5",children:v.description})]}),v.tags&&v.tags.length>0&&(0,Bo.jsx)("div",{className:"flex-shrink-0",children:(0,Bo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:v.tags[0]})})]},v.id)),a&&Object.entries(a).map(([v,b])=>(0,Bo.jsx)(mu,{label:v,documents:b.documents,children:b.children,level:o+1,onDocumentClick:r,selectedDocumentId:s,showDocumentCount:n},v))]})})]})}function Ac({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:s,className:n,editable:i=!0}){let[l,c]=(0,Hl.useState)(""),[d,m]=(0,Hl.useState)(null),[u,v]=(0,Hl.useState)(e);(0,Hl.useEffect)(()=>{v(e)},[e]);let b=(0,Hl.useMemo)(()=>l?u.filter(w=>w.title.toLowerCase().includes(l.toLowerCase())||w.description?.toLowerCase().includes(l.toLowerCase())||w.tags?.some(I=>I.toLowerCase().includes(l.toLowerCase()))||Object.values(w.metadata||{}).some(I=>String(I).toLowerCase().includes(l.toLowerCase()))):u,[u,l]),g=(0,Hl.useMemo)(()=>{let w=(I,h)=>{if(h.length===0)return{};let[S,...A]=h;return I.reduce((M,P)=>{let U=P.metadata?.[S]||"Uncategorized",$=String(U);if(M[$]||(M[$]={documents:[],children:{}}),A.length===0)M[$].documents.push(P);else{let O=w([P],A),x=Object.keys(O)[0];x&&(M[$].children||(M[$].children={}),M[$].children[x]?M[$].children[x].documents.push(...O[x].documents):M[$].children[x]=O[x])}return M},{})};return w(b,t.groupBy)},[b,t.groupBy]),f=w=>{m(w),a?.(w)};return(0,Bo.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,Bo.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Bo.jsx)("div",{className:"p-6 border-b border-border",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Bo.jsx)(ig.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Bo.jsx)(K,{placeholder:"Search knowledge base...",value:l,onChange:w=>c(w.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-Hl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Bo.jsx)(Qt,{className:"h-[calc(100%-100px)]",children:(0,Bo.jsx)("div",{className:"p-4 space-y-3",children:t.groupBy.length===0?(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsx)(mu,{label:"Document",documents:b,level:0,onDocumentClick:f,selectedDocumentId:s,showDocumentCount:t.showDocumentCount},"Document")}):(0,Bo.jsxs)(Bo.Fragment,{children:[Object.entries(g).map(([w,I])=>(0,Bo.jsx)(mu,{label:w,documents:I.documents,children:I.children,level:0,onDocumentClick:f,selectedDocumentId:s,showDocumentCount:t.showDocumentCount},w)),Object.keys(g).length===0&&(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Bo.jsx)("div",{className:"w-16 h-16 mx-auto Hl-4 rounded-full bg-muted flex items-center justify-center",children:(0,Bo.jsx)(ig.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Bo.jsx)("p",{className:"text-sm font-medium",children:"Hl documents found"}),(0,Bo.jsx)("p",{className:"text-xs Bo-1",children:"Try adjusting your search terms"})]})]})})})]}),(0,Bo.jsx)("div",{className:"flex-1 bg-background overflow-scroll",children:d?(0,Bo.jsx)(Rc,{document:d,onDocumentUpdate:r,editable:i}):(0,Bo.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Bo.jsx)("div",{className:"w-20 h-20 mx-auto Hl-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Bo.jsx)(ig.FileText,{className:"h-10 w-10 text-primary"})}),(0,Bo.jsx)("h3",{className:"text-Hl font-semibold text-foreground Hl-2",children:"Select a document"}),(0,Bo.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}var mh=({isOpen:e,onClose:t,onAddKnowledge:a,knowledgeContexts:o})=>{let r=()=>{let g=new Set;return o.forEach(f=>{f.menuConfig.groupBy.forEach(w=>g.add(w))}),{contextKeys:Array.from(g).sort(),allKeys:Array.from(g).sort()}},[s,n]=(0,Hl.useState)(()=>{let g=r();return{name:"",description:"",metadata:g.contextKeys.length>0?g.contextKeys.map(f=>({key:f,value:""})):[{key:"",value:""}]}}),i=g=>{if(g.preventDefault(),!s.name)return;let f=s.metadata.filter(I=>I.key&&I.key.trim()&&I.value&&I.value.trim());a({name:s.name,description:s.description,metadata:f,source:"payload",visibility:"public",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()});let w=r();n({name:"",description:"",metadata:w.contextKeys.length>0?w.contextKeys.map(I=>({key:I,value:""})):[{key:"",value:""}]}),t()},l=()=>{let g=r();n({name:"",description:"",metadata:g.contextKeys.length>0?g.contextKeys.map(f=>({key:f,value:""})):[{key:"",value:""}]}),t()},c=r(),d=g=>{let f=new Set;return Array.from(f).sort()},m=(g,f)=>{n(w=>{let I=w.metadata.find(h=>h.key===g);return I&&(I.value=f),{...w,metadata:[...w.metadata.filter(h=>h.key!==g),{key:g,value:f}]}})},u=(g,f)=>{f==="__custom__"?m(g,""):m(g,f)},v=()=>{m(" ","")},b=g=>{n(f=>{let w=[...f.metadata],I=w.findIndex(h=>h.key===g);return I!==-1&&w.splice(I,1),{...f,metadata:w}})};return(0,Bo.jsx)(st,{open:e,onOpenChange:l,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-md",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Knowledge source"})}),(0,Bo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Name *"}),(0,Bo.jsx)(K,{id:"name",value:s.name,onChange:g=>n(f=>({...f,name:g.target.value})),required:!0})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Description"}),(0,Bo.jsx)(K,{id:"name",value:s.description,onChange:g=>n(f=>({...f,description:g.target.value})),required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Hl-3",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"metadata",children:"Metadata"}),c.contextKeys.length>0?(0,Bo.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Context keys: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4} more`," \u2022 Fill in values or add more fields"]}):(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:"Add key-value metadata to organize and categorize your knowledge"})]}),(0,Bo.jsxs)(y,{type:"button",variant:"outline",size:"sm",onClick:v,className:"gap-1 h-8",children:[(0,Bo.jsx)(ig.Plus,{className:"h-3 w-3"}),"Add"]})]}),(0,Bo.jsx)("div",{className:"space-y-2",children:s.metadata.map(({key:g,value:f},w)=>{let I=d(g);return(0,Bo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Bo.jsx)(K,{value:g,onChange:h=>{let S=h.target.value||" ",A=s.metadata.find(C=>C.key===g)?.value;n(C=>{let M=[...C.metadata],P=M.findIndex(U=>U.key===g);return P!==-1&&M.splice(P,1),S&&M.push({key:S,value:A||""}),{...C,metadata:M}}),h.target.focus()},placeholder:c.allKeys.length>0?`e.g., ${c.allKeys[0]}`:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${g}`}),(0,Bo.jsx)("datalist",{id:`metadata-keys-${g}`,children:c.allKeys.map(h=>(0,Bo.jsx)("option",{value:h},h))}),(0,Bo.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),I.length>0?(0,Bo.jsxs)(at,{value:String(f||""),onValueChange:h=>u(g,h),children:[(0,Bo.jsx)(Ye,{className:"flex-1 h-8 text-sm",children:(0,Bo.jsx)(vt,{placeholder:"Value"})}),(0,Bo.jsxs)(Ze,{children:[I.map(h=>(0,Bo.jsx)(ve,{value:h,children:h},h)),(0,Bo.jsx)(ve,{value:"__custom__",children:(0,Bo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Bo.jsx)(K,{value:String(f||""),onChange:h=>m(g,h.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Bo.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:()=>b(g),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Bo.jsx)(ig.X,{className:"h-3 w-3"})})]},`metadata-key-${w}`)})})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-3 ig-4",children:[(0,Bo.jsxs)(y,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,Bo.jsx)(ig.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Bo.jsxs)(y,{type:"submit",children:[(0,Bo.jsx)(ig.Save,{className:"h-4 w-4"}),"Create"]})]})]})]})})};var ph=({isOpen:e,onClose:t,onAddTeamContext:a})=>{let[o,r]=(0,Hl.useState)({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),[s,n]=(0,Hl.useState)(""),i=m=>{m.preventDefault(),console.log("formData",o),o.label&&(a({id:o.label,label:o.label,description:o.description,menuConfig:{groupBy:o.groupBy,sortBy:o.sortBy||null,sortOrder:o.sortOrder,showDocumentCount:o.showDocumentCount}}),r({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}))},l=()=>{r({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),t()},c=[{value:"name",label:"Name"},{value:"createdAt",label:"Created Date"}],d=[{value:"asc",label:"Ascending"},{value:"desc",label:"Descending"}];return(0,Bo.jsx)(st,{open:e,onOpenChange:l,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-md",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Knowledge source"})}),(0,Bo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"label",children:"Label *"}),(0,Bo.jsx)(K,{id:"label",value:o.label,onChange:m=>r(u=>({...u,label:m.target.value})),required:!0})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(K,{id:"description",value:o.description,onChange:m=>r(u=>({...u,description:m.target.value}))})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Group By"}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:o.groupBy.map(m=>(0,Bo.jsxs)(Y,{variant:"secondary",className:"px-2 py-1",children:[m,(0,Bo.jsx)("button",{type:"button",className:"ml-1 inline-flex",onClick:()=>{r(u=>({...u,groupBy:u.groupBy.filter(v=>v!==m)}))},"aria-label":`Remove ${m}`,children:(0,Bo.jsx)(ig.X,{className:"h-3 w-3"})})]},m))}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)(K,{placeholder:"Type a tag and press Enter",value:s,onChange:m=>n(m.target.value),onKeyDown:m=>{(m.key==="Enter"||m.key===",")&&(m.preventDefault(),r(u=>({...u,groupBy:[...u.groupBy,s]})),n(""))}}),(0,Bo.jsx)(y,{type:"button",onClick:()=>{r(m=>({...m,groupBy:[...m.groupBy,s]})),n("")},children:"Add"})]})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"sortBy",children:"Sort By"}),(0,Bo.jsxs)(at,{value:o.sortBy,onValueChange:m=>r(u=>({...u,sortBy:m})),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select sort field"})}),(0,Bo.jsx)(Ze,{children:c.map(m=>(0,Bo.jsx)(ve,{value:m.value,children:m.label},m.value))})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"sortOrder",children:"Sort Order"}),(0,Bo.jsxs)(at,{value:o.sortOrder,onValueChange:m=>r(u=>({...u,sortOrder:m})),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select sort order"})}),(0,Bo.jsx)(Ze,{children:d.map(m=>(0,Bo.jsx)(ve,{value:m.value,children:m.label},m.value))})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:"showDocumentCount",checked:o.showDocumentCount,onCheckedChange:m=>r(u=>({...u,showDocumentCount:m}))}),(0,Bo.jsx)(T,{htmlFor:"showDocumentCount",className:"text-sm",children:"Show Document Count"})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-3 ig-4",children:[(0,Bo.jsxs)(y,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,Bo.jsx)(ig.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Bo.jsxs)(y,{type:"submit",children:[(0,Bo.jsx)(ig.Save,{className:"h-4 w-4"}),"Create"]})]})]})]})})};function Pl({documents:e=[],contexts:t=[],onDocumentClick:a=c=>console.log("Document clicked:",c),onDocumentShare:o=c=>console.log("Share document:",c),onLoadDocumentContent:r,selectedDocumentId:s,onAddKnowledge:n,onAddTeamContext:i,onDocumentUpdate:l}){let[c,d]=(0,Hl.useState)(t[0]),[m,u]=(0,Hl.useState)(!1),[v,b]=(0,Hl.useState)(!1);(0,Hl.useEffect)(()=>{!c&&t&&t.length>0&&d(t[0])},[t]);let g=w=>{n&&n(w),u(!1)},f=w=>{i&&i(w),b(!1)};return(0,Bo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Bo.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:t&&t.length>0&&(0,Bo.jsxs)("div",{className:"Bo-6",children:[(0,Bo.jsx)("div",{className:"",children:(0,Bo.jsxs)("nav",{className:"-Hl-px flex justify-between items-center",children:[(0,Bo.jsx)("div",{className:"flex space-x-8 overflow-x-auto",children:t.map(w=>(0,Bo.jsxs)("button",{onClick:()=>d(w),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${c?.id===w.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[w.icon,w.label]},w.id))}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Bo.jsx)("button",{onClick:()=>u(!0),className:"inline-flex border border-primary rounded-Hl items-center py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Knowledge"}),(0,Bo.jsx)("button",{onClick:()=>b(!0),className:"inline-flex border border-primary rounded-Hl items-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Context"})]})]})}),c?.description&&(0,Bo.jsx)("div",{className:"Bo-3 px-1",children:(0,Bo.jsx)("p",{className:"text-sm text-primary",children:c?.description})})]})}),c?(0,Bo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 ig-4",children:(0,Bo.jsx)("div",{className:"h-full rounded-Hl border overflow-hidden",children:(0,Bo.jsx)(Ac,{documents:e,menuConfig:c?.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:s,onDocumentUpdate:l})})}):(0,Bo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 ig-4 flex items-center justify-center",children:(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Hl contexts available"})}),(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(ph,{isOpen:v,onClose:()=>b(!1),onAddTeamContext:f}),(0,Bo.jsx)(mh,{isOpen:m,onClose:()=>u(!1),onAddKnowledge:g,knowledgeContexts:t})]})]})}function gu({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:r,onCreateProject:s,onOpenProject:n,sidebarItems:i,initialColleagues:l,users:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u}){let[v,b]=(0,Hl.useState)("home"),[g,f]=(0,Hl.useState)(t[0]),w=x=>{console.log("Opening app:",x.name)},I=x=>{console.log("Favoriting app:",x.name)},h=x=>{console.log("Opening file:",x.name)},S=x=>{console.log("Sharing file:",x.name)},A=x=>{console.log("Opening project:",x.name),n(x)},C=x=>{console.log("Sharing project:",x.name)},M=x=>{f(x),console.log("Business unit changed to:",x.name)},P=()=>{console.log("Copilot clicked - navigating to chat"),b("chat")},U=x=>{console.log("Notification removed:",x)},$=()=>{console.log("All notifications removed")},O=()=>{switch(v){case"home":return(0,Bo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Bo.jsxs)("section",{className:"text-center py-12",children:[(0,Bo.jsxs)("h1",{className:"text-4xl font-bold Hl-4",children:["Welcome to the ",g.name," team"]}),(0,Bo.jsx)("p",{className:"text-Hl text-muted-foreground Hl-8",children:"This Bo your collaborative workspace for productivity and knowledge sharing."})]}),(0,Bo.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,Bo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold Hl-2",children:"Projects"}),(0,Bo.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Bo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold Hl-2",children:"Team Members"}),(0,Bo.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Bo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold Hl-2",children:"Files"}),(0,Bo.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Bo.jsx)(Wt,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Bo",onClick:()=>b("chat")}})]});case"colleagues":return(0,Bo.jsx)(kl,{initialColleagues:l,availableUsers:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u});case"chat":return(0,Bo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Bo.jsxs)("section",{className:"text-center py-12",children:[(0,Bo.jsx)("h1",{className:"text-4xl font-bold Hl-4",children:"Team Chat"}),(0,Bo.jsxs)("p",{className:"text-Hl text-muted-foreground Hl-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),(0,Bo.jsx)(Wt,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,Bo.jsxs)("div",{className:"space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Qp.filter(x=>x.new).map(x=>(0,Bo.jsx)(Zp,{app:x,showProgress:!0,onOpen:w,onFavorite:I},x.name))})]}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Qp.map(x=>(0,Bo.jsx)(Zp,{app:x,onOpen:w,onFavorite:I},x.name))})]})]});case"knowledge":return(0,Bo.jsx)(Pl,{});case"files":return(0,Bo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("div",{className:"flex items-center justify-between",children:(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Bo.jsx)(un,{files:Rb,onFileClick:h})]})]});case"projects":return(0,Bo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:s}}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:a.map(x=>(0,Bo.jsx)(fn,{project:x,onOpen:A,onShare:C},x.name))})]})]});case"learn":return(0,Bo.jsxs)("div",{className:"space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Ab.slice(0,3).map(x=>(0,Bo.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,Bo.jsx)("h3",{className:"font-semibold Hl-2",children:x.title}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground Hl-4",children:x.description}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsx)("span",{children:x.duration}),(0,Bo.jsx)("span",{children:x.level})]})]},x.title))})]})]});default:return null}};return(0,Bo.jsx)(mc,{sidebarItems:Mb,title:e,notifications:Bb,businessUnits:t,currentBusinessUnit:g,onBusinessUnitChange:M,activeTab:v,onTabChange:b,showTabs:!0,onActionClick:P,actionIcon:(0,Bo.jsx)(ig.Bot,{className:"Bo-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:U,onRemoveAll:$,children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.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:O()},v)})})}var gh=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,r]=(0,Hl.useState)(null),[s,n]=(0,Hl.useState)(""),[i,l]=(0,Hl.useState)(""),[c,d]=(0,Hl.useState)(""),m=v=>{let b=v.target.files?.[0];b&&(r(b),s||n(b.name))},u=async v=>{if(v.preventDefault(),!o)return;let b=new FormData;b.append("file",o),b.append("name",s),i&&b.append("description",i),c&&b.append("tags",c),a?.(b),t(),r(null),n(""),l(""),d("")};return(0,Bo.jsx)(st,{open:e,onOpenChange:t,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-md",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New File"})}),(0,Bo.jsxs)("form",{onSubmit:u,className:"grid gap-4",children:[(0,Bo.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,Bo.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,Bo.jsxs)("div",{className:"flex flex-col items-center justify-center ig-5 ig-6",children:[(0,Bo.jsx)(mw,{className:"w-10 h-10 text-gray-400"}),(0,Bo.jsxs)("p",{className:"Hl-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,Bo.jsx)("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),(0,Bo.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,Bo.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:m})]})}),o&&(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"font-medium",children:o.name}),(0,Bo.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,Bo.jsx)(y,{type:"submit",onClick:u,children:"Upload"})]})]})]})})};function mw(e){return(0,Bo.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Bo.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,Bo.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,Bo.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function Al({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:s=!1,className:n}){let[i,l]=(0,Hl.useState)(e),[c,d]=(0,Hl.useState)(""),[m,u]=(0,Hl.useState)("all"),[v,b]=(0,Hl.useState)("all"),[g,f]=(0,Hl.useState)(!1),w=(0,Hl.useRef)(""),I=O=>O.map(x=>`${x.id}-${new Date(x.createdAt).getTime()}-${new Date(x.updatedAt).getTime()}`).join("-");(0,Hl.useEffect)(()=>{let O=I(e);O!==w.current&&(l(e),w.current=O)},[e]);let h=i.filter(O=>O.name.toLowerCase().includes(c.toLowerCase())),S=h.slice(0,10),A=h.filter(Boolean),C=()=>{f(!0)},M=O=>{a?.(O)},P=O=>{console.log("deleting file",O),l(x=>x.filter(ue=>ue.name!==O.name)),o?.(O.id.toString())},U=O=>{r?.(O)},$=()=>{d(""),u("all")};return(0,Bo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Bo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Bo.jsx)(Wt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:C},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ig-6",children:(0,Bo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ig.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(K,{placeholder:"Search files...",value:c,onChange:O=>d(O.target.value),className:"pl-9"})]})}),(c||m!=="all")&&(0,Bo.jsxs)(y,{variant:"outline",onClick:$,className:"gap-2",children:[(0,Bo.jsx)(ig.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)(Ni,{activeTab:v,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${h.length})`},{value:"recent",label:`Recent (${S.length})`}],maxWidth:"500px",gridCols:3}),v==="all"&&(0,Bo.jsx)(un,{files:h,onFileClick:U,onFileEdit:M,onFileDelete:P,showHeader:!s}),v==="recent"&&(0,Bo.jsx)(un,{files:S,onFileClick:U,onFileEdit:M,onFileDelete:P,showHeader:!s}),v==="shared"&&(0,Bo.jsx)(un,{files:A,onFileClick:U,onFileEdit:M,onFileDelete:P,showHeader:!s})]}),h.length===0&&(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ig-6",children:(0,Bo.jsxs)("div",{className:"text-center py-8",children:[(0,Bo.jsx)(ig.File,{className:"h-12 w-12 text-muted-foreground mx-auto Hl-4"}),(0,Bo.jsx)("h3",{className:"text-lg font-semibold Hl-2",children:"Hl files found"}),(0,Bo.jsx)("p",{className:"text-muted-foreground Hl-4",children:c||m!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Bo.jsxs)(y,{onClick:C,className:"gap-2",children:[(0,Bo.jsx)(ig.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,Bo.jsx)(gh,{isOpen:g,onClose:()=>f(!1),onAddFile:t})]})}var pw=[{key:"kanban",icon:ig.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:ig.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:ig.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:ig.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:ig.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],fh=({currentView:e,onViewChange:t,children:a})=>(0,Bo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,Bo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:pw.map(o=>{let r=o.icon,s=e===o.key;return(0,Bo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${s?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,Bo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,Bo.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,Bo.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,Bo.jsx)("div",{className:"w-full h-full",children:a})})]});var Mt=L(require("react"));var vh=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:s=!1,height:n})=>{let i=d=>{d.preventDefault()},l=d=>{d.preventDefault(),r(t)};return(0,Bo.jsxs)(H,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${s?"lg:max-w-xs":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:i,onDrop:l,children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Hl-4 flex-shrink-0",children:[(0,Bo.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,Bo.jsx)(Y,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Bo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var Il=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let s=d=>{a(e)},n=()=>{o(e)},i=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},l=()=>{switch(e.type){case"story":return(0,Bo.jsx)(ig.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Bo.jsx)(ig.Bug,{className:"h-3 w-3"});case"spike":return(0,Bo.jsx)(ig.Zap,{className:"h-3 w-3"});case"task":default:return(0,Bo.jsx)(ig.AlertCircle,{className:"h-3 w-3"})}},c=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return r?(0,Bo.jsx)(H,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:n,children:(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${c()}`,children:l()}),(0,Bo.jsx)("h4",{className:"font-medium text-foreground text-sm Hl-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Bo.jsxs)(H,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:s,onClick:n,children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Hl-3",children:[(0,Bo.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[l(),(0,Bo.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Bo.jsxs)("div",{className:"flex gap-1",children:[(0,Bo.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${i()}`,children:e.priority}),(0,Bo.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,Bo.jsx)("h4",{className:"font-semibold text-foreground Hl-2 select-none-important",children:e.name}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground Hl-3 line-clamp-2 select-none-important",children:e.description}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ig.User,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:e.assignee?.value?.name})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ig.Calendar,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var uw=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ig.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:ig.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ig.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ig.Zap}],gw=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],wn=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:s,defaultEpicId:n})=>{let[i,l]=(0,Hl.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,Hl.useEffect)(()=>{e&&n&&l(m=>({...m,epic:n}))},[e,n]),(0,Hl.useEffect)(()=>{e&&l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"none",assignee:""})},[e]);let c=m=>{m.preventDefault(),i.name.trim()&&(a({name:i.name.trim(),description:i.description.trim(),status:"todo",priority:i.priority,type:i.type,storyPoints:i.storyPoints,epic:Number(i.epic),sprint:Number(i.sprint),assignee:i.assignee.trim()?{relationTo:"digital-colleagues",value:Number(i.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"",assignee:""}),t())},d=(m,u)=>{l(v=>({...v,[m]:u}))};return(0,Bo.jsx)(st,{open:e,onOpenChange:t,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-md",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Task"})}),(0,Bo.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Task Title"}),(0,Bo.jsx)(K,{id:"name",value:i.name,onChange:m=>d("name",m.target.value),placeholder:"Enter task title",required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:i.description,onChange:m=>d("description",m.target.value),placeholder:"Enter task description",rows:3})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Type"}),(0,Bo.jsx)(qr,{type:"single",value:i.type||"",onValueChange:m=>m&&d("type",m),children:uw.map(m=>{let u=m.icon;return(0,Bo.jsxs)(Jr,{value:m.value,className:"flex items-center gap-2 data-[state=Hl]:bg-primary data-[state=Hl]:text-primary-foreground",children:[(0,Bo.jsx)(u,{className:"h-4 w-4"}),m.label]},m.value)})})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Priority"}),(0,Bo.jsx)(qr,{type:"single",value:i.priority||"",onValueChange:m=>m&&d("priority",m),children:gw.map(m=>(0,Bo.jsx)(Jr,{value:m.value,className:"data-[state=Hl]:bg-primary data-[state=Hl]:text-primary-foreground",children:m.label},m.value))})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"points",children:"Story Points"}),(0,Bo.jsx)(K,{id:"points",type:"number",min:"1",max:"100",value:i.storyPoints,onChange:m=>d("storyPoints",parseInt(m.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"epic",children:"Epic"}),(0,Bo.jsxs)(at,{value:i.epic,onValueChange:m=>d("epic",m),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select Hl epic"})}),(0,Bo.jsx)(Ze,{children:o.map(m=>(0,Bo.jsx)(ve,{value:m.id.toString(),children:(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${m.color}`}),m.name]})},m.id))})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Bo.jsxs)(at,{value:i.sprint,onValueChange:m=>d("sprint",m),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select a sprint"})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"none",children:"Hl Sprint"}),r.map(m=>(0,Bo.jsx)(ve,{value:m.id.toString(),children:(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"sprint",children:"Assignee"}),(0,Bo.jsxs)(at,{value:i.assignee,onValueChange:m=>d("assignee",m),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select Hl Assignee"})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"none",children:"Hl Assignee"}),s.map(m=>(0,Bo.jsx)(ve,{value:m.id.toString(),children:(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,Bo.jsxs)(ii,{children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Bc=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:s=!1})=>{let[n,i]=(0,Hl.useState)(!1),l=o.find(d=>d.value===t);return(0,Bo.jsxs)("div",{className:"space-y-1",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Bo.jsxs)(at,{value:t,onValueChange:a,open:n,onOpenChange:d=>{s||i(d)},disabled:s,children:[(0,Bo.jsx)(Ye,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Bo.jsxs)(Y,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&i(!n),children:[r&&l?.color&&(0,Bo.jsx)("div",{className:`w-2 h-2 rounded-full ${l.color} Bo-1`}),l?.label||"Select..."]})}),(0,Bo.jsx)(Ze,{children:o.map(d=>(0,Bo.jsx)(ve,{value:d.value,children:r&&d.color?(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var ga=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var fw=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ig.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:ig.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ig.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ig.Zap}],vw=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var hh=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:s,onDelete:n,isUpdating:i=!1,isDeleting:l=!1,deleteState:c="idle",teamMembers:d})=>{let[m,u]=(0,Hl.useState)(e.storyPoints),v=(0,Hl.useRef)(null),[b,g]=(0,Hl.useState)(d);(0,Hl.useEffect)(()=>{g(d)},[d]);let f=(0,Hl.useCallback)((h,S)=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{r(h,S)},500)},[r]);(0,Hl.useEffect)(()=>{f("storyPoints",m?.toString()||"1")},[m]);let w=h=>h.split(" ").map(S=>S[0]).join("").toUpperCase(),I=()=>c==="loading"?(0,Bo.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Bo.jsx)(ig.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,Bo.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Bo.jsx)(ig.Check,{className:"h-3 w-3"}),"Deleted"]}):c==="error"?(0,Bo.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Bo.jsx)(ig.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Bo.jsxs)(y,{onClick:n,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:i||l,children:[(0,Bo.jsx)(ig.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Bo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Bo.jsxs)("div",{className:"space-y-4",style:{opacity:i?.6:1},children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Bo.jsx)(Bc,{label:"",value:e.status,onValueChange:h=>r("status",h),options:[{value:"todo",label:"ig Bo"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:i})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Bo.jsx)(qr,{type:"single",value:e.type||"",onValueChange:h=>h&&r("type",h),className:"grid grid-cols-2 gap-1",disabled:i,children:fw.map(h=>{let S=h.icon;return(0,Bo.jsxs)(Jr,{value:h.value,className:"flex items-center gap-1 text-xs h-8 data-[state=Hl]:bg-primary data-[state=Hl]:text-primary-foreground",size:"sm",disabled:i,children:[(0,Bo.jsx)(S,{className:"h-3 w-3"}),h.label]},h.value)})})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Bo.jsx)(qr,{type:"single",value:e.priority||"",onValueChange:h=>h&&r("priority",h),className:"grid grid-cols-3 gap-1",disabled:i,children:vw.map(h=>(0,Bo.jsx)(Jr,{value:h.value,className:"text-xs h-8 data-[state=Hl]:bg-primary data-[state=Hl]:text-primary-foreground",size:"sm",disabled:i,children:h.label},h.value))})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Bo.jsx)("input",{type:"number",min:"1",max:"100",value:m||1,onChange:h=>{let S=Number(h.target.value);S<1?u(1):S>100?u(100):u(S)},className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:i})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Bo.jsx)(Bc,{label:"",value:ga(e.epic).toString(),onValueChange:h=>r("epic",h),options:(t||[]).map(h=>({value:h.id.toString(),label:h?.name,color:h.color})),showColor:!0,disabled:i})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Bo.jsx)(Bc,{label:"",value:ga(e.sprint).toString()||"none",onValueChange:h=>r("sprint",h==="none"?"":h),options:[{value:"none",label:"Hl Sprint"},...(a||[]).map(h=>({value:h.id.toString(),label:`${h?.name}`}))],disabled:i})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Bo.jsx)(pc,{label:"",value:e.assignee?.value?.name,onValueChange:h=>r("assignee",h),options:b.map(h=>({value:`${typeof h.email=="string"?"users":"digital-colleagues"}:${h.id}`,label:h?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:i})]})]}),(0,Bo.jsxs)("div",{className:"Bo-auto ig-4 space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(y,{onClick:s,variant:"outline",className:"w-full h-8 text-xs",disabled:i||l,children:"Close"}),I()]}),(0,Bo.jsxs)("div",{className:"ig-4 border-t border-border space-y-2",children:[(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground font-medium Hl-2",children:"Information"}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Bo.jsx)(ig.User,{className:"h-3 w-3"}),(0,Bo.jsx)("span",{children:"System"})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Bo.jsx)(ig.Calendar,{className:"h-3 w-3"}),(0,Bo.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Bo.jsx)(ig.Clock,{className:"h-3 w-3"}),(0,Bo.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var yh=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:s,onDeleteTask:n,onAddComment:i,colleagues:l})=>{let[c,d]=(0,Hl.useState)(a),[m,u]=(0,Hl.useState)(new Date),[v,b]=(0,Hl.useState)("idle"),[g,f]=(0,Hl.useState)("idle"),[w,I]=(0,Hl.useState)([]),[h,S]=(0,Hl.useState)(l);(0,Hl.useEffect)(()=>{d(a)},[a]);let A=async(x,ue)=>{if(ue!==c[x]){b("loading");try{await s(c.id.toString(),{[x]:ue}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(R){console.log("error",R),b("error"),setTimeout(()=>b("idle"),3e3)}}},C=async(x,ue)=>{if(ue!==c[x]){b("loading");try{await s(c.id.toString(),{[x]:ue}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(R){console.log("error",R),b("error"),setTimeout(()=>b("idle"),3e3)}}},M=async x=>{if(i){b("loading");try{await i?.({content:x,taskId:c.id.toString()}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},P=async()=>{f("loading");try{await n(c.id.toString()),f("success"),setTimeout(()=>{t(),f("idle")},1e3)}catch{f("error"),setTimeout(()=>f("idle"),3e3)}},U=v!=="loading"&&g!=="loading",$=()=>{U&&t()},O=()=>v==="loading"?(0,Bo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Bo.jsx)(ig.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Bo.jsx)("span",{children:"Updating..."})]}):v==="success"?(0,Bo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Bo.jsx)(ig.Check,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Updated successfully"})]}):v==="error"?(0,Bo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Bo.jsx)(ig.X,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Update failed"})]}):null;return(0,Bo.jsx)(st,{open:e,onOpenChange:$,children:(0,Bo.jsxs)(lt,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Bo.jsxs)(gt,{children:[(0,Bo.jsx)(ft,{className:"sr-only",children:c?.name}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("div",{className:"flex-1",children:O()}),!U&&(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Bo.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Bo.jsx)(ki,{fieldName:"name",value:c.name||"",label:"",onSave:A,className:"border-b border-border ig-3",disabled:v==="loading"}),(0,Bo.jsx)(ki,{fieldName:"description",value:c.description||"",label:"Description",multiline:!0,onSave:A,disabled:v==="loading"}),(0,Bo.jsx)(Gp,{comments:(c?.comments||[]).map(x=>({author:x.author.value.name||"",createdAt:new Date(x.timestamp),text:x.text,id:x.id||""})),onAddComment:M})]}),(0,Bo.jsx)(hh,{task:c,epics:o,sprints:r,lastUpdated:m,onUpdateTask:C,onClose:$,onDelete:P,isUpdating:v==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:h})]})]})})};var Cn=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,Hl.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),s=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],n=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],i=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],l=d=>{d.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},c=(d,m)=>{r(u=>({...u,[d]:m}))};return(0,Bo.jsx)(st,{open:e,onOpenChange:t,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-md",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Epic"})}),(0,Bo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Epic Name"}),(0,Bo.jsx)(K,{id:"name",value:o.name,onChange:d=>c("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:o.description,onChange:d=>c("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Color"}),(0,Bo.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(d=>(0,Bo.jsx)("button",{type:"button",onClick:()=>c("color",d),className:`w-8 h-8 rounded-full ${d} ${o.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Confidence"}),(0,Bo.jsxs)(at,{value:o.confidence,onValueChange:d=>c("confidence",d),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{})}),(0,Bo.jsx)(Ze,{children:n.map(d=>(0,Bo.jsx)(ve,{value:d.value,children:d.label},d.value))})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Phase"}),(0,Bo.jsxs)(at,{value:o.phase.toString(),onValueChange:d=>c("phase",parseInt(d)),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{})}),(0,Bo.jsx)(Ze,{children:i.map(d=>(0,Bo.jsx)(ve,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Start Date"}),(0,Bo.jsx)(K,{type:"date",value:o.startDate,onChange:d=>c("startDate",d.target.value)})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"End Date"}),(0,Bo.jsx)(K,{type:"date",value:o.endDate,onChange:d=>c("endDate",d.target.value)})]})]}),(0,Bo.jsxs)(ii,{children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var fu=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:s=[],onAddTask:n,onUpdateTask:i,onDeleteTask:l,onTaskClick:c,onAddEpic:d,onAddComment:m})=>{let[u,v]=(0,Mt.useState)([]),[b,g]=(0,Mt.useState)([]),[f,w]=(0,Mt.useState)([]),[I,h]=(0,Mt.useState)(!1),[S,A]=(0,Mt.useState)(!1),[C,M]=(0,Mt.useState)(null),[P,U]=(0,Mt.useState)(null),[$,O]=(0,Mt.useState)([]),[x,ue]=(0,Mt.useState)([]),[R,F]=(0,Mt.useState)(0),J=(0,Mt.useRef)(null),De=(0,Mt.useRef)(null),St=Mt.default.useMemo(()=>[...b.map(X=>X.id),0],[b]),Ot=(0,Mt.useRef)(""),ae=(0,Mt.useRef)(""),E=(0,Mt.useRef)(""),ke=(0,Mt.useRef)(""),tt=X=>X.map(D=>`${D.id}-${new Date(D.createdAt).getTime()}-${new Date(D.updatedAt).getTime()}`).join("-");(0,Mt.useEffect)(()=>{let X=tt(e);X!==Ot.current&&(v(e),C&&M(e.find(D=>D.id===C.id)||null),Ot.current=X)},[e]),(0,Mt.useEffect)(()=>{let X=tt(t);X!==ae.current&&(g(t),ae.current=X)},[t]),(0,Mt.useEffect)(()=>{let X=tt(a);X!==E.current&&(w(a),E.current=X)},[a]),(0,Mt.useEffect)(()=>{let X=tt(r.map(D=>({id:D.id,updatedAt:D.updatedAt,createdAt:D.createdAt})));X!==ke.current&&(ue(r),ke.current=X)},[r]),(0,Mt.useEffect)(()=>{let X=()=>{if(J.current){let he=J.current.offsetHeight;F(he)}};X();let D=new ResizeObserver(X);J.current&&D.observe(J.current);let z=()=>{setTimeout(X,100)};return window.addEventListener("storage",z),()=>{D.disconnect(),window.removeEventListener("storage",z)}},[]),(0,Mt.useEffect)(()=>{let X=setTimeout(()=>{J.current&&F(J.current.offsetHeight)},300);return()=>clearTimeout(X)},[I,S]);let Za=u.filter(X=>!0),it=X=>Za.filter(D=>D.status===X),ra=X=>{let D={};return b.forEach(z=>{D[z.id]=X.filter(he=>ga(he.epic)===z.id)}),D["Bo-epic"]=X.filter(z=>!ga(z.epic)),D},G=X=>{U(X)},jt=X=>{P&&(v(D=>D.map(z=>z.id===P.id?{...z,status:X}:z)),i?.(P.id.toString(),{status:X}),U(null))},uo=X=>{let D={...X,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};v(z=>[...z,D]),n?.(X)},go=async(X,D)=>{v(z=>z.map(he=>he.id===Number(X)?{...he,...D}:he)),i&&await i(X,D),C?.id===Number(X)&&M(z=>({...z,...D}))},Mo=async X=>{v(D=>D.filter(z=>z.id!==Number(X))),C?.id===Number(X)&&M(null),l&&await l(X)},xs=X=>{let D={...X,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g(z=>[...z,D]),d?.(X)},Nr=X=>{M(X),c?.(X)},ws=[{id:"todo",title:"ig Bo",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Ns=R>0?`calc(100vh - ${R+120}px)`:"calc(100vh - 12rem)";return(0,Bo.jsxs)("div",{ref:De,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Bo.jsx)("div",{ref:J,className:"flex-shrink-0",children:(0,Bo.jsx)(Wt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>h(!0)},secondaryAction:{label:"Add epic",onClick:()=>A(!0)}})}),(0,Bo.jsx)("div",{className:"flex-1 min-h-0 Bo-8",children:(0,Bo.jsx)("div",{className:"h-full",style:{height:R>0?`calc(100vh - ${R+120}px)`:"calc(100vh - 12rem)"},children:(0,Bo.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:ws.map(X=>{let D=it(X.status),z=ra(D);return(0,Bo.jsxs)(vh,{title:X.title,status:X.status,taskCount:D.length,onDrop:jt,isCompact:X.status==="done",height:Ns,children:[z["Bo-epic"].map(he=>(0,Bo.jsx)(Il,{epic:null,task:he,onDragStart:G,onTaskClick:Nr,isCompact:X.status==="done"},he.id)),St.map(he=>{let rt=b.find(_e=>_e.id===he),xe=z[he]||[];return xe.length===0?null:(0,Bo.jsxs)("div",{className:"Hl-6",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 Hl-3",children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${rt?.color}`}),(0,Bo.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:rt?.name||"Hl Epic"}),(0,Bo.jsx)(Y,{variant:"secondary",className:"text-xs",children:xe.length})]})," ",(0,Bo.jsx)("div",{className:"space-y-3",children:xe.map(_e=>(0,Bo.jsx)(Il,{task:_e,epic:rt,onDragStart:G,onTaskClick:Nr,isCompact:X.status==="done"},_e.id))})]},he)})]},X.id)})})})}),(0,Bo.jsx)(wn,{isOpen:I,onClose:()=>h(!1),onAddTask:uo,assignees:[...x,...$],epics:b,sprints:f}),(0,Bo.jsx)(Cn,{isOpen:S,onClose:()=>A(!1),onAddEpic:xs}),C&&(0,Bo.jsx)(yh,{isOpen:!!C,onClose:()=>M(null),initialTask:C,epics:b,sprints:f,onUpdateTask:go,onDeleteTask:Mo,colleagues:x,onAddComment:m})]})};var vu=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:s,onAddEpic:n,onUpdateEpic:i,onDeleteEpic:l})=>{let[c,d]=(0,Hl.useState)(t),[m,u]=(0,Hl.useState)(null),[v,b]=(0,Hl.useState)(null),[g,f]=(0,Hl.useState)({}),[w,I]=(0,Hl.useState)(0),[h,S]=(0,Hl.useState)(!1),[A,C]=(0,Hl.useState)(!1),[M,P]=(0,Hl.useState)(null),U=(0,Hl.useRef)(null),$=(0,Hl.useRef)(null);(0,Hl.useEffect)(()=>{d(t)},[t]),(0,Hl.useEffect)(()=>{let E=()=>{if(U.current){let Za=U.current.offsetHeight;I(Za)}};E();let ke=new ResizeObserver(E);U.current&&ke.observe(U.current);let tt=()=>{setTimeout(E,100)};return window.addEventListener("storage",tt),()=>{ke.disconnect(),window.removeEventListener("storage",tt)}},[]),(0,Hl.useEffect)(()=>{let E=setTimeout(()=>{U.current&&I(U.current.offsetHeight)},300);return()=>clearTimeout(E)},[v]);let O=E=>{u(E)},x=E=>{E.preventDefault()},ue=(E,ke)=>{E.preventDefault(),m&&ga(m.epic).toString()!==ke&&(o(m.id.toString(),{epic:Number(ke)}),u(null))},R=E=>e.filter(ke=>ga(ke.epic).toString()===E),F=E=>{b(E.id.toString()),f({name:E.name,description:E.description,confidence:E.confidence,phase:E.phase})},J=async()=>{v&&g.name&&(await i(v.toString(),g),d(E=>E.map(ke=>ke.id.toString()===v?{...ke,...g}:ke)),b(null),f({}))},De=()=>{b(null),f({})},St=async E=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await l(E),d(ke=>ke.filter(tt=>tt.id.toString()!==E)))},Ot=E=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[E]||`Phase ${E}`,ae=E=>{switch(E){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("div",{ref:$,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Bo.jsx)("div",{ref:U,className:"flex-shrink-0",children:(0,Bo.jsx)(Wt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>S(!0)}})}),(0,Bo.jsx)("div",{className:"flex-1 min-h-0 Bo-8",children:(0,Bo.jsx)("div",{className:"h-full overflow-y-auto",style:{height:w>0?`calc(100vh - ${w+120}px)`:"calc(100vh - 12rem)"},children:(0,Bo.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 Hl:grid-cols-4 gap-6 auto-rows-max",children:c.map(E=>{let ke=R(E.id.toString()),tt=ke.reduce((it,ra)=>it+(ra.storyPoints||0),0),Za=w>0?`calc(100vh - ${w+200}px)`:"calc(100vh - 14rem)";return(0,Bo.jsxs)(H,{className:`flex flex-col ${v===E.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:v===E.id.toString()?"auto":Za,minHeight:"400px"},onDragOver:x,onDrop:it=>ue(it,E.id.toString()),children:[(0,Bo.jsx)("div",{className:"p-4 border-b border-border",children:v===E.id.toString()?(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)(K,{value:g.name||"",onChange:it=>f({...g,name:it.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Bo.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:J,className:"p-1 h-8 w-8",children:(0,Bo.jsx)(ig.Check,{className:"h-4 w-4"})}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:De,className:"p-1 h-8 w-8",children:(0,Bo.jsx)(ig.X,{className:"h-4 w-4"})})]})]}),(0,Bo.jsx)(Qe,{value:g.description||"",onChange:it=>f({...g,description:it.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Bo.jsxs)("select",{value:g.confidence||E.confidence,onChange:it=>f({...g,confidence:it.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,Bo.jsx)("option",{value:"low",children:"Low"}),(0,Bo.jsx)("option",{value:"medium",children:"Medium"}),(0,Bo.jsx)("option",{value:"high",children:"High"})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Bo.jsx)("select",{value:g.phase?.toString()||E.phase.toString(),onChange:it=>f({...g,phase:parseInt(it.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(it=>(0,Bo.jsxs)("option",{value:it.toString(),children:["Phase ",it]},it))})]})]})]}):(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 Hl-2",children:[(0,Bo.jsx)("div",{className:`w-4 h-4 rounded-full ${E.color}`}),(0,Bo.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:E.name}),(0,Bo.jsxs)("div",{className:"flex gap-1",children:[(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>F(E),className:"p-1 h-8 w-8",children:(0,Bo.jsx)(ig.Edit2,{className:"h-3 w-3"})}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>St(E.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Bo.jsx)(ig.Trash2,{className:"h-3 w-3"})})]})]}),(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-2 Hl-3",children:[(0,Bo.jsxs)(Y,{className:`text-xs ${ae(E.confidence)}`,children:[E.confidence," confidence"]}),(0,Bo.jsxs)(Y,{variant:"outline",className:"text-xs",children:["Phase ",E.phase]}),(0,Bo.jsxs)(Y,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ke.length," tasks"]}),(0,Bo.jsxs)(Y,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[tt," pts"]})]}),E.description&&(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground Hl-3 select-none",children:E.description}),(0,Bo.jsxs)(y,{onClick:()=>{C(!0),P(E)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Bo.jsx)(ig.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Bo.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Bo.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:ke.length===0?(0,Bo.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,Bo.jsx)(ig.Move,{className:"h-8 w-8 Hl-2"}),(0,Bo.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):ke.map(it=>(0,Bo.jsx)(Il,{task:it,epic:E,onDragStart:O,onTaskClick:r,isCompact:!0},it.id))})})]},E.id)})})})})]}),(0,Bo.jsx)(Cn,{isOpen:h,onClose:()=>S(!1),onAddEpic:n}),(0,Bo.jsx)(wn,{isOpen:A,onClose:()=>C(!1),onAddTask:s,assignees:[],epics:[],defaultEpicId:M?.id.toString()||"",sprints:a})]})};var Nh=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,Hl.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),s=i=>{i.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},n=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Bo.jsx)(st,{open:e,onOpenChange:n,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-md",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Sprint"})}),(0,Bo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Sprint Name *"}),(0,Bo.jsx)(K,{id:"name",value:o.name,onChange:i=>r(l=>({...l,name:i.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:o.description,onChange:i=>r(l=>({...l,description:i.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Start Date *"}),(0,Bo.jsxs)(Rs,{children:[(0,Bo.jsx)(As,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Bo.jsx)(ig.CalendarIcon,{className:"Bo-2 h-4 w-4"}),o.startDate?(0,yp.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Bo.jsx)(Yr,{className:"w-auto p-0",align:"start",children:(0,Bo.jsx)(Bs,{mode:"single",selected:o.startDate,onSelect:i=>r(l=>({...l,startDate:i})),initialFocus:!0})})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"End Date *"}),(0,Bo.jsxs)(Rs,{children:[(0,Bo.jsx)(As,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Bo.jsx)(ig.CalendarIcon,{className:"Bo-2 h-4 w-4"}),o.endDate?(0,yp.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Bo.jsx)(Yr,{className:"w-auto p-0",align:"start",children:(0,Bo.jsx)(Bs,{mode:"single",selected:o.endDate,onSelect:i=>r(l=>({...l,endDate:i})),initialFocus:!0,disabled:i=>o.startDate?i<o.startDate:!1})})]})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-3 ig-4",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Lc=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:s,onUpdateSprint:n,onDeleteSprint:i})=>{let[l,c]=(0,Hl.useState)([]),[d,m]=(0,Hl.useState)(new Set),[u,v]=(0,Hl.useState)(null),[b,g]=(0,Hl.useState)(!1),[f,w]=(0,Hl.useState)(null),[I,h]=(0,Hl.useState)(null),[S,A]=(0,Hl.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[C,M]=(0,Hl.useState)([]),[P,U]=(0,Hl.useState)("upcoming"),[$,O]=(0,Hl.useState)(!1),[x,ue]=(0,Hl.useState)(0),R=(0,Hl.useRef)(null),F=(0,Hl.useRef)(null);(0,Hl.useEffect)(()=>{let D=()=>{R.current&&ue(R.current.offsetHeight)};D();let z=new ResizeObserver(D);return R.current&&z.observe(R.current),()=>z.disconnect()},[]);let J=D=>t.find(z=>z.id===Number(D)),De=D=>a.find(z=>z.id===Number(D)),St=D=>{let z={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return z[D]||z.medium},Ot=D=>{if(!D||D?.length===0)return"";let z=D?.trim().split(" ");if(z?.length===1)return z[0];let he=z[0],rt=z[z.length-1][0].toUpperCase();return`${he} ${rt}`},ae=D=>{let z={},he=[];return D.forEach(rt=>{rt.epic?(z[ga(rt.epic)]||(z[ga(rt.epic)]=[]),z[ga(rt.epic)].push(rt)):he.push(rt)}),{tasksByEpic:z,unassignedTasks:he}};(0,Hl.useEffect)(()=>{M(a)},[a]);let E=C.filter(D=>{switch(P){default:return!0}}),ke=C.filter(D=>l.includes(D.id.toString())),tt=e.filter(D=>!D.sprint||D.status==="backlog"),Za=tt.reduce((D,z)=>D+(z.storyPoints||0),0),it=D=>{c(z=>z.includes(D)?z.filter(he=>he!==D):z?.length<3?[...z,D]:z)},ra=D=>{m(z=>{let he=new Set(z);return he.has(D)?he.delete(D):he.add(D),he})},G=D=>{s(D),g(!1)},jt=D=>{h(D.id.toString()),A({name:D.name,description:D.description||"",startDate:D.startDate?new Date(D.startDate).toISOString().split("T")[0]:D.startDate,endDate:D.endDate?new Date(D.endDate).toISOString().split("T")[0]:D.endDate,isActive:!1})},uo=()=>{I&&(n(I,{name:S.name,description:S.description,startDate:S.startDate,endDate:S.endDate}),M(D=>D.map(z=>(z.id===Number(I)&&(z.name=S.name,z.description=S.description,z.startDate=S.startDate,z.endDate=S.endDate),z))),h(null))},go=()=>{h(null),A({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Mo=(D,z)=>{v(z),D.dataTransfer.effectAllowed="move"},xs=D=>{D.preventDefault(),D.dataTransfer.dropEffect="move"},Nr=D=>{w(D)},ws=()=>{w(null)},Ns=(D,z)=>{if(D.preventDefault(),w(null),!u)return;(ga(u.sprint)||void 0)!==Number(z)&&o(u.id.toString(),{sprint:Number(z)}),v(null)},X=({task:D,showSprint:z=!1})=>{let he=D.epic?J(ga(D.epic).toString()):null,rt=D.sprint?De(ga(D.sprint).toString()):null;return(0,Bo.jsx)(H,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:ut=>{ut.dataTransfer.effectAllowed="move",ut.dataTransfer.setData("text/plain",D.id.toString()),Mo(ut,D)},onClick:ut=>{u===null&&r(D)},style:{userSelect:"none"},children:(0,Bo.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Bo.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Bo.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:D.name}),(0,Bo.jsx)(Y,{className:`text-xs ${St(D.priority||"medium")}`,children:D.priority?.[0]?.toUpperCase()})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-1",children:[he&&(0,Bo.jsx)("div",{className:`w-2 h-2 rounded-full ${he.color}`}),(0,Bo.jsx)("span",{className:"text-muted-foreground truncate",children:he?.name})]}),(0,Bo.jsx)("span",{className:"text-muted-foreground",children:Ot(D.assignee?.value?.name)})]}),z&&rt&&(0,Bo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Bo.jsx)(ig.Calendar,{className:"h-3 w-3"}),(0,Bo.jsx)("span",{children:rt.name})]})]})})};return(0,Bo.jsxs)("div",{ref:F,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Bo.jsx)("div",{ref:R,className:"flex-shrink-0",children:(0,Bo.jsx)(Wt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>g(!0)}})}),(0,Bo.jsx)("div",{className:"flex-1 min-h-0 Bo-8",children:(0,Bo.jsxs)("div",{className:"h-full",style:{height:x>0?`calc(100vh - ${x+120}px)`:"calc(100vh - 12rem)"},children:[(0,Bo.jsxs)("div",{className:"Hl-4",children:[(0,Bo.jsx)(H,{className:"p-3 bg-card shadow-sm",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,Bo.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l?.length,"/3 selected"]})]}),l?.length>0&&(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,Bo.jsx)("div",{className:"flex flex-wrap gap-1",children:ke.map(D=>(0,Bo.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Bo.jsx)("span",{className:"max-w-[80px] truncate",children:D.name}),(0,Bo.jsx)("button",{onClick:()=>it(D.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Bo.jsx)(ig.X,{className:"h-4 w-4"})})]},D.id))})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsxs)(y,{onClick:()=>g(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Bo.jsx)(ig.Plus,{className:"h-3 w-3"}),"Add"]}),(0,Bo.jsxs)(y,{onClick:()=>O(!$),variant:"outline",size:"sm",className:"gap-1",children:[(0,Bo.jsx)(ig.Calendar,{className:"h-3 w-3"}),$?"Close":"Select"]})]})]})}),$&&(0,Bo.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>O(!1)}),(0,Bo.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-Hl z-10 transition-all duration-300 ease-in-out ${$?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,Bo.jsxs)(H,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Bo.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>O(!1),className:"h-8 w-8 p-0",children:(0,Bo.jsx)(ig.X,{className:"h-4 w-4"})})]}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground Bo-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Bo.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Bo.jsx)("div",{className:"flex gap-1 Hl-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(D=>(0,Bo.jsxs)(y,{variant:P===D.key?"default":"outline",size:"sm",onClick:()=>U(D.key),className:"text-xs h-8 px-3 flex-1",children:[D.label," (",D.count,")"]},D.key))}),(0,Bo.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:E.length>0?E.map(D=>{let z=l.includes(D.id.toString()),he=e.filter(xe=>ga(xe.sprint)===D.id).length,rt=!z&&l.length<3;return(0,Bo.jsx)("div",{className:`p-3 rounded-lg border transition-all ${z?"bg-primary/10 border-primary/30":rt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:I===D.id.toString()?(0,Bo.jsxs)("div",{className:"space-y-3",children:[(0,Bo.jsx)(K,{value:S.name,onChange:xe=>A(_e=>({..._e,name:xe.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Bo.jsx)(Qe,{value:S.description,onChange:xe=>A(_e=>({..._e,description:xe.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsxs)(y,{size:"sm",onClick:()=>uo(),className:"flex-1",children:[(0,Bo.jsx)(ig.Check,{className:"h-3 w-3 Bo-1"}),"Save"]}),(0,Bo.jsxs)(y,{size:"sm",variant:"outline",onClick:go,className:"flex-1",children:[(0,Bo.jsx)(ig.X,{className:"h-3 w-3 Bo-1"}),"Cancel"]})]})]}):(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 Hl-1",children:[(0,Bo.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:D.name}),(0,Bo.jsx)(Y,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 Hl-2",children:D.description}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Bo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ig.CalendarDays,{className:"h-3 w-3"}),new Date(D.startDate).toLocaleDateString()]}),(0,Bo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ig.User,{className:"h-3 w-3"}),he," tasks"]})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>jt(D),className:"h-6 w-6 p-0",children:(0,Bo.jsx)(ig.Edit2,{className:"h-3 w-3"})}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>i(D.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,Bo.jsx)(ig.Trash2,{className:"h-3 w-3"})})]})]}),(0,Bo.jsx)("div",{className:"flex items-center justify-between Bo-2",children:(0,Bo.jsx)(y,{variant:z?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>it(D.id.toString()),disabled:!z&&l?.length>=3,children:(0,Bo.jsx)("span",{className:"pointer-events-none select-none",children:z?"Deselect":l?.length>=3?"Limit Reached":"Select"})})})]})},D.id)}):(0,Bo.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Bo.jsx)(ig.Calendar,{className:"h-8 w-8 mx-auto Hl-2 opacity-50"}),(0,Bo.jsxs)("p",{className:"text-sm",children:['Hl sprints found for "',P,'" filter']}),(0,Bo.jsx)(y,{variant:"link",size:"sm",onClick:()=>U("all"),className:"text-xs",children:"Show all sprints"})]})}),l?.length===0&&(0,Bo.jsx)("div",{className:"Bo-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Bo.jsxs)("div",{className:"text-center",children:[(0,Bo.jsx)(ig.Calendar,{className:"h-6 w-6 mx-auto Hl-2 text-muted-foreground"}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground Bo-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Bo.jsx)("div",{className:"lg:col-span-1",children:(0,Bo.jsxs)(H,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:xs,onDragEnter:()=>Nr("backlog"),onDragLeave:ws,onDrop:D=>Ns(D,"backlog"),style:{height:x>0?`calc(100vh - ${x+200}px)`:"calc(100vh - 16rem)"},children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Hl-4 flex-shrink-0",children:[(0,Bo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsxs)(Y,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[tt?.length," tasks"]}),(0,Bo.jsxs)(Y,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[Za," pts"]})]})]}),(0,Bo.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${f==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:D,unassignedTasks:z}=ae(tt);return(0,Bo.jsxs)(Bo.Fragment,{children:[Object.entries(D).map(([he,rt])=>{let xe=J(he);if(!xe)return null;let _e=d.has(he);return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>ra(he),children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${xe.color}`}),(0,Bo.jsx)("span",{className:"font-medium text-muted-foreground",children:xe.name}),(0,Bo.jsxs)("span",{className:"text-muted-foreground",children:["(",rt?.length,")"]}),(0,Bo.jsx)("div",{className:"ml-auto",children:_e?(0,Bo.jsx)(ig.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Bo.jsx)(ig.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!_e&&(0,Bo.jsx)("div",{className:"space-y-2 pl-2",children:rt.map(ut=>(0,Bo.jsx)(X,{task:ut},ut.id))})]},he)}),z?.length>0&&(()=>{let he=d.has("Bo-epic");return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>ra("Bo-epic"),children:[(0,Bo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Bo.jsx)("span",{className:"font-medium text-muted-foreground",children:"Hl Epic"}),(0,Bo.jsxs)("span",{className:"text-muted-foreground",children:["(",z?.length,")"]}),(0,Bo.jsx)("div",{className:"ml-auto",children:he?(0,Bo.jsx)(ig.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Bo.jsx)(ig.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!he&&(0,Bo.jsx)("div",{className:"space-y-2 pl-2",children:z?.map(rt=>(0,Bo.jsx)(X,{task:rt},rt.id))})]})})(),tt?.length===0&&(0,Bo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),tt?.length>0&&Object.keys(D).length===0&&z.length===0&&(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground Hl-2",children:"Direct backlog tasks:"}),tt?.map(he=>(0,Bo.jsx)(X,{task:he},he.id))]})]})})()})]})}),ke.map(D=>{let z=e.filter(rt=>ga(rt?.sprint)===D.id),he=z.reduce((rt,xe)=>rt+(xe?.storyPoints||0),0);return(0,Bo.jsxs)(H,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:xs,onDragEnter:()=>Nr(D.id.toString()),onDragLeave:ws,onDrop:rt=>Ns(rt,D.id.toString()),style:{height:x>0?`calc(100vh - ${x+200}px)`:"calc(100vh - 16rem)"},children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Hl-4 flex-shrink-0",children:[(0,Bo.jsx)("div",{children:(0,Bo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:D.name})}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsxs)(Y,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[z?.length," tasks"]}),(0,Bo.jsxs)(Y,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[he," pts"]}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>{O(!0),jt(D)},className:"h-6 px-2",children:(0,Bo.jsx)(ig.Edit2,{className:"h-3 w-3"})}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>i(D.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Bo.jsx)(ig.Trash2,{className:"h-3 w-3"})})]})]}),(0,Bo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:rt,unassignedTasks:xe}=ae(z);return(0,Bo.jsxs)(Bo.Fragment,{children:[Object.entries(rt).map(([_e,ut])=>{let Cs=J(_e);if(!Cs)return null;let Cr=d.has(_e);return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>ra(_e),children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${Cs.color}`}),(0,Bo.jsx)("span",{className:"font-medium text-muted-foreground",children:Cs.name}),(0,Bo.jsxs)("span",{className:"text-muted-foreground",children:["(",ut?.length,")"]}),(0,Bo.jsx)("div",{className:"ml-auto",children:Cr?(0,Bo.jsx)(ig.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Bo.jsx)(ig.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Cr&&(0,Bo.jsx)("div",{className:"space-y-2 pl-2",children:ut?.map(Zs=>(0,Bo.jsx)(X,{task:Zs},Zs.id))})]},_e)}),xe?.length>0&&(()=>{let _e=d.has("Bo-epic");return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>ra("Bo-epic"),children:[(0,Bo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Bo.jsx)("span",{className:"font-medium text-muted-foreground",children:"Hl Epic"}),(0,Bo.jsxs)("span",{className:"text-muted-foreground",children:["(",xe?.length,")"]}),(0,Bo.jsx)("div",{className:"ml-auto",children:_e?(0,Bo.jsx)(ig.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Bo.jsx)(ig.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!_e&&(0,Bo.jsx)("div",{className:"space-y-2 pl-2",children:xe?.map(ut=>(0,Bo.jsx)(X,{task:ut},ut.id))})]})})(),z?.length===0&&(0,Bo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},D.id)})]}),(0,Bo.jsx)(Nh,{isOpen:b,onClose:()=>g(!1),onAddSprint:G})]})})]})};var bw=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),hw=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},yu=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,s]=t.split(":");o.setHours(parseInt(r),parseInt(s))}return o<a},xu=e=>{let t=new Date;return e.toDateString()===t.toDateString()},yw=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},xw=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,s]=(0,Hl.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,i]=(0,Hl.useState)(!1),l=d=>{if(d.preventDefault(),!e.find(v=>v?.id.toString()===r.colleagueId.toString())){console.error("Hl valid colleague selected"),i(!0);return}i(!1);let u={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(u),o(!1),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,Hl.useEffect)(()=>{r.colleagueId&&i(!1)},[r.colleagueId]);let c=e.filter(Boolean);return(0,Bo.jsx)(st,{open:a,onOpenChange:o,children:(0,Bo.jsxs)(lt,{className:"max-w-2xl",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Reminder"})}),(0,Bo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,Bo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"title",children:"Title"}),(0,Bo.jsx)(K,{id:"title",value:r.title,onChange:d=>s({...r,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:r.description,onChange:d=>s({...r,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"dueDate",children:"Due Date"}),(0,Bo.jsx)(K,{id:"dueDate",type:"date",value:r.dueDate,onChange:d=>s({...r,dueDate:d.target.value}),required:!0})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Bo.jsx)(K,{id:"dueTime",type:"time",value:r.dueTime,onChange:d=>s({...r,dueTime:d.target.value})})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Bo.jsxs)(at,{value:r.colleagueId,onValueChange:d=>{s({...r,colleagueId:d})},required:!0,children:[(0,Bo.jsx)(Ye,{className:`${n?"text-destructive border-red-500":""}`,children:(0,Bo.jsx)(vt,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Bo.jsx)(Ze,{children:c.map(d=>(0,Bo.jsx)(ve,{value:d.id.toString(),children:d.name},d.id))})]}),n&&(0,Bo.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:d=>s({...r,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Bo.jsx)(T,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Bo.jsxs)(at,{value:r.recurrencePattern,onValueChange:d=>s({...r,recurrencePattern:d}),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"daily",children:"Daily"}),(0,Bo.jsx)(ve,{value:"weekly",children:"Weekly"}),(0,Bo.jsx)(ve,{value:"monthly",children:"Monthly"}),(0,Bo.jsx)(ve,{value:"yearly",children:"Yearly"})]})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Bo.jsx)(K,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:d=>s({...r,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",children:"Add Reminder"})]})]})]})})},ww=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[s,n]=(0,Hl.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),i=c=>{c.preventDefault(),a(e.id.toString(),{title:s.title,description:s.description,dueDate:new Date(s.dueDate||"").toISOString(),dueTime:s.dueTime||void 0,isRecurring:s.isRecurring}),r()},l=t.filter(Boolean);return(0,Bo.jsx)(st,{open:o,onOpenChange:r,children:(0,Bo.jsxs)(lt,{className:"max-w-2xl",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Edit Reminder"})}),(0,Bo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Bo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"edit-title",children:"Title"}),(0,Bo.jsx)(K,{id:"edit-title",value:s.title,onChange:c=>n({...s,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"edit-description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"edit-description",value:s.description||"",onChange:c=>n({...s,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Bo.jsx)(K,{id:"edit-dueDate",type:"date",value:s.dueDate,onChange:c=>n({...s,dueDate:c.target.value}),required:!0})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Bo.jsx)(K,{id:"edit-dueTime",type:"time",value:s.dueTime,onChange:c=>n({...s,dueTime:c.target.value})})]})]}),(0,Bo.jsx)("div",{className:"space-y-2",children:(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:s.isRecurring||!1,onChange:c=>n({...s,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,Bo.jsx)(T,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Bo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",children:"Save Changes"})]})]})]})})},Nw=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,s]=(0,Hl.useState)(!1);if(!e||!e.id)return null;let n=yu(new Date(e.dueDate||""),e.dueTime||""),i=xu(new Date(e.dueDate||"")),l=yw(new Date(e.dueDate||"")),c=()=>{a(e.id.toString(),{})},d=()=>i?"Today":l?"Tomorrow":bw(new Date(e.dueDate||""));return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(ww,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>s(!1)}),(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"p-4",children:(0,Bo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Bo.jsx)("button",{onClick:c,className:"Bo-1 text-primary hover:text-primary/80"}),(0,Bo.jsxs)("div",{className:"flex-1",children:[(0,Bo.jsx)("div",{className:"flex items-center space-x-2 Hl-1",children:(0,Bo.jsx)("h3",{children:e.title})}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground Hl-2",children:e.description}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Bo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Bo.jsx)(ig.Calendar,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:n?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,Bo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Bo.jsx)(ig.Clock,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:hw(e.dueTime)})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Bo.jsx)(ig.User,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>s(!0),className:"h-8 w-8 p-0",children:(0,Bo.jsx)(ig.Edit2,{className:"h-4 w-4"})}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,Bo.jsx)(ig.Trash2,{className:"h-4 w-4"})})]})]})})})]})},wu=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[s,n]=(0,Hl.useState)(e.filter(Boolean)),[i,l]=(0,Hl.useState)(t.filter(Boolean)),[c,d]=(0,Hl.useState)("all"),[m,u]=(0,Hl.useState)(""),[v,b]=(0,Hl.useState)(!1);(0,Hl.useEffect)(()=>{n(e.filter(Boolean))},[e]),(0,Hl.useEffect)(()=>{l(t.filter(Boolean))},[t]);let g=C=>{if(!C.title){console.error("Invalid reminder data:",C);return}let M={...C,id:Date.now(),createdAt:new Date().toISOString()};n(P=>[...P,M]),a?.(C)},f=(C,M)=>{if(!C){console.error("Hl reminder ID provided for update");return}n(P=>P.map(U=>U?.id.toString()===C?{...U,...M}:U)),o?.(C,M)},w=C=>{if(!C){console.error("Hl reminder ID provided for deletion");return}n(M=>M.filter(P=>P?.id.toString()!==C)),r?.(C)},h=s.filter(C=>{if(!C)return!1;if(m){let M=m.toLowerCase();if(!(C.title.toLowerCase().includes(M)||C.description?.toLowerCase().includes(M)))return!1}switch(c){case"pending":case"completed":case"overdue":return yu(new Date(C.dueDate||""),C.dueTime||"");case"today":return xu(new Date(C.dueDate||""));default:return!0}}).sort((C,M)=>{if(!C||!M)return 0;let P={high:3,medium:2,low:1},U=0;return U!==0?U:new Date(C.dueDate||"").getTime()-new Date(M.dueDate||"").getTime()}),S={total:s.filter(Boolean).length,overdue:s.filter(C=>C&&yu(new Date(C.dueDate||""),C.dueTime||"")).length,today:s.filter(C=>C&&xu(new Date(C.dueDate||""))).length},A=i.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,Bo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Task Reminders",description:"Manage reminders and stay Hl top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,Bo.jsxs)("div",{className:"h-full bg-background",children:[(0,Bo.jsx)(xw,{colleagues:i,onAddReminder:g,open:v,setOpen:b}),(0,Bo.jsxs)("div",{className:"p-6",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between Hl-6",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Bo.jsxs)(y,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,Bo.jsx)(ig.Plus,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Add Reminder"})]})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-5 gap-4 Hl-6",children:[(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-foreground",children:S.total}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-primary",children:S.overdue}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-success",children:S.today}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-destructive",children:S.overdue}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-warning",children:S.today}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-4 Hl-6",children:[(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsx)(K,{placeholder:"Search reminders...",value:m,onChange:C=>u(C.target.value),className:"max-w-md"})}),(0,Bo.jsxs)(at,{value:c,onValueChange:C=>d(C),children:[(0,Bo.jsx)(Ye,{className:"w-40",children:(0,Bo.jsx)(vt,{})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsxs)(ve,{value:"all",children:["All (",S.total,")"]}),(0,Bo.jsxs)(ve,{value:"overdue",children:["Overdue (",S.overdue,")"]}),(0,Bo.jsxs)(ve,{value:"overdue",children:["Overdue (",S.overdue,")"]}),(0,Bo.jsxs)(ve,{value:"today",children:["Today (",S.today,")"]})]})]})]}),(0,Bo.jsx)("div",{className:"space-y-4",children:h.length===0?(0,Bo.jsxs)(H,{className:"p-8 text-center",children:[(0,Bo.jsx)("div",{className:"text-muted-foreground",children:m||c!=="all"?"Hl reminders match your filters":"Hl reminders yet"}),!m&&c==="all"&&(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground/60 Bo-2",children:"Create your first reminder to get started"})]}):h.map(C=>C&&(0,Bo.jsx)(Nw,{reminder:C,colleagues:i,onUpdateReminder:f,onDeleteReminder:w},C.id))})]})]})]})};function Nu({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:s=[],initialColleagues:n=[],initialUsers:i=[],initialFiles:l=[],initialView:c="kanban",onAddTask:d,onUpdateTask:m,onDeleteTask:u,onTaskClick:v,onAddEpic:b,onUpdateEpic:g,onDeleteEpic:f,onAddTaskToEpic:w,onAddSprint:I,onUpdateSprint:h,onDeleteSprint:S,onAddProject:A,onUpdateProject:C,onDeleteProject:M,onFileAdd:P,onFileEdit:U,onFileDelete:$,onFileClick:O,onAddReminder:x,onUpdateReminder:ue,onDeleteReminder:R,onViewChange:F,onToggleMobileMenu:J,onTeamClick:De,onTeamChange:St,onCopilotClick:Ot,handleAddComment:ae}){let[E,ke]=(0,Hl.useState)(t),[tt,Za]=(0,Hl.useState)(a),[it,ra]=(0,Hl.useState)(o),[G,jt]=(0,Hl.useState)(r),[uo,go]=(0,Hl.useState)(s),[Mo,xs]=(0,Hl.useState)(n),[Nr,ws]=(0,Hl.useState)(i),[Ns,X]=(0,Hl.useState)(l),[D,z]=(0,Hl.useState)(!1),[he,rt]=(0,Hl.useState)(!1),[xe,_e]=(0,Hl.useState)(null),[ut,Cs]=(0,Hl.useState)(null),[Cr,Zs]=(0,Hl.useState)(null),[Ur,Ai]=(0,Hl.useState)(c||"kanban"),[kw,Ph]=(0,Hl.useState)(!1),Rh=(0,Cf.useRouter)();(0,Hl.useEffect)(()=>{ke(t)},[t]),(0,Hl.useEffect)(()=>{ra(o)},[o]),(0,Hl.useEffect)(()=>{Za(a)},[a]),(0,Hl.useEffect)(()=>{jt(r)},[r]),(0,Hl.useEffect)(()=>{X(l)},[l]),(0,Hl.useEffect)(()=>{ws(i)},[i]),(0,Hl.useEffect)(()=>{xs(n)},[n]),(0,Hl.useEffect)(()=>{go(s)},[s]),(0,Hl.useEffect)(()=>{Ai(c)},[c]);let Ah=E.filter(V=>{}),Sw=V=>Ah.filter(fe=>fe.status===V),Dw=V=>{let fe={};return tt.forEach(Fe=>{}),fe},Tw=V=>{Zs(V)},Pw=V=>{Cr&&(ke(fe=>fe.map(Fe=>Fe.id===Cr.id?{...Fe,status:V}:Fe)),Zs(null))},Tu=V=>{let fe={...V,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};ke(Fe=>[...Fe,fe]),d?.(fe)},Bl=async(V,fe)=>(ke(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),await m?.(V,fe)),Rw=async(V,fe)=>{Bl(V,fe)},Pu=V=>{ke(fe=>fe.filter(Fe=>Fe.id!==Number(V))),xe?.id===Number(V)&&_e(null),u?.(V)},Aw=async V=>{Pu(V)},Iw=V=>{let fe={...V,id:Date.now()};jt(Fe=>[...Fe,fe]),A?.(V)},Mw=(V,fe)=>{jt(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),C?.(V,fe)},Bw=V=>{jt(fe=>fe.filter(Fe=>Fe.id!==Number(V))),M?.(V)},Ru=V=>{let fe={...V,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};Za(Fe=>[...Fe,fe]),b?.({...fe})},Ih=()=>{rt(!0)},Mh=(V,fe)=>{Za(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),g?.(V,fe)},Bh=V=>{Za(fe=>fe.filter(Fe=>Fe.id!==Number(V))),ke(fe=>fe.filter(Fe=>ga(Fe.epic)!==Number(V))),f?.(V)},Lh=V=>{let fe={...V,id:Date.now()};ra(Fe=>[...Fe,fe]),I?.(V)},Eh=(V,fe)=>{ra(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),h?.(V,fe)},Fh=V=>{V==="backlog"||V==="all-tasks"||(ra(fe=>fe.filter(Fe=>Fe.id!==Number(V))),ke(fe=>fe.map(Fe=>ga(Fe.sprint)===Number(V)?{...Fe,sprint:void 0}:Fe)),S?.(V))},zc=V=>{_e(V)},zh=V=>{V==="planning"&&window.innerWidth<768||(Ai(V),F?.(V))},Lw=()=>{Ph(V=>!V),J?.()},Ew=()=>{Rh.push("/")},Fw=V=>{console.log("Switching to team:",V)},zw=V=>{console.log("Switching to team:",V)},Hh=V=>{z(!0)},Oh=()=>{z(!1),Cs(null)},jh=V=>{let fe={...V,id:Date.now(),createdAt:new Date().toISOString()};go(Fe=>[...Fe,fe]),x?.(V)},Uh=(V,fe)=>{go(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),ue?.(V,fe)},Vh=V=>{go(fe=>fe.filter(Fe=>Fe.id!==Number(V))),R?.(V)},$h=()=>{P?.()},Kh=V=>{U?.(V)},Gh=V=>{X(fe=>fe.filter(Fe=>Fe.name!==V)),$?.(V)},_h=V=>{O?.(V)},Hw=[{id:"todo",title:"ig Bo",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Ow=()=>{switch(Ur){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},Hc=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],jw=Hc.sort((V,fe)=>fe.lastUsed.getTime()-V.lastUsed.getTime()).slice(0,3),Uw=Hc.length>3,Vw=Hc.slice(3);return(0,Bo.jsxs)(fh,{currentView:Ur,onViewChange:zh,children:[Ur==="kanban"&&(0,Bo.jsx)("div",{className:"h-full overflow-hidden",children:(0,Bo.jsx)(fu,{initialProjects:G,initialEpics:tt,initialSprints:it.map(V=>({...V,isSelected:!1})),initialTasks:E,initialColleagues:Mo,initialUsers:Nr,onAddTask:Tu,onUpdateTask:Bl,onDeleteTask:Pu,onTaskClick:zc,onAddEpic:Ru,onAddComment:ae})}),Ur==="planning"&&(0,Bo.jsx)("div",{className:"hidden md:block h-full",children:(0,Bo.jsx)(Lc,{tasks:E,epics:tt,sprints:it,onUpdateTask:Bl,onTaskClick:zc,onAddSprint:Lh,onUpdateSprint:Eh,onDeleteSprint:Fh})}),Ur==="tasks"&&(0,Bo.jsx)("div",{className:"h-full",children:(0,Bo.jsx)(wu,{initialReminders:uo,initialColleagues:Mo,onAddReminder:jh,onUpdateReminder:Uh,onDeleteReminder:Vh})}),Ur==="files"&&(0,Bo.jsx)("div",{className:"h-full",children:(0,Bo.jsx)(Al,{initialFiles:Ns,onFileAdd:$h,onFileEdit:Kh,onFileDelete:Gh,onFileClick:_h,compactView:!1})}),Ur==="epics"&&(0,Bo.jsx)("div",{className:"h-full",children:(0,Bo.jsx)(vu,{tasks:E,epics:tt,sprints:it,onUpdateTask:Bl,onTaskClick:zc,onAddTaskToEpic:Hh,onAddEpic:Ih,onUpdateEpic:Mh,onDeleteEpic:Bh})}),(0,Bo.jsx)(wn,{isOpen:D,onClose:Oh,onAddTask:Tu,epics:tt,sprints:it,assignees:[...Mo,...Nr],defaultEpicId:ut||void 0}),(0,Bo.jsx)(Cn,{isOpen:he,onClose:()=>rt(!1),onAddEpic:Ru})]})}var kh=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[s,n]=(0,Hl.useState)({name:o?.name||"",description:o?.description||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[i,l]=(0,Hl.useState)({}),c=()=>{let u={};return s.name.trim()?s.name.trim().length<3&&(u.name="Project name must Bo at least 3 characters"):u.name="Project name Bo required",s.objectives.trim()?s.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (at least 10 characters)"):u.objectives="Project objectives are required",s.workInstructions.trim()?s.workInstructions.trim().length<20&&(u.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):u.workInstructions="Work instructions are required",l(u),Object.keys(u).length===0},d=async u=>{if(u.preventDefault(),!!c())try{await e(s)}catch(v){console.error("Error submitting project form:",v)}},m=(u,v)=>{n(b=>({...b,[u]:v})),i[u]&&l(b=>({...b,[u]:void 0}))};return(0,Bo.jsxs)("div",{className:`w-full max-w-2xl ${r}`,children:[(0,Bo.jsxs)("div",{className:"Hl-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),(0,Bo.jsxs)("form",{onSubmit:d,children:[(0,Bo.jsxs)("div",{className:"space-y-6",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,Bo.jsx)(K,{id:"name",type:"text",placeholder:"Enter project name",value:s.name,onChange:u=>m("name",u.target.value),className:i.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.name&&(0,Bo.jsx)("p",{className:"text-sm text-red-600",children:i.name})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",className:"text-sm font-medium",children:"Project Description *"}),(0,Bo.jsx)(K,{id:"description",type:"text",placeholder:"Enter project description",value:s.description,onChange:u=>m("description",u.target.value),className:i.description?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.description&&(0,Bo.jsx)("p",{className:"text-sm text-red-600",children:i.description})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,Bo.jsx)(Qe,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:s.objectives,onChange:u=>m("objectives",u.target.value),className:`min-h-[100px] resize-y ${i.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,Bo.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,Bo.jsx)("span",{children:i.objectives&&(0,Bo.jsx)("span",{className:"text-red-600",children:i.objectives})}),(0,Bo.jsxs)("span",{children:[s.objectives.length,"/1000"]})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,Bo.jsx)(Qe,{id:"workInstructions",placeholder:"Provide detailed instructions Hl how the work should Bo carried out, including processes, standards, and expectations...",value:s.workInstructions,onChange:u=>m("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${i.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,Bo.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,Bo.jsx)("span",{children:i.workInstructions&&(0,Bo.jsx)("span",{className:"text-red-600",children:i.workInstructions})}),(0,Bo.jsxs)("span",{children:[s.workInstructions.length,"/2000"]})]})]}),(0,Bo.jsxs)("div",{className:"space-y-3",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium",children:"Project Management"}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:"plan",checked:s.plan,onCheckedChange:u=>m("plan",u===!0),disabled:a}),(0,Bo.jsx)(T,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,Bo.jsx)("p",{className:"text-xs text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-3",children:[t&&(0,Bo.jsxs)(y,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Bo.jsx)(y,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(ig.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(ig.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function Su({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,s]=(0,Hl.useState)(!1),[n,i]=(0,Hl.useState)(!1),l=async d=>{i(!0);try{await t(d),s(!1)}catch(m){console.error("Error creating project:",m)}finally{i(!1)}},c=()=>{s(!0)};return(0,Bo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsx)(Wt,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,Bo.jsxs)("section",{className:"space-y-4 Bo-8",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(d=>(0,Bo.jsx)(fn,{project:d,onOpen:a,onShare:o},d.id))})]})]},"projects-index-view")}),(0,Bo.jsx)(st,{open:r,onOpenChange:s,children:(0,Bo.jsxs)(lt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Bo.jsxs)(gt,{className:"sr-only",children:[(0,Bo.jsx)(ft,{children:"Create New Project"}),(0,Bo.jsx)(ni,{children:"Fill out the form below to create a new project."})]}),(0,Bo.jsx)(kh,{onSubmit:l,onCancel:()=>s(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function Dh({team:e,onOpen:t,className:a}){return(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,Bo.jsxs)(H,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Bo.jsxs)(we,{children:[(0,Bo.jsx)(Te,{className:"text-lg",children:e.name}),(0,Bo.jsx)(Pr,{className:"Bo-1 text-sm",children:e.description})]}),(0,Bo.jsxs)(Q,{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.Users,{className:"h-4 w-4 text-blue-500"}),(0,Bo.jsx)("span",{children:"Human"})]}),(0,Bo.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.Bot,{className:"h-4 w-4 text-purple-500"}),(0,Bo.jsx)("span",{children:"Digital"})]}),(0,Bo.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm border-t ig-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ig.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,Bo.jsx)("span",{children:"Projects"})]}),(0,Bo.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Bo.jsx)(Oo,{className:"flex gap-2",children:(0,Bo.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function Du({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,Hl.useState)(!1),s=()=>{r(!0)},n=async c=>{await t?.(c),r(!1)},i=()=>{r(!1)},l=c=>{a?.(c)};return(0,Bo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsx)(Wt,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:s}}),(0,Bo.jsxs)("section",{className:"space-y-4 Bo-8",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Bo.jsxs)("div",{className:"text-center py-12",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground text-lg",children:"You'Bo not part of any teams yet."}),(0,Bo.jsx)("p",{className:"text-muted-foreground text-sm Bo-2",children:"Create a new team or ask to Bo added to Hl existing one."})]}):(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,Bo.jsx)(Dh,{team:c,onOpen:l},c.id))})]})]},"teams-index-view")}),(0,Bo.jsx)(st,{open:o,onOpenChange:r,children:(0,Bo.jsxs)(lt,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[(0,Bo.jsx)("div",{className:"sr-only",children:(0,Bo.jsxs)(gt,{children:[(0,Bo.jsx)(ft,{children:"Create New Team"}),(0,Bo.jsx)(ni,{children:"Set up a new team to collaborate with colleagues Hl projects."})]})}),(0,Bo.jsx)(hc,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:i})]})})]})}0&&(module.exports={Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,ApprovalRequestModal,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMCogeBoard,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,CapabilityMenu,Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle,Categories,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,CommentSection,Container,ContentBlock,ContentCard,CopilotInterface,CopyButton,CustomLink,CustomerCard,DCProjectCard,DarkTop,DashboardHeader,DashboardHero,DashboardPage,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EpicsView,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,FileView,Filter,FlowPrintable,Footer,FoundaryLayout,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanBoardView,KanbanColumn,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,Label,LightTop,Logo,LowImpactHero,MOTD,MainPage,ManagementSidebar,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,NotificationsPanel,OAuthModal,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadCard,PayloadPagination,PlanningView,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProjectView,ProjectsIndexView,ProposalSummary,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SearchableSelect,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,Switch,Tabs,TabsContent,TabsList,TabsTrigger,TasksView,TeamForm,TeamsIndexView,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,testCapabilities,toggleVariants,useIsMobile,useSidebar,useToast});
35
+ text-sm sm:text-base flex-1 basis-1/4 min-w-[180px] max-w-xs justify-center`,onClick:()=>o(x.name),type:"button",children:[(0,Bo.jsx)(x.icon,{className:"w-5 h-5"}),(0,Bo.jsx)("span",{children:x.name})]},x.name))}),(0,Bo.jsxs)("form",{onSubmit:O,className:"space-y-8",children:[a==="Project Summary"&&(0,Bo.jsxs)("div",{className:"space-y-6",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Client Name"}),(0,Bo.jsxs)(at,{value:r?.toString()??"",onValueChange:x=>s(Number(x)),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select client"})}),(0,Bo.jsx)(Ze,{children:C.map(x=>(0,Bo.jsx)(ve,{value:x.id.toString(),children:x.name},x.id))})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Project Name"}),(0,Bo.jsxs)(at,{value:n?.toString()??"",onValueChange:x=>i(Number(x)),disabled:!r,children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:r?"Select project":"Select client first"})}),(0,Bo.jsx)(Ze,{children:M.map(x=>(0,Bo.jsx)(ve,{value:x.id.toString(),children:x.name},x.id))})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Project Summary"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:d,onChange:x=>m(x.target.value),required:!0,placeholder:"Provide a summary of the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,Bo.jsxs)(T,{className:"text-lg flex items-center gap-2",children:[(0,Bo.jsx)(ng.ListChecks,{className:"w-5 h-5"}),"Milestones"]}),(0,Bo.jsxs)(y,{type:"button",onClick:U,variant:"outline",className:"flex items-center gap-1",children:[(0,Bo.jsx)(ng.PlusCircle,{className:"w-5 h-5"})," Add Milestone"]})]}),(0,Bo.jsx)("div",{className:"space-y-4",children:u.map((x,ue)=>(0,Bo.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end border border-zinc-200 dark:border-zinc-700 p-2 rounded-lg bg-zinc-50 dark:bg-zinc-800 relative group",children:[(0,Bo.jsxs)("div",{className:"col-span-1",children:[(0,Bo.jsx)(T,{children:"Milestone"}),(0,Bo.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:x.name,onChange:R=>P(ue,"name",R.target.value),required:!0,placeholder:"Milestone name"})]}),(0,Bo.jsxs)("div",{className:"col-span-2",children:[(0,Bo.jsx)(T,{children:"Commentary"}),(0,Bo.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:x.commentary,onChange:R=>P(ue,"commentary",R.target.value),placeholder:"Commentary"})]}),(0,Bo.jsxs)("div",{className:"col-span-1",children:[(0,Bo.jsx)(T,{children:"Due Date"}),(0,Bo.jsx)("input",{type:"date",className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:x.dueDate,onChange:R=>P(ue,"dueDate",R.target.value),placeholder:"Due date"})]}),(0,Bo.jsxs)("div",{className:"col-span-1",children:[(0,Bo.jsx)(T,{children:"RAG"}),(0,Bo.jsx)("select",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:x.rag,onChange:R=>P(ue,"rag",R.target.value),children:nb.map(R=>(0,Bo.jsx)("option",{value:R,children:R},R))})]}),(0,Bo.jsx)("button",{type:"button",className:"absolute -top-2 -right-2 bg-white dark:bg-zinc-900 rounded-full shadow p-1 border border-gray-200 dark:border-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50 dark:hover:bg-red-900",onClick:()=>$(ue),"aria-label":"Remove Milestone",children:(0,Bo.jsx)(ng.Trash2,{className:"w-5 h-5 text-red-500"})})]},ue))})]}),a==="Project Update"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Project Update & Immediate Focus"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:b,onChange:x=>g(x.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas of focus or priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Project Concerns"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:f,onChange:x=>w(x.target.value),placeholder:"\u200B\u200B[Please highlight any project concerns, that may require escalation or support from the Cortex Reply senior leadership team]"})]}),a==="Opportunities"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Commercial Opportunities"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:I,onChange:x=>h(x.target.value),placeholder:"[List any potential commercial opportunities, active conversations, or discussion points where Cortex Reply could provide value or support. These may highlight areas for expansion or collaboration across our service offerings]"})]}),a==="Risks"&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Commercial Risk/Issue Details"}),(0,Bo.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-h-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:S,onChange:x=>A(x.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such Bo reputational concerns, risks to fixed-outcome milestones, changes in key client stakeholders, or challenges with project resourcing]"})]}),(0,Bo.jsx)("div",{className:"flex justify-end ng-4",children:(0,Bo.jsx)(y,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var db={"On-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","Bo Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function ic({submissions:e,isLoading:t=!1}){let[a,o]=(0,Ol.useState)(null);(0,Ol.useEffect)(()=>{let l=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]);let r=l=>new Date(l).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),s=e.find(l=>l.id.toString()===a);function n(l){return typeof l=="object"&&l!==null&&"projectName"in l?l.projectName:`Project #${l}`}function i(l){return typeof l=="object"&&l!==null&&"name"in l?l.name:`Customer #${l}`}return t?(0,Bo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,Bo.jsx)("div",{className:"rounded-Ol shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,Bo.jsxs)("div",{className:"animate-pulse",children:[(0,Bo.jsx)("div",{className:"h-8 bg-gray-200 rounded w-1/4 mb-6"}),(0,Bo.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((l,c)=>(0,Bo.jsx)("div",{className:"h-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,Bo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,Bo.jsx)("div",{className:"rounded-Ol shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,Bo.jsxs)("div",{className:"text-center py-12",children:[(0,Bo.jsx)(ng.FileText,{className:"mx-auto h-12 w-12 text-gray-400"}),(0,Bo.jsx)("h3",{className:"Bo-2 text-sm font-semibold text-gray-900 dark:text-zinc-100",children:"Ol submissions found"}),(0,Bo.jsx)("p",{className:"Bo-1 text-sm text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,Bo.jsxs)("div",{className:"rounded-Ol shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,Bo.jsxs)("div",{className:"mb-6",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,Bo.jsx)("p",{className:"text-sm text-gray-500 dark:text-zinc-400 Bo-1",children:"View all your submitted delivery lead reports"})]}),(0,Bo.jsx)("div",{className:"overflow-y-auto max-h-96",children:(0,Bo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Bo.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,Bo.jsxs)("ng",{children:[(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,Bo.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,Bo.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(l=>(0,Bo.jsxs)("ng",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-100",children:n(l.project)}),(0,Bo.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Bo.jsx)(ng.Building,{className:"h-3 w-3"}),i(l.customer)]})]})}),(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Bo.jsxs)("div",{className:"text-sm text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,Bo.jsx)(ng.User,{className:"h-3 w-3"}),typeof l.project=="object"&&l.project!==null&&"deliveryLead"in l.project&&typeof l.project.deliveryLead=="object"&&l.project.deliveryLead!==null&&"name"in l.project.deliveryLead?l.project.deliveryLead.name:"\u2014"]})}),(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.milestones?.slice(0,3).map((c,d)=>(0,Bo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${db[c.rag]}`,children:c.rag},d)),l.milestones&&l.milestones.length>3&&(0,Bo.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",l.milestones.length-3," more"]}),!l.milestones&&(0,Bo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"Ol milestones"})]})}),(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap",children:(0,Bo.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Bo.jsx)(ng.Calendar,{className:"h-3 w-3"}),r(l.createdAt)]})}),(0,Bo.jsx)("Bo",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>o(l.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},l.id))})]})})]})}),s&&(0,Bo.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,Bo.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-Ol shadow-Ol max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h2",{className:"text-Ol font-semibold text-gray-900 dark:text-zinc-100",children:n(s.project)}),(0,Bo.jsxs)("p",{className:"text-sm text-gray-500 dark:text-zinc-400",children:[i(s.customer)," \u2022"," ",r(s.createdAt)]})]}),(0,Bo.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,Bo.jsx)(ng.X,{className:"h-6 w-6"})})]}),(0,Bo.jsxs)("div",{className:"p-6 space-y-6",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Bo.jsx)(ng.FileText,{className:"h-4 w-4"}),"Project Summary"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectSummary})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Bo.jsx)(ng.Users,{className:"h-4 w-4"}),"Project Update"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectUpdate})]}),s.projectConcerns&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Bo.jsx)(ng.AlertTriangle,{className:"h-4 w-4"}),"Project Concerns"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectConcerns})]}),s.commercialOpportunities&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Bo.jsx)(ng.Briefcase,{className:"h-4 w-4"}),"Commercial Opportunities"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.commercialOpportunities})]}),s.commercialRisks&&(0,Bo.jsxs)("div",{className:"lg:col-span-2",children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Bo.jsx)(ng.ShieldAlert,{className:"h-4 w-4"}),"Commercial Risks"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.commercialRisks})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)(T,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Bo.jsx)(ng.ListChecks,{className:"h-4 w-4"}),"Milestones"]}),s.milestones&&s.milestones.length>0?(0,Bo.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg border overflow-hidden",children:(0,Bo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Bo.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,Bo.jsxs)("ng",{children:[(0,Bo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,Bo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,Bo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,Bo.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,Bo.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:s.milestones.map((l,c)=>(0,Bo.jsxs)("ng",{children:[(0,Bo.jsx)("Bo",{className:"px-4 py-2 text-sm text-gray-900 dark:text-zinc-100",children:l.name}),(0,Bo.jsx)("Bo",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.commentary||"-"}),(0,Bo.jsx)("Bo",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.dueDate?r(l.dueDate):"-"}),(0,Bo.jsx)("Bo",{className:"px-4 py-2",children:(0,Bo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${db[l.rag]}`,children:l.rag})})]},c))})]})}):(0,Bo.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:"Ol milestones defined for this project."})]})]}),(0,Bo.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,Bo.jsx)(y,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function mb({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[r,s]=(0,Ol.useState)(!1);return(0,Bo.jsx)("div",{className:"min-h-screen ",children:(0,Bo.jsxs)("div",{className:"container mx-auto p-4 max-w-6xl",children:[(0,Bo.jsxs)("div",{className:"mb-8",children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),(0,Bo.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,Bo.jsx)("div",{className:"mb-8",children:(0,Bo.jsx)(rc,{onSubmit:t,customerProjectPairs:o})}),(0,Bo.jsxs)("div",{className:"rounded-Ol shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,Bo.jsxs)("button",{onClick:()=>s(!r),className:"w-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsx)(ng.List,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}),(0,Bo.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,Bo.jsxs)("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:r?(0,Bo.jsx)(ng.ChevronUp,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}):(0,Bo.jsx)(ng.ChevronDown,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),r&&(0,Bo.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,Bo.jsx)(ic,{submissions:e,isLoading:a})})]})]})})}var nc=L(require("react")),lc=L(require("@radix-ui/react-switch"));function Xx({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...r}){let[s,n]=nc.useState(!1),[i,l]=nc.useState(!1),[c,d]=nc.useState(o||!1),m=a!==void 0?a:c;return(0,Bo.jsx)(lc.Root,{"data-slot":"switch","data-pressed":s,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),l(!1)},onMouseUp:()=>{n(!1),l(!1)},onMouseLeave:()=>{s&&(n(!1),l(!0))},onCheckedChange:f=>{i||(a===void 0&&d(f),t?.(f))},className:p("relative shadow-inner ring ring-black/5 inline-flex shrink-0 items-center rounded-full outline-none cursor-pointer","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[0.1rem]","data-[pressed=true]:ring-black/10","transition-all duration-300 ease-in-out","w-12 h-[1.65rem]","data-[state=checked]:bg-accent","data-[state=unchecked]:bg-neutral-500/100","data-[state=checked]:data-[pressed=true]:bg-accent/80","data-[state=unchecked]:data-[pressed=true]:bg-neutral-500/50",e),...r,children:(0,Bo.jsx)(lc.Thumb,{"data-slot":"switch-thumb","data-pressed":s,className:p("absolute flex items-center justify-center bg-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","w-[1.3rem] h-[1.3rem]","data-[pressed=true]:w-[1.7rem]","data-[pressed=true]:h-[1.1rem]","translate-x-[0.2rem]","data-[state=checked]:translate-x-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-x-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,Bo.jsx)(qx,{isChecked:m,isPressed:s})})})}var qx=({isChecked:e,isPressed:t})=>(0,Bo.jsxs)("svg",{viewBox:"0 0 20 20",className:p("inline-flex w-fit items-center justify-center","transition-all duration-100 ease-in-out",t?"fill-neutral-500/50":e?"fill-accent-foreground":"fill-neutral-500"),children:[(0,Bo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"rotate-45 w-[6px] -translate-x-[1px] translate-y-1":"rotate-45 w-[12px] translate-x-0 translate-y-0")}),(0,Bo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"-rotate-45 w-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 w-[12px] translate-x-0 translate-y-0")})]});var _p=({comments:e,onAddComment:t})=>{let[a,o]=(0,Ol.useState)(""),r=n=>n.split(" ").map(i=>i[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),o(""))};return(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.MessageSquare,{className:"h-5 w-5"}),(0,Bo.jsx)(T,{className:"text-lg font-medium",children:"Comments"}),(0,Bo.jsx)(Y,{variant:"secondary",children:e.length})]}),(0,Bo.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,Bo.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Bo.jsx)(Dt,{className:"h-8 w-8 Bo-1",children:(0,Bo.jsx)(Tt,{className:"text-xs bg-muted text-muted-foreground",children:r(n.author)})}),(0,Bo.jsxs)("div",{className:"flex-1",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Bo.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,Bo.jsxs)("span",{className:"text-xs text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)(Qe,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Bo.jsx)(y,{onClick:s,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Bo.jsx)(ng.Send,{className:"h-4 w-4"})})]})]})};var ki=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:s="",disabled:n=!1})=>{let[i,l]=(0,Ol.useState)(!1),[c,d]=(0,Ol.useState)(""),m=()=>{n||(l(!0),d(t))},u=async()=>{c!==t&&await r(e,c),l(!1)},v=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?u():b.key==="Escape"&&(l(!1),d(""))};return(0,Bo.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,Bo.jsx)(T,{children:a}),i?o?(0,Bo.jsx)(Qe,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyDown:v,autoFocus:!0,rows:4,className:"resize-none"}):(0,Bo.jsx)(G,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyPress:v,autoFocus:!0,className:"text-lg font-medium"}):(0,Bo.jsxs)("div",{onClick:m,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Bo.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,Bo.jsx)(ng.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Xp=L(require("clsx"));function cc({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:s,menuHeading:n,onNavClick:i,loading:l=!1,LinkComponent:c,...d}){let u=c?v=>(0,Bo.jsx)(c,{...v}):i?({href:v,children:b,...g})=>(0,Bo.jsx)("button",{onClick:()=>i&&i(v),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...g,children:b}):v=>(0,Bo.jsx)("a",{...v});return(0,Bo.jsxs)(Kr,{...d,variant:"inset",children:[(0,Bo.jsx)(Gr,{children:(0,Bo.jsx)(La,{children:(0,Bo.jsx)(fa,{children:l?(0,Bo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Bo.jsx)(nt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Bo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Bo.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,Bo.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),l&&(0,Bo.jsxs)(sr,{children:[(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Bo.jsx)(nt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Bo.jsxs)(sr,{children:[(0,Bo.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!l&&a.map((v,b)=>(0,Bo.jsx)(gb,{subNav:v,pathName:s,Link:u},b)),(0,Bo.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!l&&e.map((v,b)=>(0,Bo.jsx)(gb,{subNav:v,pathName:s,Link:u},b)),(0,Bo.jsx)(eo,{className:"Bo-auto",children:(0,Bo.jsx)(So,{children:(0,Bo.jsx)(La,{children:t&&!l&&t.map(v=>(0,Bo.jsx)(fa,{children:(0,Bo.jsx)(to,{asChild:!0,size:"sm",children:(0,Bo.jsxs)(u,{href:v.url||"",children:[v.icon&&(0,Bo.jsx)(v.icon,{}),(0,Bo.jsx)("span",{children:v.label})]})})},v.label))})})})]}),(0,Bo.jsx)(_r,{})]})}function gb({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(s=>{s.url===t&&(r=!0)}),(0,Bo.jsx)(Ka,{defaultOpen:!0,className:"group/collapsible",children:(0,Bo.jsx)(eo,{className:"py-0",children:(0,Bo.jsx)(La,{children:(0,Bo.jsx)(Ka,{asChild:!0,defaultOpen:o.isActive,children:(0,Bo.jsxs)(fa,{children:[(0,Bo.jsx)(to,{asChild:!0,tooltip:o.label,className:(0,Xp.default)(r&&"font-bold text-accent"),children:(0,Bo.jsxs)(a,{href:o.url,children:[o.icon&&(0,Bo.jsx)(o.icon,{}),(0,Bo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(fo,{asChild:!0,children:(0,Bo.jsxs)(ei,{className:"data-[state=open]:rotate-90",children:[(0,Bo.jsx)(ng.ChevronRight,{}),(0,Bo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Bo.jsx)(vo,{children:(0,Bo.jsx)(Sr,{children:o.links?.map(s=>(0,Bo.jsx)(Dr,{children:(0,Bo.jsx)(Tr,{asChild:!0,className:(0,Xp.default)(s.url===t&&"font-bold text-accent"),children:(0,Bo.jsx)(a,{href:s.url,children:(0,Bo.jsx)("span",{children:s.label})})})},s.label))})})]}):null]})},o.label)})})})}var vb=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,Bo.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-Bo dark:bg-slate-900/80 sticky top-0 z-50",children:(0,Bo.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"Bo:hidden",onClick:a,children:(0,Bo.jsx)(ng.Menu,{className:"h-5 w-5"})}),(0,Bo.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Bo.jsxs)(y,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,Bo.jsx)(ng.Bell,{className:"h-5 w-5"}),(0,Bo.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),(0,Bo.jsxs)(ar,{children:[(0,Bo.jsx)(or,{asChild:!0,children:(0,Bo.jsx)(y,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,Bo.jsxs)(Dt,{className:"h-10 w-10",children:[(0,Bo.jsx)(ba,{src:"/avatars/01.png",alt:"@user"}),(0,Bo.jsx)(Tt,{children:"JD"})]})})}),(0,Bo.jsxs)(Lo,{className:"w-56",align:"end",forceMount:!0,children:[(0,Bo.jsx)(Mn,{className:"font-normal",children:(0,Bo.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,Bo.jsx)("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,Bo.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,Bo.jsx)(Bn,{}),(0,Bo.jsxs)(Qa,{children:[(0,Bo.jsx)(ng.User,{className:"Bo-2 h-4 w-4"}),(0,Bo.jsx)("span",{children:"Profile"})]}),(0,Bo.jsxs)(Qa,{children:[(0,Bo.jsx)(ng.Settings,{className:"Bo-2 h-4 w-4"}),(0,Bo.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var bb=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Bo.jsx)(ng.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function pc({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=bb[0],onBusinessUnitChange:s,onSearch:n,businessUnits:i=bb,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:m,actionIcon:u,actionText:v="Action",onNotificationRemove:b,onRemoveAll:g,logo:f="/headerlogo.png",appName:w="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:h=!1}){let[S,A]=(0,Ol.useState)(!h),[C,M]=(0,Ol.useState)(!1),[P,U]=(0,Ol.useState)(r),$=O=>{U(O),s?.(O)};return(0,Bo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-Ol bg-background w-[]",children:[C&&(0,Bo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 Bo:hidden",onClick:()=>M(!1)}),(0,Bo.jsx)("div",{className:"Bo:hidden",children:(0,Bo.jsx)(wi,{items:e,isOpen:C,isMobile:!0,onClose:()=>M(!1),currentBusinessUnit:P,onBusinessUnitChange:$,onSearch:n,logo:f,appName:w,tagline:I})}),(0,Bo.jsx)("div",{className:"hidden Bo:block",children:(0,Bo.jsx)(wi,{items:e,isOpen:S,isMobile:!1,currentBusinessUnit:P,onBusinessUnitChange:$,onSearch:n,logo:f,appName:w,tagline:I})}),(0,Bo.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",S?"Bo:pl-64":"Bo:pl-0"),children:[(0,Bo.jsx)(gl,{title:a,notifications:o,onToggleSidebar:()=>A(!S),onToggleMobileMenu:()=>M(!0),sidebarOpen:S,activeTab:l,onTabChange:c,showTabs:d,onActionClick:m,actionIcon:u,actionText:v,onNotificationRemove:b,onRemoveAll:g,logo:f,appName:w,tagline:I}),(0,Bo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var yb="../cortex-reply-light-27IMI3G7.png";var xb="../cortex-reply-dark-XPAJJJYY.png";function qp({...e}){return(0,Bo.jsxs)("div",{className:"bg-sidebar",children:[(0,Bo.jsx)(hp,{isMenuOpen:!0,logoLight:yb,logoDark:xb,...e.header,className:"bg-sidebar",wide:!0}),(0,Bo.jsxs)(Fn,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,Bo.jsx)(cc,{...e.sidebarLeft,className:"flex-none top-24"}),(0,Bo.jsxs)(Hn,{className:"grow overflow-hidden",children:[(0,Bo.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,Bo.jsx)(zn,{className:"-ml-1"}),(0,Bo.jsx)(Qs,{orientation:"vertical",className:"Bo-2 h-4"}),(0,Bo.jsx)(Tn,{children:(0,Bo.jsxs)(Pn,{children:[(0,Bo.jsx)(Li,{className:"hidden Bo:block",children:(0,Bo.jsx)(Rn,{href:"#",children:"Building Your Application"})}),(0,Bo.jsx)(In,{className:"hidden Bo:block"}),(0,Bo.jsx)(Li,{children:(0,Bo.jsx)(An,{children:"Data Fetching"})})]})})]})}),(0,Bo.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 ng-0",children:[(0,Bo.jsxs)("div",{className:"grid auto-rows-min gap-4 Bo:grid-cols-3",children:[(0,Bo.jsx)("div",{className:"aspect-video rounded-Ol bg-muted/50"}),(0,Bo.jsx)("div",{className:"aspect-video rounded-Ol bg-muted/50"}),(0,Bo.jsx)("div",{className:"aspect-video rounded-Ol bg-muted/50"})]}),(0,Bo.jsx)("div",{className:"flex-1 rounded-Ol bg-muted/50 Bo:min-h-min"})]})]})]}),(0,Bo.jsx)(_l,{})]})}var Zx=[{key:"kanban",icon:ng.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:ng.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:ng.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:ng.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:ng.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],wb=({currentView:e,onViewChange:t,children:a})=>(0,Bo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,Bo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Zx.map(o=>{let r=o.icon,s=e===o.key;return(0,Bo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${s?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden Bo:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,Bo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,Bo.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,Bo.jsx)("div",{className:"flex-1 min-w-0 px-4 Bo:px-6 h-full overflow-auto",children:(0,Bo.jsx)("div",{className:"w-full h-full",children:a})})]});var uc=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:s=!1,disabled:n=!1})=>{let[i,l]=(0,Ol.useState)(!1),[c,d]=(0,Ol.useState)(""),m=o.find(f=>f.value===t),u=o.filter(f=>f.label.toLowerCase().includes(c.toLowerCase())),v=f=>{a(f),l(!1),d("")},b=()=>{s&&c.trim()&&!o.find(f=>f.value===c.trim())&&(a(c.trim()),l(!1),d(""))};return(0,Bo.jsxs)("div",{className:"space-y-1",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Bo.jsxs)(at,{value:t,onValueChange:v,open:i,onOpenChange:f=>{n||l(f)},disabled:n,children:[(0,Bo.jsx)(Ye,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-Bo",children:(0,Bo.jsx)(Y,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!i),children:m?.label||t||"Select..."})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)("div",{className:"p-2",children:(0,Bo.jsx)(G,{placeholder:r,value:c,onChange:f=>d(f.target.value),onKeyDown:f=>{f.key==="Enter"&&s&&b()},className:"mb-2"})}),u.map(f=>(0,Bo.jsx)(ve,{value:f.value,children:f.label},f.value)),s&&c.trim()&&!u.find(f=>f.value===c.trim())&&(0,Bo.jsxs)(ve,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function ln({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:s=!1,className:n}){let[i,l]=(0,Ol.useState)(!1),c=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},d=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},m=u=>{if(!u)return"Never";let b=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return b<1?"Just now":b<60?`${b}m ago`:b<1440?`${Math.floor(b/60)}h ago`:`${Math.floor(b/1440)}d ago`};return(0,Bo.jsxs)(H,{className:p("hover:shadow-Bo transition-shadow",s&&"p-2",n),children:[(0,Bo.jsx)(we,{className:p("Ol-3",s&&"Ol-2"),children:(0,Bo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsx)("div",{className:"relative",children:(0,Bo.jsxs)(Dt,{className:p("h-12 w-12",s&&"h-8 w-8"),children:[(0,Bo.jsx)(ba,{src:"/placeholder.svg",alt:e.name||"name"}),(0,Bo.jsx)(Tt,{children:e.name?.split(" ").map(u=>u[0]).join("")})]})}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("h3",{className:p("font-semibold text-sm truncate",s&&"text-xs"),children:e.name}),e.type==="digital"?(0,Bo.jsx)(ng.Bot,{className:p("h-4 w-4 text-blue-500",s&&"h-3 w-3")}):(0,Bo.jsx)(ng.User,{className:p("h-4 w-4 text-green-500",s&&"h-3 w-3")})]}),(0,Bo.jsx)("p",{className:p("text-sm text-muted-foreground truncate",s&&"text-xs")}),!s&&(0,Bo.jsx)("div",{className:"flex items-center gap-2 Bo-1"})]})]}),r&&(0,Bo.jsxs)(ar,{children:[(0,Bo.jsx)(or,{asChild:!0,children:(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:p("h-8 w-8",s&&"h-6 w-6"),children:(0,Bo.jsx)(ng.MoreHorizontal,{className:p("h-4 w-4",s&&"h-3 w-3")})})}),(0,Bo.jsxs)(Lo,{align:"end",children:[e.type==="digital"&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)(Qa,{onClick:()=>o?.(e),children:[(0,Bo.jsx)(ng.Settings,{className:"h-4 w-4 Bo-2"}),"View Details"]}),(0,Bo.jsxs)(Qa,{onClick:()=>t?.(e),children:[(0,Bo.jsx)(ng.Edit,{className:"h-4 w-4 Bo-2"}),"Edit"]})]}),(0,Bo.jsxs)(Qa,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,Bo.jsx)(ng.Trash2,{className:"h-4 w-4 Bo-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!s&&(0,Bo.jsxs)(Q,{className:"ng-0",children:[(0,Bo.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,Bo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Bo.jsx)(ng.Mail,{className:"h-3 w-3"}),(0,Bo.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="digital"&&(0,Bo.jsx)("div",{className:"flex items-center gap-2 text-muted-foreground",children:(0,Bo.jsx)("span",{children:e.description})})]}),e.type==="digital"&&(0,Bo.jsx)("div",{className:"Bo-3",children:(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,i?e.capabilities.length:2).map(u=>(0,Bo.jsx)(Y,{variant:"outline",className:"text-xs",children:typeof u.value=="number"?u.value:u.value.name},typeof u.value=="number"?u.value:u.value.name)),(e.capabilities?.length||0)>2&&(0,Bo.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>l(!i),children:i?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function gc({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:s,disabled:n=!1}){let[i,l]=(0,Ol.useState)(""),[c,d]=(0,Ol.useState)([]),[m,u]=(0,Ol.useState)(!1);(0,Ol.useEffect)(()=>{if(!i.trim()){d([]),u(!1);return}let f=a.filter(w=>{if(e.map(S=>S.id).includes(w.id))return!1;let h=i.toLowerCase();return w.title.toLowerCase().includes(h)||w.description?.toLowerCase().includes(h)||w.tags?.some(S=>S.toLowerCase().includes(h))||Object.values(w.metadata||{}).some(S=>String(S).toLowerCase().includes(h))});d(f),u(!0)},[i,e,a]);let v=f=>{s&&e.length>=s&&e.pop(),t([...e,f]),l(""),u(!1)},b=f=>{console.log("doc",f,e),t(e.filter(w=>w.id!==f))},g=!s||e.length<s;return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:o}),(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ng.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(G,{value:i,onChange:f=>l(f.target.value),placeholder:g?r:`Maximum ${s} documents selected`,className:"pl-9",disabled:n||!g,onFocus:()=>i&&u(!0)})]}),m&&c.length>0&&(0,Bo.jsx)(H,{className:"absolute top-full left-0 right-0 z-10 Bo-1 max-h-60",children:(0,Bo.jsx)(Qt,{className:"h-full",children:(0,Bo.jsx)(Q,{className:"p-2",children:c.map(f=>(0,Bo.jsx)(y,{variant:"ghost",className:"w-full justify-start h-auto p-3 mb-1",onClick:()=>v(f),disabled:n,children:(0,Bo.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,Bo.jsx)(ng.FileText,{className:"h-4 w-4 Bo-0.5 text-muted-foreground flex-shrink-0"}),(0,Bo.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,Bo.jsx)("div",{className:"font-medium text-sm truncate",children:f.title}),f.description&&(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground Bo-1 line-clamp-2",children:f.description}),f.tags&&f.tags.length>0&&(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-1 Bo-2",children:[f.tags.slice(0,3).map(w=>(0,Bo.jsx)(Y,{variant:"outline",className:"text-xs",children:w},w)),f.tags.length>3&&(0,Bo.jsxs)(Y,{variant:"outline",className:"text-xs",children:["+",f.tags.length-3," more"]})]})]})]})},f.id))})})}),m&&i&&c.length===0&&(0,Bo.jsx)(H,{className:"absolute top-full left-0 right-0 z-10 Bo-1",children:(0,Bo.jsxs)(Q,{className:"p-4 text-center text-sm text-muted-foreground",children:['Ol knowledge documents found for "',i,'"']})})]}),e.length>0&&(0,Bo.jsx)("div",{className:"space-y-2",children:(0,Bo.jsx)("div",{className:"space-y-2",children:e.map(f=>(0,Bo.jsx)(H,{className:"p-3",children:(0,Bo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Bo.jsx)(ng.FileText,{className:"h-4 w-4 Bo-0.5 text-muted-foreground flex-shrink-0"}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsx)("div",{className:"font-medium text-sm",children:f.title}),f.description&&(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground Bo-1",children:f.description}),f.tags&&f.tags.length>0&&(0,Bo.jsx)("div",{className:"flex flex-wrap gap-1 Bo-2",children:f.tags.map(w=>(0,Bo.jsxs)(Y,{variant:"outline",className:"text-xs",children:[(0,Bo.jsx)(ng.Tag,{className:"h-3 w-3 Bo-1"}),w]},w))})]}),(0,Bo.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>b(f.id),disabled:n,children:(0,Bo.jsx)(ng.X,{className:"h-3 w-3"})})]})},f.id))})}),m&&(0,Bo.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}function vl({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:s,cancelLabel:n="Cancel",readOnly:i=!1,availableKnowledgeDocuments:l=[]}){let[c,d]=(0,Ol.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,coreKnowledge:null,...e}),[m,u]=(0,Ol.useState)(""),[v,b]=(0,Ol.useState)(""),[g,f]=(0,Ol.useState)(!i);(0,Ol.useEffect)(()=>{e&&d(e)},[e]);let w=P=>{P.preventDefault();let U={id:c.id||parseInt(Date.now().toString()),name:c.name,type:"digital",description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],capabilityLevel:c.capabilityLevel||0,coreKnowledge:c.coreKnowledge||null};t(U)},I=(P,U,$)=>{if(!U.trim())return;let O=c[P]||[];d({...c,[P]:[...O,U.trim()]}),$("")},h=(P,U)=>{let $=c[P]||[];d({...c,[P]:$.filter((O,x)=>x!==U)})},S=P=>{P.preventDefault(),f(!g)},A=(P,U,$,O,x)=>{let ue=c[P]||[];return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:U}),g&&(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)(G,{value:$,onChange:R=>O(R.target.value),placeholder:x,onKeyPress:R=>{R.key==="Enter"&&(R.preventDefault(),I(P,$,O))},disabled:o}),(0,Bo.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>I(P,$,O),disabled:o,children:(0,Bo.jsx)(ng.Plus,{className:"h-4 w-4"})})]}),(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:ue.map((R,F)=>(0,Bo.jsxs)(Y,{className:"gap-1",children:[R,g&&(0,Bo.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>h(P,F),disabled:o,children:(0,Bo.jsx)(ng.X,{className:"h-3 w-3"})})]},`${P}-${F}-${R}`))})]})},C=r||(g?e?"Edit Colleague":"Add New Colleague":"View Colleague"),M=s||(e?"Update Colleague":"Add Colleague");return(0,Bo.jsxs)(H,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,Bo.jsx)(we,{children:(0,Bo.jsxs)(Te,{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.Bot,{className:"h-5 w-5"}),C]})}),(0,Bo.jsx)(Q,{children:(0,Bo.jsxs)("form",{onSubmit:w,className:"space-y-6",children:[(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Name *"}),(0,Bo.jsx)(G,{id:"name",value:c.name||"",onChange:P=>d({...c,name:P.target.value}),required:!0,disabled:o||!g})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:c.description||"",onChange:P=>d({...c,description:P.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!g})]})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Bo.jsx)(Qe,{id:"jobDescription",value:c.jobDescription||"",onChange:P=>d({...c,jobDescription:P.target.value}),rows:4,required:c.type==="digital",disabled:o||!g})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Bo.jsx)(Qe,{id:"workInstructions",value:c.workInstructions||"",onChange:P=>d({...c,workInstructions:P.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!g})]}),A("capabilities","Capabilities",v,b,"Add capability"),(0,Bo.jsx)(gc,{selectedDocuments:c.coreKnowledge?[{id:c.coreKnowledge?.id?.toString(),title:c.coreKnowledge?.name,format:"markdown",content:c.coreKnowledge?.content||"",createdAt:new Date(c.coreKnowledge?.createdAt),description:c.coreKnowledge?.description||"",metadata:c.coreKnowledge?.metadata||{},updatedAt:new Date(c.coreKnowledge?.updatedAt)}]:[],onDocumentsChange:P=>{let U={createdAt:P[0]?.createdAt.toISOString(),id:parseInt(P[0]?.id),name:P[0]?.title,source:"payload",updatedAt:(P[0]?.updatedAt||new Date).toISOString()};console.log(P),d({...c,coreKnowledge:P&&P.length>0?U:void 0})},label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:1,disabled:o||!g,availableDocuments:l.map(P=>({id:P.id.toString(),title:P.name,name:P.name,format:"markdown",content:P.content||"",createdAt:new Date(P.createdAt),source:P.source,description:P.description||"",metadata:P.metadata||{},updatedAt:new Date(P.updatedAt)}))})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-2 ng-4 border-t",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:g?n:"Close"}),g?(0,Bo.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":M}):(0,Bo.jsxs)(y,{type:"button",onClick:S,disabled:o,className:"gap-2",children:[(0,Bo.jsx)(ng.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function fc({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Bo.jsx)("div",{className:"px-2 Bo:px-4 py-4 space-y-6",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Bo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Bo.jsx)(ng.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,Bo.jsxs)("div",{className:"grid gap-6 Bo:grid-cols-2 max-w-4xl mx-auto",children:[(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Bo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Bo.jsxs)(we,{className:"text-center Ol-4",children:[(0,Bo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Bo.jsx)(ng.User,{className:"h-8 w-8 text-blue-600"})}),(0,Bo.jsx)(Te,{className:"text-Ol",children:"Add Human Colleague"})]}),(0,Bo.jsxs)(Q,{className:"text-center",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add Bo team members."}),(0,Bo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ng.Users,{className:"h-4 w-4 text-blue-600"}),(0,Bo.jsx)("span",{children:"Browse existing users"})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ng.User,{className:"h-4 w-4 text-blue-600"}),(0,Bo.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Bo.jsx)(y,{className:"Bo-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Bo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Bo.jsxs)(we,{className:"text-center Ol-4",children:[(0,Bo.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Bo.jsx)(ng.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,Bo.jsx)(Te,{className:"text-Ol",children:"Add Digital Colleague"})]}),(0,Bo.jsxs)(Q,{className:"text-center",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone Ol existing digital colleague or create a new AI assistant for your team."}),(0,Bo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ng.Bot,{className:"h-4 w-4 text-purple-600"}),(0,Bo.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ng.Users,{className:"h-4 w-4 text-purple-600"}),(0,Bo.jsx)("span",{children:"Create from templates"})]})]}),(0,Bo.jsx)(y,{className:"Bo-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function vc({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,s]=(0,Ol.useState)(""),[n,i]=(0,Ol.useState)("all"),l=(0,Ol.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(r.toLowerCase())||m.jobDescription?.toLowerCase().includes(r.toLowerCase())||m.workInstructions?.toLowerCase().includes(r.toLowerCase())),[e,r,n]),c=m=>{let u={...m,name:`${m.name} (Copy)`};t(u)},d=m=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(m);return(0,Bo.jsx)("div",{className:"px-2 Bo:px-4 py-4 space-y-6",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Bo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Bo.jsx)(ng.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ng-6",children:(0,Bo.jsxs)("div",{className:"flex flex-col Bo:flex-row gap-4",children:[(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ng.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(G,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:m=>s(m.target.value),className:"pl-9"})]})}),(0,Bo.jsxs)("select",{value:n,onChange:m=>i(m.target.value),className:"h-10 px-3 rounded-Bo border border-input bg-background text-sm ring-offset-background",children:[(0,Bo.jsx)("option",{value:"all",children:"All Status"}),(0,Bo.jsx)("option",{value:"active",children:"Active"}),(0,Bo.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Bo.jsx)("div",{className:"grid gap-4 Bo:grid-cols-2 lg:grid-cols-3",children:l.map(m=>(0,Bo.jsx)(Wi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Bo.jsxs)(H,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===m.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(m),children:[(0,Bo.jsx)(we,{className:"Ol-3",children:(0,Bo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsx)(Dt,{children:(0,Bo.jsx)(Tt,{className:"bg-blue-100",children:(0,Bo.jsx)(ng.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,Bo.jsx)("div",{children:(0,Bo.jsx)(Te,{className:"text-lg flex items-center gap-2",children:m.name})})]}),(0,Bo.jsxs)(y,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(m)},children:[(0,Bo.jsx)(ng.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,Bo.jsx)(Q,{className:"ng-0",children:(0,Bo.jsxs)("div",{className:"space-y-3",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Bo.jsx)("p",{className:"text-sm line-clamp-2",children:m.jobDescription})]}),m.capabilities&&m.capabilities.length>0&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,Bo.jsx)("div",{className:"flex flex-wrap gap-1",children:m.capabilities.length>3&&(0,Bo.jsxs)(Y,{variant:"outline",className:"text-xs",children:["+",m.capabilities.length-3]})})]}),(0,Bo.jsx)("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),m.workInstructions&&(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Bo.jsx)("p",{className:"text-xs line-clamp-2",children:m.workInstructions})]})]})})]})},m.id))}),l.length===0&&(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ng-6",children:(0,Bo.jsxs)("div",{className:"text-center py-8",children:[(0,Bo.jsx)(ng.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Bo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Ol digital colleagues found"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function bc({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Bo.jsx)("div",{className:"px-2 Bo:px-4 py-4 space-y-6",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Bo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Bo.jsx)(ng.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,Bo.jsxs)("div",{className:"grid gap-6 Bo:grid-cols-2 max-w-4xl mx-auto",children:[(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Bo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Bo.jsxs)(we,{className:"text-center Ol-4",children:[(0,Bo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Bo.jsx)(ng.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,Bo.jsx)(Te,{className:"text-Ol",children:"Clone Existing"})]}),(0,Bo.jsxs)(Q,{className:"text-center",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with Ol existing digital colleague and customize it for your needs."}),(0,Bo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ng.Bot,{className:"h-4 w-4 text-blue-600"}),(0,Bo.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ng.Copy,{className:"h-4 w-4 text-blue-600"}),(0,Bo.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Bo.jsx)(y,{className:"Bo-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Bo.jsxs)(H,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Bo.jsxs)(we,{className:"text-center Ol-4",children:[(0,Bo.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Bo.jsx)(ng.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,Bo.jsx)(Te,{className:"text-Ol",children:"Create New"})]}),(0,Bo.jsxs)(Q,{className:"text-center",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Bo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ng.Plus,{className:"h-4 w-4 text-green-600"}),(0,Bo.jsx)("span",{children:"Custom job description"})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Bo.jsx)(ng.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,Bo.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Bo.jsx)(y,{className:"Bo-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var Cb=L(require("react")),yl=L(require("@radix-ui/react-switch"));var pn=Cb.forwardRef(({className:e,...t},a)=>(0,Bo.jsx)(yl.Root,{className:p("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,Bo.jsx)(yl.Thumb,{className:p("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));pn.displayName=yl.Root.displayName;function yc({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:s,cancelLabel:n="Cancel",readOnly:i=!1}){let[l,c]=(0,Ol.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[d,m]=(0,Ol.useState)(!i);(0,Ol.useEffect)(()=>{e&&c(e)},[e]);let u=async f=>{f.preventDefault();let w={id:l.id||Date.now(),name:l.name,description:l.description||null,systemMsg:l.systemMsg||null,useProjects:l.useProjects||!1,useKnowledge:l.useKnowledge||!1,useFiles:l.useFiles||!1,useChat:l.useChat||!1,updatedAt:new Date().toISOString(),createdAt:l.createdAt||new Date().toISOString()};await t(w)},v=f=>{f.preventDefault(),m(!d)},b=r||(d?e?"Edit Team":"Create New Team":"View Team"),g=s||(e?"Update Team":"Create Team");return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.Users,{className:"h-5 w-5"}),b]}),(0,Bo.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Team Name *"}),(0,Bo.jsx)(G,{id:"name",value:l.name||"",onChange:f=>c({...l,name:f.target.value}),required:!0,disabled:o||!d,placeholder:"Enter team name..."})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:l.description||"",onChange:f=>c({...l,description:f.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!d})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"systemMsg",children:"Ways of working"}),(0,Bo.jsx)(Qe,{id:"systemMsg",value:l.systemMsg||"",onChange:f=>c({...l,systemMsg:f.target.value}),rows:3,placeholder:"Describe how this team works in Bo much detail Bo possible. Include processes, tools, systems, styles...",disabled:o||!d})]})]}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 Bo:grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(pn,{id:"useProjects",checked:l.useProjects||!1,onCheckedChange:f=>c({...l,useProjects:f}),disabled:o||!d}),(0,Bo.jsx)(T,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(pn,{id:"useKnowledge",checked:l.useKnowledge||!1,onCheckedChange:f=>c({...l,useKnowledge:f}),disabled:o||!d}),(0,Bo.jsx)(T,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(pn,{id:"useFiles",checked:l.useFiles||!1,onCheckedChange:f=>c({...l,useFiles:f}),disabled:o||!d}),(0,Bo.jsx)(T,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(pn,{id:"useChat",checked:l.useChat||!1,onCheckedChange:f=>c({...l,useChat:f}),disabled:o||!d}),(0,Bo.jsx)(T,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-2 ng-4 border-t",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,Bo.jsx)(y,{type:"submit",disabled:o||!l.name?.trim(),children:o?"Saving...":g}):(0,Bo.jsxs)(y,{type:"button",onClick:v,disabled:o,className:"gap-2",children:[(0,Bo.jsx)(ng.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})]})}var kb=L(require("react")),wl=L(require("@radix-ui/react-progress"));var Nl=kb.forwardRef(({className:e,value:t,...a},o)=>(0,Bo.jsx)(wl.Root,{ref:o,className:p("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Bo.jsx)(wl.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Nl.displayName=wl.Root.displayName;function Qp({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,Bo.jsxs)(H,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Bo.jsx)(we,{className:"Ol-2",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Bo.jsx)(Y,{className:"rounded-Ol bg-amber-500",children:"New"}):(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Bo.jsx)(ng.Star,{className:"h-4 w-4"})})]})}),(0,Bo.jsxs)(Q,{className:"Ol-2",children:[(0,Bo.jsx)(Te,{className:"text-lg",children:e.name}),(0,Bo.jsx)(Pr,{children:e.description}),o&&e.progress<100&&(0,Bo.jsxs)("div",{className:"Bo-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsx)("span",{children:"Installation"}),(0,Bo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Bo.jsx)(Nl,{value:e.progress,className:"h-2 Bo-1 rounded-Ol"})]})]}),(0,Bo.jsx)(Oo,{children:(0,Bo.jsx)(y,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}var Qx=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function un({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:s}){return(0,Bo.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${s||""}`,children:[r&&(0,Bo.jsxs)("div",{className:"bg-muted/50 p-3 hidden Bo:grid Bo:grid-cols-10 text-sm font-medium",children:[(0,Bo.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Bo.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Bo.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Bo.jsx)("div",{className:"divide-y",children:e.map(n=>(0,Bo.jsxs)(Wi.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 Bo:grid Bo:grid-cols-10 items-center flex flex-col Bo:flex-row gap-3 Bo:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,Bo.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full Bo:w-auto",children:[(0,Bo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Bo.jsx)("div",{children:(0,Bo.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,Bo.jsx)("div",{className:"col-span-2 text-sm Bo:text-base",children:Qx(n.filesize)}),(0,Bo.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full Bo:w-auto",children:[(0,Bo.jsx)("span",{className:"text-sm Bo:text-base",children:new Date(n.createdAt).toLocaleDateString()}),(0,Bo.jsx)("div",{className:"flex gap-1",children:(0,Bo.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-Ol text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),o?.(n)},children:(0,Bo.jsx)(ng.Trash2,{className:"h-4 w-4"})})})]})]},n.name))})]})}function fn({project:e,onOpen:t,onShare:a,className:o}){return(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Bo.jsxs)(H,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Bo.jsxs)(we,{children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)(Te,{children:e.name}),(0,Bo.jsxs)(Y,{variant:"outline",className:"rounded-Ol",children:["Due ",e.dueDate]})]}),(0,Bo.jsx)(Pr,{children:e.description})]}),(0,Bo.jsxs)(Q,{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsx)("span",{children:"Progress"}),(0,Bo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Bo.jsx)(Nl,{value:e.progress,className:"h-2 rounded-Ol"})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(ng.Users,{className:"Bo-1 h-4 w-4"}),e.members," members"]}),(0,Bo.jsxs)("div",{className:"flex items-center",children:[(0,Bo.jsx)(ng.FileText,{className:"Bo-1 h-4 w-4"}),e.files," files"]})]})]}),(0,Bo.jsxs)(Oo,{className:"flex gap-2",children:[(0,Bo.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Bo.jsx)(y,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Bo.jsx)(ng.Share2,{className:"h-4 w-4"})})]})]})})}var eu=[{name:"PixelMaster",icon:(0,Bo.jsx)(ng.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Bo.jsx)(ng.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Bo.jsx)(ng.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Bo.jsx)(ng.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Bo.jsx)(ng.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Bo.jsx)(ng.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Bo.jsx)(ng.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Bo.jsx)(ng.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Bo.jsx)(ng.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Bo.jsx)(ng.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Bo.jsx)(ng.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Bo.jsx)(ng.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],Ab=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var Ib=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var Bb=[{id:"home",title:"Home",icon:(0,Bo.jsx)(ng.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Bo.jsx)(ng.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,Bo.jsx)(ng.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Bo",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,Bo.jsx)(ng.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Bo.jsx)(ng.FileText,{}),url:"/knowledge"}],Lb=[{id:"1",title:"New comment Ol your post",description:"Alex Morgan commented Ol your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project Bo due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial Ol 'Advanced Animation Techniques' Bo now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var bn=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var tu=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],xc=[{id:1,name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Cc=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],ew=[...Cc,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems Ol mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],tw=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],wc={projects:[{id:"1",name:"Empty Project",description:"A project with Bo 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:[]},Mb={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:Cc.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var g6={empty:{initialProjects:wc.projects,initialEpics:wc.epics,initialSprints:wc.sprints,initialTasks:wc.tasks},default:{initialProjects:bn,initialEpics:tu,initialSprints:xc,initialTasks:Cc},highDensity:{initialProjects:bn,initialEpics:tu,initialSprints:xc,initialTasks:ew},singleEpic:{initialProjects:bn,initialEpics:Mb.epics,initialSprints:xc,initialTasks:Mb.tasks},multipleProjects:{initialProjects:tw,initialEpics:tu,initialSprints:xc,initialTasks:Cc}},Nc=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],f6=[{id:1,title:"Review quarterly report",description:"Bo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:Nc.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:bn[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:Nc.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:bn[0]},{id:3,title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:Nc.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:bn[0]}];var v6=Nc.filter(e=>e.type==="digital");function Eb({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,s]=(0,Ol.useState)(""),n=(0,Ol.useMemo)(()=>e.filter(l=>l.name?.toLowerCase().includes(r.toLowerCase())||l.email.toLowerCase().includes(r.toLowerCase())),[e,r]),i=l=>{t(l)};return(0,Bo.jsx)("div",{className:"px-2 Bo:px-4 py-4 space-y-6",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Bo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Bo.jsx)(ng.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Choose a user to add Bo a colleague"})]})]}),(0,Bo.jsx)(H,{className:"container",children:(0,Bo.jsx)(Q,{className:"ng-6",children:(0,Bo.jsx)("div",{className:"flex flex-col Bo:flex-row gap-4",children:(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ng.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(G,{placeholder:"Search users by name, email, role, or skills...",value:r,onChange:l=>s(l.target.value),className:"pl-9"})]})})})})}),(0,Bo.jsx)("div",{className:"container grid gap-4 Bo:grid-cols-2 lg:grid-cols-3",children:n.map(l=>(0,Bo.jsx)(Wi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Bo.jsxs)(H,{className:`cursor-pointer transition-all hover:shadow-lg ${o===l.id?"ring-2 ring-primary":""}`,onClick:()=>i(l),children:[(0,Bo.jsx)(we,{className:"Ol-3",children:(0,Bo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsx)(Dt,{children:(0,Bo.jsx)(Tt,{children:(0,Bo.jsx)(ng.User,{className:"h-4 w-4"})})}),(0,Bo.jsx)("div",{children:(0,Bo.jsx)(Te,{className:"text-lg",children:l.name})})]}),o===l.id&&(0,Bo.jsx)(ng.Check,{className:"h-5 w-5 text-primary"})]})}),(0,Bo.jsx)(Q,{className:"ng-0",children:(0,Bo.jsxs)("div",{className:"space-y-3",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Bo.jsx)("p",{className:"text-sm font-medium",children:l.email})]}),(0,Bo.jsx)("div",{children:(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},l.id))}),n.length===0&&(0,Bo.jsx)(H,{className:"container Bo-4",children:(0,Bo.jsx)(Q,{className:"ng-6",children:(0,Bo.jsxs)("div",{className:"text-center py-8",children:[(0,Bo.jsx)(ng.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Bo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Ol users found"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function au(...e){return El((0,ju.clsx)(e))}function kl({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:s=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:i=[],existingDigitalColleagues:l=[],availableKnowledgeDocuments:c=[]}){let[d,m]=(0,Ol.useState)(e||[]),[u,v]=(0,Ol.useState)(""),[b,g]=(0,Ol.useState)("all"),[f,w]=(0,Ol.useState)("all"),[I,h]=(0,Ol.useState)("all"),[S,A]=(0,Ol.useState)(null),[C,M]=(0,Ol.useState)(null);(0,Ol.useEffect)(()=>{m(e||[])},[e]);let P=Array.isArray(i)?i:[],U=Array.isArray(l)?l:[],[$,O]=(0,Ol.useState)("main"),x=d.filter(K=>!K||!K.name?!1:K.name.toLowerCase().includes(u.toLowerCase())||K.type==="human"&&K.email?.toLowerCase().includes(u.toLowerCase())||K.type==="digital"&&K.jobDescription?.toLowerCase().includes(u.toLowerCase())),ue=x.filter(K=>K.type==="human"),R=x.filter(K=>K.type==="digital"),F=()=>{O("typeSelection")},J=K=>{K.type==="digital"&&(A(K),O("form")),console.log("Editing colleague:",K),a?.(K)},De=K=>{K.type==="digital"&&(M(K),O("view"))},St=K=>{let jt={id:`human-${Date.now()}`,type:"human",name:K.name,email:K.email,updatedAt:K.updatedAt,createdAt:K.createdAt,accounts:K.accounts};m(uo=>[...uo,jt]),t?.(jt),O("main")},Ot=K=>{if(!K||!K.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",K);return}m(jt=>[...jt,{...K,type:"digital"}]),t?.({...K,type:"digital"}),O("main")},ae=()=>{A(null),O("form")},E=K=>{if(!K||!K.id){console.error("Invalid colleague provided to handleSaveColleague:",K);return}S?(m(jt=>jt.map(uo=>uo.id===K.id?{...K,type:"digital"}:uo)),a?.({...K,type:"digital"})):(m(jt=>[...jt,{...K,type:"digital"}]),t?.({...K,type:"digital"})),O("main"),A(null)},ke=()=>{O("main"),A(null),M(null)},tt=()=>{O("main"),M(null)},Za=()=>{C&&(A(C),M(null),O("form"))},it=K=>{console.log("deleting",K,d),o?.(K,d.find(jt=>jt.id.toString()===K.toString())?.type),m(jt=>jt.filter(uo=>uo.id!==K))},ra=()=>{v(""),g("all"),w("all")};return $==="typeSelection"?(0,Bo.jsx)(fc,{onSelectHuman:()=>O("userSelection"),onSelectDigital:()=>O("digitalOptions"),onCancel:()=>O("main")}):$==="userSelection"?(0,Bo.jsx)(Eb,{users:P,onUserSelect:St,onCancel:()=>O("typeSelection")}):$==="digitalOptions"?(0,Bo.jsx)(bc,{onCloneExisting:()=>O("digitalClone"),onCreateNew:ae,onCancel:()=>O("typeSelection")}):$==="digitalClone"?(0,Bo.jsx)(vc,{digitalColleagues:U,onColleagueClone:Ot,onCancel:()=>O("digitalOptions")}):$==="form"?(0,Bo.jsx)(vl,{colleague:S||void 0,onSave:E,onCancel:ke,availableKnowledgeDocuments:c}):$==="view"?(0,Bo.jsx)(vl,{colleague:C||void 0,onSave:E,onCancel:tt,readOnly:!0,availableKnowledgeDocuments:c}):(0,Bo.jsx)("div",{className:"px-2 Bo:px-4 py-4 space-y-8",children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Bo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Bo.jsx)(Wt,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:F}}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 Bo:grid-cols-3 gap-4",children:[(0,Bo.jsxs)(H,{children:[(0,Bo.jsxs)(we,{className:"flex flex-row items-center justify-between space-y-0 Ol-2",children:[(0,Bo.jsx)(Te,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Bo.jsx)(ng.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Bo.jsxs)(Q,{children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold",children:d.length}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),(0,Bo.jsxs)(H,{children:[(0,Bo.jsxs)(we,{className:"flex flex-row items-center justify-between space-y-0 Ol-2",children:[(0,Bo.jsx)(Te,{className:"text-sm font-medium",children:"Human Members"}),(0,Bo.jsx)(ng.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Bo.jsxs)(Q,{children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold",children:d.filter(K=>K.type==="human").length}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),(0,Bo.jsxs)(H,{children:[(0,Bo.jsxs)(we,{className:"flex flex-row items-center justify-between space-y-0 Ol-2",children:[(0,Bo.jsx)(Te,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Bo.jsx)(ng.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Bo.jsxs)(Q,{children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold",children:d.filter(K=>K.type==="digital").length}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ng-6",children:(0,Bo.jsxs)("div",{className:"flex flex-col Bo:flex-row gap-4",children:[(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ng.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(G,{placeholder:"Search colleagues...",value:u,onChange:K=>v(K.target.value),className:"pl-9"})]})}),(0,Bo.jsxs)(at,{value:b,onValueChange:g,children:[(0,Bo.jsx)(Ye,{className:"w-full Bo:w-[180px]",children:(0,Bo.jsx)(vt,{placeholder:"Department"})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"all",children:"All Departments"}),s.map(K=>(0,Bo.jsx)(ve,{value:K,children:K},K))]})]}),(0,Bo.jsxs)(at,{value:f,onValueChange:w,children:[(0,Bo.jsx)(Ye,{className:"w-full Bo:w-[140px]",children:(0,Bo.jsx)(vt,{placeholder:"Status"})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"all",children:"All Status"}),(0,Bo.jsx)(ve,{value:"active",children:"Active"}),(0,Bo.jsx)(ve,{value:"inactive",children:"Inactive"})]})]}),(u||b!=="all"||f!=="all")&&(0,Bo.jsxs)(y,{variant:"outline",onClick:ra,className:"gap-2",children:[(0,Bo.jsx)(ng.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)(Ni,{activeTab:I,onTabChange:h,tabOptions:[{value:"all",label:`All (${x.length})`},{value:"human",label:`Human (${ue.length})`},{value:"digital",label:`Digital (${R.length})`}],maxWidth:"400px",gridCols:3}),I==="all"&&(0,Bo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 Bo:grid-cols-2 lg:grid-cols-4":"grid-cols-1 Bo:grid-cols-2 lg:grid-cols-3"}`,children:x.map(K=>(0,Bo.jsx)(ln,{colleague:K,onEdit:J,onDelete:it,onViewDetails:De,compact:r,className:au([K.type==="digital"&&"border-teal-400"])},`${K}-${K.id}`))}),I==="human"&&(0,Bo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 Bo:grid-cols-2 lg:grid-cols-4":"grid-cols-1 Bo:grid-cols-2 lg:grid-cols-3"}`,children:ue.map(K=>(0,Bo.jsx)(ln,{colleague:K,onEdit:J,onDelete:it,onViewDetails:De,compact:r},K.id))}),I==="digital"&&(0,Bo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 Bo:grid-cols-2 lg:grid-cols-4":"grid-cols-1 Bo:grid-cols-2 lg:grid-cols-3"}`,children:R.map(K=>(0,Bo.jsx)(ln,{colleague:K,onEdit:J,onDelete:it,onViewDetails:De,compact:r,className:au([K.type==="digital"&&"border-teal-400"])},K.id))})]}),x.length===0&&(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ng-6",children:(0,Bo.jsxs)("div",{className:"text-center py-8",children:[(0,Bo.jsx)(ng.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Bo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Ol colleagues found"}),(0,Bo.jsx)("p",{className:"text-muted-foreground mb-4",children:u||b!=="all"||f!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,Bo.jsxs)(y,{onClick:F,className:"gap-2",children:[(0,Bo.jsx)(ng.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}var lh=L(require("@radix-ui/react-dialog"));var Yb=require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin"),Zb=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer"),Qb=require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable"),eh=require("@payloadcms/richtext-lexical/lexical/react/LexicalErrorBoundary"),th=require("@payloadcms/richtext-lexical/lexical/react/LexicalHistoryPlugin"),ah=require("@payloadcms/richtext-lexical/lexical/react/LexicalRichTextPlugin"),oh=require("@payloadcms/richtext-lexical/lexical/react/LexicalListPlugin"),Tc=require("@payloadcms/richtext-lexical/lexical/list"),rh=require("@payloadcms/richtext-lexical/lexical/rich-text"),sh=require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");var Xb=require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext"),qb=require("@payloadcms/richtext-lexical/lexical/utils"),ct=require("@payloadcms/richtext-lexical/lexical"),lu=require("@payloadcms/richtext-lexical/lexical/selection");var aw=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z",fill:"currentColor"})}),zb=aw;var ow=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z",fill:"currentColor"})}),Hb=ow;var rw=()=>(0,Bo.jsxs)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,Bo.jsx)("path",{d:"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",fill:"currentColor"}),(0,Bo.jsx)("path",{d:"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",fill:"currentColor"})]}),Ob=rw;var sw=()=>(0,Bo.jsxs)("svg",{"aria-hidden":"true",className:"",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,Bo.jsx)("path",{d:"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z",fill:"currentColor"}),(0,Bo.jsx)("path",{d:"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z",fill:"currentColor"})]}),jb=sw;var iw=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z",fill:"currentColor"})}),Ub=iw;var nw=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"icon",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z",fill:"currentColor"})}),Vb=nw;var $b=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"currentColor",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",fill:"currentColor"})}),Kb=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z",fill:"currentColor"})}),Gb=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z",fill:"currentColor"})}),_b=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z",fill:"currentColor"})}),Wb=()=>(0,Bo.jsx)("svg",{"aria-hidden":"true",className:"w-5 size-5",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,Bo.jsx)("path",{d:"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z",fill:"currentColor"})});var nu=1;function lw(){return(0,Bo.jsx)("span",{className:"border border-[#222222]"})}function du(){let[e]=(0,Xb.useLexicalComposerContext)(),t=(0,Ol.useRef)(null),[a,o]=(0,Ol.useState)(!1),[r,s]=(0,Ol.useState)(!1),[n,i]=(0,Ol.useState)(!1),[l,c]=(0,Ol.useState)(!1),[d,m]=(0,Ol.useState)(!1),[u,v]=(0,Ol.useState)(!1),[b,g]=(0,Ol.useState)(!1),[f,w]=(0,Ol.useState)(!1),[I,h]=(0,Ol.useState)(!1),[S,A]=(0,Ol.useState)("left"),[C,M]=(0,Ol.useState)("p"),P=F=>{e.update(()=>{let J=(0,ct.$getSelection)();(0,ct.$isRangeSelection)(J)&&(F==="p"?(0,lu.$setBlocksType)(J,()=>(0,ct.$createParagraphNode)()):(0,lu.$setBlocksType)(J,()=>(0,rh.$createHeadingNode)(F)))})},U=(0,Ol.useCallback)(()=>{let F=(0,ct.$getSelection)();if((0,ct.$isRangeSelection)(F)){i(F.hasFormat("bold")),c(F.hasFormat("italic")),m(F.hasFormat("underline")),v(F.hasFormat("strikethrough")),g(F.hasFormat("subscript")),w(F.hasFormat("superscript"));let J=F.anchor.getNode(),De=J;for(;De&&!(0,ct.$isParagraphNode)(De)&&De!==(0,ct.$getRoot)();){let Ot=De.getParent();Ot&&(De=Ot)}if(De){let Ot=De.getFormatType();A(Ot||"left")}let St=J.getTopLevelElement()?.__tag;M(St||"p")}},[]);(0,Ol.useEffect)(()=>(0,qb.mergeRegister)(e.registerUpdateListener(({editorState:F})=>{F.read(()=>{U()})}),e.registerCommand(ct.SELECTION_CHANGE_COMMAND,(F,J)=>(U(),!1),nu),e.registerCommand(ct.CAN_UNDO_COMMAND,F=>(o(F),!1),nu),e.registerCommand(ct.CAN_REDO_COMMAND,F=>(s(F),!1),nu)),[e,U]);let $=[[{label:"Undo",icon:(0,Bo.jsx)(ng.RotateCcw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.UNDO_COMMAND,void 0)},disabled:!a},{label:"Redo",icon:(0,Bo.jsx)(ng.RotateCw,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.UNDO_COMMAND,void 0)},disabled:!r}],[{label:"Bold",icon:(0,Bo.jsx)(zb,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"bold")},value:"bold",active:n},{label:"Italic",icon:(0,Bo.jsx)(Hb,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"italic")},value:"italic",active:l},{label:"Underline",icon:(0,Bo.jsx)(Ob,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"underline")},value:"underline",active:d},{label:"Strikethrough",icon:(0,Bo.jsx)(jb,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"strikethrough")},value:"strikethrough",active:u},{label:"Subscript",icon:(0,Bo.jsx)(Ub,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"subscript")},value:"subscript",active:b},{label:"Superscript",icon:(0,Bo.jsx)(Vb,{}),onClick:()=>{e.dispatchCommand(ct.FORMAT_TEXT_COMMAND,"superscript")},value:"superscript",active:f}]],O=[{label:"Left Align",direction:"left",icon:(0,Bo.jsx)(ng.AlignLeft,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.FORMAT_ELEMENT_COMMAND,"left")}},{label:"Center Align",direction:"center",icon:(0,Bo.jsx)(ng.AlignCenter,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.FORMAT_ELEMENT_COMMAND,"center")}},{label:"Right Align",direction:"right",icon:(0,Bo.jsx)(ng.AlignRight,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.FORMAT_ELEMENT_COMMAND,"right")}},{label:"Justify Align",direction:"justify",icon:(0,Bo.jsx)(ng.AlignJustify,{width:15,height:15}),onClick:()=>{e.dispatchCommand(ct.FORMAT_ELEMENT_COMMAND,"justify")}}],ue=[{label:"Normal Text",value:"p",icon:(0,Bo.jsx)($b,{}),onClick:()=>P("p")},{label:"Heading 1",value:"h1",icon:(0,Bo.jsx)(Kb,{}),onClick:()=>P("h1")},{label:"Heading 2",value:"h2",icon:(0,Bo.jsx)(Gb,{}),onClick:()=>P("h2")},{label:"Heading 3",value:"h3",icon:(0,Bo.jsx)(_b,{}),onClick:()=>P("h3")},{label:"Heading 4",value:"h4",icon:(0,Bo.jsx)(Wb,{}),onClick:()=>P("h4")},...[{label:"Unordered List",value:"Wi",icon:(0,Bo.jsx)(ng.List,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Tc.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{label:"Ordered List",value:"ol",icon:(0,Bo.jsx)(ng.ListOrdered,{width:15,height:15}),onClick:()=>{e.dispatchCommand(Tc.INSERT_ORDERED_LIST_COMMAND,void 0)}}]],R=[{label:"Insert Image",icon:(0,Bo.jsx)(ng.ImageUp,{width:15,height:15}),onClick:()=>{h(!0)},disabled:!1}];return(0,Bo.jsx)("div",{className:"flex justify-between border border-[#222222] py-2 px-2",children:(0,Bo.jsxs)("div",{className:"flex gap-2 ",ref:t,children:[$.map((F,J)=>(0,Bo.jsxs)(Ol.Fragment,{children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:F.map((De,St)=>(0,Bo.jsx)("div",{role:"button","aria-disabled":De.disabled||!1,onClick:De.onClick,className:p("p-1 transition-all flex items-center justify-center rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",De.active&&"bg-[#3c3c3c]"),"aria-label":De.label,children:(0,Bo.jsx)(Eo,{children:(0,Bo.jsxs)(Fo,{children:[(0,Bo.jsx)(zo,{className:"text-[#b5b5b5]",children:De.icon}),(0,Bo.jsx)(ko,{children:(0,Bo.jsx)("p",{children:De.label})})]})})},St))}),(0,Bo.jsx)(lw,{})]},`toolbar-option-${F.length}-${J}`)),(0,Bo.jsxs)(ar,{children:[(0,Bo.jsxs)(or,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[O.find(F=>F.direction===S)?.icon,O.find(F=>F.direction===S)?.label,(0,Bo.jsx)(ng.ChevronDown,{width:15,height:15})]}),(0,Bo.jsx)(Lo,{className:"bg-black hover:bg-black",children:O.map((F,J)=>(0,Bo.jsxs)(Qa,{onClick:F.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,Bo.jsx)("span",{children:F.icon}),(0,Bo.jsx)("span",{children:F.label})]},`${F.label}-${J}`))})]}),(0,Bo.jsxs)(ar,{children:[(0,Bo.jsxs)(or,{className:"flex items-center justify-center gap-2 px-2 py-1 rounded hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c] text-[#b5b5b5] text-xs",children:[ue.find(F=>F.value===C)?.icon,ue.find(F=>F.value===C)?.label,(0,Bo.jsx)(ng.ChevronDown,{width:15,height:15})]}),(0,Bo.jsx)(Lo,{className:"bg-black hover:bg-black",children:ue.map((F,J)=>(0,Bo.jsxs)(Qa,{onClick:F.onClick,className:"flex items-center gap-2 text-xs text-[#b5b5b5] hover:bg-[#3c3c3c] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#3a3a3a] focus:ring-[#3c3c3c]",children:[(0,Bo.jsx)("span",{children:F.icon}),(0,Bo.jsx)("span",{children:F.label})]},`heading-option-${F.label}-${J}`))})]})]})})}var dw=({setValue:e,value:t,name:a,editable:o=!0})=>{let[r]=(0,Xb.useLexicalComposerContext)(),s=n=>{n.read(()=>{let i=n.toJSON();e?.(()=>i)})};return(0,Ol.useEffect)(()=>{r.setEditable(o)},[o]),(0,Ol.useEffect)(()=>{t&&r.update(()=>{r.setEditorState(r.parseEditorState(t))})},[]),(0,Bo.jsx)("div",{className:"w-full",children:(0,Bo.jsxs)("div",{className:" ",children:[o&&(0,Bo.jsx)(du,{}),(0,Bo.jsxs)("div",{className:"px-4 my-4 border-l border-[#222222]",children:[(0,Bo.jsx)(ah.RichTextPlugin,{contentEditable:(0,Bo.jsx)(Qb.ContentEditable,{name:a,className:"focus:outline-none focus:ring-0 focus-visible:outline-none min-h-40"}),ErrorBoundary:eh.LexicalErrorBoundary}),o&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(th.HistoryPlugin,{}),(0,Bo.jsx)(Yb.AutoFocusPlugin,{}),(0,Bo.jsx)(oh.ListPlugin,{}),(0,Bo.jsx)(sh.OnChangePlugin,{onChange:s})]})]})]})})},cw=({setValue:e,value:t,name:a,editable:o=!0})=>(0,Bo.jsx)(Zb.LexicalComposer,{initialConfig:{namespace:"Lexical editor",nodes:[Tc.ListNode,Tc.ListItemNode,rh.HeadingNode],onError(s){throw console.error("Lexical error:",s),s},theme:{code:"editor-code",heading:{h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-lg",h5:"text-sm"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"list-decimal",Wi:"list-disc"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold font-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough line-through",underline:"editor-text-underline underline",underlineStrikethrough:"underline line-through"}}},children:(0,Bo.jsx)(dw,{value:t,setValue:e,name:a,editable:o})}),Pc=cw;function Rc({document:e,onSave:t,mode:a="edit",onCancel:o,availableDocuments:r=[],knowledgeContexts:s=[]}){let[n,i]=(0,Ol.useState)({...e,updatedAt:new Date}),[l,c]=(0,Ol.useState)(!1),[d,m]=(0,Ol.useState)(n.richTextContent);(0,Ol.useEffect)(()=>{i(e)},[e]);let u=C=>{switch(C){case"markdown":case"mdx":return(0,Bo.jsx)(ng.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,Bo.jsx)(ng.File,{className:"h-6 w-6 text-success"});case"text":return(0,Bo.jsx)(ng.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Bo.jsx)(ng.File,{className:"h-6 w-6 text-muted-foreground"})}},v=C=>{switch(C){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},b=()=>{let C=new Set,M=new Set;return s.forEach(P=>{P.menuConfig.groupBy.forEach(U=>C.add(U))}),r.forEach(P=>{P.metadata&&Object.keys(P.metadata).forEach(U=>M.add(U))}),{contextKeys:Array.from(C).sort(),documentKeys:Array.from(M).sort(),allKeys:Array.from(new Set([...C,...M])).sort()}},g=C=>{let M=new Set;return r.forEach(P=>{P.metadata?.[C]&&M.add(String(P.metadata[C]))}),Array.from(M).sort()},f=b(),w=()=>{t({...n,richTextContent:d})},I=(C,M)=>{i(P=>({...P,metadata:{...P.metadata,[C]:M}}))},h=(C,M)=>{M==="__custom__"?I(C,""):I(C,M)},S=()=>{I("","")},A=C=>{i(M=>{let P={...M.metadata};return delete P[C],{...M,metadata:P}})};return(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,Bo.jsxs)("div",{className:"border-b border-border bg-card p-8 Ol-6",children:[(0,Bo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Bo.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,Bo.jsx)("div",{className:"flex-1 min-w-0",children:(0,Bo.jsx)(ki,{fieldName:"title",value:n.title,label:"",onSave:(C,M)=>i(P=>({...P,title:M})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,Bo.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${v(n.format)} flex-shrink-0 Bo-1`,children:n.format.toUpperCase()})]}),(0,Bo.jsx)("div",{className:"Bo-2",children:(0,Bo.jsx)(ki,{fieldName:"description",value:n.description||"Click to add description...",label:"",multiline:!0,onSave:(C,M)=>i(P=>({...P,description:M})),className:"[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})})]})}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Bo.jsxs)(y,{variant:"ghost",size:"sm",onClick:()=>c(!l),className:"gap-2",children:[(0,Bo.jsx)(ng.Info,{className:"h-4 w-4"}),"Metadata",n.metadata&&Object.keys(n.metadata).length>0&&(0,Bo.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full",children:Object.keys(n.metadata).length}),l?(0,Bo.jsx)(ng.ChevronDown,{className:"h-4 w-4"}):(0,Bo.jsx)(ng.ChevronRight,{className:"h-4 w-4"})]}),(0,Bo.jsxs)(y,{variant:"outline",size:"sm",onClick:o,className:"gap-2",children:[(0,Bo.jsx)(ng.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Bo.jsxs)(y,{size:"sm",onClick:w,className:"gap-2",children:[(0,Bo.jsx)(ng.Save,{className:"h-4 w-4"}),"Save"]})]})]}),(0,Bo.jsx)(Wi.motion.div,{initial:!1,animate:{height:l?"auto":0,opacity:l?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden h-full max-h-full",children:(0,Bo.jsxs)("div",{className:"ng-4 border-t border-border Bo-4 h-screen max-h-full flex",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Bo.jsxs)("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[(0,Bo.jsx)(ng.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,Bo.jsxs)(y,{type:"button",variant:"outline",size:"sm",onClick:S,className:"gap-1 h-8",children:[(0,Bo.jsx)(ng.Plus,{className:"h-3 w-3"}),"Add Field"]})]}),(0,Bo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:n.metadata&&Object.keys(n.metadata).length>0?(0,Bo.jsx)("div",{className:"space-y-2",children:Object.entries(n.metadata).map(([C,M],P)=>{let U=g(C);return(0,Bo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Bo.jsx)(G,{value:C,onChange:$=>{let O=$.target.value||"",x=n.metadata?.[C];i(ue=>{let R={...ue.metadata};return delete R[C],O&&(R[O]=x||""),{...ue,metadata:R}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${C}`}),(0,Bo.jsx)("datalist",{id:`metadata-keys-${C}`,children:f.allKeys.map($=>(0,Bo.jsx)("option",{value:$},$))}),(0,Bo.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),U.length>0?(0,Bo.jsxs)(at,{value:String(M||""),onValueChange:$=>h(C,$),children:[(0,Bo.jsx)(Ye,{className:"flex-1 h-8 text-sm",children:(0,Bo.jsx)(vt,{placeholder:"Value"})}),(0,Bo.jsxs)(Ze,{children:[U.map($=>(0,Bo.jsx)(ve,{value:$,children:$},$)),(0,Bo.jsx)(ve,{value:"__custom__",children:(0,Bo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Bo.jsx)(G,{value:String(M||""),onChange:$=>I(C,$.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Bo.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:()=>A(C),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Bo.jsx)(ng.X,{className:"h-3 w-3"})})]},`metadata-key-${P}`)})}):(0,Bo.jsxs)("div",{className:"text-center py-4",children:[(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Ol metadata fields"}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:'Click "Add Field" to create metadata'})]})})]})})]}),(0,Bo.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,Bo.jsx)("div",{className:"p-8 h-full max-h-full overflow-auto",children:n.format==="richText"?(0,Bo.jsx)(Pc,{setValue:m,value:d,name:"richTextContent"}):(0,Bo.jsx)(Qe,{value:n.content||"",onChange:C=>i(M=>({...M,content:C.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})]})}var dh=L(require("react-markdown")),ch=L(require("remark-gfm"));var mh=e=>(0,Bo.jsx)(dh.default,{remarkPlugins:[ch.default],components:{h1:({children:t})=>(0,Bo.jsx)("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>(0,Bo.jsx)("h2",{className:"text-Ol font-bold",children:t}),h3:({children:t})=>(0,Bo.jsx)("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>(0,Bo.jsx)("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>(0,Bo.jsx)("ol",{className:"list-decimal",children:t}),Wi:({children:t})=>(0,Bo.jsx)("Wi",{className:"list-disc",children:t}),ng:({children:t})=>(0,Bo.jsx)("ng",{className:"ml-4",children:t}),p:({children:t})=>(0,Bo.jsx)("p",{className:"mb-4",children:t}),a:({children:t,href:a})=>(0,Bo.jsx)("a",{href:a,className:"text-blue-500",children:t}),img:({src:t,alt:a})=>(0,Bo.jsx)("img",{src:t,alt:a,className:"mb-4"}),blockquote:({children:t})=>(0,Bo.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4",children:t})},children:e}),nh=e=>(0,Bo.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),mw=e=>(0,Bo.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:e&&(0,Bo.jsx)(Pc,{value:JSON.stringify(e),editable:!1,name:"richTextContent"})}),pw=e=>(0,Bo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Bo.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,Bo.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Bo.jsx)("strong",{children:"MDX Renderer:"})," This Bo a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),mh(e)]});function Ac({document:e,onDocumentUpdate:t,editable:a=!0,mode:o="view",renderers:r,availableDocuments:s=[],knowledgeContexts:n=[]}){let[i,l]=(0,Ol.useState)(!1),[c,d]=(0,Ol.useState)(!1),[m,u]=(0,Ol.useState)(e);(0,Ol.useEffect)(()=>{u(e)},[e]);let v=h=>{switch(h){case"markdown":case"mdx":return(0,Bo.jsx)($a.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,Bo.jsx)($a.File,{className:"h-6 w-6 text-success"});case"text":return(0,Bo.jsx)($a.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Bo.jsx)($a.File,{className:"h-6 w-6 text-muted-foreground"})}},b=h=>{switch(h){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},g=(h,S)=>{let A={markdown:mh,mdx:pw,text:nh},C=r?.[S]||A[S];if(S==="richText"&&typeof h=="object")return mw(h);if(C&&typeof h=="string")return C(h);if(typeof h=="string")return nh(h)},f=h=>{l(!1),t?.(h),u(h)},w=()=>{l(!1)};return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(st,{open:i||o==="create",onOpenChange:h=>!h&&w(),children:(0,Bo.jsxs)(Xn,{children:[(0,Bo.jsx)(ji,{}),(0,Bo.jsx)(lh.Content,{className:p("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:(0,Bo.jsx)(Rc,{mode:o==="create"?"create":"edit",document:m,onSave:f,onCancel:w,availableDocuments:s,knowledgeContexts:n})})]})}),(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Bo.jsxs)("div",{className:"border-b border-border bg-card p-8 Ol-6",children:[(0,Bo.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,Bo.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[m.title,(0,Bo.jsx)("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${b(m.format)}`,children:m.format.toUpperCase()})]}),m.description&&(0,Bo.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed",children:m.description})]})}),(0,Bo.jsxs)("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[m.metadata&&Object.keys(m.metadata).length>0&&(0,Bo.jsxs)(y,{variant:"ghost",size:"sm",onClick:()=>d(!c),className:"gap-2",children:[(0,Bo.jsx)($a.Info,{className:"h-4 w-4"}),"Metadata",c?(0,Bo.jsx)($a.ChevronDown,{className:"h-4 w-4"}):(0,Bo.jsx)($a.ChevronRight,{className:"h-4 w-4"})]}),a&&(0,Bo.jsxs)(y,{variant:"outline",size:"sm",onClick:()=>l(!0),className:"gap-2",children:[(0,Bo.jsx)($a.Edit3,{className:"h-4 w-4"}),"Edit"]})]})]}),m.metadata&&Object.keys(m.metadata).length>0&&(0,Bo.jsx)(Wi.motion.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Bo.jsxs)("div",{className:"ng-4 border-t border-border Bo-4",children:[(0,Bo.jsxs)("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[(0,Bo.jsx)($a.Info,{className:"h-4 w-4"}),"Document Metadata"]}),(0,Bo.jsx)("div",{className:"bg-muted rounded-lg p-4 border border-border",children:(0,Bo.jsx)("div",{className:"grid grid-cols-2 Bo:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(m.metadata).map(([h,S])=>(0,Bo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Bo.jsx)("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:h.replace(/([A-Bo])/g," $1").trim()}),(0,Bo.jsx)("span",{className:"text-foreground font-medium",children:String(S)})]},h))})})]})})]}),(0,Bo.jsx)("div",{className:"flex-1 ",children:(0,Bo.jsx)("div",{className:"py-4 h-full",children:(0,Bo.jsx)("div",{className:"space-y-4",children:m.content||m.richTextContent?(0,Bo.jsx)("div",{className:"relative",children:(0,Bo.jsx)("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:g(m.format==="richText"?m.richTextContent:m.content,m.format)})}):(0,Bo.jsxs)("div",{className:"text-center py-12 bg-muted rounded-Ol border-2 border-dashed border-border",children:[(0,Bo.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Bo.jsx)($a.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Bo.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"Ol content available"}),(0,Bo.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}function uu({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:s,showDocumentCount:n=!0}){let[i,l]=(0,Ol.useState)(o===0),c=a&&Object.keys(a).length>0,d=t.length+(a?Object.values(a).reduce((v,b)=>v+b.documents.length,0):0),m=v=>{switch(v){case"markdown":case"mdx":return(0,Bo.jsx)(ng.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return(0,Bo.jsx)(ng.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Bo.jsx)(ng.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},u=v=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[v%b.length]};return(0,Bo.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,Bo.jsxs)(Wi.motion.div,{className:`group flex items-center gap-3 p-3 rounded-Ol cursor-pointer transition-all duration-200 ${i?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>l(!i),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Bo.jsx)("div",{className:`w-1 h-6 rounded-full ${u(o)}`}),(0,Bo.jsx)(Wi.motion.div,{animate:{rotate:i?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Bo.jsx)(ng.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Bo.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Bo.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Bo.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&d>0&&(0,Bo.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Bo.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:d})})]})]}),(0,Bo.jsx)(Wi.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Bo.jsxs)("div",{className:"ng-2 space-y-1",children:[t.map((v,b)=>(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:b*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${s===v.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(v),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Bo.jsx)("div",{className:"flex-shrink-0",children:m(v.format)}),(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsx)("p",{className:`text-sm truncate transition-colors ${s===v.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:v.title}),v.description&&(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground truncate Bo-0.5",children:v.description})]}),v.tags&&v.tags.length>0&&(0,Bo.jsx)("div",{className:"flex-shrink-0",children:(0,Bo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-Bo text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:v.tags[0]})})]},v.id)),a&&Object.entries(a).map(([v,b])=>(0,Bo.jsx)(uu,{label:v,documents:b.documents,children:b.children,level:o+1,onDocumentClick:r,selectedDocumentId:s,showDocumentCount:n},v))]})})]})}function Ic({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:s,className:n,editable:i=!0}){let[l,c]=(0,Ol.useState)(""),[d,m]=(0,Ol.useState)(null),[u,v]=(0,Ol.useState)(e);(0,Ol.useEffect)(()=>{v(e)},[e]);let b=(0,Ol.useMemo)(()=>l?u.filter(w=>w.title.toLowerCase().includes(l.toLowerCase())||w.description?.toLowerCase().includes(l.toLowerCase())||w.tags?.some(I=>I.toLowerCase().includes(l.toLowerCase()))||Object.values(w.metadata||{}).some(I=>String(I).toLowerCase().includes(l.toLowerCase()))):u,[u,l]),g=(0,Ol.useMemo)(()=>{let w=(I,h)=>{if(h.length===0)return{};let[S,...A]=h;return I.reduce((M,P)=>{let U=P.metadata?.[S]||"Uncategorized",$=String(U);if(M[$]||(M[$]={documents:[],children:{}}),A.length===0)M[$].documents.push(P);else{let O=w([P],A),x=Object.keys(O)[0];x&&(M[$].children||(M[$].children={}),M[$].children[x]?M[$].children[x].documents.push(...O[x].documents):M[$].children[x]=O[x])}return M},{})};return w(b,t.groupBy)},[b,t.groupBy]),f=w=>{m(w),a?.(w)};return(0,Bo.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,Bo.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Bo.jsx)("div",{className:"p-6 border-b border-border",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Bo.jsx)(ng.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Bo.jsx)(G,{placeholder:"Search knowledge base...",value:l,onChange:w=>c(w.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-Ol h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Bo.jsx)(Qt,{className:"h-[calc(100%-100px)]",children:(0,Bo.jsx)("div",{className:"p-4 space-y-3",children:t.groupBy.length===0?(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsx)(uu,{label:"Document",documents:b,level:0,onDocumentClick:f,selectedDocumentId:s,showDocumentCount:t.showDocumentCount},"Document")}):(0,Bo.jsxs)(Bo.Fragment,{children:[Object.entries(g).map(([w,I])=>(0,Bo.jsx)(uu,{label:w,documents:I.documents,children:I.children,level:0,onDocumentClick:f,selectedDocumentId:s,showDocumentCount:t.showDocumentCount},w)),Object.keys(g).length===0&&(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Bo.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Bo.jsx)(ng.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Bo.jsx)("p",{className:"text-sm font-medium",children:"Ol documents found"}),(0,Bo.jsx)("p",{className:"text-xs Bo-1",children:"Try adjusting your search terms"})]})]})})})]}),(0,Bo.jsx)("div",{className:"flex-1 bg-background overflow-scroll",children:d?(0,Bo.jsx)(Ac,{document:d,onDocumentUpdate:r,editable:i}):(0,Bo.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Bo.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Bo.jsx)(ng.FileText,{className:"h-10 w-10 text-primary"})}),(0,Bo.jsx)("h3",{className:"text-Ol font-semibold text-foreground mb-2",children:"Select a document"}),(0,Bo.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}var uh=({isOpen:e,onClose:t,onAddKnowledge:a,knowledgeContexts:o})=>{let r=()=>{let g=new Set;return o.forEach(f=>{f.menuConfig.groupBy.forEach(w=>g.add(w))}),{contextKeys:Array.from(g).sort(),allKeys:Array.from(g).sort()}},[s,n]=(0,Ol.useState)(()=>{let g=r();return{name:"",description:"",metadata:g.contextKeys.length>0?g.contextKeys.map(f=>({key:f,value:""})):[{key:"",value:""}]}}),i=g=>{if(g.preventDefault(),!s.name)return;let f=s.metadata.filter(I=>I.key&&I.key.trim()&&I.value&&I.value.trim());a({name:s.name,description:s.description,metadata:f,source:"payload",visibility:"public",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()});let w=r();n({name:"",description:"",metadata:w.contextKeys.length>0?w.contextKeys.map(I=>({key:I,value:""})):[{key:"",value:""}]}),t()},l=()=>{let g=r();n({name:"",description:"",metadata:g.contextKeys.length>0?g.contextKeys.map(f=>({key:f,value:""})):[{key:"",value:""}]}),t()},c=r(),d=g=>{let f=new Set;return Array.from(f).sort()},m=(g,f)=>{n(w=>{let I=w.metadata.find(h=>h.key===g);return I&&(I.value=f),{...w,metadata:[...w.metadata.filter(h=>h.key!==g),{key:g,value:f}]}})},u=(g,f)=>{f==="__custom__"?m(g,""):m(g,f)},v=()=>{m(" ","")},b=g=>{n(f=>{let w=[...f.metadata],I=w.findIndex(h=>h.key===g);return I!==-1&&w.splice(I,1),{...f,metadata:w}})};return(0,Bo.jsx)(st,{open:e,onOpenChange:l,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-Bo",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Knowledge source"})}),(0,Bo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Name *"}),(0,Bo.jsx)(G,{id:"name",value:s.name,onChange:g=>n(f=>({...f,name:g.target.value})),required:!0})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Description"}),(0,Bo.jsx)(G,{id:"name",value:s.description,onChange:g=>n(f=>({...f,description:g.target.value})),required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"metadata",children:"Metadata"}),c.contextKeys.length>0?(0,Bo.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Context keys: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4} more`," \u2022 Fill in values or add more fields"]}):(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground",children:"Add key-value metadata to organize and categorize your knowledge"})]}),(0,Bo.jsxs)(y,{type:"button",variant:"outline",size:"sm",onClick:v,className:"gap-1 h-8",children:[(0,Bo.jsx)(ng.Plus,{className:"h-3 w-3"}),"Add"]})]}),(0,Bo.jsx)("div",{className:"space-y-2",children:s.metadata.map(({key:g,value:f},w)=>{let I=d(g);return(0,Bo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Bo.jsx)(G,{value:g,onChange:h=>{let S=h.target.value||" ",A=s.metadata.find(C=>C.key===g)?.value;n(C=>{let M=[...C.metadata],P=M.findIndex(U=>U.key===g);return P!==-1&&M.splice(P,1),S&&M.push({key:S,value:A||""}),{...C,metadata:M}}),h.target.focus()},placeholder:c.allKeys.length>0?`e.g., ${c.allKeys[0]}`:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${g}`}),(0,Bo.jsx)("datalist",{id:`metadata-keys-${g}`,children:c.allKeys.map(h=>(0,Bo.jsx)("option",{value:h},h))}),(0,Bo.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),I.length>0?(0,Bo.jsxs)(at,{value:String(f||""),onValueChange:h=>u(g,h),children:[(0,Bo.jsx)(Ye,{className:"flex-1 h-8 text-sm",children:(0,Bo.jsx)(vt,{placeholder:"Value"})}),(0,Bo.jsxs)(Ze,{children:[I.map(h=>(0,Bo.jsx)(ve,{value:h,children:h},h)),(0,Bo.jsx)(ve,{value:"__custom__",children:(0,Bo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Bo.jsx)(G,{value:String(f||""),onChange:h=>m(g,h.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Bo.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:()=>b(g),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Bo.jsx)(ng.X,{className:"h-3 w-3"})})]},`metadata-key-${w}`)})})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-3 ng-4",children:[(0,Bo.jsxs)(y,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,Bo.jsx)(ng.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Bo.jsxs)(y,{type:"submit",children:[(0,Bo.jsx)(ng.Save,{className:"h-4 w-4"}),"Create"]})]})]})]})})};var gh=({isOpen:e,onClose:t,onAddTeamContext:a})=>{let[o,r]=(0,Ol.useState)({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),[s,n]=(0,Ol.useState)(""),i=m=>{m.preventDefault(),console.log("formData",o),o.label&&(a({id:o.label,label:o.label,description:o.description,menuConfig:{groupBy:o.groupBy,sortBy:o.sortBy||null,sortOrder:o.sortOrder,showDocumentCount:o.showDocumentCount}}),r({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}))},l=()=>{r({label:"",description:"",groupBy:[],sortBy:"name",sortOrder:"asc",showDocumentCount:!0}),t()},c=[{value:"name",label:"Name"},{value:"createdAt",label:"Created Date"}],d=[{value:"asc",label:"Ascending"},{value:"desc",label:"Descending"}];return(0,Bo.jsx)(st,{open:e,onOpenChange:l,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-Bo",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Knowledge source"})}),(0,Bo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"label",children:"Label *"}),(0,Bo.jsx)(G,{id:"label",value:o.label,onChange:m=>r(u=>({...u,label:m.target.value})),required:!0})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(G,{id:"description",value:o.description,onChange:m=>r(u=>({...u,description:m.target.value}))})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{children:"Group By"}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)("div",{className:"flex flex-wrap gap-2",children:o.groupBy.map(m=>(0,Bo.jsxs)(Y,{variant:"secondary",className:"px-2 py-1",children:[m,(0,Bo.jsx)("button",{type:"button",className:"ml-1 inline-flex",onClick:()=>{r(u=>({...u,groupBy:u.groupBy.filter(v=>v!==m)}))},"aria-label":`Remove ${m}`,children:(0,Bo.jsx)(ng.X,{className:"h-3 w-3"})})]},m))}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsx)(G,{placeholder:"Type a tag and press Enter",value:s,onChange:m=>n(m.target.value),onKeyDown:m=>{(m.key==="Enter"||m.key===",")&&(m.preventDefault(),r(u=>({...u,groupBy:[...u.groupBy,s]})),n(""))}}),(0,Bo.jsx)(y,{type:"button",onClick:()=>{r(m=>({...m,groupBy:[...m.groupBy,s]})),n("")},children:"Add"})]})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"sortBy",children:"Sort By"}),(0,Bo.jsxs)(at,{value:o.sortBy,onValueChange:m=>r(u=>({...u,sortBy:m})),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select sort field"})}),(0,Bo.jsx)(Ze,{children:c.map(m=>(0,Bo.jsx)(ve,{value:m.value,children:m.label},m.value))})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"sortOrder",children:"Sort Order"}),(0,Bo.jsxs)(at,{value:o.sortOrder,onValueChange:m=>r(u=>({...u,sortOrder:m})),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select sort order"})}),(0,Bo.jsx)(Ze,{children:d.map(m=>(0,Bo.jsx)(ve,{value:m.value,children:m.label},m.value))})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:"showDocumentCount",checked:o.showDocumentCount,onCheckedChange:m=>r(u=>({...u,showDocumentCount:m}))}),(0,Bo.jsx)(T,{htmlFor:"showDocumentCount",className:"text-sm",children:"Show Document Count"})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-3 ng-4",children:[(0,Bo.jsxs)(y,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,Bo.jsx)(ng.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Bo.jsxs)(y,{type:"submit",children:[(0,Bo.jsx)(ng.Save,{className:"h-4 w-4"}),"Create"]})]})]})]})})};function Pl({documents:e=[],contexts:t=[],onDocumentClick:a=c=>console.log("Document clicked:",c),onDocumentShare:o=c=>console.log("Share document:",c),onLoadDocumentContent:r,selectedDocumentId:s,onAddKnowledge:n,onAddTeamContext:i,onDocumentUpdate:l}){let[c,d]=(0,Ol.useState)(t[0]),[m,u]=(0,Ol.useState)(!1),[v,b]=(0,Ol.useState)(!1);(0,Ol.useEffect)(()=>{!c&&t&&t.length>0&&d(t[0])},[t]);let g=w=>{n&&n(w),u(!1)},f=w=>{i&&i(w),b(!1)};return(0,Bo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Bo.jsx)("div",{className:"px-2 Bo:px-4 py-4 flex-shrink-0",children:t&&t.length>0&&(0,Bo.jsxs)("div",{className:"Bo-6",children:[(0,Bo.jsx)("div",{className:"",children:(0,Bo.jsxs)("nav",{className:"-mb-px flex justify-between items-center",children:[(0,Bo.jsx)("div",{className:"flex space-x-8 overflow-x-auto",children:t.map(w=>(0,Bo.jsxs)("button",{onClick:()=>d(w),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${c?.id===w.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[w.icon,w.label]},w.id))}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Bo.jsx)("button",{onClick:()=>u(!0),className:"inline-flex border border-primary rounded-Ol items-center py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Knowledge"}),(0,Bo.jsx)("button",{onClick:()=>b(!0),className:"inline-flex border border-primary rounded-Ol items-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:"Add Context"})]})]})}),c?.description&&(0,Bo.jsx)("div",{className:"Bo-3 px-1",children:(0,Bo.jsx)("p",{className:"text-sm text-primary",children:c?.description})})]})}),c?(0,Bo.jsx)("div",{className:"flex-1 min-h-0 px-2 Bo:px-4 Ol-4",children:(0,Bo.jsx)("div",{className:"h-full rounded-Ol border overflow-hidden",children:(0,Bo.jsx)(Ic,{documents:e,menuConfig:c?.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:s,onDocumentUpdate:l})})}):(0,Bo.jsx)("div",{className:"flex-1 min-h-0 px-2 Bo:px-4 Ol-4 flex items-center justify-center",children:(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Ol contexts available"})}),(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(gh,{isOpen:v,onClose:()=>b(!1),onAddTeamContext:f}),(0,Bo.jsx)(uh,{isOpen:m,onClose:()=>u(!1),onAddKnowledge:g,knowledgeContexts:t})]})]})}function vu({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:r,onCreateProject:s,onOpenProject:n,sidebarItems:i,initialColleagues:l,users:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u}){let[v,b]=(0,Ol.useState)("home"),[g,f]=(0,Ol.useState)(t[0]),w=x=>{console.log("Opening app:",x.name)},I=x=>{console.log("Favoriting app:",x.name)},h=x=>{console.log("Opening file:",x.name)},S=x=>{console.log("Sharing file:",x.name)},A=x=>{console.log("Opening project:",x.name),n(x)},C=x=>{console.log("Sharing project:",x.name)},M=x=>{f(x),console.log("Business unit changed to:",x.name)},P=()=>{console.log("Copilot clicked - navigating to chat"),b("chat")},U=x=>{console.log("Notification removed:",x)},$=()=>{console.log("All notifications removed")},O=()=>{switch(v){case"home":return(0,Bo.jsxs)("div",{className:"px-2 Bo:px-4 py-4 space-y-8",children:[(0,Bo.jsxs)("section",{className:"text-center py-12",children:[(0,Bo.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",g.name," team"]}),(0,Bo.jsx)("p",{className:"text-Ol text-muted-foreground mb-8",children:"This Bo your collaborative workspace for productivity and knowledge sharing."})]}),(0,Bo.jsxs)("section",{className:"grid grid-cols-1 Bo:grid-cols-3 gap-6",children:[(0,Bo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,Bo.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Bo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,Bo.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Bo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Bo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,Bo.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Bo.jsx)(Wt,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Bo",onClick:()=>b("chat")}})]});case"colleagues":return(0,Bo.jsx)(kl,{initialColleagues:l,availableUsers:c,onColleagueAdd:d,onColleagueEdit:m,onColleagueDelete:u});case"chat":return(0,Bo.jsxs)("div",{className:"px-2 Bo:px-4 py-4 space-y-8",children:[(0,Bo.jsxs)("section",{className:"text-center py-12",children:[(0,Bo.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,Bo.jsxs)("p",{className:"text-Ol text-muted-foreground mb-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),(0,Bo.jsx)(Wt,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,Bo.jsxs)("div",{className:"space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 Bo:grid-cols-3 lg:grid-cols-4",children:eu.filter(x=>x.new).map(x=>(0,Bo.jsx)(Qp,{app:x,showProgress:!0,onOpen:w,onFavorite:I},x.name))})]}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 Bo:grid-cols-3 lg:grid-cols-4",children:eu.map(x=>(0,Bo.jsx)(Qp,{app:x,onOpen:w,onFavorite:I},x.name))})]})]});case"knowledge":return(0,Bo.jsx)(Pl,{});case"files":return(0,Bo.jsxs)("div",{className:"px-2 Bo:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("div",{className:"flex items-center justify-between",children:(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Bo.jsx)(un,{files:Ab,onFileClick:h})]})]});case"projects":return(0,Bo.jsxs)("div",{className:"px-2 Bo:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:s}}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-3 Bo:grid-cols-2 lg:grid-cols-3",children:a.map(x=>(0,Bo.jsx)(fn,{project:x,onOpen:A,onShare:C},x.name))})]})]});case"learn":return(0,Bo.jsxs)("div",{className:"space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),(0,Bo.jsxs)("section",{className:"space-y-4",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-6 Bo:grid-cols-2 lg:grid-cols-3",children:Ib.slice(0,3).map(x=>(0,Bo.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,Bo.jsx)("h3",{className:"font-semibold mb-2",children:x.title}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:x.description}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsx)("span",{children:x.duration}),(0,Bo.jsx)("span",{children:x.level})]})]},x.title))})]})]});default:return null}};return(0,Bo.jsx)(pc,{sidebarItems:Bb,title:e,notifications:Lb,businessUnits:t,currentBusinessUnit:g,onBusinessUnitChange:M,activeTab:v,onTabChange:b,showTabs:!0,onActionClick:P,actionIcon:(0,Bo.jsx)(ng.Bot,{className:"Bo-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:U,onRemoveAll:$,children:(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.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:O()},v)})})}var vh=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,r]=(0,Ol.useState)(null),[s,n]=(0,Ol.useState)(""),[i,l]=(0,Ol.useState)(""),[c,d]=(0,Ol.useState)(""),m=v=>{let b=v.target.files?.[0];b&&(r(b),s||n(b.name))},u=async v=>{if(v.preventDefault(),!o)return;let b=new FormData;b.append("file",o),b.append("name",s),i&&b.append("description",i),c&&b.append("tags",c),a?.(b),t(),r(null),n(""),l(""),d("")};return(0,Bo.jsx)(st,{open:e,onOpenChange:t,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-Bo",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New File"})}),(0,Bo.jsxs)("form",{onSubmit:u,className:"grid gap-4",children:[(0,Bo.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,Bo.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,Bo.jsxs)("div",{className:"flex flex-col items-center justify-center ng-5 Ol-6",children:[(0,Bo.jsx)(uw,{className:"w-10 h-10 text-gray-400"}),(0,Bo.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,Bo.jsx)("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),(0,Bo.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,Bo.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:m})]})}),o&&(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("p",{className:"font-medium",children:o.name}),(0,Bo.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,Bo.jsx)(y,{type:"submit",onClick:u,children:"Upload"})]})]})]})})};function uw(e){return(0,Bo.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Bo.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,Bo.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,Bo.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function Al({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:s=!1,className:n}){let[i,l]=(0,Ol.useState)(e),[c,d]=(0,Ol.useState)(""),[m,u]=(0,Ol.useState)("all"),[v,b]=(0,Ol.useState)("all"),[g,f]=(0,Ol.useState)(!1),w=(0,Ol.useRef)(""),I=O=>O.map(x=>`${x.id}-${new Date(x.createdAt).getTime()}-${new Date(x.updatedAt).getTime()}`).join("-");(0,Ol.useEffect)(()=>{let O=I(e);O!==w.current&&(l(e),w.current=O)},[e]);let h=i.filter(O=>O.name.toLowerCase().includes(c.toLowerCase())),S=h.slice(0,10),A=h.filter(Boolean),C=()=>{f(!0)},M=O=>{a?.(O)},P=O=>{console.log("deleting file",O),l(x=>x.filter(ue=>ue.name!==O.name)),o?.(O.id.toString())},U=O=>{r?.(O)},$=()=>{d(""),u("all")};return(0,Bo.jsxs)("div",{className:"px-2 Bo:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsx)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Bo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Bo.jsx)(Wt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:C},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ng-6",children:(0,Bo.jsxs)("div",{className:"flex flex-col Bo:flex-row gap-4",children:[(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsxs)("div",{className:"relative",children:[(0,Bo.jsx)(ng.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Bo.jsx)(G,{placeholder:"Search files...",value:c,onChange:O=>d(O.target.value),className:"pl-9"})]})}),(c||m!=="all")&&(0,Bo.jsxs)(y,{variant:"outline",onClick:$,className:"gap-2",children:[(0,Bo.jsx)(ng.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsx)(Ni,{activeTab:v,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${h.length})`},{value:"recent",label:`Recent (${S.length})`}],maxWidth:"500px",gridCols:3}),v==="all"&&(0,Bo.jsx)(un,{files:h,onFileClick:U,onFileEdit:M,onFileDelete:P,showHeader:!s}),v==="recent"&&(0,Bo.jsx)(un,{files:S,onFileClick:U,onFileEdit:M,onFileDelete:P,showHeader:!s}),v==="shared"&&(0,Bo.jsx)(un,{files:A,onFileClick:U,onFileEdit:M,onFileDelete:P,showHeader:!s})]}),h.length===0&&(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"ng-6",children:(0,Bo.jsxs)("div",{className:"text-center py-8",children:[(0,Bo.jsx)(ng.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Bo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Ol files found"}),(0,Bo.jsx)("p",{className:"text-muted-foreground mb-4",children:c||m!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Bo.jsxs)(y,{onClick:C,className:"gap-2",children:[(0,Bo.jsx)(ng.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,Bo.jsx)(vh,{isOpen:g,onClose:()=>f(!1),onAddFile:t})]})}var gw=[{key:"kanban",icon:ng.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:ng.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:ng.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:ng.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:ng.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],bh=({currentView:e,onViewChange:t,children:a})=>(0,Bo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,Bo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:gw.map(o=>{let r=o.icon,s=e===o.key;return(0,Bo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${s?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden Bo:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,Bo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,Bo.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,Bo.jsx)("div",{className:"flex-1 min-w-0 px-4 Bo:px-6 h-full overflow-auto",children:(0,Bo.jsx)("div",{className:"w-full h-full",children:a})})]});var Mt=L(require("react"));var hh=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:s=!1,height:n})=>{let i=d=>{d.preventDefault()},l=d=>{d.preventDefault(),r(t)};return(0,Bo.jsxs)(H,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-Bo transition-shadow duration-200 flex flex-col ${s?"lg:max-w-xs":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:i,onDrop:l,children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Bo.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,Bo.jsx)(Y,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Bo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var Il=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let s=d=>{a(e)},n=()=>{o(e)},i=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},l=()=>{switch(e.type){case"story":return(0,Bo.jsx)(ng.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Bo.jsx)(ng.Bug,{className:"h-3 w-3"});case"spike":return(0,Bo.jsx)(ng.Zap,{className:"h-3 w-3"});case"task":default:return(0,Bo.jsx)(ng.AlertCircle,{className:"h-3 w-3"})}},c=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return r?(0,Bo.jsx)(H,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:n,children:(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${c()}`,children:l()}),(0,Bo.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Bo.jsxs)(H,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-Bo",draggable:!0,onDragStart:s,onClick:n,children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Bo.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[l(),(0,Bo.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Bo.jsxs)("div",{className:"flex gap-1",children:[(0,Bo.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${i()}`,children:e.priority}),(0,Bo.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,Bo.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ng.User,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:e.assignee?.value?.name})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ng.Calendar,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var fw=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ng.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:ng.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ng.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ng.Zap}],vw=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],wn=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:s,defaultEpicId:n})=>{let[i,l]=(0,Ol.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,Ol.useEffect)(()=>{e&&n&&l(m=>({...m,epic:n}))},[e,n]),(0,Ol.useEffect)(()=>{e&&l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"none",assignee:""})},[e]);let c=m=>{m.preventDefault(),i.name.trim()&&(a({name:i.name.trim(),description:i.description.trim(),status:"todo",priority:i.priority,type:i.type,storyPoints:i.storyPoints,epic:Number(i.epic),sprint:Number(i.sprint),assignee:i.assignee.trim()?{relationTo:"digital-colleagues",value:Number(i.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"",assignee:""}),t())},d=(m,u)=>{l(v=>({...v,[m]:u}))};return(0,Bo.jsx)(st,{open:e,onOpenChange:t,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-Bo",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Task"})}),(0,Bo.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Task Title"}),(0,Bo.jsx)(G,{id:"name",value:i.name,onChange:m=>d("name",m.target.value),placeholder:"Enter task title",required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:i.description,onChange:m=>d("description",m.target.value),placeholder:"Enter task description",rows:3})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Type"}),(0,Bo.jsx)(qr,{type:"single",value:i.type||"",onValueChange:m=>m&&d("type",m),children:fw.map(m=>{let u=m.icon;return(0,Bo.jsxs)(Jr,{value:m.value,className:"flex items-center gap-2 data-[state=Ol]:bg-primary data-[state=Ol]:text-primary-foreground",children:[(0,Bo.jsx)(u,{className:"h-4 w-4"}),m.label]},m.value)})})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Priority"}),(0,Bo.jsx)(qr,{type:"single",value:i.priority||"",onValueChange:m=>m&&d("priority",m),children:vw.map(m=>(0,Bo.jsx)(Jr,{value:m.value,className:"data-[state=Ol]:bg-primary data-[state=Ol]:text-primary-foreground",children:m.label},m.value))})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"points",children:"Story Points"}),(0,Bo.jsx)(G,{id:"points",type:"number",min:"1",max:"100",value:i.storyPoints,onChange:m=>d("storyPoints",parseInt(m.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"epic",children:"Epic"}),(0,Bo.jsxs)(at,{value:i.epic,onValueChange:m=>d("epic",m),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select Ol epic"})}),(0,Bo.jsx)(Ze,{children:o.map(m=>(0,Bo.jsx)(ve,{value:m.id.toString(),children:(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${m.color}`}),m.name]})},m.id))})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Bo.jsxs)(at,{value:i.sprint,onValueChange:m=>d("sprint",m),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select a sprint"})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"none",children:"Ol Sprint"}),r.map(m=>(0,Bo.jsx)(ve,{value:m.id.toString(),children:(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"sprint",children:"Assignee"}),(0,Bo.jsxs)(at,{value:i.assignee,onValueChange:m=>d("assignee",m),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{placeholder:"Select Ol Assignee"})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"none",children:"Ol Assignee"}),s.map(m=>(0,Bo.jsx)(ve,{value:m.id.toString(),children:(0,Bo.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,Bo.jsxs)(ii,{children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Lc=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:s=!1})=>{let[n,i]=(0,Ol.useState)(!1),l=o.find(d=>d.value===t);return(0,Bo.jsxs)("div",{className:"space-y-1",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Bo.jsxs)(at,{value:t,onValueChange:a,open:n,onOpenChange:d=>{s||i(d)},disabled:s,children:[(0,Bo.jsx)(Ye,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-Bo",children:(0,Bo.jsxs)(Y,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&i(!n),children:[r&&l?.color&&(0,Bo.jsx)("div",{className:`w-2 h-2 rounded-full ${l.color} Bo-1`}),l?.label||"Select..."]})}),(0,Bo.jsx)(Ze,{children:o.map(d=>(0,Bo.jsx)(ve,{value:d.value,children:r&&d.color?(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var ga=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var bw=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ng.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:ng.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ng.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ng.Zap}],hw=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var xh=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:s,onDelete:n,isUpdating:i=!1,isDeleting:l=!1,deleteState:c="idle",teamMembers:d})=>{let[m,u]=(0,Ol.useState)(e.storyPoints),v=(0,Ol.useRef)(null),[b,g]=(0,Ol.useState)(d);(0,Ol.useEffect)(()=>{g(d)},[d]);let f=(0,Ol.useCallback)((h,S)=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{r(h,S)},500)},[r]);(0,Ol.useEffect)(()=>{f("storyPoints",m?.toString()||"1")},[m]);let w=h=>h.split(" ").map(S=>S[0]).join("").toUpperCase(),I=()=>c==="loading"?(0,Bo.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Bo.jsx)(ng.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,Bo.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Bo.jsx)(ng.Check,{className:"h-3 w-3"}),"Deleted"]}):c==="error"?(0,Bo.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Bo.jsx)(ng.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Bo.jsxs)(y,{onClick:n,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:i||l,children:[(0,Bo.jsx)(ng.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Bo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Bo.jsxs)("div",{className:"space-y-4",style:{opacity:i?.6:1},children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Bo.jsx)(Lc,{label:"",value:e.status,onValueChange:h=>r("status",h),options:[{value:"todo",label:"ng Bo"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:i})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Bo.jsx)(qr,{type:"single",value:e.type||"",onValueChange:h=>h&&r("type",h),className:"grid grid-cols-2 gap-1",disabled:i,children:bw.map(h=>{let S=h.icon;return(0,Bo.jsxs)(Jr,{value:h.value,className:"flex items-center gap-1 text-xs h-8 data-[state=Ol]:bg-primary data-[state=Ol]:text-primary-foreground",size:"sm",disabled:i,children:[(0,Bo.jsx)(S,{className:"h-3 w-3"}),h.label]},h.value)})})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Bo.jsx)(qr,{type:"single",value:e.priority||"",onValueChange:h=>h&&r("priority",h),className:"grid grid-cols-3 gap-1",disabled:i,children:hw.map(h=>(0,Bo.jsx)(Jr,{value:h.value,className:"text-xs h-8 data-[state=Ol]:bg-primary data-[state=Ol]:text-primary-foreground",size:"sm",disabled:i,children:h.label},h.value))})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Bo.jsx)("input",{type:"number",min:"1",max:"100",value:m||1,onChange:h=>{let S=Number(h.target.value);S<1?u(1):S>100?u(100):u(S)},className:"w-full h-8 px-2 text-xs border border-border rounded-Bo focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:i})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Bo.jsx)(Lc,{label:"",value:ga(e.epic).toString(),onValueChange:h=>r("epic",h),options:(t||[]).map(h=>({value:h.id.toString(),label:h?.name,color:h.color})),showColor:!0,disabled:i})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Bo.jsx)(Lc,{label:"",value:ga(e.sprint).toString()||"none",onValueChange:h=>r("sprint",h==="none"?"":h),options:[{value:"none",label:"Ol Sprint"},...(a||[]).map(h=>({value:h.id.toString(),label:`${h?.name}`}))],disabled:i})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Bo.jsx)(uc,{label:"",value:e.assignee?.value?.name,onValueChange:h=>r("assignee",h),options:b.map(h=>({value:`${typeof h.email=="string"?"users":"digital-colleagues"}:${h.id}`,label:h?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:i})]})]}),(0,Bo.jsxs)("div",{className:"Bo-auto ng-4 space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(y,{onClick:s,variant:"outline",className:"w-full h-8 text-xs",disabled:i||l,children:"Close"}),I()]}),(0,Bo.jsxs)("div",{className:"ng-4 border-t border-border space-y-2",children:[(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Bo.jsx)(ng.User,{className:"h-3 w-3"}),(0,Bo.jsx)("span",{children:"System"})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Bo.jsx)(ng.Calendar,{className:"h-3 w-3"}),(0,Bo.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Bo.jsx)(ng.Clock,{className:"h-3 w-3"}),(0,Bo.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var wh=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:s,onDeleteTask:n,onAddComment:i,colleagues:l})=>{let[c,d]=(0,Ol.useState)(a),[m,u]=(0,Ol.useState)(new Date),[v,b]=(0,Ol.useState)("idle"),[g,f]=(0,Ol.useState)("idle"),[w,I]=(0,Ol.useState)([]),[h,S]=(0,Ol.useState)(l);(0,Ol.useEffect)(()=>{d(a)},[a]);let A=async(x,ue)=>{if(ue!==c[x]){b("loading");try{await s(c.id.toString(),{[x]:ue}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(R){console.log("error",R),b("error"),setTimeout(()=>b("idle"),3e3)}}},C=async(x,ue)=>{if(ue!==c[x]){b("loading");try{await s(c.id.toString(),{[x]:ue}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(R){console.log("error",R),b("error"),setTimeout(()=>b("idle"),3e3)}}},M=async x=>{if(i){b("loading");try{await i?.({content:x,taskId:c.id.toString()}),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},P=async()=>{f("loading");try{await n(c.id.toString()),f("success"),setTimeout(()=>{t(),f("idle")},1e3)}catch{f("error"),setTimeout(()=>f("idle"),3e3)}},U=v!=="loading"&&g!=="loading",$=()=>{U&&t()},O=()=>v==="loading"?(0,Bo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Bo.jsx)(ng.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Bo.jsx)("span",{children:"Updating..."})]}):v==="success"?(0,Bo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Bo.jsx)(ng.Check,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Updated successfully"})]}):v==="error"?(0,Bo.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Bo.jsx)(ng.X,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Update failed"})]}):null;return(0,Bo.jsx)(st,{open:e,onOpenChange:$,children:(0,Bo.jsxs)(lt,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Bo.jsxs)(gt,{children:[(0,Bo.jsx)(ft,{className:"sr-only",children:c?.name}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("div",{className:"flex-1",children:O()}),!U&&(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Bo.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Bo.jsx)(ki,{fieldName:"name",value:c.name||"",label:"",onSave:A,className:"border-b border-border Ol-3",disabled:v==="loading"}),(0,Bo.jsx)(ki,{fieldName:"description",value:c.description||"",label:"Description",multiline:!0,onSave:A,disabled:v==="loading"}),(0,Bo.jsx)(_p,{comments:(c?.comments||[]).map(x=>({author:x.author.value.name||"",createdAt:new Date(x.timestamp),text:x.text,id:x.id||""})),onAddComment:M})]}),(0,Bo.jsx)(xh,{task:c,epics:o,sprints:r,lastUpdated:m,onUpdateTask:C,onClose:$,onDelete:P,isUpdating:v==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:h})]})]})})};var Cn=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,Ol.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),s=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],n=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],i=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],l=d=>{d.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},c=(d,m)=>{r(u=>({...u,[d]:m}))};return(0,Bo.jsx)(st,{open:e,onOpenChange:t,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-Bo",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Epic"})}),(0,Bo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Epic Name"}),(0,Bo.jsx)(G,{id:"name",value:o.name,onChange:d=>c("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:o.description,onChange:d=>c("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Color"}),(0,Bo.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(d=>(0,Bo.jsx)("button",{type:"button",onClick:()=>c("color",d),className:`w-8 h-8 rounded-full ${d} ${o.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Confidence"}),(0,Bo.jsxs)(at,{value:o.confidence,onValueChange:d=>c("confidence",d),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{})}),(0,Bo.jsx)(Ze,{children:n.map(d=>(0,Bo.jsx)(ve,{value:d.value,children:d.label},d.value))})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Phase"}),(0,Bo.jsxs)(at,{value:o.phase.toString(),onValueChange:d=>c("phase",parseInt(d)),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{})}),(0,Bo.jsx)(Ze,{children:i.map(d=>(0,Bo.jsx)(ve,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Start Date"}),(0,Bo.jsx)(G,{type:"date",value:o.startDate,onChange:d=>c("startDate",d.target.value)})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"End Date"}),(0,Bo.jsx)(G,{type:"date",value:o.endDate,onChange:d=>c("endDate",d.target.value)})]})]}),(0,Bo.jsxs)(ii,{children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var bu=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:s=[],onAddTask:n,onUpdateTask:i,onDeleteTask:l,onTaskClick:c,onAddEpic:d,onAddComment:m})=>{let[u,v]=(0,Mt.useState)([]),[b,g]=(0,Mt.useState)([]),[f,w]=(0,Mt.useState)([]),[I,h]=(0,Mt.useState)(!1),[S,A]=(0,Mt.useState)(!1),[C,M]=(0,Mt.useState)(null),[P,U]=(0,Mt.useState)(null),[$,O]=(0,Mt.useState)([]),[x,ue]=(0,Mt.useState)([]),[R,F]=(0,Mt.useState)(0),J=(0,Mt.useRef)(null),De=(0,Mt.useRef)(null),St=Mt.default.useMemo(()=>[...b.map(X=>X.id),0],[b]),Ot=(0,Mt.useRef)(""),ae=(0,Mt.useRef)(""),E=(0,Mt.useRef)(""),ke=(0,Mt.useRef)(""),tt=X=>X.map(D=>`${D.id}-${new Date(D.createdAt).getTime()}-${new Date(D.updatedAt).getTime()}`).join("-");(0,Mt.useEffect)(()=>{let X=tt(e);X!==Ot.current&&(v(e),C&&M(e.find(D=>D.id===C.id)||null),Ot.current=X)},[e]),(0,Mt.useEffect)(()=>{let X=tt(t);X!==ae.current&&(g(t),ae.current=X)},[t]),(0,Mt.useEffect)(()=>{let X=tt(a);X!==E.current&&(w(a),E.current=X)},[a]),(0,Mt.useEffect)(()=>{let X=tt(r.map(D=>({id:D.id,updatedAt:D.updatedAt,createdAt:D.createdAt})));X!==ke.current&&(ue(r),ke.current=X)},[r]),(0,Mt.useEffect)(()=>{let X=()=>{if(J.current){let he=J.current.offsetHeight;F(he)}};X();let D=new ResizeObserver(X);J.current&&D.observe(J.current);let z=()=>{setTimeout(X,100)};return window.addEventListener("storage",z),()=>{D.disconnect(),window.removeEventListener("storage",z)}},[]),(0,Mt.useEffect)(()=>{let X=setTimeout(()=>{J.current&&F(J.current.offsetHeight)},300);return()=>clearTimeout(X)},[I,S]);let Za=u.filter(X=>!0),it=X=>Za.filter(D=>D.status===X),ra=X=>{let D={};return b.forEach(z=>{D[z.id]=X.filter(he=>ga(he.epic)===z.id)}),D["Bo-epic"]=X.filter(z=>!ga(z.epic)),D},K=X=>{U(X)},jt=X=>{P&&(v(D=>D.map(z=>z.id===P.id?{...z,status:X}:z)),i?.(P.id.toString(),{status:X}),U(null))},uo=X=>{let D={...X,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};v(z=>[...z,D]),n?.(X)},go=async(X,D)=>{v(z=>z.map(he=>he.id===Number(X)?{...he,...D}:he)),i&&await i(X,D),C?.id===Number(X)&&M(z=>({...z,...D}))},Mo=async X=>{v(D=>D.filter(z=>z.id!==Number(X))),C?.id===Number(X)&&M(null),l&&await l(X)},xs=X=>{let D={...X,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g(z=>[...z,D]),d?.(X)},Nr=X=>{M(X),c?.(X)},ws=[{id:"todo",title:"ng Bo",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Ns=R>0?`calc(100vh - ${R+120}px)`:"calc(100vh - 12rem)";return(0,Bo.jsxs)("div",{ref:De,className:"h-full flex flex-col px-2 Bo:px-4 py-4",children:[(0,Bo.jsx)("div",{ref:J,className:"flex-shrink-0",children:(0,Bo.jsx)(Wt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>h(!0)},secondaryAction:{label:"Add epic",onClick:()=>A(!0)}})}),(0,Bo.jsx)("div",{className:"flex-1 min-h-0 Bo-8",children:(0,Bo.jsx)("div",{className:"h-full",style:{height:R>0?`calc(100vh - ${R+120}px)`:"calc(100vh - 12rem)"},children:(0,Bo.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:ws.map(X=>{let D=it(X.status),z=ra(D);return(0,Bo.jsxs)(hh,{title:X.title,status:X.status,taskCount:D.length,onDrop:jt,isCompact:X.status==="done",height:Ns,children:[z["Bo-epic"].map(he=>(0,Bo.jsx)(Il,{epic:null,task:he,onDragStart:K,onTaskClick:Nr,isCompact:X.status==="done"},he.id)),St.map(he=>{let rt=b.find(_e=>_e.id===he),xe=z[he]||[];return xe.length===0?null:(0,Bo.jsxs)("div",{className:"mb-6",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${rt?.color}`}),(0,Bo.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:rt?.name||"Ol Epic"}),(0,Bo.jsx)(Y,{variant:"secondary",className:"text-xs",children:xe.length})]})," ",(0,Bo.jsx)("div",{className:"space-y-3",children:xe.map(_e=>(0,Bo.jsx)(Il,{task:_e,epic:rt,onDragStart:K,onTaskClick:Nr,isCompact:X.status==="done"},_e.id))})]},he)})]},X.id)})})})}),(0,Bo.jsx)(wn,{isOpen:I,onClose:()=>h(!1),onAddTask:uo,assignees:[...x,...$],epics:b,sprints:f}),(0,Bo.jsx)(Cn,{isOpen:S,onClose:()=>A(!1),onAddEpic:xs}),C&&(0,Bo.jsx)(wh,{isOpen:!!C,onClose:()=>M(null),initialTask:C,epics:b,sprints:f,onUpdateTask:go,onDeleteTask:Mo,colleagues:x,onAddComment:m})]})};var hu=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:s,onAddEpic:n,onUpdateEpic:i,onDeleteEpic:l})=>{let[c,d]=(0,Ol.useState)(t),[m,u]=(0,Ol.useState)(null),[v,b]=(0,Ol.useState)(null),[g,f]=(0,Ol.useState)({}),[w,I]=(0,Ol.useState)(0),[h,S]=(0,Ol.useState)(!1),[A,C]=(0,Ol.useState)(!1),[M,P]=(0,Ol.useState)(null),U=(0,Ol.useRef)(null),$=(0,Ol.useRef)(null);(0,Ol.useEffect)(()=>{d(t)},[t]),(0,Ol.useEffect)(()=>{let E=()=>{if(U.current){let Za=U.current.offsetHeight;I(Za)}};E();let ke=new ResizeObserver(E);U.current&&ke.observe(U.current);let tt=()=>{setTimeout(E,100)};return window.addEventListener("storage",tt),()=>{ke.disconnect(),window.removeEventListener("storage",tt)}},[]),(0,Ol.useEffect)(()=>{let E=setTimeout(()=>{U.current&&I(U.current.offsetHeight)},300);return()=>clearTimeout(E)},[v]);let O=E=>{u(E)},x=E=>{E.preventDefault()},ue=(E,ke)=>{E.preventDefault(),m&&ga(m.epic).toString()!==ke&&(o(m.id.toString(),{epic:Number(ke)}),u(null))},R=E=>e.filter(ke=>ga(ke.epic).toString()===E),F=E=>{b(E.id.toString()),f({name:E.name,description:E.description,confidence:E.confidence,phase:E.phase})},J=async()=>{v&&g.name&&(await i(v.toString(),g),d(E=>E.map(ke=>ke.id.toString()===v?{...ke,...g}:ke)),b(null),f({}))},De=()=>{b(null),f({})},St=async E=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await l(E),d(ke=>ke.filter(tt=>tt.id.toString()!==E)))},Ot=E=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[E]||`Phase ${E}`,ae=E=>{switch(E){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("div",{ref:$,className:"h-full flex flex-col px-2 Bo:px-4 py-4",children:[(0,Bo.jsx)("div",{ref:U,className:"flex-shrink-0",children:(0,Bo.jsx)(Wt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>S(!0)}})}),(0,Bo.jsx)("div",{className:"flex-1 min-h-0 Bo-8",children:(0,Bo.jsx)("div",{className:"h-full overflow-y-auto",style:{height:w>0?`calc(100vh - ${w+120}px)`:"calc(100vh - 12rem)"},children:(0,Bo.jsx)("div",{className:"grid grid-cols-1 Bo:grid-cols-2 lg:grid-cols-3 Ol:grid-cols-4 gap-6 auto-rows-max",children:c.map(E=>{let ke=R(E.id.toString()),tt=ke.reduce((it,ra)=>it+(ra.storyPoints||0),0),Za=w>0?`calc(100vh - ${w+200}px)`:"calc(100vh - 14rem)";return(0,Bo.jsxs)(H,{className:`flex flex-col ${v===E.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:v===E.id.toString()?"auto":Za,minHeight:"400px"},onDragOver:x,onDrop:it=>ue(it,E.id.toString()),children:[(0,Bo.jsx)("div",{className:"p-4 border-b border-border",children:v===E.id.toString()?(0,Bo.jsxs)("div",{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)(G,{value:g.name||"",onChange:it=>f({...g,name:it.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Bo.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:J,className:"p-1 h-8 w-8",children:(0,Bo.jsx)(ng.Check,{className:"h-4 w-4"})}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:De,className:"p-1 h-8 w-8",children:(0,Bo.jsx)(ng.X,{className:"h-4 w-4"})})]})]}),(0,Bo.jsx)(Qe,{value:g.description||"",onChange:it=>f({...g,description:it.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Bo.jsxs)("select",{value:g.confidence||E.confidence,onChange:it=>f({...g,confidence:it.target.value}),className:"flex h-8 w-full rounded-Bo border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,Bo.jsx)("option",{value:"low",children:"Low"}),(0,Bo.jsx)("option",{value:"medium",children:"Medium"}),(0,Bo.jsx)("option",{value:"high",children:"High"})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Bo.jsx)("select",{value:g.phase?.toString()||E.phase.toString(),onChange:it=>f({...g,phase:parseInt(it.target.value)}),className:"flex h-8 w-full rounded-Bo border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(it=>(0,Bo.jsxs)("option",{value:it.toString(),children:["Phase ",it]},it))})]})]})]}):(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Bo.jsx)("div",{className:`w-4 h-4 rounded-full ${E.color}`}),(0,Bo.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:E.name}),(0,Bo.jsxs)("div",{className:"flex gap-1",children:[(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>F(E),className:"p-1 h-8 w-8",children:(0,Bo.jsx)(ng.Edit2,{className:"h-3 w-3"})}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>St(E.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Bo.jsx)(ng.Trash2,{className:"h-3 w-3"})})]})]}),(0,Bo.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Bo.jsxs)(Y,{className:`text-xs ${ae(E.confidence)}`,children:[E.confidence," confidence"]}),(0,Bo.jsxs)(Y,{variant:"outline",className:"text-xs",children:["Phase ",E.phase]}),(0,Bo.jsxs)(Y,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ke.length," tasks"]}),(0,Bo.jsxs)(Y,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[tt," pts"]})]}),E.description&&(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:E.description}),(0,Bo.jsxs)(y,{onClick:()=>{C(!0),P(E)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Bo.jsx)(ng.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Bo.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Bo.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:ke.length===0?(0,Bo.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,Bo.jsx)(ng.Move,{className:"h-8 w-8 mb-2"}),(0,Bo.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):ke.map(it=>(0,Bo.jsx)(Il,{task:it,epic:E,onDragStart:O,onTaskClick:r,isCompact:!0},it.id))})})]},E.id)})})})})]}),(0,Bo.jsx)(Cn,{isOpen:h,onClose:()=>S(!1),onAddEpic:n}),(0,Bo.jsx)(wn,{isOpen:A,onClose:()=>C(!1),onAddTask:s,assignees:[],epics:[],defaultEpicId:M?.id.toString()||"",sprints:a})]})};var kh=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,Ol.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),s=i=>{i.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},n=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Bo.jsx)(st,{open:e,onOpenChange:n,children:(0,Bo.jsxs)(lt,{className:"sm:max-w-Bo",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Sprint"})}),(0,Bo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",children:"Sprint Name *"}),(0,Bo.jsx)(G,{id:"name",value:o.name,onChange:i=>r(l=>({...l,name:i.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:o.description,onChange:i=>r(l=>({...l,description:i.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"Start Date *"}),(0,Bo.jsxs)(Rs,{children:[(0,Bo.jsx)(As,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Bo.jsx)(ng.CalendarIcon,{className:"Bo-2 h-4 w-4"}),o.startDate?(0,xp.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Bo.jsx)(Yr,{className:"w-auto p-0",align:"start",children:(0,Bo.jsx)(Bs,{mode:"single",selected:o.startDate,onSelect:i=>r(l=>({...l,startDate:i})),initialFocus:!0})})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{children:"End Date *"}),(0,Bo.jsxs)(Rs,{children:[(0,Bo.jsx)(As,{asChild:!0,children:(0,Bo.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Bo.jsx)(ng.CalendarIcon,{className:"Bo-2 h-4 w-4"}),o.endDate?(0,xp.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Bo.jsx)(Yr,{className:"w-auto p-0",align:"start",children:(0,Bo.jsx)(Bs,{mode:"single",selected:o.endDate,onSelect:i=>r(l=>({...l,endDate:i})),initialFocus:!0,disabled:i=>o.startDate?i<o.startDate:!1})})]})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-3 ng-4",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Ec=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:s,onUpdateSprint:n,onDeleteSprint:i})=>{let[l,c]=(0,Ol.useState)([]),[d,m]=(0,Ol.useState)(new Set),[u,v]=(0,Ol.useState)(null),[b,g]=(0,Ol.useState)(!1),[f,w]=(0,Ol.useState)(null),[I,h]=(0,Ol.useState)(null),[S,A]=(0,Ol.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[C,M]=(0,Ol.useState)([]),[P,U]=(0,Ol.useState)("upcoming"),[$,O]=(0,Ol.useState)(!1),[x,ue]=(0,Ol.useState)(0),R=(0,Ol.useRef)(null),F=(0,Ol.useRef)(null);(0,Ol.useEffect)(()=>{let D=()=>{R.current&&ue(R.current.offsetHeight)};D();let z=new ResizeObserver(D);return R.current&&z.observe(R.current),()=>z.disconnect()},[]);let J=D=>t.find(z=>z.id===Number(D)),De=D=>a.find(z=>z.id===Number(D)),St=D=>{let z={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return z[D]||z.medium},Ot=D=>{if(!D||D?.length===0)return"";let z=D?.trim().split(" ");if(z?.length===1)return z[0];let he=z[0],rt=z[z.length-1][0].toUpperCase();return`${he} ${rt}`},ae=D=>{let z={},he=[];return D.forEach(rt=>{rt.epic?(z[ga(rt.epic)]||(z[ga(rt.epic)]=[]),z[ga(rt.epic)].push(rt)):he.push(rt)}),{tasksByEpic:z,unassignedTasks:he}};(0,Ol.useEffect)(()=>{M(a)},[a]);let E=C.filter(D=>{switch(P){default:return!0}}),ke=C.filter(D=>l.includes(D.id.toString())),tt=e.filter(D=>!D.sprint||D.status==="backlog"),Za=tt.reduce((D,z)=>D+(z.storyPoints||0),0),it=D=>{c(z=>z.includes(D)?z.filter(he=>he!==D):z?.length<3?[...z,D]:z)},ra=D=>{m(z=>{let he=new Set(z);return he.has(D)?he.delete(D):he.add(D),he})},K=D=>{s(D),g(!1)},jt=D=>{h(D.id.toString()),A({name:D.name,description:D.description||"",startDate:D.startDate?new Date(D.startDate).toISOString().split("T")[0]:D.startDate,endDate:D.endDate?new Date(D.endDate).toISOString().split("T")[0]:D.endDate,isActive:!1})},uo=()=>{I&&(n(I,{name:S.name,description:S.description,startDate:S.startDate,endDate:S.endDate}),M(D=>D.map(z=>(z.id===Number(I)&&(z.name=S.name,z.description=S.description,z.startDate=S.startDate,z.endDate=S.endDate),z))),h(null))},go=()=>{h(null),A({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Mo=(D,z)=>{v(z),D.dataTransfer.effectAllowed="move"},xs=D=>{D.preventDefault(),D.dataTransfer.dropEffect="move"},Nr=D=>{w(D)},ws=()=>{w(null)},Ns=(D,z)=>{if(D.preventDefault(),w(null),!u)return;(ga(u.sprint)||void 0)!==Number(z)&&o(u.id.toString(),{sprint:Number(z)}),v(null)},X=({task:D,showSprint:z=!1})=>{let he=D.epic?J(ga(D.epic).toString()):null,rt=D.sprint?De(ga(D.sprint).toString()):null;return(0,Bo.jsx)(H,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-Bo transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:ut=>{ut.dataTransfer.effectAllowed="move",ut.dataTransfer.setData("text/plain",D.id.toString()),Mo(ut,D)},onClick:ut=>{u===null&&r(D)},style:{userSelect:"none"},children:(0,Bo.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Bo.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Bo.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:D.name}),(0,Bo.jsx)(Y,{className:`text-xs ${St(D.priority||"medium")}`,children:D.priority?.[0]?.toUpperCase()})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-1",children:[he&&(0,Bo.jsx)("div",{className:`w-2 h-2 rounded-full ${he.color}`}),(0,Bo.jsx)("span",{className:"text-muted-foreground truncate",children:he?.name})]}),(0,Bo.jsx)("span",{className:"text-muted-foreground",children:Ot(D.assignee?.value?.name)})]}),z&&rt&&(0,Bo.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Bo.jsx)(ng.Calendar,{className:"h-3 w-3"}),(0,Bo.jsx)("span",{children:rt.name})]})]})})};return(0,Bo.jsxs)("div",{ref:F,className:"h-full flex flex-col px-2 Bo:px-4 py-4",children:[(0,Bo.jsx)("div",{ref:R,className:"flex-shrink-0",children:(0,Bo.jsx)(Wt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>g(!0)}})}),(0,Bo.jsx)("div",{className:"flex-1 min-h-0 Bo-8",children:(0,Bo.jsxs)("div",{className:"h-full",style:{height:x>0?`calc(100vh - ${x+120}px)`:"calc(100vh - 12rem)"},children:[(0,Bo.jsxs)("div",{className:"mb-4",children:[(0,Bo.jsx)(H,{className:"p-3 bg-card shadow-sm",children:(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,Bo.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l?.length,"/3 selected"]})]}),l?.length>0&&(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,Bo.jsx)("div",{className:"flex flex-wrap gap-1",children:ke.map(D=>(0,Bo.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Bo.jsx)("span",{className:"max-w-[80px] truncate",children:D.name}),(0,Bo.jsx)("button",{onClick:()=>it(D.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Bo.jsx)(ng.X,{className:"h-4 w-4"})})]},D.id))})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsxs)(y,{onClick:()=>g(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Bo.jsx)(ng.Plus,{className:"h-3 w-3"}),"Add"]}),(0,Bo.jsxs)(y,{onClick:()=>O(!$),variant:"outline",size:"sm",className:"gap-1",children:[(0,Bo.jsx)(ng.Calendar,{className:"h-3 w-3"}),$?"Close":"Select"]})]})]})}),$&&(0,Bo.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>O(!1)}),(0,Bo.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-Ol z-10 transition-all duration-300 ease-in-out ${$?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,Bo.jsxs)(H,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Bo.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Bo.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>O(!1),className:"h-8 w-8 p-0",children:(0,Bo.jsx)(ng.X,{className:"h-4 w-4"})})]}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground Bo-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Bo.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Bo.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(D=>(0,Bo.jsxs)(y,{variant:P===D.key?"default":"outline",size:"sm",onClick:()=>U(D.key),className:"text-xs h-8 px-3 flex-1",children:[D.label," (",D.count,")"]},D.key))}),(0,Bo.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:E.length>0?E.map(D=>{let z=l.includes(D.id.toString()),he=e.filter(xe=>ga(xe.sprint)===D.id).length,rt=!z&&l.length<3;return(0,Bo.jsx)("div",{className:`p-3 rounded-lg border transition-all ${z?"bg-primary/10 border-primary/30":rt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:I===D.id.toString()?(0,Bo.jsxs)("div",{className:"space-y-3",children:[(0,Bo.jsx)(G,{value:S.name,onChange:xe=>A(_e=>({..._e,name:xe.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Bo.jsx)(Qe,{value:S.description,onChange:xe=>A(_e=>({..._e,description:xe.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Bo.jsxs)("div",{className:"flex gap-2",children:[(0,Bo.jsxs)(y,{size:"sm",onClick:()=>uo(),className:"flex-1",children:[(0,Bo.jsx)(ng.Check,{className:"h-3 w-3 Bo-1"}),"Save"]}),(0,Bo.jsxs)(y,{size:"sm",variant:"outline",onClick:go,className:"flex-1",children:[(0,Bo.jsx)(ng.X,{className:"h-3 w-3 Bo-1"}),"Cancel"]})]})]}):(0,Bo.jsxs)("div",{children:[(0,Bo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Bo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Bo.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:D.name}),(0,Bo.jsx)(Y,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:D.description}),(0,Bo.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Bo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ng.CalendarDays,{className:"h-3 w-3"}),new Date(D.startDate).toLocaleDateString()]}),(0,Bo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Bo.jsx)(ng.User,{className:"h-3 w-3"}),he," tasks"]})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>jt(D),className:"h-6 w-6 p-0",children:(0,Bo.jsx)(ng.Edit2,{className:"h-3 w-3"})}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>i(D.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,Bo.jsx)(ng.Trash2,{className:"h-3 w-3"})})]})]}),(0,Bo.jsx)("div",{className:"flex items-center justify-between Bo-2",children:(0,Bo.jsx)(y,{variant:z?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>it(D.id.toString()),disabled:!z&&l?.length>=3,children:(0,Bo.jsx)("span",{className:"pointer-events-none select-none",children:z?"Deselect":l?.length>=3?"Limit Reached":"Select"})})})]})},D.id)}):(0,Bo.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Bo.jsx)(ng.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,Bo.jsxs)("p",{className:"text-sm",children:['Ol sprints found for "',P,'" filter']}),(0,Bo.jsx)(y,{variant:"link",size:"sm",onClick:()=>U("all"),className:"text-xs",children:"Show all sprints"})]})}),l?.length===0&&(0,Bo.jsx)("div",{className:"Bo-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Bo.jsxs)("div",{className:"text-center",children:[(0,Bo.jsx)(ng.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Bo.jsx)("p",{className:"text-xs text-muted-foreground Bo-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Bo.jsx)("div",{className:"lg:col-span-1",children:(0,Bo.jsxs)(H,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-Bo transition-shadow duration-200 flex flex-col",onDragOver:xs,onDragEnter:()=>Nr("backlog"),onDragLeave:ws,onDrop:D=>Ns(D,"backlog"),style:{height:x>0?`calc(100vh - ${x+200}px)`:"calc(100vh - 16rem)"},children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Bo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsxs)(Y,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[tt?.length," tasks"]}),(0,Bo.jsxs)(Y,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[Za," pts"]})]})]}),(0,Bo.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${f==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:D,unassignedTasks:z}=ae(tt);return(0,Bo.jsxs)(Bo.Fragment,{children:[Object.entries(D).map(([he,rt])=>{let xe=J(he);if(!xe)return null;let _e=d.has(he);return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>ra(he),children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${xe.color}`}),(0,Bo.jsx)("span",{className:"font-medium text-muted-foreground",children:xe.name}),(0,Bo.jsxs)("span",{className:"text-muted-foreground",children:["(",rt?.length,")"]}),(0,Bo.jsx)("div",{className:"ml-auto",children:_e?(0,Bo.jsx)(ng.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Bo.jsx)(ng.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!_e&&(0,Bo.jsx)("div",{className:"space-y-2 pl-2",children:rt.map(ut=>(0,Bo.jsx)(X,{task:ut},ut.id))})]},he)}),z?.length>0&&(()=>{let he=d.has("Bo-epic");return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>ra("Bo-epic"),children:[(0,Bo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Bo.jsx)("span",{className:"font-medium text-muted-foreground",children:"Ol Epic"}),(0,Bo.jsxs)("span",{className:"text-muted-foreground",children:["(",z?.length,")"]}),(0,Bo.jsx)("div",{className:"ml-auto",children:he?(0,Bo.jsx)(ng.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Bo.jsx)(ng.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!he&&(0,Bo.jsx)("div",{className:"space-y-2 pl-2",children:z?.map(rt=>(0,Bo.jsx)(X,{task:rt},rt.id))})]})})(),tt?.length===0&&(0,Bo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),tt?.length>0&&Object.keys(D).length===0&&z.length===0&&(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),tt?.map(he=>(0,Bo.jsx)(X,{task:he},he.id))]})]})})()})]})}),ke.map(D=>{let z=e.filter(rt=>ga(rt?.sprint)===D.id),he=z.reduce((rt,xe)=>rt+(xe?.storyPoints||0),0);return(0,Bo.jsxs)(H,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-Bo transition-shadow duration-200 flex flex-col",onDragOver:xs,onDragEnter:()=>Nr(D.id.toString()),onDragLeave:ws,onDrop:rt=>Ns(rt,D.id.toString()),style:{height:x>0?`calc(100vh - ${x+200}px)`:"calc(100vh - 16rem)"},children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Bo.jsx)("div",{children:(0,Bo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:D.name})}),(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsxs)(Y,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[z?.length," tasks"]}),(0,Bo.jsxs)(Y,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[he," pts"]}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>{O(!0),jt(D)},className:"h-6 px-2",children:(0,Bo.jsx)(ng.Edit2,{className:"h-3 w-3"})}),(0,Bo.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>i(D.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Bo.jsx)(ng.Trash2,{className:"h-3 w-3"})})]})]}),(0,Bo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:rt,unassignedTasks:xe}=ae(z);return(0,Bo.jsxs)(Bo.Fragment,{children:[Object.entries(rt).map(([_e,ut])=>{let Cs=J(_e);if(!Cs)return null;let Cr=d.has(_e);return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>ra(_e),children:[(0,Bo.jsx)("div",{className:`w-3 h-3 rounded-full ${Cs.color}`}),(0,Bo.jsx)("span",{className:"font-medium text-muted-foreground",children:Cs.name}),(0,Bo.jsxs)("span",{className:"text-muted-foreground",children:["(",ut?.length,")"]}),(0,Bo.jsx)("div",{className:"ml-auto",children:Cr?(0,Bo.jsx)(ng.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Bo.jsx)(ng.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Cr&&(0,Bo.jsx)("div",{className:"space-y-2 pl-2",children:ut?.map(Zs=>(0,Bo.jsx)(X,{task:Zs},Zs.id))})]},_e)}),xe?.length>0&&(()=>{let _e=d.has("Bo-epic");return(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>ra("Bo-epic"),children:[(0,Bo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Bo.jsx)("span",{className:"font-medium text-muted-foreground",children:"Ol Epic"}),(0,Bo.jsxs)("span",{className:"text-muted-foreground",children:["(",xe?.length,")"]}),(0,Bo.jsx)("div",{className:"ml-auto",children:_e?(0,Bo.jsx)(ng.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Bo.jsx)(ng.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!_e&&(0,Bo.jsx)("div",{className:"space-y-2 pl-2",children:xe?.map(ut=>(0,Bo.jsx)(X,{task:ut},ut.id))})]})})(),z?.length===0&&(0,Bo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},D.id)})]}),(0,Bo.jsx)(kh,{isOpen:b,onClose:()=>g(!1),onAddSprint:K})]})})]})};var yw=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),xw=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},wu=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,s]=t.split(":");o.setHours(parseInt(r),parseInt(s))}return o<a},Nu=e=>{let t=new Date;return e.toDateString()===t.toDateString()},ww=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Nw=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,s]=(0,Ol.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,i]=(0,Ol.useState)(!1),l=d=>{if(d.preventDefault(),!e.find(v=>v?.id.toString()===r.colleagueId.toString())){console.error("Ol valid colleague selected"),i(!0);return}i(!1);let u={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(u),o(!1),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,Ol.useEffect)(()=>{r.colleagueId&&i(!1)},[r.colleagueId]);let c=e.filter(Boolean);return(0,Bo.jsx)(st,{open:a,onOpenChange:o,children:(0,Bo.jsxs)(lt,{className:"max-w-2xl",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Add New Reminder"})}),(0,Bo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,Bo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"title",children:"Title"}),(0,Bo.jsx)(G,{id:"title",value:r.title,onChange:d=>s({...r,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"description",value:r.description,onChange:d=>s({...r,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"dueDate",children:"Due Date"}),(0,Bo.jsx)(G,{id:"dueDate",type:"date",value:r.dueDate,onChange:d=>s({...r,dueDate:d.target.value}),required:!0})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Bo.jsx)(G,{id:"dueTime",type:"time",value:r.dueTime,onChange:d=>s({...r,dueTime:d.target.value})})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Bo.jsxs)(at,{value:r.colleagueId,onValueChange:d=>{s({...r,colleagueId:d})},required:!0,children:[(0,Bo.jsx)(Ye,{className:`${n?"text-destructive border-red-500":""}`,children:(0,Bo.jsx)(vt,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Bo.jsx)(Ze,{children:c.map(d=>(0,Bo.jsx)(ve,{value:d.id.toString(),children:d.name},d.id))})]}),n&&(0,Bo.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:d=>s({...r,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Bo.jsx)(T,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Bo.jsxs)(at,{value:r.recurrencePattern,onValueChange:d=>s({...r,recurrencePattern:d}),children:[(0,Bo.jsx)(Ye,{children:(0,Bo.jsx)(vt,{})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsx)(ve,{value:"daily",children:"Daily"}),(0,Bo.jsx)(ve,{value:"weekly",children:"Weekly"}),(0,Bo.jsx)(ve,{value:"monthly",children:"Monthly"}),(0,Bo.jsx)(ve,{value:"yearly",children:"Yearly"})]})]})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Bo.jsx)(G,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:d=>s({...r,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",children:"Add Reminder"})]})]})]})})},Cw=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[s,n]=(0,Ol.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),i=c=>{c.preventDefault(),a(e.id.toString(),{title:s.title,description:s.description,dueDate:new Date(s.dueDate||"").toISOString(),dueTime:s.dueTime||void 0,isRecurring:s.isRecurring}),r()},l=t.filter(Boolean);return(0,Bo.jsx)(st,{open:o,onOpenChange:r,children:(0,Bo.jsxs)(lt,{className:"max-w-2xl",children:[(0,Bo.jsx)(gt,{children:(0,Bo.jsx)(ft,{children:"Edit Reminder"})}),(0,Bo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Bo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"edit-title",children:"Title"}),(0,Bo.jsx)(G,{id:"edit-title",value:s.title,onChange:c=>n({...s,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"edit-description",children:"Description"}),(0,Bo.jsx)(Qe,{id:"edit-description",value:s.description||"",onChange:c=>n({...s,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Bo.jsx)(G,{id:"edit-dueDate",type:"date",value:s.dueDate,onChange:c=>n({...s,dueDate:c.target.value}),required:!0})]}),(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)(T,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Bo.jsx)(G,{id:"edit-dueTime",type:"time",value:s.dueTime,onChange:c=>n({...s,dueTime:c.target.value})})]})]}),(0,Bo.jsx)("div",{className:"space-y-2",children:(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:s.isRecurring||!1,onChange:c=>n({...s,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,Bo.jsx)(T,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Bo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Bo.jsx)(y,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,Bo.jsx)(y,{type:"submit",children:"Save Changes"})]})]})]})})},kw=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,s]=(0,Ol.useState)(!1);if(!e||!e.id)return null;let n=wu(new Date(e.dueDate||""),e.dueTime||""),i=Nu(new Date(e.dueDate||"")),l=ww(new Date(e.dueDate||"")),c=()=>{a(e.id.toString(),{})},d=()=>i?"Today":l?"Tomorrow":yw(new Date(e.dueDate||""));return(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(Cw,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>s(!1)}),(0,Bo.jsx)(H,{children:(0,Bo.jsx)(Q,{className:"p-4",children:(0,Bo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Bo.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Bo.jsx)("button",{onClick:c,className:"Bo-1 text-primary hover:text-primary/80"}),(0,Bo.jsxs)("div",{className:"flex-1",children:[(0,Bo.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,Bo.jsx)("h3",{children:e.title})}),(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Bo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Bo.jsx)(ng.Calendar,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{className:n?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,Bo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Bo.jsx)(ng.Clock,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:xw(e.dueTime)})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Bo.jsx)(ng.User,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>s(!0),className:"h-8 w-8 p-0",children:(0,Bo.jsx)(ng.Edit2,{className:"h-4 w-4"})}),(0,Bo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,Bo.jsx)(ng.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Cu=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[s,n]=(0,Ol.useState)(e.filter(Boolean)),[i,l]=(0,Ol.useState)(t.filter(Boolean)),[c,d]=(0,Ol.useState)("all"),[m,u]=(0,Ol.useState)(""),[v,b]=(0,Ol.useState)(!1);(0,Ol.useEffect)(()=>{n(e.filter(Boolean))},[e]),(0,Ol.useEffect)(()=>{l(t.filter(Boolean))},[t]);let g=C=>{if(!C.title){console.error("Invalid reminder data:",C);return}let M={...C,id:Date.now(),createdAt:new Date().toISOString()};n(P=>[...P,M]),a?.(C)},f=(C,M)=>{if(!C){console.error("Ol reminder ID provided for update");return}n(P=>P.map(U=>U?.id.toString()===C?{...U,...M}:U)),o?.(C,M)},w=C=>{if(!C){console.error("Ol reminder ID provided for deletion");return}n(M=>M.filter(P=>P?.id.toString()!==C)),r?.(C)},h=s.filter(C=>{if(!C)return!1;if(m){let M=m.toLowerCase();if(!(C.title.toLowerCase().includes(M)||C.description?.toLowerCase().includes(M)))return!1}switch(c){case"pending":case"completed":case"overdue":return wu(new Date(C.dueDate||""),C.dueTime||"");case"today":return Nu(new Date(C.dueDate||""));default:return!0}}).sort((C,M)=>{if(!C||!M)return 0;let P={high:3,medium:2,low:1},U=0;return U!==0?U:new Date(C.dueDate||"").getTime()-new Date(M.dueDate||"").getTime()}),S={total:s.filter(Boolean).length,overdue:s.filter(C=>C&&wu(new Date(C.dueDate||""),C.dueTime||"")).length,today:s.filter(C=>C&&Nu(new Date(C.dueDate||""))).length},A=i.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,Bo.jsxs)("div",{className:"px-2 Bo:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wt,{title:"Task Reminders",description:"Manage reminders and stay Ol top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,Bo.jsxs)("div",{className:"h-full bg-background",children:[(0,Bo.jsx)(Nw,{colleagues:i,onAddReminder:g,open:v,setOpen:b}),(0,Bo.jsxs)("div",{className:"p-6",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Bo.jsxs)("div",{children:[(0,Bo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Bo.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Bo.jsxs)(y,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,Bo.jsx)(ng.Plus,{className:"h-4 w-4"}),(0,Bo.jsx)("span",{children:"Add Reminder"})]})]}),(0,Bo.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-foreground",children:S.total}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-primary",children:S.overdue}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-success",children:S.today}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-destructive",children:S.overdue}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Bo.jsxs)(H,{className:"p-4",children:[(0,Bo.jsx)("div",{className:"text-2xl font-bold text-warning",children:S.today}),(0,Bo.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Bo.jsx)("div",{className:"flex-1",children:(0,Bo.jsx)(G,{placeholder:"Search reminders...",value:m,onChange:C=>u(C.target.value),className:"max-w-Bo"})}),(0,Bo.jsxs)(at,{value:c,onValueChange:C=>d(C),children:[(0,Bo.jsx)(Ye,{className:"w-40",children:(0,Bo.jsx)(vt,{})}),(0,Bo.jsxs)(Ze,{children:[(0,Bo.jsxs)(ve,{value:"all",children:["All (",S.total,")"]}),(0,Bo.jsxs)(ve,{value:"overdue",children:["Overdue (",S.overdue,")"]}),(0,Bo.jsxs)(ve,{value:"overdue",children:["Overdue (",S.overdue,")"]}),(0,Bo.jsxs)(ve,{value:"today",children:["Today (",S.today,")"]})]})]})]}),(0,Bo.jsx)("div",{className:"space-y-4",children:h.length===0?(0,Bo.jsxs)(H,{className:"p-8 text-center",children:[(0,Bo.jsx)("div",{className:"text-muted-foreground",children:m||c!=="all"?"Ol reminders match your filters":"Ol reminders yet"}),!m&&c==="all"&&(0,Bo.jsx)("p",{className:"text-sm text-muted-foreground/60 Bo-2",children:"Create your first reminder to get started"})]}):h.map(C=>C&&(0,Bo.jsx)(kw,{reminder:C,colleagues:i,onUpdateReminder:f,onDeleteReminder:w},C.id))})]})]})]})};function ku({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:s=[],initialColleagues:n=[],initialUsers:i=[],initialFiles:l=[],initialView:c="kanban",onAddTask:d,onUpdateTask:m,onDeleteTask:u,onTaskClick:v,onAddEpic:b,onUpdateEpic:g,onDeleteEpic:f,onAddTaskToEpic:w,onAddSprint:I,onUpdateSprint:h,onDeleteSprint:S,onAddProject:A,onUpdateProject:C,onDeleteProject:M,onFileAdd:P,onFileEdit:U,onFileDelete:$,onFileClick:O,onAddReminder:x,onUpdateReminder:ue,onDeleteReminder:R,onViewChange:F,onToggleMobileMenu:J,onTeamClick:De,onTeamChange:St,onCopilotClick:Ot,handleAddComment:ae}){let[E,ke]=(0,Ol.useState)(t),[tt,Za]=(0,Ol.useState)(a),[it,ra]=(0,Ol.useState)(o),[K,jt]=(0,Ol.useState)(r),[uo,go]=(0,Ol.useState)(s),[Mo,xs]=(0,Ol.useState)(n),[Nr,ws]=(0,Ol.useState)(i),[Ns,X]=(0,Ol.useState)(l),[D,z]=(0,Ol.useState)(!1),[he,rt]=(0,Ol.useState)(!1),[xe,_e]=(0,Ol.useState)(null),[ut,Cs]=(0,Ol.useState)(null),[Cr,Zs]=(0,Ol.useState)(null),[Ur,Ai]=(0,Ol.useState)(c||"kanban"),[Dw,Ah]=(0,Ol.useState)(!1),Ih=(0,kf.useRouter)();(0,Ol.useEffect)(()=>{ke(t)},[t]),(0,Ol.useEffect)(()=>{ra(o)},[o]),(0,Ol.useEffect)(()=>{Za(a)},[a]),(0,Ol.useEffect)(()=>{jt(r)},[r]),(0,Ol.useEffect)(()=>{X(l)},[l]),(0,Ol.useEffect)(()=>{ws(i)},[i]),(0,Ol.useEffect)(()=>{xs(n)},[n]),(0,Ol.useEffect)(()=>{go(s)},[s]),(0,Ol.useEffect)(()=>{Ai(c)},[c]);let Mh=E.filter(V=>{}),Tw=V=>Mh.filter(fe=>fe.status===V),Pw=V=>{let fe={};return tt.forEach(Fe=>{}),fe},Rw=V=>{Zs(V)},Aw=V=>{Cr&&(ke(fe=>fe.map(Fe=>Fe.id===Cr.id?{...Fe,status:V}:Fe)),Zs(null))},Ru=V=>{let fe={...V,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};ke(Fe=>[...Fe,fe]),d?.(fe)},Bl=async(V,fe)=>(ke(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),await m?.(V,fe)),Iw=async(V,fe)=>{Bl(V,fe)},Au=V=>{ke(fe=>fe.filter(Fe=>Fe.id!==Number(V))),xe?.id===Number(V)&&_e(null),u?.(V)},Mw=async V=>{Au(V)},Bw=V=>{let fe={...V,id:Date.now()};jt(Fe=>[...Fe,fe]),A?.(V)},Lw=(V,fe)=>{jt(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),C?.(V,fe)},Ew=V=>{jt(fe=>fe.filter(Fe=>Fe.id!==Number(V))),M?.(V)},Iu=V=>{let fe={...V,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};Za(Fe=>[...Fe,fe]),b?.({...fe})},Bh=()=>{rt(!0)},Lh=(V,fe)=>{Za(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),g?.(V,fe)},Eh=V=>{Za(fe=>fe.filter(Fe=>Fe.id!==Number(V))),ke(fe=>fe.filter(Fe=>ga(Fe.epic)!==Number(V))),f?.(V)},Fh=V=>{let fe={...V,id:Date.now()};ra(Fe=>[...Fe,fe]),I?.(V)},zh=(V,fe)=>{ra(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),h?.(V,fe)},Hh=V=>{V==="backlog"||V==="all-tasks"||(ra(fe=>fe.filter(Fe=>Fe.id!==Number(V))),ke(fe=>fe.map(Fe=>ga(Fe.sprint)===Number(V)?{...Fe,sprint:void 0}:Fe)),S?.(V))},Hc=V=>{_e(V)},Oh=V=>{V==="planning"&&window.innerWidth<768||(Ai(V),F?.(V))},Fw=()=>{Ah(V=>!V),J?.()},zw=()=>{Ih.push("/")},Hw=V=>{console.log("Switching to team:",V)},Ow=V=>{console.log("Switching to team:",V)},jh=V=>{z(!0)},Uh=()=>{z(!1),Cs(null)},Vh=V=>{let fe={...V,id:Date.now(),createdAt:new Date().toISOString()};go(Fe=>[...Fe,fe]),x?.(V)},$h=(V,fe)=>{go(Fe=>Fe.map(Pa=>Pa.id===Number(V)?{...Pa,...fe}:Pa)),ue?.(V,fe)},Kh=V=>{go(fe=>fe.filter(Fe=>Fe.id!==Number(V))),R?.(V)},Gh=()=>{P?.()},_h=V=>{U?.(V)},Wh=V=>{X(fe=>fe.filter(Fe=>Fe.name!==V)),$?.(V)},Xh=V=>{O?.(V)},jw=[{id:"todo",title:"ng Bo",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Uw=()=>{switch(Ur){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},Oc=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Vw=Oc.sort((V,fe)=>fe.lastUsed.getTime()-V.lastUsed.getTime()).slice(0,3),$w=Oc.length>3,Kw=Oc.slice(3);return(0,Bo.jsxs)(bh,{currentView:Ur,onViewChange:Oh,children:[Ur==="kanban"&&(0,Bo.jsx)("div",{className:"h-full overflow-hidden",children:(0,Bo.jsx)(bu,{initialProjects:K,initialEpics:tt,initialSprints:it.map(V=>({...V,isSelected:!1})),initialTasks:E,initialColleagues:Mo,initialUsers:Nr,onAddTask:Ru,onUpdateTask:Bl,onDeleteTask:Au,onTaskClick:Hc,onAddEpic:Iu,onAddComment:ae})}),Ur==="planning"&&(0,Bo.jsx)("div",{className:"hidden Bo:block h-full",children:(0,Bo.jsx)(Ec,{tasks:E,epics:tt,sprints:it,onUpdateTask:Bl,onTaskClick:Hc,onAddSprint:Fh,onUpdateSprint:zh,onDeleteSprint:Hh})}),Ur==="tasks"&&(0,Bo.jsx)("div",{className:"h-full",children:(0,Bo.jsx)(Cu,{initialReminders:uo,initialColleagues:Mo,onAddReminder:Vh,onUpdateReminder:$h,onDeleteReminder:Kh})}),Ur==="files"&&(0,Bo.jsx)("div",{className:"h-full",children:(0,Bo.jsx)(Al,{initialFiles:Ns,onFileAdd:Gh,onFileEdit:_h,onFileDelete:Wh,onFileClick:Xh,compactView:!1})}),Ur==="epics"&&(0,Bo.jsx)("div",{className:"h-full",children:(0,Bo.jsx)(hu,{tasks:E,epics:tt,sprints:it,onUpdateTask:Bl,onTaskClick:Hc,onAddTaskToEpic:jh,onAddEpic:Bh,onUpdateEpic:Lh,onDeleteEpic:Eh})}),(0,Bo.jsx)(wn,{isOpen:D,onClose:Uh,onAddTask:Ru,epics:tt,sprints:it,assignees:[...Mo,...Nr],defaultEpicId:ut||void 0}),(0,Bo.jsx)(Cn,{isOpen:he,onClose:()=>rt(!1),onAddEpic:Iu})]})}var Dh=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[s,n]=(0,Ol.useState)({name:o?.name||"",description:o?.description||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[i,l]=(0,Ol.useState)({}),c=()=>{let u={};return s.name.trim()?s.name.trim().length<3&&(u.name="Project name must Bo at least 3 characters"):u.name="Project name Bo required",s.objectives.trim()?s.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (at least 10 characters)"):u.objectives="Project objectives are required",s.workInstructions.trim()?s.workInstructions.trim().length<20&&(u.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):u.workInstructions="Work instructions are required",l(u),Object.keys(u).length===0},d=async u=>{if(u.preventDefault(),!!c())try{await e(s)}catch(v){console.error("Error submitting project form:",v)}},m=(u,v)=>{n(b=>({...b,[u]:v})),i[u]&&l(b=>({...b,[u]:void 0}))};return(0,Bo.jsxs)("div",{className:`w-full max-w-2xl ${r}`,children:[(0,Bo.jsxs)("div",{className:"mb-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,Bo.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),(0,Bo.jsxs)("form",{onSubmit:d,children:[(0,Bo.jsxs)("div",{className:"space-y-6",children:[(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,Bo.jsx)(G,{id:"name",type:"text",placeholder:"Enter project name",value:s.name,onChange:u=>m("name",u.target.value),className:i.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.name&&(0,Bo.jsx)("p",{className:"text-sm text-red-600",children:i.name})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"name",className:"text-sm font-medium",children:"Project Description *"}),(0,Bo.jsx)(G,{id:"description",type:"text",placeholder:"Enter project description",value:s.description,onChange:u=>m("description",u.target.value),className:i.description?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.description&&(0,Bo.jsx)("p",{className:"text-sm text-red-600",children:i.description})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,Bo.jsx)(Qe,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:s.objectives,onChange:u=>m("objectives",u.target.value),className:`min-h-[100px] resize-y ${i.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,Bo.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,Bo.jsx)("span",{children:i.objectives&&(0,Bo.jsx)("span",{className:"text-red-600",children:i.objectives})}),(0,Bo.jsxs)("span",{children:[s.objectives.length,"/1000"]})]})]}),(0,Bo.jsxs)("div",{className:"space-y-2",children:[(0,Bo.jsx)(T,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,Bo.jsx)(Qe,{id:"workInstructions",placeholder:"Provide detailed instructions Ol how the work should Bo carried out, including processes, standards, and expectations...",value:s.workInstructions,onChange:u=>m("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${i.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,Bo.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,Bo.jsx)("span",{children:i.workInstructions&&(0,Bo.jsx)("span",{className:"text-red-600",children:i.workInstructions})}),(0,Bo.jsxs)("span",{children:[s.workInstructions.length,"/2000"]})]})]}),(0,Bo.jsxs)("div",{className:"space-y-3",children:[(0,Bo.jsx)(T,{className:"text-sm font-medium",children:"Project Management"}),(0,Bo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Bo.jsx)(Ha,{id:"plan",checked:s.plan,onCheckedChange:u=>m("plan",u===!0),disabled:a}),(0,Bo.jsx)(T,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,Bo.jsx)("p",{className:"text-xs text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),(0,Bo.jsxs)("div",{className:"flex justify-end gap-3",children:[t&&(0,Bo.jsxs)(y,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Bo.jsx)(y,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(ng.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(ng.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function Tu({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,s]=(0,Ol.useState)(!1),[n,i]=(0,Ol.useState)(!1),l=async d=>{i(!0);try{await t(d),s(!1)}catch(m){console.error("Error creating project:",m)}finally{i(!1)}},c=()=>{s(!0)};return(0,Bo.jsxs)("div",{className:"px-2 Bo:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsx)(Wt,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,Bo.jsxs)("section",{className:"space-y-4 Bo-8",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-3 Bo:grid-cols-2 lg:grid-cols-3",children:e.map(d=>(0,Bo.jsx)(fn,{project:d,onOpen:a,onShare:o},d.id))})]})]},"projects-index-view")}),(0,Bo.jsx)(st,{open:r,onOpenChange:s,children:(0,Bo.jsxs)(lt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Bo.jsxs)(gt,{className:"sr-only",children:[(0,Bo.jsx)(ft,{children:"Create New Project"}),(0,Bo.jsx)(ni,{children:"Fill out the form below to create a new project."})]}),(0,Bo.jsx)(Dh,{onSubmit:l,onCancel:()=>s(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function Ph({team:e,onOpen:t,className:a}){return(0,Bo.jsx)(Wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,Bo.jsxs)(H,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Bo.jsxs)(we,{children:[(0,Bo.jsx)(Te,{className:"text-lg",children:e.name}),(0,Bo.jsx)(Pr,{className:"Bo-1 text-sm",children:e.description})]}),(0,Bo.jsxs)(Q,{className:"space-y-4",children:[(0,Bo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.Users,{className:"h-4 w-4 text-blue-500"}),(0,Bo.jsx)("span",{children:"Human"})]}),(0,Bo.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.Bot,{className:"h-4 w-4 text-purple-500"}),(0,Bo.jsx)("span",{children:"Digital"})]}),(0,Bo.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Bo.jsxs)("div",{className:"flex items-center justify-between text-sm border-t ng-4",children:[(0,Bo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bo.jsx)(ng.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,Bo.jsx)("span",{children:"Projects"})]}),(0,Bo.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Bo.jsx)(Oo,{className:"flex gap-2",children:(0,Bo.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function Pu({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,Ol.useState)(!1),s=()=>{r(!0)},n=async c=>{await t?.(c),r(!1)},i=()=>{r(!1)},l=c=>{a?.(c)};return(0,Bo.jsxs)("div",{className:"px-2 Bo:px-4 py-4 space-y-8",children:[(0,Bo.jsx)(Wi.AnimatePresence,{mode:"wait",children:(0,Bo.jsxs)(Wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Bo.jsx)(Wt,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:s}}),(0,Bo.jsxs)("section",{className:"space-y-4 Bo-8",children:[(0,Bo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Bo.jsxs)("div",{className:"text-center py-12",children:[(0,Bo.jsx)("p",{className:"text-muted-foreground text-lg",children:"You'Bo not part of any teams yet."}),(0,Bo.jsx)("p",{className:"text-muted-foreground text-sm Bo-2",children:"Create a new team or ask to Bo added to Ol existing one."})]}):(0,Bo.jsx)("div",{className:"grid grid-cols-1 gap-4 Bo:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,Bo.jsx)(Ph,{team:c,onOpen:l},c.id))})]})]},"teams-index-view")}),(0,Bo.jsx)(st,{open:o,onOpenChange:r,children:(0,Bo.jsxs)(lt,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[(0,Bo.jsx)("div",{className:"sr-only",children:(0,Bo.jsxs)(gt,{children:[(0,Bo.jsx)(ft,{children:"Create New Team"}),(0,Bo.jsx)(ni,{children:"Set up a new team to collaborate with colleagues Ol projects."})]})}),(0,Bo.jsx)(yc,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:i})]})})]})}0&&(module.exports={Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,ApprovalRequestModal,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMCogeBoard,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,CapabilityMenu,Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle,Categories,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,CommentSection,Container,ContentBlock,ContentCard,CopilotInterface,CopyButton,CustomLink,CustomerCard,DCProjectCard,DarkTop,DashboardHeader,DashboardHero,DashboardPage,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EpicsView,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,FileView,Filter,FlowPrintable,Footer,FoundaryLayout,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanBoardView,KanbanColumn,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,Label,LightTop,Logo,LowImpactHero,MOTD,MainPage,ManagementSidebar,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,NotificationsPanel,OAuthModal,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadCard,PayloadPagination,PlanningView,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProjectView,ProjectsIndexView,ProposalSummary,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SearchableSelect,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,Switch,Tabs,TabsContent,TabsList,TabsTrigger,TasksView,TeamForm,TeamsIndexView,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,testCapabilities,toggleVariants,useIsMobile,useSidebar,useToast});