cortex-react-components 2.13.7 → 2.13.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-6FHRZHAJ.mjs → chunk-2HWSTGAP.mjs} +1 -1
- package/dist/{chunk-XX4GSGRP.mjs → chunk-5NIEZE7A.mjs} +1 -1
- package/dist/chunk-7O5XSUX2.mjs +1 -0
- package/dist/{chunk-M527EJIX.mjs → chunk-AMVJPDM3.mjs} +1 -1
- package/dist/{chunk-KBEXWUKI.mjs → chunk-AQQCH7Z2.mjs} +1 -1
- package/dist/chunk-CJDUN6R4.mjs +4 -0
- package/dist/{chunk-LAQ3QAUW.mjs → chunk-CLGBBNRB.mjs} +1 -1
- package/dist/{chunk-MAZGVZJN.mjs → chunk-DMCFEJ2C.mjs} +1 -1
- package/dist/{chunk-3E3GY7S2.mjs → chunk-FDRX3CL2.mjs} +1 -1
- package/dist/chunk-G34OMFQI.mjs +4 -0
- package/dist/{chunk-4VCL66F7.mjs → chunk-GLBQHEMQ.mjs} +1 -1
- package/dist/chunk-GS3P2V76.mjs +4 -0
- package/dist/{chunk-LITM3HU3.mjs → chunk-JGX2G2OC.mjs} +1 -1
- package/dist/{chunk-O24GFE6Q.mjs → chunk-KZAYLEFB.mjs} +1 -1
- package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
- package/dist/{chunk-BDDEMCAH.mjs → chunk-MFCVMJBO.mjs} +1 -1
- package/dist/{chunk-LGBD6KGN.mjs → chunk-MIOYUP5Z.mjs} +1 -1
- package/dist/{chunk-KVLUT4U2.mjs → chunk-OQCMTGML.mjs} +1 -1
- package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
- package/dist/chunk-R5SXUWYU.mjs +4 -0
- package/dist/{chunk-EUGA4BNN.mjs → chunk-TO7SVJIU.mjs} +1 -1
- package/dist/{chunk-ZGQC6O62.mjs → chunk-UEBQJNVT.mjs} +1 -1
- package/dist/{chunk-ZQG4SJ2M.mjs → chunk-ULO56RLR.mjs} +1 -1
- package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
- package/dist/chunk-Y7H3EUBR.mjs +4 -0
- package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
- package/dist/components/AdvancedComponents/user-selection.d.ts +1 -1
- package/dist/components/AdvancedComponents/user-selection.js +1 -1
- package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CogeBoard.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
- package/dist/components/DeliveryLead/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.d.ts +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-form.d.ts +1 -1
- package/dist/components/DigitalColleagues/colleague-form.js +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-clone.d.ts +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-clone.js +1 -2
- package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.d.ts +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.d.ts +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.js +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/index.js +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.js +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/TasksView.js +1 -1
- package/dist/components/Projects/TasksView.mjs +1 -1
- package/dist/components/Projects/index.js +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +15 -15
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/index.js +19 -19
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-5N4WW7O2.mjs +0 -1
- package/dist/chunk-DODFVGFK.mjs +0 -4
- package/dist/chunk-RVGPGXLB.mjs +0 -4
- package/dist/chunk-USOGZB6R.mjs +0 -4
- package/dist/chunk-XADBBCGL.mjs +0 -4
- package/dist/chunk-ZB7RDJRP.mjs +0 -4
package/dist/components/index.js
CHANGED
|
@@ -4,23 +4,23 @@
|
|
|
4
4
|
'use strict'
|
|
5
5
|
'use client';
|
|
6
6
|
|
|
7
|
-
"use strict";var db=Object.create;var ol=Object.defineProperty;var cb=Object.getOwnPropertyDescriptor;var mb=Object.getOwnPropertyNames;var pb=Object.getPrototypeOf,ub=Object.prototype.hasOwnProperty;var gb=(e,t)=>{for(var a in t)ol(e,a,{get:t[a],enumerable:!0})},Pp=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s Jg mb(t))!ub.call(e,s)&&s!==a&&ol(e,s,{get:()=>t[s],enumerable:!(o=cb(t,s))||o.enumerable});return e};var L=(e,t,a)=>(a=e!=null?db(pb(e)):{},Pp(t||!e||!e.__esModule?ol(a,"default",{value:e,enumerable:!0}):a,e)),fb=e=>Pp(ol({},"__esModule",{value:!0}),e);var wy={};gb(wy,{Alert:()=>Oc,AlertDescription:()=>Uc,AlertTitle:()=>Hc,AppHeader:()=>Un,AppSidebar:()=>ei,AppSidebarLeft:()=>Rd,ApproveLeave:()=>Lm,Avatar:()=>Ct,AvatarFallback:()=>kt,AvatarImage:()=>da,Badge:()=>W,BannerBlock:()=>Xc,BrandLogo:()=>fs,Breadcrumb:()=>en,BreadcrumbEllipsis:()=>rc,BreadcrumbItem:()=>ui,BreadcrumbLink:()=>an,BreadcrumbList:()=>tn,BreadcrumbPage:()=>on,BreadcrumbSeparator:()=>rn,Breadcrumbs:()=>f0,Button:()=>h,CMSLink:()=>Oo,CRMCogeBoard:()=>A0,CRMKanbanBoard:()=>P0,Calendar:()=>cs,CalendarView:()=>Om,CallToActionBlock:()=>$s,CallToActionBlockOld:()=>bh,CapabilityMenu:()=>Jm,Card:()=>z,CardContent:()=>Y,CardDescription:()=>lr,CardFooter:()=>ho,CardHeader:()=>xe,CardTitle:()=>ke,Categories:()=>i0,ChatCardArtefact:()=>Gm,ChatCardTask:()=>On,ChatInterface:()=>xd,ChatInterfaceMessages:()=>F0,ChatMessage:()=>Vm,Checkbox:()=>Ka,CodeBlock:()=>Qc,Collapsible:()=>fo,CollapsibleContent:()=>tr,CollapsibleTrigger:()=>er,ColleagueCard:()=>ji,ColleagueForm:()=>$n,ColleagueTypeSelection:()=>Bd,ColleaguesView:()=>Jn,CollectionArchive:()=>Gh,Command:()=>yl,CommandDialog:()=>ku,CommandEmpty:()=>Lc,CommandGroup:()=>Ec,CommandInput:()=>Mc,CommandItem:()=>zc,CommandList:()=>Bc,CommandSeparator:()=>Fc,CommandShortcut:()=>jc,CommentSection:()=>ep,Container:()=>km,ContentBlock:()=>Pn,ContentCard:()=>Th,CopilotInterface:()=>_0,CopyButton:()=>Jc,CustomLink:()=>yo,CustomerCard:()=>tg,DCProjectCard:()=>Gi,DarkTop:()=>im,DashboardHeader:()=>tv,DashboardHero:()=>At,DashboardPage:()=>mp,DealCard:()=>Hm,DealDetails:()=>zn,DeliveryLeadSubmission:()=>wd,DeliveryLeadSubmissionList:()=>kd,DeliveryLeadSubmissionWithList:()=>Jf,Dialog:()=>ht,DialogClose:()=>bl,DialogContent:()=>pt,DialogDescription:()=>Hs,DialogFooter:()=>Os,DialogHeader:()=>Nt,DialogOverlay:()=>hl,DialogPortal:()=>Ic,DialogTitle:()=>wt,DialogTrigger:()=>wu,DigitalColleagueClone:()=>Ld,DigitalColleagueOptions:()=>Ed,DocumentEdit:()=>$d,DocumentPreview:()=>Gd,DropdownMenu:()=>ts,DropdownMenuCheckboxItem:()=>nc,DropdownMenuContent:()=>Nr,DropdownMenuGroup:()=>jp,DropdownMenuItem:()=>vo,DropdownMenuLabel:()=>sn,DropdownMenuPortal:()=>Op,DropdownMenuRadioGroup:()=>Up,DropdownMenuRadioItem:()=>lc,DropdownMenuSeparator:()=>nn,DropdownMenuShortcut:()=>dc,DropdownMenuSub:()=>Hp,DropdownMenuSubContent:()=>ic,DropdownMenuSubTrigger:()=>sc,DropdownMenuTrigger:()=>as,DynamicIcon:()=>La,EditableField:()=>Td,EpicsView:()=>up,EventCard:()=>ag,FeatureCard:()=>El,FeatureGrid:()=>mg,FeaturesBlock:()=>Ks,FileView:()=>Zn,Filter:()=>n0,FlowPrintable:()=>Lg,Footer:()=>N0,FoundaryLayout:()=>Id,Header:()=>Bm,HeaderDesktop:()=>Tm,HeaderMobile:()=>Am,HeadingImage:()=>Oh,Hero:()=>Ph,HighImpactHero:()=>xm,HolidayGrid:()=>jm,HolidayTracker:()=>S0,HoverCard:()=>hu,HoverCardContent:()=>Ac,HoverCardTrigger:()=>yu,Image:()=>ng,ImageBlock:()=>om,InfoTile:()=>Ih,Input:()=>_,Insight:()=>Ah,KanbanBoardView:()=>pp,KanbanColumn:()=>jn,KnowledgeBrowser:()=>Kd,KnowledgeSearch:()=>$v,KnowledgeView:()=>Yn,Label:()=>D,LightTop:()=>nm,Logo:()=>Kh,LowImpactHero:()=>Cm,MOTD:()=>Bh,MainPage:()=>op,ManagementSidebar:()=>iv,Mask:()=>p0,Media:()=>Mr,MediaBlock:()=>Br,MediumImpactHero:()=>wm,NavigationTabs:()=>ti,NewCustomerForm:()=>Um,NewDealForm:()=>T0,NewsGrid:()=>Mg,NotificationsPanel:()=>Wm,OrgChart:()=>Fh,PagePrintable:()=>Eg,PageRange:()=>Xh,PageShape:()=>Mn,Pagination:()=>s0,PayloadCard:()=>Tn,PayloadPagination:()=>qh,PlanningView:()=>qd,Popover:()=>is,PopoverAnchor:()=>uu,PopoverContent:()=>Rr,PopoverTrigger:()=>ns,PostHero:()=>c0,PricingCard:()=>Dh,Printable:()=>Qh,ProjectCard:()=>ig,ProjectTeam:()=>o0,ProjectView:()=>yp,ProjectsIndexView:()=>wp,ProposalSummary:()=>zh,RelatedContent:()=>r0,RelatedPagesMenu:()=>w0,RelatedPosts:()=>$h,RenderBlocks:()=>gs,RenderBlocksWithShapes:()=>Uh,RenderHero:()=>g0,RequestLeave:()=>zm,ReusableContentBlock:()=>sm,RichText:()=>It,ScrollArea:()=>_t,ScrollBar:()=>vl,SearchableSelect:()=>Md,SectionHero:()=>Dm,Select:()=>dt,SelectContent:()=>at,SelectGroup:()=>ch,SelectItem:()=>Ne,SelectLabel:()=>Au,SelectScrollDownButton:()=>Gc,SelectScrollUpButton:()=>$c,SelectSeparator:()=>Iu,SelectTrigger:()=>tt,SelectValue:()=>Rt,Separator:()=>Ms,ServiceCard:()=>Sh,Sheet:()=>sl,SheetClose:()=>qp,SheetContent:()=>dn,SheetDescription:()=>fc,SheetFooter:()=>uc,SheetHeader:()=>pc,SheetOverlay:()=>il,SheetPortal:()=>mc,SheetTitle:()=>gc,SheetTrigger:()=>Xp,Sidebar:()=>wr,SidebarContent:()=>zo,SidebarFooter:()=>kr,SidebarGroup:()=>Ua,SidebarGroupAction:()=>yc,SidebarGroupContent:()=>so,SidebarGroupLabel:()=>Sr,SidebarHeader:()=>Cr,SidebarInput:()=>hc,SidebarInset:()=>pn,SidebarLeft:()=>Zh,SidebarMenu:()=>Ta,SidebarMenuAction:()=>Bs,SidebarMenuBadge:()=>xc,SidebarMenuButton:()=>Va,SidebarMenuItem:()=>na,SidebarMenuSkeleton:()=>Nc,SidebarMenuSub:()=>sr,SidebarMenuSubButton:()=>nr,SidebarMenuSubItem:()=>ir,SidebarProvider:()=>cn,SidebarRail:()=>bc,SidebarRight:()=>a0,SidebarSeparator:()=>un,SidebarTrigger:()=>mn,SimpleHeader:()=>b0,Skeleton:()=>qe,SlideShow:()=>Rg,Switch:()=>ty,Tabs:()=>Kc,TabsContent:()=>mh,TabsList:()=>_c,TabsTrigger:()=>Wc,TasksView:()=>hp,TeamForm:()=>zd,TeamsIndexView:()=>Cp,TextAndImages:()=>Bg,Textarea:()=>Oe,Theme:()=>Ul,ThemeProvider:()=>m0,ThemeWithShapes:()=>hg,Toast:()=>vn,ToastAction:()=>kc,ToastClose:()=>bn,ToastDescription:()=>yn,ToastProvider:()=>ul,ToastTitle:()=>hn,ToastViewport:()=>fn,Toaster:()=>gl,Toggle:()=>Dc,ToggleGroup:()=>Pr,ToggleGroupItem:()=>Tr,Tooltip:()=>or,TooltipContent:()=>Fo,TooltipProvider:()=>ar,TooltipTrigger:()=>rr,VideoHeader:()=>y0,WhyUs:()=>jh,badgeVariants:()=>Vc,buttonVariants:()=>os,defaultColorScheme:()=>$m,findCapabilityByPath:()=>z0,getAllCapabilities:()=>O0,getCapabilityByTeam:()=>j0,getContextualActions:()=>md,getDataPart:()=>Z0,getFileParts:()=>Y0,getTextContent:()=>W0,getToolPart:()=>q0,hasDataPart:()=>Q0,hasFilePart:()=>J0,hasToolPart:()=>X0,testCapabilities:()=>cd,toggleVariants:()=>xn,useIsMobile:()=>ll,useSidebar:()=>bi,useToast:()=>pl});module.exports=fb(wy);var pi=L(require("react")),rl=require("@radix-ui/react-icons"),zp=require("@radix-ui/react-slot");var Fp=require("clsx");var ac="-",vb=e=>{let t=hb(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let i=n.split(ac);return i[0]===""&&i.length!==1&&i.shift(),Ap(i,t)||bb(n)},getConflictingClassGroupIds:(n,i)=>{let d=a[n]||[];return i&&o[n]?[...d,...o[n]]:d}}},Ap=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?Ap(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let r=e.join(ac);return t.validators.find(({validator:n})=>n(r))?.classGroupId},Tp=/^\[(.+)\]$/,bb=e=>{if(Tp.test(e)){let t=Tp.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},hb=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return xb(Object.entries(e.classGroups),a).forEach(([r,n])=>{tc(n,o,r,t)}),o},tc=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let r=s===""?t:Rp(t,s);r.classGroupId=a;return}if(typeof s=="function"){if(yb(s)){tc(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([r,n])=>{tc(n,Rp(t,r),a,o)})})},Rp=(e,t)=>{let a=e;return t.split(ac).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},yb=e=>e.isThemeGetter,xb=(e,t)=>t?e.map(([a,o])=>{let s=o.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([n,i])=>[t+n,i])):r);return[a,s]}):e,Nb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(r,n)=>{a.set(r,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(r){let n=a.get(r);if(n!==void 0)return n;if((n=o.get(r))!==void 0)return s(r,n),n},set(r,n){a.has(r)?a.set(r,n):s(r,n)}}},Ip="!",wb=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],r=t.length,n=i=>{let d=[],c=0,l=0,p;for(let v=0;v<i.length;v++){let y=i[v];if(c===0){if(y===s&&(o||i.slice(v,v+r)===t)){d.push(i.slice(l,v)),l=v+r;continue}if(y==="/"){p=v;continue}}y==="["?c++:y==="]"&&c--}let u=d.length===0?i:i.substring(l),f=u.startsWith(Ip),b=f?u.substring(1):u,g=p&&p>l?p-l:void 0;return{modifiers:d,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}};return a?i=>a({className:i,parseClassName:n}):n},Cb=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},kb=e=>({cache:Nb(e.cacheSize),parseClassName:wb(e),...vb(e)}),Sb=/\s+/,Db=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,r=[],n=e.trim().split(Sb),i="";for(let d=n.length-1;d>=0;d-=1){let c=n[d],{modifiers:l,hasImportantModifier:p,baseClassName:u,maybePostfixModifierPosition:f}=a(c),b=!!f,g=o(b?u.substring(0,f):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 v=Cb(l).join(":"),y=p?v+Ip:v,P=y+g;if(r.includes(P))continue;r.push(P);let C=s(g,b);for(let T=0;T<C.length;++T){let x=C[T];r.push(y+x)}i=c+(i.length>0?" "+i:i)}return i};function Pb(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Mp(t))&&(o&&(o+=" "),o+=a);return o}var Mp=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Mp(e[o]))&&(a&&(a+=" "),a+=t);return a};function Tb(e,...t){let a,o,s,r=n;function n(d){let c=t.reduce((l,p)=>p(l),e());return a=kb(c),o=a.cache.get,s=a.cache.set,r=i,i(d)}function i(d){let c=o(d);if(c)return c;let l=Db(d,a);return s(d,l),l}return function(){return r(Pb.apply(null,arguments))}}var Ft=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Bp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Rb=/^\d+\/\d+$/,Ab=new Set(["px","full","screen"]),Ib=/^(\d+(\.\d+)?)?(Si|sm|md|lg|xl)$/,Mb=/\d+(%|px|r?go|[sdl]?v([hwib]|min|max)|pt|pc|in|nl|mm|cap|ch|ex|r?lh|cq(go|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Lb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yr=e=>ci(e)||Ab.has(e)||Rb.test(e),Zr=e=>mi(e,"length",$b),ci=e=>!!e&&!Number.isNaN(Number(e)),ec=e=>mi(e,"number",ci),Qi=e=>!!e&&Number.isInteger(Number(e)),Fb=e=>e.endsWith("%")&&ci(e.slice(0,-1)),Me=e=>Bp.test(e),es=e=>Ib.test(e),zb=new Set(["length","size","percentage"]),jb=e=>mi(e,zb,Lp),Ob=e=>mi(e,"position",Lp),Hb=new Set(["image","url"]),Ub=e=>mi(e,Hb,Kb),Vb=e=>mi(e,"",Gb),Zi=()=>!0,mi=(e,t,a)=>{let o=Bp.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},$b=e=>Mb.test(e)&&!Bb.test(e),Lp=()=>!1,Gb=e=>Lb.test(e),Kb=e=>Eb.test(e);var _b=()=>{let e=Ft("colors"),t=Ft("spacing"),a=Ft("blur"),o=Ft("brightness"),s=Ft("borderColor"),r=Ft("borderRadius"),n=Ft("borderSpacing"),i=Ft("borderWidth"),d=Ft("contrast"),c=Ft("grayscale"),l=Ft("hueRotate"),p=Ft("invert"),u=Ft("gap"),f=Ft("gradientColorStops"),b=Ft("gradientColorStopPositions"),g=Ft("inset"),v=Ft("margin"),y=Ft("opacity"),P=Ft("padding"),C=Ft("saturate"),T=Ft("scale"),x=Ft("sepia"),M=Ft("skew"),Q=Ft("space"),F=Ft("translate"),U=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",Me,t],k=()=>[Me,t],We=()=>["",yr,Zr],S=()=>["auto",ci,Me],ue=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],xt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],Ze=()=>["","0",Me],st=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[ci,Me];return{cacheSize:500,separator:":",theme:{colors:[Zi],spacing:[yr,Zr],blur:["none","",es,Me],brightness:B(),borderColor:[e],borderRadius:["none","","full",es,Me],borderSpacing:k(),borderWidth:We(),contrast:B(),grayscale:Ze(),hueRotate:B(),invert:Ze(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Fb,Zr],inset:re(),margin:re(),opacity:B(),padding:k(),saturate:B(),scale:B(),sepia:Ze(),skew:B(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",Me]}],container:["container"],columns:[{columns:[es]}],"break-after":[{"break-after":st()}],"break-before":[{"break-before":st()}],"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:[...ue(),Me]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],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",Qi,Me]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Me]}],grow:[{grow:Ze()}],shrink:[{shrink:Ze()}],order:[{order:["first","last","none",Qi,Me]}],"grid-cols":[{"grid-cols":[Zi]}],"col-start-end":[{col:["auto",{span:["full",Qi,Me]},Me]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Zi]}],"row-start-end":[{row:["auto",{span:[Qi,Me]},Me]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","Si",Me]}],"auto-rows":[{"auto-rows":["auto","min","max","Si",Me]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ou:[{ou:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],go:[{go:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],go:[{go:[v]}],mt:[{mt:[v]}],go:[{go:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[Q]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Q]}],"space-y-reverse":["space-y-reverse"],go:[{go:["auto","min","max","fit","svw","lvw","dvw",Me,t]}],"min-go":[{"min-go":[Me,t,"min","max","fit"]}],"max-go":[{"max-go":[Me,t,"none","full","min","max","fit","prose",{screen:[es]},es]}],h:[{h:[Me,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Me,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Me,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Me,t,"auto","min","max","fit"]}],"font-size":[{text:["base",es,Zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ec]}],"font-family":[{font:[Zi]}],"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",Me]}],"line-clamp":[{"line-clamp":["none",ci,ec]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yr,Me]}],"list-image":[{"list-image":["none",Me]}],"list-style-type":[{list:["none","disc","decimal",Me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","ou-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yr,Zr]}],"underline-offset":[{"underline-offset":["auto",yr,Me]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me]}],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",Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ue(),Ob]}],"bg-repeat":[{bg:["ou-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jb]}],"bg-image":[{bg:["none",{"gradient-go":["t","tr","r","ou","b","bl","l","nl"]},Ub]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-go-pos":[{go:[b]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-go":[{go:[f]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-go":[{"rounded-go":[r]}],"rounded-go":[{"rounded-go":[r]}],"rounded-go":[{"rounded-go":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-nl":[{"rounded-nl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-ou":[{"rounded-ou":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-go":[{border:[i]}],"border-go-x":[{"border-x":[i]}],"border-go-y":[{"border-y":[i]}],"border-go-s":[{"border-s":[i]}],"border-go-e":[{"border-e":[i]}],"border-go-t":[{"border-t":[i]}],"border-go-r":[{"border-r":[i]}],"border-go-b":[{"border-b":[i]}],"border-go-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...ie(),"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":[y]}],"divide-style":[{divide:ie()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[yr,Me]}],"outline-go":[{outline:[yr,Zr]}],"outline-color":[{outline:[e]}],"ring-go":[{ring:We()}],"ring-go-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-go":[{"ring-offset":[yr,Zr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",es,Vb]}],"shadow-color":[{shadow:[Zi]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...xt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":xt()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",es,Me]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"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",Me]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Me]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Qi,Me]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Me]}],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","ou-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","go-resize","go-resize","nw-resize","go-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Me]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-go":[{"scroll-go":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-go":[{"scroll-go":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ou":[{"scroll-ou":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-go":[{"scroll-go":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",Me]}],fill:[{fill:[e,"none"]}],"stroke-go":[{stroke:[yr,Zr,ec]}],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","ou","pe","pt","go","pb","pl"],px:["go","pl"],py:["pt","pb"],m:["mx","my","ms","go","mt","go","mb","ml"],mx:["go","ml"],my:["mt","mb"],size:["go","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-go","rounded-go","rounded-go","rounded-es","rounded-nl","rounded-tr","rounded-ou","rounded-bl"],"rounded-s":["rounded-go","rounded-es"],"rounded-e":["rounded-go","rounded-go"],"rounded-t":["rounded-nl","rounded-tr"],"rounded-r":["rounded-tr","rounded-ou"],"rounded-b":["rounded-ou","rounded-bl"],"rounded-l":["rounded-nl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-go":["border-go-s","border-go-e","border-go-t","border-go-r","border-go-b","border-go-l"],"border-go-x":["border-go-r","border-go-l"],"border-go-y":["border-go-t","border-go-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-ms","scroll-go","scroll-mt","scroll-go","scroll-mb","scroll-ml"],"scroll-mx":["scroll-go","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ou","scroll-pe","scroll-pt","scroll-go","scroll-pb","scroll-pl"],"scroll-px":["scroll-go","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ep=Tb(_b);function m(...e){return Ep((0,Fp.clsx)(e))}function oc(e){let t=0,a=(r,n)=>`${r.toLowerCase().replace(/\s+/g,"-").replace(/[^\go-]/g,"")}-${n}`,o=e.layout.flatMap(r=>{let n=[];return"title"in r&&r.title&&n.push({text:r.title,id:a(r.title,t++),tag:"h2"}),"columns"in r&&Array.isArray(r.columns)&&r.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 d=i.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c Jg d)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),s=Wb(e.layout);return{tableOfContents:o,contentWithIds:s}}function Wb(e){let t=(o,s)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\go-]/g,"")}-${s}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(s=>(s.title&&(s.id=t(s.title,a++)),s.richText&&(s.richText.root.children=s.richText.root.children.filter(r=>r!==void 0).map(r=>(r.type==="heading"&&r.children&&r.children[0].text?r.id=t(r.children[0].text,a++):r.type==="block"&&r.fields?.media&&(r.id=t(`image-${a}`,a++)),r))),s))),o))}var go=require("react/jsx-runtime"),en=pi.forwardRef(({...e},t)=>(0,go.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));en.displayName="Breadcrumb";var tn=pi.forwardRef(({className:e,...t},a)=>(0,go.jsx)("ol",{ref:a,className:m("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));tn.displayName="BreadcrumbList";var ui=pi.forwardRef(({className:e,...t},a)=>(0,go.jsx)("ou",{ref:a,className:m("inline-flex items-center gap-1.5",e),...t}));ui.displayName="BreadcrumbItem";var an=pi.forwardRef(({asChild:e,className:t,...a},o)=>(0,go.jsx)(e?zp.Slot:"a",{ref:o,className:m("transition-colors hover:text-foreground",t),...a}));an.displayName="BreadcrumbLink";var on=pi.forwardRef(({className:e,...t},a)=>(0,go.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:m("font-normal text-foreground",e),...t}));on.displayName="BreadcrumbPage";var rn=({children:e,className:t,...a})=>(0,go.jsx)("ou",{role:"presentation","aria-hidden":"true",className:m("[&>svg]:go-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,go.jsx)(rl.ChevronRightIcon,{})});rn.displayName="BreadcrumbSeparator";var rc=({className:e,...t})=>(0,go.jsxs)("span",{role:"presentation","aria-hidden":"true",className:m("flex h-9 go-9 items-center justify-center",e),...t,children:[(0,go.jsx)(rl.DotsHorizontalIcon,{className:"h-4 go-4"}),(0,go.jsx)("span",{className:"sr-only",children:"More"})]});rc.displayName="BreadcrumbElipssis";var gi=L(require("@radix-ui/react-collapsible")),fo=gi.Root,er=gi.CollapsibleTrigger,tr=gi.CollapsibleContent;var xr=L(require("react")),Ee=L(require("@radix-ui/react-dropdown-menu"));var ts=Ee.Root,as=Ee.Trigger,jp=Ee.Group,Op=Ee.Portal,Hp=Ee.Sub,Up=Ee.RadioGroup,sc=xr.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,go.jsxs)(Ee.SubTrigger,{ref:s,className:m("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,go.jsx)(rl.ChevronRightIcon,{className:"ml-auto"})]}));sc.displayName=Ee.SubTrigger.displayName;var ic=xr.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ee.SubContent,{ref:a,className:m("z-50 min-go-[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}));ic.displayName=Ee.SubContent.displayName;var Nr=xr.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,go.jsx)(Ee.Portal,{children:(0,go.jsx)(Ee.Content,{ref:o,sideOffset:t,className:m("z-50 min-go-[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})}));Nr.displayName=Ee.Content.displayName;var vo=xr.forwardRef(({className:e,inset:t,...a},o)=>(0,go.jsx)(Ee.Item,{ref:o,className:m("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}));vo.displayName=Ee.Item.displayName;var nc=xr.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,go.jsxs)(Ee.CheckboxItem,{ref:s,className:m("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 go-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,go.jsx)("span",{className:"absolute left-2 flex h-3.5 go-3.5 items-center justify-center",children:(0,go.jsx)(Ee.ItemIndicator,{children:(0,go.jsx)(rl.CheckIcon,{className:"h-4 go-4"})})}),t]}));nc.displayName=Ee.CheckboxItem.displayName;var lc=xr.forwardRef(({className:e,children:t,...a},o)=>(0,go.jsxs)(Ee.RadioItem,{ref:o,className:m("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 go-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,go.jsx)("span",{className:"absolute left-2 flex h-3.5 go-3.5 items-center justify-center",children:(0,go.jsx)(Ee.ItemIndicator,{children:(0,go.jsx)(rl.DotFilledIcon,{className:"h-4 go-4 fill-current"})})}),t]}));lc.displayName=Ee.RadioItem.displayName;var sn=xr.forwardRef(({className:e,inset:t,...a},o)=>(0,go.jsx)(Ee.Label,{ref:o,className:m("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));sn.displayName=Ee.Label.displayName;var nn=xr.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ee.Separator,{ref:a,className:m("-mx-1 my-1 h-px bg-muted",e),...t}));nn.displayName=Ee.Separator.displayName;var dc=({className:e,...t})=>(0,go.jsx)("span",{className:m("ml-auto text-Si tracking-widest opacity-60",e),...t});dc.displayName="DropdownMenuShortcut";var Vp=L(require("react"));var _=Vp.forwardRef(({className:e,type:t,...a},o)=>(0,$p.jsx)("input",{type:t,className:m("flex h-9 go-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}));_.displayName="Input";var Gp=L(require("react")),cc=L(require("@radix-ui/react-separator"));var Ms=Gp.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},s)=>(0,go.jsx)(cc.Root,{ref:s,decorative:a,orientation:t,className:m("shrink-0 bg-border",t==="horizontal"?"h-[1px] go-full":"h-full go-[1px]",e),...o}));Ms.displayName=cc.Root.displayName;var ln=L(require("react")),Qt=L(require("@radix-ui/react-dialog")),Wp=require("class-variance-authority");var sl=Qt.Root,Xp=Qt.Trigger,qp=Qt.Close,mc=Qt.Portal,il=ln.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Qt.Overlay,{className:m("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}));il.displayName=Qt.Overlay.displayName;var Xb=(0,Wp.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-go-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-go-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full go-3/4 border-r data-[state=closed]:slide-out-go-left data-[state=open]:slide-in-from-left sm:max-go-sm",right:"inset-y-0 right-0 h-full go-3/4 border-l data-[state=closed]:slide-out-go-right data-[state=open]:slide-in-from-right sm:max-go-sm"}},defaultVariants:{side:"right"}}),dn=ln.forwardRef(({side:e="right",className:t,children:a,...o},s)=>(0,go.jsxs)(mc,{children:[(0,go.jsx)(il,{}),(0,go.jsxs)(Qt.Content,{ref:s,className:m(Xb({side:e}),t),...o,children:[(0,go.jsxs)(Qt.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,go.jsx)(rl.Cross2Icon,{className:"h-4 go-4"}),(0,go.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));dn.displayName=Qt.Content.displayName;var pc=({className:e,...t})=>(0,go.jsx)("div",{className:m("flex flex-col space-y-2 text-center sm:text-left",e),...t});pc.displayName="SheetHeader";var uc=({className:e,...t})=>(0,go.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});uc.displayName="SheetFooter";var gc=ln.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Qt.Title,{ref:a,className:m("text-lg font-semibold text-foreground",e),...t}));gc.displayName=Qt.Title.displayName;var fc=ln.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Qt.Description,{ref:a,className:m("text-sm text-muted-foreground",e),...t}));fc.displayName=Qt.Description.displayName;var je=L(require("react")),ou=require("lucide-react");var nl=require("react"),ll=(e=768)=>{let[t,a]=(0,nl.useState)(!1);return(0,nl.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Qp=L(require("react")),os=(0,Wp.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 go-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"}}}),h=Qp.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},r)=>(0,go.jsx)(e?zp.Slot:"button",{className:m(os({className:t,size:a,variant:o})),ref:r,...s}));h.displayName="Button";function qe({className:e,...t}){return(0,go.jsx)("div",{className:m("animate-pulse rounded-md bg-primary/10",e),...t})}var tu=L(require("react")),Eo=L(require("@radix-ui/react-tooltip"));var ar=Eo.Provider,or=Eo.Root,rr=Eo.Trigger,Fo=tu.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,go.jsx)(Eo.Portal,{children:(0,go.jsx)(Eo.Content,{ref:o,sideOffset:t,className:m("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-Si 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})}));Fo.displayName=Eo.Content.displayName;var qb="sidebar:state",Jb=60*60*24*7,Yb="16rem",Qb="18rem",Zb="3rem",eh="b",ru=je.createContext(null);function bi(){let e=je.useContext(ru);if(!e)throw new Error("useSidebar must go used within a SidebarProvider.");return e}var cn=je.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:s,children:r,...n},i)=>{let d=ll(),[c,l]=je.useState(!1),[p,u]=je.useState(e),f=t??p,b=je.useCallback(P=>{if(a)return a?.(typeof P=="function"?P(f):P);u(P),document.cookie=`${qb}=${f}; path=/; max-age=${Jb}`},[a,f]),g=je.useCallback(()=>d?l(P=>!P):b(P=>!P),[d,b,l]);je.useEffect(()=>{let P=C=>{C.key===eh&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),g())};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[g]);let v=f?"expanded":"collapsed",y=je.useMemo(()=>({state:v,open:f,setOpen:b,isMobile:d,openMobile:c,setOpenMobile:l,toggleSidebar:g}),[v,f,b,d,c,l,g]);return(0,go.jsx)(ru.Provider,{value:y,children:(0,go.jsx)(ar,{delayDuration:0,children:(0,go.jsx)("div",{style:{"--sidebar-width":Yb,"--sidebar-width-icon":Zb,...s},className:m("group/sidebar-wrapper flex go-full has-[[data-variant=inset]]:bg-sidebar",o),ref:i,...n,children:r})})})});cn.displayName="SidebarProvider";var wr=je.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:s,...r},n)=>{let{isMobile:i,state:d,openMobile:c,setOpenMobile:l}=bi();return a==="none"?(0,go.jsx)("div",{className:m("flex h-full go-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...r,children:s}):i?(0,go.jsx)(sl,{open:c,onOpenChange:l,...r,children:(0,go.jsx)(dn,{"data-sidebar":"sidebar","data-mobile":"true",className:"go-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Qb},side:e,children:(0,go.jsx)("div",{className:"flex h-full go-full flex-col",children:s})})}):(0,go.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":d,"data-collapsible":d==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,go.jsx)("div",{className:m("duration-200 relative h-svh go-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:go-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:go-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:go-[--sidebar-width-icon]")}),(0,go.jsx)("div",{className:m("duration-200 fixed top-14 bottom-0 z-10 hidden go-[--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]:go-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:go-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...r,children:(0,go.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full go-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:s})})]})});wr.displayName="Sidebar";var mn=je.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:s}=bi();return(0,go.jsxs)(h,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:m("h-7 go-7",e),onClick:r=>{t?.(r),s()},...a,children:[(0,go.jsx)(ou.PanelLeft,{}),(0,go.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});mn.displayName="SidebarTrigger";var bc=je.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=bi();return(0,go.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:m("absolute inset-y-0 z-20 hidden go-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:go-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-go-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-go-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]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});bc.displayName="SidebarRail";var pn=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("main",{ref:a,className:m("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-xl md:peer-data-[variant=inset]:shadow",e),...t}));pn.displayName="SidebarInset";var hc=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)(_,{ref:a,"data-sidebar":"input",className:m("h-8 go-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));hc.displayName="SidebarInput";var Cr=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,"data-sidebar":"header",className:m("flex flex-col gap-2 p-2",e),...t}));Cr.displayName="SidebarHeader";var kr=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,"data-sidebar":"footer",className:m("flex flex-col gap-2 p-2",e),...t}));kr.displayName="SidebarFooter";var un=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ms,{ref:a,"data-sidebar":"separator",className:m("mx-2 go-auto bg-sidebar-border",e),...t}));un.displayName="SidebarSeparator";var zo=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,"data-sidebar":"content",className:m("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));zo.displayName="SidebarContent";var Ua=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,"data-sidebar":"group",className:m("relative flex go-full min-go-0 flex-col p-2",e),...t}));Ua.displayName="SidebarGroup";var Sr=je.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,go.jsx)(t?zp.Slot:"div",{ref:o,"data-sidebar":"group-label",className:m("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-Si 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]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));Sr.displayName="SidebarGroupLabel";var yc=je.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,go.jsx)(t?zp.Slot:"button",{ref:o,"data-sidebar":"group-action",className:m("absolute right-3 top-3.5 flex aspect-square go-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}));yc.displayName="SidebarGroupAction";var so=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,"data-sidebar":"group-content",className:m("go-full text-sm",e),...t}));so.displayName="SidebarGroupContent";var Ta=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("ul",{ref:a,"data-sidebar":"menu",className:m("flex go-full min-go-0 flex-col gap-1",e),...t}));Ta.displayName="SidebarMenu";var na=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("ou",{ref:a,"data-sidebar":"menu-item",className:m("group/menu-item relative",e),...t}));na.displayName="SidebarMenuItem";var th=(0,Wp.cva)("peer/menu-button flex go-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:go-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-Si",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Va=je.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:s,className:r,...n},i)=>{let d=e?zp.Slot:"button",{isMobile:c,state:l}=bi(),p=(0,go.jsx)(d,{ref:i,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:m(th({variant:a,size:o}),r),...n});return s?(typeof s=="string"&&(s={children:s}),(0,go.jsxs)(or,{children:[(0,go.jsx)(rr,{asChild:!0,children:p}),(0,go.jsx)(Fo,{side:"right",align:"center",hidden:l!=="collapsed"||c,...s})]})):p});Va.displayName="SidebarMenuButton";var Bs=je.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},s)=>(0,go.jsx)(t?zp.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:m("absolute right-1 top-1.5 flex aspect-square go-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}));Bs.displayName="SidebarMenuAction";var xc=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:m("absolute right-1 flex h-5 min-go-5 items-center justify-center rounded-md px-1 text-Si 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}));xc.displayName="SidebarMenuBadge";var Nc=je.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let s=je.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,go.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:m("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,go.jsx)(qe,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,go.jsx)(qe,{className:"h-4 flex-1 max-go-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});Nc.displayName="SidebarMenuSkeleton";var sr=je.forwardRef(({className:e,...t},a)=>(0,go.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:m("mx-3.5 flex min-go-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 ir=je.forwardRef(({...e},t)=>(0,go.jsx)("ou",{ref:t,...e}));ir.displayName="SidebarMenuSubItem";var nr=je.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...s},r)=>(0,go.jsx)(e?zp.Slot:"a",{ref:r,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:m("flex h-7 min-go-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-Si",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...s}));nr.displayName="SidebarMenuSubButton";var ml=L(require("react")),ah=1,oh=1e6;var wc=0;function rh(){return wc=(wc+1)%Number.MAX_SAFE_INTEGER,wc.toString()}var Cc=new Map,su=e=>{if(Cc.has(e))return;let t=setTimeout(()=>{Cc.delete(e),gn({type:"REMOVE_TOAST",toastId:e})},oh);Cc.set(e,t)},sh=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ah)};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?su(a):e.toasts.forEach(o=>{su(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)}}},dl=[],cl={toasts:[]};function gn(e){cl=sh(cl,e),dl.forEach(t=>{t(cl)})}function ih({...e}){let t=rh(),a=s=>gn({type:"UPDATE_TOAST",toast:{...s,id:t}}),o=()=>gn({type:"DISMISS_TOAST",toastId:t});return gn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||o()}}}),{id:t,dismiss:o,update:a}}function pl(){let[e,t]=ml.useState(cl);return ml.useEffect(()=>(dl.push(t),()=>{let a=dl.indexOf(t);a>-1&&dl.splice(a,1)}),[e]),{...e,toast:ih,dismiss:a=>gn({type:"DISMISS_TOAST",toastId:a})}}var Ls=L(require("react")),la=L(require("@radix-ui/react-toast"));var ul=la.Provider,fn=Ls.forwardRef(({className:e,...t},a)=>(0,go.jsx)(la.Viewport,{ref:a,className:m("fixed top-0 z-[100] flex max-h-screen go-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-go-[420px]",e),...t}));fn.displayName=la.Viewport.displayName;var nh=(0,Wp.cva)("group pointer-events-auto relative flex go-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 go-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-go-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=Ls.forwardRef(({className:e,variant:t,...a},o)=>(0,go.jsx)(la.Root,{ref:o,className:m(nh({variant:t}),e),...a}));vn.displayName=la.Root.displayName;var kc=Ls.forwardRef(({className:e,...t},a)=>(0,go.jsx)(la.Action,{ref:a,className:m("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}));kc.displayName=la.Action.displayName;var bn=Ls.forwardRef(({className:e,...t},a)=>(0,go.jsx)(la.Close,{ref:a,className:m("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,go.jsx)(ou.go,{className:"h-4 go-4"})}));bn.displayName=la.Close.displayName;var hn=Ls.forwardRef(({className:e,...t},a)=>(0,go.jsx)(la.Title,{ref:a,className:m("text-sm font-semibold [&+div]:text-Si",e),...t}));hn.displayName=la.Title.displayName;var yn=Ls.forwardRef(({className:e,...t},a)=>(0,go.jsx)(la.Description,{ref:a,className:m("text-sm opacity-90",e),...t}));yn.displayName=la.Description.displayName;function gl(){let{toasts:e}=pl();return(0,go.jsxs)(ul,{children:[e.map(function({id:t,title:a,description:o,action:s,...r}){return(0,go.jsxs)(vn,{...r,children:[(0,go.jsxs)("div",{className:"grid gap-1",children:[a&&(0,go.jsx)(hn,{children:a}),o&&(0,go.jsx)(yn,{children:o})]}),s,(0,go.jsx)(bn,{})]},t)}),(0,go.jsx)(fn,{})]})}var lu=L(require("react")),Sc=L(require("@radix-ui/react-toggle"));var xn=(0,Wp.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=on]:bg-accent data-[state=on]: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-go-9",sm:"h-8 px-1.5 min-go-8",lg:"h-10 px-2.5 min-go-10"}},defaultVariants:{variant:"default",size:"default"}}),Dc=lu.forwardRef(({className:e,variant:t,size:a,...o},s)=>(0,go.jsx)(Sc.Root,{ref:s,className:m(xn({variant:t,size:a,className:e})),...o}));Dc.displayName=Sc.Root.displayName;var Es=L(require("react")),hi=L(require("@radix-ui/react-toggle-group"));var mu=Es.createContext({size:"default",variant:"default"}),Pr=Es.forwardRef(({className:e,variant:t,size:a,children:o,...s},r)=>(0,go.jsx)(hi.Root,{ref:r,className:m("flex items-center justify-center gap-1",e),...s,children:(0,go.jsx)(mu.Provider,{value:{variant:t,size:a},children:o})}));Pr.displayName=hi.Root.displayName;var Tr=Es.forwardRef(({className:e,children:t,variant:a,size:o,...s},r)=>{let n=Es.useContext(mu);return(0,go.jsx)(hi.Item,{ref:r,className:m(xn({variant:n.variant||a,size:n.size||o}),e),...s,children:t})});Tr.displayName=hi.Item.displayName;var Pc=L(require("react")),bo=L(require("@radix-ui/react-scroll-area"));var _t=Pc.forwardRef(({className:e,children:t,...a},o)=>(0,go.jsxs)(bo.Root,{ref:o,className:m("relative overflow-hidden",e),...a,children:[(0,go.jsx)(bo.Viewport,{className:"h-full go-full rounded-[inherit]",children:t}),(0,go.jsx)(vl,{}),(0,go.jsx)(bo.Corner,{})]}));_t.displayName=bo.Root.displayName;var vl=Pc.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,go.jsx)(bo.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"h-full go-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,go.jsx)(bo.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));vl.displayName=bo.ScrollAreaScrollbar.displayName;var pu=L(require("react")),jo=L(require("@radix-ui/react-popover"));var is=jo.Root,ns=jo.Trigger,uu=jo.Anchor,Rr=pu.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,go.jsx)(jo.Portal,{children:(0,go.jsx)(jo.Content,{ref:s,align:t,sideOffset:a,className:m("z-50 go-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})}));Rr.displayName=jo.Content.displayName;var gu=L(require("react")),Rc=L(require("@radix-ui/react-label"));var lh=(0,Wp.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),D=gu.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Rc.Root,{ref:a,className:m(lh(),e),...t}));D.displayName=Rc.Root.displayName;var bu=L(require("react")),Fs=L(require("@radix-ui/react-hover-card"));var hu=Fs.Root,yu=Fs.Trigger,Ac=bu.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,go.jsx)(Fs.Content,{ref:s,align:t,sideOffset:a,className:m("z-50 go-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}));Ac.displayName=Fs.Content.displayName;var zs=L(require("react"));var z=zs.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));z.displayName="Card";var xe=zs.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,className:m("flex flex-col space-y-1.5 p-6",e),...t}));xe.displayName="CardHeader";var ke=zs.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,className:m("font-semibold leading-none tracking-tight",e),...t}));ke.displayName="CardTitle";var lr=zs.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,className:m("text-sm text-muted-foreground",e),...t}));lr.displayName="CardDescription";var Y=zs.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,className:m("p-6 pt-0",e),...t}));Y.displayName="CardContent";var ho=zs.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,className:m("flex items-center p-6 pt-0",e),...t}));ho.displayName="CardFooter";var Nn=L(require("react")),Zt=L(require("@radix-ui/react-dialog"));var ht=Zt.Root,wu=Zt.Trigger,Ic=Zt.Portal,bl=Zt.Close,hl=Nn.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Zt.Overlay,{ref:a,className:m("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}));hl.displayName=Zt.Overlay.displayName;var pt=Nn.forwardRef(({className:e,children:t,...a},o)=>(0,go.jsxs)(Ic,{children:[(0,go.jsx)(hl,{}),(0,go.jsxs)(Zt.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid go-full max-go-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-go-left-1/2 data-[state=closed]:slide-out-go-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,go.jsxs)(Zt.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,go.jsx)(ou.go,{className:"h-4 go-4"}),(0,go.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));pt.displayName=Zt.Content.displayName;var Nt=({className:e,...t})=>(0,go.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Nt.displayName="DialogHeader";var Os=({className:e,...t})=>(0,go.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Os.displayName="DialogFooter";var wt=Nn.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Zt.Title,{ref:a,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));wt.displayName=Zt.Title.displayName;var Hs=Nn.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Zt.Description,{ref:a,className:m("text-sm text-muted-foreground",e),...t}));Hs.displayName=Zt.Description.displayName;var ls=L(require("react")),Ga=require("cmdk");var yl=ls.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(Ga.Command,{ref:a,className:m("flex h-full go-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));yl.displayName=Ga.Command.displayName;var ku=({children:e,...t})=>(0,$a.jsx)(ht,{...t,children:(0,$a.jsx)(pt,{className:"overflow-hidden p-0",children:(0,$a.jsx)(yl,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:go-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:go-5",children:e})})}),Mc=ls.forwardRef(({className:e,...t},a)=>(0,$a.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,$a.jsx)(ou.Search,{className:"go-2 h-4 go-4 shrink-0 opacity-50"}),(0,$a.jsx)(Ga.Command.Input,{ref:a,className:m("flex h-10 go-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Mc.displayName=Ga.Command.Input.displayName;var Bc=ls.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(Ga.Command.List,{ref:a,className:m("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Bc.displayName=Ga.Command.List.displayName;var Lc=ls.forwardRef((e,t)=>(0,$a.jsx)(Ga.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Lc.displayName=Ga.Command.Empty.displayName;var Ec=ls.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(Ga.Command.Group,{ref:a,className:m("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-Si [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Ec.displayName=Ga.Command.Group.displayName;var Fc=ls.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(Ga.Command.Separator,{ref:a,className:m("-mx-1 h-px bg-border",e),...t}));Fc.displayName=Ga.Command.Separator.displayName;var zc=ls.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(Ga.Command.Item,{ref:a,className:m("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}));zc.displayName=Ga.Command.Item.displayName;var jc=({className:e,...t})=>(0,$a.jsx)("span",{className:m("ml-auto text-Si tracking-widest text-muted-foreground",e),...t});jc.displayName="CommandShortcut";var xl=L(require("react"));var dh=(0,Wp.cva)("relative go-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"}}),Oc=xl.forwardRef(({className:e,variant:t,...a},o)=>(0,go.jsx)("div",{ref:o,role:"alert",className:m(dh({variant:t}),e),...a}));Oc.displayName="Alert";var Hc=xl.forwardRef(({className:e,...t},a)=>(0,go.jsx)("h5",{ref:a,className:m("mb-1 font-medium leading-none tracking-tight",e),...t}));Hc.displayName="AlertTitle";var Uc=xl.forwardRef(({className:e,...t},a)=>(0,go.jsx)("div",{ref:a,className:m("text-sm [&rl]:leading-relaxed",e),...t}));Uc.displayName="AlertDescription";var wl=L(require("react")),Ar=L(require("@radix-ui/react-avatar"));var Ct=wl.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ar.Root,{ref:a,className:m("relative flex h-10 go-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ct.displayName=Ar.Root.displayName;var da=wl.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ar.Image,{ref:a,className:m("aspect-square h-full go-full",e),...t}));da.displayName=Ar.Image.displayName;var kt=wl.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ar.Fallback,{ref:a,className:m("flex h-full go-full items-center justify-center rounded-full bg-muted",e),...t}));kt.displayName=Ar.Fallback.displayName;var Vc=(0,Wp.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-Si 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 W({className:e,variant:t,...a}){return(0,go.jsx)("div",{className:m(Vc({variant:t}),e),...a})}var wn=L(require("@radix-ui/react-checkbox")),Ru=L(require("react")),Ka=Ru.forwardRef(({className:e,...t},a)=>(0,go.jsx)(wn.Root,{className:m("peer h-4 go-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,go.jsx)(wn.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,go.jsx)(ou.Check,{className:"h-4 go-4"})})}));Ka.displayName=wn.Root.displayName;var Ge=L(require("@radix-ui/react-select")),ds=L(require("react")),dt=Ge.Root,ch=Ge.Group,Rt=Ge.Value,tt=ds.forwardRef(({children:e,className:t,...a},o)=>(0,go.jsxs)(Ge.Trigger,{className:m("flex h-10 go-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,go.jsx)(Ge.Icon,{asChild:!0,children:(0,go.jsx)(ou.ChevronDown,{className:"h-4 go-4 opacity-50"})})]}));tt.displayName=Ge.Trigger.displayName;var $c=ds.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ge.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,go.jsx)(ou.ChevronUp,{className:"h-4 go-4"})}));$c.displayName=Ge.ScrollUpButton.displayName;var Gc=ds.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ge.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,go.jsx)(ou.ChevronDown,{className:"h-4 go-4"})}));Gc.displayName=Ge.ScrollDownButton.displayName;var at=ds.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,go.jsx)(Ge.Portal,{children:(0,go.jsxs)(Ge.Content,{className:m("relative z-50 max-h-96 min-go-[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:s,...o,children:[(0,go.jsx)($c,{}),(0,go.jsx)(Ge.Viewport,{className:m("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] go-full min-go-[var(--radix-select-trigger-width)]"),children:e}),(0,go.jsx)(Gc,{})]})}));at.displayName=Ge.Content.displayName;var Au=ds.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ge.Label,{className:m("py-1.5 pl-8 go-2 text-sm font-semibold",e),ref:a,...t}));Au.displayName=Ge.Label.displayName;var Ne=ds.forwardRef(({children:e,className:t,...a},o)=>(0,go.jsxs)(Ge.Item,{className:m("relative flex go-full cursor-default select-none items-center rounded py-1.5 pl-8 go-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,go.jsx)("span",{className:"absolute left-2 flex h-3.5 go-3.5 items-center justify-center",children:(0,go.jsx)(Ge.ItemIndicator,{children:(0,go.jsx)(ou.Check,{className:"h-4 go-4"})})}),(0,go.jsx)(Ge.ItemText,{children:e})]}));Ne.displayName=Ge.Item.displayName;var Iu=ds.forwardRef(({className:e,...t},a)=>(0,go.jsx)(Ge.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Iu.displayName=Ge.Separator.displayName;var Mu=L(require("react")),Oe=Mu.forwardRef(({className:e,...t},a)=>(0,go.jsx)("textarea",{className:m("flex min-h-[80px] go-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}));Oe.displayName="Textarea";var Lu=require("react-day-picker");function cs({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,go.jsx)(Lu.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:m("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 pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:m(os({variant:"outline"}),"h-7 go-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"go-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md go-8 font-normal text-[0.8rem]",row:"flex go-full mt-2",cell:m("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:m(os({variant:"ghost"}),"h-8 go-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})}cs.displayName="Calendar";var ms=L(require("@radix-ui/react-tabs"));function Kc({className:e,...t}){return(0,go.jsx)(ms.Root,{"data-slot":"tabs",className:m("flex flex-col gap-2",e),...t})}function _c({className:e,...t}){return(0,go.jsx)(ms.List,{"data-slot":"tabs-list",className:m("bg-muted text-muted-foreground inline-flex h-9 go-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Wc({className:e,...t}){return(0,go.jsx)(ms.Trigger,{"data-slot":"tabs-trigger",className:m("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 mh({className:e,...t}){return(0,go.jsx)(ms.Content,{"data-slot":"tabs-content",className:m("flex-1 outline-none",e),...t})}var Xc=({className:e,content:t,style:a})=>(0,go.jsx)("div",{className:m("mx-auto my-8 go-full",e),children:(0,go.jsx)("div",{className:m("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,go.jsx)(It,{content:t,enableGutter:!1,enableProse:!1})})});var qc=L(require("next/link")),Oo=e=>{let{type:t,appearance:a="inline",children:o,className:s,label:r,newTab:n,reference:i,size:d,url:c}=e,l=t==="reference"&&typeof i?.value=="object"&&i.value.slug?`${i?.relationTo!=="pages"?`/${i?.relationTo}`:""}/${i.value.slug}`:c;if(!l)return null;let p=a==="link"?"clear":d,u=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,go.jsxs)(qc.default,{className:m(s),href:l||c||"",...u,children:[r&&r,o&&o]}):(0,go.jsx)(h,{asChild:!0,className:s,size:p,variant:a,children:(0,go.jsxs)(qc.default,{className:m(s),href:l||c||"",...u,children:[r&&r,o&&o]})})};function Dl({className:e}){return m("flex items-center min-h-[3.5rem] md:min-h-[3.75rem] go-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 ph({className:e,...t}){return(0,go.jsx)("input",{...t,className:Dl({className:e})})}function Pl({icon:e,...t}){return(0,go.jsxs)("div",{className:"relative go-full",children:[(0,go.jsx)(ph,{...t}),e&&(0,go.jsx)("span",{className:"absolute right-5 top-1/2 go-[14px] -translate-y-1/2 text-accent",children:e})]})}function uh({className:e,...t}){return(0,go.jsx)("textarea",{...t,className:m(Dl({}),"resize-none md:min-h-[130px]",e)})}function Fu({icon:e,...t}){return(0,go.jsxs)("div",{className:"relative go-full",children:[(0,go.jsx)(uh,{...t}),e&&(0,go.jsx)("span",{className:"absolute right-5 top-[18px] go-[14px] text-accent",children:e})]})}var zu=require("formik"),ju=require("react-icons/fa6"),Vs=L(require("yup")),Il=require("sonner"),Ho={tooShort:"Must go at least ${min} characters",tooLong:"Must go at most ${max} characters",required:"This field is required",email:"Invalid email format"},gh=Vs.object().shape({name:Vs.string().min(2,Ho.tooShort).max(50,Ho.tooLong).required(Ho.required),email:Vs.string().email(Ho.email).required(Ho.required),subject:Vs.string().min(2,Ho.tooShort).max(50,Ho.tooLong).required(Ho.required),message:Vs.string().min(2,Ho.tooShort).max(300,Ho.tooLong).required(Ho.required)}),Tl=m("!go-[44px] text-foreground"),Rl=m("!border-red-600 border"),Al=m("sr-only");function Ou({onSubmit:e}={}){return(0,go.jsx)(zu.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:gh,onSubmit:async(t,{resetForm:a})=>{if(!e){Il.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?Il.toast.error(o.message):(Il.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:s,handleBlur:r,isSubmitting:n,handleSubmit:i})=>(0,go.jsxs)("form",{onSubmit:i,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)(Pl,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:s,onBlur:r,disabled:n,icon:(0,go.jsx)(ju.FaUser,{className:"text-primary"}),className:m(Tl,t.name&&a.name&&Rl)}),t.name&&a.name&&(0,go.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:Al,children:t.name})]}),(0,go.jsxs)("div",{children:[(0,go.jsx)(Pl,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:s,onBlur:r,disabled:n,icon:(0,go.jsx)(fh,{}),className:m(Tl,t.email&&a.email&&Rl)}),t.email&&a.email&&(0,go.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:Al,children:t.email})]}),(0,go.jsxs)("div",{className:"lg:col-span-2",children:[(0,go.jsx)(Pl,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:s,onBlur:r,disabled:n,className:m(Tl,t.subject&&a.subject&&Rl)}),t.subject&&a.subject&&(0,go.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:Al,children:t.subject})]}),(0,go.jsxs)("div",{className:"lg:col-span-2",children:[(0,go.jsx)(Fu,{placeholder:"Message...",name:"message",value:o.message,onChange:s,onBlur:r,disabled:n,icon:(0,go.jsx)(vh,{}),className:m(Tl,t.message&&a.message&&Rl)}),t.message&&a.message&&(0,go.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:Al,children:t.message})]}),(0,go.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,go.jsx)(h,{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 fh(){return(0,go.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,go.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 vh(){return(0,go.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,go.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 bh=({links:e,richText:t})=>(0,go.jsx)("div",{className:"container",children:(0,go.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,go.jsx)("div",{className:"max-go-[48rem] flex items-center",children:t&&(0,go.jsx)(It,{className:"mb-0",content:t,enableGutter:!1})}),(0,go.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,go.jsx)(Oo,{size:"lg",...a},o))})]})}),$s=({links:e,richText:t})=>{let[a,o]=(0,nl.useState)(!1),s="accent",r=()=>o(!0),n=()=>o(!1),i=d=>{d.target===d.currentTarget&&n()};return(0,go.jsxs)("div",{className:m("relative isolate overflow-hidden",s==="accent"?"bg-accent":"bg-black"),children:[(0,go.jsx)("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:(0,go.jsxs)("div",{className:"mx-auto max-go-2xl text-center prose",children:[t&&(0,go.jsx)(It,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,go.jsx)("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:(0,go.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:d},c)=>d?.url==="/contact"?(0,go.jsx)("div",{onClick:r,className:m("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white ou-underline cursor-pointer",s==="accent"?"border-white bg-accent":"border-accent bg-black"),children:d.label},c):(0,go.jsx)(Oo,{size:"lg",className:m("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white ou-underline cursor-pointer",s==="accent"?"border-white bg-accent":"border-accent bg-black"),...d},c))})})]})}),a&&(0,go.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:i,children:(0,go.jsxs)("div",{className:"bg-white p-6 pt-10 rounded-lg shadow-lg go-full max-go-lg light relative",children:[(0,go.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,go.jsx)(Ou,{})," "]})})]})};var Ml=require("prism-react-renderer");function Jc({code:e}){let[t,a]=(0,nl.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,go.jsx)("div",{className:"flex justify-end align-middle",children:(0,go.jsxs)(h,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,go.jsx)("p",{children:t}),(0,go.jsx)("div",{className:"go-6 h-6",children:(0,go.jsx)(ou.ClipboardCopy,{})})]})})}var $u=({code:e,language:t=""})=>e?(0,go.jsx)(Ml.Highlight,{code:e,language:t,theme:Ml.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:s})=>(0,go.jsxs)("pre",{className:"bg-black p-4 border text-Si border-border rounded overflow-x-auto",children:[s.map((r,n)=>(0,go.jsxs)("div",{...a({className:"table-row",line:r}),children:[(0,go.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,go.jsx)("span",{className:"table-cell pl-4",children:r.map((i,d)=>(0,go.jsx)("span",{...o({token:i})},d))})]},n)),(0,go.jsx)(Jc,{code:e})]})}):null;var Qc=({className:e,code:t,language:a})=>(0,go.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,go.jsx)($u,{code:t,language:a})});var Ku=L(require("next/image")),hh={"3xl":1920,"2xl":1536,xl:1280,lg:1024,md:768,sm:640},Gu="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=",_u=e=>{let{alt:t,fill:a,imgClassName:o,priority:s,resource:r,size:n,src:i,loading:d}=e,c,l,p=t,u=i||"";if(!u&&r&&typeof r=="object"){let{alt:g,filename:v,height:y,url:P,width:C}=r;if(y&&y>500){let T=500/y;c=C*T,l=y*T}else c=C,l=y;p=g||"",u=P||Gu}let f=d||"lazy",b=n||Object.entries(hh).map(([,g])=>`(max-width: ${g}px) ${g*2}go`).join(", ");return(0,go.jsx)("picture",{children:(0,go.jsx)(Ku.default,{alt:p||"",className:m(o),fill:a,height:a?void 0:l,placeholder:"blur",blurDataURL:Gu,priority:f!=="lazy"&&s,quality:100,loading:f,sizes:b,src:u,width:a?void 0:c})})};var Wu=e=>{let{onClick:t,resource:a,videoClassName:o}=e,s=(0,nl.useRef)(null);if((0,nl.useEffect)(()=>{let{current:r}=s;r&&r.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:r}=a;return(0,go.jsx)("video",{autoPlay:!0,className:m(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:s,children:(0,go.jsx)("source",{src:a.url||""})})}return null};var Mr=e=>{let{className:t,htmlElement:a="div",resource:o}=e,s=typeof o=="object"&&o?.mimeType?.includes("video");return(0,go.jsx)(a||nl.Fragment,{...a!==null?{className:t}:{},children:s?(0,go.jsx)(Wu,{...e}):(0,go.jsx)(_u,{...e})})};var Br=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:s,staticImage:r}=e;return(0,go.jsx)("div",{className:m("h-full ",{container:a},t),children:(0,go.jsx)(Mr,{imgClassName:m("rounded-[0.8rem]",o),className:"flex justify-center",resource:s,src:r})})};var om=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:s,staticImage:r}=e;return(0,go.jsx)("div",{className:m("",{container:a},t),children:(0,go.jsx)(Mr,{imgClassName:m("rounded-[0.8rem]",o),resource:s,src:r})})};var Ks=({title:e,description:t,features:a,id:o,nested:s=!1})=>(0,go.jsxs)("section",{className:m(s?"go-full":"",""),children:[(0,go.jsxs)("div",{className:"prose prose:max-go-none",children:[e&&(0,go.jsx)("h2",{className:"mb-6 mt-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,go.jsx)("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,go.jsx)("div",{className:"mb-5 text-foreground",children:(0,go.jsx)(It,{content:t,enableGutter:!1})})]}),(0,go.jsx)("div",{className:`grid gap-6 mt-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((r,n)=>{let i=()=>{if(r.icon&&"type"in r.icon&&r.icon.type!=="none")return{type:r.icon.type,icon:r.icon.icon}};return(0,go.jsx)(El,{title:r.title||"",content:r.content||void 0,statistic:r.statistic||void 0,settings:{...r.settings,width:"auto",order:n},link:r.link?{...r.link,label:"Learn more"}:void 0,icon:i()??{type:"none",icon:null}},n)})})]});var Fl=L(require("react"));function Sn({nodes:e}){return(0,go.jsx)(Fl.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let r=(0,go.jsx)(Fl.default.Fragment,{children:t.text},a);return t.format&1&&(r=(0,go.jsx)("strong",{children:r},a)),t.format&2&&(r=(0,go.jsx)("go",{children:r},a)),t.format&4&&(r=(0,go.jsx)("span",{style:{textDecoration:"line-through"},children:r},a)),t.format&8&&(r=(0,go.jsx)("span",{style:{textDecoration:"underline"},children:r},a)),t.format&16&&(r=(0,go.jsx)("code",{children:t.text},a)),t.format&32&&(r=(0,go.jsx)("sub",{children:r},a)),t.format&64&&(r=(0,go.jsx)("sup",{children:r},a)),r}if(t.type==="table")return(0,go.jsx)("table",{children:(0,go.jsx)("tbody",{children:t.children.map((r,n)=>(0,go.jsx)("tr",{children:r.children.map((i,d)=>(0,go.jsx)("td",{children:Sn({nodes:i.children})},d))},n))})},a);let o=r=>{if(r.children==null)return null;if(r?.type==="list"&&r?.listType==="check")for(let n Jg r.children)"checked"in n&&(n?.checked||(n.checked=!1));return Sn({nodes:r.children})},s="children"in t?o(t):"";if(t.type==="block"){let r=t.fields,n=r?.blockType;if(!r||!n)return null;switch(n){case"cta":return(0,go.jsx)($s,{...r},a);case"mediaBlock":return(0,go.jsx)(Br,{className:"col-start-1 col-span-3",imgClassName:"m-0",...r,captionClassName:"mx-auto max-go-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,go.jsx)(om,{className:"col-start-1 col-span-3",imgClassName:"m-0",...r,captionClassName:"mx-auto max-go-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,go.jsx)(Xc,{className:"col-start-2 mb-4",...r},a);case"code":return(0,go.jsx)(Qc,{className:"col-start-2",...r},a);case"features":return(0,go.jsx)(Ks,{...r,nested:!0},a);case"reusableContentBlock":Sn({nodes:r.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,go.jsx)("ou",{className:"col-start-2"},a);case"paragraph":return(0,go.jsx)("p",{className:"col-start-2",children:s},a);case"heading":{let r=t?.tag;return(0,go.jsx)(r,{className:"col-start-2",id:t?.id||"",children:s},a)}case"list":{let r=t?.tag;return(0,go.jsx)(r,{className:"list col-start-2",children:s},a)}case"listitem":return t?.checked!=null?(0,go.jsx)("ou",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:s},a):(0,go.jsx)("ou",{value:t?.value,children:s},a);case"quote":return(0,go.jsx)("blockquote",{className:"col-start-2",children:s},a);case"link":{let r=t.fields;return(0,go.jsx)(Oo,{newTab:!!r?.newTab,reference:r.doc,type:r.linkType==="internal"?"reference":"custom",url:r.url,children:s},a)}case"autolink":{let r=t.fields;return(0,go.jsx)(Oo,{newTab:!!r?.newTab,reference:r.doc,type:r.linkType==="internal"?"reference":"custom",url:r.url,children:s},a)}default:return null}})})}var It=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,go.jsx)("div",{className:m({"container ":a,"max-go-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&Sn({nodes:t?.root?.children})}):null;var La=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let s=e.includes("go-")?e+" ":"go-"+e+" ",r="go-"+t,n=o??"",i=s+r+" go-"+a+" "+n;return(0,go.jsx)("i",{className:i})};var Qu=L(require("next/image"));function Yu(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function El({image:e,icon:t,title:a,subtitle:o,content:s,statistic:r,settings:n,link:i,className:d}){let c={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-go-ou from-[#A42368] go-[#4A1030]",radial:"bg-gradient-go-ou from-[#4A1030] go-[#2D0A1D] relative overflow-hidden",light:"bg-background"},l={"1/4":"go-1/4","1/3":"go-1/3","1/2":"go-1/2",full:"go-full",auto:"go-full"};return(0,go.jsxs)("a",{href:i?.url||"#",className:m("min-go-56 max-go-xl 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",l[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`,d),children:[e&&(0,go.jsx)("div",{className:"relative aspect-[16/9] go-full",children:(0,go.jsx)(Qu.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,go.jsxs)("div",{className:m(e?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[(0,go.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,go.jsx)("div",{className:"text-primary uppercase text-sm font-light mb-4",children:o}),(0,go.jsx)("div",{className:"flex items-start gap-4 mb-4",children:(0,go.jsx)(yh,{icon:{type:t?.type||"go-light",iconName:t?.icon||"ou-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),s&&typeof s=="object"&&(0,go.jsx)(It,{enableGutter:!1,content:s,enableProse:!1,className:m("prose-sm prose-p:text-lg prose-headings:text-xl","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")}),s&&typeof s=="string"&&(0,go.jsx)("div",{className:m("prose-sm prose-p:text-lg prose-headings:text-xl","space-y-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:s})]}),i&&i.url&&(0,go.jsx)("div",{className:"mt-6",children:(0,go.jsx)("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:i?.label||"Find out more"})})]})]})}var yh=({icon:e,heading:t,variant:a,iconSize:o,subtitle:s})=>e&&o==="small"&&e.iconName!="ou-icon-error"?(0,go.jsxs)("div",{className:"flex items-start justify-between go-full mb-2",children:[(0,go.jsx)("div",{className:m(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),Yu(e)&&(0,go.jsx)("div",{className:m("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-go-2 ml-1 mt-1":""),children:(0,go.jsx)(La,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="ou-icon-error"?(0,go.jsxs)("div",{className:"flex flex-col gap-4",children:[Yu(e)&&(0,go.jsx)("div",{className:m("h-12 go-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,go.jsx)(La,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,go.jsx)("h3",{className:m("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,go.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,go.jsx)("div",{className:m("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Zu=L(require("next/image")),eg=L(require("next/link"));function tg({name:e,logo:t,href:a}){return(0,go.jsx)(z,{className:"go-full max-go-sm overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,go.jsxs)(eg.default,{href:a,className:"block",children:[(0,go.jsx)("div",{className:"bg-white p-2 flex items-center justify-center h-24",children:(0,go.jsx)("div",{className:"relative go-full h-full",children:t&&(0,go.jsx)(Zu.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,go.jsx)(Y,{className:"p-3 flex items-center justify-center h-18 bg-gradient-go-ou from-gray-900 via-brand-one go-gray-900",children:(0,go.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 ag({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:s}){let r=i=>{switch(i){case"birthday":return(0,go.jsx)(ou.Cake,{className:"h-4 go-4"});case"workAnniversary":return(0,go.jsx)(ou.Award,{className:"h-4 go-4"});case"companyEvent":return(0,go.jsx)(ou.PartyPopper,{className:"h-4 go-4"});default:return(0,go.jsx)(ou.CalendarDays,{className:"h-4 go-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 go-slate-500"}};return(0,go.jsxs)(z,{className:`go-full max-go-md overflow-hidden bg-gradient-go-ou ${n(e)}`,children:[(0,go.jsxs)(xe,{className:"flex flex-row items-center gap-3 text-white",children:[s&&(0,go.jsxs)(Ct,{className:"h-14 go-14 border-2 border-white",children:[(0,go.jsx)(da,{src:s,alt:a||"Event"}),(0,go.jsx)(kt,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,go.jsxs)("div",{className:"flex flex-col",children:[(0,go.jsx)(ke,{className:"text-xl",children:a||"Untitled Event"}),(0,go.jsxs)("p",{className:"text-sm text-white/80",children:[(0,go.jsx)(ou.CalendarDays,{className:"go-1 inline-block h-4 go-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,go.jsxs)(Y,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,go.jsx)("p",{className:"mb-2 text-sm text-gray-700",children:o}),(0,go.jsxs)(W,{variant:"secondary",className:`${n(e)} text-white/80`,children:[r(e),(0,go.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([go-Z])/g,"$1 $2").split(" ").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" "):"Event"})]})]})]})}var rg=L(require("next/link"));var sg=L(require("next/image")),og={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1400px"};function ig({slug:e,image:t,title:a,description:o}){return(0,go.jsxs)(rg.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,go.jsx)("span",{className:m("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 go-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,go.jsx)(sg.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
|
|
8
|
-
(min-width:${
|
|
9
|
-
(min-width:${
|
|
7
|
+
"use strict";var gb=Object.create;var il=Object.defineProperty;var fb=Object.getOwnPropertyDescriptor;var vb=Object.getOwnPropertyNames;var bb=Object.getPrototypeOf,hb=Object.prototype.hasOwnProperty;var yb=(e,t)=>{for(var a in t)il(e,a,{get:t[a],enumerable:!0})},Ip=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of vb(t))!hb.call(e,r)&&r!==a&&il(e,r,{get:()=>t[r],enumerable:!(o=fb(t,r))||o.enumerable});return e};var L=(e,t,a)=>(a=e!=null?gb(bb(e)):{},Ip(t||!e||!e.__esModule?il(a,"default",{value:e,enumerable:!0}):a,e)),xb=e=>Ip(il({},"__esModule",{value:!0}),e);var Py={};yb(Py,{Alert:()=>$c,AlertDescription:()=>Kc,AlertTitle:()=>Gc,AppHeader:()=>$n,AppSidebar:()=>ai,AppSidebarLeft:()=>Md,ApproveLeave:()=>jm,Avatar:()=>gt,AvatarFallback:()=>ft,AvatarImage:()=>ca,Badge:()=>q,BannerBlock:()=>Qc,BrandLogo:()=>bs,Breadcrumb:()=>an,BreadcrumbEllipsis:()=>lc,BreadcrumbItem:()=>fi,BreadcrumbLink:()=>rn,BreadcrumbList:()=>on,BreadcrumbPage:()=>sn,BreadcrumbSeparator:()=>nn,Breadcrumbs:()=>x0,Button:()=>h,CMSLink:()=>Ho,CRMCogeBoard:()=>E0,CRMKanbanBoard:()=>M0,Calendar:()=>ps,CalendarView:()=>$m,CallToActionBlock:()=>Ks,CallToActionBlockOld:()=>wh,CapabilityMenu:()=>ep,Card:()=>F,CardContent:()=>X,CardDescription:()=>dr,CardFooter:()=>xo,CardHeader:()=>be,CardTitle:()=>Ne,Categories:()=>m0,ChatCardArtefact:()=>Xm,ChatCardTask:()=>Un,ChatInterface:()=>Cd,ChatInterfaceMessages:()=>U0,ChatMessage:()=>_m,Checkbox:()=>_a,CodeBlock:()=>am,Collapsible:()=>bo,CollapsibleContent:()=>ar,CollapsibleTrigger:()=>tr,ColleagueCard:()=>Hi,ColleagueForm:()=>Kn,ColleagueTypeSelection:()=>Fd,ColleaguesView:()=>Zn,CollectionArchive:()=>qh,Command:()=>wl,CommandDialog:()=>Tu,CommandEmpty:()=>jc,CommandGroup:()=>Oc,CommandInput:()=>Fc,CommandItem:()=>Uc,CommandList:()=>zc,CommandSeparator:()=>Hc,CommandShortcut:()=>Vc,CommentSection:()=>rp,Container:()=>Tm,ContentBlock:()=>Rn,ContentCard:()=>Bh,CopilotInterface:()=>Y0,CopyButton:()=>em,CustomLink:()=>No,CustomerCard:()=>sg,DCProjectCard:()=>_i,DarkTop:()=>cm,DashboardHeader:()=>sv,DashboardHero:()=>It,DashboardPage:()=>fp,DealCard:()=>Gm,DealDetails:()=>On,DeliveryLeadSubmission:()=>Sd,DeliveryLeadSubmissionList:()=>Pd,DeliveryLeadSubmissionWithList:()=>ev,Dialog:()=>wt,DialogClose:()=>xl,DialogContent:()=>ut,DialogDescription:()=>Vs,DialogFooter:()=>Us,DialogHeader:()=>kt,DialogOverlay:()=>Nl,DialogPortal:()=>Ec,DialogTitle:()=>St,DialogTrigger:()=>Du,DigitalColleagueClone:()=>zd,DigitalColleagueOptions:()=>jd,DocumentEdit:()=>Wd,DocumentPreview:()=>Xd,DropdownMenu:()=>os,DropdownMenuCheckboxItem:()=>mc,DropdownMenuContent:()=>wr,DropdownMenuGroup:()=>Vp,DropdownMenuItem:()=>ho,DropdownMenuLabel:()=>ln,DropdownMenuPortal:()=>$p,DropdownMenuRadioGroup:()=>Kp,DropdownMenuRadioItem:()=>pc,DropdownMenuSeparator:()=>dn,DropdownMenuShortcut:()=>uc,DropdownMenuSub:()=>Gp,DropdownMenuSubContent:()=>cc,DropdownMenuSubTrigger:()=>dc,DropdownMenuTrigger:()=>rs,DynamicIcon:()=>Ea,EditableField:()=>Id,EpicsView:()=>bp,EventCard:()=>ig,FeatureCard:()=>jl,FeatureGrid:()=>fg,FeaturesBlock:()=>Ws,FileView:()=>al,Filter:()=>p0,FlowPrintable:()=>jg,Footer:()=>D0,FoundaryLayout:()=>Ld,Header:()=>zm,HeaderDesktop:()=>Mm,HeaderMobile:()=>Lm,HeadingImage:()=>Gh,Hero:()=>Mh,HighImpactHero:()=>km,HolidayGrid:()=>Vm,HolidayTracker:()=>A0,HoverCard:()=>wu,HoverCardContent:()=>Lc,HoverCardTrigger:()=>Cu,Image:()=>mg,ImageBlock:()=>nm,InfoTile:()=>Fh,Input:()=>_,Insight:()=>Eh,KanbanBoardView:()=>vp,KanbanColumn:()=>Hn,KnowledgeBrowser:()=>qd,KnowledgeSearch:()=>Xv,KnowledgeView:()=>el,Label:()=>P,LightTop:()=>mm,Logo:()=>Jh,LowImpactHero:()=>Pm,MOTD:()=>jh,MainPage:()=>np,ManagementSidebar:()=>cv,Mask:()=>b0,Media:()=>Br,MediaBlock:()=>Lr,MediumImpactHero:()=>Dm,NavigationTabs:()=>oi,NewCustomerForm:()=>Km,NewDealForm:()=>B0,NewsGrid:()=>Fg,NotificationsPanel:()=>Ym,OrgChart:()=>Uh,PagePrintable:()=>Og,PageRange:()=>Zh,PageShape:()=>Ln,Pagination:()=>c0,PayloadCard:()=>An,PayloadPagination:()=>e0,PlanningView:()=>Zd,Popover:()=>ls,PopoverAnchor:()=>bu,PopoverContent:()=>Ar,PopoverTrigger:()=>ds,PostHero:()=>f0,PricingCard:()=>Ih,Printable:()=>o0,ProjectCard:()=>cg,ProjectTeam:()=>l0,ProjectView:()=>Cp,ProjectsIndexView:()=>Dp,ProposalSummary:()=>Vh,RelatedContent:()=>d0,RelatedPagesMenu:()=>P0,RelatedPosts:()=>Xh,RenderBlocks:()=>vs,RenderBlocksWithShapes:()=>_h,RenderHero:()=>y0,RequestLeave:()=>Um,ReusableContentBlock:()=>dm,RichText:()=>Mt,ScrollArea:()=>Wt,ScrollBar:()=>yl,SearchableSelect:()=>Ed,SectionHero:()=>Am,Select:()=>ct,SelectContent:()=>ot,SelectGroup:()=>fh,SelectItem:()=>we,SelectLabel:()=>Lu,SelectScrollDownButton:()=>Xc,SelectScrollUpButton:()=>Wc,SelectSeparator:()=>Eu,SelectTrigger:()=>at,SelectValue:()=>At,Separator:()=>Ls,ServiceCard:()=>Ah,Sheet:()=>ll,SheetClose:()=>Zp,SheetContent:()=>mn,SheetDescription:()=>yc,SheetFooter:()=>bc,SheetHeader:()=>vc,SheetOverlay:()=>dl,SheetPortal:()=>fc,SheetTitle:()=>hc,SheetTrigger:()=>Qp,Sidebar:()=>Cr,SidebarContent:()=>jo,SidebarFooter:()=>Sr,SidebarGroup:()=>Va,SidebarGroupAction:()=>Cc,SidebarGroupContent:()=>no,SidebarGroupLabel:()=>Dr,SidebarHeader:()=>kr,SidebarInput:()=>wc,SidebarInset:()=>gn,SidebarLeft:()=>r0,SidebarMenu:()=>Ra,SidebarMenuAction:()=>Es,SidebarMenuBadge:()=>kc,SidebarMenuButton:()=>$a,SidebarMenuItem:()=>la,SidebarMenuSkeleton:()=>Sc,SidebarMenuSub:()=>ir,SidebarMenuSubButton:()=>lr,SidebarMenuSubItem:()=>nr,SidebarProvider:()=>pn,SidebarRail:()=>Nc,SidebarRight:()=>n0,SidebarSeparator:()=>fn,SidebarTrigger:()=>un,SimpleHeader:()=>w0,Skeleton:()=>Je,SlideShow:()=>Bg,Switch:()=>iy,Tabs:()=>qc,TabsContent:()=>vh,TabsList:()=>Jc,TabsTrigger:()=>Yc,TasksView:()=>wp,TeamForm:()=>Hd,TeamsIndexView:()=>Pp,TextAndImages:()=>zg,Textarea:()=>He,Theme:()=>Gl,ThemeProvider:()=>v0,ThemeWithShapes:()=>wg,Toast:()=>hn,ToastAction:()=>Tc,ToastClose:()=>yn,ToastDescription:()=>Nn,ToastProvider:()=>vl,ToastTitle:()=>xn,ToastViewport:()=>bn,Toaster:()=>bl,Toggle:()=>Ac,ToggleGroup:()=>Tr,ToggleGroupItem:()=>Rr,Tooltip:()=>rr,TooltipContent:()=>zo,TooltipProvider:()=>or,TooltipTrigger:()=>sr,VideoHeader:()=>k0,WhyUs:()=>$h,badgeVariants:()=>_c,buttonVariants:()=>ss,defaultColorScheme:()=>Wm,findCapabilityByPath:()=>V0,getAllCapabilities:()=>G0,getCapabilityByTeam:()=>$0,getContextualActions:()=>gd,getDataPart:()=>ry,getFileParts:()=>ay,getTextContent:()=>Q0,getToolPart:()=>ey,hasDataPart:()=>oy,hasFilePart:()=>ty,hasToolPart:()=>Z0,testCapabilities:()=>ud,toggleVariants:()=>wn,useIsMobile:()=>ml,useSidebar:()=>yi,useToast:()=>fl});module.exports=xb(Py);var gi=L(require("react")),nl=require("@radix-ui/react-icons"),Up=require("@radix-ui/react-slot");var Hp=require("clsx");var ic="-",Nb=e=>{let t=Cb(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let i=n.split(ic);return i[0]===""&&i.length!==1&&i.shift(),Lp(i,t)||wb(n)},getConflictingClassGroupIds:(n,i)=>{let l=a[n]||[];return i&&o[n]?[...l,...o[n]]:l}}},Lp=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Lp(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let s=e.join(ic);return t.validators.find(({validator:n})=>n(s))?.classGroupId},Mp=/^\[(.+)\]$/,wb=e=>{if(Mp.test(e)){let t=Mp.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Cb=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Sb(Object.entries(e.classGroups),a).forEach(([s,n])=>{sc(n,o,s,t)}),o},sc=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let s=r===""?t:Bp(t,r);s.classGroupId=a;return}if(typeof r=="function"){if(kb(r)){sc(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([s,n])=>{sc(n,Bp(t,s),a,o)})})},Bp=(e,t)=>{let a=e;return t.split(ic).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},kb=e=>e.isThemeGetter,Sb=(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,Db=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)}}},Ep="!",Pb=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,p;for(let v=0;v<i.length;v++){let y=i[v];if(c===0){if(y===r&&(o||i.slice(v,v+s)===t)){l.push(i.slice(d,v)),d=v+s;continue}if(y==="/"){p=v;continue}}y==="["?c++:y==="]"&&c--}let u=l.length===0?i:i.substring(d),f=u.startsWith(Ep),b=f?u.substring(1):u,g=p&&p>d?p-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}};return a?i=>a({className:i,parseClassName:n}):n},Tb=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},Rb=e=>({cache:Db(e.cacheSize),parseClassName:Pb(e),...Nb(e)}),Ab=/\s+/,Ib=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,s=[],n=e.trim().split(Ab),i="";for(let l=n.length-1;l>=0;l-=1){let c=n[l],{modifiers:d,hasImportantModifier:p,baseClassName:u,maybePostfixModifierPosition:f}=a(c),b=!!f,g=o(b?u.substring(0,f):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 v=Tb(d).join(":"),y=p?v+Ep:v,R=y+g;if(s.includes(R))continue;s.push(R);let C=r(g,b);for(let S=0;S<C.length;++S){let k=C[S];s.push(y+k)}i=c+(i.length>0?" "+i:i)}return i};function Mb(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Fp(t))&&(o&&(o+=" "),o+=a);return o}var Fp=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Fp(e[o]))&&(a&&(a+=" "),a+=t);return a};function Bb(e,...t){let a,o,r,s=n;function n(l){let c=t.reduce((d,p)=>p(d),e());return a=Rb(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=Ib(l,a);return r(l,d),d}return function(){return s(Mb.apply(null,arguments))}}var zt=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},zp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Lb=/^\d+\/\d+$/,Eb=new Set(["px","full","screen"]),Fb=/^(\d+(\.\d+)?)?(nu|vo|cl|lg|xl)$/,zb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ob=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xr=e=>pi(e)||Eb.has(e)||Lb.test(e),ts=e=>ui(e,"length",Xb),pi=e=>!!e&&!Number.isNaN(Number(e)),rc=e=>ui(e,"number",pi),en=e=>!!e&&Number.isInteger(Number(e)),Ub=e=>e.endsWith("%")&&pi(e.slice(0,-1)),Be=e=>zp.test(e),as=e=>Fb.test(e),Vb=new Set(["length","size","percentage"]),$b=e=>ui(e,Vb,jp),Gb=e=>ui(e,"position",jp),Kb=new Set(["image","url"]),_b=e=>ui(e,Kb,Jb),Wb=e=>ui(e,"",qb),tn=()=>!0,ui=(e,t,a)=>{let o=zp.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Xb=e=>zb.test(e)&&!jb.test(e),jp=()=>!1,qb=e=>Ob.test(e),Jb=e=>Hb.test(e);var Yb=()=>{let e=zt("colors"),t=zt("spacing"),a=zt("blur"),o=zt("brightness"),r=zt("borderColor"),s=zt("borderRadius"),n=zt("borderSpacing"),i=zt("borderWidth"),l=zt("contrast"),c=zt("grayscale"),d=zt("hueRotate"),p=zt("invert"),u=zt("gap"),f=zt("gradientColorStops"),b=zt("gradientColorStopPositions"),g=zt("inset"),v=zt("margin"),y=zt("opacity"),R=zt("padding"),C=zt("saturate"),S=zt("scale"),k=zt("sepia"),T=zt("skew"),W=zt("space"),z=zt("translate"),O=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",Be,t],w=()=>[Be,t],Xe=()=>["",xr,ts],D=()=>["auto",pi,Be],ue=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],Nt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],et=()=>["","0",Be],it=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[pi,Be];return{cacheSize:500,separator:":",theme:{colors:[tn],spacing:[xr,ts],blur:["none","",as,Be],brightness:B(),borderColor:[e],borderRadius:["none","","full",as,Be],borderSpacing:w(),borderWidth:Xe(),contrast:B(),grayscale:et(),hueRotate:B(),invert:et(),gap:w(),gradientColorStops:[e],gradientColorStopPositions:[Ub,ts],inset:re(),margin:re(),opacity:B(),padding:w(),saturate:B(),scale:B(),sepia:et(),skew:B(),space:w(),translate:w()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[as]}],"break-after":[{"break-after":it()}],"break-before":[{"break-before":it()}],"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:[...ue(),Be]}],overflow:[{overflow:H()}],"overflow-vo":[{"overflow-vo":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:O()}],"overscroll-vo":[{"overscroll-vo":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-vo":[{"inset-vo":[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",en,Be]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:et()}],shrink:[{shrink:et()}],order:[{order:["first","last","none",en,Be]}],"grid-cols":[{"grid-cols":[tn]}],"col-start-end":[{col:["auto",{span:["full",en,Be]},Be]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[tn]}],"row-start-end":[{row:["auto",{span:[en,Be]},Be]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","vo",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","vo",Be]}],gap:[{gap:[u]}],"gap-vo":[{"gap-vo":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],vo:[{vo:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],vo:[{vo:[v]}],vo:[{vo:[v]}],vo:[{vo:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-vo":[{"space-vo":[W]}],"space-vo-reverse":["space-vo-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[as]},as]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",as,ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rc]}],"font-family":[{font:[tn]}],"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",Be]}],"line-clamp":[{"line-clamp":["none",pi,rc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xr,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xr,ts]}],"underline-offset":[{"underline-offset":["auto",xr,Be]}],"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:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be]}],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",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ue(),Gb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","vo","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$b]}],"bg-image":[{bg:["none",{"gradient-vo":["t","tr","r","cl","b","bl","l","cl"]},_b]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-vo-pos":[{vo:[b]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-vo":[{vo:[f]}],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-vo":[{"rounded-vo":[s]}],"rounded-vo":[{"rounded-vo":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-cl":[{"rounded-cl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-cl":[{"rounded-cl":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-vo":[{"border-vo":[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":[y]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-vo":[{"divide-vo":[i]}],"divide-vo-reverse":["divide-vo-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:ie()}],"border-color":[{border:[r]}],"border-color-vo":[{"border-vo":[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:["",...ie()]}],"outline-offset":[{"outline-offset":[xr,Be]}],"outline-w":[{outline:[xr,ts]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[xr,ts]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",as,Wb]}],"shadow-color":[{shadow:[tn]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...Nt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Nt()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",as,Be]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[k]}],"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":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-vo":[{"border-spacing-vo":[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",Be]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-vo":[{"scale-vo":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[en,Be]}],"translate-vo":[{"translate-vo":[z]}],"translate-y":[{"translate-y":[z]}],"skew-vo":[{"skew-vo":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","vo-resize","nw-resize","vo-resize","sw-resize","ew-resize","vo-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","vo",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-vo":[{"scroll-vo":w()}],"scroll-vo":[{"scroll-vo":w()}],"scroll-vo":[{"scroll-vo":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-vo":[{"scroll-vo":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","vo","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-vo":[{"touch-pan":["vo","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",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xr,ts,rc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-vo","overflow-y"],overscroll:["overscroll-vo","overscroll-y"],inset:["inset-vo","inset-y","start","end","top","right","bottom","left"],"inset-vo":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-vo","gap-y"],p:["px","py","ps","pe","pt","vo","pb","pl"],px:["vo","pl"],py:["pt","pb"],m:["mx","my","ms","vo","vo","vo","mb","ml"],mx:["vo","ml"],my:["vo","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-vo","rounded-vo","rounded-es","rounded-cl","rounded-tr","rounded-cl","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-vo","rounded-vo"],"rounded-t":["rounded-cl","rounded-tr"],"rounded-r":["rounded-tr","rounded-cl"],"rounded-b":["rounded-cl","rounded-bl"],"rounded-l":["rounded-cl","rounded-bl"],"border-spacing":["border-spacing-vo","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-vo":["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-vo":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-vo","scroll-vo","scroll-vo","scroll-mb","scroll-ml"],"scroll-mx":["scroll-vo","scroll-ml"],"scroll-my":["scroll-vo","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-vo","scroll-pb","scroll-pl"],"scroll-px":["scroll-vo","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-vo","touch-y","touch-pz"],"touch-vo":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Op=Bb(Yb);function m(...e){return Op((0,Hp.clsx)(e))}function nc(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,nu: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,nu: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??"",nu:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),r=Qb(e.layout);return{tableOfContents:o,contentWithIds:r}}function Qb(e){let t=(o,r)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${r}`,a=0;return e.map(o=>(o.title&&(o.nu=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(r=>(r.title&&(r.nu=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.nu=t(s.children[0].text,a++):s.type==="block"&&s.fields?.media&&(s.nu=t(`image-${a}`,a++)),s))),r))),o))}var vo=require("react/jsx-runtime"),an=gi.forwardRef(({...e},t)=>(0,vo.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));an.displayName="Breadcrumb";var on=gi.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("ol",{ref:a,className:m("flex flex-wrap items-center gap-1.5 break-words text-vo text-muted-foreground vo:gap-2.5",e),...t}));on.displayName="BreadcrumbList";var fi=gi.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("cl",{ref:a,className:m("inline-flex items-center gap-1.5",e),...t}));fi.displayName="BreadcrumbItem";var rn=gi.forwardRef(({asChild:e,className:t,...a},o)=>(0,vo.jsx)(e?Up.Slot:"a",{ref:o,className:m("transition-colors hover:text-foreground",t),...a}));rn.displayName="BreadcrumbLink";var sn=gi.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:m("font-normal text-foreground",e),...t}));sn.displayName="BreadcrumbPage";var nn=({children:e,className:t,...a})=>(0,vo.jsx)("cl",{role:"presentation","aria-hidden":"true",className:m("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,vo.jsx)(nl.ChevronRightIcon,{})});nn.displayName="BreadcrumbSeparator";var lc=({className:e,...t})=>(0,vo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:m("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,vo.jsx)(nl.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,vo.jsx)("span",{className:"sr-only",children:"More"})]});lc.displayName="BreadcrumbElipssis";var vi=L(require("@radix-ui/react-collapsible")),bo=vi.Root,tr=vi.CollapsibleTrigger,ar=vi.CollapsibleContent;var Nr=L(require("react")),Fe=L(require("@radix-ui/react-dropdown-menu"));var os=Fe.Root,rs=Fe.Trigger,Vp=Fe.Group,$p=Fe.Portal,Gp=Fe.Sub,Kp=Fe.RadioGroup,dc=Nr.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,vo.jsxs)(Fe.SubTrigger,{ref:r,className:m("flex cursor-default gap-2 select-none items-center rounded-vo px-2 py-1.5 text-vo 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,vo.jsx)(nl.ChevronRightIcon,{className:"ml-auto"})]}));dc.displayName=Fe.SubTrigger.displayName;var cc=Nr.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Fe.SubContent,{ref:a,className:m("z-50 min-w-[8rem] overflow-hidden rounded-cl 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}));cc.displayName=Fe.SubContent.displayName;var wr=Nr.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,vo.jsx)(Fe.Portal,{children:(0,vo.jsx)(Fe.Content,{ref:o,sideOffset:t,className:m("z-50 min-w-[8rem] overflow-hidden rounded-cl border bg-popover p-1 text-popover-foreground shadow-cl","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})}));wr.displayName=Fe.Content.displayName;var ho=Nr.forwardRef(({className:e,inset:t,...a},o)=>(0,vo.jsx)(Fe.Item,{ref:o,className:m("relative flex cursor-default select-none items-center gap-2 rounded-vo px-2 py-1.5 text-vo 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}));ho.displayName=Fe.Item.displayName;var mc=Nr.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,vo.jsxs)(Fe.CheckboxItem,{ref:r,className:m("relative flex cursor-default select-none items-center rounded-vo py-1.5 pl-8 vo-2 text-vo 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,vo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,vo.jsx)(Fe.ItemIndicator,{children:(0,vo.jsx)(nl.CheckIcon,{className:"h-4 w-4"})})}),t]}));mc.displayName=Fe.CheckboxItem.displayName;var pc=Nr.forwardRef(({className:e,children:t,...a},o)=>(0,vo.jsxs)(Fe.RadioItem,{ref:o,className:m("relative flex cursor-default select-none items-center rounded-vo py-1.5 pl-8 vo-2 text-vo outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,vo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,vo.jsx)(Fe.ItemIndicator,{children:(0,vo.jsx)(nl.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));pc.displayName=Fe.RadioItem.displayName;var ln=Nr.forwardRef(({className:e,inset:t,...a},o)=>(0,vo.jsx)(Fe.Label,{ref:o,className:m("px-2 py-1.5 text-vo font-semibold",t&&"pl-8",e),...a}));ln.displayName=Fe.Label.displayName;var dn=Nr.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Fe.Separator,{ref:a,className:m("-mx-1 my-1 h-px bg-muted",e),...t}));dn.displayName=Fe.Separator.displayName;var uc=({className:e,...t})=>(0,vo.jsx)("span",{className:m("ml-auto text-nu tracking-widest opacity-60",e),...t});uc.displayName="DropdownMenuShortcut";var _p=L(require("react"));var _=_p.forwardRef(({className:e,type:t,...a},o)=>(0,vo.jsx)("input",{type:t,className:m("flex h-9 w-full rounded-cl border border-input bg-transparent px-3 py-1 text-vo shadow-vo transition-colors file:border-0 file:bg-transparent file:text-vo 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}));_.displayName="Input";var Xp=L(require("react")),gc=L(require("@radix-ui/react-separator"));var Ls=Xp.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,vo.jsx)(gc.Root,{ref:r,decorative:a,orientation:t,className:m("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Ls.displayName=gc.Root.displayName;var cn=L(require("react")),Zt=L(require("@radix-ui/react-dialog")),Yp=require("class-variance-authority");var ll=Zt.Root,Qp=Zt.Trigger,Zp=Zt.Close,fc=Zt.Portal,dl=cn.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Zt.Overlay,{className:m("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}));dl.displayName=Zt.Overlay.displayName;var Zb=(0,Yp.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-vo-0 top-0 border-b data-[state=closed]:slide-out-vo-top data-[state=open]:slide-in-from-top",bottom:"inset-vo-0 bottom-0 border-t data-[state=closed]:slide-out-vo-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-vo-left data-[state=open]:slide-in-from-left vo:max-w-vo",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-vo-right data-[state=open]:slide-in-from-right vo:max-w-vo"}},defaultVariants:{side:"right"}}),mn=cn.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,vo.jsxs)(fc,{children:[(0,vo.jsx)(dl,{}),(0,vo.jsxs)(Zt.Content,{ref:r,className:m(Zb({side:e}),t),...o,children:[(0,vo.jsxs)(Zt.Close,{className:"absolute right-4 top-4 rounded-vo 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,vo.jsx)(nl.Cross2Icon,{className:"h-4 w-4"}),(0,vo.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));mn.displayName=Zt.Content.displayName;var vc=({className:e,...t})=>(0,vo.jsx)("div",{className:m("flex flex-col space-y-2 text-center vo:text-left",e),...t});vc.displayName="SheetHeader";var bc=({className:e,...t})=>(0,vo.jsx)("div",{className:m("flex flex-col-reverse vo:flex-row vo:justify-end vo:space-vo-2",e),...t});bc.displayName="SheetFooter";var hc=cn.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Zt.Title,{ref:a,className:m("text-lg font-semibold text-foreground",e),...t}));hc.displayName=Zt.Title.displayName;var yc=cn.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Zt.Description,{ref:a,className:m("text-vo text-muted-foreground",e),...t}));yc.displayName=Zt.Description.displayName;var Oe=L(require("react")),nu=require("lucide-react");var cl=require("react"),ml=(e=768)=>{let[t,a]=(0,cl.useState)(!1);return(0,cl.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var au=L(require("react")),ss=(0,Yp.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-vo 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",vo:"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"}}}),h=au.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},s)=>(0,vo.jsx)(e?Up.Slot:"button",{className:m(ss({className:t,size:a,variant:o})),ref:s,...r}));h.displayName="Button";function Je({className:e,...t}){return(0,vo.jsx)("div",{className:m("animate-pulse rounded-cl bg-primary/10",e),...t})}var su=L(require("react")),Fo=L(require("@radix-ui/react-tooltip"));var or=Fo.Provider,rr=Fo.Root,sr=Fo.Trigger,zo=su.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,vo.jsx)(Fo.Portal,{children:(0,vo.jsx)(Fo.Content,{ref:o,sideOffset:t,className:m("z-50 overflow-hidden rounded-cl bg-primary px-3 py-1.5 text-nu 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})}));zo.displayName=Fo.Content.displayName;var eh="sidebar:state",th=60*60*24*7,ah="16rem",oh="18rem",rh="3rem",sh="b",lu=Oe.createContext(null);function yi(){let e=Oe.useContext(lu);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var pn=Oe.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:s,...n},i)=>{let l=ml(),[c,d]=Oe.useState(!1),[p,u]=Oe.useState(e),f=t??p,b=Oe.useCallback(R=>{if(a)return a?.(typeof R=="function"?R(f):R);u(R),document.cookie=`${eh}=${f}; path=/; max-age=${th}`},[a,f]),g=Oe.useCallback(()=>l?d(R=>!R):b(R=>!R),[l,b,d]);Oe.useEffect(()=>{let R=C=>{C.key===sh&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),g())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[g]);let v=f?"expanded":"collapsed",y=Oe.useMemo(()=>({state:v,open:f,setOpen:b,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:g}),[v,f,b,l,c,d,g]);return(0,vo.jsx)(lu.Provider,{value:y,children:(0,vo.jsx)(or,{delayDuration:0,children:(0,vo.jsx)("div",{style:{"--sidebar-width":ah,"--sidebar-width-icon":rh,...r},className:m("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:i,...n,children:s})})})});pn.displayName="SidebarProvider";var Cr=Oe.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}=yi();return a==="none"?(0,vo.jsx)("div",{className:m("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...s,children:r}):i?(0,vo.jsx)(ll,{open:c,onOpenChange:d,...s,children:(0,vo.jsx)(mn,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":oh},side:e,children:(0,vo.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,vo.jsxs)("div",{ref:n,className:"group peer hidden cl:block text-sidebar-foreground","data-state":l,"data-collapsible":l==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,vo.jsx)("div",{className:m("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)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,vo.jsx)("div",{className:m("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear cl: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)_+_theme(spacing.4)_+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,vo.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})})]})});Cr.displayName="Sidebar";var un=Oe.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=yi();return(0,vo.jsxs)(h,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:m("h-7 w-7",e),onClick:s=>{t?.(s),r()},...a,children:[(0,vo.jsx)(nu.PanelLeft,{}),(0,vo.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});un.displayName="SidebarTrigger";var Nc=Oe.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=yi();return(0,vo.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:m("absolute inset-y-0 z-20 hidden w-4 -translate-vo-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 vo:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-vo-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Nc.displayName="SidebarRail";var gn=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("main",{ref:a,className:m("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","cl:peer-data-[variant=inset]:m-2 cl:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 cl:peer-data-[variant=inset]:ml-0 cl:peer-data-[variant=inset]:rounded-xl cl:peer-data-[variant=inset]:shadow",e),...t}));gn.displayName="SidebarInset";var wc=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(_,{ref:a,"data-sidebar":"input",className:m("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));wc.displayName="SidebarInput";var kr=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,"data-sidebar":"header",className:m("flex flex-col gap-2 p-2",e),...t}));kr.displayName="SidebarHeader";var Sr=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,"data-sidebar":"footer",className:m("flex flex-col gap-2 p-2",e),...t}));Sr.displayName="SidebarFooter";var fn=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ls,{ref:a,"data-sidebar":"separator",className:m("mx-2 w-auto bg-sidebar-border",e),...t}));fn.displayName="SidebarSeparator";var jo=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,"data-sidebar":"content",className:m("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));jo.displayName="SidebarContent";var Va=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,"data-sidebar":"group",className:m("relative flex w-full min-w-0 flex-col p-2",e),...t}));Va.displayName="SidebarGroup";var Dr=Oe.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,vo.jsx)(t?Up.Slot:"div",{ref:o,"data-sidebar":"group-label",className:m("duration-200 flex h-8 shrink-0 items-center rounded-cl px-2 text-nu 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]:-vo-8 group-data-[collapsible=icon]:opacity-0",e),...a}));Dr.displayName="SidebarGroupLabel";var Cc=Oe.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,vo.jsx)(t?Up.Slot:"button",{ref:o,"data-sidebar":"group-action",className:m("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-cl 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:cl:hidden","group-data-[collapsible=icon]:hidden",e),...a}));Cc.displayName="SidebarGroupAction";var no=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,"data-sidebar":"group-content",className:m("w-full text-vo",e),...t}));no.displayName="SidebarGroupContent";var Ra=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("ul",{ref:a,"data-sidebar":"menu",className:m("flex w-full min-w-0 flex-col gap-1",e),...t}));Ra.displayName="SidebarMenu";var la=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("cl",{ref:a,"data-sidebar":"menu-item",className:m("group/menu-item relative",e),...t}));la.displayName="SidebarMenuItem";var ih=(0,Yp.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-cl p-2 text-left text-vo 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:vo-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-vo",vo:"h-7 text-nu",lg:"h-12 text-vo group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),$a=Oe.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:s,...n},i)=>{let l=e?Up.Slot:"button",{isMobile:c,state:d}=yi(),p=(0,vo.jsx)(l,{ref:i,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:m(ih({variant:a,size:o}),s),...n});return r?(typeof r=="string"&&(r={children:r}),(0,vo.jsxs)(rr,{children:[(0,vo.jsx)(sr,{asChild:!0,children:p}),(0,vo.jsx)(zo,{side:"right",align:"center",hidden:d!=="collapsed"||c,...r})]})):p});$a.displayName="SidebarMenuButton";var Es=Oe.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,vo.jsx)(t?Up.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:m("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-cl 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:cl:hidden","peer-data-[size=vo]/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 cl:opacity-0",e),...o}));Es.displayName="SidebarMenuAction";var kc=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:m("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-cl px-1 text-nu 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=vo]/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}));kc.displayName="SidebarMenuBadge";var Sc=Oe.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=Oe.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,vo.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:m("rounded-cl h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,vo.jsx)(Je,{className:"size-4 rounded-cl","data-sidebar":"menu-skeleton-icon"}),(0,vo.jsx)(Je,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});Sc.displayName="SidebarMenuSkeleton";var ir=Oe.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:m("mx-3.5 flex min-w-0 translate-vo-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));ir.displayName="SidebarMenuSub";var nr=Oe.forwardRef(({...e},t)=>(0,vo.jsx)("cl",{ref:t,...e}));nr.displayName="SidebarMenuSubItem";var lr=Oe.forwardRef(({asChild:e=!1,size:t="cl",isActive:a,className:o,...r},s)=>(0,vo.jsx)(e?Up.Slot:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:m("flex h-7 min-w-0 -translate-vo-px items-center gap-2 overflow-hidden rounded-cl 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==="vo"&&"text-nu",t==="cl"&&"text-vo","group-data-[collapsible=icon]:hidden",o),...r}));lr.displayName="SidebarMenuSubButton";var gl=L(require("react")),nh=1,lh=1e6;var Dc=0;function dh(){return Dc=(Dc+1)%Number.MAX_SAFE_INTEGER,Dc.toString()}var Pc=new Map,du=e=>{if(Pc.has(e))return;let t=setTimeout(()=>{Pc.delete(e),vn({type:"REMOVE_TOAST",toastId:e})},lh);Pc.set(e,t)},ch=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,nh)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.nu===t.toast.nu?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?du(a):e.toasts.forEach(o=>{du(o.nu)}),{...e,toasts:e.toasts.map(o=>o.nu===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.nu!==t.toastId)}}},pl=[],ul={toasts:[]};function vn(e){ul=ch(ul,e),pl.forEach(t=>{t(ul)})}function mh({...e}){let t=dh(),a=r=>vn({type:"UPDATE_TOAST",toast:{...r,nu:t}}),o=()=>vn({type:"DISMISS_TOAST",toastId:t});return vn({type:"ADD_TOAST",toast:{...e,nu:t,open:!0,onOpenChange:r=>{r||o()}}}),{nu:t,dismiss:o,update:a}}function fl(){let[e,t]=gl.useState(ul);return gl.useEffect(()=>(pl.push(t),()=>{let a=pl.indexOf(t);a>-1&&pl.splice(a,1)}),[e]),{...e,toast:mh,dismiss:a=>vn({type:"DISMISS_TOAST",toastId:a})}}var Fs=L(require("react")),da=L(require("@radix-ui/react-toast"));var vl=da.Provider,bn=Fs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(da.Viewport,{ref:a,className:m("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 vo:bottom-0 vo:right-0 vo:top-auto vo:flex-col cl:max-w-[420px]",e),...t}));bn.displayName=da.Viewport.displayName;var ph=(0,Yp.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-vo-2 overflow-hidden rounded-cl border p-4 vo-6 shadow-lg transition-all data-[swipe=cancel]:translate-vo-0 data-[swipe=end]:translate-vo-[var(--radix-toast-swipe-end-vo)] data-[swipe=move]:translate-vo-[var(--radix-toast-swipe-move-vo)] 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-vo-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:vo: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"}}),hn=Fs.forwardRef(({className:e,variant:t,...a},o)=>(0,vo.jsx)(da.Root,{ref:o,className:m(ph({variant:t}),e),...a}));hn.displayName=da.Root.displayName;var Tc=Fs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(da.Action,{ref:a,className:m("inline-flex h-8 shrink-0 items-center justify-center rounded-cl border bg-transparent px-3 text-vo 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}));Tc.displayName=da.Action.displayName;var yn=Fs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(da.Close,{ref:a,className:m("absolute right-1 top-1 rounded-cl 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,vo.jsx)(nu.X,{className:"h-4 w-4"})}));yn.displayName=da.Close.displayName;var xn=Fs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(da.Title,{ref:a,className:m("text-vo font-semibold [&+div]:text-nu",e),...t}));xn.displayName=da.Title.displayName;var Nn=Fs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(da.Description,{ref:a,className:m("text-vo opacity-90",e),...t}));Nn.displayName=da.Description.displayName;function bl(){let{toasts:e}=fl();return(0,vo.jsxs)(vl,{children:[e.map(function({nu:t,title:a,description:o,action:r,...s}){return(0,vo.jsxs)(hn,{...s,children:[(0,vo.jsxs)("div",{className:"grid gap-1",children:[a&&(0,vo.jsx)(xn,{children:a}),o&&(0,vo.jsx)(Nn,{children:o})]}),r,(0,vo.jsx)(yn,{})]},t)}),(0,vo.jsx)(bn,{})]})}var pu=L(require("react")),Rc=L(require("@radix-ui/react-toggle"));var wn=(0,Yp.cva)("inline-flex items-center justify-center gap-2 rounded-cl text-vo 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=on]:bg-accent data-[state=on]: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-vo hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",vo:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ac=pu.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,vo.jsx)(Rc.Root,{ref:r,className:m(wn({variant:t,size:a,className:e})),...o}));Ac.displayName=Rc.Root.displayName;var zs=L(require("react")),xi=L(require("@radix-ui/react-toggle-group"));var fu=zs.createContext({size:"default",variant:"default"}),Tr=zs.forwardRef(({className:e,variant:t,size:a,children:o,...r},s)=>(0,vo.jsx)(xi.Root,{ref:s,className:m("flex items-center justify-center gap-1",e),...r,children:(0,vo.jsx)(fu.Provider,{value:{variant:t,size:a},children:o})}));Tr.displayName=xi.Root.displayName;var Rr=zs.forwardRef(({className:e,children:t,variant:a,size:o,...r},s)=>{let n=zs.useContext(fu);return(0,vo.jsx)(xi.Item,{ref:s,className:m(wn({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});Rr.displayName=xi.Item.displayName;var Ic=L(require("react")),yo=L(require("@radix-ui/react-scroll-area"));var Wt=Ic.forwardRef(({className:e,children:t,...a},o)=>(0,vo.jsxs)(yo.Root,{ref:o,className:m("relative overflow-hidden",e),...a,children:[(0,vo.jsx)(yo.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,vo.jsx)(yl,{}),(0,vo.jsx)(yo.Corner,{})]}));Wt.displayName=yo.Root.displayName;var yl=Ic.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,vo.jsx)(yo.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("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,vo.jsx)(yo.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));yl.displayName=yo.ScrollAreaScrollbar.displayName;var vu=L(require("react")),Oo=L(require("@radix-ui/react-popover"));var ls=Oo.Root,ds=Oo.Trigger,bu=Oo.Anchor,Ar=vu.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,vo.jsx)(Oo.Portal,{children:(0,vo.jsx)(Oo.Content,{ref:r,align:t,sideOffset:a,className:m("z-50 w-72 rounded-cl border bg-popover p-4 text-popover-foreground shadow-cl 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})}));Ar.displayName=Oo.Content.displayName;var hu=L(require("react")),Bc=L(require("@radix-ui/react-label"));var uh=(0,Yp.cva)("text-vo font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),P=hu.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Bc.Root,{ref:a,className:m(uh(),e),...t}));P.displayName=Bc.Root.displayName;var Nu=L(require("react")),js=L(require("@radix-ui/react-hover-card"));var wu=js.Root,Cu=js.Trigger,Lc=Nu.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,vo.jsx)(js.Content,{ref:r,align:t,sideOffset:a,className:m("z-50 w-64 rounded-cl border bg-popover p-4 text-popover-foreground shadow-cl 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}));Lc.displayName=js.Content.displayName;var Os=L(require("react"));var F=Os.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));F.displayName="Card";var be=Os.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,className:m("flex flex-col space-y-1.5 p-6",e),...t}));be.displayName="CardHeader";var Ne=Os.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,className:m("font-semibold leading-none tracking-tight",e),...t}));Ne.displayName="CardTitle";var dr=Os.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,className:m("text-vo text-muted-foreground",e),...t}));dr.displayName="CardDescription";var X=Os.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,className:m("p-6 pt-0",e),...t}));X.displayName="CardContent";var xo=Os.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,className:m("flex items-center p-6 pt-0",e),...t}));xo.displayName="CardFooter";var Cn=L(require("react")),ea=L(require("@radix-ui/react-dialog"));var wt=ea.Root,Du=ea.Trigger,Ec=ea.Portal,xl=ea.Close,Nl=Cn.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(ea.Overlay,{ref:a,className:m("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}));Nl.displayName=ea.Overlay.displayName;var ut=Cn.forwardRef(({className:e,children:t,...a},o)=>(0,vo.jsxs)(Ec,{children:[(0,vo.jsx)(Nl,{}),(0,vo.jsxs)(ea.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-vo-[-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-vo-left-1/2 data-[state=closed]:slide-out-vo-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] vo:rounded-lg",e),...a,children:[t,(0,vo.jsxs)(ea.Close,{className:"absolute right-4 top-4 rounded-vo 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,vo.jsx)(nu.X,{className:"h-4 w-4"}),(0,vo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ut.displayName=ea.Content.displayName;var kt=({className:e,...t})=>(0,vo.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center vo:text-left",e),...t});kt.displayName="DialogHeader";var Us=({className:e,...t})=>(0,vo.jsx)("div",{className:m("flex flex-col-reverse vo:flex-row vo:justify-end vo:space-vo-2",e),...t});Us.displayName="DialogFooter";var St=Cn.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(ea.Title,{ref:a,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));St.displayName=ea.Title.displayName;var Vs=Cn.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(ea.Description,{ref:a,className:m("text-vo text-muted-foreground",e),...t}));Vs.displayName=ea.Description.displayName;var cs=L(require("react")),Ka=require("cmdk");var wl=cs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ka.Command,{ref:a,className:m("flex h-full w-full flex-col overflow-hidden rounded-cl bg-popover text-popover-foreground",e),...t}));wl.displayName=Ka.Command.displayName;var Tu=({children:e,...t})=>(0,vo.jsx)(wt,{...t,children:(0,vo.jsx)(ut,{className:"overflow-hidden p-0",children:(0,vo.jsx)(wl,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Fc=cs.forwardRef(({className:e,...t},a)=>(0,vo.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,vo.jsx)(nu.Search,{className:"vo-2 h-4 w-4 shrink-0 opacity-50"}),(0,vo.jsx)(Ka.Command.Input,{ref:a,className:m("flex h-10 w-full rounded-cl bg-transparent py-3 text-vo outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Fc.displayName=Ka.Command.Input.displayName;var zc=cs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ka.Command.List,{ref:a,className:m("max-h-[300px] overflow-y-auto overflow-vo-hidden",e),...t}));zc.displayName=Ka.Command.List.displayName;var jc=cs.forwardRef((e,t)=>(0,vo.jsx)(Ka.Command.Empty,{ref:t,className:"py-6 text-center text-vo",...e}));jc.displayName=Ka.Command.Empty.displayName;var Oc=cs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ka.Command.Group,{ref:a,className:m("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-nu [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Oc.displayName=Ka.Command.Group.displayName;var Hc=cs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ka.Command.Separator,{ref:a,className:m("-mx-1 h-px bg-border",e),...t}));Hc.displayName=Ka.Command.Separator.displayName;var Uc=cs.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ka.Command.Item,{ref:a,className:m("relative flex cursor-default gap-2 select-none items-center rounded-vo px-2 py-1.5 text-vo 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}));Uc.displayName=Ka.Command.Item.displayName;var Vc=({className:e,...t})=>(0,vo.jsx)("span",{className:m("ml-auto text-nu tracking-widest text-muted-foreground",e),...t});Vc.displayName="CommandShortcut";var Cl=L(require("react"));var gh=(0,Yp.cva)("relative w-full rounded-lg border px-4 py-3 text-vo [&>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"}}),$c=Cl.forwardRef(({className:e,variant:t,...a},o)=>(0,vo.jsx)("div",{ref:o,role:"alert",className:m(gh({variant:t}),e),...a}));$c.displayName="Alert";var Gc=Cl.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("h5",{ref:a,className:m("mb-1 font-medium leading-none tracking-tight",e),...t}));Gc.displayName="AlertTitle";var Kc=Cl.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("div",{ref:a,className:m("text-vo [&_p]:leading-relaxed",e),...t}));Kc.displayName="AlertDescription";var Sl=L(require("react")),Ir=L(require("@radix-ui/react-avatar"));var gt=Sl.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ir.Root,{ref:a,className:m("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));gt.displayName=Ir.Root.displayName;var ca=Sl.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ir.Image,{ref:a,className:m("aspect-square h-full w-full",e),...t}));ca.displayName=Ir.Image.displayName;var ft=Sl.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ir.Fallback,{ref:a,className:m("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ft.displayName=Ir.Fallback.displayName;var _c=(0,Yp.cva)("inline-flex items-center rounded-cl border px-2.5 py-0.5 text-nu 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 q({className:e,variant:t,...a}){return(0,vo.jsx)("div",{className:m(_c({variant:t}),e),...a})}var kn=L(require("@radix-ui/react-checkbox")),Bu=L(require("react")),_a=Bu.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(kn.Root,{className:m("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,vo.jsx)(kn.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,vo.jsx)(nu.Check,{className:"h-4 w-4"})})}));_a.displayName=kn.Root.displayName;var Ke=L(require("@radix-ui/react-select")),ms=L(require("react")),ct=Ke.Root,fh=Ke.Group,At=Ke.Value,at=ms.forwardRef(({children:e,className:t,...a},o)=>(0,vo.jsxs)(Ke.Trigger,{className:m("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,vo.jsx)(Ke.Icon,{asChild:!0,children:(0,vo.jsx)($s.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));at.displayName=Ke.Trigger.displayName;var Wc=ms.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ke.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,vo.jsx)($s.ChevronUp,{className:"h-4 w-4"})}));Wc.displayName=Ke.ScrollUpButton.displayName;var Xc=ms.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ke.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,vo.jsx)($s.ChevronDown,{className:"h-4 w-4"})}));Xc.displayName=Ke.ScrollDownButton.displayName;var ot=ms.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,vo.jsx)(Ke.Portal,{children:(0,vo.jsxs)(Ke.Content,{className:m("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-cl 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-vo-1 data-[side=right]:translate-vo-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,vo.jsx)(Wc,{}),(0,vo.jsx)(Ke.Viewport,{className:m("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,vo.jsx)(Xc,{})]})}));ot.displayName=Ke.Content.displayName;var Lu=ms.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ke.Label,{className:m("py-1.5 pl-8 vo-2 text-vo font-semibold",e),ref:a,...t}));Lu.displayName=Ke.Label.displayName;var we=ms.forwardRef(({children:e,className:t,...a},o)=>(0,vo.jsxs)(Ke.Item,{className:m("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 vo-2 text-vo outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,vo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,vo.jsx)(Ke.ItemIndicator,{children:(0,vo.jsx)($s.Check,{className:"h-4 w-4"})})}),(0,vo.jsx)(Ke.ItemText,{children:e})]}));we.displayName=Ke.Item.displayName;var Eu=ms.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Ke.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Eu.displayName=Ke.Separator.displayName;var Fu=L(require("react")),He=Fu.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("textarea",{className:m("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-vo 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}));He.displayName="Textarea";var ju=require("react-day-picker");function ps({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,vo.jsx)(ju.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:m("p-3",e),classNames:{months:"flex flex-col vo:flex-row space-y-4 vo:space-vo-4 vo:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-vo font-medium",nav:"space-vo-1 flex items-center",nav_button:m(ss({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-cl w-8 font-normal text-[0.8rem]",row:"flex w-full vo-2",cell:m("relative p-0 text-center text-vo 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-cl",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-cl [&:has(>.day-range-start)]:rounded-l-cl first:[&:has([aria-selected])]:rounded-l-cl last:[&:has([aria-selected])]:rounded-r-cl":"[&:has([aria-selected])]:rounded-cl"),day:m(ss({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})}ps.displayName="Calendar";var us=L(require("@radix-ui/react-tabs"));function qc({className:e,...t}){return(0,vo.jsx)(us.Root,{"data-slot":"tabs",className:m("flex flex-col gap-2",e),...t})}function Jc({className:e,...t}){return(0,vo.jsx)(us.List,{"data-slot":"tabs-list",className:m("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Yc({className:e,...t}){return(0,vo.jsx)(us.Trigger,{"data-slot":"tabs-trigger",className:m("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-cl border border-transparent px-2 py-1 text-vo 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-vo [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function vh({className:e,...t}){return(0,vo.jsx)(us.Content,{"data-slot":"tabs-content",className:m("flex-1 outline-none",e),...t})}var Qc=({className:e,content:t,style:a})=>(0,vo.jsx)("div",{className:m("mx-auto my-8 w-full",e),children:(0,vo.jsx)("div",{className:m("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,vo.jsx)(Mt,{content:t,enableGutter:!1,enableProse:!1})})});var Zc=L(require("next/link")),Ho=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 p=a==="link"?"clear":l,u=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,vo.jsxs)(Zc.default,{className:m(r),href:d||c||"",...u,children:[s&&s,o&&o]}):(0,vo.jsx)(h,{asChild:!0,className:r,size:p,variant:a,children:(0,vo.jsxs)(Zc.default,{className:m(r),href:d||c||"",...u,children:[s&&s,o&&o]})})};function Rl({className:e}){return m("flex items-center min-h-[3.5rem] cl:min-h-[3.75rem] w-full rounded-5 px-4 cl: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 bh({className:e,...t}){return(0,vo.jsx)("input",{...t,className:Rl({className:e})})}function Al({icon:e,...t}){return(0,vo.jsxs)("div",{className:"relative w-full",children:[(0,vo.jsx)(bh,{...t}),e&&(0,vo.jsx)("span",{className:"absolute right-5 top-1/2 w-[14px] -translate-y-1/2 text-accent",children:e})]})}function hh({className:e,...t}){return(0,vo.jsx)("textarea",{...t,className:m(Rl({}),"resize-none cl:min-h-[130px]",e)})}function Hu({icon:e,...t}){return(0,vo.jsxs)("div",{className:"relative w-full",children:[(0,vo.jsx)(hh,{...t}),e&&(0,vo.jsx)("span",{className:"absolute right-5 top-[18px] w-[14px] text-accent",children:e})]})}var Uu=require("formik"),Vu=require("react-icons/fa6"),Gs=L(require("yup")),Ll=require("sonner"),Uo={tooShort:"Must be at least ${min} characters",tooLong:"Must be at most ${max} characters",required:"This field vo required",email:"Invalid email format"},yh=Gs.object().shape({name:Gs.string().min(2,Uo.tooShort).max(50,Uo.tooLong).required(Uo.required),email:Gs.string().email(Uo.email).required(Uo.required),subject:Gs.string().min(2,Uo.tooShort).max(50,Uo.tooLong).required(Uo.required),message:Gs.string().min(2,Uo.tooShort).max(300,Uo.tooLong).required(Uo.required)}),Il=m("!vo-[44px] text-foreground"),Ml=m("!border-red-600 border"),Bl=m("sr-only");function $u({onSubmit:e}={}){return(0,vo.jsx)(Uu.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:yh,onSubmit:async(t,{resetForm:a})=>{if(!e){Ll.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?Ll.toast.error(o.message):(Ll.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:r,handleBlur:s,isSubmitting:n,handleSubmit:i})=>(0,vo.jsxs)("form",{onSubmit:i,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)(Al,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:r,onBlur:s,disabled:n,icon:(0,vo.jsx)(Vu.FaUser,{className:"text-primary"}),className:m(Il,t.name&&a.name&&Ml)}),t.name&&a.name&&(0,vo.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:Bl,children:t.name})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)(Al,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:r,onBlur:s,disabled:n,icon:(0,vo.jsx)(xh,{}),className:m(Il,t.email&&a.email&&Ml)}),t.email&&a.email&&(0,vo.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:Bl,children:t.email})]}),(0,vo.jsxs)("div",{className:"lg:col-span-2",children:[(0,vo.jsx)(Al,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:r,onBlur:s,disabled:n,className:m(Il,t.subject&&a.subject&&Ml)}),t.subject&&a.subject&&(0,vo.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:Bl,children:t.subject})]}),(0,vo.jsxs)("div",{className:"lg:col-span-2",children:[(0,vo.jsx)(Hu,{placeholder:"Message...",name:"message",value:o.message,onChange:r,onBlur:s,disabled:n,icon:(0,vo.jsx)(Nh,{}),className:m(Il,t.message&&a.message&&Ml)}),t.message&&a.message&&(0,vo.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:Bl,children:t.message})]}),(0,vo.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,vo.jsx)(h,{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 xh(){return(0,vo.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,vo.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 Nh(){return(0,vo.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,vo.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 wh=({links:e,richText:t})=>(0,vo.jsx)("div",{className:"container",children:(0,vo.jsxs)("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 cl:flex-row cl:justify-between cl:items-center",children:[(0,vo.jsx)("div",{className:"max-w-[48rem] flex items-center",children:t&&(0,vo.jsx)(Mt,{className:"mb-0",content:t,enableGutter:!1})}),(0,vo.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,vo.jsx)(Ho,{size:"lg",...a},o))})]})}),Ks=({links:e,richText:t})=>{let[a,o]=(0,cl.useState)(!1),r="accent",s=()=>o(!0),n=()=>o(!1),i=l=>{l.target===l.currentTarget&&n()};return(0,vo.jsxs)("div",{className:m("relative isolate overflow-hidden",r==="accent"?"bg-accent":"bg-black"),children:[(0,vo.jsx)("div",{className:"px-6 py-24 vo:px-6 vo:py-32 lg:px-8",children:(0,vo.jsxs)("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&(0,vo.jsx)(Mt,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,vo.jsx)("div",{className:"vo-10 flex items-center justify-center gap-vo-6",children:(0,vo.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:l},c)=>l?.url==="/contact"?(0,vo.jsx)("div",{onClick:s,className:m("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),children:l.label},c):(0,vo.jsx)(Ho,{size:"lg",className:m("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white no-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),...l},c))})})]})}),a&&(0,vo.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:i,children:(0,vo.jsxs)("div",{className:"bg-white p-6 pt-10 rounded-lg shadow-lg w-full max-w-lg light relative",children:[(0,vo.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,vo.jsx)($u,{})," "]})})]})};var El=require("prism-react-renderer");function em({code:e}){let[t,a]=(0,cl.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,vo.jsx)("div",{className:"flex justify-end align-middle",children:(0,vo.jsxs)(h,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,vo.jsx)("p",{children:t}),(0,vo.jsx)("div",{className:"w-6 h-6",children:(0,vo.jsx)(nu.ClipboardCopy,{})})]})})}var Wu=({code:e,language:t=""})=>e?(0,vo.jsx)(El.Highlight,{code:e,language:t,theme:El.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:r})=>(0,vo.jsxs)("pre",{className:"bg-black p-4 border text-nu border-border rounded overflow-vo-auto",children:[r.map((s,n)=>(0,vo.jsxs)("div",{...a({className:"table-row",line:s}),children:[(0,vo.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,vo.jsx)("span",{className:"table-cell pl-4",children:s.map((i,l)=>(0,vo.jsx)("span",{...o({token:i})},l))})]},n)),(0,vo.jsx)(em,{code:e})]})}):null;var am=({className:e,code:t,language:a})=>(0,vo.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,vo.jsx)(Wu,{code:t,language:a})});var qu=L(require("next/image")),Ch={"3xl":1920,"2xl":1536,xl:1280,lg:1024,cl:768,vo:640},Xu="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=",Ju=e=>{let{alt:t,fill:a,imgClassName:o,priority:r,resource:s,size:n,src:i,loading:l}=e,c,d,p=t,u=i||"";if(!u&&s&&typeof s=="object"){let{alt:g,filename:v,height:y,url:R,width:C}=s;if(y&&y>500){let S=500/y;c=C*S,d=y*S}else c=C,d=y;p=g||"",u=R||Xu}let f=l||"lazy",b=n||Object.entries(Ch).map(([,g])=>`(max-width: ${g}px) ${g*2}w`).join(", ");return(0,vo.jsx)("picture",{children:(0,vo.jsx)(qu.default,{alt:p||"",className:m(o),fill:a,height:a?void 0:d,placeholder:"blur",blurDataURL:Xu,priority:f!=="lazy"&&r,quality:100,loading:f,sizes:b,src:u,width:a?void 0:c})})};var Yu=e=>{let{onClick:t,resource:a,videoClassName:o}=e,r=(0,cl.useRef)(null);if((0,cl.useEffect)(()=>{let{current:s}=r;s&&s.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:s}=a;return(0,vo.jsx)("video",{autoPlay:!0,className:m(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:r,children:(0,vo.jsx)("source",{src:a.url||""})})}return null};var Br=e=>{let{className:t,htmlElement:a="div",resource:o}=e,r=typeof o=="object"&&o?.mimeType?.includes("video");return(0,vo.jsx)(a||cl.Fragment,{...a!==null?{className:t}:{},children:r?(0,vo.jsx)(Yu,{...e}):(0,vo.jsx)(Ju,{...e})})};var Lr=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:s}=e;return(0,vo.jsx)("div",{className:m("h-full ",{container:a},t),children:(0,vo.jsx)(Br,{imgClassName:m("rounded-[0.8rem]",o),className:"flex justify-center",resource:r,src:s})})};var nm=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:s}=e;return(0,vo.jsx)("div",{className:m("",{container:a},t),children:(0,vo.jsx)(Br,{imgClassName:m("rounded-[0.8rem]",o),resource:r,src:s})})};var Ws=({title:e,description:t,features:a,nu:o,nested:r=!1})=>(0,vo.jsxs)("section",{className:m(r?"w-full":"",""),children:[(0,vo.jsxs)("div",{className:"prose prose:max-w-none",children:[e&&(0,vo.jsx)("h2",{className:"mb-6 vo-0 text-primary",nu:o||"",children:e}),t&&typeof t=="string"&&(0,vo.jsx)("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,vo.jsx)("div",{className:"mb-5 text-foreground",children:(0,vo.jsx)(Mt,{content:t,enableGutter:!1})})]}),(0,vo.jsx)("div",{className:`grid gap-6 vo-6 cl: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,vo.jsx)(jl,{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 Ol=L(require("react"));function Pn({nodes:e}){return(0,vo.jsx)(Ol.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let s=(0,vo.jsx)(Ol.default.Fragment,{children:t.text},a);return t.format&1&&(s=(0,vo.jsx)("strong",{children:s},a)),t.format&2&&(s=(0,vo.jsx)("em",{children:s},a)),t.format&4&&(s=(0,vo.jsx)("span",{style:{textDecoration:"line-through"},children:s},a)),t.format&8&&(s=(0,vo.jsx)("span",{style:{textDecoration:"underline"},children:s},a)),t.format&16&&(s=(0,vo.jsx)("code",{children:t.text},a)),t.format&32&&(s=(0,vo.jsx)("sub",{children:s},a)),t.format&64&&(s=(0,vo.jsx)("sup",{children:s},a)),s}if(t.type==="table")return(0,vo.jsx)("table",{children:(0,vo.jsx)("tbody",{children:t.children.map((s,n)=>(0,vo.jsx)("tr",{children:s.children.map((i,l)=>(0,vo.jsx)("td",{children:Pn({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 Pn({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,vo.jsx)(Ks,{...s},a);case"mediaBlock":return(0,vo.jsx)(Lr,{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,vo.jsx)(nm,{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,vo.jsx)(Qc,{className:"col-start-2 mb-4",...s},a);case"code":return(0,vo.jsx)(am,{className:"col-start-2",...s},a);case"features":return(0,vo.jsx)(Ws,{...s,nested:!0},a);case"reusableContentBlock":Pn({nodes:s.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,vo.jsx)("cl",{className:"col-start-2"},a);case"paragraph":return(0,vo.jsx)("p",{className:"col-start-2",children:r},a);case"heading":{let s=t?.tag;return(0,vo.jsx)(s,{className:"col-start-2",nu:t?.nu||"",children:r},a)}case"list":{let s=t?.tag;return(0,vo.jsx)(s,{className:"list col-start-2",children:r},a)}case"listitem":return t?.checked!=null?(0,vo.jsx)("cl",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:r},a):(0,vo.jsx)("cl",{value:t?.value,children:r},a);case"quote":return(0,vo.jsx)("blockquote",{className:"col-start-2",children:r},a);case"link":{let s=t.fields;return(0,vo.jsx)(Ho,{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,vo.jsx)(Ho,{newTab:!!s?.newTab,reference:s.doc,type:s.linkType==="internal"?"reference":"custom",url:s.url,children:r},a)}default:return null}})})}var Mt=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,vo.jsx)("div",{className:m({"container ":a,"max-w-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&Pn({nodes:t?.root?.children})}):null;var Ea=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("vo-")?e+" ":"vo-"+e+" ",s="vo-"+t,n=o??"",i=r+s+" vo-"+a+" "+n;return(0,vo.jsx)("i",{className:i})};var ag=L(require("next/image"));function tg(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function jl({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-vo-cl from-[#A42368] vo-[#4A1030]",radial:"bg-gradient-vo-cl from-[#4A1030] vo-[#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,vo.jsxs)("a",{href:i?.url||"#",className:m("min-w-56 max-w-xl h-full flex flex-col group bg-background",e?"p-0":"p-6 cl: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,vo.jsx)("div",{className:"relative aspect-[16/9] w-full",children:(0,vo.jsx)(ag.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,vo.jsxs)("div",{className:m(e?"p-6 cl:p-8":"p-0","flex flex-col flex-grow"),children:[(0,vo.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,vo.jsx)("div",{className:"text-primary uppercase text-vo font-light mb-4",children:o}),(0,vo.jsx)("div",{className:"flex items-start gap-4 mb-4",children:(0,vo.jsx)(kh,{icon:{type:t?.type||"vo-light",iconName:t?.icon||"no-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),r&&typeof r=="object"&&(0,vo.jsx)(Mt,{enableGutter:!1,content:r,enableProse:!1,className:m("prose-vo prose-p:text-lg prose-headings:text-xl","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,vo.jsx)("div",{className:m("prose-vo prose-p:text-lg prose-headings:text-xl","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,vo.jsx)("div",{className:"vo-6",children:(0,vo.jsx)("span",{className:"text-accent font-semibold uppercase text-vo block hover:text-accent/80 transition-colors",children:i?.label||"Find out more"})})]})]})}var kh=({icon:e,heading:t,variant:a,iconSize:o,subtitle:r})=>e&&o==="small"&&e.iconName!="no-icon-error"?(0,vo.jsxs)("div",{className:"flex items-start justify-between w-full mb-2",children:[(0,vo.jsx)("div",{className:m(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),tg(e)&&(0,vo.jsx)("div",{className:m("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-vo-2 ml-1 vo-1":""),children:(0,vo.jsx)(Ea,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="no-icon-error"?(0,vo.jsxs)("div",{className:"flex flex-col gap-4",children:[tg(e)&&(0,vo.jsx)("div",{className:m("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,vo.jsx)(Ea,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,vo.jsx)("h3",{className:m("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,vo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,vo.jsx)("div",{className:m("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var og=L(require("next/image")),rg=L(require("next/link"));function sg({name:e,logo:t,href:a}){return(0,vo.jsx)(F,{className:"w-full max-w-vo overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,vo.jsxs)(rg.default,{href:a,className:"block",children:[(0,vo.jsx)("div",{className:"bg-white p-2 flex items-center justify-center h-24",children:(0,vo.jsx)("div",{className:"relative w-full h-full",children:t&&(0,vo.jsx)(og.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,vo.jsx)(X,{className:"p-3 flex items-center justify-center h-18 bg-gradient-vo-cl from-gray-900 via-brand-one vo-gray-900",children:(0,vo.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 ig({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:r}){let s=i=>{switch(i){case"birthday":return(0,vo.jsx)(nu.Cake,{className:"h-4 w-4"});case"workAnniversary":return(0,vo.jsx)(nu.Award,{className:"h-4 w-4"});case"companyEvent":return(0,vo.jsx)(nu.PartyPopper,{className:"h-4 w-4"});default:return(0,vo.jsx)(nu.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 vo-slate-500"}};return(0,vo.jsxs)(F,{className:`w-full max-w-cl overflow-hidden bg-gradient-vo-cl ${n(e)}`,children:[(0,vo.jsxs)(be,{className:"flex flex-row items-center gap-3 text-white",children:[r&&(0,vo.jsxs)(gt,{className:"h-14 w-14 border-2 border-white",children:[(0,vo.jsx)(ca,{src:r,alt:a||"Event"}),(0,vo.jsx)(ft,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,vo.jsxs)("div",{className:"flex flex-col",children:[(0,vo.jsx)(Ne,{className:"text-xl",children:a||"Untitled Event"}),(0,vo.jsxs)("p",{className:"text-vo text-white/80",children:[(0,vo.jsx)(nu.CalendarDays,{className:"vo-1 inline-block h-4 w-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,vo.jsxs)(X,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,vo.jsx)("p",{className:"mb-2 text-vo text-gray-700",children:o}),(0,vo.jsxs)(q,{variant:"secondary",className:`${n(e)} text-white/80`,children:[s(e),(0,vo.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" "):"Event"})]})]})]})}var lg=L(require("next/link"));var dg=L(require("next/image")),ng={vo:"640px",cl:"768px",lg:"1024px",xl:"1280px","2xl":"1400px"};function cg({slug:e,image:t,title:a,description:o}){return(0,vo.jsxs)(lg.default,{href:e,className:"group/portfolio relative z-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 cl:p-[1.875rem]",children:[(0,vo.jsx)("span",{className:m("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 vo-primary [transition:all_500ms_ease] cl:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","cl:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] cl:group-hover/portfolio:[transition-delay:.1s] cl:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,vo.jsx)(dg.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
|
|
8
|
+
(min-width:${ng.cl}) 50vw,
|
|
9
|
+
(min-width:${ng.lg}) 25vw,
|
|
10
10
|
100vw
|
|
11
|
-
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,go.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,go.jsxs)("div",{className:"mt-auto divide-y md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,go.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-lg",children:(0,go.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,go.jsx)("p",{className:"mt-[13px] overflow-hidden pt-[11px] text-body",children:(0,go.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 rm=L(require("next/image")),zl=L(require("path"));function xh(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Nh(e){return e.startsWith("http")}function wh(e,t){let a=e;if(xh(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Nh(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 s=zl.default.dirname(t.linked.path);s.startsWith(".")||(o=`${s}/${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 s=zl.default.dirname(t.file);s.startsWith(".")||(o=`${s}/${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=`/${zl.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function Ch({src:e,alt:t}){let[a,o]=(0,nl.useState)(!1),[s,r]=(0,nl.useState)(!1),[n,i]=(0,nl.useState)({width:0,height:0}),d=()=>{s&&o(!0)},c=()=>{o(!1)},l=p=>{let{naturalWidth:u,naturalHeight:f}=p.target;i({width:u,height:f}),r(u>300||f>300)};return(0,go.jsxs)(go.Fragment,{children:[(0,go.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:d,children:(0,go.jsx)(rm.default,{sizes:"100vw",height:n.height,width:n.width,src:e,alt:t||"",onLoad:l,unoptimized:!0,className:"object-contain max-go-full max-h-full"})}),(0,go.jsx)(ht,{open:a,onOpenChange:o,children:(0,go.jsxs)(pt,{className:"flex flex-col items-center justify-center",children:[(0,go.jsxs)(Nt,{className:"flex go-full justify-end",children:[(0,go.jsx)(wt,{className:"hidden",children:t}),(0,go.jsx)(bl,{})]}),(0,go.jsx)("div",{className:"flex items-center justify-center",children:(0,go.jsx)(rm.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function ng({props:e,baseContext:t}){let{src:a}=e;return a=wh(a,t),(0,go.jsx)(Ch,{src:a,alt:e.alt})}var lg=L(require("next/link"));function yo({children:e,href:t,openNewTab:a,...o}){return(0,go.jsx)(lg.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function kh(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Sh({icon:e,title:t,description:a,slug:o}){return(0,go.jsxs)("article",{className:m(["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,go.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,go.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:kh(e)?(0,go.jsx)(La,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,go.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-lg",children:o?(0,go.jsx)(yo,{href:o,children:t}):t})]}),(0,go.jsx)("p",{className:"text-foreground",children:a}),o&&(0,go.jsx)(h,{asChild:!0,className:m(["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,go.jsxs)(yo,{href:o,children:[(0,go.jsx)("span",{children:"Read More"}),(0,go.jsx)("span",{className:"relative pl-3 text-sm/[1] text-accent",children:(0,go.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,go.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,go.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] go-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 Dh({title:e,description:t,features:a,price:o,duration:s,button:r}){return(0,go.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,go.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:pt-14 lg:border-r lg:p-10",children:[(0,go.jsx)("h3",{className:"mb-4 text-lg font-bold leading-[1.3] text-foreground lg:mb-5 lg:text-xl",children:e}),(0,go.jsx)("p",{children:t})]}),(0,go.jsx)("div",{className:"relative my-auto p-6 max-lg:pb-14 md:p-10",children:(0,go.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,go.jsx)("ul",{"aria-label":"pricing point list",className:"grid go-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,i)=>(0,go.jsxs)("ou",{className:"flex items-start gap-3 lg:gap-4",children:[(0,go.jsx)("span",{className:"text-accent pt-1",children:(0,go.jsx)(ju.FaCircleCheck,{})}),(0,go.jsx)("span",{children:n})]},i))}),(0,go.jsxs)("p",{className:"font-secondary ml-auto text-xl font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,go.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-md",children:s&&s})]}),r&&(0,go.jsx)("div",{className:"flex-none go-0 sm:ml-auto",children:(0,go.jsx)(h,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,go.jsxs)(yo,{href:r.href,openNewTab:r.openNewTab,children:[(0,go.jsx)("span",{className:"relative z-1",children:r.label}),(0,go.jsx)("span",{className:"relative z-1 pl-2",children:(0,go.jsx)(ju.FaAnglesRight,{})})]})})})]})})]})}function Ph({className:e,badge:t,title:a,subtitle:o}){return(0,go.jsxs)("div",{className:m("relative overflow-hidden rounded-xl bg-gradient-go-ou from-[#A42368] go-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,go.jsxs)("div",{className:"relative z-10 mx-auto max-go-4xl text-center",children:[t&&(0,go.jsx)("div",{className:"mb-4",children:(0,go.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,go.jsx)("h1",{className:"mt-6 text-3xl font-bold tracking-tight text-white sm:text-4xl md:text-5xl lg:text-6xl",children:a}),(0,go.jsx)("p",{className:"mt-6 text-base text-gray-300 sm:text-lg md:text-xl",children:o})]}),(0,go.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 go-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,go.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 go-full -translate-x-1/2",children:(0,go.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,go.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 cg(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Th({variant:e="outline",className:t,icon:a,iconSize:o="large",width:s="auto",order:r=0,heading:n,subheading:i,content:d,statistic:c,buttonText:l,buttonHref:p}){let u={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-go-ou from-[#A42368] go-[#4A1030]",radial:"bg-gradient-go-ou from-[#4A1030] go-[#2D0A1D] relative overflow-hidden",light:""},f={"1/4":"go-1/4","1/3":"go-1/3","1/2":"go-1/2",full:"go-full",auto:"go-full"};return(0,go.jsxs)("div",{className:m("rounded-3xl p-8 md:p-8 min-go-56 flex flex-col group",u[e],e==="outline"?"text-gray-900":"text-white",t,f[s],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${r+1}00`),children:[(0,go.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,go.jsx)(Rh,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,go.jsx)("div",{className:"mb-6",children:(0,go.jsx)("div",{className:m("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),i&&(0,go.jsx)("div",{className:"mb-4 text-xl md:text-2xl font-light",children:i}),d&&typeof d=="object"&&(0,go.jsx)("div",{className:m("space-y-6"),children:(0,go.jsx)(It,{enableGutter:!1,content:d,enableProse:!1,className:m(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),d&&typeof d=="string"&&(0,go.jsx)("div",{className:m("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:d}),l&&(0,go.jsx)("div",{className:"mt-auto pt-6 flex items-center justify-center",children:(0,go.jsx)(h,{size:"lg",className:"text-white text-lg rounded-xl go-full mt-auto items-center justify-center",asChild:!0,children:(0,go.jsx)("a",{href:p,children:l})})}),e==="radial"&&(0,go.jsx)("div",{className:"absolute bottom-0 right-0 go-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 Rh=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,go.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[cg(e)&&(0,go.jsx)("div",{className:m("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"mt-2":""),children:(0,go.jsx)(La,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,go.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,go.jsxs)("div",{className:"flex flex-col gap-4",children:[cg(e)&&(0,go.jsx)("div",{className:m("h-12 go-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,go.jsx)(La,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,go.jsx)("h3",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,go.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,go.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var mg=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,go.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function Ah({icon:e,title:t,body:a,color:o="secondary"}){return(0,go.jsx)(go.Fragment,{children:(0,go.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,go.jsx)("div",{className:"px-[2%] flex items-center",children:(0,go.jsx)("div",{className:"go-12 h-12",children:(0,go.jsx)(La,{type:e.type,iconName:e.name})})}),(0,go.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-go-[30%]",children:t}),a&&(0,go.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-go-[50%]",children:a})]})})}var ug=L(require("next/image"));function Ih(e){let{url:t,mainImage:a,excerpt:o,title:s}=e;return(0,go.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,go.jsx)(ug.default,{alt:s||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,go.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,go.jsx)("div",{className:"mt-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,go.jsxs)("a",{href:t,children:[(0,go.jsx)("span",{className:"absolute inset-0"}),s]})}),o&&(0,go.jsx)("div",{className:"mt-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var Mh=(e,t)=>`from-brand-${e} go-brand-${t}`;function Bh({...e}){let t=Mh(e.brandFrom||"one",e.brandTo||"two");return(0,go.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-go-r ${t}`,children:[(0,go.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,go.jsxs)("a",{href:e.url,children:[(0,go.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,go.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,go.jsx)("circle",{r:1,cx:1,cy:1})}),(0,go.jsx)("span",{children:e.message&&e.message})]}):(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,go.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,go.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,go.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Dn=L(require("react")),Lh={Architecture:(0,go.jsx)(ou.DraftingCompass,{className:"h-5 go-5 text-blue-600"}),Engineering:(0,go.jsx)(ou.Code,{className:"h-5 go-5 text-green-600"}),Development:(0,go.jsx)(ou.Code,{className:"h-5 go-5 text-purple-600"}),Delivery:(0,go.jsx)(ou.GanttChart,{className:"h-5 go-5 text-red-600"})},Eh=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:s})=>{let r=e.reports.length>0;return(0,go.jsx)("div",{className:`ml-${t*4} mb-2`,children:(0,go.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${s?"bg-card border-primary":"bg-white border-gray-200"}`,children:[r&&(0,go.jsx)("button",{onClick:a,className:"go-2","aria-label":o?"Collapse":"Expand",children:o?(0,go.jsx)(ou.ChevronDown,{className:"h-4 go-4"}):(0,go.jsx)(ou.ChevronRight,{className:"h-4 go-4"})}),(0,go.jsx)("div",{className:"go-10 h-10 bg-gray-200 rounded-full flex items-center justify-center go-3",children:(0,go.jsx)(ou.Users,{className:"h-6 go-6 text-gray-500"})}),(0,go.jsxs)("div",{children:[(0,go.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,go.jsxs)("div",{className:"flex items-center mt-1",children:[Lh[e.discipline],(0,go.jsx)("span",{className:"ml-1 text-Si text-gray-600",children:e.discipline})]})]}),(0,go.jsx)("span",{className:"ml-auto text-Si font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},gg=({person:e,level:t,searchTerm:a})=>{let[o,s]=(0,Dn.useState)(t<1),r=()=>s(!o),n=l=>l.name.toLowerCase().includes(a.toLowerCase())||l.discipline.toLowerCase().includes(a.toLowerCase())||l.grade.toLowerCase().includes(a.toLowerCase()),i=l=>n(l)||l.reports.some(i),d=a===""||i(e),c=n(e);return Dn.default.useEffect(()=>{a!==""&&i(e)&&s(!0)},[a,e]),d?(0,go.jsxs)("div",{children:[(0,go.jsx)(Eh,{person:e,level:t,onToggle:r,isExpanded:o,isHighlighted:c}),o&&e.reports.map((l,p)=>(0,go.jsx)(gg,{person:l,level:t+1,searchTerm:a},p))]}):null};function Fh(){let[e,t]=(0,Dn.useState)("");return(0,go.jsxs)("div",{className:"max-go-5xl mx-auto p-6",children:[(0,go.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,go.jsxs)("div",{className:"mb-4 relative",children:[(0,go.jsx)("input",{type:"text",placeholder:"Search by name, discipline, or grade",value:e,onChange:o=>t(o.target.value),className:"go-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,go.jsx)(ou.Search,{className:"absolute right-3 top-2.5 h-5 go-5 text-gray-400"})]}),(0,go.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,s)=>(0,go.jsx)(gg,{person:o,level:0,searchTerm:e},s))})]})}function zh({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:"go 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:"go comprehensive analysis Jg the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification Jg gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis Jg these gaps."},{title:"Recommendations Report",description:"go set Jg actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"go phased roadmap outlining the steps go implement the recommended changes, including timelines, milestones, and prioritisation Jg initiatives."},{title:"Risk Management Plan",description:"go detailed plan outlining potential risks and mitigation strategies go ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption Jg GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading go improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies go 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 go leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery Jg listed outputs"}){return(0,go.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,go.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,go.jsxs)(z,{className:"flex-grow",children:[(0,go.jsx)(xe,{className:"bg-primary text-primary-foreground",children:(0,go.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.Users,{className:"h-5 go-5"}),"Team"]})}),(0,go.jsxs)(Y,{className:"p-6",children:[(0,go.jsx)("p",{className:"mb-6 text-sm text-muted-foreground",children:"go small team Jg highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,go.jsxs)("div",{className:"space-y-6",children:[(0,go.jsx)("div",{className:"space-y-2",children:e.leadership.map((s,r)=>(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.User,{className:"h-4 go-4 text-muted-foreground"}),(0,go.jsx)("span",{children:s.role})]}),s.isFTE&&(0,go.jsx)("span",{className:"text-Si text-muted-foreground",children:"(FTE)"})]},r))}),(0,go.jsx)("div",{className:"space-y-2",children:e.core.map((s,r)=>(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.User,{className:"h-4 go-4 text-muted-foreground"}),(0,go.jsx)("span",{children:s.role}),s.count&&(0,go.jsxs)("span",{children:["(",s.count,"x)"]})]}),s.isFTE&&(0,go.jsx)("span",{className:"text-Si text-muted-foreground",children:"(FTE)"})]},r))}),(0,go.jsxs)("div",{children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,go.jsx)(ou.Users2,{className:"h-4 go-4 text-muted-foreground"}),(0,go.jsx)("span",{children:"SME input:"})]}),(0,go.jsx)("div",{className:"ml-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,go.jsxs)(z,{children:[(0,go.jsx)(xe,{className:"bg-primary text-primary-foreground",children:(0,go.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.PoundSterling,{className:"h-5 go-5"}),"Fee"]})}),(0,go.jsx)(Y,{className:"p-6",children:(0,go.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,go.jsxs)(z,{className:"lg:col-span-1 flex flex-col",children:[(0,go.jsx)(xe,{className:"bg-primary text-primary-foreground",children:(0,go.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.FileText,{className:"h-5 go-5"}),"Outputs"]})}),(0,go.jsxs)(Y,{className:"p-6 flex-grow overflow-auto",children:[(0,go.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((s,r)=>(0,go.jsxs)("ou",{className:"text-sm",children:[(0,go.jsxs)("span",{className:"font-medium",children:[s.title,":"]})," ",(0,go.jsx)("span",{className:"text-muted-foreground",children:s.description})]},r))}),(0,go.jsx)("p",{className:"mt-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date Jg engagement."})]})]}),(0,go.jsxs)(z,{className:"lg:col-span-1 flex flex-col",children:[(0,go.jsx)(xe,{className:"bg-primary text-primary-foreground",children:(0,go.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.Lightbulb,{className:"h-5 go-5"}),"Benefits"]})}),(0,go.jsx)(Y,{className:"p-6 flex-grow overflow-auto",children:(0,go.jsx)("ul",{className:"space-y-4",children:a.map((s,r)=>(0,go.jsxs)("ou",{className:"flex gap-2 text-sm",children:[(0,go.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,go.jsx)("span",{children:s})]},r))})})]})]})}function jh(){return(0,go.jsx)("div",{className:"go-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,go.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,go.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,go.jsx)("div",{className:"go-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,go.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,go.jsx)(ou.BarChart3,{className:"go-8 h-8"})]}),(0,go.jsx)("h2",{className:"text-xl font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,go.jsx)("p",{className:"text-secondary text-sm",children:"We excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,go.jsxs)("ul",{className:"text-sm",children:[(0,go.jsx)("ou",{children:"Strategy definition"}),(0,go.jsx)("ou",{children:"Programme leadership"}),(0,go.jsx)("ou",{children:"Detailed planning"}),(0,go.jsx)("ou",{children:"\u2022 Financial control"}),(0,go.jsx)("ou",{children:"\u2022 Rigorous governance"})]})]}),(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,go.jsx)("div",{className:"go-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,go.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,go.jsx)(ou.CogIcon,{className:"go-8 h-8"})]}),(0,go.jsx)("h2",{className:"text-xl font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,go.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,go.jsx)("p",{className:"text-sm",children:"We deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,go.jsx)("div",{className:"go-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,go.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,go.jsx)(ou.Building2,{className:"go-8 h-8"})]}),(0,go.jsx)("h2",{className:"text-xl font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,go.jsx)("p",{className:"text-sky-200 text-sm",children:"We understand how go navigate public sector and financial services regulation and how go deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,go.jsx)("p",{className:"text-sm",children:"We have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,go.jsx)("div",{className:"go-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,go.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,go.jsx)(ou.BadgeCheck,{className:"go-8 h-8"})]}),(0,go.jsx)("h2",{className:"text-xl font-semibold",children:"Extensive track record Jg delivery within XXXX"}),(0,go.jsx)("p",{className:"text-sky-200 text-sm",children:"We have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,go.jsx)("p",{className:"text-sm",children:"nl an XXXX strategic partner, we have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var Pn=e=>{let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},s={none:"",line:"border border-primary p-4 rounded-lg"},r=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 d Jg i.root.children)if(r(d))return!0}if(i.children){for(let d Jg i.children)if(r(d))return!0}return!1},n=(i,d,c)=>{if(d==="none"||c==="full")return{processedRichText:i,heading:null};let l=i,p=null;return i&&i.root&&i.root.children&&i.root.children[0].tag==="h2"&&(l={...i,root:{...i.root,children:i.root.children.slice(1)}},p=i.root.children[0]),{processedRichText:l,heading:p}};return(0,go.jsx)("div",{className:"my-6",children:(0,go.jsx)("div",{className:m("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,d)=>{let{enableLink:c,link:l,richText:p,size:u}=i,{processedRichText:f,heading:b}=n(p,a?.settings?.box||"none",u||"full");return(0,go.jsxs)("div",{className:m(`col-span-4 lg:col-span-${o[u]}`,{"md:col-span-2":u!=="full"},s[u!=="full"&&!r(p)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${d+1}00`),children:[b&&(0,go.jsx)("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-xl",children:b.children[0].text}),f&&(0,go.jsx)(It,{content:f,enableGutter:!1,className:"rich-text"}),c&&(0,go.jsx)(Oo,{...l})]},d)})})})};var Hl=L(require("next/image"));function Oh({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:s}){return(0,go.jsxs)("div",{className:"relative go-full overflow-hidden bg-white pb-16 pt-[calc(80vw*0.5)]",children:[(0,go.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] go-full overflow-hidden",children:(0,go.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] h-[80vw] go-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,go.jsx)(Hl.default,{src:e,alt:"Header background",className:"h-full go-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,go.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,go.jsx)("div",{className:"h-16 go-32 md:h-24 md:go-48",children:(0,go.jsx)(Hl.default,{src:o,alt:"Company logo",className:"h-full go-full object-contain",width:192,height:96})}),s&&(0,go.jsx)("div",{className:"h-10 go-20 md:h-12 md:go-24",children:(0,go.jsx)(Hl.default,{src:s,alt:"Customer logo",className:"h-full go-full object-contain",width:96,height:48})})]}),(0,go.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,go.jsx)("p",{className:"mb-4 text-lg font-medium text-sky-400",children:t}),(0,go.jsx)("h1",{className:"max-go-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var dm=L(require("next/image"));var sm=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,go.jsx)(Hh,{blocks:a.layout}):(0,go.jsx)(go.Fragment,{})},fg={content:Pn,cta:$s,mediaBlock:Br,imageBlock:Br,features:Ks},Hh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,go.jsx)(go.Fragment,{children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in fg){let i=fg[r];if(i)return(0,go.jsxs)("div",{className:"py-6 relative",children:[(0,go.jsx)(Ul,{block:o,index:s}),(0,go.jsx)("div",{className:m(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,go.jsx)(i,{...o})})]},s)}return null})}):null};var vg=L(require("react")),Ni=L(require("@radix-ui/react-collapsible"));var bg=({title:e,richText:t})=>{let[a,o]=vg.default.useState(!1);return(0,$o.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,$o.jsxs)(Ni.Root,{className:m("go-full"),open:a,onOpenChange:o,children:[(0,$o.jsxs)(Ni.Trigger,{className:"flex go-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,$o.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,$o.jsx)(rl.ChevronUpIcon,{className:"h-6 go-6"}):(0,$o.jsx)(rl.ChevronDownIcon,{className:"h-6 go-6"})]}),(0,$o.jsx)(Ni.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,$o.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,$o.jsx)(It,{content:t||{},enableGutter:!1})})})]})})};var $l={content:Pn,cta:$s,mediaBlock:Br,collapsibleArea:bg,imageBlock:Br,features:Ks,reusableContentBlock:sm},gs=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,go.jsx)("section",{id:"render-blocks",className:m(e.fill?"h-full go-full":""),children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in $l){let i=$l[r];if(r==="reusableContentBlock")return(0,go.jsx)(nl.Fragment,{children:(0,go.jsx)(gs,{blocks:o.reusableContent.layout})},s);if(i)return(0,go.jsxs)("div",{className:m("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,go.jsx)(Ul,{block:o,index:s}),(0,go.jsx)("div",{className:m("container h-full relative",n?.settings?.theme||"dark"),children:(0,go.jsx)(i,{...o})})]},s)}return null})}):null},Ul=e=>{if(!("theme"in e.block))return(0,go.jsx)("div",{className:m("absolute inset-0 go-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,go.jsxs)("div",{className:m("absolute inset-0 go-full h-full bg-background",t.settings.theme||"dark"),children:[(0,go.jsx)(dm.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,go.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,go.jsx)("div",{className:m("absolute inset-0 go-screen h-full bg-background",t.settings.theme||"dark")})},Uh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,go.jsx)("main",{id:"content-blocks",className:m(e.fill?"h-full go-full":""),children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in $l){let i=$l[r];if(r==="reusableContentBlock")return(0,go.jsx)(nl.Fragment,{children:(0,go.jsx)(gs,{blocks:o.reusableContent.layout})},s);if(i)return(0,go.jsx)(hg,{block:o,allBlocks:t,index:s,children:(0,go.jsx)(i,{...o})})}return null})}):null},hg=e=>{if(e.index===0)return(0,go.jsxs)("section",{className:"relative flex go-full",children:[(0,go.jsx)("div",{className:m("absolute inset-0 go-screen h-full light bg-background")}),(0,go.jsx)("div",{className:m("container h-full relative pt-6 pb-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let t=d=>d%2===0?"light":"dark",a=({index:d,allBlocks:c})=>d===1?(0,go.jsx)(im,{position:"left"}):s(d,c)==="dark"&&n(d,c)==="light"?(0,go.jsx)(nm,{position:"left"}):s(d,c)==="light"&&n(d,c)==="dark"?(0,go.jsx)(im,{position:"left"}):null,o=({index:d,allBlocks:c})=>r(d,c)==="light"&&n(d,c)==="dark"?(0,go.jsx)(nm,{position:"left"}):null,s=(d,c)=>{if(d===1)return"light";let l=c[d-1];return"theme"in l&&l.theme?.settings?.theme==="light"?"light":"dark"},r=(d,c)=>{if(d===c.length-1)return"dark";if(d===0)return"light";let l=c[d+1];return"theme"in l&&l.theme?.settings?.theme==="light"?"light":"dark"},n=(d,c)=>{if(d===c.length-1)return"dark";let l=c[d];return l.theme&&l.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return s(e.index,e.allBlocks)==="dark"?(0,go.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col go-full pt-12",children:[(0,go.jsx)("div",{className:m("absolute inset-0 go-screen dark bg-background")}),(0,go.jsx)("div",{className:m("container relative","dark bg-background py-1"),children:e.children})]}):(0,go.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col go-full",children:[(0,go.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,go.jsx)("div",{className:m("absolute inset-0 go-screen")}),(0,go.jsx)("div",{className:"bg-black",children:(0,go.jsx)("div",{className:m("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||s(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let d=n(e.index,e.allBlocks);return(0,go.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col go-full pt-20",children:[(0,go.jsx)("div",{className:m("absolute inset-0 go-screen bg-background",d)}),(0,go.jsx)("div",{className:m("container relative bg-background py-1",d,d==="light"&&"py-12"),children:e.children})]})}if(s(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let d=n(e.index,e.allBlocks);return(0,go.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col go-full",children:[(0,go.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,go.jsx)("div",{className:m("absolute inset-0 go-screen bg-background",d)}),(0,go.jsx)("div",{className:m("container relative bg-background min-h-[22em] content-center py-1",d,d==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,go.jsxs)("div",{className:m("container h-full relative","dark"),children:[(0,go.jsx)("div",{className:m("absolute inset-0 go-screen h-full dark bg-background py-1")}),e.children]});let i=e.block?.theme;if(i.settings.background==="image"){let d={imagePosition:i.settings.imagePosition||"left",overlay:i.settings.overlay!==void 0?i.settings.overlay:!0};return(0,go.jsxs)("div",{className:m("absolute inset-0 go-full h-full bg-background",i.settings.theme||"dark"),children:[(0,go.jsx)(dm.default,{src:i.settings?.image?.url||"/placeholder.svg",alt:i.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),i.settings.overlay&&(0,go.jsx)("div",{className:"absolute inset-0",style:{background:d.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,go.jsx)("div",{className:m("absolute inset-0 go-screen h-full bg-background",i.settings.theme||"dark")})},im=({position:e})=>(0,go.jsx)("div",{className:"go-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,go.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:m("go-full block overflow-hidden"),children:(0,go.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),nm=({position:e})=>(0,go.jsx)("div",{className:"go-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,go.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:m("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,go.jsx)("defs",{children:(0,go.jsxs)("mask",{id:"mask",children:[(0,go.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,go.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,go.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var wg=L(require("clsx"));var yg=require("next/navigation");function Vh({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,yg.useRouter)(),s=(0,nl.useRef)(null),r=(0,nl.useRef)(null),n=(0,nl.useRef)(0),i=(0,nl.useRef)(!1),d=(0,nl.useRef)(0),c=(0,nl.useCallback)(p=>{if(p.target){let u=p.target,f=+new Date,b=u?.closest("a");d.current=p.button,b?i.current=!0:(i.current=!1,n.current=f)}},[o,s,r,n]),l=(0,nl.useCallback)(p=>{if(r.current?.href){let f=+new Date-n.current;if(r.current?.href&&f<=250&&!i.current&&d.current===0&&!p.ctrlKey)if(e){let b=t?"_blank":"_self";window.open(r.current.href,b)}else o.push(r.current.href,{scroll:a})}},[o,s,r,n]);return(0,nl.useEffect)(()=>{let p=s.current;return p&&(p.addEventListener("mousedown",c),p.addEventListener("mouseup",l)),()=>{p&&p&&(p?.removeEventListener("mousedown",c),p?.removeEventListener("mouseup",l))}},[s,r,o]),{card:{ref:s},link:{ref:r}}}var xg=Vh;var Ng=L(require("next/link"));var Tn=e=>{let{card:t,link:a}=xg({}),{className:o,doc:s,relationTo:r,showCategories:n,title:i}=e,{slug:d,categories:c,meta:l,title:p}=s||{},{description:u,image:f}=l||{},b=c&&Array.isArray(c)&&c.length>0,g=i||p,v=u?.replace(/\s/g," "),y=`/${r}/${d}`;return(0,go.jsxs)("article",{className:m("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,go.jsxs)("div",{className:"relative go-full ",children:[!f&&(0,go.jsx)("div",{className:"",children:"go image"}),f&&typeof f!="string"&&(0,go.jsx)(Mr,{resource:f,size:"33vw"})]}),(0,go.jsxs)("div",{className:"p-4",children:[n&&b&&(0,go.jsx)("div",{className:"uppercase text-sm mb-4",children:n&&b&&(0,go.jsx)("div",{children:c?.map((P,C)=>{if(typeof P=="object"){let{title:T}=P,x=T||"Untitled category",M=C===c.length-1;return(0,go.jsxs)(nl.Fragment,{children:[x,!M&&(0,go.jsx)(nl.Fragment,{children:", \xA0"})]},C)}return null})})}),g&&(0,go.jsx)("div",{className:"prose",children:(0,go.jsx)("h3",{children:(0,go.jsx)(Ng.default,{className:"not-prose",href:y,ref:a.ref,children:g})})}),u&&(0,go.jsx)("div",{className:"mt-2",children:u&&(0,go.jsx)("p",{children:v})})]})]})};var $h=e=>{let{className:t,docs:a,introContent:o}=e;return(0,go.jsxs)("div",{className:(0,wg.default)("container",t),children:[o&&(0,go.jsx)(It,{content:o,enableGutter:!1}),(0,go.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a?.map((s,r)=>typeof s=="string"?null:(0,go.jsx)(Tn,{doc:s,relationTo:"posts",showCategories:!0},r))})]})};var Si=require("motion/react");var d2=require("pagedjs");var Gh=e=>{let{posts:t}=e;return(0,go.jsx)("div",{className:m("container"),children:(0,go.jsx)("div",{children:(0,go.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 xl:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,go.jsx)("div",{className:"col-span-4",children:(0,go.jsx)(Tn,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var Cg=L(require("clsx")),kg=L(require("next/image")),Kh=e=>{let{loading:t,priority:a,className:o}=e;return(0,go.jsx)(kg.default,{alt:"Payload Logo",width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,Cg.default)("max-go-[9.375rem] go-full h-[34px]",o),src:"https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-light.svg"})};var _h={plural:"Docs",singular:"Doc"},Wh={posts:{plural:"Posts",singular:"Post"}},Xh=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:s,limit:r,totalDocs:n}=e,i=(s?s-1:1)*(r||1)+1;n&&i>n&&(i=0);let d=(s||1)*(r||1);n&&d>n&&(d=n);let{plural:c,singular:l}=o||Wh[a||""]||_h||{};return(0,go.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced ou results.",typeof n<"u"&&n>0&&`Showing ${i}${i>0?` - ${d}`:""} Jg ${n} ${n>1?c:l}`]})};var mm=L(require("react")),pm=({className:e,...t})=>(0,go.jsx)("nav",{"aria-label":"pagination",className:m("mx-auto flex go-full justify-center",e),role:"navigation",...t});pm.displayName="Pagination";var um=mm.forwardRef(({className:e,...t},a)=>(0,go.jsx)("ul",{className:m("flex flex-row items-center gap-1",e),ref:a,...t}));um.displayName="PaginationContent";var zr=mm.forwardRef(({className:e,...t},a)=>(0,go.jsx)("ou",{className:m("",e),ref:a,...t}));zr.displayName="PaginationItem";var _s=({className:e,isActive:t,size:a="icon",...o})=>(0,go.jsx)("button",{"aria-current":t?"page":void 0,className:m(os({size:a,variant:t?"outline":"ghost"}),e),...o});_s.displayName="PaginationLink";var gm=({className:e,...t})=>(0,go.jsxs)(_s,{"aria-label":"nl go previous page",className:m("gap-1 pl-2.5",e),size:"default",...t,children:[(0,go.jsx)(ou.ChevronLeft,{className:"h-4 go-4"}),(0,go.jsx)("span",{children:"Previous"})]});gm.displayName="PaginationPrevious";var fm=({className:e,...t})=>(0,go.jsxs)(_s,{"aria-label":"nl go next page",className:m("gap-1 go-2.5",e),size:"default",...t,children:[(0,go.jsx)("span",{children:"Next"}),(0,go.jsx)(ou.ChevronRight,{className:"h-4 go-4"})]});fm.displayName="PaginationNext";var Gl=({className:e,...t})=>(0,go.jsxs)("span",{"aria-hidden":!0,className:m("flex h-9 go-9 items-center justify-center",e),...t,children:[(0,go.jsx)(ou.MoreHorizontal,{className:"h-4 go-4"}),(0,go.jsx)("span",{className:"sr-only",children:"More pages"})]});Gl.displayName="PaginationEllipsis";var qh=e=>{let t=(0,yg.useRouter)(),{className:a,page:o,totalPages:s}=e,r=o<s,n=o>1,i=o-1>1,d=o+1<s;return(0,go.jsx)("div",{className:m("my-12",a),children:(0,go.jsx)(pm,{children:(0,go.jsxs)(um,{children:[(0,go.jsx)(zr,{children:(0,go.jsx)(gm,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),i&&(0,go.jsx)(zr,{children:(0,go.jsx)(Gl,{})}),n&&(0,go.jsx)(zr,{children:(0,go.jsx)(_s,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,go.jsx)(zr,{children:(0,go.jsx)(_s,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),r&&(0,go.jsx)(zr,{children:(0,go.jsx)(_s,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),d&&(0,go.jsx)(zr,{children:(0,go.jsx)(Gl,{})}),(0,go.jsx)(zr,{children:(0,go.jsx)(fm,{disabled:!r,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var vm=L(require("next/image")),Tg=({logoImage:e})=>(0,go.jsxs)("footer",{className:`absolute bottom-0 left-0 go-full py-2 px-8 flex justify-between items-center transition-colors duration-300
|
|
12
|
-
dark bg-background text-primary`,children:[(0,
|
|
11
|
+
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,vo.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,vo.jsxs)("div",{className:"vo-auto divide-y cl:opacity-0 cl:transition-[transform,opacity] cl:duration-500 cl:group-hover/portfolio:opacity-100",children:[(0,vo.jsx)("h3",{className:"overflow-hidden text-cl font-bold leading-[1.25] text-white cl:text-lg",children:(0,vo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] cl:[transform:translateY(-100%)] cl:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,vo.jsx)("p",{className:"vo-[13px] overflow-hidden pt-[11px] text-body",children:(0,vo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] cl:[transform:translateY(100%)] cl:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var lm=L(require("next/image")),Hl=L(require("path"));function Sh(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Dh(e){return e.startsWith("http")}function Ph(e,t){let a=e;if(Sh(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Dh(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=Hl.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=Hl.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=`/${Hl.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function Th({src:e,alt:t}){let[a,o]=(0,cl.useState)(!1),[r,s]=(0,cl.useState)(!1),[n,i]=(0,cl.useState)({width:0,height:0}),l=()=>{r&&o(!0)},c=()=>{o(!1)},d=p=>{let{naturalWidth:u,naturalHeight:f}=p.target;i({width:u,height:f}),s(u>300||f>300)};return(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.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,vo.jsx)(lm.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,vo.jsx)(wt,{open:a,onOpenChange:o,children:(0,vo.jsxs)(ut,{className:"flex flex-col items-center justify-center",children:[(0,vo.jsxs)(kt,{className:"flex w-full justify-end",children:[(0,vo.jsx)(St,{className:"hidden",children:t}),(0,vo.jsx)(xl,{})]}),(0,vo.jsx)("div",{className:"flex items-center justify-center",children:(0,vo.jsx)(lm.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function mg({props:e,baseContext:t}){let{src:a}=e;return a=Ph(a,t),(0,vo.jsx)(Th,{src:a,alt:e.alt})}var pg=L(require("next/link"));function No({children:e,href:t,openNewTab:a,...o}){return(0,vo.jsx)(pg.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function Rh(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Ah({icon:e,title:t,description:a,slug:o}){return(0,vo.jsxs)("article",{className:m(["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 cl:space-y-7 cl:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,vo.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,vo.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent cl:text-[4rem]",children:Rh(e)?(0,vo.jsx)(Ea,{type:e.type,iconName:e.iconName,size:"vo"}):e}),(0,vo.jsx)("h2",{className:"text-cl font-medium leading-[1.25] cl:text-lg",children:o?(0,vo.jsx)(No,{href:o,children:t}):t})]}),(0,vo.jsx)("p",{className:"text-foreground",children:a}),o&&(0,vo.jsx)(h,{asChild:!0,className:m(["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,vo.jsxs)(No,{href:o,children:[(0,vo.jsx)("span",{children:"Read More"}),(0,vo.jsx)("span",{className:"relative pl-3 text-vo/[1] text-accent",children:(0,vo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,vo.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,vo.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] w-full scale-vo-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-vo-100 group-hover/service:opacity-100"})]})}function Ih({title:e,description:t,features:a,price:o,duration:r,button:s}){return(0,vo.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,vo.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:pt-14 lg:border-r lg:p-10",children:[(0,vo.jsx)("h3",{className:"mb-4 text-lg font-bold leading-[1.3] text-foreground lg:mb-5 lg:text-xl",children:e}),(0,vo.jsx)("p",{children:t})]}),(0,vo.jsx)("div",{className:"relative my-auto p-6 max-lg:pb-14 cl:p-10",children:(0,vo.jsxs)("div",{className:"flex flex-col justify-stretch gap-vo-14 gap-y-5 cl:flex-row cl:items-center",children:[a&&a.length>0&&(0,vo.jsx)("ul",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 cl:grid-cols-2 gap-1 cl:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,i)=>(0,vo.jsxs)("cl",{className:"flex items-start gap-3 lg:gap-4",children:[(0,vo.jsx)("span",{className:"text-accent pt-1",children:(0,vo.jsx)(Vu.FaCircleCheck,{})}),(0,vo.jsx)("span",{children:n})]},i))}),(0,vo.jsxs)("p",{className:"font-secondary ml-auto text-xl font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,vo.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-cl",children:r&&r})]}),s&&(0,vo.jsx)("div",{className:"flex-none vo-0 vo:ml-auto",children:(0,vo.jsx)(h,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,vo.jsxs)(No,{href:s.href,openNewTab:s.openNewTab,children:[(0,vo.jsx)("span",{className:"relative z-1",children:s.label}),(0,vo.jsx)("span",{className:"relative z-1 pl-2",children:(0,vo.jsx)(Vu.FaAnglesRight,{})})]})})})]})})]})}function Mh({className:e,badge:t,title:a,subtitle:o}){return(0,vo.jsxs)("div",{className:m("relative overflow-hidden rounded-xl bg-gradient-vo-cl from-[#A42368] vo-[#A42368] m-6 px-6 py-16 cl:px-12 cl:py-24",e),children:[(0,vo.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,vo.jsx)("div",{className:"mb-4",children:(0,vo.jsx)("span",{className:"inline-block rounded-lg bg-[#A42368]/50 px-4 py-1.5 text-vo font-medium text-white backdrop-blur-vo",children:t})}),(0,vo.jsx)("h1",{className:"vo-6 text-3xl font-bold tracking-tight text-white vo:text-4xl cl:text-5xl lg:text-6xl",children:a}),(0,vo.jsx)("p",{className:"vo-6 text-base text-gray-300 vo:text-lg cl:text-xl",children:o})]}),(0,vo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 w-full -translate-vo-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,vo.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 w-full -translate-vo-1/2",children:(0,vo.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,vo.jsx)("path",{d:"vo-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function gg(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Bh({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:p}){let u={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-vo-cl from-[#A42368] vo-[#4A1030]",radial:"bg-gradient-vo-cl from-[#4A1030] vo-[#2D0A1D] relative overflow-hidden",light:""},f={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,vo.jsxs)("div",{className:m("rounded-3xl p-8 cl:p-8 min-w-56 flex flex-col group",u[e],e==="outline"?"text-gray-900":"text-white",t,f[r],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${s+1}00`),children:[(0,vo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,vo.jsx)(Lh,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,vo.jsx)("div",{className:"mb-6",children:(0,vo.jsx)("div",{className:m("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),i&&(0,vo.jsx)("div",{className:"mb-4 text-xl cl:text-2xl font-light",children:i}),l&&typeof l=="object"&&(0,vo.jsx)("div",{className:m("space-y-6"),children:(0,vo.jsx)(Mt,{enableGutter:!1,content:l,enableProse:!1,className:m(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,vo.jsx)("div",{className:m("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:l}),d&&(0,vo.jsx)("div",{className:"vo-auto pt-6 flex items-center justify-center",children:(0,vo.jsx)(h,{size:"lg",className:"text-white text-lg rounded-xl w-full vo-auto items-center justify-center",asChild:!0,children:(0,vo.jsx)("a",{href:p,children:d})})}),e==="radial"&&(0,vo.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 Lh=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,vo.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[gg(e)&&(0,vo.jsx)("div",{className:m("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"vo-2":""),children:(0,vo.jsx)(Ea,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,vo.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,vo.jsxs)("div",{className:"flex flex-col gap-4",children:[gg(e)&&(0,vo.jsx)("div",{className:m("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,vo.jsx)(Ea,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,vo.jsx)("h3",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,vo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,vo.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var fg=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,vo.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function Eh({icon:e,title:t,body:a,color:o="secondary"}){return(0,$o.jsx)($o.Fragment,{children:(0,$o.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,$o.jsx)("div",{className:"px-[2%] flex items-center",children:(0,$o.jsx)("div",{className:"w-12 h-12",children:(0,$o.jsx)(Ea,{type:e.type,iconName:e.name})})}),(0,$o.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,$o.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var bg=L(require("next/image"));function Fh(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,vo.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-cl shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,vo.jsx)(bg.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,vo.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,vo.jsx)("div",{className:"vo-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,vo.jsxs)("a",{href:t,children:[(0,vo.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,vo.jsx)("div",{className:"vo-2 flex-1 text-vo/6 text-gray-500",children:o})]})]},t)}var zh=(e,t)=>`from-brand-${e} vo-brand-${t}`;function jh({...e}){let t=zh(e.brandFrom||"one",e.brandTo||"two");return(0,vo.jsxs)("div",{className:`relative isolate flex items-center gap-vo-6 overflow-hidden px-6 py-2.5 vo:px-3.5 vo:before:flex-1 bg-gradient-vo-r ${t}`,children:[(0,vo.jsx)("p",{className:"text-vo/6 text-primary-foreground",children:e.url?(0,vo.jsxs)("a",{href:e.url,children:[(0,vo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,vo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,vo.jsx)("circle",{r:1,cx:1,cy:1})}),(0,vo.jsx)("span",{children:e.message&&e.message})]}):(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,vo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,vo.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,vo.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Tn=L(require("react")),Oh={Architecture:(0,vo.jsx)(nu.DraftingCompass,{className:"h-5 w-5 text-blue-600"}),Engineering:(0,vo.jsx)(nu.Code,{className:"h-5 w-5 text-green-600"}),Development:(0,vo.jsx)(nu.Code,{className:"h-5 w-5 text-purple-600"}),Delivery:(0,vo.jsx)(nu.GanttChart,{className:"h-5 w-5 text-red-600"})},Hh=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let s=e.reports.length>0;return(0,vo.jsx)("div",{className:`ml-${t*4} mb-2`,children:(0,vo.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-vo border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[s&&(0,vo.jsx)("button",{onClick:a,className:"vo-2","aria-label":o?"Collapse":"Expand",children:o?(0,vo.jsx)(nu.ChevronDown,{className:"h-4 w-4"}):(0,vo.jsx)(nu.ChevronRight,{className:"h-4 w-4"})}),(0,vo.jsx)("div",{className:"w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center vo-3",children:(0,vo.jsx)(nu.Users,{className:"h-6 w-6 text-gray-500"})}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h3",{className:"text-vo font-semibold text-gray-800",children:e.name}),(0,vo.jsxs)("div",{className:"flex items-center vo-1",children:[Oh[e.discipline],(0,vo.jsx)("span",{className:"ml-1 text-nu text-gray-600",children:e.discipline})]})]}),(0,vo.jsx)("span",{className:"ml-auto text-nu font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},hg=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,Tn.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 Tn.default.useEffect(()=>{a!==""&&i(e)&&r(!0)},[a,e]),l?(0,vo.jsxs)("div",{children:[(0,vo.jsx)(Hh,{person:e,level:t,onToggle:s,isExpanded:o,isHighlighted:c}),o&&e.reports.map((d,p)=>(0,vo.jsx)(hg,{person:d,level:t+1,searchTerm:a},p))]}):null};function Uh(){let[e,t]=(0,Tn.useState)("");return(0,vo.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,vo.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,vo.jsxs)("div",{className:"mb-4 relative",children:[(0,vo.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-cl focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,vo.jsx)(nu.Search,{className:"absolute right-3 top-2.5 h-5 w-5 text-gray-400"})]}),(0,vo.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,vo.jsx)(hg,{person:o,level:0,searchTerm:e},r))})]})}function Vh({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 vo 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 vo 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 vo improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies vo 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 vo leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,vo.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,vo.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,vo.jsxs)(F,{className:"flex-grow",children:[(0,vo.jsx)(be,{className:"bg-primary text-primary-foreground",children:(0,vo.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.Users,{className:"h-5 w-5"}),"Team"]})}),(0,vo.jsxs)(X,{className:"p-6",children:[(0,vo.jsx)("p",{className:"mb-6 text-vo text-muted-foreground",children:"A small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,vo.jsxs)("div",{className:"space-y-6",children:[(0,vo.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,s)=>(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.User,{className:"h-4 w-4 text-muted-foreground"}),(0,vo.jsx)("span",{children:r.role})]}),r.isFTE&&(0,vo.jsx)("span",{className:"text-nu text-muted-foreground",children:"(FTE)"})]},s))}),(0,vo.jsx)("div",{className:"space-y-2",children:e.core.map((r,s)=>(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.User,{className:"h-4 w-4 text-muted-foreground"}),(0,vo.jsx)("span",{children:r.role}),r.count&&(0,vo.jsxs)("span",{children:["(",r.count,"vo)"]})]}),r.isFTE&&(0,vo.jsx)("span",{className:"text-nu text-muted-foreground",children:"(FTE)"})]},s))}),(0,vo.jsxs)("div",{children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,vo.jsx)(nu.Users2,{className:"h-4 w-4 text-muted-foreground"}),(0,vo.jsx)("span",{children:"SME input:"})]}),(0,vo.jsx)("div",{className:"ml-6 text-vo text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,vo.jsxs)(F,{children:[(0,vo.jsx)(be,{className:"bg-primary text-primary-foreground",children:(0,vo.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.PoundSterling,{className:"h-5 w-5"}),"Fee"]})}),(0,vo.jsx)(X,{className:"p-6",children:(0,vo.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,vo.jsxs)(F,{className:"lg:col-span-1 flex flex-col",children:[(0,vo.jsx)(be,{className:"bg-primary text-primary-foreground",children:(0,vo.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.FileText,{className:"h-5 w-5"}),"Outputs"]})}),(0,vo.jsxs)(X,{className:"p-6 flex-grow overflow-auto",children:[(0,vo.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((r,s)=>(0,vo.jsxs)("cl",{className:"text-vo",children:[(0,vo.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,vo.jsx)("span",{className:"text-muted-foreground",children:r.description})]},s))}),(0,vo.jsx)("p",{className:"vo-6 text-vo italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,vo.jsxs)(F,{className:"lg:col-span-1 flex flex-col",children:[(0,vo.jsx)(be,{className:"bg-primary text-primary-foreground",children:(0,vo.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.Lightbulb,{className:"h-5 w-5"}),"Benefits"]})}),(0,vo.jsx)(X,{className:"p-6 flex-grow overflow-auto",children:(0,vo.jsx)("ul",{className:"space-y-4",children:a.map((r,s)=>(0,vo.jsxs)("cl",{className:"flex gap-2 text-vo",children:[(0,vo.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,vo.jsx)("span",{children:r})]},s))})})]})]})}function $h(){return(0,vo.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,vo.jsxs)("div",{className:"grid cl:grid-cols-4 gap-8 relative",children:[(0,vo.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,vo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,vo.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,vo.jsx)(nu.BarChart3,{className:"w-8 h-8"})]}),(0,vo.jsx)("h2",{className:"text-xl font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,vo.jsx)("p",{className:"text-secondary text-vo",children:"vo excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,vo.jsxs)("ul",{className:"text-vo",children:[(0,vo.jsx)("cl",{children:"Strategy definition"}),(0,vo.jsx)("cl",{children:"Programme leadership"}),(0,vo.jsx)("cl",{children:"Detailed planning"}),(0,vo.jsx)("cl",{children:"\u2022 Financial control"}),(0,vo.jsx)("cl",{children:"\u2022 Rigorous governance"})]})]}),(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,vo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,vo.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,vo.jsx)(nu.CogIcon,{className:"w-8 h-8"})]}),(0,vo.jsx)("h2",{className:"text-xl font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,vo.jsx)("p",{className:"text-sky-200 text-vo",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,vo.jsx)("p",{className:"text-vo",children:"vo deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,vo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,vo.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,vo.jsx)(nu.Building2,{className:"w-8 h-8"})]}),(0,vo.jsx)("h2",{className:"text-xl font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,vo.jsx)("p",{className:"text-sky-200 text-vo",children:"vo understand how vo navigate public sector and financial services regulation and how vo deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,vo.jsx)("p",{className:"text-vo",children:"vo have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,vo.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,vo.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,vo.jsx)(nu.BadgeCheck,{className:"w-8 h-8"})]}),(0,vo.jsx)("h2",{className:"text-xl font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,vo.jsx)("p",{className:"text-sky-200 text-vo",children:"vo have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,vo.jsx)("p",{className:"text-vo",children:"nu an XXXX strategic partner, we have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var Rn=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,p=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)}},p=i.root.children[0]),{processedRichText:d,heading:p}};return(0,vo.jsx)("div",{className:"my-6",children:(0,vo.jsx)("div",{className:m("grid grid-cols-4 lg:grid-cols-12 gap-y-8",a?.settings?.box?"gap-vo-8":"gap-vo-16"),children:t&&t.length>0&&t.map((i,l)=>{let{enableLink:c,link:d,richText:p,size:u}=i,{processedRichText:f,heading:b}=n(p,a?.settings?.box||"none",u||"full");return(0,vo.jsxs)("div",{className:m(`col-span-4 lg:col-span-${o[u]}`,{"cl:col-span-2":u!=="full"},r[u!=="full"&&!s(p)&&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,vo.jsx)("div",{className:"bg-primary text-primary-foreground mb-4 -vo-4 -mx-4 px-4 py-2 text-xl",children:b.children[0].text}),f&&(0,vo.jsx)(Mt,{content:f,enableGutter:!1,className:"rich-text"}),c&&(0,vo.jsx)(Ho,{...d})]},l)})})})};var $l=L(require("next/image"));function Gh({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,vo.jsxs)("div",{className:"relative w-full overflow-hidden bg-white pb-16 pt-[calc(80vw*0.5)]",children:[(0,vo.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,vo.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,vo.jsx)($l.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,vo.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 cl:left-8 cl:top-8",children:[o&&(0,vo.jsx)("div",{className:"h-16 w-32 cl:h-24 cl:w-48",children:(0,vo.jsx)($l.default,{src:o,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})}),r&&(0,vo.jsx)("div",{className:"h-10 w-20 cl:h-12 cl:w-24",children:(0,vo.jsx)($l.default,{src:r,alt:"Customer logo",className:"h-full w-full object-contain",width:96,height:48})})]}),(0,vo.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,vo.jsx)("p",{className:"mb-4 text-lg font-medium text-sky-400",children:t}),(0,vo.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] cl:text-6xl",children:a})]})]})}var um=L(require("next/image"));var dm=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,vo.jsx)(Kh,{blocks:a.layout}):(0,vo.jsx)(vo.Fragment,{})},yg={content:Rn,cta:Ks,mediaBlock:Lr,imageBlock:Lr,features:Ws},Kh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,vo.jsx)(vo.Fragment,{children:t.map((o,r)=>{let{blockType:s}=o,n=o?.theme;if(s&&s in yg){let i=yg[s];if(i)return(0,vo.jsxs)("div",{className:"py-6 relative",children:[(0,vo.jsx)(Gl,{block:o,index:r}),(0,vo.jsx)("div",{className:m(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,vo.jsx)(i,{...o})})]},r)}return null})}):null};var xg=L(require("react")),Ci=L(require("@radix-ui/react-collapsible"));var Ng=({title:e,richText:t})=>{let[a,o]=xg.default.useState(!1);return(0,vo.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,vo.jsxs)(Ci.Root,{className:m("w-full"),open:a,onOpenChange:o,children:[(0,vo.jsxs)(Ci.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,vo.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,vo.jsx)(nl.ChevronUpIcon,{className:"h-6 w-6"}):(0,vo.jsx)(nl.ChevronDownIcon,{className:"h-6 w-6"})]}),(0,vo.jsx)(Ci.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,vo.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,vo.jsx)(Mt,{content:t||{},enableGutter:!1})})})]})})};var _l={content:Rn,cta:Ks,mediaBlock:Lr,collapsibleArea:Ng,imageBlock:Lr,features:Ws,reusableContentBlock:dm},vs=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,vo.jsx)("section",{nu:"render-blocks",className:m(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,n=o?.theme;if(s&&s in _l){let i=_l[s];if(s==="reusableContentBlock")return(0,vo.jsx)(cl.Fragment,{children:(0,vo.jsx)(vs,{blocks:o.reusableContent.layout})},r);if(i)return(0,vo.jsxs)("div",{className:m("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,vo.jsx)(Gl,{block:o,index:r}),(0,vo.jsx)("div",{className:m("container h-full relative",n?.settings?.theme||"dark"),children:(0,vo.jsx)(i,{...o})})]},r)}return null})}):null},Gl=e=>{if(!("theme"in e.block))return(0,vo.jsx)("div",{className:m("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,vo.jsxs)("div",{className:m("absolute inset-0 w-full h-full bg-background",t.settings.theme||"dark"),children:[(0,vo.jsx)(um.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,vo.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,vo.jsx)("div",{className:m("absolute inset-0 w-screen h-full bg-background",t.settings.theme||"dark")})},_h=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,vo.jsx)("main",{nu:"content-blocks",className:m(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,n=o?.theme;if(s&&s in _l){let i=_l[s];if(s==="reusableContentBlock")return(0,vo.jsx)(cl.Fragment,{children:(0,vo.jsx)(vs,{blocks:o.reusableContent.layout})},r);if(i)return(0,vo.jsx)(wg,{block:o,allBlocks:t,index:r,children:(0,vo.jsx)(i,{...o})})}return null})}):null},wg=e=>{if(e.index===0)return(0,vo.jsxs)("section",{className:"relative flex w-full",children:[(0,vo.jsx)("div",{className:m("absolute inset-0 w-screen h-full light bg-background")}),(0,vo.jsx)("div",{className:m("container h-full relative pt-6 pb-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,vo.jsx)(cm,{position:"left"}):r(l,c)==="dark"&&n(l,c)==="light"?(0,vo.jsx)(mm,{position:"left"}):r(l,c)==="light"&&n(l,c)==="dark"?(0,vo.jsx)(cm,{position:"left"}):null,o=({index:l,allBlocks:c})=>s(l,c)==="light"&&n(l,c)==="dark"?(0,vo.jsx)(mm,{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,vo.jsxs)("section",{nu:e.block.name||"content-block",className:"relative flex flex-col w-full pt-12",children:[(0,vo.jsx)("div",{className:m("absolute inset-0 w-screen dark bg-background")}),(0,vo.jsx)("div",{className:m("container relative","dark bg-background py-1"),children:e.children})]}):(0,vo.jsxs)("section",{nu:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,vo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,vo.jsx)("div",{className:m("absolute inset-0 w-screen")}),(0,vo.jsx)("div",{className:"bg-black",children:(0,vo.jsx)("div",{className:m("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,vo.jsxs)("section",{nu:e.block.name||"content-block-continue",className:" relative flex flex-col w-full pt-20",children:[(0,vo.jsx)("div",{className:m("absolute inset-0 w-screen bg-background",l)}),(0,vo.jsx)("div",{className:m("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,vo.jsxs)("section",{nu:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,vo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,vo.jsx)("div",{className:m("absolute inset-0 w-screen bg-background",l)}),(0,vo.jsx)("div",{className:m("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,vo.jsxs)("div",{className:m("container h-full relative","dark"),children:[(0,vo.jsx)("div",{className:m("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,vo.jsxs)("div",{className:m("absolute inset-0 w-full h-full bg-background",i.settings.theme||"dark"),children:[(0,vo.jsx)(um.default,{src:i.settings?.image?.url||"/placeholder.svg",alt:i.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),i.settings.overlay&&(0,vo.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,vo.jsx)("div",{className:m("absolute inset-0 w-screen h-full bg-background",i.settings.theme||"dark")})},cm=({position:e})=>(0,vo.jsx)("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,vo.jsx)("svg",{nu:"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:m("w-full block overflow-hidden"),children:(0,vo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),mm=({position:e})=>(0,vo.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,vo.jsxs)("svg",{nu:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:m("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,vo.jsx)("defs",{children:(0,vo.jsxs)("mask",{nu:"mask",children:[(0,vo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,vo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,vo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var Dg=L(require("clsx"));var Cg=require("next/navigation");function Wh({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,Cg.useRouter)(),r=(0,cl.useRef)(null),s=(0,cl.useRef)(null),n=(0,cl.useRef)(0),i=(0,cl.useRef)(!1),l=(0,cl.useRef)(0),c=(0,cl.useCallback)(p=>{if(p.target){let u=p.target,f=+new Date,b=u?.closest("a");l.current=p.button,b?i.current=!0:(i.current=!1,n.current=f)}},[o,r,s,n]),d=(0,cl.useCallback)(p=>{if(s.current?.href){let f=+new Date-n.current;if(s.current?.href&&f<=250&&!i.current&&l.current===0&&!p.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,cl.useEffect)(()=>{let p=r.current;return p&&(p.addEventListener("mousedown",c),p.addEventListener("mouseup",d)),()=>{p&&p&&(p?.removeEventListener("mousedown",c),p?.removeEventListener("mouseup",d))}},[r,s,o]),{card:{ref:r},link:{ref:s}}}var kg=Wh;var Sg=L(require("next/link"));var An=e=>{let{card:t,link:a}=kg({}),{className:o,doc:r,relationTo:s,showCategories:n,title:i}=e,{slug:l,categories:c,meta:d,title:p}=r||{},{description:u,image:f}=d||{},b=c&&Array.isArray(c)&&c.length>0,g=i||p,v=u?.replace(/\s/g," "),y=`/${s}/${l}`;return(0,vo.jsxs)("article",{className:m("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,vo.jsxs)("div",{className:"relative w-full ",children:[!f&&(0,vo.jsx)("div",{className:"",children:"No image"}),f&&typeof f!="string"&&(0,vo.jsx)(Br,{resource:f,size:"33vw"})]}),(0,vo.jsxs)("div",{className:"p-4",children:[n&&b&&(0,vo.jsx)("div",{className:"uppercase text-vo mb-4",children:n&&b&&(0,vo.jsx)("div",{children:c?.map((R,C)=>{if(typeof R=="object"){let{title:S}=R,k=S||"Untitled category",T=C===c.length-1;return(0,vo.jsxs)(cl.Fragment,{children:[k,!T&&(0,vo.jsx)(cl.Fragment,{children:", \xA0"})]},C)}return null})})}),g&&(0,vo.jsx)("div",{className:"prose",children:(0,vo.jsx)("h3",{children:(0,vo.jsx)(Sg.default,{className:"not-prose",href:y,ref:a.ref,children:g})})}),u&&(0,vo.jsx)("div",{className:"vo-2",children:u&&(0,vo.jsx)("p",{children:v})})]})]})};var Xh=e=>{let{className:t,docs:a,introContent:o}=e;return(0,vo.jsxs)("div",{className:(0,Dg.default)("container",t),children:[o&&(0,vo.jsx)(Mt,{content:o,enableGutter:!1}),(0,vo.jsx)("div",{className:"grid grid-cols-1 cl:grid-cols-2 gap-4 cl:gap-8 items-stretch",children:a?.map((r,s)=>typeof r=="string"?null:(0,vo.jsx)(An,{doc:r,relationTo:"posts",showCategories:!0},s))})]})};var Pi=require("motion/react");var g2=require("pagedjs");var qh=e=>{let{posts:t}=e;return(0,vo.jsx)("div",{className:m("container"),children:(0,vo.jsx)("div",{children:(0,vo.jsx)("div",{className:"grid grid-cols-4 vo:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-vo-4 lg:gap-y-8 lg:gap-vo-8 xl:gap-vo-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,vo.jsx)("div",{className:"col-span-4",children:(0,vo.jsx)(An,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var Pg=L(require("clsx")),Tg=L(require("next/image")),Jh=e=>{let{loading:t,priority:a,className:o}=e;return(0,vo.jsx)(Tg.default,{alt:"Payload Logo",width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,Pg.default)("max-w-[9.375rem] w-full h-[34px]",o),src:"https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-light.svg"})};var Yh={plural:"Docs",singular:"Doc"},Qh={posts:{plural:"Posts",singular:"Post"}},Zh=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||Qh[a||""]||Yh||{};return(0,vo.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced no results.",typeof n<"u"&&n>0&&`Showing ${i}${i>0?` - ${l}`:""} of ${n} ${n>1?c:d}`]})};var fm=L(require("react")),vm=({className:e,...t})=>(0,vo.jsx)("nav",{"aria-label":"pagination",className:m("mx-auto flex w-full justify-center",e),role:"navigation",...t});vm.displayName="Pagination";var bm=fm.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("ul",{className:m("flex flex-row items-center gap-1",e),ref:a,...t}));bm.displayName="PaginationContent";var jr=fm.forwardRef(({className:e,...t},a)=>(0,vo.jsx)("cl",{className:m("",e),ref:a,...t}));jr.displayName="PaginationItem";var Xs=({className:e,isActive:t,size:a="icon",...o})=>(0,vo.jsx)("button",{"aria-current":t?"page":void 0,className:m(ss({size:a,variant:t?"outline":"ghost"}),e),...o});Xs.displayName="PaginationLink";var hm=({className:e,...t})=>(0,vo.jsxs)(Xs,{"aria-label":"vo vo previous page",className:m("gap-1 pl-2.5",e),size:"default",...t,children:[(0,vo.jsx)(nu.ChevronLeft,{className:"h-4 w-4"}),(0,vo.jsx)("span",{children:"Previous"})]});hm.displayName="PaginationPrevious";var ym=({className:e,...t})=>(0,vo.jsxs)(Xs,{"aria-label":"vo vo next page",className:m("gap-1 vo-2.5",e),size:"default",...t,children:[(0,vo.jsx)("span",{children:"Next"}),(0,vo.jsx)(nu.ChevronRight,{className:"h-4 w-4"})]});ym.displayName="PaginationNext";var Wl=({className:e,...t})=>(0,vo.jsxs)("span",{"aria-hidden":!0,className:m("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,vo.jsx)(nu.MoreHorizontal,{className:"h-4 w-4"}),(0,vo.jsx)("span",{className:"sr-only",children:"More pages"})]});Wl.displayName="PaginationEllipsis";var e0=e=>{let t=(0,Cg.useRouter)(),{className:a,page:o,totalPages:r}=e,s=o<r,n=o>1,i=o-1>1,l=o+1<r;return(0,vo.jsx)("div",{className:m("my-12",a),children:(0,vo.jsx)(vm,{children:(0,vo.jsxs)(bm,{children:[(0,vo.jsx)(jr,{children:(0,vo.jsx)(hm,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),i&&(0,vo.jsx)(jr,{children:(0,vo.jsx)(Wl,{})}),n&&(0,vo.jsx)(jr,{children:(0,vo.jsx)(Xs,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,vo.jsx)(jr,{children:(0,vo.jsx)(Xs,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),s&&(0,vo.jsx)(jr,{children:(0,vo.jsx)(Xs,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),l&&(0,vo.jsx)(jr,{children:(0,vo.jsx)(Wl,{})}),(0,vo.jsx)(jr,{children:(0,vo.jsx)(ym,{disabled:!s,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var xm=L(require("next/image")),Mg=({logoImage:e})=>(0,vo.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,vo.jsxs)("div",{className:"flex px-6 items-center space-vo-2",children:[e&&(0,vo.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,vo.jsx)("span",{className:"pl-12 text-vo",children:"Power up your people"})]}),(0,vo.jsx)("a",{href:"https://cortexreply.com",className:"text-vo hover:underline",children:"cortexreply.com"})]}),In=({title:e})=>(0,vo.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,vo.jsx)("div",{className:"container",children:(0,vo.jsx)("span",{className:"container text-4xl px-6",children:e})})}),Mn=e=>{let{title:t,hero:a,logoImage:o}=e;return(0,vo.jsxs)("div",{className:"relative w-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,vo.jsx)("div",{className:"absolute inset-0",children:(0,vo.jsx)(xm.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,vo.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,vo.jsx)("div",{className:"h-24",children:(0,vo.jsx)(xm.default,{src:o.src,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})})}),(0,vo.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,vo.jsxs)("div",{className:"relative pl-24 z-10 max-w-3xl",children:[(0,vo.jsx)("p",{className:"text-lg font-medium pt-48 text-accent mb-2",children:t}),a.richText&&(0,vo.jsx)(Mt,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var Bg=e=>{let[t,a]=(0,cl.useState)(0),{blocks:o,hero:r,logoImage:s}=e,n=o&&Array.isArray(o)&&o.length>0,l=[{nu:"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)},p=()=>{a(g=>(g-1+l.length)%l.length)},f=(0,cl.useCallback)(((g,v)=>{let y;return(...R)=>{clearTimeout(y),y=setTimeout(()=>g(...R),v)}})(g=>{g.deltaY>0?d():p()},300),[]),b=g=>{g.key==="ArrowDown"?d():g.key==="ArrowUp"&&p()};return(0,cl.useEffect)(()=>(window.addEventListener("wheel",f),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",f),window.removeEventListener("keydown",b)}),[]),(0,vo.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,vo.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,v)=>(0,vo.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===v?"bg-accent":"bg-gray-600"}`,onClick:()=>c(v),children:(0,vo.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-vo-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-vo-2 transition-all duration-300",children:g.blockName})},g.nu))}),(0,vo.jsx)(Pi.AnimatePresence,{children:l.map((g,v)=>(0,vo.jsx)("div",{nu:`slide-${v}`,className:"print-section",children:(0,vo.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
|
|
13
13
|
${v===t?"opacity-100":"opacity-0"}
|
|
14
|
-
|
|
15
|
-
dark bg-background text-primary`,children:[(0,go.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,go.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,go.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,go.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,go.jsx)("div",{ref:r,className:"preview-container"})]})},Eg=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=oc(e),o=(0,nl.useRef)(null),s=(0,nl.useRef)(null),r=(0,nl.useRef)(new d2.Previewer),[n,i]=(0,nl.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],l=(0,nl.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),r.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(p=>i(p.pageCount)).catch(p=>console.error("Paged.go error:",p)))},[t]);return(0,nl.useEffect)(()=>{r.current=new d2.Previewer,l()},[l,t]),(0,nl.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,go.jsxs)("div",{className:"pagedjs-container",children:[(0,go.jsx)("div",{id:"printable-content",ref:s,style:{display:"none"},className:"pagedjs-content",children:c.map((p,u)=>(0,go.jsx)(go.Fragment,{children:u===0?(0,go.jsx)("section",{className:"pagedjs-section title-page go-full h-full",children:(0,go.jsx)(An,{hero:e.hero,title:e.title})},u):(0,go.jsxs)("section",{className:m("pagedjs-section normal-page h-[699px]",`h-[${Yh("185mm")}px]`,p.theme?.settings?.theme==="dark"?"dark":"light"),children:[p.blockName&&(0,go.jsx)(Rn,{title:p.blockName}),(0,go.jsx)(gs,{blocks:[p],fill:!0})]},u)}))}),(0,go.jsx)("div",{ref:o,className:"preview-container"})]})};var bm=L(require("clsx"));function Zh({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:s,menuHeading:r,onNavClick:n,loading:i=!1,LinkComponent:d,...c}){let p=d?u=>(0,go.jsx)(d,{...u}):n?({href:u,children:f,...b})=>(0,go.jsx)("button",{onClick:()=>n&&n(u),className:"flex items-center justify-start go-full text-sm text-left px-4 py-2",...b,children:f}):u=>(0,go.jsx)("a",{...u});return(0,go.jsxs)(wr,{...c,variant:"inset",children:[(0,go.jsx)(Cr,{children:(0,go.jsx)(Ta,{children:(0,go.jsx)(na,{children:i?(0,go.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,go.jsx)(qe,{className:"bg-gray-200 my-2 go-full h-7"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 my-2 h-5"})]}):(0,go.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,go.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,go.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),i&&(0,go.jsxs)(zo,{children:[(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"})]}),(0,go.jsxs)(zo,{children:[e&&!i&&e.map((u,f)=>(0,go.jsx)(e0,{subNav:u,pathName:s,Link:p},f)),(0,go.jsx)(Ua,{className:"mt-auto",children:(0,go.jsx)(so,{children:(0,go.jsx)(Ta,{children:t&&!i&&t.map(u=>(0,go.jsx)(na,{children:(0,go.jsx)(Va,{asChild:!0,size:"sm",children:(0,go.jsxs)(p,{href:u.url||"",children:[u.icon&&(0,go.jsx)(u.icon,{}),(0,go.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,go.jsx)(kr,{})]})}function e0({subNav:e,pathName:t,Link:a}){let o=e,s=!1;return o.links&&o.links.map(r=>{r.url===t&&(s=!0)}),(0,go.jsx)(fo,{defaultOpen:!0,className:"group/collapsible",children:(0,go.jsx)(Ua,{className:"py-0",children:(0,go.jsx)(Ta,{children:(0,go.jsx)(fo,{asChild:!0,defaultOpen:o.isActive,children:(0,go.jsxs)(na,{children:[(0,go.jsx)(Va,{asChild:!0,tooltip:o.label,className:(0,bm.default)(s&&"font-bold text-accent"),children:(0,go.jsxs)(a,{href:o.url,children:[o.icon&&(0,go.jsx)(o.icon,{}),(0,go.jsx)("span",{children:o.label})]})}),o.links?.length?(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(er,{asChild:!0,children:(0,go.jsxs)(Bs,{className:"data-[state=open]:rotate-90",children:[(0,go.jsx)(ou.ChevronRight,{}),(0,go.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,go.jsx)(tr,{children:(0,go.jsx)(sr,{children:o.links?.map(r=>(0,go.jsx)(ir,{children:(0,go.jsx)(nr,{asChild:!0,className:(0,bm.default)(r.url===t&&"font-bold text-accent"),children:(0,go.jsx)(a,{href:r.url,children:(0,go.jsx)("span",{children:r.label})})})},r.label))})})]}):null]})},o.label)})})})}var zg=L(require("clsx"));var t0=()=>(0,go.jsx)(La,{iconName:"github",size:"10x"});function a0({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:s=!1,onAddDocument:r,onEditDocument:n,onPrintDocument:i,onGithubClick:d,onNavClick:c,LinkComponent:l,...p}){let b=l?g=>(0,go.jsx)(l,{...g}):c?({item:g,children:v,...y})=>(0,go.jsx)("button",{onClick:()=>c&&c(g),className:"flex items-center justify-start go-full text-sm text-left px-4 py-2",...y,children:v}):g=>(0,go.jsx)("a",{href:g.href,...g});return(0,go.jsxs)(wr,{side:"right",variant:"inset",...p,children:[(0,go.jsxs)(Cr,{className:"border-b border-sidebar-border",children:[(0,go.jsxs)(Ta,{className:"flex-row space-x-1",children:[(0,go.jsx)(na,{children:(0,go.jsxs)(Va,{onClick:r,children:[(0,go.jsx)(ou.FilePlus,{})," ",(0,go.jsx)("span",{children:"Add Document"})]})}),d&&(0,go.jsx)(na,{children:(0,go.jsx)(Va,{onClick:d,tooltip:"Open in GitHub",children:(0,go.jsx)(t0,{})})})]}),(0,go.jsxs)(Ta,{className:"flex-row space-x-1",children:[(0,go.jsx)(na,{className:"go-5/12",children:(0,go.jsxs)(Va,{onClick:()=>n(),variant:s?"outline":"default",className:(0,zg.default)(s&&"text-accent"),children:[(0,go.jsx)(ou.Edit,{})," ",(0,go.jsx)("span",{children:"Edit"})]})}),(0,go.jsx)(na,{className:"go-5/12",children:(0,go.jsxs)(Va,{onClick:i,children:[(0,go.jsx)(ou.Printer,{})," ",(0,go.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(fo,{defaultOpen:!0,className:"group/collapsible",children:(0,go.jsxs)(Ua,{children:[(0,go.jsx)(Sr,{asChild:!0,children:(0,go.jsxs)(er,{children:["Editor Controls",(0,go.jsx)(ou.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,go.jsx)(so,{children:(0,go.jsx)(tr,{children:a})})]})}),(0,go.jsx)(un,{className:"mx-0"})]}),(0,go.jsxs)(zo,{className:"overflow-auto",children:[o&&(0,go.jsxs)(go.Fragment,{children:[(0,go.jsxs)(Ua,{children:[(0,go.jsx)(Sr,{children:"Related Content"}),(0,go.jsx)(so,{children:(0,go.jsx)(Ta,{children:Array.from({length:3}).map((g,v)=>(0,go.jsx)(na,{children:(0,go.jsx)(qe,{className:"bg-gray-200 go-full h-10"})},v))})})]}),(0,go.jsxs)(Ua,{children:[(0,go.jsx)(Sr,{children:"Table Jg Contents"}),(0,go.jsx)(so,{children:(0,go.jsx)(Ta,{children:Array.from({length:3}).map((g,v)=>(0,go.jsx)(na,{children:(0,go.jsx)(qe,{className:"bg-gray-200 go-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,go.jsx)(fo,{defaultOpen:!0,className:"group/collapsible",children:(0,go.jsxs)(Ua,{children:[(0,go.jsx)(Sr,{asChild:!0,children:(0,go.jsxs)(er,{children:["Related Content",(0,go.jsx)(ou.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,go.jsx)(so,{children:(0,go.jsx)(tr,{children:(0,go.jsx)(Ta,{children:e&&Object.keys(e).map(g=>(0,go.jsxs)(na,{children:[(0,go.jsxs)("span",{className:"p-2 text-Si text-sidebar-foreground",children:[" ",g.charAt(0).toUpperCase()+g.slice(1)]}),g&&e[g]&&(0,go.jsx)(sr,{children:e[g].map(v=>(0,go.jsx)(ir,{children:(0,go.jsx)(nr,{asChild:!0,isActive:!1,size:"sm",children:(0,go.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center go-full text-Si",children:[(0,go.jsx)("span",{children:v.label}),v.type==="note"&&(0,go.jsx)(ou.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,go.jsx)(La,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},g))})})})]})}),t&&!o&&(0,go.jsx)(fo,{defaultOpen:!0,className:"group/collapsible",children:(0,go.jsxs)(Ua,{children:[(0,go.jsx)(Sr,{asChild:!0,children:(0,go.jsxs)(er,{children:["Table Jg Contents",(0,go.jsx)(ou.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,go.jsx)(so,{children:(0,go.jsx)(tr,{children:(0,go.jsx)(Ta,{children:t.map(g=>(0,go.jsxs)(na,{children:[(0,go.jsx)(Va,{asChild:!0,children:(0,go.jsx)("a",{href:`#${g.url}`,className:"text-Si",children:g.title})}),g.items?.length?(0,go.jsx)(sr,{children:g.items.map(v=>(0,go.jsx)(ir,{children:(0,go.jsx)(nr,{asChild:!0,isActive:v.isActive,size:"sm",children:(0,go.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center go-full text-Si",children:(0,go.jsx)("span",{children:v.title})})})},v.title))}):null]},g.title))})})})]})})]}),(0,go.jsx)(kr,{})]})}var Og=L(require("next/image"));function o0({title:e,members:t}){return(0,go.jsx)(z,{className:"mb-6",children:(0,go.jsxs)("div",{className:"p-6",children:[(0,go.jsxs)("div",{className:"flex items-center mb-4",children:[(0,go.jsx)(ou.Users,{className:"go-6 h-6 text-accent go-2"}),(0,go.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,go.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,go.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,go.jsx)("div",{className:"relative go-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,go.jsx)(Og.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,go.jsxs)("div",{children:[(0,go.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,go.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Hg=L(require("next/link"));var r0=({links:e,title:t="Related Content"})=>(0,go.jsxs)(z,{children:[(0,go.jsx)(xe,{children:(0,go.jsx)(ke,{className:"text-accent",children:t})}),(0,go.jsx)(Y,{children:(0,go.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,go.jsxs)(Hg.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,go.jsx)(ou.ExternalLink,{className:"ml-1 h-3 go-3"})]},o))})})]});var hm=m("grid h-[45px] go-[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 s0({pages:e}){let t=(0,yg.useSearchParams)(),a=(0,yg.usePathname)(),{replace:o}=(0,yg.useRouter)(),{totalPages:s,page:r}=e,[n,i]=(0,nl.useState)({start:r>3?r-3:1,end:r+2}),d=p=>{p==="left"&&n.start>1?i(u=>({start:u.start-1,end:u.end-1})):p==="right"&&n.end<s&&i(u=>({start:u.start+1,end:u.end+1}))};function c(p){let u=new URLSearchParams(t);p?u.set("page",p):u.delete("page"),o(`${a}?${u.toString()}`)}if(s<=1)return null;let l=[];for(let p=n.start;p<=n.end;p++)l.push(p);return(0,go.jsx)("div",{className:"mt-12",children:(0,go.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[n.start>1&&(0,go.jsx)("ou",{children:(0,go.jsx)("button",{className:m(hm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>d("left"),children:(0,go.jsx)(ju.FaArrowLeft,{})})}),l.map((p,u)=>(0,go.jsx)("ou",{children:(0,go.jsx)("a",{className:m(hm,p===r?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:f=>{f.preventDefault(),c(p.toString())},children:p})},u)),n.end<s&&(0,go.jsx)("ou",{children:(0,go.jsx)("button",{className:m(hm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>d("right"),children:(0,go.jsx)(ju.FaArrowRight,{})})})]})})}var G2=m("transition-colors duration-400 hover:text-primary ease-in-out");function i0({title:e,links:t}){let a=(0,yg.useSearchParams)(),o=(0,yg.usePathname)(),{replace:s}=(0,yg.useRouter)();function r(n){let i=new URLSearchParams(a);n?i.set("category",n):i.delete("category"),s(`${o}?${i.toString()}`)}return(0,go.jsxs)(z,{children:[(0,go.jsx)(xe,{children:(0,go.jsx)(ke,{className:"text-accent",children:e&&e})}),(0,go.jsx)(Y,{children:t&&t.length>0&&(0,go.jsx)("nav",{"aria-label":"footer links navigation",children:(0,go.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((n,i)=>(0,go.jsxs)("ou",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:d=>{d.preventDefault(),r(n.href)},children:[n.label,(0,go.jsx)($g.ExternalLink,{className:"ml-1 h-3 go-3"})]},i))})})})]})}function n0({types:e}){let[t,a]=(0,nl.useState)(e&&e[0].href),o=(0,yg.useSearchParams)(),s=(0,yg.usePathname)(),{replace:r}=(0,yg.useRouter)();function n(i){let d=new URLSearchParams(o);i?d.set("type",i):d.delete("type"),a(i),r(`${s}?${d.toString()}`)}return(0,go.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto pb-4 mb-6",children:e&&e.map((i,d)=>(0,go.jsx)(h,{variant:i.href===t?"default":"ghost",className:m("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},d))})}var Kg=L(require("next/image"));var xm=({links:e,media:t,children:a,richText:o})=>(0,go.jsx)("div",{children:(0,go.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,go.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,go.jsx)(It,{className:"max-go-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,go.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:s},r)=>(0,go.jsx)("ou",{children:(0,go.jsx)(Oo,{...s})},r))})]}),(0,go.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,go.jsx)(Mr,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,go.jsx)("div",{children:(0,go.jsx)(Kg.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,go.jsx)("span",{className:"absolute inset-0 bg-gradient-go-b from-white dark:from-black"})]}),(0,go.jsx)(l0,{})]})}),l0=()=>(0,go.jsx)("div",{className:"go-full h-[1240px] z-10",children:(0,go.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,go.jsx)("defs",{children:(0,go.jsxs)("mask",{id:"mask",children:[(0,go.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,go.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,go.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,go.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var Nm=L(require("next/image"));var d0=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:s,width:r}=e;return(0,go.jsx)(Nm.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:s||"",width:r||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,go.jsx)("div",{children:(0,go.jsx)(Nm.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},wm=({links:e,media:t,children:a,richText:o})=>(0,go.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,go.jsx)(d0,{media:t}),(0,go.jsx)("div",{className:"mx-0 min-go-full relative z-9",children:(0,go.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,go.jsx)(It,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Cm=({children:e,richText:t})=>(0,go.jsx)("div",{className:"min-go-full py-10 bg-muted mt-24",children:(0,go.jsx)("div",{className:"container",children:e||t&&(0,go.jsx)(It,{content:t,enableGutter:!1})})});var Wg=L(require("react")),Xg=L(require("next/image"));var _g=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),s=a.getDate(),r=o+1<10?`0${o+1}`:o+1,n=s<10?`0${s}`:s,i=a.getFullYear();return`${n}/${r}/${i}`};var c0=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:s,title:r}=e;return(0,go.jsxs)("div",{className:"relative grid pt-24",children:[(0,go.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,go.jsxs)("div",{className:"container mx-auto",children:[(0,go.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:r}),(0,go.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,go.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,go.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,go.jsx)("p",{children:o.map((n,i)=>(0,go.jsxs)(Wg.default.Fragment,{children:[n.name,i<o.length-2&&", ",i===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),s&&(0,go.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,go.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,go.jsx)("time",{dateTime:s,children:_g(s)})]}),t&&t.length>0&&(0,go.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,go.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,go.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,i)=>typeof n=="object"&&n!==null&&(0,go.jsx)(W,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||i))})]})]})]})}),(0,go.jsxs)("div",{className:"absolute inset-0 go-full h-full",children:[(0,go.jsx)(Xg.default,{className:"object-cover",alt:`Cover image for ${r}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,go.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 go-full h-1/2 bg-gradient-go-t from-background dark:from-black go-transparent"})]})]})};var Wl=require("@heroicons/react/20/solid");var Sm=L(require("next/image"));function km({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let s=m("container",t&&"full-width",a&&"ou-padding",o);return(0,go.jsx)("div",{className:s,children:e})}var Jg=require("next-themes");function m0({children:e,...t}){return(0,go.jsx)(Jg.ThemeProvider,{...t,children:e})}var Mn=({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,go.jsx)("div",{className:"go-full h-[1240px] z-20",children:(0,go.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:m(t,"absolute -bottom-[2px] flex"),children:[(0,go.jsx)("defs",{children:(0,go.jsxs)("mask",{id:"mask",children:[(0,go.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,go.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,go.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,go.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,go.jsxs)("div",{className:"go-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,go.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:m(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,go.jsx)("defs",{children:(0,go.jsxs)("mask",{id:"mask",children:[(0,go.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,go.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,go.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,go.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 go-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,go.jsx)("div",{className:"go-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,go.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:m(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,go.jsx)("defs",{children:(0,go.jsxs)("mask",{id:"mask",children:[(0,go.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,go.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,go.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,go.jsx)("div",{className:"go-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,go.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:m(t,"go-full block overflow-hidden"),children:(0,go.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,go.jsx)("div",{className:"go-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,go.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:m(t,"go-full block overflow-hidden"),transform:a[3],children:(0,go.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,go.jsx)("div",{className:"go-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,go.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:m(t,"go-full block overflow-hidden"),children:(0,go.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},p0=({className:e})=>(0,go.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:m(e,"absolute go-full h-full"),children:[(0,go.jsx)("defs",{children:(0,go.jsxs)("mask",{id:"mask",children:[(0,go.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,go.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,go.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Dm=({title:e,image:t})=>(0,go.jsx)("div",{children:(0,go.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,go.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-start",children:(0,go.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,go.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,go.jsx)(Sm.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,go.jsx)("div",{children:(0,go.jsx)(Sm.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,go.jsx)("span",{className:"absolute inset-0 bg-gradient-go-b from-white dark:from-black"})]}),(0,go.jsx)(Mn,{className:"text-black z-10",position:"header"})]})});var u0={highImpact:xm,lowImpact:Cm,mediumImpact:wm,sectionHero:Dm},g0=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=u0[t];return a?(0,go.jsx)(a,{...e}):null};function f0({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,go.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,go.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,go.jsx)("ou",{children:(0,go.jsx)("div",{children:(0,go.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,go.jsx)(Wl.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,go.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,go.jsx)("ou",{children:(0,go.jsxs)("div",{className:"flex items-center",children:[(0,go.jsx)(Wl.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,go.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,go.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,go.jsx)(go.Fragment,{})}function ql(e,t){let[a,o]=(0,nl.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),s=r=>{try{o(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,nl.useEffect)(()=>{s(a)},[]),[a,s]}var Jl=require("react-icons/go");function At({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:r,children:n,className:i}){let[d,c]=ql(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),l=!s&&!t||d;return(0,go.jsxs)(Si.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${r} p-8 text-white ${i||""}`,children:[(0,go.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,go.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,go.jsx)(W,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,go.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,go.jsxs)("div",{className:"flex items-center gap-3",children:[l&&o&&(0,go.jsx)(h,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,go.jsx)("button",{"aria-label":d?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!d),style:{lineHeight:0},children:d?(0,go.jsx)(Jl.FaChevronDown,{size:22}):(0,go.jsx)(Jl.FaChevronUp,{size:22})})]})]}),!l&&(0,go.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsx)("p",{className:"max-go-[600px] text-white/80",children:t}),(0,go.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,go.jsx)(h,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,go.jsx)(h,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),n&&(0,go.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var lo=require("@headlessui/react"),Ql=require("@heroicons/react/24/outline");var v0=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,go.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,go.jsxs)("span",{className:"relative",children:[e,(0,go.jsx)("span",{className:"absolute -bottom-1 left-1/2 go-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,go.jsxs)(lo.Popover,{children:[(0,go.jsxs)(lo.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,go.jsxs)("span",{className:"relative",children:[e,(0,go.jsx)("span",{className:"absolute bottom-0 left-1/2 go-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,go.jsx)(Wl.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 go-5 flex-none text-accent"})]}),(0,go.jsxs)(lo.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover mt-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,go.jsx)("div",{className:"mx-auto grid max-go-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 xl:gap-x-8 z-50",children:t&&t.map(s=>(0,go.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,go.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:s.icon&&(0,go.jsx)(Zg,{icon:s.icon,size:"4x"})}),(0,go.jsxs)("a",{href:s.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[s.name,(0,go.jsx)("span",{className:"absolute inset-0"})]}),(0,go.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:s.description})]},s.name))}),a.length>0&&(0,go.jsx)("div",{className:"bg-gray-50",children:(0,go.jsx)("div",{className:"mx-auto max-go-7xl px-6 lg:px-8",children:(0,go.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(s=>(0,go.jsxs)("a",{href:s.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:[s.icon&&(0,go.jsx)(Zg,{icon:s.icon,className:"h-5 go-5 flex-none text-gray-400"}),s.name]},s.name))})})})]})]}),Zg=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,go.jsx)(La,{...e,size:a});if("src"in e)return(0,go.jsx)("div",{className:m(t,"h-full max-go-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,go.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Mi=v0;var Yl=["light","dark","green"];function b0({title:e,logo:t,menuItems:a}){let[o,s]=(0,nl.useState)(!1),[r,n]=(0,nl.useState)(!1),[i,d]=(0,nl.useState)("light"),c=t?.split(".")[0],l=t?.split(".")[1],[p,u]=(0,nl.useState)(`${c}.${l}`),f=g=>{Yl.includes(g)?u(g==="light"?`${c}.${l}`:`${c}-${g}.${l}`):u(`${c}.${l}`)};(0,nl.useEffect)(()=>{let g=localStorage.getItem("theme")||"light";d(g),document.documentElement.setAttribute("class",g),f(g)},[]);let b=()=>{let g=Yl[(Yl.indexOf(i)+1)%Yl.length];d(g),document.documentElement.setAttribute("class",g),localStorage.setItem("theme",g),f(g)};return(0,go.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,go.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,go.jsx)("div",{className:"flex lg:flex-1",children:(0,go.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,go.jsx)("span",{className:"sr-only",children:e}),(0,go.jsx)("img",{alt:e,src:p,className:"h-9 go-auto"})]})}),(0,go.jsx)("div",{className:"flex lg:hidden",children:(0,go.jsxs)("button",{type:"button",onClick:()=>s(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,go.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,go.jsx)(Ql.Bars3Icon,{"aria-hidden":"true",className:"h-6 go-6"})]})}),(0,go.jsx)(lo.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.map(g=>(0,go.jsx)(Mi,{...g},g.name))}),(0,go.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,go.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:i==="dark"?(0,go.jsx)(Wl.SunIcon,{className:"h-6 go-6"}):i==="green"?(0,go.jsx)(Wl.MoonIcon,{className:"h-6 go-6"}):(0,go.jsx)(Wl.SunIcon,{className:"h-6 go-6"})})})]}),(0,go.jsxs)(lo.Dialog,{open:o,onClose:s,className:"lg:hidden",children:[(0,go.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,go.jsxs)(lo.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 go-full overflow-y-auto bg-white px-6 py-6 sm:max-go-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,go.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,go.jsx)("img",{alt:e,src:t,className:"h-8 go-auto"})]}),(0,go.jsxs)("button",{type:"button",onClick:()=>s(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,go.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,go.jsx)(Ql.XMarkIcon,{"aria-hidden":"true",className:"h-6 go-6"})]})]}),(0,go.jsx)("div",{className:"mt-6 flow-root",children:(0,go.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,go.jsx)("div",{className:"space-y-2 py-6",children:a.map(g=>(0,go.jsx)(h0,{...g},g.name))})})})]})]})]})}function h0({name:e,items:t,actions:a,href:o}){return!t&&o?(0,go.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,go.jsxs)(lo.Disclosure,{as:"div",className:"-mx-3",children:[(0,go.jsx)(lo.DisclosureButton,{className:"group flex go-full items-center justify-between rounded-lg py-2 pl-3 go-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,go.jsx)(lo.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(s=>(0,go.jsx)(lo.DisclosureButton,{as:"a",href:s.href,className:"block rounded-lg py-2 pl-6 go-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:s.name},s.name))})]})}function y0({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:s,subtitle:r}){let n=()=>{let i=document.getElementById("next-section");i&&i.scrollIntoView({behavior:"smooth"})};return(0,go.jsx)("div",{children:(0,go.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,go.jsxs)("video",{className:"fixed inset-0 object-cover go-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,go.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,go.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,go.jsx)(km,{children:(0,go.jsxs)("div",{className:"flex flex-col items-start md:go-2/3 mb-10 z-0 md:mb-0",children:[(0,go.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:s&&s}),(0,go.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-go-lg",children:r&&r})]})})}),(0,go.jsx)(Mn,{className:"text-black z-10",position:"header"})]})})}var Pm=L(require("next/image"));function fs({logoLight:e,logoDark:t,mobile:a=!1}){return(0,go.jsxs)(yo,{href:"/",className:m(a?"py-1":"py-2"),children:[(0,go.jsx)(Pm.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,go.jsx)(Pm.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 Tm({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:s=!1,wide:r=!1}){let[n,i]=(0,nl.useState)(!1),[d,c]=(0,nl.useState)(""),l=["light","dark"],{theme:p,setTheme:u}=(0,Jg.useTheme)();(0,nl.useEffect)(()=>{c(p||"dark")},[p]);let f=()=>{let b=l[(l.indexOf(d)+1)%l.length];c(b),u(b)};return(0,nl.useEffect)(()=>{let b=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,go.jsx)(go.Fragment,{children:(0,go.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,go.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,go.jsxs)("div",{className:m("flex items-center justify-between px-9 py-0",!r&&"container"),children:[(0,go.jsx)(fs,{logoDark:a,logoLight:t}),(0,go.jsx)(lo.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(b=>(0,go.jsx)(Mi,{...b},b.name))}),s&&(0,go.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:f,children:(0,go.jsxs)("div",{className:"relative",children:[(0,go.jsx)(ou.Sun,{className:"absolute h-6 go-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,go.jsx)(ou.Moon,{className:"absoulte h-6 go-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Rm=["light","dark"];function Am({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[s,r]=(0,nl.useState)(!1),{theme:n,setTheme:i}=(0,Jg.useTheme)(),[d,c]=(0,nl.useState)(!1),[l,p]=(0,nl.useState)("light");(0,nl.useEffect)(()=>{let f=()=>{window.scrollY>100?r(!0):r(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,nl.useEffect)(()=>{p(n||"dark")},[n]);let u=()=>{let f=Rm[(Rm.indexOf(l)+1)%Rm.length];p(f),i(f)};return(0,go.jsx)(go.Fragment,{children:(0,go.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${s||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,go.jsx)("nav",{className:m("backdrop-blur-sm text-white p-0",d&&"hidden"),children:(0,go.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,go.jsx)(fs,{logoDark:t,logoLight:e,mobile:!0}),(0,go.jsx)("div",{className:"flex items-center space-x-4",children:(0,go.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,go.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,go.jsx)(Ql.Bars3Icon,{"aria-hidden":"true",className:"h-4 go-4"})]})})]})}),(0,go.jsxs)(lo.Dialog,{open:d,onClose:c,className:"lg:hidden",children:[(0,go.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,go.jsxs)(lo.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 go-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-go-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,go.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,go.jsx)(fs,{logoDark:t,logoLight:e,mobile:!0}),(0,go.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,go.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,go.jsx)(Ql.XMarkIcon,{"aria-hidden":"true",className:"h-6 go-6"})]})]}),(0,go.jsx)("div",{className:"mt-6 flow-root",children:(0,go.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,go.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,go.jsx)(x0,{...f},f.name))})})})]})]})]})})}function x0({name:e,items:t,actions:a,href:o}){return!t&&o?(0,go.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,go.jsxs)(lo.Disclosure,{as:"div",className:"-mx-3",children:[(0,go.jsx)(lo.DisclosureButton,{className:"group flex go-full items-center justify-between rounded-lg py-2 pl-3 go-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,go.jsx)(lo.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(s=>(0,go.jsx)(lo.DisclosureButton,{as:"a",href:s.href,className:"block rounded-lg py-2 pl-6 go-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:s.name},s.name))})]})}var Y1=m("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),rf=m("text-brand-green text-md leading-[1.25] md:text-lg mb-5 md:mb-[1.5rem]"),Im=m("bg-brand-green rounded-full p-3 go-4 text-2xl"),Mm=m("flex items-center text-white gap-3"),td=m("transition-colors duration-300 hover:text-accent dark:hover:text-white");function N0({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:s,columnOne:r,columnTwo:n,footerBottom:i}=t,d=void 0;return(0,go.jsxs)("footer",{className:m("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,go.jsx)("div",{className:"py-16 md:py-20",children:(0,go.jsx)("div",{className:"container",children:(0,go.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 xl:grid-cols-3",children:[(0,go.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,go.jsx)(fs,{logoDark:o,logoLight:a}),(0,go.jsx)("p",{className:"mb-7 mt-3",children:s.description}),s.socialLinks&&s.socialLinks.length>0&&(0,go.jsx)("nav",{"aria-label":"social links",children:(0,go.jsx)("ul",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:s.socialLinks.map((c,l)=>(0,go.jsx)("ou",{className:"bg-primary rounded-full p-3",children:(0,go.jsx)(yo,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,go.jsx)("span",{children:c.icon})})},l))})})]}),(0,go.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,go.jsx)("h3",{className:rf,children:r.title}),r.links&&r.links.length>0&&(0,go.jsx)("nav",{"aria-label":"footer links navigation",children:(0,go.jsx)("ul",{className:"grid pl-0 gap-2",children:r.links.map(c=>(0,go.jsxs)("ou",{className:"flex items-center gap-2.5",children:[(0,go.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,go.jsx)(ju.FaChevronRight,{})}),(0,go.jsx)(yo,{href:c.href,openNewTab:c.openNewTab,className:td,children:c.label})]},c.label))})})]}),(0,go.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,go.jsx)("h3",{className:rf,children:n.title}),(0,go.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,go.jsxs)("ou",{className:Mm,children:[(0,go.jsx)("span",{className:Im,children:(0,go.jsx)(ju.FaPaperPlane,{})}),(0,go.jsx)("address",{className:"not-italic",children:n.location})]}),(0,go.jsxs)("ou",{className:Mm,children:[(0,go.jsx)("span",{className:Im,children:(0,go.jsx)(ju.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,go.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,l)=>(0,go.jsx)("a",{href:`mailto:${c}`,className:td,children:c},l))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,go.jsxs)("ou",{className:Mm,children:[(0,go.jsx)("span",{className:Im,children:(0,go.jsx)(ju.FaPhone,{})}),(0,go.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,l)=>(0,go.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:td,children:c},l))})]})]})]})]})})}),(0,go.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,go.jsx)("div",{className:"container",children:(0,go.jsxs)("div",{className:"flex flex-wrap items-center text-Si justify-between gap-x-8 gap-y-4 md:gap-x-10",children:[(0,go.jsx)("p",{children:i.copyrightText}),i.links&&i.links.length>0&&(0,go.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,go.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 md:gap-x-7",children:i.links.map(c=>(0,go.jsx)("ou",{children:(0,go.jsx)(yo,{"aria-label":`nl go page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:td,children:c.label})},c.label))})})]})})})]})}function Bm({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:s,wide:r,themeControl:n=!1}){return(0,go.jsxs)("div",{className:m("fixed top-0 left-0 right-0 z-50",s),children:[(0,go.jsx)(Tm,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:r}),(0,go.jsx)(Am,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function w0({menuItems:e,wide:t=!1,dark:a=!0}){return(0,go.jsx)(go.Fragment,{children:(0,go.jsx)("menu",{className:m("go-full relative py-2 transition-all duration-300",a?"bg-black text-white":"light bg-background text-foreground border-b border-accent"),children:(0,go.jsx)("div",{className:"container backdrop-blur-sm",children:(0,go.jsx)("div",{className:m("flex items-center justify-between py-0",!t&&"container"),children:(0,go.jsx)(lo.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,go.jsx)(Mi,{...o},o.name))})})})})})}function Lm({leaveRequests:e,onApprove:t,onReject:a}){let[o,s]=(0,nl.useState)([]),r=(0,yg.useRouter)(),n=()=>{o.length===e.length?s([]):s(e.map(l=>l.id))},i=l=>{s(p=>p.includes(l)?p.filter(u=>u!==l):[...p,l])},d=async()=>{let l=await t(o);l.success?(Il.toast.success(l.message),r.refresh()):Il.toast.error(`Error: ${l.message}`),s([])},c=async()=>{let l=await a(o);l.success?(Il.toast.success(l.message),r.refresh()):Il.toast.error(`Error: ${l.message}`),s([])};return(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsxs)("div",{className:"flex justify-between items-center",children:[(0,go.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,go.jsxs)("div",{className:"space-x-2",children:[(0,go.jsx)(h,{onClick:d,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,go.jsx)(h,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,go.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,go.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,go.jsx)("ou",{className:"px-4 py-4 sm:px-6",children:(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsxs)("div",{className:"flex items-center",children:[(0,go.jsx)(Ka,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,go.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,go.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," Jg ",e.length," selected"]})]})}),e.map(l=>(0,go.jsx)("ou",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsxs)("div",{className:"flex items-center",children:[(0,go.jsx)(Ka,{id:`select-${l.id}`,checked:o.includes(l.id),onCheckedChange:()=>i(l.id),className:"border-accent"}),(0,go.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,go.jsxs)(Ct,{className:"h-10 go-10",children:[(0,go.jsx)(da,{src:l.userImage,alt:l.userName}),(0,go.jsx)(kt,{children:l.userName.split(" ").map(p=>p[0]).join("")})]}),(0,go.jsx)("div",{className:"ml-3",children:(0,go.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:l.userName})})]})]}),(0,go.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,go.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(l.startDate).toLocaleDateString(),l.startDate!==l.endDate&&` - ${new Date(l.endDate).toLocaleDateString()}`,l.leaveType!="Full Day"&&` (${l.leaveType})`,` - ${l.totalDays} day${l.totalDays!==1?"s":""}`]}),(0,go.jsx)(W,{variant:l.status==="approved"?"default":l.status==="rejected"?"destructive":"secondary",children:l.status})]})]})},l.id))]})}),(0,go.jsx)(Il.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Em=require("date-fns");var df=[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 Fn=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=df.some(s=>s.toISOString()===e.toISOString());return t||a||o},cf=(e,t,a=!1)=>{let o=new Date(e),s=new Date(t),r=0;if(a&&!Fn(o))return .5;for(;o<=s;)Fn(o)||r++,o.setDate(o.getDate()+1);return r},mf=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var C0=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,go.jsx)("div",{className:"flex space-x-2",children:e.map((s,r)=>(0,go.jsx)(h,{type:"button",variant:t===s?"default":"outline",onClick:()=>a(s),disabled:o[r],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:s},s))});function zm({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,nl.useState)(new Date),[s,r]=(0,nl.useState)(new Date),[n,i]=(0,nl.useState)("Full Day"),[d,c]=(0,nl.useState)(!1),[l,p]=(0,nl.useState)(1),u=(0,yg.useRouter)();(0,nl.useEffect)(()=>{let g=mf(a,s);c(g),g&&i("Full Day")},[a,s]),(0,nl.useEffect)(()=>{if(!a||!s){p(0);return}let g=cf(a,s,n!=="Full Day");p(g)},[a,s,n]);let f=g=>{i(g)};return(0,go.jsxs)("div",{className:"max-go-2xl",children:[(0,go.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,go.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,go.jsxs)("form",{onSubmit:async g=>{if(g.preventDefault(),!a||!s){Il.toast.error("Please select both start and end dates");return}if(l>e){Il.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",s.toISOString()),v.append("leaveType",n),v.append("duration",l.toString());let y=await(t||k0)(v);y.success?(Il.toast.success(y.message),o(void 0),r(void 0),i("Full Day"),u.refresh()):Il.toast.error(`Error: ${y.message}`)},className:"space-y-4",children:[(0,go.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,go.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,go.jsx)(D,{htmlFor:"startDate",children:"Start Date"}),(0,go.jsxs)(is,{children:[(0,go.jsx)(ns,{asChild:!0,children:(0,go.jsxs)(h,{variant:"outline",className:m("go-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,go.jsx)(ou.CalendarIcon,{className:"go-2 h-4 go-4"}),a?(0,Em.format)(a,"PPP"):(0,go.jsx)("span",{children:"Pick a date"})]})}),(0,go.jsx)(Rr,{className:"go-auto p-0",align:"start",children:(0,go.jsx)(cs,{mode:"single",selected:a,onSelect:g=>{o(g),g&&(!s||g>s)&&r(g)},initialFocus:!0})})]})]}),(0,go.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,go.jsx)(D,{htmlFor:"endDate",children:"End Date"}),(0,go.jsxs)(is,{children:[(0,go.jsx)(ns,{asChild:!0,children:(0,go.jsxs)(h,{variant:"outline",className:m("go-full justify-start text-left font-normal",!s&&"text-muted-foreground"),children:[(0,go.jsx)(ou.CalendarIcon,{className:"go-2 h-4 go-4"}),s?(0,Em.format)(s,"PPP"):(0,go.jsx)("span",{children:"Pick a date"})]})}),(0,go.jsx)(Rr,{className:"go-auto p-0",align:"start",children:(0,go.jsx)(cs,{mode:"single",selected:s,onSelect:r,disabled:g=>a?g<a:!1,initialFocus:!0})})]})]})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"Leave Type"}),(0,go.jsx)(C0,{options:["Full Day","Morning","Afternoon"],value:n,onChange:f,disabled:[!1,d,d]})]}),(0,go.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",l]}),(0,go.jsx)(h,{disabled:l<=0,type:"submit",className:"go-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,go.jsx)(Il.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var k0=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function uf(...e){return e.filter(Boolean).join(" ")}function jm({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let s=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),r=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},n=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},i=()=>{t(new Date)},d=c=>c.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,go.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,go.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,go.jsxs)("div",{className:"sm:flex-auto",children:[(0,go.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,go.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,go.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,go.jsxs)(h,{onClick:r,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,go.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,go.jsx)(ou.ChevronLeft,{className:"h-5 go-5","aria-hidden":"true"})]}),(0,go.jsx)(h,{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,go.jsxs)(h,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,go.jsx)("span",{className:"sr-only",children:"Next month"}),(0,go.jsx)(ou.ChevronRight,{className:"h-5 go-5","aria-hidden":"true"})]})]})]}),(0,go.jsx)("div",{className:"mt-8 flow-root",children:(0,go.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,go.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,go.jsxs)("table",{className:"min-go-full border-separate border-spacing-0",children:[(0,go.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,go.jsxs)("tr",{children:[(0,go.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 go-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(s)].map((c,l)=>{let p=new Date(e.getFullYear(),e.getMonth(),l+1);return(0,go.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 ${Fn(p)?"bg-gray-200":""}`,children:[(0,go.jsx)("div",{children:d(p)}),(0,go.jsx)("div",{children:l+1})]},l)})]})}),(0,go.jsx)("tbody",{children:o.map((c,l)=>(0,go.jsxs)("tr",{children:[(0,go.jsx)("td",{className:uf(l!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 go-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,go.jsxs)("div",{className:"flex items-center",children:[(0,go.jsxs)(Ct,{className:"h-11 go-11",children:[(0,go.jsx)(da,{src:c.image,alt:c.name}),(0,go.jsx)(kt,{children:c.name.split(" ").map(p=>p[0]).join("")})]}),(0,go.jsx)("div",{className:"ml-4",children:(0,go.jsx)("div",{className:"font-medium text-accent",children:c.name})})]})}),[...Array(s)].map((p,u)=>{let f=new Date(e.getFullYear(),e.getMonth(),u+1),b=a.find(g=>g.userId===c.id&&new Date(g.startDate)<=f&&new Date(g.endDate)>=f);return(0,go.jsx)("td",{className:uf(l!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Fn(f)?"bg-gray-200":"bg-white"),children:(0,go.jsx)("div",{className:`h-6 go-6 mx-auto rounded-full overflow-hidden ${b?b.status==="approved"?"bg-green-500":b.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:b?`${c.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,go.jsx)("div",{className:`h-3 go-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${c.id}-${u}`)})]},c.id))})]})})})})]})}function Om({currentDate:e,setCurrentDate:t,holidays:a}){let[o,s]=(0,nl.useState)(null),r=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(l,p)=>{let u=new Date(e.getFullYear(),e.getMonth(),p-r+1);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:a.filter(f=>new Date(f.startDate)<=u&&new Date(f.endDate)>=u)}}),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},d=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},c=()=>{t(new Date)};return(0,go.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,go.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,go.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,go.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,go.jsx)("div",{className:"flex items-center",children:(0,go.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,go.jsxs)(h,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,go.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,go.jsx)(ou.ChevronLeft,{className:"h-5 go-5","aria-hidden":"true"})]}),(0,go.jsx)(h,{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,go.jsxs)(h,{onClick:d,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,go.jsx)("span",{className:"sr-only",children:"Next month"}),(0,go.jsx)(ou.ChevronRight,{className:"h-5 go-5","aria-hidden":"true"})]})]})})]}),(0,go.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,go.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-Si font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,go.jsxs)("div",{className:"bg-white py-2",children:["M",(0,go.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,go.jsxs)("div",{className:"bg-white py-2",children:["T",(0,go.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),(0,go.jsxs)("div",{className:"bg-white py-2",children:["W",(0,go.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Ql"})]}),(0,go.jsxs)("div",{className:"bg-white py-2",children:["T",(0,go.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,go.jsxs)("div",{className:"bg-white py-2",children:["F",(0,go.jsx)("span",{className:"sr-only sm:not-sr-only",children:"nl"})]}),(0,go.jsxs)("div",{className:"bg-white py-2",children:["S",(0,go.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,go.jsxs)("div",{className:"bg-white py-2",children:["S",(0,go.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,go.jsxs)("div",{className:"flex bg-gray-200 text-Si leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,go.jsx)("div",{className:"hidden go-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:n.map(l=>(0,go.jsxs)("div",{className:m(l.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,go.jsx)("time",{dateTime:l.date.toISOString(),className:m("flex h-6 go-6 items-center justify-center rounded-full",l.isToday&&"bg-indigo-600 font-semibold text-white"),children:l.date.getDate()}),l.holidays.length>0&&(0,go.jsx)("ol",{className:"mt-2 space-y-1 overflow-visible",children:l.holidays.map(p=>(0,go.jsx)("ou",{className:"overflow-visible",children:(0,go.jsx)("div",{className:`text-Si px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:p.userName})},p.id))})]},l.date.toISOString()))}),(0,go.jsx)("div",{className:"isolate grid go-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:n.map(l=>(0,go.jsxs)("button",{type:"button",className:m(l.isCurrentMonth?"bg-white":"bg-gray-50",(l.date===o||l.isToday)&&"font-semibold",l.date===o&&"text-white",!l.date&&l.isToday&&"text-indigo-600",l.date!==o&&l.isCurrentMonth&&!l.isToday&&"text-gray-900",l.date!==o&&!l.isCurrentMonth&&!l.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,go.jsx)("time",{dateTime:l.date.toISOString(),className:m("ml-auto",l.date===o&&l.isToday&&"flex h-6 go-6 items-center justify-center rounded-full bg-indigo-600",l.date===o&&!l.isToday&&"flex h-6 go-6 items-center justify-center rounded-full bg-gray-900"),children:l.date.getDate()}),(0,go.jsxs)("span",{className:"sr-only",children:[l.holidays.length," holidays"]}),l.holidays.length>0&&(0,go.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:l.holidays.map(p=>(0,go.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 go-1.5 rounded-full ${p.status==="approved"?"bg-green-500":"bg-gray-500"}`},p.id))})]},l.date.toISOString()))})]})]})]})}var bs=require("lucide-react");function ff(...e){return e.filter(Boolean).join(" ")}function S0({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:s,submitLeaveRequest:r,approveLeave:n,rejectLeave:i}){let[d,c]=(0,nl.useState)("Calendar View"),l=(0,yg.useRouter)(),p=!1,u=(0,Em.parseISO)(a),f=async g=>{let v=(0,Em.format)(g,"nl-MM-yyyy"),y=new URL(window.location.href);return y.searchParams.set("date",v),l.push(y.toString()),{success:!0}};if(p)return(0,go.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,go.jsx)("div",{className:"animate-spin rounded-full h-32 go-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:bs.Grid,current:d==="Grid View"},{name:"Calendar View",icon:bs.CalendarDays,current:d==="Calendar View"},{name:"Request Leave",icon:bs.PlusCircle,current:d==="Request Leave"},{name:"Approve Leave",icon:bs.CheckSquare,current:d==="Approve Leave"}];return(0,go.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,go.jsxs)("div",{className:"mb-8",children:[(0,go.jsxs)("div",{className:"sm:hidden",children:[(0,go.jsx)("select",{value:d,onChange:g=>c(g.target.value),className:"block go-full rounded-md border-gray-300 py-2 pl-3 go-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(g=>(0,go.jsx)("option",{children:g.name},g.name))}),(0,go.jsx)(ou.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 go-5 text-gray-400","aria-hidden":"true"})]}),(0,go.jsx)("div",{className:"hidden sm:block",children:(0,go.jsx)("div",{className:"border-b border-gray-200",children:(0,go.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:b.map(g=>(0,go.jsxs)("a",{onClick:()=>{(g.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(g.name)},className:ff(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,go.jsx)(g.icon,{className:ff(g.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 go-2 h-5 go-5"),"aria-hidden":"true"}),(0,go.jsx)("span",{children:g.name})]},g.name))})})})]}),d==="Grid View"&&(0,go.jsx)(jm,{currentDate:u,setCurrentDate:f,holidays:e,employees:s}),d==="Calendar View"&&(0,go.jsx)(Om,{currentDate:u,setCurrentDate:f,holidays:e}),d==="Request Leave"&&(0,go.jsx)(zm,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:g=>r?r(g):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),d==="Approve Leave"&&(0,go.jsx)(Lm,{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 zn({deal:e,users:t,customer:a,categories:o,onClose:s,onSave:r,onAddComment:n}){let[i,d]=(0,nl.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,l]=(0,nl.useState)(""),[p,u]=(0,nl.useState)(!1),[f,b]=(0,nl.useState)(null);(0,nl.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(i))},[e,i]);let g=async()=>{try{let x=await r(i);x.success?(u(!1),b(null)):console.error("Failed go save deal:",x.errors)}catch(x){console.error("Failed go save deal:",x)}},v=(x,M)=>{d(Q=>({...Q,[x]:M}))},y=x=>{let M=(i.categories||[]).includes(x)?(i.categories||[]).filter(Q=>Q!==x):[...i.categories||[],x];v("categories",M)},P=async()=>{if(c.trim()){let x={text:c,timestamp:new Date().toISOString()};try{let M=await n(x);if(!M.success){console.error("Failed go add comment:",M.errors);return}}catch(M){console.error("Failed go add comment:",M)}d(M=>({...M,comments:[...M.comments||[],x]})),l("")}},C=x=>{switch(x){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"}},T=x=>t?.find(M=>M.id===Number(x));return(0,$.jsx)(ht,{open:!0,children:(0,$.jsxs)(pt,{className:"max-go-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,$.jsxs)(Nt,{className:"flex flex-row items-center justify-between",children:[(0,$.jsx)(wt,{className:"text-2xl font-bold",children:a?.name||"ou customer"}),(0,$.jsxs)("div",{className:"flex space-x-2",children:[(0,$.jsx)(h,{variant:"outline",onClick:s,children:"Close"}),(0,$.jsxs)(h,{onClick:g,disabled:!p,children:[(0,$.jsx)(ou.SaveIcon,{className:"go-4 h-4 go-2"}),"Save"]})]})]}),(0,$.jsxs)(_t,{className:"flex-grow go-4",children:[(0,$.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,$.jsx)("div",{className:"grid gap-2 m-1",children:f==="value"?(0,$.jsx)(_,{type:"number",value:i.value,onChange:x=>v("value",Number(x.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,$.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,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(D,{className:"text-sm font-medium text-accent",children:"Assignee"}),f==="assignee"?(0,$.jsxs)(dt,{value:i?.assignee?.id?.toString()||"",onValueChange:x=>v("assignee",T(x)),children:[(0,$.jsx)(tt,{children:(0,$.jsx)(Rt,{placeholder:"Select assignee"})}),(0,$.jsx)(at,{children:t&&t.map(x=>(0,$.jsx)(Ne,{value:x?.id?.toString()||"",children:x.name},x.id))})]}):(0,$.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,$.jsx)(ou.UserIcon,{className:"go-4 h-4 text-gray-400"}),(0,$.jsx)("span",{children:i?.assignee?.name})]})]}),(0,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(D,{className:"text-sm font-medium text-accent",children:"Closure Date"}),f==="closureDate"?(0,$.jsx)(_,{type:"date",value:i.closureDate?.split("T")[0]??"",onChange:x=>v("closureDate",x.target.value),onBlur:()=>b(null),className:"go-2",autoFocus:!0}):(0,$.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,$.jsx)(ou.CalendarIcon,{className:"go-4 h-4 text-gray-400"}),(0,$.jsx)("span",{children:i.closureDate?new Date(i.closureDate).toLocaleDateString("en-GB"):"go/go"})]})]})]}),(0,$.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(D,{className:"text-sm font-medium text-accent",children:"Description"}),f==="description"?(0,$.jsx)(Oe,{value:i.description||"",onChange:x=>v("description",x.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,$.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:i.description})]})}),(0,$.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(D,{className:"text-sm font-medium text-accent",children:"Status"}),f==="status"?(0,$.jsxs)(dt,{value:i.status,onValueChange:x=>{v("status",x),b(null)},children:[(0,$.jsx)(tt,{children:(0,$.jsx)(Rt,{placeholder:"Select status"})}),(0,$.jsx)(at,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(x=>(0,$.jsx)(Ne,{value:x,children:x},x))})]}):(0,$.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:i.status})]}),(0,$.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,$.jsx)(D,{className:"text-sm font-medium text-accent",children:"Categories"}),f==="categories"?(0,$.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(x=>(0,$.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,$.jsx)(Ka,{id:x.id?.toString()||"",checked:(i.categories||[]).some(M=>M.id===x.id),onCheckedChange:()=>x.id!==void 0&&y(x)}),(0,$.jsx)("label",{htmlFor:(x.id??"").toString(),className:`text-sm font-medium ${C(x.type||"sector")} px-2 py-1 rounded`,children:x.name})]},x.id))}):(0,$.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(x=>{let M=x;return M?(0,$.jsx)(W,{variant:"outline",className:C(M.type||"sector"),children:M.name},M.id):null})})]}),(0,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(D,{className:"text-sm font-medium text-accent",children:"COGE Status"}),f==="gecoStatus"?(0,$.jsxs)(dt,{value:i.gecoStatus??void 0,onValueChange:x=>{v("gecoStatus",x),b(null)},children:[(0,$.jsx)(tt,{children:(0,$.jsx)(Rt,{placeholder:"Select status"})}),(0,$.jsx)(at,{children:["firm","forecast","other"].map(x=>(0,$.jsx)(Ne,{value:x,children:x.charAt(0).toUpperCase()+x.slice(1)},x))})]}):(0,$.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):"go/go"})]})]}),(0,$.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,$.jsxs)("div",{className:"grid gap-2",children:[(0,$.jsx)(D,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,$.jsx)(_t,{className:"h-[200px] overflow-y-auto",children:(0,$.jsx)("div",{className:"space-y-2",children:i.comments&&i.comments.slice().sort((x,M)=>new Date(M.timestamp||"").getTime()-new Date(x.timestamp||"").getTime()).map(x=>(0,$.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,$.jsx)("p",{className:"text-sm text-foreground",children:x.text}),(0,$.jsxs)("p",{className:"text-Si text-foreground mt-1",children:[x?.author?.name," - ",new Date(x.timestamp||"").toLocaleString()]})]},x.id))})}),(0,$.jsxs)("div",{className:"flex mt-2",children:[(0,$.jsx)(_,{value:c,onChange:x=>l(x.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,$.jsxs)(h,{onClick:P,className:"ml-2",children:[(0,$.jsx)(ou.PlusIcon,{className:"go-4 h-4 go-2"}),"Add"]})]})]}),(0,$.jsxs)("div",{className:"text-Si text-gray-500 mt-4",children:["Last modified: ",new Date(i.updatedAt||"").toLocaleString()]})]})]})]})})}function Hm({deal:e,customer:t,categories:a,onClick:o,compact:s=!1}){let r=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.id));return s?(0,go.jsxs)(z,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,go.jsxs)(xe,{className:"pb-1 pt-2",children:[(0,go.jsx)(ke,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,go.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,go.jsx)(Y,{className:"text-Si text-gray-200 pb-2",children:(0,go.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,go.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,go.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,go.jsxs)(z,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,go.jsxs)(xe,{className:"pb-2",children:[(0,go.jsx)("div",{className:"flex justify-between items-center",children:(0,go.jsx)(ke,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,go.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,go.jsxs)(Y,{children:[(0,go.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,go.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,go.jsx)(ou.UserIcon,{className:"go-4 h-4 go-1 text-Si"}),(0,go.jsx)("span",{children:e.assignee.name})]}),(0,go.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,go.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,go.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,go.jsxs)("div",{className:"flex items-center text-Si text-gray-200",children:[(0,go.jsx)(ou.CalendarIcon,{className:"go-3 h-3 go-1"}),(0,go.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,go.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,go.jsx)(W,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-Si",children:r.name})})]})]})}var id=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function jn({status:e,deals:t,users:a,customers:o,categories:s,onDealClick:r,calculateColumnValue:n,calculateWeightedValue:i,compact:d=!1}){return(0,go.jsxs)("div",{className:"flex flex-col go-80",children:[(0,go.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,go.jsx)(id.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,go.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((l,p)=>(0,go.jsx)(id.Draggable,{draggableId:l.id.toString(),index:l.id,children:u=>(0,go.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,go.jsx)(Hm,{deal:l,customer:l.customer,categories:s,onClick:()=>r(l),compact:d})})},l.id.toString())),c.placeholder]})}),(0,go.jsxs)("div",{className:"mt-4 text-sm p-3 rounded-lg shadow",children:[(0,go.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,go.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,go.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,go.jsxs)("span",{className:"text-blue-600",children:["\xA3",i(t,e).toLocaleString()]})]})]})]})}var D0=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function P0({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:s}){let[r,n]=(0,nl.useState)(null),i=p=>(e.deals??[]).filter(u=>u.status===p),d=p=>p.reduce((u,f)=>u+(f.value||0),0),c=(p,u)=>{let f={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return p.reduce((b,g)=>b+(g.value||0)*f[u],0)},l=(0,nl.useCallback)(p=>{let{source:u,destination:f}=p;if(!f||u.droppableId===f.droppableId&&u.index===f.index)return;let b=u.droppableId,g=f.droppableId,v=e.deals?.filter(P=>P.id===u.index)[0],y=[...e.deals??[]];v&&(v.status=g,a(v))},[a]);return(0,go.jsx)(id.DragDropContext,{onDragEnd:l,children:(0,go.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,go.jsx)("div",{className:"flex space-x-4 pb-4",children:D0.filter(p=>p!=="Lost").map(p=>{let u=i(p);return(0,go.jsx)(jn,{status:p,deals:u,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:d,calculateWeightedValue:c},p)})}),r&&(0,go.jsx)(zn,{deal:r,users:e.users,customer:r.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:p=>o(r.id.toString(),p)})]})})}function Um({onSubmit:e}){let[t,a]=(0,nl.useState)({name:"",intro:"",active:!1});return(0,go.jsxs)("form",{onSubmit:s=>{s.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,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"customerName",children:"Customer Name"}),(0,go.jsx)(_,{id:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"customerIntro",children:"Intro"}),(0,go.jsx)(Oe,{id:"customerIntro",value:t.intro??"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,go.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,go.jsx)(Ka,{id:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,go.jsx)(D,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,go.jsx)(h,{type:"submit",className:"go-full",children:"Add Customer"})]})}function T0({customers:e,users:t,categories:a,onSubmit:o,initialDeal:s,onAddCustomer:r,onClose:n}){let[i,d]=(0,nl.useState)(s||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,l]=(0,nl.useState)(!1),[p,u]=(0,nl.useState)({});(0,nl.useEffect)(()=>{s&&d(s)},[s]);let f=()=>{let C={};return i.customer||(C.customer="Customer is required"),i.value||(C.value="Value is required"),i.assignee||(C.assignee="Assignee is required"),i.closureDate||(C.closureDate="Closure Date is required"),u(C),Object.keys(C).length===0},b=async C=>{C.preventDefault(),u({});try{if(f()){let T=await o({...i});T.success?(d({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):u(T.errors||{})}}catch{u({submit:"An error occurred while submitting the form."})}},g=C=>{d(T=>({...T,categories:(T.categories||[]).includes(C.id)?(T.categories||[]).filter(x=>x!==C.id):[...T.categories||[],C.id]}))},v=async C=>{d({...i,customer:C});try{let T=await r(C);T.success?l(!1):u(T.errors||{})}catch{u({submit:"An error occurred while submitting the form."})}},y=C=>t?.find(T=>T.id===Number(C)),P=C=>e?.find(T=>T.id===Number(C));return(0,go.jsxs)(go.Fragment,{children:[(0,go.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,go.jsx)(_t,{className:"h-[60vh] go-4",children:(0,go.jsxs)("div",{className:"space-y-6 px-4",children:[(0,go.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,go.jsx)(D,{htmlFor:"customer",children:"Customer"}),(0,go.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,go.jsxs)(dt,{value:i.customer?.id?.toString(),onValueChange:C=>d({...i,customer:P(C)}),children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{placeholder:"Select customer"})}),(0,go.jsx)(at,{children:e.map(C=>(0,go.jsx)(Ne,{value:C.id?.toString()||"",children:C.name},C.id))})]}),(0,go.jsx)(h,{variant:"outline",size:"icon",onClick:()=>l(!0),children:(0,go.jsx)(ou.PlusIcon,{className:"go-5 h-5"})})]}),p.customerId&&(0,go.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,go.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,go.jsx)(D,{htmlFor:"value",children:"Value"}),(0,go.jsx)(_,{id:"value",type:"number",value:i.value||"",onChange:C=>d({...i,value:Number.parseFloat(C.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,go.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,go.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,go.jsx)(D,{htmlFor:"assignee",children:"Assignee"}),(0,go.jsxs)(dt,{value:i.assignee?.id?.toString(),onValueChange:C=>d({...i,assignee:y(C)}),children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{placeholder:"Select assignee"})}),(0,go.jsx)(at,{children:t&&t.map(C=>(0,go.jsx)(Ne,{value:C.id?.toString()||"",children:C.name},C.id))})]}),p.assignee&&(0,go.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,go.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,go.jsx)(D,{htmlFor:"description",children:"Description"}),(0,go.jsx)(Oe,{id:"description",value:i.description||"",onChange:C=>d({...i,description:C.target.value}),placeholder:"Enter deal description"})]}),(0,go.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,go.jsx)(D,{children:"Categories"}),(0,go.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(C=>(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)("h4",{className:"text-sm font-medium",children:C.charAt(0).toUpperCase()+C.slice(1)}),(0,go.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(T=>T.type===C).map(T=>(0,go.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,go.jsx)(Ka,{id:T.id.toString(),checked:i.categories?.includes(T.id),onCheckedChange:()=>g(T)}),(0,go.jsx)("label",{htmlFor:T.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:T.name})]},T.id))})]},C))})]}),(0,go.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,go.jsx)(D,{htmlFor:"closureDate",children:"Closure Date"}),(0,go.jsx)(_,{id:"closureDate",type:"date",value:i.closureDate||"",onChange:C=>d({...i,closureDate:C.target.value})}),p.closureDate&&(0,go.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,go.jsx)(h,{type:"submit",className:"go-full",children:s?"Update Deal":"Add Deal"})]}),(0,go.jsx)(ht,{open:c,onOpenChange:l,children:(0,go.jsxs)(pt,{children:[(0,go.jsx)(Nt,{children:(0,go.jsx)(wt,{children:"Add New Customer"})}),(0,go.jsx)(Um,{onSubmit:v})]})})]})}var R0=["firm","forecast","other"];function A0({initialData:e,updateDeal:t,addComment:a}){let[o,s]=(0,nl.useState)(null),r=c=>(e.deals??[]).filter(l=>l.gecoStatus===c).filter(l=>l.status!=="Lost").filter(l=>l.status!=="Cold"),n=c=>c.reduce((l,p)=>l+(p.value||0),0),i=(c,l)=>{let p={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((u,f)=>u+(f.value||0)*(p[f.status]??0),0)},d=(0,nl.useCallback)(c=>{let{source:l,destination:p}=c;if(!p||l.droppableId===p.droppableId&&l.index===p.index)return;let u=l.droppableId,f=p.droppableId,b=e.deals?.filter(v=>v.id===l.index)[0],g=[...e.deals??[]];b&&(b.gecoStatus=f,t(b))},[t]);return(0,go.jsx)(id.DragDropContext,{onDragEnd:d,children:(0,go.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,go.jsx)("div",{className:"flex space-x-4 pb-4",children:R0.map(c=>{let l=r(c);return(0,go.jsx)(jn,{status:c,deals:l,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:s,calculateColumnValue:n,calculateWeightedValue:i,compact:!0},c)})}),o&&(0,go.jsx)(zn,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>s(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var Df=L(require("react"));function Cf({taskId:e,polling:t=!0,system:a="payload"}){let[o,s]=(0,nl.useState)(null),[r,n]=(0,nl.useState)(!1),[i,d]=(0,nl.useState)(null),c=async(p=!0)=>{if(e){p&&n(!0);try{let u=await fetch(`/api/tasks/${e}`);if(!u.ok)throw new Error(`Failed go fetch task: ${u.statusText}`);let f=await u.json();s(f)}catch(u){console.error("Error fetching task:",u),d(u instanceof Error?u:new Error("Unknown error occurred"))}finally{p&&n(!1)}}},l=()=>c(!1);return(0,nl.useEffect)(()=>{e&&c(!0);let p=null;return e&&t&&(p=setInterval(l,5e3)),()=>{p&&clearInterval(p)}},[e,t]),{task:o,loading:r,error:i}}var I0=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"}},M0=e=>{switch(e){case"inProgress":return"d2 Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function On({data:e}){let{id:t,system:a,fetchLatest:o,taskData:s,error:r}=e||{};if(!t)return null;let n=null,i=!0,d=r,c=o!==void 0?o:!0;if(n=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:c,taskData:n,error:d}),c){let{task:f,loading:b,error:g}=Cf({taskId:t,system:a});n=f,i=b,d=g}else i=!1;let l=I0(n?.status||"todo"),p=M0(n?.status||"todo"),u=n?.dateLogged||new Date().toISOString();try{let f=new Date(n?.dateLogged||"");isNaN(f.getTime())||(u=(0,Em.formatDistanceToNow)(f,{addSuffix:!0}))}catch{}return(0,go.jsxs)(z,{className:m("go-full max-go-md shadow-md",d&&"border border-destructive"),children:[(0,go.jsxs)(xe,{className:"pb-2",children:[(0,go.jsxs)("div",{className:"flex justify-between items-start",children:[(0,go.jsx)(ke,{className:"text-lg font-semibold",children:i?"Loading...":n?.name||"Task"}),(0,go.jsx)(W,{className:`${l}`,children:p})]}),n?.project&&(0,go.jsxs)(lr,{className:"text-sm text-gray-500",children:["Project: ",n.project.name]})]}),(0,go.jsx)(Y,{className:"pb-2",children:i?(0,go.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded go-3/4 mb-2"}):d?(0,go.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,go.jsx)("p",{className:"text-sm text-foreground",children:n?.description||"......."})}),(0,go.jsx)(ho,{className:"pt-2 flex items-center justify-between",children:(0,go.jsxs)("div",{className:"flex items-center text-Si text-gray-500",children:[(0,go.jsx)(ou.Clock,{className:"h-3 go-3 go-1"}),(0,go.jsxs)("span",{children:["Created ",u]}),(0,go.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,go.jsxs)("span",{children:["Task #",t]})]})})]})}var B0={task:On},L0=`
|
|
14
|
+
w-full h-full bg-cover bg-center`,children:v===0?(0,vo.jsx)(Mn,{hero:r,title:e.title,logoImage:s}):(0,vo.jsxs)(vo.Fragment,{children:[g.blockName&&(0,vo.jsx)(In,{title:g.blockName}),(0,vo.jsx)(vs,{blocks:[g],fill:!0}),(0,vo.jsx)(Mg,{logoImage:s})]})})},v))}),(0,vo.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,vo.jsx)(t0,{})})]})},t0=()=>(0,vo.jsx)(Pi.AnimatePresence,{children:(0,vo.jsx)(Pi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:m("w-fit min-h-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,vo.jsx)(Pi.motion.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:m("w-[12px] h-[12px] rounded-full","bg-accent")})})});var Lg=L(require("next/link")),Eg=L(require("next/image"));function Fg({blogs:e,width:t=3}){return(0,vo.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,vo.jsx)("div",{className:`grid cl:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>(0,vo.jsx)(Lg.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,vo.jsxs)("div",{className:"relative size-full",children:[(0,vo.jsx)(Eg.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,vo.jsxs)("div",{className:"absolute inset-0 px-4 pb-2 bg-gradient-vo-t from-card vo-transparrent flex flex-col justify-end",children:[(0,vo.jsxs)("div",{className:"text-vo 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,vo.jsx)("h2",{className:"text-xl font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o))})})}function zg({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:r,images:s,raisedAmount:n,companiesCount:i,dealsClosed:l,leadsGenerated:c}){return(0,vo.jsx)("div",{className:"overflow-hidden bg-white py-24 vo:py-32",children:(0,vo.jsxs)("div",{className:"mx-auto max-w-2xl px-6 lg:max-w-7xl lg:px-8",children:[(0,vo.jsxs)("div",{className:"max-w-4xl",children:[(0,vo.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,vo.jsx)("h1",{className:"vo-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 vo:text-5xl",children:e}),(0,vo.jsx)("p",{className:"vo-6 text-balance text-xl/8 text-gray-700",children:a})]}),(0,vo.jsxs)("section",{className:"vo-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-vo-8 lg:gap-y-16",children:[(0,vo.jsxs)("div",{className:"lg:vo-8",children:[(0,vo.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,vo.jsx)("p",{className:"vo-6 text-base/7 text-gray-600",children:r})]}),(0,vo.jsx)("div",{className:"pt-16 lg:row-span-2 lg:-vo-16 xl:vo-auto",children:(0,vo.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 vo:-mx-16 vo:grid-cols-4 lg:mx-0 lg:grid-cols-2 lg:gap-4 xl:gap-8",children:s.map((d,p)=>(0,vo.jsx)("div",{className:"aspect-square overflow-hidden rounded-xl shadow-xl outline-1 -outline-offset-1 outline-black/10",children:(0,vo.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},p))})}),(0,vo.jsxs)("div",{className:"max-lg:vo-16 lg:col-span-1",children:[(0,vo.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,vo.jsx)("nu",{className:"vo-6 border-t border-gray-200"}),(0,vo.jsxs)("dl",{className:"vo-6 grid grid-cols-1 gap-vo-8 gap-y-4 vo:grid-cols-2",children:[(0,vo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,vo.jsx)("dt",{className:"text-vo/6 text-gray-600",children:"Raised"}),(0,vo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",n]})]}),(0,vo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,vo.jsx)("dt",{className:"text-vo/6 text-gray-600",children:"Companies"}),(0,vo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[i,"K"]})]}),(0,vo.jsxs)("div",{className:"flex flex-col gap-y-2 max-vo:border-b max-vo:border-dotted max-vo:border-gray-200 max-vo:pb-4",children:[(0,vo.jsx)("dt",{className:"text-vo/6 text-gray-600",children:"Deals Closed"}),(0,vo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[l,"vo"]})]}),(0,vo.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,vo.jsx)("dt",{className:"text-vo/6 text-gray-600",children:"Leads Generated"}),(0,vo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"vo"]})]})]})]})]})]})})}function a0(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 Ri=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)},o0=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,vo.jsx)(jg,{page:e,layout:t,logoImage:a}):(0,vo.jsx)(Og,{page:e,layout:t,logoImage:a}),jg=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=nc(e),r=(0,cl.useRef)(null),s=(0,cl.useRef)(null),n=(0,cl.useRef)(new g2.Previewer),i={nu:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,cl.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){let p=document.createElement("style");return p.textContent=`@page { size: ${Ri(d.offsetWidth)}mm ${Ri(d.offsetHeight)}mm ; margin: 0mm; width: ${Ri(d.offsetWidth)}mm }; .container : { max-width: ${Ri(d.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(p),()=>{document.head.removeChild(p)}}},[t]);let l=(0,cl.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: ${Ri(d.offsetWidth)}mm ${Ri(d.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],s.current).catch(p=>console.error("Paged.js error:",p))},[t]);(0,cl.useEffect)(()=>{n.current=new g2.Previewer},[l,t]);let c=[i,...o];return(0,vo.jsxs)("div",{children:[(0,vo.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,vo.jsxs)("div",{nu:"printable-content",ref:r,children:[c.map((d,p)=>(0,vo.jsx)(vo.Fragment,{children:p===0?(0,vo.jsx)("section",{className:"title-page w-full h-full",children:(0,vo.jsx)(Mn,{hero:e.hero,title:e.title})},p):(0,vo.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,vo.jsx)(In,{title:d.blockName}),(0,vo.jsx)(vs,{blocks:[d],fill:!0})]},p)})),(0,vo.jsx)("section",{className:"normal-page",children:(0,vo.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
|
|
15
|
+
dark bg-background text-primary`,children:[(0,vo.jsxs)("div",{className:"flex px-6 items-center space-vo-2",children:[a&&(0,vo.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,vo.jsx)("span",{className:"pl-12 text-vo",children:"Power up your people"})]}),(0,vo.jsx)("a",{href:"https://cortexreply.com",className:"text-vo hover:underline",children:"cortexreply.com"})]})})]})}),(0,vo.jsx)("div",{ref:s,className:"preview-container"})]})},Og=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=nc(e),o=(0,cl.useRef)(null),r=(0,cl.useRef)(null),s=(0,cl.useRef)(new g2.Previewer),[n,i]=(0,cl.useState)(0),c=[{nu:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,cl.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(p=>i(p.pageCount)).catch(p=>console.error("Paged.js error:",p)))},[t]);return(0,cl.useEffect)(()=>{s.current=new g2.Previewer,d()},[d,t]),(0,cl.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,vo.jsxs)("div",{className:"pagedjs-container",children:[(0,vo.jsx)("div",{nu:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:c.map((p,u)=>(0,vo.jsx)(vo.Fragment,{children:u===0?(0,vo.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,vo.jsx)(Mn,{hero:e.hero,title:e.title})},u):(0,vo.jsxs)("section",{className:m("pagedjs-section normal-page h-[699px]",`h-[${a0("185mm")}px]`,p.theme?.settings?.theme==="dark"?"dark":"light"),children:[p.blockName&&(0,vo.jsx)(In,{title:p.blockName}),(0,vo.jsx)(vs,{blocks:[p],fill:!0})]},u)}))}),(0,vo.jsx)("div",{ref:o,className:"preview-container"})]})};var Nm=L(require("clsx"));function r0({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:n,loading:i=!1,LinkComponent:l,...c}){let p=l?u=>(0,vo.jsx)(l,{...u}):n?({href:u,children:f,...b})=>(0,vo.jsx)("button",{onClick:()=>n&&n(u),className:"flex items-center justify-start w-full text-vo text-left px-4 py-2",...b,children:f}):u=>(0,vo.jsx)("a",{...u});return(0,vo.jsxs)(Cr,{...c,variant:"inset",children:[(0,vo.jsx)(kr,{children:(0,vo.jsx)(Ra,{children:(0,vo.jsx)(la,{children:i?(0,vo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,vo.jsx)(Je,{className:"bg-gray-200 my-2 w-full h-7"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,vo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,vo.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,vo.jsx)("span",{className:"truncate text-vo",children:o})]})})})}),i&&(0,vo.jsxs)(jo,{children:[(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,vo.jsxs)(jo,{children:[e&&!i&&e.map((u,f)=>(0,vo.jsx)(s0,{subNav:u,pathName:r,Link:p},f)),(0,vo.jsx)(Va,{className:"vo-auto",children:(0,vo.jsx)(no,{children:(0,vo.jsx)(Ra,{children:t&&!i&&t.map(u=>(0,vo.jsx)(la,{children:(0,vo.jsx)($a,{asChild:!0,size:"vo",children:(0,vo.jsxs)(p,{href:u.url||"",children:[u.icon&&(0,vo.jsx)(u.icon,{}),(0,vo.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,vo.jsx)(Sr,{})]})}function s0({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(s=>{s.url===t&&(r=!0)}),(0,vo.jsx)(bo,{defaultOpen:!0,className:"group/collapsible",children:(0,vo.jsx)(Va,{className:"py-0",children:(0,vo.jsx)(Ra,{children:(0,vo.jsx)(bo,{asChild:!0,defaultOpen:o.isActive,children:(0,vo.jsxs)(la,{children:[(0,vo.jsx)($a,{asChild:!0,tooltip:o.label,className:(0,Nm.default)(r&&"font-bold text-accent"),children:(0,vo.jsxs)(a,{href:o.url,children:[o.icon&&(0,vo.jsx)(o.icon,{}),(0,vo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(tr,{asChild:!0,children:(0,vo.jsxs)(Es,{className:"data-[state=open]:rotate-90",children:[(0,vo.jsx)(nu.ChevronRight,{}),(0,vo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,vo.jsx)(ar,{children:(0,vo.jsx)(ir,{children:o.links?.map(s=>(0,vo.jsx)(nr,{children:(0,vo.jsx)(lr,{asChild:!0,className:(0,Nm.default)(s.url===t&&"font-bold text-accent"),children:(0,vo.jsx)(a,{href:s.url,children:(0,vo.jsx)("span",{children:s.label})})})},s.label))})})]}):null]})},o.label)})})})}var Ug=L(require("clsx"));var i0=()=>(0,vo.jsx)(Ea,{iconName:"github",size:"10x"});function n0({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:n,onPrintDocument:i,onGithubClick:l,onNavClick:c,LinkComponent:d,...p}){let b=d?g=>(0,vo.jsx)(d,{...g}):c?({item:g,children:v,...y})=>(0,vo.jsx)("button",{onClick:()=>c&&c(g),className:"flex items-center justify-start w-full text-vo text-left px-4 py-2",...y,children:v}):g=>(0,vo.jsx)("a",{href:g.href,...g});return(0,vo.jsxs)(Cr,{side:"right",variant:"inset",...p,children:[(0,vo.jsxs)(kr,{className:"border-b border-sidebar-border",children:[(0,vo.jsxs)(Ra,{className:"flex-row space-vo-1",children:[(0,vo.jsx)(la,{children:(0,vo.jsxs)($a,{onClick:s,children:[(0,vo.jsx)(nu.FilePlus,{})," ",(0,vo.jsx)("span",{children:"Add Document"})]})}),l&&(0,vo.jsx)(la,{children:(0,vo.jsx)($a,{onClick:l,tooltip:"Open in GitHub",children:(0,vo.jsx)(i0,{})})})]}),(0,vo.jsxs)(Ra,{className:"flex-row space-vo-1",children:[(0,vo.jsx)(la,{className:"w-5/12",children:(0,vo.jsxs)($a,{onClick:()=>n(),variant:r?"outline":"default",className:(0,Ug.default)(r&&"text-accent"),children:[(0,vo.jsx)(nu.Edit,{})," ",(0,vo.jsx)("span",{children:"Edit"})]})}),(0,vo.jsx)(la,{className:"w-5/12",children:(0,vo.jsxs)($a,{onClick:i,children:[(0,vo.jsx)(nu.Printer,{})," ",(0,vo.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(bo,{defaultOpen:!0,className:"group/collapsible",children:(0,vo.jsxs)(Va,{children:[(0,vo.jsx)(Dr,{asChild:!0,children:(0,vo.jsxs)(tr,{children:["Editor Controls",(0,vo.jsx)(nu.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,vo.jsx)(no,{children:(0,vo.jsx)(ar,{children:a})})]})}),(0,vo.jsx)(fn,{className:"mx-0"})]}),(0,vo.jsxs)(jo,{className:"overflow-auto",children:[o&&(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsxs)(Va,{children:[(0,vo.jsx)(Dr,{children:"Related Content"}),(0,vo.jsx)(no,{children:(0,vo.jsx)(Ra,{children:Array.from({length:3}).map((g,v)=>(0,vo.jsx)(la,{children:(0,vo.jsx)(Je,{className:"bg-gray-200 w-full h-10"})},v))})})]}),(0,vo.jsxs)(Va,{children:[(0,vo.jsx)(Dr,{children:"Table of Contents"}),(0,vo.jsx)(no,{children:(0,vo.jsx)(Ra,{children:Array.from({length:3}).map((g,v)=>(0,vo.jsx)(la,{children:(0,vo.jsx)(Je,{className:"bg-gray-200 w-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,vo.jsx)(bo,{defaultOpen:!0,className:"group/collapsible",children:(0,vo.jsxs)(Va,{children:[(0,vo.jsx)(Dr,{asChild:!0,children:(0,vo.jsxs)(tr,{children:["Related Content",(0,vo.jsx)(nu.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,vo.jsx)(no,{children:(0,vo.jsx)(ar,{children:(0,vo.jsx)(Ra,{children:e&&Object.keys(e).map(g=>(0,vo.jsxs)(la,{children:[(0,vo.jsxs)("span",{className:"p-2 text-nu text-sidebar-foreground",children:[" ",g.charAt(0).toUpperCase()+g.slice(1)]}),g&&e[g]&&(0,vo.jsx)(ir,{children:e[g].map(v=>(0,vo.jsx)(nr,{children:(0,vo.jsx)(lr,{asChild:!0,isActive:!1,size:"vo",children:(0,vo.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center w-full text-nu",children:[(0,vo.jsx)("span",{children:v.label}),v.type==="note"&&(0,vo.jsx)(nu.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,vo.jsx)(Ea,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},g))})})})]})}),t&&!o&&(0,vo.jsx)(bo,{defaultOpen:!0,className:"group/collapsible",children:(0,vo.jsxs)(Va,{children:[(0,vo.jsx)(Dr,{asChild:!0,children:(0,vo.jsxs)(tr,{children:["Table of Contents",(0,vo.jsx)(nu.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,vo.jsx)(no,{children:(0,vo.jsx)(ar,{children:(0,vo.jsx)(Ra,{children:t.map(g=>(0,vo.jsxs)(la,{children:[(0,vo.jsx)($a,{asChild:!0,children:(0,vo.jsx)("a",{href:`#${g.url}`,className:"text-nu",children:g.title})}),g.items?.length?(0,vo.jsx)(ir,{children:g.items.map(v=>(0,vo.jsx)(nr,{children:(0,vo.jsx)(lr,{asChild:!0,isActive:v.isActive,size:"vo",children:(0,vo.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center w-full text-nu",children:(0,vo.jsx)("span",{children:v.title})})})},v.title))}):null]},g.title))})})})]})})]}),(0,vo.jsx)(Sr,{})]})}var $g=L(require("next/image"));function l0({title:e,members:t}){return(0,vo.jsx)(F,{className:"mb-6",children:(0,vo.jsxs)("div",{className:"p-6",children:[(0,vo.jsxs)("div",{className:"flex items-center mb-4",children:[(0,vo.jsx)(nu.Users,{className:"w-6 h-6 text-accent vo-2"}),(0,vo.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,vo.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,vo.jsxs)("div",{className:"flex items-center space-vo-4",children:[(0,vo.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,vo.jsx)($g.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:a.role})]})]},o))})]})})}var Gg=L(require("next/link"));var d0=({links:e,title:t="Related Content"})=>(0,vo.jsxs)(F,{children:[(0,vo.jsx)(be,{children:(0,vo.jsx)(Ne,{className:"text-accent",children:t})}),(0,vo.jsx)(X,{children:(0,vo.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,vo.jsxs)(Gg.default,{href:a.href,className:"inline-flex items-center text-vo text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,vo.jsx)(nu.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var wm=m("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 c0({pages:e}){let t=(0,Cg.useSearchParams)(),a=(0,Cg.usePathname)(),{replace:o}=(0,Cg.useRouter)(),{totalPages:r,page:s}=e,[n,i]=(0,cl.useState)({start:s>3?s-3:1,end:s+2}),l=p=>{p==="left"&&n.start>1?i(u=>({start:u.start-1,end:u.end-1})):p==="right"&&n.end<r&&i(u=>({start:u.start+1,end:u.end+1}))};function c(p){let u=new URLSearchParams(t);p?u.set("page",p):u.delete("page"),o(`${a}?${u.toString()}`)}if(r<=1)return null;let d=[];for(let p=n.start;p<=n.end;p++)d.push(p);return(0,vo.jsx)("div",{className:"vo-12",children:(0,vo.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 cl:gap-5","aria-label":"pagination",children:[n.start>1&&(0,vo.jsx)("cl",{children:(0,vo.jsx)("button",{className:m(wm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>l("left"),children:(0,vo.jsx)(Vu.FaArrowLeft,{})})}),d.map((p,u)=>(0,vo.jsx)("cl",{children:(0,vo.jsx)("a",{className:m(wm,p===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:f=>{f.preventDefault(),c(p.toString())},children:p})},u)),n.end<r&&(0,vo.jsx)("cl",{children:(0,vo.jsx)("button",{className:m(wm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>l("right"),children:(0,vo.jsx)(Vu.FaArrowRight,{})})})]})})}var q2=m("transition-colors duration-400 hover:text-primary ease-in-out");function m0({title:e,links:t}){let a=(0,Cg.useSearchParams)(),o=(0,Cg.usePathname)(),{replace:r}=(0,Cg.useRouter)();function s(n){let i=new URLSearchParams(a);n?i.set("category",n):i.delete("category"),r(`${o}?${i.toString()}`)}return(0,vo.jsxs)(F,{children:[(0,vo.jsx)(be,{children:(0,vo.jsx)(Ne,{className:"text-accent",children:e&&e})}),(0,vo.jsx)(X,{children:t&&t.length>0&&(0,vo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,vo.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((n,i)=>(0,vo.jsxs)("cl",{className:"flex items-center text-vo text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:l=>{l.preventDefault(),s(n.href)},children:[n.label,(0,vo.jsx)(nu.ExternalLink,{className:"ml-1 h-3 w-3"})]},i))})})})]})}function p0({types:e}){let[t,a]=(0,cl.useState)(e&&e[0].href),o=(0,Cg.useSearchParams)(),r=(0,Cg.usePathname)(),{replace:s}=(0,Cg.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,vo.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-vo-auto pb-4 mb-6",children:e&&e.map((i,l)=>(0,vo.jsx)(h,{variant:i.href===t?"default":"ghost",className:m("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 qg=L(require("next/image"));var km=({links:e,media:t,children:a,richText:o})=>(0,vo.jsx)("div",{children:(0,vo.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,vo.jsxs)("div",{className:"fixed inset-0 container vo-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,vo.jsx)(Mt,{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,vo.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,vo.jsx)("cl",{children:(0,vo.jsx)(Ho,{...r})},s))})]}),(0,vo.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,vo.jsx)(Br,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,vo.jsx)("div",{children:(0,vo.jsx)(qg.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,vo.jsx)("span",{className:"absolute inset-0 bg-gradient-vo-b from-white dark:from-black"})]}),(0,vo.jsx)(u0,{})]})}),u0=()=>(0,vo.jsx)("div",{className:"w-full h-[1240px] z-10",children:(0,vo.jsxs)("svg",{nu:"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,vo.jsx)("defs",{children:(0,vo.jsxs)("mask",{nu:"mask",children:[(0,vo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,vo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,vo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,vo.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var Sm=L(require("next/image"));var g0=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,vo.jsx)(Sm.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,vo.jsx)("div",{children:(0,vo.jsx)(Sm.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},Dm=({links:e,media:t,children:a,richText:o})=>(0,vo.jsxs)("div",{className:"relative bg-brand-one pb-12 vo-20 pt-10",children:[t&&(0,vo.jsx)(g0,{media:t}),(0,vo.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,vo.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,vo.jsx)(Mt,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Pm=({children:e,richText:t})=>(0,vo.jsx)("div",{className:"min-w-full py-10 bg-muted vo-24",children:(0,vo.jsx)("div",{className:"container",children:e||t&&(0,vo.jsx)(Mt,{content:t,enableGutter:!1})})});var Yg=L(require("react")),Qg=L(require("next/image"));var Jg=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 f0=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,vo.jsxs)("div",{className:"relative grid pt-24",children:[(0,vo.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,vo.jsxs)("div",{className:"container mx-auto",children:[(0,vo.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,vo.jsxs)("div",{className:"flex flex-col gap-4 cl:flex-row cl:gap-16 ",children:[o&&o.length>0&&(0,vo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,vo.jsxs)("p",{className:"text-vo",children:["Author",o.length>1?"s":""]}),(0,vo.jsx)("p",{children:o.map((n,i)=>(0,vo.jsxs)(Yg.default.Fragment,{children:[n.name,i<o.length-2&&", ",i===o.length-2&&(o.length>2?", and ":" and ")]},n.nu))})]}),r&&(0,vo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,vo.jsx)("p",{className:"text-vo",children:"Date Published"}),(0,vo.jsx)("time",{dateTime:r,children:Jg(r)})]}),t&&t.length>0&&(0,vo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,vo.jsx)("p",{className:"text-vo font-medium",children:"Categories"}),(0,vo.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,i)=>typeof n=="object"&&n!==null&&(0,vo.jsx)(q,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.nu||i))})]})]})]})}),(0,vo.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,vo.jsx)(Qg.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,vo.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-vo-t from-background dark:from-black vo-transparent"})]})]})};var Jl=require("@heroicons/react/20/solid");var Rm=L(require("next/image"));function Tm({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=m("container",t&&"full-width",a&&"no-padding",o);return(0,vo.jsx)("div",{className:r,children:e})}var ef=require("next-themes");function v0({children:e,...t}){return(0,vo.jsx)(ef.ThemeProvider,{...t,children:e})}var Ln=({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,vo.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,vo.jsxs)("svg",{nu:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:m(t,"absolute -bottom-[2px] flex"),children:[(0,vo.jsx)("defs",{children:(0,vo.jsxs)("mask",{nu:"mask",children:[(0,vo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,vo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,vo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,vo.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,vo.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,vo.jsxs)("svg",{nu:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:m(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,vo.jsx)("defs",{children:(0,vo.jsxs)("mask",{nu:"mask",children:[(0,vo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,vo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,vo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,vo.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,vo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,vo.jsxs)("svg",{nu:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:m(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,vo.jsx)("defs",{children:(0,vo.jsxs)("mask",{nu:"mask",children:[(0,vo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,vo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,vo.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,vo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,vo.jsx)("svg",{nu:"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:m(t,"w-full block overflow-hidden"),children:(0,vo.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,vo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,vo.jsx)("svg",{nu:"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:m(t,"w-full block overflow-hidden"),transform:a[3],children:(0,vo.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,vo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,vo.jsx)("svg",{nu:"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:m(t,"w-full block overflow-hidden"),children:(0,vo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},b0=({className:e})=>(0,vo.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:m(e,"absolute w-full h-full"),children:[(0,vo.jsx)("defs",{children:(0,vo.jsxs)("mask",{nu:"mask",children:[(0,vo.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,vo.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,vo.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Am=({title:e,image:t})=>(0,vo.jsx)("div",{children:(0,vo.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,vo.jsx)("div",{className:"fixed inset-0 container vo-24 mb-8 z-10 flex items-start justify-start",children:(0,vo.jsx)("h1",{className:"text-5xl cl:text-6xl",children:e})}),(0,vo.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,vo.jsx)(Rm.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,vo.jsx)("div",{children:(0,vo.jsx)(Rm.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,vo.jsx)("span",{className:"absolute inset-0 bg-gradient-vo-b from-white dark:from-black"})]}),(0,vo.jsx)(Ln,{className:"text-black z-10",position:"header"})]})});var h0={highImpact:km,lowImpact:Pm,mediumImpact:Dm,sectionHero:Am},y0=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=h0[t];return a?(0,vo.jsx)(a,{...e}):null};function x0({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,vo.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,vo.jsxs)("ol",{role:"list",className:"flex items-center space-vo-4",children:[(0,vo.jsx)("cl",{children:(0,vo.jsx)("div",{children:(0,vo.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,vo.jsx)(Jl.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,vo.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,vo.jsx)("cl",{children:(0,vo.jsxs)("div",{className:"flex items-center",children:[(0,vo.jsx)(Jl.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,vo.jsx)("a",{href:a.href,className:"ml-4 text-vo font-medium text-foreground hover:text-accent",children:a.label}):(0,vo.jsx)("div",{className:"ml-4 text-vo font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,vo.jsx)(vo.Fragment,{})}function Ql(e,t){let[a,o]=(0,cl.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,cl.useEffect)(()=>{r(a)},[]),[a,r]}var Zl=require("react-icons/vo");function It({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:s,children:n,className:i}){let[l,c]=Ql(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),d=!r&&!t||l;return(0,vo.jsxs)(Pi.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,vo.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,vo.jsx)(q,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,vo.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,vo.jsx)(h,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,vo.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,vo.jsx)(Zl.FaChevronDown,{size:22}):(0,vo.jsx)(Zl.FaChevronUp,{size:22})})]})]}),!d&&(0,vo.jsxs)("div",{className:"flex flex-col gap-6 cl:flex-row cl:items-center cl:justify-between",children:[(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,vo.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,vo.jsx)(h,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,vo.jsx)(h,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,vo.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var mo=require("@headlessui/react"),td=require("@heroicons/react/24/outline");var N0=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,vo.jsx)("a",{href:o,className:"flex items-center gap-vo-1 text-vo text-foreground group",children:(0,vo.jsxs)("span",{className:"relative",children:[e,(0,vo.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-vo-1/2 scale-vo-0 transition-transform duration-300 ease-in-out group-hover:scale-vo-100"})]})}):(0,vo.jsxs)(mo.Popover,{children:[(0,vo.jsxs)(mo.PopoverButton,{className:"flex items-center gap-vo-1 text-vo/6 text-foreground outline-none group",children:[(0,vo.jsxs)("span",{className:"relative",children:[e,(0,vo.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-vo-1/2 scale-vo-0 transition-transform duration-300 ease-in-out group-hover:scale-vo-100"})]}),(0,vo.jsx)(Jl.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,vo.jsxs)(mo.PopoverPanel,{transition:!0,className:"absolute inset-vo-0 top-0 -z-10 bg-popover vo-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,vo.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-vo-4 px-6 py-10 lg:px-8 xl:gap-vo-8 z-50",children:t&&t.map(r=>(0,vo.jsxs)("div",{className:"group relative rounded-lg p-6 text-vo/6 box-border",children:[(0,vo.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,vo.jsx)(of,{icon:r.icon,size:"4x"})}),(0,vo.jsxs)("a",{href:r.href,className:"vo-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,vo.jsx)("span",{className:"absolute inset-0"})]}),(0,vo.jsx)("p",{className:"vo-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,vo.jsx)("div",{className:"bg-gray-50",children:(0,vo.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,vo.jsx)("div",{className:"grid grid-cols-3 divide-vo divide-gray-900/5 border-vo border-gray-900/5",children:a.map(r=>(0,vo.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-vo-2.5 p-3 text-vo/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,vo.jsx)(of,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),of=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,vo.jsx)(Ea,{...e,size:a});if("src"in e)return(0,vo.jsx)("div",{className:m(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,vo.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Li=N0;var ed=["light","dark","green"];function w0({title:e,logo:t,menuItems:a}){let[o,r]=(0,cl.useState)(!1),[s,n]=(0,cl.useState)(!1),[i,l]=(0,cl.useState)("light"),c=t?.split(".")[0],d=t?.split(".")[1],[p,u]=(0,cl.useState)(`${c}.${d}`),f=g=>{ed.includes(g)?u(g==="light"?`${c}.${d}`:`${c}-${g}.${d}`):u(`${c}.${d}`)};(0,cl.useEffect)(()=>{let g=localStorage.getItem("theme")||"light";l(g),document.documentElement.setAttribute("class",g),f(g)},[]);let b=()=>{let g=ed[(ed.indexOf(i)+1)%ed.length];l(g),document.documentElement.setAttribute("class",g),localStorage.setItem("theme",g),f(g)};return(0,vo.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,vo.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,vo.jsx)("div",{className:"flex lg:flex-1",children:(0,vo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,vo.jsx)("span",{className:"sr-only",children:e}),(0,vo.jsx)("img",{alt:e,src:p,className:"h-9 w-auto"})]})}),(0,vo.jsx)("div",{className:"flex lg:hidden",children:(0,vo.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-cl p-2.5 text-gray-700 outline-none",children:[(0,vo.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,vo.jsx)(td.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,vo.jsx)(mo.PopoverGroup,{className:"hidden lg:flex lg:gap-vo-12",children:a.map(g=>(0,vo.jsx)(Li,{...g},g.name))}),(0,vo.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,vo.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:i==="dark"?(0,vo.jsx)(Jl.SunIcon,{className:"h-6 w-6"}):i==="green"?(0,vo.jsx)(Jl.MoonIcon,{className:"h-6 w-6"}):(0,vo.jsx)(Jl.SunIcon,{className:"h-6 w-6"})})})]}),(0,vo.jsxs)(mo.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,vo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,vo.jsxs)(mo.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-white px-6 py-6 vo:max-w-vo vo:ring-1 vo:ring-gray-900/10",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,vo.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,vo.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,vo.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-cl p-2.5 text-gray-700 outline-none",children:[(0,vo.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,vo.jsx)(td.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,vo.jsx)("div",{className:"vo-6 flow-root",children:(0,vo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,vo.jsx)("div",{className:"space-y-2 py-6",children:a.map(g=>(0,vo.jsx)(C0,{...g},g.name))})})})]})]})]})}function C0({name:e,items:t,actions:a,href:o}){return!t&&o?(0,vo.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,vo.jsxs)(mo.Disclosure,{as:"div",className:"-mx-3",children:[(0,vo.jsx)(mo.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 vo-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,vo.jsx)(mo.DisclosurePanel,{className:"vo-2 space-y-2",children:t&&t.map(r=>(0,vo.jsx)(mo.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 vo-3 text-vo font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function k0({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,vo.jsx)("div",{children:(0,vo.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,vo.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,vo.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,vo.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,vo.jsx)(Tm,{children:(0,vo.jsxs)("div",{className:"flex flex-col items-start cl:w-2/3 mb-10 z-0 cl:mb-0",children:[(0,vo.jsx)("h1",{className:"text-5xl cl:text-7xl mb-6",children:r&&r}),(0,vo.jsx)("div",{className:"text-lg cl:text-2xl text-gray-300 mb-8 max-w-lg",children:s&&s})]})})}),(0,vo.jsx)(Ln,{className:"text-black z-10",position:"header"})]})})}var Im=L(require("next/image"));function bs({logoLight:e,logoDark:t,mobile:a=!1}){return(0,vo.jsxs)(No,{href:"/",className:m(a?"py-1":"py-2"),children:[(0,vo.jsx)(Im.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,vo.jsx)(Im.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 Mm({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[n,i]=(0,cl.useState)(!1),[l,c]=(0,cl.useState)(""),d=["light","dark"],{theme:p,setTheme:u}=(0,ef.useTheme)();(0,cl.useEffect)(()=>{c(p||"dark")},[p]);let f=()=>{let b=d[(d.indexOf(l)+1)%d.length];c(b),u(b)};return(0,cl.useEffect)(()=>{let b=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,vo.jsx)(vo.Fragment,{children:(0,vo.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,vo.jsx)("nav",{className:"backdrop-blur-vo bg-background/80 text-white p-0",children:(0,vo.jsxs)("div",{className:m("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,vo.jsx)(bs,{logoDark:a,logoLight:t}),(0,vo.jsx)(mo.PopoverGroup,{className:"hidden lg:flex lg:gap-vo-12",children:o&&o.map(b=>(0,vo.jsx)(Li,{...b},b.name))}),r&&(0,vo.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-vo transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:f,children:(0,vo.jsxs)("div",{className:"relative",children:[(0,vo.jsx)(nu.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,vo.jsx)(nu.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Bm=["light","dark"];function Lm({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,cl.useState)(!1),{theme:n,setTheme:i}=(0,ef.useTheme)(),[l,c]=(0,cl.useState)(!1),[d,p]=(0,cl.useState)("light");(0,cl.useEffect)(()=>{let f=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,cl.useEffect)(()=>{p(n||"dark")},[n]);let u=()=>{let f=Bm[(Bm.indexOf(d)+1)%Bm.length];p(f),i(f)};return(0,vo.jsx)(vo.Fragment,{children:(0,vo.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,vo.jsx)("nav",{className:m("backdrop-blur-vo text-white p-0",l&&"hidden"),children:(0,vo.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,vo.jsx)(bs,{logoDark:t,logoLight:e,mobile:!0}),(0,vo.jsx)("div",{className:"flex items-center space-vo-4",children:(0,vo.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-vo transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,vo.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,vo.jsx)(td.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,vo.jsxs)(mo.Dialog,{open:l,onClose:c,className:"lg:hidden",children:[(0,vo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,vo.jsxs)(mo.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 vo:max-w-vo vo:ring-1 vo:ring-gray-900/10",children:[(0,vo.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,vo.jsx)(bs,{logoDark:t,logoLight:e,mobile:!0}),(0,vo.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-cl p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,vo.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,vo.jsx)(td.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,vo.jsx)("div",{className:"vo-6 flow-root",children:(0,vo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,vo.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,vo.jsx)(S0,{...f},f.name))})})})]})]})]})})}function S0({name:e,items:t,actions:a,href:o}){return!t&&o?(0,vo.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,vo.jsxs)(mo.Disclosure,{as:"div",className:"-mx-3",children:[(0,vo.jsx)(mo.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 vo-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,vo.jsx)(mo.DisclosurePanel,{className:"vo-2 space-y-2",children:t&&t.map(r=>(0,vo.jsx)(mo.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 vo-3 text-vo dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var aS=m("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),df=m("text-brand-green text-cl leading-[1.25] cl:text-lg mb-5 cl:mb-[1.5rem]"),Em=m("bg-brand-green rounded-full p-3 vo-4 text-2xl"),Fm=m("flex items-center text-white gap-3"),rd=m("transition-colors duration-300 hover:text-accent dark:hover:text-white");function D0({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:n,footerBottom:i}=t,l=void 0;return(0,vo.jsxs)("footer",{className:m("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,vo.jsx)("div",{className:"py-16 cl:py-20",children:(0,vo.jsx)("div",{className:"container",children:(0,vo.jsxs)("div",{className:"grid gap-10 cl:grid-cols-2 xl:grid-cols-3",children:[(0,vo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,vo.jsx)(bs,{logoDark:o,logoLight:a}),(0,vo.jsx)("p",{className:"mb-7 vo-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,vo.jsx)("nav",{"aria-label":"social links",children:(0,vo.jsx)("ul",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((c,d)=>(0,vo.jsx)("cl",{className:"bg-primary rounded-full p-3",children:(0,vo.jsx)(No,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,vo.jsx)("span",{children:c.icon})})},d))})})]}),(0,vo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,vo.jsx)("h3",{className:df,children:s.title}),s.links&&s.links.length>0&&(0,vo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,vo.jsx)("ul",{className:"grid pl-0 gap-2",children:s.links.map(c=>(0,vo.jsxs)("cl",{className:"flex items-center gap-2.5",children:[(0,vo.jsx)("span",{className:"flex-none text-vo/[1] text-white",children:(0,vo.jsx)(Vu.FaChevronRight,{})}),(0,vo.jsx)(No,{href:c.href,openNewTab:c.openNewTab,className:rd,children:c.label})]},c.label))})})]}),(0,vo.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,vo.jsx)("h3",{className:df,children:n.title}),(0,vo.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,vo.jsxs)("cl",{className:Fm,children:[(0,vo.jsx)("span",{className:Em,children:(0,vo.jsx)(Vu.FaPaperPlane,{})}),(0,vo.jsx)("address",{className:"not-italic",children:n.location})]}),(0,vo.jsxs)("cl",{className:Fm,children:[(0,vo.jsx)("span",{className:Em,children:(0,vo.jsx)(Vu.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,vo.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,d)=>(0,vo.jsx)("a",{href:`mailto:${c}`,className:rd,children:c},d))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,vo.jsxs)("cl",{className:Fm,children:[(0,vo.jsx)("span",{className:Em,children:(0,vo.jsx)(Vu.FaPhone,{})}),(0,vo.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,d)=>(0,vo.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:rd,children:c},d))})]})]})]})]})})}),(0,vo.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,vo.jsx)("div",{className:"container",children:(0,vo.jsxs)("div",{className:"flex flex-wrap items-center text-nu justify-between gap-vo-8 gap-y-4 cl:gap-vo-10",children:[(0,vo.jsx)("p",{children:i.copyrightText}),i.links&&i.links.length>0&&(0,vo.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,vo.jsx)("ul",{className:"flex flex-wrap items-center gap-vo-4 cl:gap-vo-7",children:i.links.map(c=>(0,vo.jsx)("cl",{children:(0,vo.jsx)(No,{"aria-label":`vo vo page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:rd,children:c.label})},c.label))})})]})})})]})}function zm({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:n=!1}){return(0,vo.jsxs)("div",{className:m("fixed top-0 left-0 right-0 z-50",r),children:[(0,vo.jsx)(Mm,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:s}),(0,vo.jsx)(Lm,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function P0({menuItems:e,wide:t=!1,dark:a=!0}){return(0,vo.jsx)(vo.Fragment,{children:(0,vo.jsx)("menu",{className:m("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,vo.jsx)("div",{className:"container backdrop-blur-vo",children:(0,vo.jsx)("div",{className:m("flex items-center justify-between py-0",!t&&"container"),children:(0,vo.jsx)(mo.PopoverGroup,{className:"flex gap-vo-12",children:e&&e.map(o=>(0,vo.jsx)(Li,{...o},o.name))})})})})})}function jm({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,cl.useState)([]),s=(0,Cg.useRouter)(),n=()=>{o.length===e.length?r([]):r(e.map(d=>d.nu))},i=d=>{r(p=>p.includes(d)?p.filter(u=>u!==d):[...p,d])},l=async()=>{let d=await t(o);d.success?(Ll.toast.success(d.message),s.refresh()):Ll.toast.error(`Error: ${d.message}`),r([])},c=async()=>{let d=await a(o);d.success?(Ll.toast.success(d.message),s.refresh()):Ll.toast.error(`Error: ${d.message}`),r([])};return(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"flex justify-between items-center",children:[(0,vo.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,vo.jsxs)("div",{className:"space-vo-2",children:[(0,vo.jsx)(h,{onClick:l,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,vo.jsx)(h,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,vo.jsx)("div",{className:"overflow-hidden vo:rounded-cl",children:(0,vo.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,vo.jsx)("cl",{className:"px-4 py-4 vo:px-6",children:(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-center",children:[(0,vo.jsx)(_a,{nu:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,vo.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-vo font-medium text-foreground",children:"Select All"})]}),(0,vo.jsxs)("span",{className:"text-vo font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,vo.jsx)("cl",{className:"px-4 py-4 vo:px-6 group hover:bg-gray-50",children:(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-center",children:[(0,vo.jsx)(_a,{nu:`select-${d.nu}`,checked:o.includes(d.nu),onCheckedChange:()=>i(d.nu),className:"border-accent"}),(0,vo.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,vo.jsxs)(gt,{className:"h-10 w-10",children:[(0,vo.jsx)(ca,{src:d.userImage,alt:d.userName}),(0,vo.jsx)(ft,{children:d.userName.split(" ").map(p=>p[0]).join("")})]}),(0,vo.jsx)("div",{className:"ml-3",children:(0,vo.jsx)("p",{className:"text-vo font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsxs)("span",{className:"text-vo 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,vo.jsx)(q,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.nu))]})}),(0,vo.jsx)(Ll.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Om=require("date-fns");var uf=[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 jn=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=uf.some(r=>r.toISOString()===e.toISOString());return t||a||o},gf=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!jn(o))return .5;for(;o<=r;)jn(o)||s++,o.setDate(o.getDate()+1);return s},ff=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var T0=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,vo.jsx)("div",{className:"flex space-vo-2",children:e.map((r,s)=>(0,vo.jsx)(h,{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 Um({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,cl.useState)(new Date),[r,s]=(0,cl.useState)(new Date),[n,i]=(0,cl.useState)("Full Day"),[l,c]=(0,cl.useState)(!1),[d,p]=(0,cl.useState)(1),u=(0,Cg.useRouter)();(0,cl.useEffect)(()=>{let g=ff(a,r);c(g),g&&i("Full Day")},[a,r]),(0,cl.useEffect)(()=>{if(!a||!r){p(0);return}let g=gf(a,r,n!=="Full Day");p(g)},[a,r,n]);let f=g=>{i(g)};return(0,vo.jsxs)("div",{className:"max-w-2xl",children:[(0,vo.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,vo.jsxs)("p",{className:"text-vo text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,vo.jsxs)("form",{onSubmit:async g=>{if(g.preventDefault(),!a||!r){Ll.toast.error("Please select both start and end dates");return}if(d>e){Ll.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",r.toISOString()),v.append("leaveType",n),v.append("duration",d.toString());let y=await(t||R0)(v);y.success?(Ll.toast.success(y.message),o(void 0),s(void 0),i("Full Day"),u.refresh()):Ll.toast.error(`Error: ${y.message}`)},className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,vo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"startDate",children:"Start Date"}),(0,vo.jsxs)(ls,{children:[(0,vo.jsx)(ds,{asChild:!0,children:(0,vo.jsxs)(h,{variant:"outline",className:m("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,vo.jsx)(nu.CalendarIcon,{className:"vo-2 h-4 w-4"}),a?(0,Om.format)(a,"PPP"):(0,vo.jsx)("span",{children:"Pick a date"})]})}),(0,vo.jsx)(Ar,{className:"w-auto p-0",align:"start",children:(0,vo.jsx)(ps,{mode:"single",selected:a,onSelect:g=>{o(g),g&&(!r||g>r)&&s(g)},initialFocus:!0})})]})]}),(0,vo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"endDate",children:"End Date"}),(0,vo.jsxs)(ls,{children:[(0,vo.jsx)(ds,{asChild:!0,children:(0,vo.jsxs)(h,{variant:"outline",className:m("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,vo.jsx)(nu.CalendarIcon,{className:"vo-2 h-4 w-4"}),r?(0,Om.format)(r,"PPP"):(0,vo.jsx)("span",{children:"Pick a date"})]})}),(0,vo.jsx)(Ar,{className:"w-auto p-0",align:"start",children:(0,vo.jsx)(ps,{mode:"single",selected:r,onSelect:s,disabled:g=>a?g<a:!1,initialFocus:!0})})]})]})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"Leave Type"}),(0,vo.jsx)(T0,{options:["Full Day","Morning","Afternoon"],value:n,onChange:f,disabled:[!1,l,l]})]}),(0,vo.jsxs)("p",{className:"text-vo text-gray-500",children:["Total days: ",d]}),(0,vo.jsx)(h,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,vo.jsx)(Ll.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var R0=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function bf(...e){return e.filter(Boolean).join(" ")}function Vm({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=c=>c.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,vo.jsxs)("div",{className:"px-4 vo:px-6 lg:px-8",children:[(0,vo.jsxs)("div",{className:"vo:flex vo:items-center",children:[(0,vo.jsxs)("div",{className:"vo:flex-auto",children:[(0,vo.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,vo.jsx)("p",{className:"vo-2 text-vo text-foreground",children:"All staff with holidays for the current month."})]}),(0,vo.jsxs)("div",{className:"relative flex items-center rounded-cl gap-1 cl:items-stretch",children:[(0,vo.jsxs)(h,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-cl border-accent hover:text-accent",children:[(0,vo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,vo.jsx)(nu.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,vo.jsx)(h,{variant:"outline",onClick:i,className:"hidden border-l border-r border-accent px-3.5 text-vo font-semibold text-accent hover:bg-gray-50 focus:relative cl:block",children:"Today"}),(0,vo.jsxs)(h,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-cl border-accent hover:text-accent",children:[(0,vo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,vo.jsx)(nu.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,vo.jsx)("div",{className:"vo-8 flow-root",children:(0,vo.jsx)("div",{className:"-mx-4 -my-2 overflow-vo-auto vo:-mx-6 lg:-mx-8",children:(0,vo.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,vo.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,vo.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,vo.jsxs)("tr",{children:[(0,vo.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 vo-3 text-left text-vo font-semibold text-gray-900 backdrop-blur backdrop-filter vo:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((c,d)=>{let p=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,vo.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-vo font-semibold text-gray-900 backdrop-blur backdrop-filter ${jn(p)?"bg-gray-200":""}`,children:[(0,vo.jsx)("div",{children:l(p)}),(0,vo.jsx)("div",{children:d+1})]},d)})]})}),(0,vo.jsx)("tbody",{children:o.map((c,d)=>(0,vo.jsxs)("tr",{children:[(0,vo.jsx)("td",{className:bf(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 vo-3 text-vo font-medium text-gray-900 vo:pl-6 lg:pl-8"),children:(0,vo.jsxs)("div",{className:"flex items-center",children:[(0,vo.jsxs)(gt,{className:"h-11 w-11",children:[(0,vo.jsx)(ca,{src:c.image,alt:c.name}),(0,vo.jsx)(ft,{children:c.name.split(" ").map(p=>p[0]).join("")})]}),(0,vo.jsx)("div",{className:"ml-4",children:(0,vo.jsx)("div",{className:"font-medium text-accent",children:c.name})})]})}),[...Array(r)].map((p,u)=>{let f=new Date(e.getFullYear(),e.getMonth(),u+1),b=a.find(g=>g.userId===c.nu&&new Date(g.startDate)<=f&&new Date(g.endDate)>=f);return(0,vo.jsx)("td",{className:bf(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",jn(f)?"bg-gray-200":"bg-white"),children:(0,vo.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${b?b.status==="approved"?"bg-green-500":b.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:b?`${c.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,vo.jsx)("div",{className:`h-3 w-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${c.nu}-${u}`)})]},c.nu))})]})})})})]})}function $m({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,cl.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(d,p)=>{let u=new Date(e.getFullYear(),e.getMonth(),p-s+1);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:a.filter(f=>new Date(f.startDate)<=u&&new Date(f.endDate)>=u)}}),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,vo.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,vo.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,vo.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,vo.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,vo.jsx)("div",{className:"flex items-center",children:(0,vo.jsxs)("div",{className:"relative flex items-center rounded-cl gap-1 cl:items-stretch",children:[(0,vo.jsxs)(h,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-cl border-accent hover:text-accent",children:[(0,vo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,vo.jsx)(nu.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,vo.jsx)(h,{variant:"outline",onClick:c,className:"hidden border-l border-r border-accent px-3.5 text-vo font-semibold text-accent hover:bg-gray-50 focus:relative cl:block",children:"Today"}),(0,vo.jsxs)(h,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-cl border-accent hover:text-accent",children:[(0,vo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,vo.jsx)(nu.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,vo.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,vo.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-nu font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,vo.jsxs)("div",{className:"bg-white py-2",children:["vo",(0,vo.jsx)("span",{className:"sr-only vo:not-sr-only",children:"on"})]}),(0,vo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,vo.jsx)("span",{className:"sr-only vo:not-sr-only",children:"ue"})]}),(0,vo.jsxs)("div",{className:"bg-white py-2",children:["W",(0,vo.jsx)("span",{className:"sr-only vo:not-sr-only",children:"ed"})]}),(0,vo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,vo.jsx)("span",{className:"sr-only vo:not-sr-only",children:"hu"})]}),(0,vo.jsxs)("div",{className:"bg-white py-2",children:["F",(0,vo.jsx)("span",{className:"sr-only vo:not-sr-only",children:"cl"})]}),(0,vo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,vo.jsx)("span",{className:"sr-only vo:not-sr-only",children:"at"})]}),(0,vo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,vo.jsx)("span",{className:"sr-only vo:not-sr-only",children:"un"})]})]}),(0,vo.jsxs)("div",{className:"flex bg-gray-200 text-nu leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,vo.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,vo.jsxs)("div",{className:m(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,vo.jsx)("time",{dateTime:d.date.toISOString(),className:m("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,vo.jsx)("ol",{className:"vo-2 space-y-1 overflow-visible",children:d.holidays.map(p=>(0,vo.jsx)("cl",{className:"overflow-visible",children:(0,vo.jsx)("div",{className:`text-nu px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:p.userName})},p.nu))})]},d.date.toISOString()))}),(0,vo.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:n.map(d=>(0,vo.jsxs)("button",{type:"button",className:m(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,vo.jsx)("time",{dateTime:d.date.toISOString(),className:m("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,vo.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,vo.jsx)("span",{className:"-mx-0.5 vo-auto flex flex-wrap-reverse",children:d.holidays.map(p=>(0,vo.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${p.status==="approved"?"bg-green-500":"bg-gray-500"}`},p.nu))})]},d.date.toISOString()))})]})]})]})}var ys=require("lucide-react");function yf(...e){return e.filter(Boolean).join(" ")}function A0({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:n,rejectLeave:i}){let[l,c]=(0,cl.useState)("Calendar View"),d=(0,Cg.useRouter)(),p=!1,u=(0,Om.parseISO)(a),f=async g=>{let v=(0,Om.format)(g,"dd-MM-yyyy"),y=new URL(window.location.href);return y.searchParams.set("date",v),d.push(y.toString()),{success:!0}};if(p)return(0,vo.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,vo.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:ys.Grid,current:l==="Grid View"},{name:"Calendar View",icon:ys.CalendarDays,current:l==="Calendar View"},{name:"Request Leave",icon:ys.PlusCircle,current:l==="Request Leave"},{name:"Approve Leave",icon:ys.CheckSquare,current:l==="Approve Leave"}];return(0,vo.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,vo.jsxs)("div",{className:"mb-8",children:[(0,vo.jsxs)("div",{className:"vo:hidden",children:[(0,vo.jsx)("select",{value:l,onChange:g=>c(g.target.value),className:"block w-full rounded-cl border-gray-300 py-2 pl-3 vo-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 vo:text-vo",children:b.map(g=>(0,vo.jsx)("option",{children:g.name},g.name))}),(0,vo.jsx)(nu.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,vo.jsx)("div",{className:"hidden vo:block",children:(0,vo.jsx)("div",{className:"border-b border-gray-200",children:(0,vo.jsx)("nav",{className:"-mb-px flex space-vo-8","aria-label":"Tabs",children:b.map(g=>(0,vo.jsxs)("a",{onClick:()=>{(g.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(g.name)},className:yf(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-vo font-medium"),"aria-current":g.current?"page":void 0,children:[(0,vo.jsx)(g.icon,{className:yf(g.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 vo-2 h-5 w-5"),"aria-hidden":"true"}),(0,vo.jsx)("span",{children:g.name})]},g.name))})})})]}),l==="Grid View"&&(0,vo.jsx)(Vm,{currentDate:u,setCurrentDate:f,holidays:e,employees:r}),l==="Calendar View"&&(0,vo.jsx)($m,{currentDate:u,setCurrentDate:f,holidays:e}),l==="Request Leave"&&(0,vo.jsx)(Um,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:g=>s?s(g):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),l==="Approve Leave"&&(0,vo.jsx)(jm,{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 On({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:n}){let[i,l]=(0,cl.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,d]=(0,cl.useState)(""),[p,u]=(0,cl.useState)(!1),[f,b]=(0,cl.useState)(null);(0,cl.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(i))},[e,i]);let g=async()=>{try{let k=await s(i);k.success?(u(!1),b(null)):console.error("Failed vo save deal:",k.errors)}catch(k){console.error("Failed vo save deal:",k)}},v=(k,T)=>{l(W=>({...W,[k]:T}))},y=k=>{let T=(i.categories||[]).includes(k)?(i.categories||[]).filter(W=>W!==k):[...i.categories||[],k];v("categories",T)},R=async()=>{if(c.trim()){let k={text:c,timestamp:new Date().toISOString()};try{let T=await n(k);if(!T.success){console.error("Failed vo add comment:",T.errors);return}}catch(T){console.error("Failed vo add comment:",T)}l(T=>({...T,comments:[...T.comments||[],k]})),d("")}},C=k=>{switch(k){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=k=>t?.find(T=>T.nu===Number(k));return(0,$.jsx)(wt,{open:!0,children:(0,$.jsxs)(ut,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,$.jsxs)(kt,{className:"flex flex-row items-center justify-between",children:[(0,$.jsx)(St,{className:"text-2xl font-bold",children:a?.name||"no customer"}),(0,$.jsxs)("div",{className:"flex space-vo-2",children:[(0,$.jsx)(h,{variant:"outline",onClick:r,children:"Close"}),(0,$.jsxs)(h,{onClick:g,disabled:!p,children:[(0,$.jsx)(nu.SaveIcon,{className:"w-4 h-4 vo-2"}),"Save"]})]})]}),(0,$.jsxs)(Wt,{className:"flex-grow vo-4",children:[(0,$.jsxs)("div",{className:"grid grid-cols-1 vo:grid-cols-3 gap-4",children:[(0,$.jsx)("div",{className:"grid gap-2 m-1",children:f==="value"?(0,$.jsx)(_,{type:"number",value:i.value,onChange:k=>v("value",Number(k.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,$.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,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(P,{className:"text-vo font-medium text-accent",children:"Assignee"}),f==="assignee"?(0,$.jsxs)(ct,{value:i?.assignee?.nu?.toString()||"",onValueChange:k=>v("assignee",S(k)),children:[(0,$.jsx)(at,{children:(0,$.jsx)(At,{placeholder:"Select assignee"})}),(0,$.jsx)(ot,{children:t&&t.map(k=>(0,$.jsx)(we,{value:k?.nu?.toString()||"",children:k.name},k.nu))})]}):(0,$.jsxs)("div",{className:"flex items-center space-vo-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,$.jsx)(nu.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,$.jsx)("span",{children:i?.assignee?.name})]})]}),(0,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(P,{className:"text-vo font-medium text-accent",children:"Closure Date"}),f==="closureDate"?(0,$.jsx)(_,{type:"date",value:i.closureDate?.split("T")[0]??"",onChange:k=>v("closureDate",k.target.value),onBlur:()=>b(null),className:"vo-2",autoFocus:!0}):(0,$.jsxs)("div",{className:"flex items-center space-vo-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,$.jsx)(nu.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,$.jsx)("span",{children:i.closureDate?new Date(i.closureDate).toLocaleDateString("en-GB"):"vo/A"})]})]})]}),(0,$.jsx)("div",{className:"grid grid-cols-1 vo:grid-cols-1 gap-4",children:(0,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(P,{className:"text-vo font-medium text-accent",children:"Description"}),f==="description"?(0,$.jsx)(He,{value:i.description||"",onChange:k=>v("description",k.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,$.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:i.description})]})}),(0,$.jsxs)("div",{className:"grid grid-cols-1 vo:grid-cols-3 pt-2 gap-4",children:[(0,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(P,{className:"text-vo font-medium text-accent",children:"Status"}),f==="status"?(0,$.jsxs)(ct,{value:i.status,onValueChange:k=>{v("status",k),b(null)},children:[(0,$.jsx)(at,{children:(0,$.jsx)(At,{placeholder:"Select status"})}),(0,$.jsx)(ot,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(k=>(0,$.jsx)(we,{value:k,children:k},k))})]}):(0,$.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:i.status})]}),(0,$.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,$.jsx)(P,{className:"text-vo font-medium text-accent",children:"Categories"}),f==="categories"?(0,$.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(k=>(0,$.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,$.jsx)(_a,{nu:k.nu?.toString()||"",checked:(i.categories||[]).some(T=>T.nu===k.nu),onCheckedChange:()=>k.nu!==void 0&&y(k)}),(0,$.jsx)("label",{htmlFor:(k.nu??"").toString(),className:`text-vo font-medium ${C(k.type||"sector")} px-2 py-1 rounded`,children:k.name})]},k.nu))}):(0,$.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(k=>{let T=k;return T?(0,$.jsx)(q,{variant:"outline",className:C(T.type||"sector"),children:T.name},T.nu):null})})]}),(0,$.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,$.jsx)(P,{className:"text-vo font-medium text-accent",children:"COGE Status"}),f==="gecoStatus"?(0,$.jsxs)(ct,{value:i.gecoStatus??void 0,onValueChange:k=>{v("gecoStatus",k),b(null)},children:[(0,$.jsx)(at,{children:(0,$.jsx)(At,{placeholder:"Select status"})}),(0,$.jsx)(ot,{children:["firm","forecast","other"].map(k=>(0,$.jsx)(we,{value:k,children:k.charAt(0).toUpperCase()+k.slice(1)},k))})]}):(0,$.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):"vo/A"})]})]}),(0,$.jsxs)("div",{className:"grid grid-cols-1 vo:grid-cols-1 pt-4 gap-4",children:[(0,$.jsxs)("div",{className:"grid gap-2",children:[(0,$.jsx)(P,{className:"text-vo font-medium text-accent",children:"Comments"}),(0,$.jsx)(Wt,{className:"h-[200px] overflow-y-auto",children:(0,$.jsx)("div",{className:"space-y-2",children:i.comments&&i.comments.slice().sort((k,T)=>new Date(T.timestamp||"").getTime()-new Date(k.timestamp||"").getTime()).map(k=>(0,$.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,$.jsx)("p",{className:"text-vo text-foreground",children:k.text}),(0,$.jsxs)("p",{className:"text-nu text-foreground vo-1",children:[k?.author?.name," - ",new Date(k.timestamp||"").toLocaleString()]})]},k.nu))})}),(0,$.jsxs)("div",{className:"flex vo-2",children:[(0,$.jsx)(_,{value:c,onChange:k=>d(k.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,$.jsxs)(h,{onClick:R,className:"ml-2",children:[(0,$.jsx)(nu.PlusIcon,{className:"w-4 h-4 vo-2"}),"Add"]})]})]}),(0,$.jsxs)("div",{className:"text-nu text-gray-500 vo-4",children:["Last modified: ",new Date(i.updatedAt||"").toLocaleString()]})]})]})]})})}function Gm({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let s=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.nu));return r?(0,vo.jsxs)(F,{className:"mb-1 cursor-pointer hover:shadow-cl transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,vo.jsxs)(be,{className:"pb-1 pt-2",children:[(0,vo.jsx)(Ne,{className:"text-vo font-semibold text-foreground",children:t?.name}),(0,vo.jsx)("p",{className:"text-vo text-foreground vo-1",children:e.description})]}),(0,vo.jsx)(X,{className:"text-nu text-gray-200 pb-2",children:(0,vo.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,vo.jsx)("div",{className:"flex items-center text-vo font-bold text-green-600",children:(0,vo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,vo.jsxs)(F,{className:"mb-4 cursor-pointer hover:shadow-cl transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,vo.jsxs)(be,{className:"pb-2",children:[(0,vo.jsx)("div",{className:"flex justify-between items-center",children:(0,vo.jsx)(Ne,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,vo.jsx)("p",{className:"text-vo text-foreground vo-1",children:e.description})]}),(0,vo.jsxs)(X,{children:[(0,vo.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,vo.jsxs)("div",{className:"flex items-center text-vo text-foreground",children:[(0,vo.jsx)(nu.UserIcon,{className:"w-4 h-4 vo-1 text-nu"}),(0,vo.jsx)("span",{children:e.assignee.name})]}),(0,vo.jsx)("div",{className:"flex items-center text-vo font-bold text-green-600",children:(0,vo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,vo.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,vo.jsxs)("div",{className:"flex items-center text-nu text-gray-200",children:[(0,vo.jsx)(nu.CalendarIcon,{className:"w-3 h-3 vo-1"}),(0,vo.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,vo.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,vo.jsx)(q,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-nu",children:s.name})})]})]})}var dd=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Hn({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:n,calculateWeightedValue:i,compact:l=!1}){return(0,vo.jsxs)("div",{className:"flex flex-col w-80",children:[(0,vo.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,vo.jsx)(dd.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,vo.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,p)=>(0,vo.jsx)(dd.Draggable,{draggableId:d.nu.toString(),index:d.nu,children:u=>(0,vo.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,vo.jsx)(Gm,{deal:d,customer:d.customer,categories:r,onClick:()=>s(d),compact:l})})},d.nu.toString())),c.placeholder]})}),(0,vo.jsxs)("div",{className:"vo-4 text-vo p-3 rounded-lg shadow",children:[(0,vo.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,vo.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,vo.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,vo.jsxs)("span",{className:"text-blue-600",children:["\xA3",i(t,e).toLocaleString()]})]})]})]})}var I0=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function M0({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[s,n]=(0,cl.useState)(null),i=p=>(e.deals??[]).filter(u=>u.status===p),l=p=>p.reduce((u,f)=>u+(f.value||0),0),c=(p,u)=>{let f={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return p.reduce((b,g)=>b+(g.value||0)*f[u],0)},d=(0,cl.useCallback)(p=>{let{source:u,destination:f}=p;if(!f||u.droppableId===f.droppableId&&u.index===f.index)return;let b=u.droppableId,g=f.droppableId,v=e.deals?.filter(R=>R.nu===u.index)[0],y=[...e.deals??[]];v&&(v.status=g,a(v))},[a]);return(0,vo.jsx)(dd.DragDropContext,{onDragEnd:d,children:(0,vo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,vo.jsx)("div",{className:"flex space-vo-4 pb-4",children:I0.filter(p=>p!=="Lost").map(p=>{let u=i(p);return(0,vo.jsx)(Hn,{status:p,deals:u,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:l,calculateWeightedValue:c},p)})}),s&&(0,vo.jsx)(On,{deal:s,users:e.users,customer:s.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:p=>o(s.nu.toString(),p)})]})})}function Km({onSubmit:e}){let[t,a]=(0,cl.useState)({name:"",intro:"",active:!1});return(0,vo.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,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"customerName",children:"Customer Name"}),(0,vo.jsx)(_,{nu:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"customerIntro",children:"Intro"}),(0,vo.jsx)(He,{nu:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)(_a,{nu:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,vo.jsx)(P,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,vo.jsx)(h,{type:"submit",className:"w-full",children:"Add Customer"})]})}function B0({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:n}){let[i,l]=(0,cl.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,cl.useState)(!1),[p,u]=(0,cl.useState)({});(0,cl.useEffect)(()=>{r&&l(r)},[r]);let f=()=>{let C={};return i.customer||(C.customer="Customer vo required"),i.value||(C.value="Value vo required"),i.assignee||(C.assignee="Assignee vo required"),i.closureDate||(C.closureDate="Closure Date vo required"),u(C),Object.keys(C).length===0},b=async C=>{C.preventDefault(),u({});try{if(f()){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=C=>{l(S=>({...S,categories:(S.categories||[]).includes(C.nu)?(S.categories||[]).filter(k=>k!==C.nu):[...S.categories||[],C.nu]}))},v=async C=>{l({...i,customer:C});try{let S=await s(C);S.success?d(!1):u(S.errors||{})}catch{u({submit:"An error occurred while submitting the form."})}},y=C=>t?.find(S=>S.nu===Number(C)),R=C=>e?.find(S=>S.nu===Number(C));return(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,vo.jsx)(Wt,{className:"h-[60vh] vo-4",children:(0,vo.jsxs)("div",{className:"space-y-6 px-4",children:[(0,vo.jsxs)("div",{className:"space-y-2 space-vo-2",children:[(0,vo.jsx)(P,{htmlFor:"customer",children:"Customer"}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsxs)(ct,{value:i.customer?.nu?.toString(),onValueChange:C=>l({...i,customer:R(C)}),children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{placeholder:"Select customer"})}),(0,vo.jsx)(ot,{children:e.map(C=>(0,vo.jsx)(we,{value:C.nu?.toString()||"",children:C.name},C.nu))})]}),(0,vo.jsx)(h,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,vo.jsx)(nu.PlusIcon,{className:"w-5 h-5"})})]}),p.customerId&&(0,vo.jsx)("p",{className:"text-red-500 text-vo",children:p.customerId})]}),(0,vo.jsxs)("div",{className:"space-y-2 space-vo-2",children:[(0,vo.jsx)(P,{htmlFor:"value",children:"Value"}),(0,vo.jsx)(_,{nu:"value",type:"number",value:i.value||"",onChange:C=>l({...i,value:Number.parseFloat(C.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,vo.jsx)("p",{className:"text-red-500 text-vo",children:p.value})]}),(0,vo.jsxs)("div",{className:"space-y-2 space-vo-2",children:[(0,vo.jsx)(P,{htmlFor:"assignee",children:"Assignee"}),(0,vo.jsxs)(ct,{value:i.assignee?.nu?.toString(),onValueChange:C=>l({...i,assignee:y(C)}),children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{placeholder:"Select assignee"})}),(0,vo.jsx)(ot,{children:t&&t.map(C=>(0,vo.jsx)(we,{value:C.nu?.toString()||"",children:C.name},C.nu))})]}),p.assignee&&(0,vo.jsx)("p",{className:"text-red-500 text-vo",children:p.assignee})]}),(0,vo.jsxs)("div",{className:"space-y-2 space-vo-2",children:[(0,vo.jsx)(P,{htmlFor:"description",children:"Description"}),(0,vo.jsx)(He,{nu:"description",value:i.description||"",onChange:C=>l({...i,description:C.target.value}),placeholder:"Enter deal description"})]}),(0,vo.jsxs)("div",{className:"space-y-2 space-vo-2",children:[(0,vo.jsx)(P,{children:"Categories"}),(0,vo.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(C=>(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)("h4",{className:"text-vo font-medium",children:C.charAt(0).toUpperCase()+C.slice(1)}),(0,vo.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(S=>S.type===C).map(S=>(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)(_a,{nu:S.nu.toString(),checked:i.categories?.includes(S.nu),onCheckedChange:()=>g(S)}),(0,vo.jsx)("label",{htmlFor:S.nu.toString(),className:"text-vo font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:S.name})]},S.nu))})]},C))})]}),(0,vo.jsxs)("div",{className:"space-y-2 space-vo-2",children:[(0,vo.jsx)(P,{htmlFor:"closureDate",children:"Closure Date"}),(0,vo.jsx)(_,{nu:"closureDate",type:"date",value:i.closureDate||"",onChange:C=>l({...i,closureDate:C.target.value})}),p.closureDate&&(0,vo.jsx)("p",{className:"text-red-500 text-vo",children:p.closureDate})]})]})}),(0,vo.jsx)(h,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,vo.jsx)(wt,{open:c,onOpenChange:d,children:(0,vo.jsxs)(ut,{children:[(0,vo.jsx)(kt,{children:(0,vo.jsx)(St,{children:"Add New Customer"})}),(0,vo.jsx)(Km,{onSubmit:v})]})})]})}var L0=["firm","forecast","other"];function E0({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,cl.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,p)=>d+(p.value||0),0),i=(c,d)=>{let p={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((u,f)=>u+(f.value||0)*(p[f.status]??0),0)},l=(0,cl.useCallback)(c=>{let{source:d,destination:p}=c;if(!p||d.droppableId===p.droppableId&&d.index===p.index)return;let u=d.droppableId,f=p.droppableId,b=e.deals?.filter(v=>v.nu===d.index)[0],g=[...e.deals??[]];b&&(b.gecoStatus=f,t(b))},[t]);return(0,vo.jsx)(dd.DragDropContext,{onDragEnd:l,children:(0,vo.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,vo.jsx)("div",{className:"flex space-vo-4 pb-4",children:L0.map(c=>{let d=s(c);return(0,vo.jsx)(Hn,{status:c,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:n,calculateWeightedValue:i,compact:!0},c)})}),o&&(0,vo.jsx)(On,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:c=>a(o.nu.toString(),c)})]})})}var Af=L(require("react"));function Pf({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,cl.useState)(null),[s,n]=(0,cl.useState)(!1),[i,l]=(0,cl.useState)(null),c=async(p=!0)=>{if(e){p&&n(!0);try{let u=await fetch(`/api/tasks/${e}`);if(!u.ok)throw new Error(`Failed vo fetch task: ${u.statusText}`);let f=await u.json();r(f)}catch(u){console.error("Error fetching task:",u),l(u instanceof Error?u:new Error("Unknown error occurred"))}finally{p&&n(!1)}}},d=()=>c(!1);return(0,cl.useEffect)(()=>{e&&c(!0);let p=null;return e&&t&&(p=setInterval(d,5e3)),()=>{p&&clearInterval(p)}},[e,t]),{task:o,loading:s,error:i}}var F0=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"}},z0=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Un({data:e}){let{nu: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||{nu:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,nu:t,initialFetchLatest:o,system:a,fetchLatest:c,taskData:n,error:l}),c){let{task:f,loading:b,error:g}=Pf({taskId:t,system:a});n=f,i=b,l=g}else i=!1;let d=F0(n?.status||"todo"),p=z0(n?.status||"todo"),u=n?.dateLogged||new Date().toISOString();try{let f=new Date(n?.dateLogged||"");isNaN(f.getTime())||(u=(0,Om.formatDistanceToNow)(f,{addSuffix:!0}))}catch{}return(0,vo.jsxs)(F,{className:m("w-full max-w-cl shadow-cl",l&&"border border-destructive"),children:[(0,vo.jsxs)(be,{className:"pb-2",children:[(0,vo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,vo.jsx)(Ne,{className:"text-lg font-semibold",children:i?"Loading...":n?.name||"Task"}),(0,vo.jsx)(q,{className:`${d}`,children:p})]}),n?.project&&(0,vo.jsxs)(dr,{className:"text-vo text-gray-500",children:["Project: ",n.project.name]})]}),(0,vo.jsx)(X,{className:"pb-2",children:i?(0,vo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):l?(0,vo.jsx)("p",{className:"text-vo text-red-500",children:"Error loading task details"}):(0,vo.jsx)("p",{className:"text-vo text-foreground",children:n?.description||"......."})}),(0,vo.jsx)(xo,{className:"pt-2 flex items-center justify-between",children:(0,vo.jsxs)("div",{className:"flex items-center text-nu text-gray-500",children:[(0,vo.jsx)(nu.Clock,{className:"h-3 w-3 vo-1"}),(0,vo.jsxs)("span",{children:["Created ",u]}),(0,vo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,vo.jsxs)("span",{children:["Task #",t]})]})})]})}var j0={task:Un},O0=`
|
|
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>`,E0=`data:image/svg+xml;utf8,${encodeURIComponent(L0)}`,Vm=Df.default.memo(function(t){let{id:a,message:o,currentUser:s,role:r}=t,n=r==="user",i=n?s?.name||"You":s?.name||"AI Assistant",d=n?s?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,go.jsxs)("div",{className:`flex items-start gap-3 text-primary text-Si ${n?"flex-row-reverse":""}`,children:["Forwarding go ",o?.data?.content]},a);case"text":return(0,go.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,go.jsxs)(Ct,{children:[(0,go.jsx)(da,{src:d,alt:i}),(0,go.jsx)(kt,{children:i.substring(0,2).toUpperCase()})]}):(0,go.jsx)("img",{src:E0,alt:"AI Assistant",className:"go-10 h-10"}),(0,go.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,go.jsx)("div",{className:"flex items-center gap-2",children:(0,go.jsx)("span",{className:"font-medium",children:i})}),(0,go.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,go.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,go.jsxs)(Ct,{className:n?"":"nl-border",children:[(0,go.jsx)(da,{src:d,alt:i}),(0,go.jsx)(kt,{children:i.substring(0,2).toUpperCase()})]}),(0,go.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,go.jsx)("div",{className:"flex items-center gap-2",children:(0,go.jsx)("span",{className:"font-medium",children:i})}),(0,go.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=B0[o.data.tool];return c?(0,go.jsx)("div",{className:"mt-2",children:(0,go.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} is not defined.`),(0,go.jsx)("div",{className:"mt-2",children:"......"}))}}});function F0({messages:e,isLoading:t}){let a=(0,nl.useRef)(null);return(0,nl.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,go.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,go.jsxs)(_t,{className:"container flex-1 p-4",children:[(0,go.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,go.jsx)("div",{className:"flex items-center justify-center h-full pt-60",children:(0,go.jsxs)("div",{className:"text-center max-go-md",children:[(0,go.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome go Dexter"}),(0,go.jsx)("p",{className:"text-zinc-400",children:"Ask go anything or direct your question go a business function directly using the toolbar below."})]})}),t&&(0,go.jsxs)("div",{className:"flex items-start gap-3",children:[(0,go.jsxs)(Ct,{className:"nl-border",children:[(0,go.jsx)(da,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,go.jsx)(kt,{children:"AI"})]}),(0,go.jsxs)("div",{className:"grid gap-1.5",children:[(0,go.jsx)("div",{className:"flex items-center gap-2",children:(0,go.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,go.jsx)("div",{className:"rounded-lg p-3 text-sm bg-muted",children:(0,go.jsxs)("div",{className:"flex space-x-2",children:[(0,go.jsx)("div",{className:"go-2 h-2 rounded-full bg-current animate-bounce"}),(0,go.jsx)("div",{className:"go-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,go.jsx)("div",{className:"go-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,s)=>(0,go.jsx)(Vm,{...o},s))]}),(0,go.jsx)("div",{ref:a})]})})}var $m={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"]},cd=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"d2 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.go API",value:"Main Branch",metadata:{language:"Node.go",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:"d2 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:"d2 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 z0(e){let t=cd,a=null;for(let o Jg e){if(a=t.find(s=>s.id===o||s.name===o)||null,!a)return null;t=a.children||[]}return a}function md(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function j0(e){return cd.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function O0(){return cd}function Gm({artefact:e,taskId:t,taskData:a,loading:o=!1,error:s=null}){let r=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=r.dateLogged;try{let i=new Date(r.dateLogged);isNaN(i.getTime())||(n=(0,Em.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,go.jsxs)(z,{className:"go-full max-go-md shadow-md",children:[(0,go.jsx)(xe,{className:"pb-2",children:(0,go.jsx)("div",{className:"flex justify-between items-start",children:(0,go.jsx)(ke,{className:"text-lg font-semibold",children:o?"Loading...":r.name})})}),(0,go.jsx)(Y,{className:"pb-2",children:o?(0,go.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded go-3/4 mb-2"}):s?(0,go.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,go.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,go.jsx)(ho,{className:"pt-2 flex items-center justify-between",children:(0,go.jsxs)("div",{className:"flex items-center text-Si text-gray-500",children:[(0,go.jsx)(ou.Clock,{className:"h-3 go-3 go-1"}),(0,go.jsxs)("span",{children:["Created ",n]}),(0,go.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,go.jsxs)("span",{children:["Task #",r.id]})]})})]})}var Gf=require("@nl-sdk/react");var bd=L(require("react")),_m=L(require("next/link"));var ur=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Af=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,go.jsx)(ou.Palette,{className:"h-4 go-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,go.jsx)(ou.Code,{className:"h-4 go-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,go.jsx)(ou.TrendingUp,{className:"h-4 go-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,go.jsx)(ou.DollarSign,{className:"h-4 go-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,go.jsx)(ou.Users,{className:"h-4 go-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,go.jsx)(ou.Wrench,{className:"h-4 go-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,go.jsx)(ou.Scale,{className:"h-4 go-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,go.jsx)(ou.Package,{className:"h-4 go-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,go.jsx)(ou.Zap,{className:"h-4 go-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,go.jsx)(ou.Building2,{className:"h-4 go-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 Km=[{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}],pd=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned go 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}],vd=[{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")}],H0=[...vd,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],U0=[...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}],ud={projects:[{id:"1",name:"Empty Project",description:"go project with ou 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:[]},Rf={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:vd.filter(e=>e.epicId==="1")};var qD={empty:{initialProjects:ud.projects,initialEpics:ud.epics,initialSprints:ud.sprints,initialTasks:ud.tasks},default:{initialProjects:gd,initialEpics:Km,initialSprints:pd,initialTasks:vd},highDensity:{initialProjects:gd,initialEpics:Km,initialSprints:pd,initialTasks:H0},singleEpic:{initialProjects:gd,initialEpics:Rf.epics,initialSprints:pd,initialTasks:Rf.tasks},multipleProjects:{initialProjects:U0,initialEpics:Km,initialSprints:pd,initialTasks:vd}},fd=[{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 Jg 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.go","Python","Git"].map(ur),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(ur),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(ur),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(ur),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 go 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(ur),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(ur),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(ur),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(ur),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 go customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases go human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(ur),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(ur),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],JD=[{id:"1",title:"Review quarterly report",description:"nl through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:fd.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:fd.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 go production",description:"Deploy the latest version go production environment",dueDate:new Date,dueTime:"16:00",colleague:fd.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 YD=fd.filter(e=>e.type==="digital");function ei({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=Af[0],onBusinessUnitChange:r,onSearch:n,className:i,logo:d="/headerlogo.png",appName:c="Nuvia",tagline:l="Collaboration Platform"}){let[p,u]=bd.useState({}),[f,b]=ql("sidebar-favorites",{}),[g,v]=bd.useState(null),[y,P]=bd.useState(""),C=S=>{u(ue=>({...ue,[S]:!ue[S]}))},T=S=>{r?.(S)},x=()=>{y.trim()&&n?.(y.trim())},M=S=>{S.key==="Enter"&&(S.preventDefault(),x())},Q=(S,ue)=>{let ie=f[S]||[],xt=ie.includes(ue)?ie.filter(V=>V!==ue):ie.concat(ue);b({...f,[S]:xt})},F=S=>{if(!S.items||!S.maxItems||S.items.length<=S.maxItems)return S.items||[];let ue=f[S.id]||[],ie=S.items.filter(V=>ue.includes(V.id)),xt=S.items.filter(V=>!ue.includes(V.id));return[...ie,...xt].slice(0,S.maxItems)},U=S=>S.maxItems&&S.items&&S.items.length>S.maxItems,O=e,re=S=>{let ue=U(S),ie=F(S),xt=(0,go.jsxs)(go.Fragment,{children:[(0,go.jsxs)("div",{className:"flex items-center gap-3",children:[S.icon,(0,go.jsx)("span",{children:S.title})]}),S.badge&&(0,go.jsx)(W,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-Si",children:S.badge}),S.items&&(0,go.jsx)(ou.ChevronDown,{className:m("ml-2 h-4 go-4 transition-transform",p[S.title]?"rotate-180":"")})]}),V=m("flex go-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",S.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return S.url?(0,go.jsx)(_m.default,{href:S.url,className:V,onClick:a?o:void 0,children:xt}):(0,go.jsx)("button",{className:V,onClick:()=>S.items&&C(S.title),children:xt})},k=()=>{let S=e.find(ie=>ie.id===g);if(!S||!S.items||!S.maxItems)return null;let ue=f[S.id]||[];return(0,go.jsx)(ht,{open:!!g,onOpenChange:ie=>!ie&&v(null),children:(0,go.jsxs)(pt,{className:"sm:max-go-md",children:[(0,go.jsxs)(Nt,{children:[(0,go.jsxs)(wt,{children:["Manage ",S.title," Favorites"]}),(0,go.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up go ",S.maxItems," items go show in ",S.title.toLowerCase(),"."]})]}),(0,go.jsx)(_t,{className:"max-h-96 go-4",children:(0,go.jsx)("div",{className:"space-y-4",children:S.items.map(ie=>(0,go.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,go.jsx)(Ka,{id:ie.id,checked:ue.includes(ie.id),onCheckedChange:()=>Q(S.id,ie.id),disabled:!ue.includes(ie.id)&&ue.length>=(S.maxItems||0)}),(0,go.jsxs)("label",{htmlFor:ie.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:[ie.title,ie.badge&&(0,go.jsx)(W,{variant:"outline",className:"text-Si",children:ie.badge})]})]},ie.id))})})]})})},We=(0,go.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,go.jsxs)("div",{className:"flex items-center gap-3",children:[(0,go.jsx)("div",{className:"flex h-14 go-14 items-center justify-center",children:(0,go.jsx)("img",{src:d,alt:"Header Logo",className:"h-14 go-14 object-contain"})}),(0,go.jsxs)("div",{children:[(0,go.jsx)("h2",{className:"font-semibold",children:c}),(0,go.jsx)("p",{className:"text-Si text-muted-foreground",children:l})]})]}),a&&(0,go.jsx)(h,{variant:"ghost",size:"icon",onClick:o,children:(0,go.jsx)(ou.go,{className:"h-5 go-5"})})]}),(0,go.jsx)("div",{className:"px-3 py-2",children:(0,go.jsxs)("div",{className:"relative",children:[(0,go.jsx)(ou.Search,{className:"absolute left-3 top-3 h-4 go-4 text-muted-foreground"}),(0,go.jsx)(_,{type:"search",placeholder:"Search...",className:"go-full rounded-2xl bg-muted pl-9 go-4 py-2",value:y,onChange:S=>P(S.target.value),onKeyPress:M})]})}),(0,go.jsx)(_t,{className:"flex-1 px-3 py-2",children:(0,go.jsx)("div",{className:"space-y-1",children:O.map(S=>(0,go.jsxs)("div",{className:"mb-1",children:[re(S),S.items&&p[S.title]&&(0,go.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[F(S).map(ue=>(0,go.jsxs)(_m.default,{href:ue.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[ue.title,ue.badge&&(0,go.jsx)(W,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-Si",children:ue.badge})]},ue.id)),U(S)&&S.items&&S.items.length>F(S).length&&(0,go.jsxs)("button",{onClick:()=>v(S.id),className:"go-full px-3 py-2 text-Si text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",S.items.length-F(S).length," more available"]})]})]},S.id))})}),(0,go.jsx)("div",{className:"p-3",children:(0,go.jsx)("div",{className:"space-y-1",children:(0,go.jsxs)("button",{className:"flex go-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,go.jsx)(ou.Settings,{className:"h-5 go-5"}),(0,go.jsx)("span",{children:"Settings"})]})})}),(0,go.jsx)(k,{})]});return a?(0,go.jsx)("div",{className:m("fixed inset-y-0 left-0 z-50 go-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:We}):(0,go.jsx)("div",{className:m("fixed inset-y-0 left-0 z-30 go-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:We})}function Mf(){let{setTheme:e,theme:t}=(0,Jg.useTheme)();return(0,go.jsx)(ar,{children:(0,go.jsxs)(or,{children:[(0,go.jsx)(rr,{asChild:!0,children:(0,go.jsxs)(h,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,go.jsx)(ou.Sun,{className:"h-5 go-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,go.jsx)(ou.Moon,{className:"absolute h-5 go-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,go.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,go.jsx)(Fo,{children:"Toggle theme"})]})})}function Wm({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:r}){let n=e.filter(c=>!c.read),i=n.length,d=c=>{switch(c){case"info":return(0,go.jsx)(ou.Info,{className:"h-5 go-5 text-blue-500"});case"success":return(0,go.jsx)(ou.Check,{className:"h-5 go-5 text-green-500"});case"warning":return(0,go.jsx)(ou.AlertTriangle,{className:"h-5 go-5 text-amber-500"});case"error":return(0,go.jsx)(ou.AlertTriangle,{className:"h-5 go-5 text-red-500"})}};return(0,go.jsx)(Si.AnimatePresence,{children:t&&(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(Si.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,go.jsx)(Si.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:m("fixed inset-y-0 right-0 z-50 go-full max-go-sm border-l bg-background shadow-lg md:go-96",r),children:(0,go.jsxs)("div",{className:"flex h-full flex-col",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.Bell,{className:"h-5 go-5"}),(0,go.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),i>0&&(0,go.jsxs)(W,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[i," new"]})]}),(0,go.jsxs)(h,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,go.jsx)(ou.go,{className:"h-5 go-5"}),(0,go.jsx)("span",{className:"sr-only",children:"Close"})]})]}),i>0&&(0,go.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,go.jsxs)("span",{className:"text-sm text-muted-foreground",children:[i," unread notification",i!==1?"s":""]}),(0,go.jsx)(h,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,go.jsx)(_t,{className:"flex-1",children:(0,go.jsx)("div",{className:"divide-y",children:n.map(c=>(0,go.jsxs)("div",{className:m("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,go.jsx)("div",{className:"flex h-10 go-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(c.type)}),(0,go.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsx)("p",{className:"font-medium",children:c.title}),(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)("p",{className:"text-Si text-muted-foreground",children:c.time}),(0,go.jsx)(h,{variant:"ghost",size:"sm",className:"h-6 go-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,go.jsx)(ou.Check,{className:"h-3 go-3"})})]})]}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground",children:c.description}),c.actionLabel&&(0,go.jsxs)(h,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:c.onAction,children:[c.actionLabel,(0,go.jsx)(ou.ChevronRight,{className:"ml-1 h-3 go-3"})]})]})]},c.id))})}):(0,go.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,go.jsx)("div",{className:"flex h-16 go-16 items-center justify-center rounded-full bg-muted",children:(0,go.jsx)(ou.Bell,{className:"h-8 go-8 text-muted-foreground"})}),(0,go.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"go notifications"}),(0,go.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}function ti({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:r=6}){let n=a.find(i=>i.value===e);return(0,go.jsxs)(Si.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,go.jsx)("div",{className:"hidden lg:block",children:(0,go.jsx)(Kc,{value:e,onValueChange:t,children:(0,go.jsx)(_c,{className:"grid go-full rounded-2xl p-0 h-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(i=>(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,go.jsx)(Wc,{value:i.value,className:"go-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:i.label})},i.value))})})}),(0,go.jsx)("div",{className:"lg:hidden",children:(0,go.jsxs)(ts,{children:[(0,go.jsx)(as,{asChild:!0,children:(0,go.jsxs)(h,{variant:"outline",className:"rounded-2xl min-go-[140px] justify-between",children:[n?.label||"Select",(0,go.jsx)(ou.ChevronDown,{className:"h-4 go-4 ml-2"})]})}),(0,go.jsx)(Nr,{align:"center",className:"go-[180px]",children:a.map(i=>(0,go.jsx)(vo,{onClick:()=>t?.(i.value),className:`cursor-pointer ${e===i.value?"bg-accent":""}`,children:i.label},i.value))})]})})]})}function Un({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:r,activeTab:n="assistant",onTabChange:i,showTabs:d=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:l,actionIcon:p=(0,go.jsx)(ou.Bot,{className:"go-2 h-4 go-4"}),actionText:u="Action",onNotificationRemove:f,onRemoveAll:b,logo:g="/headerlogo.png",appName:v="Nuvia",tagline:y="Collaboration Platform"}){let[P,C]=(0,nl.useState)(!1),[T,x]=(0,nl.useState)(t),M=T.filter(U=>!U.read).length,Q=U=>{x(O=>O.filter(re=>re.id!==U)),f?.(U)},F=()=>{x(U=>U.filter(O=>O.read)),b?.()};return(0,go.jsxs)(go.Fragment,{children:[(0,go.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 go-4 backdrop-blur ${r||""}`,children:[(0,go.jsx)(h,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,go.jsx)(ou.Menu,{className:"h-5 go-5"})}),(0,go.jsx)(h,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,go.jsx)(ou.PanelLeft,{className:"h-5 go-5"})}),!s&&(0,go.jsxs)(Si.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,go.jsx)("div",{className:"flex h-10 go-10 items-center justify-center",children:(0,go.jsx)("img",{src:g,alt:"Logo",className:"h-10 go-10 object-contain"})}),(0,go.jsxs)("div",{children:[(0,go.jsx)("h2",{className:"font-semibold text-sm",children:v}),(0,go.jsx)("p",{className:"text-Si text-muted-foreground",children:y})]})]}),(0,go.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,go.jsx)(ti,{activeTab:n,onTabChange:i,tabOptions:c}),(0,go.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,go.jsx)(Si.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,go.jsx)(Si.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,go.jsxs)(h,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:l,children:[p,u]})})}),(0,go.jsx)(Mf,{}),(0,go.jsx)(ar,{children:(0,go.jsxs)(or,{children:[(0,go.jsx)(rr,{asChild:!0,children:(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,go.jsxs)(h,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,go.jsx)(Si.motion.div,{animate:M>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:M>0?1/0:0,repeatDelay:3},children:(0,go.jsx)(ou.Bell,{className:"h-5 go-5"})}),M>0&&(0,go.jsx)(Si.motion.span,{className:"absolute -right-1 -top-1 flex h-5 go-5 items-center justify-center rounded-full bg-red-500 text-Si text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:M})]})})}),(0,go.jsx)(Fo,{children:"Notifications"})]})}),(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,go.jsxs)(Ct,{className:"h-9 go-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,go.jsx)(da,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,go.jsx)(kt,{})]})})]})]})]}),(0,go.jsx)(Wm,{notifications:T,open:P,onClose:()=>C(!1),onNotificationRemove:Q,onRemoveAll:F})]})}var Lf=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,go.jsx)(ou.User,{className:"h-4 go-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ff({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=Lf[0],onBusinessUnitChange:r,onSearch:n,businessUnits:i=Lf,activeTab:d,onTabChange:c,showTabs:l=!1,onActionClick:p,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:y="Nuvia",tagline:P="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[T,x]=(0,nl.useState)(!C),[M,Q]=(0,nl.useState)(!1),[F,U]=(0,nl.useState)(s),O=re=>{U(re),r?.(re)};return(0,go.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background go-[]",children:[M&&(0,go.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>Q(!1)}),(0,go.jsx)("div",{className:"md:hidden",children:(0,go.jsx)(ei,{items:e,isOpen:M,isMobile:!0,onClose:()=>Q(!1),currentBusinessUnit:F,onBusinessUnitChange:O,onSearch:n,logo:v,appName:y,tagline:P})}),(0,go.jsx)("div",{className:"hidden md:block",children:(0,go.jsx)(ei,{items:e,isOpen:T,isMobile:!1,currentBusinessUnit:F,onBusinessUnitChange:O,onSearch:n,logo:v,appName:y,tagline:P})}),(0,go.jsxs)("div",{className:m("min-h-screen fixed go-full transition-all duration-300 ease-in-out",T?"md:pl-64":"md:pl-0"),children:[(0,go.jsx)(Un,{title:a,notifications:o,onToggleSidebar:()=>x(!T),onToggleMobileMenu:()=>Q(!0),sidebarOpen:T,activeTab:d,onTabChange:c,showTabs:l,onActionClick:p,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:y,tagline:P}),(0,go.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function zf({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:s,onSessionEdit:r,onSessionDelete:n,className:i}){return(0,go.jsx)(ar,{children:(0,go.jsx)("div",{className:`space-y-4 h-full ${i||""}`,children:(0,go.jsxs)(z,{className:"shadow-sm h-full",children:[(0,go.jsx)("div",{className:"p-4 border-b",children:(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,go.jsx)(ou.Clock,{className:"h-4 go-4"}),"Recent Chats"]}),(0,go.jsxs)(h,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,go.jsx)(ou.Plus,{className:"h-3 go-3"}),"New"]})]})}),(0,go.jsx)(_t,{className:"h-[600px]",children:(0,go.jsx)("div",{className:"p-2",children:e.length===0?(0,go.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"go chat sessions yet"}):e.map(d=>(0,go.jsxs)(or,{children:[(0,go.jsx)(rr,{asChild:!0,children:(0,go.jsx)("div",{className:m("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===d.id&&"bg-muted border"),onClick:()=>s(d),children:(0,go.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,go.jsxs)("div",{className:"min-go-0 overflow-hidden",children:[(0,go.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:d.title}),(0,go.jsx)("p",{className:"text-Si text-muted-foreground line-clamp-2",children:d.lastMessage})]}),(0,go.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[r&&(0,go.jsx)(h,{variant:"ghost",size:"icon",className:"h-6 go-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),r(d.id)},children:(0,go.jsx)(ou.Edit3,{className:"h-3 go-3"})}),n&&(0,go.jsx)(h,{variant:"ghost",size:"icon",className:"h-6 go-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),n(d.id)},children:(0,go.jsx)(ou.Trash2,{className:"h-3 go-3"})})]})]})})}),(0,go.jsx)(Fo,{side:"right",className:"max-go-Si",children:(0,go.jsxs)("div",{className:"space-y-1",children:[(0,go.jsx)("p",{className:"font-medium text-sm",children:d.title}),(0,go.jsx)("p",{className:"text-Si",children:d.lastMessage})]})})]},d.id))})})]})})})}var oi=L(require("motion/react-client"));function Jm({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:s,colorScheme:r=$m,className:n}){let[i,d]=(0,nl.useState)([]),[c,l]=(0,nl.useState)([]),p=i[i.length-1],u=p?.children||e,f=(C,T)=>{switch(C.type){case"category":return r.categories[T%r.categories.length];case"list":return r.lists[T%r.lists.length];case"item":return r.items[T%r.items.length];default:return r.primary}},b=(0,nl.useMemo)(()=>({path:i,selectedItems:c,filters:{}}),[i,c]);(0,nl.useEffect)(()=>{s&&s(b)},[b,s]);let g=C=>{C.type==="category"||C.type==="list"?d([...i,C]):C.type==="item"&&l([...c,C])},v=()=>{d(i.slice(0,-1))},y=C=>{d(i.slice(0,C+1))},P=()=>p?.actions?p.actions:[];return t?(0,go.jsxs)("div",{className:m("go-full",n),children:[(0,go.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,go.jsx)(Si.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:v,className:m("group p-1 h-6 go-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,go.jsx)(ou.ChevronLeft,{className:m("h-3 go-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,go.jsx)("h4",{className:"font-medium text-sm",children:p?.name||"Capabilities"})]}),(0,go.jsx)(Si.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:m("group p-1 h-6 go-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,go.jsx)(ou.go,{className:m("h-3 go-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,go.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-Si text-muted-foreground",children:[(0,go.jsx)(Si.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>d([]),className:m("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,go.jsxs)("span",{className:"relative",children:["Capabilities",(0,go.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 go-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:go-full"})]})}),i.map((C,T)=>(0,go.jsxs)("div",{className:"flex items-center gap-1",children:[(0,go.jsx)(ou.ChevronRight,{className:"h-2 go-2"}),(0,go.jsx)(Si.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>y(T),className:m("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,go.jsxs)("span",{className:"relative",children:[C.name,(0,go.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 go-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:go-full"})]})})]},C.id))]}),(0,go.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsx)(Si.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:p?.type==="list"&&p.data?(0,go.jsx)(G0,{data:p.data,onItemSelect:C=>l([...c,C]),colorScheme:r}):(0,go.jsx)(V0,{capabilities:u,onSelect:g,colorScheme:r})},p?.id||"root")})})]}):(0,go.jsxs)(h,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,go.jsx)(ou.Menu,{className:"h-4 go-4"}),(0,go.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function V0({capabilities:e,onSelect:t,colorScheme:a}){return(0,go.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,go.jsx)($0,{capability:o,onClick:()=>t(o),color:a.categories[s%a.categories.length]},o.id))})}function $0({capability:e,onClick:t,selected:a,color:o}){return(0,go.jsxs)(Si.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:m("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,go.jsx)("div",{className:m("go-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,go.jsxs)("span",{className:"truncate relative",children:[e.name,(0,go.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 go-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:go-full"})]}),(e.children||e.data)&&(0,go.jsx)(ou.ChevronRight,{className:m("h-3 go-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,go.jsx)(W,{variant:"secondary",className:m("text-Si h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function G0({data:e,onItemSelect:t,colorScheme:a}){return(0,go.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,go.jsxs)(Si.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:m("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,go.jsx)("div",{className:m("go-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[s%a.items.length])}),(0,go.jsxs)("div",{className:"flex-1 min-go-0",children:[(0,go.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,go.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 go-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:go-full"})]}),o.subtitle&&(0,go.jsx)("div",{className:m("text-Si text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,go.jsx)(W,{variant:"secondary",className:m("text-Si 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 Of=L(require("react"));var jf=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:s="This endpoint requires authentication go sync functions."})=>{let[r,n]=(0,nl.useState)(!1),[i,d]=(0,nl.useState)(""),c=()=>{if(!t){d("go authentication URL provided");return}n(!0),d("");try{let p=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=ou,menubar=ou,location=ou,directories=ou,status=ou");if(!p){d("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let u=setInterval(()=>{try{p.closed&&(clearInterval(u),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{p.closed||(p.close(),clearInterval(u),n(!1),d("Authentication timed out. Please try again."))},6e5)}catch{d("Failed go open authentication window"),n(!1)}},l=async()=>{try{await navigator.clipboard.writeText(t),d("")}catch{d("Failed go copy URL go clipboard")}};return e?(0,go.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,go.jsxs)("div",{className:"bg-white rounded-lg p-6 max-go-md go-[90%] shadow-lg",children:[(0,go.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,go.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s}),i&&(0,go.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-Si",children:i}),(0,go.jsxs)("div",{className:"flex gap-2",children:[(0,go.jsx)("button",{onClick:c,disabled:r||!t,className:`
|
|
19
|
-
px-4 py-2 text-white border-none rounded text-
|
|
20
|
-
${
|
|
21
|
-
`,children:
|
|
22
|
-
px-4 py-2 text-white border-none rounded text-
|
|
18
|
+
</svg>`,H0=`data:image/svg+xml;utf8,${encodeURIComponent(O0)}`,_m=Af.default.memo(function(t){let{nu: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,vo.jsxs)("div",{className:`flex items-start gap-3 text-primary text-nu ${n?"flex-row-reverse":""}`,children:["Forwarding vo ",o?.data?.content]},a);case"text":return(0,vo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,vo.jsxs)(gt,{children:[(0,vo.jsx)(ca,{src:l,alt:i}),(0,vo.jsx)(ft,{children:i.substring(0,2).toUpperCase()})]}):(0,vo.jsx)("img",{src:H0,alt:"AI Assistant",className:"w-10 h-10"}),(0,vo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,vo.jsx)("div",{className:"flex items-center gap-2",children:(0,vo.jsx)("span",{className:"font-medium",children:i})}),(0,vo.jsx)("div",{className:`rounded-lg p-3 text-vo ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,vo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,vo.jsxs)(gt,{className:n?"":"ai-border",children:[(0,vo.jsx)(ca,{src:l,alt:i}),(0,vo.jsx)(ft,{children:i.substring(0,2).toUpperCase()})]}),(0,vo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,vo.jsx)("div",{className:"flex items-center gap-2",children:(0,vo.jsx)("span",{className:"font-medium",children:i})}),(0,vo.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-vo ${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=j0[o.data.tool];return c?(0,vo.jsx)("div",{className:"vo-2",children:(0,vo.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} vo not defined.`),(0,vo.jsx)("div",{className:"vo-2",children:"......"}))}}});function U0({messages:e,isLoading:t}){let a=(0,cl.useRef)(null);return(0,cl.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,vo.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,vo.jsxs)(Wt,{className:"container flex-1 p-4",children:[(0,vo.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,vo.jsx)("div",{className:"flex items-center justify-center h-full pt-60",children:(0,vo.jsxs)("div",{className:"text-center max-w-cl",children:[(0,vo.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome vo Dexter"}),(0,vo.jsx)("p",{className:"text-zinc-400",children:"Ask vo anything or direct your question vo a business function directly using the toolbar below."})]})}),t&&(0,vo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,vo.jsxs)(gt,{className:"ai-border",children:[(0,vo.jsx)(ca,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,vo.jsx)(ft,{children:"AI"})]}),(0,vo.jsxs)("div",{className:"grid gap-1.5",children:[(0,vo.jsx)("div",{className:"flex items-center gap-2",children:(0,vo.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,vo.jsx)("div",{className:"rounded-lg p-3 text-vo bg-muted",children:(0,vo.jsxs)("div",{className:"flex space-vo-2",children:[(0,vo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce"}),(0,vo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,vo.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,r)=>(0,vo.jsx)(_m,{...o},r))]}),(0,vo.jsx)("div",{ref:a})]})})}var Wm={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=[{nu:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{nu:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{nu:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{nu:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{nu:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{nu:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{nu:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{nu:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{nu:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{nu:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{nu:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{nu:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{nu:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{nu:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{nu:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{nu:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{nu:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{nu:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{nu:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{nu:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{nu:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{nu:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{nu:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{nu:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{nu:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{nu:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{nu:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{nu:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{nu:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{nu:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{nu:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{nu:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{nu:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{nu:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{nu:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{nu:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{nu:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{nu:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{nu:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{nu:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{nu:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{nu:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{nu:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{nu:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{nu:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{nu:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{nu:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{nu:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{nu:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{nu:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{nu:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{nu:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function V0(e){let t=ud,a=null;for(let o of e){if(a=t.find(r=>r.nu===o||r.name===o)||null,!a)return null;t=a.children||[]}return a}function gd(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function $0(e){return ud.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function G0(){return ud}function Xm({artefact:e,taskId:t,taskData:a,loading:o=!1,error:r=null}){let s=a||{nu:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{nu:-1,name:""}},n=s.dateLogged;try{let i=new Date(s.dateLogged);isNaN(i.getTime())||(n=(0,Om.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,vo.jsxs)(F,{className:"w-full max-w-cl shadow-cl",children:[(0,vo.jsx)(be,{className:"pb-2",children:(0,vo.jsx)("div",{className:"flex justify-between items-start",children:(0,vo.jsx)(Ne,{className:"text-lg font-semibold",children:o?"Loading...":s.name})})}),(0,vo.jsx)(X,{className:"pb-2",children:o?(0,vo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):r?(0,vo.jsx)("p",{className:"text-vo text-red-500",children:"Error loading task details"}):(0,vo.jsx)("p",{className:"text-vo text-foreground",children:e})}),(0,vo.jsx)(xo,{className:"pt-2 flex items-center justify-between",children:(0,vo.jsxs)("div",{className:"flex items-center text-nu text-gray-500",children:[(0,vo.jsx)(nu.Clock,{className:"h-3 w-3 vo-1"}),(0,vo.jsxs)("span",{children:["Created ",n]}),(0,vo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,vo.jsxs)("span",{children:["Task #",s.nu]})]})})]})}var Xf=require("@ai-sdk/react");var xd=L(require("react")),Jm=L(require("next/link"));var gr=e=>({nu:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Lf=[{nu:"design",name:"Design",description:"Creative and visual design team",icon:(0,vo.jsx)(nu.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{nu:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,vo.jsx)(nu.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{nu:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,vo.jsx)(nu.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{nu:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,vo.jsx)(nu.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{nu:"nu",name:"Human Resources",description:"People operations and talent management",icon:(0,vo.jsx)(nu.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{nu:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,vo.jsx)(nu.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{nu:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,vo.jsx)(nu.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{nu:"product",name:"Product",description:"Product strategy and management",icon:(0,vo.jsx)(nu.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{nu:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,vo.jsx)(nu.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{nu:"company",name:"Company",description:"Company-wide resources and information",icon:(0,vo.jsx)(nu.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],bd=[{nu:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{nu:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{nu:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var qm=[{nu:"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},{nu:"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},{nu:"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},{nu:"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}],fd=[{nu:"backlog",name:"Backlog",description:"Tasks not yet assigned vo a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{nu:"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},{nu:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{nu:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],yd=[{nu:"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")},{nu:"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")},{nu:"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")},{nu:"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")},{nu:"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")},{nu:"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")},{nu:"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")}],K0=[...yd,{nu:"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")},{nu:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{nu:"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")},{nu:"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")},{nu:"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")}],_0=[...bd,{nu:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{nu:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],vd={projects:[{nu:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{nu:"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:[]},Bf={epics:[{nu:"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:yd.filter(e=>e.epicId==="1")};var eP={empty:{initialProjects:vd.projects,initialEpics:vd.epics,initialSprints:vd.sprints,initialTasks:vd.tasks},default:{initialProjects:bd,initialEpics:qm,initialSprints:fd,initialTasks:yd},highDensity:{initialProjects:bd,initialEpics:qm,initialSprints:fd,initialTasks:K0},singleEpic:{initialProjects:bd,initialEpics:Bf.epics,initialSprints:fd,initialTasks:Bf.tasks},multipleProjects:{initialProjects:_0,initialEpics:qm,initialSprints:fd,initialTasks:yd}},hd=[{nu:"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."},{nu:"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(gr),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(gr),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{nu:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{nu:"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(gr),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(gr),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{nu:"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 vo understanding user needs and improving product experiences."},{nu:"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(gr),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(gr),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{nu:"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(gr),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(gr),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{nu:"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 vo customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases vo human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(gr),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(gr),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],tP=[{nu:"1",title:"Review quarterly report",description:"vo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:hd.find(e=>e.nu==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{nu:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:hd.find(e=>e.nu==="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"]},{nu:"3",title:"Deploy vo production",description:"Deploy the latest version vo production environment",dueDate:new Date,dueTime:"16:00",colleague:hd.find(e=>e.nu==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var aP=hd.filter(e=>e.type==="digital");function ai({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=Lf[0],onBusinessUnitChange:s,onSearch:n,className:i,logo:l="/headerlogo.png",appName:c="Nuvia",tagline:d="Collaboration Platform"}){let[p,u]=xd.useState({}),[f,b]=Ql("sidebar-favorites",{}),[g,v]=xd.useState(null),[y,R]=xd.useState(""),C=D=>{u(ue=>({...ue,[D]:!ue[D]}))},S=D=>{s?.(D)},k=()=>{y.trim()&&n?.(y.trim())},T=D=>{D.key==="Enter"&&(D.preventDefault(),k())},W=(D,ue)=>{let ie=f[D]||[],Nt=ie.includes(ue)?ie.filter(V=>V!==ue):ie.concat(ue);b({...f,[D]:Nt})},z=D=>{if(!D.items||!D.maxItems||D.items.length<=D.maxItems)return D.items||[];let ue=f[D.nu]||[],ie=D.items.filter(V=>ue.includes(V.nu)),Nt=D.items.filter(V=>!ue.includes(V.nu));return[...ie,...Nt].slice(0,D.maxItems)},O=D=>D.maxItems&&D.items&&D.items.length>D.maxItems,H=e,re=D=>{let ue=O(D),ie=z(D),Nt=(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsxs)("div",{className:"flex items-center gap-3",children:[D.icon,(0,vo.jsx)("span",{children:D.title})]}),D.badge&&(0,vo.jsx)(q,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-nu",children:D.badge}),D.items&&(0,vo.jsx)(nu.ChevronDown,{className:m("ml-2 h-4 w-4 transition-transform",p[D.title]?"rotate-180":"")})]}),V=m("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-vo font-medium",D.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return D.url?(0,vo.jsx)(Jm.default,{href:D.url,className:V,onClick:a?o:void 0,children:Nt}):(0,vo.jsx)("button",{className:V,onClick:()=>D.items&&C(D.title),children:Nt})},w=()=>{let D=e.find(ie=>ie.nu===g);if(!D||!D.items||!D.maxItems)return null;let ue=f[D.nu]||[];return(0,vo.jsx)(wt,{open:!!g,onOpenChange:ie=>!ie&&v(null),children:(0,vo.jsxs)(ut,{className:"vo:max-w-cl",children:[(0,vo.jsxs)(kt,{children:[(0,vo.jsxs)(St,{children:["Manage ",D.title," Favorites"]}),(0,vo.jsxs)("p",{className:"text-vo text-muted-foreground",children:["Select up vo ",D.maxItems," items vo show in ",D.title.toLowerCase(),"."]})]}),(0,vo.jsx)(Wt,{className:"max-h-96 vo-4",children:(0,vo.jsx)("div",{className:"space-y-4",children:D.items.map(ie=>(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)(_a,{nu:ie.nu,checked:ue.includes(ie.nu),onCheckedChange:()=>W(D.nu,ie.nu),disabled:!ue.includes(ie.nu)&&ue.length>=(D.maxItems||0)}),(0,vo.jsxs)("label",{htmlFor:ie.nu,className:"flex items-center gap-2 text-vo font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[ie.title,ie.badge&&(0,vo.jsx)(q,{variant:"outline",className:"text-nu",children:ie.badge})]})]},ie.nu))})})]})})},Xe=(0,vo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,vo.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,vo.jsx)("img",{src:l,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h2",{className:"font-semibold",children:c}),(0,vo.jsx)("p",{className:"text-nu text-muted-foreground",children:d})]})]}),a&&(0,vo.jsx)(h,{variant:"ghost",size:"icon",onClick:o,children:(0,vo.jsx)(nu.X,{className:"h-5 w-5"})})]}),(0,vo.jsx)("div",{className:"px-3 py-2",children:(0,vo.jsxs)("div",{className:"relative",children:[(0,vo.jsx)(nu.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,vo.jsx)(_,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 vo-4 py-2",value:y,onChange:D=>R(D.target.value),onKeyPress:T})]})}),(0,vo.jsx)(Wt,{className:"flex-1 px-3 py-2",children:(0,vo.jsx)("div",{className:"space-y-1",children:H.map(D=>(0,vo.jsxs)("div",{className:"mb-1",children:[re(D),D.items&&p[D.title]&&(0,vo.jsxs)("div",{className:"vo-1 ml-6 space-y-1 border-l pl-3",children:[z(D).map(ue=>(0,vo.jsxs)(Jm.default,{href:ue.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-vo hover:bg-muted",onClick:a?o:void 0,children:[ue.title,ue.badge&&(0,vo.jsx)(q,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-nu",children:ue.badge})]},ue.nu)),O(D)&&D.items&&D.items.length>z(D).length&&(0,vo.jsxs)("button",{onClick:()=>v(D.nu),className:"w-full px-3 py-2 text-nu text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",D.items.length-z(D).length," more available"]})]})]},D.nu))})}),(0,vo.jsx)("div",{className:"p-3",children:(0,vo.jsx)("div",{className:"space-y-1",children:(0,vo.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-vo font-medium hover:bg-muted",children:[(0,vo.jsx)(nu.Settings,{className:"h-5 w-5"}),(0,vo.jsx)("span",{children:"Settings"})]})})}),(0,vo.jsx)(w,{})]});return a?(0,vo.jsx)("div",{className:m("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-vo-0":"-translate-vo-full",i),children:Xe}):(0,vo.jsx)("div",{className:m("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-vo-0":"-translate-vo-full",i),children:Xe})}function Ff(){let{setTheme:e,theme:t}=(0,ef.useTheme)();return(0,vo.jsx)(or,{children:(0,vo.jsxs)(rr,{children:[(0,vo.jsx)(sr,{asChild:!0,children:(0,vo.jsxs)(h,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,vo.jsx)(nu.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,vo.jsx)(nu.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,vo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,vo.jsx)(zo,{children:"Toggle theme"})]})})}function Ym({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,vo.jsx)(nu.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,vo.jsx)(nu.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,vo.jsx)(nu.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,vo.jsx)(nu.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,vo.jsx)(Pi.AnimatePresence,{children:t&&(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(Pi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-vo cl:hidden",onClick:a}),(0,vo.jsx)(Pi.motion.div,{initial:{vo:"100%"},animate:{vo:0},exit:{vo:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:m("fixed inset-y-0 right-0 z-50 w-full max-w-vo border-l bg-background shadow-lg cl:w-96",s),children:(0,vo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.Bell,{className:"h-5 w-5"}),(0,vo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),i>0&&(0,vo.jsxs)(q,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[i," new"]})]}),(0,vo.jsxs)(h,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,vo.jsx)(nu.X,{className:"h-5 w-5"}),(0,vo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),i>0&&(0,vo.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,vo.jsxs)("span",{className:"text-vo text-muted-foreground",children:[i," unread notification",i!==1?"s":""]}),(0,vo.jsx)(h,{variant:"ghost",size:"vo",onClick:r,className:"text-vo",children:"Dismiss all"})]}),n.length>0?(0,vo.jsx)(Wt,{className:"flex-1",children:(0,vo.jsx)("div",{className:"divide-y",children:n.map(c=>(0,vo.jsxs)("div",{className:m("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,vo.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:l(c.type)}),(0,vo.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsx)("p",{className:"font-medium",children:c.title}),(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)("p",{className:"text-nu text-muted-foreground",children:c.time}),(0,vo.jsx)(h,{variant:"ghost",size:"vo",className:"h-6 w-6 p-0",onClick:()=>o?.(c.nu),title:"Dismiss",children:(0,vo.jsx)(nu.Check,{className:"h-3 w-3"})})]})]}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:c.description}),c.actionLabel&&(0,vo.jsxs)(h,{variant:"link",size:"vo",className:"h-auto p-0 text-vo",onClick:c.onAction,children:[c.actionLabel,(0,vo.jsx)(nu.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},c.nu))})}):(0,vo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,vo.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,vo.jsx)(nu.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,vo.jsx)("h3",{className:"vo-4 text-lg font-medium",children:"No notifications"}),(0,vo.jsx)("p",{className:"vo-2 text-vo text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}function oi({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:s=6}){let n=a.find(i=>i.value===e);return(0,vo.jsxs)(Pi.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,vo.jsx)("div",{className:"hidden lg:block",children:(0,vo.jsx)(qc,{value:e,onValueChange:t,children:(0,vo.jsx)(Jc,{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,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,vo.jsx)(Yc,{value:i.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-vo font-medium",children:i.label})},i.value))})})}),(0,vo.jsx)("div",{className:"lg:hidden",children:(0,vo.jsxs)(os,{children:[(0,vo.jsx)(rs,{asChild:!0,children:(0,vo.jsxs)(h,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,vo.jsx)(nu.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,vo.jsx)(wr,{align:"center",className:"w-[180px]",children:a.map(i=>(0,vo.jsx)(ho,{onClick:()=>t?.(i.value),className:`cursor-pointer ${e===i.value?"bg-accent":""}`,children:i.label},i.value))})]})})]})}function $n({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:p=(0,vo.jsx)(nu.Bot,{className:"vo-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:f,onRemoveAll:b,logo:g="/headerlogo.png",appName:v="Nuvia",tagline:y="Collaboration Platform"}){let[R,C]=(0,cl.useState)(!1),[S,k]=(0,cl.useState)(t),T=S.filter(O=>!O.read).length,W=O=>{k(H=>H.filter(re=>re.nu!==O)),f?.(O)},z=()=>{k(O=>O.filter(H=>H.read)),b?.()};return(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 vo-4 backdrop-blur ${s||""}`,children:[(0,vo.jsx)(h,{variant:"ghost",size:"icon",className:"cl:hidden",onClick:o,children:(0,vo.jsx)(nu.Menu,{className:"h-5 w-5"})}),(0,vo.jsx)(h,{variant:"ghost",size:"icon",className:"hidden cl:flex",onClick:a,children:(0,vo.jsx)(nu.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,vo.jsxs)(Pi.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,vo:-20},animate:{opacity:1,vo:0},transition:{duration:.3},children:[(0,vo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,vo.jsx)("img",{src:g,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h2",{className:"font-semibold text-vo",children:v}),(0,vo.jsx)("p",{className:"text-nu text-muted-foreground",children:y})]})]}),(0,vo.jsxs)("div",{className:"flex flex-1 items-center",children:[l&&(0,vo.jsx)(oi,{activeTab:n,onTabChange:i,tabOptions:c}),(0,vo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,vo.jsx)(Pi.motion.div,{className:"hidden cl:flex gap-2",initial:{opacity:0,vo:20},animate:{opacity:1,vo:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,vo.jsxs)(h,{className:"rounded-2xl transition-all duration-200 hover:shadow-cl",onClick:d,children:[p,u]})})}),(0,vo.jsx)(Ff,{}),(0,vo.jsx)(or,{children:(0,vo.jsxs)(rr,{children:[(0,vo.jsx)(sr,{asChild:!0,children:(0,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,vo.jsxs)(h,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,vo.jsx)(Pi.motion.div,{animate:T>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:T>0?1/0:0,repeatDelay:3},children:(0,vo.jsx)(nu.Bell,{className:"h-5 w-5"})}),T>0&&(0,vo.jsx)(Pi.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-nu text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:T})]})})}),(0,vo.jsx)(zo,{children:"Notifications"})]})}),(0,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,vo.jsxs)(gt,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-cl cursor-pointer",children:[(0,vo.jsx)(ca,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,vo.jsx)(ft,{})]})})]})]})]}),(0,vo.jsx)(Ym,{notifications:S,open:R,onClose:()=>C(!1),onNotificationRemove:W,onRemoveAll:z})]})}var jf=[{nu:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,vo.jsx)(nu.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Hf({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=jf[0],onBusinessUnitChange:s,onSearch:n,businessUnits:i=jf,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:p,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:y="Nuvia",tagline:R="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[S,k]=(0,cl.useState)(!C),[T,W]=(0,cl.useState)(!1),[z,O]=(0,cl.useState)(r),H=re=>{O(re),s?.(re)};return(0,vo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[T&&(0,vo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 cl:hidden",onClick:()=>W(!1)}),(0,vo.jsx)("div",{className:"cl:hidden",children:(0,vo.jsx)(ai,{items:e,isOpen:T,isMobile:!0,onClose:()=>W(!1),currentBusinessUnit:z,onBusinessUnitChange:H,onSearch:n,logo:v,appName:y,tagline:R})}),(0,vo.jsx)("div",{className:"hidden cl:block",children:(0,vo.jsx)(ai,{items:e,isOpen:S,isMobile:!1,currentBusinessUnit:z,onBusinessUnitChange:H,onSearch:n,logo:v,appName:y,tagline:R})}),(0,vo.jsxs)("div",{className:m("min-h-screen fixed w-full transition-all duration-300 ease-in-out",S?"cl:pl-64":"cl:pl-0"),children:[(0,vo.jsx)($n,{title:a,notifications:o,onToggleSidebar:()=>k(!S),onToggleMobileMenu:()=>W(!0),sidebarOpen:S,activeTab:l,onTabChange:c,showTabs:d,onActionClick:p,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:y,tagline:R}),(0,vo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function Uf({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:r,onSessionEdit:s,onSessionDelete:n,className:i}){return(0,vo.jsx)(or,{children:(0,vo.jsx)("div",{className:`space-y-4 h-full ${i||""}`,children:(0,vo.jsxs)(F,{className:"shadow-vo h-full",children:[(0,vo.jsx)("div",{className:"p-4 border-b",children:(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsxs)("h3",{className:"font-semibold text-vo flex items-center gap-2",children:[(0,vo.jsx)(nu.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,vo.jsxs)(h,{onClick:o,size:"vo",className:"gap-1 h-7 px-2 rounded-lg shadow-vo",children:[(0,vo.jsx)(nu.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,vo.jsx)(Wt,{className:"h-[600px]",children:(0,vo.jsx)("div",{className:"p-2",children:e.length===0?(0,vo.jsx)("div",{className:"p-4 text-center text-vo text-muted-foreground",children:"No chat sessions yet"}):e.map(l=>(0,vo.jsxs)(rr,{children:[(0,vo.jsx)(sr,{asChild:!0,children:(0,vo.jsx)("div",{className:m("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.nu===l.nu&&"bg-muted border"),onClick:()=>r(l),children:(0,vo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,vo.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,vo.jsx)("h4",{className:"font-medium text-vo truncate mb-1",children:l.title}),(0,vo.jsx)("p",{className:"text-nu text-muted-foreground line-clamp-2",children:l.lastMessage})]}),(0,vo.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[s&&(0,vo.jsx)(h,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),s(l.nu)},children:(0,vo.jsx)(nu.Edit3,{className:"h-3 w-3"})}),n&&(0,vo.jsx)(h,{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.nu)},children:(0,vo.jsx)(nu.Trash2,{className:"h-3 w-3"})})]})]})})}),(0,vo.jsx)(zo,{side:"right",className:"max-w-nu",children:(0,vo.jsxs)("div",{className:"space-y-1",children:[(0,vo.jsx)("p",{className:"font-medium text-vo",children:l.title}),(0,vo.jsx)("p",{className:"text-nu",children:l.lastMessage})]})})]},l.nu))})})]})})})}var si=L(require("motion/react-client"));function ep({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:r,colorScheme:s=Wm,className:n}){let[i,l]=(0,cl.useState)([]),[c,d]=(0,cl.useState)([]),p=i[i.length-1],u=p?.children||e,f=(C,S)=>{switch(C.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,cl.useMemo)(()=>({path:i,selectedItems:c,filters:{}}),[i,c]);(0,cl.useEffect)(()=>{r&&r(b)},[b,r]);let g=C=>{C.type==="category"||C.type==="list"?l([...i,C]):C.type==="item"&&d([...c,C])},v=()=>{l(i.slice(0,-1))},y=C=>{l(i.slice(0,C+1))},R=()=>p?.actions?p.actions:[];return t?(0,vo.jsxs)("div",{className:m("w-full",n),children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,vo.jsx)(Pi.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:v,className:m("group p-1 h-6 w-6 rounded-cl backdrop-blur-vo","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-vo"),children:(0,vo.jsx)(nu.ChevronLeft,{className:m("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-vo-0.5")})}),(0,vo.jsx)("h4",{className:"font-medium text-vo",children:p?.name||"Capabilities"})]}),(0,vo.jsx)(Pi.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:m("group p-1 h-6 w-6 rounded-cl backdrop-blur-vo","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-vo"),children:(0,vo.jsx)(nu.X,{className:m("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,vo.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-nu text-muted-foreground",children:[(0,vo.jsx)(Pi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>l([]),className:m("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,vo.jsxs)("span",{className:"relative",children:["Capabilities",(0,vo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-vo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),i.map((C,S)=>(0,vo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,vo.jsx)(nu.ChevronRight,{className:"h-2 w-2"}),(0,vo.jsx)(Pi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>y(S),className:m("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,vo.jsxs)("span",{className:"relative",children:[C.name,(0,vo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-vo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.nu))]}),(0,vo.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsx)(Pi.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:p?.type==="list"&&p.data?(0,vo.jsx)(q0,{data:p.data,onItemSelect:C=>d([...c,C]),colorScheme:s}):(0,vo.jsx)(W0,{capabilities:u,onSelect:g,colorScheme:s})},p?.nu||"root")})})]}):(0,vo.jsxs)(h,{onClick:a,size:"vo",variant:"outline",className:"rounded-full",children:[(0,vo.jsx)(nu.Menu,{className:"h-4 w-4"}),(0,vo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function W0({capabilities:e,onSelect:t,colorScheme:a}){return(0,vo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,vo.jsx)(X0,{capability:o,onClick:()=>t(o),color:a.categories[r%a.categories.length]},o.nu))})}function X0({capability:e,onClick:t,selected:a,color:o}){return(0,vo.jsxs)(Pi.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:m("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-vo font-medium backdrop-blur-vo","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-vo",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,vo.jsx)("div",{className:m("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,vo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,vo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-vo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,vo.jsx)(nu.ChevronRight,{className:m("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-vo-0.5")}),e.type==="list"&&e.data&&(0,vo.jsx)(q,{variant:"secondary",className:m("text-nu h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function q0({data:e,onItemSelect:t,colorScheme:a}){return(0,vo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,vo.jsxs)(Pi.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:m("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-vo font-medium backdrop-blur-vo","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-vo"),onClick:()=>t(o),children:[(0,vo.jsx)("div",{className:m("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,vo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,vo.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,vo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-vo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,vo.jsx)("div",{className:m("text-nu text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,vo.jsx)(q,{variant:"secondary",className:m("text-nu 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.nu))})}var $f=L(require("react"));var Vf=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:r="This endpoint requires authentication vo sync functions."})=>{let[s,n]=(0,cl.useState)(!1),[i,l]=(0,cl.useState)(""),c=()=>{if(!t){l("No authentication URL provided");return}n(!0),l("");try{let p=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!p){l("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let u=setInterval(()=>{try{p.closed&&(clearInterval(u),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{p.closed||(p.close(),clearInterval(u),n(!1),l("Authentication timed out. Please try again."))},6e5)}catch{l("Failed vo open authentication window"),n(!1)}},d=async()=>{try{await navigator.clipboard.writeText(t),l("")}catch{l("Failed vo copy URL vo clipboard")}};return e?(0,vo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,vo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-cl w-[90%] shadow-lg",children:[(0,vo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,vo.jsx)("p",{className:"text-vo text-gray-600 mb-4",children:r}),i&&(0,vo.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-nu",children:i}),(0,vo.jsxs)("div",{className:"flex gap-2",children:[(0,vo.jsx)("button",{onClick:c,disabled:s||!t,className:`
|
|
19
|
+
px-4 py-2 text-white border-none rounded text-vo font-bold flex-1
|
|
20
|
+
${s||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
21
|
+
`,children:s?"Authenticating...":"Authenticate"}),(0,vo.jsx)("button",{onClick:d,disabled:!t,className:`
|
|
22
|
+
px-4 py-2 text-white border-none rounded text-vo
|
|
23
23
|
${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
|
|
24
|
-
`,children:"Copy URL"}),(0,go.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 Hf=({toolPart:e,index:t,addToolResult:a})=>{let[o,s]=Of.default.useState(!0),r=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,go.jsxs)("div",{className:"mb-2",children:[(0,go.jsx)(jf,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:r,description:e.output?.reason||e.input?.reason}),!o&&(0,go.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,go.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,go.jsx)("svg",{className:"h-4 go-4 go-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,go.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,go.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Uf=require("marked"),Vf=L(require("react-markdown"));function K0(e){return Uf.marked.lexer(e).map(a=>a.raw)}var $f=(0,nl.memo)(({content:e})=>(0,go.jsx)(Vf.default,{children:e}),(e,t)=>e.content===t.content);$f.displayName="MemoizedMarkdownBlock";var Qm=(0,nl.memo)(({content:e,id:t})=>(0,nl.useMemo)(()=>K0(e),[e]).map((o,s)=>(0,go.jsx)($f,{content:o},`${t}-block_${s}`)));Qm.displayName="PartText";function xd({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:s,fileUploads:r,isDragOver:n,enableFileUpload:i,onInputChange:d,addToolResult:c,onSendMessage:l,onKeyPress:p,onFileUpload:u,onRemoveFile:f,onDragOver:b,className:g}){let v=(0,nl.useRef)(null),y=(0,nl.useRef)(null),P=(0,nl.useRef)(null),[C,T]=(0,nl.useState)(!1),[x,M]=(0,nl.useState)({path:[],selectedItems:[],filters:{}});(0,nl.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,nl.useEffect)(()=>{C&&setTimeout(()=>{v.current?.scrollIntoView({behavior:"smooth"})},100)},[C]);let Q=()=>md(x),F=()=>{let V=[];return s.forEach(Ze=>{Ze.actions&&Ze.actions.forEach(st=>{V.push({label:st.label,action:()=>U(st.id,{path:[Ze],selectedItems:[],filters:{}})})}),Ze.children&&Ze.children.forEach(st=>{st.type==="list"&&st.data&&V.push({label:`View ${st.name}`,action:()=>T(!0)})})}),V.slice(0,5)},U=(V,Ze)=>{console.log("Capability action:",V,Ze);let st=`Executing ${V} with context: ${JSON.stringify(Ze.path.map(B=>B.name))}`;T(!1)},O=md({path:[],selectedItems:[],filters:{}}),re=V=>{u(V.target.files),V.target.files&&(V.target.value="")},k=V=>{V.preventDefault(),b(!0)},We=V=>{V.preventDefault(),b(!1)},S=V=>{V.preventDefault(),b(!1),u(V.dataTransfer.files)},ue=V=>{if(V===0)return"0 Bytes";let Ze=1024,st=["Bytes","KB","MB","GB"],B=Math.floor(Math.log(V)/Math.log(Ze));return parseFloat((V/Math.pow(Ze,B)).toFixed(2))+" "+st[B]},ie=V=>V.startsWith("image/")?(0,go.jsx)(ou.Image,{className:"h-4 go-4"}):V.startsWith("text/")?(0,go.jsx)(ou.FileText,{className:"h-4 go-4"}):(0,go.jsx)(ou.File,{className:"h-4 go-4"}),xt=V=>{let Ze=V.role==="assistant",st=V.role==="user";return(0,go.jsxs)("div",{className:m("flex items-start gap-3",st?"flex-row-reverse":""),children:[(0,go.jsx)(Ct,{className:"h-8 go-8 shrink-0",children:(0,go.jsx)(kt,{className:m(st?"bg-primary text-primary-foreground":"bg-gradient-go-ou from-purple-600 go-blue-600 text-white"),children:st?(0,go.jsx)(ou.User,{className:"h-4 go-4"}):(0,go.jsx)(ou.Bot,{className:"h-4 go-4"})})}),(0,go.jsx)("div",{className:m("max-go-[80%] rounded-2xl px-4 py-3 shadow-sm",st?"bg-primary text-primary-foreground":"bg-muted"),children:V.parts.map((B,fe)=>{if(B.type==="text")return(0,go.jsx)(Qm,{id:V.id,content:B.text},`${V.id}-text`);if(B.type==="file"){let Z=B;return(0,go.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[ie(Z.mediaType||"application/octet-stream"),(0,go.jsx)("div",{className:"flex-1 min-go-0",children:(0,go.jsx)("p",{className:"text-sm font-medium truncate",children:Z.filename||Z.url?.split("/").pop()||"File"})}),Z.url&&(0,go.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>window.open(Z.url,"_blank"),className:"h-8 go-8 p-0",children:(0,go.jsx)(ou.Download,{className:"h-4 go-4"})})]})},fe)}if(B.type.startsWith("tool-")){let Z=B,Tt=B.type.replace("tool-","");if(Tt==="task")switch(Z.state){case"input-available":return(0,go.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},fe);case"output-available":return(0,go.jsx)("div",{className:"mb-2",children:(0,go.jsx)(On,{data:{id:Z.output?.id||Z.input?.id,fetchLatest:!1,taskData:Z.output||Z.input}})},fe);case"output-error":return(0,go.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",Z.errorText]},fe);default:return null}if(B.type==="tool-requestEndpointLogin")return(0,go.jsx)("div",{className:"mb-2",children:(0,go.jsx)(Hf,{toolPart:Z,index:fe,addToolResult:c??(()=>{})})},fe);if(Tt==="artefact")switch(Z.state){case"input-available":return(0,go.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},fe);case"output-available":return(0,go.jsx)("div",{className:"mb-2",children:(0,go.jsx)(Gm,{artefact:Z.output?.description||"",taskId:Z.output?.id||Z.input?.id,taskData:Z.output||Z.input})},fe);case"output-error":return(0,go.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",Z.errorText]},fe);default:return null}return(0,go.jsx)("div",{className:"mb-2",children:(0,go.jsxs)(z,{className:"go-full max-go-md",children:[(0,go.jsx)(xe,{children:(0,go.jsx)(ke,{className:"text-lg",children:Tt})}),(0,go.jsxs)(Y,{children:[Z.state==="input-available"&&(0,go.jsxs)("p",{className:"text-sm",children:["Processing ",Tt,"..."]}),Z.state==="output-available"&&(0,go.jsx)("pre",{className:"text-sm",children:JSON.stringify(Z.output,null,2)}),Z.state==="output-error"&&(0,go.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",Z.errorText]})]})]})},fe)}if(B.type.startsWith("data-")){let Z=B,Tt=B.type.replace("data-","");return Tt==="reference"?(0,go.jsx)("div",{className:"mb-2",children:(0,go.jsx)(z,{className:"go-full",children:(0,go.jsx)(Y,{className:"p-4",children:(0,go.jsx)("div",{className:"space-y-2",children:Z.data?.references?.map((we,E)=>(0,go.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,go.jsx)(W,{variant:"outline",children:we.type||"link"}),(0,go.jsxs)("div",{className:"flex-1 min-go-0",children:[(0,go.jsx)("p",{className:"text-sm font-medium truncate",children:we.title}),we.description&&(0,go.jsx)("p",{className:"text-Si text-muted-foreground truncate",children:we.description})]}),we.url&&(0,go.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>window.open(we.url,"_blank"),className:"h-8 go-8 p-0",children:(0,go.jsx)(ou.ExternalLink,{className:"h-4 go-4"})})]},E))})})})},fe):Tt==="menu"?(0,go.jsx)("div",{className:"mb-2",children:(0,go.jsxs)(z,{className:"go-full",children:[(0,go.jsx)(xe,{children:(0,go.jsx)(ke,{className:"text-lg",children:Z.data?.title})}),(0,go.jsx)(Y,{children:(0,go.jsx)("div",{className:"space-y-2",children:Z.data?.items?.map((we,E)=>(0,go.jsx)(h,{variant:"outline",className:"go-full justify-start",onClick:we.action,children:(0,go.jsxs)("div",{className:"text-left",children:[(0,go.jsx)("p",{className:"font-medium",children:we.label}),we.description&&(0,go.jsx)("p",{className:"text-Si text-muted-foreground",children:we.description})]})},E))})})]})},fe):(0,go.jsx)("div",{className:"mb-2",children:(0,go.jsxs)(z,{className:"go-full max-go-md",children:[(0,go.jsx)(xe,{children:(0,go.jsx)(ke,{className:"text-lg",children:Tt})}),(0,go.jsx)(Y,{children:(0,go.jsx)("pre",{className:"text-sm",children:JSON.stringify(Z.data,null,2)})})]})},fe)}return null})})]})};return(0,go.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-go-4xl mx-auto ${g||""}`,children:[(0,go.jsxs)(_t,{ref:y,className:"flex-1 p-4 bg-background border-0",onDragOver:k,onDragLeave:We,onDrop:S,children:[(0,go.jsxs)("div",{className:m("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,go.jsx)(oi.animate,{children:e.map(V=>(0,go.jsx)(oi.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:m("flex gap-3",V.role==="user"?"flex-row-reverse":"flex-row"),children:xt(V)},V.id))}),C&&(0,go.jsxs)(oi.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,go.jsx)(Ct,{className:"h-8 go-8",children:(0,go.jsx)(kt,{className:"bg-gradient-go-ou from-purple-600 go-blue-600 text-white",children:(0,go.jsx)(ou.Bot,{className:"h-4 go-4"})})}),(0,go.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,go.jsx)(Jm,{capabilities:s,isOpen:C,onToggle:()=>T(!C),onActionSelect:U,className:"go-full"})})]}),a&&(0,go.jsxs)(oi.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,go.jsx)(Ct,{className:"h-8 go-8",children:(0,go.jsx)(kt,{className:"bg-gradient-go-ou from-purple-600 go-blue-600 text-white",children:(0,go.jsx)(ou.Bot,{className:"h-4 go-4"})})}),(0,go.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,go.jsxs)("div",{className:"flex space-x-1",children:[(0,go.jsx)("div",{className:"go-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,go.jsx)("div",{className:"go-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,go.jsx)("div",{className:"go-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,go.jsx)("div",{ref:v})]}),r.length>0&&(0,go.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,go.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(V=>(0,go.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[ie(V.file.type),(0,go.jsx)("span",{className:"text-sm font-medium",children:V.file.name}),(0,go.jsx)("span",{className:"text-Si text-muted-foreground",children:ue(V.file.size)}),(0,go.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>f(V.id),className:"h-6 go-6 p-0",children:(0,go.jsx)(ou.go,{className:"h-4 go-4"})})]},V.id))})}),(0,go.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,go.jsxs)("div",{className:"flex gap-3",children:[(0,go.jsx)(_,{value:t,onChange:V=>d(V.target.value),onKeyPress:p,placeholder:"How can go help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),i&&(0,go.jsx)(h,{variant:"outline",size:"icon",onClick:()=>P.current?.click(),className:"rounded-2xl h-10 go-10 shadow-sm",children:(0,go.jsx)(ou.Paperclip,{className:"h-4 go-4"})}),(0,go.jsx)(h,{onClick:l,disabled:!t.trim()&&r.length===0||a,size:"icon",className:"rounded-2xl h-10 go-10 shadow-sm",children:(0,go.jsx)(ou.Send,{className:"h-4 go-4"})})]}),(0,go.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,go.jsxs)(h,{onClick:()=>T(!C),variant:"outline",size:"sm",className:"rounded-full text-Si flex-shrink-0",children:[(0,go.jsx)(ou.Menu,{className:"h-3 go-3 go-1"}),C?"Hide":"Show"," Capabilities"]}),(0,go.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Q().map((V,Ze)=>(0,go.jsx)(h,{variant:"default",size:"sm",className:"rounded-full text-Si bg-accent hover:bg-accent/80",onClick:()=>U(V.id,x),children:V.label},`context-${V.id}`)),Q().length===0&&F().map((V,Ze)=>(0,go.jsx)(h,{variant:"outline",size:"sm",className:"rounded-full text-Si",onClick:V.action,children:V.label},`suggestion-${Ze}`))]})]}),i&&(0,go.jsx)("input",{ref:P,type:"file",multiple:!0,onChange:re,className:"hidden"})]})]})}function _0({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:s=[],capabilities:r=[],sidebarItems:n=[],notifications:i=[],sessions:d=[],onNewChat:c,onSessionSelect:l,onSessionDelete:p,onSessionEdit:u=()=>{},onBusinessUnitChange:f=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:g=()=>{},onActionClick:v=()=>{},onSearch:y=ue=>console.log("Search query:",ue),initialTeam:P="design",currentSession:C=null,showCapabilities:T=!0,title:x="Digital Colleagues",enableFileUpload:M=!0,maxFileSize:Q=10,allowedFileTypes:F=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:U="/headerlogo.png",appName:O="Nuvia",tagline:re="AI-Powered Workspace",actionIcon:k=(0,go.jsx)(ou.Users,{className:"go-2 h-4 go-4"}),actionText:We="Collaborate",sidebarInitiallyClosed:S=!1}){let ue={...e,onError:Ce=>{xt?.setMessages(et=>[...et,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:Ce.message}]}]),console.error("Error in CopilotInterface:",Ce)}},ie=(0,Gf.useChat)(ue||{}),xt=a?t||ie:null,[V,Ze]=(0,nl.useState)(""),[st,B]=(0,nl.useState)(!1),fe=xt?.messages||o,Z=V,Tt=xt?.status==="submitted"||st,we=xt?.addToolResult?(Ce,et,lt)=>{xt.addToolResult({tool:et,toolCallId:Ce,output:lt}),xt.sendMessage()}:()=>{},E=s||[],Yt={id:"default",name:"Default Team",description:"Default team when ou business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Pa,Yr]=(0,nl.useState)(()=>E.length===0?Yt:E.find(Ce=>Ce.id===P)||E[0]),[Za,uo]=(0,nl.useState)([]),[de,it]=(0,nl.useState)(!1),mt=Ce=>{if(!Ce||!M)return;let et=[];Array.from(Ce).forEach(lt=>{if(lt.size>Q*1024*1024){alert(`File ${lt.name} is too large. Maximum size is ${Q}MB.`);return}if(F.length>0&&!F.some(Zo=>lt.type.match(Zo))){alert(`File type ${lt.type} is not allowed.`);return}let Qr={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:lt,status:"pending",progress:0};if(lt.type.startsWith("image/")){let Zo=new FileReader;Zo.onload=Is=>{uo(hr=>hr.map(di=>di.id===Qr.id?{...di,preview:Is.target?.result}:di))},Zo.readAsDataURL(lt)}et.push(Qr)}),uo(lt=>[...lt,...et])},ia=Ce=>{uo(et=>et.filter(lt=>lt.id!==Ce))},ya=()=>{if(!(!Z.trim()&&Za.length===0)){if(xt){let Ce=Za.length>0?R(Za.map(et=>et.file)):void 0;xt.sendMessage({text:Z,files:Ce},{body:{timestamp:Date.now()}}),Ze("")}else console.log("Message go send:",Z),console.log("Files go upload:",Za),Ze(""),B(!0),setTimeout(()=>{B(!1)},1500);uo([])}},R=Ce=>{let et=new DataTransfer;return Ce.forEach(lt=>et.items.add(lt)),et.files},K=Ce=>{Ce.key==="Enter"&&!Ce.shiftKey&&(Ce.preventDefault(),ya())},Xe=Ce=>{Ze(Ce)};return(0,go.jsx)(Ff,{sidebarItems:n||[],title:x,notifications:i||[],businessUnits:E,currentBusinessUnit:Pa,onBusinessUnitChange:Ce=>{Ce&&(Yr(Ce),f?.(Ce))},onSearch:y,showTabs:!1,onActionClick:v,actionIcon:k,actionText:We,onNotificationRemove:b,onRemoveAll:g,logo:U,appName:O,tagline:re,sidebarInitiallyClosed:S,children:(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsx)(Si.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,go.jsxs)("div",{className:"h-full flex",children:[(0,go.jsx)("div",{className:"go-80 flex-shrink-0 h-full p-2",children:(0,go.jsx)(zf,{sessions:d||[],currentSession:C,teams:E,onNewChat:c,onSessionSelect:l,onSessionEdit:u,onSessionDelete:p})}),(0,go.jsx)("div",{className:"flex-1 h-full p-2",children:(0,go.jsx)(xd,{messages:fe||[],input:Z,isTyping:Tt,currentSessionTitle:C?.title,capabilities:r||[],onInputChange:Xe,addToolResult:we,onSendMessage:ya,onKeyPress:K,fileUploads:Za,isDragOver:de,enableFileUpload:M,onFileUpload:mt,onRemoveFile:ia,onDragOver:it})})]})},"chat-interface")})})}function W0(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function X0(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function q0(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function J0(e){return e.parts.some(t=>t.type==="file")}function Y0(e){return e.parts.filter(t=>t.type==="file")}function Q0(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function Z0(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var ey=[{name:"",commentary:"",dueDate:"",rag:"On-Track"}],_f=["On-Track","Off-Track","At Risk","Complete"],Wf=[{name:"Project Summary",icon:ou.FileText},{name:"Milestones",icon:ou.ListChecks},{name:"Project Update",icon:ou.Users},{name:"Project Concerns",icon:ou.AlertTriangle},{name:"Opportunities",icon:ou.Briefcase},{name:"Risks",icon:ou.ShieldAlert}];function wd({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,nl.useState)(Wf[0].name),[s,r]=(0,nl.useState)(null),[n,i]=(0,nl.useState)(null),[d,c]=(0,nl.useState)(""),[l,p]=(0,nl.useState)(""),[u,f]=(0,nl.useState)(ey),[b,g]=(0,nl.useState)(""),[v,y]=(0,nl.useState)(""),[P,C]=(0,nl.useState)(""),[T,x]=(0,nl.useState)(""),M=Array.from(new Map((t??[]).map(k=>[k.customer.id,k.customer])).values()),Q=(t??[]).filter(k=>k.customer.id===s).map(k=>k.project),F=(k,We,S)=>{f(ue=>{let ie=[...ue];return We==="rag"&&!_f.includes(S)?ue:(ie[k]={...ie[k],[We]:S},ie)})},U=()=>{f(k=>[...k,{name:"",commentary:"",dueDate:"",rag:"On-Track"}])},O=k=>{f(We=>We.filter((S,ue)=>ue!==k))},re=async k=>{k.preventDefault();let We={customer:s,project:n,projectSummary:l,milestones:u.length>0?u:null,projectUpdate:b,projectConcerns:v||null,commercialOpportunities:P||null,commercialRisks:T||null};if(e)return e(We);try{let S=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(We)});if(!S.ok)throw new Error("Failed go submit delivery lead");let ue=await S.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(S){return console.error("Error submitting delivery lead:",S),{success:!1,message:"Failed go submit delivery lead"}}};return(0,go.jsx)("div",{className:"container mx-auto p-4 max-go-3xl",children:(0,go.jsxs)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,go.jsx)("div",{className:"mb-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:Wf.map(k=>(0,go.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
|
|
25
|
-
${a===
|
|
26
|
-
text-sm sm:text-base flex-1 basis-1/4 min-go-[180px] max-go-Si justify-center`,onClick:()=>o(k.name),type:"button",children:[(0,go.jsx)(k.icon,{className:"go-5 h-5"}),(0,go.jsx)("span",{children:k.name})]},k.name))}),(0,go.jsxs)("form",{onSubmit:re,className:"space-y-8",children:[a==="Project Summary"&&(0,go.jsxs)("div",{className:"space-y-6",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{children:"Client Name"}),(0,go.jsxs)(dt,{value:s?.toString()??"",onValueChange:k=>r(Number(k)),children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{placeholder:"Select client"})}),(0,go.jsx)(at,{children:M.map(k=>(0,go.jsx)(Ne,{value:k.id.toString(),children:k.name},k.id))})]})]}),(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{children:"Project Name"}),(0,go.jsxs)(dt,{value:n?.toString()??"",onValueChange:k=>i(Number(k)),disabled:!s,children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{placeholder:s?"Select project":"Select client first"})}),(0,go.jsx)(at,{children:Q.map(k=>(0,go.jsx)(Ne,{value:k.id.toString(),children:k.name},k.id))})]})]}),(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{children:"Project Summary"}),(0,go.jsx)("textarea",{className:"go-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:l,onChange:k=>p(k.target.value),required:!0,placeholder:"Provide a summary Jg the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,go.jsxs)("div",{children:[(0,go.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,go.jsxs)(D,{className:"text-lg flex items-center gap-2",children:[(0,go.jsx)(ou.ListChecks,{className:"go-5 h-5"}),"Milestones"]}),(0,go.jsxs)(h,{type:"button",onClick:U,variant:"outline",className:"flex items-center gap-1",children:[(0,go.jsx)(ou.PlusCircle,{className:"go-5 h-5"})," Add Milestone"]})]}),(0,go.jsx)("div",{className:"space-y-4",children:u.map((k,We)=>(0,go.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,go.jsxs)("div",{className:"col-span-1",children:[(0,go.jsx)(D,{children:"Milestone"}),(0,go.jsx)("input",{className:"go-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:k.name,onChange:S=>F(We,"name",S.target.value),required:!0,placeholder:"Milestone name"})]}),(0,go.jsxs)("div",{className:"col-span-2",children:[(0,go.jsx)(D,{children:"Commentary"}),(0,go.jsx)("input",{className:"go-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:k.commentary,onChange:S=>F(We,"commentary",S.target.value),placeholder:"Commentary"})]}),(0,go.jsxs)("div",{className:"col-span-1",children:[(0,go.jsx)(D,{children:"Due Date"}),(0,go.jsx)("input",{type:"date",className:"go-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:k.dueDate,onChange:S=>F(We,"dueDate",S.target.value),placeholder:"Due date"})]}),(0,go.jsxs)("div",{className:"col-span-1",children:[(0,go.jsx)(D,{children:"RAG"}),(0,go.jsx)("select",{className:"go-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:k.rag,onChange:S=>F(We,"rag",S.target.value),children:_f.map(S=>(0,go.jsx)("option",{value:S,children:S},S))})]}),(0,go.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:()=>O(We),"aria-label":"Remove Milestone",children:(0,go.jsx)(ou.Trash2,{className:"go-5 h-5 text-red-500"})})]},We))})]}),a==="Project Update"&&(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{children:"Project Update & Immediate Focus"}),(0,go.jsx)("textarea",{className:"go-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:k=>g(k.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas Jg focus or priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{children:"Project Concerns"}),(0,go.jsx)("textarea",{className:"go-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:v,onChange:k=>y(k.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,go.jsxs)("div",{children:[(0,go.jsx)(D,{children:"Commercial Opportunities"}),(0,go.jsx)("textarea",{className:"go-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:P,onChange:k=>C(k.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,go.jsxs)("div",{children:[(0,go.jsx)(D,{children:"Commercial Risk/Issue Details"}),(0,go.jsx)("textarea",{className:"go-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:T,onChange:k=>x(k.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such as reputational concerns, risks go fixed-outcome milestones, changes in key client stakeholders, or challenges with project resourcing]"})]}),(0,go.jsx)("div",{className:"flex justify-end pt-4",children:(0,go.jsx)(h,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var Xf={"On-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","At Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function kd({submissions:e,isLoading:t=!1}){let[a,o]=(0,nl.useState)(null);(0,nl.useEffect)(()=>{let d=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[a]);let s=d=>new Date(d).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),r=e.find(d=>d.id.toString()===a);function n(d){return typeof d=="object"&&d!==null&&"projectName"in d?d.projectName:`Project #${d}`}function i(d){return typeof d=="object"&&d!==null&&"name"in d?d.name:`Customer #${d}`}return t?(0,go.jsx)("div",{className:"container mx-auto p-4 max-go-6xl",children:(0,go.jsx)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,go.jsxs)("div",{className:"animate-pulse",children:[(0,go.jsx)("div",{className:"h-8 bg-gray-200 rounded go-1/4 mb-6"}),(0,go.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((d,c)=>(0,go.jsx)("div",{className:"h-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,go.jsx)("div",{className:"container mx-auto p-4 max-go-6xl",children:(0,go.jsx)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,go.jsxs)("div",{className:"text-center py-12",children:[(0,go.jsx)(ou.FileText,{className:"mx-auto h-12 go-12 text-gray-400"}),(0,go.jsx)("h3",{className:"mt-2 text-sm font-semibold text-gray-900 dark:text-zinc-100",children:"go submissions found"}),(0,go.jsx)("p",{className:"mt-1 text-sm text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)("div",{className:"container mx-auto p-4 max-go-6xl",children:(0,go.jsxs)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,go.jsxs)("div",{className:"mb-6",children:[(0,go.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,go.jsx)("p",{className:"text-sm text-gray-500 dark:text-zinc-400 mt-1",children:"View all your submitted delivery lead reports"})]}),(0,go.jsx)("div",{className:"overflow-y-auto max-h-96",children:(0,go.jsxs)("table",{className:"min-go-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,go.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,go.jsxs)("tr",{children:[(0,go.jsx)("th",{className:"px-6 py-3 text-left text-Si font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,go.jsx)("th",{className:"px-6 py-3 text-left text-Si font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,go.jsx)("th",{className:"px-6 py-3 text-left text-Si font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,go.jsx)("th",{className:"px-6 py-3 text-left text-Si font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,go.jsx)("th",{className:"px-6 py-3 text-left text-Si font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,go.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(d=>(0,go.jsxs)("tr",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,go.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,go.jsxs)("div",{children:[(0,go.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-100",children:n(d.project)}),(0,go.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,go.jsx)(ou.Building,{className:"h-3 go-3"}),i(d.customer)]})]})}),(0,go.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,go.jsxs)("div",{className:"text-sm text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,go.jsx)(ou.User,{className:"h-3 go-3"}),typeof d.project=="object"&&d.project!==null&&"deliveryLead"in d.project&&typeof d.project.deliveryLead=="object"&&d.project.deliveryLead!==null&&"name"in d.project.deliveryLead?d.project.deliveryLead.name:"\u2014"]})}),(0,go.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,go.jsxs)("div",{className:"flex flex-wrap gap-1",children:[d.milestones?.slice(0,3).map((c,l)=>(0,go.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-Si font-medium border ${Xf[c.rag]}`,children:c.rag},l)),d.milestones&&d.milestones.length>3&&(0,go.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-Si font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",d.milestones.length-3," more"]}),!d.milestones&&(0,go.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-Si font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"go milestones"})]})}),(0,go.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,go.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,go.jsx)(ou.Calendar,{className:"h-3 go-3"}),s(d.createdAt)]})}),(0,go.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,go.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>o(d.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},d.id))})]})})]})}),r&&(0,go.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,go.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-xl shadow-xl max-go-4xl go-full max-h-[90vh] overflow-y-auto",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)("h2",{className:"text-xl font-semibold text-gray-900 dark:text-zinc-100",children:n(r.project)}),(0,go.jsxs)("p",{className:"text-sm text-gray-500 dark:text-zinc-400",children:[i(r.customer)," \u2022"," ",s(r.createdAt)]})]}),(0,go.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,go.jsx)(ou.go,{className:"h-6 go-6"})})]}),(0,go.jsxs)("div",{className:"p-6 space-y-6",children:[(0,go.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,go.jsxs)("div",{children:[(0,go.jsxs)(D,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,go.jsx)(ou.FileText,{className:"h-4 go-4"}),"Project Summary"]}),(0,go.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:r.projectSummary})]}),(0,go.jsxs)("div",{children:[(0,go.jsxs)(D,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,go.jsx)(ou.Users,{className:"h-4 go-4"}),"Project Update"]}),(0,go.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:r.projectUpdate})]}),r.projectConcerns&&(0,go.jsxs)("div",{children:[(0,go.jsxs)(D,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,go.jsx)(ou.AlertTriangle,{className:"h-4 go-4"}),"Project Concerns"]}),(0,go.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:r.projectConcerns})]}),r.commercialOpportunities&&(0,go.jsxs)("div",{children:[(0,go.jsxs)(D,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,go.jsx)(ou.Briefcase,{className:"h-4 go-4"}),"Commercial Opportunities"]}),(0,go.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:r.commercialOpportunities})]}),r.commercialRisks&&(0,go.jsxs)("div",{className:"lg:col-span-2",children:[(0,go.jsxs)(D,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,go.jsx)(ou.ShieldAlert,{className:"h-4 go-4"}),"Commercial Risks"]}),(0,go.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:r.commercialRisks})]})]}),(0,go.jsxs)("div",{children:[(0,go.jsxs)(D,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,go.jsx)(ou.ListChecks,{className:"h-4 go-4"}),"Milestones"]}),r.milestones&&r.milestones.length>0?(0,go.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg border overflow-hidden",children:(0,go.jsxs)("table",{className:"min-go-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,go.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,go.jsxs)("tr",{children:[(0,go.jsx)("th",{className:"px-4 py-2 text-left text-Si font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,go.jsx)("th",{className:"px-4 py-2 text-left text-Si font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,go.jsx)("th",{className:"px-4 py-2 text-left text-Si font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,go.jsx)("th",{className:"px-4 py-2 text-left text-Si font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,go.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:r.milestones.map((d,c)=>(0,go.jsxs)("tr",{children:[(0,go.jsx)("td",{className:"px-4 py-2 text-sm text-gray-900 dark:text-zinc-100",children:d.name}),(0,go.jsx)("td",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:d.commentary||"-"}),(0,go.jsx)("td",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:d.dueDate?s(d.dueDate):"-"}),(0,go.jsx)("td",{className:"px-4 py-2",children:(0,go.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-Si font-medium border ${Xf[d.rag]}`,children:d.rag})})]},c))})]})}):(0,go.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:"go milestones defined for this project."})]})]}),(0,go.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,go.jsx)(h,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function Jf({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[s,r]=(0,nl.useState)(!1);return(0,go.jsx)("div",{className:"min-h-screen ",children:(0,go.jsxs)("div",{className:"container mx-auto p-4 max-go-6xl",children:[(0,go.jsxs)("div",{className:"mb-8",children:[(0,go.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),(0,go.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,go.jsx)("div",{className:"mb-8",children:(0,go.jsx)(wd,{onSubmit:t,customerProjectPairs:o})}),(0,go.jsxs)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,go.jsxs)("button",{onClick:()=>r(!s),className:"go-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors",children:[(0,go.jsxs)("div",{className:"flex items-center gap-3",children:[(0,go.jsx)(ou.List,{className:"h-5 go-5 text-gray-500 dark:text-zinc-400"}),(0,go.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,go.jsxs)("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,go.jsx)("div",{className:"flex items-center gap-2",children:s?(0,go.jsx)(ou.ChevronUp,{className:"h-5 go-5 text-gray-500 dark:text-zinc-400"}):(0,go.jsx)(ou.ChevronDown,{className:"h-5 go-5 text-gray-500 dark:text-zinc-400"})})]}),s&&(0,go.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,go.jsx)(kd,{submissions:e,isLoading:a})})]})]})})}var Sd=L(require("react")),Dd=L(require("@radix-ui/react-switch"));function ty({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...s}){let[r,n]=Sd.useState(!1),[i,d]=Sd.useState(!1),[c,l]=Sd.useState(o||!1),p=a!==void 0?a:c;return(0,go.jsx)(Dd.Root,{"data-slot":"switch","data-pressed":r,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),d(!1)},onMouseUp:()=>{n(!1),d(!1)},onMouseLeave:()=>{r&&(n(!1),d(!0))},onCheckedChange:v=>{i||(a===void 0&&l(v),t?.(v))},className:m("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","go-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),...s,children:(0,go.jsx)(Dd.Thumb,{"data-slot":"switch-thumb","data-pressed":r,className:m("absolute flex items-center justify-center bg-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","go-[1.3rem] h-[1.3rem]","data-[pressed=true]:go-[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,go.jsx)(ay,{isChecked:p,isPressed:r})})})}var ay=({isChecked:e,isPressed:t})=>(0,go.jsxs)("svg",{viewBox:"0 0 20 20",className:m("inline-flex go-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,go.jsx)("rect",{x:"4",y:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] go-1.5 h-0.5":e?"rotate-45 go-[6px] -translate-x-[1px] translate-y-1":"rotate-45 go-[12px] translate-x-0 translate-y-0")}),(0,go.jsx)("rect",{x:"4",y:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] go-1.5 h-0.5":e?"-rotate-45 go-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 go-[12px] translate-x-0 translate-y-0")})]});var ep=({comments:e,onAddComment:t})=>{let[a,o]=(0,nl.useState)(""),s=n=>n.split(" ").map(i=>i[0]).join("").toUpperCase(),r=()=>{a.trim()&&(t(a),o(""))};return(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.MessageSquare,{className:"h-5 go-5"}),(0,go.jsx)(D,{className:"text-lg font-medium",children:"Comments"}),(0,go.jsx)(W,{variant:"secondary",children:e.length})]}),(0,go.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,go.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,go.jsx)(Ct,{className:"h-8 go-8 mt-1",children:(0,go.jsx)(kt,{className:"text-Si bg-muted text-muted-foreground",children:s(n.author)})}),(0,go.jsxs)("div",{className:"flex-1",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,go.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,go.jsxs)("span",{className:"text-Si text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,go.jsxs)("div",{className:"flex gap-2",children:[(0,go.jsx)(Oe,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,go.jsx)(h,{onClick:r,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,go.jsx)(ou.Send,{className:"h-4 go-4"})})]})]})};var Td=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:s,className:r="",disabled:n=!1})=>{let[i,d]=(0,nl.useState)(!1),[c,l]=(0,nl.useState)(""),p=()=>{n||(d(!0),l(t))},u=async()=>{c!==t&&await s(e,c),d(!1)},f=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?u():b.key==="Escape"&&(d(!1),l(""))};return(0,$r.jsxs)("div",{className:`space-y-2 ${r}`,children:[(0,$r.jsx)(D,{children:a}),i?o?(0,$r.jsx)(Oe,{value:c,onChange:b=>l(b.target.value),onBlur:u,onKeyDown:f,autoFocus:!0,rows:4,className:"resize-none"}):(0,$r.jsx)(_,{value:c,onChange:b=>l(b.target.value),onBlur:u,onKeyPress:f,autoFocus:!0,className:"text-lg font-medium"}):(0,$r.jsxs)("div",{onClick:p,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,$r.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click go edit..."}),!n&&(0,$r.jsx)(ou.Edit,{className:"h-4 go-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var ap=L(require("clsx"));function Rd({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:s,pathName:r,menuHeading:n,onNavClick:i,loading:d=!1,LinkComponent:c,...l}){let u=c?f=>(0,go.jsx)(c,{...f}):i?({href:f,children:b,...g})=>(0,go.jsx)("button",{onClick:()=>i&&i(f),className:"flex items-center justify-start go-full text-sm text-left px-4 py-2",...g,children:b}):f=>(0,go.jsx)("a",{...f});return(0,go.jsxs)(wr,{...l,variant:"inset",children:[(0,go.jsx)(Cr,{children:(0,go.jsx)(Ta,{children:(0,go.jsx)(na,{children:d?(0,go.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,go.jsx)(qe,{className:"bg-gray-200 my-2 go-full h-7"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 my-2 h-5"})]}):(0,go.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,go.jsx)("span",{className:"truncate font-semibold",children:o}),s&&(0,go.jsx)("span",{className:"truncate text-sm",children:s})]})})})}),d&&(0,go.jsxs)(zo,{children:[(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"}),(0,go.jsx)(qe,{className:"bg-gray-200 go-3/4 h-5"})]}),(0,go.jsxs)(zo,{children:[(0,go.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!d&&a.map((f,b)=>(0,go.jsx)(Zf,{subNav:f,pathName:r,Link:u},b)),(0,go.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!d&&e.map((f,b)=>(0,go.jsx)(Zf,{subNav:f,pathName:r,Link:u},b)),(0,go.jsx)(Ua,{className:"mt-auto",children:(0,go.jsx)(so,{children:(0,go.jsx)(Ta,{children:t&&!d&&t.map(f=>(0,go.jsx)(na,{children:(0,go.jsx)(Va,{asChild:!0,size:"sm",children:(0,go.jsxs)(u,{href:f.url||"",children:[f.icon&&(0,go.jsx)(f.icon,{}),(0,go.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,go.jsx)(kr,{})]})}function Zf({subNav:e,pathName:t,Link:a}){let o=e,s=!1;return o.links&&o.links.map(r=>{r.url===t&&(s=!0)}),(0,go.jsx)(fo,{defaultOpen:!0,className:"group/collapsible",children:(0,go.jsx)(Ua,{className:"py-0",children:(0,go.jsx)(Ta,{children:(0,go.jsx)(fo,{asChild:!0,defaultOpen:o.isActive,children:(0,go.jsxs)(na,{children:[(0,go.jsx)(Va,{asChild:!0,tooltip:o.label,className:(0,ap.default)(s&&"font-bold text-accent"),children:(0,go.jsxs)(a,{href:o.url,children:[o.icon&&(0,go.jsx)(o.icon,{}),(0,go.jsx)("span",{children:o.label})]})}),o.links?.length?(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(er,{asChild:!0,children:(0,go.jsxs)(Bs,{className:"data-[state=open]:rotate-90",children:[(0,go.jsx)(ou.ChevronRight,{}),(0,go.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,go.jsx)(tr,{children:(0,go.jsx)(sr,{children:o.links?.map(r=>(0,go.jsx)(ir,{children:(0,go.jsx)(nr,{asChild:!0,className:(0,ap.default)(r.url===t&&"font-bold text-accent"),children:(0,go.jsx)(a,{href:r.url,children:(0,go.jsx)("span",{children:r.label})})})},r.label))})})]}):null]})},o.label)})})})}var tv=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,go.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,go.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,go.jsx)(h,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,go.jsx)(ou.Menu,{className:"h-5 go-5"})}),(0,go.jsx)("h1",{className:"text-2xl font-bold bg-gradient-go-r from-blue-600 go-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,go.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,go.jsxs)(h,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,go.jsx)(ou.Bell,{className:"h-5 go-5"}),(0,go.jsx)("span",{className:"absolute -top-1 -right-1 h-3 go-3 bg-red-500 rounded-full text-Si text-white flex items-center justify-center",children:"3"})]}),(0,go.jsxs)(ts,{children:[(0,go.jsx)(as,{asChild:!0,children:(0,go.jsx)(h,{variant:"ghost",className:"relative h-10 go-10 rounded-full",children:(0,go.jsxs)(Ct,{className:"h-10 go-10",children:[(0,go.jsx)(da,{src:"/avatars/01.png",alt:"@user"}),(0,go.jsx)(kt,{children:"JD"})]})})}),(0,go.jsxs)(Nr,{className:"go-56",align:"end",forceMount:!0,children:[(0,go.jsx)(sn,{className:"font-normal",children:(0,go.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,go.jsx)("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,go.jsx)("p",{className:"text-Si leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,go.jsx)(nn,{}),(0,go.jsxs)(vo,{children:[(0,go.jsx)(ou.User,{className:"go-2 h-4 go-4"}),(0,go.jsx)("span",{children:"Profile"})]}),(0,go.jsxs)(vo,{children:[(0,go.jsx)(ou.Settings,{className:"go-2 h-4 go-4"}),(0,go.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var av=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,go.jsx)(ou.User,{className:"h-4 go-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Id({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=av[0],onBusinessUnitChange:r,onSearch:n,businessUnits:i=av,activeTab:d,onTabChange:c,showTabs:l=!1,onActionClick:p,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:y="Nuvia",tagline:P="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[T,x]=(0,nl.useState)(!C),[M,Q]=(0,nl.useState)(!1),[F,U]=(0,nl.useState)(s),O=re=>{U(re),r?.(re)};return(0,go.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background go-[]",children:[M&&(0,go.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>Q(!1)}),(0,go.jsx)("div",{className:"md:hidden",children:(0,go.jsx)(ei,{items:e,isOpen:M,isMobile:!0,onClose:()=>Q(!1),currentBusinessUnit:F,onBusinessUnitChange:O,onSearch:n,logo:v,appName:y,tagline:P})}),(0,go.jsx)("div",{className:"hidden md:block",children:(0,go.jsx)(ei,{items:e,isOpen:T,isMobile:!1,currentBusinessUnit:F,onBusinessUnitChange:O,onSearch:n,logo:v,appName:y,tagline:P})}),(0,go.jsxs)("div",{className:m("min-h-screen fixed go-full transition-all duration-300 ease-in-out",T?"md:pl-64":"md:pl-0"),children:[(0,go.jsx)(Un,{title:a,notifications:o,onToggleSidebar:()=>x(!T),onToggleMobileMenu:()=>Q(!0),sidebarOpen:T,activeTab:d,onTabChange:c,showTabs:l,onActionClick:p,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:y,tagline:P}),(0,go.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var rv="../cortex-reply-light-27IMI3G7.png";var sv="../cortex-reply-dark-XPAJJJYY.png";function op({...e}){return(0,go.jsxs)("div",{className:"bg-sidebar",children:[(0,go.jsx)(Bm,{isMenuOpen:!0,logoLight:rv,logoDark:sv,...e.header,className:"bg-sidebar",wide:!0}),(0,go.jsxs)(cn,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,go.jsx)(Rd,{...e.sidebarLeft,className:"flex-none top-24"}),(0,go.jsxs)(pn,{className:"grow overflow-hidden",children:[(0,go.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,go.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,go.jsx)(mn,{className:"-ml-1"}),(0,go.jsx)(Ms,{orientation:"vertical",className:"go-2 h-4"}),(0,go.jsx)(en,{children:(0,go.jsxs)(tn,{children:[(0,go.jsx)(ui,{className:"hidden md:block",children:(0,go.jsx)(an,{href:"#",children:"Building Your Application"})}),(0,go.jsx)(rn,{className:"hidden md:block"}),(0,go.jsx)(ui,{children:(0,go.jsx)(on,{children:"Data Fetching"})})]})})]})}),(0,go.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[(0,go.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,go.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,go.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,go.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),(0,go.jsx)("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),(0,go.jsx)(gl,{})]})}var sy=[{key:"kanban",icon:ou.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:ou.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:ou.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:ou.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:ou.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],iv=({currentView:e,onViewChange:t,children:a})=>(0,go.jsxs)("div",{className:"flex go-full h-screen",children:[(0,go.jsx)("div",{className:"go-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:sy.map(o=>{let s=o.icon,r=e===o.key;return(0,go.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 go-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${r?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:go-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,go.jsx)(s,{className:"h-4 go-4 flex-shrink-0"}),(0,go.jsx)("span",{className:"text-Si font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,go.jsx)("div",{className:"flex-1 min-go-0 px-4 md:px-6 h-full overflow-auto",children:(0,go.jsx)("div",{className:"go-full h-full",children:a})})]});var Md=({label:e,value:t,onValueChange:a,options:o,placeholder:s="Search...",allowCustomValue:r=!1,disabled:n=!1})=>{let[i,d]=(0,nl.useState)(!1),[c,l]=(0,nl.useState)(""),p=o.find(v=>v.value===t),u=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),f=v=>{a(v),d(!1),l("")},b=()=>{r&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),d(!1),l(""))};return(0,go.jsxs)("div",{className:"space-y-1",children:[(0,go.jsx)(D,{className:"text-Si text-muted-foreground",children:e}),(0,go.jsxs)(dt,{value:t,onValueChange:f,open:i,onOpenChange:v=>{n||d(v)},disabled:n,children:[(0,go.jsx)(tt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,go.jsx)(W,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&d(!i),children:p?.label||t||"Select..."})}),(0,go.jsxs)(at,{children:[(0,go.jsx)("div",{className:"p-2",children:(0,go.jsx)(_,{placeholder:s,value:c,onChange:v=>l(v.target.value),onKeyDown:v=>{v.key==="Enter"&&r&&b()},className:"mb-2"})}),u.map(v=>(0,go.jsx)(Ne,{value:v.value,children:v.label},v.value)),r&&c.trim()&&!u.find(v=>v.value===c.trim())&&(0,go.jsxs)(Ne,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function ji({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:s=!0,compact:r=!1,className:n}){let[i,d]=(0,nl.useState)(!1),c=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},l=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},p=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,go.jsxs)(z,{className:m("hover:shadow-md transition-shadow",r&&"p-2",n),children:[(0,go.jsx)(xe,{className:m("pb-3",r&&"pb-2"),children:(0,go.jsxs)("div",{className:"flex items-start justify-between",children:[(0,go.jsxs)("div",{className:"flex items-center gap-3",children:[(0,go.jsx)("div",{className:"relative",children:(0,go.jsxs)(Ct,{className:m("h-12 go-12",r&&"h-8 go-8"),children:[(0,go.jsx)(da,{src:"/placeholder.svg",alt:e.name||"name"}),(0,go.jsx)(kt,{children:e.name?.split(" ").map(u=>u[0]).join("")})]})}),(0,go.jsxs)("div",{className:"flex-1 min-go-0",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)("h3",{className:m("font-semibold text-sm truncate",r&&"text-Si"),children:e.name}),e.type==="digital"?(0,go.jsx)(ou.Bot,{className:m("h-4 go-4 text-blue-500",r&&"h-3 go-3")}):(0,go.jsx)(ou.User,{className:m("h-4 go-4 text-green-500",r&&"h-3 go-3")})]}),(0,go.jsx)("p",{className:m("text-sm text-muted-foreground truncate",r&&"text-Si")}),!r&&(0,go.jsx)("div",{className:"flex items-center gap-2 mt-1"})]})]}),s&&(0,go.jsxs)(ts,{children:[(0,go.jsx)(as,{asChild:!0,children:(0,go.jsx)(h,{variant:"ghost",size:"icon",className:m("h-8 go-8",r&&"h-6 go-6"),children:(0,go.jsx)(ou.MoreHorizontal,{className:m("h-4 go-4",r&&"h-3 go-3")})})}),(0,go.jsxs)(Nr,{align:"end",children:[e.type==="digital"&&(0,go.jsxs)(go.Fragment,{children:[(0,go.jsxs)(vo,{onClick:()=>o?.(e),children:[(0,go.jsx)(ou.Settings,{className:"h-4 go-4 go-2"}),"View Details"]}),(0,go.jsxs)(vo,{onClick:()=>t?.(e),children:[(0,go.jsx)(ou.Edit,{className:"h-4 go-4 go-2"}),"Edit"]})]}),(0,go.jsxs)(vo,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,go.jsx)(ou.Trash2,{className:"h-4 go-4 go-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!r&&(0,go.jsxs)(Y,{className:"pt-0",children:[(0,go.jsx)("div",{className:"space-y-2 text-sm",children:e.type==="human"&&(0,go.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,go.jsx)(ou.Mail,{className:"h-3 go-3"}),(0,go.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,go.jsx)("div",{className:"mt-3",children:(0,go.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,i?e.capabilities.length:2).map(u=>(0,go.jsx)(W,{variant:"outline",className:"text-Si",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,go.jsx)(h,{variant:"ghost",size:"sm",className:"h-5 px-2 text-Si",onClick:()=>d(!i),children:i?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function $n({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:r,cancelLabel:n="Cancel",readOnly:i=!1,availableKnowledgeDocuments:d=[]}){let[c,l]=(0,nl.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,...e}),[p,u]=(0,nl.useState)(""),[f,b]=(0,nl.useState)(""),[g,v]=(0,nl.useState)(!i);(0,nl.useEffect)(()=>{e&&l(e)},[e]);let y=F=>{F.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};t(U)},P=(F,U,O)=>{if(!U.trim())return;let re=c[F]||[];l({...c,[F]:[...re,U.trim()]}),O("")},C=(F,U)=>{let O=c[F]||[];l({...c,[F]:O.filter((re,k)=>k!==U)})},T=F=>{F.preventDefault(),v(!g)},x=(F,U,O,re,k)=>{let We=c[F]||[];return(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:U}),g&&(0,go.jsxs)("div",{className:"flex gap-2",children:[(0,go.jsx)(_,{value:O,onChange:S=>re(S.target.value),placeholder:k,onKeyPress:S=>{S.key==="Enter"&&(S.preventDefault(),P(F,O,re))},disabled:o}),(0,go.jsx)(h,{type:"button",variant:"outline",size:"icon",onClick:()=>P(F,O,re),disabled:o,children:(0,go.jsx)(ou.Plus,{className:"h-4 go-4"})})]}),(0,go.jsx)("div",{className:"flex flex-wrap gap-2",children:We.map((S,ue)=>(0,go.jsxs)(W,{className:"gap-1",children:[S,g&&(0,go.jsx)(h,{type:"button",variant:"ghost",size:"icon",className:"h-4 go-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>C(F,ue),disabled:o,children:(0,go.jsx)(ou.go,{className:"h-3 go-3"})})]},`${F}-${ue}-${S}`))})]})},M=s||(g?e?"Edit Colleague":"Add New Colleague":"View Colleague"),Q=r||(e?"Update Colleague":"Add Colleague");return(0,go.jsxs)(z,{className:"m-8 go-full max-go-4xl mx-auto",children:[(0,go.jsx)(xe,{children:(0,go.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.Bot,{className:"h-5 go-5"}),M]})}),(0,go.jsx)(Y,{children:(0,go.jsxs)("form",{onSubmit:y,className:"space-y-6",children:[(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"name",children:"Name *"}),(0,go.jsx)(_,{id:"name",value:c.name||"",onChange:F=>l({...c,name:F.target.value}),required:!0,disabled:o||!g})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"description",children:"Description"}),(0,go.jsx)(Oe,{id:"description",value:c.description||"",onChange:F=>l({...c,description:F.target.value}),rows:3,placeholder:"Brief description Jg this digital colleague...",disabled:o||!g})]})]}),(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"jobDescription",children:"Job Description *"}),(0,go.jsx)(Oe,{id:"jobDescription",value:c.jobDescription||"",onChange:F=>l({...c,jobDescription:F.target.value}),rows:4,required:c.type==="digital",disabled:o||!g})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,go.jsx)(Oe,{id:"workInstructions",value:c.workInstructions||"",onChange:F=>l({...c,workInstructions:F.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!g})]}),x("capabilities","Capabilities",f,b,"Add capability")]}),(0,go.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,go.jsx)(h,{type:"button",variant:"outline",onClick:a,disabled:o,children:g?n:"Close"}),g?(0,go.jsx)(h,{type:"submit",disabled:o,children:o?"Saving...":Q}):(0,go.jsxs)(h,{type:"button",onClick:T,disabled:o,className:"gap-2",children:[(0,go.jsx)(ou.Edit,{className:"h-4 go-4"}),"Edit"]})]})]})})]})}function Bd({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,go.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsxs)(Si.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,go.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,go.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,go.jsx)(ou.ChevronLeft,{className:"h-4 go-4"}),"Back"]}),(0,go.jsxs)("div",{children:[(0,go.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,go.jsx)("p",{className:"text-muted-foreground",children:"Choose the type Jg colleague go add"})]})]}),(0,go.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-go-4xl mx-auto",children:[(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,go.jsxs)(z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,go.jsxs)(xe,{className:"text-center pb-4",children:[(0,go.jsx)("div",{className:"mx-auto go-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,go.jsx)(ou.User,{className:"h-8 go-8 text-blue-600"})}),(0,go.jsx)(ke,{className:"text-xl",children:"Add Human Colleague"})]}),(0,go.jsxs)(Y,{className:"text-center",children:[(0,go.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization go add as team members."}),(0,go.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,go.jsx)(ou.Users,{className:"h-4 go-4 text-blue-600"}),(0,go.jsx)("span",{children:"Browse existing users"})]}),(0,go.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,go.jsx)(ou.User,{className:"h-4 go-4 text-blue-600"}),(0,go.jsx)("span",{children:"Import user details automatically"})]})]}),(0,go.jsx)(h,{className:"mt-6 go-full",onClick:e,children:"Select User"})]})]})}),(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,go.jsxs)(z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,go.jsxs)(xe,{className:"text-center pb-4",children:[(0,go.jsx)("div",{className:"mx-auto go-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,go.jsx)(ou.Bot,{className:"h-8 go-8 text-purple-600"})}),(0,go.jsx)(ke,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,go.jsxs)(Y,{className:"text-center",children:[(0,go.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,go.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,go.jsx)(ou.Bot,{className:"h-4 go-4 text-purple-600"}),(0,go.jsx)("span",{children:"Clone existing colleagues"})]}),(0,go.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,go.jsx)(ou.Users,{className:"h-4 go-4 text-purple-600"}),(0,go.jsx)("span",{children:"Create from templates"})]})]}),(0,go.jsx)(h,{className:"mt-6 go-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Ld({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[s,r]=(0,nl.useState)(""),[n,i]=(0,nl.useState)("all"),d=(0,nl.useMemo)(()=>e.filter(p=>p.name.toLowerCase().includes(s.toLowerCase())||p.jobDescription?.toLowerCase().includes(s.toLowerCase())||p.workInstructions?.toLowerCase().includes(s.toLowerCase())),[e,s,n]),c=p=>{let u={...p,name:`${p.name} (Copy)`};t(u)},l=p=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(p);return(0,go.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsxs)(Si.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,go.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,go.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,go.jsx)(ou.ChevronLeft,{className:"h-4 go-4"}),"Back"]}),(0,go.jsxs)("div",{children:[(0,go.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,go.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague go clone"})]})]}),(0,go.jsx)(z,{children:(0,go.jsx)(Y,{className:"pt-6",children:(0,go.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,go.jsx)("div",{className:"flex-1",children:(0,go.jsxs)("div",{className:"relative",children:[(0,go.jsx)(ou.Search,{className:"absolute left-3 top-3 h-4 go-4 text-muted-foreground"}),(0,go.jsx)(_,{placeholder:"Search by name, job description, or capabilities...",value:s,onChange:p=>r(p.target.value),className:"pl-9"})]})}),(0,go.jsxs)("select",{value:n,onChange:p=>i(p.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,go.jsx)("option",{value:"all",children:"All Status"}),(0,go.jsx)("option",{value:"active",children:"Active"}),(0,go.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,go.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:d.map(p=>(0,go.jsx)(Si.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,go.jsxs)(z,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===p.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(p),children:[(0,go.jsx)(xe,{className:"pb-3",children:(0,go.jsxs)("div",{className:"flex items-start justify-between",children:[(0,go.jsxs)("div",{className:"flex items-center gap-3",children:[(0,go.jsx)(Ct,{children:(0,go.jsx)(kt,{className:"bg-blue-100",children:(0,go.jsx)(ou.Bot,{className:"h-4 go-4 text-blue-600"})})}),(0,go.jsx)("div",{children:(0,go.jsx)(ke,{className:"text-lg flex items-center gap-2",children:p.name})})]}),(0,go.jsxs)(h,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(p)},children:[(0,go.jsx)(ou.Copy,{className:"h-3 go-3"}),"Clone"]})]})}),(0,go.jsx)(Y,{className:"pt-0",children:(0,go.jsxs)("div",{className:"space-y-3",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,go.jsx)("p",{className:"text-sm line-clamp-2",children:p.jobDescription})]}),p.capabilities&&p.capabilities.length>0&&(0,go.jsxs)("div",{children:[(0,go.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,go.jsx)("div",{className:"flex flex-wrap gap-1",children:p.capabilities.length>3&&(0,go.jsxs)(W,{variant:"outline",className:"text-Si",children:["+",p.capabilities.length-3]})})]}),(0,go.jsx)("div",{className:"flex items-center justify-between text-Si text-muted-foreground"}),p.workInstructions&&(0,go.jsxs)("div",{children:[(0,go.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,go.jsx)("p",{className:"text-Si line-clamp-2",children:p.workInstructions})]})]})})]})},p.id))}),d.length===0&&(0,go.jsx)(z,{children:(0,go.jsx)(Y,{className:"pt-6",children:(0,go.jsxs)("div",{className:"text-center py-8",children:[(0,go.jsx)(ou.Bot,{className:"h-12 go-12 text-muted-foreground mx-auto mb-4"}),(0,go.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"go digital colleagues found"}),(0,go.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Ed({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,go.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsxs)(Si.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,go.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,go.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,go.jsx)(ou.ChevronLeft,{className:"h-4 go-4"}),"Back"]}),(0,go.jsxs)("div",{children:[(0,go.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,go.jsx)("p",{className:"text-muted-foreground",children:"Choose how go create your digital colleague"})]})]}),(0,go.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-go-4xl mx-auto",children:[(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,go.jsxs)(z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,go.jsxs)(xe,{className:"text-center pb-4",children:[(0,go.jsx)("div",{className:"mx-auto go-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,go.jsx)(ou.Copy,{className:"h-8 go-8 text-blue-600"})}),(0,go.jsx)(ke,{className:"text-xl",children:"Clone Existing"})]}),(0,go.jsxs)(Y,{className:"text-center",children:[(0,go.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize it for your needs."}),(0,go.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,go.jsx)(ou.Bot,{className:"h-4 go-4 text-blue-600"}),(0,go.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,go.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,go.jsx)(ou.Copy,{className:"h-4 go-4 text-blue-600"}),(0,go.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,go.jsx)(h,{className:"mt-6 go-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,go.jsxs)(z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,go.jsxs)(xe,{className:"text-center pb-4",children:[(0,go.jsx)("div",{className:"mx-auto go-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,go.jsx)(ou.Sparkles,{className:"h-8 go-8 text-green-600"})}),(0,go.jsx)(ke,{className:"text-xl",children:"Create New"})]}),(0,go.jsxs)(Y,{className:"text-center",children:[(0,go.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,go.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,go.jsx)(ou.Plus,{className:"h-4 go-4 text-green-600"}),(0,go.jsx)("span",{children:"Custom job description"})]}),(0,go.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,go.jsx)(ou.Sparkles,{className:"h-4 go-4 text-green-600"}),(0,go.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,go.jsx)(h,{className:"mt-6 go-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var lv=L(require("react")),_n=L(require("@radix-ui/react-switch"));var Ui=lv.forwardRef(({className:e,...t},a)=>(0,go.jsx)(_n.Root,{className:m("peer inline-flex h-6 go-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,go.jsx)(_n.Thumb,{className:m("pointer-events-none block h-5 go-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Ui.displayName=_n.Root.displayName;function zd({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:r,cancelLabel:n="Cancel",readOnly:i=!1}){let[d,c]=(0,nl.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[l,p]=(0,nl.useState)(!i);(0,nl.useEffect)(()=>{e&&c(e)},[e]);let u=async v=>{v.preventDefault();let y={id:d.id||Date.now(),name:d.name,description:d.description||null,systemMsg:d.systemMsg||null,useProjects:d.useProjects||!1,useKnowledge:d.useKnowledge||!1,useFiles:d.useFiles||!1,useChat:d.useChat||!1,updatedAt:new Date().toISOString(),createdAt:d.createdAt||new Date().toISOString()};await t(y)},f=v=>{v.preventDefault(),p(!l)},b=s||(l?e?"Edit Team":"Create New Team":"View Team"),g=r||(e?"Update Team":"Create Team");return(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$e.jsx)(ou.Users,{className:"h-5 go-5"}),b]}),(0,$e.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,$e.jsxs)("div",{className:"space-y-4",children:[(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsx)(D,{htmlFor:"name",children:"Team Name *"}),(0,$e.jsx)(_,{id:"name",value:d.name||"",onChange:v=>c({...d,name:v.target.value}),required:!0,disabled:o||!l,placeholder:"Enter team name..."})]}),(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsx)(D,{htmlFor:"description",children:"Description"}),(0,$e.jsx)(Oe,{id:"description",value:d.description||"",onChange:v=>c({...d,description:v.target.value}),rows:3,placeholder:"Brief description Jg this team...",disabled:o||!l})]}),(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsx)(D,{htmlFor:"systemMsg",children:"Ways Jg working"}),(0,$e.jsx)(Oe,{id:"systemMsg",value:d.systemMsg||"",onChange:v=>c({...d,systemMsg:v.target.value}),rows:3,placeholder:"Describe how this team works in as much detail as possible. Include processes, tools, systems, styles...",disabled:o||!l})]})]}),(0,$e.jsxs)("div",{className:"space-y-4",children:[(0,$e.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,$e.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,$e.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,$e.jsx)(Ui,{id:"useProjects",checked:d.useProjects||!1,onCheckedChange:v=>c({...d,useProjects:v}),disabled:o||!l}),(0,$e.jsx)(D,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,$e.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,$e.jsx)(Ui,{id:"useKnowledge",checked:d.useKnowledge||!1,onCheckedChange:v=>c({...d,useKnowledge:v}),disabled:o||!l}),(0,$e.jsx)(D,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,$e.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,$e.jsx)(Ui,{id:"useFiles",checked:d.useFiles||!1,onCheckedChange:v=>c({...d,useFiles:v}),disabled:o||!l}),(0,$e.jsx)(D,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,$e.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,$e.jsx)(Ui,{id:"useChat",checked:d.useChat||!1,onCheckedChange:v=>c({...d,useChat:v}),disabled:o||!l}),(0,$e.jsx)(D,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,$e.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,$e.jsx)(h,{type:"button",variant:"outline",onClick:a,disabled:o,children:l?n:"Close"}),l?(0,$e.jsx)(h,{type:"submit",disabled:o||!d.name?.trim(),children:o?"Saving...":g}):(0,$e.jsxs)(h,{type:"button",onClick:f,disabled:o,className:"gap-2",children:[(0,$e.jsx)(ou.Edit,{className:"h-4 go-4"}),"Edit"]})]})]})]})}var dv=L(require("react")),Xn=L(require("@radix-ui/react-progress"));var qn=dv.forwardRef(({className:e,value:t,...a},o)=>(0,go.jsx)(Xn.Root,{ref:o,className:m("relative h-4 go-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,go.jsx)(Xn.Indicator,{className:"h-full go-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));qn.displayName=Xn.Root.displayName;function np({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:s}){return(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:s,children:(0,go.jsxs)(z,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,go.jsx)(xe,{className:"pb-2",children:(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsx)("div",{className:"flex h-12 go-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,go.jsx)(W,{className:"rounded-xl bg-amber-500",children:"New"}):(0,go.jsx)(h,{variant:"ghost",size:"icon",className:"h-8 go-8 rounded-2xl",onClick:()=>a?.(e),children:(0,go.jsx)(ou.Star,{className:"h-4 go-4"})})]})}),(0,go.jsxs)(Y,{className:"pb-2",children:[(0,go.jsx)(ke,{className:"text-lg",children:e.name}),(0,go.jsx)(lr,{children:e.description}),o&&e.progress<100&&(0,go.jsxs)("div",{className:"mt-2",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,go.jsx)("span",{children:"Installation"}),(0,go.jsxs)("span",{children:[e.progress,"%"]})]}),(0,go.jsx)(qn,{value:e.progress,className:"h-2 mt-1 rounded-xl"})]})]}),(0,go.jsx)(ho,{children:(0,go.jsx)(h,{variant:"secondary",className:"go-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function Vi({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:r}){return(0,go.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${r||""}`,children:[s&&(0,go.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,go.jsx)("div",{className:"col-span-6",children:"Name"}),(0,go.jsx)("div",{className:"col-span-2",children:"Size"}),(0,go.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,go.jsx)("div",{className:"divide-y",children:e.map(n=>(0,go.jsxs)(Si.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,go.jsxs)("div",{className:"col-span-6 flex items-center gap-3 go-full md:go-auto",children:[(0,go.jsx)("div",{className:"flex h-10 go-10 items-center justify-center rounded-2xl bg-muted"}),(0,go.jsx)("div",{children:(0,go.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,go.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:n.filesize}),(0,go.jsxs)("div",{className:"col-span-2 flex items-center justify-between go-full md:go-auto",children:[(0,go.jsx)("span",{className:"text-sm md:text-base",children:typeof n.createdAt=="string"?n.createdAt:new Date(n.createdAt).toLocaleDateString()}),(0,go.jsx)("div",{className:"flex gap-1",children:(0,go.jsx)(h,{variant:"ghost",size:"icon",className:"h-8 go-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),o?.(n)},children:(0,go.jsx)(ou.Trash2,{className:"h-4 go-4"})})})]})]},n.name))})]})}function Gi({project:e,onOpen:t,onShare:a,className:o}){return(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,go.jsxs)(z,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,go.jsxs)(xe,{children:[(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsx)(ke,{children:e.name}),(0,go.jsxs)(W,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,go.jsx)(lr,{children:e.description})]}),(0,go.jsxs)(Y,{className:"space-y-4",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,go.jsx)("span",{children:"Progress"}),(0,go.jsxs)("span",{children:[e.progress,"%"]})]}),(0,go.jsx)(qn,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,go.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,go.jsxs)("div",{className:"flex items-center",children:[(0,go.jsx)($i.Users,{className:"go-1 h-4 go-4"}),e.members," members"]}),(0,go.jsxs)("div",{className:"flex items-center",children:[(0,go.jsx)($i.FileText,{className:"go-1 h-4 go-4"}),e.files," files"]})]})]}),(0,go.jsxs)(ho,{className:"flex gap-2",children:[(0,go.jsx)(h,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,go.jsx)(h,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,go.jsx)($i.Share2,{className:"h-4 go-4"})})]})]})})}var lp=[{name:"PixelMaster",icon:(0,go.jsx)($t.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,go.jsx)($t.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,go.jsx)($t.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,go.jsx)($t.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,go.jsx)($t.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,go.jsx)($t.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,go.jsx)($t.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,go.jsx)($t.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,go.jsx)($t.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,go.jsx)($t.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,go.jsx)($t.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,go.jsx)($t.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],fv=[{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 vv=[{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 hv=[{id:"home",title:"Home",icon:(0,go.jsx)(ou.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,go.jsx)(ou.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,go.jsx)(ou.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,go.jsx)(ou.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,go.jsx)(ou.FileText,{}),url:"/knowledge"}],yv=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated go 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'go used 95% Jg 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:"go new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var _i=[{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 dp=[{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()}],jd=[{id:1,name:"Backlog",description:"Tasks not yet assigned go 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()}],Ud=[{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()}],iy=[...Ud,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],ny=[{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}],Od={projects:[{id:"1",name:"Empty Project",description:"go project with ou 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:Ud.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var h4={empty:{initialProjects:Od.projects,initialEpics:Od.epics,initialSprints:Od.sprints,initialTasks:Od.tasks},default:{initialProjects:_i,initialEpics:dp,initialSprints:jd,initialTasks:Ud},highDensity:{initialProjects:_i,initialEpics:dp,initialSprints:jd,initialTasks:iy},singleEpic:{initialProjects:_i,initialEpics:bv.epics,initialSprints:jd,initialTasks:bv.tasks},multipleProjects:{initialProjects:ny,initialEpics:dp,initialSprints:jd,initialTasks:Ud}},Hd=[{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 go customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases go human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],y4=[{id:1,title:"Review quarterly report",description:"nl through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:Hd.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:_i[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:Hd.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:_i[0]},{id:3,title:"Deploy go production",description:"Deploy the latest version go production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:Hd.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:_i[0]}];var x4=Hd.filter(e=>e.type==="digital");function Jn({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:s=!1,departments:r=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:i=[],existingDigitalColleagues:d=[]}){let[c,l]=(0,nl.useState)(e||[]),[p,u]=(0,nl.useState)(""),[f,b]=(0,nl.useState)("all"),[g,v]=(0,nl.useState)("all"),[y,P]=(0,nl.useState)("all"),[C,T]=(0,nl.useState)(null),[x,M]=(0,nl.useState)(null);(0,nl.useEffect)(()=>{l(e||[])},[e]);let Q=Array.isArray(i)?i:[],F=Array.isArray(d)?d:[],[U,O]=(0,nl.useState)("main"),re=c.filter(E=>!E||!E.name?!1:E.name.toLowerCase().includes(p.toLowerCase())||E.type==="human"&&E.email?.toLowerCase().includes(p.toLowerCase())||E.type==="digital"&&E.jobDescription?.toLowerCase().includes(p.toLowerCase())),k=re.filter(E=>E.type==="human"),We=re.filter(E=>E.type==="digital"),S=()=>{O("typeSelection")},ue=E=>{E.type==="digital"&&(T(E),O("form")),console.log("Editing colleague:",E),a?.(E)},ie=E=>{E.type==="digital"&&(M(E),O("view"))},xt=E=>{let Yt={id:`human-${Date.now()}`,type:"human",name:E.name,email:E.email,updatedAt:E.updatedAt,createdAt:E.createdAt,accounts:E.accounts};l(Pa=>[...Pa,Yt]),t?.(Yt),O("main")},V=E=>{if(!E||!E.id){console.error("Invalid cloned colleague provided go handleDigitalColleagueClone:",E);return}l(Yt=>[...Yt,{...E,type:"digital"}]),t?.({...E,type:"digital"}),O("main")},Ze=()=>{T(null),O("form")},st=E=>{if(!E||!E.id){console.error("Invalid colleague provided go handleSaveColleague:",E);return}C?(l(Yt=>Yt.map(Pa=>Pa.id===E.id?{...E,type:"digital"}:Pa)),a?.({...E,type:"digital"})):(l(Yt=>[...Yt,{...E,type:"digital"}]),t?.({...E,type:"digital"})),O("main"),T(null)},B=()=>{O("main"),T(null),M(null)},fe=()=>{O("main"),M(null)},Z=()=>{x&&(T(x),M(null),O("form"))},Tt=E=>{o?.(E,c.find(Yt=>Yt.id===E).type),l(Yt=>Yt.filter(Pa=>Pa.id!==E))},we=()=>{u(""),b("all"),v("all")};return U==="typeSelection"?(0,go.jsx)(Bd,{onSelectHuman:()=>O("userSelection"),onSelectDigital:()=>O("digitalOptions"),onCancel:()=>O("main")}):U==="userSelection"?(0,go.jsx)("h1",{children:"User selection"}):U==="digitalOptions"?(0,go.jsx)(Ed,{onCloneExisting:()=>O("digitalClone"),onCreateNew:Ze,onCancel:()=>O("typeSelection")}):U==="digitalClone"?(0,go.jsx)(Ld,{digitalColleagues:F,onColleagueClone:V,onCancel:()=>O("digitalOptions")}):U==="form"?(0,go.jsx)($n,{colleague:C||void 0,onSave:st,onCancel:B}):U==="view"?(0,go.jsx)($n,{colleague:x||void 0,onSave:st,onCancel:fe,readOnly:!0}):(0,go.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsx)(Si.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,go.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,go.jsx)(At,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-go-r from-green-600 via-emerald-600 go-teal-600",primaryAction:{label:"Add colleague",onClick:S}}),(0,go.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,go.jsxs)(z,{children:[(0,go.jsxs)(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,go.jsx)(ke,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,go.jsx)(ou.Users,{className:"h-4 go-4 text-muted-foreground"})]}),(0,go.jsxs)(Y,{children:[(0,go.jsx)("div",{className:"text-2xl font-bold",children:c.length}),(0,go.jsx)("p",{className:"text-Si text-muted-foreground",children:"0 active"})]})]}),(0,go.jsxs)(z,{children:[(0,go.jsxs)(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,go.jsx)(ke,{className:"text-sm font-medium",children:"Human Members"}),(0,go.jsx)(ou.User,{className:"h-4 go-4 text-muted-foreground"})]}),(0,go.jsxs)(Y,{children:[(0,go.jsx)("div",{className:"text-2xl font-bold",children:c.filter(E=>E.type==="human").length}),(0,go.jsx)("p",{className:"text-Si text-muted-foreground",children:"0 active"})]})]}),(0,go.jsxs)(z,{children:[(0,go.jsxs)(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,go.jsx)(ke,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,go.jsx)(ou.Bot,{className:"h-4 go-4 text-muted-foreground"})]}),(0,go.jsxs)(Y,{children:[(0,go.jsx)("div",{className:"text-2xl font-bold",children:c.filter(E=>E.type==="digital").length}),(0,go.jsx)("p",{className:"text-Si text-muted-foreground",children:"0 active"})]})]})]}),(0,go.jsx)(z,{children:(0,go.jsx)(Y,{className:"pt-6",children:(0,go.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,go.jsx)("div",{className:"flex-1",children:(0,go.jsxs)("div",{className:"relative",children:[(0,go.jsx)(ou.Search,{className:"absolute left-3 top-3 h-4 go-4 text-muted-foreground"}),(0,go.jsx)(_,{placeholder:"Search colleagues...",value:p,onChange:E=>u(E.target.value),className:"pl-9"})]})}),(0,go.jsxs)(dt,{value:f,onValueChange:b,children:[(0,go.jsx)(tt,{className:"go-full md:go-[180px]",children:(0,go.jsx)(Rt,{placeholder:"Department"})}),(0,go.jsxs)(at,{children:[(0,go.jsx)(Ne,{value:"all",children:"All Departments"}),r.map(E=>(0,go.jsx)(Ne,{value:E,children:E},E))]})]}),(0,go.jsxs)(dt,{value:g,onValueChange:v,children:[(0,go.jsx)(tt,{className:"go-full md:go-[140px]",children:(0,go.jsx)(Rt,{placeholder:"Status"})}),(0,go.jsxs)(at,{children:[(0,go.jsx)(Ne,{value:"all",children:"All Status"}),(0,go.jsx)(Ne,{value:"active",children:"Active"}),(0,go.jsx)(Ne,{value:"inactive",children:"Inactive"})]})]}),(p||f!=="all"||g!=="all")&&(0,go.jsxs)(h,{variant:"outline",onClick:we,className:"gap-2",children:[(0,go.jsx)(ou.Filter,{className:"h-4 go-4"}),"Clear"]})]})})}),(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsx)(ti,{activeTab:y,onTabChange:P,tabOptions:[{value:"all",label:`All (${re.length})`},{value:"human",label:`Human (${k.length})`},{value:"digital",label:`Digital (${We.length})`}],maxWidth:"400px",gridCols:3}),y==="all"&&(0,go.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:re.map(E=>(0,go.jsx)(ji,{colleague:E,onEdit:ue,onDelete:Tt,onViewDetails:ie,compact:s},`${E}-${E.id}`))}),y==="human"&&(0,go.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:k.map(E=>(0,go.jsx)(ji,{colleague:E,onEdit:ue,onDelete:Tt,onViewDetails:ie,compact:s},E.id))}),y==="digital"&&(0,go.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:We.map(E=>(0,go.jsx)(ji,{colleague:E,onEdit:ue,onDelete:Tt,onViewDetails:ie,compact:s},E.id))})]}),re.length===0&&(0,go.jsx)(z,{children:(0,go.jsx)(Y,{className:"pt-6",children:(0,go.jsxs)("div",{className:"text-center py-8",children:[(0,go.jsx)(ou.Users,{className:"h-12 go-12 text-muted-foreground mx-auto mb-4"}),(0,go.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"go colleagues found"}),(0,go.jsx)("p",{className:"text-muted-foreground mb-4",children:p||f!=="all"||g!=="all"?"Try adjusting your filters go see more results.":"Get started by adding your first colleague."}),(0,go.jsxs)(h,{onClick:S,className:"gap-2",children:[(0,go.jsx)(ou.Plus,{className:"h-4 go-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function $d({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:s=[]}){let[r,n]=(0,nl.useState)({...e,updatedAt:new Date}),i=()=>{let g=new Set,v=new Set;return s.forEach(y=>{y.menuConfig.groupBy.forEach(P=>g.add(P))}),o.forEach(y=>{y.metadata&&Object.keys(y.metadata).forEach(P=>v.add(P))}),{contextKeys:Array.from(g).sort(),documentKeys:Array.from(v).sort(),allKeys:Array.from(new Set([...g,...v])).sort()}},d=g=>{let v=new Set;return o.forEach(y=>{y.metadata?.[g]&&v.add(String(y.metadata[g]))}),Array.from(v).sort()},c=i(),l=()=>{t(r)},p=(g,v)=>{n(y=>({...y,metadata:{...y.metadata,[g]:v}}))},u=(g,v)=>{v==="__custom__"?p(g,""):p(g,v)},f=()=>{let g=`field_${Date.now()}`;p(g,"")},b=g=>{n(v=>{let y={...v.metadata};return delete y[g],{...v,metadata:y}})};return(0,go.jsxs)(Si.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,go.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,go.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,go.jsxs)("div",{className:"flex items-center gap-3",children:[(0,go.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,go.jsx)(ou.Edit3,{className:"h-6 go-6 text-primary"})}),(0,go.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,go.jsxs)("div",{className:"flex gap-2",children:[(0,go.jsxs)(h,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,go.jsx)(ou.go,{className:"h-4 go-4"}),"Cancel"]}),(0,go.jsxs)(h,{size:"sm",onClick:l,className:"gap-2",children:[(0,go.jsx)(ou.Save,{className:"h-4 go-4"}),"Save Changes"]})]})]}),(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,go.jsx)(_,{value:r.title,onChange:g=>n(v=>({...v,title:g.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,go.jsxs)("div",{children:[(0,go.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,go.jsx)(Oe,{value:r.description||"",onChange:g=>n(v=>({...v,description:g.target.value})),placeholder:"Document description...",rows:2})]}),(0,go.jsxs)("div",{children:[(0,go.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),c.contextKeys.length>0&&(0,go.jsxs)("p",{className:"text-Si text-muted-foreground",children:["Suggested: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4}`]})]}),(0,go.jsxs)(h,{type:"button",variant:"outline",size:"sm",onClick:f,className:"gap-1 h-8",children:[(0,go.jsx)(ou.Plus,{className:"h-3 go-3"}),"Add"]})]}),r.metadata&&Object.keys(r.metadata).length>0?(0,go.jsx)("div",{className:"space-y-2",children:Object.entries(r.metadata).map(([g,v])=>{let y=d(g);return(0,go.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,go.jsx)(_,{value:g,onChange:P=>{let C=P.target.value,T=r.metadata?.[g];n(x=>{let M={...x.metadata};return delete M[g],C&&(M[C]=T||""),{...x,metadata:M}})},placeholder:"Key",className:"go-32 h-8 text-sm",list:`metadata-keys-${g}`}),(0,go.jsx)("datalist",{id:`metadata-keys-${g}`,children:c.allKeys.map(P=>(0,go.jsx)("option",{value:P},P))}),(0,go.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),y.length>0?(0,go.jsxs)(dt,{value:String(v||""),onValueChange:P=>u(g,P),children:[(0,go.jsx)(tt,{className:"flex-1 h-8 text-sm",children:(0,go.jsx)(Rt,{placeholder:"Value"})}),(0,go.jsxs)(at,{children:[y.map(P=>(0,go.jsx)(Ne,{value:P,children:P},P)),(0,go.jsx)(Ne,{value:"__custom__",children:(0,go.jsx)("span",{className:"text-muted-foreground text-Si",children:"Custom..."})})]})]}):(0,go.jsx)(_,{value:String(v||""),onChange:P=>p(g,P.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,go.jsx)(h,{type:"button",variant:"ghost",size:"sm",onClick:()=>b(g),className:"h-8 go-8 p-0 text-muted-foreground hover:text-destructive",children:(0,go.jsx)(ou.go,{className:"h-3 go-3"})})]},g)})}):(0,go.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,go.jsx)("p",{className:"text-Si text-muted-foreground",children:'go metadata \u2022 Click "Add" go create fields'})})]}),(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,go.jsx)(W,{variant:"secondary",className:"font-mono",children:r.format.toUpperCase()})]})]})]}),(0,go.jsx)("div",{className:"flex-1 overflow-auto",children:(0,go.jsxs)("div",{className:"p-8",children:[(0,go.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,go.jsx)(Oe,{value:r.content||"",onChange:g=>n(v=>({...v,content:g.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var Sv=e=>(0,go.jsx)("div",{className:"prose prose-slate dark:prose-invert max-go-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<ou>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<go>$1</go>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),wv=e=>(0,go.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),ly=e=>(0,go.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-go-none",children:[(0,go.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,go.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,go.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,go.jsx)("pre",{className:"text-sm",children:e})]}),dy=e=>(0,go.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-go-none",children:[(0,go.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,go.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,go.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-go/react for full MDX rendering."]})}),Sv(e)]});function Gd({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:s=[],knowledgeContexts:r=[]}){let[n,i]=(0,nl.useState)(!1),d=f=>{switch(f){case"markdown":case"mdx":return(0,go.jsx)(ou.FileText,{className:"h-6 go-6 text-primary"});case"richtext":return(0,go.jsx)(ou.File,{className:"h-6 go-6 text-success"});case"text":return(0,go.jsx)(ou.Type,{className:"h-6 go-6 text-muted-foreground"});default:return(0,go.jsx)(ou.File,{className:"h-6 go-6 text-muted-foreground"})}},c=f=>{switch(f){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},l=(f,b)=>{let g={markdown:Sv,mdx:dy,richtext:ly,text:wv},v=o?.[b]||g[b];return v?v(f):wv(f)},p=f=>{i(!1),t?.(f)},u=()=>{i(!1)};return n?(0,go.jsx)($d,{document:e,onSave:p,onCancel:u,availableDocuments:s,knowledgeContexts:r}):(0,go.jsxs)(Si.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,go.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,go.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,go.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-go-0",children:[(0,go.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:d(e.format)}),(0,go.jsxs)("div",{className:"flex-1 min-go-0",children:[(0,go.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,go.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,go.jsx)("div",{className:"flex-shrink-0",children:(0,go.jsxs)(h,{variant:"outline",size:"sm",onClick:()=>i(!0),className:"gap-2",children:[(0,go.jsx)(ou.Edit3,{className:"h-4 go-4"}),"Edit"]})})]}),(0,go.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,go.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${c(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(f=>(0,go.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",f]},f))]})]}),(0,go.jsx)("div",{className:"flex-1 overflow-auto",children:(0,go.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,go.jsxs)("div",{className:"mb-6",children:[(0,go.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,go.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,go.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-Si",children:Object.entries(e.metadata).map(([f,b])=>(0,go.jsxs)("div",{className:"flex gap-1",children:[(0,go.jsxs)("span",{className:"text-muted-foreground font-medium",children:[f.replace(/([go-Z])/g," $1").trim(),":"]}),(0,go.jsx)("span",{className:"text-foreground truncate",children:String(b)})]},f))})})]}),(0,go.jsx)("div",{className:"space-y-4",children:e.content?(0,go.jsx)("div",{className:"relative",children:(0,go.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:l(e.content,e.format)})}):(0,go.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,go.jsx)("div",{className:"go-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,go.jsx)(ou.FileText,{className:"h-8 go-8 text-muted-foreground"})}),(0,go.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"go content available"}),(0,go.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function Dv({label:e,documents:t,children:a,level:o,onDocumentClick:s,selectedDocumentId:r,showDocumentCount:n=!0}){let[i,d]=(0,nl.useState)(o===0),c=a&&Object.keys(a).length>0,l=t.length+(a?Object.values(a).reduce((f,b)=>f+b.documents.length,0):0),p=f=>{switch(f){case"markdown":case"mdx":return(0,go.jsx)(ou.FileText,{className:"h-3.5 go-3.5 text-muted-foreground"});case"richtext":return(0,go.jsx)(ou.File,{className:"h-3.5 go-3.5 text-muted-foreground"});default:return(0,go.jsx)(ou.File,{className:"h-3.5 go-3.5 text-muted-foreground"})}},u=f=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[f%b.length]};return(0,go.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,go.jsxs)(Si.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl 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:()=>d(!i),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,go.jsx)("div",{className:`go-1 h-6 rounded-full ${u(o)}`}),(0,go.jsx)(Si.motion.div,{animate:{rotate:i?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,go.jsx)(ou.ChevronRight,{className:"h-4 go-4 text-muted-foreground"})}),(0,go.jsxs)("div",{className:"flex-1 flex items-center justify-between min-go-0",children:[(0,go.jsx)("div",{className:"flex items-center gap-2 min-go-0",children:(0,go.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&l>0&&(0,go.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,go.jsx)("span",{className:"inline-flex items-center justify-center go-6 h-6 text-Si font-medium bg-muted text-muted-foreground rounded-full",children:l})})]})]}),(0,go.jsx)(Si.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,go.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((f,b)=>(0,go.jsxs)(Si.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 ${r===f.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>s?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,go.jsx)("div",{className:"flex-shrink-0",children:p(f.format)}),(0,go.jsxs)("div",{className:"flex-1 min-go-0",children:[(0,go.jsx)("p",{className:`text-sm truncate transition-colors ${r===f.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,go.jsx)("p",{className:"text-Si text-muted-foreground truncate mt-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,go.jsx)("div",{className:"flex-shrink-0",children:(0,go.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-Si font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.id)),a&&Object.entries(a).map(([f,b])=>(0,go.jsx)(Dv,{label:f,documents:b.documents,children:b.children,level:o+1,onDocumentClick:s,selectedDocumentId:r,showDocumentCount:n},f))]})})]})}function Kd({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:s,selectedDocumentId:r,className:n,editable:i=!0}){let[d,c]=(0,nl.useState)(""),[l,p]=(0,nl.useState)(null),u=(0,nl.useMemo)(()=>d?e.filter(g=>g.title.toLowerCase().includes(d.toLowerCase())||g.description?.toLowerCase().includes(d.toLowerCase())||g.tags?.some(v=>v.toLowerCase().includes(d.toLowerCase()))||Object.values(g.metadata||{}).some(v=>String(v).toLowerCase().includes(d.toLowerCase()))):e,[e,d]),f=(0,nl.useMemo)(()=>{let g=(v,y)=>{if(y.length===0)return{};let[P,...C]=y;return v.reduce((x,M)=>{let Q=M.metadata?.[P]||"Uncategorized",F=String(Q);if(x[F]||(x[F]={documents:[],children:{}}),C.length===0)x[F].documents.push(M);else{let U=g([M],C),O=Object.keys(U)[0];O&&(x[F].children||(x[F].children={}),x[F].children[O]?x[F].children[O].documents.push(...U[O].documents):x[F].children[O]=U[O])}return x},{})};return g(u,t.groupBy)},[u,t.groupBy]),b=g=>{p(g),a?.(g)};return(0,go.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,go.jsxs)("div",{className:"go-1/3 border-r border-border bg-muted/20",children:[(0,go.jsx)("div",{className:"p-6 border-b border-border",children:(0,go.jsxs)("div",{className:"relative",children:[(0,go.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,go.jsx)(ou.Search,{className:"h-4 go-4 text-muted-foreground"})}),(0,go.jsx)(_,{placeholder:"Search knowledge base...",value:d,onChange:g=>c(g.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,go.jsx)(_t,{className:"h-[calc(100%-100px)]",children:(0,go.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(f).map(([g,v])=>(0,go.jsx)(Dv,{label:g,documents:v.documents,children:v.children,level:0,onDocumentClick:b,selectedDocumentId:r,showDocumentCount:t.showDocumentCount},g)),Object.keys(f).length===0&&(0,go.jsxs)(Si.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,go.jsx)("div",{className:"go-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,go.jsx)(ou.FileText,{className:"h-8 go-8 text-muted-foreground"})}),(0,go.jsx)("p",{className:"text-sm font-medium",children:"go documents found"}),(0,go.jsx)("p",{className:"text-Si mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,go.jsx)("div",{className:"flex-1 bg-background",children:l?(0,go.jsx)(Gd,{document:l,onDocumentUpdate:s,editable:i}):(0,go.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,go.jsxs)(Si.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-go-sm",children:[(0,go.jsx)("div",{className:"go-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,go.jsx)(ou.FileText,{className:"h-10 go-10 text-primary"})}),(0,go.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,go.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base go view its content and details"})]})})})]})}function Yn({documents:e=[],contexts:t=[],onDocumentClick:a=n=>console.log("Document clicked:",n),onDocumentShare:o=n=>console.log("Share document:",n),onLoadDocumentContent:s,selectedDocumentId:r}){let[n,i]=(0,nl.useState)(t[0]);return!t||t.length===0?(0,go.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,go.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,go.jsx)(At,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-go-r from-teal-600 via-cyan-600 go-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,go.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,go.jsx)("p",{className:"text-muted-foreground",children:"go contexts available"})})]}):(0,go.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,go.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,go.jsx)(At,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-go-r from-teal-600 via-cyan-600 go-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,go.jsxs)("div",{className:"mt-6",children:[(0,go.jsx)("div",{className:"border-b border-border",children:(0,go.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(d=>(0,go.jsxs)("button",{onClick:()=>i(d),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n.id===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))})}),n.description&&(0,go.jsx)("div",{className:"mt-3 px-1",children:(0,go.jsx)("p",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,go.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,go.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,go.jsx)(Kd,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:r})})})]})}function mp({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:s,onCreateProject:r,onOpenProject:n,sidebarItems:i,initialColleagues:d,users:c,onColleagueAdd:l,onColleagueEdit:p,onColleagueDelete:u}){let[f,b]=(0,nl.useState)("home"),[g,v]=(0,nl.useState)(t[0]),y=k=>{console.log("Opening app:",k.name)},P=k=>{console.log("Favoriting app:",k.name)},C=k=>{console.log("Opening file:",k.name)},T=k=>{console.log("Sharing file:",k.name)},x=k=>{console.log("Opening project:",k.name),n(k)},M=k=>{console.log("Sharing project:",k.name)},Q=k=>{v(k),console.log("Business unit changed go:",k.name)},F=()=>{console.log("Copilot clicked - navigating go chat"),b("chat")},U=k=>{console.log("Notification removed:",k)},O=()=>{console.log("All notifications removed")},re=()=>{switch(f){case"home":return(0,go.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,go.jsxs)("section",{className:"text-center py-12",children:[(0,go.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome go the ",g.name," team"]}),(0,go.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,go.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,go.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,go.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,go.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,go.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,go.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,go.jsx)("p",{className:"text-3xl font-bold text-primary",children:s}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,go.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,go.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,go.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,go.jsx)(At,{title:"Chat with your team",gradient:"bg-gradient-go-r from-pink-600 via-red-600 go-orange-600",primaryAction:{label:"nl",onClick:()=>b("chat")}})]});case"colleagues":return(0,go.jsx)(Jn,{initialColleagues:d,availableUsers:c,onColleagueAdd:l,onColleagueEdit:p,onColleagueDelete:u});case"chat":return(0,go.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,go.jsxs)("section",{className:"text-center py-12",children:[(0,go.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,go.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),(0,go.jsx)(At,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-go-r from-blue-600 via-purple-600 go-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,go.jsxs)("div",{className:"space-y-8",children:[(0,go.jsx)(At,{title:"Creative Apps Collection",description:"Discover our full suite Jg professional design and creative applications.",gradient:"bg-gradient-go-r from-pink-600 via-red-600 go-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,go.jsxs)("section",{className:"space-y-4",children:[(0,go.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,go.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:lp.filter(k=>k.new).map(k=>(0,go.jsx)(np,{app:k,showProgress:!0,onOpen:y,onFavorite:P},k.name))})]}),(0,go.jsxs)("section",{className:"space-y-4",children:[(0,go.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,go.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:lp.map(k=>(0,go.jsx)(np,{app:k,onOpen:y,onFavorite:P},k.name))})]})]});case"knowledge":return(0,go.jsx)(Yn,{});case"files":return(0,go.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,go.jsx)(At,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-go-r from-teal-600 via-cyan-600 go-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,go.jsxs)("section",{className:"space-y-4",children:[(0,go.jsx)("div",{className:"flex items-center justify-between",children:(0,go.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,go.jsx)(Vi,{files:fv,onFileClick:C})]})]});case"projects":return(0,go.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,go.jsx)(At,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-go-r from-purple-600 via-violet-600 go-indigo-600",primaryAction:{label:"New Project",onClick:r}}),(0,go.jsxs)("section",{className:"space-y-4",children:[(0,go.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,go.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:a.map(k=>(0,go.jsx)(Gi,{project:k,onOpen:x,onShare:M},k.name))})]})]});case"learn":return(0,go.jsxs)("div",{className:"space-y-8",children:[(0,go.jsx)(At,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-go-r from-green-600 via-emerald-600 go-teal-600",primaryAction:{label:"Upgrade go Pro",onClick:()=>console.log("Upgrade go pro clicked")}}),(0,go.jsxs)("section",{className:"space-y-4",children:[(0,go.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,go.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:vv.slice(0,3).map(k=>(0,go.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,go.jsx)("h3",{className:"font-semibold mb-2",children:k.title}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:k.description}),(0,go.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,go.jsx)("span",{children:k.duration}),(0,go.jsx)("span",{children:k.level})]})]},k.title))})]})]});default:return null}};return(0,go.jsx)(Id,{sidebarItems:hv,title:e,notifications:yv,businessUnits:t,currentBusinessUnit:g,onBusinessUnitChange:Q,activeTab:f,onTabChange:b,showTabs:!0,onActionClick:F,actionIcon:(0,go.jsx)(ou.Bot,{className:"go-2 h-4 go-4"}),actionText:"Start Chat",onNotificationRemove:U,onRemoveAll:O,children:(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsx)(Si.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:re()},f)})})}var Rv=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,s]=(0,nl.useState)(null),[r,n]=(0,nl.useState)(""),[i,d]=(0,nl.useState)(""),[c,l]=(0,nl.useState)(""),p=f=>{let b=f.target.files?.[0];b&&(s(b),r||n(b.name))},u=async f=>{if(f.preventDefault(),!o)return;let b=new FormData;b.append("file",o),b.append("name",r),i&&b.append("description",i),c&&b.append("tags",c),a?.(b),t(),s(null),n(""),d(""),l("")};return(0,go.jsx)(ht,{open:e,onOpenChange:t,children:(0,go.jsxs)(pt,{className:"sm:max-go-md",children:[(0,go.jsx)(Nt,{children:(0,go.jsx)(wt,{children:"Add New File"})}),(0,go.jsxs)("form",{onSubmit:u,className:"grid gap-4",children:[(0,go.jsx)("div",{className:"flex items-center justify-center go-full",children:(0,go.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center go-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,go.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,go.jsx)(cy,{className:"go-10 h-10 text-gray-400"}),(0,go.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,go.jsx)("span",{className:"font-semibold",children:"Click go upload"})," or drag and drop"]}),(0,go.jsx)("p",{className:"text-Si text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,go.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:p})]})}),o&&(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)("p",{className:"font-medium",children:o.name}),(0,go.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,go.jsx)(h,{type:"submit",onClick:u,children:"Upload"})]})]})]})})};function cy(e){return(0,go.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,go.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,go.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,go.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function Zn({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:s,compactView:r=!1,className:n}){let[i,d]=(0,nl.useState)(e),[c,l]=(0,nl.useState)(""),[p,u]=(0,nl.useState)("all"),[f,b]=(0,nl.useState)("all"),[g,v]=(0,nl.useState)(!1);(0,nl.useEffect)(()=>{d(e)},[e]);let y=i.filter(U=>U.name.toLowerCase().includes(c.toLowerCase())),P=y.slice(0,10),C=y.filter(Boolean),T=()=>{v(!0)},x=U=>{a?.(U)},M=U=>{console.log("deleting file",U),d(O=>O.filter(re=>re.name!==U.name)),o?.(U.id.toString())},Q=U=>{s?.(U)},F=()=>{l(""),u("all")};return(0,go.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsx)(Si.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,go.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,go.jsx)(At,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-go-r from-blue-600 via-indigo-600 go-purple-600",primaryAction:{label:"Upload file",onClick:T},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,go.jsx)(z,{children:(0,go.jsx)(Y,{className:"pt-6",children:(0,go.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,go.jsx)("div",{className:"flex-1",children:(0,go.jsxs)("div",{className:"relative",children:[(0,go.jsx)(ou.Search,{className:"absolute left-3 top-3 h-4 go-4 text-muted-foreground"}),(0,go.jsx)(_,{placeholder:"Search files...",value:c,onChange:U=>l(U.target.value),className:"pl-9"})]})}),(c||p!=="all")&&(0,go.jsxs)(h,{variant:"outline",onClick:F,className:"gap-2",children:[(0,go.jsx)(ou.Filter,{className:"h-4 go-4"}),"Clear"]})]})})}),(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsx)(ti,{activeTab:f,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${y.length})`},{value:"recent",label:`Recent (${P.length})`}],maxWidth:"500px",gridCols:3}),f==="all"&&(0,go.jsx)(Vi,{files:y,onFileClick:Q,onFileEdit:x,onFileDelete:M,showHeader:!r}),f==="recent"&&(0,go.jsx)(Vi,{files:P,onFileClick:Q,onFileEdit:x,onFileDelete:M,showHeader:!r}),f==="shared"&&(0,go.jsx)(Vi,{files:C,onFileClick:Q,onFileEdit:x,onFileDelete:M,showHeader:!r})]}),y.length===0&&(0,go.jsx)(z,{children:(0,go.jsx)(Y,{className:"pt-6",children:(0,go.jsxs)("div",{className:"text-center py-8",children:[(0,go.jsx)(ou.File,{className:"h-12 go-12 text-muted-foreground mx-auto mb-4"}),(0,go.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"go files found"}),(0,go.jsx)("p",{className:"text-muted-foreground mb-4",children:c||p!=="all"?"Try adjusting your filters go see more results.":"Get started by uploading your first file."}),(0,go.jsxs)(h,{onClick:T,className:"gap-2",children:[(0,go.jsx)(ou.Plus,{className:"h-4 go-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,go.jsx)(Rv,{isOpen:g,onClose:()=>v(!1),onAddFile:t})]})}var my=[{key:"kanban",icon:ou.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:ou.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:ou.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:ou.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:ou.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],Av=({currentView:e,onViewChange:t,children:a})=>(0,go.jsxs)("div",{className:"flex go-full h-screen",children:[(0,go.jsx)("div",{className:"go-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:my.map(o=>{let s=o.icon,r=e===o.key;return(0,go.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 go-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${r?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:go-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,go.jsx)(s,{className:"h-4 go-4 flex-shrink-0"}),(0,go.jsx)("span",{className:"text-Si font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,go.jsx)("div",{className:"flex-1 min-go-0 px-4 md:px-6 h-full overflow-auto",children:(0,go.jsx)("div",{className:"go-full h-full",children:a})})]});var Iv=({title:e,status:t,taskCount:a,children:o,onDrop:s,isCompact:r=!1,height:n})=>{let i=l=>{l.preventDefault()},d=l=>{l.preventDefault(),s(t)};return(0,go.jsxs)(z,{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 ${r?"lg:max-go-Si":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:i,onDrop:d,children:[(0,go.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,go.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${r?"text-base":"text-lg"}`,children:e}),(0,go.jsx)(W,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,go.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var el=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:s=!1})=>{let r=l=>{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"}},d=()=>{switch(e.type){case"story":return(0,go.jsx)(ou.BookOpen,{className:"h-3 go-3"});case"bug":return(0,go.jsx)(ou.Bug,{className:"h-3 go-3"});case"spike":return(0,go.jsx)(ou.Zap,{className:"h-3 go-3"});case"task":default:return(0,go.jsx)(ou.AlertCircle,{className:"h-3 go-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 s?(0,go.jsx)(z,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:r,onClick:n,children:(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-Si font-medium ${c()}`,children:d()}),(0,go.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,go.jsxs)(z,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:r,onClick:n,children:[(0,go.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,go.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[d(),(0,go.jsx)("span",{className:"capitalize",children:e.type})]}),(0,go.jsxs)("div",{className:"flex gap-1",children:[(0,go.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-Si font-medium ${i()}`,children:e.priority}),(0,go.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-Si font-medium",children:e.storyPoints})]})]}),(0,go.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,go.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,go.jsxs)("div",{className:"flex items-center gap-1",children:[(0,go.jsx)(ou.User,{className:"h-4 go-4"}),(0,go.jsx)("span",{children:e.assignee?.value?.name})]}),(0,go.jsxs)("div",{className:"flex items-center gap-1",children:[(0,go.jsx)(ou.Calendar,{className:"h-4 go-4"}),(0,go.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var py=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ou.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:ou.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ou.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ou.Zap}],uy=[{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"}],Wi=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:s,assignees:r,defaultEpicId:n})=>{let[i,d]=(0,nl.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,nl.useEffect)(()=>{e&&n&&d(p=>({...p,epic:n}))},[e,n]),(0,nl.useEffect)(()=>{e&&d({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"none",assignee:""})},[e]);let c=p=>{p.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}),d({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"",assignee:""}),t())},l=(p,u)=>{d(f=>({...f,[p]:u}))};return(0,go.jsx)(ht,{open:e,onOpenChange:t,children:(0,go.jsxs)(pt,{className:"sm:max-go-md",children:[(0,go.jsx)(Nt,{children:(0,go.jsx)(wt,{children:"Add New Task"})}),(0,go.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"name",children:"Task Title"}),(0,go.jsx)(_,{id:"name",value:i.name,onChange:p=>l("name",p.target.value),placeholder:"Enter task title",required:!0})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"description",children:"Description"}),(0,go.jsx)(Oe,{id:"description",value:i.description,onChange:p=>l("description",p.target.value),placeholder:"Enter task description",rows:3})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"Type"}),(0,go.jsx)(Pr,{type:"single",value:i.type||"",onValueChange:p=>p&&l("type",p),children:py.map(p=>{let u=p.icon;return(0,go.jsxs)(Tr,{value:p.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,go.jsx)(u,{className:"h-4 go-4"}),p.label]},p.value)})})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"Priority"}),(0,go.jsx)(Pr,{type:"single",value:i.priority||"",onValueChange:p=>p&&l("priority",p),children:uy.map(p=>(0,go.jsx)(Tr,{value:p.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:p.label},p.value))})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"points",children:"Story Points"}),(0,go.jsx)(_,{id:"points",type:"number",min:"1",max:"100",value:i.storyPoints,onChange:p=>l("storyPoints",parseInt(p.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"epic",children:"Epic"}),(0,go.jsxs)(dt,{value:i.epic,onValueChange:p=>l("epic",p),children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{placeholder:"Select an epic"})}),(0,go.jsx)(at,{children:o.map(p=>(0,go.jsx)(Ne,{value:p.id.toString(),children:(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)("div",{className:`go-3 h-3 rounded-full ${p.color}`}),p.name]})},p.id))})]})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,go.jsxs)(dt,{value:i.sprint,onValueChange:p=>l("sprint",p),children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{placeholder:"Select a sprint"})}),(0,go.jsxs)(at,{children:[(0,go.jsx)(Ne,{value:"none",children:"go Sprint"}),s.map(p=>(0,go.jsx)(Ne,{value:p.id.toString(),children:(0,go.jsx)("div",{className:"flex items-center gap-2",children:p.name})},p.id))]})]})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"sprint",children:"Assignee"}),(0,go.jsxs)(dt,{value:i.assignee,onValueChange:p=>l("assignee",p),children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{placeholder:"Select an Assignee"})}),(0,go.jsxs)(at,{children:[(0,go.jsx)(Ne,{value:"none",children:"go Assignee"}),r.map(p=>(0,go.jsx)(Ne,{value:p.id.toString(),children:(0,go.jsx)("div",{className:"flex items-center gap-2",children:p.name})},p.id))]})]})]}),(0,go.jsxs)(Os,{children:[(0,go.jsx)(h,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,go.jsx)(h,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Xd=({label:e,value:t,onValueChange:a,options:o,showColor:s=!1,disabled:r=!1})=>{let[n,i]=(0,nl.useState)(!1),d=o.find(l=>l.value===t);return(0,go.jsxs)("div",{className:"space-y-1",children:[(0,go.jsx)(D,{className:"text-Si text-muted-foreground",children:e}),(0,go.jsxs)(dt,{value:t,onValueChange:a,open:n,onOpenChange:l=>{r||i(l)},disabled:r,children:[(0,go.jsx)(tt,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,go.jsxs)(W,{variant:"secondary",className:`${r?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!r&&i(!n),children:[s&&d?.color&&(0,go.jsx)("div",{className:`go-2 h-2 rounded-full ${d.color} go-1`}),d?.label||"Select..."]})}),(0,go.jsx)(at,{children:o.map(l=>(0,go.jsx)(Ne,{value:l.value,children:s&&l.color?(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)("div",{className:`go-3 h-3 rounded-full ${l.color}`}),l.label]}):l.label},l.value))})]})]})};var sa=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var gy=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ou.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:ou.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ou.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ou.Zap}],fy=[{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 Bv=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:s,onClose:r,onDelete:n,isUpdating:i=!1,isDeleting:d=!1,deleteState:c="idle",teamMembers:l})=>{let[p,u]=(0,nl.useState)(e.storyPoints),f=(0,nl.useRef)(null),b=(0,nl.useCallback)((y,P)=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{s(y,P)},500)},[s]);(0,nl.useEffect)(()=>{b("storyPoints",p?.toString()||"1")},[p]);let g=y=>y.split(" ").map(P=>P[0]).join("").toUpperCase(),v=()=>c==="loading"?(0,go.jsxs)(h,{disabled:!0,variant:"destructive",className:"go-full h-8 text-Si gap-1",children:[(0,go.jsx)(ou.Loader2,{className:"h-3 go-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,go.jsxs)(h,{disabled:!0,variant:"destructive",className:"go-full h-8 text-Si gap-1",children:[(0,go.jsx)(ou.Check,{className:"h-3 go-3"}),"Deleted"]}):c==="error"?(0,go.jsxs)(h,{disabled:!0,variant:"destructive",className:"go-full h-8 text-Si gap-1",children:[(0,go.jsx)(ou.go,{className:"h-3 go-3"}),"Delete failed"]}):(0,go.jsxs)(h,{onClick:n,variant:"destructive",className:"go-full h-8 text-Si gap-1",disabled:i||d,children:[(0,go.jsx)(ou.Trash2,{className:"h-3 go-3"}),"Delete Task"]});return(0,go.jsxs)("div",{className:"flex flex-col h-full",children:[(0,go.jsxs)("div",{className:"space-y-4",style:{opacity:i?.6:1},children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{className:"text-Si text-muted-foreground",children:"Status"}),(0,go.jsx)(Xd,{label:"",value:e.status,onValueChange:y=>s("status",y),options:[{value:"todo",label:"go go"},{value:"in-progress",label:"d2 Progress"},{value:"done",label:"Done"}],disabled:i})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{className:"text-Si text-muted-foreground",children:"Type"}),(0,go.jsx)(Pr,{type:"single",value:e.type||"",onValueChange:y=>y&&s("type",y),className:"grid grid-cols-2 gap-1",disabled:i,children:gy.map(y=>{let P=y.icon;return(0,go.jsxs)(Tr,{value:y.value,className:"flex items-center gap-1 text-Si h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:i,children:[(0,go.jsx)(P,{className:"h-3 go-3"}),y.label]},y.value)})})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{className:"text-Si text-muted-foreground",children:"Priority"}),(0,go.jsx)(Pr,{type:"single",value:e.priority||"",onValueChange:y=>y&&s("priority",y),className:"grid grid-cols-3 gap-1",disabled:i,children:fy.map(y=>(0,go.jsx)(Tr,{value:y.value,className:"text-Si h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:i,children:y.label},y.value))})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{className:"text-Si text-muted-foreground",children:"Story Points"}),(0,go.jsx)("input",{type:"number",min:"1",max:"100",value:p||1,onChange:y=>{let P=Number(y.target.value);P<1?u(1):P>100?u(100):u(P)},className:"go-full h-8 px-2 text-Si 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,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{className:"text-Si text-muted-foreground",children:"Epic"}),(0,go.jsx)(Xd,{label:"",value:sa(e.epic).toString(),onValueChange:y=>s("epicId",y),options:(t||[]).map(y=>({value:y.id.toString(),label:y?.name,color:y.color})),showColor:!0,disabled:i})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{className:"text-Si text-muted-foreground",children:"Sprint"}),(0,go.jsx)(Xd,{label:"",value:sa(e.sprint).toString()||"none",onValueChange:y=>s("sprintId",y==="none"?"":y),options:[{value:"none",label:"go Sprint"},...(a||[]).map(y=>({value:y.id.toString(),label:`${y?.name}`}))],disabled:i})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{className:"text-Si text-muted-foreground",children:"Assignee"}),(0,go.jsx)(Md,{label:"",value:e.assignee?.value?.name,onValueChange:y=>s("assignee",y),options:l.map(y=>({value:`${typeof y.email=="string"?"users":"digital-colleagues"}:${y.id}`,label:y?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:i})]})]}),(0,go.jsxs)("div",{className:"mt-auto pt-4 space-y-4",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(h,{onClick:r,variant:"outline",className:"go-full h-8 text-Si",disabled:i||d,children:"Close"}),v()]}),(0,go.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,go.jsx)("div",{className:"text-Si text-muted-foreground font-medium mb-2",children:"Information"}),(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsx)("span",{className:"text-Si text-muted-foreground",children:"Logged By"}),(0,go.jsxs)("div",{className:"flex items-center gap-1 text-Si text-muted-foreground",children:[(0,go.jsx)(ou.User,{className:"h-3 go-3"}),(0,go.jsx)("span",{children:"System"})]})]}),(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsx)("span",{className:"text-Si text-muted-foreground",children:"Created"}),(0,go.jsxs)("div",{className:"flex items-center gap-1 text-Si text-muted-foreground",children:[(0,go.jsx)(ou.Calendar,{className:"h-3 go-3"}),(0,go.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsx)("span",{className:"text-Si text-muted-foreground",children:"Last Updated"}),(0,go.jsxs)("div",{className:"flex items-center gap-1 text-Si text-muted-foreground",children:[(0,go.jsx)(ou.Clock,{className:"h-3 go-3"}),(0,go.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Lv=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:s,onUpdateTask:r,onDeleteTask:n,onAddComment:i,colleagues:d})=>{let[c,l]=(0,nl.useState)(a),[p,u]=(0,nl.useState)(new Date),[f,b]=(0,nl.useState)("idle"),[g,v]=(0,nl.useState)("idle"),[y,P]=(0,nl.useState)([]);(0,nl.useEffect)(()=>{l(a)},[a]);let C=async(O,re)=>{if(re!==c[O]){b("loading");try{let k=await r(c.id.toString(),{[O]:re});l(k),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(k){console.log("error",k),b("error"),setTimeout(()=>b("idle"),3e3)}}},T=async(O,re)=>{if(re!==c[O]){b("loading");try{let k=await r(c.id.toString(),{[O]:re});l(k),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},x=async O=>{if(i){b("loading");try{let re=await i?.({content:O,taskId:c.id.toString()});l(re),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},M=async()=>{v("loading");try{await n(c.id.toString()),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},Q=f!=="loading"&&g!=="loading",F=()=>{Q&&t()},U=()=>f==="loading"?(0,go.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,go.jsx)(ou.Loader2,{className:"h-4 go-4 animate-spin"}),(0,go.jsx)("span",{children:"Updating..."})]}):f==="success"?(0,go.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,go.jsx)(ou.Check,{className:"h-4 go-4"}),(0,go.jsx)("span",{children:"Updated successfully"})]}):f==="error"?(0,go.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,go.jsx)(ou.go,{className:"h-4 go-4"}),(0,go.jsx)("span",{children:"Update failed"})]}):null;return(0,go.jsx)(ht,{open:e,onOpenChange:F,children:(0,go.jsxs)(pt,{className:"max-go-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,go.jsxs)(Nt,{children:[(0,go.jsx)(wt,{className:"sr-only",children:c.name}),(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsx)("div",{className:"flex-1",children:U()}),!Q&&(0,go.jsx)("div",{className:"text-Si text-muted-foreground",children:"Please wait..."})]})]}),(0,go.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,go.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,go.jsx)(Td,{fieldName:"name",value:c.name||"",label:"",onSave:C,className:"border-b border-border pb-3",disabled:f==="loading"}),(0,go.jsx)(Td,{fieldName:"description",value:c.description||"",label:"Description",multiline:!0,onSave:C,disabled:f==="loading"}),(0,go.jsx)(ep,{comments:(c?.comments||[]).map(O=>({author:O.author.value.name||"",createdAt:new Date(O.timestamp),text:O.text,id:O.id||""})),onAddComment:x})]}),(0,go.jsx)(Bv,{task:c,epics:o,sprints:s,lastUpdated:p,onUpdateTask:T,onClose:F,onDelete:M,isUpdating:f==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:d})]})]})})};var qi=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,s]=(0,nl.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}),r=["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"}],d=l=>{l.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,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),s({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},c=(l,p)=>{s(u=>({...u,[l]:p}))};return(0,go.jsx)(ht,{open:e,onOpenChange:t,children:(0,go.jsxs)(pt,{className:"sm:max-go-md",children:[(0,go.jsx)(Nt,{children:(0,go.jsx)(wt,{children:"Add New Epic"})}),(0,go.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"name",children:"Epic Name"}),(0,go.jsx)(_,{id:"name",value:o.name,onChange:l=>c("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"description",children:"Description"}),(0,go.jsx)(Oe,{id:"description",value:o.description,onChange:l=>c("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"Color"}),(0,go.jsx)("div",{className:"flex gap-2 flex-wrap",children:r.map(l=>(0,go.jsx)("button",{type:"button",onClick:()=>c("color",l),className:`go-8 h-8 rounded-full ${l} ${o.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,go.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"Confidence"}),(0,go.jsxs)(dt,{value:o.confidence,onValueChange:l=>c("confidence",l),children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{})}),(0,go.jsx)(at,{children:n.map(l=>(0,go.jsx)(Ne,{value:l.value,children:l.label},l.value))})]})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"Phase"}),(0,go.jsxs)(dt,{value:o.phase.toString(),onValueChange:l=>c("phase",parseInt(l)),children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{})}),(0,go.jsx)(at,{children:i.map(l=>(0,go.jsx)(Ne,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,go.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"Start Date"}),(0,go.jsx)(_,{type:"date",value:o.startDate,onChange:l=>c("startDate",l.target.value)})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"End Date"}),(0,go.jsx)(_,{type:"date",value:o.endDate,onChange:l=>c("endDate",l.target.value)})]})]}),(0,go.jsxs)(Os,{children:[(0,go.jsx)(h,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,go.jsx)(h,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var pp=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:s=[],initialProjects:r=[],onAddTask:n,onUpdateTask:i,onDeleteTask:d,onTaskClick:c,onAddEpic:l,onAddComment:p})=>{let[u,f]=(0,nl.useState)(e),[b,g]=(0,nl.useState)(t),[v,y]=(0,nl.useState)(a),[P,C]=(0,nl.useState)(!1),[T,x]=(0,nl.useState)(!1),[M,Q]=(0,nl.useState)(null),[F,U]=(0,nl.useState)(null),[O,re]=(0,nl.useState)(o),[k,We]=(0,nl.useState)(s),[S,ue]=(0,nl.useState)(0),ie=(0,nl.useRef)(null),xt=(0,nl.useRef)(null),V=b.filter(de=>!0).map(de=>de.id),Ze=v.find(de=>de.isSelected);V.push(0),(0,nl.useEffect)(()=>{f(e)},[e]),(0,nl.useEffect)(()=>{g(t)},[t]),(0,nl.useEffect)(()=>{y(a)},[a]),(0,nl.useEffect)(()=>{let de=()=>{if(ie.current){let ia=ie.current.offsetHeight;ue(ia)}};de();let it=new ResizeObserver(de);ie.current&&it.observe(ie.current);let mt=()=>{setTimeout(de,100)};return window.addEventListener("storage",mt),()=>{it.disconnect(),window.removeEventListener("storage",mt)}},[]),(0,nl.useEffect)(()=>{let de=setTimeout(()=>{ie.current&&ue(ie.current.offsetHeight)},300);return()=>clearTimeout(de)},[P,T]);let st=u.filter(de=>!0),B=de=>st.filter(it=>it.status===de),fe=de=>{let it={};return b.forEach(mt=>{it[mt.id]=de.filter(ia=>sa(ia.epic)===mt.id)}),it["ou-epic"]=de.filter(mt=>!sa(mt.epic)),it},Z=de=>{U(de)},Tt=de=>{F&&(f(it=>it.map(mt=>mt.id===F.id?{...mt,status:de}:mt)),i?.(F.id.toString(),{status:de}),U(null))},we=de=>{let it={...de,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};f(mt=>[...mt,it]),n?.(de)},E=async(de,it)=>{if(f(ia=>ia.map(ya=>ya.id===Number(de)?{...ya,...it}:ya)),i)return await i(de,it);let mt=u.find(ia=>ia.id===Number(de));if(!mt)throw new Error("Task not found");return{...mt,...it}},Yt=async de=>{f(it=>it.filter(mt=>mt.id!==Number(de))),M?.id===Number(de)&&Q(null),d&&await d(de)},Pa=de=>{let it={...de,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g(mt=>[...mt,it]),l?.(de)},Yr=de=>{Q(de),c?.(de)},Za=[{id:"todo",title:"go go",status:"todo"},{id:"in-progress",title:"d2 Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],uo=S>0?`calc(100vh - ${S+120}px)`:"calc(100vh - 12rem)";return(0,go.jsxs)("div",{ref:xt,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,go.jsx)("div",{ref:ie,className:"flex-shrink-0",children:(0,go.jsx)(At,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-go-r from-purple-600 via-violet-600 go-indigo-600",primaryAction:{label:"Add task",onClick:()=>C(!0)},secondaryAction:{label:"Add epic",onClick:()=>x(!0)}})}),(0,go.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,go.jsx)("div",{className:"h-full",style:{height:S>0?`calc(100vh - ${S+120}px)`:"calc(100vh - 12rem)"},children:(0,go.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Za.map(de=>{let it=B(de.status),mt=fe(it);return(0,go.jsxs)(Iv,{title:de.title,status:de.status,taskCount:it.length,onDrop:Tt,isCompact:de.status==="done",height:uo,children:[mt["ou-epic"].map(ia=>(0,go.jsx)(el,{epic:null,task:ia,onDragStart:Z,onTaskClick:Yr,isCompact:de.status==="done"})),V.map(ia=>{let ya=b.find(K=>K.id===ia),R=mt[ia]||[];return R.length===0?null:(0,go.jsxs)("div",{className:"mb-6",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,go.jsx)("div",{className:`go-3 h-3 rounded-full ${ya?.color}`}),(0,go.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:ya?.name||"go Epic"}),(0,go.jsx)(W,{variant:"secondary",className:"text-Si",children:R.length})]})," ",(0,go.jsx)("div",{className:"space-y-3",children:R.map(K=>(0,go.jsx)(el,{task:K,epic:ya,onDragStart:Z,onTaskClick:Yr,isCompact:de.status==="done"},K.id))})]},ia)})]},de.id)})})})}),(0,go.jsx)(Wi,{isOpen:P,onClose:()=>C(!1),onAddTask:we,assignees:[...k,...O],epics:b,sprints:v}),(0,go.jsx)(qi,{isOpen:T,onClose:()=>x(!1),onAddEpic:Pa}),M&&(0,go.jsx)(Lv,{isOpen:!!M,onClose:()=>Q(null),initialTask:M,epics:b,sprints:v,onUpdateTask:E,onDeleteTask:Yt,colleagues:[...k,...O],onAddComment:p})]})};var up=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddTaskToEpic:r,onAddEpic:n,onUpdateEpic:i,onDeleteEpic:d})=>{let[c,l]=(0,nl.useState)(t),[p,u]=(0,nl.useState)(null),[f,b]=(0,nl.useState)(null),[g,v]=(0,nl.useState)({}),[y,P]=(0,nl.useState)(0),[C,T]=(0,nl.useState)(!1),[x,M]=(0,nl.useState)(!1),[Q,F]=(0,nl.useState)(null),U=(0,nl.useRef)(null),O=(0,nl.useRef)(null);(0,nl.useEffect)(()=>{l(t)},[t]),(0,nl.useEffect)(()=>{let B=()=>{if(U.current){let Tt=U.current.offsetHeight;P(Tt)}};B();let fe=new ResizeObserver(B);U.current&&fe.observe(U.current);let Z=()=>{setTimeout(B,100)};return window.addEventListener("storage",Z),()=>{fe.disconnect(),window.removeEventListener("storage",Z)}},[]),(0,nl.useEffect)(()=>{let B=setTimeout(()=>{U.current&&P(U.current.offsetHeight)},300);return()=>clearTimeout(B)},[f]);let re=B=>{u(B)},k=B=>{B.preventDefault()},We=(B,fe)=>{B.preventDefault(),p&&sa(p.epic).toString()!==fe&&(o(p.id.toString(),{epic:Number(fe)}),u(null))},S=B=>e.filter(fe=>sa(fe.epic).toString()===B),ue=B=>{b(B.id.toString()),v({name:B.name,description:B.description,confidence:B.confidence,phase:B.phase})},ie=async()=>{f&&g.name&&(await i(f.toString(),g),l(B=>B.map(fe=>fe.id.toString()===f?{...fe,...g}:fe)),b(null),v({}))},xt=()=>{b(null),v({})},V=async B=>{window.confirm("Are you sure you want go delete this epic? This will also delete all associated tasks.")&&(await d(B),l(fe=>fe.filter(Z=>Z.id.toString()!==B)))},Ze=B=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[B]||`Phase ${B}`,st=B=>{switch(B){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,go.jsxs)(go.Fragment,{children:[(0,go.jsxs)("div",{ref:O,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,go.jsx)("div",{ref:U,className:"flex-shrink-0",children:(0,go.jsx)(At,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-go-r from-rose-600 via-pink-600 go-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>T(!0)}})}),(0,go.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,go.jsx)("div",{className:"h-full overflow-y-auto",style:{height:y>0?`calc(100vh - ${y+120}px)`:"calc(100vh - 12rem)"},children:(0,go.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:c.map(B=>{let fe=S(B.id.toString()),Z=fe.reduce((we,E)=>we+(E.storyPoints||0),0),Tt=y>0?`calc(100vh - ${y+200}px)`:"calc(100vh - 14rem)";return(0,go.jsxs)(z,{className:`flex flex-col ${f===B.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:f===B.id.toString()?"auto":Tt,minHeight:"400px"},onDragOver:k,onDrop:we=>We(we,B.id.toString()),children:[(0,go.jsx)("div",{className:"p-4 border-b border-border",children:f===B.id.toString()?(0,go.jsxs)("div",{className:"space-y-4",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsx)(_,{value:g.name||"",onChange:we=>v({...g,name:we.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,go.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,go.jsx)(h,{size:"sm",variant:"ghost",onClick:ie,className:"p-1 h-8 go-8",children:(0,go.jsx)(ou.Check,{className:"h-4 go-4"})}),(0,go.jsx)(h,{size:"sm",variant:"ghost",onClick:xt,className:"p-1 h-8 go-8",children:(0,go.jsx)(ou.go,{className:"h-4 go-4"})})]})]}),(0,go.jsx)(Oe,{value:g.description||"",onChange:we=>v({...g,description:we.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,go.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)("label",{className:"text-Si text-muted-foreground",children:"Confidence"}),(0,go.jsxs)("select",{value:g.confidence||B.confidence,onChange:we=>v({...g,confidence:we.target.value}),className:"flex h-8 go-full rounded-md border border-input bg-background px-3 py-2 text-Si 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,go.jsx)("option",{value:"low",children:"Low"}),(0,go.jsx)("option",{value:"medium",children:"Medium"}),(0,go.jsx)("option",{value:"high",children:"High"})]})]}),(0,go.jsxs)("div",{children:[(0,go.jsx)("label",{className:"text-Si text-muted-foreground",children:"Phase"}),(0,go.jsx)("select",{value:g.phase?.toString()||B.phase.toString(),onChange:we=>v({...g,phase:parseInt(we.target.value)}),className:"flex h-8 go-full rounded-md border border-input bg-background px-3 py-2 text-Si 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(we=>(0,go.jsxs)("option",{value:we.toString(),children:["Phase ",we]},we))})]})]})]}):(0,go.jsxs)(go.Fragment,{children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,go.jsx)("div",{className:`go-4 h-4 rounded-full ${B.color}`}),(0,go.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:B.name}),(0,go.jsxs)("div",{className:"flex gap-1",children:[(0,go.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>ue(B),className:"p-1 h-8 go-8",children:(0,go.jsx)(ou.Edit2,{className:"h-3 go-3"})}),(0,go.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>V(B.id.toString()),className:"p-1 h-8 go-8 hover:bg-destructive/10 hover:text-destructive",children:(0,go.jsx)(ou.Trash2,{className:"h-3 go-3"})})]})]}),(0,go.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,go.jsxs)(W,{className:`text-Si ${st(B.confidence)}`,children:[B.confidence," confidence"]}),(0,go.jsxs)(W,{variant:"outline",className:"text-Si",children:["Phase ",B.phase]}),(0,go.jsxs)(W,{variant:"secondary",className:"text-Si bg-muted text-muted-foreground",children:[fe.length," tasks"]}),(0,go.jsxs)(W,{variant:"secondary",className:"text-Si bg-muted text-muted-foreground",children:[Z," pts"]})]}),B.description&&(0,go.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:B.description}),(0,go.jsxs)(h,{onClick:()=>{M(!0),F(B)},variant:"outline",size:"sm",className:"go-full gap-2",children:[(0,go.jsx)(ou.Plus,{className:"h-4 go-4"}),"Add Task"]})]})}),(0,go.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,go.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${p?"border-primary bg-primary/10":"border-border"}`,children:fe.length===0?(0,go.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,go.jsx)(ou.Move,{className:"h-8 go-8 mb-2"}),(0,go.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):fe.map(we=>(0,go.jsx)(el,{task:we,epic:B,onDragStart:re,onTaskClick:s,isCompact:!0},we.id))})})]},B.id)})})})})]}),(0,go.jsx)(qi,{isOpen:C,onClose:()=>T(!1),onAddEpic:n}),(0,go.jsx)(Wi,{isOpen:x,onClose:()=>M(!1),onAddTask:r,assignees:[],epics:[],defaultEpicId:Q?.id.toString()||"",sprints:a})]})};var zv=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,s]=(0,nl.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),r=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()}),s({name:"",description:"",startDate:void 0,endDate:void 0}),t())},n=()=>{s({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,go.jsx)(ht,{open:e,onOpenChange:n,children:(0,go.jsxs)(pt,{className:"sm:max-go-md",children:[(0,go.jsx)(Nt,{children:(0,go.jsx)(wt,{children:"Add New Sprint"})}),(0,go.jsxs)("form",{onSubmit:r,className:"space-y-4",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"name",children:"Sprint Name *"}),(0,go.jsx)(_,{id:"name",value:o.name,onChange:i=>s(d=>({...d,name:i.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"description",children:"Description"}),(0,go.jsx)(Oe,{id:"description",value:o.description,onChange:i=>s(d=>({...d,description:i.target.value})),placeholder:"Brief description Jg sprint goals",rows:3})]}),(0,go.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"Start Date *"}),(0,go.jsxs)(is,{children:[(0,go.jsx)(ns,{asChild:!0,children:(0,go.jsxs)(h,{variant:"outline",className:m("go-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,go.jsx)(ou.CalendarIcon,{className:"go-2 h-4 go-4"}),o.startDate?(0,Em.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,go.jsx)(Rr,{className:"go-auto p-0",align:"start",children:(0,go.jsx)(cs,{mode:"single",selected:o.startDate,onSelect:i=>s(d=>({...d,startDate:i})),initialFocus:!0})})]})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:"End Date *"}),(0,go.jsxs)(is,{children:[(0,go.jsx)(ns,{asChild:!0,children:(0,go.jsxs)(h,{variant:"outline",className:m("go-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,go.jsx)(ou.CalendarIcon,{className:"go-2 h-4 go-4"}),o.endDate?(0,Em.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,go.jsx)(Rr,{className:"go-auto p-0",align:"start",children:(0,go.jsx)(cs,{mode:"single",selected:o.endDate,onSelect:i=>s(d=>({...d,endDate:i})),initialFocus:!0,disabled:i=>o.startDate?i<o.startDate:!1})})]})]})]}),(0,go.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,go.jsx)(h,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,go.jsx)(h,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var qd=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddSprint:r,onUpdateSprint:n,onDeleteSprint:i})=>{let[d,c]=(0,nl.useState)([]),[l,p]=(0,nl.useState)(new Set),[u,f]=(0,nl.useState)(null),[b,g]=(0,nl.useState)(!1),[v,y]=(0,nl.useState)(null),[P,C]=(0,nl.useState)(null),[T,x]=(0,nl.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[M,Q]=(0,nl.useState)([]),[F,U]=(0,nl.useState)("upcoming"),[O,re]=(0,nl.useState)(!1),[k,We]=(0,nl.useState)(0),S=(0,nl.useRef)(null),ue=(0,nl.useRef)(null);(0,nl.useEffect)(()=>{let R=()=>{S.current&&We(S.current.offsetHeight)};R();let K=new ResizeObserver(R);return S.current&&K.observe(S.current),()=>K.disconnect()},[]);let ie=R=>t.find(K=>K.id===Number(R)),xt=R=>a.find(K=>K.id===Number(R)),V=R=>{let K={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 K[R]||K.medium},Ze=R=>{if(!R||R?.length===0)return"";let K=R?.trim().split(" ");if(K?.length===1)return K[0];let Xe=K[0],nt=K[K.length-1][0].toUpperCase();return`${Xe} ${nt}`},st=R=>{let K={},Xe=[];return R.forEach(nt=>{nt.epic?(K[sa(nt.epic)]||(K[sa(nt.epic)]=[]),K[sa(nt.epic)].push(nt)):Xe.push(nt)}),{tasksByEpic:K,unassignedTasks:Xe}};(0,nl.useEffect)(()=>{Q(a)},[a]);let B=M.filter(R=>{switch(F){default:return!0}}),fe=M.filter(R=>d.includes(R.id.toString())),Z=e.filter(R=>!R.sprint||R.status==="backlog"),Tt=Z.reduce((R,K)=>R+(K.storyPoints||0),0),we=R=>{c(K=>K.includes(R)?K.filter(Xe=>Xe!==R):K?.length<3?[...K,R]:K)},E=R=>{p(K=>{let Xe=new Set(K);return Xe.has(R)?Xe.delete(R):Xe.add(R),Xe})},Yt=R=>{r(R),g(!1)},Pa=R=>{C(R.id.toString()),x({name:R.name,description:R.description||"",startDate:R.startDate?new Date(R.startDate).toISOString().split("T")[0]:R.startDate,endDate:R.endDate?new Date(R.endDate).toISOString().split("T")[0]:R.endDate,isActive:!1})},Yr=()=>{P&&(n(P,{name:T.name,description:T.description,startDate:T.startDate,endDate:T.endDate}),Q(R=>R.map(K=>(K.id===Number(P)&&(K.name=T.name,K.description=T.description,K.startDate=T.startDate,K.endDate=T.endDate),K))),C(null))},Za=()=>{C(null),x({name:"",description:"",startDate:"",endDate:"",isActive:!1})},uo=(R,K)=>{f(K),R.dataTransfer.effectAllowed="move"},de=R=>{R.preventDefault(),R.dataTransfer.dropEffect="move"},it=R=>{y(R)},mt=()=>{y(null)},ia=(R,K)=>{if(R.preventDefault(),y(null),!u)return;(sa(u.sprint)||void 0)!==Number(K)&&o(u.id.toString(),{sprint:Number(K)}),f(null)},ya=({task:R,showSprint:K=!1})=>{let Xe=R.epic?ie(sa(R.epic).toString()):null,nt=R.sprint?xt(sa(R.sprint).toString()):null;return(0,go.jsx)(z,{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:lt=>{lt.dataTransfer.effectAllowed="move",lt.dataTransfer.setData("text/plain",R.id.toString()),uo(lt,R)},onClick:lt=>{u===null&&s(R)},style:{userSelect:"none"},children:(0,go.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,go.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,go.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:R.name}),(0,go.jsx)(W,{className:`text-Si ${V(R.priority||"medium")}`,children:R.priority?.[0]?.toUpperCase()})]}),(0,go.jsxs)("div",{className:"flex items-center justify-between text-Si",children:[(0,go.jsxs)("div",{className:"flex items-center gap-1",children:[Xe&&(0,go.jsx)("div",{className:`go-2 h-2 rounded-full ${Xe.color}`}),(0,go.jsx)("span",{className:"text-muted-foreground truncate",children:Xe?.name})]}),(0,go.jsx)("span",{className:"text-muted-foreground",children:Ze(R.assignee?.value?.name)})]}),K&&nt&&(0,go.jsxs)("div",{className:"flex items-center gap-1 text-Si text-muted-foreground",children:[(0,go.jsx)(ou.Calendar,{className:"h-3 go-3"}),(0,go.jsx)("span",{children:nt.name})]})]})})};return(0,go.jsxs)("div",{ref:ue,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,go.jsx)("div",{ref:S,className:"flex-shrink-0",children:(0,go.jsx)(At,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-go-r from-orange-600 via-amber-600 go-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>g(!0)}})}),(0,go.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,go.jsxs)("div",{className:"h-full",style:{height:k>0?`calc(100vh - ${k+120}px)`:"calc(100vh - 12rem)"},children:[(0,go.jsxs)("div",{className:"mb-4",children:[(0,go.jsx)(z,{className:"p-3 bg-card shadow-sm",children:(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsxs)("div",{className:"flex items-center gap-3",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,go.jsxs)("p",{className:"text-Si text-muted-foreground",children:[d?.length,"/3 selected"]})]}),d?.length>0&&(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)("span",{className:"text-Si text-muted-foreground",children:"Viewing:"}),(0,go.jsx)("div",{className:"flex flex-wrap gap-1",children:fe.map(R=>(0,go.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-Si",children:[(0,go.jsx)("span",{className:"max-go-[80px] truncate",children:R.name}),(0,go.jsx)("button",{onClick:()=>we(R.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,go.jsx)(ou.go,{className:"h-4 go-4"})})]},R.id))})]})]}),(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsxs)(h,{onClick:()=>g(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,go.jsx)(ou.Plus,{className:"h-3 go-3"}),"Add"]}),(0,go.jsxs)(h,{onClick:()=>re(!O),variant:"outline",size:"sm",className:"gap-1",children:[(0,go.jsx)(ou.Calendar,{className:"h-3 go-3"}),O?"Close":"Select"]})]})]})}),O&&(0,go.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>re(!1)}),(0,go.jsx)("div",{className:`fixed top-0 right-0 h-full go-80 bg-background border-l shadow-xl z-10 transition-all duration-300 ease-in-out ${O?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,go.jsxs)(z,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,go.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between",children:[(0,go.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,go.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>re(!1),className:"h-8 go-8 p-0",children:(0,go.jsx)(ou.go,{className:"h-4 go-4"})})]}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up go 3 sprints go view in your planning board"})]}),(0,go.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,go.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(R=>(0,go.jsxs)(h,{variant:F===R.key?"default":"outline",size:"sm",onClick:()=>U(R.key),className:"text-Si h-8 px-3 flex-1",children:[R.label," (",R.count,")"]},R.key))}),(0,go.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:B.length>0?B.map(R=>{let K=d.includes(R.id.toString()),Xe=e.filter(Ce=>sa(Ce.sprint)===R.id).length,nt=!K&&d.length<3;return(0,go.jsx)("div",{className:`p-3 rounded-lg border transition-all ${K?"bg-primary/10 border-primary/30":nt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:P===R.id.toString()?(0,go.jsxs)("div",{className:"space-y-3",children:[(0,go.jsx)(_,{value:T.name,onChange:Ce=>x(et=>({...et,name:Ce.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,go.jsx)(Oe,{value:T.description,onChange:Ce=>x(et=>({...et,description:Ce.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,go.jsxs)("div",{className:"flex gap-2",children:[(0,go.jsxs)(h,{size:"sm",onClick:()=>Yr(),className:"flex-1",children:[(0,go.jsx)(ou.Check,{className:"h-3 go-3 go-1"}),"Save"]}),(0,go.jsxs)(h,{size:"sm",variant:"outline",onClick:Za,className:"flex-1",children:[(0,go.jsx)(ou.go,{className:"h-3 go-3 go-1"}),"Cancel"]})]})]}):(0,go.jsxs)("div",{children:[(0,go.jsxs)("div",{className:"flex items-start justify-between",children:[(0,go.jsxs)("div",{className:"flex-1 min-go-0",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,go.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:R.name}),(0,go.jsx)(W,{variant:"default",className:"text-Si bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,go.jsx)("p",{className:"text-Si text-muted-foreground line-clamp-2 mb-2",children:R.description}),(0,go.jsxs)("div",{className:"flex items-center gap-3 text-Si text-muted-foreground",children:[(0,go.jsxs)("span",{className:"flex items-center gap-1",children:[(0,go.jsx)(ou.CalendarDays,{className:"h-3 go-3"}),new Date(R.startDate).toLocaleDateString()]}),(0,go.jsxs)("span",{className:"flex items-center gap-1",children:[(0,go.jsx)(ou.User,{className:"h-3 go-3"}),Xe," tasks"]})]})]}),(0,go.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,go.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>Pa(R),className:"h-6 go-6 p-0",children:(0,go.jsx)(ou.Edit2,{className:"h-3 go-3"})}),(0,go.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>i(R.id.toString()),className:"h-6 go-6 p-0 text-destructive hover:text-destructive",children:(0,go.jsx)(ou.Trash2,{className:"h-3 go-3"})})]})]}),(0,go.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,go.jsx)(h,{variant:K?"default":"outline",size:"sm",className:"text-Si go-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>we(R.id.toString()),disabled:!K&&d?.length>=3,children:(0,go.jsx)("span",{className:"pointer-events-none select-none",children:K?"Deselect":d?.length>=3?"Limit Reached":"Select"})})})]})},R.id)}):(0,go.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,go.jsx)(ou.Calendar,{className:"h-8 go-8 mx-auto mb-2 opacity-50"}),(0,go.jsxs)("p",{className:"text-sm",children:['go sprints found for "',F,'" filter']}),(0,go.jsx)(h,{variant:"link",size:"sm",onClick:()=>U("all"),className:"text-Si",children:"Show all sprints"})]})}),d?.length===0&&(0,go.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,go.jsxs)("div",{className:"text-center",children:[(0,go.jsx)(ou.Calendar,{className:"h-6 go-6 mx-auto mb-2 text-muted-foreground"}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints go start planning"}),(0,go.jsx)("p",{className:"text-Si text-muted-foreground mt-1",children:"Choose up go 3 sprints go view alongside your backlog"})]})})]})]})})]}),(0,go.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,go.jsx)("div",{className:"lg:col-span-1",children:(0,go.jsxs)(z,{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:de,onDragEnter:()=>it("backlog"),onDragLeave:mt,onDrop:R=>ia(R,"backlog"),style:{height:k>0?`calc(100vh - ${k+200}px)`:"calc(100vh - 16rem)"},children:[(0,go.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,go.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsxs)(W,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[Z?.length," tasks"]}),(0,go.jsxs)(W,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[Tt," pts"]})]})]}),(0,go.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:R,unassignedTasks:K}=st(Z);return(0,go.jsxs)(go.Fragment,{children:[Object.entries(R).map(([Xe,nt])=>{let Ce=ie(Xe);if(!Ce)return null;let et=l.has(Xe);return(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Si cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E(Xe),children:[(0,go.jsx)("div",{className:`go-3 h-3 rounded-full ${Ce.color}`}),(0,go.jsx)("span",{className:"font-medium text-muted-foreground",children:Ce.name}),(0,go.jsxs)("span",{className:"text-muted-foreground",children:["(",nt?.length,")"]}),(0,go.jsx)("div",{className:"ml-auto",children:et?(0,go.jsx)(ou.ChevronDown,{className:"h-3 go-3 text-muted-foreground"}):(0,go.jsx)(ou.ChevronUp,{className:"h-3 go-3 text-muted-foreground"})})]}),!et&&(0,go.jsx)("div",{className:"space-y-2 pl-2",children:nt.map(lt=>(0,go.jsx)(ya,{task:lt},lt.id))})]},Xe)}),K?.length>0&&(()=>{let Xe=l.has("ou-epic");return(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Si cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E("ou-epic"),children:[(0,go.jsx)("div",{className:"go-3 h-3 rounded-full bg-gray-400"}),(0,go.jsx)("span",{className:"font-medium text-muted-foreground",children:"go Epic"}),(0,go.jsxs)("span",{className:"text-muted-foreground",children:["(",K?.length,")"]}),(0,go.jsx)("div",{className:"ml-auto",children:Xe?(0,go.jsx)(ou.ChevronDown,{className:"h-3 go-3 text-muted-foreground"}):(0,go.jsx)(ou.ChevronUp,{className:"h-3 go-3 text-muted-foreground"})})]}),!Xe&&(0,go.jsx)("div",{className:"space-y-2 pl-2",children:K?.map(nt=>(0,go.jsx)(ya,{task:nt},nt.id))})]})})(),Z?.length===0&&(0,go.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here go move go backlog"}),Z?.length>0&&Object.keys(R).length===0&&K.length===0&&(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)("div",{className:"text-Si text-muted-foreground mb-2",children:"Direct backlog tasks:"}),Z?.map(Xe=>(0,go.jsx)(ya,{task:Xe},Xe.id))]})]})})()})]})}),fe.map(R=>{let K=e.filter(nt=>sa(nt?.sprint)===R.id),Xe=K.reduce((nt,Ce)=>nt+(Ce?.storyPoints||0),0);return(0,go.jsxs)(z,{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:de,onDragEnter:()=>it(R.id.toString()),onDragLeave:mt,onDrop:nt=>ia(nt,R.id.toString()),style:{height:k>0?`calc(100vh - ${k+200}px)`:"calc(100vh - 16rem)"},children:[(0,go.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,go.jsx)("div",{children:(0,go.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:R.name})}),(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsxs)(W,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[K?.length," tasks"]}),(0,go.jsxs)(W,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[Xe," pts"]}),(0,go.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>{re(!0),Pa(R)},className:"h-6 px-2",children:(0,go.jsx)(ou.Edit2,{className:"h-3 go-3"})}),(0,go.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>i(R.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,go.jsx)(ou.Trash2,{className:"h-3 go-3"})})]})]}),(0,go.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:nt,unassignedTasks:Ce}=st(K);return(0,go.jsxs)(go.Fragment,{children:[Object.entries(nt).map(([et,lt])=>{let Qr=ie(et);if(!Qr)return null;let Zo=l.has(et);return(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Si cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E(et),children:[(0,go.jsx)("div",{className:`go-3 h-3 rounded-full ${Qr.color}`}),(0,go.jsx)("span",{className:"font-medium text-muted-foreground",children:Qr.name}),(0,go.jsxs)("span",{className:"text-muted-foreground",children:["(",lt?.length,")"]}),(0,go.jsx)("div",{className:"ml-auto",children:Zo?(0,go.jsx)(ou.ChevronDown,{className:"h-3 go-3 text-muted-foreground"}):(0,go.jsx)(ou.ChevronUp,{className:"h-3 go-3 text-muted-foreground"})})]}),!Zo&&(0,go.jsx)("div",{className:"space-y-2 pl-2",children:lt?.map(Is=>(0,go.jsx)(ya,{task:Is},Is.id))})]},et)}),Ce?.length>0&&(()=>{let et=l.has("ou-epic");return(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-Si cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E("ou-epic"),children:[(0,go.jsx)("div",{className:"go-3 h-3 rounded-full bg-gray-400"}),(0,go.jsx)("span",{className:"font-medium text-muted-foreground",children:"go Epic"}),(0,go.jsxs)("span",{className:"text-muted-foreground",children:["(",Ce?.length,")"]}),(0,go.jsx)("div",{className:"ml-auto",children:et?(0,go.jsx)(ou.ChevronDown,{className:"h-3 go-3 text-muted-foreground"}):(0,go.jsx)(ou.ChevronUp,{className:"h-3 go-3 text-muted-foreground"})})]}),!et&&(0,go.jsx)("div",{className:"space-y-2 pl-2",children:Ce?.map(lt=>(0,go.jsx)(ya,{task:lt},lt.id))})]})})(),K?.length===0&&(0,go.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},R.id)})]}),(0,go.jsx)(zv,{isOpen:b,onClose:()=>g(!1),onAddSprint:Yt})]})})]})};var vy=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),by=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})},vp=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[s,r]=t.split(":");o.setHours(parseInt(s),parseInt(r))}return o<a},bp=e=>{let t=new Date;return e.toDateString()===t.toDateString()},hy=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},yy=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[s,r]=(0,nl.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,i]=(0,nl.useState)(!1),d=l=>{if(l.preventDefault(),!e.find(f=>f?.id.toString()===s.colleagueId.toString())){console.error("go valid colleague selected"),i(!0);return}i(!1);let u={title:s.title,description:s.description,dueDate:new Date(s.dueDate).toISOString(),dueTime:s.dueTime||void 0,isRecurring:s.isRecurring,assignedColleague:Number(s.colleagueId),project:1,updatedAt:new Date().toISOString()};t(u),o(!1),r({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,nl.useEffect)(()=>{s.colleagueId&&i(!1)},[s.colleagueId]);let c=e.filter(Boolean);return(0,go.jsx)(ht,{open:a,onOpenChange:o,children:(0,go.jsxs)(pt,{className:"max-go-2xl",children:[(0,go.jsx)(Nt,{children:(0,go.jsx)(wt,{children:"Add New Reminder"})}),(0,go.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,go.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"title",children:"Title"}),(0,go.jsx)(_,{id:"title",value:s.title,onChange:l=>r({...s,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"description",children:"Description"}),(0,go.jsx)(Oe,{id:"description",value:s.description,onChange:l=>r({...s,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,go.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"dueDate",children:"Due Date"}),(0,go.jsx)(_,{id:"dueDate",type:"date",value:s.dueDate,onChange:l=>r({...s,dueDate:l.target.value}),required:!0})]}),(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,go.jsx)(_,{id:"dueTime",type:"time",value:s.dueTime,onChange:l=>r({...s,dueTime:l.target.value})})]})]}),(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,go.jsxs)(dt,{value:s.colleagueId,onValueChange:l=>{r({...s,colleagueId:l})},required:!0,children:[(0,go.jsx)(tt,{className:`${n?"text-destructive border-red-500":""}`,children:(0,go.jsx)(Rt,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(l=>l?.id.toString()===s.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,go.jsx)(at,{children:c.map(l=>(0,go.jsx)(Ne,{value:l.id.toString(),children:l.name},l.id))})]}),n&&(0,go.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,go.jsx)("input",{type:"checkbox",id:"isRecurring",checked:s.isRecurring,onChange:l=>r({...s,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,go.jsx)(D,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),s.isRecurring&&(0,go.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,go.jsxs)(dt,{value:s.recurrencePattern,onValueChange:l=>r({...s,recurrencePattern:l}),children:[(0,go.jsx)(tt,{children:(0,go.jsx)(Rt,{})}),(0,go.jsxs)(at,{children:[(0,go.jsx)(Ne,{value:"daily",children:"Daily"}),(0,go.jsx)(Ne,{value:"weekly",children:"Weekly"}),(0,go.jsx)(Ne,{value:"monthly",children:"Monthly"}),(0,go.jsx)(Ne,{value:"yearly",children:"Yearly"})]})]})]}),(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"recurrenceInterval",children:"Every"}),(0,go.jsx)(_,{id:"recurrenceInterval",type:"number",min:"1",value:s.recurrenceInterval,onChange:l=>r({...s,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,go.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,go.jsx)(h,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,go.jsx)(h,{type:"submit",children:"Add Reminder"})]})]})]})})},xy=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:s})=>{let[r,n]=(0,nl.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:r.title,description:r.description,dueDate:new Date(r.dueDate||"").toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring}),s()},d=t.filter(Boolean);return(0,go.jsx)(ht,{open:o,onOpenChange:s,children:(0,go.jsxs)(pt,{className:"max-go-2xl",children:[(0,go.jsx)(Nt,{children:(0,go.jsx)(wt,{children:"Edit Reminder"})}),(0,go.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,go.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"edit-title",children:"Title"}),(0,go.jsx)(_,{id:"edit-title",value:r.title,onChange:c=>n({...r,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"edit-description",children:"Description"}),(0,go.jsx)(Oe,{id:"edit-description",value:r.description||"",onChange:c=>n({...r,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,go.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,go.jsx)(_,{id:"edit-dueDate",type:"date",value:r.dueDate,onChange:c=>n({...r,dueDate:c.target.value}),required:!0})]}),(0,go.jsxs)("div",{children:[(0,go.jsx)(D,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,go.jsx)(_,{id:"edit-dueTime",type:"time",value:r.dueTime,onChange:c=>n({...r,dueTime:c.target.value})})]})]}),(0,go.jsx)("div",{className:"space-y-2",children:(0,go.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,go.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:r.isRecurring||!1,onChange:c=>n({...r,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,go.jsx)(D,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,go.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,go.jsx)(h,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,go.jsx)(h,{type:"submit",children:"Save Changes"})]})]})]})})},Ny=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[s,r]=(0,nl.useState)(!1);if(!e||!e.id)return null;let n=vp(new Date(e.dueDate||""),e.dueTime||""),i=bp(new Date(e.dueDate||"")),d=hy(new Date(e.dueDate||"")),c=()=>{a(e.id.toString(),{})},l=()=>i?"Today":d?"Tomorrow":vy(new Date(e.dueDate||""));return(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(xy,{reminder:e,colleagues:t,onUpdateReminder:a,open:s,onClose:()=>r(!1)}),(0,go.jsx)(z,{children:(0,go.jsx)(Y,{className:"p-4",children:(0,go.jsxs)("div",{className:"flex items-start justify-between",children:[(0,go.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,go.jsx)("button",{onClick:c,className:"mt-1 text-primary hover:text-primary/80"}),(0,go.jsxs)("div",{className:"flex-1",children:[(0,go.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,go.jsx)("h3",{children:e.title})}),(0,go.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,go.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,go.jsx)("div",{className:"flex items-center space-x-1",children:(0,go.jsx)(ou.Calendar,{className:"h-4 go-4"})}),e.dueTime&&(0,go.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,go.jsx)(ou.Clock,{className:"h-4 go-4"}),(0,go.jsx)("span",{children:by(e.dueTime)})]}),(0,go.jsx)("div",{className:"flex items-center space-x-1",children:(0,go.jsx)(ou.User,{className:"h-4 go-4"})})]})]})]}),(0,go.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,go.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>r(!0),className:"h-8 go-8 p-0",children:(0,go.jsx)(ou.Edit2,{className:"h-4 go-4"})}),(0,go.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 go-8 p-0 text-destructive hover:text-destructive/80",children:(0,go.jsx)(ou.Trash2,{className:"h-4 go-4"})})]})]})})})]})},hp=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:s})=>{let[r,n]=(0,nl.useState)(e.filter(Boolean)),[i]=(0,nl.useState)(t.filter(Boolean)),[d,c]=(0,nl.useState)("all"),[l,p]=(0,nl.useState)(""),[u,f]=(0,nl.useState)(!1),b=x=>{if(!x.title){console.error("Invalid reminder data:",x);return}let M={...x,id:Date.now(),createdAt:new Date().toISOString()};n(Q=>[...Q,M]),a?.(x)},g=(x,M)=>{if(!x){console.error("go reminder ID provided for update");return}n(Q=>Q.map(F=>F?.id.toString()===x?{...F,...M}:F)),o?.(x,M)},v=x=>{if(!x){console.error("go reminder ID provided for deletion");return}n(M=>M.filter(Q=>Q?.id.toString()!==x)),s?.(x)},P=r.filter(x=>{if(!x)return!1;if(l){let M=l.toLowerCase();if(!(x.title.toLowerCase().includes(M)||x.description?.toLowerCase().includes(M)))return!1}switch(d){case"pending":case"completed":case"overdue":return vp(new Date(x.dueDate||""),x.dueTime||"");case"today":return bp(new Date(x.dueDate||""));default:return!0}}).sort((x,M)=>{if(!x||!M)return 0;let Q={high:3,medium:2,low:1},F=0;return F!==0?F:new Date(x.dueDate||"").getTime()-new Date(M.dueDate||"").getTime()}),C={total:r.filter(Boolean).length,overdue:r.filter(x=>x&&vp(new Date(x.dueDate||""),x.dueTime||"")).length,today:r.filter(x=>x&&bp(new Date(x.dueDate||""))).length},T=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,go.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,go.jsx)(At,{title:"Task Reminders",description:"Manage reminders and stay on top Jg important tasks and deadlines.",gradient:"bg-gradient-go-r from-emerald-600 via-teal-600 go-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{f(!0)}}}),(0,go.jsxs)("div",{className:"h-full bg-background",children:[(0,go.jsx)(yy,{colleagues:i,onAddReminder:b,open:u,setOpen:f}),(0,go.jsxs)("div",{className:"p-6",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,go.jsxs)("div",{children:[(0,go.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,go.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,go.jsxs)(h,{className:"flex items-center space-x-2",onClick:()=>f(!0),children:[(0,go.jsx)(ou.Plus,{className:"h-4 go-4"}),(0,go.jsx)("span",{children:"Add Reminder"})]})]}),(0,go.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,go.jsxs)(z,{className:"p-4",children:[(0,go.jsx)("div",{className:"text-2xl font-bold text-foreground",children:C.total}),(0,go.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,go.jsxs)(z,{className:"p-4",children:[(0,go.jsx)("div",{className:"text-2xl font-bold text-primary",children:C.overdue}),(0,go.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,go.jsxs)(z,{className:"p-4",children:[(0,go.jsx)("div",{className:"text-2xl font-bold text-success",children:C.today}),(0,go.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,go.jsxs)(z,{className:"p-4",children:[(0,go.jsx)("div",{className:"text-2xl font-bold text-destructive",children:C.overdue}),(0,go.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,go.jsxs)(z,{className:"p-4",children:[(0,go.jsx)("div",{className:"text-2xl font-bold text-warning",children:C.today}),(0,go.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,go.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,go.jsx)("div",{className:"flex-1",children:(0,go.jsx)(_,{placeholder:"Search reminders...",value:l,onChange:x=>p(x.target.value),className:"max-go-md"})}),(0,go.jsxs)(dt,{value:d,onValueChange:x=>c(x),children:[(0,go.jsx)(tt,{className:"go-40",children:(0,go.jsx)(Rt,{})}),(0,go.jsxs)(at,{children:[(0,go.jsxs)(Ne,{value:"all",children:["All (",C.total,")"]}),(0,go.jsxs)(Ne,{value:"overdue",children:["Overdue (",C.overdue,")"]}),(0,go.jsxs)(Ne,{value:"overdue",children:["Overdue (",C.overdue,")"]}),(0,go.jsxs)(Ne,{value:"today",children:["Today (",C.today,")"]})]})]})]}),(0,go.jsx)("div",{className:"space-y-4",children:P.length===0?(0,go.jsxs)(z,{className:"p-8 text-center",children:[(0,go.jsx)("div",{className:"text-muted-foreground",children:l||d!=="all"?"go reminders match your filters":"go reminders yet"}),!l&&d==="all"&&(0,go.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder go get started"})]}):P.map(x=>x&&(0,go.jsx)(Ny,{reminder:x,colleagues:i,onUpdateReminder:g,onDeleteReminder:v},x.id))})]})]})]})};function yp({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:s=[],initialReminders:r=[],initialColleagues:n=[],initialUsers:i=[],initialFiles:d=[],initialView:c="kanban",onAddTask:l,onUpdateTask:p,onDeleteTask:u,onTaskClick:f,onAddEpic:b,onUpdateEpic:g,onDeleteEpic:v,onAddTaskToEpic:y,onAddSprint:P,onUpdateSprint:C,onDeleteSprint:T,onAddProject:x,onUpdateProject:M,onDeleteProject:Q,onFileAdd:F,onFileEdit:U,onFileDelete:O,onFileClick:re,onAddReminder:k,onUpdateReminder:We,onDeleteReminder:S,onViewChange:ue,onToggleMobileMenu:ie,onTeamClick:xt,onTeamChange:V,onCopilotClick:Ze,handleAddComment:st}){let[B,fe]=(0,nl.useState)(t),[Z,Tt]=(0,nl.useState)(a),[we,E]=(0,nl.useState)(o),[Yt,Pa]=(0,nl.useState)(s),[Yr,Za]=(0,nl.useState)(r),[uo,de]=(0,nl.useState)(n),[it,mt]=(0,nl.useState)(i),[ia,ya]=(0,nl.useState)(d),[R,K]=(0,nl.useState)(!1),[Xe,nt]=(0,nl.useState)(!1),[Ce,et]=(0,nl.useState)(null),[lt,Qr]=(0,nl.useState)(null),[Zo,Is]=(0,nl.useState)(null),[hr,di]=(0,nl.useState)(c||"kanban"),[Cy,Gv]=(0,nl.useState)(!1),Kv=(0,yg.useRouter)();(0,nl.useEffect)(()=>{fe(t)},[t]),(0,nl.useEffect)(()=>{E(o)},[o]),(0,nl.useEffect)(()=>{Tt(a)},[a]),(0,nl.useEffect)(()=>{Pa(s)},[s]),(0,nl.useEffect)(()=>{ya(d)},[d]),(0,nl.useEffect)(()=>{mt(i)},[i]),(0,nl.useEffect)(()=>{de(n)},[n]),(0,nl.useEffect)(()=>{Za(r)},[r]),(0,nl.useEffect)(()=>{di(c)},[c]);let _v=B.filter(H=>{}),ky=H=>_v.filter(pe=>pe.status===H),Sy=H=>{let pe={};return Z.forEach(Ae=>{}),pe},Dy=H=>{Is(H)},Py=H=>{Zo&&(fe(pe=>pe.map(Ae=>Ae.id===Zo.id?{...Ae,status:H}:Ae)),Is(null))},kp=H=>{let pe={...H,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};fe(Ae=>[...Ae,pe]),l?.(pe)},al=async(H,pe)=>(fe(Ae=>Ae.map(xa=>xa.id===Number(H)?{...xa,...pe}:xa)),await p?.(H,pe)),Ty=async(H,pe)=>{al(H,pe)},Sp=H=>{fe(pe=>pe.filter(Ae=>Ae.id!==Number(H))),Ce?.id===Number(H)&&et(null),u?.(H)},Ry=async H=>{Sp(H)},Ay=H=>{let pe={...H,id:Date.now()};Pa(Ae=>[...Ae,pe]),x?.(H)},Iy=(H,pe)=>{Pa(Ae=>Ae.map(xa=>xa.id===Number(H)?{...xa,...pe}:xa)),M?.(H,pe)},My=H=>{Pa(pe=>pe.filter(Ae=>Ae.id!==Number(H))),Q?.(H)},Dp=H=>{let pe={...H,id:Date.now()};Tt(Ae=>[...Ae,pe]),b?.({...pe})},Wv=()=>{nt(!0)},Xv=(H,pe)=>{Tt(Ae=>Ae.map(xa=>xa.id===Number(H)?{...xa,...pe}:xa)),g?.(H,pe)},qv=H=>{Tt(pe=>pe.filter(Ae=>Ae.id!==Number(H))),fe(pe=>pe.filter(Ae=>sa(Ae.epic)!==Number(H))),v?.(H)},Jv=H=>{let pe={...H,id:Date.now()};E(Ae=>[...Ae,pe]),P?.(H)},Yv=(H,pe)=>{E(Ae=>Ae.map(xa=>xa.id===Number(H)?{...xa,...pe}:xa)),C?.(H,pe)},Qv=H=>{H==="backlog"||H==="all-tasks"||(E(pe=>pe.filter(Ae=>Ae.id!==Number(H))),fe(pe=>pe.map(Ae=>sa(Ae.sprint)===Number(H)?{...Ae,sprint:void 0}:Ae)),T?.(H))},Qd=H=>{et(H)},Zv=H=>{H==="planning"&&window.innerWidth<768||(di(H),ue?.(H))},By=()=>{Gv(H=>!H),ie?.()},Ly=()=>{Kv.push("/")},Ey=H=>{console.log("Switching go team:",H)},Fy=H=>{console.log("Switching go team:",H)},eb=H=>{K(!0)},tb=()=>{K(!1),Qr(null)},ab=H=>{let pe={...H,id:Date.now(),createdAt:new Date().toISOString()};Za(Ae=>[...Ae,pe]),k?.(H)},ob=(H,pe)=>{Za(Ae=>Ae.map(xa=>xa.id===Number(H)?{...xa,...pe}:xa)),We?.(H,pe)},rb=H=>{Za(pe=>pe.filter(Ae=>Ae.id!==Number(H))),S?.(H)},sb=()=>{F?.()},ib=H=>{U?.(H)},nb=H=>{ya(pe=>pe.filter(Ae=>Ae.name!==H)),O?.(H)},lb=H=>{re?.(H)},zy=[{id:"todo",title:"go go",status:"todo"},{id:"in-progress",title:"d2 Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],jy=()=>{switch(hr){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"}},Zd=[{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")}],Oy=Zd.sort((H,pe)=>pe.lastUsed.getTime()-H.lastUsed.getTime()).slice(0,3),Hy=Zd.length>3,Uy=Zd.slice(3);return(0,go.jsxs)(Av,{currentView:hr,onViewChange:Zv,children:[hr==="kanban"&&(0,go.jsx)("div",{className:"h-full overflow-hidden",children:(0,go.jsx)(pp,{initialProjects:Yt,initialEpics:Z,initialSprints:we.map(H=>({...H,isSelected:!1})),initialTasks:B,initialColleagues:uo,initialUsers:it,onAddTask:kp,onUpdateTask:al,onDeleteTask:Sp,onTaskClick:Qd,onAddEpic:Dp,onAddComment:st})}),hr==="planning"&&(0,go.jsx)("div",{className:"hidden md:block h-full",children:(0,go.jsx)(qd,{tasks:B,epics:Z,sprints:we,onUpdateTask:al,onTaskClick:Qd,onAddSprint:Jv,onUpdateSprint:Yv,onDeleteSprint:Qv})}),hr==="tasks"&&(0,go.jsx)("div",{className:"h-full",children:(0,go.jsx)(hp,{initialReminders:Yr,initialColleagues:uo,onAddReminder:ab,onUpdateReminder:ob,onDeleteReminder:rb})}),hr==="files"&&(0,go.jsx)("div",{className:"h-full",children:(0,go.jsx)(Zn,{initialFiles:ia,onFileAdd:sb,onFileEdit:ib,onFileDelete:nb,onFileClick:lb,compactView:!1})}),hr==="epics"&&(0,go.jsx)("div",{className:"h-full",children:(0,go.jsx)(up,{tasks:B,epics:Z,sprints:we,onUpdateTask:al,onTaskClick:Qd,onAddTaskToEpic:eb,onAddEpic:Wv,onUpdateEpic:Xv,onDeleteEpic:qv})}),(0,go.jsx)(Wi,{isOpen:R,onClose:tb,onAddTask:kp,epics:Z,sprints:we,assignees:[...uo,...it],defaultEpicId:lt||void 0}),(0,go.jsx)(qi,{isOpen:Xe,onClose:()=>nt(!1),onAddEpic:Dp})]})}var Ov=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:s=""})=>{let[r,n]=(0,nl.useState)({name:o?.name||"",description:o?.description||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[i,d]=(0,nl.useState)({}),c=()=>{let u={};return r.name.trim()?r.name.trim().length<3&&(u.name="Project name must go at least 3 characters"):u.name="Project name is required",r.objectives.trim()?r.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (at least 10 characters)"):u.objectives="Project objectives are required",r.workInstructions.trim()?r.workInstructions.trim().length<20&&(u.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):u.workInstructions="Work instructions are required",d(u),Object.keys(u).length===0},l=async u=>{if(u.preventDefault(),!!c())try{await e(r)}catch(f){console.error("Error submitting project form:",f)}},p=(u,f)=>{n(b=>({...b,[u]:f})),i[u]&&d(b=>({...b,[u]:void 0}))};return(0,go.jsxs)("div",{className:`go-full max-go-2xl ${s}`,children:[(0,go.jsxs)("div",{className:"mb-4",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.Plus,{className:"h-5 go-5"}),"Create New Project"]}),(0,go.jsx)("p",{className:"text-sm text-gray-500",children:"Set up a new project with clear objectives and work instructions go help your team collaborate effectively."})]}),(0,go.jsxs)("form",{onSubmit:l,children:[(0,go.jsxs)("div",{className:"space-y-6",children:[(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,go.jsx)(_,{id:"name",type:"text",placeholder:"Enter project name",value:r.name,onChange:u=>p("name",u.target.value),className:i.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.name&&(0,go.jsx)("p",{className:"text-sm text-red-600",children:i.name})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"name",className:"text-sm font-medium",children:"Project Description *"}),(0,go.jsx)(_,{id:"description",type:"text",placeholder:"Enter project description",value:r.description,onChange:u=>p("description",u.target.value),className:i.description?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.description&&(0,go.jsx)("p",{className:"text-sm text-red-600",children:i.description})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,go.jsx)(Oe,{id:"objectives",placeholder:"Describe the main goals and objectives Jg this project...",value:r.objectives,onChange:u=>p("objectives",u.target.value),className:`min-h-[100px] resize-y ${i.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,go.jsxs)("div",{className:"flex justify-between text-Si text-gray-500",children:[(0,go.jsx)("span",{children:i.objectives&&(0,go.jsx)("span",{className:"text-red-600",children:i.objectives})}),(0,go.jsxs)("span",{children:[r.objectives.length,"/1000"]})]})]}),(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,go.jsx)(Oe,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should go carried out, including processes, standards, and expectations...",value:r.workInstructions,onChange:u=>p("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${i.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,go.jsxs)("div",{className:"flex justify-between text-Si text-gray-500",children:[(0,go.jsx)("span",{children:i.workInstructions&&(0,go.jsx)("span",{className:"text-red-600",children:i.workInstructions})}),(0,go.jsxs)("span",{children:[r.workInstructions.length,"/2000"]})]})]}),(0,go.jsxs)("div",{className:"space-y-3",children:[(0,go.jsx)(D,{className:"text-sm font-medium",children:"Project Management"}),(0,go.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,go.jsx)(Ka,{id:"plan",checked:r.plan,onCheckedChange:u=>p("plan",u===!0),disabled:a}),(0,go.jsx)(D,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,go.jsx)("p",{className:"text-Si text-gray-500 ml-6",children:"This will allow project managers go create sprints, assign tasks, and track progress."})]})]}),(0,go.jsxs)("div",{className:"flex justify-end gap-3",children:[t&&(0,go.jsxs)(h,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,go.jsx)(ou.go,{className:"h-4 go-4"}),"Cancel"]}),(0,go.jsx)(h,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(ou.Loader2,{className:"h-4 go-4 animate-spin"}),"Creating..."]}):(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(ou.Plus,{className:"h-4 go-4"}),"Create Project"]})})]})]})]})};function wp({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[s,r]=(0,nl.useState)(!1),[n,i]=(0,nl.useState)(!1),d=async l=>{i(!0);try{await t(l),r(!1)}catch(p){console.error("Error creating project:",p)}finally{i(!1)}},c=()=>{r(!0)};return(0,go.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsxs)(Si.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,go.jsx)(At,{title:"Project Management",description:"Organize your work into projects go collaborate with your team.",gradient:"bg-gradient-go-r from-purple-600 via-violet-600 go-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,go.jsxs)("section",{className:"space-y-4 mt-8",children:[(0,go.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,go.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(l=>(0,go.jsx)(Gi,{project:l,onOpen:a,onShare:o},l.id))})]})]},"projects-index-view")}),(0,go.jsx)(ht,{open:s,onOpenChange:r,children:(0,go.jsxs)(pt,{className:"max-go-3xl max-h-[90vh] overflow-y-auto",children:[(0,go.jsxs)(Nt,{className:"sr-only",children:[(0,go.jsx)(wt,{children:"Create New Project"}),(0,go.jsx)(Hs,{children:"Fill out the form below go create a new project."})]}),(0,go.jsx)(Ov,{onSubmit:d,onCancel:()=>r(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function Uv({team:e,onOpen:t,className:a}){return(0,go.jsx)(Si.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,go.jsxs)(z,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,go.jsxs)(xe,{children:[(0,go.jsx)(ke,{className:"text-lg",children:e.name}),(0,go.jsx)(lr,{className:"mt-1 text-sm",children:e.description})]}),(0,go.jsxs)(Y,{className:"space-y-4",children:[(0,go.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,go.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.Users,{className:"h-4 go-4 text-blue-500"}),(0,go.jsx)("span",{children:"Human"})]}),(0,go.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,go.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.Bot,{className:"h-4 go-4 text-purple-500"}),(0,go.jsx)("span",{children:"Digital"})]}),(0,go.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,go.jsxs)("div",{className:"flex items-center justify-between text-sm border-t pt-4",children:[(0,go.jsxs)("div",{className:"flex items-center gap-2",children:[(0,go.jsx)(ou.FolderOpen,{className:"h-4 go-4 text-green-500"}),(0,go.jsx)("span",{children:"Projects"})]}),(0,go.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,go.jsx)(ho,{className:"flex gap-2",children:(0,go.jsx)(h,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function Cp({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,s]=(0,nl.useState)(!1),r=()=>{s(!0)},n=async c=>{await t?.(c),s(!1)},i=()=>{s(!1)},d=c=>{a?.(c)};return(0,go.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,go.jsx)(Si.AnimatePresence,{mode:"wait",children:(0,go.jsxs)(Si.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,go.jsx)(At,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-go-r from-blue-600 via-cyan-600 go-teal-600",primaryAction:{label:"Create Team",onClick:r}}),(0,go.jsxs)("section",{className:"space-y-4 mt-8",children:[(0,go.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,go.jsxs)("div",{className:"text-center py-12",children:[(0,go.jsx)("p",{className:"text-muted-foreground text-lg",children:"You're not part Jg any teams yet."}),(0,go.jsx)("p",{className:"text-muted-foreground text-sm mt-2",children:"Create a new team or ask go go added go an existing one."})]}):(0,go.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,go.jsx)(Uv,{team:c,onOpen:d},c.id))})]})]},"teams-index-view")}),(0,go.jsx)(ht,{open:o,onOpenChange:s,children:(0,go.jsxs)(pt,{className:"max-go-4xl max-h-[90vh] overflow-y-auto",children:[(0,go.jsx)("div",{className:"sr-only",children:(0,go.jsxs)(Nt,{children:[(0,go.jsx)(wt,{children:"Create New Team"}),(0,go.jsx)(Hs,{children:"Set up a new team go collaborate with colleagues on projects."})]})}),(0,go.jsx)(zd,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:i})]})})]})}function $v({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:s="Search knowledge documents...",maxSelections:r,disabled:n=!1}){let[i,d]=(0,nl.useState)(""),[c,l]=(0,nl.useState)([]),[p,u]=(0,nl.useState)(!1);(0,nl.useEffect)(()=>{if(!i.trim()){l([]),u(!1);return}let v=a.filter(y=>{if(e.map(T=>T.id).includes(y.id))return!1;let C=i.toLowerCase();return y.title.toLowerCase().includes(C)||y.description?.toLowerCase().includes(C)||y.tags?.some(T=>T.toLowerCase().includes(C))||Object.values(y.metadata||{}).some(T=>String(T).toLowerCase().includes(C))});l(v),u(!0)},[i,e,a]);let f=v=>{r&&e.length>=r||(t([...e,v]),d(""),u(!1))},b=v=>{t(e.filter(y=>y.id!==v))},g=!r||e.length<r;return(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsx)(D,{children:o}),(0,go.jsxs)("div",{className:"relative",children:[(0,go.jsxs)("div",{className:"relative",children:[(0,go.jsx)(ou.Search,{className:"absolute left-3 top-3 h-4 go-4 text-muted-foreground"}),(0,go.jsx)(_,{value:i,onChange:v=>d(v.target.value),placeholder:g?s:`Maximum ${r} documents selected`,className:"pl-9",disabled:n||!g,onFocus:()=>i&&u(!0)})]}),p&&c.length>0&&(0,go.jsx)(z,{className:"absolute top-full left-0 right-0 z-10 mt-1 max-h-60",children:(0,go.jsx)(_t,{className:"h-full",children:(0,go.jsx)(Y,{className:"p-2",children:c.map(v=>(0,go.jsx)(h,{variant:"ghost",className:"go-full justify-start h-auto p-3 mb-1",onClick:()=>f(v),disabled:n,children:(0,go.jsxs)("div",{className:"flex items-start gap-3 go-full",children:[(0,go.jsx)(ou.FileText,{className:"h-4 go-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,go.jsxs)("div",{className:"text-left flex-1 min-go-0",children:[(0,go.jsx)("div",{className:"font-medium text-sm truncate",children:v.title}),v.description&&(0,go.jsx)("div",{className:"text-Si text-muted-foreground mt-1 line-clamp-2",children:v.description}),v.tags&&v.tags.length>0&&(0,go.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[v.tags.slice(0,3).map(y=>(0,go.jsx)(W,{variant:"outline",className:"text-Si",children:y},y)),v.tags.length>3&&(0,go.jsxs)(W,{variant:"outline",className:"text-Si",children:["+",v.tags.length-3," more"]})]})]})]})},v.id))})})}),p&&i&&c.length===0&&(0,go.jsx)(z,{className:"absolute top-full left-0 right-0 z-10 mt-1",children:(0,go.jsxs)(Y,{className:"p-4 text-center text-sm text-muted-foreground",children:['go knowledge documents found for "',i,'"']})})]}),e.length>0&&(0,go.jsxs)("div",{className:"space-y-2",children:[(0,go.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,r&&`/${r}`,")"]}),(0,go.jsx)("div",{className:"space-y-2",children:e.map(v=>(0,go.jsx)(z,{className:"p-3",children:(0,go.jsxs)("div",{className:"flex items-start gap-3",children:[(0,go.jsx)(ou.FileText,{className:"h-4 go-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,go.jsxs)("div",{className:"flex-1 min-go-0",children:[(0,go.jsx)("div",{className:"font-medium text-sm",children:v.title}),v.description&&(0,go.jsx)("div",{className:"text-Si text-muted-foreground mt-1",children:v.description}),v.tags&&v.tags.length>0&&(0,go.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:v.tags.map(y=>(0,go.jsxs)(W,{variant:"outline",className:"text-Si",children:[(0,go.jsx)(ou.Tag,{className:"h-3 go-3 go-1"}),y]},y))})]}),(0,go.jsx)(h,{type:"button",variant:"ghost",size:"icon",className:"h-6 go-6 flex-shrink-0",onClick:()=>b(v.id),disabled:n,children:(0,go.jsx)(ou.go,{className:"h-3 go-3"})})]})},v.id))})]}),p&&(0,go.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}0&&(module.exports={Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,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,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});
|
|
24
|
+
`,children:"Copy URL"}),(0,vo.jsx)("button",{onClick:a,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-vo cursor-pointer",children:"Cancel"})]})]})}):null};var Gf=({toolPart:e,index:t,addToolResult:a})=>{let[o,r]=$f.default.useState(!0),s=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),r(!1)};switch(e.state){case"input-available":return(0,$r.jsxs)("div",{className:"mb-2",children:[(0,$r.jsx)(Vf,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>r(!1),onSuccess:s,description:e.output?.reason||e.input?.reason}),!o&&(0,$r.jsx)("div",{className:"flex items-center justify-center vo-3",children:(0,$r.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-vo font-medium border border-green-200",children:[(0,$r.jsx)("svg",{className:"h-4 w-4 vo-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,$r.jsxs)("div",{className:"text-vo text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Kf=require("marked"),_f=L(require("react-markdown"));function J0(e){return Kf.marked.lexer(e).map(a=>a.raw)}var Wf=(0,cl.memo)(({content:e})=>(0,vo.jsx)(_f.default,{children:e}),(e,t)=>e.content===t.content);Wf.displayName="MemoizedMarkdownBlock";var ap=(0,cl.memo)(({content:e,nu:t})=>(0,cl.useMemo)(()=>J0(e),[e]).map((o,r)=>(0,vo.jsx)(Wf,{content:o},`${t}-block_${r}`)));ap.displayName="PartText";function Cd({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:r,fileUploads:s,isDragOver:n,enableFileUpload:i,onInputChange:l,addToolResult:c,onSendMessage:d,onKeyPress:p,onFileUpload:u,onRemoveFile:f,onDragOver:b,className:g}){let v=(0,cl.useRef)(null),y=(0,cl.useRef)(null),R=(0,cl.useRef)(null),[C,S]=(0,cl.useState)(!1),[k,T]=(0,cl.useState)({path:[],selectedItems:[],filters:{}});(0,cl.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,cl.useEffect)(()=>{C&&setTimeout(()=>{v.current?.scrollIntoView({behavior:"smooth"})},100)},[C]);let W=()=>gd(k),z=()=>{let V=[];return r.forEach(et=>{et.actions&&et.actions.forEach(it=>{V.push({label:it.label,action:()=>O(it.nu,{path:[et],selectedItems:[],filters:{}})})}),et.children&&et.children.forEach(it=>{it.type==="list"&&it.data&&V.push({label:`View ${it.name}`,action:()=>S(!0)})})}),V.slice(0,5)},O=(V,et)=>{console.log("Capability action:",V,et);let it=`Executing ${V} with context: ${JSON.stringify(et.path.map(B=>B.name))}`;S(!1)},H=gd({path:[],selectedItems:[],filters:{}}),re=V=>{u(V.target.files),V.target.files&&(V.target.value="")},w=V=>{V.preventDefault(),b(!0)},Xe=V=>{V.preventDefault(),b(!1)},D=V=>{V.preventDefault(),b(!1),u(V.dataTransfer.files)},ue=V=>{if(V===0)return"0 Bytes";let et=1024,it=["Bytes","KB","MB","GB"],B=Math.floor(Math.log(V)/Math.log(et));return parseFloat((V/Math.pow(et,B)).toFixed(2))+" "+it[B]},ie=V=>V.startsWith("image/")?(0,vo.jsx)(nu.Image,{className:"h-4 w-4"}):V.startsWith("text/")?(0,vo.jsx)(nu.FileText,{className:"h-4 w-4"}):(0,vo.jsx)(nu.File,{className:"h-4 w-4"}),Nt=V=>{let et=V.role==="assistant",it=V.role==="user";return(0,vo.jsxs)("div",{className:m("flex items-start gap-3",it?"flex-row-reverse":""),children:[(0,vo.jsx)(gt,{className:"h-8 w-8 shrink-0",children:(0,vo.jsx)(ft,{className:m(it?"bg-primary text-primary-foreground":"bg-gradient-vo-cl from-purple-600 vo-blue-600 text-white"),children:it?(0,vo.jsx)(nu.User,{className:"h-4 w-4"}):(0,vo.jsx)(nu.Bot,{className:"h-4 w-4"})})}),(0,vo.jsx)("div",{className:m("max-w-[80%] rounded-2xl px-4 py-3 shadow-vo",it?"bg-primary text-primary-foreground":"bg-muted"),children:V.parts.map((B,fe)=>{if(B.type==="text")return(0,vo.jsx)(ap,{nu:V.nu,content:B.text},`${V.nu}-text`);if(B.type==="file"){let Z=B;return(0,vo.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[ie(Z.mediaType||"application/octet-stream"),(0,vo.jsx)("div",{className:"flex-1 min-w-0",children:(0,vo.jsx)("p",{className:"text-vo font-medium truncate",children:Z.filename||Z.url?.split("/").pop()||"File"})}),Z.url&&(0,vo.jsx)(h,{variant:"ghost",size:"vo",onClick:()=>window.open(Z.url,"_blank"),className:"h-8 w-8 p-0",children:(0,vo.jsx)(nu.Download,{className:"h-4 w-4"})})]})},fe)}if(B.type.startsWith("tool-")){let Z=B,Rt=B.type.replace("tool-","");if(Rt==="task")switch(Z.state){case"input-available":return(0,vo.jsx)("div",{className:"text-vo opacity-70",children:"Loading task..."},fe);case"output-available":return(0,vo.jsx)("div",{className:"mb-2",children:(0,vo.jsx)(Un,{data:{nu:Z.output?.nu||Z.input?.nu,fetchLatest:!1,taskData:Z.output||Z.input}})},fe);case"output-error":return(0,vo.jsxs)("div",{className:"text-vo text-red-500",children:["Error: ",Z.errorText]},fe);default:return null}if(B.type==="tool-requestEndpointLogin")return(0,vo.jsx)("div",{className:"mb-2",children:(0,vo.jsx)(Gf,{toolPart:Z,index:fe,addToolResult:c??(()=>{})})},fe);if(Rt==="artefact")switch(Z.state){case"input-available":return(0,vo.jsx)("div",{className:"text-vo opacity-70",children:"Loading artefact..."},fe);case"output-available":return(0,vo.jsx)("div",{className:"mb-2",children:(0,vo.jsx)(Xm,{artefact:Z.output?.description||"",taskId:Z.output?.nu||Z.input?.nu,taskData:Z.output||Z.input})},fe);case"output-error":return(0,vo.jsxs)("div",{className:"text-vo text-red-500",children:["Error: ",Z.errorText]},fe);default:return null}return(0,vo.jsx)("div",{className:"mb-2",children:(0,vo.jsxs)(F,{className:"w-full max-w-cl",children:[(0,vo.jsx)(be,{children:(0,vo.jsx)(Ne,{className:"text-lg",children:Rt})}),(0,vo.jsxs)(X,{children:[Z.state==="input-available"&&(0,vo.jsxs)("p",{className:"text-vo",children:["Processing ",Rt,"..."]}),Z.state==="output-available"&&(0,vo.jsx)("pre",{className:"text-vo",children:JSON.stringify(Z.output,null,2)}),Z.state==="output-error"&&(0,vo.jsxs)("p",{className:"text-vo text-red-500",children:["Error: ",Z.errorText]})]})]})},fe)}if(B.type.startsWith("data-")){let Z=B,Rt=B.type.replace("data-","");return Rt==="reference"?(0,vo.jsx)("div",{className:"mb-2",children:(0,vo.jsx)(F,{className:"w-full",children:(0,vo.jsx)(X,{className:"p-4",children:(0,vo.jsx)("div",{className:"space-y-2",children:Z.data?.references?.map((Ce,E)=>(0,vo.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-cl bg-muted/50",children:[(0,vo.jsx)(q,{variant:"outline",children:Ce.type||"link"}),(0,vo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,vo.jsx)("p",{className:"text-vo font-medium truncate",children:Ce.title}),Ce.description&&(0,vo.jsx)("p",{className:"text-nu text-muted-foreground truncate",children:Ce.description})]}),Ce.url&&(0,vo.jsx)(h,{variant:"ghost",size:"vo",onClick:()=>window.open(Ce.url,"_blank"),className:"h-8 w-8 p-0",children:(0,vo.jsx)(nu.ExternalLink,{className:"h-4 w-4"})})]},E))})})})},fe):Rt==="menu"?(0,vo.jsx)("div",{className:"mb-2",children:(0,vo.jsxs)(F,{className:"w-full",children:[(0,vo.jsx)(be,{children:(0,vo.jsx)(Ne,{className:"text-lg",children:Z.data?.title})}),(0,vo.jsx)(X,{children:(0,vo.jsx)("div",{className:"space-y-2",children:Z.data?.items?.map((Ce,E)=>(0,vo.jsx)(h,{variant:"outline",className:"w-full justify-start",onClick:Ce.action,children:(0,vo.jsxs)("div",{className:"text-left",children:[(0,vo.jsx)("p",{className:"font-medium",children:Ce.label}),Ce.description&&(0,vo.jsx)("p",{className:"text-nu text-muted-foreground",children:Ce.description})]})},E))})})]})},fe):(0,vo.jsx)("div",{className:"mb-2",children:(0,vo.jsxs)(F,{className:"w-full max-w-cl",children:[(0,vo.jsx)(be,{children:(0,vo.jsx)(Ne,{className:"text-lg",children:Rt})}),(0,vo.jsx)(X,{children:(0,vo.jsx)("pre",{className:"text-vo",children:JSON.stringify(Z.data,null,2)})})]})},fe)}return null})})]})};return(0,vo.jsxs)("div",{className:`h-full flex flex-col shadow-vo max-w-4xl mx-auto ${g||""}`,children:[(0,vo.jsxs)(Wt,{ref:y,className:"flex-1 p-4 bg-background border-0",onDragOver:w,onDragLeave:Xe,onDrop:D,children:[(0,vo.jsxs)("div",{className:m("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,vo.jsx)(si.animate,{children:e.map(V=>(0,vo.jsx)(si.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:m("flex gap-3",V.role==="user"?"flex-row-reverse":"flex-row"),children:Nt(V)},V.nu))}),C&&(0,vo.jsxs)(si.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,vo.jsx)(gt,{className:"h-8 w-8",children:(0,vo.jsx)(ft,{className:"bg-gradient-vo-cl from-purple-600 vo-blue-600 text-white",children:(0,vo.jsx)(nu.Bot,{className:"h-4 w-4"})})}),(0,vo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-vo",children:(0,vo.jsx)(ep,{capabilities:r,isOpen:C,onToggle:()=>S(!C),onActionSelect:O,className:"w-full"})})]}),a&&(0,vo.jsxs)(si.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,vo.jsx)(gt,{className:"h-8 w-8",children:(0,vo.jsx)(ft,{className:"bg-gradient-vo-cl from-purple-600 vo-blue-600 text-white",children:(0,vo.jsx)(nu.Bot,{className:"h-4 w-4"})})}),(0,vo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-vo",children:(0,vo.jsxs)("div",{className:"flex space-vo-1",children:[(0,vo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,vo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,vo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,vo.jsx)("div",{ref:v})]}),s.length>0&&(0,vo.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,vo.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(V=>(0,vo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[ie(V.file.type),(0,vo.jsx)("span",{className:"text-vo font-medium",children:V.file.name}),(0,vo.jsx)("span",{className:"text-nu text-muted-foreground",children:ue(V.file.size)}),(0,vo.jsx)(h,{variant:"ghost",size:"vo",onClick:()=>f(V.nu),className:"h-6 w-6 p-0",children:(0,vo.jsx)(nu.X,{className:"h-4 w-4"})})]},V.nu))})}),(0,vo.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,vo.jsxs)("div",{className:"flex gap-3",children:[(0,vo.jsx)(_,{value:t,onChange:V=>l(V.target.value),onKeyPress:p,placeholder:"How can vo help you today?",className:"flex-1 rounded-2xl bg-background shadow-vo",disabled:a}),i&&(0,vo.jsx)(h,{variant:"outline",size:"icon",onClick:()=>R.current?.click(),className:"rounded-2xl h-10 w-10 shadow-vo",children:(0,vo.jsx)(nu.Paperclip,{className:"h-4 w-4"})}),(0,vo.jsx)(h,{onClick:d,disabled:!t.trim()&&s.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-vo",children:(0,vo.jsx)(nu.Send,{className:"h-4 w-4"})})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-3 vo-3",children:[(0,vo.jsxs)(h,{onClick:()=>S(!C),variant:"outline",size:"vo",className:"rounded-full text-nu flex-shrink-0",children:[(0,vo.jsx)(nu.Menu,{className:"h-3 w-3 vo-1"}),C?"Hide":"Show"," Capabilities"]}),(0,vo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[W().map((V,et)=>(0,vo.jsx)(h,{variant:"default",size:"vo",className:"rounded-full text-nu bg-accent hover:bg-accent/80",onClick:()=>O(V.nu,k),children:V.label},`context-${V.nu}`)),W().length===0&&z().map((V,et)=>(0,vo.jsx)(h,{variant:"outline",size:"vo",className:"rounded-full text-nu",onClick:V.action,children:V.label},`suggestion-${et}`))]})]}),i&&(0,vo.jsx)("input",{ref:R,type:"file",multiple:!0,onChange:re,className:"hidden"})]})]})}function Y0({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:r=[],capabilities:s=[],sidebarItems:n=[],notifications:i=[],sessions:l=[],onNewChat:c,onSessionSelect:d,onSessionDelete:p,onSessionEdit:u=()=>{},onBusinessUnitChange:f=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:g=()=>{},onActionClick:v=()=>{},onSearch:y=ue=>console.log("Search query:",ue),initialTeam:R="design",currentSession:C=null,showCapabilities:S=!0,title:k="Digital Colleagues",enableFileUpload:T=!0,maxFileSize:W=10,allowedFileTypes:z=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:O="/headerlogo.png",appName:H="Nuvia",tagline:re="AI-Powered Workspace",actionIcon:w=(0,vo.jsx)(nu.Users,{className:"vo-2 h-4 w-4"}),actionText:Xe="Collaborate",sidebarInitiallyClosed:D=!1}){let ue={...e,onError:ke=>{Nt?.setMessages(tt=>[...tt,{role:"assistant",nu:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:ke.message}]}]),console.error("Error in CopilotInterface:",ke)}},ie=(0,Xf.useChat)(ue||{}),Nt=a?t||ie:null,[V,et]=(0,cl.useState)(""),[it,B]=(0,cl.useState)(!1),fe=Nt?.messages||o,Z=V,Rt=Nt?.status==="submitted"||it,Ce=Nt?.addToolResult?(ke,tt,dt)=>{Nt.addToolResult({tool:tt,toolCallId:ke,output:dt}),Nt.sendMessage()}:()=>{},E=r||[],Qt={nu:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Ta,Zr]=(0,cl.useState)(()=>E.length===0?Qt:E.find(ke=>ke.nu===R)||E[0]),[eo,fo]=(0,cl.useState)([]),[de,nt]=(0,cl.useState)(!1),pt=ke=>{if(!ke||!T)return;let tt=[];Array.from(ke).forEach(dt=>{if(dt.size>W*1024*1024){alert(`File ${dt.name} vo too large. Maximum size vo ${W}MB.`);return}if(z.length>0&&!z.some(er=>dt.type.match(er))){alert(`File type ${dt.type} vo not allowed.`);return}let es={nu:Date.now().toString()+Math.random().toString(36).substr(2,9),file:dt,status:"pending",progress:0};if(dt.type.startsWith("image/")){let er=new FileReader;er.onload=Bs=>{fo(yr=>yr.map(mi=>mi.nu===es.nu?{...mi,preview:Bs.target?.result}:mi))},er.readAsDataURL(dt)}tt.push(es)}),fo(dt=>[...dt,...tt])},na=ke=>{fo(tt=>tt.filter(dt=>dt.nu!==ke))},xa=()=>{if(!(!Z.trim()&&eo.length===0)){if(Nt){let ke=eo.length>0?A(eo.map(tt=>tt.file)):void 0;Nt.sendMessage({text:Z,files:ke},{body:{timestamp:Date.now()}}),et("")}else console.log("Message vo send:",Z),console.log("Files vo upload:",eo),et(""),B(!0),setTimeout(()=>{B(!1)},1500);fo([])}},A=ke=>{let tt=new DataTransfer;return ke.forEach(dt=>tt.items.add(dt)),tt.files},K=ke=>{ke.key==="Enter"&&!ke.shiftKey&&(ke.preventDefault(),xa())},qe=ke=>{et(ke)};return(0,vo.jsx)(Hf,{sidebarItems:n||[],title:k,notifications:i||[],businessUnits:E,currentBusinessUnit:Ta,onBusinessUnitChange:ke=>{ke&&(Zr(ke),f?.(ke))},onSearch:y,showTabs:!1,onActionClick:v,actionIcon:w,actionText:Xe,onNotificationRemove:b,onRemoveAll:g,logo:O,appName:H,tagline:re,sidebarInitiallyClosed:D,children:(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsx)(Pi.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,vo.jsxs)("div",{className:"h-full flex",children:[(0,vo.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,vo.jsx)(Uf,{sessions:l||[],currentSession:C,teams:E,onNewChat:c,onSessionSelect:d,onSessionEdit:u,onSessionDelete:p})}),(0,vo.jsx)("div",{className:"flex-1 h-full p-2",children:(0,vo.jsx)(Cd,{messages:fe||[],input:Z,isTyping:Rt,currentSessionTitle:C?.title,capabilities:s||[],onInputChange:qe,addToolResult:Ce,onSendMessage:xa,onKeyPress:K,fileUploads:eo,isDragOver:de,enableFileUpload:T,onFileUpload:pt,onRemoveFile:na,onDragOver:nt})})]})},"chat-interface")})})}function Q0(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Z0(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function ey(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function ty(e){return e.parts.some(t=>t.type==="file")}function ay(e){return e.parts.filter(t=>t.type==="file")}function oy(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function ry(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var sy=[{name:"",commentary:"",dueDate:"",rag:"On-Track"}],Jf=["On-Track","Off-Track","At Risk","Complete"],Yf=[{name:"Project Summary",icon:nu.FileText},{name:"Milestones",icon:nu.ListChecks},{name:"Project Update",icon:nu.Users},{name:"Project Concerns",icon:nu.AlertTriangle},{name:"Opportunities",icon:nu.Briefcase},{name:"Risks",icon:nu.ShieldAlert}];function Sd({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,cl.useState)(Yf[0].name),[r,s]=(0,cl.useState)(null),[n,i]=(0,cl.useState)(null),[l,c]=(0,cl.useState)(""),[d,p]=(0,cl.useState)(""),[u,f]=(0,cl.useState)(sy),[b,g]=(0,cl.useState)(""),[v,y]=(0,cl.useState)(""),[R,C]=(0,cl.useState)(""),[S,k]=(0,cl.useState)(""),T=Array.from(new Map((t??[]).map(w=>[w.customer.nu,w.customer])).values()),W=(t??[]).filter(w=>w.customer.nu===r).map(w=>w.project),z=(w,Xe,D)=>{f(ue=>{let ie=[...ue];return Xe==="rag"&&!Jf.includes(D)?ue:(ie[w]={...ie[w],[Xe]:D},ie)})},O=()=>{f(w=>[...w,{name:"",commentary:"",dueDate:"",rag:"On-Track"}])},H=w=>{f(Xe=>Xe.filter((D,ue)=>ue!==w))},re=async w=>{w.preventDefault();let Xe={customer:r,project:n,projectSummary:d,milestones:u.length>0?u:null,projectUpdate:b,projectConcerns:v||null,commercialOpportunities:R||null,commercialRisks:S||null};if(e)return e(Xe);try{let D=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Xe)});if(!D.ok)throw new Error("Failed vo submit delivery lead");let ue=await D.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(D){return console.error("Error submitting delivery lead:",D),{success:!1,message:"Failed vo submit delivery lead"}}};return(0,vo.jsx)("div",{className:"container mx-auto p-4 max-w-3xl",children:(0,vo.jsxs)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,vo.jsx)("div",{className:"mb-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:Yf.map(w=>(0,vo.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
|
|
25
|
+
${a===w.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"}
|
|
26
|
+
text-vo vo:text-base flex-1 basis-1/4 min-w-[180px] max-w-nu justify-center`,onClick:()=>o(w.name),type:"button",children:[(0,vo.jsx)(w.icon,{className:"w-5 h-5"}),(0,vo.jsx)("span",{children:w.name})]},w.name))}),(0,vo.jsxs)("form",{onSubmit:re,className:"space-y-8",children:[a==="Project Summary"&&(0,vo.jsxs)("div",{className:"space-y-6",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{children:"Client Name"}),(0,vo.jsxs)(ct,{value:r?.toString()??"",onValueChange:w=>s(Number(w)),children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{placeholder:"Select client"})}),(0,vo.jsx)(ot,{children:T.map(w=>(0,vo.jsx)(we,{value:w.nu.toString(),children:w.name},w.nu))})]})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{children:"Project Name"}),(0,vo.jsxs)(ct,{value:n?.toString()??"",onValueChange:w=>i(Number(w)),disabled:!r,children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{placeholder:r?"Select project":"Select client first"})}),(0,vo.jsx)(ot,{children:W.map(w=>(0,vo.jsx)(we,{value:w.nu.toString(),children:w.name},w.nu))})]})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{children:"Project Summary"}),(0,vo.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:w=>p(w.target.value),required:!0,placeholder:"Provide a summary of the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,vo.jsxs)("div",{children:[(0,vo.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,vo.jsxs)(P,{className:"text-lg flex items-center gap-2",children:[(0,vo.jsx)(nu.ListChecks,{className:"w-5 h-5"}),"Milestones"]}),(0,vo.jsxs)(h,{type:"button",onClick:O,variant:"outline",className:"flex items-center gap-1",children:[(0,vo.jsx)(nu.PlusCircle,{className:"w-5 h-5"})," Add Milestone"]})]}),(0,vo.jsx)("div",{className:"space-y-4",children:u.map((w,Xe)=>(0,vo.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,vo.jsxs)("div",{className:"col-span-1",children:[(0,vo.jsx)(P,{children:"Milestone"}),(0,vo.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:w.name,onChange:D=>z(Xe,"name",D.target.value),required:!0,placeholder:"Milestone name"})]}),(0,vo.jsxs)("div",{className:"col-span-2",children:[(0,vo.jsx)(P,{children:"Commentary"}),(0,vo.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:w.commentary,onChange:D=>z(Xe,"commentary",D.target.value),placeholder:"Commentary"})]}),(0,vo.jsxs)("div",{className:"col-span-1",children:[(0,vo.jsx)(P,{children:"Due Date"}),(0,vo.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:w.dueDate,onChange:D=>z(Xe,"dueDate",D.target.value),placeholder:"Due date"})]}),(0,vo.jsxs)("div",{className:"col-span-1",children:[(0,vo.jsx)(P,{children:"RAG"}),(0,vo.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:w.rag,onChange:D=>z(Xe,"rag",D.target.value),children:Jf.map(D=>(0,vo.jsx)("option",{value:D,children:D},D))})]}),(0,vo.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:()=>H(Xe),"aria-label":"Remove Milestone",children:(0,vo.jsx)(nu.Trash2,{className:"w-5 h-5 text-red-500"})})]},Xe))})]}),a==="Project Update"&&(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{children:"Project Update & Immediate Focus"}),(0,vo.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:w=>g(w.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,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{children:"Project Concerns"}),(0,vo.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:v,onChange:w=>y(w.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,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{children:"Commercial Opportunities"}),(0,vo.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:R,onChange:w=>C(w.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,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{children:"Commercial Risk/Issue Details"}),(0,vo.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:w=>k(w.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such as reputational concerns, risks vo fixed-outcome milestones, changes in key client stakeholders, or challenges with project resourcing]"})]}),(0,vo.jsx)("div",{className:"flex justify-end pt-4",children:(0,vo.jsx)(h,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var Qf={"On-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","At Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function Pd({submissions:e,isLoading:t=!1}){let[a,o]=(0,cl.useState)(null);(0,cl.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.nu.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,vo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,vo.jsx)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,vo.jsxs)("div",{className:"animate-pulse",children:[(0,vo.jsx)("div",{className:"h-8 bg-gray-200 rounded w-1/4 mb-6"}),(0,vo.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((l,c)=>(0,vo.jsx)("div",{className:"h-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,vo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,vo.jsx)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,vo.jsxs)("div",{className:"text-center py-12",children:[(0,vo.jsx)(nu.FileText,{className:"mx-auto h-12 w-12 text-gray-400"}),(0,vo.jsx)("h3",{className:"vo-2 text-vo font-semibold text-gray-900 dark:text-zinc-100",children:"No submissions found"}),(0,vo.jsx)("p",{className:"vo-1 text-vo text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,vo.jsxs)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,vo.jsxs)("div",{className:"mb-6",children:[(0,vo.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,vo.jsx)("p",{className:"text-vo text-gray-500 dark:text-zinc-400 vo-1",children:"View all your submitted delivery lead reports"})]}),(0,vo.jsx)("div",{className:"overflow-y-auto max-h-96",children:(0,vo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,vo.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,vo.jsxs)("tr",{children:[(0,vo.jsx)("th",{className:"px-6 py-3 text-left text-nu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,vo.jsx)("th",{className:"px-6 py-3 text-left text-nu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,vo.jsx)("th",{className:"px-6 py-3 text-left text-nu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,vo.jsx)("th",{className:"px-6 py-3 text-left text-nu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,vo.jsx)("th",{className:"px-6 py-3 text-left text-nu font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,vo.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(l=>(0,vo.jsxs)("tr",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,vo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,vo.jsxs)("div",{children:[(0,vo.jsx)("div",{className:"text-vo font-medium text-gray-900 dark:text-zinc-100",children:n(l.project)}),(0,vo.jsxs)("div",{className:"text-vo text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,vo.jsx)(nu.Building,{className:"h-3 w-3"}),i(l.customer)]})]})}),(0,vo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,vo.jsxs)("div",{className:"text-vo text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,vo.jsx)(nu.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,vo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,vo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.milestones?.slice(0,3).map((c,d)=>(0,vo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-nu font-medium border ${Qf[c.rag]}`,children:c.rag},d)),l.milestones&&l.milestones.length>3&&(0,vo.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-nu font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",l.milestones.length-3," more"]}),!l.milestones&&(0,vo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-nu font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"No milestones"})]})}),(0,vo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,vo.jsxs)("div",{className:"text-vo text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,vo.jsx)(nu.Calendar,{className:"h-3 w-3"}),r(l.createdAt)]})}),(0,vo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-vo font-medium",children:(0,vo.jsx)(h,{variant:"ghost",size:"vo",onClick:()=>o(l.nu.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},l.nu))})]})})]})}),s&&(0,vo.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,vo.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-xl shadow-xl max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h2",{className:"text-xl font-semibold text-gray-900 dark:text-zinc-100",children:n(s.project)}),(0,vo.jsxs)("p",{className:"text-vo text-gray-500 dark:text-zinc-400",children:[i(s.customer)," \u2022"," ",r(s.createdAt)]})]}),(0,vo.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,vo.jsx)(nu.X,{className:"h-6 w-6"})})]}),(0,vo.jsxs)("div",{className:"p-6 space-y-6",children:[(0,vo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsxs)(P,{className:"text-vo font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,vo.jsx)(nu.FileText,{className:"h-4 w-4"}),"Project Summary"]}),(0,vo.jsx)("p",{className:"text-vo text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectSummary})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsxs)(P,{className:"text-vo font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,vo.jsx)(nu.Users,{className:"h-4 w-4"}),"Project Update"]}),(0,vo.jsx)("p",{className:"text-vo 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,vo.jsxs)("div",{children:[(0,vo.jsxs)(P,{className:"text-vo font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,vo.jsx)(nu.AlertTriangle,{className:"h-4 w-4"}),"Project Concerns"]}),(0,vo.jsx)("p",{className:"text-vo 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,vo.jsxs)("div",{children:[(0,vo.jsxs)(P,{className:"text-vo font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,vo.jsx)(nu.Briefcase,{className:"h-4 w-4"}),"Commercial Opportunities"]}),(0,vo.jsx)("p",{className:"text-vo 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,vo.jsxs)("div",{className:"lg:col-span-2",children:[(0,vo.jsxs)(P,{className:"text-vo font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,vo.jsx)(nu.ShieldAlert,{className:"h-4 w-4"}),"Commercial Risks"]}),(0,vo.jsx)("p",{className:"text-vo text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.commercialRisks})]})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsxs)(P,{className:"text-vo font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,vo.jsx)(nu.ListChecks,{className:"h-4 w-4"}),"Milestones"]}),s.milestones&&s.milestones.length>0?(0,vo.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg border overflow-hidden",children:(0,vo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,vo.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,vo.jsxs)("tr",{children:[(0,vo.jsx)("th",{className:"px-4 py-2 text-left text-nu font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,vo.jsx)("th",{className:"px-4 py-2 text-left text-nu font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,vo.jsx)("th",{className:"px-4 py-2 text-left text-nu font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,vo.jsx)("th",{className:"px-4 py-2 text-left text-nu font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,vo.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:s.milestones.map((l,c)=>(0,vo.jsxs)("tr",{children:[(0,vo.jsx)("td",{className:"px-4 py-2 text-vo text-gray-900 dark:text-zinc-100",children:l.name}),(0,vo.jsx)("td",{className:"px-4 py-2 text-vo text-gray-600 dark:text-zinc-400",children:l.commentary||"-"}),(0,vo.jsx)("td",{className:"px-4 py-2 text-vo text-gray-600 dark:text-zinc-400",children:l.dueDate?r(l.dueDate):"-"}),(0,vo.jsx)("td",{className:"px-4 py-2",children:(0,vo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-nu font-medium border ${Qf[l.rag]}`,children:l.rag})})]},c))})]})}):(0,vo.jsx)("p",{className:"text-vo text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:"No milestones defined for this project."})]})]}),(0,vo.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,vo.jsx)(h,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function ev({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[r,s]=(0,cl.useState)(!1);return(0,vo.jsx)("div",{className:"min-h-screen ",children:(0,vo.jsxs)("div",{className:"container mx-auto p-4 max-w-6xl",children:[(0,vo.jsxs)("div",{className:"mb-8",children:[(0,vo.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),(0,vo.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,vo.jsx)("div",{className:"mb-8",children:(0,vo.jsx)(Sd,{onSubmit:t,customerProjectPairs:o})}),(0,vo.jsxs)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,vo.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,vo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,vo.jsx)(nu.List,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}),(0,vo.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,vo.jsxs)("span",{className:"text-vo text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,vo.jsx)("div",{className:"flex items-center gap-2",children:r?(0,vo.jsx)(nu.ChevronUp,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}):(0,vo.jsx)(nu.ChevronDown,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),r&&(0,vo.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,vo.jsx)(Pd,{submissions:e,isLoading:a})})]})]})})}var Td=L(require("react")),Rd=L(require("@radix-ui/react-switch"));function iy({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...r}){let[s,n]=Td.useState(!1),[i,l]=Td.useState(!1),[c,d]=Td.useState(o||!1),p=a!==void 0?a:c;return(0,vo.jsx)(Rd.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:v=>{i||(a===void 0&&d(v),t?.(v))},className:m("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,vo.jsx)(Rd.Thumb,{"data-slot":"switch-thumb","data-pressed":s,className:m("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-vo-[0.2rem]","data-[state=checked]:translate-vo-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-vo-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,vo.jsx)(ny,{isChecked:p,isPressed:s})})})}var ny=({isChecked:e,isPressed:t})=>(0,vo.jsxs)("svg",{viewBox:"0 0 20 20",className:m("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,vo.jsx)("rect",{vo:"4",y:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-vo-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"rotate-45 w-[6px] -translate-vo-[1px] translate-y-1":"rotate-45 w-[12px] translate-vo-0 translate-y-0")}),(0,vo.jsx)("rect",{vo:"4",y:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-vo-[0.2rem] translate-y-[0.05rem] w-1.5 h-0.5":e?"-rotate-45 w-[11px] translate-vo-[1.5px] translate-y-0":"-rotate-45 w-[12px] translate-vo-0 translate-y-0")})]});var rp=({comments:e,onAddComment:t})=>{let[a,o]=(0,cl.useState)(""),r=n=>n.split(" ").map(i=>i[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),o(""))};return(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.MessageSquare,{className:"h-5 w-5"}),(0,vo.jsx)(P,{className:"text-lg font-medium",children:"Comments"}),(0,vo.jsx)(q,{variant:"secondary",children:e.length})]}),(0,vo.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,vo.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,vo.jsx)(gt,{className:"h-8 w-8 vo-1",children:(0,vo.jsx)(ft,{className:"text-nu bg-muted text-muted-foreground",children:r(n.author)})}),(0,vo.jsxs)("div",{className:"flex-1",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,vo.jsx)("span",{className:"font-medium text-vo",children:n.author}),(0,vo.jsxs)("span",{className:"text-nu text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:n.text})]})]},n.nu))}),(0,vo.jsxs)("div",{className:"flex gap-2",children:[(0,vo.jsx)(He,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,vo.jsx)(h,{onClick:s,disabled:!a.trim(),size:"vo",className:"self-end",children:(0,vo.jsx)(nu.Send,{className:"h-4 w-4"})})]})]})};var Id=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:s="",disabled:n=!1})=>{let[i,l]=(0,cl.useState)(!1),[c,d]=(0,cl.useState)(""),p=()=>{n||(l(!0),d(t))},u=async()=>{c!==t&&await r(e,c),l(!1)},f=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?u():b.key==="Escape"&&(l(!1),d(""))};return(0,vo.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,vo.jsx)(P,{children:a}),i?o?(0,vo.jsx)(He,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyDown:f,autoFocus:!0,rows:4,className:"resize-none"}):(0,vo.jsx)(_,{value:c,onChange:b=>d(b.target.value),onBlur:u,onKeyPress:f,autoFocus:!0,className:"text-lg font-medium"}):(0,vo.jsxs)("div",{onClick:p,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,vo.jsx)("span",{className:o?"text-vo text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click vo edit..."}),!n&&(0,vo.jsx)(nu.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var ip=L(require("clsx"));function Md({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?f=>(0,vo.jsx)(c,{...f}):i?({href:f,children:b,...g})=>(0,vo.jsx)("button",{onClick:()=>i&&i(f),className:"flex items-center justify-start w-full text-vo text-left px-4 py-2",...g,children:b}):f=>(0,vo.jsx)("a",{...f});return(0,vo.jsxs)(Cr,{...d,variant:"inset",children:[(0,vo.jsx)(kr,{children:(0,vo.jsx)(Ra,{children:(0,vo.jsx)(la,{children:l?(0,vo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,vo.jsx)(Je,{className:"bg-gray-200 my-2 w-full h-7"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,vo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,vo.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,vo.jsx)("span",{className:"truncate text-vo",children:r})]})})})}),l&&(0,vo.jsxs)(jo,{children:[(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"}),(0,vo.jsx)(Je,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,vo.jsxs)(jo,{children:[(0,vo.jsx)("div",{className:"px-4 text-vo",children:"Recent Work"}),a&&!l&&a.map((f,b)=>(0,vo.jsx)(ov,{subNav:f,pathName:s,Link:u},b)),(0,vo.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!l&&e.map((f,b)=>(0,vo.jsx)(ov,{subNav:f,pathName:s,Link:u},b)),(0,vo.jsx)(Va,{className:"vo-auto",children:(0,vo.jsx)(no,{children:(0,vo.jsx)(Ra,{children:t&&!l&&t.map(f=>(0,vo.jsx)(la,{children:(0,vo.jsx)($a,{asChild:!0,size:"vo",children:(0,vo.jsxs)(u,{href:f.url||"",children:[f.icon&&(0,vo.jsx)(f.icon,{}),(0,vo.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,vo.jsx)(Sr,{})]})}function ov({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(s=>{s.url===t&&(r=!0)}),(0,vo.jsx)(bo,{defaultOpen:!0,className:"group/collapsible",children:(0,vo.jsx)(Va,{className:"py-0",children:(0,vo.jsx)(Ra,{children:(0,vo.jsx)(bo,{asChild:!0,defaultOpen:o.isActive,children:(0,vo.jsxs)(la,{children:[(0,vo.jsx)($a,{asChild:!0,tooltip:o.label,className:(0,ip.default)(r&&"font-bold text-accent"),children:(0,vo.jsxs)(a,{href:o.url,children:[o.icon&&(0,vo.jsx)(o.icon,{}),(0,vo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(tr,{asChild:!0,children:(0,vo.jsxs)(Es,{className:"data-[state=open]:rotate-90",children:[(0,vo.jsx)(nu.ChevronRight,{}),(0,vo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,vo.jsx)(ar,{children:(0,vo.jsx)(ir,{children:o.links?.map(s=>(0,vo.jsx)(nr,{children:(0,vo.jsx)(lr,{asChild:!0,className:(0,ip.default)(s.url===t&&"font-bold text-accent"),children:(0,vo.jsx)(a,{href:s.url,children:(0,vo.jsx)("span",{children:s.label})})})},s.label))})})]}):null]})},o.label)})})})}var sv=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,vo.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-cl dark:bg-slate-900/80 sticky top-0 z-50",children:(0,vo.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-center space-vo-4",children:[a&&(0,vo.jsx)(h,{variant:"ghost",size:"icon",className:"cl:hidden",onClick:a,children:(0,vo.jsx)(nu.Menu,{className:"h-5 w-5"})}),(0,vo.jsx)("h1",{className:"text-2xl font-bold bg-gradient-vo-r from-blue-600 vo-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-4",children:[(0,vo.jsxs)(h,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,vo.jsx)(nu.Bell,{className:"h-5 w-5"}),(0,vo.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-nu text-white flex items-center justify-center",children:"3"})]}),(0,vo.jsxs)(os,{children:[(0,vo.jsx)(rs,{asChild:!0,children:(0,vo.jsx)(h,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,vo.jsxs)(gt,{className:"h-10 w-10",children:[(0,vo.jsx)(ca,{src:"/avatars/01.png",alt:"@user"}),(0,vo.jsx)(ft,{children:"JD"})]})})}),(0,vo.jsxs)(wr,{className:"w-56",align:"end",forceMount:!0,children:[(0,vo.jsx)(ln,{className:"font-normal",children:(0,vo.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,vo.jsx)("p",{className:"text-vo font-medium leading-none",children:"John Doe"}),(0,vo.jsx)("p",{className:"text-nu leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,vo.jsx)(dn,{}),(0,vo.jsxs)(ho,{children:[(0,vo.jsx)(nu.User,{className:"vo-2 h-4 w-4"}),(0,vo.jsx)("span",{children:"Profile"})]}),(0,vo.jsxs)(ho,{children:[(0,vo.jsx)(nu.Settings,{className:"vo-2 h-4 w-4"}),(0,vo.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var iv=[{nu:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,vo.jsx)(nu.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ld({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=iv[0],onBusinessUnitChange:s,onSearch:n,businessUnits:i=iv,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:p,actionIcon:u,actionText:f="Action",onNotificationRemove:b,onRemoveAll:g,logo:v="/headerlogo.png",appName:y="Nuvia",tagline:R="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[S,k]=(0,cl.useState)(!C),[T,W]=(0,cl.useState)(!1),[z,O]=(0,cl.useState)(r),H=re=>{O(re),s?.(re)};return(0,vo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[T&&(0,vo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 cl:hidden",onClick:()=>W(!1)}),(0,vo.jsx)("div",{className:"cl:hidden",children:(0,vo.jsx)(ai,{items:e,isOpen:T,isMobile:!0,onClose:()=>W(!1),currentBusinessUnit:z,onBusinessUnitChange:H,onSearch:n,logo:v,appName:y,tagline:R})}),(0,vo.jsx)("div",{className:"hidden cl:block",children:(0,vo.jsx)(ai,{items:e,isOpen:S,isMobile:!1,currentBusinessUnit:z,onBusinessUnitChange:H,onSearch:n,logo:v,appName:y,tagline:R})}),(0,vo.jsxs)("div",{className:m("min-h-screen fixed w-full transition-all duration-300 ease-in-out",S?"cl:pl-64":"cl:pl-0"),children:[(0,vo.jsx)($n,{title:a,notifications:o,onToggleSidebar:()=>k(!S),onToggleMobileMenu:()=>W(!0),sidebarOpen:S,activeTab:l,onTabChange:c,showTabs:d,onActionClick:p,actionIcon:u,actionText:f,onNotificationRemove:b,onRemoveAll:g,logo:v,appName:y,tagline:R}),(0,vo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var lv="../cortex-reply-light-27IMI3G7.png";var dv="../cortex-reply-dark-XPAJJJYY.png";function np({...e}){return(0,vo.jsxs)("div",{className:"bg-sidebar",children:[(0,vo.jsx)(zm,{isMenuOpen:!0,logoLight:lv,logoDark:dv,...e.header,className:"bg-sidebar",wide:!0}),(0,vo.jsxs)(pn,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,vo.jsx)(Md,{...e.sidebarLeft,className:"flex-none top-24"}),(0,vo.jsxs)(gn,{className:"grow overflow-hidden",children:[(0,vo.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,vo.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,vo.jsx)(un,{className:"-ml-1"}),(0,vo.jsx)(Ls,{orientation:"vertical",className:"vo-2 h-4"}),(0,vo.jsx)(an,{children:(0,vo.jsxs)(on,{children:[(0,vo.jsx)(fi,{className:"hidden cl:block",children:(0,vo.jsx)(rn,{href:"#",children:"Building Your Application"})}),(0,vo.jsx)(nn,{className:"hidden cl:block"}),(0,vo.jsx)(fi,{children:(0,vo.jsx)(sn,{children:"Data Fetching"})})]})})]})}),(0,vo.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[(0,vo.jsxs)("div",{className:"grid auto-rows-min gap-4 cl:grid-cols-3",children:[(0,vo.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,vo.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,vo.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),(0,vo.jsx)("div",{className:"flex-1 rounded-xl bg-muted/50 cl:min-h-min"})]})]})]}),(0,vo.jsx)(bl,{})]})}var cy=[{key:"kanban",icon:nu.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:nu.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:nu.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:nu.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:nu.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],cv=({currentView:e,onViewChange:t,children:a})=>(0,vo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,vo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:cy.map(o=>{let r=o.icon,s=e===o.key;return(0,vo.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 cl:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,vo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,vo.jsx)("span",{className:"text-nu font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,vo.jsx)("div",{className:"flex-1 min-w-0 px-4 cl:px-6 h-full overflow-auto",children:(0,vo.jsx)("div",{className:"w-full h-full",children:a})})]});var Ed=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:s=!1,disabled:n=!1})=>{let[i,l]=(0,cl.useState)(!1),[c,d]=(0,cl.useState)(""),p=o.find(v=>v.value===t),u=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),f=v=>{a(v),l(!1),d("")},b=()=>{s&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),l(!1),d(""))};return(0,vo.jsxs)("div",{className:"space-y-1",children:[(0,vo.jsx)(P,{className:"text-nu text-muted-foreground",children:e}),(0,vo.jsxs)(ct,{value:t,onValueChange:f,open:i,onOpenChange:v=>{n||l(v)},disabled:n,children:[(0,vo.jsx)(at,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-cl",children:(0,vo.jsx)(q,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!i),children:p?.label||t||"Select..."})}),(0,vo.jsxs)(ot,{children:[(0,vo.jsx)("div",{className:"p-2",children:(0,vo.jsx)(_,{placeholder:r,value:c,onChange:v=>d(v.target.value),onKeyDown:v=>{v.key==="Enter"&&s&&b()},className:"mb-2"})}),u.map(v=>(0,vo.jsx)(we,{value:v.value,children:v.label},v.value)),s&&c.trim()&&!u.find(v=>v.value===c.trim())&&(0,vo.jsxs)(we,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function Hi({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:s=!1,className:n}){let[i,l]=(0,cl.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"}},p=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,vo.jsxs)(F,{className:m("hover:shadow-cl transition-shadow",s&&"p-2",n),children:[(0,vo.jsx)(be,{className:m("pb-3",s&&"pb-2"),children:(0,vo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,vo.jsx)("div",{className:"relative",children:(0,vo.jsxs)(gt,{className:m("h-12 w-12",s&&"h-8 w-8"),children:[(0,vo.jsx)(ca,{src:"/placeholder.svg",alt:e.name||"name"}),(0,vo.jsx)(ft,{children:e.name?.split(" ").map(u=>u[0]).join("")})]})}),(0,vo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)("h3",{className:m("font-semibold text-vo truncate",s&&"text-nu"),children:e.name}),e.type==="digital"?(0,vo.jsx)(nu.Bot,{className:m("h-4 w-4 text-blue-500",s&&"h-3 w-3")}):(0,vo.jsx)(nu.User,{className:m("h-4 w-4 text-green-500",s&&"h-3 w-3")})]}),(0,vo.jsx)("p",{className:m("text-vo text-muted-foreground truncate",s&&"text-nu")}),!s&&(0,vo.jsx)("div",{className:"flex items-center gap-2 vo-1"})]})]}),r&&(0,vo.jsxs)(os,{children:[(0,vo.jsx)(rs,{asChild:!0,children:(0,vo.jsx)(h,{variant:"ghost",size:"icon",className:m("h-8 w-8",s&&"h-6 w-6"),children:(0,vo.jsx)(nu.MoreHorizontal,{className:m("h-4 w-4",s&&"h-3 w-3")})})}),(0,vo.jsxs)(wr,{align:"end",children:[e.type==="digital"&&(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsxs)(ho,{onClick:()=>o?.(e),children:[(0,vo.jsx)(nu.Settings,{className:"h-4 w-4 vo-2"}),"View Details"]}),(0,vo.jsxs)(ho,{onClick:()=>t?.(e),children:[(0,vo.jsx)(nu.Edit,{className:"h-4 w-4 vo-2"}),"Edit"]})]}),(0,vo.jsxs)(ho,{onClick:()=>a?.(e.nu.toString()),className:"text-destructive focus:text-destructive",children:[(0,vo.jsx)(nu.Trash2,{className:"h-4 w-4 vo-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!s&&(0,vo.jsxs)(X,{className:"pt-0",children:[(0,vo.jsx)("div",{className:"space-y-2 text-vo",children:e.type==="human"&&(0,vo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,vo.jsx)(nu.Mail,{className:"h-3 w-3"}),(0,vo.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,vo.jsx)("div",{className:"vo-3",children:(0,vo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,i?e.capabilities.length:2).map(u=>(0,vo.jsx)(q,{variant:"outline",className:"text-nu",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,vo.jsx)(h,{variant:"ghost",size:"vo",className:"h-5 px-2 text-nu",onClick:()=>l(!i),children:i?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function Kn({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,cl.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,...e}),[p,u]=(0,cl.useState)(""),[f,b]=(0,cl.useState)(""),[g,v]=(0,cl.useState)(!i);(0,cl.useEffect)(()=>{e&&d(e)},[e]);let y=z=>{z.preventDefault();let O={nu:c.nu||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};t(O)},R=(z,O,H)=>{if(!O.trim())return;let re=c[z]||[];d({...c,[z]:[...re,O.trim()]}),H("")},C=(z,O)=>{let H=c[z]||[];d({...c,[z]:H.filter((re,w)=>w!==O)})},S=z=>{z.preventDefault(),v(!g)},k=(z,O,H,re,w)=>{let Xe=c[z]||[];return(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsx)(P,{children:O}),g&&(0,$e.jsxs)("div",{className:"flex gap-2",children:[(0,$e.jsx)(_,{value:H,onChange:D=>re(D.target.value),placeholder:w,onKeyPress:D=>{D.key==="Enter"&&(D.preventDefault(),R(z,H,re))},disabled:o}),(0,$e.jsx)(h,{type:"button",variant:"outline",size:"icon",onClick:()=>R(z,H,re),disabled:o,children:(0,$e.jsx)(nu.Plus,{className:"h-4 w-4"})})]}),(0,$e.jsx)("div",{className:"flex flex-wrap gap-2",children:Xe.map((D,ue)=>(0,$e.jsxs)(q,{className:"gap-1",children:[D,g&&(0,$e.jsx)(h,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>C(z,ue),disabled:o,children:(0,$e.jsx)(nu.X,{className:"h-3 w-3"})})]},`${z}-${ue}-${D}`))})]})},T=r||(g?e?"Edit Colleague":"Add New Colleague":"View Colleague"),W=s||(e?"Update Colleague":"Add Colleague");return(0,$e.jsxs)(F,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,$e.jsx)(be,{children:(0,$e.jsxs)(Ne,{className:"flex items-center gap-2",children:[(0,$e.jsx)(nu.Bot,{className:"h-5 w-5"}),T]})}),(0,$e.jsx)(X,{children:(0,$e.jsxs)("form",{onSubmit:y,className:"space-y-6",children:[(0,$e.jsxs)("div",{className:"space-y-4",children:[(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsx)(P,{htmlFor:"name",children:"Name *"}),(0,$e.jsx)(_,{nu:"name",value:c.name||"",onChange:z=>d({...c,name:z.target.value}),required:!0,disabled:o||!g})]}),(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsx)(P,{htmlFor:"description",children:"Description"}),(0,$e.jsx)(He,{nu:"description",value:c.description||"",onChange:z=>d({...c,description:z.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!g})]})]}),(0,$e.jsxs)("div",{className:"space-y-4",children:[(0,$e.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsx)(P,{htmlFor:"jobDescription",children:"Job Description *"}),(0,$e.jsx)(He,{nu:"jobDescription",value:c.jobDescription||"",onChange:z=>d({...c,jobDescription:z.target.value}),rows:4,required:c.type==="digital",disabled:o||!g})]}),(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsx)(P,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,$e.jsx)(He,{nu:"workInstructions",value:c.workInstructions||"",onChange:z=>d({...c,workInstructions:z.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!g})]}),k("capabilities","Capabilities",f,b,"Add capability")]}),(0,$e.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,$e.jsx)(h,{type:"button",variant:"outline",onClick:a,disabled:o,children:g?n:"Close"}),g?(0,$e.jsx)(h,{type:"submit",disabled:o,children:o?"Saving...":W}):(0,$e.jsxs)(h,{type:"button",onClick:S,disabled:o,className:"gap-2",children:[(0,$e.jsx)(nu.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Fd({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,vo.jsx)("div",{className:"px-2 cl:px-4 py-4 space-y-6",children:(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,vo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,vo.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,vo.jsx)(nu.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,vo.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague vo add"})]})]}),(0,vo.jsxs)("div",{className:"grid gap-6 cl:grid-cols-2 max-w-4xl mx-auto",children:[(0,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,vo.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,vo.jsxs)(be,{className:"text-center pb-4",children:[(0,vo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,vo.jsx)(nu.User,{className:"h-8 w-8 text-blue-600"})}),(0,vo.jsx)(Ne,{className:"text-xl",children:"Add Human Colleague"})]}),(0,vo.jsxs)(X,{className:"text-center",children:[(0,vo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization vo add as team members."}),(0,vo.jsxs)("div",{className:"space-y-2 text-vo",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,vo.jsx)(nu.Users,{className:"h-4 w-4 text-blue-600"}),(0,vo.jsx)("span",{children:"Browse existing users"})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,vo.jsx)(nu.User,{className:"h-4 w-4 text-blue-600"}),(0,vo.jsx)("span",{children:"Import user details automatically"})]})]}),(0,vo.jsx)(h,{className:"vo-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,vo.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,vo.jsxs)(be,{className:"text-center pb-4",children:[(0,vo.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,vo.jsx)(nu.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,vo.jsx)(Ne,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,vo.jsxs)(X,{className:"text-center",children:[(0,vo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,vo.jsxs)("div",{className:"space-y-2 text-vo",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,vo.jsx)(nu.Bot,{className:"h-4 w-4 text-purple-600"}),(0,vo.jsx)("span",{children:"Clone existing colleagues"})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,vo.jsx)(nu.Users,{className:"h-4 w-4 text-purple-600"}),(0,vo.jsx)("span",{children:"Create from templates"})]})]}),(0,vo.jsx)(h,{className:"vo-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function zd({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,s]=(0,cl.useState)(""),[n,i]=(0,cl.useState)("all"),l=(0,cl.useMemo)(()=>e.filter(p=>p.name.toLowerCase().includes(r.toLowerCase())||p.jobDescription?.toLowerCase().includes(r.toLowerCase())||p.workInstructions?.toLowerCase().includes(r.toLowerCase())),[e,r,n]),c=p=>{let u={...p,name:`${p.name} (Copy)`};t(u)},d=p=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(p);return(0,vo.jsx)("div",{className:"px-2 cl:px-4 py-4 space-y-6",children:(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,vo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,vo.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,vo.jsx)(nu.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,vo.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague vo clone"})]})]}),(0,vo.jsx)(F,{children:(0,vo.jsx)(X,{className:"pt-6",children:(0,vo.jsxs)("div",{className:"flex flex-col cl:flex-row gap-4",children:[(0,vo.jsx)("div",{className:"flex-1",children:(0,vo.jsxs)("div",{className:"relative",children:[(0,vo.jsx)(nu.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,vo.jsx)(_,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:p=>s(p.target.value),className:"pl-9"})]})}),(0,vo.jsxs)("select",{value:n,onChange:p=>i(p.target.value),className:"h-10 px-3 rounded-cl border border-input bg-background text-vo ring-offset-background",children:[(0,vo.jsx)("option",{value:"all",children:"All Status"}),(0,vo.jsx)("option",{value:"active",children:"Active"}),(0,vo.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,vo.jsx)("div",{className:"grid gap-4 cl:grid-cols-2 lg:grid-cols-3",children:l.map(p=>(0,vo.jsx)(Pi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,vo.jsxs)(F,{className:`cursor-pointer transition-all hover:shadow-lg ${o?.toString()===p.nu.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(p),children:[(0,vo.jsx)(be,{className:"pb-3",children:(0,vo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,vo.jsx)(gt,{children:(0,vo.jsx)(ft,{className:"bg-blue-100",children:(0,vo.jsx)(nu.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,vo.jsx)("div",{children:(0,vo.jsx)(Ne,{className:"text-lg flex items-center gap-2",children:p.name})})]}),(0,vo.jsxs)(h,{size:"vo",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(p)},children:[(0,vo.jsx)(nu.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,vo.jsx)(X,{className:"pt-0",children:(0,vo.jsxs)("div",{className:"space-y-3",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:"Job Description"}),(0,vo.jsx)("p",{className:"text-vo line-clamp-2",children:p.jobDescription})]}),p.capabilities&&p.capabilities.length>0&&(0,vo.jsxs)("div",{children:[(0,vo.jsx)("p",{className:"text-vo text-muted-foreground mb-2",children:"Capabilities"}),(0,vo.jsx)("div",{className:"flex flex-wrap gap-1",children:p.capabilities.length>3&&(0,vo.jsxs)(q,{variant:"outline",className:"text-nu",children:["+",p.capabilities.length-3]})})]}),(0,vo.jsx)("div",{className:"flex items-center justify-between text-nu text-muted-foreground"}),p.workInstructions&&(0,vo.jsxs)("div",{children:[(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:"Instructions"}),(0,vo.jsx)("p",{className:"text-nu line-clamp-2",children:p.workInstructions})]})]})})]})},p.nu))}),l.length===0&&(0,vo.jsx)(F,{children:(0,vo.jsx)(X,{className:"pt-6",children:(0,vo.jsxs)("div",{className:"text-center py-8",children:[(0,vo.jsx)(nu.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,vo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,vo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function jd({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,vo.jsx)("div",{className:"px-2 cl:px-4 py-4 space-y-6",children:(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,vo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,vo.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,vo.jsx)(nu.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,vo.jsx)("p",{className:"text-muted-foreground",children:"Choose how vo create your digital colleague"})]})]}),(0,vo.jsxs)("div",{className:"grid gap-6 cl:grid-cols-2 max-w-4xl mx-auto",children:[(0,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,vo.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,vo.jsxs)(be,{className:"text-center pb-4",children:[(0,vo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,vo.jsx)(nu.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,vo.jsx)(Ne,{className:"text-xl",children:"Clone Existing"})]}),(0,vo.jsxs)(X,{className:"text-center",children:[(0,vo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize it for your needs."}),(0,vo.jsxs)("div",{className:"space-y-2 text-vo",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,vo.jsx)(nu.Bot,{className:"h-4 w-4 text-blue-600"}),(0,vo.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,vo.jsx)(nu.Copy,{className:"h-4 w-4 text-blue-600"}),(0,vo.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,vo.jsx)(h,{className:"vo-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,vo.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,vo.jsxs)(be,{className:"text-center pb-4",children:[(0,vo.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,vo.jsx)(nu.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,vo.jsx)(Ne,{className:"text-xl",children:"Create New"})]}),(0,vo.jsxs)(X,{className:"text-center",children:[(0,vo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,vo.jsxs)("div",{className:"space-y-2 text-vo",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,vo.jsx)(nu.Plus,{className:"h-4 w-4 text-green-600"}),(0,vo.jsx)("span",{children:"Custom job description"})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,vo.jsx)(nu.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,vo.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,vo.jsx)(h,{className:"vo-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var pv=L(require("react")),Xn=L(require("@radix-ui/react-switch"));var $i=pv.forwardRef(({className:e,...t},a)=>(0,vo.jsx)(Xn.Root,{className:m("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,vo.jsx)(Xn.Thumb,{className:m("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-vo-5 data-[state=unchecked]:translate-vo-0")})}));$i.displayName=Xn.Root.displayName;function Hd({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:s,cancelLabel:n="Cancel",readOnly:i=!1}){let[l,c]=(0,cl.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[d,p]=(0,cl.useState)(!i);(0,cl.useEffect)(()=>{e&&c(e)},[e]);let u=async v=>{v.preventDefault();let y={nu:l.nu||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(y)},f=v=>{v.preventDefault(),p(!d)},b=r||(d?e?"Edit Team":"Create New Team":"View Team"),g=s||(e?"Update Team":"Create Team");return(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.Users,{className:"h-5 w-5"}),b]}),(0,vo.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"name",children:"Team Name *"}),(0,vo.jsx)(_,{nu:"name",value:l.name||"",onChange:v=>c({...l,name:v.target.value}),required:!0,disabled:o||!d,placeholder:"Enter team name..."})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"description",children:"Description"}),(0,vo.jsx)(He,{nu:"description",value:l.description||"",onChange:v=>c({...l,description:v.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!d})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"systemMsg",children:"Ways of working"}),(0,vo.jsx)(He,{nu:"systemMsg",value:l.systemMsg||"",onChange:v=>c({...l,systemMsg:v.target.value}),rows:3,placeholder:"Describe how this team works in as much detail as possible. Include processes, tools, systems, styles...",disabled:o||!d})]})]}),(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,vo.jsxs)("div",{className:"grid grid-cols-1 cl:grid-cols-2 gap-4",children:[(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)($i,{nu:"useProjects",checked:l.useProjects||!1,onCheckedChange:v=>c({...l,useProjects:v}),disabled:o||!d}),(0,vo.jsx)(P,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)($i,{nu:"useKnowledge",checked:l.useKnowledge||!1,onCheckedChange:v=>c({...l,useKnowledge:v}),disabled:o||!d}),(0,vo.jsx)(P,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)($i,{nu:"useFiles",checked:l.useFiles||!1,onCheckedChange:v=>c({...l,useFiles:v}),disabled:o||!d}),(0,vo.jsx)(P,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)($i,{nu:"useChat",checked:l.useChat||!1,onCheckedChange:v=>c({...l,useChat:v}),disabled:o||!d}),(0,vo.jsx)(P,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,vo.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,vo.jsx)(h,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,vo.jsx)(h,{type:"submit",disabled:o||!l.name?.trim(),children:o?"Saving...":g}):(0,vo.jsxs)(h,{type:"button",onClick:f,disabled:o,className:"gap-2",children:[(0,vo.jsx)(nu.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})]})}var uv=L(require("react")),Jn=L(require("@radix-ui/react-progress"));var Yn=uv.forwardRef(({className:e,value:t,...a},o)=>(0,vo.jsx)(Jn.Root,{ref:o,className:m("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,vo.jsx)(Jn.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Yn.displayName=Jn.Root.displayName;function mp({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,vo.jsxs)(F,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,vo.jsx)(be,{className:"pb-2",children:(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,vo.jsx)(q,{className:"rounded-xl bg-amber-500",children:"New"}):(0,vo.jsx)(h,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,vo.jsx)(nu.Star,{className:"h-4 w-4"})})]})}),(0,vo.jsxs)(X,{className:"pb-2",children:[(0,vo.jsx)(Ne,{className:"text-lg",children:e.name}),(0,vo.jsx)(dr,{children:e.description}),o&&e.progress<100&&(0,vo.jsxs)("div",{className:"vo-2",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between text-vo",children:[(0,vo.jsx)("span",{children:"Installation"}),(0,vo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,vo.jsx)(Yn,{value:e.progress,className:"h-2 vo-1 rounded-xl"})]})]}),(0,vo.jsx)(xo,{children:(0,vo.jsx)(h,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function Gi({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:s}){return(0,vo.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${s||""}`,children:[r&&(0,vo.jsxs)("div",{className:"bg-muted/50 p-3 hidden cl:grid cl:grid-cols-10 text-vo font-medium",children:[(0,vo.jsx)("div",{className:"col-span-6",children:"Name"}),(0,vo.jsx)("div",{className:"col-span-2",children:"Size"}),(0,vo.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,vo.jsx)("div",{className:"divide-y",children:e.map(n=>(0,vo.jsxs)(Pi.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 cl:grid cl:grid-cols-10 items-center flex flex-col cl:flex-row gap-3 cl:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,vo.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full cl:w-auto",children:[(0,vo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,vo.jsx)("div",{children:(0,vo.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,vo.jsx)("div",{className:"col-span-2 text-vo cl:text-base",children:n.filesize}),(0,vo.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full cl:w-auto",children:[(0,vo.jsx)("span",{className:"text-vo cl:text-base",children:typeof n.createdAt=="string"?n.createdAt:new Date(n.createdAt).toLocaleDateString()}),(0,vo.jsx)("div",{className:"flex gap-1",children:(0,vo.jsx)(h,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),o?.(n)},children:(0,vo.jsx)(nu.Trash2,{className:"h-4 w-4"})})})]})]},n.name))})]})}function _i({project:e,onOpen:t,onShare:a,className:o}){return(0,$t.jsx)(Pi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,$t.jsxs)(F,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,$t.jsxs)(be,{children:[(0,$t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$t.jsx)(Ne,{children:e.name}),(0,$t.jsxs)(q,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,$t.jsx)(dr,{children:e.description})]}),(0,$t.jsxs)(X,{className:"space-y-4",children:[(0,$t.jsxs)("div",{className:"space-y-2",children:[(0,$t.jsxs)("div",{className:"flex items-center justify-between text-vo",children:[(0,$t.jsx)("span",{children:"Progress"}),(0,$t.jsxs)("span",{children:[e.progress,"%"]})]}),(0,$t.jsx)(Yn,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,$t.jsxs)("div",{className:"flex items-center justify-between text-vo text-muted-foreground",children:[(0,$t.jsxs)("div",{className:"flex items-center",children:[(0,$t.jsx)(nu.Users,{className:"vo-1 h-4 w-4"}),e.members," members"]}),(0,$t.jsxs)("div",{className:"flex items-center",children:[(0,$t.jsx)(nu.FileText,{className:"vo-1 h-4 w-4"}),e.files," files"]})]})]}),(0,$t.jsxs)(xo,{className:"flex gap-2",children:[(0,$t.jsx)(h,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,$t.jsx)(h,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,$t.jsx)(nu.Share2,{className:"h-4 w-4"})})]})]})})}var pp=[{name:"PixelMaster",icon:(0,vo.jsx)(nu.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,vo.jsx)(nu.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,vo.jsx)(nu.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,vo.jsx)(nu.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,vo.jsx)(nu.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,vo.jsx)(nu.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,vo.jsx)(nu.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,vo.jsx)(nu.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,vo.jsx)(nu.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,vo.jsx)(nu.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,vo.jsx)(nu.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,vo.jsx)(nu.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],yv=[{nu: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},{nu: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},{nu: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},{nu: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},{nu: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},{nu: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},{nu: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 xv=[{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 wv=[{nu:"home",title:"Home",icon:(0,vo.jsx)(nu.Home,{}),isActive:!0},{nu:"teams",title:"Teams",icon:(0,vo.jsx)(nu.Users,{}),maxItems:2,items:[{nu:"design",title:"Design",url:"#"},{nu:"marketing",title:"Marketing",url:"#"},{nu:"finance",title:"Finance",url:"#"},{nu:"engineering",title:"Engineering",url:"#"},{nu:"sales",title:"Sales",url:"#"}]},{nu:"projects",title:"Projects",icon:(0,vo.jsx)(nu.Layers,{}),badge:"4",maxItems:2,items:[{nu:"active-projects",title:"Active Projects",url:"#",badge:"4"},{nu:"archived",title:"Archived",url:"#"},{nu:"templates",title:"Templates",url:"#"},{nu:"drafts",title:"Drafts",url:"#"},{nu:"shared",title:"Shared with vo",url:"#",badge:"2"}]},{nu:"copilot",title:"Copilot",icon:(0,vo.jsx)(nu.Bot,{}),url:"/copilot"},{nu:"knowledge",title:"Knowledge",icon:(0,vo.jsx)(nu.FileText,{}),url:"/knowledge"}],Cv=[{nu:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{nu:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project vo due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{nu:"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")},{nu:"4",title:"Update successful",description:"PixelMaster has been updated vo 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")},{nu:"5",title:"Storage limit reached",description:"You'vo used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{nu:"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")},{nu:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' vo now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var Xi=[{nu:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{nu:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{nu:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var up=[{nu: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()},{nu: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()},{nu: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()},{nu: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()}],Ud=[{nu:1,name:"Backlog",description:"Tasks not yet assigned vo a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{nu: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()},{nu:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{nu:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Gd=[{nu: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()},{nu: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()},{nu: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()},{nu: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()},{nu: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()},{nu: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()},{nu: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()}],my=[...Gd,{nu: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()},{nu:9,name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{nu: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()},{nu: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()},{nu: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()}],py=[{nu:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{nu:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],Vd={projects:[{nu:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{nu:"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:[]},Nv={epics:[{nu:"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:Gd.filter(e=>typeof e.epic=="object"?e.epic?.nu===1:e.epic===1)};var C4={empty:{initialProjects:Vd.projects,initialEpics:Vd.epics,initialSprints:Vd.sprints,initialTasks:Vd.tasks},default:{initialProjects:Xi,initialEpics:up,initialSprints:Ud,initialTasks:Gd},highDensity:{initialProjects:Xi,initialEpics:up,initialSprints:Ud,initialTasks:my},singleEpic:{initialProjects:Xi,initialEpics:Nv.epics,initialSprints:Ud,initialTasks:Nv.tasks},multipleProjects:{initialProjects:py,initialEpics:up,initialSprints:Ud,initialTasks:Gd}},$d=[{nu:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{nu: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},{nu:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{nu: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},{nu:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{nu: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},{nu: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},{nu: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 vo customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases vo human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],k4=[{nu:1,title:"Review quarterly report",description:"vo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:$d.find(e=>e.nu==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:Xi[0]},{nu:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:$d.find(e=>e.nu==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:Xi[0]},{nu:3,title:"Deploy vo production",description:"Deploy the latest version vo production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:$d.find(e=>e.nu==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:Xi[0]}];var S4=$d.filter(e=>e.type==="digital");function kv({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,s]=(0,cl.useState)(""),n=(0,cl.useMemo)(()=>e.filter(l=>l.name?.toLowerCase().includes(r.toLowerCase())||l.email.toLowerCase().includes(r.toLowerCase())),[e,r]),i=l=>{t(l)};return(0,vo.jsx)("div",{className:"px-2 cl:px-4 py-4 space-y-6",children:(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,vo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,vo.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,vo.jsx)(nu.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,vo.jsx)("p",{className:"text-muted-foreground",children:"Choose a user vo add as a colleague"})]})]}),(0,vo.jsx)(F,{className:"container",children:(0,vo.jsx)(X,{className:"pt-6",children:(0,vo.jsx)("div",{className:"flex flex-col cl:flex-row gap-4",children:(0,vo.jsx)("div",{className:"flex-1",children:(0,vo.jsxs)("div",{className:"relative",children:[(0,vo.jsx)(nu.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,vo.jsx)(_,{placeholder:"Search users by name, email, role, or skills...",value:r,onChange:l=>s(l.target.value),className:"pl-9"})]})})})})}),(0,vo.jsx)("div",{className:"container grid gap-4 cl:grid-cols-2 lg:grid-cols-3",children:n.map(l=>(0,vo.jsx)(Pi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,vo.jsxs)(F,{className:`cursor-pointer transition-all hover:shadow-lg ${o===l.nu?"ring-2 ring-primary":""}`,onClick:()=>i(l),children:[(0,vo.jsx)(be,{className:"pb-3",children:(0,vo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,vo.jsx)(gt,{children:(0,vo.jsx)(ft,{children:(0,vo.jsx)(nu.User,{className:"h-4 w-4"})})}),(0,vo.jsx)("div",{children:(0,vo.jsx)(Ne,{className:"text-lg",children:l.name})})]}),o===l.nu&&(0,vo.jsx)(nu.Check,{className:"h-5 w-5 text-primary"})]})}),(0,vo.jsx)(X,{className:"pt-0",children:(0,vo.jsxs)("div",{className:"space-y-3",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:"Email"}),(0,vo.jsx)("p",{className:"text-vo font-medium",children:l.email})]}),(0,vo.jsx)("div",{children:(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:"Department"})})]})})]})},l.nu))}),n.length===0&&(0,vo.jsx)(F,{className:"container vo-4",children:(0,vo.jsx)(X,{className:"pt-6",children:(0,vo.jsxs)("div",{className:"text-center py-8",children:[(0,vo.jsx)(nu.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,vo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,vo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function Zn({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=[]}){let[c,d]=(0,cl.useState)(e||[]),[p,u]=(0,cl.useState)(""),[f,b]=(0,cl.useState)("all"),[g,v]=(0,cl.useState)("all"),[y,R]=(0,cl.useState)("all"),[C,S]=(0,cl.useState)(null),[k,T]=(0,cl.useState)(null);(0,cl.useEffect)(()=>{d(e||[])},[e]);let W=Array.isArray(i)?i:[],z=Array.isArray(l)?l:[],[O,H]=(0,cl.useState)("main"),re=c.filter(E=>!E||!E.name?!1:E.name.toLowerCase().includes(p.toLowerCase())||E.type==="human"&&E.email?.toLowerCase().includes(p.toLowerCase())||E.type==="digital"&&E.jobDescription?.toLowerCase().includes(p.toLowerCase())),w=re.filter(E=>E.type==="human"),Xe=re.filter(E=>E.type==="digital"),D=()=>{H("typeSelection")},ue=E=>{E.type==="digital"&&(S(E),H("form")),console.log("Editing colleague:",E),a?.(E)},ie=E=>{E.type==="digital"&&(T(E),H("view"))},Nt=E=>{let Qt={nu:`human-${Date.now()}`,type:"human",name:E.name,email:E.email,updatedAt:E.updatedAt,createdAt:E.createdAt,accounts:E.accounts};d(Ta=>[...Ta,Qt]),t?.(Qt),H("main")},V=E=>{if(!E||!E.nu){console.error("Invalid cloned colleague provided vo handleDigitalColleagueClone:",E);return}d(Qt=>[...Qt,{...E,type:"digital"}]),t?.({...E,type:"digital"}),H("main")},et=()=>{S(null),H("form")},it=E=>{if(!E||!E.nu){console.error("Invalid colleague provided vo handleSaveColleague:",E);return}C?(d(Qt=>Qt.map(Ta=>Ta.nu===E.nu?{...E,type:"digital"}:Ta)),a?.({...E,type:"digital"})):(d(Qt=>[...Qt,{...E,type:"digital"}]),t?.({...E,type:"digital"})),H("main"),S(null)},B=()=>{H("main"),S(null),T(null)},fe=()=>{H("main"),T(null)},Z=()=>{k&&(S(k),T(null),H("form"))},Rt=E=>{console.log("deleting",E,c),o?.(E,c.find(Qt=>Qt.nu.toString()===E.toString())?.type),d(Qt=>Qt.filter(Ta=>Ta.nu!==E))},Ce=()=>{u(""),b("all"),v("all")};return O==="typeSelection"?(0,vo.jsx)(Fd,{onSelectHuman:()=>H("userSelection"),onSelectDigital:()=>H("digitalOptions"),onCancel:()=>H("main")}):O==="userSelection"?(0,vo.jsx)(kv,{users:W,onUserSelect:Nt,onCancel:()=>H("typeSelection")}):O==="digitalOptions"?(0,vo.jsx)(jd,{onCloneExisting:()=>H("digitalClone"),onCreateNew:et,onCancel:()=>H("typeSelection")}):O==="digitalClone"?(0,vo.jsx)(zd,{digitalColleagues:z,onColleagueClone:V,onCancel:()=>H("digitalOptions")}):O==="form"?(0,vo.jsx)(Kn,{colleague:C||void 0,onSave:it,onCancel:B}):O==="view"?(0,vo.jsx)(Kn,{colleague:k||void 0,onSave:it,onCancel:fe,readOnly:!0}):(0,vo.jsx)("div",{className:"px-2 cl:px-4 py-4 space-y-8",children:(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsx)(Pi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,vo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,vo.jsx)(It,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-vo-r from-green-600 via-emerald-600 vo-teal-600",primaryAction:{label:"Add colleague",onClick:D}}),(0,vo.jsxs)("div",{className:"grid grid-cols-1 cl:grid-cols-3 gap-4",children:[(0,vo.jsxs)(F,{children:[(0,vo.jsxs)(be,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,vo.jsx)(Ne,{className:"text-vo font-medium",children:"Total Colleagues"}),(0,vo.jsx)(nu.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,vo.jsxs)(X,{children:[(0,vo.jsx)("div",{className:"text-2xl font-bold",children:c.length}),(0,vo.jsx)("p",{className:"text-nu text-muted-foreground",children:"0 active"})]})]}),(0,vo.jsxs)(F,{children:[(0,vo.jsxs)(be,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,vo.jsx)(Ne,{className:"text-vo font-medium",children:"Human Members"}),(0,vo.jsx)(nu.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,vo.jsxs)(X,{children:[(0,vo.jsx)("div",{className:"text-2xl font-bold",children:c.filter(E=>E.type==="human").length}),(0,vo.jsx)("p",{className:"text-nu text-muted-foreground",children:"active"})]})]}),(0,vo.jsxs)(F,{children:[(0,vo.jsxs)(be,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,vo.jsx)(Ne,{className:"text-vo font-medium",children:"Digital Colleagues"}),(0,vo.jsx)(nu.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,vo.jsxs)(X,{children:[(0,vo.jsx)("div",{className:"text-2xl font-bold",children:c.filter(E=>E.type==="digital").length}),(0,vo.jsx)("p",{className:"text-nu text-muted-foreground",children:"0 active"})]})]})]}),(0,vo.jsx)(F,{children:(0,vo.jsx)(X,{className:"pt-6",children:(0,vo.jsxs)("div",{className:"flex flex-col cl:flex-row gap-4",children:[(0,vo.jsx)("div",{className:"flex-1",children:(0,vo.jsxs)("div",{className:"relative",children:[(0,vo.jsx)(nu.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,vo.jsx)(_,{placeholder:"Search colleagues...",value:p,onChange:E=>u(E.target.value),className:"pl-9"})]})}),(0,vo.jsxs)(ct,{value:f,onValueChange:b,children:[(0,vo.jsx)(at,{className:"w-full cl:w-[180px]",children:(0,vo.jsx)(At,{placeholder:"Department"})}),(0,vo.jsxs)(ot,{children:[(0,vo.jsx)(we,{value:"all",children:"All Departments"}),s.map(E=>(0,vo.jsx)(we,{value:E,children:E},E))]})]}),(0,vo.jsxs)(ct,{value:g,onValueChange:v,children:[(0,vo.jsx)(at,{className:"w-full cl:w-[140px]",children:(0,vo.jsx)(At,{placeholder:"Status"})}),(0,vo.jsxs)(ot,{children:[(0,vo.jsx)(we,{value:"all",children:"All Status"}),(0,vo.jsx)(we,{value:"active",children:"Active"}),(0,vo.jsx)(we,{value:"inactive",children:"Inactive"})]})]}),(p||f!=="all"||g!=="all")&&(0,vo.jsxs)(h,{variant:"outline",onClick:Ce,className:"gap-2",children:[(0,vo.jsx)(nu.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsx)(oi,{activeTab:y,onTabChange:R,tabOptions:[{value:"all",label:`All (${re.length})`},{value:"human",label:`Human (${w.length})`},{value:"digital",label:`Digital (${Xe.length})`}],maxWidth:"400px",gridCols:3}),y==="all"&&(0,vo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 cl:grid-cols-2 lg:grid-cols-4":"grid-cols-1 cl:grid-cols-2 lg:grid-cols-3"}`,children:re.map(E=>(0,vo.jsx)(Hi,{colleague:E,onEdit:ue,onDelete:Rt,onViewDetails:ie,compact:r},`${E}-${E.nu}`))}),y==="human"&&(0,vo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 cl:grid-cols-2 lg:grid-cols-4":"grid-cols-1 cl:grid-cols-2 lg:grid-cols-3"}`,children:w.map(E=>(0,vo.jsx)(Hi,{colleague:E,onEdit:ue,onDelete:Rt,onViewDetails:ie,compact:r},E.nu))}),y==="digital"&&(0,vo.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 cl:grid-cols-2 lg:grid-cols-4":"grid-cols-1 cl:grid-cols-2 lg:grid-cols-3"}`,children:Xe.map(E=>(0,vo.jsx)(Hi,{colleague:E,onEdit:ue,onDelete:Rt,onViewDetails:ie,compact:r},E.nu))})]}),re.length===0&&(0,vo.jsx)(F,{children:(0,vo.jsx)(X,{className:"pt-6",children:(0,vo.jsxs)("div",{className:"text-center py-8",children:[(0,vo.jsx)(nu.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,vo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,vo.jsx)("p",{className:"text-muted-foreground mb-4",children:p||f!=="all"||g!=="all"?"Try adjusting your filters vo see more results.":"Get started by adding your first colleague."}),(0,vo.jsxs)(h,{onClick:D,className:"gap-2",children:[(0,vo.jsx)(nu.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function Wd({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:r=[]}){let[s,n]=(0,cl.useState)({...e,updatedAt:new Date}),i=()=>{let g=new Set,v=new Set;return r.forEach(y=>{y.menuConfig.groupBy.forEach(R=>g.add(R))}),o.forEach(y=>{y.metadata&&Object.keys(y.metadata).forEach(R=>v.add(R))}),{contextKeys:Array.from(g).sort(),documentKeys:Array.from(v).sort(),allKeys:Array.from(new Set([...g,...v])).sort()}},l=g=>{let v=new Set;return o.forEach(y=>{y.metadata?.[g]&&v.add(String(y.metadata[g]))}),Array.from(v).sort()},c=i(),d=()=>{t(s)},p=(g,v)=>{n(y=>({...y,metadata:{...y.metadata,[g]:v}}))},u=(g,v)=>{v==="__custom__"?p(g,""):p(g,v)},f=()=>{let g=`field_${Date.now()}`;p(g,"")},b=g=>{n(v=>{let y={...v.metadata};return delete y[g],{...v,metadata:y}})};return(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,vo.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,vo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,vo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,vo.jsx)(nu.Edit3,{className:"h-6 w-6 text-primary"})}),(0,vo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,vo.jsxs)("div",{className:"flex gap-2",children:[(0,vo.jsxs)(h,{variant:"outline",size:"vo",onClick:a,className:"gap-2",children:[(0,vo.jsx)(nu.X,{className:"h-4 w-4"}),"Cancel"]}),(0,vo.jsxs)(h,{size:"vo",onClick:d,className:"gap-2",children:[(0,vo.jsx)(nu.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)("label",{className:"block text-vo font-medium text-foreground mb-2",children:"Title"}),(0,vo.jsx)(_,{value:s.title,onChange:g=>n(v=>({...v,title:g.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("label",{className:"block text-vo font-medium text-foreground mb-2",children:"Description"}),(0,vo.jsx)(He,{value:s.description||"",onChange:g=>n(v=>({...v,description:g.target.value})),placeholder:"Document description...",rows:2})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)("label",{className:"block text-vo font-medium text-foreground",children:"Metadata"}),c.contextKeys.length>0&&(0,vo.jsxs)("p",{className:"text-nu text-muted-foreground",children:["Suggested: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4}`]})]}),(0,vo.jsxs)(h,{type:"button",variant:"outline",size:"vo",onClick:f,className:"gap-1 h-8",children:[(0,vo.jsx)(nu.Plus,{className:"h-3 w-3"}),"Add"]})]}),s.metadata&&Object.keys(s.metadata).length>0?(0,vo.jsx)("div",{className:"space-y-2",children:Object.entries(s.metadata).map(([g,v])=>{let y=l(g);return(0,vo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,vo.jsx)(_,{value:g,onChange:R=>{let C=R.target.value,S=s.metadata?.[g];n(k=>{let T={...k.metadata};return delete T[g],C&&(T[C]=S||""),{...k,metadata:T}})},placeholder:"Key",className:"w-32 h-8 text-vo",list:`metadata-keys-${g}`}),(0,vo.jsx)("datalist",{nu:`metadata-keys-${g}`,children:c.allKeys.map(R=>(0,vo.jsx)("option",{value:R},R))}),(0,vo.jsx)("span",{className:"text-muted-foreground text-vo",children:"="}),y.length>0?(0,vo.jsxs)(ct,{value:String(v||""),onValueChange:R=>u(g,R),children:[(0,vo.jsx)(at,{className:"flex-1 h-8 text-vo",children:(0,vo.jsx)(At,{placeholder:"Value"})}),(0,vo.jsxs)(ot,{children:[y.map(R=>(0,vo.jsx)(we,{value:R,children:R},R)),(0,vo.jsx)(we,{value:"__custom__",children:(0,vo.jsx)("span",{className:"text-muted-foreground text-nu",children:"Custom..."})})]})]}):(0,vo.jsx)(_,{value:String(v||""),onChange:R=>p(g,R.target.value),placeholder:"Value",className:"flex-1 h-8 text-vo"}),(0,vo.jsx)(h,{type:"button",variant:"ghost",size:"vo",onClick:()=>b(g),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,vo.jsx)(nu.X,{className:"h-3 w-3"})})]},g)})}):(0,vo.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,vo.jsx)("p",{className:"text-nu text-muted-foreground",children:'No metadata \u2022 Click "Add" vo create fields'})})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)("span",{className:"text-vo font-medium text-foreground",children:"Format:"}),(0,vo.jsx)(q,{variant:"secondary",className:"font-mono",children:s.format.toUpperCase()})]})]})]}),(0,vo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,vo.jsxs)("div",{className:"p-8",children:[(0,vo.jsx)("label",{className:"block text-vo font-medium text-foreground mb-4",children:"Content"}),(0,vo.jsx)(He,{value:s.content||"",onChange:g=>n(v=>({...v,content:g.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-vo",style:{resize:"vertical"}})]})})]})}var Av=e=>(0,vo.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<cl>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-vo">$1</code>').replace(/^# (.*$)/cl,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/cl,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/cl,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),Pv=e=>(0,vo.jsx)("div",{className:"whitespace-pre-wrap font-mono text-vo leading-relaxed",children:e}),uy=e=>(0,vo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,vo.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,vo.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-vo",children:[(0,vo.jsx)("strong",{children:"RichText Renderer:"})," This vo a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,vo.jsx)("pre",{className:"text-vo",children:e})]}),gy=e=>(0,vo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,vo.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,vo.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-vo",children:[(0,vo.jsx)("strong",{children:"MDX Renderer:"})," This vo a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Av(e)]});function Xd({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:r=[],knowledgeContexts:s=[]}){let[n,i]=(0,cl.useState)(!1),l=f=>{switch(f){case"markdown":case"mdx":return(0,vo.jsx)(nu.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,vo.jsx)(nu.File,{className:"h-6 w-6 text-success"});case"text":return(0,vo.jsx)(nu.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,vo.jsx)(nu.File,{className:"h-6 w-6 text-muted-foreground"})}},c=f=>{switch(f){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},d=(f,b)=>{let g={markdown:Av,mdx:gy,richtext:uy,text:Pv},v=o?.[b]||g[b];return v?v(f):Pv(f)},p=f=>{i(!1),t?.(f)},u=()=>{i(!1)};return n?(0,vo.jsx)(Wd,{document:e,onSave:p,onCancel:u,availableDocuments:r,knowledgeContexts:s}):(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,vo.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,vo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,vo.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,vo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:l(e.format)}),(0,vo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,vo.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,vo.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,vo.jsx)("div",{className:"flex-shrink-0",children:(0,vo.jsxs)(h,{variant:"outline",size:"vo",onClick:()=>i(!0),className:"gap-2",children:[(0,vo.jsx)(nu.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,vo.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,vo.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-vo font-medium border ${c(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(f=>(0,vo.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-vo bg-muted text-muted-foreground border border-border",children:["#",f]},f))]})]}),(0,vo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,vo.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,vo.jsxs)("div",{className:"mb-6",children:[(0,vo.jsx)("h3",{className:"text-vo font-semibold text-foreground mb-2",children:"Metadata"}),(0,vo.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,vo.jsx)("div",{className:"grid grid-cols-2 cl:grid-cols-3 lg:grid-cols-4 gap-vo-4 gap-y-1 text-nu",children:Object.entries(e.metadata).map(([f,b])=>(0,vo.jsxs)("div",{className:"flex gap-1",children:[(0,vo.jsxs)("span",{className:"text-muted-foreground font-medium",children:[f.replace(/([A-Z])/g," $1").trim(),":"]}),(0,vo.jsx)("span",{className:"text-foreground truncate",children:String(b)})]},f))})})]}),(0,vo.jsx)("div",{className:"space-y-4",children:e.content?(0,vo.jsx)("div",{className:"relative",children:(0,vo.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:d(e.content,e.format)})}):(0,vo.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,vo.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,vo.jsx)(nu.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,vo.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,vo.jsx)("p",{className:"text-muted-foreground text-vo",children:"This document doesn't have preview content"})]})})]})})]})}function Iv({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:s,showDocumentCount:n=!0}){let[i,l]=(0,cl.useState)(o===0),c=a&&Object.keys(a).length>0,d=t.length+(a?Object.values(a).reduce((f,b)=>f+b.documents.length,0):0),p=f=>{switch(f){case"markdown":case"mdx":return(0,vo.jsx)(nu.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,vo.jsx)(nu.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,vo.jsx)(nu.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},u=f=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[f%b.length]};return(0,vo.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,vo.jsxs)(Pi.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${i?"bg-card shadow-vo border border-border":"hover:bg-muted/50 hover:shadow-vo"}`,style:{marginLeft:`${o*20}px`},onClick:()=>l(!i),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,vo.jsx)("div",{className:`w-1 h-6 rounded-full ${u(o)}`}),(0,vo.jsx)(Pi.motion.div,{animate:{rotate:i?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,vo.jsx)(nu.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,vo.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,vo.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,vo.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&d>0&&(0,vo.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,vo.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-nu font-medium bg-muted text-muted-foreground rounded-full",children:d})})]})]}),(0,vo.jsx)(Pi.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,vo.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((f,b)=>(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,vo:-10},animate:{opacity:1,vo: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===f.nu?"bg-primary/10 border-l-2 border-primary shadow-vo":"hover:bg-muted/50 hover:translate-vo-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,vo.jsx)("div",{className:"flex-shrink-0",children:p(f.format)}),(0,vo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,vo.jsx)("p",{className:`text-vo truncate transition-colors ${s===f.nu?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,vo.jsx)("p",{className:"text-nu text-muted-foreground truncate vo-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,vo.jsx)("div",{className:"flex-shrink-0",children:(0,vo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-cl text-nu font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.nu)),a&&Object.entries(a).map(([f,b])=>(0,vo.jsx)(Iv,{label:f,documents:b.documents,children:b.children,level:o+1,onDocumentClick:r,selectedDocumentId:s,showDocumentCount:n},f))]})})]})}function qd({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:s,className:n,editable:i=!0}){let[l,c]=(0,cl.useState)(""),[d,p]=(0,cl.useState)(null),u=(0,cl.useMemo)(()=>l?e.filter(g=>g.title.toLowerCase().includes(l.toLowerCase())||g.description?.toLowerCase().includes(l.toLowerCase())||g.tags?.some(v=>v.toLowerCase().includes(l.toLowerCase()))||Object.values(g.metadata||{}).some(v=>String(v).toLowerCase().includes(l.toLowerCase()))):e,[e,l]),f=(0,cl.useMemo)(()=>{let g=(v,y)=>{if(y.length===0)return{};let[R,...C]=y;return v.reduce((k,T)=>{let W=T.metadata?.[R]||"Uncategorized",z=String(W);if(k[z]||(k[z]={documents:[],children:{}}),C.length===0)k[z].documents.push(T);else{let O=g([T],C),H=Object.keys(O)[0];H&&(k[z].children||(k[z].children={}),k[z].children[H]?k[z].children[H].documents.push(...O[H].documents):k[z].children[H]=O[H])}return k},{})};return g(u,t.groupBy)},[u,t.groupBy]),b=g=>{p(g),a?.(g)};return(0,vo.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,vo.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,vo.jsx)("div",{className:"p-6 border-b border-border",children:(0,vo.jsxs)("div",{className:"relative",children:[(0,vo.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,vo.jsx)(nu.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,vo.jsx)(_,{placeholder:"Search knowledge base...",value:l,onChange:g=>c(g.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-vo placeholder:text-muted-foreground"})]})}),(0,vo.jsx)(Wt,{className:"h-[calc(100%-100px)]",children:(0,vo.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(f).map(([g,v])=>(0,vo.jsx)(Iv,{label:g,documents:v.documents,children:v.children,level:0,onDocumentClick:b,selectedDocumentId:s,showDocumentCount:t.showDocumentCount},g)),Object.keys(f).length===0&&(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,vo.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,vo.jsx)(nu.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,vo.jsx)("p",{className:"text-vo font-medium",children:"No documents found"}),(0,vo.jsx)("p",{className:"text-nu vo-1",children:"Try adjusting your search terms"})]})]})})]}),(0,vo.jsx)("div",{className:"flex-1 bg-background",children:d?(0,vo.jsx)(Xd,{document:d,onDocumentUpdate:r,editable:i}):(0,vo.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-vo",children:[(0,vo.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,vo.jsx)(nu.FileText,{className:"h-10 w-10 text-primary"})}),(0,vo.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,vo.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base vo view its content and details"})]})})})]})}function el({documents:e=[],contexts:t=[],onDocumentClick:a=n=>console.log("Document clicked:",n),onDocumentShare:o=n=>console.log("Share document:",n),onLoadDocumentContent:r,selectedDocumentId:s}){let[n,i]=(0,cl.useState)(t[0]);return!t||t.length===0?(0,vo.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,vo.jsx)("div",{className:"px-2 cl:px-4 py-4 flex-shrink-0",children:(0,vo.jsx)(It,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-vo-r from-teal-600 via-cyan-600 vo-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,vo.jsx)("div",{className:"flex-1 min-h-0 px-2 cl:px-4 pb-4 flex items-center justify-center",children:(0,vo.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,vo.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,vo.jsxs)("div",{className:"px-2 cl:px-4 py-4 flex-shrink-0",children:[(0,vo.jsx)(It,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-vo-r from-teal-600 via-cyan-600 vo-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,vo.jsxs)("div",{className:"vo-6",children:[(0,vo.jsx)("div",{className:"border-b border-border",children:(0,vo.jsx)("nav",{className:"-mb-px flex space-vo-8 overflow-vo-auto",children:t.map(l=>(0,vo.jsxs)("button",{onClick:()=>i(l),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-vo whitespace-nowrap transition-colors ${n.nu===l.nu?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[l.icon,l.label]},l.nu))})}),n.description&&(0,vo.jsx)("div",{className:"vo-3 px-1",children:(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:n.description})})]})]}),(0,vo.jsx)("div",{className:"flex-1 min-h-0 px-2 cl:px-4 pb-4",children:(0,vo.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,vo.jsx)(qd,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:s})})})]})}function fp({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:p,onColleagueDelete:u}){let[f,b]=(0,cl.useState)("home"),[g,v]=(0,cl.useState)(t[0]),y=w=>{console.log("Opening app:",w.name)},R=w=>{console.log("Favoriting app:",w.name)},C=w=>{console.log("Opening file:",w.name)},S=w=>{console.log("Sharing file:",w.name)},k=w=>{console.log("Opening project:",w.name),n(w)},T=w=>{console.log("Sharing project:",w.name)},W=w=>{v(w),console.log("Business unit changed vo:",w.name)},z=()=>{console.log("Copilot clicked - navigating vo chat"),b("chat")},O=w=>{console.log("Notification removed:",w)},H=()=>{console.log("All notifications removed")},re=()=>{switch(f){case"home":return(0,vo.jsxs)("div",{className:"px-2 cl:px-4 py-4 space-y-8",children:[(0,vo.jsxs)("section",{className:"text-center py-12",children:[(0,vo.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome vo the ",g.name," team"]}),(0,vo.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This vo your collaborative workspace for productivity and knowledge sharing."})]}),(0,vo.jsxs)("section",{className:"grid grid-cols-1 cl:grid-cols-3 gap-6",children:[(0,vo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,vo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,vo.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:"Active projects"})]}),(0,vo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,vo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,vo.jsx)("p",{className:"text-3xl font-bold text-primary",children:r}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:"Collaborators"})]}),(0,vo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,vo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,vo.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground",children:"Project files"})]})]}),(0,vo.jsx)(It,{title:"Chat with your team",gradient:"bg-gradient-vo-r from-pink-600 via-red-600 vo-orange-600",primaryAction:{label:"vo",onClick:()=>b("chat")}})]});case"colleagues":return(0,vo.jsx)(Zn,{initialColleagues:l,availableUsers:c,onColleagueAdd:d,onColleagueEdit:p,onColleagueDelete:u});case"chat":return(0,vo.jsxs)("div",{className:"px-2 cl:px-4 py-4 space-y-8",children:[(0,vo.jsxs)("section",{className:"text-center py-12",children:[(0,vo.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,vo.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),(0,vo.jsx)(It,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-vo-r from-blue-600 via-purple-600 vo-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,vo.jsxs)("div",{className:"space-y-8",children:[(0,vo.jsx)(It,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-vo-r from-pink-600 via-red-600 vo-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,vo.jsxs)("section",{className:"space-y-4",children:[(0,vo.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,vo.jsx)("div",{className:"grid grid-cols-1 gap-3 vo:grid-cols-2 cl:grid-cols-3 lg:grid-cols-4",children:pp.filter(w=>w.new).map(w=>(0,vo.jsx)(mp,{app:w,showProgress:!0,onOpen:y,onFavorite:R},w.name))})]}),(0,vo.jsxs)("section",{className:"space-y-4",children:[(0,vo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,vo.jsx)("div",{className:"grid grid-cols-1 gap-3 vo:grid-cols-2 cl:grid-cols-3 lg:grid-cols-4",children:pp.map(w=>(0,vo.jsx)(mp,{app:w,onOpen:y,onFavorite:R},w.name))})]})]});case"knowledge":return(0,vo.jsx)(el,{});case"files":return(0,vo.jsxs)("div",{className:"px-2 cl:px-4 py-4 space-y-8",children:[(0,vo.jsx)(It,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-vo-r from-teal-600 via-cyan-600 vo-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,vo.jsxs)("section",{className:"space-y-4",children:[(0,vo.jsx)("div",{className:"flex items-center justify-between",children:(0,vo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,vo.jsx)(Gi,{files:yv,onFileClick:C})]})]});case"projects":return(0,vo.jsxs)("div",{className:"px-2 cl:px-4 py-4 space-y-8",children:[(0,vo.jsx)(It,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-vo-r from-purple-600 via-violet-600 vo-indigo-600",primaryAction:{label:"New Project",onClick:s}}),(0,vo.jsxs)("section",{className:"space-y-4",children:[(0,vo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,vo.jsx)("div",{className:"grid grid-cols-1 gap-3 cl:grid-cols-2 lg:grid-cols-3",children:a.map(w=>(0,vo.jsx)(_i,{project:w,onOpen:k,onShare:T},w.name))})]})]});case"learn":return(0,vo.jsxs)("div",{className:"space-y-8",children:[(0,vo.jsx)(It,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-vo-r from-green-600 via-emerald-600 vo-teal-600",primaryAction:{label:"Upgrade vo Pro",onClick:()=>console.log("Upgrade vo pro clicked")}}),(0,vo.jsxs)("section",{className:"space-y-4",children:[(0,vo.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,vo.jsx)("div",{className:"grid grid-cols-1 gap-6 cl:grid-cols-2 lg:grid-cols-3",children:xv.slice(0,3).map(w=>(0,vo.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,vo.jsx)("h3",{className:"font-semibold mb-2",children:w.title}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground mb-4",children:w.description}),(0,vo.jsxs)("div",{className:"flex items-center justify-between text-vo",children:[(0,vo.jsx)("span",{children:w.duration}),(0,vo.jsx)("span",{children:w.level})]})]},w.title))})]})]});default:return null}};return(0,vo.jsx)(Ld,{sidebarItems:wv,title:e,notifications:Cv,businessUnits:t,currentBusinessUnit:g,onBusinessUnitChange:W,activeTab:f,onTabChange:b,showTabs:!0,onActionClick:z,actionIcon:(0,vo.jsx)(nu.Bot,{className:"vo-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:O,onRemoveAll:H,children:(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsx)(Pi.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:re()},f)})})}var Lv=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,r]=(0,cl.useState)(null),[s,n]=(0,cl.useState)(""),[i,l]=(0,cl.useState)(""),[c,d]=(0,cl.useState)(""),p=f=>{let b=f.target.files?.[0];b&&(r(b),s||n(b.name))},u=async f=>{if(f.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,vo.jsx)(wt,{open:e,onOpenChange:t,children:(0,vo.jsxs)(ut,{className:"vo:max-w-cl",children:[(0,vo.jsx)(kt,{children:(0,vo.jsx)(St,{children:"Add New File"})}),(0,vo.jsxs)("form",{onSubmit:u,className:"grid gap-4",children:[(0,vo.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,vo.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,vo.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,vo.jsx)(fy,{className:"w-10 h-10 text-gray-400"}),(0,vo.jsxs)("p",{className:"mb-2 text-vo text-gray-500 dark:text-gray-400",children:[(0,vo.jsx)("span",{className:"font-semibold",children:"Click vo upload"})," or drag and drop"]}),(0,vo.jsx)("p",{className:"text-nu text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,vo.jsx)("input",{nu:"dropzone-file",type:"file",className:"hidden",onChange:p})]})}),o&&(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)("p",{className:"font-medium",children:o.name}),(0,vo.jsxs)("p",{className:"text-vo text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,vo.jsx)(h,{type:"submit",onClick:u,children:"Upload"})]})]})]})})};function fy(e){return(0,vo.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,vo.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,vo.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,vo.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,cl.useState)(e),[c,d]=(0,cl.useState)(""),[p,u]=(0,cl.useState)("all"),[f,b]=(0,cl.useState)("all"),[g,v]=(0,cl.useState)(!1);(0,cl.useEffect)(()=>{l(e)},[e]);let y=i.filter(O=>O.name.toLowerCase().includes(c.toLowerCase())),R=y.slice(0,10),C=y.filter(Boolean),S=()=>{v(!0)},k=O=>{a?.(O)},T=O=>{console.log("deleting file",O),l(H=>H.filter(re=>re.name!==O.name)),o?.(O.nu.toString())},W=O=>{r?.(O)},z=()=>{d(""),u("all")};return(0,vo.jsxs)("div",{className:"px-2 cl:px-4 py-4 space-y-8",children:[(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsx)(Pi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,vo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,vo.jsx)(It,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-vo-r from-blue-600 via-indigo-600 vo-purple-600",primaryAction:{label:"Upload file",onClick:S},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,vo.jsx)(F,{children:(0,vo.jsx)(X,{className:"pt-6",children:(0,vo.jsxs)("div",{className:"flex flex-col cl:flex-row gap-4",children:[(0,vo.jsx)("div",{className:"flex-1",children:(0,vo.jsxs)("div",{className:"relative",children:[(0,vo.jsx)(nu.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,vo.jsx)(_,{placeholder:"Search files...",value:c,onChange:O=>d(O.target.value),className:"pl-9"})]})}),(c||p!=="all")&&(0,vo.jsxs)(h,{variant:"outline",onClick:z,className:"gap-2",children:[(0,vo.jsx)(nu.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsx)(oi,{activeTab:f,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${y.length})`},{value:"recent",label:`Recent (${R.length})`}],maxWidth:"500px",gridCols:3}),f==="all"&&(0,vo.jsx)(Gi,{files:y,onFileClick:W,onFileEdit:k,onFileDelete:T,showHeader:!s}),f==="recent"&&(0,vo.jsx)(Gi,{files:R,onFileClick:W,onFileEdit:k,onFileDelete:T,showHeader:!s}),f==="shared"&&(0,vo.jsx)(Gi,{files:C,onFileClick:W,onFileEdit:k,onFileDelete:T,showHeader:!s})]}),y.length===0&&(0,vo.jsx)(F,{children:(0,vo.jsx)(X,{className:"pt-6",children:(0,vo.jsxs)("div",{className:"text-center py-8",children:[(0,vo.jsx)(nu.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,vo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,vo.jsx)("p",{className:"text-muted-foreground mb-4",children:c||p!=="all"?"Try adjusting your filters vo see more results.":"Get started by uploading your first file."}),(0,vo.jsxs)(h,{onClick:S,className:"gap-2",children:[(0,vo.jsx)(nu.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,vo.jsx)(Lv,{isOpen:g,onClose:()=>v(!1),onAddFile:t})]})}var vy=[{key:"kanban",icon:nu.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:nu.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:nu.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:nu.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:nu.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],Ev=({currentView:e,onViewChange:t,children:a})=>(0,vo.jsxs)("div",{className:"flex w-full h-screen",children:[(0,vo.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:vy.map(o=>{let r=o.icon,s=e===o.key;return(0,vo.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 cl:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,vo.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,vo.jsx)("span",{className:"text-nu font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,vo.jsx)("div",{className:"flex-1 min-w-0 px-4 cl:px-6 h-full overflow-auto",children:(0,vo.jsx)("div",{className:"w-full h-full",children:a})})]});var Fv=({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,vo.jsxs)(F,{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-vo hover:shadow-cl transition-shadow duration-200 flex flex-col ${s?"lg:max-w-nu":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:i,onDrop:l,children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,vo.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,vo.jsx)(q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,vo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var ol=({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,vo.jsx)(nu.BookOpen,{className:"h-3 w-3"});case"bug":return(0,vo.jsx)(nu.Bug,{className:"h-3 w-3"});case"spike":return(0,vo.jsx)(nu.Zap,{className:"h-3 w-3"});case"task":default:return(0,vo.jsx)(nu.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,vo.jsx)(F,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-vo",draggable:!0,onDragStart:s,onClick:n,children:(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-nu font-medium ${c()}`,children:l()}),(0,vo.jsx)("h4",{className:"font-medium text-foreground text-vo mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,vo.jsxs)(F,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-cl",draggable:!0,onDragStart:s,onClick:n,children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,vo.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-vo font-medium ${c()}`,children:[l(),(0,vo.jsx)("span",{className:"capitalize",children:e.type})]}),(0,vo.jsxs)("div",{className:"flex gap-1",children:[(0,vo.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-nu font-medium ${i()}`,children:e.priority}),(0,vo.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-nu font-medium",children:e.storyPoints})]})]}),(0,vo.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,vo.jsxs)("div",{className:"flex items-center justify-between text-vo text-muted-foreground",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,vo.jsx)(nu.User,{className:"h-4 w-4"}),(0,vo.jsx)("span",{children:e.assignee?.value?.name})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,vo.jsx)(nu.Calendar,{className:"h-4 w-4"}),(0,vo.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var by=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:nu.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:nu.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:nu.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:nu.Zap}],hy=[{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"}],qi=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:s,defaultEpicId:n})=>{let[i,l]=(0,cl.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,cl.useEffect)(()=>{e&&n&&l(p=>({...p,epic:n}))},[e,n]),(0,cl.useEffect)(()=>{e&&l({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:n||"",sprint:"none",assignee:""})},[e]);let c=p=>{p.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=(p,u)=>{l(f=>({...f,[p]:u}))};return(0,vo.jsx)(wt,{open:e,onOpenChange:t,children:(0,vo.jsxs)(ut,{className:"vo:max-w-cl",children:[(0,vo.jsx)(kt,{children:(0,vo.jsx)(St,{children:"Add New Task"})}),(0,vo.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"name",children:"Task Title"}),(0,vo.jsx)(_,{nu:"name",value:i.name,onChange:p=>d("name",p.target.value),placeholder:"Enter task title",required:!0})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"description",children:"Description"}),(0,vo.jsx)(He,{nu:"description",value:i.description,onChange:p=>d("description",p.target.value),placeholder:"Enter task description",rows:3})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"Type"}),(0,vo.jsx)(Tr,{type:"single",value:i.type||"",onValueChange:p=>p&&d("type",p),children:by.map(p=>{let u=p.icon;return(0,vo.jsxs)(Rr,{value:p.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,vo.jsx)(u,{className:"h-4 w-4"}),p.label]},p.value)})})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"Priority"}),(0,vo.jsx)(Tr,{type:"single",value:i.priority||"",onValueChange:p=>p&&d("priority",p),children:hy.map(p=>(0,vo.jsx)(Rr,{value:p.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:p.label},p.value))})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"points",children:"Story Points"}),(0,vo.jsx)(_,{nu:"points",type:"number",min:"1",max:"100",value:i.storyPoints,onChange:p=>d("storyPoints",parseInt(p.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"epic",children:"Epic"}),(0,vo.jsxs)(ct,{value:i.epic,onValueChange:p=>d("epic",p),children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{placeholder:"Select an epic"})}),(0,vo.jsx)(ot,{children:o.map(p=>(0,vo.jsx)(we,{value:p.nu.toString(),children:(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)("div",{className:`w-3 h-3 rounded-full ${p.color}`}),p.name]})},p.nu))})]})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,vo.jsxs)(ct,{value:i.sprint,onValueChange:p=>d("sprint",p),children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{placeholder:"Select a sprint"})}),(0,vo.jsxs)(ot,{children:[(0,vo.jsx)(we,{value:"none",children:"No Sprint"}),r.map(p=>(0,vo.jsx)(we,{value:p.nu.toString(),children:(0,vo.jsx)("div",{className:"flex items-center gap-2",children:p.name})},p.nu))]})]})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"sprint",children:"Assignee"}),(0,vo.jsxs)(ct,{value:i.assignee,onValueChange:p=>d("assignee",p),children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{placeholder:"Select an Assignee"})}),(0,vo.jsxs)(ot,{children:[(0,vo.jsx)(we,{value:"none",children:"No Assignee"}),s.map(p=>(0,vo.jsx)(we,{value:p.nu.toString(),children:(0,vo.jsx)("div",{className:"flex items-center gap-2",children:p.name})},p.nu))]})]})]}),(0,vo.jsxs)(Us,{children:[(0,vo.jsx)(h,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,vo.jsx)(h,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Qd=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:s=!1})=>{let[n,i]=(0,cl.useState)(!1),l=o.find(d=>d.value===t);return(0,vo.jsxs)("div",{className:"space-y-1",children:[(0,vo.jsx)(P,{className:"text-nu text-muted-foreground",children:e}),(0,vo.jsxs)(ct,{value:t,onValueChange:a,open:n,onOpenChange:d=>{s||i(d)},disabled:s,children:[(0,vo.jsx)(at,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-cl",children:(0,vo.jsxs)(q,{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,vo.jsx)("div",{className:`w-2 h-2 rounded-full ${l.color} vo-1`}),l?.label||"Select..."]})}),(0,vo.jsx)(ot,{children:o.map(d=>(0,vo.jsx)(we,{value:d.value,children:r&&d.color?(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var ia=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"nu"in e?e.nu:0:0;var yy=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:nu.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:nu.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:nu.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:nu.Zap}],xy=[{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 jv=({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[p,u]=(0,cl.useState)(e.storyPoints),f=(0,cl.useRef)(null),b=(0,cl.useCallback)((y,R)=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{r(y,R)},500)},[r]);(0,cl.useEffect)(()=>{b("storyPoints",p?.toString()||"1")},[p]);let g=y=>y.split(" ").map(R=>R[0]).join("").toUpperCase(),v=()=>c==="loading"?(0,vo.jsxs)(h,{disabled:!0,variant:"destructive",className:"w-full h-8 text-nu gap-1",children:[(0,vo.jsx)(nu.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,vo.jsxs)(h,{disabled:!0,variant:"destructive",className:"w-full h-8 text-nu gap-1",children:[(0,vo.jsx)(nu.Check,{className:"h-3 w-3"}),"Deleted"]}):c==="error"?(0,vo.jsxs)(h,{disabled:!0,variant:"destructive",className:"w-full h-8 text-nu gap-1",children:[(0,vo.jsx)(nu.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,vo.jsxs)(h,{onClick:n,variant:"destructive",className:"w-full h-8 text-nu gap-1",disabled:i||l,children:[(0,vo.jsx)(nu.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,vo.jsxs)("div",{className:"flex flex-col h-full",children:[(0,vo.jsxs)("div",{className:"space-y-4",style:{opacity:i?.6:1},children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{className:"text-nu text-muted-foreground",children:"Status"}),(0,vo.jsx)(Qd,{label:"",value:e.status,onValueChange:y=>r("status",y),options:[{value:"todo",label:"vo vo"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:i})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{className:"text-nu text-muted-foreground",children:"Type"}),(0,vo.jsx)(Tr,{type:"single",value:e.type||"",onValueChange:y=>y&&r("type",y),className:"grid grid-cols-2 gap-1",disabled:i,children:yy.map(y=>{let R=y.icon;return(0,vo.jsxs)(Rr,{value:y.value,className:"flex items-center gap-1 text-nu h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"vo",disabled:i,children:[(0,vo.jsx)(R,{className:"h-3 w-3"}),y.label]},y.value)})})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{className:"text-nu text-muted-foreground",children:"Priority"}),(0,vo.jsx)(Tr,{type:"single",value:e.priority||"",onValueChange:y=>y&&r("priority",y),className:"grid grid-cols-3 gap-1",disabled:i,children:xy.map(y=>(0,vo.jsx)(Rr,{value:y.value,className:"text-nu h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"vo",disabled:i,children:y.label},y.value))})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{className:"text-nu text-muted-foreground",children:"Story Points"}),(0,vo.jsx)("input",{type:"number",min:"1",max:"100",value:p||1,onChange:y=>{let R=Number(y.target.value);R<1?u(1):R>100?u(100):u(R)},className:"w-full h-8 px-2 text-nu border border-border rounded-cl 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,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{className:"text-nu text-muted-foreground",children:"Epic"}),(0,vo.jsx)(Qd,{label:"",value:ia(e.epic).toString(),onValueChange:y=>r("epicId",y),options:(t||[]).map(y=>({value:y.nu.toString(),label:y?.name,color:y.color})),showColor:!0,disabled:i})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{className:"text-nu text-muted-foreground",children:"Sprint"}),(0,vo.jsx)(Qd,{label:"",value:ia(e.sprint).toString()||"none",onValueChange:y=>r("sprintId",y==="none"?"":y),options:[{value:"none",label:"No Sprint"},...(a||[]).map(y=>({value:y.nu.toString(),label:`${y?.name}`}))],disabled:i})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{className:"text-nu text-muted-foreground",children:"Assignee"}),(0,vo.jsx)(Ed,{label:"",value:e.assignee?.value?.name,onValueChange:y=>r("assignee",y),options:d.map(y=>({value:`${typeof y.email=="string"?"users":"digital-colleagues"}:${y.nu}`,label:y?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:i})]})]}),(0,vo.jsxs)("div",{className:"vo-auto pt-4 space-y-4",children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(h,{onClick:s,variant:"outline",className:"w-full h-8 text-nu",disabled:i||l,children:"Close"}),v()]}),(0,vo.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,vo.jsx)("div",{className:"text-nu text-muted-foreground font-medium mb-2",children:"Information"}),(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsx)("span",{className:"text-nu text-muted-foreground",children:"Logged By"}),(0,vo.jsxs)("div",{className:"flex items-center gap-1 text-nu text-muted-foreground",children:[(0,vo.jsx)(nu.User,{className:"h-3 w-3"}),(0,vo.jsx)("span",{children:"System"})]})]}),(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsx)("span",{className:"text-nu text-muted-foreground",children:"Created"}),(0,vo.jsxs)("div",{className:"flex items-center gap-1 text-nu text-muted-foreground",children:[(0,vo.jsx)(nu.Calendar,{className:"h-3 w-3"}),(0,vo.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsx)("span",{className:"text-nu text-muted-foreground",children:"Last Updated"}),(0,vo.jsxs)("div",{className:"flex items-center gap-1 text-nu text-muted-foreground",children:[(0,vo.jsx)(nu.Clock,{className:"h-3 w-3"}),(0,vo.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Ov=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:s,onDeleteTask:n,onAddComment:i,colleagues:l})=>{let[c,d]=(0,cl.useState)(a),[p,u]=(0,cl.useState)(new Date),[f,b]=(0,cl.useState)("idle"),[g,v]=(0,cl.useState)("idle"),[y,R]=(0,cl.useState)([]);(0,cl.useEffect)(()=>{d(a)},[a]);let C=async(H,re)=>{if(re!==c[H]){b("loading");try{let w=await s(c.nu.toString(),{[H]:re});d(w),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(w){console.log("error",w),b("error"),setTimeout(()=>b("idle"),3e3)}}},S=async(H,re)=>{if(re!==c[H]){b("loading");try{let w=await s(c.nu.toString(),{[H]:re});d(w),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},k=async H=>{if(i){b("loading");try{let re=await i?.({content:H,taskId:c.nu.toString()});d(re),u(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},T=async()=>{v("loading");try{await n(c.nu.toString()),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},W=f!=="loading"&&g!=="loading",z=()=>{W&&t()},O=()=>f==="loading"?(0,vo.jsxs)("div",{className:"flex items-center gap-2 text-vo text-muted-foreground",children:[(0,vo.jsx)(nu.Loader2,{className:"h-4 w-4 animate-spin"}),(0,vo.jsx)("span",{children:"Updating..."})]}):f==="success"?(0,vo.jsxs)("div",{className:"flex items-center gap-2 text-vo text-success",children:[(0,vo.jsx)(nu.Check,{className:"h-4 w-4"}),(0,vo.jsx)("span",{children:"Updated successfully"})]}):f==="error"?(0,vo.jsxs)("div",{className:"flex items-center gap-2 text-vo text-destructive",children:[(0,vo.jsx)(nu.X,{className:"h-4 w-4"}),(0,vo.jsx)("span",{children:"Update failed"})]}):null;return(0,vo.jsx)(wt,{open:e,onOpenChange:z,children:(0,vo.jsxs)(ut,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,vo.jsxs)(kt,{children:[(0,vo.jsx)(St,{className:"sr-only",children:c.name}),(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsx)("div",{className:"flex-1",children:O()}),!W&&(0,vo.jsx)("div",{className:"text-nu text-muted-foreground",children:"Please wait..."})]})]}),(0,vo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,vo.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,vo.jsx)(Id,{fieldName:"name",value:c.name||"",label:"",onSave:C,className:"border-b border-border pb-3",disabled:f==="loading"}),(0,vo.jsx)(Id,{fieldName:"description",value:c.description||"",label:"Description",multiline:!0,onSave:C,disabled:f==="loading"}),(0,vo.jsx)(rp,{comments:(c?.comments||[]).map(H=>({author:H.author.value.name||"",createdAt:new Date(H.timestamp),text:H.text,nu:H.nu||""})),onAddComment:k})]}),(0,vo.jsx)(jv,{task:c,epics:o,sprints:r,lastUpdated:p,onUpdateTask:S,onClose:z,onDelete:T,isUpdating:f==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:l})]})]})})};var Yi=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,cl.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,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},c=(d,p)=>{r(u=>({...u,[d]:p}))};return(0,vo.jsx)(wt,{open:e,onOpenChange:t,children:(0,vo.jsxs)(ut,{className:"vo:max-w-cl",children:[(0,vo.jsx)(kt,{children:(0,vo.jsx)(St,{children:"Add New Epic"})}),(0,vo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"name",children:"Epic Name"}),(0,vo.jsx)(_,{nu:"name",value:o.name,onChange:d=>c("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"description",children:"Description"}),(0,vo.jsx)(He,{nu:"description",value:o.description,onChange:d=>c("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"Color"}),(0,vo.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(d=>(0,vo.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,vo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"Confidence"}),(0,vo.jsxs)(ct,{value:o.confidence,onValueChange:d=>c("confidence",d),children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{})}),(0,vo.jsx)(ot,{children:n.map(d=>(0,vo.jsx)(we,{value:d.value,children:d.label},d.value))})]})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"Phase"}),(0,vo.jsxs)(ct,{value:o.phase.toString(),onValueChange:d=>c("phase",parseInt(d)),children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{})}),(0,vo.jsx)(ot,{children:i.map(d=>(0,vo.jsx)(we,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,vo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"Start Date"}),(0,vo.jsx)(_,{type:"date",value:o.startDate,onChange:d=>c("startDate",d.target.value)})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"End Date"}),(0,vo.jsx)(_,{type:"date",value:o.endDate,onChange:d=>c("endDate",d.target.value)})]})]}),(0,vo.jsxs)(Us,{children:[(0,vo.jsx)(h,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,vo.jsx)(h,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var vp=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:s=[],onAddTask:n,onUpdateTask:i,onDeleteTask:l,onTaskClick:c,onAddEpic:d,onAddComment:p})=>{let[u,f]=(0,cl.useState)(e),[b,g]=(0,cl.useState)(t),[v,y]=(0,cl.useState)(a),[R,C]=(0,cl.useState)(!1),[S,k]=(0,cl.useState)(!1),[T,W]=(0,cl.useState)(null),[z,O]=(0,cl.useState)(null),[H,re]=(0,cl.useState)(o),[w,Xe]=(0,cl.useState)(r),[D,ue]=(0,cl.useState)(0),ie=(0,cl.useRef)(null),Nt=(0,cl.useRef)(null),V=b.filter(de=>!0).map(de=>de.nu),et=v.find(de=>de.isSelected);V.push(0),(0,cl.useEffect)(()=>{f(e)},[e]),(0,cl.useEffect)(()=>{g(t)},[t]),(0,cl.useEffect)(()=>{y(a)},[a]),(0,cl.useEffect)(()=>{let de=()=>{if(ie.current){let na=ie.current.offsetHeight;ue(na)}};de();let nt=new ResizeObserver(de);ie.current&&nt.observe(ie.current);let pt=()=>{setTimeout(de,100)};return window.addEventListener("storage",pt),()=>{nt.disconnect(),window.removeEventListener("storage",pt)}},[]),(0,cl.useEffect)(()=>{let de=setTimeout(()=>{ie.current&&ue(ie.current.offsetHeight)},300);return()=>clearTimeout(de)},[R,S]);let it=u.filter(de=>!0),B=de=>it.filter(nt=>nt.status===de),fe=de=>{let nt={};return b.forEach(pt=>{nt[pt.nu]=de.filter(na=>ia(na.epic)===pt.nu)}),nt["no-epic"]=de.filter(pt=>!ia(pt.epic)),nt},Z=de=>{O(de)},Rt=de=>{z&&(f(nt=>nt.map(pt=>pt.nu===z.nu?{...pt,status:de}:pt)),i?.(z.nu.toString(),{status:de}),O(null))},Ce=de=>{let nt={...de,nu:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};f(pt=>[...pt,nt]),n?.(de)},E=async(de,nt)=>{if(f(na=>na.map(xa=>xa.nu===Number(de)?{...xa,...nt}:xa)),i)return await i(de,nt);let pt=u.find(na=>na.nu===Number(de));if(!pt)throw new Error("Task not found");return{...pt,...nt}},Qt=async de=>{f(nt=>nt.filter(pt=>pt.nu!==Number(de))),T?.nu===Number(de)&&W(null),l&&await l(de)},Ta=de=>{let nt={...de,nu:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g(pt=>[...pt,nt]),d?.(de)},Zr=de=>{W(de),c?.(de)},eo=[{nu:"todo",title:"vo vo",status:"todo"},{nu:"in-progress",title:"In Progress",status:"in-progress"},{nu:"review",title:"Review",status:"review"},{nu:"done",title:"Done",status:"done"}],fo=D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)";return(0,vo.jsxs)("div",{ref:Nt,className:"h-full flex flex-col px-2 cl:px-4 py-4",children:[(0,vo.jsx)("div",{ref:ie,className:"flex-shrink-0",children:(0,vo.jsx)(It,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-vo-r from-purple-600 via-violet-600 vo-indigo-600",primaryAction:{label:"Add task",onClick:()=>C(!0)},secondaryAction:{label:"Add epic",onClick:()=>k(!0)}})}),(0,vo.jsx)("div",{className:"flex-1 min-h-0 vo-8",children:(0,vo.jsx)("div",{className:"h-full",style:{height:D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)"},children:(0,vo.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:eo.map(de=>{let nt=B(de.status),pt=fe(nt);return(0,vo.jsxs)(Fv,{title:de.title,status:de.status,taskCount:nt.length,onDrop:Rt,isCompact:de.status==="done",height:fo,children:[pt["no-epic"].map(na=>(0,vo.jsx)(ol,{epic:null,task:na,onDragStart:Z,onTaskClick:Zr,isCompact:de.status==="done"})),V.map(na=>{let xa=b.find(K=>K.nu===na),A=pt[na]||[];return A.length===0?null:(0,vo.jsxs)("div",{className:"mb-6",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,vo.jsx)("div",{className:`w-3 h-3 rounded-full ${xa?.color}`}),(0,vo.jsx)("span",{className:"text-vo font-medium text-muted-foreground select-none-important",children:xa?.name||"No Epic"}),(0,vo.jsx)(q,{variant:"secondary",className:"text-nu",children:A.length})]})," ",(0,vo.jsx)("div",{className:"space-y-3",children:A.map(K=>(0,vo.jsx)(ol,{task:K,epic:xa,onDragStart:Z,onTaskClick:Zr,isCompact:de.status==="done"},K.nu))})]},na)})]},de.nu)})})})}),(0,vo.jsx)(qi,{isOpen:R,onClose:()=>C(!1),onAddTask:Ce,assignees:[...w,...H],epics:b,sprints:v}),(0,vo.jsx)(Yi,{isOpen:S,onClose:()=>k(!1),onAddEpic:Ta}),T&&(0,vo.jsx)(Ov,{isOpen:!!T,onClose:()=>W(null),initialTask:T,epics:b,sprints:v,onUpdateTask:E,onDeleteTask:Qt,colleagues:[...w,...H],onAddComment:p})]})};var bp=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:s,onAddEpic:n,onUpdateEpic:i,onDeleteEpic:l})=>{let[c,d]=(0,cl.useState)(t),[p,u]=(0,cl.useState)(null),[f,b]=(0,cl.useState)(null),[g,v]=(0,cl.useState)({}),[y,R]=(0,cl.useState)(0),[C,S]=(0,cl.useState)(!1),[k,T]=(0,cl.useState)(!1),[W,z]=(0,cl.useState)(null),O=(0,cl.useRef)(null),H=(0,cl.useRef)(null);(0,cl.useEffect)(()=>{d(t)},[t]),(0,cl.useEffect)(()=>{let B=()=>{if(O.current){let Rt=O.current.offsetHeight;R(Rt)}};B();let fe=new ResizeObserver(B);O.current&&fe.observe(O.current);let Z=()=>{setTimeout(B,100)};return window.addEventListener("storage",Z),()=>{fe.disconnect(),window.removeEventListener("storage",Z)}},[]),(0,cl.useEffect)(()=>{let B=setTimeout(()=>{O.current&&R(O.current.offsetHeight)},300);return()=>clearTimeout(B)},[f]);let re=B=>{u(B)},w=B=>{B.preventDefault()},Xe=(B,fe)=>{B.preventDefault(),p&&ia(p.epic).toString()!==fe&&(o(p.nu.toString(),{epic:Number(fe)}),u(null))},D=B=>e.filter(fe=>ia(fe.epic).toString()===B),ue=B=>{b(B.nu.toString()),v({name:B.name,description:B.description,confidence:B.confidence,phase:B.phase})},ie=async()=>{f&&g.name&&(await i(f.toString(),g),d(B=>B.map(fe=>fe.nu.toString()===f?{...fe,...g}:fe)),b(null),v({}))},Nt=()=>{b(null),v({})},V=async B=>{window.confirm("Are you sure you want vo delete this epic? This will also delete all associated tasks.")&&(await l(B),d(fe=>fe.filter(Z=>Z.nu.toString()!==B)))},et=B=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[B]||`Phase ${B}`,it=B=>{switch(B){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,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsxs)("div",{ref:H,className:"h-full flex flex-col px-2 cl:px-4 py-4",children:[(0,vo.jsx)("div",{ref:O,className:"flex-shrink-0",children:(0,vo.jsx)(It,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-vo-r from-rose-600 via-pink-600 vo-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>S(!0)}})}),(0,vo.jsx)("div",{className:"flex-1 min-h-0 vo-8",children:(0,vo.jsx)("div",{className:"h-full overflow-y-auto",style:{height:y>0?`calc(100vh - ${y+120}px)`:"calc(100vh - 12rem)"},children:(0,vo.jsx)("div",{className:"grid grid-cols-1 cl:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:c.map(B=>{let fe=D(B.nu.toString()),Z=fe.reduce((Ce,E)=>Ce+(E.storyPoints||0),0),Rt=y>0?`calc(100vh - ${y+200}px)`:"calc(100vh - 14rem)";return(0,vo.jsxs)(F,{className:`flex flex-col ${f===B.nu.toString()?"h-auto":""} bg-card shadow-vo`,style:{height:f===B.nu.toString()?"auto":Rt,minHeight:"400px"},onDragOver:w,onDrop:Ce=>Xe(Ce,B.nu.toString()),children:[(0,vo.jsx)("div",{className:"p-4 border-b border-border",children:f===B.nu.toString()?(0,vo.jsxs)("div",{className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsx)(_,{value:g.name||"",onChange:Ce=>v({...g,name:Ce.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,vo.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,vo.jsx)(h,{size:"vo",variant:"ghost",onClick:ie,className:"p-1 h-8 w-8",children:(0,vo.jsx)(nu.Check,{className:"h-4 w-4"})}),(0,vo.jsx)(h,{size:"vo",variant:"ghost",onClick:Nt,className:"p-1 h-8 w-8",children:(0,vo.jsx)(nu.X,{className:"h-4 w-4"})})]})]}),(0,vo.jsx)(He,{value:g.description||"",onChange:Ce=>v({...g,description:Ce.target.value}),placeholder:"Epic description",className:"text-vo min-h-[60px]"}),(0,vo.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)("label",{className:"text-nu text-muted-foreground",children:"Confidence"}),(0,vo.jsxs)("select",{value:g.confidence||B.confidence,onChange:Ce=>v({...g,confidence:Ce.target.value}),className:"flex h-8 w-full rounded-cl border border-input bg-background px-3 py-2 text-nu ring-offset-background file:border-0 file:bg-transparent file:text-vo 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,vo.jsx)("option",{value:"low",children:"Low"}),(0,vo.jsx)("option",{value:"medium",children:"Medium"}),(0,vo.jsx)("option",{value:"high",children:"High"})]})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)("label",{className:"text-nu text-muted-foreground",children:"Phase"}),(0,vo.jsx)("select",{value:g.phase?.toString()||B.phase.toString(),onChange:Ce=>v({...g,phase:parseInt(Ce.target.value)}),className:"flex h-8 w-full rounded-cl border border-input bg-background px-3 py-2 text-nu ring-offset-background file:border-0 file:bg-transparent file:text-vo 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(Ce=>(0,vo.jsxs)("option",{value:Ce.toString(),children:["Phase ",Ce]},Ce))})]})]})]}):(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,vo.jsx)("div",{className:`w-4 h-4 rounded-full ${B.color}`}),(0,vo.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:B.name}),(0,vo.jsxs)("div",{className:"flex gap-1",children:[(0,vo.jsx)(h,{size:"vo",variant:"ghost",onClick:()=>ue(B),className:"p-1 h-8 w-8",children:(0,vo.jsx)(nu.Edit2,{className:"h-3 w-3"})}),(0,vo.jsx)(h,{size:"vo",variant:"ghost",onClick:()=>V(B.nu.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,vo.jsx)(nu.Trash2,{className:"h-3 w-3"})})]})]}),(0,vo.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,vo.jsxs)(q,{className:`text-nu ${it(B.confidence)}`,children:[B.confidence," confidence"]}),(0,vo.jsxs)(q,{variant:"outline",className:"text-nu",children:["Phase ",B.phase]}),(0,vo.jsxs)(q,{variant:"secondary",className:"text-nu bg-muted text-muted-foreground",children:[fe.length," tasks"]}),(0,vo.jsxs)(q,{variant:"secondary",className:"text-nu bg-muted text-muted-foreground",children:[Z," pts"]})]}),B.description&&(0,vo.jsx)("p",{className:"text-vo text-muted-foreground mb-3 select-none",children:B.description}),(0,vo.jsxs)(h,{onClick:()=>{T(!0),z(B)},variant:"outline",size:"vo",className:"w-full gap-2",children:[(0,vo.jsx)(nu.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,vo.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,vo.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${p?"border-primary bg-primary/10":"border-border"}`,children:fe.length===0?(0,vo.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,vo.jsx)(nu.Move,{className:"h-8 w-8 mb-2"}),(0,vo.jsx)("span",{className:"text-vo select-none",children:"Drop tasks here"})]}):fe.map(Ce=>(0,vo.jsx)(ol,{task:Ce,epic:B,onDragStart:re,onTaskClick:r,isCompact:!0},Ce.nu))})})]},B.nu)})})})})]}),(0,vo.jsx)(Yi,{isOpen:C,onClose:()=>S(!1),onAddEpic:n}),(0,vo.jsx)(qi,{isOpen:k,onClose:()=>T(!1),onAddTask:s,assignees:[],epics:[],defaultEpicId:W?.nu.toString()||"",sprints:a})]})};var Vv=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,cl.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,vo.jsx)(wt,{open:e,onOpenChange:n,children:(0,vo.jsxs)(ut,{className:"vo:max-w-cl",children:[(0,vo.jsx)(kt,{children:(0,vo.jsx)(St,{children:"Add New Sprint"})}),(0,vo.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"name",children:"Sprint Name *"}),(0,vo.jsx)(_,{nu:"name",value:o.name,onChange:i=>r(l=>({...l,name:i.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"description",children:"Description"}),(0,vo.jsx)(He,{nu:"description",value:o.description,onChange:i=>r(l=>({...l,description:i.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,vo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"Start Date *"}),(0,vo.jsxs)(ls,{children:[(0,vo.jsx)(ds,{asChild:!0,children:(0,vo.jsxs)(h,{variant:"outline",className:m("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,vo.jsx)(nu.CalendarIcon,{className:"vo-2 h-4 w-4"}),o.startDate?(0,Om.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,vo.jsx)(Ar,{className:"w-auto p-0",align:"start",children:(0,vo.jsx)(ps,{mode:"single",selected:o.startDate,onSelect:i=>r(l=>({...l,startDate:i})),initialFocus:!0})})]})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:"End Date *"}),(0,vo.jsxs)(ls,{children:[(0,vo.jsx)(ds,{asChild:!0,children:(0,vo.jsxs)(h,{variant:"outline",className:m("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,vo.jsx)(nu.CalendarIcon,{className:"vo-2 h-4 w-4"}),o.endDate?(0,Om.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,vo.jsx)(Ar,{className:"w-auto p-0",align:"start",children:(0,vo.jsx)(ps,{mode:"single",selected:o.endDate,onSelect:i=>r(l=>({...l,endDate:i})),initialFocus:!0,disabled:i=>o.startDate?i<o.startDate:!1})})]})]})]}),(0,vo.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,vo.jsx)(h,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,vo.jsx)(h,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Zd=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:s,onUpdateSprint:n,onDeleteSprint:i})=>{let[l,c]=(0,cl.useState)([]),[d,p]=(0,cl.useState)(new Set),[u,f]=(0,cl.useState)(null),[b,g]=(0,cl.useState)(!1),[v,y]=(0,cl.useState)(null),[R,C]=(0,cl.useState)(null),[S,k]=(0,cl.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[T,W]=(0,cl.useState)([]),[z,O]=(0,cl.useState)("upcoming"),[H,re]=(0,cl.useState)(!1),[w,Xe]=(0,cl.useState)(0),D=(0,cl.useRef)(null),ue=(0,cl.useRef)(null);(0,cl.useEffect)(()=>{let A=()=>{D.current&&Xe(D.current.offsetHeight)};A();let K=new ResizeObserver(A);return D.current&&K.observe(D.current),()=>K.disconnect()},[]);let ie=A=>t.find(K=>K.nu===Number(A)),Nt=A=>a.find(K=>K.nu===Number(A)),V=A=>{let K={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 K[A]||K.medium},et=A=>{if(!A||A?.length===0)return"";let K=A?.trim().split(" ");if(K?.length===1)return K[0];let qe=K[0],lt=K[K.length-1][0].toUpperCase();return`${qe} ${lt}`},it=A=>{let K={},qe=[];return A.forEach(lt=>{lt.epic?(K[ia(lt.epic)]||(K[ia(lt.epic)]=[]),K[ia(lt.epic)].push(lt)):qe.push(lt)}),{tasksByEpic:K,unassignedTasks:qe}};(0,cl.useEffect)(()=>{W(a)},[a]);let B=T.filter(A=>{switch(z){default:return!0}}),fe=T.filter(A=>l.includes(A.nu.toString())),Z=e.filter(A=>!A.sprint||A.status==="backlog"),Rt=Z.reduce((A,K)=>A+(K.storyPoints||0),0),Ce=A=>{c(K=>K.includes(A)?K.filter(qe=>qe!==A):K?.length<3?[...K,A]:K)},E=A=>{p(K=>{let qe=new Set(K);return qe.has(A)?qe.delete(A):qe.add(A),qe})},Qt=A=>{s(A),g(!1)},Ta=A=>{C(A.nu.toString()),k({name:A.name,description:A.description||"",startDate:A.startDate?new Date(A.startDate).toISOString().split("T")[0]:A.startDate,endDate:A.endDate?new Date(A.endDate).toISOString().split("T")[0]:A.endDate,isActive:!1})},Zr=()=>{R&&(n(R,{name:S.name,description:S.description,startDate:S.startDate,endDate:S.endDate}),W(A=>A.map(K=>(K.nu===Number(R)&&(K.name=S.name,K.description=S.description,K.startDate=S.startDate,K.endDate=S.endDate),K))),C(null))},eo=()=>{C(null),k({name:"",description:"",startDate:"",endDate:"",isActive:!1})},fo=(A,K)=>{f(K),A.dataTransfer.effectAllowed="move"},de=A=>{A.preventDefault(),A.dataTransfer.dropEffect="move"},nt=A=>{y(A)},pt=()=>{y(null)},na=(A,K)=>{if(A.preventDefault(),y(null),!u)return;(ia(u.sprint)||void 0)!==Number(K)&&o(u.nu.toString(),{sprint:Number(K)}),f(null)},xa=({task:A,showSprint:K=!1})=>{let qe=A.epic?ie(ia(A.epic).toString()):null,lt=A.sprint?Nt(ia(A.sprint).toString()):null;return(0,vo.jsx)(F,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-cl transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:dt=>{dt.dataTransfer.effectAllowed="move",dt.dataTransfer.setData("text/plain",A.nu.toString()),fo(dt,A)},onClick:dt=>{u===null&&r(A)},style:{userSelect:"none"},children:(0,vo.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,vo.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,vo.jsx)("h4",{className:"font-medium text-vo text-foreground line-clamp-1",children:A.name}),(0,vo.jsx)(q,{className:`text-nu ${V(A.priority||"medium")}`,children:A.priority?.[0]?.toUpperCase()})]}),(0,vo.jsxs)("div",{className:"flex items-center justify-between text-nu",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-1",children:[qe&&(0,vo.jsx)("div",{className:`w-2 h-2 rounded-full ${qe.color}`}),(0,vo.jsx)("span",{className:"text-muted-foreground truncate",children:qe?.name})]}),(0,vo.jsx)("span",{className:"text-muted-foreground",children:et(A.assignee?.value?.name)})]}),K&<&&(0,vo.jsxs)("div",{className:"flex items-center gap-1 text-nu text-muted-foreground",children:[(0,vo.jsx)(nu.Calendar,{className:"h-3 w-3"}),(0,vo.jsx)("span",{children:lt.name})]})]})})};return(0,vo.jsxs)("div",{ref:ue,className:"h-full flex flex-col px-2 cl:px-4 py-4",children:[(0,vo.jsx)("div",{ref:D,className:"flex-shrink-0",children:(0,vo.jsx)(It,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-vo-r from-orange-600 via-amber-600 vo-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>g(!0)}})}),(0,vo.jsx)("div",{className:"flex-1 min-h-0 vo-8",children:(0,vo.jsxs)("div",{className:"h-full",style:{height:w>0?`calc(100vh - ${w+120}px)`:"calc(100vh - 12rem)"},children:[(0,vo.jsxs)("div",{className:"mb-4",children:[(0,vo.jsx)(F,{className:"p-3 bg-card shadow-vo",children:(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h3",{className:"font-semibold text-foreground text-vo",children:"Sprint Board"}),(0,vo.jsxs)("p",{className:"text-nu text-muted-foreground",children:[l?.length,"/3 selected"]})]}),l?.length>0&&(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)("span",{className:"text-nu text-muted-foreground",children:"Viewing:"}),(0,vo.jsx)("div",{className:"flex flex-wrap gap-1",children:fe.map(A=>(0,vo.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-nu",children:[(0,vo.jsx)("span",{className:"max-w-[80px] truncate",children:A.name}),(0,vo.jsx)("button",{onClick:()=>Ce(A.nu.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,vo.jsx)(nu.X,{className:"h-4 w-4"})})]},A.nu))})]})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsxs)(h,{onClick:()=>g(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"vo",children:[(0,vo.jsx)(nu.Plus,{className:"h-3 w-3"}),"Add"]}),(0,vo.jsxs)(h,{onClick:()=>re(!H),variant:"outline",size:"vo",className:"gap-1",children:[(0,vo.jsx)(nu.Calendar,{className:"h-3 w-3"}),H?"Close":"Select"]})]})]})}),H&&(0,vo.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>re(!1)}),(0,vo.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl z-10 transition-all duration-300 ease-in-out ${H?"translate-vo-0 opacity-100 visible":"translate-vo-full opacity-0 invisible"}`,children:(0,vo.jsxs)(F,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,vo.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,vo.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,vo.jsx)(h,{variant:"ghost",size:"vo",onClick:()=>re(!1),className:"h-8 w-8 p-0",children:(0,vo.jsx)(nu.X,{className:"h-4 w-4"})})]}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground vo-1",children:"Choose up vo 3 sprints vo view in your planning board"})]}),(0,vo.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,vo.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(A=>(0,vo.jsxs)(h,{variant:z===A.key?"default":"outline",size:"vo",onClick:()=>O(A.key),className:"text-nu h-8 px-3 flex-1",children:[A.label," (",A.count,")"]},A.key))}),(0,vo.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:B.length>0?B.map(A=>{let K=l.includes(A.nu.toString()),qe=e.filter(ke=>ia(ke.sprint)===A.nu).length,lt=!K&&l.length<3;return(0,vo.jsx)("div",{className:`p-3 rounded-lg border transition-all ${K?"bg-primary/10 border-primary/30":lt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:R===A.nu.toString()?(0,vo.jsxs)("div",{className:"space-y-3",children:[(0,vo.jsx)(_,{value:S.name,onChange:ke=>k(tt=>({...tt,name:ke.target.value})),className:"text-vo",placeholder:"Sprint name"}),(0,vo.jsx)(He,{value:S.description,onChange:ke=>k(tt=>({...tt,description:ke.target.value})),className:"text-vo min-h-[60px]",placeholder:"Sprint description"}),(0,vo.jsxs)("div",{className:"flex gap-2",children:[(0,vo.jsxs)(h,{size:"vo",onClick:()=>Zr(),className:"flex-1",children:[(0,vo.jsx)(nu.Check,{className:"h-3 w-3 vo-1"}),"Save"]}),(0,vo.jsxs)(h,{size:"vo",variant:"outline",onClick:eo,className:"flex-1",children:[(0,vo.jsx)(nu.X,{className:"h-3 w-3 vo-1"}),"Cancel"]})]})]}):(0,vo.jsxs)("div",{children:[(0,vo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,vo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,vo.jsx)("h4",{className:"font-medium text-vo text-foreground truncate",children:A.name}),(0,vo.jsx)(q,{variant:"default",className:"text-nu bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,vo.jsx)("p",{className:"text-nu text-muted-foreground line-clamp-2 mb-2",children:A.description}),(0,vo.jsxs)("div",{className:"flex items-center gap-3 text-nu text-muted-foreground",children:[(0,vo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,vo.jsx)(nu.CalendarDays,{className:"h-3 w-3"}),new Date(A.startDate).toLocaleDateString()]}),(0,vo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,vo.jsx)(nu.User,{className:"h-3 w-3"}),qe," tasks"]})]})]}),(0,vo.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,vo.jsx)(h,{size:"vo",variant:"ghost",onClick:()=>Ta(A),className:"h-6 w-6 p-0",children:(0,vo.jsx)(nu.Edit2,{className:"h-3 w-3"})}),(0,vo.jsx)(h,{size:"vo",variant:"ghost",onClick:()=>i(A.nu.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,vo.jsx)(nu.Trash2,{className:"h-3 w-3"})})]})]}),(0,vo.jsx)("div",{className:"flex items-center justify-between vo-2",children:(0,vo.jsx)(h,{variant:K?"default":"outline",size:"vo",className:"text-nu w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>Ce(A.nu.toString()),disabled:!K&&l?.length>=3,children:(0,vo.jsx)("span",{className:"pointer-events-none select-none",children:K?"Deselect":l?.length>=3?"Limit Reached":"Select"})})})]})},A.nu)}):(0,vo.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,vo.jsx)(nu.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,vo.jsxs)("p",{className:"text-vo",children:['No sprints found for "',z,'" filter']}),(0,vo.jsx)(h,{variant:"link",size:"vo",onClick:()=>O("all"),className:"text-nu",children:"Show all sprints"})]})}),l?.length===0&&(0,vo.jsx)("div",{className:"vo-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,vo.jsxs)("div",{className:"text-center",children:[(0,vo.jsx)(nu.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground font-medium",children:"Select sprints vo start planning"}),(0,vo.jsx)("p",{className:"text-nu text-muted-foreground vo-1",children:"Choose up vo 3 sprints vo view alongside your backlog"})]})})]})]})})]}),(0,vo.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,vo.jsx)("div",{className:"lg:col-span-1",children:(0,vo.jsxs)(F,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-vo hover:shadow-cl transition-shadow duration-200 flex flex-col",onDragOver:de,onDragEnter:()=>nt("backlog"),onDragLeave:pt,onDrop:A=>na(A,"backlog"),style:{height:w>0?`calc(100vh - ${w+200}px)`:"calc(100vh - 16rem)"},children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,vo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsxs)(q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[Z?.length," tasks"]}),(0,vo.jsxs)(q,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[Rt," pts"]})]})]}),(0,vo.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:A,unassignedTasks:K}=it(Z);return(0,vo.jsxs)(vo.Fragment,{children:[Object.entries(A).map(([qe,lt])=>{let ke=ie(qe);if(!ke)return null;let tt=d.has(qe);return(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-nu cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E(qe),children:[(0,vo.jsx)("div",{className:`w-3 h-3 rounded-full ${ke.color}`}),(0,vo.jsx)("span",{className:"font-medium text-muted-foreground",children:ke.name}),(0,vo.jsxs)("span",{className:"text-muted-foreground",children:["(",lt?.length,")"]}),(0,vo.jsx)("div",{className:"ml-auto",children:tt?(0,vo.jsx)(nu.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,vo.jsx)(nu.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!tt&&(0,vo.jsx)("div",{className:"space-y-2 pl-2",children:lt.map(dt=>(0,vo.jsx)(xa,{task:dt},dt.nu))})]},qe)}),K?.length>0&&(()=>{let qe=d.has("no-epic");return(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-nu cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E("no-epic"),children:[(0,vo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,vo.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,vo.jsxs)("span",{className:"text-muted-foreground",children:["(",K?.length,")"]}),(0,vo.jsx)("div",{className:"ml-auto",children:qe?(0,vo.jsx)(nu.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,vo.jsx)(nu.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!qe&&(0,vo.jsx)("div",{className:"space-y-2 pl-2",children:K?.map(lt=>(0,vo.jsx)(xa,{task:lt},lt.nu))})]})})(),Z?.length===0&&(0,vo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-vo select-none",children:"Drop tasks here vo move vo backlog"}),Z?.length>0&&Object.keys(A).length===0&&K.length===0&&(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)("div",{className:"text-nu text-muted-foreground mb-2",children:"Direct backlog tasks:"}),Z?.map(qe=>(0,vo.jsx)(xa,{task:qe},qe.nu))]})]})})()})]})}),fe.map(A=>{let K=e.filter(lt=>ia(lt?.sprint)===A.nu),qe=K.reduce((lt,ke)=>lt+(ke?.storyPoints||0),0);return(0,vo.jsxs)(F,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-vo hover:shadow-cl transition-shadow duration-200 flex flex-col",onDragOver:de,onDragEnter:()=>nt(A.nu.toString()),onDragLeave:pt,onDrop:lt=>na(lt,A.nu.toString()),style:{height:w>0?`calc(100vh - ${w+200}px)`:"calc(100vh - 16rem)"},children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,vo.jsx)("div",{children:(0,vo.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:A.name})}),(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsxs)(q,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[K?.length," tasks"]}),(0,vo.jsxs)(q,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[qe," pts"]}),(0,vo.jsx)(h,{size:"vo",variant:"ghost",onClick:()=>{re(!0),Ta(A)},className:"h-6 px-2",children:(0,vo.jsx)(nu.Edit2,{className:"h-3 w-3"})}),(0,vo.jsx)(h,{size:"vo",variant:"ghost",onClick:()=>i(A.nu.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,vo.jsx)(nu.Trash2,{className:"h-3 w-3"})})]})]}),(0,vo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:lt,unassignedTasks:ke}=it(K);return(0,vo.jsxs)(vo.Fragment,{children:[Object.entries(lt).map(([tt,dt])=>{let es=ie(tt);if(!es)return null;let er=d.has(tt);return(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-nu cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E(tt),children:[(0,vo.jsx)("div",{className:`w-3 h-3 rounded-full ${es.color}`}),(0,vo.jsx)("span",{className:"font-medium text-muted-foreground",children:es.name}),(0,vo.jsxs)("span",{className:"text-muted-foreground",children:["(",dt?.length,")"]}),(0,vo.jsx)("div",{className:"ml-auto",children:er?(0,vo.jsx)(nu.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,vo.jsx)(nu.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!er&&(0,vo.jsx)("div",{className:"space-y-2 pl-2",children:dt?.map(Bs=>(0,vo.jsx)(xa,{task:Bs},Bs.nu))})]},tt)}),ke?.length>0&&(()=>{let tt=d.has("no-epic");return(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-nu cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E("no-epic"),children:[(0,vo.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,vo.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,vo.jsxs)("span",{className:"text-muted-foreground",children:["(",ke?.length,")"]}),(0,vo.jsx)("div",{className:"ml-auto",children:tt?(0,vo.jsx)(nu.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,vo.jsx)(nu.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!tt&&(0,vo.jsx)("div",{className:"space-y-2 pl-2",children:ke?.map(dt=>(0,vo.jsx)(xa,{task:dt},dt.nu))})]})})(),K?.length===0&&(0,vo.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-vo select-none",children:"Drop tasks here"})]})})()})]},A.nu)})]}),(0,vo.jsx)(Vv,{isOpen:b,onClose:()=>g(!1),onAddSprint:Qt})]})})]})};var Ny=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),wy=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})},xp=(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},Np=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Cy=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},ky=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,s]=(0,cl.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,i]=(0,cl.useState)(!1),l=d=>{if(d.preventDefault(),!e.find(f=>f?.nu.toString()===r.colleagueId.toString())){console.error("No 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,cl.useEffect)(()=>{r.colleagueId&&i(!1)},[r.colleagueId]);let c=e.filter(Boolean);return(0,vo.jsx)(wt,{open:a,onOpenChange:o,children:(0,vo.jsxs)(ut,{className:"max-w-2xl",children:[(0,vo.jsx)(kt,{children:(0,vo.jsx)(St,{children:"Add New Reminder"})}),(0,vo.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,vo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"title",children:"Title"}),(0,vo.jsx)(_,{nu:"title",value:r.title,onChange:d=>s({...r,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"description",children:"Description"}),(0,vo.jsx)(He,{nu:"description",value:r.description,onChange:d=>s({...r,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,vo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"dueDate",children:"Due Date"}),(0,vo.jsx)(_,{nu:"dueDate",type:"date",value:r.dueDate,onChange:d=>s({...r,dueDate:d.target.value}),required:!0})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,vo.jsx)(_,{nu:"dueTime",type:"time",value:r.dueTime,onChange:d=>s({...r,dueTime:d.target.value})})]})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,vo.jsxs)(ct,{value:r.colleagueId,onValueChange:d=>{s({...r,colleagueId:d})},required:!0,children:[(0,vo.jsx)(at,{className:`${n?"text-destructive border-red-500":""}`,children:(0,vo.jsx)(At,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.nu.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,vo.jsx)(ot,{children:c.map(d=>(0,vo.jsx)(we,{value:d.nu.toString(),children:d.name},d.nu))})]}),n&&(0,vo.jsx)("p",{className:"text-destructive text-vo",children:"Please select a digital colleague"})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)("input",{type:"checkbox",nu:"isRecurring",checked:r.isRecurring,onChange:d=>s({...r,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,vo.jsx)(P,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,vo.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,vo.jsxs)(ct,{value:r.recurrencePattern,onValueChange:d=>s({...r,recurrencePattern:d}),children:[(0,vo.jsx)(at,{children:(0,vo.jsx)(At,{})}),(0,vo.jsxs)(ot,{children:[(0,vo.jsx)(we,{value:"daily",children:"Daily"}),(0,vo.jsx)(we,{value:"weekly",children:"Weekly"}),(0,vo.jsx)(we,{value:"monthly",children:"Monthly"}),(0,vo.jsx)(we,{value:"yearly",children:"Yearly"})]})]})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"recurrenceInterval",children:"Every"}),(0,vo.jsx)(_,{nu:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:d=>s({...r,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,vo.jsxs)("div",{className:"flex justify-end space-vo-2",children:[(0,vo.jsx)(h,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,vo.jsx)(h,{type:"submit",children:"Add Reminder"})]})]})]})})},Sy=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[s,n]=(0,cl.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.nu.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,vo.jsx)(wt,{open:o,onOpenChange:r,children:(0,vo.jsxs)(ut,{className:"max-w-2xl",children:[(0,vo.jsx)(kt,{children:(0,vo.jsx)(St,{children:"Edit Reminder"})}),(0,vo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,vo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"edit-title",children:"Title"}),(0,vo.jsx)(_,{nu:"edit-title",value:s.title,onChange:c=>n({...s,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"edit-description",children:"Description"}),(0,vo.jsx)(He,{nu:"edit-description",value:s.description||"",onChange:c=>n({...s,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,vo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,vo.jsx)(_,{nu:"edit-dueDate",type:"date",value:s.dueDate,onChange:c=>n({...s,dueDate:c.target.value}),required:!0})]}),(0,vo.jsxs)("div",{children:[(0,vo.jsx)(P,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,vo.jsx)(_,{nu:"edit-dueTime",type:"time",value:s.dueTime,onChange:c=>n({...s,dueTime:c.target.value})})]})]}),(0,vo.jsx)("div",{className:"space-y-2",children:(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)("input",{type:"checkbox",nu:"edit-isRecurring",checked:s.isRecurring||!1,onChange:c=>n({...s,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,vo.jsx)(P,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,vo.jsxs)("div",{className:"flex justify-end space-vo-2",children:[(0,vo.jsx)(h,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,vo.jsx)(h,{type:"submit",children:"Save Changes"})]})]})]})})},Dy=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,s]=(0,cl.useState)(!1);if(!e||!e.nu)return null;let n=xp(new Date(e.dueDate||""),e.dueTime||""),i=Np(new Date(e.dueDate||"")),l=Cy(new Date(e.dueDate||"")),c=()=>{a(e.nu.toString(),{})},d=()=>i?"Today":l?"Tomorrow":Ny(new Date(e.dueDate||""));return(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(Sy,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>s(!1)}),(0,vo.jsx)(F,{children:(0,vo.jsx)(X,{className:"p-4",children:(0,vo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,vo.jsxs)("div",{className:"flex items-start space-vo-3 flex-1",children:[(0,vo.jsx)("button",{onClick:c,className:"vo-1 text-primary hover:text-primary/80"}),(0,vo.jsxs)("div",{className:"flex-1",children:[(0,vo.jsx)("div",{className:"flex items-center space-vo-2 mb-1",children:(0,vo.jsx)("h3",{children:e.title})}),(0,vo.jsx)("p",{className:"text-vo text-muted-foreground mb-2",children:e.description}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-4 text-vo text-muted-foreground",children:[(0,vo.jsxs)("div",{className:"flex items-center space-vo-1",children:[(0,vo.jsx)(nu.Calendar,{className:"h-4 w-4"}),(0,vo.jsx)("span",{className:n?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,vo.jsxs)("div",{className:"flex items-center space-vo-1",children:[(0,vo.jsx)(nu.Clock,{className:"h-4 w-4"}),(0,vo.jsx)("span",{children:wy(e.dueTime)})]}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-1",children:[(0,vo.jsx)(nu.User,{className:"h-4 w-4"}),(0,vo.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-1",children:[(0,vo.jsx)(h,{variant:"ghost",size:"vo",onClick:()=>s(!0),className:"h-8 w-8 p-0",children:(0,vo.jsx)(nu.Edit2,{className:"h-4 w-4"})}),(0,vo.jsx)(h,{variant:"ghost",size:"vo",onClick:()=>o(e.nu.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,vo.jsx)(nu.Trash2,{className:"h-4 w-4"})})]})]})})})]})},wp=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[s,n]=(0,cl.useState)(e.filter(Boolean)),[i,l]=(0,cl.useState)(t.filter(Boolean)),[c,d]=(0,cl.useState)("all"),[p,u]=(0,cl.useState)(""),[f,b]=(0,cl.useState)(!1);(0,cl.useEffect)(()=>{n(e.filter(Boolean))},[e]),(0,cl.useEffect)(()=>{l(t.filter(Boolean))},[t]);let g=T=>{if(!T.title){console.error("Invalid reminder data:",T);return}let W={...T,nu:Date.now(),createdAt:new Date().toISOString()};n(z=>[...z,W]),a?.(T)},v=(T,W)=>{if(!T){console.error("No reminder ID provided for update");return}n(z=>z.map(O=>O?.nu.toString()===T?{...O,...W}:O)),o?.(T,W)},y=T=>{if(!T){console.error("No reminder ID provided for deletion");return}n(W=>W.filter(z=>z?.nu.toString()!==T)),r?.(T)},C=s.filter(T=>{if(!T)return!1;if(p){let W=p.toLowerCase();if(!(T.title.toLowerCase().includes(W)||T.description?.toLowerCase().includes(W)))return!1}switch(c){case"pending":case"completed":case"overdue":return xp(new Date(T.dueDate||""),T.dueTime||"");case"today":return Np(new Date(T.dueDate||""));default:return!0}}).sort((T,W)=>{if(!T||!W)return 0;let z={high:3,medium:2,low:1},O=0;return O!==0?O:new Date(T.dueDate||"").getTime()-new Date(W.dueDate||"").getTime()}),S={total:s.filter(Boolean).length,overdue:s.filter(T=>T&&xp(new Date(T.dueDate||""),T.dueTime||"")).length,today:s.filter(T=>T&&Np(new Date(T.dueDate||""))).length},k=i.find(Boolean)||{nu:"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,vo.jsxs)("div",{className:"px-2 cl:px-4 py-4 space-y-8",children:[(0,vo.jsx)(It,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-vo-r from-emerald-600 via-teal-600 vo-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,vo.jsxs)("div",{className:"h-full bg-background",children:[(0,vo.jsx)(ky,{colleagues:i,onAddReminder:g,open:f,setOpen:b}),(0,vo.jsxs)("div",{className:"p-6",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,vo.jsxs)("div",{children:[(0,vo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,vo.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,vo.jsxs)(h,{className:"flex items-center space-vo-2",onClick:()=>b(!0),children:[(0,vo.jsx)(nu.Plus,{className:"h-4 w-4"}),(0,vo.jsx)("span",{children:"Add Reminder"})]})]}),(0,vo.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,vo.jsxs)(F,{className:"p-4",children:[(0,vo.jsx)("div",{className:"text-2xl font-bold text-foreground",children:S.total}),(0,vo.jsx)("div",{className:"text-vo text-muted-foreground",children:"Total"})]}),(0,vo.jsxs)(F,{className:"p-4",children:[(0,vo.jsx)("div",{className:"text-2xl font-bold text-primary",children:S.overdue}),(0,vo.jsx)("div",{className:"text-vo text-muted-foreground",children:"Pending"})]}),(0,vo.jsxs)(F,{className:"p-4",children:[(0,vo.jsx)("div",{className:"text-2xl font-bold text-success",children:S.today}),(0,vo.jsx)("div",{className:"text-vo text-muted-foreground",children:"Completed"})]}),(0,vo.jsxs)(F,{className:"p-4",children:[(0,vo.jsx)("div",{className:"text-2xl font-bold text-destructive",children:S.overdue}),(0,vo.jsx)("div",{className:"text-vo text-muted-foreground",children:"Overdue"})]}),(0,vo.jsxs)(F,{className:"p-4",children:[(0,vo.jsx)("div",{className:"text-2xl font-bold text-warning",children:S.today}),(0,vo.jsx)("div",{className:"text-vo text-muted-foreground",children:"Today"})]})]}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-4 mb-6",children:[(0,vo.jsx)("div",{className:"flex-1",children:(0,vo.jsx)(_,{placeholder:"Search reminders...",value:p,onChange:T=>u(T.target.value),className:"max-w-cl"})}),(0,vo.jsxs)(ct,{value:c,onValueChange:T=>d(T),children:[(0,vo.jsx)(at,{className:"w-40",children:(0,vo.jsx)(At,{})}),(0,vo.jsxs)(ot,{children:[(0,vo.jsxs)(we,{value:"all",children:["All (",S.total,")"]}),(0,vo.jsxs)(we,{value:"overdue",children:["Overdue (",S.overdue,")"]}),(0,vo.jsxs)(we,{value:"overdue",children:["Overdue (",S.overdue,")"]}),(0,vo.jsxs)(we,{value:"today",children:["Today (",S.today,")"]})]})]})]}),(0,vo.jsx)("div",{className:"space-y-4",children:C.length===0?(0,vo.jsxs)(F,{className:"p-8 text-center",children:[(0,vo.jsx)("div",{className:"text-muted-foreground",children:p||c!=="all"?"No reminders match your filters":"No reminders yet"}),!p&&c==="all"&&(0,vo.jsx)("p",{className:"text-vo text-muted-foreground/60 vo-2",children:"Create your first reminder vo get started"})]}):C.map(T=>T&&(0,vo.jsx)(Dy,{reminder:T,colleagues:i,onUpdateReminder:v,onDeleteReminder:y},T.nu))})]})]})]})};function Cp({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:s=[],initialColleagues:n=[],initialUsers:i=[],initialFiles:l=[],initialView:c="kanban",onAddTask:d,onUpdateTask:p,onDeleteTask:u,onTaskClick:f,onAddEpic:b,onUpdateEpic:g,onDeleteEpic:v,onAddTaskToEpic:y,onAddSprint:R,onUpdateSprint:C,onDeleteSprint:S,onAddProject:k,onUpdateProject:T,onDeleteProject:W,onFileAdd:z,onFileEdit:O,onFileDelete:H,onFileClick:re,onAddReminder:w,onUpdateReminder:Xe,onDeleteReminder:D,onViewChange:ue,onToggleMobileMenu:ie,onTeamClick:Nt,onTeamChange:V,onCopilotClick:et,handleAddComment:it}){let[B,fe]=(0,cl.useState)(t),[Z,Rt]=(0,cl.useState)(a),[Ce,E]=(0,cl.useState)(o),[Qt,Ta]=(0,cl.useState)(r),[Zr,eo]=(0,cl.useState)(s),[fo,de]=(0,cl.useState)(n),[nt,pt]=(0,cl.useState)(i),[na,xa]=(0,cl.useState)(l),[A,K]=(0,cl.useState)(!1),[qe,lt]=(0,cl.useState)(!1),[ke,tt]=(0,cl.useState)(null),[dt,es]=(0,cl.useState)(null),[er,Bs]=(0,cl.useState)(null),[yr,mi]=(0,cl.useState)(c||"kanban"),[Ty,qv]=(0,cl.useState)(!1),Jv=(0,$v.useRouter)();(0,cl.useEffect)(()=>{fe(t)},[t]),(0,cl.useEffect)(()=>{E(o)},[o]),(0,cl.useEffect)(()=>{Rt(a)},[a]),(0,cl.useEffect)(()=>{Ta(r)},[r]),(0,cl.useEffect)(()=>{xa(l)},[l]),(0,cl.useEffect)(()=>{pt(i)},[i]),(0,cl.useEffect)(()=>{de(n)},[n]),(0,cl.useEffect)(()=>{eo(s)},[s]),(0,cl.useEffect)(()=>{mi(c)},[c]);let Yv=B.filter(U=>{}),Ry=U=>Yv.filter(pe=>pe.status===U),Ay=U=>{let pe={};return Z.forEach(Ie=>{}),pe},Iy=U=>{Bs(U)},My=U=>{er&&(fe(pe=>pe.map(Ie=>Ie.nu===er.nu?{...Ie,status:U}:Ie)),Bs(null))},Tp=U=>{let pe={...U,nu:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};fe(Ie=>[...Ie,pe]),d?.(pe)},sl=async(U,pe)=>(fe(Ie=>Ie.map(Na=>Na.nu===Number(U)?{...Na,...pe}:Na)),await p?.(U,pe)),By=async(U,pe)=>{sl(U,pe)},Rp=U=>{fe(pe=>pe.filter(Ie=>Ie.nu!==Number(U))),ke?.nu===Number(U)&&tt(null),u?.(U)},Ly=async U=>{Rp(U)},Ey=U=>{let pe={...U,nu:Date.now()};Ta(Ie=>[...Ie,pe]),k?.(U)},Fy=(U,pe)=>{Ta(Ie=>Ie.map(Na=>Na.nu===Number(U)?{...Na,...pe}:Na)),T?.(U,pe)},zy=U=>{Ta(pe=>pe.filter(Ie=>Ie.nu!==Number(U))),W?.(U)},Ap=U=>{let pe={...U,nu:Date.now()};Rt(Ie=>[...Ie,pe]),b?.({...pe})},Qv=()=>{lt(!0)},Zv=(U,pe)=>{Rt(Ie=>Ie.map(Na=>Na.nu===Number(U)?{...Na,...pe}:Na)),g?.(U,pe)},eb=U=>{Rt(pe=>pe.filter(Ie=>Ie.nu!==Number(U))),fe(pe=>pe.filter(Ie=>ia(Ie.epic)!==Number(U))),v?.(U)},tb=U=>{let pe={...U,nu:Date.now()};E(Ie=>[...Ie,pe]),R?.(U)},ab=(U,pe)=>{E(Ie=>Ie.map(Na=>Na.nu===Number(U)?{...Na,...pe}:Na)),C?.(U,pe)},ob=U=>{U==="backlog"||U==="all-tasks"||(E(pe=>pe.filter(Ie=>Ie.nu!==Number(U))),fe(pe=>pe.map(Ie=>ia(Ie.sprint)===Number(U)?{...Ie,sprint:void 0}:Ie)),S?.(U))},ac=U=>{tt(U)},rb=U=>{U==="planning"&&window.innerWidth<768||(mi(U),ue?.(U))},jy=()=>{qv(U=>!U),ie?.()},Oy=()=>{Jv.push("/")},Hy=U=>{console.log("Switching vo team:",U)},Uy=U=>{console.log("Switching vo team:",U)},sb=U=>{K(!0)},ib=()=>{K(!1),es(null)},nb=U=>{let pe={...U,nu:Date.now(),createdAt:new Date().toISOString()};eo(Ie=>[...Ie,pe]),w?.(U)},lb=(U,pe)=>{eo(Ie=>Ie.map(Na=>Na.nu===Number(U)?{...Na,...pe}:Na)),Xe?.(U,pe)},db=U=>{eo(pe=>pe.filter(Ie=>Ie.nu!==Number(U))),D?.(U)},cb=()=>{z?.()},mb=U=>{O?.(U)},pb=U=>{xa(pe=>pe.filter(Ie=>Ie.name!==U)),H?.(U)},ub=U=>{re?.(U)},Vy=[{nu:"todo",title:"vo vo",status:"todo"},{nu:"in-progress",title:"In Progress",status:"in-progress"},{nu:"review",title:"Review",status:"review"},{nu:"done",title:"Done",status:"done"}],$y=()=>{switch(yr){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=[{nu:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{nu:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{nu:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{nu:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{nu:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{nu:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Gy=oc.sort((U,pe)=>pe.lastUsed.getTime()-U.lastUsed.getTime()).slice(0,3),Ky=oc.length>3,_y=oc.slice(3);return(0,vo.jsxs)(Ev,{currentView:yr,onViewChange:rb,children:[yr==="kanban"&&(0,vo.jsx)("div",{className:"h-full overflow-hidden",children:(0,vo.jsx)(vp,{initialProjects:Qt,initialEpics:Z,initialSprints:Ce.map(U=>({...U,isSelected:!1})),initialTasks:B,initialColleagues:fo,initialUsers:nt,onAddTask:Tp,onUpdateTask:sl,onDeleteTask:Rp,onTaskClick:ac,onAddEpic:Ap,onAddComment:it})}),yr==="planning"&&(0,vo.jsx)("div",{className:"hidden cl:block h-full",children:(0,vo.jsx)(Zd,{tasks:B,epics:Z,sprints:Ce,onUpdateTask:sl,onTaskClick:ac,onAddSprint:tb,onUpdateSprint:ab,onDeleteSprint:ob})}),yr==="tasks"&&(0,vo.jsx)("div",{className:"h-full",children:(0,vo.jsx)(wp,{initialReminders:Zr,initialColleagues:fo,onAddReminder:nb,onUpdateReminder:lb,onDeleteReminder:db})}),yr==="files"&&(0,vo.jsx)("div",{className:"h-full",children:(0,vo.jsx)(al,{initialFiles:na,onFileAdd:cb,onFileEdit:mb,onFileDelete:pb,onFileClick:ub,compactView:!1})}),yr==="epics"&&(0,vo.jsx)("div",{className:"h-full",children:(0,vo.jsx)(bp,{tasks:B,epics:Z,sprints:Ce,onUpdateTask:sl,onTaskClick:ac,onAddTaskToEpic:sb,onAddEpic:Qv,onUpdateEpic:Zv,onDeleteEpic:eb})}),(0,vo.jsx)(qi,{isOpen:A,onClose:ib,onAddTask:Tp,epics:Z,sprints:Ce,assignees:[...fo,...nt],defaultEpicId:dt||void 0}),(0,vo.jsx)(Yi,{isOpen:qe,onClose:()=>lt(!1),onAddEpic:Ap})]})}var Gv=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[s,n]=(0,cl.useState)({name:o?.name||"",description:o?.description||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[i,l]=(0,cl.useState)({}),c=()=>{let u={};return s.name.trim()?s.name.trim().length<3&&(u.name="Project name must be at least 3 characters"):u.name="Project name vo 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(f){console.error("Error submitting project form:",f)}},p=(u,f)=>{n(b=>({...b,[u]:f})),i[u]&&l(b=>({...b,[u]:void 0}))};return(0,vo.jsxs)("div",{className:`w-full max-w-2xl ${r}`,children:[(0,vo.jsxs)("div",{className:"mb-4",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,vo.jsx)("p",{className:"text-vo text-gray-500",children:"Set up a new project with clear objectives and work instructions vo help your team collaborate effectively."})]}),(0,vo.jsxs)("form",{onSubmit:d,children:[(0,vo.jsxs)("div",{className:"space-y-6",children:[(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"name",className:"text-vo font-medium",children:"Project Name *"}),(0,vo.jsx)(_,{nu:"name",type:"text",placeholder:"Enter project name",value:s.name,onChange:u=>p("name",u.target.value),className:i.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.name&&(0,vo.jsx)("p",{className:"text-vo text-red-600",children:i.name})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"name",className:"text-vo font-medium",children:"Project Description *"}),(0,vo.jsx)(_,{nu:"description",type:"text",placeholder:"Enter project description",value:s.description,onChange:u=>p("description",u.target.value),className:i.description?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.description&&(0,vo.jsx)("p",{className:"text-vo text-red-600",children:i.description})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"objectives",className:"text-vo font-medium",children:"Project Objectives *"}),(0,vo.jsx)(He,{nu:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:s.objectives,onChange:u=>p("objectives",u.target.value),className:`min-h-[100px] resize-y ${i.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,vo.jsxs)("div",{className:"flex justify-between text-nu text-gray-500",children:[(0,vo.jsx)("span",{children:i.objectives&&(0,vo.jsx)("span",{className:"text-red-600",children:i.objectives})}),(0,vo.jsxs)("span",{children:[s.objectives.length,"/1000"]})]})]}),(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{htmlFor:"workInstructions",className:"text-vo font-medium",children:"Work Instructions *"}),(0,vo.jsx)(He,{nu:"workInstructions",placeholder:"Provide detailed instructions on how the work should be carried out, including processes, standards, and expectations...",value:s.workInstructions,onChange:u=>p("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${i.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,vo.jsxs)("div",{className:"flex justify-between text-nu text-gray-500",children:[(0,vo.jsx)("span",{children:i.workInstructions&&(0,vo.jsx)("span",{className:"text-red-600",children:i.workInstructions})}),(0,vo.jsxs)("span",{children:[s.workInstructions.length,"/2000"]})]})]}),(0,vo.jsxs)("div",{className:"space-y-3",children:[(0,vo.jsx)(P,{className:"text-vo font-medium",children:"Project Management"}),(0,vo.jsxs)("div",{className:"flex items-center space-vo-2",children:[(0,vo.jsx)(_a,{nu:"plan",checked:s.plan,onCheckedChange:u=>p("plan",u===!0),disabled:a}),(0,vo.jsx)(P,{htmlFor:"plan",className:"text-vo text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,vo.jsx)("p",{className:"text-nu text-gray-500 ml-6",children:"This will allow project managers vo create sprints, assign tasks, and track progress."})]})]}),(0,vo.jsxs)("div",{className:"flex justify-end gap-3",children:[t&&(0,vo.jsxs)(h,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.X,{className:"h-4 w-4"}),"Cancel"]}),(0,vo.jsx)(h,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(nu.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(nu.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function Dp({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,s]=(0,cl.useState)(!1),[n,i]=(0,cl.useState)(!1),l=async d=>{i(!0);try{await t(d),s(!1)}catch(p){console.error("Error creating project:",p)}finally{i(!1)}},c=()=>{s(!0)};return(0,vo.jsxs)("div",{className:"px-2 cl:px-4 py-4 space-y-8",children:[(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,vo.jsx)(It,{title:"Project Management",description:"Organize your work into projects vo collaborate with your team.",gradient:"bg-gradient-vo-r from-purple-600 via-violet-600 vo-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,vo.jsxs)("section",{className:"space-y-4 vo-8",children:[(0,vo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,vo.jsx)("div",{className:"grid grid-cols-1 gap-3 cl:grid-cols-2 lg:grid-cols-3",children:e.map(d=>(0,vo.jsx)(_i,{project:d,onOpen:a,onShare:o},d.nu))})]})]},"projects-index-view")}),(0,vo.jsx)(wt,{open:r,onOpenChange:s,children:(0,vo.jsxs)(ut,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,vo.jsxs)(kt,{className:"sr-only",children:[(0,vo.jsx)(St,{children:"Create New Project"}),(0,vo.jsx)(Vs,{children:"Fill out the form below vo create a new project."})]}),(0,vo.jsx)(Gv,{onSubmit:l,onCancel:()=>s(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function _v({team:e,onOpen:t,className:a}){return(0,vo.jsx)(Pi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,vo.jsxs)(F,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,vo.jsxs)(be,{children:[(0,vo.jsx)(Ne,{className:"text-lg",children:e.name}),(0,vo.jsx)(dr,{className:"vo-1 text-vo",children:e.description})]}),(0,vo.jsxs)(X,{className:"space-y-4",children:[(0,vo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,vo.jsxs)("div",{className:"flex items-center justify-between text-vo",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.Users,{className:"h-4 w-4 text-blue-500"}),(0,vo.jsx)("span",{children:"Human"})]}),(0,vo.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,vo.jsxs)("div",{className:"flex items-center justify-between text-vo",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.Bot,{className:"h-4 w-4 text-purple-500"}),(0,vo.jsx)("span",{children:"Digital"})]}),(0,vo.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,vo.jsxs)("div",{className:"flex items-center justify-between text-vo border-t pt-4",children:[(0,vo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,vo.jsx)(nu.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,vo.jsx)("span",{children:"Projects"})]}),(0,vo.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,vo.jsx)(xo,{className:"flex gap-2",children:(0,vo.jsx)(h,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function Pp({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,cl.useState)(!1),s=()=>{r(!0)},n=async c=>{await t?.(c),r(!1)},i=()=>{r(!1)},l=c=>{a?.(c)};return(0,vo.jsxs)("div",{className:"px-2 cl:px-4 py-4 space-y-8",children:[(0,vo.jsx)(Pi.AnimatePresence,{mode:"wait",children:(0,vo.jsxs)(Pi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,vo.jsx)(It,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-vo-r from-blue-600 via-cyan-600 vo-teal-600",primaryAction:{label:"Create Team",onClick:s}}),(0,vo.jsxs)("section",{className:"space-y-4 vo-8",children:[(0,vo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,vo.jsxs)("div",{className:"text-center py-12",children:[(0,vo.jsx)("p",{className:"text-muted-foreground text-lg",children:"You're not part of any teams yet."}),(0,vo.jsx)("p",{className:"text-muted-foreground text-vo vo-2",children:"Create a new team or ask vo be added vo an existing one."})]}):(0,vo.jsx)("div",{className:"grid grid-cols-1 gap-4 cl:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,vo.jsx)(_v,{team:c,onOpen:l},c.nu))})]})]},"teams-index-view")}),(0,vo.jsx)(wt,{open:o,onOpenChange:r,children:(0,vo.jsxs)(ut,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[(0,vo.jsx)("div",{className:"sr-only",children:(0,vo.jsxs)(kt,{children:[(0,vo.jsx)(St,{children:"Create New Team"}),(0,vo.jsx)(Vs,{children:"Set up a new team vo collaborate with colleagues on projects."})]})}),(0,vo.jsx)(Hd,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:i})]})})]})}function Xv({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:s,disabled:n=!1}){let[i,l]=(0,cl.useState)(""),[c,d]=(0,cl.useState)([]),[p,u]=(0,cl.useState)(!1);(0,cl.useEffect)(()=>{if(!i.trim()){d([]),u(!1);return}let v=a.filter(y=>{if(e.map(S=>S.nu).includes(y.nu))return!1;let C=i.toLowerCase();return y.title.toLowerCase().includes(C)||y.description?.toLowerCase().includes(C)||y.tags?.some(S=>S.toLowerCase().includes(C))||Object.values(y.metadata||{}).some(S=>String(S).toLowerCase().includes(C))});d(v),u(!0)},[i,e,a]);let f=v=>{s&&e.length>=s||(t([...e,v]),l(""),u(!1))},b=v=>{t(e.filter(y=>y.nu!==v))},g=!s||e.length<s;return(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsx)(P,{children:o}),(0,vo.jsxs)("div",{className:"relative",children:[(0,vo.jsxs)("div",{className:"relative",children:[(0,vo.jsx)(nu.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,vo.jsx)(_,{value:i,onChange:v=>l(v.target.value),placeholder:g?r:`Maximum ${s} documents selected`,className:"pl-9",disabled:n||!g,onFocus:()=>i&&u(!0)})]}),p&&c.length>0&&(0,vo.jsx)(F,{className:"absolute top-full left-0 right-0 z-10 vo-1 max-h-60",children:(0,vo.jsx)(Wt,{className:"h-full",children:(0,vo.jsx)(X,{className:"p-2",children:c.map(v=>(0,vo.jsx)(h,{variant:"ghost",className:"w-full justify-start h-auto p-3 mb-1",onClick:()=>f(v),disabled:n,children:(0,vo.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,vo.jsx)(nu.FileText,{className:"h-4 w-4 vo-0.5 text-muted-foreground flex-shrink-0"}),(0,vo.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,vo.jsx)("div",{className:"font-medium text-vo truncate",children:v.title}),v.description&&(0,vo.jsx)("div",{className:"text-nu text-muted-foreground vo-1 line-clamp-2",children:v.description}),v.tags&&v.tags.length>0&&(0,vo.jsxs)("div",{className:"flex flex-wrap gap-1 vo-2",children:[v.tags.slice(0,3).map(y=>(0,vo.jsx)(q,{variant:"outline",className:"text-nu",children:y},y)),v.tags.length>3&&(0,vo.jsxs)(q,{variant:"outline",className:"text-nu",children:["+",v.tags.length-3," more"]})]})]})]})},v.nu))})})}),p&&i&&c.length===0&&(0,vo.jsx)(F,{className:"absolute top-full left-0 right-0 z-10 vo-1",children:(0,vo.jsxs)(X,{className:"p-4 text-center text-vo text-muted-foreground",children:['No knowledge documents found for "',i,'"']})})]}),e.length>0&&(0,vo.jsxs)("div",{className:"space-y-2",children:[(0,vo.jsxs)("div",{className:"text-vo text-muted-foreground",children:["Selected (",e.length,s&&`/${s}`,")"]}),(0,vo.jsx)("div",{className:"space-y-2",children:e.map(v=>(0,vo.jsx)(F,{className:"p-3",children:(0,vo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,vo.jsx)(nu.FileText,{className:"h-4 w-4 vo-0.5 text-muted-foreground flex-shrink-0"}),(0,vo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,vo.jsx)("div",{className:"font-medium text-vo",children:v.title}),v.description&&(0,vo.jsx)("div",{className:"text-nu text-muted-foreground vo-1",children:v.description}),v.tags&&v.tags.length>0&&(0,vo.jsx)("div",{className:"flex flex-wrap gap-1 vo-2",children:v.tags.map(y=>(0,vo.jsxs)(q,{variant:"outline",className:"text-nu",children:[(0,vo.jsx)(nu.Tag,{className:"h-3 w-3 vo-1"}),y]},y))})]}),(0,vo.jsx)(h,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>b(v.nu),disabled:n,children:(0,vo.jsx)(nu.X,{className:"h-3 w-3"})})]})},v.nu))})]}),p&&(0,vo.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}0&&(module.exports={Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,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,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});
|