cortex-react-components 1.41.0 → 1.41.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ZMWHENYB.mjs → chunk-373YJLIH.mjs} +1 -1
- package/dist/{chunk-HN4TEDPU.mjs → chunk-3PC5BLK7.mjs} +1 -1
- package/dist/{chunk-23EQTK7B.mjs → chunk-423OEU3K.mjs} +1 -1
- package/dist/chunk-4RKYG7LK.mjs +1 -0
- package/dist/{chunk-UZURFRC5.mjs → chunk-62YZZSOX.mjs} +1 -1
- package/dist/{chunk-4W5BMCYE.mjs → chunk-CNCPREWR.mjs} +1 -1
- package/dist/{chunk-N5ZYYMHK.mjs → chunk-CTCV3L4B.mjs} +1 -1
- package/dist/{chunk-7LTMHU33.mjs → chunk-ET5WFKM7.mjs} +1 -1
- package/dist/chunk-F2YN7SED.mjs +1 -0
- package/dist/{chunk-7HPRTCYO.mjs → chunk-FBFDZOP6.mjs} +1 -1
- package/dist/{chunk-KDVFPMCS.mjs → chunk-HAFP6IMI.mjs} +1 -1
- package/dist/{chunk-PN4KVV3W.mjs → chunk-HRZRAS6Z.mjs} +1 -1
- package/dist/{chunk-NLDFFHUN.mjs → chunk-HTO3HNQS.mjs} +1 -1
- package/dist/{chunk-Y6CZVVJF.mjs → chunk-HUN2X4VH.mjs} +1 -1
- package/dist/{chunk-NGK3IDFP.mjs → chunk-ICTOXY7D.mjs} +1 -1
- package/dist/{chunk-K72QGFAZ.mjs → chunk-IE5X3XS7.mjs} +1 -1
- package/dist/{chunk-QL74DMZ3.mjs → chunk-IMAQJ7N3.mjs} +1 -1
- package/dist/{chunk-AFA6LBJ4.mjs → chunk-IPHHUHS3.mjs} +1 -1
- package/dist/{chunk-TYPDCZRR.mjs → chunk-IS5OUEJJ.mjs} +1 -1
- package/dist/chunk-J3QZZ62Z.mjs +4 -0
- package/dist/{chunk-SZ66VQRH.mjs → chunk-J7TRHWRM.mjs} +1 -1
- package/dist/{chunk-UDRX6THN.mjs → chunk-JK3XF6LP.mjs} +1 -1
- package/dist/{chunk-TRA7DKAI.mjs → chunk-JM6ZXLBG.mjs} +1 -1
- package/dist/{chunk-RTADGEQM.mjs → chunk-JYZW3G3N.mjs} +1 -1
- package/dist/{chunk-ULENDYCU.mjs → chunk-L44KSGUG.mjs} +1 -1
- package/dist/{chunk-4VDJWCUB.mjs → chunk-LBKMUSVR.mjs} +1 -1
- package/dist/{chunk-TV7ZUNYO.mjs → chunk-LVUWQ35N.mjs} +1 -1
- package/dist/{chunk-UD7JYMRU.mjs → chunk-MANZDSTF.mjs} +1 -1
- package/dist/chunk-MP3J7UPZ.mjs +1 -0
- package/dist/{chunk-JHXTO4RC.mjs → chunk-PARYRNXP.mjs} +1 -1
- package/dist/{chunk-5PALJRLI.mjs → chunk-SJWN6J3F.mjs} +1 -1
- package/dist/{chunk-SFVSEAAD.mjs → chunk-TJ6J3OQZ.mjs} +1 -1
- package/dist/{chunk-SAHUDAL7.mjs → chunk-UDVFDGKM.mjs} +1 -1
- package/dist/{chunk-PVRWMAHW.mjs → chunk-UK4IPFAO.mjs} +1 -1
- package/dist/chunk-V4CUPKLW.mjs +4 -0
- package/dist/{chunk-DJ5BLICX.mjs → chunk-VP7B5S7N.mjs} +1 -1
- package/dist/{chunk-QMVHDZ5J.mjs → chunk-Y6QUDCQM.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CRMPage.js +1 -1
- package/dist/components/CRM/CRMPage.mjs +1 -1
- package/dist/components/CRM/CRMPage.stories.js +35 -35
- package/dist/components/CRM/CRMPage.stories.mjs +1 -1
- package/dist/components/CRM/DealCard.js +1 -1
- package/dist/components/CRM/DealCard.mjs +1 -1
- package/dist/components/CRM/DealCard.stories.js +1 -1
- package/dist/components/CRM/DealCard.stories.mjs +1 -1
- package/dist/components/CRM/DealDetails.js +1 -1
- package/dist/components/CRM/DealDetails.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.js +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.stories.js +1 -1
- package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
- package/dist/components/CRM/KanbanColumn.js +1 -1
- package/dist/components/CRM/KanbanColumn.mjs +1 -1
- package/dist/components/CRM/KanbanColumn.stories.js +1 -1
- package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
- package/dist/components/CRM/NewDealForm.stories.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/HolidayGrid.js +1 -1
- package/dist/components/Holidays/HolidayGrid.mjs +1 -1
- package/dist/components/Holidays/HolidayGrid.stories.js +1 -1
- package/dist/components/Holidays/HolidayGrid.stories.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.js +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.stories.js +1 -1
- package/dist/components/Holidays/HolidayTracker.stories.mjs +1 -1
- package/dist/components/Holidays/index.js +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Layouts/BlogList.mjs +1 -1
- package/dist/components/Layouts/BlogList.stories.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.stories.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/SidebarRight.stories.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Payload/Card/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/RichText.stories.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/index.js +6 -6
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Blog.stories.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/Documentation.stories.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/IndexPage.stories.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/Intranet.stories.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/LandingPage.stories.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Page.stories.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Publish.stories.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/pages/Website.stories.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/AboutSection.stories.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogDetail.stories.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/BlogListSection.stories.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/ContactSection.stories.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/PricingSection.stories.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-37DPIDHA.mjs +0 -1
- package/dist/chunk-AEDQILUE.mjs +0 -1
- package/dist/chunk-FJUYTPO2.mjs +0 -4
- package/dist/chunk-TYFBZ3Q7.mjs +0 -1
- package/dist/chunk-YW54CUCP.mjs +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-HTO3HNQS.mjs";import"../../chunk-Y6QUDCQM.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import"../../chunk-HUN2X4VH.mjs";import"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as ContentBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"../../chunk-
|
|
1
|
+
import{c as a}from"../../chunk-Y6QUDCQM.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import"../../chunk-HUN2X4VH.mjs";import"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as FeaturesBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"../../chunk-
|
|
1
|
+
import{c as e}from"../../chunk-Y6QUDCQM.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import"../../chunk-HUN2X4VH.mjs";import"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";var t={title:"Blocks/FeaturesBlock",component:e,tags:["autodocs"],parameters:{layout:"padded"}},i=t,n={args:{title:"What Are Digital Colleagues?",description:"some other words",features:[{icon:{type:"fa-thin",icon:"robot"},title:"AI-Powered Assistants",content:"Digital colleagues are generative AI tools that augment your existing workforce, enhancing productivity and customer experience."},{icon:{type:"fa-thin",icon:"lightbulb"},link:{label:"label",type:"custom",url:"#"},title:"Intelligent Insights",content:"They provide valuable insights and improve ways of working, saving time and boosting efficiency across your organisation."},{icon:{type:"fa-kit",icon:"delivery"},title:"Collaborative Partners (internal link)",content:"Digital colleagues work alongside human employees, assisting with tasks and enhancing overall performance."}]}},a={args:{title:"What Are Digital Colleagues?",features:[{icon:{type:"fa-thin",icon:"robot"},title:"AI-Powered Assistants",content:"Digital colleagues are generative AI tools that augment your existing workforce, enhancing productivity and customer experience."},{icon:{type:"fa-thin",icon:"lightbulb"},title:"Intelligent Insights",content:"They provide valuable insights and improve ways of working, saving time and boosting efficiency across your organisation."}]}},r={args:{title:"What Are Digital Colleagues?",features:[{icon:{type:"fa-thin",icon:"robot"},title:"AI-Powered Assistants",content:"Digital colleagues are generative AI tools that augment your existing workforce, enhancing productivity and customer experience."}]}},s={args:{features:[{icon:{type:"fa-thin",icon:"robot"},title:"AI-Powered Assistants",content:"Digital colleagues are generative AI tools that augment your existing workforce, enhancing productivity and customer experience."},{icon:{type:"fa-thin",icon:"lightbulb"},title:"Intelligent Insights",content:"They provide valuable insights and improve ways of working, saving time and boosting efficiency across your organisation."},{icon:{type:"fa-kit",icon:"delivery"},title:"Collaborative Partners",content:"Digital colleagues work alongside human employees, assisting with tasks and enhancing overall performance."}]}};export{n as Default,s as NoTitle,r as OneFeature,a as TwoFeatures,i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-HUN2X4VH.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as ImageBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as MediaBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-SJWN6J3F.mjs";import"../../chunk-423OEU3K.mjs";import"../../chunk-6P7CY367.mjs";import"../../chunk-Y6QUDCQM.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import"../../chunk-HUN2X4VH.mjs";import"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as RelatedPosts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-IS5OUEJJ.mjs";import"../../chunk-HTO3HNQS.mjs";import"../../chunk-Y6QUDCQM.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import"../../chunk-HUN2X4VH.mjs";import"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as RenderBlocks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d}from"../../chunk-53QLSQCO.mjs";import{a as e}from"../../chunk-6HFYLEVF.mjs";import{a as q}from"../../chunk-
|
|
1
|
+
import{a as d}from"../../chunk-53QLSQCO.mjs";import{a as e}from"../../chunk-6HFYLEVF.mjs";import{a as q}from"../../chunk-SJWN6J3F.mjs";import"../../chunk-423OEU3K.mjs";import{a as f}from"../../chunk-EPTHSTUM.mjs";import{a}from"../../chunk-UZ2XYB7D.mjs";import"../../chunk-KPIWBWE2.mjs";import{a as o}from"../../chunk-JCH2CCQ7.mjs";import"../../chunk-6P7CY367.mjs";import"../../chunk-2LJVMEWU.mjs";import{a as p}from"../../chunk-IS5OUEJJ.mjs";import{a as n}from"../../chunk-HTO3HNQS.mjs";import{a as b}from"../../chunk-H7D3PZKE.mjs";import{a as c}from"../../chunk-IQPZEEYJ.mjs";import{a as g,b as h,c as m}from"../../chunk-Y6QUDCQM.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import{a as l}from"../../chunk-HUN2X4VH.mjs";import{a as k}from"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import{a as j}from"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import{a as i}from"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{g as BannerBlock,h as CallToActionBlock,j as CodeBlock,n as ContentBlock,i as CopyButton,m as FeaturesBlock,o as HeadingImage,l as ImageBlock,b as InfoTile,a as Insight,c as MOTD,k as MediaBlock,d as OrgChart,e as ProposalSummary,q as RelatedPosts,p as RenderBlocks,f as WhyUs};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
"use client"
|
|
5
5
|
'use client'
|
|
6
6
|
|
|
7
|
-
"use strict";"use server";var Wt=Object.create;var Se=Object.defineProperty;var Gt=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var _t=Object.getPrototypeOf,$t=Object.prototype.hasOwnProperty;var Kt=(e,t)=>{for(var o in t)Se(e,o,{get:t[o],enumerable:!0})},Ye=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ut(t))!$t.call(e,s)&&s!==o&&Se(e,s,{get:()=>t[s],enumerable:!(r=Gt(t,s))||r.enumerable});return e};var z=(e,t,o)=>(o=e!=null?Wt(_t(e)):{},Ye(t||!e||!e.__esModule?Se(o,"default",{value:e,enumerable:!0}):o,e)),jt=e=>Ye(Se({},"__esModule",{value:!0}),e);var Vo={};Kt(Vo,{CRMPage:()=>Ho});module.exports=jt(Vo);var J={deals:[],customers:[],categories:[{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"}]};async function et(){return J}async function tt(e){let t={id:Date.now().toString(),...e,lastModified:new Date().toISOString(),comments:[]};return J.deals.push(t),t}async function ot(e){let t=J.deals.findIndex(o=>o.id===e.id);if(t!==-1)return J.deals[t]={...e,lastModified:new Date().toISOString()},J.deals[t];throw new Error("Deal not found")}async function rt(e){let t={id:Date.now().toString(),...e};return J.customers.push(t),t}async function at(e,t){let o=J.deals.find(r=>r.id===e);if(o){let r={id:Date.now().toString(),...t};return o.comments.push(r),o.lastModified=new Date().toISOString(),r}throw new Error("Deal not found")}async function it(e,t){let o=J.deals.find(r=>r.id===e);if(o)return o.description=t,o.lastModified=new Date().toISOString(),o;throw new Error("Deal not found")}var fe=require("react");var he=z(require("react")),A=z(require("@radix-ui/react-dialog")),gt=require("lucide-react");var ft=require("clsx");var He="-",qt=e=>{let t=Xt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{let i=a.split(He);return i[0]===""&&i.length!==1&&i.shift(),lt(i,t)||Qt(a)},getConflictingClassGroupIds:(a,i)=>{let b=o[a]||[];return i&&r[a]?[...b,...r[a]]:b}}},lt=(e,t)=>{var a;if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),s=r?lt(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(He);return(a=t.validators.find(({validator:i})=>i(n)))==null?void 0:a.classGroupId},st=/^\[(.+)\]$/,Qt=e=>{if(st.test(e)){let t=st.exec(e)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Xt=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return Zt(Object.entries(e.classGroups),o).forEach(([n,a])=>{ze(a,r,n,t)}),r},ze=(e,t,o,r)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:nt(t,s);n.classGroupId=o;return}if(typeof s=="function"){if(Jt(s)){ze(s(r),t,o,r);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([n,a])=>{ze(a,nt(t,n),o,r)})})},nt=(e,t)=>{let o=e;return t.split(He).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},Jt=e=>e.isThemeGetter,Zt=(e,t)=>t?e.map(([o,r])=>{let s=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([a,i])=>[t+a,i])):n);return[o,s]}):e,Yt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,s=(n,a)=>{o.set(n,a),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let a=o.get(n);if(a!==void 0)return a;if((a=r.get(n))!==void 0)return s(n,a),a},set(n,a){o.has(n)?o.set(n,a):s(n,a)}}},ct="!",eo=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,s=t[0],n=t.length,a=i=>{let b=[],x=0,w=0,c;for(let u=0;u<i.length;u++){let N=i[u];if(x===0){if(N===s&&(r||i.slice(u,u+n)===t)){b.push(i.slice(w,u)),w=u+n;continue}if(N==="/"){c=u;continue}}N==="["?x++:N==="]"&&x--}let g=b.length===0?i:i.substring(w),T=g.startsWith(ct),I=T?g.substring(1):g,R=c&&c>w?c-w:void 0;return{modifiers:b,hasImportantModifier:T,baseClassName:I,maybePostfixModifierPosition:R}};return o?i=>o({className:i,parseClassName:a}):a},to=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},oo=e=>({cache:Yt(e.cacheSize),parseClassName:eo(e),...qt(e)}),ro=/\s+/,ao=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:s}=t,n=[],a=e.trim().split(ro),i="";for(let b=a.length-1;b>=0;b-=1){let x=a[b],{modifiers:w,hasImportantModifier:c,baseClassName:g,maybePostfixModifierPosition:T}=o(x),I=!!T,R=r(I?g.substring(0,T):g);if(!R){if(!I){i=x+(i.length>0?" "+i:i);continue}if(R=r(g),!R){i=x+(i.length>0?" "+i:i);continue}I=!1}let u=to(w).join(":"),N=c?u+ct:u,M=N+R;if(n.includes(M))continue;n.push(M);let X=s(R,I);for(let _=0;_<X.length;++_){let v=X[_];n.push(N+v)}i=x+(i.length>0?" "+i:i)}return i};function io(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=dt(t))&&(r&&(r+=" "),r+=o);return r}var dt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=dt(e[r]))&&(o&&(o+=" "),o+=t);return o};function so(e,...t){let o,r,s,n=a;function a(b){let x=t.reduce((w,c)=>c(w),e());return o=oo(x),r=o.cache.get,s=o.cache.set,n=i,i(b)}function i(b){let x=r(b);if(x)return x;let w=ao(b,o);return s(b,w),w}return function(){return n(io.apply(null,arguments))}}var D=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},mt=/^\[(?:([a-z-]+):)?(.+)\]$/i,no=/^\H+\/\H+$/,lo=new Set(["px","full","screen"]),co=/^(\H+(\.\H+)?)?(xs|sm|md|lg|xl)$/,mo=/\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$/,po=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uo=/^(inset_)?-?((\H+)?\.?(\H+)[a-z]+|0)_-?((\H+)?\.?(\H+)[a-z]+|0)/,fo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,K=e=>de(e)||lo.has(e)||no.test(e),Z=e=>me(e,"length",Co),de=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>me(e,"number",de),ve=e=>!!e&&Number.isInteger(Number(e)),go=e=>e.endsWith("%")&&de(e.slice(0,-1)),m=e=>mt.test(e),Y=e=>co.test(e),bo=new Set(["length","size","percentage"]),vo=e=>me(e,bo,pt),yo=e=>me(e,"position",pt),ho=new Set(["image","url"]),xo=e=>me(e,ho,No),wo=e=>me(e,"",Do),ye=()=>!0,me=(e,t,o)=>{let r=mt.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Co=e=>mo.test(e)&&!po.test(e),pt=()=>!1,Do=e=>uo.test(e),No=e=>fo.test(e);var So=()=>{let e=D("colors"),t=D("spacing"),o=D("blur"),r=D("brightness"),s=D("borderColor"),n=D("borderRadius"),a=D("borderSpacing"),i=D("borderWidth"),b=D("contrast"),x=D("grayscale"),w=D("hueRotate"),c=D("invert"),g=D("gap"),T=D("gradientColorStops"),I=D("gradientColorStopPositions"),R=D("inset"),u=D("margin"),N=D("opacity"),M=D("padding"),X=D("saturate"),_=D("scale"),v=D("sepia"),y=D("skew"),C=D("space"),B=D("translate"),E=()=>["auto","contain","none"],ce=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",m,t],h=()=>[m,t],ge=()=>["",K,Z],ae=()=>["auto",de,m],Xe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ne=()=>["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"],Ee=()=>["start","end","center","between","around","evenly","stretch"],be=()=>["","0",m],Ze=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[de,m];return{cacheSize:500,separator:":",theme:{colors:[ye],spacing:[K,Z],blur:["none","",Y,m],brightness:$(),borderColor:[e],borderRadius:["none","","full",Y,m],borderSpacing:h(),borderWidth:ge(),contrast:$(),grayscale:be(),hueRotate:$(),invert:be(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[go,Z],inset:re(),margin:re(),opacity:$(),padding:h(),saturate:$(),scale:$(),sepia:be(),skew:$(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[Y]}],"break-after":[{"break-after":Ze()}],"break-before":[{"break-before":Ze()}],"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:[...Xe(),m]}],overflow:[{overflow:ce()}],"overflow-x":[{"overflow-x":ce()}],"overflow-y":[{"overflow-y":ce()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ve,m]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:be()}],shrink:[{shrink:be()}],order:[{order:["first","last","none",ve,m]}],"grid-cols":[{"grid-cols":[ye]}],"col-start-end":[{col:["auto",{span:["full",ve,m]},m]}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":[ye]}],"row-start-end":[{row:["auto",{span:[ve,m]},m]}],"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",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ee(),"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:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],mt:[{mt:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[Y]},Y]}],h:[{h:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Y,Z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Be]}],"font-family":[{font:[ye]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",m]}],"line-clamp":[{"line-clamp":["none",de,Be]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",K,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",K,Z]}],"underline-offset":[{"underline-offset":["auto",K,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Xe(),yo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",vo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","H","tl"]},xo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[I]}],"gradient-via-pos":[{via:[I]}],"gradient-to-pos":[{to:[I]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-H":[{"rounded-H":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-gt":[{"rounded-gt":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-H":[{"border-H":[i]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...Ne(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:Ne()}],"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-H":[{"border-H":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Ne()]}],"outline-offset":[{"outline-offset":[K,m]}],"outline-w":[{outline:[K,Z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[K,Z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Y,wo]}],"shadow-color":[{shadow:[ye]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...Je(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Je()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[b]}],"drop-shadow":[{"drop-shadow":["","none",Y,m]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[c]}],saturate:[{saturate:[X]}],sepia:[{sepia:[v]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[b]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[X]}],"backdrop-sepia":[{"backdrop-sepia":[v]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[ve,m]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[y]}],"skew-y":[{"skew-y":[y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","gt-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[K,Z,Be]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-H","rounded-ss","rounded-gt","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-gt","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-H":["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-H"],"border-w-x":["border-w-r","border-w-H"],"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-H"],"border-color-x":["border-color-r","border-color-H"],"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 ut=so(So);function p(...e){return ut((0,ft.clsx)(e))}var H=require("react/jsx-runtime"),ee=A.Root,Pe=A.Trigger,Po=A.Portal;var bt=he.forwardRef(({className:e,...t},o)=>(0,H.jsx)(A.Overlay,{ref:o,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));bt.displayName=A.Overlay.displayName;var j=he.forwardRef(({className:e,children:t,...o},r)=>(0,H.jsxs)(Po,{children:[(0,H.jsx)(bt,{}),(0,H.jsxs)(A.Content,{ref:r,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,H.jsxs)(A.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)(gt.X,{className:"h-4 w-4"}),(0,H.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));j.displayName=A.Content.displayName;var q=({className:e,...t})=>(0,H.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});q.displayName="DialogHeader";var Ro=({className:e,...t})=>(0,H.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ro.displayName="DialogFooter";var Q=he.forwardRef(({className:e,...t},o)=>(0,H.jsx)(A.Title,{ref:o,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));Q.displayName=A.Title.displayName;var ko=he.forwardRef(({className:e,...t},o)=>(0,H.jsx)(A.Description,{ref:o,className:p("text-sm text-muted-foreground",e),...t}));ko.displayName=A.Description.displayName;var vt=require("class-variance-authority");var Lo=(0,vt.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 pe({className:e,variant:t,...o}){return(0,H.jsx)("div",{className:p(Lo({variant:t}),e),...o})}var ht=z(require("react")),Ve=z(require("@radix-ui/react-label"));var To=(0,vt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),S=ht.forwardRef(({className:e,...t},o)=>(0,H.jsx)(Ve.Root,{ref:o,className:p(To(),e),...t}));S.displayName=Ve.Root.displayName;var Ct=require("@radix-ui/react-slot"),Nt=z(require("react")),Ao=(0,vt.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"}}}),V=Nt.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...s},n)=>(0,H.jsx)(e?Ct.Slot:"button",{className:p(Ao({className:t,size:o,variant:r})),ref:n,...s}));V.displayName="Button";var Pt=z(require("react"));var G=Pt.forwardRef(({className:e,type:t,...o},r)=>(0,H.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));G.displayName="Input";var kt=z(require("react")),ie=kt.forwardRef(({className:e,...t},o)=>(0,H.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));ie.displayName="Textarea";var Oe=z(require("react")),W=z(require("@radix-ui/react-scroll-area"));var xe=Oe.forwardRef(({className:e,children:t,...o},r)=>(0,H.jsxs)(W.Root,{ref:r,className:p("relative overflow-hidden",e),...o,children:[(0,H.jsx)(W.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,H.jsx)(Tt,{}),(0,H.jsx)(W.Corner,{})]}));xe.displayName=W.Root.displayName;var Tt=Oe.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,H.jsx)(W.ScrollAreaScrollbar,{ref:r,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-H border-H-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"})}));Tt.displayName=W.ScrollAreaScrollbar.displayName;function Fe({deal:e,customer:t,categories:o,onClose:r,onEdit:s,onAddComment:n,onUpdateDescription:a}){let[i,b]=(0,fe.useState)(""),[x,w]=(0,fe.useState)(e.description||""),[c,g]=(0,fe.useState)(!1),T=u=>{switch(u){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"}},I=()=>{i.trim()&&(n({id:Date.now().toString(),text:i,author:"Current User",timestamp:new Date().toISOString()}),b(""))},R=()=>{a(x),g(!1)};return(0,H.jsx)(ee,{open:!0,onOpenChange:r,children:(0,H.jsxs)(j,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col",children:[(0,H.jsx)(q,{children:(0,H.jsx)(Q,{className:"text-2xl font-bold",children:t==null?void 0:t.name})}),(0,H.jsx)(xe,{className:"flex-grow pr-4",children:(0,H.jsxs)("div",{className:"grid gap-6",children:[(0,H.jsxs)("div",{className:"flex justify-between items-center",children:[(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(gt.DollarSignIcon,{className:"w-6 h-6 text-green-600"}),(0,H.jsxs)("span",{className:"text-3xl font-bold text-green-600",children:["$",e.value.toLocaleString()]})]}),(0,H.jsx)(V,{onClick:s,children:"Edit Deal"})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(S,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(gt.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:e.assignee})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(S,{className:"text-sm font-medium text-gray-500",children:"Description"}),c?(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(ie,{value:x,onChange:u=>w(u.target.value),className:"flex-grow"}),(0,H.jsx)(V,{onClick:R,children:"Save"})]}):(0,H.jsxs)("div",{className:"flex items-center justify-between",children:[(0,H.jsx)("p",{className:"text-gray-700",children:e.description||"No description"}),(0,H.jsx)(V,{variant:"outline",size:"sm",onClick:()=>g(!0),children:"Edit"})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(S,{className:"text-sm font-medium text-gray-500",children:"Status"}),(0,H.jsx)(pe,{variant:"outline",className:"w-fit",children:e.status})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(S,{className:"text-sm font-medium text-gray-500",children:"Categories"}),(0,H.jsx)("div",{className:"flex flex-wrap gap-2",children:e.categories.map(u=>{let N=o.find(M=>M.id===u);return N?(0,H.jsx)(pe,{variant:"secondary",className:T(N.type),children:N.name},N.id):null})})]}),(0,H.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(S,{className:"text-sm font-medium text-gray-500",children:"Date Logged"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(gt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:new Date(e.dateLogged).toLocaleDateString()})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(S,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(gt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:new Date(e.closureDate).toLocaleDateString()})]})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(S,{className:"text-sm font-medium text-gray-500",children:"Last Modified"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(gt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:new Date(e.lastModified).toLocaleString()})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(S,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,H.jsx)("div",{className:"space-y-2",children:e.comments.map(u=>(0,H.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,H.jsx)("p",{className:"text-sm text-gray-700",children:u.text}),(0,H.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[u.author," - ",new Date(u.timestamp).toLocaleString()]})]},u.id))}),(0,H.jsxs)("div",{className:"flex mt-2",children:[(0,H.jsx)(G,{value:i,onChange:u=>b(u.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,H.jsxs)(V,{onClick:I,className:"ml-2",children:[(0,H.jsx)(gt.MessageSquareIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]})]})})]})})}var f=z(require("@radix-ui/react-select")),oe=z(require("react")),We=f.Root;var Ge=f.Value,ke=oe.forwardRef(({children:e,className:t,...o},r)=>(0,H.jsxs)(f.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...o,children:[e,(0,H.jsx)(f.Icon,{asChild:!0,children:(0,H.jsx)(gt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ke.displayName=f.Trigger.displayName;var At=oe.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,H.jsx)(gt.ChevronUp,{className:"h-4 w-4"})}));At.displayName=f.ScrollUpButton.displayName;var It=oe.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,H.jsx)(gt.ChevronDown,{className:"h-4 w-4"})}));It.displayName=f.ScrollDownButton.displayName;var Le=oe.forwardRef(({children:e,className:t,position:o="popper",...r},s)=>(0,H.jsx)(f.Portal,{children:(0,H.jsxs)(f.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",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,...r,children:[(0,H.jsx)(At,{}),(0,H.jsx)(f.Viewport,{className:p("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,H.jsx)(It,{})]})}));Le.displayName=f.Content.displayName;var Io=oe.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Io.displayName=f.Label.displayName;var Te=oe.forwardRef(({children:e,className:t,...o},r)=>(0,H.jsxs)(f.Item,{className:p("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:r,...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)(f.ItemIndicator,{children:(0,H.jsx)(gt.Check,{className:"h-4 w-4"})})}),(0,H.jsx)(f.ItemText,{children:e})]}));Te.displayName=f.Item.displayName;var Mo=oe.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Mo.displayName=f.Separator.displayName;var we=z(require("@radix-ui/react-checkbox")),Et=z(require("react")),Ce=Et.forwardRef(({className:e,...t},o)=>(0,H.jsx)(we.Root,{className:p("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,H.jsx)(we.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,H.jsx)(gt.Check,{className:"h-4 w-4"})})}));Ce.displayName=we.Root.displayName;function Ue({onSubmit:e}){let[t,o]=(0,fe.useState)({name:"",intro:"",active:!0});return(0,H.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({id:Date.now().toString(),...t}),o({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{htmlFor:"customerName",children:"Customer Name"}),(0,H.jsx)(G,{id:"customerName",value:t.name,onChange:s=>o({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{htmlFor:"customerIntro",children:"Intro"}),(0,H.jsx)(ie,{id:"customerIntro",value:t.intro,onChange:s=>o({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(Ce,{id:"activeCustomer",checked:t.active,onCheckedChange:s=>o({...t,active:s})}),(0,H.jsx)(S,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,H.jsx)(V,{type:"submit",className:"w-full",children:"Add Customer"})]})}function De({customers:e,categories:t,onSubmit:o,onUpdate:r,initialDeal:s,onAddCustomer:n}){let[a,i]=(0,fe.useState)({customerId:"",value:0,assignee:"",status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",lastModified:new Date().toISOString(),comments:[],description:""});(0,fe.useEffect)(()=>{s&&i(s)},[s]);let b=async c=>{if(c.preventDefault(),a.customerId&&a.value&&a.assignee&&a.closureDate)if(!s)await o(a);else{let g={...a,id:s.id};await r(g)}},x=c=>{i(g=>({...g,categories:g.categories.includes(c)?g.categories.filter(T=>T!==c):[...g.categories,c]}))},w=c=>{switch(c){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"}};return(0,H.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,H.jsx)(xe,{className:"h-[60vh] pr-4 mx-2",children:(0,H.jsxs)("div",{className:"space-y-6 mx-2",children:[(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{htmlFor:"customer",children:"Customer"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsxs)(We,{value:a.customerId,onValueChange:c=>i({...a,customerId:c}),children:[(0,H.jsx)(ke,{className:"flex-grow",children:(0,H.jsx)(Ge,{placeholder:"Select customer"})}),(0,H.jsx)(Le,{children:e.map(c=>(0,H.jsx)(Te,{value:c.id,children:c.name},c.id))})]}),(0,H.jsxs)(ee,{children:[(0,H.jsx)(Pe,{asChild:!0,children:(0,H.jsxs)(V,{type:"button",size:"icon",variant:"outline",children:[(0,H.jsx)(gt.PlusCircle,{className:"h-4 w-4"}),(0,H.jsx)("span",{className:"sr-only",children:"Add new customer"})]})}),(0,H.jsxs)(j,{children:[(0,H.jsx)(q,{children:(0,H.jsx)(Q,{children:"Add New Customer"})}),(0,H.jsx)(Ue,{onSubmit:n})]})]})]})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{htmlFor:"value",children:"Value"}),(0,H.jsx)(G,{id:"value",type:"number",value:a.value||"",onChange:c=>i({...a,value:Number.parseFloat(c.target.value)}),placeholder:"Enter deal value"})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{htmlFor:"assignee",children:"Assignee"}),(0,H.jsx)(G,{id:"assignee",value:a.assignee||"",onChange:c=>i({...a,assignee:c.target.value}),placeholder:"Enter assignee name"})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{htmlFor:"description",children:"Description"}),(0,H.jsx)(ie,{id:"description",value:a.description||"",onChange:c=>i({...a,description:c.target.value}),placeholder:"Enter deal description"})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{htmlFor:"status",children:"Status"}),(0,H.jsxs)(We,{value:a.status,onValueChange:c=>i({...a,status:c}),children:[(0,H.jsx)(ke,{children:(0,H.jsx)(Ge,{placeholder:"Select status"})}),(0,H.jsx)(Le,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(c=>(0,H.jsx)(Te,{value:c,children:c},c))})]})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{children:"Categories"}),(0,H.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(c=>(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)("h4",{className:"text-sm font-medium",children:c.charAt(0).toUpperCase()+c.slice(1)}),(0,H.jsx)("div",{className:"grid grid-cols-2 gap-2",children:t.filter(g=>g.type===c).map(g=>(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(Ce,{id:g.id,checked:a.categories.includes(g.id),onCheckedChange:()=>x(g.id)}),(0,H.jsx)("label",{htmlFor:g.id,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${w(g.type)}`,children:g.name})]},g.id))})]},c))})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{htmlFor:"dateLogged",children:"Date Logged"}),(0,H.jsx)(G,{id:"dateLogged",type:"date",value:a.dateLogged,onChange:c=>i({...a,dateLogged:c.target.value})})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(S,{htmlFor:"closureDate",children:"Closure Date"}),(0,H.jsx)(G,{id:"closureDate",type:"date",value:a.closureDate,onChange:c=>i({...a,closureDate:c.target.value})})]})]})}),(0,H.jsx)(V,{type:"submit",className:"w-full",children:s?"Update Deal":"Add Deal"})]})}var ne=z(require("react"));var _e=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));_e.displayName="Card";var $e=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("flex flex-col space-y-1.5 p-6",e),...t}));$e.displayName="CardHeader";var Ke=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("font-semibold leading-none tracking-tight",e),...t}));Ke.displayName="CardTitle";var Eo=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("text-sm text-muted-foreground",e),...t}));Eo.displayName="CardDescription";var je=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("p-6 pt-0",e),...t}));je.displayName="CardContent";var Bo=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("flex items-center p-6 pt-0",e),...t}));Bo.displayName="CardFooter";function Ht({deal:e,customer:t,categories:o,onClick:r}){let s=o.find(n=>n.type==="proposition"&&e.categories.includes(n.id));return(0,H.jsxs)(_e,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-H-4 border-H-accent",onClick:r,children:[(0,H.jsxs)($e,{className:"pb-2",children:[(0,H.jsxs)("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}),t&&(0,H.jsx)(pe,{variant:t.active?"default":"secondary",children:t.active?"Active":"Inactive"})]}),(0,H.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,H.jsxs)(je,{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)(gt.UserIcon,{className:"w-4 h-4 mr-1"}),(0,H.jsx)("span",{children:e.assignee})]}),(0,H.jsxs)("div",{className:"flex items-center text-lg font-bold text-green-600",children:[(0,H.jsx)(gt.PoundSterling,{className:"w-5 h-5 mr-1"}),(0,H.jsx)("span",{children:e.value.toLocaleString()})]})]}),(0,H.jsxs)("div",{className:"flex justify-between items-center",children:[(0,H.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,H.jsx)(gt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,H.jsx)("span",{children:new Date(e.lastModified).toLocaleDateString()})]}),s&&(0,H.jsx)(pe,{variant:"secondary",className:"bg-blue-100 text-blue-800",children:s.name})]})]})]})}var Me=require("react-beautiful-dnd");function Ot({status:e,deals:t,customers:o,categories:r,onDealClick:s,calculateColumnValue:n,calculateWeightedValue:a,addNewDeal:i,updateDeal:b,onAddCustomer:x}){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}),i&&(0,H.jsxs)(ee,{children:[(0,H.jsx)(Pe,{asChild:!0,children:(0,H.jsxs)(V,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,H.jsx)(gt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,H.jsxs)(j,{children:[(0,H.jsx)(q,{children:(0,H.jsx)(Q,{children:"Add New Deal"})}),(0,H.jsx)(De,{customers:o,categories:r,onSubmit:i,onUpdate:b,onAddCustomer:x})]})]}),(0,H.jsx)(Me.Droppable,{droppableId:e,children:w=>(0,H.jsxs)("div",{ref:w.innerRef,...w.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((c,g)=>(0,H.jsx)(Me.Draggable,{draggableId:c.id,index:g,children:T=>(0,H.jsx)("div",{ref:T.innerRef,...T.draggableProps,...T.dragHandleProps,children:(0,H.jsx)(Ht,{deal:c,customer:o.find(I=>I.id===c.customerId),categories:r,onClick:()=>s(c)})})},c.id)),w.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:["$",n(t).toLocaleString()]})]}),(0,H.jsxs)("p",{className:"font-semibold",children:["Weighted: ",(0,H.jsxs)("span",{className:"text-blue-600",children:["$",a(t,e).toLocaleString()]})]})]})]})}var zo=["Cold","Qualified","Proposal Made","Won","Lost"];function qe({initialData:e,addDeal:t,updateDeal:o,addCustomer:r,addComment:s,updateDealDescription:n}){let[a,i]=(0,fe.useState)(e),[b,x]=(0,fe.useState)(null),[w,c]=(0,fe.useState)(null),g=(0,fe.useCallback)(async v=>{let{source:y,destination:C}=v;if(!C||y.droppableId===C.droppableId&&y.index===C.index)return;let B=y.droppableId,E=C.droppableId,ce=[...a.deals],[re]=ce.splice(y.index,1);re.status=E,ce.splice(C.index,0,re);let h=await o(re);i(ge=>({...ge,deals:ge.deals.map(ae=>ae.id===h.id?h:ae)}))},[a,o]),T=async v=>{let y=await t(v);i(C=>({...C,deals:[...C.deals,y]}))},I=async v=>{let y=await o(v);i(C=>({...C,deals:C.deals.map(B=>B.id===y.id?y:B)})),c(null)},R=async(v,y)=>{let C=await s(v,{text:y.text,author:y.author,timestamp:y.timestamp});i(B=>({...B,deals:B.deals.map(E=>E.id===v?{...E,comments:[...E.comments,C],lastModified:new Date().toISOString()}:E)}))},u=v=>a.deals.filter(y=>y.status===v),N=v=>v.reduce((y,C)=>y+C.value,0),M=(v,y)=>{let C={Cold:.2,Qualified:.4,"Proposal Made":.6,Won:1,Lost:0};return v.reduce((B,E)=>B+E.value*C[y],0)},X=async v=>{let y=await r(v);i(C=>({...C,customers:[...C.customers,y]}))},_=async(v,y)=>{let C=await n(v,y);i(B=>({...B,deals:B.deals.map(E=>E.id===C.id?C:E)}))};return(0,H.jsx)(Me.DragDropContext,{onDragEnd:g,children:(0,H.jsxs)("div",{className:"p-4",children:[(0,H.jsx)("h1",{className:"text-3xl font-bold mb-8",children:"CRM Kanban Board"}),(0,H.jsx)("div",{className:"flex space-x-4 overflow-x-auto pb-4",children:zo.map(v=>{let y=u(v);return(0,H.jsx)(Ot,{status:v,deals:y,customers:a.customers,categories:a.categories,onDealClick:x,calculateColumnValue:N,calculateWeightedValue:M,addNewDeal:v==="Cold"?T:void 0,updateDeal:I,onAddCustomer:X},v)})}),b&&(0,H.jsx)(Fe,{deal:b,customer:a.customers.find(v=>v.id===b.customerId),categories:a.categories,onClose:()=>x(null),onEdit:()=>c(b),onAddComment:v=>R(b.id,v),onUpdateDescription:v=>_(b.id,v)}),w&&(0,H.jsx)(ee,{open:!0,onOpenChange:()=>c(null),children:(0,H.jsxs)(j,{className:"sm:max-w-[625px]",children:[(0,H.jsx)(q,{children:(0,H.jsx)(Q,{children:"Edit Deal"})}),(0,H.jsx)(De,{customers:a.customers,categories:a.categories,onSubmit:T,onUpdate:I,initialDeal:w,onAddCustomer:X})]})})]})})}async function Ho(){let e=await et();return(0,H.jsx)("div",{className:"container mx-auto py-10",children:(0,H.jsx)(qe,{initialData:e,addDeal:tt,updateDeal:ot,addCustomer:rt,addComment:at,updateDealDescription:it})})}0&&(module.exports={CRMPage});
|
|
7
|
+
"use strict";"use server";var Wt=Object.create;var Se=Object.defineProperty;var Gt=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var _t=Object.getPrototypeOf,$t=Object.prototype.hasOwnProperty;var jt=(e,t)=>{for(var o in t)Se(e,o,{get:t[o],enumerable:!0})},Ye=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ut(t))!$t.call(e,s)&&s!==o&&Se(e,s,{get:()=>t[s],enumerable:!(r=Gt(t,s))||r.enumerable});return e};var B=(e,t,o)=>(o=e!=null?Wt(_t(e)):{},Ye(t||!e||!e.__esModule?Se(o,"default",{value:e,enumerable:!0}):o,e)),Kt=e=>Ye(Se({},"__esModule",{value:!0}),e);var Vo={};jt(Vo,{CRMPage:()=>Ho});module.exports=Kt(Vo);var X={deals:[],customers:[],categories:[{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"}]};async function et(){return X}async function tt(e){let t={id:Date.now().toString(),...e,lastModified:new Date().toISOString(),comments:[]};return X.deals.push(t),t}async function ot(e){let t=X.deals.findIndex(o=>o.id===e.id);if(t!==-1)return X.deals[t]={...e,lastModified:new Date().toISOString()},X.deals[t];throw new Error("Deal not found")}async function rt(e){let t={id:Date.now().toString(),...e};return X.customers.push(t),t}async function at(e,t){let o=X.deals.find(r=>r.id===e);if(o){let r={id:Date.now().toString(),...t};return o.comments.push(r),o.lastModified=new Date().toISOString(),r}throw new Error("Deal not found")}async function it(e,t){let o=X.deals.find(r=>r.id===e);if(o)return o.description=t,o.lastModified=new Date().toISOString(),o;throw new Error("Deal not found")}var pe=require("react");var ve=B(require("react")),T=B(require("@radix-ui/react-dialog")),gt=require("lucide-react");var ft=require("clsx");var He="-",qt=e=>{let t=Xt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{let i=a.split(He);return i[0]===""&&i.length!==1&&i.shift(),lt(i,t)||Qt(a)},getConflictingClassGroupIds:(a,i)=>{let b=o[a]||[];return i&&r[a]?[...b,...r[a]]:b}}},lt=(e,t)=>{var a;if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),s=r?lt(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(He);return(a=t.validators.find(({validator:i})=>i(n)))==null?void 0:a.classGroupId},st=/^\[(.+)\]$/,Qt=e=>{if(st.test(e)){let t=st.exec(e)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Xt=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return Zt(Object.entries(e.classGroups),o).forEach(([n,a])=>{Be(a,r,n,t)}),r},Be=(e,t,o,r)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:nt(t,s);n.classGroupId=o;return}if(typeof s=="function"){if(Jt(s)){Be(s(r),t,o,r);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([n,a])=>{Be(a,nt(t,n),o,r)})})},nt=(e,t)=>{let o=e;return t.split(He).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},Jt=e=>e.isThemeGetter,Zt=(e,t)=>t?e.map(([o,r])=>{let s=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([a,i])=>[t+a,i])):n);return[o,s]}):e,Yt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,s=(n,a)=>{o.set(n,a),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let a=o.get(n);if(a!==void 0)return a;if((a=r.get(n))!==void 0)return s(n,a),a},set(n,a){o.has(n)?o.set(n,a):s(n,a)}}},ct="!",eo=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,s=t[0],n=t.length,a=i=>{let b=[],x=0,w=0,l;for(let u=0;u<i.length;u++){let S=i[u];if(x===0){if(S===s&&(r||i.slice(u,u+n)===t)){b.push(i.slice(w,u)),w=u+n;continue}if(S==="/"){l=u;continue}}S==="["?x++:S==="]"&&x--}let g=b.length===0?i:i.substring(w),L=g.startsWith(ct),I=L?g.substring(1):g,R=l&&l>w?l-w:void 0;return{modifiers:b,hasImportantModifier:L,baseClassName:I,maybePostfixModifierPosition:R}};return o?i=>o({className:i,parseClassName:a}):a},to=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},oo=e=>({cache:Yt(e.cacheSize),parseClassName:eo(e),...qt(e)}),ro=/\s+/,ao=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:s}=t,n=[],a=e.trim().split(ro),i="";for(let b=a.length-1;b>=0;b-=1){let x=a[b],{modifiers:w,hasImportantModifier:l,baseClassName:g,maybePostfixModifierPosition:L}=o(x),I=!!L,R=r(I?g.substring(0,L):g);if(!R){if(!I){i=x+(i.length>0?" "+i:i);continue}if(R=r(g),!R){i=x+(i.length>0?" "+i:i);continue}I=!1}let u=to(w).join(":"),S=l?u+ct:u,M=S+R;if(n.includes(M))continue;n.push(M);let Q=s(R,I);for(let U=0;U<Q.length;++U){let v=Q[U];n.push(S+v)}i=x+(i.length>0?" "+i:i)}return i};function io(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=dt(t))&&(r&&(r+=" "),r+=o);return r}var dt=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=dt(e[r]))&&(o&&(o+=" "),o+=t);return o};function so(e,...t){let o,r,s,n=a;function a(b){let x=t.reduce((w,l)=>l(w),e());return o=oo(x),r=o.cache.get,s=o.cache.set,n=i,i(b)}function i(b){let x=r(b);if(x)return x;let w=ao(b,o);return s(b,w),w}return function(){return n(io.apply(null,arguments))}}var D=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},mt=/^\[(?:([a-z-]+):)?(.+)\]$/i,no=/^\H+\/\H+$/,lo=new Set(["px","full","screen"]),co=/^(\H+(\.\H+)?)?(xs|sm|md|lg|xl)$/,mo=/\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$/,po=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uo=/^(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=>de(e)||lo.has(e)||no.test(e),J=e=>me(e,"length",Co),de=e=>!!e&&!Number.isNaN(Number(e)),ze=e=>me(e,"number",de),ge=e=>!!e&&Number.isInteger(Number(e)),go=e=>e.endsWith("%")&&de(e.slice(0,-1)),m=e=>mt.test(e),Z=e=>co.test(e),bo=new Set(["length","size","percentage"]),vo=e=>me(e,bo,pt),yo=e=>me(e,"position",pt),ho=new Set(["image","url"]),xo=e=>me(e,ho,So),wo=e=>me(e,"",Do),be=()=>!0,me=(e,t,o)=>{let r=mt.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Co=e=>mo.test(e)&&!po.test(e),pt=()=>!1,Do=e=>uo.test(e),So=e=>fo.test(e);var No=()=>{let e=D("colors"),t=D("spacing"),o=D("blur"),r=D("brightness"),s=D("borderColor"),n=D("borderRadius"),a=D("borderSpacing"),i=D("borderWidth"),b=D("contrast"),x=D("grayscale"),w=D("hueRotate"),l=D("invert"),g=D("gap"),L=D("gradientColorStops"),I=D("gradientColorStopPositions"),R=D("inset"),u=D("margin"),S=D("opacity"),M=D("padding"),Q=D("saturate"),U=D("scale"),v=D("sepia"),y=D("skew"),C=D("space"),z=D("translate"),E=()=>["auto","contain","none"],ce=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",m,t],h=()=>[m,t],ue=()=>["",$,J],ae=()=>["auto",de,m],Xe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["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"],Ee=()=>["start","end","center","between","around","evenly","stretch"],fe=()=>["","0",m],Ze=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>[de,m];return{cacheSize:500,separator:":",theme:{colors:[be],spacing:[$,J],blur:["none","",Z,m],brightness:_(),borderColor:[e],borderRadius:["none","","full",Z,m],borderSpacing:h(),borderWidth:ue(),contrast:_(),grayscale:fe(),hueRotate:_(),invert:fe(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[go,J],inset:re(),margin:re(),opacity:_(),padding:h(),saturate:_(),scale:_(),sepia:fe(),skew:_(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[Z]}],"break-after":[{"break-after":Ze()}],"break-before":[{"break-before":Ze()}],"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:[...Xe(),m]}],overflow:[{overflow:ce()}],"overflow-x":[{"overflow-x":ce()}],"overflow-y":[{"overflow-y":ce()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ge,m]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:fe()}],shrink:[{shrink:fe()}],order:[{order:["first","last","none",ge,m]}],"grid-cols":[{"grid-cols":[be]}],"col-start-end":[{col:["auto",{span:["full",ge,m]},m]}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":[be]}],"row-start-end":[{row:["auto",{span:[ge,m]},m]}],"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",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ee(),"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:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],mt:[{mt:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[Z]},Z]}],h:[{h:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Z,J]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ze]}],"font-family":[{font:[be]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",m]}],"line-clamp":[{"line-clamp":["none",de,ze]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$,J]}],"underline-offset":[{"underline-offset":["auto",$,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Xe(),yo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",vo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},xo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[I]}],"gradient-via-pos":[{via:[I]}],"gradient-to-pos":[{to:[I]}],"gradient-from":[{from:[L]}],"gradient-via":[{via:[L]}],"gradient-to":[{to:[L]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-gt":[{"rounded-gt":[n]}],"rounded-H":[{"rounded-H":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...De(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:De()}],"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:["",...De()]}],"outline-offset":[{"outline-offset":[$,m]}],"outline-w":[{outline:[$,J]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[$,J]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Z,wo]}],"shadow-color":[{shadow:[be]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...Je(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Je()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[b]}],"drop-shadow":[{"drop-shadow":["","none",Z,m]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[l]}],saturate:[{saturate:[Q]}],sepia:[{sepia:[v]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[b]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[l]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[Q]}],"backdrop-sepia":[{"backdrop-sepia":[v]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:_()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:_()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[U]}],"scale-x":[{"scale-x":[U]}],"scale-y":[{"scale-y":[U]}],rotate:[{rotate:[ge,m]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[y]}],"skew-y":[{"skew-y":[y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","gt-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$,J,ze]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-gt","rounded-H","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-gt","rounded-H"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ut=so(No);function p(...e){return ut((0,ft.clsx)(e))}var H=require("react/jsx-runtime"),Y=T.Root,Ne=T.Trigger,Po=T.Portal;var bt=ve.forwardRef(({className:e,...t},o)=>(0,H.jsx)(T.Overlay,{ref:o,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));bt.displayName=T.Overlay.displayName;var j=ve.forwardRef(({className:e,children:t,...o},r)=>(0,H.jsxs)(Po,{children:[(0,H.jsx)(bt,{}),(0,H.jsxs)(T.Content,{ref:r,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,H.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,H.jsx)(gt.X,{className:"h-4 w-4"}),(0,H.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));j.displayName=T.Content.displayName;var K=({className:e,...t})=>(0,H.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});K.displayName="DialogHeader";var Ro=({className:e,...t})=>(0,H.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ro.displayName="DialogFooter";var q=ve.forwardRef(({className:e,...t},o)=>(0,H.jsx)(T.Title,{ref:o,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));q.displayName=T.Title.displayName;var ko=ve.forwardRef(({className:e,...t},o)=>(0,H.jsx)(T.Description,{ref:o,className:p("text-sm text-muted-foreground",e),...t}));ko.displayName=T.Description.displayName;var vt=require("class-variance-authority");var Lo=(0,vt.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 ye({className:e,variant:t,...o}){return(0,H.jsx)("div",{className:p(Lo({variant:t}),e),...o})}var ht=B(require("react")),Ve=B(require("@radix-ui/react-label"));var To=(0,vt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),N=ht.forwardRef(({className:e,...t},o)=>(0,H.jsx)(Ve.Root,{ref:o,className:p(To(),e),...t}));N.displayName=Ve.Root.displayName;var Ct=require("@radix-ui/react-slot"),St=B(require("react")),Ao=(0,vt.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"}}}),V=St.forwardRef(({asChild:e=!1,className:t,size:o,variant:r,...s},n)=>(0,H.jsx)(e?Ct.Slot:"button",{className:p(Ao({className:t,size:o,variant:r})),ref:n,...s}));V.displayName="Button";var Pt=B(require("react"));var G=Pt.forwardRef(({className:e,type:t,...o},r)=>(0,H.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));G.displayName="Input";var kt=B(require("react")),ie=kt.forwardRef(({className:e,...t},o)=>(0,H.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));ie.displayName="Textarea";var Oe=B(require("react")),F=B(require("@radix-ui/react-scroll-area"));var he=Oe.forwardRef(({className:e,children:t,...o},r)=>(0,H.jsxs)(F.Root,{ref:r,className:p("relative overflow-hidden",e),...o,children:[(0,H.jsx)(F.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,H.jsx)(Tt,{}),(0,H.jsx)(F.Corner,{})]}));he.displayName=F.Root.displayName;var Tt=Oe.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,H.jsx)(F.ScrollAreaScrollbar,{ref:r,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,H.jsx)(F.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Tt.displayName=F.ScrollAreaScrollbar.displayName;function Fe({deal:e,customer:t,categories:o,onClose:r,onEdit:s,onAddComment:n,onUpdateDescription:a}){let[i,b]=(0,pe.useState)(""),[x,w]=(0,pe.useState)(e.description||""),[l,g]=(0,pe.useState)(!1),L=u=>{switch(u){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"}},I=()=>{i.trim()&&(n({id:Date.now().toString(),text:i,author:"Current User",timestamp:new Date().toISOString()}),b(""))},R=()=>{a(x),g(!1)};return(0,H.jsx)(Y,{open:!0,onOpenChange:r,children:(0,H.jsxs)(j,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col",children:[(0,H.jsx)(K,{children:(0,H.jsx)(q,{className:"text-2xl font-bold",children:t==null?void 0:t.name})}),(0,H.jsx)(he,{className:"flex-grow pr-4",children:(0,H.jsxs)("div",{className:"grid gap-6",children:[(0,H.jsxs)("div",{className:"flex justify-between items-center",children:[(0,H.jsx)("div",{className:"flex items-center space-x-2",children:(0,H.jsxs)("span",{className:"text-3xl font-bold text-green-600",children:["\xA3",e.value.toLocaleString()]})}),(0,H.jsx)(V,{onClick:s,children:"Edit Deal"})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(gt.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:e.assignee})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Description"}),l?(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(ie,{value:x,onChange:u=>w(u.target.value),className:"flex-grow"}),(0,H.jsx)(V,{onClick:R,children:"Save"})]}):(0,H.jsxs)("div",{className:"flex items-center justify-between",children:[(0,H.jsx)("p",{className:"text-gray-700",children:e.description||"No description"}),(0,H.jsx)(V,{variant:"outline",size:"sm",onClick:()=>g(!0),children:"Edit"})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Status"}),(0,H.jsx)(ye,{variant:"outline",className:"w-fit",children:e.status})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Categories"}),(0,H.jsx)("div",{className:"flex flex-wrap gap-2",children:e.categories.map(u=>{let S=o.find(M=>M.id===u);return S?(0,H.jsx)(ye,{variant:"secondary",className:L(S.type),children:S.name},S.id):null})})]}),(0,H.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Date Logged"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(gt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:new Date(e.dateLogged).toLocaleDateString()})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(gt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:new Date(e.closureDate).toLocaleDateString()})]})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Last Modified"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(gt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,H.jsx)("span",{children:new Date(e.lastModified).toLocaleString()})]})]}),(0,H.jsxs)("div",{className:"grid gap-2",children:[(0,H.jsx)(N,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,H.jsx)("div",{className:"space-y-2",children:e.comments.map(u=>(0,H.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,H.jsx)("p",{className:"text-sm text-gray-700",children:u.text}),(0,H.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[u.author," - ",new Date(u.timestamp).toLocaleString()]})]},u.id))}),(0,H.jsxs)("div",{className:"flex mt-2",children:[(0,H.jsx)(G,{value:i,onChange:u=>b(u.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,H.jsxs)(V,{onClick:I,className:"ml-2",children:[(0,H.jsx)(gt.MessageSquareIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]})]})})]})})}var f=B(require("@radix-ui/react-select")),oe=B(require("react")),We=f.Root;var Ge=f.Value,Re=oe.forwardRef(({children:e,className:t,...o},r)=>(0,H.jsxs)(f.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...o,children:[e,(0,H.jsx)(f.Icon,{asChild:!0,children:(0,H.jsx)(gt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Re.displayName=f.Trigger.displayName;var At=oe.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,H.jsx)(gt.ChevronUp,{className:"h-4 w-4"})}));At.displayName=f.ScrollUpButton.displayName;var It=oe.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,H.jsx)(gt.ChevronDown,{className:"h-4 w-4"})}));It.displayName=f.ScrollDownButton.displayName;var ke=oe.forwardRef(({children:e,className:t,position:o="popper",...r},s)=>(0,H.jsx)(f.Portal,{children:(0,H.jsxs)(f.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",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,...r,children:[(0,H.jsx)(At,{}),(0,H.jsx)(f.Viewport,{className:p("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,H.jsx)(It,{})]})}));ke.displayName=f.Content.displayName;var Io=oe.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));Io.displayName=f.Label.displayName;var Le=oe.forwardRef(({children:e,className:t,...o},r)=>(0,H.jsxs)(f.Item,{className:p("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:r,...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)(f.ItemIndicator,{children:(0,H.jsx)(gt.Check,{className:"h-4 w-4"})})}),(0,H.jsx)(f.ItemText,{children:e})]}));Le.displayName=f.Item.displayName;var Mo=oe.forwardRef(({className:e,...t},o)=>(0,H.jsx)(f.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Mo.displayName=f.Separator.displayName;var xe=B(require("@radix-ui/react-checkbox")),Et=B(require("react")),we=Et.forwardRef(({className:e,...t},o)=>(0,H.jsx)(xe.Root,{className:p("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,H.jsx)(xe.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,H.jsx)(gt.Check,{className:"h-4 w-4"})})}));we.displayName=xe.Root.displayName;function Ue({onSubmit:e}){let[t,o]=(0,pe.useState)({name:"",intro:"",active:!0});return(0,H.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({id:Date.now().toString(),...t}),o({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"customerName",children:"Customer Name"}),(0,H.jsx)(G,{id:"customerName",value:t.name,onChange:s=>o({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"customerIntro",children:"Intro"}),(0,H.jsx)(ie,{id:"customerIntro",value:t.intro,onChange:s=>o({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(we,{id:"activeCustomer",checked:t.active,onCheckedChange:s=>o({...t,active:s})}),(0,H.jsx)(N,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,H.jsx)(V,{type:"submit",className:"w-full",children:"Add Customer"})]})}function Ce({customers:e,categories:t,onSubmit:o,onUpdate:r,initialDeal:s,onAddCustomer:n}){let[a,i]=(0,pe.useState)({customerId:"",value:0,assignee:"",status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",lastModified:new Date().toISOString(),comments:[],description:""});(0,pe.useEffect)(()=>{s&&i(s)},[s]);let b=async l=>{if(l.preventDefault(),a.customerId&&a.value&&a.assignee&&a.closureDate)if(!s)await o(a);else{let g={...a,id:s.id};await r(g)}},x=l=>{i(g=>({...g,categories:g.categories.includes(l)?g.categories.filter(L=>L!==l):[...g.categories,l]}))},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"}};return(0,H.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,H.jsx)(he,{className:"h-[60vh] pr-4 mx-2",children:(0,H.jsxs)("div",{className:"space-y-6 mx-2",children:[(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"customer",children:"Customer"}),(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsxs)(We,{value:a.customerId,onValueChange:l=>i({...a,customerId:l}),children:[(0,H.jsx)(Re,{className:"flex-grow",children:(0,H.jsx)(Ge,{placeholder:"Select customer"})}),(0,H.jsx)(ke,{children:e.map(l=>(0,H.jsx)(Le,{value:l.id,children:l.name},l.id))})]}),(0,H.jsxs)(Y,{children:[(0,H.jsx)(Ne,{asChild:!0,children:(0,H.jsxs)(V,{type:"button",size:"icon",variant:"outline",children:[(0,H.jsx)(gt.PlusCircle,{className:"h-4 w-4"}),(0,H.jsx)("span",{className:"sr-only",children:"Add new customer"})]})}),(0,H.jsxs)(j,{children:[(0,H.jsx)(K,{children:(0,H.jsx)(q,{children:"Add New Customer"})}),(0,H.jsx)(Ue,{onSubmit:n})]})]})]})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"value",children:"Value"}),(0,H.jsx)(G,{id:"value",type:"number",value:a.value||"",onChange:l=>i({...a,value:Number.parseFloat(l.target.value)}),placeholder:"Enter deal value"})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"assignee",children:"Assignee"}),(0,H.jsx)(G,{id:"assignee",value:a.assignee||"",onChange:l=>i({...a,assignee:l.target.value}),placeholder:"Enter assignee name"})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"description",children:"Description"}),(0,H.jsx)(ie,{id:"description",value:a.description||"",onChange:l=>i({...a,description:l.target.value}),placeholder:"Enter deal description"})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"status",children:"Status"}),(0,H.jsxs)(We,{value:a.status,onValueChange:l=>i({...a,status:l}),children:[(0,H.jsx)(Re,{children:(0,H.jsx)(Ge,{placeholder:"Select status"})}),(0,H.jsx)(ke,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(l=>(0,H.jsx)(Le,{value:l,children:l},l))})]})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{children:"Categories"}),(0,H.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(l=>(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)("h4",{className:"text-sm font-medium",children:l.charAt(0).toUpperCase()+l.slice(1)}),(0,H.jsx)("div",{className:"grid grid-cols-2 gap-2",children:t.filter(g=>g.type===l).map(g=>(0,H.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,H.jsx)(we,{id:g.id,checked:a.categories.includes(g.id),onCheckedChange:()=>x(g.id)}),(0,H.jsx)("label",{htmlFor:g.id,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${w(g.type)}`,children:g.name})]},g.id))})]},l))})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"dateLogged",children:"Date Logged"}),(0,H.jsx)(G,{id:"dateLogged",type:"date",value:a.dateLogged,onChange:l=>i({...a,dateLogged:l.target.value})})]}),(0,H.jsxs)("div",{className:"space-y-2",children:[(0,H.jsx)(N,{htmlFor:"closureDate",children:"Closure Date"}),(0,H.jsx)(G,{id:"closureDate",type:"date",value:a.closureDate,onChange:l=>i({...a,closureDate:l.target.value})})]})]})}),(0,H.jsx)(V,{type:"submit",className:"w-full",children:s?"Update Deal":"Add Deal"})]})}var ne=B(require("react"));var _e=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));_e.displayName="Card";var $e=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("flex flex-col space-y-1.5 p-6",e),...t}));$e.displayName="CardHeader";var je=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("font-semibold leading-none tracking-tight",e),...t}));je.displayName="CardTitle";var Eo=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("text-sm text-muted-foreground",e),...t}));Eo.displayName="CardDescription";var Ke=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("p-6 pt-0",e),...t}));Ke.displayName="CardContent";var zo=ne.forwardRef(({className:e,...t},o)=>(0,H.jsx)("div",{ref:o,className:p("flex items-center p-6 pt-0",e),...t}));zo.displayName="CardFooter";function Ht({deal:e,customer:t,categories:o,onClick:r}){let s=o.find(n=>n.type==="proposition"&&e.categories.includes(n.id));return(0,H.jsxs)(_e,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:r,children:[(0,H.jsxs)($e,{className:"pb-2",children:[(0,H.jsx)("div",{className:"flex justify-between items-center",children:(0,H.jsx)(je,{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)(Ke,{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)(gt.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,H.jsx)("span",{children:e.assignee})]}),(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)(gt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,H.jsx)("span",{children:new Date(e.lastModified).toLocaleDateString()})]})}),(0,H.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,H.jsx)(ye,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var Me=require("react-beautiful-dnd");function Ot({status:e,deals:t,customers:o,categories:r,onDealClick:s,calculateColumnValue:n,calculateWeightedValue:a,addNewDeal:i,updateDeal:b,onAddCustomer:x}){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}),i&&(0,H.jsxs)(Y,{children:[(0,H.jsx)(Ne,{asChild:!0,children:(0,H.jsxs)(V,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,H.jsx)(gt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,H.jsxs)(j,{children:[(0,H.jsx)(K,{children:(0,H.jsx)(q,{children:"Add New Deal"})}),(0,H.jsx)(Ce,{customers:o,categories:r,onSubmit:i,onUpdate:b,onAddCustomer:x})]})]}),(0,H.jsx)(Me.Droppable,{droppableId:e,children:w=>(0,H.jsxs)("div",{ref:w.innerRef,...w.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((l,g)=>(0,H.jsx)(Me.Draggable,{draggableId:l.id,index:g,children:L=>(0,H.jsx)("div",{ref:L.innerRef,...L.draggableProps,...L.dragHandleProps,children:(0,H.jsx)(Ht,{deal:l,customer:o.find(I=>I.id===l.customerId),categories:r,onClick:()=>s(l)})})},l.id)),w.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:["$",n(t).toLocaleString()]})]}),(0,H.jsxs)("p",{className:"font-semibold",children:["Weighted: ",(0,H.jsxs)("span",{className:"text-blue-600",children:["$",a(t,e).toLocaleString()]})]})]})]})}var Bo=["Cold","Qualified","Proposal Made","Won","Lost"];function qe({initialData:e,addDeal:t,updateDeal:o,addCustomer:r,addComment:s,updateDealDescription:n}){let[a,i]=(0,pe.useState)(e),[b,x]=(0,pe.useState)(null),[w,l]=(0,pe.useState)(null),g=(0,pe.useCallback)(async v=>{let{source:y,destination:C}=v;if(!C||y.droppableId===C.droppableId&&y.index===C.index)return;let z=y.droppableId,E=C.droppableId,ce=[...a.deals],[re]=ce.splice(y.index,1);re.status=E,ce.splice(C.index,0,re);let h=await o(re);i(ue=>({...ue,deals:ue.deals.map(ae=>ae.id===h.id?h:ae)}))},[a,o]),L=async v=>{let y=await t(v);i(C=>({...C,deals:[...C.deals,y]}))},I=async v=>{let y=await o(v);i(C=>({...C,deals:C.deals.map(z=>z.id===y.id?y:z)})),l(null)},R=async(v,y)=>{let C=await s(v,{text:y.text,author:y.author,timestamp:y.timestamp});i(z=>({...z,deals:z.deals.map(E=>E.id===v?{...E,comments:[...E.comments,C],lastModified:new Date().toISOString()}:E)}))},u=v=>a.deals.filter(y=>y.status===v),S=v=>v.reduce((y,C)=>y+C.value,0),M=(v,y)=>{let C={Cold:.2,Qualified:.4,"Proposal Made":.6,Won:1,Lost:0};return v.reduce((z,E)=>z+E.value*C[y],0)},Q=async v=>{let y=await r(v);i(C=>({...C,customers:[...C.customers,y]}))},U=async(v,y)=>{let C=await n(v,y);i(z=>({...z,deals:z.deals.map(E=>E.id===C.id?C:E)}))};return(0,H.jsx)(Me.DragDropContext,{onDragEnd:g,children:(0,H.jsxs)("div",{className:"p-4",children:[(0,H.jsx)("div",{className:"flex space-x-4 overflow-x-auto pb-4",children:Bo.map(v=>{let y=u(v);return(0,H.jsx)(Ot,{status:v,deals:y,customers:a.customers,categories:a.categories,onDealClick:x,calculateColumnValue:S,calculateWeightedValue:M,addNewDeal:v==="Cold"?L:void 0,updateDeal:I,onAddCustomer:Q},v)})}),b&&(0,H.jsx)(Fe,{deal:b,customer:a.customers.find(v=>v.id===b.customerId),categories:a.categories,onClose:()=>x(null),onEdit:()=>l(b),onAddComment:v=>R(b.id,v),onUpdateDescription:v=>U(b.id,v)}),w&&(0,H.jsx)(Y,{open:!0,onOpenChange:()=>l(null),children:(0,H.jsxs)(j,{className:"sm:max-w-[625px]",children:[(0,H.jsx)(K,{children:(0,H.jsx)(q,{children:"Edit Deal"})}),(0,H.jsx)(Ce,{customers:a.customers,categories:a.categories,onSubmit:L,onUpdate:I,initialDeal:w,onAddCustomer:Q})]})})]})})}async function Ho(){let e=await et();return(0,H.jsx)("div",{className:"container mx-auto py-10",children:(0,H.jsx)(qe,{initialData:e,addDeal:tt,updateDeal:ot,addCustomer:rt,addComment:at,updateDealDescription:it})})}0&&(module.exports={CRMPage});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use server";
|
|
2
|
-
"use strict";import{a}from"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-J7TRHWRM.mjs";import"../../chunk-FTVQOPU3.mjs";import"../../chunk-V4CUPKLW.mjs";import"../../chunk-IE5X3XS7.mjs";import"../../chunk-UG6FK323.mjs";import"../../chunk-QMWYQ3FS.mjs";import"../../chunk-F2YN7SED.mjs";import"../../chunk-4RKYG7LK.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.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 CRMPage};
|