cortex-react-components 1.43.4 → 1.43.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 (298) hide show
  1. package/dist/{chunk-423OEU3K.mjs → chunk-23EQTK7B.mjs} +1 -1
  2. package/dist/{chunk-Q77U5BXI.mjs → chunk-2HSNFTRZ.mjs} +1 -1
  3. package/dist/{chunk-DE2DIWCC.mjs → chunk-2MC5DSC7.mjs} +1 -1
  4. package/dist/{chunk-763KMQIQ.mjs → chunk-2NFKSNJW.mjs} +1 -1
  5. package/dist/{chunk-UDX5Y4SA.mjs → chunk-3KMFY6E7.mjs} +1 -1
  6. package/dist/chunk-3TYE4Q6H.mjs +4 -0
  7. package/dist/{chunk-QIGWPB3D.mjs → chunk-3VWFINCO.mjs} +1 -1
  8. package/dist/{chunk-NWW7KWJK.mjs → chunk-44VMK4FL.mjs} +1 -1
  9. package/dist/{chunk-YDGF5GEU.mjs → chunk-4ZT572BM.mjs} +1 -1
  10. package/dist/{chunk-SJWGFZJ6.mjs → chunk-5IQPAE6K.mjs} +1 -1
  11. package/dist/{chunk-NLTSDI7A.mjs → chunk-5WADH365.mjs} +1 -1
  12. package/dist/{chunk-D43ENVPX.mjs → chunk-5YTDIEDJ.mjs} +1 -1
  13. package/dist/{chunk-V7LBBZKS.mjs → chunk-6LKCK2EH.mjs} +1 -1
  14. package/dist/{chunk-QJ7Q24VU.mjs → chunk-6UE4E5PP.mjs} +1 -1
  15. package/dist/{chunk-3PC5BLK7.mjs → chunk-72Z4T7BT.mjs} +1 -1
  16. package/dist/{chunk-EMZQNDA7.mjs → chunk-AAI2VZST.mjs} +1 -1
  17. package/dist/{chunk-MP3J7UPZ.mjs → chunk-AN4F3ML3.mjs} +1 -1
  18. package/dist/chunk-BDX257W2.mjs +1 -0
  19. package/dist/{chunk-SHN4XZWD.mjs → chunk-BOZT7Z5K.mjs} +1 -1
  20. package/dist/{chunk-R7P4VVM3.mjs → chunk-BQED2B7G.mjs} +1 -1
  21. package/dist/chunk-BRYZOZKY.mjs +1 -0
  22. package/dist/{chunk-WDREYBFE.mjs → chunk-CAVA4IHF.mjs} +1 -1
  23. package/dist/{chunk-PXVYSZBQ.mjs → chunk-DBWBX2VF.mjs} +1 -1
  24. package/dist/{chunk-GFV75XSU.mjs → chunk-EQDX6HFN.mjs} +1 -1
  25. package/dist/chunk-FBUZ37DL.mjs +1 -0
  26. package/dist/{chunk-J2VQUYES.mjs → chunk-FI4SMRAR.mjs} +1 -1
  27. package/dist/{chunk-7322R3ID.mjs → chunk-HAW2ALWX.mjs} +1 -1
  28. package/dist/{chunk-74TGU5CZ.mjs → chunk-J37HGKWS.mjs} +1 -1
  29. package/dist/{chunk-TQCGX4Y6.mjs → chunk-KDGEXDC5.mjs} +1 -1
  30. package/dist/{chunk-IE2A7UT3.mjs → chunk-KEUZSK3N.mjs} +1 -1
  31. package/dist/{chunk-6ZNVXWZR.mjs → chunk-KJ2C7CBU.mjs} +1 -1
  32. package/dist/{chunk-M7BWRL34.mjs → chunk-KM65VWDA.mjs} +1 -1
  33. package/dist/{chunk-D3PXELYK.mjs → chunk-KPZUZ7DO.mjs} +1 -1
  34. package/dist/{chunk-DF3LBG6O.mjs → chunk-LAOUTV76.mjs} +1 -1
  35. package/dist/{chunk-PV5S3GA7.mjs → chunk-LDOZCKP6.mjs} +1 -1
  36. package/dist/chunk-LRLTMHGN.mjs +1 -0
  37. package/dist/{chunk-66ZAIUUI.mjs → chunk-M6M43TLT.mjs} +1 -1
  38. package/dist/{chunk-UO2QAXEA.mjs → chunk-MNDA6BQL.mjs} +1 -1
  39. package/dist/{chunk-ICTOXY7D.mjs → chunk-NGK3IDFP.mjs} +1 -1
  40. package/dist/{chunk-FYMNYQNR.mjs → chunk-NLFCSX3M.mjs} +1 -1
  41. package/dist/{chunk-32GGKWGB.mjs → chunk-NRL4U42W.mjs} +1 -1
  42. package/dist/{chunk-SBHCQ2HK.mjs → chunk-OKGREBP5.mjs} +1 -1
  43. package/dist/{chunk-LQ3E34A2.mjs → chunk-ONVUVE2F.mjs} +1 -1
  44. package/dist/{chunk-3FW5YDNM.mjs → chunk-OWBJTXZL.mjs} +1 -1
  45. package/dist/{chunk-UK4IPFAO.mjs → chunk-PVRWMAHW.mjs} +1 -1
  46. package/dist/{chunk-AF5ISZTG.mjs → chunk-QDBKDH64.mjs} +1 -1
  47. package/dist/{chunk-YQZH5MJU.mjs → chunk-ROPMTH4T.mjs} +1 -1
  48. package/dist/{chunk-YOOGQIDR.mjs → chunk-RSQQ66AX.mjs} +1 -1
  49. package/dist/{chunk-HVA2GFDG.mjs → chunk-RULBAYMF.mjs} +1 -1
  50. package/dist/{chunk-T6LPMF7A.mjs → chunk-S23ICHCQ.mjs} +1 -1
  51. package/dist/chunk-TLBLUYXL.mjs +1 -0
  52. package/dist/chunk-TTN4NUDL.mjs +1 -0
  53. package/dist/{chunk-MANZDSTF.mjs → chunk-UD7JYMRU.mjs} +1 -1
  54. package/dist/{chunk-EI7PFWFS.mjs → chunk-UMILL4LR.mjs} +1 -1
  55. package/dist/{chunk-XGQLOPHW.mjs → chunk-VW33NKNZ.mjs} +1 -1
  56. package/dist/{chunk-Q5EQOIL7.mjs → chunk-WT4YO3SF.mjs} +1 -1
  57. package/dist/{chunk-HUN2X4VH.mjs → chunk-Y6CZVVJF.mjs} +1 -1
  58. package/dist/chunk-YNC77MO4.mjs +1 -0
  59. package/dist/{chunk-LHMC3BKX.mjs → chunk-Z2CY2BLM.mjs} +1 -1
  60. package/dist/components/Blocks/Banner.js +1 -1
  61. package/dist/components/Blocks/Banner.mjs +1 -1
  62. package/dist/components/Blocks/CallToAction.js +1 -1
  63. package/dist/components/Blocks/CallToAction.mjs +1 -1
  64. package/dist/components/Blocks/Code.client.js +1 -1
  65. package/dist/components/Blocks/Code.client.mjs +1 -1
  66. package/dist/components/Blocks/Code.js +1 -1
  67. package/dist/components/Blocks/Code.mjs +1 -1
  68. package/dist/components/Blocks/Content.js +1 -1
  69. package/dist/components/Blocks/Content.mjs +1 -1
  70. package/dist/components/Blocks/CopyButton.js +1 -1
  71. package/dist/components/Blocks/CopyButton.mjs +1 -1
  72. package/dist/components/Blocks/FeaturesBlock.js +1 -1
  73. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  74. package/dist/components/Blocks/FeaturesBlock.stories.js +1 -1
  75. package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
  76. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  77. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  78. package/dist/components/Blocks/RelatedPosts.js +1 -1
  79. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  80. package/dist/components/Blocks/RenderBlocks.js +1 -1
  81. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  82. package/dist/components/Blocks/index.js +1 -1
  83. package/dist/components/Blocks/index.mjs +1 -1
  84. package/dist/components/CRM/DealCard.d.ts +2 -2
  85. package/dist/components/CRM/DealCard.js +1 -1
  86. package/dist/components/CRM/DealCard.mjs +1 -1
  87. package/dist/components/CRM/DealCard.stories.js +1 -1
  88. package/dist/components/CRM/DealCard.stories.mjs +1 -1
  89. package/dist/components/CRM/DealDetails.d.ts +5 -5
  90. package/dist/components/CRM/DealDetails.js +1 -1
  91. package/dist/components/CRM/DealDetails.mjs +1 -1
  92. package/dist/components/CRM/DealDetails.stories.js +1 -1
  93. package/dist/components/CRM/DealDetails.stories.mjs +1 -1
  94. package/dist/components/CRM/KanbanBoard.d.ts +3 -3
  95. package/dist/components/CRM/KanbanBoard.js +1 -1
  96. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  97. package/dist/components/CRM/KanbanBoard.stories.js +1 -1
  98. package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
  99. package/dist/components/CRM/KanbanColumn.d.ts +4 -4
  100. package/dist/components/CRM/KanbanColumn.js +1 -1
  101. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  102. package/dist/components/CRM/KanbanColumn.stories.js +1 -1
  103. package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
  104. package/dist/components/CRM/NewCustomerForm.js +1 -1
  105. package/dist/components/CRM/NewCustomerForm.mjs +1 -1
  106. package/dist/components/CRM/NewCustomerForm.stories.js +1 -1
  107. package/dist/components/CRM/NewCustomerForm.stories.mjs +1 -1
  108. package/dist/components/CRM/NewDealForm.d.ts +4 -4
  109. package/dist/components/CRM/NewDealForm.js +1 -1
  110. package/dist/components/CRM/NewDealForm.mjs +1 -1
  111. package/dist/components/CRM/NewDealForm.stories.js +1 -1
  112. package/dist/components/CRM/NewDealForm.stories.mjs +1 -1
  113. package/dist/components/CRM/index.js +1 -1
  114. package/dist/components/CRM/index.mjs +1 -1
  115. package/dist/components/CRM/mockData.d.ts +4 -5
  116. package/dist/components/CRM/mockData.js +1 -1
  117. package/dist/components/CRM/mockData.mjs +1 -1
  118. package/dist/components/CRM/types.d.ts +10 -29
  119. package/dist/components/CRM/types.js +1 -1
  120. package/dist/components/Cards/PricingCard.js +1 -1
  121. package/dist/components/Cards/PricingCard.mjs +1 -1
  122. package/dist/components/Cards/PricingCard.stories.js +1 -1
  123. package/dist/components/Cards/PricingCard.stories.mjs +1 -1
  124. package/dist/components/Cards/ServiceCard.js +1 -1
  125. package/dist/components/Cards/ServiceCard.mjs +1 -1
  126. package/dist/components/Cards/ServiceCard.stories.js +1 -1
  127. package/dist/components/Cards/ServiceCard.stories.mjs +1 -1
  128. package/dist/components/Cards/index.js +2 -2
  129. package/dist/components/Cards/index.mjs +1 -1
  130. package/dist/components/HeaderFooter/SectionHeading.js +1 -1
  131. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  132. package/dist/components/HeaderFooter/index.mjs +1 -1
  133. package/dist/components/Heros/HighImpact/index.js +1 -1
  134. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  135. package/dist/components/Heros/LowImpact/index.js +1 -1
  136. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  137. package/dist/components/Heros/MediumImpact/index.js +1 -1
  138. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  139. package/dist/components/Heros/PostHero/index.mjs +1 -1
  140. package/dist/components/Heros/RenderHero.js +1 -1
  141. package/dist/components/Heros/RenderHero.mjs +1 -1
  142. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  143. package/dist/components/Heros/index.js +1 -1
  144. package/dist/components/Heros/index.mjs +1 -1
  145. package/dist/components/Holidays/ApproveLeave.js +1 -1
  146. package/dist/components/Holidays/ApproveLeave.mjs +1 -1
  147. package/dist/components/Holidays/ApproveLeave.stories.js +1 -1
  148. package/dist/components/Holidays/ApproveLeave.stories.mjs +1 -1
  149. package/dist/components/Holidays/CalendarView.js +1 -1
  150. package/dist/components/Holidays/CalendarView.mjs +1 -1
  151. package/dist/components/Holidays/CalendarView.stories.js +1 -1
  152. package/dist/components/Holidays/CalendarView.stories.mjs +1 -1
  153. package/dist/components/Holidays/HolidayGrid.js +1 -1
  154. package/dist/components/Holidays/HolidayGrid.mjs +1 -1
  155. package/dist/components/Holidays/HolidayGrid.stories.js +1 -1
  156. package/dist/components/Holidays/HolidayGrid.stories.mjs +1 -1
  157. package/dist/components/Holidays/HolidayTracker.js +1 -1
  158. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  159. package/dist/components/Holidays/HolidayTracker.stories.js +1 -1
  160. package/dist/components/Holidays/HolidayTracker.stories.mjs +1 -1
  161. package/dist/components/Holidays/RequestLeave.js +1 -1
  162. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  163. package/dist/components/Holidays/RequestLeave.stories.js +1 -1
  164. package/dist/components/Holidays/RequestLeave.stories.mjs +1 -1
  165. package/dist/components/Holidays/index.js +1 -1
  166. package/dist/components/Holidays/index.mjs +1 -1
  167. package/dist/components/Layouts/BlogList.js +1 -1
  168. package/dist/components/Layouts/BlogList.mjs +1 -1
  169. package/dist/components/Layouts/BlogList.stories.js +1 -1
  170. package/dist/components/Layouts/BlogList.stories.mjs +1 -1
  171. package/dist/components/Layouts/SlideShow.js +1 -1
  172. package/dist/components/Layouts/SlideShow.mjs +1 -1
  173. package/dist/components/Layouts/SlideShow.stories.js +1 -1
  174. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  175. package/dist/components/Layouts/index.js +1 -1
  176. package/dist/components/Layouts/index.mjs +1 -1
  177. package/dist/components/Menus/Filter.js +1 -1
  178. package/dist/components/Menus/Filter.mjs +1 -1
  179. package/dist/components/Menus/Filter.stories.js +1 -1
  180. package/dist/components/Menus/Filter.stories.mjs +1 -1
  181. package/dist/components/Menus/SidebarLeft.js +1 -1
  182. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  183. package/dist/components/Menus/SidebarLeft.stories.js +1 -1
  184. package/dist/components/Menus/SidebarLeft.stories.mjs +1 -1
  185. package/dist/components/Menus/SidebarRight.js +1 -1
  186. package/dist/components/Menus/SidebarRight.mjs +1 -1
  187. package/dist/components/Menus/SidebarRight.stories.js +1 -1
  188. package/dist/components/Menus/SidebarRight.stories.mjs +1 -1
  189. package/dist/components/Menus/index.js +1 -1
  190. package/dist/components/Menus/index.mjs +1 -1
  191. package/dist/components/Payload/Card/index.mjs +1 -1
  192. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  193. package/dist/components/Payload/Link/index.js +1 -1
  194. package/dist/components/Payload/Link/index.mjs +1 -1
  195. package/dist/components/Payload/Media/index.mjs +1 -1
  196. package/dist/components/Payload/Pagination/index.js +1 -1
  197. package/dist/components/Payload/Pagination/index.mjs +1 -1
  198. package/dist/components/Payload/RichText/index.js +1 -1
  199. package/dist/components/Payload/RichText/index.mjs +1 -1
  200. package/dist/components/Payload/RichText/serialize.js +1 -1
  201. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  202. package/dist/components/Payload/RichText.stories.js +1 -1
  203. package/dist/components/Payload/RichText.stories.mjs +1 -1
  204. package/dist/components/Payload/index.js +1 -1
  205. package/dist/components/Payload/index.mjs +1 -1
  206. package/dist/components/index.js +4 -4
  207. package/dist/components/index.mjs +1 -1
  208. package/dist/components/ui/button.js +1 -1
  209. package/dist/components/ui/button.mjs +1 -1
  210. package/dist/components/ui/button.stories.js +1 -1
  211. package/dist/components/ui/button.stories.mjs +1 -1
  212. package/dist/components/ui/calendar.js +1 -1
  213. package/dist/components/ui/calendar.mjs +1 -1
  214. package/dist/components/ui/index.js +1 -1
  215. package/dist/components/ui/index.mjs +1 -1
  216. package/dist/components/ui/pagination.js +1 -1
  217. package/dist/components/ui/pagination.mjs +1 -1
  218. package/dist/components/ui/sidebar.js +1 -1
  219. package/dist/components/ui/sidebar.mjs +1 -1
  220. package/dist/globals.css +1 -1
  221. package/dist/index.js +6 -6
  222. package/dist/index.mjs +1 -1
  223. package/dist/metafile-cjs.json +1 -1
  224. package/dist/metafile-esm.json +1 -1
  225. package/dist/pages/Blog.js +1 -1
  226. package/dist/pages/Blog.mjs +1 -1
  227. package/dist/pages/Blog.stories.js +1 -1
  228. package/dist/pages/Blog.stories.mjs +1 -1
  229. package/dist/pages/Documentation.js +1 -1
  230. package/dist/pages/Documentation.mjs +1 -1
  231. package/dist/pages/Documentation.stories.js +1 -1
  232. package/dist/pages/Documentation.stories.mjs +1 -1
  233. package/dist/pages/IndexPage.js +1 -1
  234. package/dist/pages/IndexPage.mjs +1 -1
  235. package/dist/pages/IndexPage.stories.js +67 -67
  236. package/dist/pages/IndexPage.stories.mjs +1 -1
  237. package/dist/pages/Intranet.mjs +1 -1
  238. package/dist/pages/Intranet.stories.mjs +1 -1
  239. package/dist/pages/LandingPage.js +1 -1
  240. package/dist/pages/LandingPage.mjs +1 -1
  241. package/dist/pages/LandingPage.stories.js +1 -1
  242. package/dist/pages/LandingPage.stories.mjs +1 -1
  243. package/dist/pages/Page.js +1 -1
  244. package/dist/pages/Page.mjs +1 -1
  245. package/dist/pages/Page.stories.js +1 -1
  246. package/dist/pages/Page.stories.mjs +1 -1
  247. package/dist/pages/Publish.js +1 -1
  248. package/dist/pages/Publish.mjs +1 -1
  249. package/dist/pages/Publish.stories.js +1 -1
  250. package/dist/pages/Publish.stories.mjs +1 -1
  251. package/dist/pages/Website.js +1 -1
  252. package/dist/pages/Website.mjs +1 -1
  253. package/dist/pages/Website.stories.js +1 -1
  254. package/dist/pages/Website.stories.mjs +1 -1
  255. package/dist/payload-types.d.ts +150 -6
  256. package/dist/sections/AboutSection.js +1 -1
  257. package/dist/sections/AboutSection.mjs +1 -1
  258. package/dist/sections/AboutSection.stories.js +1 -1
  259. package/dist/sections/AboutSection.stories.mjs +1 -1
  260. package/dist/sections/BlogDetail.js +1 -1
  261. package/dist/sections/BlogDetail.mjs +1 -1
  262. package/dist/sections/BlogDetail.stories.js +1 -1
  263. package/dist/sections/BlogDetail.stories.mjs +1 -1
  264. package/dist/sections/BlogListSection.js +1 -1
  265. package/dist/sections/BlogListSection.mjs +1 -1
  266. package/dist/sections/BlogListSection.stories.js +1 -1
  267. package/dist/sections/BlogListSection.stories.mjs +1 -1
  268. package/dist/sections/ContactSection.js +1 -1
  269. package/dist/sections/ContactSection.mjs +1 -1
  270. package/dist/sections/ContactSection.stories.js +1 -1
  271. package/dist/sections/ContactSection.stories.mjs +1 -1
  272. package/dist/sections/MainPageSection.js +1 -1
  273. package/dist/sections/MainPageSection.mjs +1 -1
  274. package/dist/sections/PricingSection.js +1 -1
  275. package/dist/sections/PricingSection.mjs +1 -1
  276. package/dist/sections/PricingSection.stories.js +1 -1
  277. package/dist/sections/PricingSection.stories.mjs +1 -1
  278. package/dist/sections/ServiceSection.js +1 -1
  279. package/dist/sections/ServiceSection.mjs +1 -1
  280. package/dist/sections/ServiceSection.stories.js +1 -1
  281. package/dist/sections/ServiceSection.stories.mjs +1 -1
  282. package/dist/sections/form/index.js +1 -1
  283. package/dist/sections/form/index.mjs +1 -1
  284. package/dist/sections/index.js +1 -1
  285. package/dist/sections/index.mjs +1 -1
  286. package/dist/styles/Colors.js +1 -1
  287. package/dist/styles/Colors.mjs +1 -1
  288. package/dist/styles/Colors.stories.js +1 -1
  289. package/dist/styles/Colors.stories.mjs +1 -1
  290. package/package.json +1 -1
  291. package/dist/chunk-27GMB7QZ.mjs +0 -1
  292. package/dist/chunk-AHLX3GTH.mjs +0 -1
  293. package/dist/chunk-GLEWUUGS.mjs +0 -1
  294. package/dist/chunk-IV6YI3IO.mjs +0 -4
  295. package/dist/chunk-NN6YNXCJ.mjs +0 -1
  296. package/dist/chunk-NYMWV2AX.mjs +0 -1
  297. package/dist/chunk-QH3BNFVD.mjs +0 -1
  298. package/dist/chunk-YMAMQQ3Z.mjs +0 -1
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-IV6YI3IO.mjs";import"../../chunk-NYMWV2AX.mjs";import"../../chunk-NN6YNXCJ.mjs";import"../../chunk-27GMB7QZ.mjs";import"../../chunk-3FW5YDNM.mjs";import"../../chunk-QH3BNFVD.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as CRMKanbanBoard};
2
+ "use strict";import{a}from"../../chunk-3TYE4Q6H.mjs";import"../../chunk-FBUZ37DL.mjs";import"../../chunk-YNC77MO4.mjs";import"../../chunk-TTN4NUDL.mjs";import"../../chunk-OWBJTXZL.mjs";import"../../chunk-BRYZOZKY.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-BDX257W2.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as CRMKanbanBoard};
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  'use client'
4
4
 
5
- "use strict";var Ot=Object.create;var De=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var _t=Object.getOwnPropertyNames;var jt=Object.getPrototypeOf,Kt=Object.prototype.hasOwnProperty;var Jt=(e,t)=>{for(var o in t)De(e,o,{get:t[o],enumerable:!0})},Ze=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of _t(t))!Kt.call(e,n)&&n!==o&&De(e,n,{get:()=>t[n],enumerable:!(a=Ut(t,n))||a.enumerable});return e};var B=(e,t,o)=>(o=e!=null?Ot(jt(e)):{},Ze(t||!e||!e.__esModule?De(o,"default",{value:e,enumerable:!0}):o,e)),$t=e=>Ze(De({},"__esModule",{value:!0}),e);var Wo={};Jt(Wo,{Default:()=>Be,NoDeals:()=>Wt,default:()=>Fo});module.exports=$t(Wo);var Vt=require("react");var we=B(require("react")),T=B(require("@radix-ui/react-dialog")),nt=require("lucide-react");var st=require("clsx");var Fe="-",qt=e=>{let t=Zt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{let r=c.split(Fe);return r[0]===""&&r.length!==1&&r.shift(),et(r,t)||Qt(c)},getConflictingClassGroupIds:(c,r)=>{let f=o[c]||[];return r&&a[c]?[...f,...a[c]]:f}}},et=(e,t)=>{var c;if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),n=a?et(e.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;let i=e.join(Fe);return(c=t.validators.find(({validator:r})=>r(i)))==null?void 0:c.classGroupId},Xe=/^\[(.+)\]$/,Qt=e=>{if(Xe.test(e)){let t=Xe.exec(e)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Zt=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return Yt(Object.entries(e.classGroups),o).forEach(([i,c])=>{Ve(c,a,i,t)}),a},Ve=(e,t,o,a)=>{e.forEach(n=>{if(typeof n=="string"){let i=n===""?t:Ye(t,n);i.classGroupId=o;return}if(typeof n=="function"){if(Xt(n)){Ve(n(a),t,o,a);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([i,c])=>{Ve(c,Ye(t,i),o,a)})})},Ye=(e,t)=>{let o=e;return t.split(Fe).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},Xt=e=>e.isThemeGetter,Yt=(e,t)=>t?e.map(([o,a])=>{let n=a.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([c,r])=>[t+c,r])):i);return[o,n]}):e,eo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,n=(i,c)=>{o.set(i,c),t++,t>e&&(t=0,a=o,o=new Map)};return{get(i){let c=o.get(i);if(c!==void 0)return c;if((c=a.get(i))!==void 0)return n(i,c),c},set(i,c){o.has(i)?o.set(i,c):n(i,c)}}},tt="!",to=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,n=t[0],i=t.length,c=r=>{let f=[],w=0,S=0,p;for(let v=0;v<r.length;v++){let R=r[v];if(w===0){if(R===n&&(a||r.slice(v,v+i)===t)){f.push(r.slice(S,v)),S=v+i;continue}if(R==="/"){p=v;continue}}R==="["?w++:R==="]"&&w--}let y=f.length===0?r:r.substring(S),b=y.startsWith(tt),x=b?y.substring(1):y,C=p&&p>S?p-S:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:C}};return o?r=>o({className:r,parseClassName:c}):c},oo=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},ro=e=>({cache:eo(e.cacheSize),parseClassName:to(e),...qt(e)}),ao=/\z+/,io=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:n}=t,i=[],c=e.trim().split(ao),r="";for(let f=c.length-1;f>=0;f-=1){let w=c[f],{modifiers:S,hasImportantModifier:p,baseClassName:y,maybePostfixModifierPosition:b}=o(w),x=!!b,C=a(x?y.substring(0,b):y);if(!C){if(!x){r=w+(r.length>0?" "+r:r);continue}if(C=a(y),!C){r=w+(r.length>0?" "+r:r);continue}x=!1}let v=oo(S).join(":"),R=p?v+tt:v,E=R+C;if(i.includes(E))continue;i.push(E);let W=n(C,x);for(let G=0;G<W.length;++G){let m=W[G];i.push(R+m)}r=w+(r.length>0?" "+r:r)}return r};function so(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=ot(t))&&(a&&(a+=" "),a+=o);return a}var ot=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=ot(e[a]))&&(o&&(o+=" "),o+=t);return o};function no(e,...t){let o,a,n,i=c;function c(f){let w=t.reduce((S,p)=>p(S),e());return o=ro(w),a=o.cache.get,n=o.cache.set,i=r,r(f)}function r(f){let w=a(f);if(w)return w;let S=io(f,o);return n(f,S),S}return function(){return i(so.apply(null,arguments))}}var P=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},rt=/^\[(?:([a-z-]+):)?(.+)\]$/i,lo=/^\z+\/\z+$/,co=new Set(["px","full","screen"]),mo=/^(\z+(\.\z+)?)?(xs|sm|md|lg|xl)$/,po=/\z+(%|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$/,uo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,go=/^(inset_)?-?((\z+)?\.?(\z+)[a-z]+|0)_-?((\z+)?\.?(\z+)[a-z]+|0)/,fo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,J=e=>pe(e)||co.has(e)||lo.test(e),$=e=>ue(e,"length",So),pe=e=>!!e&&!Number.isNaN(Number(e)),He=e=>ue(e,"number",pe),xe=e=>!!e&&Number.isInteger(Number(e)),bo=e=>e.endsWith("%")&&pe(e.slice(0,-1)),u=e=>rt.test(e),q=e=>mo.test(e),vo=new Set(["length","size","percentage"]),ho=e=>ue(e,vo,at),yo=e=>ue(e,"position",at),xo=new Set(["image","url"]),Co=e=>ue(e,xo,Ro),wo=e=>ue(e,"",No),Ce=()=>!0,ue=(e,t,o)=>{let a=rt.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},So=e=>po.test(e)&&!uo.test(e),at=()=>!1,No=e=>go.test(e),Ro=e=>fo.test(e);var Do=()=>{let e=P("colors"),t=P("spacing"),o=P("blur"),a=P("brightness"),n=P("borderColor"),i=P("borderRadius"),c=P("borderSpacing"),r=P("borderWidth"),f=P("contrast"),w=P("grayscale"),S=P("hueRotate"),p=P("invert"),y=P("gap"),b=P("gradientColorStops"),x=P("gradientColorStopPositions"),C=P("inset"),v=P("margin"),R=P("opacity"),E=P("padding"),W=P("saturate"),G=P("scale"),m=P("sepia"),D=P("skew"),O=P("space"),l=P("translate"),k=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],me=()=>["auto",u,t],N=()=>[u,t],Je=()=>["",J,$],Ne=()=>["auto",pe,u],$e=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Re=()=>["solid","dashed","dotted","double","none"],qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ze=()=>["start","end","center","between","around","evenly","stretch"],ye=()=>["","0",u],Qe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[pe,u];return{cacheSize:500,separator:":",theme:{colors:[Ce],spacing:[J,$],blur:["none","",q,u],brightness:K(),borderColor:[e],borderRadius:["none","","full",q,u],borderSpacing:N(),borderWidth:Je(),contrast:K(),grayscale:ye(),hueRotate:K(),invert:ye(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[bo,$],inset:me(),margin:me(),opacity:K(),padding:N(),saturate:K(),scale:K(),sepia:ye(),skew:K(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",u]}],container:["container"],columns:[{columns:[q]}],"break-after":[{"break-after":Qe()}],"break-before":[{"break-before":Qe()}],"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:[...$e(),u]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",xe,u]}],basis:[{basis:me()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",u]}],grow:[{grow:ye()}],shrink:[{shrink:ye()}],order:[{order:["first","last","none",xe,u]}],"grid-cols":[{"grid-cols":[Ce]}],"col-start-end":[{col:["auto",{span:["full",xe,u]},u]}],"col-start":[{"col-start":Ne()}],"col-end":[{"col-end":Ne()}],"grid-rows":[{"grid-rows":[Ce]}],"row-start-end":[{row:["auto",{span:[xe,u]},u]}],"row-start":[{"row-start":Ne()}],"row-end":[{"row-end":Ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",u]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",u]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...ze()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ze(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ze(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",u,t]}],"min-w":[{"min-w":[u,t,"min","max","fit"]}],"max-w":[{"max-w":[u,t,"none","full","min","max","fit","prose",{screen:[q]},q]}],h:[{h:[u,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[u,t,"auto","min","max","fit"]}],"font-size":[{text:["base",q,$]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",He]}],"font-family":[{font:[Ce]}],"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",u]}],"line-clamp":[{"line-clamp":["none",pe,He]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",J,u]}],"list-image":[{"list-image":["none",u]}],"list-style-type":[{list:["none","disc","decimal",u]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",J,$]}],"underline-offset":[{"underline-offset":["auto",J,u]}],"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:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u]}],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",u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$e(),yo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ho]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Co]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[i]}],"rounded-z":[{"rounded-z":[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:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-y":[{"border-y":[r]}],"border-w-z":[{"border-z":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...Re(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:Re()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-z":[{"border-z":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...Re()]}],"outline-offset":[{"outline-offset":[J,u]}],"outline-w":[{outline:[J,$]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Je()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[J,$]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",q,wo]}],"shadow-color":[{shadow:[Ce]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...qe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":qe()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",q,u]}],grayscale:[{grayscale:[w]}],"hue-rotate":[{"hue-rotate":[S]}],invert:[{invert:[p]}],saturate:[{saturate:[W]}],sepia:[{sepia:[m]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[w]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[S]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[W]}],"backdrop-sepia":[{"backdrop-sepia":[m]}],"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",u]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",u]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",u]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[G]}],"scale-x":[{"scale-x":[G]}],"scale-y":[{"scale-y":[G]}],rotate:[{rotate:[xe,u]}],"translate-x":[{"translate-x":[l]}],"translate-y":[{"translate-y":[l]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",u]}],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","z-resize","w-resize","Vt-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",u]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",u]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[J,$,He]}],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-z","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-z":["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-z","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-z","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 it=no(Do);function g(...e){return it((0,st.clsx)(e))}var z=require("react/jsx-runtime"),ge=T.Root,lt=T.Trigger,Po=T.Portal;var ct=we.forwardRef(({className:e,...t},o)=>(0,z.jsx)(T.Overlay,{ref:o,className:g("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ct.displayName=T.Overlay.displayName;var X=we.forwardRef(({className:e,children:t,...o},a)=>(0,z.jsxs)(Po,{children:[(0,z.jsx)(ct,{}),(0,z.jsxs)(T.Content,{ref:a,className:g("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,z.jsxs)(T.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,z.jsx)(nt.X,{className:"h-4 w-4"}),(0,z.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));X.displayName=T.Content.displayName;var Y=({className:e,...t})=>(0,z.jsx)("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Y.displayName="DialogHeader";var ko=({className:e,...t})=>(0,z.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ko.displayName="DialogFooter";var ee=we.forwardRef(({className:e,...t},o)=>(0,z.jsx)(T.Title,{ref:o,className:g("text-lg font-semibold leading-none tracking-tight",e),...t}));ee.displayName=T.Title.displayName;var Ao=we.forwardRef(({className:e,...t},o)=>(0,z.jsx)(T.Description,{ref:o,className:g("text-sm text-muted-foreground",e),...t}));Ao.displayName=T.Description.displayName;var dt=require("@radix-ui/react-slot"),mt=require("class-variance-authority"),pt=B(require("react")),Mo=(0,mt.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-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),H=pt.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...n},i)=>(0,z.jsx)(e?dt.Slot:"button",{className:g(Mo({className:t,size:o,variant:a})),ref:i,...n}));H.displayName="Button";var gt=B(require("react"));var _=gt.forwardRef(({className:e,type:t,...o},a)=>(0,z.jsx)("input",{type:t,className:g("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:a,...o}));_.displayName="Input";var bt=B(require("react")),We=B(require("@radix-ui/react-label"));var To=(0,mt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),L=bt.forwardRef(({className:e,...t},o)=>(0,z.jsx)(We.Root,{ref:o,className:g(To(),e),...t}));L.displayName=We.Root.displayName;var yt=B(require("react")),te=yt.forwardRef(({className:e,...t},o)=>(0,z.jsx)("textarea",{className:g("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));te.displayName="Textarea";var h=B(require("@radix-ui/react-select")),Q=B(require("react")),fe=h.Root;var be=h.Value,re=Q.forwardRef(({children:e,className:t,...o},a)=>(0,z.jsxs)(h.Trigger,{className:g("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:a,...o,children:[e,(0,z.jsx)(h.Icon,{asChild:!0,children:(0,z.jsx)(nt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));re.displayName=h.Trigger.displayName;var Ct=Q.forwardRef(({className:e,...t},o)=>(0,z.jsx)(h.ScrollUpButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,z.jsx)(nt.ChevronUp,{className:"h-4 w-4"})}));Ct.displayName=h.ScrollUpButton.displayName;var wt=Q.forwardRef(({className:e,...t},o)=>(0,z.jsx)(h.ScrollDownButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,z.jsx)(nt.ChevronDown,{className:"h-4 w-4"})}));wt.displayName=h.ScrollDownButton.displayName;var ae=Q.forwardRef(({children:e,className:t,position:o="popper",...a},n)=>(0,z.jsx)(h.Portal,{children:(0,z.jsxs)(h.Content,{className:g("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:n,...a,children:[(0,z.jsx)(Ct,{}),(0,z.jsx)(h.Viewport,{className:g("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,z.jsx)(wt,{})]})}));ae.displayName=h.Content.displayName;var Lo=Q.forwardRef(({className:e,...t},o)=>(0,z.jsx)(h.Label,{className:g("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Lo.displayName=h.Label.displayName;var ie=Q.forwardRef(({children:e,className:t,...o},a)=>(0,z.jsxs)(h.Item,{className:g("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:a,...o,children:[(0,z.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,z.jsx)(h.ItemIndicator,{children:(0,z.jsx)(nt.Check,{className:"h-4 w-4"})})}),(0,z.jsx)(h.ItemText,{children:e})]}));ie.displayName=h.Item.displayName;var Io=Q.forwardRef(({className:e,...t},o)=>(0,z.jsx)(h.Separator,{className:g("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Io.displayName=h.Separator.displayName;var Se=B(require("@radix-ui/react-checkbox")),Nt=B(require("react")),se=Nt.forwardRef(({className:e,...t},o)=>(0,z.jsx)(Se.Root,{className:g("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,z.jsx)(Se.Indicator,{className:g("flex items-center justify-center text-current"),children:(0,z.jsx)(nt.Check,{className:"h-4 w-4"})})}));se.displayName=Se.Root.displayName;var Eo=(0,mt.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 ke({className:e,variant:t,...o}){return(0,z.jsx)("div",{className:g(Eo({variant:t}),e),...o})}var Ge=B(require("react")),F=B(require("@radix-ui/react-scroll-area"));var ve=Ge.forwardRef(({className:e,children:t,...o},a)=>(0,z.jsxs)(F.Root,{ref:a,className:g("relative overflow-hidden",e),...o,children:[(0,z.jsx)(F.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,z.jsx)(Pt,{}),(0,z.jsx)(F.Corner,{})]}));ve.displayName=F.Root.displayName;var Pt=Ge.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,z.jsx)(F.ScrollAreaScrollbar,{ref:a,orientation:t,className:g("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,z.jsx)(F.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Pt.displayName=F.ScrollAreaScrollbar.displayName;function kt({deal:e,users:t,customer:o,categories:a,onClose:n,onSave:i,onAddComment:c}){var m,D,O;let[r,f]=(0,Vt.useState)({...e,value:e.value||0}),[w,S]=(0,Vt.useState)(""),[p,y]=(0,Vt.useState)(!1),[b,x]=(0,Vt.useState)(null);(0,Vt.useEffect)(()=>{y(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);let C=()=>{i(r),y(!1),x(null)},v=(l,k)=>{f(U=>({...U,[l]:k}))},R=l=>{let k=r.categories.includes(l)?r.categories.filter(U=>U!==l):[...r.categories,l];v("categories",k)},E=()=>{w.trim()&&(c({id:Date.now().toString(),text:w,timestamp:new Date().toISOString()}),f(l=>({...l,comments:[...l.comments,{id:"0",text:w,timestamp:new Date().toISOString()}]})),S(""))},W=l=>{switch(l){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},G=(l,k,U)=>{let me=b===l;return(0,z.jsxs)("div",{className:"grid gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-gray-500",children:k}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[U,me?(0,z.jsx)(_,{value:r[l],onChange:N=>v(l,N.target.value),onBlur:()=>x(null),autoFocus:!0}):(0,z.jsx)("div",{className:"flex-grow cursor-pointer hover:bg-gray-100 p-2 rounded",onClick:()=>x(l),children:r[l]}),!me&&(0,z.jsx)(H,{variant:"ghost",size:"sm",onClick:()=>x(l),children:(0,z.jsx)(nt.Edit2Icon,{className:"w-4 h-4"})})]})]})};return(0,z.jsx)(ge,{open:!0,children:(0,z.jsxs)(X,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,z.jsxs)(Y,{className:"flex flex-row items-center justify-between",children:[(0,z.jsx)(ee,{className:"text-2xl font-bold",children:o==null?void 0:o.name}),(0,z.jsxs)("div",{className:"flex space-x-2",children:[(0,z.jsx)(H,{variant:"outline",onClick:n,children:"Close"}),(0,z.jsxs)(H,{onClick:C,disabled:!p,children:[(0,z.jsx)(nt.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,z.jsxs)(ve,{className:"flex-grow pr-4",children:[(0,z.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,z.jsx)("div",{className:"grid gap-2",children:b==="value"?(0,z.jsx)(_,{type:"number",value:r.value,onChange:l=>v("value",Number(l.target.value)),onBlur:()=>x(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,z.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>x("value"),children:["\xA3",(m=r.value)==null?void 0:m.toLocaleString()]})}),(0,z.jsxs)("div",{className:"grid gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),b==="assignee"?(0,z.jsxs)(fe,{value:((O=(D=r==null?void 0:r.assignee)==null?void 0:D.id)==null?void 0:O.toString())||"",onValueChange:l=>v("assignee",l),children:[(0,z.jsx)(re,{children:(0,z.jsx)(be,{placeholder:"Select assignee"})}),(0,z.jsx)(ae,{children:t&&t.map(l=>{var k;return(0,z.jsx)(ie,{value:((k=l==null?void 0:l.id)==null?void 0:k.toString())||"",children:l.name},l.id)})})]}):(0,z.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>x("assignee"),children:[(0,z.jsx)(nt.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,z.jsx)("span",{children:r.assignee.name})]})]}),(0,z.jsxs)("div",{className:"grid gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),b==="closureDate"?(0,z.jsx)(_,{type:"date",value:r.closureDate.split("T")[0],onChange:l=>v("closureDate",l.target.value),onBlur:()=>x(null),autoFocus:!0}):(0,z.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>x("closureDate"),children:[(0,z.jsx)(nt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,z.jsx)("span",{children:new Date(r.closureDate).toLocaleDateString("en-GB")})]})]})]}),(0,z.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,z.jsxs)("div",{className:"grid gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-gray-500",children:"Description"}),b==="description"?(0,z.jsx)(te,{value:r.description,onChange:l=>v("description",l.target.value),onBlur:()=>x(null),className:"min-h-[100px]",autoFocus:!0}):(0,z.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>x("description"),children:r.description})]})}),(0,z.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,z.jsxs)("div",{className:"grid gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-gray-500",children:"Status"}),b==="status"?(0,z.jsxs)(fe,{value:r.status,onValueChange:l=>{v("status",l),x(null)},children:[(0,z.jsx)(re,{children:(0,z.jsx)(be,{placeholder:"Select status"})}),(0,z.jsx)(ae,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(l=>(0,z.jsx)(ie,{value:l,children:l},l))})]}):(0,z.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>x("status"),children:r.status})]}),(0,z.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-gray-500",children:"Categories"}),b==="categories"?(0,z.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.map(l=>(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(se,{id:l.id,checked:r.categories.includes(l.id),onCheckedChange:()=>R(l.id)}),(0,z.jsx)("label",{htmlFor:l.id,className:`text-sm font-medium ${W(l.type)} px-2 py-1 rounded`,children:l.name})]},l.id))}):(0,z.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>x("categories"),children:r.categories.map(l=>{let k=a.find(U=>U.id===l);return k?(0,z.jsx)(ke,{variant:"secondary",className:W(k.type),children:k.name},k.id):null})})]})]}),(0,z.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,z.jsxs)("div",{className:"grid gap-2",children:[(0,z.jsx)(L,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,z.jsx)(ve,{className:"h-[200px] overflow-y-auto",children:(0,z.jsx)("div",{className:"space-y-2",children:r.comments.slice().sort((l,k)=>new Date(k.timestamp).getTime()-new Date(l.timestamp).getTime()).map(l=>{var k;return(0,z.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,z.jsx)("p",{className:"text-sm text-gray-700",children:l.text}),(0,z.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[(k=l==null?void 0:l.author)==null?void 0:k.name," - ",new Date(l.timestamp).toLocaleString()]})]},l.id)})})}),(0,z.jsxs)("div",{className:"flex mt-2",children:[(0,z.jsx)(_,{value:w,onChange:l=>S(l.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,z.jsxs)(H,{onClick:E,className:"ml-2",children:[(0,z.jsx)(nt.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,z.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(r.updatedAt).toLocaleString()]})]})]})]})})}var le=B(require("react"));var Oe=le.forwardRef(({className:e,...t},o)=>(0,z.jsx)("div",{ref:o,className:g("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Oe.displayName="Card";var Ue=le.forwardRef(({className:e,...t},o)=>(0,z.jsx)("div",{ref:o,className:g("flex flex-col space-y-1.5 p-6",e),...t}));Ue.displayName="CardHeader";var _e=le.forwardRef(({className:e,...t},o)=>(0,z.jsx)("div",{ref:o,className:g("font-semibold leading-none tracking-tight",e),...t}));_e.displayName="CardTitle";var Bo=le.forwardRef(({className:e,...t},o)=>(0,z.jsx)("div",{ref:o,className:g("text-sm text-muted-foreground",e),...t}));Bo.displayName="CardDescription";var je=le.forwardRef(({className:e,...t},o)=>(0,z.jsx)("div",{ref:o,className:g("p-6 pt-0",e),...t}));je.displayName="CardContent";var zo=le.forwardRef(({className:e,...t},o)=>(0,z.jsx)("div",{ref:o,className:g("flex items-center p-6 pt-0",e),...t}));zo.displayName="CardFooter";function At({deal:e,customer:t,categories:o,onClick:a}){let n=o.find(i=>i.type==="proposition"&&e.categories.includes(i.id));return(0,z.jsxs)(Oe,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,z.jsxs)(Ue,{className:"pb-2",children:[(0,z.jsx)("div",{className:"flex justify-between items-center",children:(0,z.jsx)(_e,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,z.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,z.jsxs)(je,{children:[(0,z.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,z.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,z.jsx)(nt.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,z.jsx)("span",{children:e.assignee.name})]}),(0,z.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,z.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,z.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,z.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,z.jsx)(nt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,z.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,z.jsx)("div",{className:"flex justify-between items-left",children:n&&(0,z.jsx)(ke,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:n.name})})]})]})}var Me=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Tt({onSubmit:e}){var n;let[t,o]=(0,Vt.useState)({name:"",intro:"",active:!0});return(0,z.jsxs)("form",{onSubmit:i=>{i.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),o({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(L,{htmlFor:"customerName",children:"Customer Name"}),(0,z.jsx)(_,{id:"customerName",value:t.name,onChange:i=>o({...t,name:i.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(L,{htmlFor:"customerIntro",children:"Intro"}),(0,z.jsx)(te,{id:"customerIntro",value:(n=t.intro)!=null?n:"",onChange:i=>o({...t,intro:i.target.value}),placeholder:"Enter customer intro"})]}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(se,{id:"activeCustomer",checked:!!t.active,onCheckedChange:i=>o({...t,active:i})}),(0,z.jsx)(L,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,z.jsx)(H,{type:"submit",className:"w-full",children:"Add Customer"})]})}function It({customers:e,users:t,categories:o,onSubmit:a,initialDeal:n,onAddCustomer:i,onClose:c}){var R,E,W,G;let[r,f]=(0,Vt.useState)(n||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[w,S]=(0,Vt.useState)(!1),[p,y]=(0,Vt.useState)({});(0,Vt.useEffect)(()=>{n&&f(n)},[n]);let b=()=>{let m={};return r.customer||(m.customer="Customer is required"),r.value||(m.value="Value is required"),r.assignee||(m.assignee="Assignee is required"),r.closureDate||(m.closureDate="Closure Date is required"),y(m),Object.keys(m).length===0},x=m=>{m.preventDefault(),b()&&(a({...r}),f({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),y({}),c==null||c())},C=m=>{f(D=>{var O;return{...D,categories:(O=D.categories)!=null&&O.includes(m)?D.categories.filter(l=>l!==m):[...D.categories||[],m]}})},v=m=>{e.push(m),f({...r,customer:m}),S(!1),i(m)};return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("form",{onSubmit:x,className:"space-y-6",children:[(0,z.jsx)(ve,{className:"h-[60vh] pr-4",children:(0,z.jsxs)("div",{className:"space-y-6 px-4",children:[(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"customer",children:"Customer"}),(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsxs)(fe,{value:(E=(R=r.customer)==null?void 0:R.id)==null?void 0:E.toString(),onValueChange:m=>f({...r,customer:{id:Number(m)}}),children:[(0,z.jsx)(re,{children:(0,z.jsx)(be,{placeholder:"Select customer"})}),(0,z.jsx)(ae,{children:e.map(m=>{var D;return(0,z.jsx)(ie,{value:((D=m.id)==null?void 0:D.toString())||"",children:m.name},m.id)})})]}),(0,z.jsx)(H,{variant:"outline",size:"icon",onClick:()=>S(!0),children:(0,z.jsx)(nt.PlusIcon,{className:"w-5 h-5"})})]}),p.customerId&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"value",children:"Value"}),(0,z.jsx)(_,{id:"value",type:"number",value:r.value||"",onChange:m=>f({...r,value:Number.parseFloat(m.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"assignee",children:"Assignee"}),(0,z.jsxs)(fe,{value:(G=(W=r.assignee)==null?void 0:W.id)==null?void 0:G.toString(),onValueChange:m=>f({...r,assignee:{id:Number(m)}}),children:[(0,z.jsx)(re,{children:(0,z.jsx)(be,{placeholder:"Select assignee"})}),(0,z.jsx)(ae,{children:t&&t.map(m=>{var D;return(0,z.jsx)(ie,{value:((D=m.id)==null?void 0:D.toString())||"",children:m.name},m.id)})})]}),p.assignee&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"description",children:"Description"}),(0,z.jsx)(te,{id:"description",value:r.description||"",onChange:m=>f({...r,description:m.target.value}),placeholder:"Enter deal description"})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{children:"Categories"}),(0,z.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(m=>(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)("h4",{className:"text-sm font-medium",children:m.charAt(0).toUpperCase()+m.slice(1)}),(0,z.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.filter(D=>D.type===m).map(D=>{var O;return(0,z.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,z.jsx)(se,{id:D.id,checked:(O=r.categories)==null?void 0:O.includes(D.id),onCheckedChange:()=>C(D.id)}),(0,z.jsx)("label",{htmlFor:D.id,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:D.name})]},D.id)})})]},m))})]}),(0,z.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,z.jsx)(L,{htmlFor:"closureDate",children:"Closure Date"}),(0,z.jsx)(_,{id:"closureDate",type:"date",value:r.closureDate,onChange:m=>f({...r,closureDate:m.target.value})}),p.closureDate&&(0,z.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,z.jsx)(H,{type:"submit",className:"w-full",children:n?"Update Deal":"Add Deal"})]}),(0,z.jsx)(ge,{open:w,onOpenChange:S,children:(0,z.jsxs)(X,{children:[(0,z.jsx)(Y,{children:(0,z.jsx)(ee,{children:"Add New Customer"})}),(0,z.jsx)(Tt,{onSubmit:v})]})})]})}function zt({status:e,deals:t,users:o,customers:a,categories:n,onDealClick:i,calculateColumnValue:c,calculateWeightedValue:r,addNewDeal:f,onAddCustomer:w}){let[S,p]=(0,Vt.useState)(!1);return(0,z.jsxs)("div",{className:"flex flex-col w-80",children:[(0,z.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),f&&(0,z.jsxs)(ge,{open:S,onOpenChange:p,children:[(0,z.jsx)(lt,{asChild:!0,children:(0,z.jsxs)(H,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,z.jsx)(nt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,z.jsxs)(X,{children:[(0,z.jsx)(Y,{children:(0,z.jsx)(ee,{children:"Add New Deal"})}),(0,z.jsx)(It,{customers:a,users:o,categories:n,onSubmit:f,onAddCustomer:w,onClose:()=>p(!1)})]})]}),(0,z.jsx)(Me.Droppable,{droppableId:e,isDropDisabled:!1,children:y=>(0,z.jsxs)("div",{ref:y.innerRef,...y.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((b,x)=>(0,z.jsx)(Me.Draggable,{draggableId:b.id.toString(),index:b.id,children:C=>(0,z.jsx)("div",{ref:C.innerRef,...C.draggableProps,...C.dragHandleProps,children:(0,z.jsx)(At,{deal:b,customer:a.find(v=>v.id===b.customer.id),categories:n,onClick:()=>i(b)})})},b.id.toString())),y.placeholder]})}),(0,z.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,z.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,z.jsxs)("span",{className:"text-green-600",children:["\xA3",c(t).toLocaleString()]})]}),(0,z.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,z.jsxs)("span",{className:"text-blue-600",children:["\xA3",r(t,e).toLocaleString()]})]})]})]})}var Ho=["Cold","Qualified","Proposal","SoW","Won","Lost"];function Ke({initialData:e,addNewDeal:t,updateDeal:o,addComment:a,addNewCustomer:n}){let[i,c]=(0,Vt.useState)(null),r=p=>e.deals.filter(y=>y.status===p),f=p=>p.reduce((y,b)=>y+(b.value||0),0),w=(p,y)=>{let b={Cold:.2,Qualified:.4,Proposal:.6,SoW:.7,Won:1,Lost:0};return p.reduce((x,C)=>x+(C.value||0)*b[y],0)},S=(0,Vt.useCallback)(p=>{let{source:y,destination:b}=p;if(!b||y.droppableId===b.droppableId&&y.index===b.index)return;let x=y.droppableId,C=b.droppableId;console.log("Moving from ",x,"to",C);let v=[...e.deals],[R]=v.splice(y.index,1);R.status=C,v.splice(b.index,0,R),o(R)},[o]);return(0,z.jsx)(Me.DragDropContext,{onDragEnd:S,children:(0,z.jsxs)("div",{className:"p-4",children:[(0,z.jsx)("div",{className:"flex space-x-4 overflow-x-auto pb-4",children:Ho.filter(p=>p!=="Won"&&p!=="Lost").map(p=>{let y=r(p);return(0,z.jsx)(zt,{status:p,deals:y,customers:e.customers,users:e.users,categories:e.categories,onDealClick:c,calculateColumnValue:f,calculateWeightedValue:w,addNewDeal:p==="Cold"?t:void 0,onAddCustomer:n},p)})}),i&&(0,z.jsx)(kt,{deal:i,users:e.users,customer:e.customers.find(p=>p.id===i.customer.id),categories:e.categories,onClose:()=>c(null),onSave:o,onAddComment:p=>a(i.id.toString(),p)})]})})}var Le=[{id:1,name:"Acme Corp",intro:"z leading technology company",active:!0},{id:2,name:"GlobalTech",intro:"Innovative solutions provider",active:!0},{id:3,name:"InnoSystems",intro:"Cutting-edge software development",active:!1}],Ie=[{id:"1",name:"Software",type:"proposition"},{id:"2",name:"Hardware",type:"proposition"},{id:"3",name:"Referral",type:"source"},{id:"4",name:"Outbound",type:"source"},{id:"5",name:"Tech",type:"sector"},{id:"6",name:"Finance",type:"sector"}];var Ee=[{id:1,name:"John Doe",email:"john.doe@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Bob Johnson",email:"bob.johnson@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Alice Brown",email:"alice.brown@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Charlie Davis",email:"charlie.davis@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"}];var Vo={title:"CRM/KanbanBoard",component:Ke},Fo=Vo,Ft=e=>{let[t,o]=(0,Vt.useState)(e.initialData);return(0,z.jsx)(Ke,{...e,initialData:t,updateDeal:async n=>(console.log("Updating deal:",n),o(i=>({...i,deals:i.deals.map(c=>c.id===n.id?n:c)})),n)})},Be=Ft.bind({});Be.args={initialData:{deals:Array.from({length:20},(e,t)=>({id:(t+1).toString(),customer:Le[t%Le.length],value:Math.floor(Math.random()*1e5)+5e3,assignee:Ee[Math.floor(Math.random()*Ee.length)].name,status:["Cold","Qualified","Proposal Made","Won","Lost"][Math.floor(Math.random()*5)],categories:[Ie[t%Ie.length].id],dateLogged:new Date(Date.now()-Math.floor(Math.random()*30)*24*60*60*1e3).toISOString(),closureDate:new Date(Date.now()+Math.floor(Math.random()*90)*24*60*60*1e3).toISOString(),comments:[],lastModified:new Date().toISOString(),description:`This is a mock description for deal ${t+1}. It'z a ${["small","medium","large"][t%3]} deal with high potential.`})),customers:Le,users:Ee,categories:Ie},addNewDeal:async e=>(console.log("Adding deal:",e),{...e,id:"new-deal-id"}),addNewCustomer:async e=>(console.log("Adding customer:",e),{...e,id:"new-customer-id"}),addComment:async(e,t)=>(console.log("Adding comment to deal:",e,t),{...t,id:"new-comment-id"})};var Wt=Ft.bind({});Wt.args={...Be.args,initialData:{...Be.args.initialData,deals:[]}};0&&(module.exports={Default,NoDeals});
5
+ "use strict";var Gt=Object.create;var Te=Object.defineProperty;var Ot=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var Kt=Object.getPrototypeOf,_t=Object.prototype.hasOwnProperty;var $t=(e,t)=>{for(var o in t)Te(e,o,{get:t[o],enumerable:!0})},Ze=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of jt(t))!_t.call(e,s)&&s!==o&&Te(e,s,{get:()=>t[s],enumerable:!(a=Ot(t,s))||a.enumerable});return e};var z=(e,t,o)=>(o=e!=null?Gt(Kt(e)):{},Ze(t||!e||!e.__esModule?Te(o,"default",{value:e,enumerable:!0}):o,e)),qt=e=>Ze(Te({},"__esModule",{value:!0}),e);var Fo={};$t(Fo,{Default:()=>ze,NoDeals:()=>Ft,default:()=>Uo});module.exports=qt(Fo);var Vt=require("react");var De=z(require("react")),L=z(require("@radix-ui/react-dialog")),nt=require("lucide-react");var st=require("clsx");var Fe="-",Jt=e=>{let t=Zt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{let r=c.split(Fe);return r[0]===""&&r.length!==1&&r.shift(),et(r,t)||Qt(c)},getConflictingClassGroupIds:(c,r)=>{let v=o[c]||[];return r&&a[c]?[...v,...a[c]]:v}}},et=(e,t)=>{var c;if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),s=a?et(e.slice(1),a):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(Fe);return(c=t.validators.find(({validator:r})=>r(i)))==null?void 0:c.classGroupId},Xe=/^\[(.+)\]$/,Qt=e=>{if(Xe.test(e)){let t=Xe.exec(e)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Zt=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return Yt(Object.entries(e.classGroups),o).forEach(([i,c])=>{Ue(c,a,i,t)}),a},Ue=(e,t,o,a)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:Ye(t,s);i.classGroupId=o;return}if(typeof s=="function"){if(Xt(s)){Ue(s(a),t,o,a);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([i,c])=>{Ue(c,Ye(t,i),o,a)})})},Ye=(e,t)=>{let o=e;return t.split(Fe).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},Xt=e=>e.isThemeGetter,Yt=(e,t)=>t?e.map(([o,a])=>{let s=a.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([c,r])=>[t+c,r])):i);return[o,s]}):e,eo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,s=(i,c)=>{o.set(i,c),t++,t>e&&(t=0,a=o,o=new Map)};return{get(i){let c=o.get(i);if(c!==void 0)return c;if((c=a.get(i))!==void 0)return s(i,c),c},set(i,c){o.has(i)?o.set(i,c):s(i,c)}}},tt="!",to=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,s=t[0],i=t.length,c=r=>{let v=[],N=0,P=0,S;for(let y=0;y<r.length;y++){let A=r[y];if(N===0){if(A===s&&(a||r.slice(y,y+i)===t)){v.push(r.slice(P,y)),P=y+i;continue}if(A==="/"){S=y;continue}}A==="["?N++:A==="]"&&N--}let f=v.length===0?r:r.substring(P),b=f.startsWith(tt),u=b?f.substring(1):f,x=S&&S>P?S-P:void 0;return{modifiers:v,hasImportantModifier:b,baseClassName:u,maybePostfixModifierPosition:x}};return o?r=>o({className:r,parseClassName:c}):c},oo=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},ro=e=>({cache:eo(e.cacheSize),parseClassName:to(e),...Jt(e)}),ao=/\s+/,io=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:s}=t,i=[],c=e.trim().split(ao),r="";for(let v=c.length-1;v>=0;v-=1){let N=c[v],{modifiers:P,hasImportantModifier:S,baseClassName:f,maybePostfixModifierPosition:b}=o(N),u=!!b,x=a(u?f.substring(0,b):f);if(!x){if(!u){r=N+(r.length>0?" "+r:r);continue}if(x=a(f),!x){r=N+(r.length>0?" "+r:r);continue}u=!1}let y=oo(P).join(":"),A=S?y+tt:y,M=A+x;if(i.includes(M))continue;i.push(M);let B=s(x,u);for(let U=0;U<B.length;++U){let O=B[U];i.push(A+O)}r=N+(r.length>0?" "+r:r)}return r};function so(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=ot(t))&&(a&&(a+=" "),a+=o);return a}var ot=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=ot(e[a]))&&(o&&(o+=" "),o+=t);return o};function no(e,...t){let o,a,s,i=c;function c(v){let N=t.reduce((P,S)=>S(P),e());return o=ro(N),a=o.cache.get,s=o.cache.set,i=r,r(v)}function r(v){let N=a(v);if(N)return N;let P=io(v,o);return s(v,P),P}return function(){return i(so.apply(null,arguments))}}var R=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},rt=/^\[(?:([a-z-]+):)?(.+)\]$/i,lo=/^\H+\/\H+$/,co=new Set(["px","full","screen"]),mo=/^(\H+(\.\H+)?)?(xs|sm|md|lg|xl)$/,po=/\H+(%|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$/,uo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,go=/^(inset_)?-?((\H+)?\.?(\H+)[a-z]+|0)_-?((\H+)?\.?(\H+)[a-z]+|0)/,fo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_=e=>ue(e)||co.has(e)||lo.test(e),q=e=>ge(e,"length",So),ue=e=>!!e&&!Number.isNaN(Number(e)),Ve=e=>ge(e,"number",ue),we=e=>!!e&&Number.isInteger(Number(e)),bo=e=>e.endsWith("%")&&ue(e.slice(0,-1)),p=e=>rt.test(e),J=e=>mo.test(e),vo=new Set(["length","size","percentage"]),ho=e=>ge(e,vo,at),yo=e=>ge(e,"position",at),xo=new Set(["image","url"]),Co=e=>ge(e,xo,No),wo=e=>ge(e,"",Do),Se=()=>!0,ge=(e,t,o)=>{let a=rt.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},So=e=>po.test(e)&&!uo.test(e),at=()=>!1,Do=e=>go.test(e),No=e=>fo.test(e);var Po=()=>{let e=R("colors"),t=R("spacing"),o=R("blur"),a=R("brightness"),s=R("borderColor"),i=R("borderRadius"),c=R("borderSpacing"),r=R("borderWidth"),v=R("contrast"),N=R("grayscale"),P=R("hueRotate"),S=R("invert"),f=R("gap"),b=R("gradientColorStops"),u=R("gradientColorStopPositions"),x=R("inset"),y=R("margin"),A=R("opacity"),M=R("padding"),B=R("saturate"),U=R("scale"),O=R("sepia"),$=R("skew"),m=R("space"),w=R("translate"),G=()=>["auto","contain","none"],l=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",p,t],C=()=>[p,t],Re=()=>["",_,q],Ae=()=>["auto",ue,p],qe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ke=()=>["solid","dashed","dotted","double","none"],Je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],He=()=>["start","end","center","between","around","evenly","stretch"],Ce=()=>["","0",p],Qe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[ue,p];return{cacheSize:500,separator:":",theme:{colors:[Se],spacing:[_,q],blur:["none","",J,p],brightness:K(),borderColor:[e],borderRadius:["none","","full",J,p],borderSpacing:C(),borderWidth:Re(),contrast:K(),grayscale:Ce(),hueRotate:K(),invert:Ce(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[bo,q],inset:D(),margin:D(),opacity:K(),padding:C(),saturate:K(),scale:K(),sepia:Ce(),skew:K(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",p]}],container:["container"],columns:[{columns:[J]}],"break-after":[{"break-after":Qe()}],"break-before":[{"break-before":Qe()}],"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:[...qe(),p]}],overflow:[{overflow:l()}],"overflow-x":[{"overflow-x":l()}],"overflow-y":[{"overflow-y":l()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",we,p]}],basis:[{basis:D()}],"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:Ce()}],shrink:[{shrink:Ce()}],order:[{order:["first","last","none",we,p]}],"grid-cols":[{"grid-cols":[Se]}],"col-start-end":[{col:["auto",{span:["full",we,p]},p]}],"col-start":[{"col-start":Ae()}],"col-end":[{"col-end":Ae()}],"grid-rows":[{"grid-rows":[Se]}],"row-start-end":[{row:["auto",{span:[we,p]},p]}],"row-start":[{"row-start":Ae()}],"row-end":[{"row-end":Ae()}],"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:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...He()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...He(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...He(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],H:[{H:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[m]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[m]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",p,t]}],"min-w":[{"min-w":[p,t,"min","max","fit"]}],"max-w":[{"max-w":[p,t,"none","full","min","max","fit","prose",{screen:[J]},J]}],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",J,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ve]}],"font-family":[{font:[Se]}],"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",ue,Ve]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_,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":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_,q]}],"underline-offset":[{"underline-offset":["auto",_,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:C()}],"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":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...qe(),yo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ho]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Co]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[u]}],"gradient-via-pos":[{via:[u]}],"gradient-to-pos":[{to:[u]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],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:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-y":[{"border-y":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...ke(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:ke()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ke()]}],"outline-offset":[{"outline-offset":[_,p]}],"outline-w":[{outline:[_,q]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[_,q]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",J,wo]}],"shadow-color":[{shadow:[Se]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...Je(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Je()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",J,p]}],grayscale:[{grayscale:[N]}],"hue-rotate":[{"hue-rotate":[P]}],invert:[{invert:[S]}],saturate:[{saturate:[B]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[B]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"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:K()}],ease:[{ease:["linear","in","out","in-out",p]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",p]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[U]}],"scale-x":[{"scale-x":[U]}],"scale-y":[{"scale-y":[U]}],rotate:[{rotate:[we,p]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"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","H-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":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-H":[{"scroll-H":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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:[_,q,Ve]}],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","H","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-H","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 it=no(Po);function g(...e){return it((0,st.clsx)(e))}var H=require("react/jsx-runtime"),fe=L.Root,lt=L.Trigger,Ro=L.Portal;var ct=De.forwardRef(({className:e,...t},o)=>(0,H.jsx)(L.Overlay,{ref:o,className:g("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ct.displayName=L.Overlay.displayName;var Y=De.forwardRef(({className:e,children:t,...o},a)=>(0,H.jsxs)(Ro,{children:[(0,H.jsx)(ct,{}),(0,H.jsxs)(L.Content,{ref:a,className:g("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,H.jsxs)(L.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,H.jsx)(nt.nt,{className:"h-4 w-4"}),(0,H.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Y.displayName=L.Content.displayName;var ee=({className:e,...t})=>(0,H.jsx)("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ee.displayName="DialogHeader";var Ao=({className:e,...t})=>(0,H.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ao.displayName="DialogFooter";var te=De.forwardRef(({className:e,...t},o)=>(0,H.jsx)(L.Title,{ref:o,className:g("text-lg font-semibold leading-none tracking-tight",e),...t}));te.displayName=L.Title.displayName;var ko=De.forwardRef(({className:e,...t},o)=>(0,H.jsx)(L.Description,{ref:o,className:g("text-sm text-muted-foreground",e),...t}));ko.displayName=L.Description.displayName;var dt=require("@radix-ui/react-slot"),mt=require("class-variance-authority"),pt=z(require("react")),To=(0,mt.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-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),F=pt.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...s},i)=>(0,H.jsx)(e?dt.Slot:"button",{className:g(To({className:t,size:o,variant:a})),ref:i,...s}));F.displayName="Button";var gt=z(require("react"));var j=gt.forwardRef(({className:e,type:t,...o},a)=>(0,H.jsx)("input",{type:t,className:g("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:a,...o}));j.displayName="Input";var bt=z(require("react")),We=z(require("@radix-ui/react-label"));var Mo=(0,mt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),E=bt.forwardRef(({className:e,...t},o)=>(0,H.jsx)(We.Root,{ref:o,className:g(Mo(),e),...t}));E.displayName=We.Root.displayName;var yt=z(require("react")),oe=yt.forwardRef(({className:e,...t},o)=>(0,H.jsx)("textarea",{className:g("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));oe.displayName="Textarea";var h=z(require("@radix-ui/react-select")),Q=z(require("react")),be=h.Root;var ve=h.Value,ae=Q.forwardRef(({children:e,className:t,...o},a)=>(0,H.jsxs)(h.Trigger,{className:g("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:a,...o,children:[e,(0,H.jsx)(h.Icon,{asChild:!0,children:(0,H.jsx)(nt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ae.displayName=h.Trigger.displayName;var Ct=Q.forwardRef(({className:e,...t},o)=>(0,H.jsx)(h.ScrollUpButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,H.jsx)(nt.ChevronUp,{className:"h-4 w-4"})}));Ct.displayName=h.ScrollUpButton.displayName;var wt=Q.forwardRef(({className:e,...t},o)=>(0,H.jsx)(h.ScrollDownButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,H.jsx)(nt.ChevronDown,{className:"h-4 w-4"})}));wt.displayName=h.ScrollDownButton.displayName;var ie=Q.forwardRef(({children:e,className:t,position:o="popper",...a},s)=>(0,H.jsx)(h.Portal,{children:(0,H.jsxs)(h.Content,{className:g("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:s,...a,children:[(0,H.jsx)(Ct,{}),(0,H.jsx)(h.Viewport,{className:g("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,H.jsx)(wt,{})]})}));ie.displayName=h.Content.displayName;var Lo=Q.forwardRef(({className:e,...t},o)=>(0,H.jsx)(h.Label,{className:g("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Lo.displayName=h.Label.displayName;var se=Q.forwardRef(({children:e,className:t,...o},a)=>(0,H.jsxs)(h.Item,{className:g("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:a,...o,children:[(0,H.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,H.jsx)(h.ItemIndicator,{children:(0,H.jsx)(nt.Check,{className:"h-4 w-4"})})}),(0,H.jsx)(h.ItemText,{children:e})]}));se.displayName=h.Item.displayName;var Io=Q.forwardRef(({className:e,...t},o)=>(0,H.jsx)(h.Separator,{className:g("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Io.displayName=h.Separator.displayName;var Ne=z(require("@radix-ui/react-checkbox")),Dt=z(require("react")),ne=Dt.forwardRef(({className:e,...t},o)=>(0,H.jsx)(Ne.Root,{className:g("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,H.jsx)(Ne.Indicator,{className:g("flex items-center justify-center text-current"),children:(0,H.jsx)(nt.Check,{className:"h-4 w-4"})})}));ne.displayName=Ne.Root.displayName;var Eo=(0,mt.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 Le({className:e,variant:t,...o}){return(0,H.jsx)("div",{className:g(Eo({variant:t}),e),...o})}var Ge=z(require("react")),W=z(require("@radix-ui/react-scroll-area"));var he=Ge.forwardRef(({className:e,children:t,...o},a)=>(0,H.jsxs)(W.Root,{ref:a,className:g("relative overflow-hidden",e),...o,children:[(0,H.jsx)(W.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,H.jsx)(Rt,{}),(0,H.jsx)(W.Corner,{})]}));he.displayName=W.Root.displayName;var Rt=Ge.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,H.jsx)(W.ScrollAreaScrollbar,{ref:a,orientation:t,className:g("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,H.jsx)(W.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Rt.displayName=W.ScrollAreaScrollbar.displayName;function At({deal:e,users:t,customer:o,categories:a,onClose:s,onSave:i,onAddComment:c}){var O,$,m,w,G;let[r,v]=(0,Vt.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[N,P]=(0,Vt.useState)(""),[S,f]=(0,Vt.useState)(!1),[b,u]=(0,Vt.useState)(null);(0,Vt.useEffect)(()=>{f(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);let x=()=>{i(r),f(!1),u(null)},y=(l,D)=>{v(C=>({...C,[l]:D}))},A=l=>{let D=(r.categories||[]).includes(l)?(r.categories||[]).filter(C=>C!==l):[...r.categories||[],l];y("categories",D)},M=()=>{if(N.trim()){let l={text:N,timestamp:new Date().toISOString()};c(l),v(D=>({...D,comments:[...D.comments||[],l]})),P("")}},B=l=>{switch(l){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},U=l=>t==null?void 0:t.find(D=>D.id===Number(l));return(0,H.jsx)(fe,{open:!0,children:(0,H.jsxs)(Y,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,H.jsxs)(ee,{className:"flex flex-row items-center justify-between",children:[(0,H.jsx)(te,{className:"text-2xl font-bold",children:o==null?void 0:o.name}),(0,H.jsxs)("div",{className:"flex space-x-2",children:[(0,H.jsx)(F,{variant:"outline",onClick:s,children:"Close"}),(0,H.jsxs)(F,{onClick:x,disabled:!S,children:[(0,H.jsx)(nt.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,H.jsxs)(he,{className:"flex-grow pr-4",children:[(0,H.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,H.jsx)("div",{className:"grid gap-2",children:b==="value"?(0,H.jsx)(j,{type:"number",value:r.value,onChange:l=>y("value",Number(l.target.value)),onBlur:()=>u(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,H.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("value"),children:["\xA3",(O=r.value)==null?void 0:O.toLocaleString()]})}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(E,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),b==="assignee"?(0,H.jsxs)(be,{value:((m=($=r==null?void 0:r.assignee)==null?void 0:$.id)==null?void 0:m.toString())||"",onValueChange:l=>y("assignee",U(l)),children:[(0,H.jsx)(ae,{children:(0,H.jsx)(ve,{placeholder:"Select assignee"})}),(0,H.jsx)(ie,{children:t&&t.map(l=>{var D;return(0,H.jsx)(se,{value:((D=l==null?void 0:l.id)==null?void 0:D.toString())||"",children:l.name},l.id)})})]}):(0,H.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("assignee"),children:[(0,H.jsx)(nt.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:r.assignee.name})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(E,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),b==="closureDate"?(0,H.jsx)(j,{type:"date",value:(G=(w=r.closureDate)==null?void 0:w.split("H")[0])!=null?G:"",onChange:l=>y("closureDate",l.target.value),onBlur:()=>u(null),autoFocus:!0}):(0,H.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("closureDate"),children:[(0,H.jsx)(nt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:r.closureDate?new Date(r.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,H.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(E,{className:"text-sm font-medium text-gray-500",children:"Description"}),b==="description"?(0,H.jsx)(oe,{value:r.description||"",onChange:l=>y("description",l.target.value),onBlur:()=>u(null),className:"min-h-[100px]",autoFocus:!0}):(0,H.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>u("description"),children:r.description})]})}),(0,H.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(E,{className:"text-sm font-medium text-gray-500",children:"Status"}),b==="status"?(0,H.jsxs)(be,{value:r.status,onValueChange:l=>{y("status",l),u(null)},children:[(0,H.jsx)(ae,{children:(0,H.jsx)(ve,{placeholder:"Select status"})}),(0,H.jsx)(ie,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(l=>(0,H.jsx)(se,{value:l,children:l},l))})]}):(0,H.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("status"),children:r.status})]}),(0,H.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,H.jsx)(E,{className:"text-sm font-medium text-gray-500",children:"Categories"}),b==="categories"?(0,H.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.map(l=>{var D,C;return(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(ne,{id:((D=l.id)==null?void 0:D.toString())||"",checked:(r.categories||[]).some(Re=>Re.id===l.id),onCheckedChange:()=>l.id!==void 0&&A(l)}),(0,H.jsx)("label",{htmlFor:((C=l.id)!=null?C:"").toString(),className:`text-sm font-medium ${B(l.type||"sector")} px-2 py-1 rounded`,children:l.name})]},l.id)})}):(0,H.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("categories"),children:r.categories&&r.categories.map(l=>{console.log("cat",l);let D=l;return D?(0,H.jsx)(Le,{variant:"secondary",className:B(D.type||"sector"),children:D.name},D.id):null})})]})]}),(0,H.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(E,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,H.jsx)(he,{className:"h-[200px] overflow-y-auto",children:(0,H.jsx)("div",{className:"space-y-2",children:r.comments&&r.comments.slice().sort((l,D)=>new Date(D.timestamp||"").getTime()-new Date(l.timestamp||"").getTime()).map(l=>{var D;return(0,H.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,H.jsx)("p",{className:"text-sm text-gray-700",children:l.text}),(0,H.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[(D=l==null?void 0:l.author)==null?void 0:D.name," - ",new Date(l.timestamp||"").toLocaleString()]})]},l.id)})})}),(0,H.jsxs)("div",{className:"flex mt-2",children:[(0,H.jsx)(j,{value:N,onChange:l=>P(l.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,H.jsxs)(F,{onClick:M,className:"ml-2",children:[(0,H.jsx)(nt.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,H.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(r.updatedAt||"").toLocaleString()]})]})]})]})})}var ce=z(require("react"));var Oe=ce.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:g("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Oe.displayName="Card";var je=ce.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:g("flex flex-col space-y-1.5 p-6",e),...t}));je.displayName="CardHeader";var Ke=ce.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:g("font-semibold leading-none tracking-tight",e),...t}));Ke.displayName="CardTitle";var Bo=ce.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:g("text-sm text-muted-foreground",e),...t}));Bo.displayName="CardDescription";var _e=ce.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:g("p-6 pt-0",e),...t}));_e.displayName="CardContent";var zo=ce.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:g("flex items-center p-6 pt-0",e),...t}));zo.displayName="CardFooter";function kt({deal:e,customer:t,categories:o,onClick:a}){let s=o.find(i=>{var c;return i.type==="proposition"&&((c=e.categories)!=null?c:[]).includes(i.id)});return(0,H.jsxs)(Oe,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,H.jsxs)(je,{className:"pb-2",children:[(0,H.jsx)("div",{className:"flex justify-between items-center",children:(0,H.jsx)(Ke,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,H.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,H.jsxs)(_e,{children:[(0,H.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,H.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,H.jsx)(nt.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,H.jsx)("span",{children:e.assignee.name})]}),(0,H.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,H.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,H.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,H.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,H.jsx)(nt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,H.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,H.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,H.jsx)(Le,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var Ee=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Mt({onSubmit:e}){var s;let[t,o]=(0,Vt.useState)({name:"",intro:"",active:!0});return(0,H.jsxs)("form",{onSubmit:i=>{i.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),o({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(E,{htmlFor:"customerName",children:"Customer Name"}),(0,H.jsx)(j,{id:"customerName",value:t.name,onChange:i=>o({...t,name:i.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(E,{htmlFor:"customerIntro",children:"Intro"}),(0,H.jsx)(oe,{id:"customerIntro",value:(s=t.intro)!=null?s:"",onChange:i=>o({...t,intro:i.target.value}),placeholder:"Enter customer intro"})]}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(ne,{id:"activeCustomer",checked:!!t.active,onCheckedChange:i=>o({...t,active:i})}),(0,H.jsx)(E,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,H.jsx)(F,{type:"submit",className:"w-full",children:"Add Customer"})]})}function It({customers:e,users:t,categories:o,onSubmit:a,initialDeal:s,onAddCustomer:i,onClose:c}){var B,U,O,$;let[r,v]=(0,Vt.useState)(s||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("H")[0],closureDate:"",comments:[],description:""}),[N,P]=(0,Vt.useState)(!1),[S,f]=(0,Vt.useState)({});(0,Vt.useEffect)(()=>{s&&v(s)},[s]);let b=()=>{let m={};return r.customer||(m.customer="Customer is required"),r.value||(m.value="Value is required"),r.assignee||(m.assignee="Assignee is required"),r.closureDate||(m.closureDate="Closure Date is required"),f(m),Object.keys(m).length===0},u=m=>{m.preventDefault(),b()&&(a({...r}),v({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),f({}),c==null||c())},x=m=>{v(w=>({...w,categories:(w.categories||[]).includes(m)?(w.categories||[]).filter(G=>G!==m):[...w.categories||[],m]}))},y=m=>{v({...r,customer:m}),P(!1),i(m)},A=m=>t==null?void 0:t.find(w=>w.id===Number(m)),M=m=>e==null?void 0:e.find(w=>w.id===Number(m));return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)("form",{onSubmit:u,className:"space-y-6",children:[(0,H.jsx)(he,{className:"h-[60vh] pr-4",children:(0,H.jsxs)("div",{className:"space-y-6 px-4",children:[(0,H.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,H.jsx)(E,{htmlFor:"customer",children:"Customer"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsxs)(be,{value:(U=(B=r.customer)==null?void 0:B.id)==null?void 0:U.toString(),onValueChange:m=>v({...r,customer:M(m)}),children:[(0,H.jsx)(ae,{children:(0,H.jsx)(ve,{placeholder:"Select customer"})}),(0,H.jsx)(ie,{children:e.map(m=>{var w;return(0,H.jsx)(se,{value:((w=m.id)==null?void 0:w.toString())||"",children:m.name},m.id)})})]}),(0,H.jsx)(F,{variant:"outline",size:"icon",onClick:()=>P(!0),children:(0,H.jsx)(nt.PlusIcon,{className:"w-5 h-5"})})]}),S.customerId&&(0,H.jsx)("p",{className:"text-red-500 text-sm",children:S.customerId})]}),(0,H.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,H.jsx)(E,{htmlFor:"value",children:"Value"}),(0,H.jsx)(j,{id:"value",type:"number",value:r.value||"",onChange:m=>v({...r,value:Number.parseFloat(m.target.value)}),placeholder:"Enter deal value"}),S.value&&(0,H.jsx)("p",{className:"text-red-500 text-sm",children:S.value})]}),(0,H.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,H.jsx)(E,{htmlFor:"assignee",children:"Assignee"}),(0,H.jsxs)(be,{value:($=(O=r.assignee)==null?void 0:O.id)==null?void 0:$.toString(),onValueChange:m=>v({...r,assignee:A(m)}),children:[(0,H.jsx)(ae,{children:(0,H.jsx)(ve,{placeholder:"Select assignee"})}),(0,H.jsx)(ie,{children:t&&t.map(m=>{var w;return(0,H.jsx)(se,{value:((w=m.id)==null?void 0:w.toString())||"",children:m.name},m.id)})})]}),S.assignee&&(0,H.jsx)("p",{className:"text-red-500 text-sm",children:S.assignee})]}),(0,H.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,H.jsx)(E,{htmlFor:"description",children:"Description"}),(0,H.jsx)(oe,{id:"description",value:r.description||"",onChange:m=>v({...r,description:m.target.value}),placeholder:"Enter deal description"})]}),(0,H.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,H.jsx)(E,{children:"Categories"}),(0,H.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(m=>(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)("h4",{className:"text-sm font-medium",children:m.charAt(0).toUpperCase()+m.slice(1)}),(0,H.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.filter(w=>w.type===m).map(w=>{var G;return(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(ne,{id:w.id.toString(),checked:(G=r.categories)==null?void 0:G.includes(w.id),onCheckedChange:()=>x(w)}),(0,H.jsx)("label",{htmlFor:w.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:w.name})]},w.id)})})]},m))})]}),(0,H.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,H.jsx)(E,{htmlFor:"closureDate",children:"Closure Date"}),(0,H.jsx)(j,{id:"closureDate",type:"date",value:r.closureDate||"",onChange:m=>v({...r,closureDate:m.target.value})}),S.closureDate&&(0,H.jsx)("p",{className:"text-red-500 text-sm",children:S.closureDate})]})]})}),(0,H.jsx)(F,{type:"submit",className:"w-full",children:s?"Update Deal":"Add Deal"})]}),(0,H.jsx)(fe,{open:N,onOpenChange:P,children:(0,H.jsxs)(Y,{children:[(0,H.jsx)(ee,{children:(0,H.jsx)(te,{children:"Add New Customer"})}),(0,H.jsx)(Mt,{onSubmit:y})]})})]})}function zt({status:e,deals:t,users:o,customers:a,categories:s,onDealClick:i,calculateColumnValue:c,calculateWeightedValue:r,addNewDeal:v,onAddCustomer:N}){let[P,S]=(0,Vt.useState)(!1);return(0,H.jsxs)("div",{className:"flex flex-col w-80",children:[(0,H.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),v&&(0,H.jsxs)(fe,{open:P,onOpenChange:S,children:[(0,H.jsx)(lt,{asChild:!0,children:(0,H.jsxs)(F,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,H.jsx)(nt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,H.jsxs)(Y,{children:[(0,H.jsx)(ee,{children:(0,H.jsx)(te,{children:"Add New Deal"})}),(0,H.jsx)(It,{customers:a,users:o,categories:s,onSubmit:v,onAddCustomer:N,onClose:()=>S(!1)})]})]}),(0,H.jsx)(Ee.Droppable,{droppableId:e,isDropDisabled:!1,children:f=>(0,H.jsxs)("div",{ref:f.innerRef,...f.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((b,u)=>(0,H.jsx)(Ee.Draggable,{draggableId:b.id.toString(),index:b.id,children:x=>(0,H.jsx)("div",{ref:x.innerRef,...x.draggableProps,...x.dragHandleProps,children:(0,H.jsx)(kt,{deal:b,customer:b.customer,categories:s,onClick:()=>i(b)})})},b.id.toString())),f.placeholder]})}),(0,H.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,H.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,H.jsxs)("span",{className:"text-green-600",children:["\xA3",c(t).toLocaleString()]})]}),(0,H.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,H.jsxs)("span",{className:"text-blue-600",children:["\xA3",r(t,e).toLocaleString()]})]})]})]})}var Ho=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function $e({initialData:e,addNewDeal:t,updateDeal:o,addComment:a,addNewCustomer:s}){var S;let[i,c]=(0,Vt.useState)(null),r=f=>{var b;return((b=e.deals)!=null?b:[]).filter(u=>u.status===f)},v=f=>f.reduce((b,u)=>b+(u.value||0),0),N=(f,b)=>{let u={Cold:.2,Qualified:.4,"Proposal Made":.6,"SoW Submitted":.7,Won:1,Lost:0};return f.reduce((x,y)=>x+(y.value||0)*u[b],0)},P=(0,Vt.useCallback)(f=>{var B;let{source:b,destination:u}=f;if(!u||b.droppableId===u.droppableId&&b.index===u.index)return;let x=b.droppableId,y=u.droppableId;console.log("Moving from ",x,"to",y);let A=[...(B=e.deals)!=null?B:[]],[M]=A.splice(b.index,1);M.status=y,A.splice(u.index,0,M),o(M)},[o]);return(0,H.jsx)(Ee.DragDropContext,{onDragEnd:P,children:(0,H.jsxs)("div",{className:"p-4",children:[(0,H.jsx)("div",{className:"flex space-x-4 overflow-x-auto pb-4",children:Ho.filter(f=>f!=="Won"&&f!=="Lost").map(f=>{var u,x;let b=r(f);return(0,H.jsx)(zt,{status:f,deals:b,customers:(u=e.customers)!=null?u:[],users:e.users,categories:(x=e.categories)!=null?x:[],onDealClick:c,calculateColumnValue:v,calculateWeightedValue:N,addNewDeal:f==="Cold"?t:void 0,onAddCustomer:s},f)})}),i&&(0,H.jsx)(At,{deal:i,users:e.users,customer:i.customer,categories:(S=e.categories)!=null?S:[],onClose:()=>c(null),onSave:o,onAddComment:f=>a(i.id.toString(),f)})]})})}var Pe=[{id:1,name:"Acme Corp",intro:"A leading technology company",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"GlobalTech",intro:"Innovative solutions provider",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"InnoSystems",intro:"Cutting-edge software development",active:!1,createdAt:"2023-01-01",updatedAt:"2023-01-01"}],xe=[{id:1,name:"Software",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Hardware",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Referral",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Outbound",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Tech",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:6,name:"Finance",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],pe=[{id:1,name:"John Doe",email:"john.doe@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Bob Johnson",email:"bob.johnson@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Alice Brown",email:"alice.brown@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Charlie Davis",email:"charlie.davis@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],ra=[{id:1,customer:Pe[0],value:5e4,assignee:pe[2],status:"Qualified",categories:xe.slice(0,3),dateLogged:"2023-01-15",closureDate:"2023-06-30",updatedAt:"2023-05-01T10:00:00Z",createdAt:"2023-01-01",comments:[{id:"1",text:"Initial contact made",author:pe[5],timestamp:"2023-01-15T09:00:00Z"}],description:"Potential software solution for Acme Corp"},{id:2,customer:{id:2,name:"GlobalTech",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},value:75e3,assignee:{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},status:"Proposal Made",categories:xe.slice(0,3),dateLogged:"2023-02-01",closureDate:"2023-07-31",updatedAt:"2023-05-10T14:30:00Z",createdAt:"2023-01-01",comments:[{id:"2",text:"Proposal sent",author:pe[1],timestamp:"2023-02-15T09:00:00Z"}],description:"Custom hardware solution for GlobalTech"}];var Vo={title:"CRM/KanbanBoard",component:$e},Uo=Vo,Ut=e=>{let[t,o]=(0,Vt.useState)(e.initialData);return(0,H.jsx)($e,{...e,initialData:t,updateDeal:async s=>(console.log("Updating deal:",s),o(i=>{var c;return{...i,deals:((c=i.deals)!=null?c:[]).map(r=>r.id===s.id?s:r)}}),s)})},ze=Ut.bind({});ze.args={initialData:{deals:Array.from({length:20},(e,t)=>({id:t+1,customer:Pe[t%Pe.length],value:Math.floor(Math.random()*1e5)+5e3,assignee:pe[Math.floor(Math.random()*pe.length)].name,status:["Cold","Qualified","Proposal Made","Won","Lost"][Math.floor(Math.random()*5)],categories:[xe[t%xe.length].id],dateLogged:new Date(Date.now()-Math.floor(Math.random()*30)*24*60*60*1e3).toISOString(),closureDate:new Date(Date.now()+Math.floor(Math.random()*90)*24*60*60*1e3).toISOString(),comments:[],updatedAt:new Date().toISOString(),description:`This is a mock description for deal ${t+1}. It's a ${["small","medium","large"][t%3]} deal with high potential.`})),customers:Pe,users:pe,categories:xe},addNewDeal:async e=>(console.log("Adding deal:",e),{...e,id:"new-deal-id"}),addNewCustomer:async e=>(console.log("Adding customer:",e),{...e,id:"new-customer-id"}),addComment:async(e,t)=>(console.log("Adding comment to deal:",e,t),{...t,id:"new-comment-id"})};var Ft=Ut.bind({});Ft.args={...ze.args,initialData:{...ze.args.initialData,deals:[]}};0&&(module.exports={Default,NoDeals});
@@ -1 +1 @@
1
- import{a as e,b as n,d as r}from"../../chunk-AHLX3GTH.mjs";import{a as d}from"../../chunk-IV6YI3IO.mjs";import"../../chunk-NYMWV2AX.mjs";import"../../chunk-NN6YNXCJ.mjs";import"../../chunk-27GMB7QZ.mjs";import"../../chunk-3FW5YDNM.mjs";import"../../chunk-QH3BNFVD.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";import{useState as g}from"react";import{jsx as u}from"react/jsx-runtime";var h={title:"CRM/KanbanBoard",component:d},C=h,m=a=>{let[t,c]=g(a.initialData);return u(d,{...a,initialData:t,updateDeal:async o=>(console.log("Updating deal:",o),c(i=>({...i,deals:i.deals.map(l=>l.id===o.id?o:l)})),o)})},s=m.bind({});s.args={initialData:{deals:Array.from({length:20},(a,t)=>({id:(t+1).toString(),customer:e[t%e.length],value:Math.floor(Math.random()*1e5)+5e3,assignee:r[Math.floor(Math.random()*r.length)].name,status:["Cold","Qualified","Proposal Made","Won","Lost"][Math.floor(Math.random()*5)],categories:[n[t%n.length].id],dateLogged:new Date(Date.now()-Math.floor(Math.random()*30)*24*60*60*1e3).toISOString(),closureDate:new Date(Date.now()+Math.floor(Math.random()*90)*24*60*60*1e3).toISOString(),comments:[],lastModified:new Date().toISOString(),description:`This is a mock description for deal ${t+1}. It's a ${["small","medium","large"][t%3]} deal with high potential.`})),customers:e,users:r,categories:n},addNewDeal:async a=>(console.log("Adding deal:",a),{...a,id:"new-deal-id"}),addNewCustomer:async a=>(console.log("Adding customer:",a),{...a,id:"new-customer-id"}),addComment:async(a,t)=>(console.log("Adding comment to deal:",a,t),{...t,id:"new-comment-id"})};var M=m.bind({});M.args={...s.args,initialData:{...s.args.initialData,deals:[]}};export{s as Default,M as NoDeals,C as default};
1
+ import{a as e,b as n,c as r}from"../../chunk-TLBLUYXL.mjs";import{a as d}from"../../chunk-3TYE4Q6H.mjs";import"../../chunk-FBUZ37DL.mjs";import"../../chunk-YNC77MO4.mjs";import"../../chunk-TTN4NUDL.mjs";import"../../chunk-OWBJTXZL.mjs";import"../../chunk-BRYZOZKY.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-BDX257W2.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";import{useState as h}from"react";import{jsx as D}from"react/jsx-runtime";var u={title:"CRM/KanbanBoard",component:d},w=u,c=a=>{let[t,g]=h(a.initialData);return D(d,{...a,initialData:t,updateDeal:async o=>(console.log("Updating deal:",o),g(i=>{var l;return{...i,deals:((l=i.deals)!=null?l:[]).map(m=>m.id===o.id?o:m)}}),o)})},s=c.bind({});s.args={initialData:{deals:Array.from({length:20},(a,t)=>({id:t+1,customer:e[t%e.length],value:Math.floor(Math.random()*1e5)+5e3,assignee:r[Math.floor(Math.random()*r.length)].name,status:["Cold","Qualified","Proposal Made","Won","Lost"][Math.floor(Math.random()*5)],categories:[n[t%n.length].id],dateLogged:new Date(Date.now()-Math.floor(Math.random()*30)*24*60*60*1e3).toISOString(),closureDate:new Date(Date.now()+Math.floor(Math.random()*90)*24*60*60*1e3).toISOString(),comments:[],updatedAt:new Date().toISOString(),description:`This is a mock description for deal ${t+1}. It's a ${["small","medium","large"][t%3]} deal with high potential.`})),customers:e,users:r,categories:n},addNewDeal:async a=>(console.log("Adding deal:",a),{...a,id:"new-deal-id"}),addNewCustomer:async a=>(console.log("Adding customer:",a),{...a,id:"new-customer-id"}),addComment:async(a,t)=>(console.log("Adding comment to deal:",a,t),{...t,id:"new-comment-id"})};var p=c.bind({});p.args={...s.args,initialData:{...s.args.initialData,deals:[]}};export{s as Default,p as NoDeals,w as default};
@@ -1,10 +1,10 @@
1
- import type { Deal, CRMStatus, CRMCategory, Customer, User } from './types';
1
+ import type { Deal, CRMStatus, DealCategory, Customer, User } from './types';
2
2
  type KanbanColumnProps = {
3
3
  status: CRMStatus;
4
4
  deals: Deal[];
5
- users?: Partial<User>[];
6
- customers: Partial<Customer>[];
7
- categories: CRMCategory[];
5
+ users?: User[];
6
+ customers: Customer[];
7
+ categories: DealCategory[];
8
8
  onDealClick: (deal: Deal) => void;
9
9
  calculateColumnValue: (deals: Deal[]) => number;
10
10
  calculateWeightedValue: (deals: Deal[], status: CRMStatus) => number;