cortex-react-components 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
  2. package/dist/{chunk-EZEZEBLI.mjs → chunk-2EC6ZHJE.mjs} +1 -1
  3. package/dist/chunk-2VR4KIQL.mjs +4 -0
  4. package/dist/{chunk-UCHNFFXQ.mjs → chunk-4FOM4XM6.mjs} +1 -1
  5. package/dist/{chunk-QTILVWJA.mjs → chunk-4RYG24IZ.mjs} +1 -1
  6. package/dist/{chunk-546LLRCZ.mjs → chunk-5JQAH3EN.mjs} +1 -1
  7. package/dist/{chunk-ABGNIQRP.mjs → chunk-5RDLHKTK.mjs} +1 -1
  8. package/dist/{chunk-JXFCIH2E.mjs → chunk-7WTM3LJ4.mjs} +1 -1
  9. package/dist/{chunk-VIPT3OVD.mjs → chunk-AHJIHY2A.mjs} +1 -1
  10. package/dist/{chunk-WG6ATCG3.mjs → chunk-AWMFKQHJ.mjs} +1 -1
  11. package/dist/{chunk-IV5HRCWW.mjs → chunk-BDDEMCAH.mjs} +1 -1
  12. package/dist/{chunk-TK4JC5PG.mjs → chunk-E64KWNOT.mjs} +1 -1
  13. package/dist/{chunk-LG2AWHTC.mjs → chunk-EB2UGKCE.mjs} +1 -1
  14. package/dist/{chunk-KEOMDWUC.mjs → chunk-EHSOO47V.mjs} +1 -1
  15. package/dist/{chunk-4ZEATBUU.mjs → chunk-ERURPIHS.mjs} +1 -1
  16. package/dist/{chunk-PEOZPVWF.mjs → chunk-FATHLUEL.mjs} +1 -1
  17. package/dist/{chunk-TCXAETN2.mjs → chunk-FHJ4MHLT.mjs} +1 -1
  18. package/dist/{chunk-7SPSOAIQ.mjs → chunk-GEFCIPUN.mjs} +1 -1
  19. package/dist/{chunk-MXFCHKIK.mjs → chunk-GGXCPUR2.mjs} +1 -1
  20. package/dist/{chunk-OCYVZBS7.mjs → chunk-GWAEXG22.mjs} +1 -1
  21. package/dist/{chunk-FOISWNF5.mjs → chunk-HHYHENVF.mjs} +1 -1
  22. package/dist/{chunk-EW64VNFT.mjs → chunk-HKM6FA5J.mjs} +1 -1
  23. package/dist/{chunk-F4UGWCXY.mjs → chunk-IQQ7ZWCP.mjs} +1 -1
  24. package/dist/{chunk-IDG2O4B7.mjs → chunk-ISBVFNWD.mjs} +1 -1
  25. package/dist/chunk-JHSHXYPK.mjs +4 -0
  26. package/dist/{chunk-DA2H3N3G.mjs → chunk-L3SSJ5A3.mjs} +1 -1
  27. package/dist/chunk-L7W3JS7W.mjs +1 -0
  28. package/dist/{chunk-CVLUVZR3.mjs → chunk-LLED3RQS.mjs} +1 -1
  29. package/dist/chunk-LUPNE23E.mjs +1 -0
  30. package/dist/{chunk-RK2CAIEF.mjs → chunk-M527EJIX.mjs} +1 -1
  31. package/dist/{chunk-TO2UDP5T.mjs → chunk-MMOATE43.mjs} +1 -1
  32. package/dist/{chunk-CK2TFJB2.mjs → chunk-N2336R53.mjs} +1 -1
  33. package/dist/{chunk-IPXOPQPI.mjs → chunk-NC7WGIM5.mjs} +1 -1
  34. package/dist/{chunk-SNZ5BAQQ.mjs → chunk-NHFCO6RG.mjs} +1 -1
  35. package/dist/{chunk-OB5WMODY.mjs → chunk-O3ORC6HS.mjs} +1 -1
  36. package/dist/{chunk-CAKJOTEE.mjs → chunk-OEFXIEY3.mjs} +1 -1
  37. package/dist/{chunk-TWGRQW4P.mjs → chunk-OJZQH57M.mjs} +1 -1
  38. package/dist/chunk-PA4ZBJDO.mjs +1 -0
  39. package/dist/chunk-PE3RX2EM.mjs +4 -0
  40. package/dist/{chunk-ZFUP5NVF.mjs → chunk-PXLSH6S2.mjs} +1 -1
  41. package/dist/{chunk-P6VHSIQK.mjs → chunk-RMIGFWKK.mjs} +1 -1
  42. package/dist/chunk-SWA5TRPZ.mjs +4 -0
  43. package/dist/{chunk-6UADPSC5.mjs → chunk-TEL4MSNV.mjs} +1 -1
  44. package/dist/{chunk-4VWCJYTN.mjs → chunk-UENDC4U4.mjs} +1 -1
  45. package/dist/{chunk-2JBVESQ2.mjs → chunk-WOSN4OLA.mjs} +1 -1
  46. package/dist/{chunk-77YVLEKT.mjs → chunk-WYHDFQVL.mjs} +1 -1
  47. package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
  48. package/dist/{chunk-GTK2SGS5.mjs → chunk-XBCYPOFD.mjs} +1 -1
  49. package/dist/{chunk-BA53AOCS.mjs → chunk-XEZD3D7C.mjs} +1 -1
  50. package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
  51. package/dist/{chunk-RAGDUV7M.mjs → chunk-XIGBDWYI.mjs} +1 -1
  52. package/dist/{chunk-XR55FO72.mjs → chunk-Y7XREGJN.mjs} +1 -1
  53. package/dist/components/AdvancedComponents/index.mjs +1 -1
  54. package/dist/components/AdvancedComponents/sidebar.js +1 -1
  55. package/dist/components/AdvancedComponents/sidebar.mjs +3 -1
  56. package/dist/components/Blocks/Banner.mjs +1 -1
  57. package/dist/components/Blocks/CallToAction.mjs +1 -1
  58. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  59. package/dist/components/Blocks/Content.mjs +1 -1
  60. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  61. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  62. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  63. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  64. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  65. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  66. package/dist/components/Blocks/index.mjs +1 -1
  67. package/dist/components/CRM/CogeBoard.mjs +1 -1
  68. package/dist/components/CRM/DealDetails.mjs +1 -1
  69. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  70. package/dist/components/CRM/NewDealForm.mjs +1 -1
  71. package/dist/components/CRM/index.mjs +1 -1
  72. package/dist/components/Cards/ContentCard.mjs +1 -1
  73. package/dist/components/Cards/FeatureCard.mjs +1 -1
  74. package/dist/components/Cards/index.mjs +1 -1
  75. package/dist/components/Chat/CAPABILITIES_README.js +12 -5
  76. package/dist/components/Chat/CAPABILITIES_README.mjs +12 -5
  77. package/dist/components/Chat/{EnhancedChatInterface.d.ts → ChatInterface.d.ts} +4 -6
  78. package/dist/components/Chat/ChatInterface.js +5 -0
  79. package/dist/components/Chat/ChatInterface.mjs +1 -0
  80. package/dist/components/Chat/CopilotInterface.d.ts +31 -86
  81. package/dist/components/Chat/CopilotInterface.js +1 -1
  82. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  83. package/dist/components/Chat/README-AI-Integration.js +140 -0
  84. package/dist/components/Chat/README-AI-Integration.mjs +140 -0
  85. package/dist/components/Chat/chat-session-sidebar.d.ts +0 -2
  86. package/dist/components/Chat/chat-session-sidebar.js +1 -1
  87. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  88. package/dist/components/Chat/demo.d.ts +7 -0
  89. package/dist/components/Chat/demo.js +5 -0
  90. package/dist/components/Chat/demo.mjs +1 -0
  91. package/dist/components/Chat/example-usage.d.ts +39 -0
  92. package/dist/components/Chat/example-usage.js +5 -0
  93. package/dist/components/Chat/example-usage.mjs +1 -0
  94. package/dist/components/Chat/example-with-vercel-ai.d.ts +43 -0
  95. package/dist/components/Chat/example-with-vercel-ai.js +5 -0
  96. package/dist/components/Chat/example-with-vercel-ai.mjs +2 -0
  97. package/dist/components/Chat/index.d.ts +2 -0
  98. package/dist/components/Chat/index.js +2 -2
  99. package/dist/components/Chat/index.mjs +1 -1
  100. package/dist/components/Chat/types.d.ts +16 -0
  101. package/dist/components/Chat/types.js +1 -0
  102. package/dist/components/Chat/types.mjs +1 -0
  103. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  104. package/dist/components/DigitalColleagues/DigitalColleageusLayout.d.ts +2 -1
  105. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  106. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  107. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  108. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  109. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  110. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  111. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  112. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  113. package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
  114. package/dist/components/DigitalColleagues/sidebar-favorites-readme.js +228 -0
  115. package/dist/components/DigitalColleagues/sidebar-favorites-readme.mjs +228 -0
  116. package/dist/components/DigitalColleagues/sidebar-new.css +1 -0
  117. package/dist/components/{dc-temp/sidebar.d.ts → DigitalColleagues/sidebar-new.d.ts} +3 -2
  118. package/dist/components/DigitalColleagues/sidebar-new.js +5 -0
  119. package/dist/components/DigitalColleagues/sidebar-new.mjs +4 -0
  120. package/dist/components/DigitalColleagues/sidebar.css +1 -0
  121. package/dist/components/DigitalColleagues/sidebar.d.ts +17 -0
  122. package/dist/components/DigitalColleagues/sidebar.js +5 -0
  123. package/dist/components/DigitalColleagues/sidebar.mjs +2 -0
  124. package/dist/components/DigitalColleagues/test-data.js +1 -1
  125. package/dist/components/DigitalColleagues/test-data.mjs +1 -1
  126. package/dist/components/DigitalColleagues/types.d.ts +3 -0
  127. package/dist/components/DigitalColleagues/types.js +1 -1
  128. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  129. package/dist/components/HeaderFooter/enhanced-header.css +1 -0
  130. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  131. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  132. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  133. package/dist/components/Heros/PostHero/index.mjs +1 -1
  134. package/dist/components/Heros/RenderHero.mjs +1 -1
  135. package/dist/components/Heros/index.mjs +1 -1
  136. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  137. package/dist/components/Holidays/index.mjs +1 -1
  138. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  139. package/dist/components/Layouts/Print.mjs +1 -1
  140. package/dist/components/Layouts/SlideShow.mjs +1 -1
  141. package/dist/components/Layouts/index.mjs +1 -1
  142. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  143. package/dist/components/Menus/SidebarRight.mjs +1 -1
  144. package/dist/components/Menus/index.mjs +1 -1
  145. package/dist/components/Payload/Card/index.mjs +1 -1
  146. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  147. package/dist/components/Payload/Media/index.mjs +1 -1
  148. package/dist/components/Payload/RichText/index.mjs +1 -1
  149. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  150. package/dist/components/Payload/index.mjs +1 -1
  151. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  152. package/dist/components/Projects/ProjectPage.js +1 -1
  153. package/dist/components/Projects/ProjectPage.mjs +1 -1
  154. package/dist/components/Projects/ProjectView.mjs +1 -1
  155. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  156. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  157. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  158. package/dist/components/dc-temp/index.mjs +1 -1
  159. package/dist/components/dc-temp/knowledge-search.mjs +1 -1
  160. package/dist/components/index.js +11 -11
  161. package/dist/components/index.mjs +1 -1
  162. package/dist/components/ui/index.mjs +1 -1
  163. package/dist/components/ui/sidebar.mjs +1 -1
  164. package/dist/globals.css +1 -1
  165. package/dist/index.js +15 -15
  166. package/dist/index.mjs +1 -1
  167. package/dist/metafile-cjs.json +1 -1
  168. package/dist/metafile-esm.json +1 -1
  169. package/dist/pages/Blog.mjs +1 -1
  170. package/dist/pages/Documentation.mjs +1 -1
  171. package/dist/pages/IndexPage.mjs +1 -1
  172. package/dist/pages/Intranet.mjs +1 -1
  173. package/dist/pages/LandingPage.mjs +1 -1
  174. package/dist/pages/Page.mjs +1 -1
  175. package/dist/pages/Publish.mjs +1 -1
  176. package/dist/pages/Website.mjs +1 -1
  177. package/dist/sections/AboutSection.mjs +1 -1
  178. package/dist/sections/BlogDetail.mjs +1 -1
  179. package/dist/sections/BlogList.mjs +1 -1
  180. package/dist/sections/BlogListSection.mjs +1 -1
  181. package/dist/sections/ContactSection.mjs +1 -1
  182. package/dist/sections/PageSections.mjs +1 -1
  183. package/dist/sections/PricingSection.mjs +1 -1
  184. package/dist/sections/ServiceDetail.mjs +1 -1
  185. package/dist/sections/ServiceDetailSection.mjs +1 -1
  186. package/dist/sections/ServiceSection.mjs +1 -1
  187. package/dist/sections/index.mjs +1 -1
  188. package/dist/test-useChat-api.d.ts +1 -0
  189. package/dist/test-useChat-api.js +1 -0
  190. package/dist/test-useChat-api.mjs +1 -0
  191. package/package.json +6 -2
  192. package/dist/chunk-5Z5PL7N3.mjs +0 -1
  193. package/dist/chunk-DLUWDQSW.mjs +0 -4
  194. package/dist/chunk-R7LPCFUJ.mjs +0 -4
  195. package/dist/chunk-TO7KJNKC.mjs +0 -4
  196. package/dist/chunk-WBJENB4Y.mjs +0 -4
  197. package/dist/components/.archive/ai-chat-interface.d.ts +0 -70
  198. package/dist/components/Chat/EnhancedChatInterface.js +0 -5
  199. package/dist/components/Chat/EnhancedChatInterface.mjs +0 -4
  200. package/dist/components/Chat/ai-chat-interface.d.ts +0 -70
  201. package/dist/components/Chat/ai-chat-interface.js +0 -5
  202. package/dist/components/Chat/ai-chat-interface.mjs +0 -4
  203. package/dist/components/dc-temp/sidebar.js +0 -5
  204. package/dist/components/dc-temp/sidebar.mjs +0 -4
  205. /package/dist/components/Chat/{EnhancedChatInterface.css → ChatInterface.css} +0 -0
  206. /package/dist/components/Chat/{ai-chat-interface.css → demo.css} +0 -0
  207. /package/dist/components/{dc-temp/enhanced-header.css → Chat/example-usage.css} +0 -0
  208. /package/dist/components/{dc-temp/sidebar.css → Chat/example-with-vercel-ai.css} +0 -0
  209. /package/dist/components/{dc-temp → HeaderFooter}/enhanced-header.d.ts +0 -0
  210. /package/dist/components/{dc-temp → HeaderFooter}/enhanced-header.js +0 -0
  211. /package/dist/components/{dc-temp → HeaderFooter}/enhanced-header.mjs +0 -0
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as v}from"./chunk-HNCC3AOT.mjs";import{c as b}from"./chunk-5Z5PL7N3.mjs";import{a as g}from"./chunk-FT3AE7L2.mjs";import{a as p}from"./chunk-L5JPAKPM.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import{b as o}from"./chunk-CSBGSBEU.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import*as N from"react";import x from"next/link";import{ChevronDown as I,Search as L,Settings as z,X as P}from"lucide-react";import{Fragment as R,jsx as e,jsxs as a}from"react/jsx-runtime";function O({items:h,isOpen:l,isMobile:r=!1,onClose:i,currentBusinessUnit:y=b[0],onBusinessUnitChange:w,className:d,logo:S="/headerlogo.png",appName:k="Nuvia",tagline:B="Collaboration Platform"}){let[m,C]=N.useState({}),U=t=>{C(s=>({...s,[t]:!s[t]}))},A=t=>{w?.(t)},j=t=>{let s=a(R,{children:[a("div",{className:"flex items-center gap-3",children:[t.icon,e("span",{children:t.title})]}),t.badge&&e(o,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:t.badge}),t.items&&e(I,{className:n("ml-2 h-4 w-4 transition-transform",m[t.title]?"rotate-180":"")})]}),u=n("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",t.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return t.url?e(x,{href:t.url,className:u,onClick:r?i:void 0,children:s}):e("button",{className:u,onClick:()=>t.items&&U(t.title),children:s})},c=a("div",{className:"flex h-full flex-col border-r bg-background",children:[a("div",{className:"flex items-center justify-between p-4",children:[a("div",{className:"flex items-center gap-3",children:[e("div",{className:"flex h-14 w-14 items-center justify-center ",children:e("img",{src:S,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),a("div",{children:[a("h2",{className:"font-semibold",children:[k,e("br",{})]}),a("p",{className:"text-xs text-muted-foreground",children:[B,e("br",{})]})]})]}),r&&e(f,{variant:"ghost",size:"icon",onClick:i,children:e(P,{className:"h-5 w-5"})})]}),e("div",{className:"px-3 py-2",children:a("div",{className:"relative",children:[e(L,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(p,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2"})]})}),e("div",{className:"px-3 pb-2",children:e(v,{currentUnit:y,onUnitChange:A})}),e(g,{className:"flex-1 px-3 py-2",children:e("div",{className:"space-y-1",children:h.map(t=>a("div",{className:"mb-1",children:[j(t),t.items&&m[t.title]&&e("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:t.items.map(s=>a(x,{href:s.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:r?i:void 0,children:[s.title,s.badge&&e(o,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:s.badge})]},s.title))})]},t.title))})}),e("div",{className:"border-t p-3",children:e("div",{className:"space-y-1",children:a("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[e(z,{className:"h-5 w-5"}),e("span",{children:"Settings"})]})})})]});return r?e("div",{className:n("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",l?"translate-x-0":"-translate-x-full",d),children:c}):e("div",{className:n("fixed inset-y-0 left-0 z-30 w-64 transform border-r bg-background transition-transform duration-300 ease-in-out",l?"translate-x-0":"-translate-x-full",d),children:c})}export{O as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as d}from"./chunk-FT3AE7L2.mjs";import{b as i}from"./chunk-ZUA4KNIR.mjs";import{a as l}from"./chunk-YO3GQYRJ.mjs";import{a as m}from"./chunk-MDJREBVI.mjs";import{Clock as N,Edit3 as x,Plus as w,Trash2 as C}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function M({sessions:o,currentSession:c,teams:p,onNewChat:u,onSessionSelect:h,onSessionEdit:r,onSessionDelete:n,className:v}){let f=s=>{let t=Math.floor((new Date().getTime()-s.getTime())/(1e3*60));return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:`${Math.floor(t/1440)}d ago`};return e("div",{className:`space-y-4 ${v||""}`,children:a(l,{className:"shadow-sm",children:[e("div",{className:"p-4 border-b",children:a("div",{className:"flex items-center justify-between",children:[a("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[e(N,{className:"h-4 w-4"}),"Recent Chats"]}),a(i,{onClick:u,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[e(w,{className:"h-3 w-3"}),"New"]})]})}),e(d,{className:"h-[600px]",children:e("div",{className:"p-2",children:o.length===0?e("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):o.map(s=>{let g=p.find(t=>t.id===s.teamId);return e("div",{className:m("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",c?.id===s.id&&"bg-muted border"),onClick:()=>h(s),children:e("div",{className:"flex items-start gap-3",children:a("div",{className:"flex-1 min-w-0",children:[a("div",{className:"flex items-center justify-between mb-1",children:[e("h4",{className:"font-medium text-sm truncate",children:s.title}),a("div",{className:"flex items-center gap-1",children:[e("span",{className:"text-xs text-muted-foreground flex-shrink-0",children:f(s.timestamp)}),a("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[r&&e(i,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded",onClick:t=>{t.stopPropagation(),r(s.id)},children:e(x,{className:"h-3 w-3"})}),n&&e(i,{variant:"ghost",size:"icon",className:"h-5 w-5 rounded text-destructive hover:text-destructive",onClick:t=>{t.stopPropagation(),n(s.id)},children:e(C,{className:"h-3 w-3"})})]})]})]}),e("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.lastMessage})]})})},s.id)})})})]})})}export{M as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as g}from"./chunk-PM35MWKG.mjs";import{a}from"./chunk-DLUWDQSW.mjs";import{a as p}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as S}from"lucide-react";import{jsx as i,jsxs as b}from"react/jsx-runtime";var f=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:i(S,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Y({sidebarItems:r,children:v,title:h="Digital Colleagues",notifications:U=[],currentBusinessUnit:C=f[0],onBusinessUnitChange:N,businessUnits:I=f,activeTab:B,onTabChange:x,showTabs:T=!1,onActionClick:R,actionIcon:A,actionText:k="Action",onNotificationRemove:w,onRemoveAll:y,logo:n="/headerlogo.png",appName:o="Nuvia",tagline:s="Collaboration Platform"}){let[e,M]=l(!0),[c,t]=l(!1),[d,O]=l(C),m=u=>{O(u),N?.(u)};return b("div",{className:"flex h-full flex-col overflow-hidden rounded-xl border bg-background w-[]",children:[c&&i("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),i("div",{className:"md:hidden",children:i(a,{items:r,isOpen:c,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:d,onBusinessUnitChange:m,logo:n,appName:o,tagline:s})}),i("div",{className:"hidden md:block",children:i(a,{items:r,isOpen:e,isMobile:!1,currentBusinessUnit:d,onBusinessUnitChange:m,logo:n,appName:o,tagline:s})}),b("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",e?"md:pl-64":"md:pl-0"),children:[i(g,{title:h,notifications:U,onToggleSidebar:()=>M(!e),onToggleMobileMenu:()=>t(!0),sidebarOpen:e,activeTab:B,onTabChange:x,showTabs:T,onActionClick:R,actionIcon:A,actionText:k,onNotificationRemove:w,onRemoveAll:y,logo:n,appName:o,tagline:s}),i("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:v})]})]})}export{Y as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as ae}from"./chunk-TO7KJNKC.mjs";import{a as ie}from"./chunk-A2AEX4YB.mjs";import{a as se}from"./chunk-R7LPCFUJ.mjs";import{a as _,b as ee,c as te}from"./chunk-5Z5PL7N3.mjs";import{b as j,d as Z}from"./chunk-Q2DPE66H.mjs";import{a as q}from"./chunk-FT3AE7L2.mjs";import{a as Q}from"./chunk-L5JPAKPM.mjs";import{b as y}from"./chunk-ZUA4KNIR.mjs";import{a as E,c as M}from"./chunk-SOLZ4VQH.mjs";import{a as Y}from"./chunk-YO3GQYRJ.mjs";import{a as W}from"./chunk-MDJREBVI.mjs";import{useState as g}from"react";import{motion as we,AnimatePresence as Ne}from"framer-motion";import{Users as Me}from"lucide-react";import{useRef as ge,useEffect as ue,useState as ne,useCallback as fe}from"react";import{motion as V,AnimatePresence as he}from"framer-motion";import{Send as ye,Bot as X,User as ve,Menu as xe,X as be,Paperclip as Ce}from"lucide-react";import{jsx as e,jsxs as l}from"react/jsx-runtime";function oe({messages:C,input:k,isTyping:w=!1,selectedTeam:S,currentSessionTitle:G,capabilities:p,showCapabilities:N=!0,onInputChange:D,onSendMessage:I,onKeyPress:O,fileUploads:d=[],isDragOver:A=!1,enableFileUpload:B=!1,onFileUpload:z,onRemoveFile:T,onDragOver:r,className:F}){let v=ge(null),[u,x]=ne(!1),[R,P]=ne({path:[],selectedItems:[],filters:{}}),U=()=>{v.current?.scrollIntoView({behavior:"smooth"})};ue(()=>{U()},[C]);let f=(a,s)=>{console.log("Capability action:",a,s);let o=`Executing ${a} with context: ${JSON.stringify(s.path.map(L=>L.name))}`;x(!1)},b=fe(a=>{P(a)},[]),$=()=>Z(R),H=()=>{let a=[];return p.forEach(s=>{s.actions&&s.actions.forEach(o=>{a.push({label:o.label,action:()=>f(o.id,{path:[s],selectedItems:[],filters:{}})})}),s.children&&s.children.forEach(o=>{o.type==="list"&&o.data&&a.push({label:`View ${o.name}`,action:()=>x(!0)})})}),a.slice(0,5)};return l(Y,{className:`h-full flex flex-col shadow-sm ${F||""}`,children:[e(q,{className:"flex-1 p-4",children:l("div",{className:"space-y-4",children:[e(he,{children:C.map(a=>{let s=a;return l(V.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:W("flex gap-3",a.type==="user"?"flex-row-reverse":"flex-row"),children:[e(E,{className:"h-8 w-8",children:a.type==="user"?e(M,{children:e(ve,{className:"h-4 w-4"})}):e(M,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(X,{className:"h-4 w-4"})})}),l("div",{className:W("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",a.type==="user"?"bg-primary text-primary-foreground":"bg-muted"),children:[s.messageType==="image"&&s.image&&e("div",{className:"mb-2",children:e("img",{src:s.image.url,alt:s.image.alt||"Uploaded image",className:"max-w-full h-auto max-h-48 rounded-lg"})}),s.messageType==="file"&&s.file&&e("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:l("div",{className:"flex items-center gap-2",children:[e("span",{className:"text-sm font-medium",children:s.file.name}),l("span",{className:"text-xs opacity-70",children:[(s.file.size/1024/1024).toFixed(1),"MB"]})]})}),s.messageType==="card"&&s.card&&e("div",{className:"mb-2",children:l("div",{className:"p-3 bg-background/50 rounded-lg",children:[e("h4",{className:"font-medium",children:s.card.title}),s.card.description&&e("p",{className:"text-sm opacity-70 mt-1",children:s.card.description})]})}),s.messageType==="reference"&&s.references&&e("div",{className:"mb-2 space-y-1",children:s.references.map(o=>l("div",{className:"p-2 bg-background/50 rounded-lg",children:[e("p",{className:"text-sm font-medium",children:o.title}),o.description&&e("p",{className:"text-xs opacity-70",children:o.description})]},o.id))}),s.messageType==="menu"&&s.menu&&l("div",{className:"mb-2",children:[e("p",{className:"text-sm font-medium mb-2",children:s.menu.title}),e("div",{className:"space-y-1",children:s.menu.items.map(o=>l("button",{onClick:o.action,className:"w-full text-left p-2 bg-background/50 rounded-lg hover:bg-background/70 transition-colors",children:[e("p",{className:"text-sm font-medium",children:o.label}),o.description&&e("p",{className:"text-xs opacity-70",children:o.description})]},o.id))})]}),e("p",{className:"text-sm leading-relaxed",children:a.content}),e("p",{className:"text-xs opacity-70 mt-2",children:a.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]},a.id)})}),N&&u&&l(V.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[e(E,{className:"h-8 w-8",children:e(M,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(X,{className:"h-4 w-4"})})}),e("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:e(ie,{capabilities:p,isOpen:u,onToggle:()=>x(!u),onActionSelect:f,onContextChange:b,className:"w-full"})})]}),w&&l(V.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[e(E,{className:"h-8 w-8",children:e(M,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(X,{className:"h-4 w-4"})})}),e("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:l("div",{className:"flex space-x-1",children:[e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]}),e("div",{ref:v})]})}),d&&d.length>0&&e("div",{className:"border-t p-4 bg-muted/10",children:e("div",{className:"flex flex-wrap gap-2",children:d.map(a=>l("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[e("span",{className:"text-sm font-medium",children:a.file.name}),l("span",{className:"text-xs text-muted-foreground",children:[(a.file.size/1024/1024).toFixed(1),"MB"]}),e(y,{variant:"ghost",size:"sm",onClick:()=>T?.(a.id),className:"h-6 w-6 p-0",children:e(be,{className:"h-4 w-4"})})]},a.id))})}),l("div",{className:"border-t p-4 bg-muted/20",children:[l("div",{className:"flex gap-3",children:[e(Q,{value:k,onChange:a=>D(a.target.value),onKeyPress:O,placeholder:S?`Ask me about ${S.name.toLowerCase()}...`:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:w}),B&&e(y,{variant:"outline",size:"icon",onClick:()=>{let a=document.createElement("input");a.type="file",a.multiple=!0,a.onchange=s=>{let o=s.target.files;z?.(o)},a.click()},className:"rounded-2xl h-10 w-10 shadow-sm",children:e(Ce,{className:"h-4 w-4"})}),e(y,{onClick:I,disabled:!k.trim()&&(!d||d.length===0)||w,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:e(ye,{className:"h-4 w-4"})})]}),N&&l("div",{className:"flex items-center gap-3 mt-3",children:[l(y,{onClick:()=>x(!u),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[e(xe,{className:"h-3 w-3 mr-1"}),u?"Hide":"Show"," Capabilities"]}),l("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[$().map((a,s)=>e(y,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>f(a.id,R),children:a.label},`context-${a.id}`)),$().length===0&&H().map((a,s)=>e(y,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:a.action,children:a.label},`suggestion-${s}`))]})]})]})]})}import{jsx as h,jsxs as Se}from"react/jsx-runtime";var ke=[{id:"1",title:"Logo Design Review",lastMessage:"The color palette looks great! Let's refine the typography...",timestamp:new Date(Date.now()-1e3*60*30),teamId:"design"},{id:"2",title:"React Component Optimization",lastMessage:"Here's how you can improve the performance of your component...",timestamp:new Date(Date.now()-1e3*60*60*2),teamId:"engineering"},{id:"3",title:"Campaign Strategy Discussion",lastMessage:"The target audience analysis shows promising results...",timestamp:new Date(Date.now()-1e3*60*60*24),teamId:"marketing"},{id:"4",title:"Product Roadmap Planning",lastMessage:"Based on user feedback, I recommend prioritizing...",timestamp:new Date(Date.now()-1e3*60*60*24*2),teamId:"product"}];function nt({initialTeam:C="design",initialMessages:k,initialSessions:w,showCapabilities:S=!0,title:G="Digital Colleagues",businessUnits:p=te,enableFileUpload:N=!0,maxFileSize:D=10,allowedFileTypes:I=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]}={}){let[O,d]=g(k||[{id:"1",role:"assistant",type:"text",content:"Hi! I'm your AI assistant with advanced capabilities. I can help with various tasks, access data, and provide contextual actions. What would you like to work on today?",timestamp:new Date}]),[A,B]=g(""),[z,T]=g(!1),[r,F]=g(p.find(t=>t.id===C)||p[0]),[v,u]=g(null),[x,R]=g(w||ke),[P,U]=g(p.find(t=>t.id===C)||p[0]),[f,b]=g([]),[$,H]=g(!1),a=t=>{if(!t||!N)return;let i=[];Array.from(t).forEach(n=>{if(n.size>D*1024*1024){alert(`File ${n.name} is too large. Maximum size is ${D}MB.`);return}if(I.length>0&&!I.some(m=>n.type.match(m))){alert(`File type ${n.type} is not allowed.`);return}let c={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:n,status:"pending",progress:0};if(n.type.startsWith("image/")){let m=new FileReader;m.onload=de=>{b(pe=>pe.map(K=>K.id===c.id?{...K,preview:de.target?.result}:K))},m.readAsDataURL(n)}i.push(c)}),b(n=>[...n,...i])},s=t=>{b(i=>i.filter(n=>n.id!==t))},o=O.map(t=>({id:t.id,content:t.content,type:t.role==="user"?"user":"ai",timestamp:t.timestamp,role:t.role,messageType:t.type,data:t.data,image:t.image,file:t.file,card:t.card,references:t.references,menu:t.menu})),L=async()=>{if(!A.trim()&&f.length===0)return;let t={id:Date.now().toString(),role:"user",type:"text",content:A,timestamp:new Date};d(i=>[...i,t]),f.length>0&&f.forEach(i=>{if(i.file.type.startsWith("image/")){let n={id:Date.now().toString()+Math.random().toString(36).substr(2,9),role:"user",type:"image",content:`Uploaded image: ${i.file.name}`,image:{url:i.preview||"",alt:i.file.name,width:0,height:0},timestamp:new Date};d(c=>[...c,n])}else{let n={id:Date.now().toString()+Math.random().toString(36).substr(2,9),role:"user",type:"file",content:`Uploaded file: ${i.file.name}`,file:{name:i.file.name,size:i.file.size,type:i.file.type,url:URL.createObjectURL(i.file)},timestamp:new Date};d(c=>[...c,n])}}),B(""),b([]),T(!0),setTimeout(()=>{let i=j.filter(c=>c.name.toLowerCase().includes(r.name.toLowerCase())||r.name.toLowerCase().includes(c.name.toLowerCase())),n=Math.random();if(n<.3){let c={id:(Date.now()+1).toString(),role:"assistant",type:"text",content:`I can help you with ${r.name.toLowerCase()} tasks. Here are some capabilities I have: ${i.map(m=>m.name).join(", ")}`,timestamp:new Date};d(m=>[...m,c])}else if(n<.5){let c={id:(Date.now()+1).toString(),role:"assistant",type:"card",content:`Here's a ${r.name.toLowerCase()} task I created for you:`,card:{title:`${r.name} Task`,description:`A new task for ${r.name.toLowerCase()} team`,variant:"task",data:{id:Math.floor(Math.random()*1e3),name:`${r.name} Task`,description:`Complete this ${r.name.toLowerCase()} task`,status:"todo",dateLogged:new Date().toISOString(),project:{id:1,name:`${r.name} Project`}}},timestamp:new Date};d(m=>[...m,c])}else if(n<.7){let c={id:(Date.now()+1).toString(),role:"assistant",type:"menu",content:`Here are some ${r.name.toLowerCase()} options:`,menu:{title:`${r.name} Options`,items:i.slice(0,3).map(m=>({id:m.id,label:m.name,description:m.description,value:m.id}))},timestamp:new Date};d(m=>[...m,c])}else{let c={id:(Date.now()+1).toString(),role:"assistant",type:"reference",content:`Here are some helpful ${r.name.toLowerCase()} resources:`,references:[{id:"1",title:`${r.name} Best Practices`,description:`Guidelines for ${r.name.toLowerCase()} work`,type:"document"},{id:"2",title:`${r.name} Tools`,description:`Recommended tools for ${r.name.toLowerCase()}`,type:"link"}],timestamp:new Date};d(m=>[...m,c])}T(!1)},1500)},re=t=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),L())},J=()=>{u(null),d([{id:"1",role:"assistant",type:"text",content:`Hi! I'm your ${r.name} AI assistant with advanced capabilities. I can help with ${r.name.toLowerCase()} tasks, access relevant data, and provide contextual actions. What would you like to work on today?`,timestamp:new Date}])},le=t=>{u(t);let i=p.find(n=>n.id===t.teamId)||p[0];F(i),U(i),d([{id:"1",role:"assistant",type:"text",content:t.lastMessage,timestamp:t.timestamp}])},me=t=>{R(i=>i.filter(n=>n.id!==t)),v?.id===t&&J()},ce=t=>{console.log("Edit session:",t)};return h(ae,{sidebarItems:_,title:G,notifications:ee,businessUnits:p,currentBusinessUnit:P,onBusinessUnitChange:t=>{U(t),F(t),console.log("Business unit changed to:",t.name)},showTabs:!1,onActionClick:()=>{console.log("Copilot clicked from header")},actionIcon:h(Me,{className:"mr-2 h-4 w-4"}),actionText:"Collaborate",onNotificationRemove:t=>{console.log("Notification removed:",t)},onRemoveAll:()=>{console.log("All notifications removed")},logo:"/headerlogo.png",appName:"Nuvia",tagline:"AI-Powered Workspace",children:h(Ne,{mode:"wait",children:h(we.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Se("div",{className:"h-full flex",children:[h("div",{className:"w-80 bg-muted/50 flex-shrink-0 h-full p-2",children:h(se,{sessions:x,currentSession:v,teams:p,onNewChat:J,onSessionSelect:le,onSessionEdit:ce,onSessionDelete:me})}),h("div",{className:"flex-1 h-full p-2",children:h(oe,{messages:o,input:A,isTyping:z,selectedTeam:r,currentSessionTitle:v?.title,capabilities:j,showCapabilities:S,onInputChange:B,onSendMessage:L,onKeyPress:re,fileUploads:f,isDragOver:$,enableFileUpload:N,onFileUpload:a,onRemoveFile:s,onDragOver:H})})]})},"chat-interface")})})}export{nt as a};
@@ -1,70 +0,0 @@
1
- import type React from "react";
2
- import type { BusinessUnit } from "../DigitalColleagues/types";
3
- import type { Capability } from "../../test-data/capabilities";
4
- export interface ChatMessage {
5
- id: string;
6
- content: string;
7
- type: "user" | "ai";
8
- timestamp: Date;
9
- }
10
- export interface EnhancedChatMessage extends ChatMessage {
11
- role?: "user" | "assistant" | "system";
12
- messageType?: "text" | "image" | "file" | "card" | "reference" | "menu" | "tool-invocation";
13
- data?: any;
14
- image?: {
15
- url: string;
16
- alt?: string;
17
- width?: number;
18
- height?: number;
19
- };
20
- file?: {
21
- name: string;
22
- size: number;
23
- type: string;
24
- url: string;
25
- };
26
- card?: {
27
- title: string;
28
- description?: string;
29
- data: any;
30
- variant?: 'task' | 'artefact' | 'customer' | 'opportunity' | 'campaign' | 'generic';
31
- };
32
- references?: Array<{
33
- id: string;
34
- title: string;
35
- url?: string;
36
- description?: string;
37
- type?: 'document' | 'link' | 'internal';
38
- }>;
39
- menu?: {
40
- title: string;
41
- items: Array<{
42
- id: string;
43
- label: string;
44
- description?: string;
45
- value: any;
46
- action?: () => void;
47
- }>;
48
- };
49
- }
50
- interface AIChatInterfaceProps {
51
- messages: (ChatMessage | EnhancedChatMessage)[];
52
- input: string;
53
- isTyping?: boolean;
54
- selectedTeam?: BusinessUnit;
55
- currentSessionTitle?: string;
56
- capabilities: Capability[];
57
- showCapabilities?: boolean;
58
- onInputChange: (value: string) => void;
59
- onSendMessage: () => void;
60
- onKeyPress?: (e: React.KeyboardEvent) => void;
61
- fileUploads?: any[];
62
- isDragOver?: boolean;
63
- enableFileUpload?: boolean;
64
- onFileUpload?: (files: FileList | null) => void;
65
- onRemoveFile?: (id: string) => void;
66
- onDragOver?: (isDragOver: boolean) => void;
67
- className?: string;
68
- }
69
- export declare function AIChatInterface({ messages, input, isTyping, selectedTeam, currentSessionTitle, capabilities, showCapabilities, onInputChange, onSendMessage, onKeyPress, fileUploads, isDragOver, enableFileUpload, onFileUpload, onRemoveFile, onDragOver, className, }: AIChatInterfaceProps): import("react/jsx-runtime").JSX.Element;
70
- export {};
@@ -1,5 +0,0 @@
1
- "use client";
2
- "use strict";
3
- 'use client'
4
-
5
- "use strict";"use client";var it=Object.create;var he=Object.defineProperty;var nt=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var lt=Object.getPrototypeOf,ct=Object.prototype.hasOwnProperty;var dt=(e,t)=>{for(var a in t)he(e,a,{get:t[a],enumerable:!0})},Me=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of st(t))!ct.call(e,c)&&c!==a&&he(e,c,{get:()=>t[c],enumerable:!(o=nt(t,c))||o.enumerable});return e};var Q=(e,t,a)=>(a=e!=null?it(lt(e)):{},Me(t||!e||!e.__esModule?he(a,"default",{value:e,enumerable:!0}):a,e)),pt=e=>Me(he({},"__esModule",{value:!0}),e);var Zt={};dt(Zt,{EnhancedChatInterface:()=>Xt});module.exports=pt(Zt);var ee=require("react"),xe=require("framer-motion"),g=require("lucide-react");var ve=Q(require("react")),H=Q(require("@radix-ui/react-avatar"));var Ve=require("clsx");var ke="-",mt=e=>{let t=gt(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let s=l.split(ke);return s[0]===""&&s.length!==1&&s.shift(),Ie(s,t)||ut(l)},getConflictingClassGroupIds:(l,s)=>{let u=a[l]||[];return s&&o[l]?[...u,...o[l]]:u}}},Ie=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),c=o?Ie(e.slice(1),o):void 0;if(c)return c;if(t.validators.length===0)return;let n=e.join(ke);return t.validators.find(({validator:l})=>l(n))?.classGroupId},Le=/^\[(.+)\]$/,ut=e=>{if(Le.test(e)){let t=Le.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},gt=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return bt(Object.entries(e.classGroups),a).forEach(([n,l])=>{Ne(l,o,n,t)}),o},Ne=(e,t,a,o)=>{e.forEach(c=>{if(typeof c=="string"){let n=c===""?t:De(t,c);n.classGroupId=a;return}if(typeof c=="function"){if(ft(c)){Ne(c(o),t,a,o);return}t.validators.push({validator:c,classGroupId:a});return}Object.entries(c).forEach(([n,l])=>{Ne(l,De(t,n),a,o)})})},De=(e,t)=>{let a=e;return t.split(ke).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},ft=e=>e.isThemeGetter,bt=(e,t)=>t?e.map(([a,o])=>{let c=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,s])=>[t+l,s])):n);return[a,c]}):e,ht=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,c=(n,l)=>{a.set(n,l),t++,t>e&&(t=0,o=a,a=new Map)};return{get(n){let l=a.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return c(n,l),l},set(n,l){a.has(n)?a.set(n,l):c(n,l)}}},Ee="!",vt=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,c=t[0],n=t.length,l=s=>{let u=[],b=0,w=0,f;for(let y=0;y<s.length;y++){let k=s[y];if(b===0){if(k===c&&(o||s.slice(y,y+n)===t)){u.push(s.slice(w,y)),w=y+n;continue}if(k==="/"){f=y;continue}}k==="["?b++:k==="]"&&b--}let v=u.length===0?s:s.substring(w),A=v.startsWith(Ee),R=A?v.substring(1):v,N=f&&f>w?f-w:void 0;return{modifiers:u,hasImportantModifier:A,baseClassName:R,maybePostfixModifierPosition:N}};return a?s=>a({className:s,parseClassName:l}):l},yt=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},xt=e=>({cache:ht(e.cacheSize),parseClassName:vt(e),...mt(e)}),wt=/\s+/,Ct=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:c}=t,n=[],l=e.trim().split(wt),s="";for(let u=l.length-1;u>=0;u-=1){let b=l[u],{modifiers:w,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:A}=a(b),R=!!A,N=o(R?v.substring(0,A):v);if(!N){if(!R){s=b+(s.length>0?" "+s:s);continue}if(N=o(v),!N){s=b+(s.length>0?" "+s:s);continue}R=!1}let y=yt(w).join(":"),k=f?y+Ee:y,S=k+N;if(n.includes(S))continue;n.push(S);let C=c(N,R);for(let L=0;L<C.length;++L){let te=C[L];n.push(k+te)}s=b+(s.length>0?" "+s:s)}return s};function Nt(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=ze(t))&&(o&&(o+=" "),o+=a);return o}var ze=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=ze(e[o]))&&(a&&(a+=" "),a+=t);return a};function kt(e,...t){let a,o,c,n=l;function l(u){let b=t.reduce((w,f)=>f(w),e());return a=xt(b),o=a.cache.get,c=a.cache.set,n=s,s(u)}function s(u){let b=o(u);if(b)return b;let w=Ct(u,a);return c(u,w),w}return function(){return n(Nt.apply(null,arguments))}}var x=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Be=/^\[(?:([a-z-]+):)?(.+)\]$/i,At=/^\d+\/\d+$/,Rt=new Set(["px","full","screen"]),Pt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,St=/\d+(%|px|ye?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|ye?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Tt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Mt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>oe(e)||Rt.has(e)||At.test(e),W=e=>ie(e,"length",Vt),oe=e=>!!e&&!Number.isNaN(Number(e)),Ce=e=>ie(e,"number",oe),ce=e=>!!e&&Number.isInteger(Number(e)),Dt=e=>e.endsWith("%")&&oe(e.slice(0,-1)),m=e=>Be.test(e),$=e=>Pt.test(e),It=new Set(["length","size","percentage"]),Et=e=>ie(e,It,He),zt=e=>ie(e,"position",He),Bt=new Set(["image","url"]),Ht=e=>ie(e,Bt,jt),Ft=e=>ie(e,"",Gt),de=()=>!0,ie=(e,t,a)=>{let o=Be.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Vt=e=>St.test(e)&&!Tt.test(e),He=()=>!1,Gt=e=>Mt.test(e),jt=e=>Lt.test(e);var Ut=()=>{let e=x("colors"),t=x("spacing"),a=x("blur"),o=x("brightness"),c=x("borderColor"),n=x("borderRadius"),l=x("borderSpacing"),s=x("borderWidth"),u=x("contrast"),b=x("grayscale"),w=x("hueRotate"),f=x("invert"),v=x("gap"),A=x("gradientColorStops"),R=x("gradientColorStopPositions"),N=x("inset"),y=x("margin"),k=x("opacity"),S=x("padding"),C=x("saturate"),L=x("scale"),te=x("sepia"),ue=x("skew"),ge=x("space"),fe=x("translate"),re=()=>["auto","contain","none"],ae=()=>["auto","hidden","clip","visible","scroll"],se=()=>["auto",m,t],i=()=>[m,t],O=()=>["",B,W],h=()=>["auto",oe,m],P=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],be=()=>["solid","dashed","dotted","double","none"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>["start","end","center","between","around","evenly","stretch"],le=()=>["","0",m],Te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[oe,m];return{cacheSize:500,separator:":",theme:{colors:[de],spacing:[B,W],blur:["none","",$,m],brightness:z(),borderColor:[e],borderRadius:["none","","full",$,m],borderSpacing:i(),borderWidth:O(),contrast:z(),grayscale:le(),hueRotate:z(),invert:le(),gap:i(),gradientColorStops:[e],gradientColorStopPositions:[Dt,W],inset:se(),margin:se(),opacity:z(),padding:i(),saturate:z(),scale:z(),sepia:le(),skew:z(),space:i(),translate:i()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[$]}],"break-after":[{"break-after":Te()}],"break-before":[{"break-before":Te()}],"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:[...P(),m]}],overflow:[{overflow:ae()}],"overflow-x":[{"overflow-x":ae()}],"overflow-y":[{"overflow-y":ae()}],overscroll:[{overscroll:re()}],"overscroll-x":[{"overscroll-x":re()}],"overscroll-y":[{"overscroll-y":re()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-x":[{"inset-x":[N]}],"inset-y":[{"inset-y":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ce,m]}],basis:[{basis:se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:le()}],shrink:[{shrink:le()}],order:[{order:["first","last","none",ce,m]}],"grid-cols":[{"grid-cols":[de]}],"col-start-end":[{col:["auto",{span:["full",ce,m]},m]}],"col-start":[{"col-start":h()}],"col-end":[{"col-end":h()}],"grid-rows":[{"grid-rows":[de]}],"row-start-end":[{row:["auto",{span:[ce,m]},m]}],"row-start":[{"row-start":h()}],"row-end":[{"row-end":h()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...we()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...we(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...we(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],ye:[{ye:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[ge]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ge]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[$]},$]}],h:[{h:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",$,W]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ce]}],"font-family":[{font:[de]}],"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",m]}],"line-clamp":[{"line-clamp":["none",oe,Ce]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,W]}],"underline-offset":[{"underline-offset":["auto",B,m]}],"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:i()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],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",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...P(),zt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Et]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","ye","br","b","bl","l","tl"]},Ht]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[R]}],"gradient-via-pos":[{via:[R]}],"gradient-to-pos":[{to:[R]}],"gradient-from":[{from:[A]}],"gradient-via":[{via:[A]}],"gradient-to":[{to:[A]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-ye":[{"rounded-ye":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-ye":[{"border-ye":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...be(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:be()}],"border-color":[{border:[c]}],"border-color-x":[{"border-x":[c]}],"border-color-y":[{"border-y":[c]}],"border-color-s":[{"border-s":[c]}],"border-color-e":[{"border-e":[c]}],"border-color-t":[{"border-t":[c]}],"border-color-ye":[{"border-ye":[c]}],"border-color-b":[{"border-b":[c]}],"border-color-l":[{"border-l":[c]}],"divide-color":[{divide:[c]}],"outline-style":[{outline:["",...be()]}],"outline-offset":[{"outline-offset":[B,m]}],"outline-w":[{outline:[B,W]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[B,W]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$,Ft]}],"shadow-color":[{shadow:[de]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...Se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Se()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",$,m]}],grayscale:[{grayscale:[b]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[f]}],saturate:[{saturate:[C]}],sepia:[{sepia:[te]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[te]}],"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",m]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[ce,m]}],"translate-x":[{"translate-x":[fe]}],"translate-y":[{"translate-y":[fe]}],"skew-x":[{"skew-x":[ue]}],"skew-y":[{"skew-y":[ue]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ee-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":i()}],"scroll-mx":[{"scroll-mx":i()}],"scroll-my":[{"scroll-my":i()}],"scroll-ms":[{"scroll-ms":i()}],"scroll-me":[{"scroll-me":i()}],"scroll-mt":[{"scroll-mt":i()}],"scroll-mr":[{"scroll-mr":i()}],"scroll-mb":[{"scroll-mb":i()}],"scroll-ml":[{"scroll-ml":i()}],"scroll-ye":[{"scroll-ye":i()}],"scroll-px":[{"scroll-px":i()}],"scroll-py":[{"scroll-py":i()}],"scroll-ps":[{"scroll-ps":i()}],"scroll-pe":[{"scroll-pe":i()}],"scroll-pt":[{"scroll-pt":i()}],"scroll-pr":[{"scroll-pr":i()}],"scroll-pb":[{"scroll-pb":i()}],"scroll-pl":[{"scroll-pl":i()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[B,W,Ce]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],ye:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-ye","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-ye":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-ye","border-w-b","border-w-l"],"border-w-x":["border-w-ye","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-ye","border-color-b","border-color-l"],"border-color-x":["border-color-ye","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-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-ye":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Fe=kt(Ut);function d(...e){return Fe((0,Ve.clsx)(e))}var ye=require("react/jsx-runtime"),F=ve.forwardRef(({className:e,...t},a)=>(0,ye.jsx)(H.Root,{ref:a,className:d("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));F.displayName=H.Root.displayName;var Ot=ve.forwardRef(({className:e,...t},a)=>(0,ye.jsx)(H.Image,{ref:a,className:d("aspect-square h-full w-full",e),...t}));Ot.displayName=H.Image.displayName;var V=ve.forwardRef(({className:e,...t},a)=>(0,ye.jsx)(H.Fallback,{ref:a,className:d("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));V.displayName=H.Fallback.displayName;var Ge=require("@radix-ui/react-slot"),je=require("class-variance-authority"),Ue=Q(require("react")),Wt=(0,je.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),I=Ue.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...c},n)=>(0,ye.jsx)(e?Ge.Slot:"button",{className:d(Wt({className:t,size:a,variant:o})),ref:n,...c}));I.displayName="Button";var X=Q(require("react"));var G=X.forwardRef(({className:e,...t},a)=>(0,ye.jsx)("div",{ref:a,className:d("rounded-xl border bg-card text-card-foreground shadow",e),...t}));G.displayName="Card";var K=X.forwardRef(({className:e,...t},a)=>(0,ye.jsx)("div",{ref:a,className:d("flex flex-col space-y-1.5 ye-6",e),...t}));K.displayName="CardHeader";var _=X.forwardRef(({className:e,...t},a)=>(0,ye.jsx)("div",{ref:a,className:d("font-semibold leading-none tracking-tight",e),...t}));_.displayName="CardTitle";var pe=X.forwardRef(({className:e,...t},a)=>(0,ye.jsx)("div",{ref:a,className:d("text-sm text-muted-foreground",e),...t}));pe.displayName="CardDescription";var j=X.forwardRef(({className:e,...t},a)=>(0,ye.jsx)("div",{ref:a,className:d("ye-6 pt-0",e),...t}));j.displayName="CardContent";var me=X.forwardRef(({className:e,...t},a)=>(0,ye.jsx)("div",{ref:a,className:d("flex items-center ye-6 pt-0",e),...t}));me.displayName="CardFooter";var We=Q(require("react"));var Ae=We.forwardRef(({className:e,type:t,...a},o)=>(0,$e.jsx)("input",{type:t,className:d("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));Ae.displayName="Input";var Re=Q(require("react")),D=Q(require("@radix-ui/react-scroll-area"));var Pe=Re.forwardRef(({className:e,children:t,...a},o)=>(0,ye.jsxs)(D.Root,{ref:o,className:d("relative overflow-hidden",e),...a,children:[(0,ye.jsx)(D.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ye.jsx)(Ke,{}),(0,ye.jsx)(D.Corner,{})]}));Pe.displayName=D.Root.displayName;var Ke=Re.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,ye.jsx)(D.ScrollAreaScrollbar,{ref:o,orientation:t,className:d("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent ye-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent ye-[1px]",e),...a,children:(0,ye.jsx)(D.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ke.displayName=D.ScrollAreaScrollbar.displayName;var $t=(0,je.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 J({className:e,variant:t,...a}){return(0,ye.jsx)("div",{className:d($t({variant:t}),e),...a})}var Je={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]};function Qe(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Xe({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:c,colorScheme:n=Je,className:l}){let[s,u]=(0,ee.useState)([]),[b,w]=(0,ee.useState)([]),f=s[s.length-1],v=f?.children||e,A=(C,L)=>{switch(C.type){case"category":return n.categories[L%n.categories.length];case"list":return n.lists[L%n.lists.length];case"item":return n.items[L%n.items.length];default:return n.primary}},R=(0,ee.useMemo)(()=>({path:s,selectedItems:b,filters:{}}),[s,b]);(0,ee.useEffect)(()=>{c&&c(R)},[R,c]);let N=C=>{C.type==="category"||C.type==="list"?u([...s,C]):C.type==="item"&&w([...b,C])},y=()=>{u(s.slice(0,-1))},k=C=>{u(s.slice(0,C+1))},S=()=>f?.actions?f.actions:[];return t?(0,ye.jsxs)("div",{className:d("w-full",l),children:[(0,ye.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ye.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,ye.jsx)(xe.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:d("group ye-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ye.jsx)(g.ChevronLeft,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,ye.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,ye.jsx)(xe.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:d("group ye-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ye.jsx)(g.X,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,ye.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,ye.jsx)(xe.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>u([]),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ye.jsxs)("span",{className:"relative",children:["Capabilities",(0,ye.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),s.map((C,L)=>(0,ye.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ye.jsx)(g.ChevronRight,{className:"h-2 w-2"}),(0,ye.jsx)(xe.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>k(L),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ye.jsxs)("span",{className:"relative",children:[C.name,(0,ye.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.id))]}),(0,ye.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,ye.jsx)(xe.AnimatePresence,{mode:"wait",children:(0,ye.jsx)(xe.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:f?.type==="list"&&f.data?(0,ye.jsx)(qt,{data:f.data,onItemSelect:C=>w([...b,C]),colorScheme:n}):(0,ye.jsx)(Kt,{capabilities:v,onSelect:N,colorScheme:n})},f?.id||"root")})})]}):(0,ye.jsxs)(I,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,ye.jsx)(g.Menu,{className:"h-4 w-4"}),(0,ye.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Kt({capabilities:e,onSelect:t,colorScheme:a}){return(0,ye.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,c)=>(0,ye.jsx)(_t,{capability:o,onClick:()=>t(o),color:a.categories[c%a.categories.length]},o.id))})}function _t({capability:e,onClick:t,selected:a,color:o}){return(0,ye.jsxs)(xe.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:d("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,ye.jsx)("div",{className:d("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,ye.jsxs)("span",{className:"truncate relative",children:[e.name,(0,ye.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,ye.jsx)(g.ChevronRight,{className:d("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,ye.jsx)(J,{variant:"secondary",className:d("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 qt({data:e,onItemSelect:t,colorScheme:a}){return(0,ye.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,c)=>(0,ye.jsxs)(xe.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:d("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,ye.jsx)("div",{className:d("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[c%a.items.length])}),(0,ye.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ye.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,ye.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,ye.jsx)("div",{className:d("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,ye.jsx)(J,{variant:"secondary",className:d("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var et=require("date-fns");function Ze({taskId:e,polling:t=!0,system:a="payload"}){let[o,c]=(0,ee.useState)(null),[n,l]=(0,ee.useState)(!1),[s,u]=(0,ee.useState)(null),b=async(f=!0)=>{if(e){f&&l(!0);try{let v=await fetch(`/api/tasks/${e}`);if(!v.ok)throw new Error(`Failed to fetch task: ${v.statusText}`);let A=await v.json();c(A)}catch(v){console.error("Error fetching task:",v),u(v instanceof Error?v:new Error("Unknown error occurred"))}finally{f&&l(!1)}}},w=()=>b(!1);return(0,ee.useEffect)(()=>{e&&b(!0);let f=null;return e&&t&&(f=setInterval(w,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:o,loading:n,error:s}}var Jt=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"}},Qt=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function tt({data:e}){let{id:t,system:a,fetchLatest:o,taskData:c,error:n}=e||{};if(!t)return null;let l=null,s=!0,u=n,b=o!==void 0?o:!0;if(l=c||{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:b,taskData:l,error:u}),b){let{task:A,loading:R,error:N}=Ze({taskId:t,system:a});l=A,s=R,u=N}else s=!1;let w=Jt(l?.status||"todo"),f=Qt(l?.status||"todo"),v=l?.dateLogged||new Date().toISOString();try{let A=new Date(l?.dateLogged||"");isNaN(A.getTime())||(v=(0,et.formatDistanceToNow)(A,{addSuffix:!0}))}catch{}return(0,ye.jsxs)(G,{className:d("w-full max-w-md shadow-md",u&&"border border-destructive"),children:[(0,ye.jsxs)(K,{className:"pb-2",children:[(0,ye.jsxs)("div",{className:"flex justify-between items-start",children:[(0,ye.jsx)(_,{className:"text-lg font-semibold",children:s?"Loading...":l?.name||"Task"}),(0,ye.jsx)(J,{className:`${w}`,children:f})]}),l?.project&&(0,ye.jsxs)(pe,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,ye.jsx)(j,{className:"pb-2",children:s?(0,ye.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):u?(0,ye.jsx)("ye",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ye.jsx)("ye",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,ye.jsx)(me,{className:"pt-2 flex items-center justify-between",children:(0,ye.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ye.jsx)(g.Clock,{className:"h-3 w-3 mr-1"}),(0,ye.jsxs)("span",{children:["Created ",v]}),(0,ye.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ye.jsxs)("span",{children:["Task #",t]})]})})]})}function ot({artefact:e,taskId:t,taskData:a,loading:o=!1,error:c=null}){let n=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=n.dateLogged;try{let s=new Date(n.dateLogged);isNaN(s.getTime())||(l=(0,et.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,ye.jsxs)(G,{className:"w-full max-w-md shadow-md",children:[(0,ye.jsx)(K,{className:"pb-2",children:(0,ye.jsx)("div",{className:"flex justify-between items-start",children:(0,ye.jsx)(_,{className:"text-lg font-semibold",children:o?"Loading...":n.name})})}),(0,ye.jsx)(j,{className:"pb-2",children:o?(0,ye.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,ye.jsx)("ye",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ye.jsx)("ye",{className:"text-sm text-foreground",children:e})}),(0,ye.jsx)(me,{className:"pt-2 flex items-center justify-between",children:(0,ye.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ye.jsx)(g.Clock,{className:"h-3 w-3 mr-1"}),(0,ye.jsxs)("span",{children:["Created ",l]}),(0,ye.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ye.jsxs)("span",{children:["Task #",n.id]})]})})]})}function Xt({messages:e,input:t,isTyping:a=!1,selectedTeam:o,currentSessionTitle:c,capabilities:n,fileUploads:l,isDragOver:s,enableFileUpload:u,onInputChange:b,onSendMessage:w,onKeyPress:f,onFileUpload:v,onRemoveFile:A,onDragOver:R,className:N}){let y=(0,ee.useRef)(null),k=(0,ee.useRef)(null),[S,C]=(0,ee.useState)(!1);(0,ee.useEffect)(()=>{y.current?.scrollIntoView({behavior:"smooth"})},[e]);let L=Qe({path:[],selectedItems:[],filters:o?{teamId:o.id}:{}}),te=i=>{v(i.target.files),i.target.files&&(i.target.value="")},ue=i=>{i.preventDefault(),R(!0)},ge=i=>{i.preventDefault(),R(!1)},fe=i=>{i.preventDefault(),R(!1),v(i.dataTransfer.files)},re=i=>{if(i===0)return"0 Bytes";let O=1024,h=["Bytes","KB","MB","GB"],P=Math.floor(Math.log(i)/Math.log(O));return parseFloat((i/Math.pow(O,P)).toFixed(2))+" "+h[P]},ae=i=>i.startsWith("image/")?(0,ye.jsx)(g.Image,{className:"h-4 w-4"}):i.startsWith("text/")?(0,ye.jsx)(g.FileText,{className:"h-4 w-4"}):(0,ye.jsx)(g.File,{className:"h-4 w-4"}),se=i=>{let O=i.role==="assistant",h=i.role==="user";switch(i.type){case"text":return(0,ye.jsxs)("div",{className:d("flex items-start gap-3 mb-4",h?"flex-row-reverse":""),children:[(0,ye.jsx)(F,{className:"h-8 w-8 shrink-0",children:(0,ye.jsx)(V,{className:d(h?"bg-primary text-primary-foreground":"bg-muted"),children:h?(0,ye.jsx)(g.User,{className:"h-4 w-4"}):(0,ye.jsx)(g.Bot,{className:"h-4 w-4"})})}),(0,ye.jsx)("div",{className:d("max-w-[80%] rounded-lg px-4 py-2",h?"bg-primary text-primary-foreground":"bg-muted"),children:(0,ye.jsx)("ye",{className:"text-sm",children:i.content})})]});case"image":return(0,ye.jsxs)("div",{className:d("flex items-start gap-3 mb-4",h?"flex-row-reverse":""),children:[(0,ye.jsx)(F,{className:"h-8 w-8 shrink-0",children:(0,ye.jsx)(V,{className:d(h?"bg-primary text-primary-foreground":"bg-muted"),children:h?(0,ye.jsx)(g.User,{className:"h-4 w-4"}):(0,ye.jsx)(g.Bot,{className:"h-4 w-4"})})}),(0,ye.jsxs)("div",{className:d("max-w-[80%] rounded-lg overflow-hidden",h?"bg-primary text-primary-foreground":"bg-muted"),children:[(0,ye.jsx)("img",{src:i.image.url,alt:i.image.alt||"Uploaded image",className:"max-w-full h-auto max-h-64 object-cover"}),i.content&&(0,ye.jsx)("div",{className:"ye-2",children:(0,ye.jsx)("ye",{className:"text-sm",children:i.content})})]})]});case"file":return(0,ye.jsxs)("div",{className:d("flex items-start gap-3 mb-4",h?"flex-row-reverse":""),children:[(0,ye.jsx)(F,{className:"h-8 w-8 shrink-0",children:(0,ye.jsx)(V,{className:d(h?"bg-primary text-primary-foreground":"bg-muted"),children:h?(0,ye.jsx)(g.User,{className:"h-4 w-4"}):(0,ye.jsx)(g.Bot,{className:"h-4 w-4"})})}),(0,ye.jsxs)("div",{className:d("max-w-[80%] rounded-lg px-4 py-2",h?"bg-primary text-primary-foreground":"bg-muted"),children:[(0,ye.jsxs)("div",{className:"flex items-center gap-2",children:[ae(i.file.type),(0,ye.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ye.jsx)("ye",{className:"text-sm font-medium truncate",children:i.file.name}),(0,ye.jsx)("ye",{className:"text-xs opacity-70",children:re(i.file.size)})]}),(0,ye.jsx)(I,{variant:"ghost",size:"sm",onClick:()=>window.open(i.file.url,"_blank"),className:"h-8 w-8 ye-0",children:(0,ye.jsx)(g.Download,{className:"h-4 w-4"})})]}),i.content&&(0,ye.jsx)("ye",{className:"text-sm mt-2",children:i.content})]})]});case"card":return(0,ye.jsxs)("div",{className:d("flex items-start gap-3 mb-4",h?"flex-row-reverse":""),children:[(0,ye.jsx)(F,{className:"h-8 w-8 shrink-0",children:(0,ye.jsx)(V,{className:d(h?"bg-primary text-primary-foreground":"bg-muted"),children:h?(0,ye.jsx)(g.User,{className:"h-4 w-4"}):(0,ye.jsx)(g.Bot,{className:"h-4 w-4"})})}),(0,ye.jsxs)("div",{className:"max-w-[80%]",children:[i.content&&(0,ye.jsx)("div",{className:"mb-2",children:(0,ye.jsx)("ye",{className:"text-sm",children:i.content})}),i.card.variant==="task"&&(0,ye.jsx)(tt,{data:{id:i.card.data.id,fetchLatest:!1,taskData:i.card.data}}),i.card.variant==="artefact"&&(0,ye.jsx)(ot,{artefact:i.card.description||"",taskId:i.card.data.id,taskData:i.card.data}),i.card.variant==="generic"&&(0,ye.jsxs)(G,{className:"w-full max-w-md",children:[(0,ye.jsxs)(K,{children:[(0,ye.jsx)(_,{className:"text-lg",children:i.card.title}),i.card.description&&(0,ye.jsx)(pe,{children:i.card.description})]}),(0,ye.jsx)(j,{children:(0,ye.jsx)("pre",{className:"text-sm",children:JSON.stringify(i.card.data,null,2)})})]})]})]});case"reference":return(0,ye.jsxs)("div",{className:d("flex items-start gap-3 mb-4",h?"flex-row-reverse":""),children:[(0,ye.jsx)(F,{className:"h-8 w-8 shrink-0",children:(0,ye.jsx)(V,{className:d(h?"bg-primary text-primary-foreground":"bg-muted"),children:h?(0,ye.jsx)(g.User,{className:"h-4 w-4"}):(0,ye.jsx)(g.Bot,{className:"h-4 w-4"})})}),(0,ye.jsxs)("div",{className:"max-w-[80%]",children:[i.content&&(0,ye.jsx)("div",{className:"mb-2",children:(0,ye.jsx)("ye",{className:"text-sm",children:i.content})}),(0,ye.jsx)(G,{className:"w-full",children:(0,ye.jsx)(j,{className:"ye-4",children:(0,ye.jsx)("div",{className:"space-y-2",children:i.references.map(P=>(0,ye.jsxs)("div",{className:"flex items-center gap-2 ye-2 rounded-md bg-muted/50",children:[(0,ye.jsx)(J,{variant:"outline",children:P.type}),(0,ye.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ye.jsx)("ye",{className:"text-sm font-medium truncate",children:P.title}),P.description&&(0,ye.jsx)("ye",{className:"text-xs text-muted-foreground truncate",children:P.description})]}),P.url&&(0,ye.jsx)(I,{variant:"ghost",size:"sm",onClick:()=>window.open(P.url,"_blank"),className:"h-8 w-8 ye-0",children:(0,ye.jsx)(g.ExternalLink,{className:"h-4 w-4"})})]},P.id))})})})]})]});case"menu":return(0,ye.jsxs)("div",{className:d("flex items-start gap-3 mb-4",h?"flex-row-reverse":""),children:[(0,ye.jsx)(F,{className:"h-8 w-8 shrink-0",children:(0,ye.jsx)(V,{className:d(h?"bg-primary text-primary-foreground":"bg-muted"),children:h?(0,ye.jsx)(g.User,{className:"h-4 w-4"}):(0,ye.jsx)(g.Bot,{className:"h-4 w-4"})})}),(0,ye.jsxs)("div",{className:"max-w-[80%]",children:[i.content&&(0,ye.jsx)("div",{className:"mb-2",children:(0,ye.jsx)("ye",{className:"text-sm",children:i.content})}),(0,ye.jsxs)(G,{className:"w-full",children:[(0,ye.jsx)(K,{children:(0,ye.jsx)(_,{className:"text-lg",children:i.menu.title})}),(0,ye.jsx)(j,{children:(0,ye.jsx)("div",{className:"space-y-2",children:i.menu.items.map(P=>(0,ye.jsx)(I,{variant:"outline",className:"w-full justify-start",onClick:P.action,children:(0,ye.jsxs)("div",{className:"text-left",children:[(0,ye.jsx)("ye",{className:"font-medium",children:P.label}),P.description&&(0,ye.jsx)("ye",{className:"text-xs text-muted-foreground",children:P.description})]})},P.id))})})]})]})]});default:return null}};return(0,ye.jsxs)("div",{className:d("flex flex-col h-full",N),children:[(0,ye.jsxs)("div",{className:"flex items-center justify-between ye-4 border-b",children:[(0,ye.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ye.jsx)("h2",{className:"text-lg font-semibold",children:c||"Chat"}),o&&(0,ye.jsx)(J,{variant:"secondary",children:o.name})]}),(0,ye.jsx)(I,{variant:"ghost",size:"sm",onClick:()=>C(!S),className:"h-8 w-8 ye-0",children:(0,ye.jsx)(g.Menu,{className:"h-4 w-4"})})]}),(0,ye.jsx)(xe.AnimatePresence,{children:S&&(0,ye.jsx)(xe.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},className:"overflow-hidden border-b",children:(0,ye.jsx)(Xe,{capabilities:n,isOpen:S,onToggle:()=>C(!S),onActionSelect:(i,O)=>{console.log("Action selected:",i,O),C(!1)}})})}),(0,ye.jsxs)(Pe,{className:"flex-1 ye-4",onDragOver:ue,onDragLeave:ge,onDrop:fe,children:[(0,ye.jsxs)("div",{className:d("space-y-4",s&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[e.map(i=>(0,ye.jsx)("div",{children:se(i)},i.id)),a&&(0,ye.jsxs)("div",{className:"flex items-start gap-3",children:[(0,ye.jsx)(F,{className:"h-8 w-8 shrink-0",children:(0,ye.jsx)(V,{className:"bg-muted",children:(0,ye.jsx)(g.Bot,{className:"h-4 w-4"})})}),(0,ye.jsx)("div",{className:"bg-muted rounded-lg px-4 py-2",children:(0,ye.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ye.jsx)("div",{className:"w-2 h-2 bg-current rounded-full animate-pulse"}),(0,ye.jsx)("div",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,ye.jsx)("div",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]})})]})]}),(0,ye.jsx)("div",{ref:y})]}),l.length>0&&(0,ye.jsx)("div",{className:"ye-4 border-t bg-muted/50",children:(0,ye.jsx)("div",{className:"flex flex-wrap gap-2",children:l.map(i=>(0,ye.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg ye-2 border",children:[ae(i.file.type),(0,ye.jsx)("span",{className:"text-sm font-medium",children:i.file.name}),(0,ye.jsx)("span",{className:"text-xs text-muted-foreground",children:re(i.file.size)}),(0,ye.jsx)(I,{variant:"ghost",size:"sm",onClick:()=>A(i.id),className:"h-6 w-6 ye-0",children:(0,ye.jsx)(g.X,{className:"h-4 w-4"})})]},i.id))})}),(0,ye.jsxs)("div",{className:"ye-4 border-t",children:[(0,ye.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ye.jsx)("div",{className:"flex-1",children:(0,ye.jsx)(Ae,{placeholder:"Type a message...",value:t,onChange:i=>b(i.target.value),onKeyPress:f,className:"resize-none"})}),u&&(0,ye.jsx)(I,{variant:"outline",size:"sm",onClick:()=>k.current?.click(),className:"h-10 w-10 ye-0",children:(0,ye.jsx)(g.Paperclip,{className:"h-4 w-4"})}),(0,ye.jsx)(I,{onClick:w,disabled:!t.trim()&&l.length===0,className:"h-10 w-10 ye-0",children:(0,ye.jsx)(g.Send,{className:"h-4 w-4"})})]}),u&&(0,ye.jsx)("input",{ref:k,type:"file",multiple:!0,onChange:te,className:"hidden"})]})]})}0&&(module.exports={EnhancedChatInterface});
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- "use client";import{a as L}from"../../chunk-A2AEX4YB.mjs";import{a as z}from"../../chunk-DBY4SXQI.mjs";import{a as R}from"../../chunk-I3E2TYYZ.mjs";import"../../chunk-LTTO57ZK.mjs";import{d as S}from"../../chunk-Q2DPE66H.mjs";import{a as E}from"../../chunk-FT3AE7L2.mjs";import{a as I}from"../../chunk-L5JPAKPM.mjs";import{b as l}from"../../chunk-ZUA4KNIR.mjs";import{a as n,c}from"../../chunk-SOLZ4VQH.mjs";import{b as x}from"../../chunk-CSBGSBEU.mjs";import{a as u,b,c as w,d as T,e as f}from"../../chunk-YO3GQYRJ.mjs";import{a as r}from"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";import{useRef as P,useEffect as Z,useState as $}from"react";import{motion as aa,AnimatePresence as ea}from"framer-motion";import{Send as ta,Bot as o,User as m,Menu as sa,Paperclip as ra,X as ia,FileText as la,Image as na,File as ca,Download as oa,ExternalLink as ma}from"lucide-react";import{jsx as a,jsxs as t}from"react/jsx-runtime";function Fa({messages:y,input:C,isTyping:U=!1,selectedTeam:p,currentSessionTitle:H,capabilities:O,fileUploads:N,isDragOver:K,enableFileUpload:k,onInputChange:j,onSendMessage:W,onKeyPress:_,onFileUpload:A,onRemoveFile:G,onDragOver:g,className:J}){let M=P(null),D=P(null),[v,h]=$(!1);Z(()=>{M.current?.scrollIntoView({behavior:"smooth"})},[y]);let da=S({path:[],selectedItems:[],filters:p?{teamId:p.id}:{}}),V=e=>{A(e.target.files),e.target.files&&(e.target.value="")},X=e=>{e.preventDefault(),g(!0)},q=e=>{e.preventDefault(),g(!1)},Q=e=>{e.preventDefault(),g(!1),A(e.dataTransfer.files)},F=e=>{if(e===0)return"0 Bytes";let d=1024,s=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(e)/Math.log(d));return parseFloat((e/Math.pow(d,i)).toFixed(2))+" "+s[i]},B=e=>e.startsWith("image/")?a(na,{className:"h-4 w-4"}):e.startsWith("text/")?a(la,{className:"h-4 w-4"}):a(ca,{className:"h-4 w-4"}),Y=e=>{let d=e.role==="assistant",s=e.role==="user";switch(e.type){case"text":return t("div",{className:r("flex items-start gap-3 mb-4",s?"flex-row-reverse":""),children:[a(n,{className:"h-8 w-8 shrink-0",children:a(c,{className:r(s?"bg-primary text-primary-foreground":"bg-muted"),children:s?a(m,{className:"h-4 w-4"}):a(o,{className:"h-4 w-4"})})}),a("div",{className:r("max-w-[80%] rounded-lg px-4 py-2",s?"bg-primary text-primary-foreground":"bg-muted"),children:a("p",{className:"text-sm",children:e.content})})]});case"image":return t("div",{className:r("flex items-start gap-3 mb-4",s?"flex-row-reverse":""),children:[a(n,{className:"h-8 w-8 shrink-0",children:a(c,{className:r(s?"bg-primary text-primary-foreground":"bg-muted"),children:s?a(m,{className:"h-4 w-4"}):a(o,{className:"h-4 w-4"})})}),t("div",{className:r("max-w-[80%] rounded-lg overflow-hidden",s?"bg-primary text-primary-foreground":"bg-muted"),children:[a("img",{src:e.image.url,alt:e.image.alt||"Uploaded image",className:"max-w-full h-auto max-h-64 object-cover"}),e.content&&a("div",{className:"p-2",children:a("p",{className:"text-sm",children:e.content})})]})]});case"file":return t("div",{className:r("flex items-start gap-3 mb-4",s?"flex-row-reverse":""),children:[a(n,{className:"h-8 w-8 shrink-0",children:a(c,{className:r(s?"bg-primary text-primary-foreground":"bg-muted"),children:s?a(m,{className:"h-4 w-4"}):a(o,{className:"h-4 w-4"})})}),t("div",{className:r("max-w-[80%] rounded-lg px-4 py-2",s?"bg-primary text-primary-foreground":"bg-muted"),children:[t("div",{className:"flex items-center gap-2",children:[B(e.file.type),t("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-sm font-medium truncate",children:e.file.name}),a("p",{className:"text-xs opacity-70",children:F(e.file.size)})]}),a(l,{variant:"ghost",size:"sm",onClick:()=>window.open(e.file.url,"_blank"),className:"h-8 w-8 p-0",children:a(oa,{className:"h-4 w-4"})})]}),e.content&&a("p",{className:"text-sm mt-2",children:e.content})]})]});case"card":return t("div",{className:r("flex items-start gap-3 mb-4",s?"flex-row-reverse":""),children:[a(n,{className:"h-8 w-8 shrink-0",children:a(c,{className:r(s?"bg-primary text-primary-foreground":"bg-muted"),children:s?a(m,{className:"h-4 w-4"}):a(o,{className:"h-4 w-4"})})}),t("div",{className:"max-w-[80%]",children:[e.content&&a("div",{className:"mb-2",children:a("p",{className:"text-sm",children:e.content})}),e.card.variant==="task"&&a(R,{data:{id:e.card.data.id,fetchLatest:!1,taskData:e.card.data}}),e.card.variant==="artefact"&&a(z,{artefact:e.card.description||"",taskId:e.card.data.id,taskData:e.card.data}),e.card.variant==="generic"&&t(u,{className:"w-full max-w-md",children:[t(b,{children:[a(w,{className:"text-lg",children:e.card.title}),e.card.description&&a(T,{children:e.card.description})]}),a(f,{children:a("pre",{className:"text-sm",children:JSON.stringify(e.card.data,null,2)})})]})]})]});case"reference":return t("div",{className:r("flex items-start gap-3 mb-4",s?"flex-row-reverse":""),children:[a(n,{className:"h-8 w-8 shrink-0",children:a(c,{className:r(s?"bg-primary text-primary-foreground":"bg-muted"),children:s?a(m,{className:"h-4 w-4"}):a(o,{className:"h-4 w-4"})})}),t("div",{className:"max-w-[80%]",children:[e.content&&a("div",{className:"mb-2",children:a("p",{className:"text-sm",children:e.content})}),a(u,{className:"w-full",children:a(f,{className:"p-4",children:a("div",{className:"space-y-2",children:e.references.map(i=>t("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[a(x,{variant:"outline",children:i.type}),t("div",{className:"flex-1 min-w-0",children:[a("p",{className:"text-sm font-medium truncate",children:i.title}),i.description&&a("p",{className:"text-xs text-muted-foreground truncate",children:i.description})]}),i.url&&a(l,{variant:"ghost",size:"sm",onClick:()=>window.open(i.url,"_blank"),className:"h-8 w-8 p-0",children:a(ma,{className:"h-4 w-4"})})]},i.id))})})})]})]});case"menu":return t("div",{className:r("flex items-start gap-3 mb-4",s?"flex-row-reverse":""),children:[a(n,{className:"h-8 w-8 shrink-0",children:a(c,{className:r(s?"bg-primary text-primary-foreground":"bg-muted"),children:s?a(m,{className:"h-4 w-4"}):a(o,{className:"h-4 w-4"})})}),t("div",{className:"max-w-[80%]",children:[e.content&&a("div",{className:"mb-2",children:a("p",{className:"text-sm",children:e.content})}),t(u,{className:"w-full",children:[a(b,{children:a(w,{className:"text-lg",children:e.menu.title})}),a(f,{children:a("div",{className:"space-y-2",children:e.menu.items.map(i=>a(l,{variant:"outline",className:"w-full justify-start",onClick:i.action,children:t("div",{className:"text-left",children:[a("p",{className:"font-medium",children:i.label}),i.description&&a("p",{className:"text-xs text-muted-foreground",children:i.description})]})},i.id))})})]})]})]});default:return null}};return t("div",{className:r("flex flex-col h-full",J),children:[t("div",{className:"flex items-center justify-between p-4 border-b",children:[t("div",{className:"flex items-center gap-2",children:[a("h2",{className:"text-lg font-semibold",children:H||"Chat"}),p&&a(x,{variant:"secondary",children:p.name})]}),a(l,{variant:"ghost",size:"sm",onClick:()=>h(!v),className:"h-8 w-8 p-0",children:a(sa,{className:"h-4 w-4"})})]}),a(ea,{children:v&&a(aa.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},className:"overflow-hidden border-b",children:a(L,{capabilities:O,isOpen:v,onToggle:()=>h(!v),onActionSelect:(e,d)=>{console.log("Action selected:",e,d),h(!1)}})})}),t(E,{className:"flex-1 p-4",onDragOver:X,onDragLeave:q,onDrop:Q,children:[t("div",{className:r("space-y-4",K&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[y.map(e=>a("div",{children:Y(e)},e.id)),U&&t("div",{className:"flex items-start gap-3",children:[a(n,{className:"h-8 w-8 shrink-0",children:a(c,{className:"bg-muted",children:a(o,{className:"h-4 w-4"})})}),a("div",{className:"bg-muted rounded-lg px-4 py-2",children:t("div",{className:"flex items-center gap-1",children:[a("div",{className:"w-2 h-2 bg-current rounded-full animate-pulse"}),a("div",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),a("div",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]})})]})]}),a("div",{ref:M})]}),N.length>0&&a("div",{className:"p-4 border-t bg-muted/50",children:a("div",{className:"flex flex-wrap gap-2",children:N.map(e=>t("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[B(e.file.type),a("span",{className:"text-sm font-medium",children:e.file.name}),a("span",{className:"text-xs text-muted-foreground",children:F(e.file.size)}),a(l,{variant:"ghost",size:"sm",onClick:()=>G(e.id),className:"h-6 w-6 p-0",children:a(ia,{className:"h-4 w-4"})})]},e.id))})}),t("div",{className:"p-4 border-t",children:[t("div",{className:"flex items-center gap-2",children:[a("div",{className:"flex-1",children:a(I,{placeholder:"Type a message...",value:C,onChange:e=>j(e.target.value),onKeyPress:_,className:"resize-none"})}),k&&a(l,{variant:"outline",size:"sm",onClick:()=>D.current?.click(),className:"h-10 w-10 p-0",children:a(ra,{className:"h-4 w-4"})}),a(l,{onClick:W,disabled:!C.trim()&&N.length===0,className:"h-10 w-10 p-0",children:a(ta,{className:"h-4 w-4"})})]}),k&&a("input",{ref:D,type:"file",multiple:!0,onChange:V,className:"hidden"})]})]})}export{Fa as EnhancedChatInterface};
@@ -1,70 +0,0 @@
1
- import type React from "react";
2
- import type { BusinessUnit } from "../DigitalColleagues/types";
3
- import type { Capability } from "../../test-data/capabilities";
4
- export interface ChatMessage {
5
- id: string;
6
- content: string;
7
- type: "user" | "ai";
8
- timestamp: Date;
9
- }
10
- export interface EnhancedChatMessage extends ChatMessage {
11
- role?: "user" | "assistant" | "system";
12
- messageType?: "text" | "image" | "file" | "card" | "reference" | "menu" | "tool-invocation";
13
- data?: any;
14
- image?: {
15
- url: string;
16
- alt?: string;
17
- width?: number;
18
- height?: number;
19
- };
20
- file?: {
21
- name: string;
22
- size: number;
23
- type: string;
24
- url: string;
25
- };
26
- card?: {
27
- title: string;
28
- description?: string;
29
- data: any;
30
- variant?: 'task' | 'artefact' | 'customer' | 'opportunity' | 'campaign' | 'generic';
31
- };
32
- references?: Array<{
33
- id: string;
34
- title: string;
35
- url?: string;
36
- description?: string;
37
- type?: 'document' | 'link' | 'internal';
38
- }>;
39
- menu?: {
40
- title: string;
41
- items: Array<{
42
- id: string;
43
- label: string;
44
- description?: string;
45
- value: any;
46
- action?: () => void;
47
- }>;
48
- };
49
- }
50
- interface AIChatInterfaceProps {
51
- messages: (ChatMessage | EnhancedChatMessage)[];
52
- input: string;
53
- isTyping?: boolean;
54
- selectedTeam?: BusinessUnit;
55
- currentSessionTitle?: string;
56
- capabilities: Capability[];
57
- showCapabilities?: boolean;
58
- onInputChange: (value: string) => void;
59
- onSendMessage: () => void;
60
- onKeyPress?: (e: React.KeyboardEvent) => void;
61
- fileUploads?: any[];
62
- isDragOver?: boolean;
63
- enableFileUpload?: boolean;
64
- onFileUpload?: (files: FileList | null) => void;
65
- onRemoveFile?: (id: string) => void;
66
- onDragOver?: (isDragOver: boolean) => void;
67
- className?: string;
68
- }
69
- export declare function AIChatInterface({ messages, input, isTyping, selectedTeam, currentSessionTitle, capabilities, showCapabilities, onInputChange, onSendMessage, onKeyPress, fileUploads, isDragOver, enableFileUpload, onFileUpload, onRemoveFile, onDragOver, className, }: AIChatInterfaceProps): import("react/jsx-runtime").JSX.Element;
70
- export {};
@@ -1,5 +0,0 @@
1
- "use client";
2
- "use strict";
3
- 'use client'
4
-
5
- "use strict";"use client";var Ue=Object.create;var se=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var Qe=(e,t)=>{for(var o in t)se(e,o,{get:t[o],enumerable:!0})},Ce=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Ke(t))!qe.call(e,l)&&l!==o&&se(e,l,{get:()=>t[l],enumerable:!(r=We(t,l))||r.enumerable});return e};var $=(e,t,o)=>(o=e!=null?Ue(_e(e)):{},Ce(t||!e||!e.__esModule?se(o,"default",{value:e,enumerable:!0}):o,e)),Je=e=>Ce(se({},"__esModule",{value:!0}),e);var Ft={};Qe(Ft,{AIChatInterface:()=>Gt});module.exports=Je(Ft);var D=require("react"),Z=require("framer-motion"),S=require("lucide-react");var le=$(require("react")),B=$(require("@radix-ui/react-avatar"));var ze=require("clsx");var me="-",Xe=e=>{let t=Ye(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{let n=c.split(me);return n[0]===""&&n.length!==1&&n.shift(),Ae(n,t)||Ze(c)},getConflictingClassGroupIds:(c,n)=>{let g=o[c]||[];return n&&r[c]?[...g,...r[c]]:g}}},Ae=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),l=r?Ae(e.slice(1),r):void 0;if(l)return l;if(t.validators.length===0)return;let i=e.join(me);return t.validators.find(({validator:c})=>c(i))?.classGroupId},Ne=/^\[(.+)\]$/,Ze=e=>{if(Ne.test(e)){let t=Ne.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Ye=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return tt(Object.entries(e.classGroups),o).forEach(([i,c])=>{ue(c,r,i,t)}),r},ue=(e,t,o,r)=>{e.forEach(l=>{if(typeof l=="string"){let i=l===""?t:ke(t,l);i.classGroupId=o;return}if(typeof l=="function"){if(et(l)){ue(l(r),t,o,r);return}t.validators.push({validator:l,classGroupId:o});return}Object.entries(l).forEach(([i,c])=>{ue(c,ke(t,i),o,r)})})},ke=(e,t)=>{let o=e;return t.split(me).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},et=e=>e.isThemeGetter,tt=(e,t)=>t?e.map(([o,r])=>{let l=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([c,n])=>[t+c,n])):i);return[o,l]}):e,ot=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,l=(i,c)=>{o.set(i,c),t++,t>e&&(t=0,r=o,o=new Map)};return{get(i){let c=o.get(i);if(c!==void 0)return c;if((c=r.get(i))!==void 0)return l(i,c),c},set(i,c){o.has(i)?o.set(i,c):l(i,c)}}},Re="!",rt=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,l=t[0],i=t.length,c=n=>{let g=[],y=0,v=0,w;for(let b=0;b<n.length;b++){let C=n[b];if(y===0){if(C===l&&(r||n.slice(b,b+i)===t)){g.push(n.slice(v,b)),v=b+i;continue}if(C==="/"){w=b;continue}}C==="["?y++:C==="]"&&y--}let R=g.length===0?n:n.substring(v),M=R.startsWith(Re),P=M?R.substring(1):R,N=w&&w>v?w-v:void 0;return{modifiers:g,hasImportantModifier:M,baseClassName:P,maybePostfixModifierPosition:N}};return o?n=>o({className:n,parseClassName:c}):c},at=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},it=e=>({cache:ot(e.cacheSize),parseClassName:rt(e),...Xe(e)}),nt=/\s+/,st=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:l}=t,i=[],c=e.trim().split(nt),n="";for(let g=c.length-1;g>=0;g-=1){let y=c[g],{modifiers:v,hasImportantModifier:w,baseClassName:R,maybePostfixModifierPosition:M}=o(y),P=!!M,N=r(P?R.substring(0,M):R);if(!N){if(!P){n=y+(n.length>0?" "+n:n);continue}if(N=r(R),!N){n=y+(n.length>0?" "+n:n);continue}P=!1}let b=at(v).join(":"),C=w?b+Re:b,k=C+N;if(i.includes(k))continue;i.push(k);let f=l(N,P);for(let A=0;A<f.length;++A){let W=f[A];i.push(C+W)}n=y+(n.length>0?" "+n:n)}return n};function lt(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Pe(t))&&(r&&(r+=" "),r+=o);return r}var Pe=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Pe(e[r]))&&(o&&(o+=" "),o+=t);return o};function ct(e,...t){let o,r,l,i=c;function c(g){let y=t.reduce((v,w)=>w(v),e());return o=it(y),r=o.cache.get,l=o.cache.set,i=n,n(g)}function n(g){let y=r(g);if(y)return y;let v=st(g,o);return l(g,v),v}return function(){return i(lt.apply(null,arguments))}}var h=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Se=/^\[(?:([ce-z-]+):)?(.+)\]$/i,dt=/^\ce+\/\ce+$/,pt=new Set(["px","full","screen"]),ut=/^(\ce+(\.\ce+)?)?(xs|sm|md|lg|xl)$/,mt=/\ce+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,bt=/^(inset_)?-?((\ce+)?\.?(\ce+)[ce-z]+|0)_-?((\ce+)?\.?(\ce+)[ce-z]+|0)/,ft=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,E=e=>Q(e)||pt.has(e)||dt.test(e),V=e=>J(e,"length",kt),Q=e=>!!e&&!Number.isNaN(Number(e)),pe=e=>J(e,"number",Q),te=e=>!!e&&Number.isInteger(Number(e)),ht=e=>e.endsWith("%")&&Q(e.slice(0,-1)),p=e=>Se.test(e),G=e=>ut.test(e),vt=new Set(["length","size","percentage"]),yt=e=>J(e,vt,Me),xt=e=>J(e,"position",Me),wt=new Set(["image","url"]),Ct=e=>J(e,wt,Rt),Nt=e=>J(e,"",At),oe=()=>!0,J=(e,t,o)=>{let r=Se.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},kt=e=>mt.test(e)&&!gt.test(e),Me=()=>!1,At=e=>bt.test(e),Rt=e=>ft.test(e);var Pt=()=>{let e=h("colors"),t=h("spacing"),o=h("blur"),r=h("brightness"),l=h("borderColor"),i=h("borderRadius"),c=h("borderSpacing"),n=h("borderWidth"),g=h("contrast"),y=h("grayscale"),v=h("hueRotate"),w=h("invert"),R=h("gap"),M=h("gradientColorStops"),P=h("gradientColorStopPositions"),N=h("inset"),b=h("margin"),C=h("opacity"),k=h("padding"),f=h("saturate"),A=h("scale"),W=h("sepia"),ae=h("skew"),K=h("space"),ie=h("translate"),_=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],m=()=>["auto",p,t],s=()=>[p,t],x=()=>["",E,V],q=()=>["auto",Q,p],ye=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",p],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Q,p];return{cacheSize:500,separator:":",theme:{colors:[oe],spacing:[E,V],blur:["none","",G,p],brightness:L(),borderColor:[e],borderRadius:["none","","full",G,p],borderSpacing:s(),borderWidth:x(),contrast:L(),grayscale:ee(),hueRotate:L(),invert:ee(),gap:s(),gradientColorStops:[e],gradientColorStopPositions:[ht,V],inset:m(),margin:m(),opacity:L(),padding:s(),saturate:L(),scale:L(),sepia:ee(),skew:L(),space:s(),translate:s()},classGroups:{aspect:[{aspect:["auto","square","video",p]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"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:[...ye(),p]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-x":[{"inset-x":[N]}],"inset-y":[{"inset-y":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",te,p]}],basis:[{basis:m()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",p]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",te,p]}],"grid-cols":[{"grid-cols":[oe]}],"col-start-end":[{col:["auto",{span:["full",te,p]},p]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[oe]}],"row-start-end":[{row:["auto",{span:[te,p]},p]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",p]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",p]}],gap:[{gap:[R]}],"gap-x":[{"gap-x":[R]}],"gap-y":[{"gap-y":[R]}],"justify-content":[{justify:["normal",...de()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...de(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...de(),"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]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[K]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[K]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",p,t]}],"min-w":[{"min-w":[p,t,"min","max","fit"]}],"max-w":[{"max-w":[p,t,"none","full","min","max","fit","prose",{screen:[G]},G]}],h:[{h:[p,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[p,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[p,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[p,t,"auto","min","max","fit"]}],"font-size":[{text:["base",G,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pe]}],"font-family":[{font:[oe]}],"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",p]}],"line-clamp":[{"line-clamp":["none",Q,pe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",E,p]}],"list-image":[{"list-image":["none",p]}],"list-style-type":[{list:["none","disc","decimal",p]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",E,V]}],"underline-offset":[{"underline-offset":["auto",E,p]}],"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",p]}],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",p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ye(),xt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ct]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[M]}],"gradient-via":[{via:[M]}],"gradient-to":[{to:[M]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...ne(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:ne()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[E,p]}],"outline-w":[{outline:[E,V]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:x()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[E,V]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",G,Nt]}],"shadow-color":[{shadow:[oe]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...xe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":xe()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",G,p]}],grayscale:[{grayscale:[y]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[w]}],saturate:[{saturate:[f]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[f]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",p]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",p]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",p]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[te,p]}],"translate-x":[{"translate-x":[ie]}],"translate-y":[{"translate-y":[ie]}],"skew-x":[{"skew-x":[ae]}],"skew-y":[{"skew-y":[ae]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",p]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p]}],"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-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-pe":[{"scroll-pe":s()}],"scroll-pt":[{"scroll-pt":s()}],"scroll-pr":[{"scroll-pr":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","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",p]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[E,V,pe]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-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-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Te=ct(Pt);function u(...e){return Te((0,ze.clsx)(e))}var ce=require("react/jsx-runtime"),re=le.forwardRef(({className:e,...t},o)=>(0,ce.jsx)(B.Root,{ref:o,className:u("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));re.displayName=B.Root.displayName;var St=le.forwardRef(({className:e,...t},o)=>(0,ce.jsx)(B.Image,{ref:o,className:u("aspect-square h-full w-full",e),...t}));St.displayName=B.Image.displayName;var X=le.forwardRef(({className:e,...t},o)=>(0,ce.jsx)(B.Fallback,{ref:o,className:u("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));X.displayName=B.Fallback.displayName;var Ie=require("@radix-ui/react-slot"),Le=require("class-variance-authority"),Ee=$(require("react")),Mt=(0,Le.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),z=Ee.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...l},i)=>(0,ce.jsx)(e?Ie.Slot:"button",{className:u(Mt({className:t,size:o,variant:r})),ref:i,...l}));z.displayName="Button";var O=$(require("react"));var ge=O.forwardRef(({className:e,...t},o)=>(0,ce.jsx)("div",{ref:o,className:u("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ge.displayName="Card";var Tt=O.forwardRef(({className:e,...t},o)=>(0,ce.jsx)("div",{ref:o,className:u("flex flex-col space-y-1.5 p-6",e),...t}));Tt.displayName="CardHeader";var zt=O.forwardRef(({className:e,...t},o)=>(0,ce.jsx)("div",{ref:o,className:u("font-semibold leading-none tracking-tight",e),...t}));zt.displayName="CardTitle";var It=O.forwardRef(({className:e,...t},o)=>(0,ce.jsx)("div",{ref:o,className:u("text-sm text-muted-foreground",e),...t}));It.displayName="CardDescription";var Lt=O.forwardRef(({className:e,...t},o)=>(0,ce.jsx)("div",{ref:o,className:u("p-6 pt-0",e),...t}));Lt.displayName="CardContent";var Et=O.forwardRef(({className:e,...t},o)=>(0,ce.jsx)("div",{ref:o,className:u("flex items-center p-6 pt-0",e),...t}));Et.displayName="CardFooter";var He=$(require("react"));var be=He.forwardRef(({className:e,type:t,...o},r)=>(0,ce.jsx)("input",{type:t,className:u("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));be.displayName="Input";var fe=$(require("react")),T=$(require("@radix-ui/react-scroll-area"));var he=fe.forwardRef(({className:e,children:t,...o},r)=>(0,ce.jsxs)(T.Root,{ref:r,className:u("relative overflow-hidden",e),...o,children:[(0,ce.jsx)(T.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ce.jsx)(Ve,{}),(0,ce.jsx)(T.Corner,{})]}));he.displayName=T.Root.displayName;var Ve=fe.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,ce.jsx)(T.ScrollAreaScrollbar,{ref:r,orientation:t,className:u("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),...o,children:(0,ce.jsx)(T.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ve.displayName=T.ScrollAreaScrollbar.displayName;var Bt=(0,Le.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 ve({className:e,variant:t,...o}){return(0,ce.jsx)("div",{className:u(Bt({variant:t}),e),...o})}var $e={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]};function Oe(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function je({capabilities:e,isOpen:t,onToggle:o,onActionSelect:r,onContextChange:l,colorScheme:i=$e,className:c}){let[n,g]=(0,D.useState)([]),[y,v]=(0,D.useState)([]),w=n[n.length-1],R=w?.children||e,M=(f,A)=>{switch(f.type){case"category":return i.categories[A%i.categories.length];case"list":return i.lists[A%i.lists.length];case"item":return i.items[A%i.items.length];default:return i.primary}},P=(0,D.useMemo)(()=>({path:n,selectedItems:y,filters:{}}),[n,y]);(0,D.useEffect)(()=>{l&&l(P)},[P,l]);let N=f=>{f.type==="category"||f.type==="list"?g([...n,f]):f.type==="item"&&v([...y,f])},b=()=>{g(n.slice(0,-1))},C=f=>{g(n.slice(0,f+1))},k=()=>w?.actions?w.actions:[];return t?(0,ce.jsxs)("div",{className:u("w-full",c),children:[(0,ce.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ce.jsxs)("div",{className:"flex items-center gap-2",children:[n.length>0&&(0,ce.jsx)(Z.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:b,className:u("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ce.jsx)(S.ChevronLeft,{className:u("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,ce.jsx)("h4",{className:"font-medium text-sm",children:w?.name||"Capabilities"})]}),(0,ce.jsx)(Z.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:o,className:u("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ce.jsx)(S.X,{className:u("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),n.length>0&&(0,ce.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,ce.jsx)(Z.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>g([]),className:u("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ce.jsxs)("span",{className:"relative",children:["Capabilities",(0,ce.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),n.map((f,A)=>(0,ce.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ce.jsx)(S.ChevronRight,{className:"h-2 w-2"}),(0,ce.jsx)(Z.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>C(A),className:u("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ce.jsxs)("span",{className:"relative",children:[f.name,(0,ce.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},f.id))]}),(0,ce.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,ce.jsx)(Z.AnimatePresence,{mode:"wait",children:(0,ce.jsx)(Z.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:w?.type==="list"&&w.data?(0,ce.jsx)(Vt,{data:w.data,onItemSelect:f=>v([...y,f]),colorScheme:i}):(0,ce.jsx)(Ht,{capabilities:R,onSelect:N,colorScheme:i})},w?.id||"root")})})]}):(0,ce.jsxs)(z,{onClick:o,size:"sm",variant:"outline",className:"rounded-full",children:[(0,ce.jsx)(S.Menu,{className:"h-4 w-4"}),(0,ce.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Ht({capabilities:e,onSelect:t,colorScheme:o}){return(0,ce.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((r,l)=>(0,ce.jsx)(Dt,{capability:r,onClick:()=>t(r),color:o.categories[l%o.categories.length]},r.id))})}function Dt({capability:e,onClick:t,selected:o,color:r}){return(0,ce.jsxs)(Z.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:u("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",o&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,ce.jsx)("div",{className:u("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",r)}),(0,ce.jsxs)("span",{className:"truncate relative",children:[e.name,(0,ce.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,ce.jsx)(S.ChevronRight,{className:u("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,ce.jsx)(ve,{variant:"secondary",className:u("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 Vt({data:e,onItemSelect:t,colorScheme:o}){return(0,ce.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((r,l)=>(0,ce.jsxs)(Z.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:u("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(r),children:[(0,ce.jsx)("div",{className:u("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o.items[l%o.items.length])}),(0,ce.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ce.jsxs)("span",{className:"truncate relative font-medium",children:[r.title,(0,ce.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),r.subtitle&&(0,ce.jsx)("div",{className:u("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:r.subtitle})]}),r.value&&(0,ce.jsx)(ve,{variant:"secondary",className:u("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:r.value})]},r.id))})}function Gt({messages:e,input:t,isTyping:o=!1,selectedTeam:r,currentSessionTitle:l,capabilities:i,showCapabilities:c=!0,onInputChange:n,onSendMessage:g,onKeyPress:y,fileUploads:v=[],isDragOver:w=!1,enableFileUpload:R=!1,onFileUpload:M,onRemoveFile:P,onDragOver:N,className:b}){let C=(0,D.useRef)(null),[k,f]=(0,D.useState)(!1),[A,W]=(0,D.useState)({path:[],selectedItems:[],filters:{}}),ae=()=>{C.current?.scrollIntoView({behavior:"smooth"})};(0,D.useEffect)(()=>{ae()},[e]);let K=(m,s)=>{console.log("Capability action:",m,s);let x=`Executing ${m} with context: ${JSON.stringify(s.path.map(q=>q.name))}`;f(!1)},ie=(0,D.useCallback)(m=>{W(m)},[]),_=()=>Oe(A),Y=()=>{let m=[];return i.forEach(s=>{s.actions&&s.actions.forEach(x=>{m.push({label:x.label,action:()=>K(x.id,{path:[s],selectedItems:[],filters:{}})})}),s.children&&s.children.forEach(x=>{x.type==="list"&&x.data&&m.push({label:`View ${x.name}`,action:()=>f(!0)})})}),m.slice(0,5)};return(0,ce.jsxs)(ge,{className:`h-full flex flex-col shadow-sm ${b||""}`,children:[(0,ce.jsx)(he,{className:"flex-1 p-4",children:(0,ce.jsxs)("div",{className:"space-y-4",children:[(0,ce.jsx)(Z.AnimatePresence,{children:e.map(m=>{let s=m;return(0,ce.jsxs)(Z.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:u("flex gap-3",m.type==="user"?"flex-row-reverse":"flex-row"),children:[(0,ce.jsx)(re,{className:"h-8 w-8",children:m.type==="user"?(0,ce.jsx)(X,{children:(0,ce.jsx)(S.User,{className:"h-4 w-4"})}):(0,ce.jsx)(X,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ce.jsx)(S.Bot,{className:"h-4 w-4"})})}),(0,ce.jsxs)("div",{className:u("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",m.type==="user"?"bg-primary text-primary-foreground":"bg-muted"),children:[s.messageType==="image"&&s.image&&(0,ce.jsx)("div",{className:"mb-2",children:(0,ce.jsx)("img",{src:s.image.url,alt:s.image.alt||"Uploaded image",className:"max-w-full h-auto max-h-48 rounded-lg"})}),s.messageType==="file"&&s.file&&(0,ce.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,ce.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ce.jsx)("span",{className:"text-sm font-medium",children:s.file.name}),(0,ce.jsxs)("span",{className:"text-xs opacity-70",children:[(s.file.size/1024/1024).toFixed(1),"MB"]})]})}),s.messageType==="card"&&s.card&&(0,ce.jsx)("div",{className:"mb-2",children:(0,ce.jsxs)("div",{className:"p-3 bg-background/50 rounded-lg",children:[(0,ce.jsx)("h4",{className:"font-medium",children:s.card.title}),s.card.description&&(0,ce.jsx)("p",{className:"text-sm opacity-70 mt-1",children:s.card.description})]})}),s.messageType==="reference"&&s.references&&(0,ce.jsx)("div",{className:"mb-2 space-y-1",children:s.references.map(x=>(0,ce.jsxs)("div",{className:"p-2 bg-background/50 rounded-lg",children:[(0,ce.jsx)("p",{className:"text-sm font-medium",children:x.title}),x.description&&(0,ce.jsx)("p",{className:"text-xs opacity-70",children:x.description})]},x.id))}),s.messageType==="menu"&&s.menu&&(0,ce.jsxs)("div",{className:"mb-2",children:[(0,ce.jsx)("p",{className:"text-sm font-medium mb-2",children:s.menu.title}),(0,ce.jsx)("div",{className:"space-y-1",children:s.menu.items.map(x=>(0,ce.jsxs)("button",{onClick:x.action,className:"w-full text-left p-2 bg-background/50 rounded-lg hover:bg-background/70 transition-colors",children:[(0,ce.jsx)("p",{className:"text-sm font-medium",children:x.label}),x.description&&(0,ce.jsx)("p",{className:"text-xs opacity-70",children:x.description})]},x.id))})]}),(0,ce.jsx)("p",{className:"text-sm leading-relaxed",children:m.content}),(0,ce.jsx)("p",{className:"text-xs opacity-70 mt-2",children:m.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]},m.id)})}),c&&k&&(0,ce.jsxs)(Z.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,ce.jsx)(re,{className:"h-8 w-8",children:(0,ce.jsx)(X,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ce.jsx)(S.Bot,{className:"h-4 w-4"})})}),(0,ce.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ce.jsx)(je,{capabilities:i,isOpen:k,onToggle:()=>f(!k),onActionSelect:K,onContextChange:ie,className:"w-full"})})]}),o&&(0,ce.jsxs)(Z.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,ce.jsx)(re,{className:"h-8 w-8",children:(0,ce.jsx)(X,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ce.jsx)(S.Bot,{className:"h-4 w-4"})})}),(0,ce.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ce.jsxs)("div",{className:"flex space-x-1",children:[(0,ce.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,ce.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,ce.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]}),(0,ce.jsx)("div",{ref:C})]})}),v&&v.length>0&&(0,ce.jsx)("div",{className:"border-t p-4 bg-muted/10",children:(0,ce.jsx)("div",{className:"flex flex-wrap gap-2",children:v.map(m=>(0,ce.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[(0,ce.jsx)("span",{className:"text-sm font-medium",children:m.file.name}),(0,ce.jsxs)("span",{className:"text-xs text-muted-foreground",children:[(m.file.size/1024/1024).toFixed(1),"MB"]}),(0,ce.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>P?.(m.id),className:"h-6 w-6 p-0",children:(0,ce.jsx)(S.X,{className:"h-4 w-4"})})]},m.id))})}),(0,ce.jsxs)("div",{className:"border-t p-4 bg-muted/20",children:[(0,ce.jsxs)("div",{className:"flex gap-3",children:[(0,ce.jsx)(be,{value:t,onChange:m=>n(m.target.value),onKeyPress:y,placeholder:r?`Ask me about ${r.name.toLowerCase()}...`:"How can Z help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),R&&(0,ce.jsx)(z,{variant:"outline",size:"icon",onClick:()=>{let m=document.createElement("input");m.type="file",m.multiple=!0,m.onchange=s=>{let x=s.target.files;M?.(x)},m.click()},className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ce.jsx)(S.Paperclip,{className:"h-4 w-4"})}),(0,ce.jsx)(z,{onClick:g,disabled:!t.trim()&&(!v||v.length===0)||o,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ce.jsx)(S.Send,{className:"h-4 w-4"})})]}),c&&(0,ce.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,ce.jsxs)(z,{onClick:()=>f(!k),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,ce.jsx)(S.Menu,{className:"h-3 w-3 mr-1"}),k?"Hide":"Show"," Capabilities"]}),(0,ce.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[_().map((m,s)=>(0,ce.jsx)(z,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>K(m.id,A),children:m.label},`context-${m.id}`)),_().length===0&&Y().map((m,s)=>(0,ce.jsx)(z,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:m.action,children:m.label},`suggestion-${s}`))]})]})]})]})}0&&(module.exports={AIChatInterface});
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- "use client";import{a as E}from"../../chunk-A2AEX4YB.mjs";import{d as B}from"../../chunk-Q2DPE66H.mjs";import{a as A}from"../../chunk-FT3AE7L2.mjs";import{a as k}from"../../chunk-L5JPAKPM.mjs";import{b as n}from"../../chunk-ZUA4KNIR.mjs";import{a as c,c as r}from"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import{a as M}from"../../chunk-YO3GQYRJ.mjs";import{a as u}from"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";import{useRef as U,useEffect as V,useState as I,useCallback as J}from"react";import{motion as g,AnimatePresence as Q}from"framer-motion";import{Send as X,Bot as f,User as q,Menu as G,X as W,Paperclip as Y}from"lucide-react";import{jsx as e,jsxs as i}from"react/jsx-runtime";function de({messages:v,input:b,isTyping:d=!1,selectedTeam:x,currentSessionTitle:Z,capabilities:y,showCapabilities:h=!0,onInputChange:S,onSendMessage:T,onKeyPress:F,fileUploads:l=[],isDragOver:_=!1,enableFileUpload:D=!1,onFileUpload:z,onRemoveFile:O,onDragOver:j,className:P}){let N=U(null),[o,m]=I(!1),[C,$]=I({path:[],selectedItems:[],filters:{}}),L=()=>{N.current?.scrollIntoView({behavior:"smooth"})};V(()=>{L()},[v]);let p=(a,t)=>{console.log("Capability action:",a,t);let s=`Executing ${a} with context: ${JSON.stringify(t.path.map(K=>K.name))}`;m(!1)},R=J(a=>{$(a)},[]),w=()=>B(C),H=()=>{let a=[];return y.forEach(t=>{t.actions&&t.actions.forEach(s=>{a.push({label:s.label,action:()=>p(s.id,{path:[t],selectedItems:[],filters:{}})})}),t.children&&t.children.forEach(s=>{s.type==="list"&&s.data&&a.push({label:`View ${s.name}`,action:()=>m(!0)})})}),a.slice(0,5)};return i(M,{className:`h-full flex flex-col shadow-sm ${P||""}`,children:[e(A,{className:"flex-1 p-4",children:i("div",{className:"space-y-4",children:[e(Q,{children:v.map(a=>{let t=a;return i(g.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:u("flex gap-3",a.type==="user"?"flex-row-reverse":"flex-row"),children:[e(c,{className:"h-8 w-8",children:a.type==="user"?e(r,{children:e(q,{className:"h-4 w-4"})}):e(r,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(f,{className:"h-4 w-4"})})}),i("div",{className:u("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",a.type==="user"?"bg-primary text-primary-foreground":"bg-muted"),children:[t.messageType==="image"&&t.image&&e("div",{className:"mb-2",children:e("img",{src:t.image.url,alt:t.image.alt||"Uploaded image",className:"max-w-full h-auto max-h-48 rounded-lg"})}),t.messageType==="file"&&t.file&&e("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:i("div",{className:"flex items-center gap-2",children:[e("span",{className:"text-sm font-medium",children:t.file.name}),i("span",{className:"text-xs opacity-70",children:[(t.file.size/1024/1024).toFixed(1),"MB"]})]})}),t.messageType==="card"&&t.card&&e("div",{className:"mb-2",children:i("div",{className:"p-3 bg-background/50 rounded-lg",children:[e("h4",{className:"font-medium",children:t.card.title}),t.card.description&&e("p",{className:"text-sm opacity-70 mt-1",children:t.card.description})]})}),t.messageType==="reference"&&t.references&&e("div",{className:"mb-2 space-y-1",children:t.references.map(s=>i("div",{className:"p-2 bg-background/50 rounded-lg",children:[e("p",{className:"text-sm font-medium",children:s.title}),s.description&&e("p",{className:"text-xs opacity-70",children:s.description})]},s.id))}),t.messageType==="menu"&&t.menu&&i("div",{className:"mb-2",children:[e("p",{className:"text-sm font-medium mb-2",children:t.menu.title}),e("div",{className:"space-y-1",children:t.menu.items.map(s=>i("button",{onClick:s.action,className:"w-full text-left p-2 bg-background/50 rounded-lg hover:bg-background/70 transition-colors",children:[e("p",{className:"text-sm font-medium",children:s.label}),s.description&&e("p",{className:"text-xs opacity-70",children:s.description})]},s.id))})]}),e("p",{className:"text-sm leading-relaxed",children:a.content}),e("p",{className:"text-xs opacity-70 mt-2",children:a.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]},a.id)})}),h&&o&&i(g.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[e(c,{className:"h-8 w-8",children:e(r,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(f,{className:"h-4 w-4"})})}),e("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:e(E,{capabilities:y,isOpen:o,onToggle:()=>m(!o),onActionSelect:p,onContextChange:R,className:"w-full"})})]}),d&&i(g.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[e(c,{className:"h-8 w-8",children:e(r,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:e(f,{className:"h-4 w-4"})})}),e("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:i("div",{className:"flex space-x-1",children:[e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),e("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]}),e("div",{ref:N})]})}),l&&l.length>0&&e("div",{className:"border-t p-4 bg-muted/10",children:e("div",{className:"flex flex-wrap gap-2",children:l.map(a=>i("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[e("span",{className:"text-sm font-medium",children:a.file.name}),i("span",{className:"text-xs text-muted-foreground",children:[(a.file.size/1024/1024).toFixed(1),"MB"]}),e(n,{variant:"ghost",size:"sm",onClick:()=>O?.(a.id),className:"h-6 w-6 p-0",children:e(W,{className:"h-4 w-4"})})]},a.id))})}),i("div",{className:"border-t p-4 bg-muted/20",children:[i("div",{className:"flex gap-3",children:[e(k,{value:b,onChange:a=>S(a.target.value),onKeyPress:F,placeholder:x?`Ask me about ${x.name.toLowerCase()}...`:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:d}),D&&e(n,{variant:"outline",size:"icon",onClick:()=>{let a=document.createElement("input");a.type="file",a.multiple=!0,a.onchange=t=>{let s=t.target.files;z?.(s)},a.click()},className:"rounded-2xl h-10 w-10 shadow-sm",children:e(Y,{className:"h-4 w-4"})}),e(n,{onClick:T,disabled:!b.trim()&&(!l||l.length===0)||d,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:e(X,{className:"h-4 w-4"})})]}),h&&i("div",{className:"flex items-center gap-3 mt-3",children:[i(n,{onClick:()=>m(!o),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[e(G,{className:"h-3 w-3 mr-1"}),o?"Hide":"Show"," Capabilities"]}),i("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[w().map((a,t)=>e(n,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>p(a.id,C),children:a.label},`context-${a.id}`)),w().length===0&&H().map((a,t)=>e(n,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:a.action,children:a.label},`suggestion-${t}`))]})]})]})]})}export{de as AIChatInterface};