cortex-react-components 2.0.11 → 2.0.13
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-RGOKBIQ5.mjs → chunk-255P6K5W.mjs} +1 -1
- package/dist/{chunk-FGH7ESCA.mjs → chunk-2GNX22CR.mjs} +1 -1
- package/dist/{chunk-GTZJWMZR.mjs → chunk-2RQDJ5XT.mjs} +1 -1
- package/dist/{chunk-YTK3LJ6Z.mjs → chunk-3UMWGTHK.mjs} +1 -1
- package/dist/chunk-5BNMRE6J.mjs +4 -0
- package/dist/{chunk-75F3LJMX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
- package/dist/{chunk-RJGYVDOU.mjs → chunk-67QPOSVV.mjs} +1 -1
- package/dist/{chunk-CXOVEABI.mjs → chunk-7GMAMIHM.mjs} +1 -1
- package/dist/{chunk-RAGDUV7M.mjs → chunk-7VDNUJZC.mjs} +1 -1
- package/dist/{chunk-GBTFOUD6.mjs → chunk-AQZEZ3UR.mjs} +1 -1
- package/dist/{chunk-QTILVWJA.mjs → chunk-B2EJGXDG.mjs} +1 -1
- package/dist/{chunk-GVDM4RRN.mjs → chunk-B7AXSCTN.mjs} +1 -1
- package/dist/{chunk-V7F26YS5.mjs → chunk-BE5B22X7.mjs} +1 -1
- package/dist/{chunk-ABGNIQRP.mjs → chunk-ECXVQZBN.mjs} +1 -1
- package/dist/{chunk-WIRQ5IRT.mjs → chunk-ERJXTG6X.mjs} +1 -1
- package/dist/{chunk-3NRXQBBS.mjs → chunk-FKU4VQR6.mjs} +1 -1
- package/dist/{chunk-M4UVNIK2.mjs → chunk-FTZRG54P.mjs} +1 -1
- package/dist/{chunk-GHOL5L32.mjs → chunk-H3CJOE6S.mjs} +1 -1
- package/dist/{chunk-XXQPX7T3.mjs → chunk-H7PR7Q2X.mjs} +1 -1
- package/dist/{chunk-NINFDOV5.mjs → chunk-HKGW6JI2.mjs} +1 -1
- package/dist/{chunk-FE7ZGUPU.mjs → chunk-IF3425JX.mjs} +1 -1
- package/dist/{chunk-TK4JC5PG.mjs → chunk-INPV5MBU.mjs} +1 -1
- package/dist/{chunk-V25DRKWY.mjs → chunk-JPLBPV7J.mjs} +1 -1
- package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
- package/dist/{chunk-75WE6ZXB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
- package/dist/{chunk-KWYJ3XZI.mjs → chunk-LJOWXPWW.mjs} +1 -1
- package/dist/{chunk-AJQHGVZ5.mjs → chunk-LJQPLE4S.mjs} +1 -1
- package/dist/{chunk-3HNU2NYP.mjs → chunk-M7NV6EFH.mjs} +1 -1
- package/dist/{chunk-7R47MHQE.mjs → chunk-MXCW6SOT.mjs} +1 -1
- package/dist/{chunk-2BRDNDUB.mjs → chunk-N3B3XNV3.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/{chunk-5MWZTJYP.mjs → chunk-PK3OBSCB.mjs} +1 -1
- package/dist/{chunk-IPIDKLAW.mjs → chunk-RNMPX2AU.mjs} +1 -1
- package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
- package/dist/{chunk-OQYER4E7.mjs → chunk-SW7RYGO6.mjs} +1 -1
- package/dist/chunk-TR6RBROH.mjs +1 -0
- package/dist/{chunk-YP5YVY6N.mjs → chunk-VVCAOIYO.mjs} +1 -1
- package/dist/chunk-VWLPVN4M.mjs +4 -0
- package/dist/{chunk-7HR6FNWF.mjs → chunk-XHR2HXMP.mjs} +1 -1
- package/dist/{chunk-C4RWEPVF.mjs → chunk-YKG4FNS4.mjs} +1 -1
- package/dist/{chunk-UEBQJNVT.mjs → chunk-ZGQC6O62.mjs} +1 -1
- package/dist/components/{DigitalColleagues/sidebar.d.ts → AdvancedComponents/AppSidebar.d.ts} +2 -2
- package/dist/components/AdvancedComponents/AppSidebar.js +5 -0
- package/dist/components/{DigitalColleagues/sidebar.mjs → AdvancedComponents/AppSidebar.mjs} +1 -1
- package/dist/components/AdvancedComponents/index.d.ts +3 -0
- package/dist/components/AdvancedComponents/index.js +1 -1
- package/dist/components/AdvancedComponents/index.mjs +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo.js +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.js +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/DashboardHeader.mjs +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -3
- package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -3
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.d.ts +13 -0
- package/dist/components/DigitalColleagues/index.js +5 -0
- package/dist/components/DigitalColleagues/index.mjs +1 -0
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/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/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/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/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/business-unit-switcher.mjs +3 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +11 -11
- 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/globals.css +1 -1
- package/dist/index.js +15 -15
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-HNCC3AOT.mjs +0 -4
- package/dist/components/AdvancedComponents/sidebar.d.ts +0 -16
- package/dist/components/AdvancedComponents/sidebar.js +0 -5
- package/dist/components/AdvancedComponents/sidebar.mjs +0 -4
- package/dist/components/DigitalColleagues/sidebar-new.d.ts +0 -17
- package/dist/components/DigitalColleagues/sidebar-new.js +0 -5
- package/dist/components/DigitalColleagues/sidebar-new.mjs +0 -4
- package/dist/components/DigitalColleagues/sidebar.css +0 -1
- package/dist/components/DigitalColleagues/sidebar.js +0 -5
- /package/dist/components/AdvancedComponents/{sidebar.css → AppSidebar.css} +0 -0
- /package/dist/components/{DigitalColleagues → AdvancedComponents}/sidebar-favorites-readme.js +0 -0
- /package/dist/components/{DigitalColleagues → AdvancedComponents}/sidebar-favorites-readme.mjs +0 -0
- /package/dist/components/DigitalColleagues/{sidebar-new.css → index.css} +0 -0
package/dist/components/index.js
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
'use strict'
|
|
5
5
|
'use client';
|
|
6
6
|
|
|
7
|
-
"use strict";var zp=Object.create;var ps=Object.defineProperty;var Ep=Object.getOwnPropertyDescriptor;var Fp=Object.getOwnPropertyNames;var Hp=Object.getPrototypeOf,jp=Object.prototype.hasOwnProperty;var Up=(e,t)=>{for(var a in t)ps(e,a,{get:t[a],enumerable:!0})},od=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Fp(t))!jp.call(e,r)&&r!==a&&ps(e,r,{get:()=>t[r],enumerable:!(o=Ep(t,r))||o.enumerable});return e};var P=(e,t,a)=>(a=e!=null?zp(Hp(e)):{},od(t||!e||!e.__esModule?ps(a,"default",{value:e,enumerable:!0}):a,e)),Op=e=>od(ps({},"__esModule",{value:!0}),e);var Mf={};Up(Mf,{Alert:()=>Un,AlertDescription:()=>Gn,AlertTitle:()=>On,ApproveLeave:()=>zl,Avatar:()=>Me,AvatarFallback:()=>Le,AvatarImage:()=>pt,Badge:()=>me,BannerBlock:()=>Kn,BrandLogo:()=>bo,Breadcrumb:()=>$i,BreadcrumbEllipsis:()=>Ki,BreadcrumbItem:()=>_i,BreadcrumbLink:()=>Wi,BreadcrumbList:()=>Vi,BreadcrumbPage:()=>Xi,BreadcrumbSeparator:()=>Yi,Breadcrumbs:()=>Og,Button:()=>w,CMSLink:()=>ma,CRMCogeBoard:()=>rf,CRMKanbanBoard:()=>tf,Calendar:()=>Vr,CalendarView:()=>Ul,CallToActionBlock:()=>Lo,CallToActionBlockOld:()=>$u,CapabilityMenu:()=>Ql,Card:()=>Jr,Categories:()=>Mg,ChatCardArtefact:()=>_l,ChatCardTask:()=>ls,ChatInterface:()=>Ai,ChatInterfaceMessages:()=>mf,ChatMessage:()=>$l,Checkbox:()=>Ft,CodeBlock:()=>Zn,Collapsible:()=>Ia,CollapsibleContent:()=>Qa,CollapsibleTrigger:()=>Ja,CollectionArchive:()=>bg,Command:()=>Ts,CommandDialog:()=>tc,CommandEmpty:()=>zn,CommandGroup:()=>En,CommandInput:()=>Ln,CommandItem:()=>Hn,CommandList:()=>Bn,CommandSeparator:()=>Fn,CommandShortcut:()=>jn,CommentSection:()=>Af,Container:()=>Sl,ContentBlock:()=>qr,ContentCard:()=>eg,CopilotInterface:()=>Sf,CopyButton:()=>Jn,CustomLink:()=>qt,CustomerCard:()=>Mc,DarkTop:()=>ll,DashboardHero:()=>Gg,DealCard:()=>Ol,DealDetails:()=>is,DeliveryLeadSubmission:()=>Mi,DeliveryLeadSubmissionList:()=>Bi,DeliveryLeadSubmissionWithList:()=>wp,Dialog:()=>_t,DialogClose:()=>Rs,DialogContent:()=>Et,DialogDescription:()=>Mn,DialogFooter:()=>In,DialogHeader:()=>na,DialogOverlay:()=>Ds,DialogPortal:()=>An,DialogTitle:()=>la,DialogTrigger:()=>Zd,DropdownMenu:()=>gs,DropdownMenuCheckboxItem:()=>Qi,DropdownMenuContent:()=>Sr,DropdownMenuGroup:()=>gd,DropdownMenuItem:()=>Rr,DropdownMenuLabel:()=>en,DropdownMenuPortal:()=>fd,DropdownMenuRadioGroup:()=>vd,DropdownMenuRadioItem:()=>Zi,DropdownMenuSeparator:()=>tn,DropdownMenuShortcut:()=>an,DropdownMenuSub:()=>bd,DropdownMenuSubContent:()=>Ji,DropdownMenuSubTrigger:()=>qi,DropdownMenuTrigger:()=>fs,DynamicIcon:()=>ut,EditableField:()=>If,EventCard:()=>Lc,FeatureCard:()=>_s,FeatureGrid:()=>Gc,FeaturesBlock:()=>zo,Filter:()=>Lg,FlowPrintable:()=>mm,Footer:()=>Yg,Header:()=>Kg,HeaderDesktop:()=>Al,HeaderMobile:()=>Ml,HeadingImage:()=>mg,Hero:()=>Zu,HighImpactHero:()=>wl,HolidayGrid:()=>jl,HolidayTracker:()=>Zg,HoverCard:()=>Kd,HoverCardContent:()=>Tn,HoverCardTrigger:()=>qd,Image:()=>Hc,ImageBlock:()=>rl,InfoTile:()=>og,Input:()=>We,Insight:()=>ag,KanbanColumn:()=>ns,Label:()=>H,LightTop:()=>dl,Logo:()=>vg,LowImpactHero:()=>Pl,MOTD:()=>sg,Mask:()=>Hg,Media:()=>Ha,MediaBlock:()=>ja,MediumImpactHero:()=>kl,NavigationTabs:()=>ql,NewCustomerForm:()=>Gl,NewDealForm:()=>af,NewsGrid:()=>dm,OrgChart:()=>lg,PagePrintable:()=>pm,PageRange:()=>xg,PageShape:()=>ts,Pagination:()=>Ig,PayloadPagination:()=>Ng,Popover:()=>Ur,PopoverAnchor:()=>Vd,PopoverContent:()=>tr,PopoverTrigger:()=>Or,PostHero:()=>Eg,PricingCard:()=>Qu,Printable:()=>kg,ProjectCard:()=>Fc,ProjectTeam:()=>Tg,ProposalSummary:()=>dg,RelatedContent:()=>Ag,RelatedPagesMenu:()=>qg,RelatedPosts:()=>fg,RenderBlocks:()=>fo,RenderBlocksWithShapes:()=>ug,RenderHero:()=>Ug,RequestLeave:()=>Hl,ReusableContentBlock:()=>nl,RichText:()=>be,ScrollArea:()=>et,ScrollBar:()=>Ss,SectionHero:()=>Dl,Select:()=>da,SelectContent:()=>Xt,SelectGroup:()=>Eu,SelectItem:()=>Yt,SelectLabel:()=>nc,SelectScrollDownButton:()=>_n,SelectScrollUpButton:()=>Vn,SelectSeparator:()=>lc,SelectTrigger:()=>Wt,SelectValue:()=>ca,Separator:()=>Dr,ServiceCard:()=>Ju,Sheet:()=>bs,SheetClose:()=>Pd,SheetContent:()=>Ar,SheetDescription:()=>dn,SheetFooter:()=>nn,SheetHeader:()=>sn,SheetOverlay:()=>vs,SheetPortal:()=>rn,SheetTitle:()=>ln,SheetTrigger:()=>kd,Sidebar:()=>Po,SidebarContent:()=>oo,SidebarFooter:()=>Ro,SidebarGroup:()=>Gt,SidebarGroupAction:()=>bn,SidebarGroupContent:()=>sa,SidebarGroupLabel:()=>Ba,SidebarHeader:()=>So,SidebarInput:()=>fn,SidebarInset:()=>gn,SidebarLeft:()=>Pg,SidebarMenu:()=>Rt,SidebarMenuAction:()=>Mr,SidebarMenuBadge:()=>vn,SidebarMenuButton:()=>$t,SidebarMenuItem:()=>mt,SidebarMenuSkeleton:()=>hn,SidebarMenuSub:()=>ro,SidebarMenuSubButton:()=>io,SidebarMenuSubItem:()=>so,SidebarProvider:()=>mn,SidebarRail:()=>un,SidebarRight:()=>Dg,SidebarSeparator:()=>Ir,SidebarTrigger:()=>pn,SimpleHeader:()=>Vg,Skeleton:()=>Fe,SlideShow:()=>im,Switch:()=>Df,Tabs:()=>Wn,TabsContent:()=>Fu,TabsList:()=>Xn,TabsTrigger:()=>Yn,TextAndImages:()=>cm,Textarea:()=>Kt,Theme:()=>Js,ThemeProvider:()=>Fg,ThemeWithShapes:()=>Kc,Toast:()=>zr,ToastAction:()=>Nn,ToastClose:()=>Er,ToastDescription:()=>Hr,ToastProvider:()=>ks,ToastTitle:()=>Fr,ToastViewport:()=>Br,Toaster:()=>Hd,Toggle:()=>Cn,ToggleGroup:()=>kn,ToggleGroupItem:()=>Pn,Tooltip:()=>to,TooltipContent:()=>La,TooltipProvider:()=>eo,TooltipTrigger:()=>ao,VideoHeader:()=>Wg,WhyUs:()=>cg,badgeVariants:()=>$n,buttonVariants:()=>Za,defaultColorScheme:()=>Vl,findCapabilityByPath:()=>pf,getAllCapabilities:()=>gf,getCapabilityByTeam:()=>uf,getContextualActions:()=>Ni,getDataPart:()=>Pf,getFileParts:()=>Cf,getTextContent:()=>Zl,getToolPart:()=>Nf,hasDataPart:()=>kf,hasFilePart:()=>wf,hasToolPart:()=>xf,testCapabilities:()=>xi,toggleVariants:()=>jr,useIsMobile:()=>ys,useSidebar:()=>Zo,useToast:()=>Cs});module.exports=Op(Mf);var Ko=P(require("react")),us=require("@radix-Ld/react-icons"),ud=require("@radix-Ld/react-slot");var pd=require("clsx");var Oi="-",Gp=e=>{let t=Vp(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let i=l.split(Oi);return i[0]===""&&i.length!==1&&i.shift(),id(i,t)||$p(l)},getConflictingClassGroupIds:(l,i)=>{let d=a[l]||[];return i&&o[l]?[...d,...o[l]]:d}}},id=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?id(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let s=e.join(Oi);return t.validators.find(({validator:l})=>l(s))?.classGroupId},rd=/^\[(.+)\]$/,$p=e=>{if(rd.test(e)){let t=rd.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Vp=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Wp(Object.entries(e.classGroups),a).forEach(([s,l])=>{Ui(l,o,s,t)}),o},Ui=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let s=r===""?t:sd(t,r);s.classGroupId=a;return}if(typeof r=="function"){if(_p(r)){Ui(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([s,l])=>{Ui(l,sd(t,s),a,o)})})},sd=(e,t)=>{let a=e;return t.split(Oi).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},_p=e=>e.isThemeGetter,Wp=(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(([l,i])=>[t+l,i])):s);return[a,r]}):e,Xp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(s,l)=>{a.set(s,l),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let l=a.get(s);if(l!==void 0)return l;if((l=o.get(s))!==void 0)return r(s,l),l},set(s,l){a.has(s)?a.set(s,l):r(s,l)}}},nd="!",Yp=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],s=t.length,l=i=>{let d=[],m=0,c=0,p;for(let y=0;y<i.length;y++){let T=i[y];if(m===0){if(T===r&&(o||i.slice(y,y+s)===t)){d.push(i.slice(c,y)),c=y+s;continue}if(T==="/"){p=y;continue}}T==="["?m++:T==="]"&&m--}let g=d.length===0?i:i.substring(c),f=g.startsWith(nd),b=f?g.substring(1):g,u=p&&p>c?p-c:void 0;return{modifiers:d,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:u}};return a?i=>a({className:i,parseClassName:l}):l},Kp=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},qp=e=>({cache:Xp(e.cacheSize),parseClassName:Yp(e),...Gp(e)}),Jp=/\s+/,Qp=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,s=[],l=e.trim().split(Jp),i="";for(let d=l.length-1;d>=0;d-=1){let m=l[d],{modifiers:c,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:f}=a(m),b=!!f,u=o(b?g.substring(0,f):g);if(!u){if(!b){i=m+(i.length>0?" "+i:i);continue}if(u=o(g),!u){i=m+(i.length>0?" "+i:i);continue}b=!1}let y=Kp(c).join(":"),T=p?y+nd:y,M=T+u;if(s.includes(M))continue;s.push(M);let N=r(u,b);for(let A=0;A<N.length;++A){let k=N[A];s.push(T+k)}i=m+(i.length>0?" "+i:i)}return i};function Zp(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=ld(t))&&(o&&(o+=" "),o+=a);return o}var ld=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=ld(e[o]))&&(a&&(a+=" "),a+=t);return a};function eu(e,...t){let a,o,r,s=l;function l(d){let m=t.reduce((c,p)=>p(c),e());return a=qp(m),o=a.cache.get,r=a.cache.set,s=i,i(d)}function i(d){let m=o(d);if(m)return m;let c=Qp(d,a);return r(d,c),c}return function(){return s(Zp.apply(null,arguments))}}var ye=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},dd=/^\[(?:([a-Ot-]+):)?(.+)\]$/i,tu=/^\d+\/\d+$/,au=new Set(["px","full","screen"]),ou=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ru=/\d+(%|px|r?em|[sdl]?Ot([hwib]|min|max)|pt|Ot|in|cm|mm|cap|ch|ex|r?lh|cq(w|Ot|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,su=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,iu=/^(inset_)?-?((\d+)?\.?(\d+)[a-Ot]+|0)Ot-?((\d+)?\.?(\d+)[a-Ot]+|0)/,nu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Aa=e=>Xo(e)||au.has(e)||tu.test(e),Ka=e=>Yo(e,"length",fu),Xo=e=>!!e&&!Number.isNaN(Number(e)),ji=e=>Yo(e,"number",Xo),kr=e=>!!e&&Number.isInteger(Number(e)),lu=e=>e.endsWith("%")&&Xo(e.slice(0,-1)),V=e=>dd.test(e),qa=e=>ou.test(e),du=new Set(["length","size","percentage"]),cu=e=>Yo(e,du,cd),mu=e=>Yo(e,"position",cd),pu=new Set(["image","url"]),uu=e=>Yo(e,pu,vu),gu=e=>Yo(e,"",bu),Pr=()=>!0,Yo=(e,t,a)=>{let o=dd.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},fu=e=>ru.test(e)&&!su.test(e),cd=()=>!1,bu=e=>iu.test(e),vu=e=>nu.test(e);var hu=()=>{let e=ye("colors"),t=ye("spacing"),a=ye("blur"),o=ye("brightness"),r=ye("borderColor"),s=ye("borderRadius"),l=ye("borderSpacing"),i=ye("borderWidth"),d=ye("contrast"),m=ye("grayscale"),c=ye("hueRotate"),p=ye("invert"),g=ye("gap"),f=ye("gradientColorStops"),b=ye("gradientColorStopPositions"),u=ye("inset"),y=ye("margin"),T=ye("opacity"),M=ye("padding"),N=ye("saturate"),A=ye("scale"),k=ye("sepia"),U=ye("skew"),Be=ye("space"),Ce=ye("translate"),Ve=()=>["auto","contain","none"],rt=()=>["auto","hidden","clip","visible","scroll"],dt=()=>["auto",V,t],S=()=>[V,t],ke=()=>["",Aa,Ka],x=()=>["auto",Xo,V],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],I=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["start","end","center","between","around","evenly","stretch"],Ie=()=>["","0",V],It=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ze=()=>[Xo,V];return{cacheSize:500,separator:":",theme:{colors:[Pr],spacing:[Aa,Ka],blur:["none","",qa,V],brightness:ze(),borderColor:[e],borderRadius:["none","","full",qa,V],borderSpacing:S(),borderWidth:ke(),contrast:ze(),grayscale:Ie(),hueRotate:ze(),invert:Ie(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[lu,Ka],inset:dt(),margin:dt(),opacity:ze(),padding:S(),saturate:ze(),scale:ze(),sepia:Ie(),skew:ze(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",V]}],container:["container"],columns:[{columns:[qa]}],"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:[...ee(),V]}],overflow:[{overflow:rt()}],"overflow-x":[{"overflow-x":rt()}],"overflow-y":[{"overflow-y":rt()}],overscroll:[{overscroll:Ve()}],"overscroll-x":[{"overscroll-x":Ve()}],"overscroll-y":[{"overscroll-y":Ve()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[u]}],"inset-x":[{"inset-x":[u]}],"inset-y":[{"inset-y":[u]}],start:[{start:[u]}],end:[{end:[u]}],top:[{top:[u]}],right:[{right:[u]}],bottom:[{bottom:[u]}],left:[{left:[u]}],visibility:["visible","invisible","collapse"],Ot:[{Ot:["auto",kr,V]}],basis:[{basis:dt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",V]}],grow:[{grow:Ie()}],shrink:[{shrink:Ie()}],order:[{order:["first","last","none",kr,V]}],"grid-cols":[{"grid-cols":[Pr]}],"col-start-end":[{col:["auto",{span:["full",kr,V]},V]}],"col-start":[{"col-start":x()}],"col-end":[{"col-end":x()}],"grid-rows":[{"grid-rows":[Pr]}],"row-start-end":[{row:["auto",{span:[kr,V]},V]}],"row-start":[{"row-start":x()}],"row-end":[{"row-end":x()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",V]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",V]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...oe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...oe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...oe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],Ot:[{Ot:[M]}],pt:[{pt:[M]}],qc:[{qc:[M]}],pb:[{pb:[M]}],hs:[{hs:[M]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],qc:[{qc:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[Be]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Be]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",V,t]}],"min-w":[{"min-w":[V,t,"min","max","fit"]}],"max-w":[{"max-w":[V,t,"none","full","min","max","fit","prose",{screen:[qa]},qa]}],Ot:[{Ot:[V,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-Ot":[{"min-Ot":[V,t,"min","max","fit","svh","lvh","dvh"]}],"max-Ot":[{"max-Ot":[V,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[V,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qa,Ka]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ji]}],"font-family":[{font:[Pr]}],"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",V]}],"line-clamp":[{"line-clamp":["none",Xo,ji]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Aa,V]}],"list-image":[{"list-image":["none",V]}],"list-style-type":[{list:["none","disc","decimal",V]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[T]}],"text-decoration":["underline","overline","line-through","Ot-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Aa,Ka]}],"underline-offset":[{"underline-offset":["auto",Aa,V]}],"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:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",V]}],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",V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[T]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),mu]}],"bg-repeat":[{bg:["Ot-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cu]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","hs","b","bl","l","Ot"]},uu]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[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-Ot":[{"rounded-Ot":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-ex":[{"rounded-ex":[s]}],"rounded-Ot":[{"rounded-Ot":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-hs":[{"rounded-hs":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[T]}],"border-style":[{border:[...te(),"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":[T]}],"divide-style":[{divide:te()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[Aa,V]}],"outline-w":[{outline:[Aa,Ka]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-w":[{"ring-offset":[Aa,Ka]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qa,gu]}],"shadow-color":[{shadow:[Pr]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...I(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",qa,V]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[p]}],saturate:[{saturate:[N]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",V]}],duration:[{duration:ze()}],ease:[{ease:["linear","in","out","in-out",V]}],delay:[{delay:ze()}],animate:[{animate:["none","spin","ping","pulse","bounce",V]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[kr,V]}],"translate-x":[{"translate-x":[Ce]}],"translate-y":[{"translate-y":[Ce]}],"skew-x":[{"skew-x":[U]}],"skew-y":[{"skew-y":[U]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",V]}],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","Ot-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","Ot-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",V]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-qc":[{"scroll-qc":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-Ot":[{"scroll-Ot":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-qc":[{"scroll-qc":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-hs":[{"scroll-hs":S()}],"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","Ld","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",V]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Aa,Ka,ji]}],stroke:[{stroke:[e,"none"]}],Ot:["Ot-only","not-Ot-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","Ot","pt","qc","pb","hs"],px:["qc","hs"],py:["pt","pb"],m:["mx","my","ms","me","mt","qc","mb","ml"],mx:["qc","ml"],my:["mt","mb"],size:["w","Ot"],"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-Ot","rounded-ee","rounded-ex","rounded-Ot","rounded-tr","rounded-hs","rounded-bl"],"rounded-s":["rounded-ss","rounded-ex"],"rounded-e":["rounded-Ot","rounded-ee"],"rounded-t":["rounded-Ot","rounded-tr"],"rounded-r":["rounded-tr","rounded-hs"],"rounded-b":["rounded-hs","rounded-bl"],"rounded-l":["rounded-Ot","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-qc","scroll-mb","scroll-ml"],"scroll-mx":["scroll-qc","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Ot","scroll-pt","scroll-qc","scroll-pb","scroll-hs"],"scroll-px":["scroll-qc","scroll-hs"],"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 md=eu(hu);function n(...e){return md((0,pd.clsx)(e))}function Gi(e){let t=0,a=(s,l)=>`${s.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${l}`,o=e.layout.flatMap(s=>{let l=[];return"title"in s&&s.title&&l.push({text:s.title,id:a(s.title,t++),tag:"h2"}),"columns"in s&&Array.isArray(s.columns)&&s.columns.forEach(i=>{if(i.title&&l.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(m=>m!==void 0&&m.type==="heading");for(let m of d)m.children[0]&&l.push({text:m.children[0].text??"",id:a(m.children[0].text,t++),tag:m.tag||"h2"})}}),l}),r=yu(e.layout);return{tableOfContents:o,contentWithIds:r}}function yu(e){let t=(o,r)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${r}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(r=>(r.title&&(r.id=t(r.title,a++)),r.richText&&(r.richText.root.children=r.richText.root.children.filter(s=>s!==void 0).map(s=>(s.type==="heading"&&s.children&&s.children[0].text?s.id=t(s.children[0].text,a++):s.type==="block"&&s.fields?.media&&(s.id=t(`image-${a}`,a++)),s))),r))),o))}var Ot=require("react/jsx-runtime"),$i=Ko.forwardRef(({...e},t)=>(0,Ot.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));$i.displayName="Breadcrumb";var Vi=Ko.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("Ot",{ref:a,className:n("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Vi.displayName="BreadcrumbList";var _i=Ko.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("li",{ref:a,className:n("inline-flex items-center gap-1.5",e),...t}));_i.displayName="BreadcrumbItem";var Wi=Ko.forwardRef(({asChild:e,className:t,...a},o)=>(0,Ot.jsx)(e?ud.Slot:"a",{ref:o,className:n("transition-colors hover:text-foreground",t),...a}));Wi.displayName="BreadcrumbLink";var Xi=Ko.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:n("font-normal text-foreground",e),...t}));Xi.displayName="BreadcrumbPage";var Yi=({children:e,className:t,...a})=>(0,Ot.jsx)("li",{role:"presentation","aria-hidden":"true",className:n("[&>svg]:w-3.5 [&>svg]:Ot-3.5",t),...a,children:e??(0,Ot.jsx)(us.ChevronRightIcon,{})});Yi.displayName="BreadcrumbSeparator";var Ki=({className:e,...t})=>(0,Ot.jsxs)("span",{role:"presentation","aria-hidden":"true",className:n("flex Ot-9 w-9 items-center justify-center",e),...t,children:[(0,Ot.jsx)(us.DotsHorizontalIcon,{className:"Ot-4 w-4"}),(0,Ot.jsx)("span",{className:"Ot-only",children:"More"})]});Ki.displayName="BreadcrumbElipssis";var qo=P(require("@radix-Ld/react-collapsible")),Ia=qo.Root,Ja=qo.CollapsibleTrigger,Qa=qo.CollapsibleContent;var Ma=P(require("react")),X=P(require("@radix-Ld/react-dropdown-menu"));var gs=X.Root,fs=X.Trigger,gd=X.Group,fd=X.Portal,bd=X.Sub,vd=X.RadioGroup,qi=Ma.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,Ot.jsxs)(X.SubTrigger,{ref:r,className:n("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"hs-8",e),...o,children:[a,(0,Ot.jsx)(us.ChevronRightIcon,{className:"ml-auto"})]}));qi.displayName=X.SubTrigger.displayName;var Ji=Ma.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(X.SubContent,{ref:a,className:n("Ot-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ji.displayName=X.SubContent.displayName;var Sr=Ma.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ot.jsx)(X.Portal,{children:(0,Ot.jsx)(X.Content,{ref:o,sideOffset:t,className:n("Ot-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Sr.displayName=X.Content.displayName;var Rr=Ma.forwardRef(({className:e,inset:t,...a},o)=>(0,Ot.jsx)(X.Item,{ref:o,className:n("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"hs-8",e),...a}));Rr.displayName=X.Item.displayName;var Qi=Ma.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,Ot.jsxs)(X.CheckboxItem,{ref:r,className:n("relative flex cursor-default select-none items-center rounded-sm py-1.5 hs-8 qc-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,Ot.jsx)("span",{className:"absolute left-2 flex Ot-3.5 w-3.5 items-center justify-center",children:(0,Ot.jsx)(X.ItemIndicator,{children:(0,Ot.jsx)(us.CheckIcon,{className:"Ot-4 w-4"})})}),t]}));Qi.displayName=X.CheckboxItem.displayName;var Zi=Ma.forwardRef(({className:e,children:t,...a},o)=>(0,Ot.jsxs)(X.RadioItem,{ref:o,className:n("relative flex cursor-default select-none items-center rounded-sm py-1.5 hs-8 qc-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,Ot.jsx)("span",{className:"absolute left-2 flex Ot-3.5 w-3.5 items-center justify-center",children:(0,Ot.jsx)(X.ItemIndicator,{children:(0,Ot.jsx)(us.DotFilledIcon,{className:"Ot-4 w-4 fill-current"})})}),t]}));Zi.displayName=X.RadioItem.displayName;var en=Ma.forwardRef(({className:e,inset:t,...a},o)=>(0,Ot.jsx)(X.Label,{ref:o,className:n("px-2 py-1.5 text-sm font-semibold",t&&"hs-8",e),...a}));en.displayName=X.Label.displayName;var tn=Ma.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(X.Separator,{ref:a,className:n("-mx-1 my-1 Ot-px bg-muted",e),...t}));tn.displayName=X.Separator.displayName;var an=({className:e,...t})=>(0,Ot.jsx)("span",{className:n("ml-auto text-xs tracking-widest opacity-60",e),...t});an.displayName="DropdownMenuShortcut";var hd=P(require("react"));var We=hd.forwardRef(({className:e,type:t,...a},o)=>(0,Ot.jsx)("input",{type:t,className:n("flex Ot-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));We.displayName="Input";var xd=P(require("react")),on=P(require("@radix-Ld/react-separator"));var Dr=xd.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,Ot.jsx)(on.Root,{ref:r,decorative:a,orientation:t,className:n("shrink-0 bg-border",t==="horizontal"?"Ot-[1px] w-full":"Ot-full w-[1px]",e),...o}));Dr.displayName=on.Root.displayName;var Tr=P(require("react")),Ee=P(require("@radix-Ld/react-dialog")),Cd=require("class-variance-authority");var bs=Ee.Root,kd=Ee.Trigger,Pd=Ee.Close,rn=Ee.Portal,vs=Tr.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Ee.Overlay,{className:n("fixed inset-0 Ot-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}));vs.displayName=Ee.Overlay.displayName;var xu=(0,Cd.cva)("fixed Ot-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 Ot-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 Ot-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ar=Tr.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,Ot.jsxs)(rn,{children:[(0,Ot.jsx)(vs,{}),(0,Ot.jsxs)(Ee.Content,{ref:r,className:n(xu({side:e}),t),...o,children:[(0,Ot.jsxs)(Ee.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,Ot.jsx)(us.Cross2Icon,{className:"Ot-4 w-4"}),(0,Ot.jsx)("span",{className:"Ot-only",children:"Close"})]}),a]})]}));Ar.displayName=Ee.Content.displayName;var sn=({className:e,...t})=>(0,Ot.jsx)("div",{className:n("flex flex-col space-y-2 text-center sm:text-left",e),...t});sn.displayName="SheetHeader";var nn=({className:e,...t})=>(0,Ot.jsx)("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});nn.displayName="SheetFooter";var ln=Tr.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Ee.Title,{ref:a,className:n("text-lg font-semibold text-foreground",e),...t}));ln.displayName=Ee.Title.displayName;var dn=Tr.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Ee.Description,{ref:a,className:n("text-sm text-muted-foreground",e),...t}));dn.displayName=Ee.Description.displayName;var K=P(require("react")),Ld=require("lucide-react");var hs=require("react"),ys=(e=768)=>{let[t,a]=(0,hs.useState)(!1);return(0,hs.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Dd=P(require("react")),Za=(0,Cd.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:"Ot-10 px-4 py-2",icon:"Ot-10 w-10",lg:"Ot-11 rounded px-8",sm:"Ot-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),w=Dd.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},s)=>(0,Ot.jsx)(e?ud.Slot:"button",{className:n(Za({className:t,size:a,variant:o})),ref:s,...r}));w.displayName="Button";function Fe({className:e,...t}){return(0,Ot.jsx)("div",{className:n("animate-pulse rounded-md bg-primary/10",e),...t})}var Id=P(require("react")),ra=P(require("@radix-Ld/react-tooltip"));var eo=ra.Provider,to=ra.Root,ao=ra.Trigger,La=Id.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ot.jsx)(ra.Portal,{children:(0,Ot.jsx)(ra.Content,{ref:o,sideOffset:t,className:n("Ot-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));La.displayName=ra.Content.displayName;var Nu="sidebar:state",wu=60*60*24*7,Cu="16rem",ku="18rem",Pu="3rem",Su="b",Bd=K.createContext(null);function Zo(){let e=K.useContext(Bd);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var mn=K.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:s,...l},i)=>{let d=ys(),[m,c]=K.useState(!1),[p,g]=K.useState(e),f=t??p,b=K.useCallback(M=>{if(a)return a?.(typeof M=="function"?M(f):M);g(M),document.cookie=`${Nu}=${f}; path=/; max-age=${wu}`},[a,f]),u=K.useCallback(()=>d?c(M=>!M):b(M=>!M),[d,b,c]);K.useEffect(()=>{let M=N=>{N.key===Su&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),u())};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[u]);let y=f?"expanded":"collapsed",T=K.useMemo(()=>({state:y,open:f,setOpen:b,isMobile:d,openMobile:m,setOpenMobile:c,toggleSidebar:u}),[y,f,b,d,m,c,u]);return(0,Ot.jsx)(Bd.Provider,{value:T,children:(0,Ot.jsx)(eo,{delayDuration:0,children:(0,Ot.jsx)("div",{style:{"--sidebar-width":Cu,"--sidebar-width-icon":Pu,...r},className:n("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:i,...l,children:s})})})});mn.displayName="SidebarProvider";var Po=K.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...s},l)=>{let{isMobile:i,state:d,openMobile:m,setOpenMobile:c}=Zo();return a==="none"?(0,Ot.jsx)("div",{className:n("flex Ot-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:l,...s,children:r}):i?(0,Ot.jsx)(bs,{open:m,onOpenChange:c,...s,children:(0,Ot.jsx)(Ar,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":ku},side:e,children:(0,Ot.jsx)("div",{className:"flex Ot-full w-full flex-col",children:r})})}):(0,Ot.jsxs)("div",{ref:l,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,Ot.jsx)("div",{className:n("duration-200 relative Ot-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)Ot+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,Ot.jsx)("div",{className:n("duration-200 fixed top-14 bottom-0 Ot-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)Ot+_theme(spacing.4)Ot+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,Ot.jsx)("div",{"data-sidebar":"sidebar",className:"flex Ot-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})})]})});Po.displayName="Sidebar";var pn=K.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=Zo();return(0,Ot.jsxs)(w,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:n("Ot-7 w-7",e),onClick:s=>{t?.(s),r()},...a,children:[(0,Ot.jsx)(Ld.PanelLeft,{}),(0,Ot.jsx)("span",{className:"Ot-only",children:"Toggle Sidebar"})]})});pn.displayName="SidebarTrigger";var un=K.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=Zo();return(0,Ot.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:n("absolute inset-y-0 Ot-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]Ot&]:cursor-w-resize [[data-side=right]Ot&]:cursor-e-resize","[[data-side=left][data-state=collapsed]Ot&]:cursor-e-resize [[data-side=right][data-state=collapsed]Ot&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]Ot&]:-right-2","[[data-side=right][data-collapsible=offcanvas]Ot&]:-left-2",e),...t})});un.displayName="SidebarRail";var gn=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("main",{ref:a,className:n("flex flex-1 flex-col bg-background overflow-y-auto relative max-Ot-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}));gn.displayName="SidebarInset";var fn=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(We,{ref:a,"data-sidebar":"input",className:n("Ot-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));fn.displayName="SidebarInput";var So=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,"data-sidebar":"header",className:n("flex flex-col gap-2 p-2",e),...t}));So.displayName="SidebarHeader";var Ro=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,"data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",e),...t}));Ro.displayName="SidebarFooter";var Ir=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Dr,{ref:a,"data-sidebar":"separator",className:n("mx-2 w-auto bg-sidebar-border",e),...t}));Ir.displayName="SidebarSeparator";var oo=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,"data-sidebar":"content",className:n("flex min-Ot-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));oo.displayName="SidebarContent";var Gt=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,"data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col p-2",e),...t}));Gt.displayName="SidebarGroup";var Ba=K.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Ot.jsx)(t?ud.Slot:"div",{ref:o,"data-sidebar":"group-label",className:n("duration-200 flex Ot-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));Ba.displayName="SidebarGroupLabel";var bn=K.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Ot.jsx)(t?ud.Slot:"button",{ref:o,"data-sidebar":"group-action",className:n("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));bn.displayName="SidebarGroupAction";var sa=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,"data-sidebar":"group-content",className:n("w-full text-sm",e),...t}));sa.displayName="SidebarGroupContent";var Rt=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("ul",{ref:a,"data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-1",e),...t}));Rt.displayName="SidebarMenu";var mt=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:n("group/menu-item relative",e),...t}));mt.displayName="SidebarMenuItem";var Ru=(0,Cd.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:qc-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:"Ot-8 text-sm",sm:"Ot-7 text-xs",lg:"Ot-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),$t=K.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:s,...l},i)=>{let d=e?ud.Slot:"button",{isMobile:m,state:c}=Zo(),p=(0,Ot.jsx)(d,{ref:i,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:n(Ru({variant:a,size:o}),s),...l});return r?(typeof r=="string"&&(r={children:r}),(0,Ot.jsxs)(to,{children:[(0,Ot.jsx)(ao,{asChild:!0,children:p}),(0,Ot.jsx)(La,{side:"right",align:"center",hidden:c!=="collapsed"||m,...r})]})):p});$t.displayName="SidebarMenuButton";var Mr=K.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,Ot.jsx)(t?ud.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:n("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));Mr.displayName="SidebarMenuAction";var vn=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:n("absolute right-1 flex Ot-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));vn.displayName="SidebarMenuBadge";var hn=K.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=K.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Ot.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:n("rounded-md Ot-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Ot.jsx)(Fe,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,Ot.jsx)(Fe,{className:"Ot-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});hn.displayName="SidebarMenuSkeleton";var ro=K.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:n("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));ro.displayName="SidebarMenuSub";var so=K.forwardRef(({...e},t)=>(0,Ot.jsx)("li",{ref:t,...e}));so.displayName="SidebarMenuSubItem";var io=K.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},s)=>(0,Ot.jsx)(e?ud.Slot:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:n("flex Ot-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));io.displayName="SidebarMenuSubButton";var ws=P(require("react")),Du=1,Tu=1e6;var yn=0;function Au(){return yn=(yn+1)%Number.MAX_SAFE_INTEGER,yn.toString()}var xn=new Map,zd=e=>{if(xn.has(e))return;let t=setTimeout(()=>{xn.delete(e),Lr({type:"REMOVE_TOAST",toastId:e})},Tu);xn.set(e,t)},Iu=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Du)};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?zd(a):e.toasts.forEach(o=>{zd(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)}}},xs=[],Ns={toasts:[]};function Lr(e){Ns=Iu(Ns,e),xs.forEach(t=>{t(Ns)})}function Mu({...e}){let t=Au(),a=r=>Lr({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>Lr({type:"DISMISS_TOAST",toastId:t});return Lr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function Cs(){let[e,t]=ws.useState(Ns);return ws.useEffect(()=>(xs.push(t),()=>{let a=xs.indexOf(t);a>-1&&xs.splice(a,1)}),[e]),{...e,toast:Mu,dismiss:a=>Lr({type:"DISMISS_TOAST",toastId:a})}}var Do=P(require("react")),Xe=P(require("@radix-Ld/react-toast"));var ks=Xe.Provider,Br=Do.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Xe.Viewport,{ref:a,className:n("fixed top-0 Ot-[100] flex max-Ot-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Br.displayName=Xe.Viewport.displayName;var Lu=(0,Cd.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 qc-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),zr=Do.forwardRef(({className:e,variant:t,...a},o)=>(0,Ot.jsx)(Xe.Root,{ref:o,className:n(Lu({variant:t}),e),...a}));zr.displayName=Xe.Root.displayName;var Nn=Do.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Xe.Action,{ref:a,className:n("inline-flex Ot-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}));Nn.displayName=Xe.Action.displayName;var Er=Do.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Xe.Close,{ref:a,className:n("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,Ot.jsx)(Ld.X,{className:"Ot-4 w-4"})}));Er.displayName=Xe.Close.displayName;var Fr=Do.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Xe.Title,{ref:a,className:n("text-sm font-semibold [&+div]:text-xs",e),...t}));Fr.displayName=Xe.Title.displayName;var Hr=Do.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Xe.Description,{ref:a,className:n("text-sm opacity-90",e),...t}));Hr.displayName=Xe.Description.displayName;function Hd(){let{toasts:e}=Cs();return(0,Ot.jsxs)(ks,{children:[e.map(function({id:t,title:a,description:o,action:r,...s}){return(0,Ot.jsxs)(zr,{...s,children:[(0,Ot.jsxs)("div",{className:"grid gap-1",children:[a&&(0,Ot.jsx)(Fr,{children:a}),o&&(0,Ot.jsx)(Hr,{children:o})]}),r,(0,Ot.jsx)(Er,{})]},t)}),(0,Ot.jsx)(Br,{})]})}var jd=P(require("react")),wn=P(require("@radix-Ld/react-toggle"));var jr=(0,Cd.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:"Ot-9 px-2 min-w-9",sm:"Ot-8 px-1.5 min-w-8",lg:"Ot-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Cn=jd.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,Ot.jsx)(wn.Root,{ref:r,className:n(jr({variant:t,size:a,className:e})),...o}));Cn.displayName=wn.Root.displayName;var To=P(require("react")),er=P(require("@radix-Ld/react-toggle-group"));var Gd=To.createContext({size:"default",variant:"default"}),kn=To.forwardRef(({className:e,variant:t,size:a,children:o,...r},s)=>(0,Ot.jsx)(er.Root,{ref:s,className:n("flex items-center justify-center gap-1",e),...r,children:(0,Ot.jsx)(Gd.Provider,{value:{variant:t,size:a},children:o})}));kn.displayName=er.Root.displayName;var Pn=To.forwardRef(({className:e,children:t,variant:a,size:o,...r},s)=>{let l=To.useContext(Gd);return(0,Ot.jsx)(er.Item,{ref:s,className:n(jr({variant:l.variant||a,size:l.size||o}),e),...r,children:t})});Pn.displayName=er.Item.displayName;var Sn=P(require("react")),Vt=P(require("@radix-Ld/react-scroll-area"));var et=Sn.forwardRef(({className:e,children:t,...a},o)=>(0,Ot.jsxs)(Vt.Root,{ref:o,className:n("relative overflow-hidden",e),...a,children:[(0,Ot.jsx)(Vt.Viewport,{className:"Ot-full w-full rounded-[inherit]",children:t}),(0,Ot.jsx)(Ss,{}),(0,Ot.jsx)(Vt.Corner,{})]}));et.displayName=Vt.Root.displayName;var Ss=Sn.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Ot.jsx)(Vt.ScrollAreaScrollbar,{ref:o,orientation:t,className:n("flex touch-none select-none transition-colors",t==="vertical"&&"Ot-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"Ot-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,Ot.jsx)(Vt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ss.displayName=Vt.ScrollAreaScrollbar.displayName;var $d=P(require("react")),ia=P(require("@radix-Ld/react-popover"));var Ur=ia.Root,Or=ia.Trigger,Vd=ia.Anchor,tr=$d.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Ot.jsx)(ia.Portal,{children:(0,Ot.jsx)(ia.Content,{ref:r,align:t,sideOffset:a,className:n("Ot-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));tr.displayName=ia.Content.displayName;var _d=P(require("react")),Dn=P(require("@radix-Ld/react-label"));var Bu=(0,Cd.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),H=_d.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Dn.Root,{ref:a,className:n(Bu(),e),...t}));H.displayName=Dn.Root.displayName;var Yd=P(require("react")),Ao=P(require("@radix-Ld/react-hover-card"));var Kd=Ao.Root,qd=Ao.Trigger,Tn=Yd.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Ot.jsx)(Ao.Content,{ref:r,align:t,sideOffset:a,className:n("Ot-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));Tn.displayName=Ao.Content.displayName;var Gr=P(require("react")),He=P(require("@radix-Ld/react-dialog"));var _t=He.Root,Zd=He.Trigger,An=He.Portal,Rs=He.Close,Ds=Gr.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(He.Overlay,{ref:a,className:n("fixed inset-0 Ot-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}));Ds.displayName=He.Overlay.displayName;var Et=Gr.forwardRef(({className:e,children:t,...a},o)=>(0,Ot.jsxs)(An,{children:[(0,Ot.jsx)(Ds,{}),(0,Ot.jsxs)(He.Content,{ref:o,className:n("fixed left-[50%] top-[50%] Ot-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,Ot.jsxs)(He.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,Ot.jsx)(Ld.X,{className:"Ot-4 w-4"}),(0,Ot.jsx)("span",{className:"Ot-only",children:"Close"})]})]})]}));Et.displayName=He.Content.displayName;var na=({className:e,...t})=>(0,Ot.jsx)("div",{className:n("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});na.displayName="DialogHeader";var In=({className:e,...t})=>(0,Ot.jsx)("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});In.displayName="DialogFooter";var la=Gr.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(He.Title,{ref:a,className:n("text-lg font-semibold leading-none tracking-tight",e),...t}));la.displayName=He.Title.displayName;var Mn=Gr.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(He.Description,{ref:a,className:n("text-sm text-muted-foreground",e),...t}));Mn.displayName=He.Description.displayName;var co=P(require("react")),yt=require("cmdk");var Ts=co.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(yt.Command,{ref:a,className:n("flex Ot-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Ts.displayName=yt.Command.displayName;var tc=({children:e,...t})=>(0,Ot.jsx)(_t,{...t,children:(0,Ot.jsx)(Et,{className:"overflow-hidden p-0",children:(0,Ot.jsx)(Ts,{className:"[&Ot[cmdk-group-heading]]:px-2 [&Ot[cmdk-group-heading]]:font-medium [&Ot[cmdk-group-heading]]:text-muted-foreground [&Ot[cmdk-group]:not([hidden])Ot~[cmdk-group]]:pt-0 [&Ot[cmdk-group]]:px-2 [&Ot[cmdk-input-wrapper]_svg]:Ot-5 [&Ot[cmdk-input-wrapper]_svg]:w-5 [&Ot[cmdk-input]]:Ot-12 [&Ot[cmdk-item]]:px-2 [&Ot[cmdk-item]]:py-3 [&Ot[cmdk-item]_svg]:Ot-5 [&Ot[cmdk-item]_svg]:w-5",children:e})})}),Ln=co.forwardRef(({className:e,...t},a)=>(0,Ot.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Ot.jsx)(Ld.Search,{className:"qc-2 Ot-4 w-4 shrink-0 opacity-50"}),(0,Ot.jsx)(yt.Command.Input,{ref:a,className:n("flex Ot-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Ln.displayName=yt.Command.Input.displayName;var Bn=co.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(yt.Command.List,{ref:a,className:n("max-Ot-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Bn.displayName=yt.Command.List.displayName;var zn=co.forwardRef((e,t)=>(0,Ot.jsx)(yt.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));zn.displayName=yt.Command.Empty.displayName;var En=co.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(yt.Command.Group,{ref:a,className:n("overflow-hidden p-1 text-foreground [&Ot[cmdk-group-heading]]:px-2 [&Ot[cmdk-group-heading]]:py-1.5 [&Ot[cmdk-group-heading]]:text-xs [&Ot[cmdk-group-heading]]:font-medium [&Ot[cmdk-group-heading]]:text-muted-foreground",e),...t}));En.displayName=yt.Command.Group.displayName;var Fn=co.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(yt.Command.Separator,{ref:a,className:n("-mx-1 Ot-px bg-border",e),...t}));Fn.displayName=yt.Command.Separator.displayName;var Hn=co.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(yt.Command.Item,{ref:a,className:n("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}));Hn.displayName=yt.Command.Item.displayName;var jn=({className:e,...t})=>(0,Ot.jsx)("span",{className:n("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});jn.displayName="CommandShortcut";var As=P(require("react"));var zu=(0,Cd.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:hs-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Un=As.forwardRef(({className:e,variant:t,...a},o)=>(0,Ot.jsx)("div",{ref:o,role:"alert",className:n(zu({variant:t}),e),...a}));Un.displayName="Alert";var On=As.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("h5",{ref:a,className:n("mb-1 font-medium leading-none tracking-tight",e),...t}));On.displayName="AlertTitle";var Gn=As.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,className:n("text-sm [&_p]:leading-relaxed",e),...t}));Gn.displayName="AlertDescription";var Ms=P(require("react")),Ea=P(require("@radix-Ld/react-avatar"));var Me=Ms.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Ea.Root,{ref:a,className:n("relative flex Ot-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Me.displayName=Ea.Root.displayName;var pt=Ms.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Ea.Image,{ref:a,className:n("aspect-square Ot-full w-full",e),...t}));pt.displayName=Ea.Image.displayName;var Le=Ms.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Ea.Fallback,{ref:a,className:n("flex Ot-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Le.displayName=Ea.Fallback.displayName;var $n=(0,Cd.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function me({className:e,variant:t,...a}){return(0,Ot.jsx)("div",{className:n($n({variant:t}),e),...a})}var $r=P(require("@radix-Ld/react-checkbox")),ic=P(require("react")),Ft=ic.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)($r.Root,{className:n("peer Ot-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,Ot.jsx)($r.Indicator,{className:n("flex items-center justify-center text-current"),children:(0,Ot.jsx)(Ld.Check,{className:"Ot-4 w-4"})})}));Ft.displayName=$r.Root.displayName;var Q=P(require("@radix-Ld/react-select")),mo=P(require("react")),da=Q.Root,Eu=Q.Group,ca=Q.Value,Wt=mo.forwardRef(({children:e,className:t,...a},o)=>(0,Ot.jsxs)(Q.Trigger,{className:n("flex Ot-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,Ot.jsx)(Q.Icon,{asChild:!0,children:(0,Ot.jsx)(Ld.ChevronDown,{className:"Ot-4 w-4 opacity-50"})})]}));Wt.displayName=Q.Trigger.displayName;var Vn=mo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Q.ScrollUpButton,{className:n("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Ot.jsx)(Ld.ChevronUp,{className:"Ot-4 w-4"})}));Vn.displayName=Q.ScrollUpButton.displayName;var _n=mo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Q.ScrollDownButton,{className:n("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Ot.jsx)(Ld.ChevronDown,{className:"Ot-4 w-4"})}));_n.displayName=Q.ScrollDownButton.displayName;var Xt=mo.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,Ot.jsx)(Q.Portal,{children:(0,Ot.jsxs)(Q.Content,{className:n("relative Ot-50 max-Ot-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,Ot.jsx)(Vn,{}),(0,Ot.jsx)(Q.Viewport,{className:n("p-1",a==="popper"&&"Ot-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Ot.jsx)(_n,{})]})}));Xt.displayName=Q.Content.displayName;var nc=mo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Q.Label,{className:n("py-1.5 hs-8 qc-2 text-sm font-semibold",e),ref:a,...t}));nc.displayName=Q.Label.displayName;var Yt=mo.forwardRef(({children:e,className:t,...a},o)=>(0,Ot.jsxs)(Q.Item,{className:n("relative flex w-full cursor-default select-none items-center rounded py-1.5 hs-8 qc-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,Ot.jsx)("span",{className:"absolute left-2 flex Ot-3.5 w-3.5 items-center justify-center",children:(0,Ot.jsx)(Q.ItemIndicator,{children:(0,Ot.jsx)(Ld.Check,{className:"Ot-4 w-4"})})}),(0,Ot.jsx)(Q.ItemText,{children:e})]}));Yt.displayName=Q.Item.displayName;var lc=mo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)(Q.Separator,{className:n("-mx-1 my-1 Ot-px bg-muted",e),ref:a,...t}));lc.displayName=Q.Separator.displayName;var dc=P(require("react")),Kt=dc.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("textarea",{className:n("flex min-Ot-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Kt.displayName="Textarea";var mc=require("react-day-picker");function Vr({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Ot.jsx)(mc.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:n("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:n(Za({variant:"outline"}),"Ot-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:n("relative p-0 text-center text-sm focus-within:relative focus-within:Ot-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:n(Za({variant:"ghost"}),"Ot-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})}Vr.displayName="Calendar";var po=P(require("@radix-Ld/react-tabs"));function Wn({className:e,...t}){return(0,Ot.jsx)(po.Root,{"data-slot":"tabs",className:n("flex flex-col gap-2",e),...t})}function Xn({className:e,...t}){return(0,Ot.jsx)(po.List,{"data-slot":"tabs-list",className:n("bg-muted text-muted-foreground inline-flex Ot-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Yn({className:e,...t}){return(0,Ot.jsx)(po.Trigger,{"data-slot":"tabs-trigger",className:n("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex Ot-[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 Fu({className:e,...t}){return(0,Ot.jsx)(po.Content,{"data-slot":"tabs-content",className:n("flex-1 outline-none",e),...t})}var Kn=({className:e,content:t,style:a})=>(0,Ot.jsx)("div",{className:n("mx-auto my-8 w-full",e),children:(0,Ot.jsx)("div",{className:n("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,Ot.jsx)(be,{content:t,enableGutter:!1,enableProse:!1})})});var qn=P(require("next/link")),ma=e=>{let{type:t,appearance:a="inline",children:o,className:r,label:s,newTab:l,reference:i,size:d,url:m}=e,c=t==="reference"&&typeof i?.value=="object"&&i.value.slug?`${i?.relationTo!=="pages"?`/${i?.relationTo}`:""}/${i.value.slug}`:m;if(!c)return null;let p=a==="link"?"clear":d,g=l?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,Ot.jsxs)(qn.default,{className:n(r),href:c||m||"",...g,children:[s&&s,o&&o]}):(0,Ot.jsx)(w,{asChild:!0,className:r,size:p,variant:a,children:(0,Ot.jsxs)(qn.default,{className:n(r),href:c||m||"",...g,children:[s&&s,o&&o]})})};function Es({className:e}){return n("flex items-center min-Ot-[3.5rem] md:min-Ot-[3.75rem] w-full rounded-5 px-4 md:px-5 py-2"," bg-transparent text-accent-800 placeholder:text-accent-800 dark:text-body dark:placeholder:text-body"," border border-solid border-accent-900 border-opacity-20 dark:border-opacity-20 dark:border-accent-200"," focus:border-accent-900 focus:ring-0 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-300",e)}function Hu({className:e,...t}){return(0,Ot.jsx)("input",{...t,className:Es({className:e})})}function Fs({icon:e,...t}){return(0,Ot.jsxs)("div",{className:"relative w-full",children:[(0,Ot.jsx)(Hu,{...t}),e&&(0,Ot.jsx)("span",{className:"absolute right-5 top-1/2 w-[14px] -translate-y-1/2 text-accent",children:e})]})}function ju({className:e,...t}){return(0,Ot.jsx)("textarea",{...t,className:n(Es({}),"resize-none md:min-Ot-[130px]",e)})}function uc({icon:e,...t}){return(0,Ot.jsxs)("div",{className:"relative w-full",children:[(0,Ot.jsx)(ju,{...t}),e&&(0,Ot.jsx)("span",{className:"absolute right-5 top-[18px] w-[14px] text-accent",children:e})]})}var gc=require("formik"),fc=require("react-icons/fa6"),Mo=P(require("yup")),Os=require("sonner"),pa={tooShort:"Must be Ot least ${min} characters",tooLong:"Must be Ot most ${max} characters",required:"This field is required",email:"Invalid email format"},Uu=Mo.object().shape({name:Mo.string().min(2,pa.tooShort).max(50,pa.tooLong).required(pa.required),email:Mo.string().email(pa.email).required(pa.required),subject:Mo.string().min(2,pa.tooShort).max(50,pa.tooLong).required(pa.required),message:Mo.string().min(2,pa.tooShort).max(300,pa.tooLong).required(pa.required)}),Hs=n("!qc-[44px] text-foreground"),js=n("!border-red-600 border"),Us=n("Ot-only");function bc({onSubmit:e}={}){return(0,Ot.jsx)(gc.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:Uu,onSubmit:async(t,{resetForm:a})=>{if(!e){Os.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?Os.toast.error(o.message):(Os.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:r,handleBlur:s,isSubmitting:l,handleSubmit:i})=>(0,Ot.jsxs)("form",{onSubmit:i,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(Fs,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:r,onBlur:s,disabled:l,icon:(0,Ot.jsx)(fc.FaUser,{className:"text-primary"}),className:n(Hs,t.name&&a.name&&js)}),t.name&&a.name&&(0,Ot.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:Us,children:t.name})]}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(Fs,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:r,onBlur:s,disabled:l,icon:(0,Ot.jsx)(Ou,{}),className:n(Hs,t.email&&a.email&&js)}),t.email&&a.email&&(0,Ot.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:Us,children:t.email})]}),(0,Ot.jsxs)("div",{className:"lg:col-span-2",children:[(0,Ot.jsx)(Fs,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:r,onBlur:s,disabled:l,className:n(Hs,t.subject&&a.subject&&js)}),t.subject&&a.subject&&(0,Ot.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:Us,children:t.subject})]}),(0,Ot.jsxs)("div",{className:"lg:col-span-2",children:[(0,Ot.jsx)(uc,{placeholder:"Message...",name:"message",value:o.message,onChange:r,onBlur:s,disabled:l,icon:(0,Ot.jsx)(Gu,{}),className:n(Hs,t.message&&a.message&&js)}),t.message&&a.message&&(0,Ot.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:Us,children:t.message})]}),(0,Ot.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,Ot.jsx)(w,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:l,children:"Send"})})]})})}function Ou(){return(0,Ot.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,Ot.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 Gu(){return(0,Ot.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,Ot.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 $u=({links:e,richText:t})=>(0,Ot.jsx)("div",{className:"container",children:(0,Ot.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,Ot.jsx)("div",{className:"max-w-[48rem] flex items-center",children:t&&(0,Ot.jsx)(be,{className:"mb-0",content:t,enableGutter:!1})}),(0,Ot.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,Ot.jsx)(ma,{size:"lg",...a},o))})]})}),Lo=({links:e,richText:t})=>{let[a,o]=(0,hs.useState)(!1),r="accent",s=()=>o(!0),l=()=>o(!1),i=d=>{d.target===d.currentTarget&&l()};return(0,Ot.jsxs)("div",{className:n("relative isolate overflow-hidden",r==="accent"?"bg-accent":"bg-black"),children:[(0,Ot.jsx)("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:(0,Ot.jsxs)("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&(0,Ot.jsx)(be,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,Ot.jsx)("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:(0,Ot.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:d},m)=>d?.url==="/contact"?(0,Ot.jsx)("div",{onClick:s,className:n("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Ot-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),children:d.label},m):(0,Ot.jsx)(ma,{size:"lg",className:n("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white Ot-underline cursor-pointer",r==="accent"?"border-white bg-accent":"border-accent bg-black"),...d},m))})})]})}),a&&(0,Ot.jsx)("div",{className:"absolute inset-0 Ot-50 flex items-center justify-center bg-black bg-opacity-50",onClick:i,children:(0,Ot.jsxs)("div",{className:"bg-white p-6 pt-10 rounded-lg shadow-lg w-full max-w-lg light relative",children:[(0,Ot.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:l,children:"\u2715"}),(0,Ot.jsx)(bc,{})," "]})})]})};var Gs=require("prism-react-renderer");function Jn({code:e}){let[t,a]=(0,hs.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,Ot.jsx)("div",{className:"flex justify-end align-middle",children:(0,Ot.jsxs)(w,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,Ot.jsx)("p",{children:t}),(0,Ot.jsx)("div",{className:"w-6 Ot-6",children:(0,Ot.jsx)(Ld.ClipboardCopy,{})})]})})}var xc=({code:e,language:t=""})=>e?(0,Ot.jsx)(Gs.Highlight,{code:e,language:t,theme:Gs.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:r})=>(0,Ot.jsxs)("pre",{className:"bg-black p-4 border text-xs border-border rounded overflow-x-auto",children:[r.map((s,l)=>(0,Ot.jsxs)("div",{...a({className:"table-row",line:s}),children:[(0,Ot.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:l+1}),(0,Ot.jsx)("span",{className:"table-cell hs-4",children:s.map((i,d)=>(0,Ot.jsx)("span",{...o({token:i})},d))})]},l)),(0,Ot.jsx)(Jn,{code:e})]})}):null;var Zn=({className:e,code:t,language:a})=>(0,Ot.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,Ot.jsx)(xc,{code:t,language:a})});var wc=P(require("next/image")),Vu={"3xl":1920,"2xl":1536,xl:1280,lg:1024,md:768,sm:640},Nc="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=",Cc=e=>{let{alt:t,fill:a,imgClassName:o,priority:r,resource:s,size:l,src:i,loading:d}=e,m,c,p=t,g=i||"";if(!g&&s&&typeof s=="object"){let{alt:u,filename:y,height:T,url:M,width:N}=s;if(T&&T>500){let A=500/T;m=N*A,c=T*A}else m=N,c=T;p=u||"",g=M||Nc}let f=d||"lazy",b=l||Object.entries(Vu).map(([,u])=>`(max-width: ${u}px) ${u*2}w`).join(", ");return(0,Ot.jsx)("picture",{children:(0,Ot.jsx)(wc.default,{alt:p||"",className:n(o),fill:a,height:a?void 0:c,placeholder:"blur",blurDataURL:Nc,priority:f!=="lazy"&&r,quality:100,loading:f,sizes:b,src:g,width:a?void 0:m})})};var kc=e=>{let{onClick:t,resource:a,videoClassName:o}=e,r=(0,$s.useRef)(null);if((0,$s.useEffect)(()=>{let{current:s}=r;s&&s.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:s}=a;return(0,Ot.jsx)("video",{autoPlay:!0,className:n(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:r,children:(0,Ot.jsx)("source",{src:a.url||""})})}return null};var Ha=e=>{let{className:t,htmlElement:a="div",resource:o}=e,r=typeof o=="object"&&o?.mimeType?.includes("video");return(0,Ot.jsx)(a||hs.Fragment,{...a!==null?{className:t}:{},children:r?(0,Ot.jsx)(kc,{...e}):(0,Ot.jsx)(Cc,{...e})})};var ja=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:s}=e;return(0,Ot.jsx)("div",{className:n("Ot-full ",{container:a},t),children:(0,Ot.jsx)(Ha,{imgClassName:n("rounded-[0.8rem]",o),className:"flex justify-center",resource:r,src:s})})};var rl=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:r,staticImage:s}=e;return(0,Ot.jsx)("div",{className:n("",{container:a},t),children:(0,Ot.jsx)(Ha,{imgClassName:n("rounded-[0.8rem]",o),resource:r,src:s})})};var zo=({title:e,description:t,features:a,id:o,nested:r=!1})=>(0,Ot.jsxs)("section",{className:n(r?"w-full":"",""),children:[(0,Ot.jsxs)("div",{className:"prose prose:max-w-none",children:[e&&(0,Ot.jsx)("h2",{className:"mb-6 mt-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,Ot.jsx)("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,Ot.jsx)("div",{className:"mb-5 text-foreground",children:(0,Ot.jsx)(be,{content:t,enableGutter:!1})})]}),(0,Ot.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((s,l)=>{let i=()=>{if(s.icon&&"type"in s.icon&&s.icon.type!=="none")return{type:s.icon.type,icon:s.icon.icon}};return(0,Ot.jsx)(_s,{title:s.title||"",content:s.content||void 0,statistic:s.statistic||void 0,settings:{...s.settings,width:"auto",order:l},link:s.link?{...s.link,label:"Learn more"}:void 0,icon:i()??{type:"none",icon:null}},l)})})]});var Ws=P(require("react"));function Xr({nodes:e}){return(0,Ot.jsx)(Ws.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let s=(0,Ot.jsx)(Ws.default.Fragment,{children:t.text},a);return t.format&1&&(s=(0,Ot.jsx)("strong",{children:s},a)),t.format&2&&(s=(0,Ot.jsx)("em",{children:s},a)),t.format&4&&(s=(0,Ot.jsx)("span",{style:{textDecoration:"line-through"},children:s},a)),t.format&8&&(s=(0,Ot.jsx)("span",{style:{textDecoration:"underline"},children:s},a)),t.format&16&&(s=(0,Ot.jsx)("code",{children:t.text},a)),t.format&32&&(s=(0,Ot.jsx)("sub",{children:s},a)),t.format&64&&(s=(0,Ot.jsx)("sup",{children:s},a)),s}if(t.type==="table")return(0,Ot.jsx)("table",{children:(0,Ot.jsx)("tbody",{children:t.children.map((s,l)=>(0,Ot.jsx)("tr",{children:s.children.map((i,d)=>(0,Ot.jsx)("td",{children:Xr({nodes:i.children})},d))},l))})},a);let o=s=>{if(s.children==null)return null;if(s?.type==="list"&&s?.listType==="check")for(let l of s.children)"checked"in l&&(l?.checked||(l.checked=!1));return Xr({nodes:s.children})},r="children"in t?o(t):"";if(t.type==="block"){let s=t.fields,l=s?.blockType;if(!s||!l)return null;switch(l){case"cta":return(0,Ot.jsx)(Lo,{...s},a);case"mediaBlock":return(0,Ot.jsx)(ja,{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,Ot.jsx)(rl,{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,Ot.jsx)(Kn,{className:"col-start-2 mb-4",...s},a);case"code":return(0,Ot.jsx)(Zn,{className:"col-start-2",...s},a);case"features":return(0,Ot.jsx)(zo,{...s,nested:!0},a);case"reusableContentBlock":Xr({nodes:s.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,Ot.jsx)("hs",{className:"col-start-2"},a);case"paragraph":return(0,Ot.jsx)("p",{className:"col-start-2",children:r},a);case"heading":{let s=t?.tag;return(0,Ot.jsx)(s,{className:"col-start-2",id:t?.id||"",children:r},a)}case"list":{let s=t?.tag;return(0,Ot.jsx)(s,{className:"list col-start-2",children:r},a)}case"listitem":return t?.checked!=null?(0,Ot.jsx)("li",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:r},a):(0,Ot.jsx)("li",{value:t?.value,children:r},a);case"quote":return(0,Ot.jsx)("blockquote",{className:"col-start-2",children:r},a);case"link":{let s=t.fields;return(0,Ot.jsx)(ma,{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,Ot.jsx)(ma,{newTab:!!s?.newTab,reference:s.doc,type:s.linkType==="internal"?"reference":"custom",url:s.url,children:r},a)}default:return null}})})}var be=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,Ot.jsx)("div",{className:n({"container ":a,"max-w-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&Xr({nodes:t?.root?.children})}):null;var ut=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("Ot-")?e+" ":"Ot-"+e+" ",s="Ot-"+t,l=o??"",i=r+s+" Ot-"+a+" "+l;return(0,Ot.jsx)("i",{className:i})};var Tc=P(require("next/image"));function Dc(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function _s({image:e,icon:t,title:a,subtitle:o,content:r,statistic:s,settings:l,link:i,className:d}){let m={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-hs from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-hs from-[#4A1030] to-[#2D0A1D] relative overflow-hidden",light:"bg-background"},c={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,Ot.jsxs)("a",{href:i?.url||"#",className:n("min-w-56 max-w-xl Ot-full flex flex-col group bg-background",e?"p-0":"p-6 md:p-8",l&&!e&&m[l?.card==="default"?"solid":l?.card],e&&"bg-foreground",l&&l?.card==="outline"?"text-gray-900":"text-white",c[l?.width??"auto"],"intersect-once intersect:animate-flip-Ld opacity-0 intersect:opacity-100 intersect:animate-duration-500",l&&`intersect:animate-delay-${l.order||1}00`,d),children:[e&&(0,Ot.jsx)("div",{className:"relative aspect-[16/9] w-full",children:(0,Ot.jsx)(Tc.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,Ot.jsxs)("div",{className:n(e?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[(0,Ot.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,Ot.jsx)("div",{className:"text-primary uppercase text-sm font-light mb-4",children:o}),(0,Ot.jsx)("div",{className:"flex items-start gap-4 mb-4",children:(0,Ot.jsx)(_u,{icon:{type:t?.type||"Ot-light",iconName:t?.icon||"Ot-icon-error"},heading:a??"",variant:l?.card==="default"?"solid":l?.card??"solid",iconSize:l?.iconSize||"large"})}),r&&typeof r=="object"&&(0,Ot.jsx)(be,{enableGutter:!1,content:r,enableProse:!1,className:n("prose-sm prose-p:text-lg prose-headings:text-xl","space-y-3",l?.card==="outline"||l?.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,Ot.jsx)("div",{className:n("prose-sm prose-p:text-lg prose-headings:text-xl","space-y-3",l?.card==="outline"||l?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:r})]}),i&&i.url&&(0,Ot.jsx)("div",{className:"mt-6",children:(0,Ot.jsx)("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:i?.label||"Find out more"})})]})]})}var _u=({icon:e,heading:t,variant:a,iconSize:o,subtitle:r})=>e&&o==="small"&&e.iconName!="Ot-icon-error"?(0,Ot.jsxs)("div",{className:"flex items-start justify-between w-full mb-2",children:[(0,Ot.jsx)("div",{className:n(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),Dc(e)&&(0,Ot.jsx)("div",{className:n("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-qc-2 ml-1 mt-1":""),children:(0,Ot.jsx)(ut,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="Ot-icon-error"?(0,Ot.jsxs)("div",{className:"flex flex-col gap-4",children:[Dc(e)&&(0,Ot.jsx)("div",{className:n("Ot-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Ot.jsx)(ut,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Ot.jsx)("h3",{className:n("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,Ot.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Ot.jsx)("div",{className:n("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Ac=P(require("next/image")),Ic=P(require("next/link"));var Eo=P(require("react"));var ne=Eo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,className:n("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ne.displayName="Card";var Re=Eo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,className:n("flex flex-col space-y-1.5 p-6",e),...t}));Re.displayName="CardHeader";var De=Eo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,className:n("font-semibold leading-none tracking-tight",e),...t}));De.displayName="CardTitle";var sl=Eo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,className:n("text-sm text-muted-foreground",e),...t}));sl.displayName="CardDescription";var ve=Eo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,className:n("p-6 pt-0",e),...t}));ve.displayName="CardContent";var Yr=Eo.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("div",{ref:a,className:n("flex items-center p-6 pt-0",e),...t}));Yr.displayName="CardFooter";function Mc({name:e,logo:t,href:a}){return(0,Ot.jsx)(ne,{className:"w-full max-w-sm overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,Ot.jsxs)(Ic.default,{href:a,className:"block",children:[(0,Ot.jsx)("div",{className:"bg-white p-2 flex items-center justify-center Ot-24",children:(0,Ot.jsx)("div",{className:"relative w-full Ot-full",children:t&&(0,Ot.jsx)(Ac.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,Ot.jsx)(ve,{className:"p-3 flex items-center justify-center Ot-18 bg-gradient-to-hs from-gray-900 via-brand-one to-gray-900",children:(0,Ot.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 Lc({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:r}){let s=i=>{switch(i){case"birthday":return(0,Ot.jsx)(Ld.Cake,{className:"Ot-4 w-4"});case"workAnniversary":return(0,Ot.jsx)(Ld.Award,{className:"Ot-4 w-4"});case"companyEvent":return(0,Ot.jsx)(Ld.PartyPopper,{className:"Ot-4 w-4"});default:return(0,Ot.jsx)(Ld.CalendarDays,{className:"Ot-4 w-4"})}},l=i=>{switch(i){case"birthday":return"bg-brand-one";case"workAnniversary":return"bg-brand-two";case"companyEvent":return"bg-brand-three";default:return"from-gray-500 to-slate-500"}};return(0,Ot.jsxs)(ne,{className:`w-full max-w-md overflow-hidden bg-gradient-to-hs ${l(e)}`,children:[(0,Ot.jsxs)(Re,{className:"flex flex-row items-center gap-3 text-white",children:[r&&(0,Ot.jsxs)(Me,{className:"Ot-14 w-14 border-2 border-white",children:[(0,Ot.jsx)(pt,{src:r,alt:a||"Event"}),(0,Ot.jsx)(Le,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,Ot.jsxs)("div",{className:"flex flex-col",children:[(0,Ot.jsx)(De,{className:"text-xl",children:a||"Untitled Event"}),(0,Ot.jsxs)("p",{className:"text-sm text-white/80",children:[(0,Ot.jsx)(Ld.CalendarDays,{className:"qc-1 inline-block Ot-4 w-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,Ot.jsxs)(ve,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,Ot.jsx)("p",{className:"mb-2 text-sm text-gray-700",children:o}),(0,Ot.jsxs)(me,{variant:"secondary",className:`${l(e)} text-white/80`,children:[s(e),(0,Ot.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-Ot])([A-Ot])/g,"$1 $2").split(" ").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" "):"Event"})]})]})]})}var zc=P(require("next/link"));var Ec=P(require("next/image")),Bc={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1400px"};function Fc({slug:e,image:t,title:a,description:o}){return(0,Ot.jsxs)(zc.default,{href:e,className:"group/portfolio relative Ot-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 md:p-[1.875rem]",children:[(0,Ot.jsx)("span",{className:n("absolute inset-0 Ot-[2] bg-gradient-1 from-primary/0 to-primary [transition:all_500ms_ease] md:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","md:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] md:group-hover/portfolio:[transition-delay:.1s] md:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,Ot.jsx)(Ec.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
|
|
8
|
-
(min-width:${
|
|
9
|
-
(min-width:${
|
|
7
|
+
"use strict";var Cv=Object.create;var Mn=Object.defineProperty;var kv=Object.getOwnPropertyDescriptor;var Sv=Object.getOwnPropertyNames;var Pv=Object.getPrototypeOf,Dv=Object.prototype.hasOwnProperty;var Tv=(e,t)=>{for(var a in t)Mn(e,a,{get:t[a],enumerable:!0})},tp=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Sv(t))!Dv.call(e,s)&&s!==a&&Mn(e,s,{get:()=>t[s],enumerable:!(o=kv(t,s))||o.enumerable});return e};var H=(e,t,a)=>(a=e!=null?Cv(Pv(e)):{},tp(t||!e||!e.__esModule?Mn(a,"default",{value:e,enumerable:!0}):a,e)),Rv=e=>tp(Mn({},"__esModule",{value:!0}),e);var I0={};Tv(I0,{Alert:()=>vc,AlertDescription:()=>hc,AlertTitle:()=>bc,AppHeader:()=>Dm,AppSidebar:()=>Xl,AppSidebarLeft:()=>id,ApproveLeave:()=>mm,Avatar:()=>nt,AvatarFallback:()=>lt,AvatarImage:()=>$t,Badge:()=>q,BannerBlock:()=>Sc,BrandLogo:()=>Wr,Breadcrumb:()=>Mi,BreadcrumbEllipsis:()=>Ed,BreadcrumbItem:()=>Ws,BreadcrumbLink:()=>Li,BreadcrumbList:()=>Bi,BreadcrumbPage:()=>Ei,BreadcrumbSeparator:()=>Fi,Breadcrumbs:()=>Rh,Button:()=>b,CMSLink:()=>Co,CRMCogeBoard:()=>Gh,CRMKanbanBoard:()=>Uh,Calendar:()=>Or,CalendarView:()=>vm,CallToActionBlock:()=>hs,CallToActionBlockOld:()=>Ib,CapabilityMenu:()=>Tm,Card:()=>rn,Categories:()=>xh,ChatCardArtefact:()=>Nm,ChatCardTask:()=>vn,ChatInterface:()=>Jl,ChatInterfaceMessages:()=>Yh,ChatMessage:()=>ym,Checkbox:()=>La,CodeBlock:()=>Rc,Collapsible:()=>oo,CollapsibleContent:()=>Fo,CollapsibleTrigger:()=>Eo,ColleagueCard:()=>hi,ColleagueForm:()=>hn,ColleagueTypeSelection:()=>dd,ColleaguesView:()=>kn,CollectionArchive:()=>rh,Command:()=>qn,CommandDialog:()=>Jp,CommandEmpty:()=>mc,CommandGroup:()=>pc,CommandInput:()=>dc,CommandItem:()=>gc,CommandList:()=>cc,CommandSeparator:()=>uc,CommandShortcut:()=>fc,CommentSection:()=>Am,Container:()=>tm,ContentBlock:()=>on,ContentCard:()=>Vb,CopilotInterface:()=>m0,CopyButton:()=>Dc,CustomLink:()=>io,CustomerCard:()=>Tu,DarkTop:()=>zc,DashboardHeader:()=>kf,DashboardHero:()=>St,DashboardPage:()=>Om,DealCard:()=>bm,DealDetails:()=>gn,DeliveryLeadSubmission:()=>Zl,DeliveryLeadSubmissionList:()=>td,DeliveryLeadSubmissionWithList:()=>yf,Dialog:()=>xt,DialogClose:()=>Kn,DialogContent:()=>ft,DialogDescription:()=>fs,DialogFooter:()=>gs,DialogHeader:()=>wt,DialogOverlay:()=>Xn,DialogPortal:()=>lc,DialogTitle:()=>Ct,DialogTrigger:()=>_n,DigitalColleageusLayout:()=>gi,DigitalColleagueClone:()=>cd,DigitalColleagueOptions:()=>md,DropdownMenu:()=>Tr,DropdownMenuCheckboxItem:()=>jd,DropdownMenuContent:()=>Qo,DropdownMenuGroup:()=>pp,DropdownMenuItem:()=>ro,DropdownMenuLabel:()=>zi,DropdownMenuPortal:()=>up,DropdownMenuRadioGroup:()=>fp,DropdownMenuRadioItem:()=>Hd,DropdownMenuSeparator:()=>ji,DropdownMenuShortcut:()=>Od,DropdownMenuSub:()=>gp,DropdownMenuSubContent:()=>zd,DropdownMenuSubTrigger:()=>Fd,DropdownMenuTrigger:()=>Rr,DynamicIcon:()=>Na,EditableField:()=>sd,EventCard:()=>Ru,FeatureCard:()=>ml,FeatureGrid:()=>ju,FeaturesBlock:()=>xs,FileView:()=>Dn,Filter:()=>Nh,FlowPrintable:()=>ng,Footer:()=>Eh,Header:()=>cm,HeaderDesktop:()=>sm,HeaderMobile:()=>nm,HeadingImage:()=>Zb,Hero:()=>Ub,HighImpactHero:()=>Jc,HolidayGrid:()=>fm,HolidayTracker:()=>Hh,HoverCard:()=>_p,HoverCardContent:()=>nc,HoverCardTrigger:()=>Kp,Image:()=>Lu,ImageBlock:()=>Lc,InfoTile:()=>Wb,Input:()=>$,Insight:()=>Gb,KanbanColumn:()=>fn,KnowledgeView:()=>Sn,Label:()=>P,LightTop:()=>jc,Logo:()=>sh,LowImpactHero:()=>em,MOTD:()=>Kb,MainPage:()=>Bm,ManagementSidebar:()=>nd,Mask:()=>Ph,Media:()=>cr,MediaBlock:()=>mr,MediumImpactHero:()=>Zc,NavigationTabs:()=>Is,NewCustomerForm:()=>hm,NewDealForm:()=>Vh,NewsGrid:()=>sg,NotificationsPanel:()=>km,OrgChart:()=>Yb,PagePrintable:()=>lg,PageRange:()=>lh,PageShape:()=>dn,Pagination:()=>yh,PayloadPagination:()=>dh,Popover:()=>Fr,PopoverAnchor:()=>Up,PopoverContent:()=>nr,PopoverTrigger:()=>zr,PostHero:()=>kh,PricingCard:()=>Ob,Printable:()=>ph,ProjectCard:()=>Bu,ProjectTeam:()=>bh,ProjectView:()=>Wm,ProjectsIndexView:()=>Xm,ProposalSummary:()=>Jb,RelatedContent:()=>hh,RelatedPagesMenu:()=>Fh,RelatedPosts:()=>oh,RenderBlocks:()=>Gr,RenderBlocksWithShapes:()=>th,RenderHero:()=>Th,RequestLeave:()=>gm,ReusableContentBlock:()=>Fc,RichText:()=>kt,ScrollArea:()=>jt,ScrollBar:()=>Wn,SearchableSelect:()=>ld,SectionHero:()=>om,Select:()=>Fe,SelectContent:()=>Be,SelectGroup:()=>kb,SelectItem:()=>_,SelectLabel:()=>ou,SelectScrollDownButton:()=>Nc,SelectScrollUpButton:()=>xc,SelectSeparator:()=>ru,SelectTrigger:()=>Me,SelectValue:()=>_e,Separator:()=>ls,ServiceCard:()=>Hb,Sheet:()=>Ln,SheetClose:()=>Cp,SheetContent:()=>Oi,SheetDescription:()=>_d,SheetFooter:()=>Gd,SheetHeader:()=>$d,SheetOverlay:()=>En,SheetPortal:()=>Vd,SheetTitle:()=>Wd,SheetTrigger:()=>wp,Sidebar:()=>er,SidebarContent:()=>No,SidebarFooter:()=>ar,SidebarGroup:()=>Aa,SidebarGroupAction:()=>Yd,SidebarGroupContent:()=>Xa,SidebarGroupLabel:()=>or,SidebarHeader:()=>tr,SidebarInput:()=>qd,SidebarInset:()=>Vi,SidebarLeft:()=>uh,SidebarMenu:()=>fa,SidebarMenuAction:()=>cs,SidebarMenuBadge:()=>Jd,SidebarMenuButton:()=>Ia,SidebarMenuItem:()=>ea,SidebarMenuSkeleton:()=>Qd,SidebarMenuSub:()=>zo,SidebarMenuSubButton:()=>Ho,SidebarMenuSubItem:()=>jo,SidebarProvider:()=>ds,SidebarRail:()=>Xd,SidebarRight:()=>vh,SidebarSeparator:()=>$i,SidebarTrigger:()=>Ui,SimpleHeader:()=>Ih,Skeleton:()=>Ze,SlideShow:()=>ag,Switch:()=>u0,Tabs:()=>wc,TabsContent:()=>Sb,TabsList:()=>Cc,TabsTrigger:()=>kc,TeamsIndexView:()=>qm,TextAndImages:()=>ig,Textarea:()=>et,Theme:()=>bl,ThemeProvider:()=>Sh,ThemeWithShapes:()=>Wu,Toast:()=>_i,ToastAction:()=>tc,ToastClose:()=>Ki,ToastDescription:()=>qi,ToastProvider:()=>Vn,ToastTitle:()=>Xi,ToastViewport:()=>Wi,Toaster:()=>$n,Toggle:()=>oc,ToggleGroup:()=>sr,ToggleGroupItem:()=>ir,Tooltip:()=>Mr,TooltipContent:()=>Zo,TooltipProvider:()=>Ir,TooltipTrigger:()=>Br,VideoHeader:()=>Bh,WhyUs:()=>Qb,badgeVariants:()=>yc,buttonVariants:()=>Ar,defaultColorScheme:()=>xm,findCapabilityByPath:()=>Jh,getAllCapabilities:()=>Zh,getCapabilityByTeam:()=>Qh,getContextualActions:()=>Ul,getDataPart:()=>c0,getFileParts:()=>l0,getTextContent:()=>Rm,getToolPart:()=>i0,hasDataPart:()=>d0,hasFilePart:()=>n0,hasToolPart:()=>s0,testCapabilities:()=>Ol,toggleVariants:()=>Yi,useIsMobile:()=>zn,useSidebar:()=>qs,useToast:()=>Un});module.exports=Rv(I0);var Gs=H(require("react")),Bn=require("@radix-Fn/react-icons"),mp=require("@radix-Fn/react-slot");var cp=require("clsx");var Bd="-",Av=e=>{let t=Mv(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let i=n.split(Bd);return i[0]===""&&i.length!==1&&i.shift(),rp(i,t)||Iv(n)},getConflictingClassGroupIds:(n,i)=>{let l=a[n]||[];return i&&o[n]?[...l,...o[n]]:l}}},rp=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?rp(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let r=e.join(Bd);return t.validators.find(({validator:n})=>n(r))?.classGroupId},ap=/^\[(.+)\]$/,Iv=e=>{if(ap.test(e)){let t=ap.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Mv=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Lv(Object.entries(e.classGroups),a).forEach(([r,n])=>{Md(n,o,r,t)}),o},Md=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let r=s===""?t:op(t,s);r.classGroupId=a;return}if(typeof s=="function"){if(Bv(s)){Md(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([r,n])=>{Md(n,op(t,r),a,o)})})},op=(e,t)=>{let a=e;return t.split(Bd).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Bv=e=>e.isThemeGetter,Lv=(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,Ev=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)}}},sp="!",Fv=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],r=t.length,n=i=>{let l=[],c=0,d=0,p;for(let h=0;h<i.length;h++){let N=i[h];if(c===0){if(N===s&&(o||i.slice(h,h+r)===t)){l.push(i.slice(d,h)),d=h+r;continue}if(N==="/"){p=h;continue}}N==="["?c++:N==="]"&&c--}let u=l.length===0?i:i.substring(d),g=u.startsWith(sp),x=g?u.substring(1):u,v=p&&p>d?p-d:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:v}};return a?i=>a({className:i,parseClassName:n}):n},zv=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},jv=e=>({cache:Ev(e.cacheSize),parseClassName:Fv(e),...Av(e)}),Hv=/\s+/,Ov=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,r=[],n=e.trim().split(Hv),i="";for(let l=n.length-1;l>=0;l-=1){let c=n[l],{modifiers:d,hasImportantModifier:p,baseClassName:u,maybePostfixModifierPosition:g}=a(c),x=!!g,v=o(x?u.substring(0,g):u);if(!v){if(!x){i=c+(i.length>0?" "+i:i);continue}if(v=o(u),!v){i=c+(i.length>0?" "+i:i);continue}x=!1}let h=zv(d).join(":"),N=p?h+sp:h,k=N+v;if(r.includes(k))continue;r.push(k);let w=s(v,x);for(let R=0;R<w.length;++R){let T=w[R];r.push(N+T)}i=c+(i.length>0?" "+i:i)}return i};function Uv(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=ip(t))&&(o&&(o+=" "),o+=a);return o}var ip=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=ip(e[o]))&&(a&&(a+=" "),a+=t);return a};function Vv(e,...t){let a,o,s,r=n;function n(l){let c=t.reduce((d,p)=>p(d),e());return a=jv(c),o=a.cache.get,s=a.cache.set,r=i,i(l)}function i(l){let c=o(l);if(c)return c;let d=Ov(l,a);return s(l,d),d}return function(){return r(Uv.apply(null,arguments))}}var Rt=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},np=/^\[(?:([a-z-]+):)?(.+)\]$/i,$v=/^\d+\/\d+$/,Gv=new Set(["px","full","screen"]),Wv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_v=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|ao|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Kv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Xv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yo=e=>Vs(e)||Gv.has(e)||$v.test(e),Pr=e=>$s(e,"length",ob),Vs=e=>!!e&&!Number.isNaN(Number(e)),Id=e=>$s(e,"number",Vs),Ai=e=>!!e&&Number.isInteger(Number(e)),Yv=e=>e.endsWith("%")&&Vs(e.slice(0,-1)),ze=e=>np.test(e),Dr=e=>Wv.test(e),Jv=new Set(["length","size","percentage"]),Qv=e=>$s(e,Jv,lp),Zv=e=>$s(e,"position",lp),eb=new Set(["image","url"]),tb=e=>$s(e,eb,sb),ab=e=>$s(e,"",rb),Ii=()=>!0,$s=(e,t,a)=>{let o=np.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},ob=e=>_v.test(e)&&!Kv.test(e),lp=()=>!1,rb=e=>Xv.test(e),sb=e=>qv.test(e);var ib=()=>{let e=Rt("colors"),t=Rt("spacing"),a=Rt("blur"),o=Rt("brightness"),s=Rt("borderColor"),r=Rt("borderRadius"),n=Rt("borderSpacing"),i=Rt("borderWidth"),l=Rt("contrast"),c=Rt("grayscale"),d=Rt("hueRotate"),p=Rt("invert"),u=Rt("gap"),g=Rt("gradientColorStops"),x=Rt("gradientColorStopPositions"),v=Rt("inset"),h=Rt("margin"),N=Rt("opacity"),k=Rt("padding"),w=Rt("saturate"),R=Rt("scale"),T=Rt("sepia"),j=Rt("skew"),le=Rt("space"),D=Rt("translate"),z=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],Ce=()=>["auto",ze,t],S=()=>[ze,t],A=()=>["",Yo,Pr],C=()=>["auto",Vs,ze],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Se=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>["start","end","center","between","around","evenly","stretch"],Ge=()=>["","0",ze],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ne=()=>[Vs,ze];return{cacheSize:500,separator:":",theme:{colors:[Ii],spacing:[Yo,Pr],blur:["none","",Dr,ze],brightness:ne(),borderColor:[e],borderRadius:["none","","full",Dr,ze],borderSpacing:S(),borderWidth:A(),contrast:ne(),grayscale:Ge(),hueRotate:ne(),invert:Ge(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[Yv,Pr],inset:Ce(),margin:Ce(),opacity:ne(),padding:S(),saturate:ne(),scale:ne(),sepia:Ge(),skew:ne(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",ze]}],container:["container"],columns:[{columns:[Dr]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:[...re(),ze]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-ao":[{"overflow-ao":Y()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-ao":[{"overscroll-ao":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-ao":[{"inset-ao":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ai,ze]}],basis:[{basis:Ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ze]}],grow:[{grow:Ge()}],shrink:[{shrink:Ge()}],order:[{order:["first","last","none",Ai,ze]}],"grid-cols":[{"grid-cols":[Ii]}],"col-start-end":[{col:["auto",{span:["full",Ai,ze]},ze]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[Ii]}],"row-start-end":[{row:["auto",{span:[Ai,ze]},ze]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ze]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-ao":[{"gap-ao":[u]}],"justify-content":[{justify:["normal",...ve()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ve(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ve(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],ao:[{ao:[k]}],ao:[{ao:[k]}],ao:[{ao:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],ao:[{ao:[h]}],ao:[{ao:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[le]}],"space-x-reverse":["space-x-reverse"],"space-ao":[{"space-ao":[le]}],"space-ao-reverse":["space-ao-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ze,t]}],"min-w":[{"min-w":[ze,t,"min","max","fit"]}],"max-w":[{"max-w":[ze,t,"none","full","min","max","fit","prose",{screen:[Dr]},Dr]}],h:[{h:[ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Dr,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Id]}],"font-family":[{font:[Ii]}],"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",ze]}],"line-clamp":[{"line-clamp":["none",Vs,Id]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yo,ze]}],"list-image":[{"list-image":["none",ze]}],"list-style-type":[{list:["none","disc","decimal",ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","ao-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yo,Pr]}],"underline-offset":[{"underline-offset":["auto",Yo,ze]}],"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:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze]}],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",ze]}],"Fn-attachment":[{Fn:["fixed","local","scroll"]}],"Fn-clip":[{"Fn-clip":["border","padding","content","text"]}],"Fn-opacity":[{"Fn-opacity":[N]}],"Fn-origin":[{"Fn-origin":["border","padding","content"]}],"Fn-position":[{Fn:[...re(),Zv]}],"Fn-repeat":[{Fn:["ao-repeat",{repeat:["","x","ao","round","space"]}]}],"Fn-size":[{Fn:["auto","cover","contain",Qv]}],"Fn-image":[{Fn:["none",{"gradient-Ip":["t","tr","r","ao","b","bl","l","ao"]},tb]}],"Fn-color":[{Fn:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-Ip-pos":[{Ip:[x]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-Ip":[{Ip:[g]}],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-Fn":[{"rounded-Fn":[r]}],"rounded-ao":[{"rounded-ao":[r]}],"rounded-ao":[{"rounded-ao":[r]}],"rounded-Ip":[{"rounded-Ip":[r]}],"rounded-ao":[{"rounded-ao":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-ao":[{"rounded-ao":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-ao":[{"border-ao":[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":[N]}],"border-style":[{border:[...Se(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-ao":[{"divide-ao":[i]}],"divide-ao-reverse":["divide-ao-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:Se()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-ao":[{"border-ao":[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:["",...Se()]}],"outline-offset":[{"outline-offset":[Yo,ze]}],"outline-w":[{outline:[Yo,Pr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[Yo,Pr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Dr,ab]}],"shadow-color":[{shadow:[Ii]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"Fn-blend":[{"Fn-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Dr,ze]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[w]}],sepia:[{sepia:[T]}],"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":[N]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-ao":[{"border-spacing-ao":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ze]}],duration:[{duration:ne()}],ease:[{ease:["linear","in","out","in-out",ze]}],delay:[{delay:ne()}],animate:[{animate:["none","spin","ping","pulse","bounce",ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-ao":[{"scale-ao":[R]}],rotate:[{rotate:[Ai,ze]}],"translate-x":[{"translate-x":[D]}],"translate-ao":[{"translate-ao":[D]}],"skew-x":[{"skew-x":[j]}],"skew-ao":[{"skew-ao":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ze]}],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","ao-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","ao-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","ao","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-ao":[{"scroll-ao":S()}],"scroll-ao":[{"scroll-ao":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-ao":[{"scroll-ao":S()}],"scroll-ao":[{"scroll-ao":S()}],"scroll-ao":[{"scroll-ao":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","ao","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-ao":[{"touch-pan":["ao","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Yo,Pr,Id]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-ao"],overscroll:["overscroll-x","overscroll-ao"],inset:["inset-x","inset-ao","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-ao":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-ao"],p:["px","py","ps","ao","ao","ao","pb","pl"],px:["ao","pl"],py:["ao","pb"],m:["mx","my","ms","ao","ao","mr","mb","ml"],mx:["mr","ml"],my:["ao","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-Fn","rounded-ao","rounded-ao","rounded-Ip","rounded-ao","rounded-tr","rounded-ao","rounded-bl"],"rounded-s":["rounded-Fn","rounded-Ip"],"rounded-e":["rounded-ao","rounded-ao"],"rounded-t":["rounded-ao","rounded-tr"],"rounded-r":["rounded-tr","rounded-ao"],"rounded-b":["rounded-ao","rounded-bl"],"rounded-l":["rounded-ao","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-ao"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-ao":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-ao":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-ao","scroll-ao","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-ao","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-ao","scroll-ao","scroll-ao","scroll-pb","scroll-pl"],"scroll-px":["scroll-ao","scroll-pl"],"scroll-py":["scroll-ao","scroll-pb"],touch:["touch-x","touch-ao","touch-pz"],"touch-x":["touch"],"touch-ao":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var dp=Vv(ib);function m(...e){return dp((0,cp.clsx)(e))}function Ld(e){let t=0,a=(r,n)=>`${r.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/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 l=i.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c of l)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),s=nb(e.layout);return{tableOfContents:o,contentWithIds:s}}function nb(e){let t=(o,s)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/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 ao=require("react/jsx-runtime"),Mi=Gs.forwardRef(({...e},t)=>(0,ao.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Mi.displayName="Breadcrumb";var Bi=Gs.forwardRef(({className:e,...t},a)=>(0,ao.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}));Bi.displayName="BreadcrumbList";var Ws=Gs.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("_u",{ref:a,className:m("inline-flex items-center gap-1.5",e),...t}));Ws.displayName="BreadcrumbItem";var Li=Gs.forwardRef(({asChild:e,className:t,...a},o)=>(0,ao.jsx)(e?mp.Slot:"a",{ref:o,className:m("transition-colors hover:text-foreground",t),...a}));Li.displayName="BreadcrumbLink";var Ei=Gs.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:m("font-normal text-foreground",e),...t}));Ei.displayName="BreadcrumbPage";var Fi=({children:e,className:t,...a})=>(0,ao.jsx)("_u",{role:"presentation","aria-hidden":"true",className:m("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,ao.jsx)(Bn.ChevronRightIcon,{})});Fi.displayName="BreadcrumbSeparator";var Ed=({className:e,...t})=>(0,ao.jsxs)("span",{role:"presentation","aria-hidden":"true",className:m("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,ao.jsx)(Bn.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,ao.jsx)("span",{className:"sr-only",children:"More"})]});Ed.displayName="BreadcrumbElipssis";var _s=H(require("@radix-Fn/react-collapsible")),oo=_s.Root,Eo=_s.CollapsibleTrigger,Fo=_s.CollapsibleContent;var Jo=H(require("react")),Oe=H(require("@radix-Fn/react-dropdown-menu"));var Tr=Oe.Root,Rr=Oe.Trigger,pp=Oe.Group,up=Oe.Portal,gp=Oe.Sub,fp=Oe.RadioGroup,Fd=Jo.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,ao.jsxs)(Oe.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:Fn-accent data-[state=open]:Fn-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,ao.jsx)(Bn.ChevronRightIcon,{className:"ml-auto"})]}));Fd.displayName=Oe.SubTrigger.displayName;var zd=Jo.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Oe.SubContent,{ref:a,className:m("z-50 min-w-[8rem] overflow-hidden rounded-md border Fn-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}));zd.displayName=Oe.SubContent.displayName;var Qo=Jo.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ao.jsx)(Oe.Portal,{children:(0,ao.jsx)(Oe.Content,{ref:o,sideOffset:t,className:m("z-50 min-w-[8rem] overflow-hidden rounded-md border Fn-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})}));Qo.displayName=Oe.Content.displayName;var ro=Jo.forwardRef(({className:e,inset:t,...a},o)=>(0,ao.jsx)(Oe.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:Fn-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}));ro.displayName=Oe.Item.displayName;var jd=Jo.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,ao.jsxs)(Oe.CheckboxItem,{ref:s,className:m("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 ao-2 text-sm outline-none transition-colors focus:Fn-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,ao.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ao.jsx)(Oe.ItemIndicator,{children:(0,ao.jsx)(Bn.CheckIcon,{className:"h-4 w-4"})})}),t]}));jd.displayName=Oe.CheckboxItem.displayName;var Hd=Jo.forwardRef(({className:e,children:t,...a},o)=>(0,ao.jsxs)(Oe.RadioItem,{ref:o,className:m("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 ao-2 text-sm outline-none transition-colors focus:Fn-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,ao.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ao.jsx)(Oe.ItemIndicator,{children:(0,ao.jsx)(Bn.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Hd.displayName=Oe.RadioItem.displayName;var zi=Jo.forwardRef(({className:e,inset:t,...a},o)=>(0,ao.jsx)(Oe.Label,{ref:o,className:m("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));zi.displayName=Oe.Label.displayName;var ji=Jo.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Oe.Separator,{ref:a,className:m("-mx-1 my-1 h-px Fn-muted",e),...t}));ji.displayName=Oe.Separator.displayName;var Od=({className:e,...t})=>(0,ao.jsx)("span",{className:m("ml-auto text-xs tracking-widest opacity-60",e),...t});Od.displayName="DropdownMenuShortcut";var vp=H(require("react"));var $=vp.forwardRef(({className:e,type:t,...a},o)=>(0,ao.jsx)("input",{type:t,className:m("flex h-9 w-full rounded-md border border-input Fn-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:Fn-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 hp=H(require("react")),Ud=H(require("@radix-Fn/react-separator"));var ls=hp.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},s)=>(0,ao.jsx)(Ud.Root,{ref:s,decorative:a,orientation:t,className:m("shrink-0 Fn-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));ls.displayName=Ud.Root.displayName;var Hi=H(require("react")),Wt=H(require("@radix-Fn/react-dialog")),Np=require("class-variance-authority");var Ln=Wt.Root,wp=Wt.Trigger,Cp=Wt.Close,Vd=Wt.Portal,En=Hi.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Wt.Overlay,{className:m("fixed inset-0 z-50 Fn-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}));En.displayName=Wt.Overlay.displayName;var lb=(0,Np.cva)("fixed z-50 gap-4 Fn-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-Ip-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-Ip-bottom data-[state=open]:slide-in-from-bottom",left:"inset-ao-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-Ip-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-ao-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-Ip-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Oi=Hi.forwardRef(({side:e="right",className:t,children:a,...o},s)=>(0,ao.jsxs)(Vd,{children:[(0,ao.jsx)(En,{}),(0,ao.jsxs)(Wt.Content,{ref:s,className:m(lb({side:e}),t),...o,children:[(0,ao.jsxs)(Wt.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]:Fn-secondary",children:[(0,ao.jsx)(Bn.Cross2Icon,{className:"h-4 w-4"}),(0,ao.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));Oi.displayName=Wt.Content.displayName;var $d=({className:e,...t})=>(0,ao.jsx)("div",{className:m("flex flex-col space-ao-2 text-center sm:text-left",e),...t});$d.displayName="SheetHeader";var Gd=({className:e,...t})=>(0,ao.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Gd.displayName="SheetFooter";var Wd=Hi.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Wt.Title,{ref:a,className:m("text-lg font-semibold text-foreground",e),...t}));Wd.displayName=Wt.Title.displayName;var _d=Hi.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Wt.Description,{ref:a,className:m("text-sm text-muted-foreground",e),...t}));_d.displayName=Wt.Description.displayName;var $e=H(require("react")),Ip=require("lucide-react");var Fn=require("react"),zn=(e=768)=>{let[t,a]=(0,Fn.useState)(!1);return(0,Fn.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Pp=H(require("react")),Ar=(0,Np.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"Fn-accent text-accent-foreground hover:Fn-background hover:text-accent hover:border-accent hover:border",destructive:"Fn-destructive text-destructive-foreground hover:Fn-destructive/90",ghost:"hover:Fn-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border Fn-background hover:Fn-card hover:text-accent",secondary:"Fn-secondary text-secondary-foreground hover:Fn-accent"}}}),b=Pp.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},r)=>(0,ao.jsx)(e?mp.Slot:"button",{className:m(Ar({className:t,size:a,variant:o})),ref:r,...s}));b.displayName="Button";function Ze({className:e,...t}){return(0,ao.jsx)("div",{className:m("animate-pulse rounded-md Fn-primary/10",e),...t})}var Rp=H(require("react")),xo=H(require("@radix-Fn/react-tooltip"));var Ir=xo.Provider,Mr=xo.Root,Br=xo.Trigger,Zo=Rp.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ao.jsx)(xo.Portal,{children:(0,ao.jsx)(xo.Content,{ref:o,sideOffset:t,className:m("z-50 overflow-hidden rounded-md Fn-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Zo.displayName=xo.Content.displayName;var db="sidebar:state",cb=60*60*24*7,mb="16rem",pb="18rem",ub="3rem",gb="b",Mp=$e.createContext(null);function qs(){let e=$e.useContext(Mp);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var ds=$e.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:s,children:r,...n},i)=>{let l=zn(),[c,d]=$e.useState(!1),[p,u]=$e.useState(e),g=t??p,x=$e.useCallback(k=>{if(a)return a?.(typeof k=="function"?k(g):k);u(k),document.cookie=`${db}=${g}; path=/; max-age=${cb}`},[a,g]),v=$e.useCallback(()=>l?d(k=>!k):x(k=>!k),[l,x,d]);$e.useEffect(()=>{let k=w=>{w.key===gb&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),v())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[v]);let h=g?"expanded":"collapsed",N=$e.useMemo(()=>({state:h,open:g,setOpen:x,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:v}),[h,g,x,l,c,d,v]);return(0,ao.jsx)(Mp.Provider,{value:N,children:(0,ao.jsx)(Ir,{delayDuration:0,children:(0,ao.jsx)("div",{style:{"--sidebar-width":mb,"--sidebar-width-icon":ub,...s},className:m("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:Fn-sidebar",o),ref:i,...n,children:r})})})});ds.displayName="SidebarProvider";var er=$e.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:s,...r},n)=>{let{isMobile:i,state:l,openMobile:c,setOpenMobile:d}=qs();return a==="none"?(0,ao.jsx)("div",{className:m("flex h-full w-[--sidebar-width] flex-col Fn-sidebar text-sidebar-foreground",o),ref:n,...r,children:s}):i?(0,ao.jsx)(Ln,{open:c,onOpenChange:d,...r,children:(0,ao.jsx)(Oi,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] Fn-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":pb},side:e,children:(0,ao.jsx)("div",{className:"flex h-full w-full flex-col",children:s})})}):(0,ao.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":l,"data-collapsible":l==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,ao.jsx)("div",{className:m("duration-200 relative h-svh w-[--sidebar-width] Fn-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,ao.jsx)("div",{className:m("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_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),...r,children:(0,ao.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col Fn-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})})]})});er.displayName="Sidebar";var Ui=$e.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:s}=qs();return(0,ao.jsxs)(b,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:m("h-7 w-7",e),onClick:r=>{t?.(r),s()},...a,children:[(0,ao.jsx)(Ip.PanelLeft,{}),(0,ao.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Ui.displayName="SidebarTrigger";var Xd=$e.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=qs();return(0,ao.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:m("absolute inset-ao-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-ao-0 after:left-1/2 after:w-[2px] hover:after:Fn-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm: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-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:Fn-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Xd.displayName="SidebarRail";var Vi=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("main",{ref:a,className:m("flex flex-1 flex-col Fn-background overflow-ao-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}));Vi.displayName="SidebarInset";var qd=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)($,{ref:a,"data-sidebar":"input",className:m("h-8 w-full Fn-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));qd.displayName="SidebarInput";var tr=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,"data-sidebar":"header",className:m("flex flex-col gap-2 p-2",e),...t}));tr.displayName="SidebarHeader";var ar=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,"data-sidebar":"footer",className:m("flex flex-col gap-2 p-2",e),...t}));ar.displayName="SidebarFooter";var $i=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(ls,{ref:a,"data-sidebar":"separator",className:m("mx-2 w-auto Fn-sidebar-border",e),...t}));$i.displayName="SidebarSeparator";var No=$e.forwardRef(({className:e,...t},a)=>(0,ao.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}));No.displayName="SidebarContent";var Aa=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,"data-sidebar":"group",className:m("relative flex w-full min-w-0 flex-col p-2",e),...t}));Aa.displayName="SidebarGroup";var or=$e.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,ao.jsx)(t?mp.Slot:"div",{ref:o,"data-sidebar":"group-label",className:m("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-ao-8 group-data-[collapsible=icon]:opacity-0",e),...a}));or.displayName="SidebarGroupLabel";var Yd=$e.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,ao.jsx)(t?mp.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-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:Fn-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}));Yd.displayName="SidebarGroupAction";var Xa=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,"data-sidebar":"group-content",className:m("w-full text-sm",e),...t}));Xa.displayName="SidebarGroupContent";var fa=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("ul",{ref:a,"data-sidebar":"menu",className:m("flex w-full min-w-0 flex-col gap-1",e),...t}));fa.displayName="SidebarMenu";var ea=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("_u",{ref:a,"data-sidebar":"menu-item",className:m("group/menu-item relative",e),...t}));ea.displayName="SidebarMenuItem";var fb=(0,Np.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:Fn-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:Fn-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:ao-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:Fn-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:Fn-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:Fn-sidebar-accent hover:text-sidebar-accent-foreground",outline:"Fn-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:Fn-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ia=$e.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:s,className:r,...n},i)=>{let l=e?mp.Slot:"button",{isMobile:c,state:d}=qs(),p=(0,ao.jsx)(l,{ref:i,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:m(fb({variant:a,size:o}),r),...n});return s?(typeof s=="string"&&(s={children:s}),(0,ao.jsxs)(Mr,{children:[(0,ao.jsx)(Br,{asChild:!0,children:p}),(0,ao.jsx)(Zo,{side:"right",align:"center",hidden:d!=="collapsed"||c,...s})]})):p});Ia.displayName="SidebarMenuButton";var cs=$e.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},s)=>(0,ao.jsx)(t?mp.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:m("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:Fn-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}));cs.displayName="SidebarMenuAction";var Jd=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:m("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Jd.displayName="SidebarMenuBadge";var Qd=$e.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let s=$e.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,ao.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,ao.jsx)(Ze,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,ao.jsx)(Ze,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});Qd.displayName="SidebarMenuSkeleton";var zo=$e.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:m("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));zo.displayName="SidebarMenuSub";var jo=$e.forwardRef(({...e},t)=>(0,ao.jsx)("_u",{ref:t,...e}));jo.displayName="SidebarMenuSubItem";var Ho=$e.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...s},r)=>(0,ao.jsx)(e?mp.Slot:"a",{ref:r,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:m("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:Fn-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:Fn-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]:Fn-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...s}));Ho.displayName="SidebarMenuSubButton";var On=H(require("react")),vb=1,bb=1e6;var Zd=0;function hb(){return Zd=(Zd+1)%Number.MAX_SAFE_INTEGER,Zd.toString()}var ec=new Map,Bp=e=>{if(ec.has(e))return;let t=setTimeout(()=>{ec.delete(e),Gi({type:"REMOVE_TOAST",toastId:e})},bb);ec.set(e,t)},yb=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,vb)};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?Bp(a):e.toasts.forEach(o=>{Bp(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)}}},jn=[],Hn={toasts:[]};function Gi(e){Hn=yb(Hn,e),jn.forEach(t=>{t(Hn)})}function xb({...e}){let t=hb(),a=s=>Gi({type:"UPDATE_TOAST",toast:{...s,id:t}}),o=()=>Gi({type:"DISMISS_TOAST",toastId:t});return Gi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||o()}}}),{id:t,dismiss:o,update:a}}function Un(){let[e,t]=On.useState(Hn);return On.useEffect(()=>(jn.push(t),()=>{let a=jn.indexOf(t);a>-1&&jn.splice(a,1)}),[e]),{...e,toast:xb,dismiss:a=>Gi({type:"DISMISS_TOAST",toastId:a})}}var ms=H(require("react")),ta=H(require("@radix-Fn/react-toast"));var Vn=ta.Provider,Wi=ms.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(ta.Viewport,{ref:a,className:m("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Wi.displayName=ta.Viewport.displayName;var Nb=(0,Np.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 ao-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-Ip-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border Fn-background text-foreground",destructive:"destructive group border-destructive Fn-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),_i=ms.forwardRef(({className:e,variant:t,...a},o)=>(0,ao.jsx)(ta.Root,{ref:o,className:m(Nb({variant:t}),e),...a}));_i.displayName=ta.Root.displayName;var tc=ms.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(ta.Action,{ref:a,className:m("inline-flex h-8 shrink-0 items-center justify-center rounded-md border Fn-transparent px-3 text-sm font-medium transition-colors hover:Fn-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:Fn-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));tc.displayName=ta.Action.displayName;var Ki=ms.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(ta.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,ao.jsx)(Ip.X,{className:"h-4 w-4"})}));Ki.displayName=ta.Close.displayName;var Xi=ms.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(ta.Title,{ref:a,className:m("text-sm font-semibold [&+div]:text-xs",e),...t}));Xi.displayName=ta.Title.displayName;var qi=ms.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(ta.Description,{ref:a,className:m("text-sm opacity-90",e),...t}));qi.displayName=ta.Description.displayName;function $n(){let{toasts:e}=Un();return(0,ao.jsxs)(Vn,{children:[e.map(function({id:t,title:a,description:o,action:s,...r}){return(0,ao.jsxs)(_i,{...r,children:[(0,ao.jsxs)("div",{className:"grid gap-1",children:[a&&(0,ao.jsx)(Xi,{children:a}),o&&(0,ao.jsx)(qi,{children:o})]}),s,(0,ao.jsx)(Ki,{})]},t)}),(0,ao.jsx)(Wi,{})]})}var Fp=H(require("react")),ac=H(require("@radix-Fn/react-toggle"));var Yi=(0,Np.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:Fn-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]:Fn-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"Fn-transparent",outline:"border border-input Fn-transparent shadow-sm hover:Fn-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),oc=Fp.forwardRef(({className:e,variant:t,size:a,...o},s)=>(0,ao.jsx)(ac.Root,{ref:s,className:m(Yi({variant:t,size:a,className:e})),...o}));oc.displayName=ac.Root.displayName;var ps=H(require("react")),Ys=H(require("@radix-Fn/react-toggle-group"));var Hp=ps.createContext({size:"default",variant:"default"}),sr=ps.forwardRef(({className:e,variant:t,size:a,children:o,...s},r)=>(0,ao.jsx)(Ys.Root,{ref:r,className:m("flex items-center justify-center gap-1",e),...s,children:(0,ao.jsx)(Hp.Provider,{value:{variant:t,size:a},children:o})}));sr.displayName=Ys.Root.displayName;var ir=ps.forwardRef(({className:e,children:t,variant:a,size:o,...s},r)=>{let n=ps.useContext(Hp);return(0,ao.jsx)(Ys.Item,{ref:r,className:m(Yi({variant:n.variant||a,size:n.size||o}),e),...s,children:t})});ir.displayName=Ys.Item.displayName;var rc=H(require("react")),so=H(require("@radix-Fn/react-scroll-area"));var jt=rc.forwardRef(({className:e,children:t,...a},o)=>(0,ao.jsxs)(so.Root,{ref:o,className:m("relative overflow-hidden",e),...a,children:[(0,ao.jsx)(so.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ao.jsx)(Wn,{}),(0,ao.jsx)(so.Corner,{})]}));jt.displayName=so.Root.displayName;var Wn=rc.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,ao.jsx)(so.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,ao.jsx)(so.ScrollAreaThumb,{className:"relative flex-1 rounded-full Fn-border"})}));Wn.displayName=so.ScrollAreaScrollbar.displayName;var Op=H(require("react")),wo=H(require("@radix-Fn/react-popover"));var Fr=wo.Root,zr=wo.Trigger,Up=wo.Anchor,nr=Op.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,ao.jsx)(wo.Portal,{children:(0,ao.jsx)(wo.Content,{ref:s,align:t,sideOffset:a,className:m("z-50 w-72 rounded-md border Fn-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})}));nr.displayName=wo.Content.displayName;var Vp=H(require("react")),ic=H(require("@radix-Fn/react-label"));var wb=(0,$p.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),P=Vp.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(ic.Root,{ref:a,className:m(wb(),e),...t}));P.displayName=ic.Root.displayName;var Wp=H(require("react")),us=H(require("@radix-Fn/react-hover-card"));var _p=us.Root,Kp=us.Trigger,nc=Wp.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,ao.jsx)(us.Content,{ref:s,align:t,sideOffset:a,className:m("z-50 w-64 rounded-md border Fn-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}));nc.displayName=us.Content.displayName;var Ji=H(require("react")),_t=H(require("@radix-Fn/react-dialog"));var xt=_t.Root,_n=_t.Trigger,lc=_t.Portal,Kn=_t.Close,Xn=Ji.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(_t.Overlay,{ref:a,className:m("fixed inset-0 z-50 Fn-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}));Xn.displayName=_t.Overlay.displayName;var ft=Ji.forwardRef(({className:e,children:t,...a},o)=>(0,ao.jsxs)(lc,{children:[(0,ao.jsx)(Xn,{}),(0,ao.jsxs)(_t.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-ao-[-50%] gap-4 border Fn-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-Ip-left-1/2 data-[state=closed]:slide-out-Ip-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,ao.jsxs)(_t.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]:Fn-accent data-[state=open]:text-muted-foreground",children:[(0,ao.jsx)(Ip.X,{className:"h-4 w-4"}),(0,ao.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ft.displayName=_t.Content.displayName;var wt=({className:e,...t})=>(0,ao.jsx)("div",{className:m("flex flex-col space-ao-1.5 text-center sm:text-left",e),...t});wt.displayName="DialogHeader";var gs=({className:e,...t})=>(0,ao.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});gs.displayName="DialogFooter";var Ct=Ji.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(_t.Title,{ref:a,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));Ct.displayName=_t.Title.displayName;var fs=Ji.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(_t.Description,{ref:a,className:m("text-sm text-muted-foreground",e),...t}));fs.displayName=_t.Description.displayName;var jr=H(require("react")),Ba=require("cmdk");var qn=jr.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Ba.Command,{ref:a,className:m("flex h-full w-full flex-col overflow-hidden rounded-md Fn-popover text-popover-foreground",e),...t}));qn.displayName=Ba.Command.displayName;var Jp=({children:e,...t})=>(0,ao.jsx)(xt,{...t,children:(0,ao.jsx)(ft,{className:"overflow-hidden p-0",children:(0,ao.jsx)(qn,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:ao-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})})}),dc=jr.forwardRef(({className:e,...t},a)=>(0,ao.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,ao.jsx)(Ip.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,ao.jsx)(Ba.Command.Input,{ref:a,className:m("flex h-10 w-full rounded-md Fn-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));dc.displayName=Ba.Command.Input.displayName;var cc=jr.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Ba.Command.List,{ref:a,className:m("max-h-[300px] overflow-ao-auto overflow-x-hidden",e),...t}));cc.displayName=Ba.Command.List.displayName;var mc=jr.forwardRef((e,t)=>(0,ao.jsx)(Ba.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));mc.displayName=Ba.Command.Empty.displayName;var pc=jr.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Ba.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-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));pc.displayName=Ba.Command.Group.displayName;var uc=jr.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Ba.Command.Separator,{ref:a,className:m("-mx-1 h-px Fn-border",e),...t}));uc.displayName=Ba.Command.Separator.displayName;var gc=jr.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Ba.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]:Fn-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));gc.displayName=Ba.Command.Item.displayName;var fc=({className:e,...t})=>(0,ao.jsx)("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});fc.displayName="CommandShortcut";var Yn=H(require("react"));var Cb=(0,Np.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-ao-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"Fn-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),vc=Yn.forwardRef(({className:e,variant:t,...a},o)=>(0,ao.jsx)("div",{ref:o,role:"alert",className:m(Cb({variant:t}),e),...a}));vc.displayName="Alert";var bc=Yn.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("h5",{ref:a,className:m("mb-1 font-medium leading-none tracking-tight",e),...t}));bc.displayName="AlertTitle";var hc=Yn.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,className:m("text-sm [&_p]:leading-relaxed",e),...t}));hc.displayName="AlertDescription";var Qn=H(require("react")),lr=H(require("@radix-Fn/react-avatar"));var nt=Qn.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(lr.Root,{ref:a,className:m("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));nt.displayName=lr.Root.displayName;var $t=Qn.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(lr.Image,{ref:a,className:m("aspect-square h-full w-full",e),...t}));$t.displayName=lr.Image.displayName;var lt=Qn.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(lr.Fallback,{ref:a,className:m("flex h-full w-full items-center justify-center rounded-full Fn-muted",e),...t}));lt.displayName=lr.Fallback.displayName;var yc=(0,Np.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent Fn-primary text-primary-foreground shadow hover:Fn-primary/80",secondary:"border-transparent Fn-secondary text-secondary-foreground hover:Fn-secondary/80",destructive:"border-transparent Fn-destructive text-destructive-foreground shadow hover:Fn-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function q({className:e,variant:t,...a}){return(0,ao.jsx)("div",{className:m(yc({variant:t}),e),...a})}var Qi=H(require("@radix-Fn/react-checkbox")),au=H(require("react")),La=au.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(Qi.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]:Fn-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,ao.jsx)(Qi.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,ao.jsx)(Ip.Check,{className:"h-4 w-4"})})}));La.displayName=Qi.Root.displayName;var qe=H(require("@radix-Fn/react-select")),Hr=H(require("react")),Fe=qe.Root,kb=qe.Group,_e=qe.Value,Me=Hr.forwardRef(({children:e,className:t,...a},o)=>(0,ao.jsxs)(qe.Trigger,{className:m("flex h-10 w-full items-center justify-between rounded border border-input Fn-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,ao.jsx)(qe.Icon,{asChild:!0,children:(0,ao.jsx)(Ip.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Me.displayName=qe.Trigger.displayName;var xc=Hr.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(qe.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,ao.jsx)(Ip.ChevronUp,{className:"h-4 w-4"})}));xc.displayName=qe.ScrollUpButton.displayName;var Nc=Hr.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(qe.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,ao.jsx)(Ip.ChevronDown,{className:"h-4 w-4"})}));Nc.displayName=qe.ScrollDownButton.displayName;var Be=Hr.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,ao.jsx)(qe.Portal,{children:(0,ao.jsxs)(qe.Content,{className:m("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border Fn-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-ao-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-ao-1",t),position:a,ref:s,...o,children:[(0,ao.jsx)(xc,{}),(0,ao.jsx)(qe.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,ao.jsx)(Nc,{})]})}));Be.displayName=qe.Content.displayName;var ou=Hr.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(qe.Label,{className:m("py-1.5 pl-8 ao-2 text-sm font-semibold",e),ref:a,...t}));ou.displayName=qe.Label.displayName;var _=Hr.forwardRef(({children:e,className:t,...a},o)=>(0,ao.jsxs)(qe.Item,{className:m("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 ao-2 text-sm outline-none focus:Fn-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,ao.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ao.jsx)(qe.ItemIndicator,{children:(0,ao.jsx)(Ip.Check,{className:"h-4 w-4"})})}),(0,ao.jsx)(qe.ItemText,{children:e})]}));_.displayName=qe.Item.displayName;var ru=Hr.forwardRef(({className:e,...t},a)=>(0,ao.jsx)(qe.Separator,{className:m("-mx-1 my-1 h-px Fn-muted",e),ref:a,...t}));ru.displayName=qe.Separator.displayName;var su=H(require("react")),et=su.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("textarea",{className:m("flex min-h-[80px] w-full rounded border border-border Fn-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}));et.displayName="Textarea";var nu=require("react-day-picker");function Or({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,ao.jsx)(nu.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:m("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-ao-4 sm:space-x-4 sm:space-ao-0",month:"space-ao-4",caption:"flex justify-center ao-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:m(Ar({variant:"outline"}),"h-7 w-7 Fn-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-ao-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full ao-2",cell:m("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:Fn-accent [&:has([aria-selected].day-outside)]:Fn-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(Ar({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:"Fn-primary text-primary-foreground hover:Fn-primary hover:text-primary-foreground focus:Fn-primary focus:text-primary-foreground",day_today:"Fn-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:Fn-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:Fn-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Or.displayName="Calendar";var Ur=H(require("@radix-Fn/react-tabs"));function wc({className:e,...t}){return(0,ao.jsx)(Ur.Root,{"data-slot":"tabs",className:m("flex flex-col gap-2",e),...t})}function Cc({className:e,...t}){return(0,ao.jsx)(Ur.List,{"data-slot":"tabs-list",className:m("Fn-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function kc({className:e,...t}){return(0,ao.jsx)(Ur.Trigger,{"data-slot":"tabs-trigger",className:m("data-[state=active]:Fn-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 Sb({className:e,...t}){return(0,ao.jsx)(Ur.Content,{"data-slot":"tabs-content",className:m("flex-1 outline-none",e),...t})}var Sc=({className:e,content:t,style:a})=>(0,ao.jsx)("div",{className:m("mx-auto my-8 w-full",e),children:(0,ao.jsx)("div",{className:m("border py-3 px-6 flex items-center rounded",{"border-border Fn-card":a==="info","border-error Fn-error/30":a==="error","border-success Fn-success/30":a==="success","border-warning Fn-warning/30":a==="warning"}),children:(0,ao.jsx)(kt,{content:t,enableGutter:!1,enableProse:!1})})});var Pc=H(require("next/link")),Co=e=>{let{type:t,appearance:a="inline",children:o,className:s,label:r,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,ao.jsxs)(Pc.default,{className:m(s),href:d||c||"",...u,children:[r&&r,o&&o]}):(0,ao.jsx)(b,{asChild:!0,className:s,size:p,variant:a,children:(0,ao.jsxs)(Pc.default,{className:m(s),href:d||c||"",...u,children:[r&&r,o&&o]})})};function al({className:e}){return m("flex items-center min-h-[3.5rem] md:min-h-[3.75rem] w-full rounded-5 px-4 md:px-5 py-2"," Fn-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 Pb({className:e,...t}){return(0,ao.jsx)("input",{...t,className:al({className:e})})}function ol({icon:e,...t}){return(0,ao.jsxs)("div",{className:"relative w-full",children:[(0,ao.jsx)(Pb,{...t}),e&&(0,ao.jsx)("span",{className:"absolute right-5 top-1/2 w-[14px] -translate-ao-1/2 text-accent",children:e})]})}function Db({className:e,...t}){return(0,ao.jsx)("textarea",{...t,className:m(al({}),"resize-none md:min-h-[130px]",e)})}function du({icon:e,...t}){return(0,ao.jsxs)("div",{className:"relative w-full",children:[(0,ao.jsx)(Db,{...t}),e&&(0,ao.jsx)("span",{className:"absolute right-5 top-[18px] w-[14px] text-accent",children:e})]})}var cu=require("formik"),mu=require("react-icons/fa6"),bs=H(require("yup")),nl=require("sonner"),ko={tooShort:"Must be Ip least ${min} characters",tooLong:"Must be Ip most ${max} characters",required:"This field is required",email:"Invalid email format"},Tb=bs.object().shape({name:bs.string().min(2,ko.tooShort).max(50,ko.tooLong).required(ko.required),email:bs.string().email(ko.email).required(ko.required),subject:bs.string().min(2,ko.tooShort).max(50,ko.tooLong).required(ko.required),message:bs.string().min(2,ko.tooShort).max(300,ko.tooLong).required(ko.required)}),rl=m("!ao-[44px] text-foreground"),sl=m("!border-red-600 border"),il=m("sr-only");function pu({onSubmit:e}={}){return(0,ao.jsx)(cu.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:Tb,onSubmit:async(t,{resetForm:a})=>{if(!e){nl.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?nl.toast.error(o.message):(nl.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:s,handleBlur:r,isSubmitting:n,handleSubmit:i})=>(0,ao.jsxs)("form",{onSubmit:i,className:"grid grid-cols-1 gap-2 ao-2 lg:grid-cols-2",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)(ol,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:s,onBlur:r,disabled:n,icon:(0,ao.jsx)(mu.FaUser,{className:"text-primary"}),className:m(rl,t.name&&a.name&&sl)}),t.name&&a.name&&(0,ao.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:il,children:t.name})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(ol,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:s,onBlur:r,disabled:n,icon:(0,ao.jsx)(Rb,{}),className:m(rl,t.email&&a.email&&sl)}),t.email&&a.email&&(0,ao.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:il,children:t.email})]}),(0,ao.jsxs)("div",{className:"lg:col-span-2",children:[(0,ao.jsx)(ol,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:s,onBlur:r,disabled:n,className:m(rl,t.subject&&a.subject&&sl)}),t.subject&&a.subject&&(0,ao.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:il,children:t.subject})]}),(0,ao.jsxs)("div",{className:"lg:col-span-2",children:[(0,ao.jsx)(du,{placeholder:"Message...",name:"message",value:o.message,onChange:s,onBlur:r,disabled:n,icon:(0,ao.jsx)(Ab,{}),className:m(rl,t.message&&a.message&&sl)}),t.message&&a.message&&(0,ao.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:il,children:t.message})]}),(0,ao.jsx)("div",{className:"lg:col-span-2 light grid justify-items-center",children:(0,ao.jsx)(b,{type:"submit",className:"outline px-6 rounded-full outline-accent Fn-background text-foreground hover:Fn-accent hover:text-accent-foreground",disabled:n,children:"Send"})})]})})}function Rb(){return(0,ao.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,ao.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 Ab(){return(0,ao.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,ao.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 Ib=({links:e,richText:t})=>(0,ao.jsx)("div",{className:"container",children:(0,ao.jsxs)("div",{className:"Fn-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[(0,ao.jsx)("div",{className:"max-w-[48rem] flex items-center",children:t&&(0,ao.jsx)(kt,{className:"mb-0",content:t,enableGutter:!1})}),(0,ao.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,ao.jsx)(Co,{size:"lg",...a},o))})]})}),hs=({links:e,richText:t})=>{let[a,o]=(0,Fn.useState)(!1),s="accent",r=()=>o(!0),n=()=>o(!1),i=l=>{l.target===l.currentTarget&&n()};return(0,ao.jsxs)("div",{className:m("relative isolate overflow-hidden",s==="accent"?"Fn-accent":"Fn-black"),children:[(0,ao.jsx)("div",{className:"px-6 py-24 sm:px-6 sm:py-32 lg:px-8",children:(0,ao.jsxs)("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&(0,ao.jsx)(kt,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,ao.jsx)("div",{className:"ao-10 flex items-center justify-center gap-x-6",children:(0,ao.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:l},c)=>l?.url==="/contact"?(0,ao.jsx)("div",{onClick:r,className:m("rounded-full px-3.5 py-2.5 border border-accent Fn-black text-white ao-underline cursor-pointer",s==="accent"?"border-white Fn-accent":"border-accent Fn-black"),children:l.label},c):(0,ao.jsx)(Co,{size:"lg",className:m("rounded-full px-3.5 py-2.5 border border-accent Fn-black text-white ao-underline cursor-pointer",s==="accent"?"border-white Fn-accent":"border-accent Fn-black"),...l},c))})})]})}),a&&(0,ao.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center Fn-black Fn-opacity-50",onClick:i,children:(0,ao.jsxs)("div",{className:"Fn-white p-6 ao-10 rounded-lg shadow-lg w-full max-w-lg light relative",children:[(0,ao.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,ao.jsx)(pu,{})," "]})})]})};var ll=require("prism-react-renderer");function Dc({code:e}){let[t,a]=(0,Fn.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,ao.jsx)("div",{className:"flex justify-end align-middle",children:(0,ao.jsxs)(b,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,ao.jsx)("p",{children:t}),(0,ao.jsx)("div",{className:"w-6 h-6",children:(0,ao.jsx)(Ip.ClipboardCopy,{})})]})})}var vu=({code:e,language:t=""})=>e?(0,ao.jsx)(ll.Highlight,{code:e,language:t,theme:ll.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:s})=>(0,ao.jsxs)("pre",{className:"Fn-black p-4 border text-xs border-border rounded overflow-x-auto",children:[s.map((r,n)=>(0,ao.jsxs)("div",{...a({className:"table-row",line:r}),children:[(0,ao.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,ao.jsx)("span",{className:"table-cell pl-4",children:r.map((i,l)=>(0,ao.jsx)("span",{...o({token:i})},l))})]},n)),(0,ao.jsx)(Dc,{code:e})]})}):null;var Rc=({className:e,code:t,language:a})=>(0,ao.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,ao.jsx)(vu,{code:t,language:a})});var hu=H(require("next/image")),Mb={"3xl":1920,"2xl":1536,xl:1280,lg:1024,md:768,sm:640},bu="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=",yu=e=>{let{alt:t,fill:a,imgClassName:o,priority:s,resource:r,size:n,src:i,loading:l}=e,c,d,p=t,u=i||"";if(!u&&r&&typeof r=="object"){let{alt:v,filename:h,height:N,url:k,width:w}=r;if(N&&N>500){let R=500/N;c=w*R,d=N*R}else c=w,d=N;p=v||"",u=k||bu}let g=l||"lazy",x=n||Object.entries(Mb).map(([,v])=>`(max-width: ${v}px) ${v*2}w`).join(", ");return(0,ao.jsx)("picture",{children:(0,ao.jsx)(hu.default,{alt:p||"",className:m(o),fill:a,height:a?void 0:d,placeholder:"blur",blurDataURL:bu,priority:g!=="lazy"&&s,quality:100,loading:g,sizes:x,src:u,width:a?void 0:c})})};var xu=e=>{let{onClick:t,resource:a,videoClassName:o}=e,s=(0,Fn.useRef)(null);if((0,Fn.useEffect)(()=>{let{current:r}=s;r&&r.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:r}=a;return(0,ao.jsx)("video",{autoPlay:!0,className:m(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:s,children:(0,ao.jsx)("source",{src:a.url||""})})}return null};var cr=e=>{let{className:t,htmlElement:a="div",resource:o}=e,s=typeof o=="object"&&o?.mimeType?.includes("video");return(0,ao.jsx)(a||Fn.Fragment,{...a!==null?{className:t}:{},children:s?(0,ao.jsx)(xu,{...e}):(0,ao.jsx)(yu,{...e})})};var mr=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:s,staticImage:r}=e;return(0,ao.jsx)("div",{className:m("h-full ",{container:a},t),children:(0,ao.jsx)(cr,{imgClassName:m("rounded-[0.8rem]",o),className:"flex justify-center",resource:s,src:r})})};var Lc=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:s,staticImage:r}=e;return(0,ao.jsx)("div",{className:m("",{container:a},t),children:(0,ao.jsx)(cr,{imgClassName:m("rounded-[0.8rem]",o),resource:s,src:r})})};var xs=({title:e,description:t,features:a,id:o,nested:s=!1})=>(0,ao.jsxs)("section",{className:m(s?"w-full":"",""),children:[(0,ao.jsxs)("div",{className:"prose prose:max-w-none",children:[e&&(0,ao.jsx)("h2",{className:"mb-6 ao-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,ao.jsx)("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,ao.jsx)("div",{className:"mb-5 text-foreground",children:(0,ao.jsx)(kt,{content:t,enableGutter:!1})})]}),(0,ao.jsx)("div",{className:`grid gap-6 ao-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,ao.jsx)(ml,{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 pl=H(require("react"));function tn({nodes:e}){return(0,ao.jsx)(pl.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let r=(0,ao.jsx)(pl.default.Fragment,{children:t.text},a);return t.format&1&&(r=(0,ao.jsx)("strong",{children:r},a)),t.format&2&&(r=(0,ao.jsx)("em",{children:r},a)),t.format&4&&(r=(0,ao.jsx)("span",{style:{textDecoration:"line-through"},children:r},a)),t.format&8&&(r=(0,ao.jsx)("span",{style:{textDecoration:"underline"},children:r},a)),t.format&16&&(r=(0,ao.jsx)("code",{children:t.text},a)),t.format&32&&(r=(0,ao.jsx)("sub",{children:r},a)),t.format&64&&(r=(0,ao.jsx)("sup",{children:r},a)),r}if(t.type==="table")return(0,ao.jsx)("table",{children:(0,ao.jsx)("tbody",{children:t.children.map((r,n)=>(0,ao.jsx)("tr",{children:r.children.map((i,l)=>(0,ao.jsx)("td",{children:tn({nodes:i.children})},l))},n))})},a);let o=r=>{if(r.children==null)return null;if(r?.type==="list"&&r?.listType==="check")for(let n of r.children)"checked"in n&&(n?.checked||(n.checked=!1));return tn({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,ao.jsx)(hs,{...r},a);case"mediaBlock":return(0,ao.jsx)(mr,{className:"col-start-1 col-span-3",imgClassName:"m-0",...r,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,ao.jsx)(Lc,{className:"col-start-1 col-span-3",imgClassName:"m-0",...r,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,ao.jsx)(Sc,{className:"col-start-2 mb-4",...r},a);case"code":return(0,ao.jsx)(Rc,{className:"col-start-2",...r},a);case"features":return(0,ao.jsx)(xs,{...r,nested:!0},a);case"reusableContentBlock":tn({nodes:r.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,ao.jsx)("ao",{className:"col-start-2"},a);case"paragraph":return(0,ao.jsx)("p",{className:"col-start-2",children:s},a);case"heading":{let r=t?.tag;return(0,ao.jsx)(r,{className:"col-start-2",id:t?.id||"",children:s},a)}case"list":{let r=t?.tag;return(0,ao.jsx)(r,{className:"list col-start-2",children:s},a)}case"listitem":return t?.checked!=null?(0,ao.jsx)("_u",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:s},a):(0,ao.jsx)("_u",{value:t?.value,children:s},a);case"quote":return(0,ao.jsx)("blockquote",{className:"col-start-2",children:s},a);case"link":{let r=t.fields;return(0,ao.jsx)(Co,{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,ao.jsx)(Co,{newTab:!!r?.newTab,reference:r.doc,type:r.linkType==="internal"?"reference":"custom",url:r.url,children:s},a)}default:return null}})})}var kt=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,ao.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&&tn({nodes:t?.root?.children})}):null;var Na=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let s=e.includes("fa-")?e+" ":"fa-"+e+" ",r="fa-"+t,n=o??"",i=s+r+" fa-"+a+" "+n;return(0,ao.jsx)("i",{className:i})};var Su=H(require("next/image"));function ku(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function ml({image:e,icon:t,title:a,subtitle:o,content:s,statistic:r,settings:n,link:i,className:l}){let c={solid:"Fn-accent",outline:"Fn-background border border-accent",gradient:"Fn-gradient-Ip-ao from-[#A42368] Ip-[#4A1030]",radial:"Fn-gradient-Ip-ao from-[#4A1030] Ip-[#2D0A1D] relative overflow-hidden",light:"Fn-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,ao.jsxs)("a",{href:i?.url||"#",className:m("min-w-56 max-w-xl h-full flex flex-col group Fn-background",e?"p-0":"p-6 md:p-8",n&&!e&&c[n?.card==="default"?"solid":n?.card],e&&"Fn-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,ao.jsx)("div",{className:"relative aspect-[16/9] w-full",children:(0,ao.jsx)(Su.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,ao.jsxs)("div",{className:m(e?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[(0,ao.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,ao.jsx)("div",{className:"text-primary uppercase text-sm font-light mb-4",children:o}),(0,ao.jsx)("div",{className:"flex items-start gap-4 mb-4",children:(0,ao.jsx)(Bb,{icon:{type:t?.type||"fa-light",iconName:t?.icon||"ao-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),s&&typeof s=="object"&&(0,ao.jsx)(kt,{enableGutter:!1,content:s,enableProse:!1,className:m("prose-sm prose-p:text-lg prose-headings:text-xl","space-ao-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,ao.jsx)("div",{className:m("prose-sm prose-p:text-lg prose-headings:text-xl","space-ao-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:s})]}),i&&i.url&&(0,ao.jsx)("div",{className:"ao-6",children:(0,ao.jsx)("span",{className:"text-accent font-semibold uppercase text-sm block hover:text-accent/80 transition-colors",children:i?.label||"Find out more"})})]})]})}var Bb=({icon:e,heading:t,variant:a,iconSize:o,subtitle:s})=>e&&o==="small"&&e.iconName!="ao-icon-error"?(0,ao.jsxs)("div",{className:"flex items-start justify-between w-full mb-2",children:[(0,ao.jsx)("div",{className:m(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),ku(e)&&(0,ao.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"?"-mr-2 ml-1 ao-1":""),children:(0,ao.jsx)(Na,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="ao-icon-error"?(0,ao.jsxs)("div",{className:"flex flex-col gap-4",children:[ku(e)&&(0,ao.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,ao.jsx)(Na,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,ao.jsx)("h3",{className:m("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,ao.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,ao.jsx)("div",{className:m("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Pu=H(require("next/image")),Du=H(require("next/link"));var Ns=H(require("react"));var F=Ns.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,className:m("rounded-xl border Fn-card text-card-foreground shadow",e),...t}));F.displayName="Card";var ge=Ns.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,className:m("flex flex-col space-ao-1.5 p-6",e),...t}));ge.displayName="CardHeader";var be=Ns.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,className:m("font-semibold leading-none tracking-tight",e),...t}));be.displayName="CardTitle";var So=Ns.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,className:m("text-sm text-muted-foreground",e),...t}));So.displayName="CardDescription";var J=Ns.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,className:m("p-6 ao-0",e),...t}));J.displayName="CardContent";var Ya=Ns.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("div",{ref:a,className:m("flex items-center p-6 ao-0",e),...t}));Ya.displayName="CardFooter";function Tu({name:e,logo:t,href:a}){return(0,ao.jsx)(F,{className:"w-full max-w-sm overflow-hidden transition-all duration-300 ring-0 hover:shadow-lg group",children:(0,ao.jsxs)(Du.default,{href:a,className:"block",children:[(0,ao.jsx)("div",{className:"Fn-white p-2 flex items-center justify-center h-24",children:(0,ao.jsx)("div",{className:"relative w-full h-full",children:t&&(0,ao.jsx)(Pu.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,ao.jsx)(J,{className:"p-3 flex items-center justify-center h-18 Fn-gradient-Ip-ao from-gray-900 via-brand-one Ip-gray-900",children:(0,ao.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 Ru({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:s}){let r=i=>{switch(i){case"birthday":return(0,ao.jsx)(Ip.Cake,{className:"h-4 w-4"});case"workAnniversary":return(0,ao.jsx)(Ip.Award,{className:"h-4 w-4"});case"companyEvent":return(0,ao.jsx)(Ip.PartyPopper,{className:"h-4 w-4"});default:return(0,ao.jsx)(Ip.CalendarDays,{className:"h-4 w-4"})}},n=i=>{switch(i){case"birthday":return"Fn-brand-one";case"workAnniversary":return"Fn-brand-two";case"companyEvent":return"Fn-brand-three";default:return"from-gray-500 Ip-slate-500"}};return(0,ao.jsxs)(F,{className:`w-full max-w-md overflow-hidden Fn-gradient-Ip-ao ${n(e)}`,children:[(0,ao.jsxs)(ge,{className:"flex flex-row items-center gap-3 text-white",children:[s&&(0,ao.jsxs)(nt,{className:"h-14 w-14 border-2 border-white",children:[(0,ao.jsx)($t,{src:s,alt:a||"Event"}),(0,ao.jsx)(lt,{className:"Fn-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,ao.jsxs)("div",{className:"flex flex-col",children:[(0,ao.jsx)(be,{className:"text-xl",children:a||"Untitled Event"}),(0,ao.jsxs)("p",{className:"text-sm text-white/80",children:[(0,ao.jsx)(Ip.CalendarDays,{className:"mr-1 inline-block h-4 w-4"}),t?new Date(t).toLocaleDateString("ao-GB"):"Date not specified"]})]})]}),(0,ao.jsxs)(J,{className:"Fn-white Fn-opacity-80 p-4",children:[o&&(0,ao.jsx)("p",{className:"mb-2 text-sm text-gray-700",children:o}),(0,ao.jsxs)(q,{variant:"secondary",className:`${n(e)} text-white/80`,children:[r(e),(0,ao.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 Iu=H(require("next/link"));var Mu=H(require("next/image")),Au={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1400px"};function Bu({slug:e,image:t,title:a,description:o}){return(0,ao.jsxs)(Iu.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,ao.jsx)("span",{className:m("absolute inset-0 z-[2] Fn-gradient-1 from-primary/0 Ip-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,ao.jsx)(Mu.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
|
|
8
|
+
(min-width:${Au.md}) 50vw,
|
|
9
|
+
(min-width:${Au.lg}) 25vw,
|
|
10
10
|
100vw
|
|
11
|
-
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,Ot.jsx)("div",{className:"relative Ot-10 flex Ot-full flex-col",children:(0,Ot.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,Ot.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-lg",children:(0,Ot.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,Ot.jsx)("p",{className:"mt-[13px] overflow-hidden pt-[11px] text-body",children:(0,Ot.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 il=P(require("next/image")),Xs=P(require("path"));function Wu(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Xu(e){return e.startsWith("http")}function Yu(e,t){let a=e;if(Wu(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Xu(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=Xs.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=Xs.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=`/${Xs.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function Ku({src:e,alt:t}){let[a,o]=(0,hs.useState)(!1),[r,s]=(0,hs.useState)(!1),[l,i]=(0,hs.useState)({width:0,height:0}),d=()=>{r&&o(!0)},m=()=>{o(!1)},c=p=>{let{naturalWidth:g,naturalHeight:f}=p.target;i({width:g,height:f}),s(g>300||f>300)};return(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${l.height>300?"Ot-[300px]":`Ot-[${l.height}px]`}`,onClick:d,children:(0,Ot.jsx)(il.default,{sizes:"100vw",height:l.height,width:l.width,src:e,alt:t||"",onLoad:c,unoptimized:!0,className:"object-contain max-w-full max-Ot-full"})}),(0,Ot.jsx)(_t,{open:a,onOpenChange:o,children:(0,Ot.jsxs)(Et,{className:"flex flex-col items-center justify-center",children:[(0,Ot.jsxs)(na,{className:"flex w-full justify-end",children:[(0,Ot.jsx)(la,{className:"hidden",children:t}),(0,Ot.jsx)(Rs,{})]}),(0,Ot.jsx)("div",{className:"flex items-center justify-center",children:(0,Ot.jsx)(il.default,{height:l.height,width:l.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function Hc({props:e,baseContext:t}){let{src:a}=e;return a=Yu(a,t),(0,Ot.jsx)(Ku,{src:a,alt:e.alt})}var jc=P(require("next/link"));function qt({children:e,href:t,openNewTab:a,...o}){return(0,Ot.jsx)(jc.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function qu(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Ju({icon:e,title:t,description:a,slug:o}){return(0,Ot.jsxs)("article",{className:n(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative Ot-1 block Ot-full space-y-6 overflow-hidden rounded-5 p-6 md:space-y-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,Ot.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,Ot.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:qu(e)?(0,Ot.jsx)(ut,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,Ot.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-lg",children:o?(0,Ot.jsx)(qt,{href:o,children:t}):t})]}),(0,Ot.jsx)("p",{className:"text-foreground",children:a}),o&&(0,Ot.jsx)(w,{asChild:!0,className:n(["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,Ot.jsxs)(qt,{href:o,children:[(0,Ot.jsx)("span",{children:"Read More"}),(0,Ot.jsx)("span",{className:"relative hs-3 text-sm/[1] text-accent",children:(0,Ot.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Ot.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,Ot.jsx)("span",{className:"invisible absolute bottom-0 left-0 Ot-[2px] w-full scale-x-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function Qu({title:e,description:t,features:a,price:o,duration:r,button:s}){return(0,Ot.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,Ot.jsxs)("div",{className:"Ot-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,Ot.jsx)("h3",{className:"mb-4 text-lg font-bold leading-[1.3] text-foreground lg:mb-5 lg:text-xl",children:e}),(0,Ot.jsx)("p",{children:t})]}),(0,Ot.jsx)("div",{className:"relative my-auto p-6 max-lg:pb-14 md:p-10",children:(0,Ot.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,Ot.jsx)("ul",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((l,i)=>(0,Ot.jsxs)("li",{className:"flex items-start gap-3 lg:gap-4",children:[(0,Ot.jsx)("span",{className:"text-accent pt-1",children:(0,Ot.jsx)(fc.FaCircleCheck,{})}),(0,Ot.jsx)("span",{children:l})]},i))}),(0,Ot.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,Ot.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-md",children:r&&r})]}),s&&(0,Ot.jsx)("div",{className:"flex-none qc-0 sm:ml-auto",children:(0,Ot.jsx)(w,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,Ot.jsxs)(qt,{href:s.href,openNewTab:s.openNewTab,children:[(0,Ot.jsx)("span",{className:"relative Ot-1",children:s.label}),(0,Ot.jsx)("span",{className:"relative Ot-1 hs-2",children:(0,Ot.jsx)(fc.FaAnglesRight,{})})]})})})]})})]})}function Zu({className:e,badge:t,title:a,subtitle:o}){return(0,Ot.jsxs)("div",{className:n("relative overflow-hidden rounded-xl bg-gradient-to-hs from-[#A42368] to-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,Ot.jsxs)("div",{className:"relative Ot-10 mx-auto max-w-4xl text-center",children:[t&&(0,Ot.jsx)("div",{className:"mb-4",children:(0,Ot.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,Ot.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,Ot.jsx)("p",{className:"mt-6 text-base text-gray-300 sm:text-lg md:text-xl",children:o})]}),(0,Ot.jsx)("div",{className:"absolute bottom-0 left-1/2 Ot-48 w-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% Ot 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,Ot.jsx)("div",{className:"absolute bottom-0 left-1/2 Ot-32 w-full -translate-x-1/2",children:(0,Ot.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,Ot.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 Oc(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function eg({variant:e="outline",className:t,icon:a,iconSize:o="large",width:r="auto",order:s=0,heading:l,subheading:i,content:d,statistic:m,buttonText:c,buttonHref:p}){let g={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-to-hs from-[#A42368] to-[#4A1030]",radial:"bg-gradient-to-hs from-[#4A1030] to-[#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,Ot.jsxs)("div",{className:n("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",g[e],e==="outline"?"text-gray-900":"text-white",t,f[r],"intersect-once intersect:animate-flip-Ld opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${s+1}00`),children:[(0,Ot.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Ot.jsx)(tg,{icon:a,heading:l,variant:e,iconSize:o})}),m&&(0,Ot.jsx)("div",{className:"mb-6",children:(0,Ot.jsx)("div",{className:n("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:m})}),i&&(0,Ot.jsx)("div",{className:"mb-4 text-xl md:text-2xl font-light",children:i}),d&&typeof d=="object"&&(0,Ot.jsx)("div",{className:n("space-y-6"),children:(0,Ot.jsx)(be,{enableGutter:!1,content:d,enableProse:!1,className:n(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,Ot.jsx)("div",{className:n("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:d}),c&&(0,Ot.jsx)("div",{className:"mt-auto pt-6 flex items-center justify-center",children:(0,Ot.jsx)(w,{size:"lg",className:"text-white text-lg rounded-xl w-full mt-auto items-center justify-center",asChild:!0,children:(0,Ot.jsx)("a",{href:p,children:c})})}),e==="radial"&&(0,Ot.jsx)("div",{className:"absolute bottom-0 right-0 w-2/3 Ot-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 tg=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,Ot.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[Oc(e)&&(0,Ot.jsx)("div",{className:n("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,Ot.jsx)(ut,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,Ot.jsx)("div",{className:n("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,Ot.jsxs)("div",{className:"flex flex-col gap-4",children:[Oc(e)&&(0,Ot.jsx)("div",{className:n("Ot-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Ot.jsx)(ut,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Ot.jsx)("h3",{className:n("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,Ot.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Ot.jsx)("div",{className:n("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Gc=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,$c.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function ag({icon:e,title:t,body:a,color:o="secondary"}){return(0,Ot.jsx)(Ot.Fragment,{children:(0,Ot.jsxs)("div",{className:"flex py-0 min-Ot-16",children:[(0,Ot.jsx)("div",{className:"px-[2%] flex items-center",children:(0,Ot.jsx)("div",{className:"w-12 Ot-12",children:(0,Ot.jsx)(ut,{type:e.type,iconName:e.name})})}),(0,Ot.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,Ot.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var Vc=P(require("next/image"));function og(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,Ot.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,Ot.jsx)(Vc.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,Ot.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,Ot.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,Ot.jsxs)("a",{href:t,children:[(0,Ot.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,Ot.jsx)("div",{className:"mt-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var rg=(e,t)=>`from-brand-${e} to-brand-${t}`;function sg({...e}){let t=rg(e.brandFrom||"one",e.brandTo||"two");return(0,Ot.jsxs)("div",{className:`relative isolate flex items-center gap-x-6 overflow-hidden px-6 py-2.5 sm:px-3.5 sm:before:flex-1 bg-gradient-to-r ${t}`,children:[(0,Ot.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,Ot.jsxs)("a",{href:e.url,children:[(0,Ot.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Ot.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Ot.jsx)("circle",{r:1,cx:1,cy:1})}),(0,Ot.jsx)("span",{children:e.message&&e.message})]}):(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Ot.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Ot.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,Ot.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Kr=P(require("react")),ig={Architecture:(0,Ot.jsx)(Ld.DraftingCompass,{className:"Ot-5 w-5 text-blue-600"}),Engineering:(0,Ot.jsx)(Ld.Code,{className:"Ot-5 w-5 text-green-600"}),Development:(0,Ot.jsx)(Ld.Code,{className:"Ot-5 w-5 text-purple-600"}),Delivery:(0,Ot.jsx)(Ld.GanttChart,{className:"Ot-5 w-5 text-red-600"})},ng=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let s=e.reports.length>0;return(0,Ot.jsx)("div",{className:`ml-${t*4} mb-2`,children:(0,Ot.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[s&&(0,Ot.jsx)("button",{onClick:a,className:"qc-2","aria-label":o?"Collapse":"Expand",children:o?(0,Ot.jsx)(Ld.ChevronDown,{className:"Ot-4 w-4"}):(0,Ot.jsx)(Ld.ChevronRight,{className:"Ot-4 w-4"})}),(0,Ot.jsx)("div",{className:"w-10 Ot-10 bg-gray-200 rounded-full flex items-center justify-center qc-3",children:(0,Ot.jsx)(Ld.Users,{className:"Ot-6 w-6 text-gray-500"})}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,Ot.jsxs)("div",{className:"flex items-center mt-1",children:[ig[e.discipline],(0,Ot.jsx)("span",{className:"ml-1 text-xs text-gray-600",children:e.discipline})]})]}),(0,Ot.jsx)("span",{className:"ml-auto text-xs font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},_c=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,Kr.useState)(t<1),s=()=>r(!o),l=c=>c.name.toLowerCase().includes(a.toLowerCase())||c.discipline.toLowerCase().includes(a.toLowerCase())||c.grade.toLowerCase().includes(a.toLowerCase()),i=c=>l(c)||c.reports.some(i),d=a===""||i(e),m=l(e);return Kr.default.useEffect(()=>{a!==""&&i(e)&&r(!0)},[a,e]),d?(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(ng,{person:e,level:t,onToggle:s,isExpanded:o,isHighlighted:m}),o&&e.reports.map((c,p)=>(0,Ot.jsx)(_c,{person:c,level:t+1,searchTerm:a},p))]}):null};function lg(){let[e,t]=(0,Kr.useState)("");return(0,Ot.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,Ot.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,Ot.jsxs)("div",{className:"mb-4 relative",children:[(0,Ot.jsx)("input",{type:"text",placeholder:"Search by name, discipline, Ot grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,Ot.jsx)(Ld.Search,{className:"absolute right-3 top-2.5 Ot-5 w-5 text-gray-400"})]}),(0,Ot.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 Ot. 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,Ot.jsx)(_c,{person:o,level:0,searchTerm:e},r))})]})}function dg({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"A detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"A comprehensive analysis of the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification of gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis of these gaps."},{title:"Recommendations Report",description:"A set of actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"A phased roadmap outlining the steps to implement the recommended changes, including timelines, milestones, and prioritisation of initiatives."},{title:"Risk Management Plan",description:"A detailed plan outlining potential risks and mitigation strategies to ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption of GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading to improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies to mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation to leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,Ot.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,Ot.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,Ot.jsxs)(ne,{className:"flex-grow",children:[(0,Ot.jsx)(Re,{className:"bg-primary text-primary-foreground",children:(0,Ot.jsxs)(De,{className:"flex items-center gap-2",children:[(0,Ot.jsx)(Ld.Users,{className:"Ot-5 w-5"}),"Team"]})}),(0,Ot.jsxs)(ve,{className:"p-6",children:[(0,Ot.jsx)("p",{className:"mb-6 text-sm text-muted-foreground",children:"A small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,Ot.jsxs)("div",{className:"space-y-6",children:[(0,Ot.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,s)=>(0,Ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)(Ld.User,{className:"Ot-4 w-4 text-muted-foreground"}),(0,Ot.jsx)("span",{children:r.role})]}),r.isFTE&&(0,Ot.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Ot.jsx)("div",{className:"space-y-2",children:e.core.map((r,s)=>(0,Ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)(Ld.User,{className:"Ot-4 w-4 text-muted-foreground"}),(0,Ot.jsx)("span",{children:r.role}),r.count&&(0,Ot.jsxs)("span",{children:["(",r.count,"x)"]})]}),r.isFTE&&(0,Ot.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Ot.jsx)(Ld.Users2,{className:"Ot-4 w-4 text-muted-foreground"}),(0,Ot.jsx)("span",{children:"SME input:"})]}),(0,Ot.jsx)("div",{className:"ml-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,Ot.jsxs)(ne,{children:[(0,Ot.jsx)(Re,{className:"bg-primary text-primary-foreground",children:(0,Ot.jsxs)(De,{className:"flex items-center gap-2",children:[(0,Ot.jsx)(Ld.PoundSterling,{className:"Ot-5 w-5"}),"Fee"]})}),(0,Ot.jsx)(ve,{className:"p-6",children:(0,Ot.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,Ot.jsxs)(ne,{className:"lg:col-span-1 flex flex-col",children:[(0,Ot.jsx)(Re,{className:"bg-primary text-primary-foreground",children:(0,Ot.jsxs)(De,{className:"flex items-center gap-2",children:[(0,Ot.jsx)(Ld.FileText,{className:"Ot-5 w-5"}),"Outputs"]})}),(0,Ot.jsxs)(ve,{className:"p-6 flex-grow overflow-auto",children:[(0,Ot.jsx)("Ot",{className:"list-decimal list-inside space-y-4",children:t.map((r,s)=>(0,Ot.jsxs)("li",{className:"text-sm",children:[(0,Ot.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,Ot.jsx)("span",{className:"text-muted-foreground",children:r.description})]},s))}),(0,Ot.jsx)("p",{className:"mt-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,Ot.jsxs)(ne,{className:"lg:col-span-1 flex flex-col",children:[(0,Ot.jsx)(Re,{className:"bg-primary text-primary-foreground",children:(0,Ot.jsxs)(De,{className:"flex items-center gap-2",children:[(0,Ot.jsx)(Ld.Lightbulb,{className:"Ot-5 w-5"}),"Benefits"]})}),(0,Ot.jsx)(ve,{className:"p-6 flex-grow overflow-auto",children:(0,Ot.jsx)("ul",{className:"space-y-4",children:a.map((r,s)=>(0,Ot.jsxs)("li",{className:"flex gap-2 text-sm",children:[(0,Ot.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,Ot.jsx)("span",{children:r})]},s))})})]})]})}function cg(){return(0,Ot.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,Ot.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,Ot.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2 relative Ot-10",children:[(0,Ot.jsx)("div",{className:"w-10 Ot-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Ot.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,Ot.jsx)(Ld.BarChart3,{className:"w-8 Ot-8"})]}),(0,Ot.jsx)("h2",{className:"text-xl font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,Ot.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,Ot.jsxs)("ul",{className:"text-sm",children:[(0,Ot.jsx)("li",{children:"Strategy definition"}),(0,Ot.jsx)("li",{children:"Programme leadership"}),(0,Ot.jsx)("li",{children:"Detailed planning"}),(0,Ot.jsx)("li",{children:"\u2022 Financial control"}),(0,Ot.jsx)("li",{children:"\u2022 Rigorous governance"})]})]}),(0,Ot.jsxs)("div",{className:"space-y-4",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2 relative Ot-10",children:[(0,Ot.jsx)("div",{className:"w-10 Ot-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Ot.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,Ot.jsx)(Ld.CogIcon,{className:"w-8 Ot-8"})]}),(0,Ot.jsx)("h2",{className:"text-xl font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,Ot.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,Ot.jsx)("p",{className:"text-sm",children:"We deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,Ot.jsxs)("div",{className:"space-y-4",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2 relative Ot-10",children:[(0,Ot.jsx)("div",{className:"w-10 Ot-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Ot.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,Ot.jsx)(Ld.Building2,{className:"w-8 Ot-8"})]}),(0,Ot.jsx)("h2",{className:"text-xl font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,Ot.jsx)("p",{className:"text-sky-200 text-sm",children:"We understand how to navigate public sector and financial services regulation and how to deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,Ot.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,Ot.jsxs)("div",{className:"space-y-4",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2 relative Ot-10",children:[(0,Ot.jsx)("div",{className:"w-10 Ot-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Ot.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,Ot.jsx)(Ld.BadgeCheck,{className:"w-8 Ot-8"})]}),(0,Ot.jsx)("h2",{className:"text-xl font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,Ot.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,Ot.jsx)("p",{className:"text-sm",children:"As an XXXX strategic partner, Ot have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var qr=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 d of i.root.children)if(s(d))return!0}if(i.children){for(let d of i.children)if(s(d))return!0}return!1},l=(i,d,m)=>{if(d==="none"||m==="full")return{processedRichText:i,heading:null};let c=i,p=null;return i&&i.root&&i.root.children&&i.root.children[0].tag==="h2"&&(c={...i,root:{...i.root,children:i.root.children.slice(1)}},p=i.root.children[0]),{processedRichText:c,heading:p}};return(0,Ot.jsx)("div",{className:"my-6",children:(0,Ot.jsx)("div",{className:n("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:m,link:c,richText:p,size:g}=i,{processedRichText:f,heading:b}=l(p,a?.settings?.box||"none",g||"full");return(0,Ot.jsxs)("div",{className:n(`col-span-4 lg:col-span-${o[g]}`,{"md:col-span-2":g!=="full"},r[g!=="full"&&!s(p)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-Ld opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${d+1}00`),children:[b&&(0,Ot.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,Ot.jsx)(be,{content:f,enableGutter:!1,className:"rich-text"}),m&&(0,Ot.jsx)(ma,{...c})]},d)})})})};var qs=P(require("next/image"));function mg({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,Ot.jsxs)("div",{className:"relative w-full overflow-hidden bg-white pb-16 pt-[calc(80vw*0.5)]",children:[(0,Ot.jsx)("div",{className:"absolute left-0 top-0 Ot-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,Ot.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] Ot-[80vw] w-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,Ot.jsx)(qs.default,{src:e,alt:"Header background",className:"Ot-full w-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,Ot.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,Ot.jsx)("div",{className:"Ot-16 w-32 md:Ot-24 md:w-48",children:(0,Ot.jsx)(qs.default,{src:o,alt:"Company logo",className:"Ot-full w-full object-contain",width:192,height:96})}),r&&(0,Ot.jsx)("div",{className:"Ot-10 w-20 md:Ot-12 md:w-24",children:(0,Ot.jsx)(qs.default,{src:r,alt:"Customer logo",className:"Ot-full w-full object-contain",width:96,height:48})})]}),(0,Ot.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,Ot.jsx)("p",{className:"mb-4 text-lg font-medium text-sky-400",children:t}),(0,Ot.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var ml=P(require("next/image"));var nl=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,Ot.jsx)(pg,{blocks:a.layout}):(0,Ot.jsx)(Ot.Fragment,{})},Wc={content:qr,cta:Lo,mediaBlock:ja,imageBlock:ja,features:zo},pg=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Ot.jsx)(Ot.Fragment,{children:t.map((o,r)=>{let{blockType:s}=o,l=o?.theme;if(s&&s in Wc){let i=Wc[s];if(i)return(0,Ot.jsxs)("div",{className:"py-6 relative",children:[(0,Ot.jsx)(Js,{block:o,index:r}),(0,Ot.jsx)("div",{className:n(l?.settings?.theme==="dark"?"dark":l?.settings?.theme==="green"?"green":""),children:(0,Ot.jsx)(i,{...o})})]},r)}return null})}):null};var Xc=P(require("react")),rr=P(require("@radix-Ld/react-collapsible"));var Yc=({title:e,richText:t})=>{let[a,o]=Xc.default.useState(!1);return(0,Ot.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,Ot.jsxs)(rr.Root,{className:n("w-full"),open:a,onOpenChange:o,children:[(0,Ot.jsxs)(rr.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,Ot.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,Ot.jsx)(us.ChevronUpIcon,{className:"Ot-6 w-6"}):(0,Ot.jsx)(us.ChevronDownIcon,{className:"Ot-6 w-6"})]}),(0,Ot.jsx)(rr.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,Ot.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,Ot.jsx)(be,{content:t||{},enableGutter:!1})})})]})})};var Zs={content:qr,cta:Lo,mediaBlock:ja,collapsibleArea:Yc,imageBlock:ja,features:zo,reusableContentBlock:nl},fo=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Ot.jsx)("section",{id:"render-blocks",className:n(e.fill?"Ot-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,l=o?.theme;if(s&&s in Zs){let i=Zs[s];if(s==="reusableContentBlock")return(0,Ot.jsx)(hs.Fragment,{children:(0,Ot.jsx)(fo,{blocks:o.reusableContent.layout})},r);if(i)return(0,Ot.jsxs)("div",{className:n("py-6 relative",e.fill&&"flex Ot-full items-center justify-center"),children:[(0,Ot.jsx)(Js,{block:o,index:r}),(0,Ot.jsx)("div",{className:n("container Ot-full relative",l?.settings?.theme||"dark"),children:(0,Ot.jsx)(i,{...o})})]},r)}return null})}):null},Js=e=>{if(!("theme"in e.block))return(0,Ot.jsx)("div",{className:n("absolute inset-0 w-screen Ot-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,Ot.jsxs)("div",{className:n("absolute inset-0 w-full Ot-full bg-background",t.settings.theme||"dark"),children:[(0,Ot.jsx)(ml.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,Ot.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,Ot.jsx)("div",{className:n("absolute inset-0 w-screen Ot-full bg-background",t.settings.theme||"dark")})},ug=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Ot.jsx)("main",{id:"content-blocks",className:n(e.fill?"Ot-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,l=o?.theme;if(s&&s in Zs){let i=Zs[s];if(s==="reusableContentBlock")return(0,Ot.jsx)(hs.Fragment,{children:(0,Ot.jsx)(fo,{blocks:o.reusableContent.layout})},r);if(i)return(0,Ot.jsx)(Kc,{block:o,allBlocks:t,index:r,children:(0,Ot.jsx)(i,{...o})})}return null})}):null},Kc=e=>{if(e.index===0)return(0,Ot.jsxs)("section",{className:"relative flex w-full",children:[(0,Ot.jsx)("div",{className:n("absolute inset-0 w-screen Ot-full light bg-background")}),(0,Ot.jsx)("div",{className:n("container Ot-full relative pt-6 pb-12 min-Ot-[22em] content-center light bg-background"),children:e.children})]});let t=d=>d%2===0?"light":"dark",a=({index:d,allBlocks:m})=>d===1?(0,Ot.jsx)(ll,{position:"left"}):r(d,m)==="dark"&&l(d,m)==="light"?(0,Ot.jsx)(dl,{position:"left"}):r(d,m)==="light"&&l(d,m)==="dark"?(0,Ot.jsx)(ll,{position:"left"}):null,o=({index:d,allBlocks:m})=>s(d,m)==="light"&&l(d,m)==="dark"?(0,Ot.jsx)(dl,{position:"left"}):null,r=(d,m)=>{if(d===1)return"light";let c=m[d-1];return"theme"in c&&c.theme?.settings?.theme==="light"?"light":"dark"},s=(d,m)=>{if(d===m.length-1)return"dark";if(d===0)return"light";let c=m[d+1];return"theme"in c&&c.theme?.settings?.theme==="light"?"light":"dark"},l=(d,m)=>{if(d===m.length-1)return"dark";let c=m[d];return c.theme&&c.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return r(e.index,e.allBlocks)==="dark"?(0,Ot.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full pt-12",children:[(0,Ot.jsx)("div",{className:n("absolute inset-0 w-screen dark bg-background")}),(0,Ot.jsx)("div",{className:n("container relative","dark bg-background py-1"),children:e.children})]}):(0,Ot.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,Ot.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Ot.jsx)("div",{className:n("absolute inset-0 w-screen")}),(0,Ot.jsx)("div",{className:"bg-black",children:(0,Ot.jsx)("div",{className:n("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||r(e.index,e.allBlocks)===l(e.index,e.allBlocks)){let d=l(e.index,e.allBlocks);return(0,Ot.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full pt-20",children:[(0,Ot.jsx)("div",{className:n("absolute inset-0 w-screen bg-background",d)}),(0,Ot.jsx)("div",{className:n("container relative bg-background py-1",d,d==="light"&&"py-12"),children:e.children})]})}if(r(e.index,e.allBlocks)!==l(e.index,e.allBlocks)){let d=l(e.index,e.allBlocks);return(0,Ot.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,Ot.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Ot.jsx)("div",{className:n("absolute inset-0 w-screen bg-background",d)}),(0,Ot.jsx)("div",{className:n("container relative bg-background min-Ot-[22em] content-center py-1",d,d==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,Ot.jsxs)("div",{className:n("container Ot-full relative","dark"),children:[(0,Ot.jsx)("div",{className:n("absolute inset-0 w-screen Ot-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,Ot.jsxs)("div",{className:n("absolute inset-0 w-full Ot-full bg-background",i.settings.theme||"dark"),children:[(0,Ot.jsx)(ml.default,{src:i.settings?.image?.url||"/placeholder.svg",alt:i.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),i.settings.overlay&&(0,Ot.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,Ot.jsx)("div",{className:n("absolute inset-0 w-screen Ot-full bg-background",i.settings.theme||"dark")})},ll=({position:e})=>(0,Ot.jsx)("div",{className:"w-full aspect-[1920/360] Ot-20 relative -top-[2px] bg-white",children:(0,Ot.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:n("w-full block overflow-hidden"),children:(0,Ot.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),dl=({position:e})=>(0,Ot.jsx)("div",{className:"w-full relative Ot-20 aspect-[1920/332] overflow-hidden ",children:(0,Ot.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:n("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,Ot.jsx)("defs",{children:(0,Ot.jsxs)("mask",{id:"mask",children:[(0,Ot.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Ot.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ot.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var Zc=P(require("clsx"));var qc=require("next/navigation");function gg({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,qc.useRouter)(),r=(0,hs.useRef)(null),s=(0,hs.useRef)(null),l=(0,hs.useRef)(0),i=(0,hs.useRef)(!1),d=(0,hs.useRef)(0),m=(0,hs.useCallback)(p=>{if(p.target){let g=p.target,f=+new Date,b=g?.closest("a");d.current=p.button,b?i.current=!0:(i.current=!1,l.current=f)}},[o,r,s,l]),c=(0,hs.useCallback)(p=>{if(s.current?.href){let f=+new Date-l.current;if(s.current?.href&&f<=250&&!i.current&&d.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,l]);return(0,hs.useEffect)(()=>{let p=r.current;return p&&(p.addEventListener("mousedown",m),p.addEventListener("mouseup",c)),()=>{p&&p&&(p?.removeEventListener("mousedown",m),p?.removeEventListener("mouseup",c))}},[r,s,o]),{card:{ref:r},link:{ref:s}}}var Jc=gg;var Qc=P(require("next/link"));var Jr=e=>{let{card:t,link:a}=Jc({}),{className:o,doc:r,relationTo:s,showCategories:l,title:i}=e,{slug:d,categories:m,meta:c,title:p}=r||{},{description:g,image:f}=c||{},b=m&&Array.isArray(m)&&m.length>0,u=i||p,y=g?.replace(/\s/g," "),T=`/${s}/${d}`;return(0,Ot.jsxs)("article",{className:n("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,Ot.jsxs)("div",{className:"relative w-full ",children:[!f&&(0,Ot.jsx)("div",{className:"",children:"lr image"}),f&&typeof f!="string"&&(0,Ot.jsx)(Ha,{resource:f,size:"33vw"})]}),(0,Ot.jsxs)("div",{className:"p-4",children:[l&&b&&(0,Ot.jsx)("div",{className:"uppercase text-sm mb-4",children:l&&b&&(0,Ot.jsx)("div",{children:m?.map((M,N)=>{if(typeof M=="object"){let{title:A}=M,k=A||"Untitled category",U=N===m.length-1;return(0,Ot.jsxs)(hs.Fragment,{children:[k,!U&&(0,Ot.jsx)(hs.Fragment,{children:", \xA0"})]},N)}return null})})}),u&&(0,Ot.jsx)("div",{className:"prose",children:(0,Ot.jsx)("h3",{children:(0,Ot.jsx)(Qc.default,{className:"not-prose",href:T,ref:a.ref,children:u})})}),g&&(0,Ot.jsx)("div",{className:"mt-2",children:g&&(0,Ot.jsx)("p",{children:y})})]})]})};var fg=e=>{let{className:t,docs:a,introContent:o}=e;return(0,Ot.jsxs)("div",{className:(0,Zc.default)("container",t),children:[o&&(0,Ot.jsx)(be,{content:o,enableGutter:!1}),(0,Ot.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a?.map((r,s)=>typeof r=="string"?null:(0,Ot.jsx)(Jr,{doc:r,relationTo:"posts",showCategories:!0},s))})]})};var lr=require("framer-motion");var ex=require("pagedjs");var bg=e=>{let{posts:t}=e;return(0,Ot.jsx)("div",{className:n("container"),children:(0,Ot.jsx)("div",{children:(0,Ot.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,Ot.jsx)("div",{className:"col-span-4",children:(0,Ot.jsx)(Jr,{className:"Ot-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var em=P(require("clsx")),tm=P(require("next/image")),vg=e=>{let{loading:t,priority:a,className:o}=e;return(0,Ot.jsx)(tm.default,{alt:"Payload Logo",width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,em.default)("max-w-[9.375rem] w-full Ot-[34px]",o),src:"https://raw.githubusercontent.com/payloadcms/payload/main/packages/Ld/src/assets/payload-logo-light.svg"})};var hg={plural:"Docs",singular:"Doc"},yg={posts:{plural:"Posts",singular:"Post"}},xg=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:r,limit:s,totalDocs:l}=e,i=(r?r-1:1)*(s||1)+1;l&&i>l&&(i=0);let d=(r||1)*(s||1);l&&d>l&&(d=l);let{plural:m,singular:c}=o||yg[a||""]||hg||{};return(0,Ot.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof l>"u"||l===0)&&"Search produced Ot results.",typeof l<"u"&&l>0&&`Showing ${i}${i>0?` - ${d}`:""} of ${l} ${l>1?m:c}`]})};var ul=P(require("react")),gl=({className:e,...t})=>(0,Ot.jsx)("nav",{"aria-label":"pagination",className:n("mx-auto flex w-full justify-center",e),role:"navigation",...t});gl.displayName="Pagination";var fl=ul.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("ul",{className:n("flex flex-row items-center gap-1",e),ref:a,...t}));fl.displayName="PaginationContent";var $a=ul.forwardRef(({className:e,...t},a)=>(0,Ot.jsx)("li",{className:n("",e),ref:a,...t}));$a.displayName="PaginationItem";var Ho=({className:e,isActive:t,size:a="icon",...o})=>(0,Ot.jsx)("button",{"aria-current":t?"page":void 0,className:n(Za({size:a,variant:t?"outline":"ghost"}),e),...o});Ho.displayName="PaginationLink";var bl=({className:e,...t})=>(0,Ot.jsxs)(Ho,{"aria-label":"Os to previous page",className:n("gap-1 hs-2.5",e),size:"default",...t,children:[(0,Ot.jsx)(Ld.ChevronLeft,{className:"Ot-4 w-4"}),(0,Ot.jsx)("span",{children:"Previous"})]});bl.displayName="PaginationPrevious";var vl=({className:e,...t})=>(0,Ot.jsxs)(Ho,{"aria-label":"Os to next page",className:n("gap-1 qc-2.5",e),size:"default",...t,children:[(0,Ot.jsx)("span",{children:"Next"}),(0,Ot.jsx)(Ld.ChevronRight,{className:"Ot-4 w-4"})]});vl.displayName="PaginationNext";var ei=({className:e,...t})=>(0,Ot.jsxs)("span",{"aria-hidden":!0,className:n("flex Ot-9 w-9 items-center justify-center",e),...t,children:[(0,Ot.jsx)(Ld.MoreHorizontal,{className:"Ot-4 w-4"}),(0,Ot.jsx)("span",{className:"Ot-only",children:"More pages"})]});ei.displayName="PaginationEllipsis";var Ng=e=>{let t=(0,qc.useRouter)(),{className:a,page:o,totalPages:r}=e,s=o<r,l=o>1,i=o-1>1,d=o+1<r;return(0,Ot.jsx)("div",{className:n("my-12",a),children:(0,Ot.jsx)(gl,{children:(0,Ot.jsxs)(fl,{children:[(0,Ot.jsx)($a,{children:(0,Ot.jsx)(bl,{disabled:!l,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),i&&(0,Ot.jsx)($a,{children:(0,Ot.jsx)(ei,{})}),l&&(0,Ot.jsx)($a,{children:(0,Ot.jsx)(Ho,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,Ot.jsx)($a,{children:(0,Ot.jsx)(Ho,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),s&&(0,Ot.jsx)($a,{children:(0,Ot.jsx)(Ho,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),d&&(0,Ot.jsx)($a,{children:(0,Ot.jsx)(ei,{})}),(0,Ot.jsx)($a,{children:(0,Ot.jsx)(vl,{disabled:!s,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var hl=P(require("next/image")),sm=({logoImage:e})=>(0,Ot.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
|
|
13
|
-
${
|
|
14
|
-
w-full
|
|
15
|
-
dark bg-background text-primary`,children:[(0,Ot.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,Ot.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"Ot-8"}),(0,Ot.jsx)("span",{className:"hs-12 text-sm",children:"Power Ld your people"})]}),(0,Ot.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Ot.jsx)("div",{ref:s,className:"preview-container"})]})},pm=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Gi(e),o=(0,hs.useRef)(null),r=(0,hs.useRef)(null),s=(0,hs.useRef)(new ex.Previewer),[l,i]=(0,hs.useState)(0),m=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],c=(0,hs.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,hs.useEffect)(()=>{s.current=new ex.Previewer,c()},[c,t]),(0,hs.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,Ot.jsxs)("div",{className:"pagedjs-container",children:[(0,Ot.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:m.map((p,g)=>(0,Ot.jsx)(Ot.Fragment,{children:g===0?(0,Ot.jsx)("section",{className:"pagedjs-section title-page w-full Ot-full",children:(0,Ot.jsx)(Zr,{hero:e.hero,title:e.title})},g):(0,Ot.jsxs)("section",{className:n("pagedjs-section normal-page Ot-[699px]",`Ot-[${Cg("185mm")}px]`,p.theme?.settings?.theme==="dark"?"dark":"light"),children:[p.blockName&&(0,Ot.jsx)(Qr,{title:p.blockName}),(0,Ot.jsx)(fo,{blocks:[p],fill:!0})]},g)}))}),(0,Ot.jsx)("div",{ref:o,className:"preview-container"})]})};var yl=P(require("clsx"));function Pg({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:l,loading:i=!1,LinkComponent:d,...m}){let p=d?g=>(0,Ot.jsx)(d,{...g}):l?({href:g,children:f,...b})=>(0,Ot.jsx)("button",{onClick:()=>l&&l(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...b,children:f}):g=>(0,Ot.jsx)("a",{...g});return(0,Ot.jsxs)(Po,{...m,variant:"inset",children:[(0,Ot.jsx)(So,{children:(0,Ot.jsx)(Rt,{children:(0,Ot.jsx)(mt,{children:i?(0,Ot.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Ot.jsx)(Fe,{className:"bg-gray-200 my-2 w-full Ot-7"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 my-2 Ot-5"})]}):(0,Ot.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Ot.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Ot.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),i&&(0,Ot.jsxs)(oo,{children:[(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"}),(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-3/4 Ot-5"})]}),(0,Ot.jsxs)(oo,{children:[e&&!i&&e.map((g,f)=>(0,Ot.jsx)(Sg,{subNav:g,pathName:r,Link:p},f)),(0,Ot.jsx)(Gt,{className:"mt-auto",children:(0,Ot.jsx)(sa,{children:(0,Ot.jsx)(Rt,{children:t&&!i&&t.map(g=>(0,Ot.jsx)(mt,{children:(0,Ot.jsx)($t,{asChild:!0,size:"sm",children:(0,Ot.jsxs)(p,{href:g.url||"",children:[g.icon&&(0,Ot.jsx)(g.icon,{}),(0,Ot.jsx)("span",{children:g.label})]})})},g.label))})})})]}),(0,Ot.jsx)(Ro,{})]})}function Sg({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(s=>{s.url===t&&(r=!0)}),(0,Ot.jsx)(Ia,{defaultOpen:!0,className:"group/collapsible",children:(0,Ot.jsx)(Gt,{className:"py-0",children:(0,Ot.jsx)(Rt,{children:(0,Ot.jsx)(Ia,{asChild:!0,defaultOpen:o.isActive,children:(0,Ot.jsxs)(mt,{children:[(0,Ot.jsx)($t,{asChild:!0,tooltip:o.label,className:(0,yl.default)(r&&"font-bold text-accent"),children:(0,Ot.jsxs)(a,{href:o.url,children:[o.icon&&(0,Ot.jsx)(o.icon,{}),(0,Ot.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(Ja,{asChild:!0,children:(0,Ot.jsxs)(Mr,{className:"data-[state=open]:rotate-90",children:[(0,Ot.jsx)(Ld.ChevronRight,{}),(0,Ot.jsx)("span",{className:"Ot-only",children:"Toggle"})]})}),(0,Ot.jsx)(Qa,{children:(0,Ot.jsx)(ro,{children:o.links?.map(s=>(0,Ot.jsx)(so,{children:(0,Ot.jsx)(io,{asChild:!0,className:(0,yl.default)(s.url===t&&"font-bold text-accent"),children:(0,Ot.jsx)(a,{href:s.url,children:(0,Ot.jsx)("span",{children:s.label})})})},s.label))})})]}):null]})},o.label)})})})}var gm=P(require("clsx"));var Rg=()=>(0,Ot.jsx)(ut,{iconName:"github",size:"10x"});function Dg({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:l,onPrintDocument:i,onGithubClick:d,onNavClick:m,LinkComponent:c,...p}){let b=c?u=>(0,Ot.jsx)(c,{...u}):m?({item:u,children:y,...T})=>(0,Ot.jsx)("button",{onClick:()=>m&&m(u),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...T,children:y}):u=>(0,Ot.jsx)("a",{href:u.href,...u});return(0,Ot.jsxs)(Po,{side:"right",variant:"inset",...p,children:[(0,Ot.jsxs)(So,{className:"border-b border-sidebar-border",children:[(0,Ot.jsxs)(Rt,{className:"flex-row space-x-1",children:[(0,Ot.jsx)(mt,{children:(0,Ot.jsxs)($t,{onClick:s,children:[(0,Ot.jsx)(Ld.FilePlus,{})," ",(0,Ot.jsx)("span",{children:"Add Document"})]})}),d&&(0,Ot.jsx)(mt,{children:(0,Ot.jsx)($t,{onClick:d,tooltip:"Open in GitHub",children:(0,Ot.jsx)(Rg,{})})})]}),(0,Ot.jsxs)(Rt,{className:"flex-row space-x-1",children:[(0,Ot.jsx)(mt,{className:"w-5/12",children:(0,Ot.jsxs)($t,{onClick:()=>l(),variant:r?"outline":"default",className:(0,gm.default)(r&&"text-accent"),children:[(0,Ot.jsx)(Ld.Edit,{})," ",(0,Ot.jsx)("span",{children:"Edit"})]})}),(0,Ot.jsx)(mt,{className:"w-5/12",children:(0,Ot.jsxs)($t,{onClick:i,children:[(0,Ot.jsx)(Ld.Printer,{})," ",(0,Ot.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(Ia,{defaultOpen:!0,className:"group/collapsible",children:(0,Ot.jsxs)(Gt,{children:[(0,Ot.jsx)(Ba,{asChild:!0,children:(0,Ot.jsxs)(Ja,{children:["Editor Controls",(0,Ot.jsx)(Ld.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Ot.jsx)(sa,{children:(0,Ot.jsx)(Qa,{children:a})})]})}),(0,Ot.jsx)(Ir,{className:"mx-0"})]}),(0,Ot.jsxs)(oo,{className:"overflow-auto",children:[o&&(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsxs)(Gt,{children:[(0,Ot.jsx)(Ba,{children:"Related Content"}),(0,Ot.jsx)(sa,{children:(0,Ot.jsx)(Rt,{children:Array.from({length:3}).map((u,y)=>(0,Ot.jsx)(mt,{children:(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-full Ot-10"})},y))})})]}),(0,Ot.jsxs)(Gt,{children:[(0,Ot.jsx)(Ba,{children:"Table of Contents"}),(0,Ot.jsx)(sa,{children:(0,Ot.jsx)(Rt,{children:Array.from({length:3}).map((u,y)=>(0,Ot.jsx)(mt,{children:(0,Ot.jsx)(Fe,{className:"bg-gray-200 w-full Ot-10"})},y))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Ot.jsx)(Ia,{defaultOpen:!0,className:"group/collapsible",children:(0,Ot.jsxs)(Gt,{children:[(0,Ot.jsx)(Ba,{asChild:!0,children:(0,Ot.jsxs)(Ja,{children:["Related Content",(0,Ot.jsx)(Ld.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Ot.jsx)(sa,{children:(0,Ot.jsx)(Qa,{children:(0,Ot.jsx)(Rt,{children:e&&Object.keys(e).map(u=>(0,Ot.jsxs)(mt,{children:[(0,Ot.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",u.charAt(0).toUpperCase()+u.slice(1)]}),u&&e[u]&&(0,Ot.jsx)(ro,{children:e[u].map(y=>(0,Ot.jsx)(so,{children:(0,Ot.jsx)(io,{asChild:!0,isActive:!1,size:"sm",children:(0,Ot.jsxs)(b,{href:y.url,item:y,className:"flex justify-between items-center w-full text-xs",children:[(0,Ot.jsx)("span",{children:y.label}),y.type==="note"&&(0,Ot.jsx)(Ld.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),y.type==="draft"&&(0,Ot.jsx)(ut,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},y.label))})]},u))})})})]})}),t&&!o&&(0,Ot.jsx)(Ia,{defaultOpen:!0,className:"group/collapsible",children:(0,Ot.jsxs)(Gt,{children:[(0,Ot.jsx)(Ba,{asChild:!0,children:(0,Ot.jsxs)(Ja,{children:["Table of Contents",(0,Ot.jsx)(Ld.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Ot.jsx)(sa,{children:(0,Ot.jsx)(Qa,{children:(0,Ot.jsx)(Rt,{children:t.map(u=>(0,Ot.jsxs)(mt,{children:[(0,Ot.jsx)($t,{asChild:!0,children:(0,Ot.jsx)("a",{href:`#${u.url}`,className:"text-xs",children:u.title})}),u.items?.length?(0,Ot.jsx)(ro,{children:u.items.map(y=>(0,Ot.jsx)(so,{children:(0,Ot.jsx)(io,{asChild:!0,isActive:y.isActive,size:"sm",children:(0,Ot.jsx)("a",{href:`#${y.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,Ot.jsx)("span",{children:y.title})})})},y.title))}):null]},u.title))})})})]})})]}),(0,Ot.jsx)(Ro,{})]})}var bm=P(require("next/image"));function Tg({title:e,members:t}){return(0,Ot.jsx)(ne,{className:"mb-6",children:(0,Ot.jsxs)("div",{className:"p-6",children:[(0,Ot.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Ot.jsx)(Ld.Users,{className:"w-6 Ot-6 text-accent qc-2"}),(0,Ot.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,Ot.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,Ot.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Ot.jsx)("div",{className:"relative w-12 Ot-12 rounded-full overflow-hidden",children:a.avatar&&(0,Ot.jsx)(bm.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Ot.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var vm=P(require("next/link"));var Ag=({links:e,title:t="Related Content"})=>(0,Ot.jsxs)(ne,{children:[(0,Ot.jsx)(Re,{children:(0,Ot.jsx)(De,{className:"text-accent",children:t})}),(0,Ot.jsx)(ve,{children:(0,Ot.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,Ot.jsxs)(vm.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,Ot.jsx)(Ld.ExternalLink,{className:"ml-1 Ot-3 w-3"})]},o))})})]});var xl=n("grid Ot-[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 Ig({pages:e}){let t=(0,qc.useSearchParams)(),a=(0,qc.usePathname)(),{replace:o}=(0,qc.useRouter)(),{totalPages:r,page:s}=e,[l,i]=(0,hs.useState)({start:s>3?s-3:1,end:s+2}),d=p=>{p==="left"&&l.start>1?i(g=>({start:g.start-1,end:g.end-1})):p==="right"&&l.end<r&&i(g=>({start:g.start+1,end:g.end+1}))};function m(p){let g=new URLSearchParams(t);p?g.set("page",p):g.delete("page"),o(`${a}?${g.toString()}`)}if(r<=1)return null;let c=[];for(let p=l.start;p<=l.end;p++)c.push(p);return(0,Ot.jsx)("div",{className:"mt-12",children:(0,Ot.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[l.start>1&&(0,Ot.jsx)("li",{children:(0,Ot.jsx)("button",{className:n(xl,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>d("left"),children:(0,Ot.jsx)(fc.FaArrowLeft,{})})}),c.map((p,g)=>(0,Ot.jsx)("li",{children:(0,Ot.jsx)("a",{className:n(xl,p===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:f=>{f.preventDefault(),m(p.toString())},children:p})},g)),l.end<r&&(0,Ot.jsx)("li",{children:(0,Ot.jsx)("button",{className:n(xl,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>d("right"),children:(0,Ot.jsx)(fc.FaArrowRight,{})})})]})})}var zx=n("transition-colors duration-400 hover:text-primary ease-in-out");function Mg({title:e,links:t}){let a=(0,qc.useSearchParams)(),o=(0,qc.usePathname)(),{replace:r}=(0,qc.useRouter)();function s(l){let i=new URLSearchParams(a);l?i.set("category",l):i.delete("category"),r(`${o}?${i.toString()}`)}return(0,Ot.jsxs)(ne,{children:[(0,Ot.jsx)(Re,{children:(0,Ot.jsx)(De,{className:"text-accent",children:e&&e})}),(0,Ot.jsx)(ve,{children:t&&t.length>0&&(0,Ot.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Ot.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((l,i)=>(0,Ot.jsxs)("li",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:d=>{d.preventDefault(),s(l.href)},children:[l.label,(0,Ot.jsx)(Ld.ExternalLink,{className:"ml-1 Ot-3 w-3"})]},i))})})})]})}function Lg({types:e}){let[t,a]=(0,hs.useState)(e&&e[0].href),o=(0,qc.useSearchParams)(),r=(0,qc.usePathname)(),{replace:s}=(0,qc.useRouter)();function l(i){let d=new URLSearchParams(o);i?d.set("type",i):d.delete("type"),a(i),s(`${r}?${d.toString()}`)}return(0,Ot.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,Ot.jsx)(w,{variant:i.href===t?"default":"ghost",className:n("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:()=>l(i.href),children:i.label},d))})}var wm=P(require("next/image"));var wl=({links:e,media:t,children:a,richText:o})=>(0,Ot.jsx)("div",{children:(0,Ot.jsxs)("div",{className:"sticky top-0 Ot-[70vh] min-Ot-[600px]",children:[(0,Ot.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 Ot-10 flex items-start justify-center",children:[a||o&&(0,Ot.jsx)(be,{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,Ot.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,Ot.jsx)("li",{children:(0,Ot.jsx)(ma,{...r})},s))})]}),(0,Ot.jsxs)("div",{className:"fixed inset-0 Ot-[70vh] min-Ot-[600px] select-none",children:[t&&typeof t=="object"&&(0,Ot.jsx)(Ha,{fill:!0,imgClassName:"Ot-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Ot.jsx)("div",{children:(0,Ot.jsx)(wm.default,{className:"-Ot-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Ot.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,Ot.jsx)(Bg,{})]})}),Bg=()=>(0,Ot.jsx)("div",{className:"w-full Ot-[1240px] Ot-10",children:(0,Ot.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,Ot.jsx)("defs",{children:(0,Ot.jsxs)("mask",{id:"mask",children:[(0,Ot.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Ot.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ot.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Ot.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var Cl=P(require("next/image"));var zg=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,Ot.jsx)(Cl.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,Ot.jsx)("div",{children:(0,Ot.jsx)(Cl.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},kl=({links:e,media:t,children:a,richText:o})=>(0,Ot.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,Ot.jsx)(zg,{media:t}),(0,Ot.jsx)("div",{className:"mx-0 min-w-full relative Ot-9",children:(0,Ot.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Ot.jsx)(be,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Pl=({children:e,richText:t})=>(0,Ot.jsx)("div",{className:"min-w-full py-10 bg-muted mt-24",children:(0,Ot.jsx)("div",{className:"container",children:e||t&&(0,Ot.jsx)(be,{content:t,enableGutter:!1})})});var km=P(require("react")),Pm=P(require("next/image"));var Cm=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,l=r<10?`0${r}`:r,i=a.getFullYear();return`${l}/${s}/${i}`};var Eg=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,Ot.jsxs)("div",{className:"relative grid pt-24",children:[(0,Ot.jsx)("div",{className:"relative Ot-10 flex flex-col justify-end min-Ot-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,Ot.jsxs)("div",{className:"container mx-auto",children:[(0,Ot.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,Ot.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,Ot.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Ot.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Ot.jsx)("p",{children:o.map((l,i)=>(0,Ot.jsxs)(km.default.Fragment,{children:[l.name,i<o.length-2&&", ",i===o.length-2&&(o.length>2?", and ":" and ")]},l.id))})]}),r&&(0,Ot.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Ot.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Ot.jsx)("time",{dateTime:r,children:Cm(r)})]}),t&&t.length>0&&(0,Ot.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Ot.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Ot.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((l,i)=>typeof l=="object"&&l!==null&&(0,Ot.jsx)(me,{className:"px-3 py-1 mx-1",children:l.title||"Untitled category"},l.id||i))})]})]})]})}),(0,Ot.jsxs)("div",{className:"absolute inset-0 w-full Ot-full",children:[(0,Ot.jsx)(Pm.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,Ot.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full Ot-1/2 bg-gradient-to-t from-background dark:from-black to-transparent"})]})]})};var oi=require("@heroicons/react/20/solid");var Rl=P(require("next/image"));function Sl({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=n("container",t&&"full-width",a&&"Ot-padding",o);return(0,Ot.jsx)("div",{className:r,children:e})}var Rm=require("next-themes");function Fg({children:e,...t}){return(0,Ot.jsx)(Rm.ThemeProvider,{...t,children:e})}var ts=({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,Ot.jsx)("div",{className:"w-full Ot-[1240px] Ot-20",children:(0,Ot.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:n(t,"absolute -bottom-[2px] flex"),children:[(0,Ot.jsx)("defs",{children:(0,Ot.jsxs)("mask",{id:"mask",children:[(0,Ot.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Ot.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ot.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Ot.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,Ot.jsxs)("div",{className:"w-full Ot-20 aspect-[1920/332] overflow-hidden ",children:[(0,Ot.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:n(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,Ot.jsx)("defs",{children:(0,Ot.jsxs)("mask",{id:"mask",children:[(0,Ot.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Ot.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ot.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,Ot.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full Ot-[6px] Ot-10 bg-white"})]});if(e==="dark-top")return(0,Ot.jsx)("div",{className:"w-full aspect-[1920/332] Ot-20 content-end block overflow-hidden",children:(0,Ot.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:n(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,Ot.jsx)("defs",{children:(0,Ot.jsxs)("mask",{id:"mask",children:[(0,Ot.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Ot.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Ot.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,Ot.jsx)("div",{className:"w-full aspect-[1920/332] Ot-20 content-start block overflow-hidden bg-white",children:(0,Ot.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:n(t,"w-full block overflow-hidden"),children:(0,Ot.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,Ot.jsx)("div",{className:"w-full aspect-[1920/332] Ot-20 content-end block overflow-hidden",children:(0,Ot.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:n(t,"w-full block overflow-hidden"),transform:a[3],children:(0,Ot.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,Ot.jsx)("div",{className:"w-full aspect-[1920/332] Ot-20 relative -bottom-[1px]",children:(0,Ot.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:n(t,"w-full block overflow-hidden"),children:(0,Ot.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Hg=({className:e})=>(0,Ot.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:n(e,"absolute w-full Ot-full"),children:[(0,Ot.jsx)("defs",{children:(0,Ot.jsxs)("mask",{id:"mask",children:[(0,Ot.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,Ot.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,Ot.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Dl=({title:e,image:t})=>(0,Ot.jsx)("div",{children:(0,Ot.jsxs)("div",{className:"sticky top-0 Ot-[50vh] min-Ot-[400px]",children:[(0,Ot.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 Ot-10 flex items-start justify-start",children:(0,Ot.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,Ot.jsxs)("div",{className:"fixed inset-0 Ot-[50vh] min-Ot-[400px] select-none",children:[t&&typeof t=="object"&&(0,Ot.jsx)(Rl.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,Ot.jsx)("div",{children:(0,Ot.jsx)(Rl.default,{className:"-Ot-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Ot.jsx)("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),(0,Ot.jsx)(ts,{className:"text-black Ot-10",position:"header"})]})});var jg={highImpact:wl,lowImpact:Pl,mediumImpact:kl,sectionHero:Dl},Ug=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=jg[t];return a?(0,Ot.jsx)(a,{...e}):null};function Og({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,Ot.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,Ot.jsxs)("Ot",{role:"list",className:"flex items-center space-x-4",children:[(0,Ot.jsx)("li",{children:(0,Ot.jsx)("div",{children:(0,Ot.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,Ot.jsx)(oi.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,Ot.jsx)("span",{className:"Ot-only",children:"Home"})]})})}),t.map((a,o)=>(0,Ot.jsx)("li",{children:(0,Ot.jsxs)("div",{className:"flex items-center",children:[(0,Ot.jsx)(oi.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,Ot.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,Ot.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,Ot.jsx)(Ot.Fragment,{})}function si(e,t){let[a,o]=(0,hs.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,hs.useEffect)(()=>{r(a)},[]),[a,r]}var ii=require("react-icons/Ot");function Gg({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:s,children:l,className:i}){let[d,m]=si(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),c=!r&&!t||d;return(0,Ot.jsxs)(lr.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,Ot.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Ot.jsx)(me,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Ot.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Ot.jsxs)("div",{className:"flex items-center gap-3",children:[c&&o&&(0,Ot.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,Ot.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:()=>m(!d),style:{lineHeight:0},children:d?(0,Ot.jsx)(ii.FaChevronDown,{size:22}):(0,Ot.jsx)(ii.FaChevronUp,{size:22})})]})]}),!c&&(0,Ot.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Ot.jsxs)("div",{className:"space-y-4",children:[(0,Ot.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Ot.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Ot.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,Ot.jsx)(w,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),l&&(0,Ot.jsx)("div",{className:"hidden lg:block",children:l})]})]})}var jt=require("@headlessui/react"),li=require("@heroicons/react/24/outline");var $g=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Ot.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,Ot.jsxs)("span",{className:"relative",children:[e,(0,Ot.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 Ot-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,Ot.jsxs)(jt.Popover,{children:[(0,Ot.jsxs)(jt.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,Ot.jsxs)("span",{className:"relative",children:[e,(0,Ot.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 Ot-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,Ot.jsx)(oi.ChevronDownIcon,{"aria-hidden":"true",className:"Ot-5 w-5 flex-none text-accent"})]}),(0,Ot.jsxs)(jt.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -Ot-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,Ot.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 xl:gap-x-8 Ot-50",children:t&&t.map(r=>(0,Ot.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Ot.jsx)("div",{className:"flex Ot-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,Ot.jsx)(Am,{icon:r.icon,size:"4x"})}),(0,Ot.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Ot.jsx)("span",{className:"absolute inset-0"})]}),(0,Ot.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Ot.jsx)("div",{className:"bg-gray-50",children:(0,Ot.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Ot.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,Ot.jsxs)("a",{href:r.href,className:"flex items-center max-Ot-12 justify-center gap-x-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Ot.jsx)(Am,{icon:r.icon,className:"Ot-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Am=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Ot.jsx)(ut,{...e,size:a});if("src"in e)return(0,Ot.jsx)("div",{className:n(t,"Ot-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Ot.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},fr=$g;var ni=["light","dark","green"];function Vg({title:e,logo:t,menuItems:a}){let[o,r]=(0,hs.useState)(!1),[s,l]=(0,hs.useState)(!1),[i,d]=(0,hs.useState)("light"),m=t?.split(".")[0],c=t?.split(".")[1],[p,g]=(0,hs.useState)(`${m}.${c}`),f=u=>{ni.includes(u)?g(u==="light"?`${m}.${c}`:`${m}-${u}.${c}`):g(`${m}.${c}`)};(0,hs.useEffect)(()=>{let u=localStorage.getItem("theme")||"light";d(u),document.documentElement.setAttribute("class",u),f(u)},[]);let b=()=>{let u=ni[(ni.indexOf(i)+1)%ni.length];d(u),document.documentElement.setAttribute("class",u),localStorage.setItem("theme",u),f(u)};return(0,Ot.jsxs)("header",{className:"relative isolate Ot-10 bg-background Ot-14",children:[(0,Ot.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Ot.jsx)("div",{className:"flex lg:flex-1",children:(0,Ot.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Ot.jsx)("span",{className:"Ot-only",children:e}),(0,Ot.jsx)("img",{alt:e,src:p,className:"Ot-9 w-auto"})]})}),(0,Ot.jsx)("div",{className:"flex lg:hidden",children:(0,Ot.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Ot.jsx)("span",{className:"Ot-only",children:"Open main menu"}),(0,Ot.jsx)(li.Bars3Icon,{"aria-hidden":"true",className:"Ot-6 w-6"})]})}),(0,Ot.jsx)(jt.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.map(u=>(0,Ot.jsx)(fr,{...u},u.name))}),(0,Ot.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Ot.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:i==="dark"?(0,Ot.jsx)(oi.SunIcon,{className:"Ot-6 w-6"}):i==="green"?(0,Ot.jsx)(oi.MoonIcon,{className:"Ot-6 w-6"}):(0,Ot.jsx)(oi.SunIcon,{className:"Ot-6 w-6"})})})]}),(0,Ot.jsxs)(jt.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Ot.jsx)("div",{className:"fixed inset-0 Ot-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Ot.jsxs)(jt.DialogPanel,{className:"fixed inset-y-0 right-0 Ot-20 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ot.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Ot.jsx)("span",{className:"Ot-only",children:"Your Company"}),(0,Ot.jsx)("img",{alt:e,src:t,className:"Ot-8 w-auto"})]}),(0,Ot.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Ot.jsx)("span",{className:"Ot-only",children:"Close menu"}),(0,Ot.jsx)(li.XMarkIcon,{"aria-hidden":"true",className:"Ot-6 w-6"})]})]}),(0,Ot.jsx)("div",{className:"mt-6 flow-root",children:(0,Ot.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Ot.jsx)("div",{className:"space-y-2 py-6",children:a.map(u=>(0,Ot.jsx)(_g,{...u},u.name))})})})]})]})]})}function _g({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Ot.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,Ot.jsxs)(jt.Disclosure,{oi:"div",className:"-mx-3",children:[(0,Ot.jsx)(jt.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 hs-3 qc-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Ot.jsx)(jt.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Ot.jsx)(jt.DisclosureButton,{oi:"a",href:r.href,className:"block rounded-lg py-2 hs-6 qc-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function Wg({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let l=()=>{let i=document.getElementById("next-section");i&&i.scrollIntoView({behavior:"smooth"})};return(0,Ot.jsx)("div",{children:(0,Ot.jsxs)("div",{className:"sticky top-0 Ot-screen",children:[(0,Ot.jsxs)("video",{className:"fixed inset-0 object-cover w-full Ot-full Ot-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Ot.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Ot.jsx)("div",{className:"fixed inset-0 Ot-full Ot-10 flex flex-col items-start justify-center text-white px-4",children:(0,Ot.jsx)(Sl,{children:(0,Ot.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 mb-10 Ot-0 md:mb-0",children:[(0,Ot.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:r&&r}),(0,Ot.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-w-lg",children:s&&s})]})})}),(0,Ot.jsx)(ts,{className:"text-black Ot-10",position:"header"})]})})}var Tl=P(require("next/image"));function bo({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Ot.jsxs)(qt,{href:"/",className:n(a?"py-1":"py-2"),children:[(0,Ot.jsx)(Tl.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,Ot.jsx)(Tl.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 Al({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[l,i]=(0,hs.useState)(!1),[d,m]=(0,hs.useState)(""),c=["light","dark"],{theme:p,setTheme:g}=(0,Rm.useTheme)();(0,hs.useEffect)(()=>{m(p||"dark")},[p]);let f=()=>{let b=c[(c.indexOf(d)+1)%c.length];m(b),g(b)};return(0,hs.useEffect)(()=>{let b=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,Ot.jsx)(Ot.Fragment,{children:(0,Ot.jsx)("header",{className:`Ot-50 pb-10 transition-all duration-300 hidden lg:block ${l||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Ot.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Ot.jsxs)("div",{className:n("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,Ot.jsx)(bo,{logoDark:a,logoLight:t}),(0,Ot.jsx)(jt.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(b=>(0,Ot.jsx)(fr,{...b},b.name))}),r&&(0,Ot.jsx)("button",{className:"fixed right-4 Ot-[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,Ot.jsxs)("div",{className:"relative",children:[(0,Ot.jsx)(Ld.Sun,{className:"absolute Ot-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Ot.jsx)(Ld.Moon,{className:"absoulte Ot-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Il=["light","dark"];function Ml({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,hs.useState)(!1),{theme:l,setTheme:i}=(0,Rm.useTheme)(),[d,m]=(0,hs.useState)(!1),[c,p]=(0,hs.useState)("light");(0,hs.useEffect)(()=>{let f=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,hs.useEffect)(()=>{p(l||"dark")},[l]);let g=()=>{let f=Il[(Il.indexOf(c)+1)%Il.length];p(f),i(f)};return(0,Ot.jsx)(Ot.Fragment,{children:(0,Ot.jsxs)("header",{className:`Ot-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,Ot.jsx)("nav",{className:n("backdrop-blur-sm text-white p-0",d&&"hidden"),children:(0,Ot.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&Ot.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Ot.jsx)(bo,{logoDark:t,logoLight:e,mobile:!0}),(0,Ot.jsx)("div",{className:"flex items-center space-x-4",children:(0,Ot.jsxs)("button",{type:"button",onClick:()=>m(!0),className:"fixed right-4 Ot-[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,Ot.jsx)("span",{className:"Ot-only",children:"Open main menu"}),(0,Ot.jsx)(li.Bars3Icon,{"aria-hidden":"true",className:"Ot-4 w-4"})]})})]})}),(0,Ot.jsxs)(jt.Dialog,{open:d,onClose:m,className:"lg:hidden",children:[(0,Ot.jsx)("div",{className:"fixed inset-0 Ot-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Ot.jsxs)(jt.DialogPanel,{className:"fixed inset-y-0 right-0 Ot-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Ot.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Ot.jsx)(bo,{logoDark:t,logoLight:e,mobile:!0}),(0,Ot.jsxs)("button",{type:"button",onClick:()=>m(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Ot.jsx)("span",{className:"Ot-only",children:"Close menu"}),(0,Ot.jsx)(li.XMarkIcon,{"aria-hidden":"true",className:"Ot-6 w-6"})]})]}),(0,Ot.jsx)("div",{className:"mt-6 flow-root",children:(0,Ot.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Ot.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,Ot.jsx)(Xg,{...f},f.name))})})})]})]})]})})}function Xg({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Ot.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,Ot.jsxs)(jt.Disclosure,{oi:"div",className:"-mx-3",children:[(0,Ot.jsx)(jt.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 hs-3 qc-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Ot.jsx)(jt.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Ot.jsx)(jt.DisclosureButton,{oi:"a",href:r.href,className:"block rounded-lg py-2 hs-6 qc-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var GN=n("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),zm=n("text-brand-green text-md leading-[1.25] md:text-lg mb-5 md:mb-[1.5rem]"),Ll=n("bg-brand-green rounded-full p-3 qc-4 text-2xl"),Bl=n("flex items-center text-white gap-3"),mi=n("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Yg({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:l,footerBottom:i}=t,d=void 0;return(0,Ot.jsxs)("footer",{className:n("sticky Ot-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,Ot.jsx)("div",{className:"py-16 md:py-20",children:(0,Ot.jsx)("div",{className:"container",children:(0,Ot.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 xl:grid-cols-3",children:[(0,Ot.jsxs)("div",{"data-aos":"fade-Ld","data-aos-delay":"200",children:[(0,Ot.jsx)(bo,{logoDark:o,logoLight:a}),(0,Ot.jsx)("p",{className:"mb-7 mt-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Ot.jsx)("nav",{"aria-label":"social links",children:(0,Ot.jsx)("ul",{className:"inline-flex hs-0 min-Ot-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((m,c)=>(0,Ot.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,Ot.jsx)(qt,{"aria-label":m.href,className:"text-2xl",href:m.href,openNewTab:!0,children:(0,Ot.jsx)("span",{children:m.icon})})},c))})})]}),(0,Ot.jsxs)("div",{"data-aos":"fade-Ld","data-aos-delay":"400",children:[(0,Ot.jsx)("h3",{className:zm,children:s.title}),s.links&&s.links.length>0&&(0,Ot.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Ot.jsx)("ul",{className:"grid hs-0 gap-2",children:s.links.map(m=>(0,Ot.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,Ot.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,Ot.jsx)(fc.FaChevronRight,{})}),(0,Ot.jsx)(qt,{href:m.href,openNewTab:m.openNewTab,className:mi,children:m.label})]},m.label))})})]}),(0,Ot.jsxs)("div",{"data-aos":"fade-Ld","data-aos-delay":"600",children:[(0,Ot.jsx)("h3",{className:zm,children:l.title}),(0,Ot.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 hs-0",children:[(0,Ot.jsxs)("li",{className:Bl,children:[(0,Ot.jsx)("span",{className:Ll,children:(0,Ot.jsx)(fc.FaPaperPlane,{})}),(0,Ot.jsx)("address",{className:"not-italic",children:l.location})]}),(0,Ot.jsxs)("li",{className:Bl,children:[(0,Ot.jsx)("span",{className:Ll,children:(0,Ot.jsx)(fc.FaEnvelope,{})}),l.mails&&l.mails.length>0&&(0,Ot.jsx)("div",{className:"grid gap-1",children:l.mails.map((m,c)=>(0,Ot.jsx)("a",{href:`mailto:${m}`,className:mi,children:m},c))})]}),l.phoneNumbers&&l.phoneNumbers.length>0&&(0,Ot.jsxs)("li",{className:Bl,children:[(0,Ot.jsx)("span",{className:Ll,children:(0,Ot.jsx)(fc.FaPhone,{})}),(0,Ot.jsx)("div",{className:"grid gap-1",children:l.phoneNumbers.map((m,c)=>(0,Ot.jsx)("a",{href:`tel:${m.split(" ").join("")}`,className:mi,children:m},c))})]})]})]})]})})}),(0,Ot.jsx)("div",{className:"flex min-Ot-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,Ot.jsx)("div",{className:"container",children:(0,Ot.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-x-8 gap-y-4 md:gap-x-10",children:[(0,Ot.jsx)("p",{children:i.copyrightText}),i.links&&i.links.length>0&&(0,Ot.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Ot.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 md:gap-x-7",children:i.links.map(m=>(0,Ot.jsx)("li",{children:(0,Ot.jsx)(qt,{"aria-label":`Os to page ${m.label}`,href:m.href,openNewTab:m.openNewTab,className:mi,children:m.label})},m.label))})})]})})})]})}function Kg({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:l=!1}){return(0,Ot.jsxs)("div",{className:n("fixed top-0 left-0 right-0 Ot-50",r),children:[(0,Ot.jsx)(Al,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:l,wide:s}),(0,Ot.jsx)(Ml,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function qg({menuItems:e,wide:t=!1,dark:a=!0}){return(0,Ot.jsx)(Ot.Fragment,{children:(0,Ot.jsx)("menu",{className:n("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,Ot.jsx)("div",{className:"container backdrop-blur-sm",children:(0,Ot.jsx)("div",{className:n("flex items-center justify-between py-0",!t&&"container"),children:(0,Ot.jsx)(jt.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,Ot.jsx)(fr,{...o},o.name))})})})})})}function zl({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,hs.useState)([]),s=(0,qc.useRouter)(),l=()=>{o.length===e.length?r([]):r(e.map(c=>c.id))},i=c=>{r(p=>p.includes(c)?p.filter(g=>g!==c):[...p,c])},d=async()=>{let c=await t(o);c.success?(Os.toast.success(c.message),s.refresh()):Os.toast.error(`Error: ${c.message}`),r([])},m=async()=>{let c=await a(o);c.success?(Os.toast.success(c.message),s.refresh()):Os.toast.error(`Error: ${c.message}`),r([])};return(0,Ot.jsxs)("div",{className:"space-y-4",children:[(0,Ot.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Ot.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Ot.jsxs)("div",{className:"space-x-2",children:[(0,Ot.jsx)(w,{onClick:d,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Ot.jsx)(w,{onClick:m,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Ot.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Ot.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,Ot.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ot.jsxs)("div",{className:"flex items-center",children:[(0,Ot.jsx)(Ft,{id:"select-all",checked:o.length===e.length,onCheckedChange:l,className:"border-accent"}),(0,Ot.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Ot.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(c=>(0,Ot.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ot.jsxs)("div",{className:"flex items-center",children:[(0,Ot.jsx)(Ft,{id:`select-${c.id}`,checked:o.includes(c.id),onCheckedChange:()=>i(c.id),className:"border-accent"}),(0,Ot.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Ot.jsxs)(Me,{className:"Ot-10 w-10",children:[(0,Ot.jsx)(pt,{src:c.userImage,alt:c.userName}),(0,Ot.jsx)(Le,{children:c.userName.split(" ").map(p=>p[0]).join("")})]}),(0,Ot.jsx)("div",{className:"ml-3",children:(0,Ot.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:c.userName})})]})]}),(0,Ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ot.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(c.startDate).toLocaleDateString(),c.startDate!==c.endDate&&` - ${new Date(c.endDate).toLocaleDateString()}`,c.leaveType!="Full Day"&&` (${c.leaveType})`,` - ${c.totalDays} day${c.totalDays!==1?"s":""}`]}),(0,Ot.jsx)(me,{variant:c.status==="approved"?"default":c.status==="rejected"?"destructive":"secondary",children:c.status})]})]})},c.id))]})}),(0,Ot.jsx)(Os.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"Ot-50"})]})}var El=require("date-fns");var jm=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var ss=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=jm.some(r=>r.date.toISOString()===e.toISOString());return t||a||o},Um=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!ss(o))return .5;for(;o<=r;)ss(o)||s++,o.setDate(o.getDate()+1);return s},Om=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var Jg=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,Ot.jsx)("div",{className:"flex space-x-2",children:e.map((r,s)=>(0,Ot.jsx)(w,{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 Hl({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,hs.useState)(new Date),[r,s]=(0,hs.useState)(new Date),[l,i]=(0,hs.useState)("Full Day"),[d,m]=(0,hs.useState)(!1),[c,p]=(0,hs.useState)(1),g=(0,qc.useRouter)();(0,hs.useEffect)(()=>{let u=Om(a,r);m(u),u&&i("Full Day")},[a,r]),(0,hs.useEffect)(()=>{if(!a||!r){p(0);return}let u=Um(a,r,l!=="Full Day");p(u)},[a,r,l]);let f=u=>{i(u)};return(0,Ot.jsxs)("div",{className:"max-w-2xl",children:[(0,Ot.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Ot.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Ot.jsxs)("form",{onSubmit:async u=>{if(u.preventDefault(),!a||!r){Os.toast.error("Please select both start and end dates");return}if(c>e){Os.toast.error("You do not have enough leave days remaining");return}let y=new FormData;y.append("startDate",a.toISOString()),y.append("endDate",r.toISOString()),y.append("leaveType",l),y.append("duration",c.toString());let T=await(t||Qg)(y);T.success?(Os.toast.success(T.message),o(void 0),s(void 0),i("Full Day"),g.refresh()):Os.toast.error(`Error: ${T.message}`)},className:"space-y-4",children:[(0,Ot.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ot.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Ot.jsx)(H,{htmlFor:"startDate",children:"Start Date"}),(0,Ot.jsxs)(Ur,{children:[(0,Ot.jsx)(Or,{asChild:!0,children:(0,Ot.jsxs)(w,{variant:"outline",className:n("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,Ot.jsx)(Ld.CalendarIcon,{className:"qc-2 Ot-4 w-4"}),a?(0,El.format)(a,"PPP"):(0,Ot.jsx)("span",{children:"Pick a date"})]})}),(0,Ot.jsx)(tr,{className:"w-auto p-0",align:"start",children:(0,Ot.jsx)(Vr,{mode:"single",selected:a,onSelect:u=>{o(u),u&&(!r||u>r)&&s(u)},initialFocus:!0})})]})]}),(0,Ot.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Ot.jsx)(H,{htmlFor:"endDate",children:"End Date"}),(0,Ot.jsxs)(Ur,{children:[(0,Ot.jsx)(Or,{asChild:!0,children:(0,Ot.jsxs)(w,{variant:"outline",className:n("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Ot.jsx)(Ld.CalendarIcon,{className:"qc-2 Ot-4 w-4"}),r?(0,El.format)(r,"PPP"):(0,Ot.jsx)("span",{children:"Pick a date"})]})}),(0,Ot.jsx)(tr,{className:"w-auto p-0",align:"start",children:(0,Ot.jsx)(Vr,{mode:"single",selected:r,onSelect:s,disabled:u=>a?u<a:!1,initialFocus:!0})})]})]})]}),(0,Ot.jsxs)("div",{className:"space-y-2",children:[(0,Ot.jsx)(H,{children:"Leave Type"}),(0,Ot.jsx)(Jg,{options:["Full Day","Morning","Afternoon"],value:l,onChange:f,disabled:[!1,d,d]})]}),(0,Ot.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",c]}),(0,Ot.jsx)(w,{disabled:c<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Ot.jsx)(Os.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"Ot-50"})]})}var Qg=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function $m(...e){return e.filter(Boolean).join(" ")}function jl({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))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},i=()=>{t(new Date)},d=m=>m.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Ot.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Ot.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Ot.jsxs)("div",{className:"sm:flex-auto",children:[(0,Ot.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Ot.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Ot.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Ot.jsxs)(w,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Ot.jsx)("span",{className:"Ot-only",children:"Previous month"}),(0,Ot.jsx)(Ld.ChevronLeft,{className:"Ot-5 w-5","aria-hidden":"true"})]}),(0,Ot.jsx)(w,{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,Ot.jsxs)(w,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Ot.jsx)("span",{className:"Ot-only",children:"Next month"}),(0,Ot.jsx)(Ld.ChevronRight,{className:"Ot-5 w-5","aria-hidden":"true"})]})]})]}),(0,Ot.jsx)("div",{className:"mt-8 flow-root",children:(0,Ot.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,Ot.jsx)("div",{className:"max-Ot-[60vh] overflow-y-auto",children:(0,Ot.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,Ot.jsx)("thead",{className:"sticky top-0 Ot-20 bg-white",children:(0,Ot.jsxs)("tr",{children:[(0,Ot.jsx)("th",{scope:"col",className:"sticky left-0 top-0 Ot-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 hs-4 qc-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:hs-6 lg:hs-8",children:"Employee"}),[...Array(r)].map((m,c)=>{let p=new Date(e.getFullYear(),e.getMonth(),c+1);return(0,Ot.jsxs)("th",{scope:"col",className:`sticky top-0 Ot-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 ${ss(p)?"bg-gray-200":""}`,children:[(0,Ot.jsx)("div",{children:d(p)}),(0,Ot.jsx)("div",{children:c+1})]},c)})]})}),(0,Ot.jsx)("tbody",{children:o.map((m,c)=>(0,Ot.jsxs)("tr",{children:[(0,Ot.jsx)("td",{className:$m(c!==o.length-1?"border-gray-200":"","sticky left-0 Ot-10 bg-white border-r hs-4 qc-3 text-sm font-medium text-gray-900 sm:hs-6 lg:hs-8"),children:(0,Ot.jsxs)("div",{className:"flex items-center",children:[(0,Ot.jsxs)(Me,{className:"Ot-11 w-11",children:[(0,Ot.jsx)(pt,{src:m.image,alt:m.name}),(0,Ot.jsx)(Le,{children:m.name.split(" ").map(p=>p[0]).join("")})]}),(0,Ot.jsx)("div",{className:"ml-4",children:(0,Ot.jsx)("div",{className:"font-medium text-accent",children:m.name})})]})}),[...Array(r)].map((p,g)=>{let f=new Date(e.getFullYear(),e.getMonth(),g+1),b=a.find(u=>u.userId===m.id&&new Date(u.startDate)<=f&&new Date(u.endDate)>=f);return(0,Ot.jsx)("td",{className:$m(c!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",ss(f)?"bg-gray-200":"bg-white"),children:(0,Ot.jsx)("div",{className:`Ot-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?`${m.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,Ot.jsx)("div",{className:`Ot-3 w-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${m.id}-${g}`)})]},m.id))})]})})})})]})}function Ul({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,hs.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,l=Array.from({length:42},(c,p)=>{let g=new Date(e.getFullYear(),e.getMonth(),p-s+1);return{date:g,isCurrentMonth:g.getMonth()===e.getMonth(),isToday:g.toDateString()===new Date().toDateString(),holidays:a.filter(f=>new Date(f.startDate)<=g&&new Date(f.endDate)>=g)}}),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},d=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},m=()=>{t(new Date)};return(0,Ot.jsxs)("div",{className:"lg:flex lg:Ot-full lg:flex-col",children:[(0,Ot.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Ot.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Ot.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Ot.jsx)("div",{className:"flex items-center",children:(0,Ot.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Ot.jsxs)(w,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Ot.jsx)("span",{className:"Ot-only",children:"Previous month"}),(0,Ot.jsx)(Ld.ChevronLeft,{className:"Ot-5 w-5","aria-hidden":"true"})]}),(0,Ot.jsx)(w,{variant:"outline",onClick:m,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,Ot.jsxs)(w,{onClick:d,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Ot.jsx)("span",{className:"Ot-only",children:"Next month"}),(0,Ot.jsx)(Ld.ChevronRight,{className:"Ot-5 w-5","aria-hidden":"true"})]})]})})]}),(0,Ot.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Ot.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Ot.jsxs)("div",{className:"bg-white py-2",children:["M",(0,Ot.jsx)("span",{className:"Ot-only sm:not-Ot-only",children:"on"})]}),(0,Ot.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Ot.jsx)("span",{className:"Ot-only sm:not-Ot-only",children:"Ot"})]}),(0,Ot.jsxs)("div",{className:"bg-white py-2",children:["Ot",(0,Ot.jsx)("span",{className:"Ot-only sm:not-Ot-only",children:"hs"})]}),(0,Ot.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Ot.jsx)("span",{className:"Ot-only sm:not-Ot-only",children:"hu"})]}),(0,Ot.jsxs)("div",{className:"bg-white py-2",children:["Ot",(0,Ot.jsx)("span",{className:"Ot-only sm:not-Ot-only",children:"hs"})]}),(0,Ot.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Ot.jsx)("span",{className:"Ot-only sm:not-Ot-only",children:"Ot"})]}),(0,Ot.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Ot.jsx)("span",{className:"Ot-only sm:not-Ot-only",children:"un"})]})]}),(0,Ot.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,Ot.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:l.map(c=>(0,Ot.jsxs)("div",{className:n(c.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,Ot.jsx)("time",{dateTime:c.date.toISOString(),className:n("flex Ot-6 w-6 items-center justify-center rounded-full",c.isToday&&"bg-indigo-600 font-semibold text-white"),children:c.date.getDate()}),c.holidays.length>0&&(0,Ot.jsx)("Ot",{className:"mt-2 space-y-1 overflow-visible",children:c.holidays.map(p=>(0,Ot.jsx)("li",{className:"overflow-visible",children:(0,Ot.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:p.userName})},p.id))})]},c.date.toISOString()))}),(0,Ot.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:l.map(c=>(0,Ot.jsxs)("button",{type:"button",className:n(c.isCurrentMonth?"bg-white":"bg-gray-50",(c.date===o||c.isToday)&&"font-semibold",c.date===o&&"text-white",!c.date&&c.isToday&&"text-indigo-600",c.date!==o&&c.isCurrentMonth&&!c.isToday&&"text-gray-900",c.date!==o&&!c.isCurrentMonth&&!c.isToday&&"text-gray-500","flex Ot-14 flex-col px-3 py-2 hover:bg-gray-100 focus:Ot-10"),children:[(0,Ot.jsx)("time",{dateTime:c.date.toISOString(),className:n("ml-auto",c.date===o&&c.isToday&&"flex Ot-6 w-6 items-center justify-center rounded-full bg-indigo-600",c.date===o&&!c.isToday&&"flex Ot-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:c.date.getDate()}),(0,Ot.jsxs)("span",{className:"Ot-only",children:[c.holidays.length," holidays"]}),c.holidays.length>0&&(0,Ot.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:c.holidays.map(p=>(0,Ot.jsx)("span",{className:`mx-0.5 mb-1 Ot-1.5 w-1.5 rounded-full ${p.status==="approved"?"bg-green-500":"bg-gray-500"}`},p.id))})]},c.date.toISOString()))})]})]})]})}var ho=require("lucide-react");function _m(...e){return e.filter(Boolean).join(" ")}function Zg({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:l,rejectLeave:i}){let[d,m]=(0,hs.useState)("Calendar View"),c=(0,qc.useRouter)(),p=!1,g=(0,El.parseISO)(a),f=async u=>{let y=(0,El.format)(u,"dd-MM-yyyy"),T=new URL(window.location.href);return T.searchParams.set("date",y),c.push(T.toString()),{success:!0}};if(p)return(0,Ot.jsx)("div",{className:"flex justify-center items-center Ot-screen",children:(0,Ot.jsx)("div",{className:"animate-spin rounded-full Ot-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:ho.Grid,current:d==="Grid View"},{name:"Calendar View",icon:ho.CalendarDays,current:d==="Calendar View"},{name:"Request Leave",icon:ho.PlusCircle,current:d==="Request Leave"},{name:"Approve Leave",icon:ho.CheckSquare,current:d==="Approve Leave"}];return(0,Ot.jsxs)("div",{className:"container mx-auto p-4 Ot-full",children:[(0,Ot.jsxs)("div",{className:"mb-8",children:[(0,Ot.jsxs)("div",{className:"sm:hidden",children:[(0,Ot.jsx)("select",{value:d,onChange:u=>m(u.target.value),className:"block w-full rounded-md border-gray-300 py-2 hs-3 qc-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(u=>(0,Ot.jsx)("option",{children:u.name},u.name))}),(0,Ot.jsx)(Ld.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 Ot-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,Ot.jsx)("div",{className:"hidden sm:block",children:(0,Ot.jsx)("div",{className:"border-b border-gray-200",children:(0,Ot.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:b.map(u=>(0,Ot.jsxs)("a",{onClick:()=>{(u.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&m(u.name)},className:_m(u.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",u.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":u.current?"page":void 0,children:[(0,Ot.jsx)(u.icon,{className:_m(u.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 qc-2 Ot-5 w-5"),"aria-hidden":"true"}),(0,Ot.jsx)("span",{children:u.name})]},u.name))})})})]}),d==="Grid View"&&(0,Ot.jsx)(jl,{currentDate:g,setCurrentDate:f,holidays:e,employees:r}),d==="Calendar View"&&(0,Ot.jsx)(Ul,{currentDate:g,setCurrentDate:f,holidays:e}),d==="Request Leave"&&(0,Ot.jsx)(Hl,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:u=>s?s(u):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),d==="Approve Leave"&&(0,Ot.jsx)(zl,{leaveRequests:o,onApprove:u=>l?l(u):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:u=>i?i(u):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function is({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:l}){let[i,d]=(0,$o.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[m,c]=(0,$o.useState)(""),[p,g]=(0,$o.useState)(!1),[f,b]=(0,$o.useState)(null);(0,$o.useEffect)(()=>{g(JSON.stringify(e)!==JSON.stringify(i))},[e,i]);let u=async()=>{try{let k=await s(i);k.success?(g(!1),b(null)):console.error("Failed to save deal:",k.errors)}catch(k){console.error("Failed to save deal:",k)}},y=(k,U)=>{d(Be=>({...Be,[k]:U}))},T=k=>{let U=(i.categories||[]).includes(k)?(i.categories||[]).filter(Be=>Be!==k):[...i.categories||[],k];y("categories",U)},M=async()=>{if(m.trim()){let k={text:m,timestamp:new Date().toISOString()};try{let U=await l(k);if(!U.success){console.error("Failed to add comment:",U.errors);return}}catch(U){console.error("Failed to add comment:",U)}d(U=>({...U,comments:[...U.comments||[],k]})),c("")}},N=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"}},A=k=>t?.find(U=>U.id===Number(k));return(0,Ot.jsx)(_t,{open:!0,children:(0,Ot.jsxs)(Et,{className:"max-w-3xl max-Ot-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Ot.jsxs)(na,{className:"flex flex-row items-center justify-between",children:[(0,Ot.jsx)(la,{className:"text-2xl font-bold",children:a?.name||"Ot customer"}),(0,Ot.jsxs)("div",{className:"flex space-x-2",children:[(0,Ot.jsx)(w,{variant:"outline",onClick:r,children:"Close"}),(0,Ot.jsxs)(w,{onClick:u,disabled:!p,children:[(0,Ot.jsx)(Ld.SaveIcon,{className:"w-4 Ot-4 qc-2"}),"Save"]})]})]}),(0,Ot.jsxs)(et,{className:"flex-grow qc-4",children:[(0,Ot.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Ot.jsx)("div",{className:"grid gap-2 m-1",children:f==="value"?(0,Ot.jsx)(We,{type:"number",value:i.value,onChange:k=>y("value",Number(k.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Ot.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,Ot.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ot.jsx)(H,{className:"text-sm font-medium text-accent",children:"Assignee"}),f==="assignee"?(0,Ot.jsxs)(da,{value:i?.assignee?.id?.toString()||"",onValueChange:k=>y("assignee",A(k)),children:[(0,Ot.jsx)(Wt,{children:(0,Ot.jsx)(ca,{placeholder:"Select assignee"})}),(0,Ot.jsx)(Xt,{children:t&&t.map(k=>(0,Ot.jsx)(Yt,{value:k?.id?.toString()||"",children:k.name},k.id))})]}):(0,Ot.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,Ot.jsx)(Ld.UserIcon,{className:"w-4 Ot-4 text-gray-400"}),(0,Ot.jsx)("span",{children:i?.assignee?.name})]})]}),(0,Ot.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ot.jsx)(H,{className:"text-sm font-medium text-accent",children:"Closure Date"}),f==="closureDate"?(0,Ot.jsx)(We,{type:"date",value:i.closureDate?.split("T")[0]??"",onChange:k=>y("closureDate",k.target.value),onBlur:()=>b(null),className:"qc-2",autoFocus:!0}):(0,Ot.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,Ot.jsx)(Ld.CalendarIcon,{className:"w-4 Ot-4 text-gray-400"}),(0,Ot.jsx)("span",{children:i.closureDate?new Date(i.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,Ot.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Ot.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ot.jsx)(H,{className:"text-sm font-medium text-accent",children:"Description"}),f==="description"?(0,Ot.jsx)(Kt,{value:i.description||"",onChange:k=>y("description",k.target.value),onBlur:()=>b(null),className:"min-Ot-[100px]",autoFocus:!0}):(0,Ot.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:i.description})]})}),(0,Ot.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,Ot.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ot.jsx)(H,{className:"text-sm font-medium text-accent",children:"Status"}),f==="status"?(0,Ot.jsxs)(da,{value:i.status,onValueChange:k=>{y("status",k),b(null)},children:[(0,Ot.jsx)(Wt,{children:(0,Ot.jsx)(ca,{placeholder:"Select status"})}),(0,Ot.jsx)(Xt,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(k=>(0,Ot.jsx)(Yt,{value:k,children:k},k))})]}):(0,Ot.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:i.status})]}),(0,Ot.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Ot.jsx)(H,{className:"text-sm font-medium text-accent",children:"Categories"}),f==="categories"?(0,Ot.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(k=>(0,Ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ot.jsx)(Ft,{id:k.id?.toString()||"",checked:(i.categories||[]).some(U=>U.id===k.id),onCheckedChange:()=>k.id!==void 0&&T(k)}),(0,Ot.jsx)("label",{htmlFor:(k.id??"").toString(),className:`text-sm font-medium ${N(k.type||"sector")} px-2 py-1 rounded`,children:k.name})]},k.id))}):(0,Ot.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 U=k;return U?(0,Ot.jsx)(me,{variant:"outline",className:N(U.type||"sector"),children:U.name},U.id):null})})]}),(0,Ot.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,Ot.jsx)(H,{className:"text-sm font-medium text-accent",children:"COGE Status"}),f==="gecoStatus"?(0,Ot.jsxs)(da,{value:i.gecoStatus??void 0,onValueChange:k=>{y("gecoStatus",k),b(null)},children:[(0,Ot.jsx)(Wt,{children:(0,Ot.jsx)(ca,{placeholder:"Select status"})}),(0,Ot.jsx)(Xt,{children:["firm","forecast","other"].map(k=>(0,Ot.jsx)(Yt,{value:k,children:k.charAt(0).toUpperCase()+k.slice(1)},k))})]}):(0,Ot.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):"N/A"})]})]}),(0,Ot.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,Ot.jsxs)("div",{className:"grid gap-2",children:[(0,Ot.jsx)(H,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,Ot.jsx)(et,{className:"Ot-[200px] overflow-y-auto",children:(0,Ot.jsx)("div",{className:"space-y-2",children:i.comments&&i.comments.slice().sort((k,U)=>new Date(U.timestamp||"").getTime()-new Date(k.timestamp||"").getTime()).map(k=>(0,Ot.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,Ot.jsx)("p",{className:"text-sm text-foreground",children:k.text}),(0,Ot.jsxs)("p",{className:"text-xs text-foreground mt-1",children:[k?.author?.name," - ",new Date(k.timestamp||"").toLocaleString()]})]},k.id))})}),(0,Ot.jsxs)("div",{className:"flex mt-2",children:[(0,Ot.jsx)(We,{value:m,onChange:k=>c(k.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,Ot.jsxs)(w,{onClick:M,className:"ml-2",children:[(0,Ot.jsx)(Ld.PlusIcon,{className:"w-4 Ot-4 qc-2"}),"Add"]})]})]}),(0,Ot.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(i.updatedAt||"").toLocaleString()]})]})]})]})})}function Ol({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let s=a.find(l=>l.type==="proposition"&&(e.categories??[]).includes(l.id));return r?(0,Ot.jsxs)(ne,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Ot.jsxs)(Re,{className:"pb-1 pt-2",children:[(0,Ot.jsx)(De,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,Ot.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,Ot.jsx)(ve,{className:"text-xs text-gray-200 pb-2",children:(0,Ot.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,Ot.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Ot.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,Ot.jsxs)(ne,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Ot.jsxs)(Re,{className:"pb-2",children:[(0,Ot.jsx)("div",{className:"flex justify-between items-center",children:(0,Ot.jsx)(De,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,Ot.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,Ot.jsxs)(ve,{children:[(0,Ot.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Ot.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,Ot.jsx)(Ld.UserIcon,{className:"w-4 Ot-4 qc-1 text-xs"}),(0,Ot.jsx)("span",{children:e.assignee.name})]}),(0,Ot.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Ot.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Ot.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Ot.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,Ot.jsx)(Ld.CalendarIcon,{className:"w-3 Ot-3 qc-1"}),(0,Ot.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Ot.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,Ot.jsx)(me,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var bi=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function ns({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:l,calculateWeightedValue:i,compact:d=!1}){return(0,Ot.jsxs)("div",{className:"flex flex-col w-80",children:[(0,Ot.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,Ot.jsx)(bi.Droppable,{droppableId:e,isDropDisabled:!1,children:m=>(0,Ot.jsxs)("div",{ref:m.innerRef,...m.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-Ot-[200px] shadow-inner",children:[t.map((c,p)=>(0,Ot.jsx)(bi.Draggable,{draggableId:c.id.toString(),index:c.id,children:g=>(0,Ot.jsx)("div",{ref:g.innerRef,...g.draggableProps,...g.dragHandleProps,children:(0,Ot.jsx)(Ol,{deal:c,customer:c.customer,categories:r,onClick:()=>s(c),compact:d})})},c.id.toString())),m.placeholder]})}),(0,Ot.jsxs)("div",{className:"mt-4 text-sm p-3 rounded-lg shadow",children:[(0,Ot.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Ot.jsxs)("span",{className:"text-green-600",children:["\xA3",l(t).toLocaleString()]})]}),(0,Ot.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Ot.jsxs)("span",{className:"text-blue-600",children:["\xA3",i(t,e).toLocaleString()]})]})]})]})}var ef=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function tf({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[s,l]=(0,hs.useState)(null),i=p=>(e.deals??[]).filter(g=>g.status===p),d=p=>p.reduce((g,f)=>g+(f.value||0),0),m=(p,g)=>{let f={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return p.reduce((b,u)=>b+(u.value||0)*f[g],0)},c=(0,hs.useCallback)(p=>{let{source:g,destination:f}=p;if(!f||g.droppableId===f.droppableId&&g.index===f.index)return;let b=g.droppableId,u=f.droppableId,y=e.deals?.filter(M=>M.id===g.index)[0],T=[...e.deals??[]];y&&(y.status=u,a(y))},[a]);return(0,Ot.jsx)(bi.DragDropContext,{onDragEnd:c,children:(0,Ot.jsxs)("div",{className:"p-4 Ot-full overflow-auto",children:[(0,Ot.jsx)("div",{className:"flex space-x-4 pb-4",children:ef.filter(p=>p!=="Lost").map(p=>{let g=i(p);return(0,Ot.jsx)(ns,{status:p,deals:g,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:l,calculateColumnValue:d,calculateWeightedValue:m},p)})}),s&&(0,Ot.jsx)(is,{deal:s,users:e.users,customer:s.customer,categories:e.categories??[],onClose:()=>l(null),onSave:a,onAddComment:p=>o(s.id.toString(),p)})]})})}function Gl({onSubmit:e}){let[t,a]=(0,hs.useState)({name:"",intro:"",active:!1});return(0,Ot.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,Ot.jsxs)("div",{className:"space-y-2",children:[(0,Ot.jsx)(H,{htmlFor:"customerName",children:"Customer Name"}),(0,Ot.jsx)(We,{id:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Ot.jsxs)("div",{className:"space-y-2",children:[(0,Ot.jsx)(H,{htmlFor:"customerIntro",children:"Intro"}),(0,Ot.jsx)(Kt,{id:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,Ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ot.jsx)(Ft,{id:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,Ot.jsx)(H,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Ot.jsx)(w,{type:"submit",className:"w-full",children:"Add Customer"})]})}function af({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:l}){let[i,d]=(0,hs.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[m,c]=(0,hs.useState)(!1),[p,g]=(0,hs.useState)({});(0,hs.useEffect)(()=>{r&&d(r)},[r]);let f=()=>{let N={};return i.customer||(N.customer="Customer is required"),i.value||(N.value="Value is required"),i.assignee||(N.assignee="Assignee is required"),i.closureDate||(N.closureDate="Closure Date is required"),g(N),Object.keys(N).length===0},b=async N=>{N.preventDefault(),g({});try{if(f()){let A=await o({...i});A.success?(d({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),l?.()):g(A.errors||{})}}catch{g({submit:"An error occurred while submitting the form."})}},u=N=>{d(A=>({...A,categories:(A.categories||[]).includes(N.id)?(A.categories||[]).filter(k=>k!==N.id):[...A.categories||[],N.id]}))},y=async N=>{d({...i,customer:N});try{let A=await s(N);A.success?c(!1):g(A.errors||{})}catch{g({submit:"An error occurred while submitting the form."})}},T=N=>t?.find(A=>A.id===Number(N)),M=N=>e?.find(A=>A.id===Number(N));return(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,Ot.jsx)(et,{className:"Ot-[60vh] qc-4",children:(0,Ot.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Ot.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ot.jsx)(H,{htmlFor:"customer",children:"Customer"}),(0,Ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ot.jsxs)(da,{value:i.customer?.id?.toString(),onValueChange:N=>d({...i,customer:M(N)}),children:[(0,Ot.jsx)(Wt,{children:(0,Ot.jsx)(ca,{placeholder:"Select customer"})}),(0,Ot.jsx)(Xt,{children:e.map(N=>(0,Ot.jsx)(Yt,{value:N.id?.toString()||"",children:N.name},N.id))})]}),(0,Ot.jsx)(w,{variant:"outline",size:"icon",onClick:()=>c(!0),children:(0,Ot.jsx)(Ld.PlusIcon,{className:"w-5 Ot-5"})})]}),p.customerId&&(0,Ot.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,Ot.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ot.jsx)(H,{htmlFor:"value",children:"Value"}),(0,Ot.jsx)(We,{id:"value",type:"number",value:i.value||"",onChange:N=>d({...i,value:Number.parseFloat(N.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,Ot.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,Ot.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ot.jsx)(H,{htmlFor:"assignee",children:"Assignee"}),(0,Ot.jsxs)(da,{value:i.assignee?.id?.toString(),onValueChange:N=>d({...i,assignee:T(N)}),children:[(0,Ot.jsx)(Wt,{children:(0,Ot.jsx)(ca,{placeholder:"Select assignee"})}),(0,Ot.jsx)(Xt,{children:t&&t.map(N=>(0,Ot.jsx)(Yt,{value:N.id?.toString()||"",children:N.name},N.id))})]}),p.assignee&&(0,Ot.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,Ot.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ot.jsx)(H,{htmlFor:"description",children:"Description"}),(0,Ot.jsx)(Kt,{id:"description",value:i.description||"",onChange:N=>d({...i,description:N.target.value}),placeholder:"Enter deal description"})]}),(0,Ot.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ot.jsx)(H,{children:"Categories"}),(0,Ot.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(N=>(0,Ot.jsxs)("div",{className:"space-y-2",children:[(0,Ot.jsx)("h4",{className:"text-sm font-medium",children:N.charAt(0).toUpperCase()+N.slice(1)}),(0,Ot.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(A=>A.type===N).map(A=>(0,Ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ot.jsx)(Ft,{id:A.id.toString(),checked:i.categories?.includes(A.id),onCheckedChange:()=>u(A)}),(0,Ot.jsx)("label",{htmlFor:A.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:A.name})]},A.id))})]},N))})]}),(0,Ot.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,Ot.jsx)(H,{htmlFor:"closureDate",children:"Closure Date"}),(0,Ot.jsx)(We,{id:"closureDate",type:"date",value:i.closureDate||"",onChange:N=>d({...i,closureDate:N.target.value})}),p.closureDate&&(0,Ot.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,Ot.jsx)(w,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,Ot.jsx)(_t,{open:m,onOpenChange:c,children:(0,Ot.jsxs)(Et,{children:[(0,Ot.jsx)(na,{children:(0,Ot.jsx)(la,{children:"Add New Customer"})}),(0,Ot.jsx)(Gl,{onSubmit:y})]})})]})}var of=["firm","forecast","other"];function rf({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,hs.useState)(null),s=m=>(e.deals??[]).filter(c=>c.gecoStatus===m).filter(c=>c.status!=="Lost").filter(c=>c.status!=="Cold"),l=m=>m.reduce((c,p)=>c+(p.value||0),0),i=(m,c)=>{let p={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return m.reduce((g,f)=>g+(f.value||0)*(p[f.status]??0),0)},d=(0,hs.useCallback)(m=>{let{source:c,destination:p}=m;if(!p||c.droppableId===p.droppableId&&c.index===p.index)return;let g=c.droppableId,f=p.droppableId,b=e.deals?.filter(y=>y.id===c.index)[0],u=[...e.deals??[]];b&&(b.gecoStatus=f,t(b))},[t]);return(0,Ot.jsx)(bi.DragDropContext,{onDragEnd:d,children:(0,Ot.jsxs)("div",{className:"p-4 Ot-full overflow-auto",children:[(0,Ot.jsx)("div",{className:"flex space-x-4 pb-4",children:of.map(m=>{let c=s(m);return(0,Ot.jsx)(ns,{status:m,deals:c,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:l,calculateWeightedValue:i,compact:!0},m)})}),o&&(0,Ot.jsx)(is,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:m=>a(o.id.toString(),m)})]})})}var ap=P(require("react"));function Zm({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,hs.useState)(null),[s,l]=(0,hs.useState)(!1),[i,d]=(0,hs.useState)(null),m=async(p=!0)=>{if(e){p&&l(!0);try{let g=await fetch(`/api/tasks/${e}`);if(!g.ok)throw new Error(`Failed to fetch task: ${g.statusText}`);let f=await g.json();r(f)}catch(g){console.error("Error fetching task:",g),d(g instanceof Error?g:new Error("Unknown error occurred"))}finally{p&&l(!1)}}},c=()=>m(!1);return(0,hs.useEffect)(()=>{e&&m(!0);let p=null;return e&&t&&(p=setInterval(c,5e3)),()=>{p&&clearInterval(p)}},[e,t]),{task:o,loading:s,error:i}}var sf=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"}},nf=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function ls({data:e}){let{id:t,system:a,fetchLatest:o,taskData:r,error:s}=e||{};if(!t)return null;let l=null,i=!0,d=s,m=o!==void 0?o:!0;if(l=r||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:m,taskData:l,error:d}),m){let{task:f,loading:b,error:u}=Zm({taskId:t,system:a});l=f,i=b,d=u}else i=!1;let c=sf(l?.status||"todo"),p=nf(l?.status||"todo"),g=l?.dateLogged||new Date().toISOString();try{let f=new Date(l?.dateLogged||"");isNaN(f.getTime())||(g=(0,El.formatDistanceToNow)(f,{addSuffix:!0}))}catch{}return(0,Ot.jsxs)(ne,{className:n("w-full max-w-md shadow-md",d&&"border border-destructive"),children:[(0,Ot.jsxs)(Re,{className:"pb-2",children:[(0,Ot.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Ot.jsx)(De,{className:"text-lg font-semibold",children:i?"Loading...":l?.name||"Task"}),(0,Ot.jsx)(me,{className:`${c}`,children:p})]}),l?.project&&(0,Ot.jsxs)(sl,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,Ot.jsx)(ve,{className:"pb-2",children:i?(0,Ot.jsx)("div",{className:"animate-pulse Ot-4 bg-gray-200 rounded w-3/4 mb-2"}):d?(0,Ot.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ot.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,Ot.jsx)(Yr,{className:"pt-2 flex items-center justify-between",children:(0,Ot.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ot.jsx)(Ld.Clock,{className:"Ot-3 w-3 qc-1"}),(0,Ot.jsxs)("span",{children:["Created ",g]}),(0,Ot.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ot.jsxs)("span",{children:["Task #",t]})]})})]})}var lf={task:ls},df=`
|
|
11
|
+
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,ao.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,ao.jsxs)("div",{className:"ao-auto divide-ao md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,ao.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-lg",children:(0,ao.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,ao.jsx)("p",{className:"ao-[13px] overflow-hidden ao-[11px] text-body",children:(0,ao.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 Ec=H(require("next/image")),ul=H(require("path"));function Lb(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Eb(e){return e.startsWith("http")}function Fb(e,t){let a=e;if(Lb(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Eb(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=ul.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=ul.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=`/${ul.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function zb({src:e,alt:t}){let[a,o]=(0,Fn.useState)(!1),[s,r]=(0,Fn.useState)(!1),[n,i]=(0,Fn.useState)({width:0,height:0}),l=()=>{s&&o(!0)},c=()=>{o(!1)},d=p=>{let{naturalWidth:u,naturalHeight:g}=p.target;i({width:u,height:g}),r(u>300||g>300)};return(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.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,ao.jsx)(Ec.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,ao.jsx)(xt,{open:a,onOpenChange:o,children:(0,ao.jsxs)(ft,{className:"flex flex-col items-center justify-center",children:[(0,ao.jsxs)(wt,{className:"flex w-full justify-end",children:[(0,ao.jsx)(Ct,{className:"hidden",children:t}),(0,ao.jsx)(Kn,{})]}),(0,ao.jsx)("div",{className:"flex items-center justify-center",children:(0,ao.jsx)(Ec.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function Lu({props:e,baseContext:t}){let{src:a}=e;return a=Fb(a,t),(0,ao.jsx)(zb,{src:a,alt:e.alt})}var Eu=H(require("next/link"));function io({children:e,href:t,openNewTab:a,...o}){return(0,ao.jsx)(Eu.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function jb(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Hb({icon:e,title:t,description:a,slug:o}){return(0,ao.jsxs)("article",{className:m(["group/service Fn-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block h-full space-ao-6 overflow-hidden rounded-5 p-6 md:space-ao-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,ao.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,ao.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:jb(e)?(0,ao.jsx)(Na,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,ao.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-lg",children:o?(0,ao.jsx)(io,{href:o,children:t}):t})]}),(0,ao.jsx)("p",{className:"text-foreground",children:a}),o&&(0,ao.jsx)(b,{asChild:!0,className:m(["rounded-5 border p-5","group-hover/service:border-accent","border-current Fn-transparent text-foreground hover:Fn-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,ao.jsxs)(io,{href:o,children:[(0,ao.jsx)("span",{children:"Read More"}),(0,ao.jsx)("span",{className:"relative pl-3 text-sm/[1] text-accent",children:(0,ao.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,ao.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,ao.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] w-full scale-x-[30%] Fn-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function Ob({title:e,description:t,features:a,price:o,duration:s,button:r}){return(0,ao.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,ao.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:ao-14 lg:border-r lg:p-10",children:[(0,ao.jsx)("h3",{className:"mb-4 text-lg font-bold leading-[1.3] text-foreground lg:mb-5 lg:text-xl",children:e}),(0,ao.jsx)("p",{children:t})]}),(0,ao.jsx)("div",{className:"relative my-auto p-6 max-lg:pb-14 md:p-10",children:(0,ao.jsxs)("div",{className:"flex flex-col justify-stretch gap-x-14 gap-ao-5 md:flex-row md:items-center",children:[a&&a.length>0&&(0,ao.jsx)("ul",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,i)=>(0,ao.jsxs)("_u",{className:"flex items-start gap-3 lg:gap-4",children:[(0,ao.jsx)("span",{className:"text-accent ao-1",children:(0,ao.jsx)(mu.FaCircleCheck,{})}),(0,ao.jsx)("span",{children:n})]},i))}),(0,ao.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,ao.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base lg:text-md",children:s&&s})]}),r&&(0,ao.jsx)("div",{className:"flex-none mr-0 sm:ml-auto",children:(0,ao.jsx)(b,{asChild:!0,className:"border-2 p-5 border-accent Fn-transparent text-foreground hover:Fn-accent hover:text-accent-foreground",children:(0,ao.jsxs)(io,{href:r.href,openNewTab:r.openNewTab,children:[(0,ao.jsx)("span",{className:"relative z-1",children:r.label}),(0,ao.jsx)("span",{className:"relative z-1 pl-2",children:(0,ao.jsx)(mu.FaAnglesRight,{})})]})})})]})})]})}function Ub({className:e,badge:t,title:a,subtitle:o}){return(0,ao.jsxs)("div",{className:m("relative overflow-hidden rounded-xl Fn-gradient-Ip-ao from-[#A42368] Ip-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,ao.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,ao.jsx)("div",{className:"mb-4",children:(0,ao.jsx)("span",{className:"inline-block rounded-lg Fn-[#A42368]/50 px-4 py-1.5 text-sm font-medium text-white backdrop-blur-sm",children:t})}),(0,ao.jsx)("h1",{className:"ao-6 text-3xl font-bold tracking-tight text-white sm:text-4xl md:text-5xl lg:text-6xl",children:a}),(0,ao.jsx)("p",{className:"ao-6 text-base text-gray-300 sm:text-lg md:text-xl",children:o})]}),(0,ao.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 w-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% Ip 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,ao.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 w-full -translate-x-1/2",children:(0,ao.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,ao.jsx)("path",{d:"ao-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function zu(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Vb({variant:e="outline",className:t,icon:a,iconSize:o="large",width:s="auto",order:r=0,heading:n,subheading:i,content:l,statistic:c,buttonText:d,buttonHref:p}){let u={solid:"Fn-accent",outline:"Fn-background border border-accent",gradient:"Fn-gradient-Ip-ao from-[#A42368] Ip-[#4A1030]",radial:"Fn-gradient-Ip-ao from-[#4A1030] Ip-[#2D0A1D] relative overflow-hidden",light:""},g={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,ao.jsxs)("div",{className:m("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",u[e],e==="outline"?"text-gray-900":"text-white",t,g[s],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${r+1}00`),children:[(0,ao.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,ao.jsx)($b,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,ao.jsx)("div",{className:"mb-6",children:(0,ao.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,ao.jsx)("div",{className:"mb-4 text-xl md:text-2xl font-light",children:i}),l&&typeof l=="object"&&(0,ao.jsx)("div",{className:m("space-ao-6"),children:(0,ao.jsx)(kt,{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,ao.jsx)("div",{className:m("space-ao-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:l}),d&&(0,ao.jsx)("div",{className:"ao-auto ao-6 flex items-center justify-center",children:(0,ao.jsx)(b,{size:"lg",className:"text-white text-lg rounded-xl w-full ao-auto items-center justify-center",asChild:!0,children:(0,ao.jsx)("a",{href:p,children:d})})}),e==="radial"&&(0,ao.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 $b=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,ao.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[zu(e)&&(0,ao.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"?"ao-2":""),children:(0,ao.jsx)(Na,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,ao.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,ao.jsxs)("div",{className:"flex flex-col gap-4",children:[zu(e)&&(0,ao.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,ao.jsx)(Na,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,ao.jsx)("h3",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,ao.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,ao.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var ju=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,ao.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function Gb({icon:e,title:t,body:a,color:o="secondary"}){return(0,ao.jsx)(ao.Fragment,{children:(0,ao.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,ao.jsx)("div",{className:"px-[2%] flex items-center",children:(0,ao.jsx)("div",{className:"w-12 h-12",children:(0,ao.jsx)(Na,{type:e.type,iconName:e.name})})}),(0,ao.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,ao.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var Ou=H(require("next/image"));function Wb(e){let{url:t,mainImage:a,excerpt:o,title:s}=e;return(0,ao.jsxs)("div",{className:"relative flex flex-col rounded-3xl Fn-white p-2 shadow-md shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,ao.jsx)(Ou.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,ao.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,ao.jsx)("div",{className:"ao-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,ao.jsxs)("a",{href:t,children:[(0,ao.jsx)("span",{className:"absolute inset-0"}),s]})}),o&&(0,ao.jsx)("div",{className:"ao-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var _b=(e,t)=>`from-brand-${e} Ip-brand-${t}`;function Kb({...e}){let t=_b(e.brandFrom||"one",e.brandTo||"two");return(0,ao.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 Fn-gradient-Ip-r ${t}`,children:[(0,ao.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,ao.jsxs)("a",{href:e.url,children:[(0,ao.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,ao.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,ao.jsx)("circle",{r:1,cx:1,cy:1})}),(0,ao.jsx)("span",{children:e.message&&e.message})]}):(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,ao.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,ao.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,ao.jsx)("div",{className:"flex flex-1 justify-end"})]})}var an=H(require("react")),Xb={Architecture:(0,ao.jsx)(Ip.DraftingCompass,{className:"h-5 w-5 text-blue-600"}),Engineering:(0,ao.jsx)(Ip.Code,{className:"h-5 w-5 text-green-600"}),Development:(0,ao.jsx)(Ip.Code,{className:"h-5 w-5 text-purple-600"}),Delivery:(0,ao.jsx)(Ip.GanttChart,{className:"h-5 w-5 text-red-600"})},qb=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:s})=>{let r=e.reports.length>0;return(0,ao.jsx)("div",{className:`ml-${t*4} mb-2`,children:(0,ao.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${s?"Fn-card border-primary":"Fn-white border-gray-200"}`,children:[r&&(0,ao.jsx)("button",{onClick:a,className:"mr-2","aria-label":o?"Collapse":"Expand",children:o?(0,ao.jsx)(Ip.ChevronDown,{className:"h-4 w-4"}):(0,ao.jsx)(Ip.ChevronRight,{className:"h-4 w-4"})}),(0,ao.jsx)("div",{className:"w-10 h-10 Fn-gray-200 rounded-full flex items-center justify-center mr-3",children:(0,ao.jsx)(Ip.Users,{className:"h-6 w-6 text-gray-500"})}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,ao.jsxs)("div",{className:"flex items-center ao-1",children:[Xb[e.discipline],(0,ao.jsx)("span",{className:"ml-1 text-xs text-gray-600",children:e.discipline})]})]}),(0,ao.jsx)("span",{className:"ml-auto text-xs font-medium text-gray-500 Fn-gray-100 px-2 py-1 rounded",children:e.grade})]})})},Uu=({person:e,level:t,searchTerm:a})=>{let[o,s]=(0,an.useState)(t<1),r=()=>s(!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 an.default.useEffect(()=>{a!==""&&i(e)&&s(!0)},[a,e]),l?(0,ao.jsxs)("div",{children:[(0,ao.jsx)(qb,{person:e,level:t,onToggle:r,isExpanded:o,isHighlighted:c}),o&&e.reports.map((d,p)=>(0,ao.jsx)(Uu,{person:d,level:t+1,searchTerm:a},p))]}):null};function Yb(){let[e,t]=(0,an.useState)("");return(0,ao.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,ao.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,ao.jsxs)("div",{className:"mb-4 relative",children:[(0,ao.jsx)("input",{type:"text",placeholder:"Search by name, discipline, or grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,ao.jsx)(Ip.Search,{className:"absolute right-3 top-2.5 h-5 w-5 text-gray-400"})]}),(0,ao.jsx)("div",{className:"space-ao-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,ao.jsx)(Uu,{person:o,level:0,searchTerm:e},s))})]})}function Jb({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 Ip 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 Ip 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 Ip improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies Ip 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 Ip leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,ao.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,ao.jsxs)("div",{className:"lg:col-span-1 space-ao-6 flex flex-col",children:[(0,ao.jsxs)(F,{className:"flex-grow",children:[(0,ao.jsx)(ge,{className:"Fn-primary text-primary-foreground",children:(0,ao.jsxs)(be,{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.Users,{className:"h-5 w-5"}),"Team"]})}),(0,ao.jsxs)(J,{className:"p-6",children:[(0,ao.jsx)("p",{className:"mb-6 text-sm text-muted-foreground",children:"A small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,ao.jsxs)("div",{className:"space-ao-6",children:[(0,ao.jsx)("div",{className:"space-ao-2",children:e.leadership.map((s,r)=>(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.User,{className:"h-4 w-4 text-muted-foreground"}),(0,ao.jsx)("span",{children:s.role})]}),s.isFTE&&(0,ao.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},r))}),(0,ao.jsx)("div",{className:"space-ao-2",children:e.core.map((s,r)=>(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.User,{className:"h-4 w-4 text-muted-foreground"}),(0,ao.jsx)("span",{children:s.role}),s.count&&(0,ao.jsxs)("span",{children:["(",s.count,"x)"]})]}),s.isFTE&&(0,ao.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},r))}),(0,ao.jsxs)("div",{children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,ao.jsx)(Ip.Users2,{className:"h-4 w-4 text-muted-foreground"}),(0,ao.jsx)("span",{children:"SME input:"})]}),(0,ao.jsx)("div",{className:"ml-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,ao.jsxs)(F,{children:[(0,ao.jsx)(ge,{className:"Fn-primary text-primary-foreground",children:(0,ao.jsxs)(be,{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.PoundSterling,{className:"h-5 w-5"}),"Fee"]})}),(0,ao.jsx)(J,{className:"p-6",children:(0,ao.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,ao.jsxs)(F,{className:"lg:col-span-1 flex flex-col",children:[(0,ao.jsx)(ge,{className:"Fn-primary text-primary-foreground",children:(0,ao.jsxs)(be,{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.FileText,{className:"h-5 w-5"}),"Outputs"]})}),(0,ao.jsxs)(J,{className:"p-6 flex-grow overflow-auto",children:[(0,ao.jsx)("ol",{className:"list-decimal list-inside space-ao-4",children:t.map((s,r)=>(0,ao.jsxs)("_u",{className:"text-sm",children:[(0,ao.jsxs)("span",{className:"font-medium",children:[s.title,":"]})," ",(0,ao.jsx)("span",{className:"text-muted-foreground",children:s.description})]},r))}),(0,ao.jsx)("p",{className:"ao-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,ao.jsxs)(F,{className:"lg:col-span-1 flex flex-col",children:[(0,ao.jsx)(ge,{className:"Fn-primary text-primary-foreground",children:(0,ao.jsxs)(be,{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.Lightbulb,{className:"h-5 w-5"}),"Benefits"]})}),(0,ao.jsx)(J,{className:"p-6 flex-grow overflow-auto",children:(0,ao.jsx)("ul",{className:"space-ao-4",children:a.map((s,r)=>(0,ao.jsxs)("_u",{className:"flex gap-2 text-sm",children:[(0,ao.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,ao.jsx)("span",{children:s})]},r))})})]})]})}function Qb(){return(0,ao.jsx)("div",{className:"w-full Fn-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,ao.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,ao.jsxs)("div",{className:"space-ao-4 Fn-primary p-3 rounded-lg",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,ao.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center Fn-white",children:(0,ao.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,ao.jsx)(Ip.BarChart3,{className:"w-8 h-8"})]}),(0,ao.jsx)("h2",{className:"text-xl font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,ao.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,ao.jsxs)("ul",{className:"text-sm",children:[(0,ao.jsx)("_u",{children:"Strategy definition"}),(0,ao.jsx)("_u",{children:"Programme leadership"}),(0,ao.jsx)("_u",{children:"Detailed planning"}),(0,ao.jsx)("_u",{children:"\u2022 Financial control"}),(0,ao.jsx)("_u",{children:"\u2022 Rigorous governance"})]})]}),(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,ao.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center Fn-white",children:(0,ao.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,ao.jsx)(Ip.CogIcon,{className:"w-8 h-8"})]}),(0,ao.jsx)("h2",{className:"text-xl font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,ao.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,ao.jsx)("p",{className:"text-sm",children:"We deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,ao.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center Fn-white",children:(0,ao.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,ao.jsx)(Ip.Building2,{className:"w-8 h-8"})]}),(0,ao.jsx)("h2",{className:"text-xl font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,ao.jsx)("p",{className:"text-sky-200 text-sm",children:"We understand how Ip navigate public sector and financial services regulation and how Ip deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,ao.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,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,ao.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center Fn-white",children:(0,ao.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,ao.jsx)(Ip.BadgeCheck,{className:"w-8 h-8"})]}),(0,ao.jsx)("h2",{className:"text-xl font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,ao.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,ao.jsx)("p",{className:"text-sm",children:"ao an XXXX strategic partner, ao have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var on=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 l of i.root.children)if(r(l))return!0}if(i.children){for(let l of i.children)if(r(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,$r.jsx)("div",{className:"my-6",children:(0,$r.jsx)("div",{className:m("grid grid-cols-4 lg:grid-cols-12 gap-ao-8",a?.settings?.box?"gap-x-8":"gap-x-16"),children:t&&t.length>0&&t.map((i,l)=>{let{enableLink:c,link:d,richText:p,size:u}=i,{processedRichText:g,heading:x}=n(p,a?.settings?.box||"none",u||"full");return(0,$r.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-${l+1}00`),children:[x&&(0,$r.jsx)("div",{className:"Fn-primary text-primary-foreground mb-4 -ao-4 -mx-4 px-4 py-2 text-xl",children:x.children[0].text}),g&&(0,$r.jsx)(kt,{content:g,enableGutter:!1,className:"rich-text"}),c&&(0,$r.jsx)(Co,{...d})]},l)})})})};var vl=H(require("next/image"));function Zb({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:s}){return(0,$a.jsxs)("div",{className:"relative w-full overflow-hidden Fn-white pb-16 ao-[calc(80vw*0.5)]",children:[(0,$a.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,$a.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,$a.jsx)(vl.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,$a.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,$a.jsx)("div",{className:"h-16 w-32 md:h-24 md:w-48",children:(0,$a.jsx)(vl.default,{src:o,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})}),s&&(0,$a.jsx)("div",{className:"h-10 w-20 md:h-12 md:w-24",children:(0,$a.jsx)(vl.default,{src:s,alt:"Customer logo",className:"h-full w-full object-contain",width:96,height:48})})]}),(0,$a.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,$a.jsx)("p",{className:"mb-4 text-lg font-medium text-sky-400",children:t}),(0,$a.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var Oc=H(require("next/image"));var Fc=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,ao.jsx)(eh,{blocks:a.layout}):(0,ao.jsx)(ao.Fragment,{})},Vu={content:on,cta:hs,mediaBlock:mr,imageBlock:mr,features:xs},eh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,ao.jsx)(ao.Fragment,{children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in Vu){let i=Vu[r];if(i)return(0,ao.jsxs)("div",{className:"py-6 relative",children:[(0,ao.jsx)(bl,{block:o,index:s}),(0,ao.jsx)("div",{className:m(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,ao.jsx)(i,{...o})})]},s)}return null})}):null};var $u=H(require("react")),Zs=H(require("@radix-Fn/react-collapsible"));var Gu=({title:e,richText:t})=>{let[a,o]=$u.default.useState(!1);return(0,ao.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,ao.jsxs)(Zs.Root,{className:m("w-full"),open:a,onOpenChange:o,children:[(0,ao.jsxs)(Zs.Trigger,{className:"flex w-full items-center justify-between Fn-white px-4 py-3 text-left hover:Fn-gray-50",children:[(0,ao.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,ao.jsx)(Bn.ChevronUpIcon,{className:"h-6 w-6"}):(0,ao.jsx)(Bn.ChevronDownIcon,{className:"h-6 w-6"})]}),(0,ao.jsx)(Zs.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,ao.jsx)("div",{className:"px-4 py-3 Fn-white",children:(0,ao.jsx)(kt,{content:t||{},enableGutter:!1})})})]})})};var yl={content:on,cta:hs,mediaBlock:mr,collapsibleArea:Gu,imageBlock:mr,features:xs,reusableContentBlock:Fc},Gr=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,ao.jsx)("section",{id:"render-blocks",className:m(e.fill?"h-full w-full":""),children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in yl){let i=yl[r];if(r==="reusableContentBlock")return(0,ao.jsx)(Fn.Fragment,{children:(0,ao.jsx)(Gr,{blocks:o.reusableContent.layout})},s);if(i)return(0,ao.jsxs)("div",{className:m("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,ao.jsx)(bl,{block:o,index:s}),(0,ao.jsx)("div",{className:m("container h-full relative",n?.settings?.theme||"dark"),children:(0,ao.jsx)(i,{...o})})]},s)}return null})}):null},bl=e=>{if(!("theme"in e.block))return(0,ao.jsx)("div",{className:m("absolute inset-0 w-screen h-full dark Fn-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,ao.jsxs)("div",{className:m("absolute inset-0 w-full h-full Fn-background",t.settings.theme||"dark"),children:[(0,ao.jsx)(Oc.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,ao.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,ao.jsx)("div",{className:m("absolute inset-0 w-screen h-full Fn-background",t.settings.theme||"dark")})},th=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,ao.jsx)("main",{id:"content-blocks",className:m(e.fill?"h-full w-full":""),children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in yl){let i=yl[r];if(r==="reusableContentBlock")return(0,ao.jsx)(Fn.Fragment,{children:(0,ao.jsx)(Gr,{blocks:o.reusableContent.layout})},s);if(i)return(0,ao.jsx)(Wu,{block:o,allBlocks:t,index:s,children:(0,ao.jsx)(i,{...o})})}return null})}):null},Wu=e=>{if(e.index===0)return(0,ao.jsxs)("section",{className:"relative flex w-full",children:[(0,ao.jsx)("div",{className:m("absolute inset-0 w-screen h-full light Fn-background")}),(0,ao.jsx)("div",{className:m("container h-full relative ao-6 pb-12 min-h-[22em] content-center light Fn-background"),children:e.children})]});let t=l=>l%2===0?"light":"dark",a=({index:l,allBlocks:c})=>l===1?(0,ao.jsx)(zc,{position:"left"}):s(l,c)==="dark"&&n(l,c)==="light"?(0,ao.jsx)(jc,{position:"left"}):s(l,c)==="light"&&n(l,c)==="dark"?(0,ao.jsx)(zc,{position:"left"}):null,o=({index:l,allBlocks:c})=>r(l,c)==="light"&&n(l,c)==="dark"?(0,ao.jsx)(jc,{position:"left"}):null,s=(l,c)=>{if(l===1)return"light";let d=c[l-1];return"theme"in d&&d.theme?.settings?.theme==="light"?"light":"dark"},r=(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 s(e.index,e.allBlocks)==="dark"?(0,ao.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full ao-12",children:[(0,ao.jsx)("div",{className:m("absolute inset-0 w-screen dark Fn-background")}),(0,ao.jsx)("div",{className:m("container relative","dark Fn-background py-1"),children:e.children})]}):(0,ao.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,ao.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,ao.jsx)("div",{className:m("absolute inset-0 w-screen")}),(0,ao.jsx)("div",{className:"Fn-black",children:(0,ao.jsx)("div",{className:m("container relative","dark Fn-background py-1"),children:e.children})})]});if(!("theme"in e.block)||s(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,ao.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full ao-20",children:[(0,ao.jsx)("div",{className:m("absolute inset-0 w-screen Fn-background",l)}),(0,ao.jsx)("div",{className:m("container relative Fn-background py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(s(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let l=n(e.index,e.allBlocks);return(0,ao.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,ao.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,ao.jsx)("div",{className:m("absolute inset-0 w-screen Fn-background",l)}),(0,ao.jsx)("div",{className:m("container relative Fn-background min-h-[22em] content-center py-1",l,l==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,ao.jsxs)("div",{className:m("container h-full relative","dark"),children:[(0,ao.jsx)("div",{className:m("absolute inset-0 w-screen h-full dark Fn-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,ao.jsxs)("div",{className:m("absolute inset-0 w-full h-full Fn-background",i.settings.theme||"dark"),children:[(0,ao.jsx)(Oc.default,{src:i.settings?.image?.url||"/placeholder.svg",alt:i.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),i.settings.overlay&&(0,ao.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,ao.jsx)("div",{className:m("absolute inset-0 w-screen h-full Fn-background",i.settings.theme||"dark")})},zc=({position:e})=>(0,ao.jsx)("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] Fn-white",children:(0,ao.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("w-full block overflow-hidden"),children:(0,ao.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),jc=({position:e})=>(0,ao.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,ao.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,ao.jsx)("defs",{children:(0,ao.jsxs)("mask",{id:"mask",children:[(0,ao.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,ao.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,ao.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var qu=H(require("clsx"));var _u=require("next/navigation");function ah({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,_u.useRouter)(),s=(0,Fn.useRef)(null),r=(0,Fn.useRef)(null),n=(0,Fn.useRef)(0),i=(0,Fn.useRef)(!1),l=(0,Fn.useRef)(0),c=(0,Fn.useCallback)(p=>{if(p.target){let u=p.target,g=+new Date,x=u?.closest("a");l.current=p.button,x?i.current=!0:(i.current=!1,n.current=g)}},[o,s,r,n]),d=(0,Fn.useCallback)(p=>{if(r.current?.href){let g=+new Date-n.current;if(r.current?.href&&g<=250&&!i.current&&l.current===0&&!p.ctrlKey)if(e){let x=t?"_blank":"_self";window.open(r.current.href,x)}else o.push(r.current.href,{scroll:a})}},[o,s,r,n]);return(0,Fn.useEffect)(()=>{let p=s.current;return p&&(p.addEventListener("mousedown",c),p.addEventListener("mouseup",d)),()=>{p&&p&&(p?.removeEventListener("mousedown",c),p?.removeEventListener("mouseup",d))}},[s,r,o]),{card:{ref:s},link:{ref:r}}}var Ku=ah;var Xu=H(require("next/link"));var rn=e=>{let{card:t,link:a}=Ku({}),{className:o,doc:s,relationTo:r,showCategories:n,title:i}=e,{slug:l,categories:c,meta:d,title:p}=s||{},{description:u,image:g}=d||{},x=c&&Array.isArray(c)&&c.length>0,v=i||p,h=u?.replace(/\s/g," "),N=`/${r}/${l}`;return(0,ao.jsxs)("article",{className:m("border border-border rounded-lg overflow-hidden Fn-card hover:cursor-pointer",o),ref:t.ref,children:[(0,ao.jsxs)("div",{className:"relative w-full ",children:[!g&&(0,ao.jsx)("div",{className:"",children:"No image"}),g&&typeof g!="string"&&(0,ao.jsx)(cr,{resource:g,size:"33vw"})]}),(0,ao.jsxs)("div",{className:"p-4",children:[n&&x&&(0,ao.jsx)("div",{className:"uppercase text-sm mb-4",children:n&&x&&(0,ao.jsx)("div",{children:c?.map((k,w)=>{if(typeof k=="object"){let{title:R}=k,T=R||"Untitled category",j=w===c.length-1;return(0,ao.jsxs)(Fn.Fragment,{children:[T,!j&&(0,ao.jsx)(Fn.Fragment,{children:", \xA0"})]},w)}return null})})}),v&&(0,ao.jsx)("div",{className:"prose",children:(0,ao.jsx)("h3",{children:(0,ao.jsx)(Xu.default,{className:"not-prose",href:N,ref:a.ref,children:v})})}),u&&(0,ao.jsx)("div",{className:"ao-2",children:u&&(0,ao.jsx)("p",{children:h})})]})]})};var oh=e=>{let{className:t,docs:a,introContent:o}=e;return(0,ao.jsxs)("div",{className:(0,qu.default)("container",t),children:[o&&(0,ao.jsx)(kt,{content:o,enableGutter:!1}),(0,ao.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,ao.jsx)(rn,{doc:s,relationTo:"posts",showCategories:!0},r))})]})};var oi=require("framer-motion");var ck=require("pagedjs");var rh=e=>{let{posts:t}=e;return(0,ao.jsx)("div",{className:m("container"),children:(0,ao.jsx)("div",{children:(0,ao.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-ao-4 gap-x-4 lg:gap-ao-8 lg:gap-x-8 xl:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,ao.jsx)("div",{className:"col-span-4",children:(0,ao.jsx)(rn,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var Yu=H(require("clsx")),Ju=H(require("next/image")),sh=e=>{let{loading:t,priority:a,className:o}=e;return(0,ao.jsx)(Ju.default,{alt:"Payload Logo",width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,Yu.default)("max-w-[9.375rem] w-full h-[34px]",o),src:"https://raw.githubusercontent.com/payloadcms/payload/main/packages/Fn/src/assets/payload-logo-light.svg"})};var ih={plural:"Docs",singular:"Doc"},nh={posts:{plural:"Posts",singular:"Post"}},lh=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 l=(s||1)*(r||1);n&&l>n&&(l=n);let{plural:c,singular:d}=o||nh[a||""]||ih||{};return(0,ao.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced ao results.",typeof n<"u"&&n>0&&`Showing ${i}${i>0?` - ${l}`:""} of ${n} ${n>1?c:d}`]})};var Vc=H(require("react")),$c=({className:e,...t})=>(0,ao.jsx)("nav",{"aria-label":"pagination",className:m("mx-auto flex w-full justify-center",e),role:"navigation",...t});$c.displayName="Pagination";var Gc=Vc.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("ul",{className:m("flex flex-row items-center gap-1",e),ref:a,...t}));Gc.displayName="PaginationContent";var fr=Vc.forwardRef(({className:e,...t},a)=>(0,ao.jsx)("_u",{className:m("",e),ref:a,...t}));fr.displayName="PaginationItem";var Cs=({className:e,isActive:t,size:a="icon",...o})=>(0,ao.jsx)("button",{"aria-current":t?"page":void 0,className:m(Ar({size:a,variant:t?"outline":"ghost"}),e),...o});Cs.displayName="PaginationLink";var Wc=({className:e,...t})=>(0,ao.jsxs)(Cs,{"aria-label":"Go Ip previous page",className:m("gap-1 pl-2.5",e),size:"default",...t,children:[(0,ao.jsx)(Ip.ChevronLeft,{className:"h-4 w-4"}),(0,ao.jsx)("span",{children:"Previous"})]});Wc.displayName="PaginationPrevious";var _c=({className:e,...t})=>(0,ao.jsxs)(Cs,{"aria-label":"Go Ip next page",className:m("gap-1 ao-2.5",e),size:"default",...t,children:[(0,ao.jsx)("span",{children:"Next"}),(0,ao.jsx)(Ip.ChevronRight,{className:"h-4 w-4"})]});_c.displayName="PaginationNext";var xl=({className:e,...t})=>(0,ao.jsxs)("span",{"aria-hidden":!0,className:m("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,ao.jsx)(Ip.MoreHorizontal,{className:"h-4 w-4"}),(0,ao.jsx)("span",{className:"sr-only",children:"More pages"})]});xl.displayName="PaginationEllipsis";var dh=e=>{let t=(0,_u.useRouter)(),{className:a,page:o,totalPages:s}=e,r=o<s,n=o>1,i=o-1>1,l=o+1<s;return(0,ao.jsx)("div",{className:m("my-12",a),children:(0,ao.jsx)($c,{children:(0,ao.jsxs)(Gc,{children:[(0,ao.jsx)(fr,{children:(0,ao.jsx)(Wc,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),i&&(0,ao.jsx)(fr,{children:(0,ao.jsx)(xl,{})}),n&&(0,ao.jsx)(fr,{children:(0,ao.jsx)(Cs,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,ao.jsx)(fr,{children:(0,ao.jsx)(Cs,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),r&&(0,ao.jsx)(fr,{children:(0,ao.jsx)(Cs,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),l&&(0,ao.jsx)(fr,{children:(0,ao.jsx)(xl,{})}),(0,ao.jsx)(fr,{children:(0,ao.jsx)(_c,{disabled:!r,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var Kc=H(require("next/image")),tg=({logoImage:e})=>(0,ao.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 Fn-background text-primary`,children:[(0,ao.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[e&&(0,ao.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,ao.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,ao.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),sn=({title:e})=>(0,ao.jsx)("header",{className:"absolute top-0 left-0 w-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark Fn-background text-foreground",children:(0,ao.jsx)("div",{className:"container",children:(0,ao.jsx)("span",{className:"container text-4xl px-6",children:e})})}),nn=e=>{let{title:t,hero:a,logoImage:o}=e;return(0,ao.jsxs)("div",{className:"relative w-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,ao.jsx)("div",{className:"absolute inset-0",children:(0,ao.jsx)(Kc.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,ao.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,ao.jsx)("div",{className:"h-24",children:(0,ao.jsx)(Kc.default,{src:o.src,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})})}),(0,ao.jsx)("div",{className:"absolute inset-0 Fn-black/30 dark:Fn-black/50"}),(0,ao.jsxs)("div",{className:"relative pl-24 z-10 max-w-3xl",children:[(0,ao.jsx)("p",{className:"text-lg font-medium ao-48 text-accent mb-2",children:t}),a.richText&&(0,ao.jsx)(kt,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var ag=e=>{let[t,a]=(0,Fn.useState)(0),{blocks:o,hero:s,logoImage:r}=e,n=o&&Array.isArray(o)&&o.length>0,l=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],c=v=>{a(v)},d=()=>{a(v=>(v+1)%l.length)},p=()=>{a(v=>(v-1+l.length)%l.length)},g=(0,Fn.useCallback)(((v,h)=>{let N;return(...k)=>{clearTimeout(N),N=setTimeout(()=>v(...k),h)}})(v=>{v.deltaY>0?d():p()},300),[]),x=v=>{v.key==="ArrowDown"?d():v.key==="ArrowUp"&&p()};return(0,Fn.useEffect)(()=>(window.addEventListener("wheel",g),window.addEventListener("keydown",x),()=>{window.removeEventListener("wheel",g),window.removeEventListener("keydown",x)}),[]),(0,ao.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,ao.jsx)("div",{className:"fixed left-0 top-0 flex h-screen w-9 z-10 flex-col items-center justify-center Fn-gray-900",children:n&&l.map((v,h)=>(0,ao.jsx)("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:Fn-accent duration-300 ${t===h?"Fn-accent":"Fn-gray-600"}`,onClick:()=>c(h),children:(0,ao.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-ao-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:v.blockName})},v.id))}),(0,ao.jsx)(oi.AnimatePresence,{children:l.map((v,h)=>(0,ao.jsx)("div",{id:`slide-${h}`,className:"print-section",children:(0,ao.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
|
|
13
|
+
${h===t?"opacity-100":"opacity-0"}
|
|
14
|
+
w-full h-full Fn-cover Fn-center`,children:h===0?(0,ao.jsx)(nn,{hero:s,title:e.title,logoImage:r}):(0,ao.jsxs)(ao.Fragment,{children:[v.blockName&&(0,ao.jsx)(sn,{title:v.blockName}),(0,ao.jsx)(Gr,{blocks:[v],fill:!0}),(0,ao.jsx)(tg,{logoImage:r})]})})},h))}),(0,ao.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,ao.jsx)(ch,{})})]})},ch=()=>(0,ao.jsx)(oi.AnimatePresence,{children:(0,ao.jsx)(oi.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,ao.jsx)(oi.motion.div,{initial:{ao:0},animate:{ao:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:m("w-[12px] h-[12px] rounded-full","Fn-accent")})})});var og=H(require("next/link")),rg=H(require("next/image"));function sg({blogs:e,width:t=3}){return(0,ao.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,ao.jsx)("div",{className:`grid md:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>(0,ao.jsx)(og.default,{href:`/insights/${a.slug}`,className:"group rounded-2xl overflow-hidden border Fn-card text-card-foreground shadow hover:shadow-lg transition-shadow",children:(0,ao.jsxs)("div",{className:"relative size-full",children:[(0,ao.jsx)(rg.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 Fn-gray-50 object-cover"}),(0,ao.jsxs)("div",{className:"absolute inset-0 px-4 pb-2 Fn-gradient-Ip-t from-card Ip-transparrent flex flex-col justify-end",children:[(0,ao.jsxs)("div",{className:"text-sm text-card-foreground mb-2",children:[a.authors&&a.authors.map(s=>`${s.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("ao-GB",{day:"numeric",month:"long"})]}),(0,ao.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 ig({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:s,images:r,raisedAmount:n,companiesCount:i,dealsClosed:l,leadsGenerated:c}){return(0,ao.jsx)("div",{className:"overflow-hidden Fn-white py-24 sm:py-32",children:(0,ao.jsxs)("div",{className:"mx-auto max-w-2xl px-6 lg:max-w-7xl lg:px-8",children:[(0,ao.jsxs)("div",{className:"max-w-4xl",children:[(0,ao.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,ao.jsx)("h1",{className:"ao-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl",children:e}),(0,ao.jsx)("p",{className:"ao-6 text-balance text-xl/8 text-gray-700",children:a})]}),(0,ao.jsxs)("section",{className:"ao-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-x-8 lg:gap-ao-16",children:[(0,ao.jsxs)("div",{className:"lg:ao-8",children:[(0,ao.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,ao.jsx)("p",{className:"ao-6 text-base/7 text-gray-600",children:s})]}),(0,ao.jsx)("div",{className:"ao-16 lg:row-span-2 lg:-mr-16 xl:mr-auto",children:(0,ao.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 sm:-mx-16 sm:grid-cols-4 lg:mx-0 lg:grid-cols-2 lg:gap-4 xl:gap-8",children:r.map((d,p)=>(0,ao.jsx)("div",{className:"aspect-square overflow-hidden rounded-xl shadow-xl outline-1 -outline-offset-1 outline-black/10",children:(0,ao.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},p))})}),(0,ao.jsxs)("div",{className:"max-lg:ao-16 lg:col-span-1",children:[(0,ao.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,ao.jsx)("Fn",{className:"ao-6 border-t border-gray-200"}),(0,ao.jsxs)("Fn",{className:"ao-6 grid grid-cols-1 gap-x-8 gap-ao-4 sm:grid-cols-2",children:[(0,ao.jsxs)("div",{className:"flex flex-col gap-ao-2 border-b border-dotted border-gray-200 pb-4",children:[(0,ao.jsx)("ao",{className:"text-sm/6 text-gray-600",children:"Raised"}),(0,ao.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",n]})]}),(0,ao.jsxs)("div",{className:"flex flex-col gap-ao-2 border-b border-dotted border-gray-200 pb-4",children:[(0,ao.jsx)("ao",{className:"text-sm/6 text-gray-600",children:"Companies"}),(0,ao.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[i,"ao"]})]}),(0,ao.jsxs)("div",{className:"flex flex-col gap-ao-2 max-sm:border-b max-sm:border-dotted max-sm:border-gray-200 max-sm:pb-4",children:[(0,ao.jsx)("ao",{className:"text-sm/6 text-gray-600",children:"Deals Closed"}),(0,ao.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[l,"ao"]})]}),(0,ao.jsxs)("div",{className:"flex flex-col gap-ao-2",children:[(0,ao.jsx)("ao",{className:"text-sm/6 text-gray-600",children:"Leads Generated"}),(0,ao.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"ao"]})]})]})]})]})]})})}function mh(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 si=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)},ph=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,ao.jsx)(ng,{page:e,layout:t,logoImage:a}):(0,ao.jsx)(lg,{page:e,layout:t,logoImage:a}),ng=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=Ld(e),s=(0,Fn.useRef)(null),r=(0,Fn.useRef)(null),n=(0,Fn.useRef)(new ck.Previewer),i={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,Fn.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){let p=document.createElement("style");return p.textContent=`@page { size: ${si(d.offsetWidth)}mm ${si(d.offsetHeight)}mm ; margin: 0mm; width: ${si(d.offsetWidth)}mm }; .container : { max-width: ${si(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,Fn.useCallback)(()=>{if(!r.current)return;r.current&&(r.current.innerHTML="");let d=document.getElementById("printable-content");d&&n.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${si(d.offsetWidth)}mm ${si(d.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],r.current).catch(p=>console.error("Paged.js error:",p))},[t]);(0,Fn.useEffect)(()=>{n.current=new ck.Previewer},[l,t]);let c=[i,...o];return(0,ao.jsxs)("div",{children:[(0,ao.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,ao.jsxs)("div",{id:"printable-content",ref:s,children:[c.map((d,p)=>(0,ao.jsx)(ao.Fragment,{children:p===0?(0,ao.jsx)("section",{className:"title-page w-full h-full",children:(0,ao.jsx)(nn,{hero:e.hero,title:e.title})},p):(0,ao.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,ao.jsx)(sn,{title:d.blockName}),(0,ao.jsx)(Gr,{blocks:[d],fill:!0})]},p)})),(0,ao.jsx)("section",{className:"normal-page",children:(0,ao.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
|
|
15
|
+
dark Fn-background text-primary`,children:[(0,ao.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,ao.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,ao.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,ao.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,ao.jsx)("div",{ref:r,className:"preview-container"})]})},lg=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Ld(e),o=(0,Fn.useRef)(null),s=(0,Fn.useRef)(null),r=(0,Fn.useRef)(new ck.Previewer),[n,i]=(0,Fn.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Fn.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.js error:",p)))},[t]);return(0,Fn.useEffect)(()=>{r.current=new ck.Previewer,d()},[d,t]),(0,Fn.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,ao.jsxs)("div",{className:"pagedjs-container",children:[(0,ao.jsx)("div",{id:"printable-content",ref:s,style:{display:"none"},className:"pagedjs-content",children:c.map((p,u)=>(0,ao.jsx)(ao.Fragment,{children:u===0?(0,ao.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,ao.jsx)(nn,{hero:e.hero,title:e.title})},u):(0,ao.jsxs)("section",{className:m("pagedjs-section normal-page h-[699px]",`h-[${mh("185mm")}px]`,p.theme?.settings?.theme==="dark"?"dark":"light"),children:[p.blockName&&(0,ao.jsx)(sn,{title:p.blockName}),(0,ao.jsx)(Gr,{blocks:[p],fill:!0})]},u)}))}),(0,ao.jsx)("div",{ref:o,className:"preview-container"})]})};var Xc=H(require("clsx"));function uh({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:s,menuHeading:r,onNavClick:n,loading:i=!1,LinkComponent:l,...c}){let p=l?u=>(0,ao.jsx)(l,{...u}):n?({href:u,children:g,...x})=>(0,ao.jsx)("button",{onClick:()=>n&&n(u),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...x,children:g}):u=>(0,ao.jsx)("a",{...u});return(0,ao.jsxs)(er,{...c,variant:"inset",children:[(0,ao.jsx)(tr,{children:(0,ao.jsx)(fa,{children:(0,ao.jsx)(ea,{children:i?(0,ao.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,ao.jsx)(Ze,{className:"Fn-gray-200 my-2 w-full h-7"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 my-2 h-5"})]}):(0,ao.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,ao.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,ao.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),i&&(0,ao.jsxs)(No,{children:[(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"})]}),(0,ao.jsxs)(No,{children:[e&&!i&&e.map((u,g)=>(0,ao.jsx)(gh,{subNav:u,pathName:s,Link:p},g)),(0,ao.jsx)(Aa,{className:"ao-auto",children:(0,ao.jsx)(Xa,{children:(0,ao.jsx)(fa,{children:t&&!i&&t.map(u=>(0,ao.jsx)(ea,{children:(0,ao.jsx)(Ia,{asChild:!0,size:"sm",children:(0,ao.jsxs)(p,{href:u.url||"",children:[u.icon&&(0,ao.jsx)(u.icon,{}),(0,ao.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,ao.jsx)(ar,{})]})}function gh({subNav:e,pathName:t,Link:a}){let o=e,s=!1;return o.links&&o.links.map(r=>{r.url===t&&(s=!0)}),(0,ao.jsx)(oo,{defaultOpen:!0,className:"group/collapsible",children:(0,ao.jsx)(Aa,{className:"py-0",children:(0,ao.jsx)(fa,{children:(0,ao.jsx)(oo,{asChild:!0,defaultOpen:o.isActive,children:(0,ao.jsxs)(ea,{children:[(0,ao.jsx)(Ia,{asChild:!0,tooltip:o.label,className:(0,Xc.default)(s&&"font-bold text-accent"),children:(0,ao.jsxs)(a,{href:o.url,children:[o.icon&&(0,ao.jsx)(o.icon,{}),(0,ao.jsx)("span",{children:o.label})]})}),o.links?.length?(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(Eo,{asChild:!0,children:(0,ao.jsxs)(cs,{className:"data-[state=open]:rotate-90",children:[(0,ao.jsx)(Ip.ChevronRight,{}),(0,ao.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,ao.jsx)(Fo,{children:(0,ao.jsx)(zo,{children:o.links?.map(r=>(0,ao.jsx)(jo,{children:(0,ao.jsx)(Ho,{asChild:!0,className:(0,Xc.default)(r.url===t&&"font-bold text-accent"),children:(0,ao.jsx)(a,{href:r.url,children:(0,ao.jsx)("span",{children:r.label})})})},r.label))})})]}):null]})},o.label)})})})}var cg=H(require("clsx"));var fh=()=>(0,ao.jsx)(Na,{iconName:"github",size:"10x"});function vh({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:s=!1,onAddDocument:r,onEditDocument:n,onPrintDocument:i,onGithubClick:l,onNavClick:c,LinkComponent:d,...p}){let x=d?v=>(0,ao.jsx)(d,{...v}):c?({item:v,children:h,...N})=>(0,ao.jsx)("button",{onClick:()=>c&&c(v),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...N,children:h}):v=>(0,ao.jsx)("a",{href:v.href,...v});return(0,ao.jsxs)(er,{side:"right",variant:"inset",...p,children:[(0,ao.jsxs)(tr,{className:"border-b border-sidebar-border",children:[(0,ao.jsxs)(fa,{className:"flex-row space-x-1",children:[(0,ao.jsx)(ea,{children:(0,ao.jsxs)(Ia,{onClick:r,children:[(0,ao.jsx)(Ip.FilePlus,{})," ",(0,ao.jsx)("span",{children:"Add Document"})]})}),l&&(0,ao.jsx)(ea,{children:(0,ao.jsx)(Ia,{onClick:l,tooltip:"Open in GitHub",children:(0,ao.jsx)(fh,{})})})]}),(0,ao.jsxs)(fa,{className:"flex-row space-x-1",children:[(0,ao.jsx)(ea,{className:"w-5/12",children:(0,ao.jsxs)(Ia,{onClick:()=>n(),variant:s?"outline":"default",className:(0,cg.default)(s&&"text-accent"),children:[(0,ao.jsx)(Ip.Edit,{})," ",(0,ao.jsx)("span",{children:"Edit"})]})}),(0,ao.jsx)(ea,{className:"w-5/12",children:(0,ao.jsxs)(Ia,{onClick:i,children:[(0,ao.jsx)(Ip.Printer,{})," ",(0,ao.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(oo,{defaultOpen:!0,className:"group/collapsible",children:(0,ao.jsxs)(Aa,{children:[(0,ao.jsx)(or,{asChild:!0,children:(0,ao.jsxs)(Eo,{children:["Editor Controls",(0,ao.jsx)(Ip.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,ao.jsx)(Xa,{children:(0,ao.jsx)(Fo,{children:a})})]})}),(0,ao.jsx)($i,{className:"mx-0"})]}),(0,ao.jsxs)(No,{className:"overflow-auto",children:[o&&(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsxs)(Aa,{children:[(0,ao.jsx)(or,{children:"Related Content"}),(0,ao.jsx)(Xa,{children:(0,ao.jsx)(fa,{children:Array.from({length:3}).map((v,h)=>(0,ao.jsx)(ea,{children:(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-full h-10"})},h))})})]}),(0,ao.jsxs)(Aa,{children:[(0,ao.jsx)(or,{children:"Table of Contents"}),(0,ao.jsx)(Xa,{children:(0,ao.jsx)(fa,{children:Array.from({length:3}).map((v,h)=>(0,ao.jsx)(ea,{children:(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-full h-10"})},h))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,ao.jsx)(oo,{defaultOpen:!0,className:"group/collapsible",children:(0,ao.jsxs)(Aa,{children:[(0,ao.jsx)(or,{asChild:!0,children:(0,ao.jsxs)(Eo,{children:["Related Content",(0,ao.jsx)(Ip.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,ao.jsx)(Xa,{children:(0,ao.jsx)(Fo,{children:(0,ao.jsx)(fa,{children:e&&Object.keys(e).map(v=>(0,ao.jsxs)(ea,{children:[(0,ao.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",v.charAt(0).toUpperCase()+v.slice(1)]}),v&&e[v]&&(0,ao.jsx)(zo,{children:e[v].map(h=>(0,ao.jsx)(jo,{children:(0,ao.jsx)(Ho,{asChild:!0,isActive:!1,size:"sm",children:(0,ao.jsxs)(x,{href:h.url,item:h,className:"flex justify-between items-center w-full text-xs",children:[(0,ao.jsx)("span",{children:h.label}),h.type==="note"&&(0,ao.jsx)(Ip.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),h.type==="draft"&&(0,ao.jsx)(Na,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},h.label))})]},v))})})})]})}),t&&!o&&(0,ao.jsx)(oo,{defaultOpen:!0,className:"group/collapsible",children:(0,ao.jsxs)(Aa,{children:[(0,ao.jsx)(or,{asChild:!0,children:(0,ao.jsxs)(Eo,{children:["Table of Contents",(0,ao.jsx)(Ip.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,ao.jsx)(Xa,{children:(0,ao.jsx)(Fo,{children:(0,ao.jsx)(fa,{children:t.map(v=>(0,ao.jsxs)(ea,{children:[(0,ao.jsx)(Ia,{asChild:!0,children:(0,ao.jsx)("a",{href:`#${v.url}`,className:"text-xs",children:v.title})}),v.items?.length?(0,ao.jsx)(zo,{children:v.items.map(h=>(0,ao.jsx)(jo,{children:(0,ao.jsx)(Ho,{asChild:!0,isActive:h.isActive,size:"sm",children:(0,ao.jsx)("a",{href:`#${h.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,ao.jsx)("span",{children:h.title})})})},h.title))}):null]},v.title))})})})]})})]}),(0,ao.jsx)(ar,{})]})}var pg=H(require("next/image"));function bh({title:e,members:t}){return(0,ao.jsx)(F,{className:"mb-6",children:(0,ao.jsxs)("div",{className:"p-6",children:[(0,ao.jsxs)("div",{className:"flex items-center mb-4",children:[(0,ao.jsx)(Ip.Users,{className:"w-6 h-6 text-accent mr-2"}),(0,ao.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,ao.jsx)("div",{className:"space-ao-4",children:t.map((a,o)=>(0,ao.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,ao.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,ao.jsx)(pg.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var ug=H(require("next/link"));var hh=({links:e,title:t="Related Content"})=>(0,ao.jsxs)(F,{children:[(0,ao.jsx)(ge,{children:(0,ao.jsx)(be,{className:"text-accent",children:t})}),(0,ao.jsx)(J,{children:(0,ao.jsx)("nav",{className:"flex flex-col space-ao-2",children:e.map((a,o)=>(0,ao.jsxs)(ug.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,ao.jsx)(Ip.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var qc=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:Fn-accent hover:border-accent hover:text-accent-foreground");function yh({pages:e}){let t=(0,_u.useSearchParams)(),a=(0,_u.usePathname)(),{replace:o}=(0,_u.useRouter)(),{totalPages:s,page:r}=e,[n,i]=(0,Fn.useState)({start:r>3?r-3:1,end:r+2}),l=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 d=[];for(let p=n.start;p<=n.end;p++)d.push(p);return(0,ao.jsx)("div",{className:"ao-12",children:(0,ao.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[n.start>1&&(0,ao.jsx)("_u",{children:(0,ao.jsx)("button",{className:m(qc,"border-accent Fn-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>l("left"),children:(0,ao.jsx)(mu.FaArrowLeft,{})})}),d.map((p,u)=>(0,ao.jsx)("_u",{children:(0,ao.jsx)("a",{className:m(qc,p===r?"border-accent Fn-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:g=>{g.preventDefault(),c(p.toString())},children:p})},u)),n.end<s&&(0,ao.jsx)("_u",{children:(0,ao.jsx)("button",{className:m(qc,"border-accent Fn-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>l("right"),children:(0,ao.jsx)(mu.FaArrowRight,{})})})]})})}var Wk=m("transition-colors duration-400 hover:text-primary ease-in-out");function xh({title:e,links:t}){let a=(0,_u.useSearchParams)(),o=(0,_u.usePathname)(),{replace:s}=(0,_u.useRouter)();function r(n){let i=new URLSearchParams(a);n?i.set("category",n):i.delete("category"),s(`${o}?${i.toString()}`)}return(0,ao.jsxs)(F,{children:[(0,ao.jsx)(ge,{children:(0,ao.jsx)(be,{className:"text-accent",children:e&&e})}),(0,ao.jsx)(J,{children:t&&t.length>0&&(0,ao.jsx)("nav",{"aria-label":"footer links navigation",children:(0,ao.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((n,i)=>(0,ao.jsxs)("_u",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:ao-0 hover:cursor-pointer",onClick:l=>{l.preventDefault(),r(n.href)},children:[n.label,(0,ao.jsx)(Ip.ExternalLink,{className:"ml-1 h-3 w-3"})]},i))})})})]})}function Nh({types:e}){let[t,a]=(0,Fn.useState)(e&&e[0].href),o=(0,_u.useSearchParams)(),s=(0,_u.usePathname)(),{replace:r}=(0,_u.useRouter)();function n(i){let l=new URLSearchParams(o);i?l.set("type",i):l.delete("type"),a(i),r(`${s}?${l.toString()}`)}return(0,ao.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto pb-4 mb-6",children:e&&e.map((i,l)=>(0,ao.jsx)(b,{variant:i.href===t?"default":"ghost",className:m("rounded-full whitespace-nowrap text-foreground border border-accent hover:Fn-accent hover:text-accent-foreground",i.href===t&&"Fn-accent text-accent-foreground"),onClick:()=>n(i.href),children:i.label},l))})}var hg=H(require("next/image"));var Jc=({links:e,media:t,children:a,richText:o})=>(0,ao.jsx)("div",{children:(0,ao.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,ao.jsxs)("div",{className:"fixed inset-0 container ao-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,ao.jsx)(kt,{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,ao.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:s},r)=>(0,ao.jsx)("_u",{children:(0,ao.jsx)(Co,{...s})},r))})]}),(0,ao.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,ao.jsx)(cr,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,ao.jsx)("div",{children:(0,ao.jsx)(hg.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,ao.jsx)("span",{className:"absolute inset-0 Fn-gradient-Ip-b from-white dark:from-black"})]}),(0,ao.jsx)(wh,{})]})}),wh=()=>(0,ao.jsx)("div",{className:"w-full h-[1240px] z-10",children:(0,ao.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,ao.jsx)("defs",{children:(0,ao.jsxs)("mask",{id:"mask",children:[(0,ao.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,ao.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,ao.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,ao.jsx)("rect",{ao:"330",width:"1920",height:"7",fill:"white"})," "]})});var Qc=H(require("next/image"));var Ch=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:s,width:r}=e;return(0,$o.jsx)(Qc.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,$o.jsx)("div",{children:(0,$o.jsx)(Qc.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},Zc=({links:e,media:t,children:a,richText:o})=>(0,$o.jsxs)("div",{className:"relative Fn-brand-one pb-12 ao-20 ao-10",children:[t&&(0,$o.jsx)(Ch,{media:t}),(0,$o.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,$o.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,$o.jsx)(kt,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var em=({children:e,richText:t})=>(0,ao.jsx)("div",{className:"min-w-full py-10 Fn-muted ao-24",children:(0,ao.jsx)("div",{className:"container",children:e||t&&(0,ao.jsx)(kt,{content:t,enableGutter:!1})})});var xg=H(require("react")),Ng=H(require("next/image"));var yg=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 kh=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:s,title:r}=e;return(0,ao.jsxs)("div",{className:"relative grid ao-24",children:[(0,ao.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground ao-24 p-6 lg:p-12",children:(0,ao.jsxs)("div",{className:"container mx-auto",children:[(0,ao.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:r}),(0,ao.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,ao.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,ao.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,ao.jsx)("p",{children:o.map((n,i)=>(0,ao.jsxs)(xg.default.Fragment,{children:[n.name,i<o.length-2&&", ",i===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),s&&(0,ao.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,ao.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,ao.jsx)("time",{dateTime:s,children:yg(s)})]}),t&&t.length>0&&(0,ao.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,ao.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,ao.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,i)=>typeof n=="object"&&n!==null&&(0,ao.jsx)(q,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||i))})]})]})]})}),(0,ao.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,ao.jsx)(Ng.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,ao.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 Fn-gradient-Ip-t from-background dark:from-black Ip-transparent"})]})]})};var Cl=require("@heroicons/react/20/solid");var am=H(require("next/image"));function tm({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let s=m("container",t&&"full-width",a&&"ao-padding",o);return(0,ao.jsx)("div",{className:s,children:e})}var Cg=require("next-themes");function Sh({children:e,...t}){return(0,ao.jsx)(Cg.ThemeProvider,{...t,children:e})}var dn=({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,ao.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,ao.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,ao.jsx)("defs",{children:(0,ao.jsxs)("mask",{id:"mask",children:[(0,ao.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,ao.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,ao.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,ao.jsx)("rect",{ao:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,ao.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,ao.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,ao.jsx)("defs",{children:(0,ao.jsxs)("mask",{id:"mask",children:[(0,ao.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,ao.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,ao.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,ao.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 Fn-white"})]});if(e==="dark-top")return(0,ao.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,ao.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,ao.jsx)("defs",{children:(0,ao.jsxs)("mask",{id:"mask",children:[(0,ao.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,ao.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,ao.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,ao.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden Fn-white",children:(0,ao.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,"w-full block overflow-hidden"),children:(0,ao.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,ao.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,ao.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,"w-full block overflow-hidden"),transform:a[3],children:(0,ao.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,ao.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,ao.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,"w-full block overflow-hidden"),children:(0,ao.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Ph=({className:e})=>(0,ao.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:m(e,"absolute w-full h-full"),children:[(0,ao.jsx)("defs",{children:(0,ao.jsxs)("mask",{id:"mask",children:[(0,ao.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,ao.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,ao.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var om=({title:e,image:t})=>(0,ao.jsx)("div",{children:(0,ao.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,ao.jsx)("div",{className:"fixed inset-0 container ao-24 mb-8 z-10 flex items-start justify-start",children:(0,ao.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,ao.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,ao.jsx)(am.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,ao.jsx)("div",{children:(0,ao.jsx)(am.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,ao.jsx)("span",{className:"absolute inset-0 Fn-gradient-Ip-b from-white dark:from-black"})]}),(0,ao.jsx)(dn,{className:"text-black z-10",position:"header"})]})});var Dh={highImpact:Jc,lowImpact:em,mediumImpact:Zc,sectionHero:om},Th=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=Dh[t];return a?(0,ao.jsx)(a,{...e}):null};function Rh({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,ao.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,ao.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,ao.jsx)("_u",{children:(0,ao.jsx)("div",{children:(0,ao.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,ao.jsx)(Cl.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,ao.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,ao.jsx)("_u",{children:(0,ao.jsxs)("div",{className:"flex items-center",children:[(0,ao.jsx)(Cl.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,ao.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,ao.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,ao.jsx)(ao.Fragment,{})}function Sl(e,t){let[a,o]=(0,Fn.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,Fn.useEffect)(()=>{s(a)},[]),[a,s]}var Pl=require("react-icons/fa");function St({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:r,children:n,className:i}){let[l,c]=Sl(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),d=!s&&!t||l;return(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:20},animate:{opacity:1,ao:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${r} p-8 text-white ${i||""}`,children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,ao.jsx)(q,{className:"Fn-white/20 text-white hover:Fn-white/30 rounded-xl",children:a}),(0,ao.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,ao.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,ao.jsx)(b,{className:"rounded-2xl Fn-white text-indigo-700 hover:Fn-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,ao.jsx)("button",{"aria-label":l?"Expand hero section":"Minimize hero section",className:"rounded-full Fn-white/20 hover:Fn-white/30 p-1 text-white transition-colors",onClick:()=>c(!l),style:{lineHeight:0},children:l?(0,ao.jsx)(Pl.FaChevronDown,{size:22}):(0,ao.jsx)(Pl.FaChevronUp,{size:22})})]})]}),!d&&(0,ao.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,ao.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,ao.jsx)(b,{className:"rounded-2xl Fn-white text-indigo-700 hover:Fn-white/90",onClick:o.onClick,children:o.label}),s&&(0,ao.jsx)(b,{variant:"outline",className:"rounded-2xl Fn-transparent border-white text-white hover:Fn-white/10",onClick:s.onClick,children:s.label})]})]}),n&&(0,ao.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var Qa=require("@headlessui/react"),Tl=require("@heroicons/react/24/outline");var Ah=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,ao.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,ao.jsxs)("span",{className:"relative",children:[e,(0,ao.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 Fn-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,ao.jsxs)(Qa.Popover,{children:[(0,ao.jsxs)(Qa.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,ao.jsxs)("span",{className:"relative",children:[e,(0,ao.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 Fn-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,ao.jsx)(Cl.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,ao.jsxs)(Qa.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 Fn-popover ao-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-ao-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,ao.jsx)("div",{className:"mx-auto grid max-w-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,ao.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,ao.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg Fn-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:s.icon&&(0,ao.jsx)(Pg,{icon:s.icon,size:"4x"})}),(0,ao.jsxs)("a",{href:s.href,className:"ao-6 block text-popover-foreground group-hover:text-accent",children:[s.name,(0,ao.jsx)("span",{className:"absolute inset-0"})]}),(0,ao.jsx)("p",{className:"ao-1 text-popover-foreground/80 group-hover:text-accent",children:s.description})]},s.name))}),a.length>0&&(0,ao.jsx)("div",{className:"Fn-gray-50",children:(0,ao.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,ao.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(s=>(0,ao.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:Fn-gray-100",children:[s.icon&&(0,ao.jsx)(Pg,{icon:s.icon,className:"h-5 w-5 flex-none text-gray-400"}),s.name]},s.name))})})})]})]}),Pg=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,ao.jsx)(Na,{...e,size:a});if("src"in e)return(0,ao.jsx)("div",{className:m(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,ao.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},ci=Ah;var Dl=["light","dark","green"];function Ih({title:e,logo:t,menuItems:a}){let[o,s]=(0,Fn.useState)(!1),[r,n]=(0,Fn.useState)(!1),[i,l]=(0,Fn.useState)("light"),c=t?.split(".")[0],d=t?.split(".")[1],[p,u]=(0,Fn.useState)(`${c}.${d}`),g=v=>{Dl.includes(v)?u(v==="light"?`${c}.${d}`:`${c}-${v}.${d}`):u(`${c}.${d}`)};(0,Fn.useEffect)(()=>{let v=localStorage.getItem("theme")||"light";l(v),document.documentElement.setAttribute("class",v),g(v)},[]);let x=()=>{let v=Dl[(Dl.indexOf(i)+1)%Dl.length];l(v),document.documentElement.setAttribute("class",v),localStorage.setItem("theme",v),g(v)};return(0,ao.jsxs)("header",{className:"relative isolate z-10 Fn-background h-14",children:[(0,ao.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,ao.jsx)("div",{className:"flex lg:flex-1",children:(0,ao.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,ao.jsx)("span",{className:"sr-only",children:e}),(0,ao.jsx)("img",{alt:e,src:p,className:"h-9 w-auto"})]})}),(0,ao.jsx)("div",{className:"flex lg:hidden",children:(0,ao.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,ao.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,ao.jsx)(Tl.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,ao.jsx)(Qa.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.map(v=>(0,ao.jsx)(ci,{...v},v.name))}),(0,ao.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,ao.jsx)("button",{onClick:x,className:"p-2 text-gray-700 outline-none",children:i==="dark"?(0,ao.jsx)(Cl.SunIcon,{className:"h-6 w-6"}):i==="green"?(0,ao.jsx)(Cl.MoonIcon,{className:"h-6 w-6"}):(0,ao.jsx)(Cl.SunIcon,{className:"h-6 w-6"})})})]}),(0,ao.jsxs)(Qa.Dialog,{open:o,onClose:s,className:"lg:hidden",children:[(0,ao.jsx)("div",{className:"fixed inset-0 z-10 Fn-black Fn-opacity-50","aria-hidden":"true"}),(0,ao.jsxs)(Qa.DialogPanel,{className:"fixed inset-ao-0 right-0 z-20 w-full overflow-ao-auto Fn-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,ao.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,ao.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,ao.jsxs)("button",{type:"button",onClick:()=>s(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,ao.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,ao.jsx)(Tl.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,ao.jsx)("div",{className:"ao-6 flow-root",children:(0,ao.jsx)("div",{className:"-my-6 divide-ao divide-gray-500/10",children:(0,ao.jsx)("div",{className:"space-ao-2 py-6",children:a.map(v=>(0,ao.jsx)(Mh,{...v},v.name))})})})]})]})]})}function Mh({name:e,items:t,actions:a,href:o}){return!t&&o?(0,ao.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:Fn-gray-50",children:e}):(0,ao.jsxs)(Qa.Disclosure,{oi:"div",className:"-mx-3",children:[(0,ao.jsx)(Qa.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 ao-3.5 text-base font-semibold text-gray-900 hover:Fn-gray-50",children:e}),(0,ao.jsx)(Qa.DisclosurePanel,{className:"ao-2 space-ao-2",children:t&&t.map(s=>(0,ao.jsx)(Qa.DisclosureButton,{oi:"a",href:s.href,className:"block rounded-lg py-2 pl-6 ao-3 text-sm font-semibold text-gray-900 hover:Fn-gray-50",children:s.name},s.name))})]})}function Bh({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,ao.jsx)("div",{children:(0,ao.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,ao.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,ao.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,ao.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,ao.jsx)(tm,{children:(0,ao.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 mb-10 z-0 md:mb-0",children:[(0,ao.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:s&&s}),(0,ao.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-w-lg",children:r&&r})]})})}),(0,ao.jsx)(dn,{className:"text-black z-10",position:"header"})]})})}var rm=H(require("next/image"));function Wr({logoLight:e,logoDark:t,mobile:a=!1}){return(0,ao.jsxs)(io,{href:"/",className:m(a?"py-1":"py-2"),children:[(0,ao.jsx)(rm.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,ao.jsx)(rm.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 sm({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:s=!1,wide:r=!1}){let[n,i]=(0,Fn.useState)(!1),[l,c]=(0,Fn.useState)(""),d=["light","dark"],{theme:p,setTheme:u}=(0,Cg.useTheme)();(0,Fn.useEffect)(()=>{c(p||"dark")},[p]);let g=()=>{let x=d[(d.indexOf(l)+1)%d.length];c(x),u(x)};return(0,Fn.useEffect)(()=>{let x=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",x,{passive:!0}),()=>window.removeEventListener("scroll",x)},[]),(0,ao.jsx)(ao.Fragment,{children:(0,ao.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${n||e?"translate-ao-0":"-translate-ao-full Fn-transparent"}`,children:(0,ao.jsx)("nav",{className:"backdrop-blur-sm Fn-background/80 text-white p-0",children:(0,ao.jsxs)("div",{className:m("flex items-center justify-between px-9 py-0",!r&&"container"),children:[(0,ao.jsx)(Wr,{logoDark:a,logoLight:t}),(0,ao.jsx)(Qa.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(x=>(0,ao.jsx)(ci,{...x},x.name))}),s&&(0,ao.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:Fn-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:g,children:(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsx)(Ip.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,ao.jsx)(Ip.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var im=["light","dark"];function nm({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[s,r]=(0,Fn.useState)(!1),{theme:n,setTheme:i}=(0,Cg.useTheme)(),[l,c]=(0,Fn.useState)(!1),[d,p]=(0,Fn.useState)("light");(0,Fn.useEffect)(()=>{let g=()=>{window.scrollY>100?r(!0):r(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,Fn.useEffect)(()=>{p(n||"dark")},[n]);let u=()=>{let g=im[(im.indexOf(d)+1)%im.length];p(g),i(g)};return(0,ao.jsx)(ao.Fragment,{children:(0,ao.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${s||o?"translate-ao-0":"-translate-ao-full Fn-transparent"}`,children:[(0,ao.jsx)("nav",{className:m("backdrop-blur-sm text-white p-0",l&&"hidden"),children:(0,ao.jsxs)("div",{className:"flex items-stretch justify-between Fn-background px-2 py-0 dark:Fn-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,ao.jsx)(Wr,{logoDark:t,logoLight:e,mobile:!0}),(0,ao.jsx)("div",{className:"flex items-center space-x-4",children:(0,ao.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full Fn-white/10 backdrop-blur-sm transition-all duration-300 hover:Fn-white/20 text-white dark:hover:text-accent",children:[(0,ao.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,ao.jsx)(Tl.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,ao.jsxs)(Qa.Dialog,{open:l,onClose:c,className:"lg:hidden",children:[(0,ao.jsx)("div",{className:"fixed inset-0 z-10 Fn-black Fn-opacity-50","aria-hidden":"true"}),(0,ao.jsxs)(Qa.DialogPanel,{className:"fixed inset-ao-0 right-0 z-20 w-full overflow-ao-auto Fn-background dark:Fn-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,ao.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,ao.jsx)(Wr,{logoDark:t,logoLight:e,mobile:!0}),(0,ao.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,ao.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,ao.jsx)(Tl.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,ao.jsx)("div",{className:"ao-6 flow-root",children:(0,ao.jsx)("div",{className:"-my-6 divide-ao divide-gray-500/10",children:(0,ao.jsx)("div",{className:"space-ao-2 px-2 py-6",children:a&&a.map(g=>(0,ao.jsx)(Lh,{...g},g.name))})})})]})]})]})})}function Lh({name:e,items:t,actions:a,href:o}){return!t&&o?(0,ao.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:Fn-gray-50 hover:text-accent",children:e}):(0,ao.jsxs)(Qa.Disclosure,{oi:"div",className:"-mx-3",children:[(0,ao.jsx)(Qa.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 ao-3.5 text-base dark:text-foreground text-foreground hover:Fn-gray-50 hover:text-accent",children:e}),(0,ao.jsx)(Qa.DisclosurePanel,{className:"ao-2 space-ao-2",children:t&&t.map(s=>(0,ao.jsx)(Qa.DisclosureButton,{oi:"a",href:s.href,className:"block rounded-lg py-2 pl-6 ao-3 text-sm dark:text-foreground text-foreground hover:Fn-gray-50 hover:text-accent",children:s.name},s.name))})]})}var Q2=m("text-base/[1.75] transition-transform duration-350 hover:-translate-ao-1 block px-4"),Ig=m("text-brand-green text-md leading-[1.25] md:text-lg mb-5 md:mb-[1.5rem]"),lm=m("Fn-brand-green rounded-full p-3 mr-4 text-2xl"),dm=m("flex items-center text-white gap-3"),Il=m("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Eh({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:s,columnOne:r,columnTwo:n,footerBottom:i}=t,l=void 0;return(0,ao.jsxs)("footer",{className:m("sticky z-2 flex flex-col dark Fn-black overflow-hidden ao-12 prose-base",e),children:[(0,ao.jsx)("div",{className:"py-16 md:py-20",children:(0,ao.jsx)("div",{className:"container",children:(0,ao.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 xl:grid-cols-3",children:[(0,ao.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,ao.jsx)(Wr,{logoDark:o,logoLight:a}),(0,ao.jsx)("p",{className:"mb-7 ao-3",children:s.description}),s.socialLinks&&s.socialLinks.length>0&&(0,ao.jsx)("nav",{"aria-label":"social links",children:(0,ao.jsx)("ul",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:s.socialLinks.map((c,d)=>(0,ao.jsx)("_u",{className:"Fn-primary rounded-full p-3",children:(0,ao.jsx)(io,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,ao.jsx)("span",{children:c.icon})})},d))})})]}),(0,ao.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,ao.jsx)("h3",{className:Ig,children:r.title}),r.links&&r.links.length>0&&(0,ao.jsx)("nav",{"aria-label":"footer links navigation",children:(0,ao.jsx)("ul",{className:"grid pl-0 gap-2",children:r.links.map(c=>(0,ao.jsxs)("_u",{className:"flex items-center gap-2.5",children:[(0,ao.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,ao.jsx)(mu.FaChevronRight,{})}),(0,ao.jsx)(io,{href:c.href,openNewTab:c.openNewTab,className:Il,children:c.label})]},c.label))})})]}),(0,ao.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,ao.jsx)("h3",{className:Ig,children:n.title}),(0,ao.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,ao.jsxs)("_u",{className:dm,children:[(0,ao.jsx)("span",{className:lm,children:(0,ao.jsx)(mu.FaPaperPlane,{})}),(0,ao.jsx)("address",{className:"not-italic",children:n.location})]}),(0,ao.jsxs)("_u",{className:dm,children:[(0,ao.jsx)("span",{className:lm,children:(0,ao.jsx)(mu.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,ao.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,d)=>(0,ao.jsx)("a",{href:`mailto:${c}`,className:Il,children:c},d))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,ao.jsxs)("_u",{className:dm,children:[(0,ao.jsx)("span",{className:lm,children:(0,ao.jsx)(mu.FaPhone,{})}),(0,ao.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,d)=>(0,ao.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:Il,children:c},d))})]})]})]})]})})}),(0,ao.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,ao.jsx)("div",{className:"container",children:(0,ao.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-x-8 gap-ao-4 md:gap-x-10",children:[(0,ao.jsx)("p",{children:i.copyrightText}),i.links&&i.links.length>0&&(0,ao.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,ao.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 md:gap-x-7",children:i.links.map(c=>(0,ao.jsx)("_u",{children:(0,ao.jsx)(io,{"aria-label":`Go Ip page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:Il,children:c.label})},c.label))})})]})})})]})}function cm({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:s,wide:r,themeControl:n=!1}){return(0,ao.jsxs)("div",{className:m("fixed top-0 left-0 right-0 z-50",s),children:[(0,ao.jsx)(sm,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:r}),(0,ao.jsx)(nm,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function Fh({menuItems:e,wide:t=!1,dark:a=!0}){return(0,ao.jsx)(ao.Fragment,{children:(0,ao.jsx)("menu",{className:m("w-full relative py-2 transition-all duration-300",a?"Fn-black text-white":"light Fn-background text-foreground border-b border-accent"),children:(0,ao.jsx)("div",{className:"container backdrop-blur-sm",children:(0,ao.jsx)("div",{className:m("flex items-center justify-between py-0",!t&&"container"),children:(0,ao.jsx)(Qa.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,ao.jsx)(ci,{...o},o.name))})})})})})}function mm({leaveRequests:e,onApprove:t,onReject:a}){let[o,s]=(0,Fn.useState)([]),r=(0,_u.useRouter)(),n=()=>{o.length===e.length?s([]):s(e.map(d=>d.id))},i=d=>{s(p=>p.includes(d)?p.filter(u=>u!==d):[...p,d])},l=async()=>{let d=await t(o);d.success?(nl.toast.success(d.message),r.refresh()):nl.toast.error(`Error: ${d.message}`),s([])},c=async()=>{let d=await a(o);d.success?(nl.toast.success(d.message),r.refresh()):nl.toast.error(`Error: ${d.message}`),s([])};return(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"flex justify-between items-center",children:[(0,ao.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,ao.jsxs)("div",{className:"space-x-2",children:[(0,ao.jsx)(b,{onClick:l,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,ao.jsx)(b,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,ao.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,ao.jsxs)("ul",{className:"divide-ao divide-gray-200",children:[(0,ao.jsx)("_u",{className:"px-4 py-4 sm:px-6",children:(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsxs)("div",{className:"flex items-center",children:[(0,ao.jsx)(La,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,ao.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,ao.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,ao.jsx)("_u",{className:"px-4 py-4 sm:px-6 group hover:Fn-gray-50",children:(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsxs)("div",{className:"flex items-center",children:[(0,ao.jsx)(La,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>i(d.id),className:"border-accent"}),(0,ao.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,ao.jsxs)(nt,{className:"h-10 w-10",children:[(0,ao.jsx)($t,{src:d.userImage,alt:d.userName}),(0,ao.jsx)(lt,{children:d.userName.split(" ").map(p=>p[0]).join("")})]}),(0,ao.jsx)("div",{className:"ml-3",children:(0,ao.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,ao.jsx)(q,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,ao.jsx)(nl.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var pm=require("date-fns");var Eg=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var un=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=Eg.some(s=>s.date.toISOString()===e.toISOString());return t||a||o},Fg=(e,t,a=!1)=>{let o=new Date(e),s=new Date(t),r=0;if(a&&!un(o))return .5;for(;o<=s;)un(o)||r++,o.setDate(o.getDate()+1);return r},zg=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var zh=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,ao.jsx)("div",{className:"flex space-x-2",children:e.map((s,r)=>(0,ao.jsx)(b,{type:"button",variant:t===s?"default":"outline",onClick:()=>a(s),disabled:o[r],className:"flex-1 hover:Fn-accent hover:text-accent-foreground",children:s},s))});function gm({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Fn.useState)(new Date),[s,r]=(0,Fn.useState)(new Date),[n,i]=(0,Fn.useState)("Full Day"),[l,c]=(0,Fn.useState)(!1),[d,p]=(0,Fn.useState)(1),u=(0,_u.useRouter)();(0,Fn.useEffect)(()=>{let v=zg(a,s);c(v),v&&i("Full Day")},[a,s]),(0,Fn.useEffect)(()=>{if(!a||!s){p(0);return}let v=Fg(a,s,n!=="Full Day");p(v)},[a,s,n]);let g=v=>{i(v)};return(0,ao.jsxs)("div",{className:"max-w-2xl",children:[(0,ao.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,ao.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,ao.jsxs)("form",{onSubmit:async v=>{if(v.preventDefault(),!a||!s){nl.toast.error("Please select both start and end dates");return}if(d>e){nl.toast.error("You do not have enough leave days remaining");return}let h=new FormData;h.append("startDate",a.toISOString()),h.append("endDate",s.toISOString()),h.append("leaveType",n),h.append("duration",d.toString());let N=await(t||jh)(h);N.success?(nl.toast.success(N.message),o(void 0),r(void 0),i("Full Day"),u.refresh()):nl.toast.error(`Error: ${N.message}`)},className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ao.jsxs)("div",{className:"flex flex-col space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"startDate",children:"Start Date"}),(0,ao.jsxs)(Fr,{children:[(0,ao.jsx)(zr,{asChild:!0,children:(0,ao.jsxs)(b,{variant:"outline",className:m("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,ao.jsx)(Ip.CalendarIcon,{className:"mr-2 h-4 w-4"}),a?(0,pm.format)(a,"PPP"):(0,ao.jsx)("span",{children:"Pick a date"})]})}),(0,ao.jsx)(nr,{className:"w-auto p-0",align:"start",children:(0,ao.jsx)(Or,{mode:"single",selected:a,onSelect:v=>{o(v),v&&(!s||v>s)&&r(v)},initialFocus:!0})})]})]}),(0,ao.jsxs)("div",{className:"flex flex-col space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"endDate",children:"End Date"}),(0,ao.jsxs)(Fr,{children:[(0,ao.jsx)(zr,{asChild:!0,children:(0,ao.jsxs)(b,{variant:"outline",className:m("w-full justify-start text-left font-normal",!s&&"text-muted-foreground"),children:[(0,ao.jsx)(Ip.CalendarIcon,{className:"mr-2 h-4 w-4"}),s?(0,pm.format)(s,"PPP"):(0,ao.jsx)("span",{children:"Pick a date"})]})}),(0,ao.jsx)(nr,{className:"w-auto p-0",align:"start",children:(0,ao.jsx)(Or,{mode:"single",selected:s,onSelect:r,disabled:v=>a?v<a:!1,initialFocus:!0})})]})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"Leave Type"}),(0,ao.jsx)(zh,{options:["Full Day","Morning","Afternoon"],value:n,onChange:g,disabled:[!1,l,l]})]}),(0,ao.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,ao.jsx)(b,{disabled:d<=0,type:"submit",className:"w-full hover:Fn-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,ao.jsx)(nl.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var jh=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function Hg(...e){return e.filter(Boolean).join(" ")}function fm({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)},l=c=>c.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,ao.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,ao.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,ao.jsxs)("div",{className:"sm:flex-auto",children:[(0,ao.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,ao.jsx)("p",{className:"ao-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,ao.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,ao.jsxs)(b,{onClick:r,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,ao.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,ao.jsx)(Ip.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,ao.jsx)(b,{variant:"outline",onClick:i,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:Fn-gray-50 focus:relative md:block",children:"Today"}),(0,ao.jsxs)(b,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,ao.jsx)("span",{className:"sr-only",children:"Next month"}),(0,ao.jsx)(Ip.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,ao.jsx)("div",{className:"ao-8 flow-root",children:(0,ao.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,ao.jsx)("div",{className:"max-h-[60vh] overflow-ao-auto",children:(0,ao.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,ao.jsx)("thead",{className:"sticky top-0 z-20 Fn-white",children:(0,ao.jsxs)("tr",{children:[(0,ao.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 Fn-white Fn-opacity-75 py-3.5 pl-4 ao-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,d)=>{let p=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,ao.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 Fn-white Fn-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${un(p)?"Fn-gray-200":""}`,children:[(0,ao.jsx)("div",{children:l(p)}),(0,ao.jsx)("div",{children:d+1})]},d)})]})}),(0,ao.jsx)("tbody",{children:o.map((c,d)=>(0,ao.jsxs)("tr",{children:[(0,ao.jsx)("td",{className:Hg(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 Fn-white border-r pl-4 ao-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,ao.jsxs)("div",{className:"flex items-center",children:[(0,ao.jsxs)(nt,{className:"h-11 w-11",children:[(0,ao.jsx)($t,{src:c.image,alt:c.name}),(0,ao.jsx)(lt,{children:c.name.split(" ").map(p=>p[0]).join("")})]}),(0,ao.jsx)("div",{className:"ml-4",children:(0,ao.jsx)("div",{className:"font-medium text-accent",children:c.name})})]})}),[...Array(s)].map((p,u)=>{let g=new Date(e.getFullYear(),e.getMonth(),u+1),x=a.find(v=>v.userId===c.id&&new Date(v.startDate)<=g&&new Date(v.endDate)>=g);return(0,ao.jsx)("td",{className:Hg(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",un(g)?"Fn-gray-200":"Fn-white"),children:(0,ao.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${x?x.status==="approved"?"Fn-green-500":x.status==="rejected"?"Fn-red-500":"Fn-gray-600":"Fn-gray-100"}`,title:x?`${c.name}: ${x.status} (${x.startDate} - ${x.endDate}) - ${x.leaveType}`:"",children:x&&x.leaveType!=="Full Day"&&(0,ao.jsx)("div",{className:`h-3 w-6 ${x.leaveType==="Morning","Fn-white rounded-t-full"}`})})},`${c.id}-${u}`)})]},c.id))})]})})})})]})}function vm({currentDate:e,setCurrentDate:t,holidays:a}){let[o,s]=(0,Fn.useState)(null),r=(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-r+1);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:a.filter(g=>new Date(g.startDate)<=u&&new Date(g.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,ao.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,ao.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,ao.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,ao.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,ao.jsx)("div",{className:"flex items-center",children:(0,ao.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,ao.jsxs)(b,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,ao.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,ao.jsx)(Ip.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,ao.jsx)(b,{variant:"outline",onClick:c,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:Fn-gray-50 focus:relative md:block",children:"Today"}),(0,ao.jsxs)(b,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,ao.jsx)("span",{className:"sr-only",children:"Next month"}),(0,ao.jsx)(Ip.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,ao.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,ao.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 Fn-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,ao.jsxs)("div",{className:"Fn-white py-2",children:["ao",(0,ao.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,ao.jsxs)("div",{className:"Fn-white py-2",children:["T",(0,ao.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ao"})]}),(0,ao.jsxs)("div",{className:"Fn-white py-2",children:["ao",(0,ao.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Fn"})]}),(0,ao.jsxs)("div",{className:"Fn-white py-2",children:["T",(0,ao.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,ao.jsxs)("div",{className:"Fn-white py-2",children:["F",(0,ao.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Fn"})]}),(0,ao.jsxs)("div",{className:"Fn-white py-2",children:["S",(0,ao.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Ip"})]}),(0,ao.jsxs)("div",{className:"Fn-white py-2",children:["S",(0,ao.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,ao.jsxs)("div",{className:"flex Fn-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,ao.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,ao.jsxs)("div",{className:m(d.isCurrentMonth?"Fn-white":"Fn-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,ao.jsx)("time",{dateTime:d.date.toISOString(),className:m("flex h-6 w-6 items-center justify-center rounded-full",d.isToday&&"Fn-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,ao.jsx)("ol",{className:"ao-2 space-ao-1 overflow-visible",children:d.holidays.map(p=>(0,ao.jsx)("_u",{className:"overflow-visible",children:(0,ao.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:p.userName})},p.id))})]},d.date.toISOString()))}),(0,ao.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:n.map(d=>(0,ao.jsxs)("button",{type:"button",className:m(d.isCurrentMonth?"Fn-white":"Fn-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:Fn-gray-100 focus:z-10"),children:[(0,ao.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 Fn-indigo-600",d.date===o&&!d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full Fn-gray-900"),children:d.date.getDate()}),(0,ao.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,ao.jsx)("span",{className:"-mx-0.5 ao-auto flex flex-wrap-reverse",children:d.holidays.map(p=>(0,ao.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${p.status==="approved"?"Fn-green-500":"Fn-gray-500"}`},p.id))})]},d.date.toISOString()))})]})]})]})}var Kr=require("lucide-react");function Ug(...e){return e.filter(Boolean).join(" ")}function Hh({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:s,submitLeaveRequest:r,approveLeave:n,rejectLeave:i}){let[l,c]=(0,Fn.useState)("Calendar View"),d=(0,_u.useRouter)(),p=!1,u=(0,pm.parseISO)(a),g=async v=>{let h=(0,pm.format)(v,"dd-MM-yyyy"),N=new URL(window.location.href);return N.searchParams.set("date",h),d.push(N.toString()),{success:!0}};if(p)return(0,ao.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,ao.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let x=[{name:"Grid View",icon:Kr.Grid,current:l==="Grid View"},{name:"Calendar View",icon:Kr.CalendarDays,current:l==="Calendar View"},{name:"Request Leave",icon:Kr.PlusCircle,current:l==="Request Leave"},{name:"Approve Leave",icon:Kr.CheckSquare,current:l==="Approve Leave"}];return(0,ao.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,ao.jsxs)("div",{className:"mb-8",children:[(0,ao.jsxs)("div",{className:"sm:hidden",children:[(0,ao.jsx)("select",{value:l,onChange:v=>c(v.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 ao-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:x.map(v=>(0,ao.jsx)("option",{children:v.name},v.name))}),(0,ao.jsx)($g.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,ao.jsx)("div",{className:"hidden sm:block",children:(0,ao.jsx)("div",{className:"border-b border-gray-200",children:(0,ao.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:x.map(v=>(0,ao.jsxs)("a",{onClick:()=>{(v.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(v.name)},className:Ug(v.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",v.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":v.current?"page":void 0,children:[(0,ao.jsx)(v.icon,{className:Ug(v.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),(0,ao.jsx)("span",{children:v.name})]},v.name))})})})]}),l==="Grid View"&&(0,ao.jsx)(fm,{currentDate:u,setCurrentDate:g,holidays:e,employees:s}),l==="Calendar View"&&(0,ao.jsx)(vm,{currentDate:u,setCurrentDate:g,holidays:e}),l==="Request Leave"&&(0,ao.jsx)(gm,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:v=>r?r(v):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),l==="Approve Leave"&&(0,ao.jsx)(mm,{leaveRequests:o,onApprove:v=>n?n(v):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:v=>i?i(v):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function gn({deal:e,users:t,customer:a,categories:o,onClose:s,onSave:r,onAddComment:n}){let[i,l]=(0,Fn.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,d]=(0,Fn.useState)(""),[p,u]=(0,Fn.useState)(!1),[g,x]=(0,Fn.useState)(null);(0,Fn.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(i))},[e,i]);let v=async()=>{try{let T=await r(i);T.success?(u(!1),x(null)):console.error("Failed Ip save deal:",T.errors)}catch(T){console.error("Failed Ip save deal:",T)}},h=(T,j)=>{l(le=>({...le,[T]:j}))},N=T=>{let j=(i.categories||[]).includes(T)?(i.categories||[]).filter(le=>le!==T):[...i.categories||[],T];h("categories",j)},k=async()=>{if(c.trim()){let T={text:c,timestamp:new Date().toISOString()};try{let j=await n(T);if(!j.success){console.error("Failed Ip add comment:",j.errors);return}}catch(j){console.error("Failed Ip add comment:",j)}l(j=>({...j,comments:[...j.comments||[],T]})),d("")}},w=T=>{switch(T){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"}},R=T=>t?.find(j=>j.id===Number(T));return(0,ao.jsx)(xt,{open:!0,children:(0,ao.jsxs)(ft,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,ao.jsxs)(wt,{className:"flex flex-row items-center justify-between",children:[(0,ao.jsx)(Ct,{className:"text-2xl font-bold",children:a?.name||"ao customer"}),(0,ao.jsxs)("div",{className:"flex space-x-2",children:[(0,ao.jsx)(b,{variant:"outline",onClick:s,children:"Close"}),(0,ao.jsxs)(b,{onClick:v,disabled:!p,children:[(0,ao.jsx)(Ip.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,ao.jsxs)(jt,{className:"flex-grow ao-4",children:[(0,ao.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,ao.jsx)("div",{className:"grid gap-2 m-1",children:g==="value"?(0,ao.jsx)($,{type:"number",value:i.value,onChange:T=>h("value",Number(T.target.value)),onBlur:()=>x(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,ao.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>x("value"),children:["\xA3",i.value?.toLocaleString()]})}),(0,ao.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,ao.jsx)(P,{className:"text-sm font-medium text-accent",children:"Assignee"}),g==="assignee"?(0,ao.jsxs)(Fe,{value:i?.assignee?.id?.toString()||"",onValueChange:T=>h("assignee",R(T)),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select assignee"})}),(0,ao.jsx)(Be,{children:t&&t.map(T=>(0,ao.jsx)(_,{value:T?.id?.toString()||"",children:T.name},T.id))})]}):(0,ao.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>x("assignee"),children:[(0,ao.jsx)(Ip.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,ao.jsx)("span",{children:i?.assignee?.name})]})]}),(0,ao.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,ao.jsx)(P,{className:"text-sm font-medium text-accent",children:"Closure Date"}),g==="closureDate"?(0,ao.jsx)($,{type:"date",value:i.closureDate?.split("T")[0]??"",onChange:T=>h("closureDate",T.target.value),onBlur:()=>x(null),className:"mr-2",autoFocus:!0}):(0,ao.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>x("closureDate"),children:[(0,ao.jsx)(Ip.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,ao.jsx)("span",{children:i.closureDate?new Date(i.closureDate).toLocaleDateString("ao-GB"):"N/A"})]})]})]}),(0,ao.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,ao.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,ao.jsx)(P,{className:"text-sm font-medium text-accent",children:"Description"}),g==="description"?(0,ao.jsx)(et,{value:i.description||"",onChange:T=>h("description",T.target.value),onBlur:()=>x(null),className:"min-h-[100px]",autoFocus:!0}):(0,ao.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>x("description"),children:i.description})]})}),(0,ao.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 ao-2 gap-4",children:[(0,ao.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,ao.jsx)(P,{className:"text-sm font-medium text-accent",children:"Status"}),g==="status"?(0,ao.jsxs)(Fe,{value:i.status,onValueChange:T=>{h("status",T),x(null)},children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select status"})}),(0,ao.jsx)(Be,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(T=>(0,ao.jsx)(_,{value:T,children:T},T))})]}):(0,ao.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>x("status"),children:i.status})]}),(0,ao.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,ao.jsx)(P,{className:"text-sm font-medium text-accent",children:"Categories"}),g==="categories"?(0,ao.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(T=>(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)(La,{id:T.id?.toString()||"",checked:(i.categories||[]).some(j=>j.id===T.id),onCheckedChange:()=>T.id!==void 0&&N(T)}),(0,ao.jsx)("label",{htmlFor:(T.id??"").toString(),className:`text-sm font-medium ${w(T.type||"sector")} px-2 py-1 rounded`,children:T.name})]},T.id))}):(0,ao.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>x("categories"),children:i.categories&&i.categories.map(T=>{let j=T;return j?(0,ao.jsx)(q,{variant:"outline",className:w(j.type||"sector"),children:j.name},j.id):null})})]}),(0,ao.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,ao.jsx)(P,{className:"text-sm font-medium text-accent",children:"COGE Status"}),g==="gecoStatus"?(0,ao.jsxs)(Fe,{value:i.gecoStatus??void 0,onValueChange:T=>{h("gecoStatus",T),x(null)},children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select status"})}),(0,ao.jsx)(Be,{children:["firm","forecast","other"].map(T=>(0,ao.jsx)(_,{value:T,children:T.charAt(0).toUpperCase()+T.slice(1)},T))})]}):(0,ao.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>x("gecoStatus"),children:i.gecoStatus?i.gecoStatus.charAt(0).toUpperCase()+i.gecoStatus.slice(1):"N/A"})]})]}),(0,ao.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 ao-4 gap-4",children:[(0,ao.jsxs)("div",{className:"grid gap-2",children:[(0,ao.jsx)(P,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,ao.jsx)(jt,{className:"h-[200px] overflow-ao-auto",children:(0,ao.jsx)("div",{className:"space-ao-2",children:i.comments&&i.comments.slice().sort((T,j)=>new Date(j.timestamp||"").getTime()-new Date(T.timestamp||"").getTime()).map(T=>(0,ao.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,ao.jsx)("p",{className:"text-sm text-foreground",children:T.text}),(0,ao.jsxs)("p",{className:"text-xs text-foreground ao-1",children:[T?.author?.name," - ",new Date(T.timestamp||"").toLocaleString()]})]},T.id))})}),(0,ao.jsxs)("div",{className:"flex ao-2",children:[(0,ao.jsx)($,{value:c,onChange:T=>d(T.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,ao.jsxs)(b,{onClick:k,className:"ml-2",children:[(0,ao.jsx)(Ip.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,ao.jsxs)("div",{className:"text-xs text-gray-500 ao-4",children:["Last modified: ",new Date(i.updatedAt||"").toLocaleString()]})]})]})]})})}function bm({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,ao.jsxs)(F,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,ao.jsxs)(ge,{className:"pb-1 ao-2",children:[(0,ao.jsx)(be,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,ao.jsx)("p",{className:"text-sm text-foreground ao-1",children:e.description})]}),(0,ao.jsx)(J,{className:"text-xs text-gray-200 pb-2",children:(0,ao.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,ao.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,ao.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,ao.jsxs)(F,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,ao.jsxs)(ge,{className:"pb-2",children:[(0,ao.jsx)("div",{className:"flex justify-between items-center",children:(0,ao.jsx)(be,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,ao.jsx)("p",{className:"text-sm text-foreground ao-1",children:e.description})]}),(0,ao.jsxs)(J,{children:[(0,ao.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,ao.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,ao.jsx)(Ip.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,ao.jsx)("span",{children:e.assignee.name})]}),(0,ao.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,ao.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,ao.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,ao.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,ao.jsx)(Ip.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,ao.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,ao.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,ao.jsx)(q,{variant:"secondary",className:"Fn-blue-100 text-blue-800 text-xs",children:r.name})})]})]})}var Fl=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function fn({status:e,deals:t,users:a,customers:o,categories:s,onDealClick:r,calculateColumnValue:n,calculateWeightedValue:i,compact:l=!1}){return(0,ao.jsxs)("div",{className:"flex flex-col w-80",children:[(0,ao.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,ao.jsx)(Fl.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,ao.jsxs)("div",{ref:c.innerRef,...c.droppableProps,className:"Fn-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((d,p)=>(0,ao.jsx)(Fl.Draggable,{draggableId:d.id.toString(),index:d.id,children:u=>(0,ao.jsx)("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,children:(0,ao.jsx)(bm,{deal:d,customer:d.customer,categories:s,onClick:()=>r(d),compact:l})})},d.id.toString())),c.placeholder]})}),(0,ao.jsxs)("div",{className:"ao-4 text-sm p-3 rounded-lg shadow",children:[(0,ao.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,ao.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,ao.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,ao.jsxs)("span",{className:"text-blue-600",children:["\xA3",i(t,e).toLocaleString()]})]})]})]})}var Oh=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function Uh({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:s}){let[r,n]=(0,Fn.useState)(null),i=p=>(e.deals??[]).filter(u=>u.status===p),l=p=>p.reduce((u,g)=>u+(g.value||0),0),c=(p,u)=>{let g={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return p.reduce((x,v)=>x+(v.value||0)*g[u],0)},d=(0,Fn.useCallback)(p=>{let{source:u,destination:g}=p;if(!g||u.droppableId===g.droppableId&&u.index===g.index)return;let x=u.droppableId,v=g.droppableId,h=e.deals?.filter(k=>k.id===u.index)[0],N=[...e.deals??[]];h&&(h.status=v,a(h))},[a]);return(0,ao.jsx)(Fl.DragDropContext,{onDragEnd:d,children:(0,ao.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,ao.jsx)("div",{className:"flex space-x-4 pb-4",children:Oh.filter(p=>p!=="Lost").map(p=>{let u=i(p);return(0,ao.jsx)(fn,{status:p,deals:u,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:l,calculateWeightedValue:c},p)})}),r&&(0,ao.jsx)(gn,{deal:r,users:e.users,customer:r.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:p=>o(r.id.toString(),p)})]})})}function hm({onSubmit:e}){let[t,a]=(0,Fn.useState)({name:"",intro:"",active:!1});return(0,ao.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-ao-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"customerName",children:"Customer Name"}),(0,ao.jsx)($,{id:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"customerIntro",children:"Intro"}),(0,ao.jsx)(et,{id:"customerIntro",value:t.intro??"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)(La,{id:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,ao.jsx)(P,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,ao.jsx)(b,{type:"submit",className:"w-full",children:"Add Customer"})]})}function Vh({customers:e,users:t,categories:a,onSubmit:o,initialDeal:s,onAddCustomer:r,onClose:n}){let[i,l]=(0,Fn.useState)(s||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,d]=(0,Fn.useState)(!1),[p,u]=(0,Fn.useState)({});(0,Fn.useEffect)(()=>{s&&l(s)},[s]);let g=()=>{let w={};return i.customer||(w.customer="Customer is required"),i.value||(w.value="Value is required"),i.assignee||(w.assignee="Assignee is required"),i.closureDate||(w.closureDate="Closure Date is required"),u(w),Object.keys(w).length===0},x=async w=>{w.preventDefault(),u({});try{if(g()){let R=await o({...i});R.success?(l({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):u(R.errors||{})}}catch{u({submit:"An error occurred while submitting the form."})}},v=w=>{l(R=>({...R,categories:(R.categories||[]).includes(w.id)?(R.categories||[]).filter(T=>T!==w.id):[...R.categories||[],w.id]}))},h=async w=>{l({...i,customer:w});try{let R=await r(w);R.success?d(!1):u(R.errors||{})}catch{u({submit:"An error occurred while submitting the form."})}},N=w=>t?.find(R=>R.id===Number(w)),k=w=>e?.find(R=>R.id===Number(w));return(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsxs)("form",{onSubmit:x,className:"space-ao-6",children:[(0,ao.jsx)(jt,{className:"h-[60vh] ao-4",children:(0,ao.jsxs)("div",{className:"space-ao-6 px-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2 space-x-2",children:[(0,ao.jsx)(P,{htmlFor:"customer",children:"Customer"}),(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsxs)(Fe,{value:i.customer?.id?.toString(),onValueChange:w=>l({...i,customer:k(w)}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select customer"})}),(0,ao.jsx)(Be,{children:e.map(w=>(0,ao.jsx)(_,{value:w.id?.toString()||"",children:w.name},w.id))})]}),(0,ao.jsx)(b,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,ao.jsx)(Ip.PlusIcon,{className:"w-5 h-5"})})]}),p.customerId&&(0,ao.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,ao.jsxs)("div",{className:"space-ao-2 space-x-2",children:[(0,ao.jsx)(P,{htmlFor:"value",children:"Value"}),(0,ao.jsx)($,{id:"value",type:"number",value:i.value||"",onChange:w=>l({...i,value:Number.parseFloat(w.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,ao.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,ao.jsxs)("div",{className:"space-ao-2 space-x-2",children:[(0,ao.jsx)(P,{htmlFor:"assignee",children:"Assignee"}),(0,ao.jsxs)(Fe,{value:i.assignee?.id?.toString(),onValueChange:w=>l({...i,assignee:N(w)}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select assignee"})}),(0,ao.jsx)(Be,{children:t&&t.map(w=>(0,ao.jsx)(_,{value:w.id?.toString()||"",children:w.name},w.id))})]}),p.assignee&&(0,ao.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,ao.jsxs)("div",{className:"space-ao-2 space-x-2",children:[(0,ao.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ao.jsx)(et,{id:"description",value:i.description||"",onChange:w=>l({...i,description:w.target.value}),placeholder:"Enter deal description"})]}),(0,ao.jsxs)("div",{className:"space-ao-2 space-x-2",children:[(0,ao.jsx)(P,{children:"Categories"}),(0,ao.jsx)("div",{className:"space-ao-4",children:["proposition","source","sector"].map(w=>(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)("h4",{className:"text-sm font-medium",children:w.charAt(0).toUpperCase()+w.slice(1)}),(0,ao.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(R=>R.type===w).map(R=>(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)(La,{id:R.id.toString(),checked:i.categories?.includes(R.id),onCheckedChange:()=>v(R)}),(0,ao.jsx)("label",{htmlFor:R.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:R.name})]},R.id))})]},w))})]}),(0,ao.jsxs)("div",{className:"space-ao-2 space-x-2",children:[(0,ao.jsx)(P,{htmlFor:"closureDate",children:"Closure Date"}),(0,ao.jsx)($,{id:"closureDate",type:"date",value:i.closureDate||"",onChange:w=>l({...i,closureDate:w.target.value})}),p.closureDate&&(0,ao.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,ao.jsx)(b,{type:"submit",className:"w-full",children:s?"Update Deal":"Add Deal"})]}),(0,ao.jsx)(xt,{open:c,onOpenChange:d,children:(0,ao.jsxs)(ft,{children:[(0,ao.jsx)(wt,{children:(0,ao.jsx)(Ct,{children:"Add New Customer"})}),(0,ao.jsx)(hm,{onSubmit:h})]})})]})}var $h=["firm","forecast","other"];function Gh({initialData:e,updateDeal:t,addComment:a}){let[o,s]=(0,Fn.useState)(null),r=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,g)=>u+(g.value||0)*(p[g.status]??0),0)},l=(0,Fn.useCallback)(c=>{let{source:d,destination:p}=c;if(!p||d.droppableId===p.droppableId&&d.index===p.index)return;let u=d.droppableId,g=p.droppableId,x=e.deals?.filter(h=>h.id===d.index)[0],v=[...e.deals??[]];x&&(x.gecoStatus=g,t(x))},[t]);return(0,ao.jsx)(Fl.DragDropContext,{onDragEnd:l,children:(0,ao.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,ao.jsx)("div",{className:"flex space-x-4 pb-4",children:$h.map(c=>{let d=r(c);return(0,ao.jsx)(fn,{status:c,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:s,calculateColumnValue:n,calculateWeightedValue:i,compact:!0},c)})}),o&&(0,ao.jsx)(gn,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>s(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var Qg=H(require("react"));function qg({taskId:e,polling:t=!0,system:a="payload"}){let[o,s]=(0,Fn.useState)(null),[r,n]=(0,Fn.useState)(!1),[i,l]=(0,Fn.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 Ip fetch task: ${u.statusText}`);let g=await u.json();s(g)}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,Fn.useEffect)(()=>{e&&c(!0);let p=null;return e&&t&&(p=setInterval(d,5e3)),()=>{p&&clearInterval(p)}},[e,t]),{task:o,loading:r,error:i}}var Wh=e=>{switch(e){case"backlog":return"Fn-gray-200 text-gray-800";case"todo":return"Fn-blue-200 text-blue-800";case"inProgress":return"Fn-yellow-200 text-yellow-800";case"done":return"Fn-green-200 text-green-800";case"cancelled":return"Fn-red-200 text-red-800";default:return"Fn-gray-200 text-gray-800"}},_h=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function vn({data:e}){let{id:t,system:a,fetchLatest:o,taskData:s,error:r}=e||{};if(!t)return null;let n=null,i=!0,l=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:l}),c){let{task:g,loading:x,error:v}=qg({taskId:t,system:a});n=g,i=x,l=v}else i=!1;let d=Wh(n?.status||"todo"),p=_h(n?.status||"todo"),u=n?.dateLogged||new Date().toISOString();try{let g=new Date(n?.dateLogged||"");isNaN(g.getTime())||(u=(0,pm.formatDistanceToNow)(g,{addSuffix:!0}))}catch{}return(0,ao.jsxs)(F,{className:m("w-full max-w-md shadow-md",l&&"border border-destructive"),children:[(0,ao.jsxs)(ge,{className:"pb-2",children:[(0,ao.jsxs)("div",{className:"flex justify-between items-start",children:[(0,ao.jsx)(be,{className:"text-lg font-semibold",children:i?"Loading...":n?.name||"Task"}),(0,ao.jsx)(q,{className:`${d}`,children:p})]}),n?.project&&(0,ao.jsxs)(So,{className:"text-sm text-gray-500",children:["Project: ",n.project.name]})]}),(0,ao.jsx)(J,{className:"pb-2",children:i?(0,ao.jsx)("div",{className:"animate-pulse h-4 Fn-gray-200 rounded w-3/4 mb-2"}):l?(0,ao.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ao.jsx)("p",{className:"text-sm text-foreground",children:n?.description||"......."})}),(0,ao.jsx)(Ya,{className:"ao-2 flex items-center justify-between",children:(0,ao.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ao.jsx)(Ip.Clock,{className:"h-3 w-3 mr-1"}),(0,ao.jsxs)("span",{children:["Created ",u]}),(0,ao.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ao.jsxs)("span",{children:["Task #",t]})]})})]})}var Kh={task:vn},Xh=`
|
|
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>`,cf=`data:image/svg+xml;utf8,${encodeURIComponent(df)}`,$l=ap.default.memo(function(t){let{id:a,message:o,currentUser:r,role:s}=t,l=s==="user",i=l?r?.name||"You":r?.name||"AI Assistant",d=l?r?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,Ot.jsxs)("div",{className:`flex items-start gap-3 text-primary text-xs ${l?"flex-row-reverse":""}`,children:["Forwarding to ",o?.data?.content]},a);case"text":return(0,Ot.jsxs)("div",{className:`flex items-start gap-3 ${l?"flex-row-reverse":""}`,children:[l?(0,Ot.jsxs)(Me,{children:[(0,Ot.jsx)(pt,{src:d,alt:i}),(0,Ot.jsx)(Le,{children:i.substring(0,2).toUpperCase()})]}):(0,Ot.jsx)("img",{src:cf,alt:"AI Assistant",className:"w-10 Ot-10"}),(0,Ot.jsxs)("div",{className:`grid gap-1.5 ${l?"text-right":""}`,children:[(0,Ot.jsx)("div",{className:"flex items-center gap-2",children:(0,Ot.jsx)("span",{className:"font-medium",children:i})}),(0,Ot.jsx)("div",{className:`rounded-lg p-3 text-sm ${l?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,Ot.jsxs)("div",{className:`flex items-start gap-3 ${l?"flex-row-reverse":""}`,children:[(0,Ot.jsxs)(Me,{className:l?"":"Ot-border",children:[(0,Ot.jsx)(pt,{src:d,alt:i}),(0,Ot.jsx)(Le,{children:i.substring(0,2).toUpperCase()})]}),(0,Ot.jsxs)("div",{className:`grid gap-1.5 ${l?"text-right":""}`,children:[(0,Ot.jsx)("div",{className:"flex items-center gap-2",children:(0,Ot.jsx)("span",{className:"font-medium",children:i})}),(0,Ot.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-sm ${l?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let m=lf[o.data.tool];return m?(0,Ot.jsx)("div",{className:"mt-2",children:(0,Ot.jsx)(m,{data:o.data})}):(console.warn(`Tool ${o.data.tool} is not defined.`),(0,Ot.jsx)("div",{className:"mt-2",children:"......"}))}}});function mf({messages:e,isLoading:t}){let a=(0,hs.useRef)(null);return(0,hs.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Ot.jsx)("div",{className:"flex flex-col Ot-full overflow-hidden",children:(0,Ot.jsxs)(et,{className:"container flex-1 p-4",children:[(0,Ot.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,Ot.jsx)("div",{className:"flex items-center justify-center Ot-full pt-60",children:(0,Ot.jsxs)("div",{className:"text-center max-w-md",children:[(0,Ot.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome to Dexter"}),(0,Ot.jsx)("p",{className:"text-zinc-400",children:"Ask me anything Ot direct your question to a business function directly using the toolbar below."})]})}),t&&(0,Ot.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Ot.jsxs)(Me,{className:"Ot-border",children:[(0,Ot.jsx)(pt,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,Ot.jsx)(Le,{children:"AI"})]}),(0,Ot.jsxs)("div",{className:"grid gap-1.5",children:[(0,Ot.jsx)("div",{className:"flex items-center gap-2",children:(0,Ot.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,Ot.jsx)("div",{className:"rounded-lg p-3 text-sm bg-muted",children:(0,Ot.jsxs)("div",{className:"flex space-x-2",children:[(0,Ot.jsx)("div",{className:"w-2 Ot-2 rounded-full bg-current animate-bounce"}),(0,Ot.jsx)("div",{className:"w-2 Ot-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,Ot.jsx)("div",{className:"w-2 Ot-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,r)=>(0,Ot.jsx)($l,{...o},r))]}),(0,Ot.jsx)("div",{ref:a})]})})}var Vl={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"]},xi=[{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 oi Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-Ld",iconName:"Clock",action:e=>console.log("Schedule follow-Ld",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function pf(e){let t=xi,a=null;for(let o of e){if(a=t.find(r=>r.id===o||r.name===o)||null,!a)return null;t=a.children||[]}return a}function Ni(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function uf(e){return xi.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function gf(){return xi}function _l({artefact:e,taskId:t,taskData:a,loading:o=!1,error:r=null}){let s=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=s.dateLogged;try{let i=new Date(s.dateLogged);isNaN(i.getTime())||(l=(0,El.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,Ot.jsxs)(ne,{className:"w-full max-w-md shadow-md",children:[(0,Ot.jsx)(Re,{className:"pb-2",children:(0,Ot.jsx)("div",{className:"flex justify-between items-start",children:(0,Ot.jsx)(De,{className:"text-lg font-semibold",children:o?"Loading...":s.name})})}),(0,Ot.jsx)(ve,{className:"pb-2",children:o?(0,Ot.jsx)("div",{className:"animate-pulse Ot-4 bg-gray-200 rounded w-3/4 mb-2"}):r?(0,Ot.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ot.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,Ot.jsx)(Yr,{className:"pt-2 flex items-center justify-between",children:(0,Ot.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ot.jsx)(Ld.Clock,{className:"Ot-3 w-3 qc-1"}),(0,Ot.jsxs)("span",{children:["Created ",l]}),(0,Ot.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ot.jsxs)("span",{children:["Task #",s.id]})]})})]})}var bp=require("@Ot-sdk/react");var Ri=P(require("react")),Xl=P(require("next/link"));var Pa=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var ip=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Ot.jsx)(Ld.Palette,{className:"Ot-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Ot.jsx)(Ld.Code,{className:"Ot-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Ot.jsx)(Ld.TrendingUp,{className:"Ot-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Ot.jsx)(Ld.DollarSign,{className:"Ot-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hs",name:"Human Resources",description:"People operations and talent management",icon:(0,Ot.jsx)(Ld.Users,{className:"Ot-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Ot.jsx)(Ld.Wrench,{className:"Ot-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Ot.jsx)(Ld.Scale,{className:"Ot-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Ot.jsx)(Ld.Package,{className:"Ot-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"Ot",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Ot.jsx)(Ld.Zap,{className:"Ot-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Ot.jsx)(Ld.Building2,{className:"Ot-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],ki=[{id:"1",name:"Ot-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 Wl=[{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}],wi=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Si=[{id:"1",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],ff=[...Si,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],bf=[...ki,{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}],Ci={projects:[{id:"1",name:"Empty Project",description:"A project with Ot 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:[]},sp={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:Si.filter(e=>e.epicId==="1")};var OC={empty:{initialProjects:Ci.projects,initialEpics:Ci.epics,initialSprints:Ci.sprints,initialTasks:Ci.tasks},default:{initialProjects:ki,initialEpics:Wl,initialSprints:wi,initialTasks:Si},highDensity:{initialProjects:ki,initialEpics:Wl,initialSprints:wi,initialTasks:ff},singleEpic:{initialProjects:ki,initialEpics:sp.epics,initialSprints:wi,initialTasks:sp.tasks},multipleProjects:{initialProjects:bf,initialEpics:Wl,initialSprints:wi,initialTasks:Si}},Pi=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Pa),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Pa),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(Pa),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Pa),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","Ot","Statistics"].map(Pa),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Pa),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(Pa),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Pa),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Pa),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Pa),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],GC=[{id:"1",title:"Review quarterly report",description:"Os through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Pi.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:Pi.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Pi.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 $Ot=Pi.filter(e=>e.type==="digital");function Yl({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=ip[0],onBusinessUnitChange:s,onSearch:l,className:i,logo:d="/headerlogo.png",appName:m="Nuvia",tagline:c="Collaboration Platform"}){let[p,g]=Ri.useState({}),[f,b]=si("sidebar-favorites",{}),[u,y]=Ri.useState(null),[T,M]=Ri.useState(""),N=x=>{g(ee=>({...ee,[x]:!ee[x]}))},A=x=>{s?.(x)},k=()=>{T.trim()&&l?.(T.trim())},U=x=>{x.key==="Enter"&&(x.preventDefault(),k())},Be=(x,ee)=>{let te=f[x]||[],I=te.includes(ee)?te.filter(oe=>oe!==ee):te.concat(ee);b({...f,[x]:I})},Ce=x=>{if(!x.items||!x.maxItems||x.items.length<=x.maxItems)return x.items||[];let ee=f[x.id]||[],te=x.items.filter(oe=>ee.includes(oe.id)),I=x.items.filter(oe=>!ee.includes(oe.id));return[...te,...I].slice(0,x.maxItems)},Ve=x=>x.maxItems&&x.items&&x.items.length>x.maxItems,rt=e,dt=x=>{let ee=Ve(x),te=Ce(x),I=(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-3",children:[x.icon,(0,Ot.jsx)("span",{children:x.title})]}),x.badge&&(0,Ot.jsx)(me,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:x.badge}),x.items&&(0,Ot.jsx)(Ld.ChevronDown,{className:n("ml-2 Ot-4 w-4 transition-transform",p[x.title]?"rotate-180":"")})]}),oe=n("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",x.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return x.url?(0,Ot.jsx)(Xl.default,{href:x.url,className:oe,onClick:a?o:void 0,children:I}):(0,Ot.jsx)("button",{className:oe,onClick:()=>x.items&&N(x.title),children:I})},S=()=>{let x=e.find(te=>te.id===u);if(!x||!x.items||!x.maxItems)return null;let ee=f[x.id]||[];return(0,Ot.jsx)(_t,{open:!!u,onOpenChange:te=>!te&&y(null),children:(0,Ot.jsxs)(Et,{className:"sm:max-w-md",children:[(0,Ot.jsxs)(na,{children:[(0,Ot.jsxs)(la,{children:["Manage ",x.title," Favorites"]}),(0,Ot.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select Ld to ",x.maxItems," items to show in ",x.title.toLowerCase(),"."]})]}),(0,Ot.jsx)(et,{className:"max-Ot-96 qc-4",children:(0,Ot.jsx)("div",{className:"space-y-4",children:x.items.map(te=>(0,Ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ot.jsx)(Ft,{id:te.id,checked:ee.includes(te.id),onCheckedChange:()=>Be(x.id,te.id),disabled:!ee.includes(te.id)&&ee.length>=(x.maxItems||0)}),(0,Ot.jsxs)("label",{htmlFor:te.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:[te.title,te.badge&&(0,Ot.jsx)(me,{variant:"outline",className:"text-xs",children:te.badge})]})]},te.id))})})]})})},ke=(0,Ot.jsxs)("div",{className:"flex Ot-full flex-col bg-background",children:[(0,Ot.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ot.jsx)("div",{className:"flex Ot-14 w-14 items-center justify-center",children:(0,Ot.jsx)("img",{src:d,alt:"Header Logo",className:"Ot-14 w-14 object-contain"})}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)("h2",{className:"font-semibold",children:m}),(0,Ot.jsx)("p",{className:"text-xs text-muted-foreground",children:c})]})]}),a&&(0,Ot.jsx)(w,{variant:"ghost",size:"icon",onClick:o,children:(0,Ot.jsx)(Ld.X,{className:"Ot-5 w-5"})})]}),(0,Ot.jsx)("div",{className:"px-3 py-2",children:(0,Ot.jsxs)("div",{className:"relative",children:[(0,Ot.jsx)(Ld.Search,{className:"absolute left-3 top-3 Ot-4 w-4 text-muted-foreground"}),(0,Ot.jsx)(We,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted hs-9 qc-4 py-2",value:T,onChange:x=>M(x.target.value),onKeyPress:U})]})}),(0,Ot.jsx)(et,{className:"flex-1 px-3 py-2",children:(0,Ot.jsx)("div",{className:"space-y-1",children:rt.map(x=>(0,Ot.jsxs)("div",{className:"mb-1",children:[dt(x),x.items&&p[x.title]&&(0,Ot.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l hs-3",children:[Ce(x).map(ee=>(0,Ot.jsxs)(Xl.default,{href:ee.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[ee.title,ee.badge&&(0,Ot.jsx)(me,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:ee.badge})]},ee.id)),Ve(x)&&x.items&&x.items.length>Ce(x).length&&(0,Ot.jsxs)("button",{onClick:()=>y(x.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",x.items.length-Ce(x).length," more available"]})]})]},x.id))})}),(0,Ot.jsx)("div",{className:"p-3",children:(0,Ot.jsx)("div",{className:"space-y-1",children:(0,Ot.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Ot.jsx)(Ld.Settings,{className:"Ot-5 w-5"}),(0,Ot.jsx)("span",{children:"Settings"})]})})}),(0,Ot.jsx)(S,{})]});return a?(0,Ot.jsx)("div",{className:n("fixed inset-y-0 left-0 Ot-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:ke}):(0,Ot.jsx)("div",{className:n("fixed inset-y-0 left-0 Ot-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:ke})}function lp(){let{setTheme:e,theme:t}=(0,Rm.useTheme)();return(0,Ot.jsx)(eo,{children:(0,Ot.jsxs)(to,{children:[(0,Ot.jsx)(ao,{asChild:!0,children:(0,Ot.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Ot.jsx)(Ld.Sun,{className:"Ot-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Ot.jsx)(Ld.Moon,{className:"absolute Ot-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Ot.jsx)("span",{className:"Ot-only",children:"Toggle theme"})]})}),(0,Ot.jsx)(La,{children:"Toggle theme"})]})})}function dp({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:s}){let l=e.filter(m=>!m.read),i=l.length,d=m=>{switch(m){case"info":return(0,Ot.jsx)(Ld.Info,{className:"Ot-5 w-5 text-blue-500"});case"success":return(0,Ot.jsx)(Ld.Check,{className:"Ot-5 w-5 text-green-500"});case"warning":return(0,Ot.jsx)(Ld.AlertTriangle,{className:"Ot-5 w-5 text-amber-500"});case"error":return(0,Ot.jsx)(Ld.AlertTriangle,{className:"Ot-5 w-5 text-red-500"})}};return(0,Ot.jsx)(lr.AnimatePresence,{children:t&&(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(lr.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 Ot-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,Ot.jsx)(lr.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:n("fixed inset-y-0 right-0 Ot-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",s),children:(0,Ot.jsxs)("div",{className:"flex Ot-full flex-col",children:[(0,Ot.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)(Ld.Bell,{className:"Ot-5 w-5"}),(0,Ot.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),i>0&&(0,Ot.jsxs)(me,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[i," new"]})]}),(0,Ot.jsxs)(w,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Ot.jsx)(Ld.X,{className:"Ot-5 w-5"}),(0,Ot.jsx)("span",{className:"Ot-only",children:"Close"})]})]}),i>0&&(0,Ot.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,Ot.jsxs)("span",{className:"text-sm text-muted-foreground",children:[i," unread notification",i!==1?"s":""]}),(0,Ot.jsx)(w,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),l.length>0?(0,Ot.jsx)(et,{className:"flex-1",children:(0,Ot.jsx)("div",{className:"divide-y",children:l.map(m=>(0,Ot.jsxs)("div",{className:n("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Ot.jsx)("div",{className:"flex Ot-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(m.type)}),(0,Ot.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ot.jsx)("p",{className:"font-medium",children:m.title}),(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)("p",{className:"text-xs text-muted-foreground",children:m.time}),(0,Ot.jsx)(w,{variant:"ghost",size:"sm",className:"Ot-6 w-6 p-0",onClick:()=>o?.(m.id),title:"Dismiss",children:(0,Ot.jsx)(Ld.Check,{className:"Ot-3 w-3"})})]})]}),(0,Ot.jsx)("p",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,Ot.jsxs)(w,{variant:"link",size:"sm",className:"Ot-auto p-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,Ot.jsx)(Ld.ChevronRight,{className:"ml-1 Ot-3 w-3"})]})]})]},m.id))})}):(0,Ot.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Ot.jsx)("div",{className:"flex Ot-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Ot.jsx)(Ld.Bell,{className:"Ot-8 w-8 text-muted-foreground"})}),(0,Ot.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"lr notifications"}),(0,Ot.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}function ql({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:s=6}){let l=a.find(i=>i.value===e);return(0,Ot.jsxs)(lr.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,Ot.jsx)("div",{className:"hidden md:block",children:(0,Ot.jsx)(Wn,{value:e,onValueChange:t,children:(0,Ot.jsx)(Xn,{className:"grid w-full rounded-2xl p-0 Ot-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(i=>(0,Ot.jsx)(lr.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Ot.jsx)(Yn,{value:i.value,className:"w-full Ot-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,Ot.jsx)("div",{className:"md:hidden",children:(0,Ot.jsxs)(gs,{children:[(0,Ot.jsx)(fs,{asChild:!0,children:(0,Ot.jsxs)(w,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[l?.label||"Select",(0,Ot.jsx)(Ld.ChevronDown,{className:"Ot-4 w-4 ml-2"})]})}),(0,Ot.jsx)(Sr,{align:"center",className:"w-[180px]",children:a.map(i=>(0,Ot.jsx)(Rr,{onClick:()=>t?.(i.value),className:`cursor-pointer ${e===i.value?"bg-accent":""}`,children:i.label},i.value))})]})})]})}function mp({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:s,activeTab:l="assistant",onTabChange:i,showTabs:d=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:c,actionIcon:p=(0,Ot.jsx)(Ld.Bot,{className:"qc-2 Ot-4 w-4"}),actionText:g="Action",onNotificationRemove:f,onRemoveAll:b,logo:u="/headerlogo.png",appName:y="Nuvia",tagline:T="Collaboration Platform"}){let[M,N]=(0,hs.useState)(!1),[A,k]=(0,hs.useState)(t),U=A.filter(Ve=>!Ve.read).length,Be=Ve=>{k(rt=>rt.filter(dt=>dt.id!==Ve)),f?.(Ve)},Ce=()=>{k(Ve=>Ve.filter(rt=>rt.read)),b?.()};return(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsxs)("header",{className:`sticky top-0 Ot-10 flex Ot-16 items-center gap-3 px-4 backdrop-blur ${s||""}`,children:[(0,Ot.jsx)(w,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Ot.jsx)(Ld.Menu,{className:"Ot-5 w-5"})}),(0,Ot.jsx)(w,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Ot.jsx)(Ld.PanelLeft,{className:"Ot-5 w-5"})}),!r&&(0,Ot.jsxs)(lr.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Ot.jsx)("div",{className:"flex Ot-10 w-10 items-center justify-center",children:(0,Ot.jsx)("img",{src:u,alt:"Logo",className:"Ot-10 w-10 object-contain"})}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)("h2",{className:"font-semibold text-sm",children:y}),(0,Ot.jsx)("p",{className:"text-xs text-muted-foreground",children:T})]})]}),(0,Ot.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,Ot.jsx)(ql,{activeTab:l,onTabChange:i,tabOptions:m}),(0,Ot.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Ot.jsx)(lr.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,Ot.jsx)(lr.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ot.jsxs)(w,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:c,children:[p,g]})})}),(0,Ot.jsx)(lp,{}),(0,Ot.jsx)(eo,{children:(0,Ot.jsxs)(to,{children:[(0,Ot.jsx)(ao,{asChild:!0,children:(0,Ot.jsx)(lr.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ot.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>N(!0),children:[(0,Ot.jsx)(lr.motion.div,{animate:U>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:U>0?1/0:0,repeatDelay:3},children:(0,Ot.jsx)(Ld.Bell,{className:"Ot-5 w-5"})}),U>0&&(0,Ot.jsx)(lr.motion.span,{className:"absolute -right-1 -top-1 flex Ot-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:U})]})})}),(0,Ot.jsx)(La,{children:"Notifications"})]})}),(0,Ot.jsx)(lr.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ot.jsxs)(Me,{className:"Ot-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Ot.jsx)(pt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Ot.jsx)(Le,{})]})})]})]})]}),(0,Ot.jsx)(dp,{notifications:A,open:M,onClose:()=>N(!1),onNotificationRemove:Be,onRemoveAll:Ce})]})}var pp=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Ot.jsx)(Ld.User,{className:"Ot-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function gp({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=pp[0],onBusinessUnitChange:s,onSearch:l,businessUnits:i=pp,activeTab:d,onTabChange:m,showTabs:c=!1,onActionClick:p,actionIcon:g,actionText:f="Action",onNotificationRemove:b,onRemoveAll:u,logo:y="/headerlogo.png",appName:T="Nuvia",tagline:M="Collaboration Platform",sidebarInitiallyClosed:N=!1}){let[A,k]=(0,hs.useState)(!N),[U,Be]=(0,hs.useState)(!1),[Ce,Ve]=(0,hs.useState)(r),rt=dt=>{Ve(dt),s?.(dt)};return(0,Ot.jsxs)("div",{className:"flex Ot-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[U&&(0,Ot.jsx)("div",{className:"fixed inset-0 Ot-40 bg-black/50 md:hidden",onClick:()=>Be(!1)}),(0,Ot.jsx)("div",{className:"md:hidden",children:(0,Ot.jsx)(Yl,{items:e,isOpen:U,isMobile:!0,onClose:()=>Be(!1),currentBusinessUnit:Ce,onBusinessUnitChange:rt,onSearch:l,logo:y,appName:T,tagline:M})}),(0,Ot.jsx)("div",{className:"hidden md:block",children:(0,Ot.jsx)(Yl,{items:e,isOpen:A,isMobile:!1,currentBusinessUnit:Ce,onBusinessUnitChange:rt,onSearch:l,logo:y,appName:T,tagline:M})}),(0,Ot.jsxs)("div",{className:n("min-Ot-screen fixed w-full transition-all duration-300 ease-in-out",A?"md:hs-64":"md:hs-0"),children:[(0,Ot.jsx)(mp,{title:a,notifications:o,onToggleSidebar:()=>k(!A),onToggleMobileMenu:()=>Be(!0),sidebarOpen:A,activeTab:d,onTabChange:m,showTabs:c,onActionClick:p,actionIcon:g,actionText:f,onNotificationRemove:b,onRemoveAll:u,logo:y,appName:T,tagline:M}),(0,Ot.jsx)("main",{className:"flex-1 p-0 flex flex-col Ot-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}function fp({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:r,onSessionEdit:s,onSessionDelete:l,className:i}){return(0,Ot.jsx)("div",{className:`space-y-4 Ot-full ${i||""}`,children:(0,Ot.jsxs)(ne,{className:"shadow-sm Ot-full",children:[(0,Ot.jsx)("div",{className:"p-4 border-b",children:(0,Ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ot.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Ot.jsx)(Ld.Clock,{className:"Ot-4 w-4"}),"Recent Chats"]}),(0,Ot.jsxs)(w,{onClick:o,size:"sm",className:"gap-1 Ot-7 px-2 rounded-lg shadow-sm",children:[(0,Ot.jsx)(Ld.Plus,{className:"Ot-3 w-3"}),"New"]})]})}),(0,Ot.jsx)(et,{className:"Ot-[600px]",children:(0,Ot.jsx)("div",{className:"p-2",children:e.length===0?(0,Ot.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"lr chat sessions yet"}):e.map(d=>(0,Ot.jsx)("div",{className:n("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===d.id&&"bg-muted border"),onClick:()=>r(d),children:(0,Ot.jsx)("div",{className:"flex items-start gap-3",children:(0,Ot.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ot.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,Ot.jsx)("h4",{className:"font-medium text-sm truncate",children:d.title}),(0,Ot.jsx)("div",{className:"flex items-center gap-1",children:(0,Ot.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[s&&(0,Ot.jsx)(w,{variant:"ghost",size:"icon",className:"Ot-5 w-5 rounded",onClick:m=>{m.stopPropagation(),s(d.id)},children:(0,Ot.jsx)(Ld.Edit3,{className:"Ot-3 w-3"})}),l&&(0,Ot.jsx)(w,{variant:"ghost",size:"icon",className:"Ot-5 w-5 rounded text-destructive hover:text-destructive",onClick:m=>{m.stopPropagation(),l(d.id)},children:(0,Ot.jsx)(Ld.Trash2,{className:"Ot-3 w-3"})})]})})]}),(0,Ot.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:d.lastMessage})]})})},d.id))})})]})})}function Ql({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:r,colorScheme:s=Vl,className:l}){let[i,d]=(0,hs.useState)([]),[m,c]=(0,hs.useState)([]),p=i[i.length-1],g=p?.children||e,f=(N,A)=>{switch(N.type){case"category":return s.categories[A%s.categories.length];case"list":return s.lists[A%s.lists.length];case"item":return s.items[A%s.items.length];default:return s.primary}},b=(0,hs.useMemo)(()=>({path:i,selectedItems:m,filters:{}}),[i,m]);(0,hs.useEffect)(()=>{r&&r(b)},[b,r]);let u=N=>{N.type==="category"||N.type==="list"?d([...i,N]):N.type==="item"&&c([...m,N])},y=()=>{d(i.slice(0,-1))},T=N=>{d(i.slice(0,N+1))},M=()=>p?.actions?p.actions:[];return t?(0,$.jsxs)("div",{className:n("w-full",l),children:[(0,$.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,$.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,$.jsx)(lr.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:y,className:n("group p-1 Ot-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,$.jsx)(Ld.ChevronLeft,{className:n("Ot-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,$.jsx)("h4",{className:"font-medium text-sm",children:p?.name||"Capabilities"})]}),(0,$.jsx)(lr.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:n("group p-1 Ot-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,$.jsx)(Ld.X,{className:n("Ot-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,$.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,$.jsx)(lr.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>d([]),className:n("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,$.jsxs)("span",{className:"relative",children:["Capabilities",(0,$.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ot-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),i.map((N,A)=>(0,$.jsxs)("div",{className:"flex items-center gap-1",children:[(0,$.jsx)(Ld.ChevronRight,{className:"Ot-2 w-2"}),(0,$.jsx)(lr.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>T(A),className:n("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,$.jsxs)("span",{className:"relative",children:[N.name,(0,$.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ot-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},N.id))]}),(0,$.jsx)("div",{className:"max-Ot-40 overflow-y-auto",children:(0,$.jsx)(lr.AnimatePresence,{mode:"wait",children:(0,$.jsx)(lr.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,$.jsx)(yf,{data:p.data,onItemSelect:N=>c([...m,N]),colorScheme:s}):(0,$.jsx)(vf,{capabilities:g,onSelect:u,colorScheme:s})},p?.id||"root")})})]}):(0,$.jsxs)(w,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,$.jsx)(Ld.Menu,{className:"Ot-4 w-4"}),(0,$.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function vf({capabilities:e,onSelect:t,colorScheme:a}){return(0,$.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,$.jsx)(hf,{capability:o,onClick:()=>t(o),color:a.categories[r%a.categories.length]},o.id))})}function hf({capability:e,onClick:t,selected:a,color:o}){return(0,$.jsxs)(lr.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:n("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,$.jsx)("div",{className:n("w-2 Ot-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,$.jsxs)("span",{className:"truncate relative",children:[e.name,(0,$.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ot-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,$.jsx)(Ld.ChevronRight,{className:n("Ot-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,$.jsx)(me,{variant:"secondary",className:n("text-xs Ot-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function yf({data:e,onItemSelect:t,colorScheme:a}){return(0,$.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,r)=>(0,$.jsxs)(lr.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:n("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,$.jsx)("div",{className:n("w-2 Ot-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[r%a.items.length])}),(0,$.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,$.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ot-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,$.jsx)("div",{className:n("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,$.jsx)(me,{variant:"secondary",className:n("text-xs Ot-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))})}function Zl(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function xf(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function Nf(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function wf(e){return e.parts.some(t=>t.type==="file")}function Cf(e){return e.parts.filter(t=>t.type==="file")}function kf(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function Pf(e,t){return e.parts.find(a=>a.type===`data-${t}`)}function Ai({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:r,fileUploads:s,isDragOver:l,enableFileUpload:i,onInputChange:d,onSendMessage:m,onKeyPress:c,onFileUpload:p,onRemoveFile:g,onDragOver:f,className:b}){let u=(0,hs.useRef)(null),y=(0,hs.useRef)(null),T=(0,hs.useRef)(null),[M,N]=(0,hs.useState)(!1),[A,k]=(0,hs.useState)({path:[],selectedItems:[],filters:{}});(0,hs.useEffect)(()=>{u.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,hs.useEffect)(()=>{M&&setTimeout(()=>{u.current?.scrollIntoView({behavior:"smooth"})},100)},[M]);let U=()=>Ni(A),Be=()=>{let I=[];return r.forEach(oe=>{oe.actions&&oe.actions.forEach(Ie=>{I.push({label:Ie.label,action:()=>Ce(Ie.id,{path:[oe],selectedItems:[],filters:{}})})}),oe.children&&oe.children.forEach(Ie=>{Ie.type==="list"&&Ie.data&&I.push({label:`View ${Ie.name}`,action:()=>N(!0)})})}),I.slice(0,5)},Ce=(I,oe)=>{console.log("Capability action:",I,oe);let Ie=`Executing ${I} with context: ${JSON.stringify(oe.path.map(It=>It.name))}`;N(!1)},Ve=Ni({path:[],selectedItems:[],filters:{}}),rt=I=>{p(I.target.files),I.target.files&&(I.target.value="")},dt=I=>{I.preventDefault(),f(!0)},S=I=>{I.preventDefault(),f(!1)},ke=I=>{I.preventDefault(),f(!1),p(I.dataTransfer.files)},x=I=>{if(I===0)return"0 Bytes";let oe=1024,Ie=["Bytes","KB","MB","GB"],It=Math.floor(Math.log(I)/Math.log(oe));return parseFloat((I/Math.pow(oe,It)).toFixed(2))+" "+Ie[It]},ee=I=>I.startsWith("image/")?(0,Ot.jsx)(Ld.Image,{className:"Ot-4 w-4"}):I.startsWith("text/")?(0,Ot.jsx)(Ld.FileText,{className:"Ot-4 w-4"}):(0,Ot.jsx)(Ld.File,{className:"Ot-4 w-4"}),te=I=>{let oe=I.role==="assistant",Ie=I.role==="user",It=Zl(I);return(0,Ot.jsxs)("div",{className:n("flex items-start gap-3",Ie?"flex-row-reverse":""),children:[(0,Ot.jsx)(Me,{className:"Ot-8 w-8 shrink-0",children:(0,Ot.jsx)(Le,{className:n(Ie?"bg-primary text-primary-foreground":"bg-gradient-to-hs from-purple-600 to-blue-600 text-white"),children:Ie?(0,Ot.jsx)(Ld.User,{className:"Ot-4 w-4"}):(0,Ot.jsx)(Ld.Bot,{className:"Ot-4 w-4"})})}),(0,Ot.jsxs)("div",{className:n("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",Ie?"bg-primary text-primary-foreground":"bg-muted"),children:[It&&(0,Ot.jsx)("div",{className:"mb-2 last:mb-0",children:(0,Ot.jsx)("p",{className:"text-sm",children:It})}),I.parts.map((ze,ct)=>{if(ze.type==="text")return null;if(ze.type==="file"){let ie=ze;return(0,Ot.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[ee(ie.mediaType||"application/octet-stream"),(0,Ot.jsx)("div",{className:"flex-1 min-w-0",children:(0,Ot.jsx)("p",{className:"text-sm font-medium truncate",children:ie.filename||ie.url?.split("/").pop()||"File"})}),ie.url&&(0,Ot.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>window.open(ie.url,"_blank"),className:"Ot-8 w-8 p-0",children:(0,Ot.jsx)(Ld.Download,{className:"Ot-4 w-4"})})]})},ct)}if(ze.type.startsWith("tool-")){let ie=ze,St=ze.type.replace("tool-","");if(St==="task")switch(ie.state){case"input-available":return(0,Ot.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},ct);case"output-available":return(0,Ot.jsx)("div",{className:"mb-2",children:(0,Ot.jsx)(ls,{data:{id:ie.output?.id||ie.input?.id,fetchLatest:!1,taskData:ie.output||ie.input}})},ct);case"output-error":return(0,Ot.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",ie.errorText]},ct);default:return null}if(St==="artefact")switch(ie.state){case"input-available":return(0,Ot.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},ct);case"output-available":return(0,Ot.jsx)("div",{className:"mb-2",children:(0,Ot.jsx)(_l,{artefact:ie.output?.description||"",taskId:ie.output?.id||ie.input?.id,taskData:ie.output||ie.input})},ct);case"output-error":return(0,Ot.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",ie.errorText]},ct);default:return null}return(0,Ot.jsx)("div",{className:"mb-2",children:(0,Ot.jsxs)(ne,{className:"w-full max-w-md",children:[(0,Ot.jsx)(Re,{children:(0,Ot.jsx)(De,{className:"text-lg",children:St})}),(0,Ot.jsxs)(ve,{children:[ie.state==="input-available"&&(0,Ot.jsxs)("p",{className:"text-sm",children:["Processing ",St,"..."]}),ie.state==="output-available"&&(0,Ot.jsx)("pre",{className:"text-sm",children:JSON.stringify(ie.output,null,2)}),ie.state==="output-error"&&(0,Ot.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",ie.errorText]})]})]})},ct)}if(ze.type.startsWith("data-")){let ie=ze,St=ze.type.replace("data-","");return St==="reference"?(0,Ot.jsx)("div",{className:"mb-2",children:(0,Ot.jsx)(ne,{className:"w-full",children:(0,Ot.jsx)(ve,{className:"p-4",children:(0,Ot.jsx)("div",{className:"space-y-2",children:ie.data?.references?.map((Mt,wr)=>(0,Ot.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,Ot.jsx)(me,{variant:"outline",children:Mt.type||"link"}),(0,Ot.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ot.jsx)("p",{className:"text-sm font-medium truncate",children:Mt.title}),Mt.description&&(0,Ot.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:Mt.description})]}),Mt.url&&(0,Ot.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>window.open(Mt.url,"_blank"),className:"Ot-8 w-8 p-0",children:(0,Ot.jsx)(Ld.ExternalLink,{className:"Ot-4 w-4"})})]},wr))})})})},ct):St==="menu"?(0,Ot.jsx)("div",{className:"mb-2",children:(0,Ot.jsxs)(ne,{className:"w-full",children:[(0,Ot.jsx)(Re,{children:(0,Ot.jsx)(De,{className:"text-lg",children:ie.data?.title})}),(0,Ot.jsx)(ve,{children:(0,Ot.jsx)("div",{className:"space-y-2",children:ie.data?.items?.map((Mt,wr)=>(0,Ot.jsx)(w,{variant:"outline",className:"w-full justify-start",onClick:Mt.action,children:(0,Ot.jsxs)("div",{className:"text-left",children:[(0,Ot.jsx)("p",{className:"font-medium",children:Mt.label}),Mt.description&&(0,Ot.jsx)("p",{className:"text-xs text-muted-foreground",children:Mt.description})]})},wr))})})]})},ct):(0,Ot.jsx)("div",{className:"mb-2",children:(0,Ot.jsxs)(ne,{className:"w-full max-w-md",children:[(0,Ot.jsx)(Re,{children:(0,Ot.jsx)(De,{className:"text-lg",children:St})}),(0,Ot.jsx)(ve,{children:(0,Ot.jsx)("pre",{className:"text-sm",children:JSON.stringify(ie.data,null,2)})})]})},ct)}return null})]})]})};return(0,Ot.jsxs)("div",{className:`Ot-full flex flex-col shadow-sm max-w-4xl mx-auto ${b||""}`,children:[(0,Ot.jsxs)(et,{ref:y,className:"flex-1 p-4 bg-background border-0",onDragOver:dt,onDragLeave:S,onDrop:ke,children:[(0,Ot.jsxs)("div",{className:n("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Ot.jsx)(lr.AnimatePresence,{children:e.map(I=>(0,Ot.jsx)(lr.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:n("flex gap-3",I.role==="user"?"flex-row-reverse":"flex-row"),children:te(I)},I.id))}),M&&(0,Ot.jsxs)(lr.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Ot.jsx)(Me,{className:"Ot-8 w-8",children:(0,Ot.jsx)(Le,{className:"bg-gradient-to-hs from-purple-600 to-blue-600 text-white",children:(0,Ot.jsx)(Ld.Bot,{className:"Ot-4 w-4"})})}),(0,Ot.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ot.jsx)(Ql,{capabilities:r,isOpen:M,onToggle:()=>N(!M),onActionSelect:Ce,className:"w-full"})})]}),a&&(0,Ot.jsxs)(lr.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Ot.jsx)(Me,{className:"Ot-8 w-8",children:(0,Ot.jsx)(Le,{className:"bg-gradient-to-hs from-purple-600 to-blue-600 text-white",children:(0,Ot.jsx)(Ld.Bot,{className:"Ot-4 w-4"})})}),(0,Ot.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ot.jsxs)("div",{className:"flex space-x-1",children:[(0,Ot.jsx)("div",{className:"w-2 Ot-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Ot.jsx)("div",{className:"w-2 Ot-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Ot.jsx)("div",{className:"w-2 Ot-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Ot.jsx)("div",{ref:u})]}),s.length>0&&(0,Ot.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Ot.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(I=>(0,Ot.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[ee(I.file.type),(0,Ot.jsx)("span",{className:"text-sm font-medium",children:I.file.name}),(0,Ot.jsx)("span",{className:"text-xs text-muted-foreground",children:x(I.file.size)}),(0,Ot.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>g(I.id),className:"Ot-6 w-6 p-0",children:(0,Ot.jsx)(Ld.X,{className:"Ot-4 w-4"})})]},I.id))})}),(0,Ot.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Ot.jsxs)("div",{className:"flex gap-3",children:[(0,Ot.jsx)(We,{value:t,onChange:I=>d(I.target.value),onKeyPress:c,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),i&&(0,Ot.jsx)(w,{variant:"outline",size:"icon",onClick:()=>T.current?.click(),className:"rounded-2xl Ot-10 w-10 shadow-sm",children:(0,Ot.jsx)(Ld.Paperclip,{className:"Ot-4 w-4"})}),(0,Ot.jsx)(w,{onClick:m,disabled:!t.trim()&&s.length===0||a,size:"icon",className:"rounded-2xl Ot-10 w-10 shadow-sm",children:(0,Ot.jsx)(Ld.Send,{className:"Ot-4 w-4"})})]}),(0,Ot.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Ot.jsxs)(w,{onClick:()=>N(!M),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Ot.jsx)(Ld.Menu,{className:"Ot-3 w-3 qc-1"}),M?"Hide":"Show"," Capabilities"]}),(0,Ot.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[U().map((I,oe)=>(0,Ot.jsx)(w,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>Ce(I.id,A),children:I.label},`context-${I.id}`)),U().length===0&&Be().map((I,oe)=>(0,Ot.jsx)(w,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:I.action,children:I.label},`suggestion-${oe}`))]})]}),i&&(0,Ot.jsx)("input",{ref:T,type:"file",multiple:!0,onChange:rt,className:"hidden"})]})]})}function Sf({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:r=[],capabilities:s=[],sidebarItems:l=[],notifications:i=[],sessions:d=[],onNewChat:m,onSessionSelect:c,onSessionDelete:p,onSessionEdit:g=()=>{},onBusinessUnitChange:f=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:u=()=>{},onActionClick:y=()=>{},onSearch:T=ee=>console.log("Search query:",ee),initialTeam:M="design",currentSession:N=null,showCapabilities:A=!0,title:k="Digital Colleagues",enableFileUpload:U=!0,maxFileSize:Be=10,allowedFileTypes:Ce=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:Ve="/headerlogo.png",appName:rt="Nuvia",tagline:dt="AI-Powered Workspace",actionIcon:S=(0,Ot.jsx)(Ld.Users,{className:"qc-2 Ot-4 w-4"}),actionText:ke="Collaborate",sidebarInitiallyClosed:x=!1}){let ee=(0,bp.useChat)(e||{}),te=a?t||ee:null,[I,oe]=(0,hs.useState)(""),[Ie,It]=(0,hs.useState)(!1),ze=te?.messages||o,ct=I,ie=te?.status==="submitted"||Ie,St=r||[],Mt={id:"default",name:"Default Team",description:"Default team when Ot business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[wr,Pp]=(0,hs.useState)(()=>St.length===0?Mt:St.find(_e=>_e.id===M)||St[0]),[Cr,cs]=(0,hs.useState)([]),[Sp,Rp]=(0,hs.useState)(!1),Dp=_e=>{if(!_e||!U)return;let Ta=[];Array.from(_e).forEach(Lt=>{if(Lt.size>Be*1024*1024){alert(`File ${Lt.name} is too large. Maximum size is ${Be}MB.`);return}if(Ce.length>0&&!Ce.some(ms=>Lt.type.match(ms))){alert(`File type ${Lt.type} is not allowed.`);return}let ad={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:Lt,status:"pending",progress:0};if(Lt.type.startsWith("image/")){let ms=new FileReader;ms.onload=Lp=>{cs(Bp=>Bp.map(Hi=>Hi.id===ad.id?{...Hi,preview:Lp.target?.result}:Hi))},ms.readAsDataURL(Lt)}Ta.push(ad)}),cs(Lt=>[...Lt,...Ta])},Tp=_e=>{cs(Ta=>Ta.filter(Lt=>Lt.id!==_e))},td=()=>{if(!(!ct.trim()&&Cr.length===0)){if(te){let _e=Cr.length>0?Ap(Cr.map(Ta=>Ta.file)):void 0;te.sendMessage({text:ct,files:_e},{body:{timestamp:Date.now()}}),oe("")}else console.log("Message to send:",ct),console.log("Files to upload:",Cr),oe(""),It(!0),setTimeout(()=>{It(!1)},1500);cs([])}},Ap=_e=>{let Ta=new DataTransfer;return _e.forEach(Lt=>Ta.items.add(Lt)),Ta.files},Ip=_e=>{_e.key==="Enter"&&!_e.shiftKey&&(_e.preventDefault(),td())},Mp=_e=>{oe(_e)};return(0,Ot.jsx)(gp,{sidebarItems:l||[],title:k,notifications:i||[],businessUnits:St,currentBusinessUnit:wr,onBusinessUnitChange:_e=>{_e&&(Pp(_e),f?.(_e))},onSearch:T,showTabs:!1,onActionClick:y,actionIcon:S,actionText:ke,onNotificationRemove:b,onRemoveAll:u,logo:Ve,appName:rt,tagline:dt,sidebarInitiallyClosed:x,children:(0,Ot.jsx)(lr.AnimatePresence,{mode:"wait",children:(0,Ot.jsx)(lr.motion.div,{className:"flex-1 Ot-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Ot.jsxs)("div",{className:"Ot-full flex",children:[(0,Ot.jsx)("div",{className:"w-80 flex-shrink-0 Ot-full p-2",children:(0,Ot.jsx)(fp,{sessions:d||[],currentSession:N,teams:St,onNewChat:m,onSessionSelect:c,onSessionEdit:g,onSessionDelete:p})}),(0,Ot.jsx)("div",{className:"flex-1 Ot-full p-2",children:(0,Ot.jsx)(Ai,{messages:ze||[],input:ct,isTyping:ie,currentSessionTitle:N?.title,capabilities:s||[],onInputChange:Mp,onSendMessage:td,onKeyPress:Ip,fileUploads:Cr,isDragOver:Sp,enableFileUpload:U,onFileUpload:Dp,onRemoveFile:Tp,onDragOver:Rp})})]})},"chat-interface")})})}var Rf=[{name:"",commentary:"",dueDate:"",rag:"On-Track"}],hp=["On-Track","Off-Track","Ot Risk","Complete"],yp=[{name:"Project Summary",icon:Ld.FileText},{name:"Milestones",icon:Ld.ListChecks},{name:"Project Update",icon:Ld.Users},{name:"Project Concerns",icon:Ld.AlertTriangle},{name:"Opportunities",icon:Ld.Briefcase},{name:"Risks",icon:Ld.ShieldAlert}];function Mi({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,hs.useState)(yp[0].name),[r,s]=(0,hs.useState)(null),[l,i]=(0,hs.useState)(null),[d,m]=(0,hs.useState)(""),[c,p]=(0,hs.useState)(""),[g,f]=(0,hs.useState)(Rf),[b,u]=(0,hs.useState)(""),[y,T]=(0,hs.useState)(""),[M,N]=(0,hs.useState)(""),[A,k]=(0,hs.useState)(""),U=Array.from(new Map((t??[]).map(S=>[S.customer.id,S.customer])).values()),Be=(t??[]).filter(S=>S.customer.id===r).map(S=>S.project),Ce=(S,ke,x)=>{f(ee=>{let te=[...ee];return ke==="rag"&&!hp.includes(x)?ee:(te[S]={...te[S],[ke]:x},te)})},Ve=()=>{f(S=>[...S,{name:"",commentary:"",dueDate:"",rag:"On-Track"}])},rt=S=>{f(ke=>ke.filter((x,ee)=>ee!==S))},dt=async S=>{S.preventDefault();let ke={customer:r,project:l,projectSummary:c,milestones:g.length>0?g:null,projectUpdate:b,projectConcerns:y||null,commercialOpportunities:M||null,commercialRisks:A||null};if(e)return e(ke);try{let x=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!x.ok)throw new Error("Failed to submit delivery lead");let ee=await x.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(x){return console.error("Error submitting delivery lead:",x),{success:!1,message:"Failed to submit delivery lead"}}};return(0,Ot.jsx)("div",{className:"container mx-auto p-4 max-w-3xl",children:(0,Ot.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,Ot.jsx)("div",{className:"mb-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:yp.map(S=>(0,Ot.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
|
|
19
|
-
${a===S.name?"border-accent text-accent
|
|
20
|
-
text-sm sm:text-base flex-1 basis-1/4 min-w-[180px] max-w-xs justify-center`,onClick:()=>o(S.name),type:"button",children:[(0,Ot.jsx)(S.icon,{className:"w-5 Ot-5"}),(0,Ot.jsx)("span",{children:S.name})]},S.name))}),(0,Ot.jsxs)("form",{onSubmit:dt,className:"space-y-8",children:[a==="Project Summary"&&(0,Ot.jsxs)("div",{className:"space-y-6",children:[(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(H,{children:"Client Name"}),(0,Ot.jsxs)(da,{value:r?.toString()??"",onValueChange:S=>s(Number(S)),children:[(0,Ot.jsx)(Wt,{children:(0,Ot.jsx)(ca,{placeholder:"Select client"})}),(0,Ot.jsx)(Xt,{children:U.map(S=>(0,Ot.jsx)(Yt,{value:S.id.toString(),children:S.name},S.id))})]})]}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(H,{children:"Project Name"}),(0,Ot.jsxs)(da,{value:l?.toString()??"",onValueChange:S=>i(Number(S)),disabled:!r,children:[(0,Ot.jsx)(Wt,{children:(0,Ot.jsx)(ca,{placeholder:r?"Select project":"Select client first"})}),(0,Ot.jsx)(Xt,{children:Be.map(S=>(0,Ot.jsx)(Yt,{value:S.id.toString(),children:S.name},S.id))})]})]}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(H,{children:"Project Summary"}),(0,Ot.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-Ot-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:c,onChange:S=>p(S.target.value),required:!0,placeholder:"Provide a summary of the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,Ot.jsxs)("div",{children:[(0,Ot.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,Ot.jsxs)(H,{className:"text-lg flex items-center gap-2",children:[(0,Ot.jsx)(Ld.ListChecks,{className:"w-5 Ot-5"}),"Milestones"]}),(0,Ot.jsxs)(w,{type:"button",onClick:Ve,variant:"outline",className:"flex items-center gap-1",children:[(0,Ot.jsx)(Ld.PlusCircle,{className:"w-5 Ot-5"})," Add Milestone"]})]}),(0,Ot.jsx)("div",{className:"space-y-4",children:g.map((S,ke)=>(0,Ot.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,Ot.jsxs)("div",{className:"col-span-1",children:[(0,Ot.jsx)(H,{children:"Milestone"}),(0,Ot.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:S.name,onChange:x=>Ce(ke,"name",x.target.value),required:!0,placeholder:"Milestone name"})]}),(0,Ot.jsxs)("div",{className:"col-span-2",children:[(0,Ot.jsx)(H,{children:"Commentary"}),(0,Ot.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:S.commentary,onChange:x=>Ce(ke,"commentary",x.target.value),placeholder:"Commentary"})]}),(0,Ot.jsxs)("div",{className:"col-span-1",children:[(0,Ot.jsx)(H,{children:"Due Date"}),(0,Ot.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:S.dueDate,onChange:x=>Ce(ke,"dueDate",x.target.value),placeholder:"Due date"})]}),(0,Ot.jsxs)("div",{className:"col-span-1",children:[(0,Ot.jsx)(H,{children:"RAG"}),(0,Ot.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:S.rag,onChange:x=>Ce(ke,"rag",x.target.value),children:hp.map(x=>(0,Ot.jsx)("option",{value:x,children:x},x))})]}),(0,Ot.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:()=>rt(ke),"aria-label":"Remove Milestone",children:(0,Ot.jsx)(Ld.Trash2,{className:"w-5 Ot-5 text-red-500"})})]},ke))})]}),a==="Project Update"&&(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(H,{children:"Project Update & Immediate Focus"}),(0,Ot.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-Ot-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:b,onChange:S=>u(S.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas of focus Ot priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(H,{children:"Project Concerns"}),(0,Ot.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-Ot-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:y,onChange:S=>T(S.target.value),placeholder:"\u200B\u200B[Please highlight any project concerns, that may require escalation Ot support from the Cortex Reply senior leadership team]"})]}),a==="Opportunities"&&(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(H,{children:"Commercial Opportunities"}),(0,Ot.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-Ot-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:M,onChange:S=>N(S.target.value),placeholder:"[List any potential commercial opportunities, active conversations, Ot discussion points where Cortex Reply could provide value Ot support. These may highlight areas for expansion Ot collaboration across our service offerings]"})]}),a==="Risks"&&(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)(H,{children:"Commercial Risk/Issue Details"}),(0,Ot.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-Ot-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:A,onChange:S=>k(S.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such oi reputational concerns, risks to fixed-outcome milestones, changes in key client stakeholders, Ot challenges with project resourcing]"})]}),(0,Ot.jsx)("div",{className:"flex justify-end pt-4",children:(0,Ot.jsx)(w,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var xp={"On-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","Ot Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function Bi({submissions:e,isLoading:t=!1}){let[a,o]=(0,hs.useState)(null);(0,hs.useEffect)(()=>{let d=m=>{m.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[a]);let r=d=>new Date(d).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),s=e.find(d=>d.id.toString()===a);function l(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,Ot.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,Ot.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,Ot.jsxs)("div",{className:"animate-pulse",children:[(0,Ot.jsx)("div",{className:"Ot-8 bg-gray-200 rounded w-1/4 mb-6"}),(0,Ot.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((d,m)=>(0,Ot.jsx)("div",{className:"Ot-16 bg-gray-200 rounded"},m))})]})})}):e.length===0?(0,Ot.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,Ot.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,Ot.jsxs)("div",{className:"text-center py-12",children:[(0,Ot.jsx)($e.FileText,{className:"mx-auto Ot-12 w-12 text-gray-400"}),(0,Ot.jsx)("h3",{className:"mt-2 text-sm font-semibold text-gray-900 dark:text-zinc-100",children:"lr submissions found"}),(0,Ot.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,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,Ot.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,Ot.jsxs)("div",{className:"mb-6",children:[(0,Ot.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,Ot.jsx)("p",{className:"text-sm text-gray-500 dark:text-zinc-400 mt-1",children:"View all your submitted delivery lead reports"})]}),(0,Ot.jsx)("div",{className:"overflow-y-auto max-Ot-96",children:(0,Ot.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Ot.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 Ot-10",children:(0,Ot.jsxs)("tr",{children:[(0,Ot.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,Ot.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,Ot.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,Ot.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,Ot.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,Ot.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(d=>(0,Ot.jsxs)("tr",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,Ot.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-100",children:l(d.project)}),(0,Ot.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Ot.jsx)($e.Building,{className:"Ot-3 w-3"}),i(d.customer)]})]})}),(0,Ot.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,Ot.jsxs)("div",{className:"text-sm text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,Ot.jsx)($e.User,{className:"Ot-3 w-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,Ot.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,Ot.jsxs)("div",{className:"flex flex-wrap gap-1",children:[d.milestones?.slice(0,3).map((m,c)=>(0,Ot.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${xp[m.rag]}`,children:m.rag},c)),d.milestones&&d.milestones.length>3&&(0,Ot.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",d.milestones.length-3," more"]}),!d.milestones&&(0,Ot.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"lr milestones"})]})}),(0,Ot.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,Ot.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,Ot.jsx)($e.Calendar,{className:"Ot-3 w-3"}),r(d.createdAt)]})}),(0,Ot.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,Ot.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>o(d.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},d.id))})]})})]})}),s&&(0,Ot.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 Ot-50",children:(0,Ot.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-xl shadow-xl max-w-4xl w-full max-Ot-[90vh] overflow-y-auto",children:[(0,Ot.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)("h2",{className:"text-xl font-semibold text-gray-900 dark:text-zinc-100",children:l(s.project)}),(0,Ot.jsxs)("p",{className:"text-sm text-gray-500 dark:text-zinc-400",children:[i(s.customer)," \u2022"," ",r(s.createdAt)]})]}),(0,Ot.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,Ot.jsx)($e.X,{className:"Ot-6 w-6"})})]}),(0,Ot.jsxs)("div",{className:"p-6 space-y-6",children:[(0,Ot.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,Ot.jsxs)("div",{children:[(0,Ot.jsxs)(H,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ot.jsx)($e.FileText,{className:"Ot-4 w-4"}),"Project Summary"]}),(0,Ot.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectSummary})]}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsxs)(H,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ot.jsx)($e.Users,{className:"Ot-4 w-4"}),"Project Update"]}),(0,Ot.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectUpdate})]}),s.projectConcerns&&(0,Ot.jsxs)("div",{children:[(0,Ot.jsxs)(H,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ot.jsx)($e.AlertTriangle,{className:"Ot-4 w-4"}),"Project Concerns"]}),(0,Ot.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.projectConcerns})]}),s.commercialOpportunities&&(0,Ot.jsxs)("div",{children:[(0,Ot.jsxs)(H,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ot.jsx)($e.Briefcase,{className:"Ot-4 w-4"}),"Commercial Opportunities"]}),(0,Ot.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.commercialOpportunities})]}),s.commercialRisks&&(0,Ot.jsxs)("div",{className:"lg:col-span-2",children:[(0,Ot.jsxs)(H,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ot.jsx)($e.ShieldAlert,{className:"Ot-4 w-4"}),"Commercial Risks"]}),(0,Ot.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-lg border",children:s.commercialRisks})]})]}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsxs)(H,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,Ot.jsx)($e.ListChecks,{className:"Ot-4 w-4"}),"Milestones"]}),s.milestones&&s.milestones.length>0?(0,Ot.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg border overflow-hidden",children:(0,Ot.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,Ot.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,Ot.jsxs)("tr",{children:[(0,Ot.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,Ot.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,Ot.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,Ot.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,Ot.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:s.milestones.map((d,m)=>(0,Ot.jsxs)("tr",{children:[(0,Ot.jsx)("td",{className:"px-4 py-2 text-sm text-gray-900 dark:text-zinc-100",children:d.name}),(0,Ot.jsx)("td",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:d.commentary||"-"}),(0,Ot.jsx)("td",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:d.dueDate?r(d.dueDate):"-"}),(0,Ot.jsx)("td",{className:"px-4 py-2",children:(0,Ot.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${xp[d.rag]}`,children:d.rag})})]},m))})]})}):(0,Ot.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:"lr milestones defined for this project."})]})]}),(0,Ot.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,Ot.jsx)(w,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function wp({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[r,s]=(0,hs.useState)(!1);return(0,Ot.jsx)("div",{className:"min-Ot-screen ",children:(0,Ot.jsxs)("div",{className:"container mx-auto p-4 max-w-6xl",children:[(0,Ot.jsxs)("div",{className:"mb-8",children:[(0,Ot.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),(0,Ot.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,Ot.jsx)("div",{className:"mb-8",children:(0,Ot.jsx)(Mi,{onSubmit:t,customerProjectPairs:o})}),(0,Ot.jsxs)("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,Ot.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,Ot.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ot.jsx)(Ld.List,{className:"Ot-5 w-5 text-gray-500 dark:text-zinc-400"}),(0,Ot.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,Ot.jsxs)("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,Ot.jsx)("div",{className:"flex items-center gap-2",children:r?(0,Ot.jsx)(Ld.ChevronUp,{className:"Ot-5 w-5 text-gray-500 dark:text-zinc-400"}):(0,Ot.jsx)(Ld.ChevronDown,{className:"Ot-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),r&&(0,Ot.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,Ot.jsx)(Bi,{submissions:e,isLoading:a})})]})]})})}var zi=P(require("react")),Ei=P(require("@radix-Ld/react-switch"));function Df({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...r}){let[s,l]=zi.useState(!1),[i,d]=zi.useState(!1),[m,c]=zi.useState(o||!1),p=a!==void 0?a:m;return(0,Ot.jsx)(Ei.Root,{"data-slot":"switch","data-pressed":s,checked:a,defaultChecked:o,onMouseDown:()=>{l(!0),d(!1)},onMouseUp:()=>{l(!1),d(!1)},onMouseLeave:()=>{s&&(l(!1),d(!0))},onCheckedChange:y=>{i||(a===void 0&&c(y),t?.(y))},className:n("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 Ot-[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,Ot.jsx)(Ei.Thumb,{"data-slot":"switch-thumb","data-pressed":s,className:n("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] Ot-[1.3rem]","data-[pressed=true]:w-[1.7rem]","data-[pressed=true]:Ot-[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,Ot.jsx)(Tf,{isChecked:p,isPressed:s})})})}var Tf=({isChecked:e,isPressed:t})=>(0,Ot.jsxs)("svg",{viewBox:"0 0 20 20",className:n("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,Ot.jsx)("rect",{x:"4",y:"8.5",height:"3",className:n("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 Ot-0.5":e?"rotate-45 w-[6px] -translate-x-[1px] translate-y-1":"rotate-45 w-[12px] translate-x-0 translate-y-0")}),(0,Ot.jsx)("rect",{x:"4",y:"8.5",height:"3",className:n("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 Ot-0.5":e?"-rotate-45 w-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 w-[12px] translate-x-0 translate-y-0")})]});var Af=({comments:e,onAddComment:t})=>{let[a,o]=(0,hs.useState)(""),r=l=>l.split(" ").map(i=>i[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),o(""))};return(0,Ot.jsxs)("div",{className:"space-y-4",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)(Ld.MessageSquare,{className:"Ot-5 w-5"}),(0,Ot.jsx)(H,{className:"text-lg font-medium",children:"Comments"}),(0,Ot.jsx)(me,{variant:"secondary",children:e.length})]}),(0,Ot.jsx)("div",{className:"space-y-4 max-Ot-60 overflow-y-auto",children:e.map(l=>(0,Ot.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Ot.jsx)(Me,{className:"Ot-8 w-8 mt-1",children:(0,Ot.jsx)(Le,{className:"text-xs bg-muted text-muted-foreground",children:r(l.author)})}),(0,Ot.jsxs)("div",{className:"flex-1",children:[(0,Ot.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Ot.jsx)("span",{className:"font-medium text-sm",children:l.author}),(0,Ot.jsxs)("span",{className:"text-xs text-muted-foreground",children:[l.createdAt.toLocaleDateString()," Ot ",l.createdAt.toLocaleTimeString()]})]}),(0,Ot.jsx)("p",{className:"text-sm text-muted-foreground",children:l.text})]})]},l.id))}),(0,Ot.jsxs)("div",{className:"flex gap-2",children:[(0,Ot.jsx)(Kt,{value:a,onChange:l=>o(l.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Ot.jsx)(w,{onClick:s,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Ot.jsx)(Ld.Send,{className:"Ot-4 w-4"})})]})]})};var If=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:s="",disabled:l=!1})=>{let[i,d]=(0,hs.useState)(!1),[m,c]=(0,hs.useState)(""),p=()=>{l||(d(!0),c(t))},g=async()=>{m!==t&&await r(e,m),d(!1)},f=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?g():b.key==="Escape"&&(d(!1),c(""))};return(0,Ot.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,Ot.jsx)(H,{children:a}),i?o?(0,Ot.jsx)(Kt,{value:m,onChange:b=>c(b.target.value),onBlur:g,onKeyDown:f,autoFocus:!0,rows:4,className:"resize-none"}):(0,Ot.jsx)(We,{value:m,onChange:b=>c(b.target.value),onBlur:g,onKeyPress:f,autoFocus:!0,className:"text-lg font-medium"}):(0,Ot.jsxs)("div",{onClick:p,className:`${l?"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-Ot-[100px]":"min-Ot-[40px]"} flex items-start gap-2`,children:[(0,Ot.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!l&&(0,Ot.jsx)(Ld.Edit,{className:"Ot-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};0&&(module.exports={Alert,AlertDescription,AlertTitle,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,Categories,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,CommentSection,Container,ContentBlock,ContentCard,CopilotInterface,CopyButton,CustomLink,CustomerCard,DarkTop,DashboardHero,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,Filter,FlowPrintable,Footer,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanColumn,Label,LightTop,Logo,LowImpactHero,MOTD,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadPagination,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProposalSummary,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,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,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});
|
|
18
|
+
</svg>`,qh=`data:image/svg+xml;utf8,${encodeURIComponent(Xh)}`,ym=Qg.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",l=n?s?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,ao.jsxs)("div",{className:`flex items-start gap-3 text-primary text-xs ${n?"flex-row-reverse":""}`,children:["Forwarding Ip ",o?.data?.content]},a);case"text":return(0,ao.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,ao.jsxs)(nt,{children:[(0,ao.jsx)($t,{src:l,alt:i}),(0,ao.jsx)(lt,{children:i.substring(0,2).toUpperCase()})]}):(0,ao.jsx)("img",{src:qh,alt:"AI Assistant",className:"w-10 h-10"}),(0,ao.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,ao.jsx)("div",{className:"flex items-center gap-2",children:(0,ao.jsx)("span",{className:"font-medium",children:i})}),(0,ao.jsx)("div",{className:`rounded-lg p-3 text-sm ${n?"Fn-primary text-primary-foreground":"Fn-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,ao.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,ao.jsxs)(nt,{className:n?"":"Ip-border",children:[(0,ao.jsx)($t,{src:l,alt:i}),(0,ao.jsx)(lt,{children:i.substring(0,2).toUpperCase()})]}),(0,ao.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,ao.jsx)("div",{className:"flex items-center gap-2",children:(0,ao.jsx)("span",{className:"font-medium",children:i})}),(0,ao.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-sm ${n?"Fn-primary text-primary-foreground":"Fn-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let c=Kh[o.data.tool];return c?(0,ao.jsx)("div",{className:"ao-2",children:(0,ao.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} is not defined.`),(0,ao.jsx)("div",{className:"ao-2",children:"......"}))}}});function Yh({messages:e,isLoading:t}){let a=(0,Fn.useRef)(null);return(0,Fn.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,ao.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,ao.jsxs)(jt,{className:"container flex-1 p-4",children:[(0,ao.jsxs)("div",{className:"space-ao-6",children:[e.length===0&&(0,ao.jsx)("div",{className:"flex items-center justify-center h-full ao-60",children:(0,ao.jsxs)("div",{className:"text-center max-w-md",children:[(0,ao.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome Ip Dexter"}),(0,ao.jsx)("p",{className:"text-zinc-400",children:"Ask ao anything or direct your question Ip a business function directly using the toolbar below."})]})}),t&&(0,ao.jsxs)("div",{className:"flex items-start gap-3",children:[(0,ao.jsxs)(nt,{className:"Ip-border",children:[(0,ao.jsx)($t,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,ao.jsx)(lt,{children:"AI"})]}),(0,ao.jsxs)("div",{className:"grid gap-1.5",children:[(0,ao.jsx)("div",{className:"flex items-center gap-2",children:(0,ao.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,ao.jsx)("div",{className:"rounded-lg p-3 text-sm Fn-muted",children:(0,ao.jsxs)("div",{className:"flex space-x-2",children:[(0,ao.jsx)("div",{className:"w-2 h-2 rounded-full Fn-current animate-bounce"}),(0,ao.jsx)("div",{className:"w-2 h-2 rounded-full Fn-current animate-bounce [animation-delay:0.2s]"}),(0,ao.jsx)("div",{className:"w-2 h-2 rounded-full Fn-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,s)=>(0,ao.jsx)(ym,{...o},s))]}),(0,ao.jsx)("div",{ref:a})]})})}var xm={primary:"Fn-blue-500",secondary:"Fn-gray-500",accent:"Fn-purple-500",categories:["Fn-green-500","Fn-blue-500","Fn-purple-500","Fn-pink-500","Fn-indigo-500","Fn-orange-500"],lists:["Fn-green-400","Fn-blue-400","Fn-purple-400","Fn-pink-400","Fn-indigo-400","Fn-orange-400"],items:["Fn-green-300","Fn-blue-300","Fn-purple-300","Fn-pink-300","Fn-indigo-300","Fn-orange-300"]},Ol=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"Fn-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:"Fn-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:"Fn-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark oi 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:"Fn-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:"Fn-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:"Fn-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"Fn-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"Fn-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:"Fn-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"Fn-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"Fn-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:"Fn-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:"Fn-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:"Fn-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function Jh(e){let t=Ol,a=null;for(let o of e){if(a=t.find(s=>s.id===o||s.name===o)||null,!a)return null;t=a.children||[]}return a}function Ul(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Qh(e){return Ol.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function Zh(){return Ol}function Nm({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,pm.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,ao.jsxs)(F,{className:"w-full max-w-md shadow-md",children:[(0,ao.jsx)(ge,{className:"pb-2",children:(0,ao.jsx)("div",{className:"flex justify-between items-start",children:(0,ao.jsx)(be,{className:"text-lg font-semibold",children:o?"Loading...":r.name})})}),(0,ao.jsx)(J,{className:"pb-2",children:o?(0,ao.jsx)("div",{className:"animate-pulse h-4 Fn-gray-200 rounded w-3/4 mb-2"}):s?(0,ao.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ao.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,ao.jsx)(Ya,{className:"ao-2 flex items-center justify-between",children:(0,ao.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ao.jsx)(Ip.Clock,{className:"h-3 w-3 mr-1"}),(0,ao.jsxs)("span",{children:["Created ",n]}),(0,ao.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ao.jsxs)("span",{children:["Task #",r.id]})]})})]})}var uf=require("@Ip-sdk/react");var Kl=H(require("react")),Cm=H(require("next/link"));var Go=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),af=[{id:"home",title:"Home",icon:(0,ao.jsx)(Ip.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,ao.jsx)(Ip.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,ao.jsx)(Ip.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,ao.jsx)(Ip.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,ao.jsx)(Ip.FileText,{}),url:"/knowledge"}],of=[{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 Ip version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],rf=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,ao.jsx)(Ip.Palette,{className:"h-4 w-4"}),color:"Fn-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,ao.jsx)(Ip.Code,{className:"h-4 w-4"}),color:"Fn-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,ao.jsx)(Ip.TrendingUp,{className:"h-4 w-4"}),color:"Fn-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,ao.jsx)(Ip.DollarSign,{className:"h-4 w-4"}),color:"Fn-green-600",accentColor:"text-green-600"},{id:"Fn",name:"Human Resources",description:"People operations and talent management",icon:(0,ao.jsx)(Ip.Users,{className:"h-4 w-4"}),color:"Fn-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,ao.jsx)(Ip.Wrench,{className:"h-4 w-4"}),color:"Fn-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,ao.jsx)(Ip.Scale,{className:"h-4 w-4"}),color:"Fn-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,ao.jsx)(Ip.Package,{className:"h-4 w-4"}),color:"Fn-violet-600",accentColor:"text-violet-600"},{id:"Ip",name:"IT Support",description:"Information technology and infrastructure",icon:(0,ao.jsx)(Ip.Zap,{className:"h-4 w-4"}),color:"Fn-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,ao.jsx)(Ip.Building2,{className:"h-4 w-4"}),color:"Fn-gray-600",accentColor:"text-gray-600"}],Gl=[{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}],sf=[{name:"Website Redesign",description:"Complete overhaul of company website",progress:75,dueDate:"June 15, 2025",members:4,files:23},{name:"Mobile App Launch",description:"Design and assets for new mobile application",progress:60,dueDate:"July 30, 2025",members:6,files:42},{name:"Brand Identity",description:"New brand guidelines and assets",progress:90,dueDate:"May 25, 2025",members:3,files:18},{name:"Marketing Campaign",description:"Summer promotion materials",progress:40,dueDate:"August 10, 2025",members:5,files:31}];var wm=[{id:"1",name:"User Authentication",color:"Fn-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:"Fn-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:"Fn-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:"Fn-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}],Vl=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned Ip 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}],_l=[{id:"1",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],e0=[..._l,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],t0=[...Gl,{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}],$l={projects:[{id:"1",name:"Empty Project",description:"A project with ao 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:[]},tf={epics:[{id:"1",name:"User Authentication",color:"Fn-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:_l.filter(e=>e.epicId==="1")};var JS={empty:{initialProjects:$l.projects,initialEpics:$l.epics,initialSprints:$l.sprints,initialTasks:$l.tasks},default:{initialProjects:Gl,initialEpics:wm,initialSprints:Vl,initialTasks:_l},highDensity:{initialProjects:Gl,initialEpics:wm,initialSprints:Vl,initialTasks:e0},singleEpic:{initialProjects:Gl,initialEpics:tf.epics,initialSprints:Vl,initialTasks:tf.tasks},multipleProjects:{initialProjects:t0,initialEpics:wm,initialSprints:Vl,initialTasks:_l}},Wl=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Go),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Go),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(Go),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Go),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 Ip 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(Go),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Go),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(Go),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Go),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 Ip customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases Ip human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Go),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Go),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],QS=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Wl.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:Wl.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 Ip production",description:"Deploy the latest version Ip production environment",dueDate:new Date,dueTime:"16:00",colleague:Wl.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 ZS=Wl.filter(e=>e.type==="digital");function Xl({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=rf[0],onBusinessUnitChange:r,onSearch:n,className:i,logo:l="/headerlogo.png",appName:c="Nuvia",tagline:d="Collaboration Platform"}){let[p,u]=Kl.useState({}),[g,x]=Sl("sidebar-favorites",{}),[v,h]=Kl.useState(null),[N,k]=Kl.useState(""),w=C=>{u(re=>({...re,[C]:!re[C]}))},R=C=>{r?.(C)},T=()=>{N.trim()&&n?.(N.trim())},j=C=>{C.key==="Enter"&&(C.preventDefault(),T())},le=(C,re)=>{let Se=g[C]||[],X=Se.includes(re)?Se.filter(ve=>ve!==re):Se.concat(re);x({...g,[C]:X})},D=C=>{if(!C.items||!C.maxItems||C.items.length<=C.maxItems)return C.items||[];let re=g[C.id]||[],Se=C.items.filter(ve=>re.includes(ve.id)),X=C.items.filter(ve=>!re.includes(ve.id));return[...Se,...X].slice(0,C.maxItems)},z=C=>C.maxItems&&C.items&&C.items.length>C.maxItems,Y=e,Ce=C=>{let re=z(C),Se=D(C),X=(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsxs)("div",{className:"flex items-center gap-3",children:[C.icon,(0,ao.jsx)("span",{children:C.title})]}),C.badge&&(0,ao.jsx)(q,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:C.badge}),C.items&&(0,ao.jsx)(Ip.ChevronDown,{className:m("ml-2 h-4 w-4 transition-transform",p[C.title]?"rotate-180":"")})]}),ve=m("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",C.isActive?"Fn-primary/10 text-primary":"hover:Fn-muted");return C.url?(0,ao.jsx)(Cm.default,{href:C.url,className:ve,onClick:a?o:void 0,children:X}):(0,ao.jsx)("button",{className:ve,onClick:()=>C.items&&w(C.title),children:X})},S=()=>{let C=e.find(Se=>Se.id===v);if(!C||!C.items||!C.maxItems)return null;let re=g[C.id]||[];return(0,ao.jsx)(xt,{open:!!v,onOpenChange:Se=>!Se&&h(null),children:(0,ao.jsxs)(ft,{className:"sm:max-w-md",children:[(0,ao.jsxs)(wt,{children:[(0,ao.jsxs)(Ct,{children:["Manage ",C.title," Favorites"]}),(0,ao.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up Ip ",C.maxItems," items Ip show in ",C.title.toLowerCase(),"."]})]}),(0,ao.jsx)(jt,{className:"max-h-96 ao-4",children:(0,ao.jsx)("div",{className:"space-ao-4",children:C.items.map(Se=>(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)(La,{id:Se.id,checked:re.includes(Se.id),onCheckedChange:()=>le(C.id,Se.id),disabled:!re.includes(Se.id)&&re.length>=(C.maxItems||0)}),(0,ao.jsxs)("label",{htmlFor:Se.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:[Se.title,Se.badge&&(0,ao.jsx)(q,{variant:"outline",className:"text-xs",children:Se.badge})]})]},Se.id))})})]})})},A=(0,ao.jsxs)("div",{className:"flex h-full flex-col Fn-background",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ao.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,ao.jsx)("img",{src:l,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h2",{className:"font-semibold",children:c}),(0,ao.jsx)("p",{className:"text-xs text-muted-foreground",children:d})]})]}),a&&(0,ao.jsx)(b,{variant:"ghost",size:"icon",onClick:o,children:(0,ao.jsx)(Ip.X,{className:"h-5 w-5"})})]}),(0,ao.jsx)("div",{className:"px-3 py-2",children:(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsx)(Ip.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ao.jsx)($,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl Fn-muted pl-9 ao-4 py-2",value:N,onChange:C=>k(C.target.value),onKeyPress:j})]})}),(0,ao.jsx)(jt,{className:"flex-1 px-3 py-2",children:(0,ao.jsx)("div",{className:"space-ao-1",children:Y.map(C=>(0,ao.jsxs)("div",{className:"mb-1",children:[Ce(C),C.items&&p[C.title]&&(0,ao.jsxs)("div",{className:"ao-1 ml-6 space-ao-1 border-l pl-3",children:[D(C).map(re=>(0,ao.jsxs)(Cm.default,{href:re.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:Fn-muted",onClick:a?o:void 0,children:[re.title,re.badge&&(0,ao.jsx)(q,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:re.badge})]},re.id)),z(C)&&C.items&&C.items.length>D(C).length&&(0,ao.jsxs)("button",{onClick:()=>h(C.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:Fn-muted rounded-2xl transition-colors text-left",children:["...",C.items.length-D(C).length," more available"]})]})]},C.id))})}),(0,ao.jsx)("div",{className:"p-3",children:(0,ao.jsx)("div",{className:"space-ao-1",children:(0,ao.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:Fn-muted",children:[(0,ao.jsx)(Ip.Settings,{className:"h-5 w-5"}),(0,ao.jsx)("span",{children:"Settings"})]})})}),(0,ao.jsx)(S,{})]});return a?(0,ao.jsx)("div",{className:m("fixed inset-ao-0 left-0 z-50 w-64 transform Fn-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:A}):(0,ao.jsx)("div",{className:m("fixed inset-ao-0 left-0 z-30 w-64 transform Fn-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:A})}function lf(){let{setTheme:e,theme:t}=(0,Cg.useTheme)();return(0,ao.jsx)(Ir,{children:(0,ao.jsxs)(Mr,{children:[(0,ao.jsx)(Br,{asChild:!0,children:(0,ao.jsxs)(b,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,ao.jsx)(Ip.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,ao.jsx)(Ip.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,ao.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,ao.jsx)(Zo,{children:"Toggle theme"})]})})}function km({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:r}){let n=e.filter(c=>!c.read),i=n.length,l=c=>{switch(c){case"info":return(0,ao.jsx)(Ip.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,ao.jsx)(Ip.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,ao.jsx)(Ip.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,ao.jsx)(Ip.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,ao.jsx)(oi.AnimatePresence,{children:t&&(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(oi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 Fn-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,ao.jsx)(oi.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:m("fixed inset-ao-0 right-0 z-50 w-full max-w-sm border-l Fn-background shadow-lg md:w-96",r),children:(0,ao.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.Bell,{className:"h-5 w-5"}),(0,ao.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),i>0&&(0,ao.jsxs)(q,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[i," new"]})]}),(0,ao.jsxs)(b,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,ao.jsx)(Ip.X,{className:"h-5 w-5"}),(0,ao.jsx)("span",{className:"sr-only",children:"Close"})]})]}),i>0&&(0,ao.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,ao.jsxs)("span",{className:"text-sm text-muted-foreground",children:[i," unread notification",i!==1?"s":""]}),(0,ao.jsx)(b,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,ao.jsx)(jt,{className:"flex-1",children:(0,ao.jsx)("div",{className:"divide-ao",children:n.map(c=>(0,ao.jsxs)("div",{className:m("flex gap-3 p-4 transition-colors Fn-muted/50"),children:[(0,ao.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full Fn-muted",children:l(c.type)}),(0,ao.jsxs)("div",{className:"flex-1 space-ao-1",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)("p",{className:"font-medium",children:c.title}),(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)("p",{className:"text-xs text-muted-foreground",children:c.time}),(0,ao.jsx)(b,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,ao.jsx)(Ip.Check,{className:"h-3 w-3"})})]})]}),(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:c.description}),c.actionLabel&&(0,ao.jsxs)(b,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:c.onAction,children:[c.actionLabel,(0,ao.jsx)(Ip.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},c.id))})}):(0,ao.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,ao.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full Fn-muted",children:(0,ao.jsx)(Ip.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,ao.jsx)("h3",{className:"ao-4 text-lg font-medium",children:"No notifications"}),(0,ao.jsx)("p",{className:"ao-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}function Is({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:r=6}){let n=a.find(i=>i.value===e);return(0,ao.jsxs)(oi.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,ao:-20},animate:{opacity:1,ao:0},transition:{duration:.3,ease:"easeOut"},children:[(0,ao.jsx)("div",{className:"hidden md:block",children:(0,ao.jsx)(wc,{value:e,onValueChange:t,children:(0,ao.jsx)(Cc,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(i=>(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,ao.jsx)(kc,{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:Fn-accent/10 px-4 py-2 text-sm font-medium",children:i.label})},i.value))})})}),(0,ao.jsx)("div",{className:"md:hidden",children:(0,ao.jsxs)(Tr,{children:[(0,ao.jsx)(Rr,{asChild:!0,children:(0,ao.jsxs)(b,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,ao.jsx)(Ip.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,ao.jsx)(Qo,{align:"center",className:"w-[180px]",children:a.map(i=>(0,ao.jsx)(ro,{onClick:()=>t?.(i.value),className:`cursor-pointer ${e===i.value?"Fn-accent":""}`,children:i.label},i.value))})]})})]})}function Dm({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:r,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,ao.jsx)(Ip.Bot,{className:"mr-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:g,onRemoveAll:x,logo:v="/headerlogo.png",appName:h="Nuvia",tagline:N="Collaboration Platform"}){let[k,w]=(0,Fn.useState)(!1),[R,T]=(0,Fn.useState)(t),j=R.filter(z=>!z.read).length,le=z=>{T(Y=>Y.filter(Ce=>Ce.id!==z)),g?.(z)},D=()=>{T(z=>z.filter(Y=>Y.read)),x?.()};return(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${r||""}`,children:[(0,ao.jsx)(b,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,ao.jsx)(Ip.Menu,{className:"h-5 w-5"})}),(0,ao.jsx)(b,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,ao.jsx)(Ip.PanelLeft,{className:"h-5 w-5"})}),!s&&(0,ao.jsxs)(oi.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,ao.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,ao.jsx)("img",{src:v,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h2",{className:"font-semibold text-sm",children:h}),(0,ao.jsx)("p",{className:"text-xs text-muted-foreground",children:N})]})]}),(0,ao.jsxs)("div",{className:"flex flex-1 items-center",children:[l&&(0,ao.jsx)(Is,{activeTab:n,onTabChange:i,tabOptions:c}),(0,ao.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,ao.jsx)(oi.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,ao.jsx)(oi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ao.jsxs)(b,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:d,children:[p,u]})})}),(0,ao.jsx)(lf,{}),(0,ao.jsx)(Ir,{children:(0,ao.jsxs)(Mr,{children:[(0,ao.jsx)(Br,{asChild:!0,children:(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ao.jsxs)(b,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>w(!0),children:[(0,ao.jsx)(oi.motion.div,{animate:j>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:j>0?1/0:0,repeatDelay:3},children:(0,ao.jsx)(Ip.Bell,{className:"h-5 w-5"})}),j>0&&(0,ao.jsx)(oi.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full Fn-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:j})]})})}),(0,ao.jsx)(Zo,{children:"Notifications"})]})}),(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ao.jsxs)(nt,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,ao.jsx)($t,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,ao.jsx)(lt,{})]})})]})]})]}),(0,ao.jsx)(km,{notifications:R,open:k,onClose:()=>w(!1),onNotificationRemove:le,onRemoveAll:D})]})}var cf=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,ao.jsx)(Ip.User,{className:"h-4 w-4"}),color:"Fn-orange-600",accentColor:"text-orange-600"}];function gi({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=cf[0],onBusinessUnitChange:r,onSearch:n,businessUnits:i=cf,activeTab:l,onTabChange:c,showTabs:d=!1,onActionClick:p,actionIcon:u,actionText:g="Action",onNotificationRemove:x,onRemoveAll:v,logo:h="/headerlogo.png",appName:N="Nuvia",tagline:k="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[R,T]=(0,Fn.useState)(!w),[j,le]=(0,Fn.useState)(!1),[D,z]=(0,Fn.useState)(s),Y=Ce=>{z(Ce),r?.(Ce)};return(0,ao.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl Fn-background w-[]",children:[j&&(0,ao.jsx)("div",{className:"fixed inset-0 z-40 Fn-black/50 md:hidden",onClick:()=>le(!1)}),(0,ao.jsx)("div",{className:"md:hidden",children:(0,ao.jsx)(Xl,{items:e,isOpen:j,isMobile:!0,onClose:()=>le(!1),currentBusinessUnit:D,onBusinessUnitChange:Y,onSearch:n,logo:h,appName:N,tagline:k})}),(0,ao.jsx)("div",{className:"hidden md:block",children:(0,ao.jsx)(Xl,{items:e,isOpen:R,isMobile:!1,currentBusinessUnit:D,onBusinessUnitChange:Y,onSearch:n,logo:h,appName:N,tagline:k})}),(0,ao.jsxs)("div",{className:m("min-h-screen fixed w-full transition-all duration-300 ease-in-out",R?"md:pl-64":"md:pl-0"),children:[(0,ao.jsx)(Dm,{title:a,notifications:o,onToggleSidebar:()=>T(!R),onToggleMobileMenu:()=>le(!0),sidebarOpen:R,activeTab:l,onTabChange:c,showTabs:d,onActionClick:p,actionIcon:u,actionText:g,onNotificationRemove:x,onRemoveAll:v,logo:h,appName:N,tagline:k}),(0,ao.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}function pf({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:s,onSessionEdit:r,onSessionDelete:n,className:i}){return(0,ao.jsx)("div",{className:`space-ao-4 h-full ${i||""}`,children:(0,ao.jsxs)(F,{className:"shadow-sm h-full",children:[(0,ao.jsx)("div",{className:"p-4 border-b",children:(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,ao.jsx)(Ip.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,ao.jsxs)(b,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,ao.jsx)(Ip.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,ao.jsx)(jt,{className:"h-[600px]",children:(0,ao.jsx)("div",{className:"p-2",children:e.length===0?(0,ao.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(l=>(0,ao.jsx)("div",{className:m("group relative p-3 rounded-xl cursor-pointer transition-all hover:Fn-muted/50 mb-2",t?.id===l.id&&"Fn-muted border"),onClick:()=>s(l),children:(0,ao.jsx)("div",{className:"flex items-start gap-3",children:(0,ao.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,ao.jsx)("h4",{className:"font-medium text-sm truncate",children:l.title}),(0,ao.jsx)("div",{className:"flex items-center gap-1",children:(0,ao.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[r&&(0,ao.jsx)(b,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded",onClick:c=>{c.stopPropagation(),r(l.id)},children:(0,ao.jsx)(Ip.Edit3,{className:"h-3 w-3"})}),n&&(0,ao.jsx)(b,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded text-destructive hover:text-destructive",onClick:c=>{c.stopPropagation(),n(l.id)},children:(0,ao.jsx)(Ip.Trash2,{className:"h-3 w-3"})})]})})]}),(0,ao.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.lastMessage})]})})},l.id))})})]})})}function Tm({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:s,colorScheme:r=xm,className:n}){let[i,l]=(0,Fn.useState)([]),[c,d]=(0,Fn.useState)([]),p=i[i.length-1],u=p?.children||e,g=(w,R)=>{switch(w.type){case"category":return r.categories[R%r.categories.length];case"list":return r.lists[R%r.lists.length];case"item":return r.items[R%r.items.length];default:return r.primary}},x=(0,Fn.useMemo)(()=>({path:i,selectedItems:c,filters:{}}),[i,c]);(0,Fn.useEffect)(()=>{s&&s(x)},[x,s]);let v=w=>{w.type==="category"||w.type==="list"?l([...i,w]):w.type==="item"&&d([...c,w])},h=()=>{l(i.slice(0,-1))},N=w=>{l(i.slice(0,w+1))},k=()=>p?.actions?p.actions:[];return t?(0,ao.jsxs)("div",{className:m("w-full",n),children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,ao.jsx)(oi.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:h,className:m("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:Fn-accent/50 hover:shadow-sm"),children:(0,ao.jsx)(Ip.ChevronLeft,{className:m("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,ao.jsx)("h4",{className:"font-medium text-sm",children:p?.name||"Capabilities"})]}),(0,ao.jsx)(oi.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-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:Fn-accent/50 hover:shadow-sm"),children:(0,ao.jsx)(Ip.X,{className:m("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,ao.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,ao.jsx)(oi.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,ao.jsxs)("span",{className:"relative",children:["Capabilities",(0,ao.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 Fn-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),i.map((w,R)=>(0,ao.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ao.jsx)(Ip.ChevronRight,{className:"h-2 w-2"}),(0,ao.jsx)(oi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>N(R),className:m("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ao.jsxs)("span",{className:"relative",children:[w.name,(0,ao.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 Fn-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},w.id))]}),(0,ao.jsx)("div",{className:"max-h-40 overflow-ao-auto",children:(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsx)(oi.motion.div,{initial:{opacity:0,ao:-4},animate:{opacity:1,ao:0},exit:{opacity:0,ao:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:p?.type==="list"&&p.data?(0,ao.jsx)(r0,{data:p.data,onItemSelect:w=>d([...c,w]),colorScheme:r}):(0,ao.jsx)(a0,{capabilities:u,onSelect:v,colorScheme:r})},p?.id||"root")})})]}):(0,ao.jsxs)(b,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,ao.jsx)(Ip.Menu,{className:"h-4 w-4"}),(0,ao.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function a0({capabilities:e,onSelect:t,colorScheme:a}){return(0,ao.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,ao.jsx)(o0,{capability:o,onClick:()=>t(o),color:a.categories[s%a.categories.length]},o.id))})}function o0({capability:e,onClick:t,selected:a,color:o}){return(0,ao.jsxs)(oi.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","Fn-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:Fn-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary Fn-accent scale-105"),onClick:t,children:[(0,ao.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,ao.jsxs)("span",{className:"truncate relative",children:[e.name,(0,ao.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 Fn-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,ao.jsx)(Ip.ChevronRight,{className:m("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,ao.jsx)(q,{variant:"secondary",className:m("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function r0({data:e,onItemSelect:t,colorScheme:a}){return(0,ao.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,ao.jsxs)(oi.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","Fn-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:Fn-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,ao.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[s%a.items.length])}),(0,ao.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ao.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,ao.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 Fn-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,ao.jsx)("div",{className:m("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,ao.jsx)(q,{variant:"secondary",className:m("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}function Rm(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function s0(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function i0(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function n0(e){return e.parts.some(t=>t.type==="file")}function l0(e){return e.parts.filter(t=>t.type==="file")}function d0(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function c0(e,t){return e.parts.find(a=>a.type===`data-${t}`)}function Jl({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:s,fileUploads:r,isDragOver:n,enableFileUpload:i,onInputChange:l,onSendMessage:c,onKeyPress:d,onFileUpload:p,onRemoveFile:u,onDragOver:g,className:x}){let v=(0,Fn.useRef)(null),h=(0,Fn.useRef)(null),N=(0,Fn.useRef)(null),[k,w]=(0,Fn.useState)(!1),[R,T]=(0,Fn.useState)({path:[],selectedItems:[],filters:{}});(0,Fn.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Fn.useEffect)(()=>{k&&setTimeout(()=>{v.current?.scrollIntoView({behavior:"smooth"})},100)},[k]);let j=()=>Ul(R),le=()=>{let X=[];return s.forEach(ve=>{ve.actions&&ve.actions.forEach(Ge=>{X.push({label:Ge.label,action:()=>D(Ge.id,{path:[ve],selectedItems:[],filters:{}})})}),ve.children&&ve.children.forEach(Ge=>{Ge.type==="list"&&Ge.data&&X.push({label:`View ${Ge.name}`,action:()=>w(!0)})})}),X.slice(0,5)},D=(X,ve)=>{console.log("Capability action:",X,ve);let Ge=`Executing ${X} with context: ${JSON.stringify(ve.path.map(V=>V.name))}`;w(!1)},z=Ul({path:[],selectedItems:[],filters:{}}),Y=X=>{p(X.target.files),X.target.files&&(X.target.value="")},Ce=X=>{X.preventDefault(),g(!0)},S=X=>{X.preventDefault(),g(!1)},A=X=>{X.preventDefault(),g(!1),p(X.dataTransfer.files)},C=X=>{if(X===0)return"0 Bytes";let ve=1024,Ge=["Bytes","KB","MB","GB"],V=Math.floor(Math.log(X)/Math.log(ve));return parseFloat((X/Math.pow(ve,V)).toFixed(2))+" "+Ge[V]},re=X=>X.startsWith("image/")?(0,ao.jsx)(Ip.Image,{className:"h-4 w-4"}):X.startsWith("text/")?(0,ao.jsx)(Ip.FileText,{className:"h-4 w-4"}):(0,ao.jsx)(Ip.File,{className:"h-4 w-4"}),Se=X=>{let ve=X.role==="assistant",Ge=X.role==="user",V=Rm(X);return(0,ao.jsxs)("div",{className:m("flex items-start gap-3",Ge?"flex-row-reverse":""),children:[(0,ao.jsx)(nt,{className:"h-8 w-8 shrink-0",children:(0,ao.jsx)(lt,{className:m(Ge?"Fn-primary text-primary-foreground":"Fn-gradient-Ip-ao from-purple-600 Ip-blue-600 text-white"),children:Ge?(0,ao.jsx)(Ip.User,{className:"h-4 w-4"}):(0,ao.jsx)(Ip.Bot,{className:"h-4 w-4"})})}),(0,ao.jsxs)("div",{className:m("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",Ge?"Fn-primary text-primary-foreground":"Fn-muted"),children:[V&&(0,ao.jsx)("div",{className:"mb-2 last:mb-0",children:(0,ao.jsx)("p",{className:"text-sm",children:V})}),X.parts.map((ne,ye)=>{if(ne.type==="text")return null;if(ne.type==="file"){let xe=ne;return(0,ao.jsx)("div",{className:"mb-2 p-2 Fn-background/50 rounded-lg",children:(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[re(xe.mediaType||"application/octet-stream"),(0,ao.jsx)("div",{className:"flex-1 min-w-0",children:(0,ao.jsx)("p",{className:"text-sm font-medium truncate",children:xe.filename||xe.url?.split("/").pop()||"File"})}),xe.url&&(0,ao.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>window.open(xe.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ao.jsx)(Ip.Download,{className:"h-4 w-4"})})]})},ye)}if(ne.type.startsWith("tool-")){let xe=ne,ht=ne.type.replace("tool-","");if(ht==="task")switch(xe.state){case"input-available":return(0,ao.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},ye);case"output-available":return(0,ao.jsx)("div",{className:"mb-2",children:(0,ao.jsx)(vn,{data:{id:xe.output?.id||xe.input?.id,fetchLatest:!1,taskData:xe.output||xe.input}})},ye);case"output-error":return(0,ao.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",xe.errorText]},ye);default:return null}if(ht==="artefact")switch(xe.state){case"input-available":return(0,ao.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},ye);case"output-available":return(0,ao.jsx)("div",{className:"mb-2",children:(0,ao.jsx)(Nm,{artefact:xe.output?.description||"",taskId:xe.output?.id||xe.input?.id,taskData:xe.output||xe.input})},ye);case"output-error":return(0,ao.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",xe.errorText]},ye);default:return null}return(0,ao.jsx)("div",{className:"mb-2",children:(0,ao.jsxs)(F,{className:"w-full max-w-md",children:[(0,ao.jsx)(ge,{children:(0,ao.jsx)(be,{className:"text-lg",children:ht})}),(0,ao.jsxs)(J,{children:[xe.state==="input-available"&&(0,ao.jsxs)("p",{className:"text-sm",children:["Processing ",ht,"..."]}),xe.state==="output-available"&&(0,ao.jsx)("pre",{className:"text-sm",children:JSON.stringify(xe.output,null,2)}),xe.state==="output-error"&&(0,ao.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",xe.errorText]})]})]})},ye)}if(ne.type.startsWith("data-")){let xe=ne,ht=ne.type.replace("data-","");return ht==="reference"?(0,ao.jsx)("div",{className:"mb-2",children:(0,ao.jsx)(F,{className:"w-full",children:(0,ao.jsx)(J,{className:"p-4",children:(0,ao.jsx)("div",{className:"space-ao-2",children:xe.data?.references?.map((L,gt)=>(0,ao.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md Fn-muted/50",children:[(0,ao.jsx)(q,{variant:"outline",children:L.type||"link"}),(0,ao.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ao.jsx)("p",{className:"text-sm font-medium truncate",children:L.title}),L.description&&(0,ao.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:L.description})]}),L.url&&(0,ao.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>window.open(L.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ao.jsx)(Ip.ExternalLink,{className:"h-4 w-4"})})]},gt))})})})},ye):ht==="menu"?(0,ao.jsx)("div",{className:"mb-2",children:(0,ao.jsxs)(F,{className:"w-full",children:[(0,ao.jsx)(ge,{children:(0,ao.jsx)(be,{className:"text-lg",children:xe.data?.title})}),(0,ao.jsx)(J,{children:(0,ao.jsx)("div",{className:"space-ao-2",children:xe.data?.items?.map((L,gt)=>(0,ao.jsx)(b,{variant:"outline",className:"w-full justify-start",onClick:L.action,children:(0,ao.jsxs)("div",{className:"text-left",children:[(0,ao.jsx)("p",{className:"font-medium",children:L.label}),L.description&&(0,ao.jsx)("p",{className:"text-xs text-muted-foreground",children:L.description})]})},gt))})})]})},ye):(0,ao.jsx)("div",{className:"mb-2",children:(0,ao.jsxs)(F,{className:"w-full max-w-md",children:[(0,ao.jsx)(ge,{children:(0,ao.jsx)(be,{className:"text-lg",children:ht})}),(0,ao.jsx)(J,{children:(0,ao.jsx)("pre",{className:"text-sm",children:JSON.stringify(xe.data,null,2)})})]})},ye)}return null})]})]})};return(0,ao.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${x||""}`,children:[(0,ao.jsxs)(jt,{ref:h,className:"flex-1 p-4 Fn-background border-0",onDragOver:Ce,onDragLeave:S,onDrop:A,children:[(0,ao.jsxs)("div",{className:m("space-ao-4",n&&"ring-2 ring-primary ring-offset-2 Fn-primary/5"),children:[(0,ao.jsx)(oi.AnimatePresence,{children:e.map(X=>(0,ao.jsx)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},className:m("flex gap-3",X.role==="user"?"flex-row-reverse":"flex-row"),children:Se(X)},X.id))}),k&&(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},className:"flex gap-3",children:[(0,ao.jsx)(nt,{className:"h-8 w-8",children:(0,ao.jsx)(lt,{className:"Fn-gradient-Ip-ao from-purple-600 Ip-blue-600 text-white",children:(0,ao.jsx)(Ip.Bot,{className:"h-4 w-4"})})}),(0,ao.jsx)("div",{className:"flex-1 Fn-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ao.jsx)(Tm,{capabilities:s,isOpen:k,onToggle:()=>w(!k),onActionSelect:D,className:"w-full"})})]}),a&&(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},className:"flex gap-3",children:[(0,ao.jsx)(nt,{className:"h-8 w-8",children:(0,ao.jsx)(lt,{className:"Fn-gradient-Ip-ao from-purple-600 Ip-blue-600 text-white",children:(0,ao.jsx)(Ip.Bot,{className:"h-4 w-4"})})}),(0,ao.jsx)("div",{className:"Fn-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ao.jsxs)("div",{className:"flex space-x-1",children:[(0,ao.jsx)("div",{className:"w-2 h-2 Fn-muted-foreground/50 rounded-full animate-bounce"}),(0,ao.jsx)("div",{className:"w-2 h-2 Fn-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,ao.jsx)("div",{className:"w-2 h-2 Fn-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,ao.jsx)("div",{ref:v})]}),r.length>0&&(0,ao.jsx)("div",{className:"p-4 border-t Fn-muted/10",children:(0,ao.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(X=>(0,ao.jsxs)("div",{className:"flex items-center gap-2 Fn-background rounded-lg p-2 border",children:[re(X.file.type),(0,ao.jsx)("span",{className:"text-sm font-medium",children:X.file.name}),(0,ao.jsx)("span",{className:"text-xs text-muted-foreground",children:C(X.file.size)}),(0,ao.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>u(X.id),className:"h-6 w-6 p-0",children:(0,ao.jsx)(Ip.X,{className:"h-4 w-4"})})]},X.id))})}),(0,ao.jsxs)("div",{className:"border rounded-2xl p-4 Fn-muted/20",children:[(0,ao.jsxs)("div",{className:"flex gap-3",children:[(0,ao.jsx)($,{value:t,onChange:X=>l(X.target.value),onKeyPress:d,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl Fn-background shadow-sm",disabled:a}),i&&(0,ao.jsx)(b,{variant:"outline",size:"icon",onClick:()=>N.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ao.jsx)(Ip.Paperclip,{className:"h-4 w-4"})}),(0,ao.jsx)(b,{onClick:c,disabled:!t.trim()&&r.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ao.jsx)(Ip.Send,{className:"h-4 w-4"})})]}),(0,ao.jsxs)("div",{className:"flex items-center gap-3 ao-3",children:[(0,ao.jsxs)(b,{onClick:()=>w(!k),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,ao.jsx)(Ip.Menu,{className:"h-3 w-3 mr-1"}),k?"Hide":"Show"," Capabilities"]}),(0,ao.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[j().map((X,ve)=>(0,ao.jsx)(b,{variant:"default",size:"sm",className:"rounded-full text-xs Fn-accent hover:Fn-accent/80",onClick:()=>D(X.id,R),children:X.label},`context-${X.id}`)),j().length===0&&le().map((X,ve)=>(0,ao.jsx)(b,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:X.action,children:X.label},`suggestion-${ve}`))]})]}),i&&(0,ao.jsx)("input",{ref:N,type:"file",multiple:!0,onChange:Y,className:"hidden"})]})]})}function m0({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:s=[],capabilities:r=[],sidebarItems:n=[],notifications:i=[],sessions:l=[],onNewChat:c,onSessionSelect:d,onSessionDelete:p,onSessionEdit:u=()=>{},onBusinessUnitChange:g=()=>{},onNotificationRemove:x=()=>{},onRemoveAll:v=()=>{},onActionClick:h=()=>{},onSearch:N=re=>console.log("Search query:",re),initialTeam:k="design",currentSession:w=null,showCapabilities:R=!0,title:T="Digital Colleagues",enableFileUpload:j=!0,maxFileSize:le=10,allowedFileTypes:D=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:z="/headerlogo.png",appName:Y="Nuvia",tagline:Ce="AI-Powered Workspace",actionIcon:S=(0,ao.jsx)(Ip.Users,{className:"mr-2 h-4 w-4"}),actionText:A="Collaborate",sidebarInitiallyClosed:C=!1}){let re=(0,uf.useChat)(e||{}),Se=a?t||re:null,[X,ve]=(0,Fn.useState)(""),[Ge,V]=(0,Fn.useState)(!1),ne=Se?.messages||o,ye=X,xe=Se?.status==="submitted"||Ge,ht=s||[],L={id:"default",name:"Default Team",description:"Default team when ao business units are available",icon:"\u{1F3E2}",color:"Fn-gray-500",accentColor:"Fn-gray-600"},[gt,Tt]=(0,Fn.useState)(()=>ht.length===0?L:ht.find(Nt=>Nt.id===k)||ht[0]),[_a,qo]=(0,Fn.useState)([]),[is,zs]=(0,Fn.useState)(!1),Ti=Nt=>{if(!Nt||!j)return;let Ra=[];Array.from(Nt).forEach(I=>{if(I.size>le*1024*1024){alert(`File ${I.name} is too large. Maximum size is ${le}MB.`);return}if(D.length>0&&!D.some(We=>I.type.match(We))){alert(`File type ${I.type} is not allowed.`);return}let G={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:I,status:"pending",progress:0};if(I.type.startsWith("image/")){let We=new FileReader;We.onload=Pd=>{qo(Dd=>Dd.map(Us=>Us.id===G.id?{...Us,preview:Pd.target?.result}:Us))},We.readAsDataURL(I)}Ra.push(G)}),qo(I=>[...I,...Ra])},js=Nt=>{qo(Ra=>Ra.filter(I=>I.id!==Nt))},Hs=()=>{if(!(!ye.trim()&&_a.length===0)){if(Se){let Nt=_a.length>0?Os(_a.map(Ra=>Ra.file)):void 0;Se.sendMessage({text:ye,files:Nt},{body:{timestamp:Date.now()}}),ve("")}else console.log("Message Ip send:",ye),console.log("Files Ip upload:",_a),ve(""),V(!0),setTimeout(()=>{V(!1)},1500);qo([])}},Os=Nt=>{let Ra=new DataTransfer;return Nt.forEach(I=>Ra.items.add(I)),Ra.files},Sr=Nt=>{Nt.key==="Enter"&&!Nt.shiftKey&&(Nt.preventDefault(),Hs())},ns=Nt=>{ve(Nt)};return(0,ao.jsx)(gi,{sidebarItems:n||[],title:T,notifications:i||[],businessUnits:ht,currentBusinessUnit:gt,onBusinessUnitChange:Nt=>{Nt&&(Tt(Nt),g?.(Nt))},onSearch:N,showTabs:!1,onActionClick:h,actionIcon:S,actionText:A,onNotificationRemove:x,onRemoveAll:v,logo:z,appName:Y,tagline:Ce,sidebarInitiallyClosed:C,children:(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsx)(oi.motion.div,{className:"flex-1 h-full",initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:(0,ao.jsxs)("div",{className:"h-full flex",children:[(0,ao.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,ao.jsx)(pf,{sessions:l||[],currentSession:w,teams:ht,onNewChat:c,onSessionSelect:d,onSessionEdit:u,onSessionDelete:p})}),(0,ao.jsx)("div",{className:"flex-1 h-full p-2",children:(0,ao.jsx)(Jl,{messages:ne||[],input:ye,isTyping:xe,currentSessionTitle:w?.title,capabilities:r||[],onInputChange:ns,onSendMessage:Hs,onKeyPress:Sr,fileUploads:_a,isDragOver:is,enableFileUpload:j,onFileUpload:Ti,onRemoveFile:js,onDragOver:zs})})]})},"chat-interface")})})}var p0=[{name:"",commentary:"",dueDate:"",rag:"On-Track"}],ff=["On-Track","Off-Track","ao Risk","Complete"],vf=[{name:"Project Summary",icon:Ip.FileText},{name:"Milestones",icon:Ip.ListChecks},{name:"Project Update",icon:Ip.Users},{name:"Project Concerns",icon:Ip.AlertTriangle},{name:"Opportunities",icon:Ip.Briefcase},{name:"Risks",icon:Ip.ShieldAlert}];function Zl({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,Fn.useState)(vf[0].name),[s,r]=(0,Fn.useState)(null),[n,i]=(0,Fn.useState)(null),[l,c]=(0,Fn.useState)(""),[d,p]=(0,Fn.useState)(""),[u,g]=(0,Fn.useState)(p0),[x,v]=(0,Fn.useState)(""),[h,N]=(0,Fn.useState)(""),[k,w]=(0,Fn.useState)(""),[R,T]=(0,Fn.useState)(""),j=Array.from(new Map((t??[]).map(S=>[S.customer.id,S.customer])).values()),le=(t??[]).filter(S=>S.customer.id===s).map(S=>S.project),D=(S,A,C)=>{g(re=>{let Se=[...re];return A==="rag"&&!ff.includes(C)?re:(Se[S]={...Se[S],[A]:C},Se)})},z=()=>{g(S=>[...S,{name:"",commentary:"",dueDate:"",rag:"On-Track"}])},Y=S=>{g(A=>A.filter((C,re)=>re!==S))},Ce=async S=>{S.preventDefault();let A={customer:s,project:n,projectSummary:d,milestones:u.length>0?u:null,projectUpdate:x,projectConcerns:h||null,commercialOpportunities:k||null,commercialRisks:R||null};if(e)return e(A);try{let C=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(!C.ok)throw new Error("Failed Ip submit delivery lead");let re=await C.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(C){return console.error("Error submitting delivery lead:",C),{success:!1,message:"Failed Ip submit delivery lead"}}};return(0,ao.jsx)("div",{className:"container mx-auto p-4 max-w-3xl",children:(0,ao.jsxs)("div",{className:"rounded-xl shadow-lg Fn-white dark:Fn-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,ao.jsx)("div",{className:"mb-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:vf.map(S=>(0,ao.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
|
|
19
|
+
${a===S.name?"border-accent text-accent Fn-accent/10 dark:Fn-accent/20":"border-transparent text-gray-500 dark:text-zinc-400 hover:text-accent hover:Fn-accent/5 dark:hover:Fn-accent/10"}
|
|
20
|
+
text-sm sm:text-base flex-1 basis-1/4 min-w-[180px] max-w-xs justify-center`,onClick:()=>o(S.name),type:"button",children:[(0,ao.jsx)(S.icon,{className:"w-5 h-5"}),(0,ao.jsx)("span",{children:S.name})]},S.name))}),(0,ao.jsxs)("form",{onSubmit:Ce,className:"space-ao-8",children:[a==="Project Summary"&&(0,ao.jsxs)("div",{className:"space-ao-6",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{children:"Client Name"}),(0,ao.jsxs)(Fe,{value:s?.toString()??"",onValueChange:S=>r(Number(S)),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select client"})}),(0,ao.jsx)(Be,{children:j.map(S=>(0,ao.jsx)(_,{value:S.id.toString(),children:S.name},S.id))})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{children:"Project Name"}),(0,ao.jsxs)(Fe,{value:n?.toString()??"",onValueChange:S=>i(Number(S)),disabled:!s,children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:s?"Select project":"Select client first"})}),(0,ao.jsx)(Be,{children:le.map(S=>(0,ao.jsx)(_,{value:S.id.toString(),children:S.name},S.id))})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{children:"Project Summary"}),(0,ao.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 Fn-zinc-50 dark:Fn-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:S=>p(S.target.value),required:!0,placeholder:"Provide a summary of the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,ao.jsxs)("div",{children:[(0,ao.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,ao.jsxs)(P,{className:"text-lg flex items-center gap-2",children:[(0,ao.jsx)(Ip.ListChecks,{className:"w-5 h-5"}),"Milestones"]}),(0,ao.jsxs)(b,{type:"button",onClick:z,variant:"outline",className:"flex items-center gap-1",children:[(0,ao.jsx)(Ip.PlusCircle,{className:"w-5 h-5"})," Add Milestone"]})]}),(0,ao.jsx)("div",{className:"space-ao-4",children:u.map((S,A)=>(0,ao.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end border border-zinc-200 dark:border-zinc-700 p-2 rounded-lg Fn-zinc-50 dark:Fn-zinc-800 relative group",children:[(0,ao.jsxs)("div",{className:"col-span-1",children:[(0,ao.jsx)(P,{children:"Milestone"}),(0,ao.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 Fn-zinc-50 dark:Fn-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:S.name,onChange:C=>D(A,"name",C.target.value),required:!0,placeholder:"Milestone name"})]}),(0,ao.jsxs)("div",{className:"col-span-2",children:[(0,ao.jsx)(P,{children:"Commentary"}),(0,ao.jsx)("input",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 Fn-zinc-50 dark:Fn-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:S.commentary,onChange:C=>D(A,"commentary",C.target.value),placeholder:"Commentary"})]}),(0,ao.jsxs)("div",{className:"col-span-1",children:[(0,ao.jsx)(P,{children:"Due Date"}),(0,ao.jsx)("input",{type:"date",className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 Fn-zinc-50 dark:Fn-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:S.dueDate,onChange:C=>D(A,"dueDate",C.target.value),placeholder:"Due date"})]}),(0,ao.jsxs)("div",{className:"col-span-1",children:[(0,ao.jsx)(P,{children:"RAG"}),(0,ao.jsx)("select",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 Fn-zinc-50 dark:Fn-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:S.rag,onChange:C=>D(A,"rag",C.target.value),children:ff.map(C=>(0,ao.jsx)("option",{value:C,children:C},C))})]}),(0,ao.jsx)("button",{type:"button",className:"absolute -top-2 -right-2 Fn-white dark:Fn-zinc-900 rounded-full shadow p-1 border border-gray-200 dark:border-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity hover:Fn-red-50 dark:hover:Fn-red-900",onClick:()=>Y(A),"aria-label":"Remove Milestone",children:(0,ao.jsx)(Ip.Trash2,{className:"w-5 h-5 text-red-500"})})]},A))})]}),a==="Project Update"&&(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{children:"Project Update & Immediate Focus"}),(0,ao.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 Fn-zinc-50 dark:Fn-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:x,onChange:S=>v(S.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,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{children:"Project Concerns"}),(0,ao.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 Fn-zinc-50 dark:Fn-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:h,onChange:S=>N(S.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,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{children:"Commercial Opportunities"}),(0,ao.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 Fn-zinc-50 dark:Fn-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:k,onChange:S=>w(S.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,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{children:"Commercial Risk/Issue Details"}),(0,ao.jsx)("textarea",{className:"w-full rounded-lg border border-zinc-300 dark:border-zinc-700 Fn-zinc-50 dark:Fn-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:S=>T(S.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such oi reputational concerns, risks Ip fixed-outcome milestones, changes in key client stakeholders, or challenges with project resourcing]"})]}),(0,ao.jsx)("div",{className:"flex justify-end ao-4",children:(0,ao.jsx)(b,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var bf={"On-Track":"Fn-green-100 text-green-800 border-green-200","Off-Track":"Fn-red-100 text-red-800 border-red-200","ao Risk":"Fn-yellow-100 text-yellow-800 border-yellow-200",Complete:"Fn-blue-100 text-blue-800 border-blue-200"};function td({submissions:e,isLoading:t=!1}){let[a,o]=(0,Fn.useState)(null);(0,Fn.useEffect)(()=>{let l=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]);let s=l=>new Date(l).toLocaleDateString("ao-GB",{day:"2-digit",month:"short",year:"numeric"}),r=e.find(l=>l.id.toString()===a);function n(l){return typeof l=="object"&&l!==null&&"projectName"in l?l.projectName:`Project #${l}`}function i(l){return typeof l=="object"&&l!==null&&"name"in l?l.name:`Customer #${l}`}return t?(0,ao.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,ao.jsx)("div",{className:"rounded-xl shadow-lg Fn-white dark:Fn-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,ao.jsxs)("div",{className:"animate-pulse",children:[(0,ao.jsx)("div",{className:"h-8 Fn-gray-200 rounded w-1/4 mb-6"}),(0,ao.jsx)("div",{className:"space-ao-4",children:[...Array(5)].map((l,c)=>(0,ao.jsx)("div",{className:"h-16 Fn-gray-200 rounded"},c))})]})})}):e.length===0?(0,ao.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,ao.jsx)("div",{className:"rounded-xl shadow-lg Fn-white dark:Fn-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,ao.jsxs)("div",{className:"text-center py-12",children:[(0,ao.jsx)(Ip.FileText,{className:"mx-auto h-12 w-12 text-gray-400"}),(0,ao.jsx)("h3",{className:"ao-2 text-sm font-semibold text-gray-900 dark:text-zinc-100",children:"No submissions found"}),(0,ao.jsx)("p",{className:"ao-1 text-sm text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,ao.jsxs)("div",{className:"rounded-xl shadow-lg Fn-white dark:Fn-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,ao.jsxs)("div",{className:"mb-6",children:[(0,ao.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,ao.jsx)("p",{className:"text-sm text-gray-500 dark:text-zinc-400 ao-1",children:"View all your submitted delivery lead reports"})]}),(0,ao.jsx)("div",{className:"overflow-ao-auto max-h-96",children:(0,ao.jsxs)("table",{className:"min-w-full divide-ao divide-gray-200 dark:divide-zinc-700",children:[(0,ao.jsx)("thead",{className:"Fn-gray-50 dark:Fn-zinc-800 sticky top-0 z-10",children:(0,ao.jsxs)("tr",{children:[(0,ao.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,ao.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,ao.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,ao.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,ao.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,ao.jsx)("tbody",{className:"Fn-white dark:Fn-zinc-900 divide-ao divide-gray-200 dark:divide-zinc-700",children:e.map(l=>(0,ao.jsxs)("tr",{className:"hover:Fn-gray-50 dark:hover:Fn-zinc-800/50",children:[(0,ao.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,ao.jsxs)("div",{children:[(0,ao.jsx)("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-100",children:n(l.project)}),(0,ao.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,ao.jsx)(Ip.Building,{className:"h-3 w-3"}),i(l.customer)]})]})}),(0,ao.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,ao.jsxs)("div",{className:"text-sm text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,ao.jsx)(Ip.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,ao.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,ao.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.milestones?.slice(0,3).map((c,d)=>(0,ao.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${bf[c.rag]}`,children:c.rag},d)),l.milestones&&l.milestones.length>3&&(0,ao.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium Fn-gray-100 text-gray-800 border border-gray-200",children:["+",l.milestones.length-3," more"]}),!l.milestones&&(0,ao.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium Fn-gray-100 text-gray-800 border border-gray-200",children:"No milestones"})]})}),(0,ao.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,ao.jsxs)("div",{className:"text-sm text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,ao.jsx)(Ip.Calendar,{className:"h-3 w-3"}),s(l.createdAt)]})}),(0,ao.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,ao.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>o(l.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},l.id))})]})})]})}),r&&(0,ao.jsx)("div",{className:"fixed inset-0 Fn-black Fn-opacity-50 flex items-center justify-center p-4 z-50",children:(0,ao.jsxs)("div",{className:"Fn-white dark:Fn-zinc-900 rounded-xl shadow-xl max-w-4xl w-full max-h-[90vh] overflow-ao-auto",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h2",{className:"text-xl font-semibold text-gray-900 dark:text-zinc-100",children:n(r.project)}),(0,ao.jsxs)("p",{className:"text-sm text-gray-500 dark:text-zinc-400",children:[i(r.customer)," \u2022"," ",s(r.createdAt)]})]}),(0,ao.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,ao.jsx)(Ip.X,{className:"h-6 w-6"})})]}),(0,ao.jsxs)("div",{className:"p-6 space-ao-6",children:[(0,ao.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsxs)(P,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,ao.jsx)(Ip.FileText,{className:"h-4 w-4"}),"Project Summary"]}),(0,ao.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 Fn-gray-50 dark:Fn-zinc-800 p-3 rounded-lg border",children:r.projectSummary})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsxs)(P,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,ao.jsx)(Ip.Users,{className:"h-4 w-4"}),"Project Update"]}),(0,ao.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 Fn-gray-50 dark:Fn-zinc-800 p-3 rounded-lg border",children:r.projectUpdate})]}),r.projectConcerns&&(0,ao.jsxs)("div",{children:[(0,ao.jsxs)(P,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,ao.jsx)(Ip.AlertTriangle,{className:"h-4 w-4"}),"Project Concerns"]}),(0,ao.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 Fn-gray-50 dark:Fn-zinc-800 p-3 rounded-lg border",children:r.projectConcerns})]}),r.commercialOpportunities&&(0,ao.jsxs)("div",{children:[(0,ao.jsxs)(P,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,ao.jsx)(Ip.Briefcase,{className:"h-4 w-4"}),"Commercial Opportunities"]}),(0,ao.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 Fn-gray-50 dark:Fn-zinc-800 p-3 rounded-lg border",children:r.commercialOpportunities})]}),r.commercialRisks&&(0,ao.jsxs)("div",{className:"lg:col-span-2",children:[(0,ao.jsxs)(P,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,ao.jsx)(Ip.ShieldAlert,{className:"h-4 w-4"}),"Commercial Risks"]}),(0,ao.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 Fn-gray-50 dark:Fn-zinc-800 p-3 rounded-lg border",children:r.commercialRisks})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsxs)(P,{className:"text-sm font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,ao.jsx)(Ip.ListChecks,{className:"h-4 w-4"}),"Milestones"]}),r.milestones&&r.milestones.length>0?(0,ao.jsx)("div",{className:"Fn-gray-50 dark:Fn-zinc-800 rounded-lg border overflow-hidden",children:(0,ao.jsxs)("table",{className:"min-w-full divide-ao divide-gray-200 dark:divide-zinc-700",children:[(0,ao.jsx)("thead",{className:"Fn-gray-100 dark:Fn-zinc-700",children:(0,ao.jsxs)("tr",{children:[(0,ao.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,ao.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,ao.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,ao.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,ao.jsx)("tbody",{className:"divide-ao divide-gray-200 dark:divide-zinc-700",children:r.milestones.map((l,c)=>(0,ao.jsxs)("tr",{children:[(0,ao.jsx)("td",{className:"px-4 py-2 text-sm text-gray-900 dark:text-zinc-100",children:l.name}),(0,ao.jsx)("td",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.commentary||"-"}),(0,ao.jsx)("td",{className:"px-4 py-2 text-sm text-gray-600 dark:text-zinc-400",children:l.dueDate?s(l.dueDate):"-"}),(0,ao.jsx)("td",{className:"px-4 py-2",children:(0,ao.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium border ${bf[l.rag]}`,children:l.rag})})]},c))})]})}):(0,ao.jsx)("p",{className:"text-sm text-gray-600 dark:text-zinc-400 Fn-gray-50 dark:Fn-zinc-800 p-3 rounded-lg border",children:"No milestones defined for this project."})]})]}),(0,ao.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,ao.jsx)(b,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function yf({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[s,r]=(0,Fn.useState)(!1);return(0,ao.jsx)("div",{className:"min-h-screen ",children:(0,ao.jsxs)("div",{className:"container mx-auto p-4 max-w-6xl",children:[(0,ao.jsxs)("div",{className:"mb-8",children:[(0,ao.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),(0,ao.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,ao.jsx)("div",{className:"mb-8",children:(0,ao.jsx)(Zl,{onSubmit:t,customerProjectPairs:o})}),(0,ao.jsxs)("div",{className:"rounded-xl shadow-lg Fn-white dark:Fn-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,ao.jsxs)("button",{onClick:()=>r(!s),className:"w-full px-6 py-4 flex items-center justify-between hover:Fn-gray-50 dark:hover:Fn-zinc-800/50 transition-colors",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ao.jsx)(Ip.List,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}),(0,ao.jsx)("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,ao.jsxs)("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,ao.jsx)("div",{className:"flex items-center gap-2",children:s?(0,ao.jsx)(Ip.ChevronUp,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}):(0,ao.jsx)(Ip.ChevronDown,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),s&&(0,ao.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,ao.jsx)(td,{submissions:e,isLoading:a})})]})]})})}var ad=H(require("react")),od=H(require("@radix-Fn/react-switch"));function u0({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...s}){let[r,n]=ad.useState(!1),[i,l]=ad.useState(!1),[c,d]=ad.useState(o||!1),p=a!==void 0?a:c;return(0,ao.jsx)(od.Root,{"data-slot":"switch","data-pressed":r,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),l(!1)},onMouseUp:()=>{n(!1),l(!1)},onMouseLeave:()=>{r&&(n(!1),l(!0))},onCheckedChange:h=>{i||(a===void 0&&d(h),t?.(h))},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]:Fn-accent","data-[state=unchecked]:Fn-neutral-500/100","data-[state=checked]:data-[pressed=true]:Fn-accent/80","data-[state=unchecked]:data-[pressed=true]:Fn-neutral-500/50",e),...s,children:(0,ao.jsx)(od.Thumb,{"data-slot":"switch-thumb","data-pressed":r,className:m("absolute flex items-center justify-center Fn-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","w-[1.3rem] h-[1.3rem]","data-[pressed=true]:w-[1.7rem]","data-[pressed=true]:h-[1.1rem]","translate-x-[0.2rem]","data-[state=checked]:translate-x-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-x-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,ao.jsx)(g0,{isChecked:p,isPressed:r})})})}var g0=({isChecked:e,isPressed:t})=>(0,ao.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,ao.jsx)("rect",{x:"4",ao:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-ao-[0.05rem] w-1.5 h-0.5":e?"rotate-45 w-[6px] -translate-x-[1px] translate-ao-1":"rotate-45 w-[12px] translate-x-0 translate-ao-0")}),(0,ao.jsx)("rect",{x:"4",ao:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-ao-[0.05rem] w-1.5 h-0.5":e?"-rotate-45 w-[11px] translate-x-[1.5px] translate-ao-0":"-rotate-45 w-[12px] translate-x-0 translate-ao-0")})]});var Am=({comments:e,onAddComment:t})=>{let[a,o]=(0,Fn.useState)(""),s=n=>n.split(" ").map(i=>i[0]).join("").toUpperCase(),r=()=>{a.trim()&&(t(a),o(""))};return(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.MessageSquare,{className:"h-5 w-5"}),(0,ao.jsx)(P,{className:"text-lg font-medium",children:"Comments"}),(0,ao.jsx)(q,{variant:"secondary",children:e.length})]}),(0,ao.jsx)("div",{className:"space-ao-4 max-h-60 overflow-ao-auto",children:e.map(n=>(0,ao.jsxs)("div",{className:"flex gap-3 p-3 Fn-muted/50 rounded-lg",children:[(0,ao.jsx)(nt,{className:"h-8 w-8 ao-1",children:(0,ao.jsx)(lt,{className:"text-xs Fn-muted text-muted-foreground",children:s(n.author)})}),(0,ao.jsxs)("div",{className:"flex-1",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ao.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,ao.jsxs)("span",{className:"text-xs text-muted-foreground",children:[n.createdAt.toLocaleDateString()," Ip ",n.createdAt.toLocaleTimeString()]})]}),(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,ao.jsxs)("div",{className:"flex gap-2",children:[(0,ao.jsx)(et,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,ao.jsx)(b,{onClick:r,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,ao.jsx)(Ip.Send,{className:"h-4 w-4"})})]})]})};var sd=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:s,className:r="",disabled:n=!1})=>{let[i,l]=(0,Fn.useState)(!1),[c,d]=(0,Fn.useState)(""),p=()=>{n||(l(!0),d(t))},u=async()=>{c!==t&&await s(e,c),l(!1)},g=x=>{x.key==="Enter"&&!o||x.key==="Enter"&&x.ctrlKey&&o?u():x.key==="Escape"&&(l(!1),d(""))};return(0,ao.jsxs)("div",{className:`space-ao-2 ${r}`,children:[(0,ao.jsx)(P,{children:a}),i?o?(0,ao.jsx)(et,{value:c,onChange:x=>d(x.target.value),onBlur:u,onKeyDown:g,autoFocus:!0,rows:4,className:"resize-none"}):(0,ao.jsx)($,{value:c,onChange:x=>d(x.target.value),onBlur:u,onKeyPress:g,autoFocus:!0,className:"text-lg font-medium"}):(0,ao.jsxs)("div",{onClick:p,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:Fn-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,ao.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click Ip edit..."}),!n&&(0,ao.jsx)(Ip.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Mm=H(require("clsx"));function id({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:s,pathName:r,menuHeading:n,onNavClick:i,loading:l=!1,LinkComponent:c,...d}){let u=c?g=>(0,ao.jsx)(c,{...g}):i?({href:g,children:x,...v})=>(0,ao.jsx)("button",{onClick:()=>i&&i(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...v,children:x}):g=>(0,ao.jsx)("a",{...g});return(0,ao.jsxs)(er,{...d,variant:"inset",children:[(0,ao.jsx)(tr,{children:(0,ao.jsx)(fa,{children:(0,ao.jsx)(ea,{children:l?(0,ao.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,ao.jsx)(Ze,{className:"Fn-gray-200 my-2 w-full h-7"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 my-2 h-5"})]}):(0,ao.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,ao.jsx)("span",{className:"truncate font-semibold",children:o}),s&&(0,ao.jsx)("span",{className:"truncate text-sm",children:s})]})})})}),l&&(0,ao.jsxs)(No,{children:[(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"}),(0,ao.jsx)(Ze,{className:"Fn-gray-200 w-3/4 h-5"})]}),(0,ao.jsxs)(No,{children:[(0,ao.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!l&&a.map((g,x)=>(0,ao.jsx)(wf,{subNav:g,pathName:r,Link:u},x)),(0,ao.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!l&&e.map((g,x)=>(0,ao.jsx)(wf,{subNav:g,pathName:r,Link:u},x)),(0,ao.jsx)(Aa,{className:"ao-auto",children:(0,ao.jsx)(Xa,{children:(0,ao.jsx)(fa,{children:t&&!l&&t.map(g=>(0,ao.jsx)(ea,{children:(0,ao.jsx)(Ia,{asChild:!0,size:"sm",children:(0,ao.jsxs)(u,{href:g.url||"",children:[g.icon&&(0,ao.jsx)(g.icon,{}),(0,ao.jsx)("span",{children:g.label})]})})},g.label))})})})]}),(0,ao.jsx)(ar,{})]})}function wf({subNav:e,pathName:t,Link:a}){let o=e,s=!1;return o.links&&o.links.map(r=>{r.url===t&&(s=!0)}),(0,ao.jsx)(oo,{defaultOpen:!0,className:"group/collapsible",children:(0,ao.jsx)(Aa,{className:"py-0",children:(0,ao.jsx)(fa,{children:(0,ao.jsx)(oo,{asChild:!0,defaultOpen:o.isActive,children:(0,ao.jsxs)(ea,{children:[(0,ao.jsx)(Ia,{asChild:!0,tooltip:o.label,className:(0,Mm.default)(s&&"font-bold text-accent"),children:(0,ao.jsxs)(a,{href:o.url,children:[o.icon&&(0,ao.jsx)(o.icon,{}),(0,ao.jsx)("span",{children:o.label})]})}),o.links?.length?(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(Eo,{asChild:!0,children:(0,ao.jsxs)(cs,{className:"data-[state=open]:rotate-90",children:[(0,ao.jsx)(Ip.ChevronRight,{}),(0,ao.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,ao.jsx)(Fo,{children:(0,ao.jsx)(zo,{children:o.links?.map(r=>(0,ao.jsx)(jo,{children:(0,ao.jsx)(Ho,{asChild:!0,className:(0,Mm.default)(r.url===t&&"font-bold text-accent"),children:(0,ao.jsx)(a,{href:r.url,children:(0,ao.jsx)("span",{children:r.label})})})},r.label))})})]}):null]})},o.label)})})})}var kf=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,ao.jsx)("header",{className:"border-b Fn-white/80 backdrop-blur-md dark:Fn-slate-900/80 sticky top-0 z-50",children:(0,ao.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,ao.jsx)(b,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,ao.jsx)(Ip.Menu,{className:"h-5 w-5"})}),(0,ao.jsx)("h1",{className:"text-2xl font-bold Fn-gradient-Ip-r from-blue-600 Ip-purple-600 Fn-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,ao.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,ao.jsxs)(b,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,ao.jsx)(Ip.Bell,{className:"h-5 w-5"}),(0,ao.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 Fn-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),(0,ao.jsxs)(Tr,{children:[(0,ao.jsx)(Rr,{asChild:!0,children:(0,ao.jsx)(b,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,ao.jsxs)(nt,{className:"h-10 w-10",children:[(0,ao.jsx)($t,{src:"/avatars/01.png",alt:"@user"}),(0,ao.jsx)(lt,{children:"JD"})]})})}),(0,ao.jsxs)(Qo,{className:"w-56",align:"end",forceMount:!0,children:[(0,ao.jsx)(zi,{className:"font-normal",children:(0,ao.jsxs)("div",{className:"flex flex-col space-ao-1",children:[(0,ao.jsx)("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,ao.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,ao.jsx)(ji,{}),(0,ao.jsxs)(ro,{children:[(0,ao.jsx)(Ip.User,{className:"mr-2 h-4 w-4"}),(0,ao.jsx)("span",{children:"Profile"})]}),(0,ao.jsxs)(ro,{children:[(0,ao.jsx)(Ip.Settings,{className:"mr-2 h-4 w-4"}),(0,ao.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var Sf="../cortex-reply-light-27IMI3G7.png";var Pf="../cortex-reply-dark-XPAJJJYY.png";function Bm({...e}){return(0,ao.jsxs)("div",{className:"Fn-sidebar",children:[(0,ao.jsx)(cm,{isMenuOpen:!0,logoLight:Sf,logoDark:Pf,...e.header,className:"Fn-sidebar",wide:!0}),(0,ao.jsxs)(ds,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-ao-clip",children:[(0,ao.jsx)(id,{...e.sidebarLeft,className:"flex-none top-24"}),(0,ao.jsxs)(Vi,{className:"grow overflow-hidden",children:[(0,ao.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,ao.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,ao.jsx)(Ui,{className:"-ml-1"}),(0,ao.jsx)(ls,{orientation:"vertical",className:"mr-2 h-4"}),(0,ao.jsx)(Mi,{children:(0,ao.jsxs)(Bi,{children:[(0,ao.jsx)(Ws,{className:"hidden md:block",children:(0,ao.jsx)(Li,{href:"#",children:"Building Your Application"})}),(0,ao.jsx)(Fi,{className:"hidden md:block"}),(0,ao.jsx)(Ws,{children:(0,ao.jsx)(Ei,{children:"Data Fetching"})})]})})]})}),(0,ao.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 ao-0",children:[(0,ao.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,ao.jsx)("div",{className:"aspect-video rounded-xl Fn-muted/50"}),(0,ao.jsx)("div",{className:"aspect-video rounded-xl Fn-muted/50"}),(0,ao.jsx)("div",{className:"aspect-video rounded-xl Fn-muted/50"})]}),(0,ao.jsx)("div",{className:"flex-1 rounded-xl Fn-muted/50 md:min-h-min"})]})]})]}),(0,ao.jsx)($n,{})]})}var Df=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:s,onDeleteProject:r,onAddProject:n,onUpdateEpic:i,onDeleteEpic:l,onAddEpic:c,onAddSprint:d,onUpdateSprint:p,onDeleteSprint:u,onViewChange:g,mobileMenuOpen:x,onToggleMobileMenu:v})=>{let[h,N]=(0,Fn.useState)(null),[k,w]=(0,Fn.useState)(null),[R,T]=(0,Fn.useState)(null),[j,le]=(0,Fn.useState)(null),[D,z]=(0,Fn.useState)({name:"",description:""}),[Y,Ce]=(0,Fn.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[S,A]=(0,Fn.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[C,re]=(0,Fn.useState)(!1),[Se,X]=(0,Fn.useState)(!1),[ve,Ge]=(0,Fn.useState)({name:"",description:""}),[V,ne]=(0,Fn.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),ye=["Fn-brand-blue","Fn-brand-green","Fn-brand-plum","Fn-brand-orange","Fn-destructive","Fn-warning","Fn-brand-cyan","Fn-accent"],xe=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],ht=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],L=I=>{w(I.id),z({name:I.name,description:I.description||""})},gt=()=>{k&&D.name.trim()&&(s(k,{name:D.name.trim(),description:D.description.trim()}),w(null))},Tt=()=>{w(null),z({name:"",description:""})},_a=()=>{ve.name.trim()&&(n({name:ve.name.trim(),description:ve.description.trim(),isSelected:!1}),Ge({name:"",description:""}),re(!1))},qo=I=>{s(I,{isSelected:!0})},is=I=>{T(I.id),Ce({name:I.name,description:I.description||"",color:I.color,confidence:I.confidence,phase:I.phase,startDate:I.startDate.toISOString().split("T")[0],endDate:I.endDate.toISOString().split("T")[0],progress:I.progress})},zs=()=>{R&&Y.name.trim()&&(i(R,{name:Y.name.trim(),description:Y.description.trim(),color:Y.color,confidence:Y.confidence,phase:Y.phase,startDate:new Date(Y.startDate),endDate:new Date(Y.endDate),progress:Y.progress}),T(null))},Ti=()=>{T(null),Ce({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},js=I=>{le(I.id),A({name:I.name,description:I.description||"",startDate:I.startDate.toISOString().split("T")[0],endDate:I.endDate.toISOString().split("T")[0],isActive:I.isActive})},Hs=()=>{j&&S.name.trim()&&(p(j,{name:S.name.trim(),description:S.description.trim(),startDate:new Date(S.startDate),endDate:new Date(S.endDate),isActive:S.isActive}),le(null))},Os=()=>{le(null),A({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Sr=()=>{V.name.trim()&&(d({name:V.name.trim(),description:V.description.trim(),startDate:new Date(V.startDate),endDate:new Date(V.endDate),isActive:V.isActive,isSelected:!1}),ne({name:"",description:"",startDate:"",endDate:"",isActive:!1}),X(!1))},ns=I=>{p(I,{isSelected:!0})},Ri=I=>I.toLocaleDateString("ao-US",{month:"short",day:"numeric",year:"numeric"}),Nt=I=>{let G=xe.find(We=>We.value===I);return G?{label:G.label,color:G.color}:{label:"Medium",color:"text-warning"}},Ra=I=>{let G=ht.find(We=>We.value===I);return G?{label:G.label,color:G.color}:{label:"Phase 1",color:"text-primary"}};return(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsxs)("div",{className:`absolute h-full w-12 Fn-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${x?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,ao.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,ao.jsxs)("button",{onClick:()=>{g("kanban"),N(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="kanban"?"Fn-primary":"Fn-primary/75 hover:Fn-primary"} hover:w-28 hover:justify-start hover:pl-3 z-50`,title:"Kanban View",children:[(0,ao.jsx)(Ip.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,ao.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),(0,ao.jsxs)("button",{onClick:()=>{g("planning"),N(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="planning"?"Fn-brand-plum":"Fn-brand-plum/75 hover:Fn-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[(0,ao.jsx)(Ip.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,ao.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),(0,ao.jsxs)("button",{onClick:()=>N(h==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${h==="projects"?"Fn-sidebar-accent":"Fn-sidebar-primary hover:Fn-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[(0,ao.jsx)(Ip.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,ao.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),(0,ao.jsxs)("button",{onClick:()=>{g("epics"),N(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="epics"?"Fn-primary":"Fn-primary/75 hover:Fn-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,ao.jsx)(Ip.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,ao.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),(0,ao.jsxs)("button",{onClick:()=>N(h==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${h==="sprints"?"Fn-brand-green":"Fn-brand-green/75 hover:Fn-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[(0,ao.jsx)(Ip.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,ao.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),(0,ao.jsxs)("button",{onClick:()=>{g("files"),N(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="files"?"Fn-brand-orange":"Fn-brand-orange/75 hover:Fn-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,ao.jsx)(Ip.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,ao.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),(0,ao.jsxs)("button",{onClick:()=>{g("tasks"),N(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="tasks"?"Fn-brand-cyan":"Fn-brand-cyan/75 hover:Fn-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[(0,ao.jsx)(Ip.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,ao.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),x&&(0,ao.jsx)("div",{className:"md:hidden fixed inset-0 Fn-background/80 backdrop-blur-sm z-20",onClick:v}),h&&(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)("div",{className:"fixed inset-0 Fn-background/80 backdrop-blur-sm z-40",onClick:()=>N(null)}),(0,ao.jsxs)("div",{className:"absolute left-12 w-80 md:w-96 Fn-card shadow-lg z-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[(0,ao.jsxs)("div",{className:"p-3 md:p-4 border-b flex items-center justify-between",children:[(0,ao.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[h==="projects"&&"Projects",h==="epics"&&"Manage Epics",h==="sprints"&&"Manage Sprints",h==="files"&&"Files"]}),(0,ao.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>N(null),children:(0,ao.jsx)(Ip.X,{className:"h-4 w-4"})})]}),(0,ao.jsxs)("div",{className:"p-3 md:p-4 space-ao-4 h-full overflow-ao-auto",children:[h==="projects"&&(0,ao.jsx)(F,{className:"p-3",children:(0,ao.jsxs)("div",{className:"space-ao-3",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,ao.jsxs)(b,{size:"sm",onClick:()=>re(!0),className:"gap-1",children:[(0,ao.jsx)(Ip.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),C&&(0,ao.jsxs)("div",{className:"border rounded-lg p-2 space-ao-2",children:[(0,ao.jsx)($,{value:ve.name,onChange:I=>Ge(G=>({...G,name:I.target.value})),placeholder:"Project name",className:"text-sm"}),(0,ao.jsx)(et,{value:ve.description,onChange:I=>Ge(G=>({...G,description:I.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,ao.jsxs)("div",{className:"flex gap-1",children:[(0,ao.jsx)(b,{size:"sm",onClick:_a,className:"text-xs h-6",children:"Save"}),(0,ao.jsx)(b,{size:"sm",variant:"outline",onClick:()=>re(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,ao.jsx)("div",{className:"space-ao-2",children:e.map(I=>(0,ao.jsx)("div",{className:"border rounded p-2",children:k===I.id?(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)($,{value:D.name,onChange:G=>z(We=>({...We,name:G.target.value})),placeholder:"Project name",className:"text-sm"}),(0,ao.jsx)(et,{value:D.description,onChange:G=>z(We=>({...We,description:G.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,ao.jsxs)("div",{className:"flex gap-1",children:[(0,ao.jsx)(b,{size:"sm",onClick:gt,className:"text-xs h-6",children:"Save"}),(0,ao.jsx)(b,{size:"sm",variant:"outline",onClick:Tt,className:"text-xs h-6",children:"Cancel"})]})]}):(0,ao.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${I.isSelected?"Fn-primary/10 border-primary ring-2 ring-primary/20":"hover:Fn-muted"}`,onClick:()=>qo(I.id),children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ao.jsx)(Ip.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,ao.jsx)("span",{className:"font-medium text-xs",children:I.name})]}),I.description&&(0,ao.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:I.description}),(0,ao.jsxs)("div",{className:"flex gap-1",onClick:G=>G.stopPropagation(),children:[(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>L(I),className:"h-5 px-1",children:(0,ao.jsx)(Ip.Edit2,{className:"h-3 w-3"})}),(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>r(I.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,ao.jsx)(Ip.Trash2,{className:"h-3 w-3"})})]})]})},I.id))})]})}),h==="epics"&&(0,ao.jsx)(F,{className:"p-3",children:(0,ao.jsxs)("div",{className:"space-ao-3",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,ao.jsxs)(b,{size:"sm",onClick:c,className:"gap-1",children:[(0,ao.jsx)(Ip.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,ao.jsx)("div",{className:"space-ao-4",children:t.map(I=>(0,ao.jsx)("div",{className:"border rounded-lg p-3",children:R===I.id?(0,ao.jsxs)("div",{className:"space-ao-3",children:[(0,ao.jsx)($,{value:Y.name,onChange:G=>Ce(We=>({...We,name:G.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,ao.jsx)(et,{value:Y.description,onChange:G=>Ce(We=>({...We,description:G.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)("label",{className:"text-xs font-medium",children:"Color"}),(0,ao.jsx)("div",{className:"flex gap-1 flex-wrap",children:ye.map(G=>(0,ao.jsx)("button",{onClick:()=>Ce(We=>({...We,color:G})),className:`w-6 h-6 rounded-full ${G} ${Y.color===G?"ring-2 ring-ring":""}`},G))})]}),(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,ao.jsxs)("div",{className:"space-ao-1",children:[(0,ao.jsx)("label",{className:"text-xs font-medium",children:"Confidence"}),(0,ao.jsxs)(Fe,{value:Y.confidence,onValueChange:G=>Ce(We=>({...We,confidence:G})),children:[(0,ao.jsx)(Me,{className:"h-8 text-xs",children:(0,ao.jsx)(_e,{})}),(0,ao.jsx)(Be,{children:xe.map(G=>(0,ao.jsx)(_,{value:G.value,children:(0,ao.jsx)("span",{className:G.color,children:G.label})},G.value))})]})]}),(0,ao.jsxs)("div",{className:"space-ao-1",children:[(0,ao.jsx)("label",{className:"text-xs font-medium",children:"Phase"}),(0,ao.jsxs)(Fe,{value:Y.phase.toString(),onValueChange:G=>Ce(We=>({...We,phase:parseInt(G)})),children:[(0,ao.jsx)(Me,{className:"h-8 text-xs",children:(0,ao.jsx)(_e,{})}),(0,ao.jsx)(Be,{children:ht.map(G=>(0,ao.jsx)(_,{value:G.value.toString(),children:(0,ao.jsx)("span",{className:G.color,children:G.label})},G.value))})]})]})]}),(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,ao.jsxs)("div",{className:"space-ao-1",children:[(0,ao.jsx)("label",{className:"text-xs font-medium",children:"Start Date"}),(0,ao.jsx)($,{type:"date",value:Y.startDate,onChange:G=>Ce(We=>({...We,startDate:G.target.value})),className:"text-xs h-8"})]}),(0,ao.jsxs)("div",{className:"space-ao-1",children:[(0,ao.jsx)("label",{className:"text-xs font-medium",children:"End Date"}),(0,ao.jsx)($,{type:"date",value:Y.endDate,onChange:G=>Ce(We=>({...We,endDate:G.target.value})),className:"text-xs h-8"})]})]}),(0,ao.jsxs)("div",{className:"space-ao-1",children:[(0,ao.jsx)("label",{className:"text-xs font-medium",children:"Progress (%)"}),(0,ao.jsx)($,{type:"number",min:"0",max:"100",value:Y.progress,onChange:G=>Ce(We=>({...We,progress:parseInt(G.target.value)||0})),className:"text-xs h-8"})]}),(0,ao.jsxs)("div",{className:"flex gap-2",children:[(0,ao.jsx)(b,{size:"sm",onClick:zs,className:"text-xs",children:"Save"}),(0,ao.jsx)(b,{size:"sm",variant:"outline",onClick:Ti,className:"text-xs",children:"Cancel"})]})]}):(0,ao.jsxs)("div",{className:`cursor-pointer p-2 rounded transition-colors ${I.isSelected?"Fn-primary/10 border-primary":"hover:Fn-muted"}`,onClick:()=>i(I.id,{isSelected:!I.isSelected}),children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,ao.jsx)("div",{className:`w-3 h-3 rounded-full ${I.color}`}),(0,ao.jsx)("span",{className:"font-medium text-sm",children:I.name})]}),I.description&&(0,ao.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:I.description}),(0,ao.jsxs)("div",{className:"space-ao-1 mb-2",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ao.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,ao.jsx)("span",{className:Nt(I.confidence).color,children:Nt(I.confidence).label})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ao.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,ao.jsx)("span",{className:Ra(I.phase).color,children:Ra(I.phase).label})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ao.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,ao.jsxs)("span",{className:"text-foreground",children:[Ri(I.startDate)," - ",Ri(I.endDate)]})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ao.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)("div",{className:"w-12 h-2 Fn-muted rounded-full",children:(0,ao.jsx)("div",{className:"h-2 Fn-primary rounded-full",style:{width:`${I.progress}%`}})}),(0,ao.jsxs)("span",{className:"text-foreground",children:[I.progress,"%"]})]})]})]}),(0,ao.jsxs)("div",{className:"flex gap-1",onClick:G=>G.stopPropagation(),children:[(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>is(I),className:"h-6 px-2",children:(0,ao.jsx)(Ip.Edit2,{className:"h-3 w-3"})}),(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>l(I.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,ao.jsx)(Ip.Trash2,{className:"h-3 w-3"})})]})]})},I.id))})]})}),h==="sprints"&&(0,ao.jsx)(F,{className:"p-3",children:(0,ao.jsxs)("div",{className:"space-ao-3",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,ao.jsxs)(b,{size:"sm",onClick:()=>X(!0),className:"gap-1",children:[(0,ao.jsx)(Ip.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),Se&&(0,ao.jsxs)("div",{className:"border rounded-lg p-2 space-ao-2",children:[(0,ao.jsx)($,{value:V.name,onChange:I=>ne(G=>({...G,name:I.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,ao.jsx)($,{type:"date",value:V.startDate,onChange:I=>ne(G=>({...G,startDate:I.target.value})),className:"text-xs"}),(0,ao.jsx)($,{type:"date",value:V.endDate,onChange:I=>ne(G=>({...G,endDate:I.target.value})),className:"text-xs"})]}),(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)("input",{type:"checkbox",checked:V.isActive,onChange:I=>ne(G=>({...G,isActive:I.target.checked})),className:"w-3 h-3"}),(0,ao.jsx)("span",{className:"text-xs",children:"Active"})]}),(0,ao.jsxs)("div",{className:"flex gap-1",children:[(0,ao.jsx)(b,{size:"sm",onClick:Sr,className:"text-xs h-6",children:"Save"}),(0,ao.jsx)(b,{size:"sm",variant:"outline",onClick:()=>X(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,ao.jsx)("div",{className:"space-ao-2",children:a.map(I=>(0,ao.jsx)("div",{className:"border rounded p-2",children:j===I.id?(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)($,{value:S.name,onChange:G=>A(We=>({...We,name:G.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:I.id==="backlog"||I.id==="all-tasks"}),I.id!=="backlog"&&I.id!=="all-tasks"&&(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,ao.jsx)($,{type:"date",value:S.startDate,onChange:G=>A(We=>({...We,startDate:G.target.value})),className:"text-xs"}),(0,ao.jsx)($,{type:"date",value:S.endDate,onChange:G=>A(We=>({...We,endDate:G.target.value})),className:"text-xs"})]}),(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)("input",{type:"checkbox",checked:S.isActive,onChange:G=>A(We=>({...We,isActive:G.target.checked})),className:"w-3 h-3"}),(0,ao.jsx)("span",{className:"text-xs",children:"Active"})]})]}),(0,ao.jsxs)("div",{className:"flex gap-1",children:[(0,ao.jsx)(b,{size:"sm",onClick:Hs,className:"text-xs h-6",children:"Save"}),(0,ao.jsx)(b,{size:"sm",variant:"outline",onClick:Os,className:"text-xs h-6",children:"Cancel"})]})]}):(0,ao.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${I.isSelected?"Fn-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:Fn-muted"}`,onClick:()=>ns(I.id),children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ao.jsx)(Ip.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,ao.jsx)("span",{className:"font-medium text-xs",children:I.name}),I.isActive&&(0,ao.jsx)("span",{className:"text-xs Fn-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(I.id==="backlog"||I.id==="all-tasks")&&(0,ao.jsx)("span",{className:"text-xs Fn-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),I.id!=="backlog"&&I.id!=="all-tasks"&&(0,ao.jsxs)("p",{className:"text-xs text-muted-foreground mb-1",children:[I.startDate.toLocaleDateString()," - ",I.endDate.toLocaleDateString()]}),(0,ao.jsxs)("div",{className:"flex gap-1",onClick:G=>G.stopPropagation(),children:[(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>js(I),className:"h-5 px-1",children:(0,ao.jsx)(Ip.Edit2,{className:"h-3 w-3"})}),I.id!=="backlog"&&I.id!=="all-tasks"&&(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>u(I.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,ao.jsx)(Ip.Trash2,{className:"h-3 w-3"})})]})]})},I.id))})]})})]})]})]})]})},nd=e=>(0,ao.jsx)(ds,{children:(0,ao.jsxs)("div",{className:"flex w-full",children:[(0,ao.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,ao.jsx)(Df,{...e})}),(0,ao.jsx)("div",{className:"md:hidden",children:(0,ao.jsx)(Df,{...e})}),(0,ao.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:(0,ao.jsx)("div",{className:"w-full",children:e.children})})]})});var ld=({label:e,value:t,onValueChange:a,options:o,placeholder:s="Search...",allowCustomValue:r=!1,disabled:n=!1})=>{let[i,l]=(0,Fn.useState)(!1),[c,d]=(0,Fn.useState)(""),p=o.find(h=>h.value===t),u=o.filter(h=>h.label.toLowerCase().includes(c.toLowerCase())),g=h=>{a(h),l(!1),d("")},x=()=>{r&&c.trim()&&!o.find(h=>h.value===c.trim())&&(a(c.trim()),l(!1),d(""))};return(0,ao.jsxs)("div",{className:"space-ao-1",children:[(0,ao.jsx)(P,{className:"text-xs text-muted-foreground",children:e}),(0,ao.jsxs)(Fe,{value:t,onValueChange:g,open:i,onOpenChange:h=>{n||l(h)},disabled:n,children:[(0,ao.jsx)(Me,{className:"h-auto p-0 border-none Fn-transparent hover:Fn-muted/50 rounded-md",children:(0,ao.jsx)(q,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:Fn-muted transition-colors`,onClick:()=>!n&&l(!i),children:p?.label||t||"Select..."})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)("div",{className:"p-2",children:(0,ao.jsx)($,{placeholder:s,value:c,onChange:h=>d(h.target.value),onKeyDown:h=>{h.key==="Enter"&&r&&x()},className:"mb-2"})}),u.map(h=>(0,ao.jsx)(_,{value:h.value,children:h.label},h.value)),r&&c.trim()&&!u.find(h=>h.value===c.trim())&&(0,ao.jsxs)(_,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function hi({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:s=!0,compact:r=!1,className:n}){let[i,l]=(0,Fn.useState)(!1),c=u=>{switch(u){case"active":return"Fn-green-500";case"inactive":return"Fn-gray-500";default:return"Fn-gray-500"}},d=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},p=u=>{if(!u)return"Never";let x=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return x<1?"Just now":x<60?`${x}m ago`:x<1440?`${Math.floor(x/60)}h ago`:`${Math.floor(x/1440)}d ago`};return(0,ao.jsxs)(F,{className:m("hover:shadow-md transition-shadow",r&&"p-2",n),children:[(0,ao.jsx)(ge,{className:m("pb-3",r&&"pb-2"),children:(0,ao.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ao.jsx)("div",{className:"relative",children:(0,ao.jsxs)(nt,{className:m("h-12 w-12",r&&"h-8 w-8"),children:[(0,ao.jsx)($t,{src:"/placeholder.svg",alt:e.name}),(0,ao.jsx)(lt,{children:e.name.split(" ").map(u=>u[0]).join("")})]})}),(0,ao.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)("h3",{className:m("font-semibold text-sm truncate",r&&"text-xs"),children:e.name}),e.type==="digital"?(0,ao.jsx)(Ip.Bot,{className:m("h-4 w-4 text-blue-500",r&&"h-3 w-3")}):(0,ao.jsx)(Ip.User,{className:m("h-4 w-4 text-green-500",r&&"h-3 w-3")})]}),(0,ao.jsx)("p",{className:m("text-sm text-muted-foreground truncate",r&&"text-xs"),children:e.type==="human"?e.role:e.description}),!r&&(0,ao.jsxs)("div",{className:"flex items-center gap-2 ao-1",children:[e.type==="human"&&(0,ao.jsx)(q,{variant:"secondary",className:"text-xs",children:e.department}),e.type==="digital"&&(0,ao.jsxs)(q,{variant:"secondary",className:"text-xs",children:["v",e.version]}),(0,ao.jsx)(q,{variant:"outline",className:"text-xs",children:d(e.status)})]})]})]}),s&&(0,ao.jsxs)(Tr,{children:[(0,ao.jsx)(Rr,{asChild:!0,children:(0,ao.jsx)(b,{variant:"ghost",size:"icon",className:m("h-8 w-8",r&&"h-6 w-6"),children:(0,ao.jsx)(Ip.MoreHorizontal,{className:m("h-4 w-4",r&&"h-3 w-3")})})}),(0,ao.jsxs)(Qo,{align:"end",children:[(0,ao.jsxs)(ro,{onClick:()=>o?.(e),children:[(0,ao.jsx)(Ip.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,ao.jsxs)(ro,{onClick:()=>t?.(e),children:[(0,ao.jsx)(Ip.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]}),(0,ao.jsxs)(ro,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,ao.jsx)(Ip.Trash2,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),!r&&(0,ao.jsxs)(J,{className:"ao-0",children:[(0,ao.jsxs)("div",{className:"space-ao-2 text-sm",children:[e.type==="human"&&(0,ao.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,ao.jsx)(Ip.Mail,{className:"h-3 w-3"}),(0,ao.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,ao.jsxs)(ao.Fragment,{children:[e.phone&&(0,ao.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,ao.jsx)(Ip.Phone,{className:"h-3 w-3"}),(0,ao.jsx)("span",{children:e.phone})]}),e.location&&(0,ao.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,ao.jsx)(Ip.MapPin,{className:"h-3 w-3"}),(0,ao.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,ao.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,ao.jsx)(Ip.Settings,{className:"h-3 w-3"}),(0,ao.jsxs)("span",{children:["v",e.version]})]}),(0,ao.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,ao.jsx)(Ip.Clock,{className:"h-3 w-3"}),(0,ao.jsxs)("span",{children:["Last active: ",p(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,ao.jsx)("div",{className:"ao-3",children:(0,ao.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,i?e.skills.length:3).map(u=>(0,ao.jsx)(q,{variant:"outline",className:"text-xs",children:u},u)),e.skills.length>3&&(0,ao.jsx)(b,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>l(!i),children:i?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,ao.jsx)("div",{className:"ao-3",children:(0,ao.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,i?e.capabilities.length:2).map(u=>(0,ao.jsx)(q,{variant:"outline",className:"text-xs",children:u},u)),e.capabilities.length>2&&(0,ao.jsx)(b,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>l(!i),children:i?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}function Em({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:s="Search knowledge documents...",maxSelections:r,disabled:n=!1}){let[i,l]=(0,Fn.useState)(""),[c,d]=(0,Fn.useState)([]),[p,u]=(0,Fn.useState)(!1);(0,Fn.useEffect)(()=>{if(!i.trim()){d([]),u(!1);return}let h=a.filter(N=>{if(e.map(R=>R.id).includes(N.id))return!1;let w=i.toLowerCase();return N.title.toLowerCase().includes(w)||N.description?.toLowerCase().includes(w)||N.tags?.some(R=>R.toLowerCase().includes(w))||Object.values(N.metadata||{}).some(R=>String(R).toLowerCase().includes(w))});d(h),u(!0)},[i,e,a]);let g=h=>{r&&e.length>=r||(t([...e,h]),l(""),u(!1))},x=h=>{t(e.filter(N=>N.id!==h))},v=!r||e.length<r;return(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:o}),(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsx)(Ip.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ao.jsx)($,{value:i,onChange:h=>l(h.target.value),placeholder:v?s:`Maximum ${r} documents selected`,className:"pl-9",disabled:n||!v,onFocus:()=>i&&u(!0)})]}),p&&c.length>0&&(0,ao.jsx)(F,{className:"absolute top-full left-0 right-0 z-10 ao-1 max-h-60",children:(0,ao.jsx)(jt,{className:"h-full",children:(0,ao.jsx)(J,{className:"p-2",children:c.map(h=>(0,ao.jsx)(b,{variant:"ghost",className:"w-full justify-start h-auto p-3 mb-1",onClick:()=>g(h),disabled:n,children:(0,ao.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,ao.jsx)(Ip.FileText,{className:"h-4 w-4 ao-0.5 text-muted-foreground flex-shrink-0"}),(0,ao.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,ao.jsx)("div",{className:"font-medium text-sm truncate",children:h.title}),h.description&&(0,ao.jsx)("div",{className:"text-xs text-muted-foreground ao-1 line-clamp-2",children:h.description}),h.tags&&h.tags.length>0&&(0,ao.jsxs)("div",{className:"flex flex-wrap gap-1 ao-2",children:[h.tags.slice(0,3).map(N=>(0,ao.jsx)(q,{variant:"outline",className:"text-xs",children:N},N)),h.tags.length>3&&(0,ao.jsxs)(q,{variant:"outline",className:"text-xs",children:["+",h.tags.length-3," more"]})]})]})]})},h.id))})})}),p&&i&&c.length===0&&(0,ao.jsx)(F,{className:"absolute top-full left-0 right-0 z-10 ao-1",children:(0,ao.jsxs)(J,{className:"p-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',i,'"']})})]}),e.length>0&&(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,r&&`/${r}`,")"]}),(0,ao.jsx)("div",{className:"space-ao-2",children:e.map(h=>(0,ao.jsx)(F,{className:"p-3",children:(0,ao.jsxs)("div",{className:"flex items-start gap-3",children:[(0,ao.jsx)(Ip.FileText,{className:"h-4 w-4 ao-0.5 text-muted-foreground flex-shrink-0"}),(0,ao.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ao.jsx)("div",{className:"font-medium text-sm",children:h.title}),h.description&&(0,ao.jsx)("div",{className:"text-xs text-muted-foreground ao-1",children:h.description}),h.tags&&h.tags.length>0&&(0,ao.jsx)("div",{className:"flex flex-wrap gap-1 ao-2",children:h.tags.map(N=>(0,ao.jsxs)(q,{variant:"outline",className:"text-xs",children:[(0,ao.jsx)(Ip.Tag,{className:"h-3 w-3 mr-1"}),N]},N))})]}),(0,ao.jsx)(b,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>x(h.id),disabled:n,children:(0,ao.jsx)(Ip.X,{className:"h-3 w-3"})})]})},h.id))})]}),p&&(0,ao.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}function hn({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:r,cancelLabel:n="Cancel",readOnly:i=!1,availableKnowledgeDocuments:l=[]}){let[c,d]=(0,Fn.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[p,u]=(0,Fn.useState)(""),[g,x]=(0,Fn.useState)(""),[v,h]=(0,Fn.useState)(!i);(0,Fn.useEffect)(()=>{e&&d(e)},[e]);let N=D=>{D.preventDefault();let z=c.version?parseInt(c.version):0,Y=e?(z+1).toString():"1",Ce={id:c.id||Date.now().toString(),name:c.name,type:"digital",status:"active",joinedDate:c.joinedDate||new Date,lastActive:c.lastActive||new Date,description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],knowledge:c.knowledge||[],coreKnowledge:c.coreKnowledge||[],version:Y,lastUpdated:c.lastUpdated||new Date,isActive:!0};t(Ce)},k=(D,z,Y)=>{if(!z.trim())return;let Ce=c[D]||[];d({...c,[D]:[...Ce,z.trim()]}),Y("")},w=(D,z)=>{let Y=c[D]||[];d({...c,[D]:Y.filter((Ce,S)=>S!==z)})},R=D=>{D.preventDefault(),h(!v)},T=(D,z,Y,Ce,S)=>{let A=c[D]||[];return(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:z}),v&&(0,ao.jsxs)("div",{className:"flex gap-2",children:[(0,ao.jsx)($,{value:Y,onChange:C=>Ce(C.target.value),placeholder:S,onKeyPress:C=>{C.key==="Enter"&&(C.preventDefault(),k(D,Y,Ce))},disabled:o}),(0,ao.jsx)(b,{type:"button",variant:"outline",size:"icon",onClick:()=>k(D,Y,Ce),disabled:o,children:(0,ao.jsx)(Ip.Plus,{className:"h-4 w-4"})})]}),(0,ao.jsx)("div",{className:"flex flex-wrap gap-2",children:A.map((C,re)=>(0,ao.jsxs)(q,{className:"gap-1",children:[C,v&&(0,ao.jsx)(b,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:Fn-accent hover:text-accent-foreground",onClick:()=>w(D,re),disabled:o,children:(0,ao.jsx)(Ip.X,{className:"h-3 w-3"})})]},`${D}-${re}-${C}`))})]})},j=s||(v?e?"Edit Colleague":"Add New Colleague":"View Colleague"),le=r||(e?"Update Colleague":"Add Colleague");return(0,ao.jsxs)(F,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,ao.jsx)(ge,{children:(0,ao.jsxs)(be,{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.Bot,{className:"h-5 w-5"}),j]})}),(0,ao.jsx)(J,{children:(0,ao.jsxs)("form",{onSubmit:N,className:"space-ao-6",children:[(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"name",children:"Name *"}),(0,ao.jsx)($,{id:"name",value:c.name||"",onChange:D=>d({...c,name:D.target.value}),required:!0,disabled:o||!v})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ao.jsx)(et,{id:"description",value:c.description||"",onChange:D=>d({...c,description:D.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!v})]})]}),(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"jobDescription",children:"Job Description *"}),(0,ao.jsx)(et,{id:"jobDescription",value:c.jobDescription||"",onChange:D=>d({...c,jobDescription:D.target.value}),rows:4,required:c.type==="digital",disabled:o||!v})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,ao.jsx)(et,{id:"workInstructions",value:c.workInstructions||"",onChange:D=>d({...c,workInstructions:D.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!v})]}),T("capabilities","Capabilities",g,x,"Add capability"),(0,ao.jsx)(Em,{selectedDocuments:c.knowledge||[],onDocumentsChange:D=>d({...c,knowledge:D}),label:"Knowledge",placeholder:"Search for knowledge documents Ip add...",disabled:o||!v,availableDocuments:l}),(0,ao.jsx)(Em,{selectedDocuments:c.coreKnowledge||[],onDocumentsChange:D=>d({...c,coreKnowledge:D}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!v,availableDocuments:l})]}),(0,ao.jsxs)("div",{className:"flex justify-end gap-2 ao-4 border-t",children:[(0,ao.jsx)(b,{type:"button",variant:"outline",onClick:a,disabled:o,children:v?n:"Close"}),v?(0,ao.jsx)(b,{type:"submit",disabled:o,children:o?"Saving...":le}):(0,ao.jsxs)(b,{type:"button",onClick:R,disabled:o,className:"gap-2",children:[(0,ao.jsx)(Ip.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function dd({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,ao.jsx)("div",{className:"px-2 md:px-4 py-4 space-ao-6",children:(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:[(0,ao.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,ao.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,ao.jsx)(Ip.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,ao.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague Ip add"})]})]}),(0,ao.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,ao.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,ao.jsxs)(ge,{className:"text-center pb-4",children:[(0,ao.jsx)("div",{className:"mx-auto w-16 h-16 Fn-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,ao.jsx)(Ip.User,{className:"h-8 w-8 text-blue-600"})}),(0,ao.jsx)(be,{className:"text-xl",children:"Add Human Colleague"})]}),(0,ao.jsxs)(J,{className:"text-center",children:[(0,ao.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization Ip add oi team members."}),(0,ao.jsxs)("div",{className:"space-ao-2 text-sm",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,ao.jsx)(Ip.Users,{className:"h-4 w-4 text-blue-600"}),(0,ao.jsx)("span",{children:"Browse existing users"})]}),(0,ao.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,ao.jsx)(Ip.User,{className:"h-4 w-4 text-blue-600"}),(0,ao.jsx)("span",{children:"Import user details automatically"})]})]}),(0,ao.jsx)(b,{className:"ao-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,ao.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,ao.jsxs)(ge,{className:"text-center pb-4",children:[(0,ao.jsx)("div",{className:"mx-auto w-16 h-16 Fn-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,ao.jsx)(Ip.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,ao.jsx)(be,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,ao.jsxs)(J,{className:"text-center",children:[(0,ao.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,ao.jsxs)("div",{className:"space-ao-2 text-sm",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,ao.jsx)(Ip.Bot,{className:"h-4 w-4 text-purple-600"}),(0,ao.jsx)("span",{children:"Clone existing colleagues"})]}),(0,ao.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,ao.jsx)(Ip.Users,{className:"h-4 w-4 text-purple-600"}),(0,ao.jsx)("span",{children:"Create from templates"})]})]}),(0,ao.jsx)(b,{className:"ao-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function cd({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[s,r]=(0,Fn.useState)(""),[n,i]=(0,Fn.useState)("all"),l=(0,Fn.useMemo)(()=>e.filter(p=>{let u=p.name.toLowerCase().includes(s.toLowerCase())||p.jobDescription.toLowerCase().includes(s.toLowerCase())||p.capabilities.some(x=>x.toLowerCase().includes(s.toLowerCase()))||p.workInstructions.toLowerCase().includes(s.toLowerCase()),g=n==="all"||p.status===n;return u&&g}),[e,s,n]),c=p=>{let u={...p,id:`${p.id}-clone-${Date.now()}`,name:`${p.name} (Copy)`,joinedDate:new Date,lastActive:new Date,lastUpdated:new Date,version:"1.0.0"};t(u)},d=p=>new Intl.DateTimeFormat("ao-US",{month:"short",day:"numeric",year:"numeric"}).format(p);return(0,ao.jsx)("div",{className:"px-2 md:px-4 py-4 space-ao-6",children:(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:[(0,ao.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,ao.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,ao.jsx)(Ip.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,ao.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague Ip clone"})]})]}),(0,ao.jsx)(F,{children:(0,ao.jsx)(J,{className:"ao-6",children:(0,ao.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,ao.jsx)("div",{className:"flex-1",children:(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsx)(Ip.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ao.jsx)($,{placeholder:"Search by name, job description, or capabilities...",value:s,onChange:p=>r(p.target.value),className:"pl-9"})]})}),(0,ao.jsxs)("select",{value:n,onChange:p=>i(p.target.value),className:"h-10 px-3 rounded-md border border-input Fn-background text-sm ring-offset-background",children:[(0,ao.jsx)("option",{value:"all",children:"All Status"}),(0,ao.jsx)("option",{value:"active",children:"Active"}),(0,ao.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,ao.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:l.map(p=>(0,ao.jsx)(oi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,ao.jsxs)(F,{className:`cursor-pointer transition-all hover:shadow-lg ${o===p.id?"ring-2 ring-primary":""}`,onClick:()=>c(p),children:[(0,ao.jsx)(ge,{className:"pb-3",children:(0,ao.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ao.jsx)(nt,{children:(0,ao.jsx)(lt,{className:"Fn-blue-100",children:(0,ao.jsx)(Ip.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,ao.jsxs)("div",{children:[(0,ao.jsxs)(be,{className:"text-lg flex items-center gap-2",children:[p.name,(0,ao.jsx)(q,{variant:p.status==="active"?"default":"secondary",className:"text-xs",children:p.status})]}),(0,ao.jsxs)("p",{className:"text-sm text-muted-foreground",children:["v",p.version]})]})]}),(0,ao.jsxs)(b,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(p)},children:[(0,ao.jsx)(Ip.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,ao.jsx)(J,{className:"ao-0",children:(0,ao.jsxs)("div",{className:"space-ao-3",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,ao.jsx)("p",{className:"text-sm line-clamp-2",children:p.jobDescription})]}),p.capabilities&&p.capabilities.length>0&&(0,ao.jsxs)("div",{children:[(0,ao.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,ao.jsxs)("div",{className:"flex flex-wrap gap-1",children:[p.capabilities.slice(0,3).map(u=>(0,ao.jsx)(q,{variant:"outline",className:"text-xs",children:u},u)),p.capabilities.length>3&&(0,ao.jsxs)(q,{variant:"outline",className:"text-xs",children:["+",p.capabilities.length-3]})]})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ao.jsx)(Ip.Calendar,{className:"h-3 w-3"}),(0,ao.jsxs)("span",{children:["Updated ",d(p.lastUpdated)]})]}),p.knowledge&&(0,ao.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ao.jsx)(Ip.Users,{className:"h-3 w-3"}),(0,ao.jsxs)("span",{children:[p.knowledge.length," docs"]})]})]}),p.workInstructions&&(0,ao.jsxs)("div",{children:[(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,ao.jsx)("p",{className:"text-xs line-clamp-2",children:p.workInstructions})]})]})})]})},p.id))}),l.length===0&&(0,ao.jsx)(F,{children:(0,ao.jsx)(J,{className:"ao-6",children:(0,ao.jsxs)("div",{className:"text-center py-8",children:[(0,ao.jsx)(Ip.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,ao.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,ao.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function md({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,ao.jsx)("div",{className:"px-2 md:px-4 py-4 space-ao-6",children:(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:[(0,ao.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,ao.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,ao.jsx)(Ip.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,ao.jsx)("p",{className:"text-muted-foreground",children:"Choose how Ip create your digital colleague"})]})]}),(0,ao.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,ao.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,ao.jsxs)(ge,{className:"text-center pb-4",children:[(0,ao.jsx)("div",{className:"mx-auto w-16 h-16 Fn-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,ao.jsx)(Ip.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,ao.jsx)(be,{className:"text-xl",children:"Clone Existing"})]}),(0,ao.jsxs)(J,{className:"text-center",children:[(0,ao.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize Ip for your needs."}),(0,ao.jsxs)("div",{className:"space-ao-2 text-sm",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,ao.jsx)(Ip.Bot,{className:"h-4 w-4 text-blue-600"}),(0,ao.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,ao.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,ao.jsx)(Ip.Copy,{className:"h-4 w-4 text-blue-600"}),(0,ao.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,ao.jsx)(b,{className:"ao-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,ao.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,ao.jsxs)(ge,{className:"text-center pb-4",children:[(0,ao.jsx)("div",{className:"mx-auto w-16 h-16 Fn-green-100 rounded-full flex items-center justify-center mb-4",children:(0,ao.jsx)(Ip.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,ao.jsx)(be,{className:"text-xl",children:"Create New"})]}),(0,ao.jsxs)(J,{className:"text-center",children:[(0,ao.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,ao.jsxs)("div",{className:"space-ao-2 text-sm",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,ao.jsx)(Ip.Plus,{className:"h-4 w-4 text-green-600"}),(0,ao.jsx)("span",{children:"Custom job description"})]}),(0,ao.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,ao.jsx)(Ip.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,ao.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,ao.jsx)(b,{className:"ao-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var Rf=H(require("react")),Nn=H(require("@radix-Fn/react-progress"));var wn=Rf.forwardRef(({className:e,value:t,...a},o)=>(0,ao.jsx)(Nn.Root,{ref:o,className:m("relative h-4 w-full overflow-hidden rounded-full Fn-secondary",e),...a,children:(0,ao.jsx)(Nn.Indicator,{className:"h-full w-full flex-1 Fn-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));wn.displayName=Nn.Root.displayName;function zm({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:s}){return(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.02,ao:-5},whileTap:{scale:.98},className:s,children:(0,ao.jsxs)(F,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,ao.jsx)(ge,{className:"pb-2",children:(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl Fn-muted",children:e.icon}),e.new?(0,ao.jsx)(q,{className:"rounded-xl Fn-amber-500",children:"New"}):(0,ao.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,ao.jsx)(Ip.Star,{className:"h-4 w-4"})})]})}),(0,ao.jsxs)(J,{className:"pb-2",children:[(0,ao.jsx)(be,{className:"text-lg",children:e.name}),(0,ao.jsx)(So,{children:e.description}),o&&e.progress<100&&(0,ao.jsxs)("div",{className:"ao-2",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,ao.jsx)("span",{children:"Installation"}),(0,ao.jsxs)("span",{children:[e.progress,"%"]})]}),(0,ao.jsx)(wn,{value:e.progress,className:"h-2 ao-1 rounded-xl"})]})]}),(0,ao.jsx)(Ya,{children:(0,ao.jsx)(b,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function Ci({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:r}){return(0,ao.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${r||""}`,children:[s&&(0,ao.jsxs)("div",{className:"Fn-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,ao.jsx)("div",{className:"col-span-6",children:"Name"}),(0,ao.jsx)("div",{className:"col-span-2",children:"Size"}),(0,ao.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,ao.jsx)("div",{className:"divide-ao",children:e.map(n=>(0,ao.jsxs)(oi.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,ao.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,ao.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl Fn-muted",children:n.icon}),(0,ao.jsx)("div",{children:(0,ao.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,ao.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:n.size}),(0,ao.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,ao.jsx)("span",{className:"text-sm md:text-base",children:n.modified}),(0,ao.jsxs)("div",{className:"flex gap-1",children:[(0,ao.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),a?.(n)},children:(0,ao.jsx)(Ip.Edit,{className:"h-4 w-4"})}),(0,ao.jsx)(b,{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,ao.jsx)(Ip.Trash2,{className:"h-4 w-4"})}),(0,ao.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",children:(0,ao.jsx)(Ip.MoreHorizontal,{className:"h-4 w-4"})})]})]})]},n.name))})]})}function pd({project:e,onOpen:t,onShare:a,className:o}){return(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.02,ao:-5},whileTap:{scale:.98},className:o,children:(0,ao.jsxs)(F,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,ao.jsxs)(ge,{children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)(be,{children:e.name}),(0,ao.jsxs)(q,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,ao.jsx)(So,{children:e.description})]}),(0,ao.jsxs)(J,{className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,ao.jsx)("span",{children:"Progress"}),(0,ao.jsxs)("span",{children:[e.progress,"%"]})]}),(0,ao.jsx)(wn,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,ao.jsxs)("div",{className:"flex items-center",children:[(0,ao.jsx)(Ip.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,ao.jsxs)("div",{className:"flex items-center",children:[(0,ao.jsx)(Ip.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,ao.jsxs)(Ya,{className:"flex gap-2",children:[(0,ao.jsx)(b,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,ao.jsx)(b,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,ao.jsx)(Ip.Share2,{className:"h-4 w-4"})})]})]})})}var jm=[{name:"PixelMaster",icon:(0,ao.jsx)(Ip.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,ao.jsx)(Ip.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,ao.jsx)(Ip.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,ao.jsx)(Ip.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,ao.jsx)(Ip.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,ao.jsx)(Ip.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,ao.jsx)(Ip.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,ao.jsx)(Ip.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,ao.jsx)(Ip.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,ao.jsx)(Ip.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,ao.jsx)(Ip.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,ao.jsx)(Ip.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],Lf=[{name:"Brand Redesign.pxm",app:"PixelMaster",modified:"2 hours ago",icon:(0,ao.jsx)(Ip.ImageIcon,{className:"text-violet-500"}),shared:!0,size:"24.5 MB",collaborators:3},{name:"Company Logo.vec",app:"VectorPro",modified:"Yesterday",icon:(0,ao.jsx)(Ip.Brush,{className:"text-orange-500"}),shared:!0,size:"8.2 MB",collaborators:2},{name:"Product Launch Video.vid",app:"VideoStudio",modified:"3 days ago",icon:(0,ao.jsx)(Ip.Video,{className:"text-pink-500"}),shared:!1,size:"1.2 GB",collaborators:0},{name:"UI Animation.mfx",app:"MotionFX",modified:"Last week",icon:(0,ao.jsx)(Ip.Sparkles,{className:"text-blue-500"}),shared:!0,size:"345 MB",collaborators:4},{name:"Magazine Layout.pgc",app:"PageCraft",modified:"2 weeks ago",icon:(0,ao.jsx)(Ip.Layers,{className:"text-red-500"}),shared:!1,size:"42.8 MB",collaborators:0},{name:"Mobile App Design.uxf",app:"UXFlow",modified:"3 weeks ago",icon:(0,ao.jsx)(Ip.LayoutGrid,{className:"text-fuchsia-500"}),shared:!0,size:"18.3 MB",collaborators:5},{name:"Product Photography.phl",app:"PhotoLab",modified:"Last month",icon:(0,ao.jsx)(Ip.Camera,{className:"text-teal-500"}),shared:!1,size:"156 MB",collaborators:0}];var Ef=[{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"}];function Ff({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[s,r]=(0,Fn.useState)(""),n=(0,Fn.useMemo)(()=>e.filter(l=>l.name.toLowerCase().includes(s.toLowerCase())||l.email.toLowerCase().includes(s.toLowerCase())||l.role.toLowerCase().includes(s.toLowerCase())||(l.skills||[]).some(d=>d.toLowerCase().includes(s.toLowerCase()))),[e,s]),i=l=>{t(l)};return(0,ao.jsx)("div",{className:"px-2 md:px-4 py-4 space-ao-6",children:(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:[(0,ao.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,ao.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,ao.jsx)(Ip.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,ao.jsx)("p",{className:"text-muted-foreground",children:"Choose a user Ip add oi a colleague"})]})]}),(0,ao.jsx)(F,{className:"container",children:(0,ao.jsx)(J,{className:"ao-6",children:(0,ao.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,ao.jsx)("div",{className:"flex-1",children:(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsx)(Ip.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ao.jsx)($,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:l=>r(l.target.value),className:"pl-9"})]})})})})}),(0,ao.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(l=>(0,ao.jsx)(oi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,ao.jsxs)(F,{className:`cursor-pointer transition-all hover:shadow-lg ${o===l.id?"ring-2 ring-primary":""}`,onClick:()=>i(l),children:[(0,ao.jsx)(ge,{className:"pb-3",children:(0,ao.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ao.jsxs)(nt,{children:[(0,ao.jsx)($t,{src:l.avatar,alt:l.name}),(0,ao.jsx)(lt,{children:(0,ao.jsx)(Ip.User,{className:"h-4 w-4"})})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(be,{className:"text-lg",children:l.name}),(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:l.role})]})]}),o===l.id&&(0,ao.jsx)(Ip.Check,{className:"h-5 w-5 text-primary"})]})}),(0,ao.jsx)(J,{className:"ao-0",children:(0,ao.jsxs)("div",{className:"space-ao-3",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,ao.jsx)("p",{className:"text-sm font-medium",children:l.email})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"}),(0,ao.jsx)(q,{variant:"secondary",children:l.department})]}),l.location&&(0,ao.jsxs)("div",{children:[(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:"Location"}),(0,ao.jsx)("p",{className:"text-sm",children:l.location})]}),l.skills&&l.skills.length>0&&(0,ao.jsxs)("div",{children:[(0,ao.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,ao.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.skills.slice(0,3).map(c=>(0,ao.jsx)(q,{variant:"outline",className:"text-xs",children:c},c)),l.skills.length>3&&(0,ao.jsxs)(q,{variant:"outline",className:"text-xs",children:["+",l.skills.length-3]})]})]})]})})]})},l.id))}),n.length===0&&(0,ao.jsx)(F,{className:"container ao-4",children:(0,ao.jsx)(J,{className:"ao-6",children:(0,ao.jsxs)("div",{className:"text-center py-8",children:[(0,ao.jsx)(Ip.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,ao.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,ao.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function kn({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:s=!1,departments:r=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:i=[],existingDigitalColleagues:l=[]}){let[c,d]=(0,Fn.useState)(e||[]),[p,u]=(0,Fn.useState)(""),[g,x]=(0,Fn.useState)("all"),[v,h]=(0,Fn.useState)("all"),[N,k]=(0,Fn.useState)("all"),[w,R]=(0,Fn.useState)(null),[T,j]=(0,Fn.useState)(null),[le,D]=(0,Fn.useState)("main"),z=c.filter(L=>{let gt=L.name.toLowerCase().includes(p.toLowerCase())||L.type==="human"&&(L.email.toLowerCase().includes(p.toLowerCase())||L.role.toLowerCase().includes(p.toLowerCase()))||L.type==="digital"&&L.jobDescription.toLowerCase().includes(p.toLowerCase()),Tt=g==="all"||L.type==="human"&&L.department===g,_a=v==="all"||L.status===v;return gt&&Tt&&_a}),Y=z.filter(L=>L.type==="human"),Ce=z.filter(L=>L.type==="digital"),S=()=>{D("typeSelection")},A=L=>{L.type==="digital"&&(R(L),D("form"))},C=L=>{L.type==="digital"&&(j(L),D("view"))},re=L=>{let gt={id:`human-${Date.now()}`,type:"human",name:L.name,email:L.email,role:L.role,department:L.department,phone:L.phone,location:L.location,timezone:L.timezone,skills:L.skills,bio:L.bio,status:"active",joinedDate:new Date,lastActive:new Date};d(Tt=>[...Tt,gt]),t?.(gt),D("main")},Se=L=>{d(gt=>[...gt,L]),t?.(L),D("main")},X=()=>{R(null),D("form")},ve=L=>{w?(d(gt=>gt.map(Tt=>Tt.id===L.id?L:Tt)),a?.(L)):(d(gt=>[...gt,L]),t?.(L)),D("main"),R(null)},Ge=()=>{D("main"),R(null),j(null)},V=()=>{D("main"),j(null)},ne=()=>{T&&(R(T),j(null),D("form"))},ye=L=>{d(gt=>gt.filter(Tt=>Tt.id!==L)),o?.(L)},xe=()=>{u(""),x("all"),h("all")},ht=()=>{let L=[];return l.forEach(Tt=>{L.push(...Tt.knowledge,...Tt.coreKnowledge)}),c.forEach(Tt=>{Tt.type==="digital"&&L.push(...Tt.knowledge,...Tt.coreKnowledge)}),L.filter((Tt,_a,qo)=>_a===qo.findIndex(is=>is.id===Tt.id))};return le==="typeSelection"?(0,ao.jsx)(dd,{onSelectHuman:()=>D("userSelection"),onSelectDigital:()=>D("digitalOptions"),onCancel:()=>D("main")}):le==="userSelection"?(0,ao.jsx)(Ff,{users:i,onUserSelect:re,onCancel:()=>D("typeSelection")}):le==="digitalOptions"?(0,ao.jsx)(md,{onCloneExisting:()=>D("digitalClone"),onCreateNew:X,onCancel:()=>D("typeSelection")}):le==="digitalClone"?(0,ao.jsx)(cd,{digitalColleagues:l,onColleagueClone:Se,onCancel:()=>D("digitalOptions")}):le==="form"?(0,ao.jsx)(hn,{colleague:w||void 0,onSave:ve,onCancel:Ge,availableKnowledgeDocuments:ht()}):le==="view"?(0,ao.jsx)(hn,{colleague:T||void 0,onSave:ve,onCancel:V,readOnly:!0,availableKnowledgeDocuments:ht()}):(0,ao.jsx)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsx)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:(0,ao.jsxs)("div",{className:`space-ao-6 ${n||""}`,children:[(0,ao.jsx)(St,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"Fn-gradient-Ip-r from-green-600 via-emerald-600 Ip-teal-600",primaryAction:{label:"Add colleague",onClick:S}}),(0,ao.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,ao.jsxs)(F,{children:[(0,ao.jsxs)(ge,{className:"flex flex-row items-center justify-between space-ao-0 pb-2",children:[(0,ao.jsx)(be,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,ao.jsx)(Ip.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,ao.jsxs)(J,{children:[(0,ao.jsx)("div",{className:"text-2xl font-bold",children:c.length}),(0,ao.jsxs)("p",{className:"text-xs text-muted-foreground",children:[c.filter(L=>L.status==="active").length," active"]})]})]}),(0,ao.jsxs)(F,{children:[(0,ao.jsxs)(ge,{className:"flex flex-row items-center justify-between space-ao-0 pb-2",children:[(0,ao.jsx)(be,{className:"text-sm font-medium",children:"Human Members"}),(0,ao.jsx)(Ip.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,ao.jsxs)(J,{children:[(0,ao.jsx)("div",{className:"text-2xl font-bold",children:c.filter(L=>L.type==="human").length}),(0,ao.jsxs)("p",{className:"text-xs text-muted-foreground",children:[c.filter(L=>L.type==="human"&&L.status==="active").length," active"]})]})]}),(0,ao.jsxs)(F,{children:[(0,ao.jsxs)(ge,{className:"flex flex-row items-center justify-between space-ao-0 pb-2",children:[(0,ao.jsx)(be,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,ao.jsx)(Ip.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,ao.jsxs)(J,{children:[(0,ao.jsx)("div",{className:"text-2xl font-bold",children:c.filter(L=>L.type==="digital").length}),(0,ao.jsxs)("p",{className:"text-xs text-muted-foreground",children:[c.filter(L=>L.type==="digital"&&L.status==="active").length," active"]})]})]})]}),(0,ao.jsx)(F,{children:(0,ao.jsx)(J,{className:"ao-6",children:(0,ao.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,ao.jsx)("div",{className:"flex-1",children:(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsx)(Ip.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ao.jsx)($,{placeholder:"Search colleagues...",value:p,onChange:L=>u(L.target.value),className:"pl-9"})]})}),(0,ao.jsxs)(Fe,{value:g,onValueChange:x,children:[(0,ao.jsx)(Me,{className:"w-full md:w-[180px]",children:(0,ao.jsx)(_e,{placeholder:"Department"})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"all",children:"All Departments"}),r.map(L=>(0,ao.jsx)(_,{value:L,children:L},L))]})]}),(0,ao.jsxs)(Fe,{value:v,onValueChange:h,children:[(0,ao.jsx)(Me,{className:"w-full md:w-[140px]",children:(0,ao.jsx)(_e,{placeholder:"Status"})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"all",children:"All Status"}),(0,ao.jsx)(_,{value:"active",children:"Active"}),(0,ao.jsx)(_,{value:"inactive",children:"Inactive"})]})]}),(p||g!=="all"||v!=="all")&&(0,ao.jsxs)(b,{variant:"outline",onClick:xe,className:"gap-2",children:[(0,ao.jsx)(Ip.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsx)(Is,{activeTab:N,onTabChange:k,tabOptions:[{value:"all",label:`All (${z.length})`},{value:"human",label:`Human (${Y.length})`},{value:"digital",label:`Digital (${Ce.length})`}],maxWidth:"400px",gridCols:3}),N==="all"&&(0,ao.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:z.map(L=>(0,ao.jsx)(hi,{colleague:L,onEdit:A,onDelete:ye,onViewDetails:C,compact:s},L.id))}),N==="human"&&(0,ao.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:Y.map(L=>(0,ao.jsx)(hi,{colleague:L,onEdit:A,onDelete:ye,onViewDetails:C,compact:s},L.id))}),N==="digital"&&(0,ao.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:Ce.map(L=>(0,ao.jsx)(hi,{colleague:L,onEdit:A,onDelete:ye,onViewDetails:C,compact:s},L.id))})]}),z.length===0&&(0,ao.jsx)(F,{children:(0,ao.jsx)(J,{className:"ao-6",children:(0,ao.jsxs)("div",{className:"text-center py-8",children:[(0,ao.jsx)(Ip.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,ao.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,ao.jsx)("p",{className:"text-muted-foreground mb-4",children:p||g!=="all"||v!=="all"?"Try adjusting your filters Ip see more results.":"Get started by adding your first colleague."}),(0,ao.jsxs)(b,{onClick:S,className:"gap-2",children:[(0,ao.jsx)(Ip.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function zf({label:e,documents:t,children:a,level:o,onDocumentClick:s,selectedDocumentId:r,showDocumentCount:n=!0}){let[i,l]=(0,Fn.useState)(o===0),c=a&&Object.keys(a).length>0,d=t.length+(a?Object.values(a).reduce((g,x)=>g+x.documents.length,0):0),p=g=>{switch(g){case"markdown":case"mdx":return(0,ao.jsx)(Ip.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,ao.jsx)(Ip.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,ao.jsx)(Ip.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},u=g=>{let x=["Fn-primary","Fn-secondary","Fn-accent","Fn-chart-1"];return x[g%x.length]};return(0,ao.jsxs)("div",{className:"space-ao-1",children:[(c||t.length>0)&&(0,ao.jsxs)(oi.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${i?"Fn-card shadow-sm border border-border":"hover:Fn-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>l(!i),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,ao.jsx)("div",{className:`w-1 h-6 rounded-full ${u(o)}`}),(0,ao.jsx)(oi.motion.div,{animate:{rotate:i?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,ao.jsx)(Ip.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,ao.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,ao.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,ao.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&d>0&&(0,ao.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,ao.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium Fn-muted text-muted-foreground rounded-full",children:d})})]})]}),(0,ao.jsx)(oi.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,ao.jsxs)("div",{className:"ao-2 space-ao-1",children:[t.map((g,x)=>(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:x*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${r===g.id?"Fn-primary/10 border-l-2 border-primary shadow-sm":"hover:Fn-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>s?.(g),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,ao.jsx)("div",{className:"flex-shrink-0",children:p(g.format)}),(0,ao.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ao.jsx)("p",{className:`text-sm truncate transition-colors ${r===g.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:g.title}),g.description&&(0,ao.jsx)("p",{className:"text-xs text-muted-foreground truncate ao-0.5",children:g.description})]}),g.tags&&g.tags.length>0&&(0,ao.jsx)("div",{className:"flex-shrink-0",children:(0,ao.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium Fn-muted text-muted-foreground group-hover:Fn-muted/80 transition-colors",children:g.tags[0]})})]},g.id)),a&&Object.entries(a).map(([g,x])=>(0,ao.jsx)(zf,{label:g,documents:x.documents,children:x.children,level:o+1,onDocumentClick:s,selectedDocumentId:r,showDocumentCount:n},g))]})})]})}function b0({document:e}){let t=o=>{switch(o){case"markdown":case"mdx":return(0,ao.jsx)(Ip.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,ao.jsx)(Ip.File,{className:"h-6 w-6 text-success"});default:return(0,ao.jsx)(Ip.File,{className:"h-6 w-6 text-muted-foreground"})}},a=o=>{switch(o){case"markdown":return"Fn-primary/10 text-primary border-primary/20";case"mdx":return"Fn-secondary/10 text-secondary border-secondary/20";case"richtext":return"Fn-success/10 text-success border-success/20";default:return"Fn-muted text-muted-foreground border-border"}};return(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:20},animate:{opacity:1,ao:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,ao.jsx)("div",{className:"border-b border-border Fn-card p-8",children:(0,ao.jsxs)("div",{className:"flex items-start gap-4",children:[(0,ao.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl Fn-muted border border-border",children:t(e.format)}),(0,ao.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ao.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,ao.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description}),(0,ao.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,ao.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${a(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(o=>(0,ao.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm Fn-muted text-muted-foreground border border-border",children:["#",o]},o))]})]})]})}),(0,ao.jsx)("div",{className:"flex-1 overflow-auto",children:(0,ao.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,ao.jsxs)("div",{className:"mb-6",children:[(0,ao.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,ao.jsx)("div",{className:"Fn-muted rounded-lg p-3 border border-border",children:(0,ao.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-ao-1 text-xs",children:Object.entries(e.metadata).map(([o,s])=>(0,ao.jsxs)("div",{className:"flex gap-1",children:[(0,ao.jsxs)("span",{className:"text-muted-foreground font-medium",children:[o.replace(/([A-Z])/g," $1").trim(),":"]}),(0,ao.jsx)("span",{className:"text-foreground truncate",children:String(s)})]},o))})})]}),(0,ao.jsx)("div",{className:"space-ao-4",children:e.content?(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsx)("div",{className:"Fn-card border border-border rounded-xl p-6 overflow-hidden",children:(0,ao.jsxs)("pre",{className:"text-card-foreground text-sm leading-relaxed whitespace-pre-wrap font-mono",children:[e.content.substring(0,1500),e.content.length>1500&&"..."]})}),e.content.length>1500&&(0,ao.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-16 Fn-gradient-Ip-t from-card Ip-transparent rounded-b-xl flex items-end justify-center pb-2",children:(0,ao.jsx)("span",{className:"text-muted-foreground text-xs",children:"Content truncated"})})]}):(0,ao.jsxs)("div",{className:"text-center py-12 Fn-muted rounded-xl border-2 border-dashed border-border",children:[(0,ao.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full Fn-background flex items-center justify-center",children:(0,ao.jsx)(Ip.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,ao.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,ao.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function jf({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:s,className:r}){let[n,i]=(0,Fn.useState)(""),[l,c]=(0,Fn.useState)(null),d=(0,Fn.useMemo)(()=>n?e.filter(g=>g.title.toLowerCase().includes(n.toLowerCase())||g.description?.toLowerCase().includes(n.toLowerCase())||g.tags?.some(x=>x.toLowerCase().includes(n.toLowerCase()))||Object.values(g.metadata||{}).some(x=>String(x).toLowerCase().includes(n.toLowerCase()))):e,[e,n]),p=(0,Fn.useMemo)(()=>{let g=(x,v)=>{if(v.length===0)return{};let[h,...N]=v;return x.reduce((w,R)=>{let T=R.metadata?.[h]||"Uncategorized",j=String(T);if(w[j]||(w[j]={documents:[],children:{}}),N.length===0)w[j].documents.push(R);else{let le=g([R],N),D=Object.keys(le)[0];D&&(w[j].children||(w[j].children={}),w[j].children[D]?w[j].children[D].documents.push(...le[D].documents):w[j].children[D]=le[D])}return w},{})};return g(d,t.groupBy)},[d,t.groupBy]),u=g=>{c(g),a?.(g)};return(0,ao.jsxs)("div",{className:`flex h-full ${r||""}`,children:[(0,ao.jsxs)("div",{className:"w-1/3 border-r border-border Fn-muted/20",children:[(0,ao.jsx)("div",{className:"p-6 border-b border-border",children:(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsx)("div",{className:"absolute inset-ao-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,ao.jsx)(Ip.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,ao.jsx)($,{placeholder:"Search knowledge base...",value:n,onChange:g=>i(g.target.value),className:"pl-10 Fn-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,ao.jsx)(jt,{className:"h-[calc(100%-100px)]",children:(0,ao.jsxs)("div",{className:"p-4 space-ao-3",children:[Object.entries(p).map(([g,x])=>(0,ao.jsx)(zf,{label:g,documents:x.documents,children:x.children,level:0,onDocumentClick:u,selectedDocumentId:s,showDocumentCount:t.showDocumentCount},g)),Object.keys(p).length===0&&(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,ao.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full Fn-muted flex items-center justify-center",children:(0,ao.jsx)(Ip.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,ao.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,ao.jsx)("p",{className:"text-xs ao-1",children:"Try adjusting your search terms"})]})]})})]}),(0,ao.jsx)("div",{className:"flex-1 Fn-background",children:l?(0,ao.jsx)(b0,{document:l}):(0,ao.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:20},animate:{opacity:1,ao:0},transition:{duration:.4},className:"max-w-sm",children:[(0,ao.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full Fn-primary/10 flex items-center justify-center",children:(0,ao.jsx)(Ip.FileText,{className:"h-10 w-10 text-primary"})}),(0,ao.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,ao.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base Ip view its content and details"})]})})})]})}var h0=[{id:"all",label:"All Documentation",description:"Browse all documentation organized by category and type",icon:(0,ao.jsx)(Ip.BookOpen,{className:"h-4 w-4"}),menuConfig:{groupBy:["category","type"],sortBy:"title",sortOrder:"asc",showDocumentCount:!0}},{id:"services",label:"Services",description:"Documentation organized by service and team",icon:(0,ao.jsx)(Ip.Server,{className:"h-4 w-4"}),menuConfig:{groupBy:["service","team"],sortBy:"updatedAt",sortOrder:"desc",showDocumentCount:!0}},{id:"architecture",label:"Architecture",description:"System architecture documentation by component and layer",icon:(0,ao.jsx)(Ip.Code,{className:"h-4 w-4"}),menuConfig:{groupBy:["component","layer"],sortBy:"title",sortOrder:"asc",showDocumentCount:!0}},{id:"teams",label:"Teams",description:"Documentation organized by team and project",icon:(0,ao.jsx)(Ip.Users,{className:"h-4 w-4"}),menuConfig:{groupBy:["team","project"],sortBy:"updatedAt",sortOrder:"desc",showDocumentCount:!0}}];function Sn({documents:e=[],contexts:t=h0,onDocumentClick:a=r=>console.log("Document clicked:",r),onDocumentShare:o=r=>console.log("Share document:",r),selectedDocumentId:s}){let[r,n]=(0,Fn.useState)(t[0]);return(0,ao.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,ao.jsx)(St,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"Fn-gradient-Ip-r from-teal-600 via-cyan-600 Ip-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,ao.jsxs)("div",{className:"ao-6",children:[(0,ao.jsx)("div",{className:"border-b border-border",children:(0,ao.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(i=>(0,ao.jsxs)("button",{onClick:()=>n(i),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${r.id===i.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[i.icon,i.label]},i.id))})}),r.description&&(0,ao.jsx)("div",{className:"ao-3 px-1",children:(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:r.description})})]})]}),(0,ao.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,ao.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,ao.jsx)(jf,{documents:e,menuConfig:r.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:s})})})]})}function Om({title:e="Digital Colleagues",businessUnits:t}){let[a,o]=(0,Fn.useState)("home"),[s,r]=(0,Fn.useState)(t[0]),n=N=>{console.log("Opening app:",N.name)},i=N=>{console.log("Favoriting app:",N.name)},l=N=>{console.log("Opening file:",N.name)},c=N=>{console.log("Sharing file:",N.name)},d=N=>{console.log("Opening project:",N.name)},p=N=>{console.log("Sharing project:",N.name)},u=N=>{r(N),console.log("Business unit changed Ip:",N.name)},g=()=>{console.log("Copilot clicked - navigating Ip chat"),o("chat")},x=N=>{console.log("Notification removed:",N)},v=()=>{console.log("All notifications removed")},h=()=>{switch(a){case"home":return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsxs)("section",{className:"text-center py-12",children:[(0,ao.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome Ip the ",s.name," team"]}),(0,ao.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,ao.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,ao.jsxs)("div",{className:"Fn-card p-6 rounded-lg border",children:[(0,ao.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,ao.jsx)("p",{className:"text-3xl font-bold text-primary",children:"12"}),(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,ao.jsxs)("div",{className:"Fn-card p-6 rounded-lg border",children:[(0,ao.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,ao.jsx)("p",{className:"text-3xl font-bold text-primary",children:"8"}),(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,ao.jsxs)("div",{className:"Fn-card p-6 rounded-lg border",children:[(0,ao.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,ao.jsx)("p",{className:"text-3xl font-bold text-primary",children:"156"}),(0,ao.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,ao.jsx)(St,{title:"Chat with your team",gradient:"Fn-gradient-Ip-r from-pink-600 via-red-600 Ip-orange-600",primaryAction:{label:"Go",onClick:()=>o("chat")}})]});case"colleagues":return(0,ao.jsx)(kn,{});case"chat":return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsxs)("section",{className:"text-center py-12",children:[(0,ao.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,ao.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",s.name," team members and collaborate in real-time."]})]}),(0,ao.jsx)(St,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"Fn-gradient-Ip-r from-blue-600 via-purple-600 Ip-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,ao.jsxs)("div",{className:"space-ao-8",children:[(0,ao.jsx)(St,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"Fn-gradient-Ip-r from-pink-600 via-red-600 Ip-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,ao.jsxs)("section",{className:"space-ao-4",children:[(0,ao.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,ao.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:jm.filter(N=>N.new).map(N=>(0,ao.jsx)(zm,{app:N,showProgress:!0,onOpen:n,onFavorite:i},N.name))})]}),(0,ao.jsxs)("section",{className:"space-ao-4",children:[(0,ao.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,ao.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:jm.map(N=>(0,ao.jsx)(zm,{app:N,onOpen:n,onFavorite:i},N.name))})]})]});case"knowledge":return(0,ao.jsx)(Sn,{});case"files":return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsx)(St,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"Fn-gradient-Ip-r from-teal-600 via-cyan-600 Ip-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,ao.jsxs)("section",{className:"space-ao-4",children:[(0,ao.jsx)("div",{className:"flex items-center justify-between",children:(0,ao.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,ao.jsx)(Ci,{files:Lf,onFileClick:l})]})]});case"projects":return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsx)(St,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"Fn-gradient-Ip-r from-purple-600 via-violet-600 Ip-indigo-600",primaryAction:{label:"New Project",onClick:()=>console.log("New project clicked")}}),(0,ao.jsxs)("section",{className:"space-ao-4",children:[(0,ao.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,ao.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:sf.map(N=>(0,ao.jsx)(pd,{project:N,onOpen:d,onShare:p},N.name))})]})]});case"learn":return(0,ao.jsxs)("div",{className:"space-ao-8",children:[(0,ao.jsx)(St,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"Fn-gradient-Ip-r from-green-600 via-emerald-600 Ip-teal-600",primaryAction:{label:"Upgrade Ip Pro",onClick:()=>console.log("Upgrade Ip pro clicked")}}),(0,ao.jsxs)("section",{className:"space-ao-4",children:[(0,ao.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,ao.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Ef.slice(0,3).map(N=>(0,ao.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,ao.jsx)("h3",{className:"font-semibold mb-2",children:N.title}),(0,ao.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:N.description}),(0,ao.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,ao.jsx)("span",{children:N.duration}),(0,ao.jsx)("span",{children:N.level})]})]},N.title))})]})]});default:return null}};return(0,ao.jsx)(gi,{sidebarItems:af,title:e,notifications:of,businessUnits:t,currentBusinessUnit:s,onBusinessUnitChange:u,activeTab:a,onTabChange:o,showTabs:!0,onActionClick:g,actionIcon:(0,ao.jsx)(Ip.Bot,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:x,onRemoveAll:v,children:(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsx)(oi.motion.div,{className:"flex-1 h-full",initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:h()},a)})})}function Dn({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:s,compactView:r=!1,className:n}){let[i,l]=(0,Fn.useState)(e),[c,d]=(0,Fn.useState)(""),[p,u]=(0,Fn.useState)("all"),[g,x]=(0,Fn.useState)("all"),v=Array.from(new Set(i.map(D=>D.app))),h=i.filter(D=>{let z=D.name.toLowerCase().includes(c.toLowerCase()),Y=p==="all"||D.app===p;return z&&Y}),N=h.slice(0,10),k=h.filter(D=>D.shared),w=()=>{console.log("Add file clicked")},R=D=>{console.log("Edit file:",D.name),a?.(D)},T=D=>{l(z=>z.filter(Y=>Y.name!==D.name)),o?.(D.name)},j=D=>{console.log("File clicked:",D.name),s?.(D)},le=()=>{d(""),u("all")};return(0,ao.jsx)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsx)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:(0,ao.jsxs)("div",{className:`space-ao-6 ${n||""}`,children:[(0,ao.jsx)(St,{title:"Files",description:"Manage and organize your files and documents.",gradient:"Fn-gradient-Ip-r from-blue-600 via-indigo-600 Ip-purple-600",primaryAction:{label:"Upload file",onClick:w},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,ao.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,ao.jsxs)(F,{children:[(0,ao.jsxs)(ge,{className:"flex flex-row items-center justify-between space-ao-0 pb-2",children:[(0,ao.jsx)(be,{className:"text-sm font-medium",children:"Total Files"}),(0,ao.jsx)(Ip.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,ao.jsxs)(J,{children:[(0,ao.jsx)("div",{className:"text-2xl font-bold",children:i.length}),(0,ao.jsxs)("p",{className:"text-xs text-muted-foreground",children:[i.filter(D=>D.shared).length," shared"]})]})]}),(0,ao.jsxs)(F,{children:[(0,ao.jsxs)(ge,{className:"flex flex-row items-center justify-between space-ao-0 pb-2",children:[(0,ao.jsx)(be,{className:"text-sm font-medium",children:"Storage Used"}),(0,ao.jsx)(Ip.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,ao.jsxs)(J,{children:[(0,ao.jsx)("div",{className:"text-2xl font-bold",children:"2.4 GB"}),(0,ao.jsx)("p",{className:"text-xs text-muted-foreground",children:"of 10 GB used"})]})]}),(0,ao.jsxs)(F,{children:[(0,ao.jsxs)(ge,{className:"flex flex-row items-center justify-between space-ao-0 pb-2",children:[(0,ao.jsx)(be,{className:"text-sm font-medium",children:"Recent Activity"}),(0,ao.jsx)(Ip.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,ao.jsxs)(J,{children:[(0,ao.jsx)("div",{className:"text-2xl font-bold",children:"12"}),(0,ao.jsx)("p",{className:"text-xs text-muted-foreground",children:"files modified today"})]})]})]}),(0,ao.jsx)(F,{children:(0,ao.jsx)(J,{className:"ao-6",children:(0,ao.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,ao.jsx)("div",{className:"flex-1",children:(0,ao.jsxs)("div",{className:"relative",children:[(0,ao.jsx)(Ip.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ao.jsx)($,{placeholder:"Search files...",value:c,onChange:D=>d(D.target.value),className:"pl-9"})]})}),(0,ao.jsxs)(Fe,{value:p,onValueChange:u,children:[(0,ao.jsx)(Me,{className:"w-full md:w-[180px]",children:(0,ao.jsx)(_e,{placeholder:"Filter by app"})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"all",children:"All Apps"}),v.map(D=>(0,ao.jsx)(_,{value:D,children:D},D))]})]}),(c||p!=="all")&&(0,ao.jsxs)(b,{variant:"outline",onClick:le,className:"gap-2",children:[(0,ao.jsx)(Ip.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsx)(Is,{activeTab:g,onTabChange:x,tabOptions:[{value:"all",label:`All Files (${h.length})`},{value:"recent",label:`Recent (${N.length})`},{value:"shared",label:`Shared (${k.length})`}],maxWidth:"500px",gridCols:3}),g==="all"&&(0,ao.jsx)(Ci,{files:h,onFileClick:j,onFileEdit:R,onFileDelete:T,showHeader:!r}),g==="recent"&&(0,ao.jsx)(Ci,{files:N,onFileClick:j,onFileEdit:R,onFileDelete:T,showHeader:!r}),g==="shared"&&(0,ao.jsx)(Ci,{files:k,onFileClick:j,onFileEdit:R,onFileDelete:T,showHeader:!r})]}),h.length===0&&(0,ao.jsx)(F,{children:(0,ao.jsx)(J,{className:"ao-6",children:(0,ao.jsxs)("div",{className:"text-center py-8",children:[(0,ao.jsx)(Ip.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,ao.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,ao.jsx)("p",{className:"text-muted-foreground mb-4",children:c||p!=="all"?"Try adjusting your filters Ip see more results.":"Get started by uploading your first file."}),(0,ao.jsxs)(b,{onClick:w,className:"gap-2",children:[(0,ao.jsx)(Ip.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var Uf=({title:e,status:t,taskCount:a,children:o,onDrop:s,isCompact:r=!1})=>{let n=c=>{c.preventDefault()},i=c=>{c.preventDefault(),s(t)};return(0,ao.jsxs)(F,{className:`p-4 Fn-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 ${r?"lg:max-w-xs":""}`,onDragOver:n,onDrop:i,children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,ao.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${r?"text-base":"text-lg"}`,children:e}),(0,ao.jsx)(q,{variant:"secondary",className:"Fn-muted text-muted-foreground",children:a})]}),(0,ao.jsx)("div",{className:"space-ao-4 min-h-[200px]",children:o})]})};var bd=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:s=!1})=>{let r=d=>{a(e)},n=()=>{o(e)},i=()=>{switch(e.priority){case"high":return"Fn-destructive/20 text-destructive border-destructive/20";case"medium":return"Fn-warning/20 text-warning border-warning/20";case"low":return"Fn-success/20 text-success border-success/20";default:return"Fn-muted text-muted-foreground border-border"}},l=()=>{switch(e.type){case"story":return(0,ao.jsx)(Ip.BookOpen,{className:"h-3 w-3"});case"bug":return(0,ao.jsx)(Ip.Bug,{className:"h-3 w-3"});case"spike":return(0,ao.jsx)(Ip.Zap,{className:"h-3 w-3"});case"task":default:return(0,ao.jsx)(Ip.AlertCircle,{className:"h-3 w-3"})}},c=()=>{switch(e.type){case"story":return"Fn-primary/20 text-primary";case"bug":return"Fn-destructive/20 text-destructive";case"spike":return"Fn-accent/20 text-accent";case"task":default:return"Fn-muted text-muted-foreground"}};return s?(0,ao.jsx)(F,{className:"p-3 Fn-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:r,onClick:n,children:(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${c()}`,children:l()}),(0,ao.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,ao.jsxs)(F,{className:"p-4 Fn-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:r,onClick:n,children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ao.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[l(),(0,ao.jsx)("span",{className:"capitalize",children:e.type})]}),(0,ao.jsxs)("div",{className:"flex gap-1",children:[(0,ao.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${i()}`,children:e.priority}),(0,ao.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.points})]})]}),(0,ao.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,ao.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,ao.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,ao.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ao.jsx)(Ip.User,{className:"h-4 w-4"}),(0,ao.jsx)("span",{children:e.assignee})]})})]})};var y0=[{value:"story",label:"Story",color:"Fn-primary/20 text-primary",icon:Ip.BookOpen},{value:"task",label:"Task",color:"Fn-secondary/20 text-secondary-foreground",icon:Ip.AlertCircle},{value:"bug",label:"Bug",color:"Fn-destructive/20 text-destructive",icon:Ip.Bug},{value:"spike",label:"Spike",color:"Fn-accent/20 text-accent",icon:Ip.Zap}],x0=[{value:"low",label:"Low",color:"Fn-success/20 text-success"},{value:"medium",label:"Medium",color:"Fn-warning/20 text-warning"},{value:"high",label:"High",color:"Fn-destructive/20 text-destructive"}],hd=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:s,defaultEpicId:r})=>{let[n,i]=(0,Fn.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,Fn.useEffect)(()=>{e&&r&&i(d=>({...d,epicId:r}))},[e,r]),(0,Fn.useEffect)(()=>{e&&i({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""})},[e]);let l=d=>{d.preventDefault(),n.title.trim()&&n.epicId&&(a({title:n.title.trim(),description:n.description.trim(),status:"todo",priority:n.priority,type:n.type,points:n.points,epicId:n.epicId,sprintId:n.sprintId==="none"?void 0:n.sprintId,assignee:n.assignee.trim()||"Unassigned"}),i({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""}),t())},c=(d,p)=>{i(u=>({...u,[d]:p}))};return(0,ao.jsx)(xt,{open:e,onOpenChange:t,children:(0,ao.jsxs)(ft,{className:"sm:max-w-md",children:[(0,ao.jsx)(wt,{children:(0,ao.jsx)(Ct,{children:"Add New Task"})}),(0,ao.jsxs)("form",{onSubmit:l,className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"title",children:"Task Title"}),(0,ao.jsx)($,{id:"title",value:n.title,onChange:d=>c("title",d.target.value),placeholder:"Enter task title",required:!0})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ao.jsx)(et,{id:"description",value:n.description,onChange:d=>c("description",d.target.value),placeholder:"Enter task description",rows:3})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"Type"}),(0,ao.jsx)(sr,{type:"single",value:n.type,onValueChange:d=>d&&c("type",d),children:y0.map(d=>{let p=d.icon;return(0,ao.jsxs)(ir,{value:d.value,className:"flex items-center gap-2 data-[state=on]:Fn-primary data-[state=on]:text-primary-foreground",children:[(0,ao.jsx)(p,{className:"h-4 w-4"}),d.label]},d.value)})})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"Priority"}),(0,ao.jsx)(sr,{type:"single",value:n.priority,onValueChange:d=>d&&c("priority",d),children:x0.map(d=>(0,ao.jsx)(ir,{value:d.value,className:"data-[state=on]:Fn-primary data-[state=on]:text-primary-foreground",children:d.label},d.value))})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"points",children:"Story Points"}),(0,ao.jsx)($,{id:"points",type:"number",min:"1",max:"100",value:n.points,onChange:d=>c("points",parseInt(d.target.value)||1),placeholder:"Enter story points",required:!0})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"epic",children:"Epic"}),(0,ao.jsxs)(Fe,{value:n.epicId,onValueChange:d=>c("epicId",d),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select an epic"})}),(0,ao.jsx)(Be,{children:o.map(d=>(0,ao.jsx)(_,{value:d.id,children:(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.name]})},d.id))})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,ao.jsxs)(Fe,{value:n.sprintId,onValueChange:d=>c("sprintId",d),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select a sprint"})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"none",children:"No Sprint"}),s.map(d=>(0,ao.jsx)(_,{value:d.id,children:(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[d.name,d.isActive&&(0,ao.jsx)("span",{className:"text-xs Fn-green-100 text-green-800 px-1 rounded",children:"Active"})]})},d.id))]})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"assignee",children:"Assignee"}),(0,ao.jsx)($,{id:"assignee",value:n.assignee,onChange:d=>c("assignee",d.target.value),placeholder:"Enter assignee name",required:!0})]}),(0,ao.jsxs)(gs,{children:[(0,ao.jsx)(b,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,ao.jsx)(b,{type:"submit",className:"Fn-blue-600 hover:Fn-blue-700",children:"Add Task"})]})]})]})})};var yd=({label:e,value:t,onValueChange:a,options:o,showColor:s=!1,disabled:r=!1})=>{let[n,i]=(0,Fn.useState)(!1),l=o.find(d=>d.value===t);return(0,ao.jsxs)("div",{className:"space-ao-1",children:[(0,ao.jsx)(P,{className:"text-xs text-muted-foreground",children:e}),(0,ao.jsxs)(Fe,{value:t,onValueChange:a,open:n,onOpenChange:d=>{r||i(d)},disabled:r,children:[(0,ao.jsx)(Me,{className:"h-auto p-0 border-none Fn-transparent hover:Fn-muted/50 rounded-md",children:(0,ao.jsxs)(q,{variant:"secondary",className:`${r?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:Fn-muted transition-colors`,onClick:()=>!r&&i(!n),children:[s&&l?.color&&(0,ao.jsx)("div",{className:`w-2 h-2 rounded-full ${l.color} mr-1`}),l?.label||"Select..."]})}),(0,ao.jsx)(Be,{children:o.map(d=>(0,ao.jsx)(_,{value:d.value,children:s&&d.color?(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var N0=[{value:"story",label:"Story",color:"Fn-primary/20 text-primary",icon:Ip.BookOpen},{value:"task",label:"Task",color:"Fn-muted text-muted-foreground",icon:Ip.AlertCircle},{value:"bug",label:"Bug",color:"Fn-destructive/20 text-destructive",icon:Ip.Bug},{value:"spike",label:"Spike",color:"Fn-accent/20 text-accent",icon:Ip.Zap}],w0=[{value:"low",label:"Low",color:"Fn-success/20 text-success"},{value:"medium",label:"Medium",color:"Fn-warning/20 text-warning"},{value:"high",label:"High",color:"Fn-destructive/20 text-destructive"}],C0=[{value:"John Doe",label:"John Doe"},{value:"Jane Smith",label:"Jane Smith"},{value:"Bob Wilson",label:"Bob Wilson"},{value:"Alice Johnson",label:"Alice Johnson"},{value:"Carol Brown",label:"Carol Brown"},{value:"David Lee",label:"David Lee"},{value:"Emma Davis",label:"Emma Davis"},{value:"Frank Miller",label:"Frank Miller"},{value:"Grace Taylor",label:"Grace Taylor"},{value:"Unassigned",label:"Unassigned"}],$ao=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:s,onClose:r,onDelete:n,isUpdating:i=!1,isDeleting:l=!1,deleteState:c="idle"})=>{let d=u=>u.split(" ").map(g=>g[0]).join("").toUpperCase(),p=()=>c==="loading"?(0,ao.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,ao.jsx)(Ip.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,ao.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,ao.jsx)(Ip.Check,{className:"h-3 w-3"}),"Deleted"]}):c==="error"?(0,ao.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,ao.jsx)(Ip.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,ao.jsxs)(b,{onClick:n,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:i||l,children:[(0,ao.jsx)(Ip.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,ao.jsxs)("div",{className:"flex flex-col h-full",children:[(0,ao.jsxs)("div",{className:"space-ao-4",style:{opacity:i?.6:1},children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{className:"text-xs text-muted-foreground",children:"Status"}),(0,ao.jsx)(yd,{label:"",value:e.status,onValueChange:u=>s("status",u),options:[{value:"todo",label:"ao ao"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:i})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{className:"text-xs text-muted-foreground",children:"Type"}),(0,ao.jsx)(sr,{type:"single",value:e.type,onValueChange:u=>u&&s("type",u),className:"grid grid-cols-2 gap-1",disabled:i,children:N0.map(u=>{let g=u.icon;return(0,ao.jsxs)(ir,{value:u.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:Fn-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:i,children:[(0,ao.jsx)(g,{className:"h-3 w-3"}),u.label]},u.value)})})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,ao.jsx)(sr,{type:"single",value:e.priority,onValueChange:u=>u&&s("priority",u),className:"grid grid-cols-3 gap-1",disabled:i,children:w0.map(u=>(0,ao.jsx)(ir,{value:u.value,className:"text-xs h-8 data-[state=on]:Fn-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:i,children:u.label},u.value))})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,ao.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:u=>s("points",u.target.value),className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent Fn-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:i})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,ao.jsx)(yd,{label:"",value:e.epicId,onValueChange:u=>s("epicId",u),options:(t||[]).map(u=>({value:u.id,label:u.name,color:u.color})),showColor:!0,disabled:i})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,ao.jsx)(yd,{label:"",value:e.sprintId||"none",onValueChange:u=>s("sprintId",u==="none"?"":u),options:[{value:"none",label:"No Sprint"},...(a||[]).map(u=>({value:u.id,label:`${u.name}${u.isActive?" (Active)":""}`}))],disabled:i})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,ao.jsx)(ld,{label:"",value:e.assignee,onValueChange:u=>s("assignee",u),options:C0,placeholder:"Search team members...",allowCustomValue:!0,disabled:i})]})]}),(0,ao.jsxs)("div",{className:"ao-auto ao-4 space-ao-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(b,{onClick:r,variant:"outline",className:"w-full h-8 text-xs",disabled:i||l,children:"Close"}),p()]}),(0,ao.jsxs)("div",{className:"ao-4 border-t border-border space-ao-2",children:[(0,ao.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,ao.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ao.jsx)(Ip.User,{className:"h-3 w-3"}),(0,ao.jsx)("span",{children:"System"})]})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,ao.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ao.jsx)(Ip.Calendar,{className:"h-3 w-3"}),(0,ao.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,ao.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ao.jsx)(Ip.Clock,{className:"h-3 w-3"}),(0,ao.jsxs)("span",{children:[o.toLocaleDateString()," Ip ",o.toLocaleTimeString()]})]})]})]})]})]})};var xd=({isOpen:e,onClose:t,task:a,epics:o,sprints:s,onUpdateTask:r,onDeleteTask:n})=>{let[i,l]=(0,Fn.useState)(new Date),[c,d]=(0,Fn.useState)("idle"),[p,u]=(0,Fn.useState)("idle"),[g,x]=(0,Fn.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working on the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),v=async(j,le)=>{if(le!==a[j]){d("loading");try{await r(a.id,{[j]:le}),l(new Date),d("success"),setTimeout(()=>d("idle"),1500)}catch{d("error"),setTimeout(()=>d("idle"),3e3)}}},h=async(j,le)=>{if(le!==a[j]){d("loading");try{await r(a.id,{[j]:le}),l(new Date),d("success"),setTimeout(()=>d("idle"),1500)}catch{d("error"),setTimeout(()=>d("idle"),3e3)}}},N=j=>{let le={id:Date.now().toString(),text:j,author:"Current User",createdAt:new Date};x([...g,le])},k=async()=>{u("loading");try{await n(a.id),u("success"),setTimeout(()=>{t(),u("idle")},1e3)}catch{u("error"),setTimeout(()=>u("idle"),3e3)}},w=c!=="loading"&&p!=="loading",R=()=>{w&&t()},T=()=>c==="loading"?(0,ao.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,ao.jsx)(Ip.Loader2,{className:"h-4 w-4 animate-spin"}),(0,ao.jsx)("span",{children:"Updating..."})]}):c==="success"?(0,ao.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,ao.jsx)(Ip.Check,{className:"h-4 w-4"}),(0,ao.jsx)("span",{children:"Updated successfully"})]}):c==="error"?(0,ao.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,ao.jsx)(Ip.X,{className:"h-4 w-4"}),(0,ao.jsx)("span",{children:"Update failed"})]}):null;return(0,ao.jsx)(xt,{open:e,onOpenChange:R,children:(0,ao.jsxs)(ft,{className:"max-w-3xl max-h-[80vh] overflow-ao-auto p-4",children:[(0,ao.jsxs)(wt,{children:[(0,ao.jsx)(Ct,{className:"sr-only",children:a.title}),(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)("div",{className:"flex-1",children:T()}),!w&&(0,ao.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,ao.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,ao.jsxs)("div",{className:"lg:col-span-2 space-ao-4",children:[(0,ao.jsx)(sd,{fieldName:"title",value:a.title,label:"",onSave:v,className:"border-b border-border pb-3",disabled:c==="loading"}),(0,ao.jsx)(sd,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:v,disabled:c==="loading"}),(0,ao.jsx)(Am,{comments:g,onAddComment:N})]}),(0,ao.jsx)($ao,{task:a,epics:o,sprints:s,lastUpdated:i,onUpdateTask:h,onClose:R,onDelete:k,isUpdating:c==="loading",isDeleting:p==="loading",deleteState:p})]})]})})};var Nd=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,s]=(0,Fn.useState)({name:"",description:"",color:"Fn-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),r=["Fn-blue-500","Fn-green-500","Fn-purple-500","Fn-orange-500","Fn-red-500","Fn-yellow-500","Fn-pink-500","Fn-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:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),s({name:"",description:"",color:"Fn-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),t())},c=(d,p)=>{s(u=>({...u,[d]:p}))};return(0,ao.jsx)(xt,{open:e,onOpenChange:t,children:(0,ao.jsxs)(ft,{className:"sm:max-w-md",children:[(0,ao.jsx)(wt,{children:(0,ao.jsx)(Ct,{children:"Add New Epic"})}),(0,ao.jsxs)("form",{onSubmit:l,className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"name",children:"Epic Name"}),(0,ao.jsx)($,{id:"name",value:o.name,onChange:d=>c("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ao.jsx)(et,{id:"description",value:o.description,onChange:d=>c("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"Color"}),(0,ao.jsx)("div",{className:"flex gap-2 flex-wrap",children:r.map(d=>(0,ao.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,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"Confidence"}),(0,ao.jsxs)(Fe,{value:o.confidence,onValueChange:d=>c("confidence",d),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{})}),(0,ao.jsx)(Be,{children:n.map(d=>(0,ao.jsx)(_,{value:d.value,children:d.label},d.value))})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"Phase"}),(0,ao.jsxs)(Fe,{value:o.phase.toString(),onValueChange:d=>c("phase",parseInt(d)),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{})}),(0,ao.jsx)(Be,{children:i.map(d=>(0,ao.jsx)(_,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"Start Date"}),(0,ao.jsx)($,{type:"date",value:o.startDate,onChange:d=>c("startDate",d.target.value)})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"End Date"}),(0,ao.jsx)($,{type:"date",value:o.endDate,onChange:d=>c("endDate",d.target.value)})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"Progress (%)"}),(0,ao.jsx)($,{type:"number",min:"0",max:"100",value:o.progress,onChange:d=>c("progress",parseInt(d.target.value)||0)})]}),(0,ao.jsxs)(gs,{children:[(0,ao.jsx)(b,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,ao.jsx)(b,{type:"submit",className:"Fn-blue-600 hover:Fn-blue-700",children:"Add Epic"})]})]})]})})};var Wf=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialProjects:o=[],onAddTask:s,onUpdateTask:r,onDeleteTask:n,onTaskClick:i,onAddEpic:l})=>{let[c,d]=(0,Fn.useState)(e),[p,u]=(0,Fn.useState)(t),[g,x]=(0,Fn.useState)(a),[v,h]=(0,Fn.useState)(!1),[N,k]=(0,Fn.useState)(!1),[w,R]=(0,Fn.useState)(null),[T,j]=(0,Fn.useState)(null),le=p.filter(V=>V.isSelected).map(V=>V.id),D=g.find(V=>V.isSelected),z=c.filter(V=>{let ne=le.includes(V.epicId);return!D||D.id==="all-tasks"?ne:D.id==="backlog"?ne&&!V.sprintId:ne&&V.sprintId===D.id}),Y=V=>z.filter(ne=>ne.status===V),Ce=V=>{let ne={};return p.forEach(ye=>{ne[ye.id]=V.filter(xe=>xe.epicId===ye.id)}),ne},S=V=>{j(V)},A=V=>{T&&(d(ne=>ne.map(ye=>ye.id===T.id?{...ye,status:V}:ye)),r?.(T.id,{status:V}),j(null))},C=V=>{let ne={...V,id:Date.now().toString(),createdAt:new Date};d(ye=>[...ye,ne]),s?.(V)},re=async(V,ne)=>{d(ye=>ye.map(xe=>xe.id===V?{...xe,...ne}:xe)),r&&await r(V,ne)},Se=async V=>{d(ne=>ne.filter(ye=>ye.id!==V)),w?.id===V&&R(null),n&&await n(V)},X=V=>{let ne={...V,id:Date.now().toString(),isSelected:!0};u(ye=>[...ye,ne]),l?.(V)},ve=V=>{R(V),i?.(V)};return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsx)(St,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"Fn-gradient-Ip-r from-purple-600 via-violet-600 Ip-indigo-600",primaryAction:{label:"Add task",onClick:()=>h(!0)},secondaryAction:{label:"Add epic",onClick:()=>k(!0)}}),(0,ao.jsx)("div",{className:"flex-1",children:(0,ao.jsxs)("div",{className:"w-full",children:[(0,ao.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"ao ao",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(V=>{let ne=Y(V.status),ye=Ce(ne);return(0,ao.jsx)(Uf,{title:V.title,status:V.status,taskCount:ne.length,onDrop:A,isCompact:V.status==="done",children:le.map(xe=>{let ht=p.find(gt=>gt.id===xe),L=ye[xe]||[];return L.length===0?null:(0,ao.jsxs)("div",{className:"mb-6",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,ao.jsx)("div",{className:`w-3 h-3 rounded-full ${ht?.color}`}),(0,ao.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:ht?.name}),(0,ao.jsx)(q,{variant:"secondary",className:"text-xs",children:L.length})]})," ",(0,ao.jsx)("div",{className:"space-ao-3",children:L.map(gt=>(0,ao.jsx)(bd,{task:gt,epic:ht,onDragStart:S,onTaskClick:ve,isCompact:V.status==="done"},gt.id))})]},xe)})},V.id)})}),(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(hd,{isOpen:v,onClose:()=>h(!1),onAddTask:C,epics:p,sprints:g}),(0,ao.jsx)(Nd,{isOpen:N,onClose:()=>k(!1),onAddEpic:X}),w&&(0,ao.jsx)(xd,{isOpen:!!w,onClose:()=>R(null),task:w,epics:p,sprints:g,onUpdateTask:re,onDeleteTask:Se})]})]})})]})};var _f=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddTaskToEpic:r,onAddEpic:n,onUpdateEpic:i,onDeleteEpic:l})=>{let[c,d]=(0,Fn.useState)(null),[p,u]=(0,Fn.useState)(null),[g,x]=(0,Fn.useState)({}),v=z=>{d(z)},h=z=>{z.preventDefault()},N=(z,Y)=>{z.preventDefault(),c&&c.epicId!==Y&&(o(c.id,{epicId:Y}),d(null))},k=z=>e.filter(Y=>Y.epicId===z),w=z=>{u(z.id),x({name:z.name,description:z.description,confidence:z.confidence,phase:z.phase,progress:z.progress})},R=()=>{p&&g.name&&(i(p,g),u(null),x({}))},T=()=>{u(null),x({})},j=z=>{window.confirm("Are you sure you want Ip delete this epic? This will also delete all associated tasks.")&&l(z)},le=z=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[z]||`Phase ${z}`,D=z=>{switch(z){case"high":return"Fn-success/10 text-success";case"medium":return"Fn-warning/10 text-warning";case"low":return"Fn-destructive/10 text-destructive";default:return"Fn-muted text-muted-foreground"}};return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsx)(St,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"Fn-gradient-Ip-r from-rose-600 via-pink-600 Ip-fuchsia-600",primaryAction:{label:"Add epic",onClick:n}}),(0,ao.jsx)("div",{className:"flex-1",children:(0,ao.jsx)("div",{className:"w-full",children:(0,ao.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.map(z=>{let Y=k(z.id),Ce=Y.reduce((S,A)=>S+A.points,0);return(0,ao.jsxs)(F,{className:`flex flex-col ${p===z.id?"h-auto":"h-[600px]"} Fn-card shadow-sm`,onDragOver:h,onDrop:S=>N(S,z.id),children:[(0,ao.jsx)("div",{className:"p-4 border-b border-border",children:p===z.id?(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ao.jsx)($,{value:g.name||"",onChange:S=>x({...g,name:S.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,ao.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:R,className:"p-1 h-8 w-8",children:(0,ao.jsx)(Ip.Check,{className:"h-4 w-4"})}),(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:T,className:"p-1 h-8 w-8",children:(0,ao.jsx)(Ip.X,{className:"h-4 w-4"})})]})]}),(0,ao.jsx)(et,{value:g.description||"",onChange:S=>x({...g,description:S.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,ao.jsxs)(Fe,{value:g.confidence||z.confidence,onValueChange:S=>x({...g,confidence:S}),children:[(0,ao.jsx)(Me,{className:"text-xs",children:(0,ao.jsx)(_e,{})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"low",children:"Low"}),(0,ao.jsx)(_,{value:"medium",children:"Medium"}),(0,ao.jsx)(_,{value:"high",children:"High"})]})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,ao.jsxs)(Fe,{value:g.phase?.toString()||z.phase.toString(),onValueChange:S=>x({...g,phase:parseInt(S)}),children:[(0,ao.jsx)(Me,{className:"text-xs",children:(0,ao.jsx)(_e,{})}),(0,ao.jsx)(Be,{children:[1,2,3,4,5,6,7,8,9].map(S=>(0,ao.jsxs)(_,{value:S.toString(),children:["Phase ",S]},S))})]})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,ao.jsx)($,{type:"number",min:"0",max:"100",value:g.progress||z.progress,onChange:S=>x({...g,progress:parseInt(S.target.value)||0}),className:"text-xs"})]})]}):(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,ao.jsx)("div",{className:`w-4 h-4 rounded-full ${z.color}`}),(0,ao.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:z.name}),(0,ao.jsxs)("div",{className:"flex gap-1",children:[(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>w(z),className:"p-1 h-8 w-8",children:(0,ao.jsx)(Ip.Edit2,{className:"h-3 w-3"})}),(0,ao.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>j(z.id),className:"p-1 h-8 w-8 hover:Fn-destructive/10 hover:text-destructive",children:(0,ao.jsx)(Ip.Trash2,{className:"h-3 w-3"})})]})]}),(0,ao.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,ao.jsxs)(q,{className:`text-xs ${D(z.confidence)}`,children:[z.confidence," confidence"]}),(0,ao.jsxs)(q,{variant:"outline",className:"text-xs",children:["Phase ",z.phase]}),(0,ao.jsxs)(q,{variant:"secondary",className:"text-xs Fn-muted text-muted-foreground",children:[Y.length," tasks"]}),(0,ao.jsxs)(q,{variant:"secondary",className:"text-xs Fn-muted text-muted-foreground",children:[Ce," pts"]})]}),z.description&&(0,ao.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:z.description}),(0,ao.jsxs)("div",{className:"mb-3",children:[(0,ao.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,ao.jsx)("span",{className:"select-none",children:"Progress"}),(0,ao.jsxs)("span",{className:"select-none",children:[z.progress,"%"]})]}),(0,ao.jsx)("div",{className:"w-full Fn-muted rounded-full h-2",children:(0,ao.jsx)("div",{className:"Fn-primary h-2 rounded-full transition-all duration-300",style:{width:`${z.progress}%`}})})]}),(0,ao.jsxs)(b,{onClick:()=>r(z.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,ao.jsx)(Ip.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,ao.jsx)("div",{className:"flex-1 p-4 overflow-ao-auto",children:(0,ao.jsx)("div",{className:`space-ao-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${c?"border-primary Fn-primary/10":"border-border"}`,children:Y.length===0?(0,ao.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,ao.jsx)(Ip.Move,{className:"h-8 w-8 mb-2"}),(0,ao.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):Y.map(S=>(0,ao.jsx)(bd,{task:S,epic:z,onDragStart:v,onTaskClick:s,isCompact:!0},S.id))})})]},z.id)})})})})]})};var Xf=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,s]=(0,Fn.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),r=i=>{i.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},n=()=>{s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,ao.jsx)(xt,{open:e,onOpenChange:n,children:(0,ao.jsxs)(ft,{className:"sm:max-w-md",children:[(0,ao.jsx)(wt,{children:(0,ao.jsx)(Ct,{children:"Add New Sprint"})}),(0,ao.jsxs)("form",{onSubmit:r,className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"name",children:"Sprint Name *"}),(0,ao.jsx)($,{id:"name",value:o.name,onChange:i=>s(l=>({...l,name:i.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ao.jsx)(et,{id:"description",value:o.description,onChange:i=>s(l=>({...l,description:i.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"Start Date *"}),(0,ao.jsxs)(Fr,{children:[(0,ao.jsx)(zr,{asChild:!0,children:(0,ao.jsxs)(b,{variant:"outline",className:m("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,ao.jsx)(Ip.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,pm.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,ao.jsx)(nr,{className:"w-auto p-0",align:"start",children:(0,ao.jsx)(Or,{mode:"single",selected:o.startDate,onSelect:i=>s(l=>({...l,startDate:i})),initialFocus:!0})})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{children:"End Date *"}),(0,ao.jsxs)(Fr,{children:[(0,ao.jsx)(zr,{asChild:!0,children:(0,ao.jsxs)(b,{variant:"outline",className:m("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,ao.jsx)(Ip.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,pm.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,ao.jsx)(nr,{className:"w-auto p-0",align:"start",children:(0,ao.jsx)(Or,{mode:"single",selected:o.endDate,onSelect:i=>s(l=>({...l,endDate:i})),initialFocus:!0,disabled:i=>o.startDate?i<o.startDate:!1})})]})]})]}),(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:i=>s(l=>({...l,isActive:i.target.checked})),className:"rounded border-gray-300"}),(0,ao.jsx)(P,{htmlFor:"isActive",children:"Set oi active sprint"})]}),(0,ao.jsxs)("div",{className:"flex justify-end gap-3 ao-4",children:[(0,ao.jsx)(b,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,ao.jsx)(b,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var qf=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddSprint:r})=>{let[n,i]=(0,Fn.useState)(["2"]),[l,c]=(0,Fn.useState)(null),[d,p]=(0,Fn.useState)(!1),[u,g]=(0,Fn.useState)(null),x=e.filter(A=>!A.sprintId),v=e.filter(A=>A.sprintId&&n.includes(A.sprintId)),h=[...a].filter(A=>A.id!=="backlog"&&A.id!=="all-tasks").sort((A,C)=>A.startDate.getTime()-C.startDate.getTime()),N=A=>t.find(C=>C.id===A),k=A=>a.find(C=>C.id===A),w=A=>{switch(A){case"high":return"Fn-destructive/20 text-destructive";case"medium":return"Fn-warning/20 text-warning";case"low":return"Fn-success/20 text-success";default:return"Fn-muted text-muted-foreground"}},R=A=>A.split(" ").map(C=>C[0]).join("").toUpperCase(),T=A=>{c(A)},j=A=>{A.preventDefault()},le=A=>{g(A)},D=()=>{g(null)},z=(A,C)=>{A.preventDefault(),g(null),l&&(o(l.id,{sprintId:C==="backlog"?void 0:C}),c(null))},Y=A=>{A==="backlog"||A==="all-tasks"||i(C=>C.includes(A)?C.filter(re=>re!==A):[...C,A])},Ce=A=>{r(A),p(!1)},S=({task:A,showSprint:C=!1})=>{let re=N(A.epicId),Se=A.sprintId?k(A.sprintId):null,[X,ve]=(0,Fn.useState)(!1),Ge=ye=>{ye.defaultPrevented||X||s(A)},V=ye=>{ve(!0),T(A)},ne=()=>{ve(!1)};return(0,ao.jsx)(F,{className:`p-3 cursor-grab transition-all duration-200 hover:shadow-md Fn-card border-border hover:border-border/80 active:cursor-grabbing ${X?"opacity-50 shadow-lg scale-105":""} ${l?.id===A.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:V,onDragEnd:ne,onClick:Ge,children:(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ao.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:A.title}),(0,ao.jsx)(q,{className:`text-xs select-none pointer-events-none ${w(A.priority)}`,children:A.priority[0].toUpperCase()})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between text-xs pointer-events-none",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-1",children:[re&&(0,ao.jsx)("div",{className:`w-2 h-2 rounded-full ${re.color}`}),(0,ao.jsx)("span",{className:"text-muted-foreground truncate select-none",children:re?.name})]}),(0,ao.jsx)("span",{className:"text-muted-foreground select-none",children:R(A.assignee)})]}),C&&Se&&(0,ao.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[(0,ao.jsx)(Ip.Calendar,{className:"h-3 w-3"}),(0,ao.jsx)("span",{className:"select-none",children:Se.name})]})]})})};return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsx)(St,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"Fn-gradient-Ip-r from-orange-600 via-amber-600 Ip-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>p(!0)}}),(0,ao.jsx)("div",{className:"flex-1",children:(0,ao.jsxs)("div",{className:"w-full",children:[(0,ao.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,ao.jsx)("div",{className:"lg:col-span-1",children:(0,ao.jsxs)(F,{className:"p-4 h-full Fn-card shadow-sm",onDragOver:j,onDragEnter:()=>le("backlog"),onDragLeave:D,onDrop:A=>z(A,"backlog"),children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,ao.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,ao.jsx)(q,{variant:"secondary",className:"Fn-muted text-muted-foreground",children:x.length})]}),(0,ao.jsxs)("div",{className:`space-ao-3 overflow-ao-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${u==="backlog"?"border-primary Fn-primary/10":"border-border"}`,children:[x.map(A=>(0,ao.jsx)(S,{task:A},A.id)),x.length===0&&(0,ao.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here Ip move Ip backlog"})]})]})}),(0,ao.jsx)("div",{className:"lg:col-span-3",children:(0,ao.jsxs)("div",{className:"space-ao-4",children:[(0,ao.jsxs)(F,{className:"p-4 Fn-card shadow-sm",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ao.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints Ip View"}),(0,ao.jsxs)(b,{onClick:()=>p(!0),className:"Fn-primary hover:Fn-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,ao.jsx)(Ip.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,ao.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:h.map(A=>(0,ao.jsxs)(b,{variant:n.includes(A.id)?"default":"outline",size:"sm",onClick:()=>Y(A.id),className:"text-xs h-8",children:[A.name,A.isActive&&(0,ao.jsx)("span",{className:"ml-1 text-success",children:"\u25CF"})]},A.id))})]}),(0,ao.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map(A=>h.find(C=>C.id===A)).filter(Boolean).sort((A,C)=>A.startDate.getTime()-C.startDate.getTime()).map(A=>{let C=v.filter(re=>re.sprintId===A.id);return(0,ao.jsxs)(F,{className:"p-4 Fn-card shadow-sm",onDragOver:j,onDragEnter:()=>le(A.id),onDragLeave:D,onDrop:re=>z(re,A.id),children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h3",{className:"font-semibold text-foreground select-none",children:A.name}),A.isActive&&(0,ao.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,ao.jsx)(q,{variant:"secondary",className:"Fn-muted text-muted-foreground",children:C.length})]}),(0,ao.jsxs)("div",{className:`space-ao-3 overflow-ao-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${u===A.id?"border-primary Fn-primary/10":"border-border"}`,children:[C.map(re=>(0,ao.jsx)(S,{task:re},re.id)),C.length===0&&(0,ao.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},A.id)})})," "]})})]}),(0,ao.jsx)(Xf,{isOpen:d,onClose:()=>p(!1),onAddSprint:Ce})]})})]})};var k0=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},S0=e=>e.toLocaleDateString("ao-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),P0=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("ao-US",{hour:"numeric",minute:"2-digit",hour12:!0})},$m=(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},Gm=e=>{let t=new Date;return e.toDateString()===t.toDateString()},D0=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},T0=({colleagues:e,onAddReminder:t,trigger:a})=>{let[o,s]=(0,Fn.useState)(!1),[r,n]=(0,Fn.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""});return(0,ao.jsxs)(xt,{open:o,onOpenChange:s,children:[(0,ao.jsx)(_n,{asChild:!0,children:a}),(0,ao.jsxs)(ft,{className:"max-w-2xl",children:[(0,ao.jsx)(wt,{children:(0,ao.jsx)(Ct,{children:"Add New Reminder"})}),(0,ao.jsxs)("form",{onSubmit:l=>{l.preventDefault();let c=e.find(p=>p.id===r.colleagueId);if(!c)return;let d={title:r.title,description:r.description,dueDate:new Date(r.dueDate),dueTime:r.dueTime||void 0,colleague:c,isCompleted:!1,isRecurring:r.isRecurring,recurrencePattern:r.isRecurring?r.recurrencePattern:void 0,recurrenceInterval:r.isRecurring?r.recurrenceInterval:void 0,priority:r.priority,reminderEnabled:r.reminderEnabled,reminderMinutes:r.reminderEnabled?r.reminderMinutes:void 0,tags:r.tags?r.tags.split(",").map(p=>p.trim()):void 0};t(d),s(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})},className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"title",children:"Title"}),(0,ao.jsx)($,{id:"title",value:r.title,onChange:l=>n({...r,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"priority",children:"Priority"}),(0,ao.jsxs)(Fe,{value:r.priority,onValueChange:l=>n({...r,priority:l}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"low",children:"\u{1F7E2} Low"}),(0,ao.jsx)(_,{value:"medium",children:"\u{1F7E1} Medium"}),(0,ao.jsx)(_,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ao.jsx)(et,{id:"description",value:r.description,onChange:l=>n({...r,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"dueDate",children:"Due Date"}),(0,ao.jsx)($,{id:"dueDate",type:"date",value:r.dueDate,onChange:l=>n({...r,dueDate:l.target.value}),required:!0})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,ao.jsx)($,{id:"dueTime",type:"time",value:r.dueTime,onChange:l=>n({...r,dueTime:l.target.value})})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"colleague",children:"Assigned Colleague"}),(0,ao.jsxs)(Fe,{value:r.colleagueId,onValueChange:l=>n({...r,colleagueId:l}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select a digital colleague"})}),(0,ao.jsx)(Be,{children:e.map(l=>(0,ao.jsx)(_,{value:l.id,children:l.name},l.id))})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:l=>n({...r,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,ao.jsx)(P,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,ao.jsxs)(Fe,{value:r.recurrencePattern,onValueChange:l=>n({...r,recurrencePattern:l}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"daily",children:"Daily"}),(0,ao.jsx)(_,{value:"weekly",children:"Weekly"}),(0,ao.jsx)(_,{value:"monthly",children:"Monthly"}),(0,ao.jsx)(_,{value:"yearly",children:"Yearly"})]})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"recurrenceInterval",children:"Every"}),(0,ao.jsx)($,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:l=>n({...r,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)("input",{type:"checkbox",id:"reminderEnabled",checked:r.reminderEnabled,onChange:l=>n({...r,reminderEnabled:l.target.checked}),className:"rounded border-border"}),(0,ao.jsx)(P,{htmlFor:"reminderEnabled",children:"Enable reminder notifications"})]}),r.reminderEnabled&&(0,ao.jsxs)("div",{className:"pl-6",children:[(0,ao.jsx)(P,{htmlFor:"reminderMinutes",children:"Remind ao"}),(0,ao.jsxs)(Fe,{value:r.reminderMinutes.toString(),onValueChange:l=>n({...r,reminderMinutes:parseInt(l)}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"5",children:"5 minutes before"}),(0,ao.jsx)(_,{value:"15",children:"15 minutes before"}),(0,ao.jsx)(_,{value:"30",children:"30 minutes before"}),(0,ao.jsx)(_,{value:"60",children:"1 hour before"}),(0,ao.jsx)(_,{value:"1440",children:"1 day before"})]})]})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"tags",children:"Tags (comma-separated)"}),(0,ao.jsx)($,{id:"tags",value:r.tags,onChange:l=>n({...r,tags:l.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,ao.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,ao.jsx)(b,{type:"button",variant:"outline",onClick:()=>s(!1),children:"Cancel"}),(0,ao.jsx)(b,{type:"submit",children:"Add Reminder"})]})]})]})]})},R0=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:s})=>{let[r,n]=(0,Fn.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("T")[0],dueTime:e.dueTime||"",colleagueId:e.colleague.id,priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""});return(0,ao.jsx)(xt,{open:o,onOpenChange:s,children:(0,ao.jsxs)(ft,{className:"max-w-2xl",children:[(0,ao.jsx)(wt,{children:(0,ao.jsx)(Ct,{children:"Edit Reminder"})}),(0,ao.jsxs)("form",{onSubmit:l=>{l.preventDefault();let c=t.find(p=>p.id===r.colleagueId);if(!c)return;let d={title:r.title,description:r.description,dueDate:new Date(r.dueDate),dueTime:r.dueTime||void 0,colleague:c,isRecurring:r.isRecurring,recurrencePattern:r.isRecurring?r.recurrencePattern:void 0,recurrenceInterval:r.isRecurring?r.recurrenceInterval:void 0,priority:r.priority,reminderEnabled:r.reminderEnabled,reminderMinutes:r.reminderEnabled?r.reminderMinutes:void 0,tags:r.tags?r.tags.split(",").map(p=>p.trim()):void 0};a(e.id,d),s()},className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"edit-title",children:"Title"}),(0,ao.jsx)($,{id:"edit-title",value:r.title,onChange:l=>n({...r,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"edit-priority",children:"Priority"}),(0,ao.jsxs)(Fe,{value:r.priority,onValueChange:l=>n({...r,priority:l}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"low",children:"\u{1F7E2} Low"}),(0,ao.jsx)(_,{value:"medium",children:"\u{1F7E1} Medium"}),(0,ao.jsx)(_,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"edit-description",children:"Description"}),(0,ao.jsx)(et,{id:"edit-description",value:r.description,onChange:l=>n({...r,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,ao.jsx)($,{id:"edit-dueDate",type:"date",value:r.dueDate,onChange:l=>n({...r,dueDate:l.target.value}),required:!0})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,ao.jsx)($,{id:"edit-dueTime",type:"time",value:r.dueTime,onChange:l=>n({...r,dueTime:l.target.value})})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,ao.jsxs)(Fe,{value:r.colleagueId,onValueChange:l=>n({...r,colleagueId:l}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{placeholder:"Select a digital colleague"})}),(0,ao.jsx)(Be,{children:t.map(l=>(0,ao.jsx)(_,{value:l.id,children:l.name},l.id))})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:r.isRecurring,onChange:l=>n({...r,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,ao.jsx)(P,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,ao.jsxs)(Fe,{value:r.recurrencePattern,onValueChange:l=>n({...r,recurrencePattern:l}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"daily",children:"Daily"}),(0,ao.jsx)(_,{value:"weekly",children:"Weekly"}),(0,ao.jsx)(_,{value:"monthly",children:"Monthly"}),(0,ao.jsx)(_,{value:"yearly",children:"Yearly"})]})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,ao.jsx)($,{id:"edit-recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:l=>n({...r,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:r.reminderEnabled,onChange:l=>n({...r,reminderEnabled:l.target.checked}),className:"rounded border-border"}),(0,ao.jsx)(P,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),r.reminderEnabled&&(0,ao.jsxs)("div",{className:"pl-6",children:[(0,ao.jsx)(P,{htmlFor:"edit-reminderMinutes",children:"Remind ao"}),(0,ao.jsxs)(Fe,{value:r.reminderMinutes.toString(),onValueChange:l=>n({...r,reminderMinutes:parseInt(l)}),children:[(0,ao.jsx)(Me,{children:(0,ao.jsx)(_e,{})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsx)(_,{value:"5",children:"5 minutes before"}),(0,ao.jsx)(_,{value:"15",children:"15 minutes before"}),(0,ao.jsx)(_,{value:"30",children:"30 minutes before"}),(0,ao.jsx)(_,{value:"60",children:"1 hour before"}),(0,ao.jsx)(_,{value:"1440",children:"1 day before"})]})]})]})]}),(0,ao.jsxs)("div",{children:[(0,ao.jsx)(P,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,ao.jsx)($,{id:"edit-tags",value:r.tags,onChange:l=>n({...r,tags:l.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,ao.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,ao.jsx)(b,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,ao.jsx)(b,{type:"submit",children:"Save Changes"})]})]})]})})},A0=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[s,r]=(0,Fn.useState)(!1),n=$m(e.dueDate,e.dueTime),i=Gm(e.dueDate),l=D0(e.dueDate),c=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},d=()=>i?"Today":l?"Tomorrow":n&&!e.isCompleted?"Overdue":S0(e.dueDate);return(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(R0,{reminder:e,colleagues:t,onUpdateReminder:a,open:s,onClose:()=>r(!1)}),(0,ao.jsx)(F,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${n&&!e.isCompleted?"border-destructive/50 Fn-destructive/5":""}`,children:(0,ao.jsx)(J,{className:"p-4",children:(0,ao.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ao.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,ao.jsx)("button",{onClick:c,className:"ao-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,ao.jsx)(Ip.CheckCircle,{className:"h-5 w-5"}):(0,ao.jsx)(Ip.Circle,{className:"h-5 w-5"})}),(0,ao.jsxs)("div",{className:"flex-1",children:[(0,ao.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,ao.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,ao.jsx)("span",{className:"text-sm",children:k0(e.priority)}),e.isRecurring&&(0,ao.jsx)(Ip.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,ao.jsx)(Ip.Bell,{className:"h-4 w-4 text-success"})]}),(0,ao.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,ao.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,ao.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ao.jsx)(Ip.Calendar,{className:"h-4 w-4"}),(0,ao.jsx)("span",{className:n&&!e.isCompleted?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,ao.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ao.jsx)(Ip.Clock,{className:"h-4 w-4"}),(0,ao.jsx)("span",{children:P0(e.dueTime)})]}),(0,ao.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ao.jsx)(Ip.User,{className:"h-4 w-4"}),(0,ao.jsx)("span",{children:e.colleague.name})]})]}),e.tags&&e.tags.length>0&&(0,ao.jsx)("div",{className:"flex flex-wrap gap-1 ao-2",children:e.tags.map((p,u)=>(0,ao.jsx)(q,{variant:"secondary",className:"text-xs",children:p},u))})]})]}),(0,ao.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ao.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>r(!0),className:"h-8 w-8 p-0",children:(0,ao.jsx)(Ip.Edit2,{className:"h-4 w-4"})}),(0,ao.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,ao.jsx)(Ip.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Yf=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:s})=>{let[r,n]=(0,Fn.useState)(e),[i]=(0,Fn.useState)(t),[l,c]=(0,Fn.useState)("all"),[d,p]=(0,Fn.useState)(""),u=k=>{let w={...k,id:Date.now().toString(),createdAt:new Date};n(R=>[...R,w]),a?.(k)},g=(k,w)=>{n(R=>R.map(T=>T.id===k?{...T,...w}:T)),o?.(k,w)},x=k=>{n(w=>w.filter(R=>R.id!==k)),s?.(k)},h=r.filter(k=>{if(d){let w=d.toLowerCase();if(!(k.title.toLowerCase().includes(w)||k.description.toLowerCase().includes(w)||k.colleague.name.toLowerCase().includes(w)||k.tags?.some(T=>T.toLowerCase().includes(w))))return!1}switch(l){case"pending":return!k.isCompleted;case"completed":return k.isCompleted;case"overdue":return!k.isCompleted&&$m(k.dueDate,k.dueTime);case"today":return Gm(k.dueDate);default:return!0}}).sort((k,w)=>{if(k.isCompleted&&!w.isCompleted)return 1;if(!k.isCompleted&&w.isCompleted)return-1;let R={high:3,medium:2,low:1},T=R[w.priority]-R[k.priority];return T!==0?T:k.dueDate.getTime()-w.dueDate.getTime()}),N={total:r.length,pending:r.filter(k=>!k.isCompleted).length,completed:r.filter(k=>k.isCompleted).length,overdue:r.filter(k=>!k.isCompleted&&$m(k.dueDate,k.dueTime)).length,today:r.filter(k=>Gm(k.dueDate)).length};return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsx)(St,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"Fn-gradient-Ip-r from-emerald-600 via-teal-600 Ip-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{let k={title:"New Reminder",description:"Don't forget Ip complete this task",dueDate:new Date,dueTime:"09:00",colleague:i[0]||{id:"1",name:"Default Colleague",department:"General",role:"Team Member"},isCompleted:!1,isRecurring:!1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,tags:["reminder"]};u(k)}}}),(0,ao.jsx)("div",{className:"h-full Fn-background",children:(0,ao.jsxs)("div",{className:"p-6",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,ao.jsxs)("div",{children:[(0,ao.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,ao.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,ao.jsx)(T0,{colleagues:i,onAddReminder:u,trigger:(0,ao.jsxs)(b,{className:"flex items-center space-x-2",children:[(0,ao.jsx)(Ip.Plus,{className:"h-4 w-4"}),(0,ao.jsx)("span",{children:"Add Reminder"})]})})]}),(0,ao.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,ao.jsxs)(F,{className:"p-4",children:[(0,ao.jsx)("div",{className:"text-2xl font-bold text-foreground",children:N.total}),(0,ao.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,ao.jsxs)(F,{className:"p-4",children:[(0,ao.jsx)("div",{className:"text-2xl font-bold text-primary",children:N.pending}),(0,ao.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,ao.jsxs)(F,{className:"p-4",children:[(0,ao.jsx)("div",{className:"text-2xl font-bold text-success",children:N.completed}),(0,ao.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,ao.jsxs)(F,{className:"p-4",children:[(0,ao.jsx)("div",{className:"text-2xl font-bold text-destructive",children:N.overdue}),(0,ao.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,ao.jsxs)(F,{className:"p-4",children:[(0,ao.jsx)("div",{className:"text-2xl font-bold text-warning",children:N.today}),(0,ao.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,ao.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,ao.jsx)("div",{className:"flex-1",children:(0,ao.jsx)($,{placeholder:"Search reminders...",value:d,onChange:k=>p(k.target.value),className:"max-w-md"})}),(0,ao.jsxs)(Fe,{value:l,onValueChange:k=>c(k),children:[(0,ao.jsx)(Me,{className:"w-40",children:(0,ao.jsx)(_e,{})}),(0,ao.jsxs)(Be,{children:[(0,ao.jsxs)(_,{value:"all",children:["All (",N.total,")"]}),(0,ao.jsxs)(_,{value:"pending",children:["Pending (",N.pending,")"]}),(0,ao.jsxs)(_,{value:"completed",children:["Completed (",N.completed,")"]}),(0,ao.jsxs)(_,{value:"overdue",children:["Overdue (",N.overdue,")"]}),(0,ao.jsxs)(_,{value:"today",children:["Today (",N.today,")"]})]})]})]}),(0,ao.jsx)("div",{className:"space-ao-4",children:h.length===0?(0,ao.jsxs)(F,{className:"p-8 text-center",children:[(0,ao.jsx)("div",{className:"text-muted-foreground",children:d||l!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&l==="all"&&(0,ao.jsx)("p",{className:"text-sm text-muted-foreground/60 ao-2",children:"Create your first reminder Ip get started"})]}):h.map(k=>(0,ao.jsx)(A0,{reminder:k,colleagues:i,onUpdateReminder:g,onDeleteReminder:x},k.id))})]})})]})};function Wm({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:s=[],initialReminders:r=[],initialColleagues:n=[],initialFiles:i=[],onAddTask:l,onUpdateTask:c,onDeleteTask:d,onTaskClick:p,onAddEpic:u,onUpdateEpic:g,onDeleteEpic:x,onAddTaskToEpic:v,onAddSprint:h,onUpdateSprint:N,onDeleteSprint:k,onAddProject:w,onUpdateProject:R,onDeleteProject:T,onFileAdd:j,onFileEdit:le,onFileDelete:D,onFileClick:z,onAddReminder:Y,onUpdateReminder:Ce,onDeleteReminder:S,onViewChange:A,onToggleMobileMenu:C,onTeamClick:re,onTeamChange:Se,onCopilotClick:X}){let[ve,Ge]=(0,Fn.useState)(t),[V,ne]=(0,Fn.useState)(a),[ye,xe]=(0,Fn.useState)(o),[ht,L]=(0,Fn.useState)(s),[gt,Tt]=(0,Fn.useState)(r),[_a,qo]=(0,Fn.useState)(n),[is,zs]=(0,Fn.useState)(i),[Ti,js]=(0,Fn.useState)(!1),[Hs,Os]=(0,Fn.useState)(!1),[Sr,ns]=(0,Fn.useState)(null),[Ri,Nt]=(0,Fn.useState)(null),[Ra,I]=(0,Fn.useState)(null),[G,We]=(0,Fn.useState)("kanban"),[Pd,Dd]=(0,Fn.useState)(!1),Us=(0,_u.useRouter)(),av=V.filter(E=>E.isSelected).map(E=>E.id),An=ye.find(E=>E.isSelected),ov=ve.filter(E=>{let Z=av.includes(E.epicId);return!An||An.id==="all-tasks"?Z:An.id==="backlog"?Z&&!E.sprintId:Z&&E.sprintId===An.id}),M0=E=>ov.filter(Z=>Z.status===E),B0=E=>{let Z={};return V.forEach(De=>{Z[De.id]=E.filter(yt=>yt.epicId===De.id)}),Z},L0=E=>{I(E)},E0=E=>{Ra&&(Ge(Z=>Z.map(De=>De.id===Ra.id?{...De,status:E}:De)),I(null))},Ym=E=>{let Z={...E,id:Date.now().toString(),createdAt:new Date};Ge(De=>[...De,Z]),c?.(Z.id,Z)},In=(E,Z)=>{Ge(De=>De.map(yt=>yt.id===E?{...yt,...Z}:yt)),c?.(E,Z)},rv=async(E,Z)=>{In(E,Z)},Jm=E=>{Ge(Z=>Z.filter(De=>De.id!==E)),Sr?.id===E&&ns(null)},sv=async E=>{Jm(E)},iv=E=>{let Z={...E,id:Date.now().toString(),isSelected:!1};L(De=>[...De,Z]),w?.(E)},nv=(E,Z)=>{L(De=>De.map(yt=>yt.id===E?Z.isSelected?(Us.push(`/kanban/${E}`),{...yt,...Z}):{...yt,...Z}:Z.isSelected&&E!==yt.id?{...yt,isSelected:!1}:yt)),R?.(E,Z)},lv=E=>{L(Z=>Z.filter(De=>De.id!==E)),T?.(E)},dv=E=>{let Z={...E,id:Date.now().toString(),isSelected:!0};ne(De=>[...De,Z])},Td=()=>{Os(!0)},Qm=(E,Z)=>{ne(De=>De.map(yt=>yt.id===E?{...yt,...Z}:yt)),g?.(E,Z)},Zm=E=>{ne(Z=>Z.filter(De=>De.id!==E)),Ge(Z=>Z.filter(De=>De.epicId!==E)),x?.(E)},ep=E=>{let Z={...E,id:Date.now().toString(),isSelected:!1};xe(De=>[...De,Z]),h?.(E)},cv=(E,Z)=>{xe(De=>De.map(yt=>yt.id===E?Z.isSelected?{...yt,...Z}:{...yt,...Z}:Z.isSelected&&E!==yt.id?{...yt,isSelected:!1}:yt)),N?.(E,Z)},mv=E=>{E==="backlog"||E==="all-tasks"||(xe(Z=>Z.filter(De=>De.id!==E)),Ge(Z=>Z.map(De=>De.sprintId===E?{...De,sprintId:void 0}:De)),k?.(E))},Rd=E=>{ns(E)},pv=E=>{E==="planning"&&window.innerWidth<768||We(E)},uv=()=>{Dd(E=>!E),C?.()},F0=()=>{Us.push("/")},z0=E=>{console.log("Switching Ip team:",E)},j0=E=>{console.log("Switching Ip team:",E)},gv=E=>{Nt(E),js(!0)},fv=()=>{js(!1),Nt(null)},vv=E=>{let Z={...E,id:Date.now().toString(),createdAt:new Date};Tt(De=>[...De,Z]),Y?.(E)},bv=(E,Z)=>{Tt(De=>De.map(yt=>yt.id===E?{...yt,...Z}:yt)),Ce?.(E,Z)},hv=E=>{Tt(Z=>Z.filter(De=>De.id!==E)),S?.(E)},yv=E=>{zs(Z=>[...Z,E]),j?.(E)},xv=E=>{le?.(E)},Nv=E=>{zs(Z=>Z.filter(De=>De.name!==E)),D?.(E)},wv=E=>{z?.(E)},H0=[{id:"todo",title:"ao ao",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],O0=()=>{switch(G){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"}},Ad=[{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")}],U0=Ad.sort((E,Z)=>Z.lastUsed.getTime()-E.lastUsed.getTime()).slice(0,3),V0=Ad.length>3,$0=Ad.slice(3);return(0,ao.jsxs)(nd,{projects:ht,epics:V,sprints:ye,currentView:G,onUpdateProject:nv,onDeleteProject:lv,onAddProject:iv,onUpdateEpic:Qm,onDeleteEpic:Zm,onAddEpic:Td,onAddSprint:ep,onUpdateSprint:cv,onDeleteSprint:mv,onViewChange:pv,mobileMenuOpen:Pd,onToggleMobileMenu:uv,children:[G==="kanban"&&(0,ao.jsx)("div",{className:"h-full",children:(0,ao.jsx)(Wf,{initialProjects:ht,initialEpics:V,initialSprints:ye,initialTasks:ve,onAddTask:Ym,onUpdateTask:In,onDeleteTask:Jm,onTaskClick:Rd,onAddEpic:Td})}),G==="planning"&&(0,ao.jsx)("div",{className:"hidden md:block h-full",children:(0,ao.jsx)(qf,{tasks:ve,epics:V,sprints:ye,onUpdateTask:In,onTaskClick:Rd,onAddSprint:ep})}),G==="tasks"&&(0,ao.jsx)("div",{className:"h-full",children:(0,ao.jsx)(Yf,{initialReminders:gt,initialColleagues:_a,onAddReminder:vv,onUpdateReminder:bv,onDeleteReminder:hv})}),G==="files"&&(0,ao.jsx)("div",{className:"h-full",children:(0,ao.jsx)(Dn,{initialFiles:is,onFileAdd:yv,onFileEdit:xv,onFileDelete:Nv,onFileClick:wv,compactView:!1})}),G==="epics"&&(0,ao.jsx)("div",{className:"h-full",children:(0,ao.jsx)(_f,{tasks:ve,epics:V,sprints:ye,onUpdateTask:In,onTaskClick:Rd,onAddTaskToEpic:gv,onAddEpic:Td,onUpdateEpic:Qm,onDeleteEpic:Zm})}),(0,ao.jsx)(hd,{isOpen:Ti,onClose:fv,onAddTask:Ym,epics:V,sprints:ye,defaultEpicId:Ri||void 0}),(0,ao.jsx)(Nd,{isOpen:Hs,onClose:()=>Os(!1),onAddEpic:dv}),Sr&&(0,ao.jsx)(xd,{isOpen:!!Sr,onClose:()=>ns(null),task:Sr,onUpdateTask:rv,onDeleteTask:sv,epics:V,sprints:ye})]})}var Qf=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:s=""})=>{let[r,n]=(0,Fn.useState)({name:o?.name||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[i,l]=(0,Fn.useState)({}),c=()=>{let u={};return r.name.trim()?r.name.trim().length<3&&(u.name="Project name must be Ip least 3 characters"):u.name="Project name is required",r.objectives.trim()?r.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (Ip 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 (Ip 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(r)}catch(g){console.error("Error submitting project form:",g)}},p=(u,g)=>{n(x=>({...x,[u]:g})),i[u]&&l(x=>({...x,[u]:void 0}))};return(0,ao.jsxs)(F,{className:`w-full max-w-2xl ${s}`,children:[(0,ao.jsxs)(ge,{children:[(0,ao.jsxs)(be,{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,ao.jsx)(So,{children:"Set up a new project with clear objectives and work instructions Ip help your team collaborate effectively."})]}),(0,ao.jsxs)("form",{onSubmit:d,children:[(0,ao.jsxs)(J,{className:"space-ao-6",children:[(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,ao.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,ao.jsx)("p",{className:"text-sm text-red-600",children:i.name})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,ao.jsx)(et,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:r.objectives,onChange:u=>p("objectives",u.target.value),className:`min-h-[100px] resize-ao ${i.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,ao.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,ao.jsx)("span",{children:i.objectives&&(0,ao.jsx)("span",{className:"text-red-600",children:i.objectives})}),(0,ao.jsxs)("span",{children:[r.objectives.length,"/1000"]})]})]}),(0,ao.jsxs)("div",{className:"space-ao-2",children:[(0,ao.jsx)(P,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,ao.jsx)(et,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should be carried out, including processes, standards, and expectations...",value:r.workInstructions,onChange:u=>p("workInstructions",u.target.value),className:`min-h-[120px] resize-ao ${i.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,ao.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,ao.jsx)("span",{children:i.workInstructions&&(0,ao.jsx)("span",{className:"text-red-600",children:i.workInstructions})}),(0,ao.jsxs)("span",{children:[r.workInstructions.length,"/2000"]})]})]}),(0,ao.jsxs)("div",{className:"space-ao-3",children:[(0,ao.jsx)(P,{className:"text-sm font-medium",children:"Project Management"}),(0,ao.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ao.jsx)(La,{id:"plan",checked:r.plan,onCheckedChange:u=>p("plan",u===!0),disabled:a}),(0,ao.jsx)(P,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,ao.jsx)("p",{className:"text-xs text-gray-500 ml-6",children:"This will allow project managers Ip create sprints, assign tasks, and track progress."})]})]}),(0,ao.jsxs)(Ya,{className:"flex justify-end gap-3",children:[t&&(0,ao.jsxs)(b,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.X,{className:"h-4 w-4"}),"Cancel"]}),(0,ao.jsx)(b,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(Ip.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(Ip.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function Xm({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[s,r]=(0,Fn.useState)(!1),[n,i]=(0,Fn.useState)(!1),l=async d=>{i(!0);try{await t(d),r(!1)}catch(p){console.error("Error creating project:",p)}finally{i(!1)}},c=()=>{r(!0)};return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:[(0,ao.jsx)(St,{title:"Project Management",description:"Organise your work into projects Ip collaborate with your team.",gradient:"Fn-gradient-Ip-r from-purple-600 via-violet-600 Ip-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,ao.jsxs)("section",{className:"space-ao-4 ao-8",children:[(0,ao.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,ao.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(d=>(0,ao.jsx)(pd,{project:d,onOpen:a,onShare:o},d.name))})]})]},"projects-index-view")}),(0,ao.jsx)(xt,{open:s,onOpenChange:r,children:(0,ao.jsxs)(ft,{className:"max-w-3xl max-h-[90vh] overflow-ao-auto",children:[(0,ao.jsxs)(wt,{className:"sr-only",children:[(0,ao.jsx)(Ct,{children:"Create New Project"}),(0,ao.jsx)(fs,{children:"Fill out the form below Ip create a new project."})]}),(0,ao.jsx)(Qf,{onSubmit:l,onCancel:()=>r(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function ev({team:e,onOpen:t,className:a}){return(0,ao.jsx)(oi.motion.div,{whileHover:{scale:1.02,ao:-5},whileTap:{scale:.98},className:a,children:(0,ao.jsxs)(F,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,ao.jsxs)(ge,{children:[(0,ao.jsx)(be,{className:"text-lg",children:e.name}),(0,ao.jsx)(So,{className:"ao-1 text-sm",children:e.description})]}),(0,ao.jsxs)(J,{className:"space-ao-4",children:[(0,ao.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ao.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.Users,{className:"h-4 w-4 text-blue-500"}),(0,ao.jsx)("span",{children:"Human"})]}),(0,ao.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.Bot,{className:"h-4 w-4 text-purple-500"}),(0,ao.jsx)("span",{children:"Digital"})]}),(0,ao.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,ao.jsxs)("div",{className:"flex items-center justify-between text-sm border-t ao-4",children:[(0,ao.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ao.jsx)(Ip.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,ao.jsx)("span",{children:"Projects"})]}),(0,ao.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,ao.jsx)(Ya,{className:"flex gap-2",children:(0,ao.jsx)(b,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function qm({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,s]=(0,Fn.useState)(!1),r=()=>{s(!0),t?.()},n=i=>{a?.(i)};return(0,ao.jsxs)("div",{className:"px-2 md:px-4 py-4 space-ao-8",children:[(0,ao.jsx)(oi.AnimatePresence,{mode:"wait",children:(0,ao.jsxs)(oi.motion.div,{initial:{opacity:0,ao:10},animate:{opacity:1,ao:0},exit:{opacity:0,ao:-10},transition:{duration:.2},children:[(0,ao.jsx)(St,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"Fn-gradient-Ip-r from-blue-600 via-cyan-600 Ip-teal-600",primaryAction:{label:"Create Team",onClick:r}}),(0,ao.jsxs)("section",{className:"space-ao-4 ao-8",children:[(0,ao.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,ao.jsxs)("div",{className:"text-center py-12",children:[(0,ao.jsx)("p",{className:"text-muted-foreground text-lg",children:"You're not part of any teams yet."}),(0,ao.jsx)("p",{className:"text-muted-foreground text-sm ao-2",children:"Create a new team or ask Ip be added Ip an existing one."})]}):(0,ao.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(i=>(0,ao.jsx)(ev,{team:i,onOpen:n},i.id))})]})]},"teams-index-view")}),(0,ao.jsx)(xt,{open:o,onOpenChange:s,children:(0,ao.jsxs)(ft,{className:"max-w-3xl max-h-[90vh] overflow-ao-auto",children:[(0,ao.jsxs)(wt,{children:[(0,ao.jsx)(Ct,{children:"Create New Team"}),(0,ao.jsx)(fs,{children:"Set up a new team Ip collaborate with colleagues on projects."})]}),(0,ao.jsx)("div",{className:"p-6 text-center text-muted-foreground",children:(0,ao.jsx)("p",{children:"Team creation form coming soon..."})})]})})]})}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,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,DarkTop,DashboardHeader,DashboardHero,DashboardPage,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DigitalColleageusLayout,DigitalColleagueClone,DigitalColleagueOptions,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,FileView,Filter,FlowPrintable,Footer,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanColumn,KnowledgeView,Label,LightTop,Logo,LowImpactHero,MOTD,MainPage,ManagementSidebar,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,NotificationsPanel,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadPagination,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,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});
|