cortex-react-components 1.65.0 → 1.65.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-SKQYQ4SD.mjs → chunk-26JAUUHC.mjs} +1 -1
- package/dist/{chunk-ILBKV7ZM.mjs → chunk-2MTAQ2YX.mjs} +1 -1
- package/dist/{chunk-XDLNQPZY.mjs → chunk-35SLQX5Z.mjs} +1 -1
- package/dist/{chunk-APNL5YEF.mjs → chunk-3FZPSPIZ.mjs} +1 -1
- package/dist/{chunk-PADGOK5C.mjs → chunk-4MFTG62S.mjs} +1 -1
- package/dist/{chunk-33ZXPMQU.mjs → chunk-4NRRPFAV.mjs} +1 -1
- package/dist/{chunk-E6ZAA4QH.mjs → chunk-5C4F3OYA.mjs} +1 -1
- package/dist/{chunk-YZ47PIHK.mjs → chunk-5CCW24XE.mjs} +1 -1
- package/dist/chunk-5UQKSJU5.mjs +4 -0
- package/dist/chunk-5V2PNTEF.mjs +1 -0
- package/dist/{chunk-CZIRJUID.mjs → chunk-6E5WHIW6.mjs} +1 -1
- package/dist/{chunk-E7W2GFKO.mjs → chunk-6YHRHDB7.mjs} +1 -1
- package/dist/{chunk-EGYV6SU2.mjs → chunk-BFESGJZ4.mjs} +1 -1
- package/dist/{chunk-I5DSZMH2.mjs → chunk-D6TOSZKM.mjs} +1 -1
- package/dist/{chunk-4A43BI3C.mjs → chunk-E6JYZMWA.mjs} +1 -1
- package/dist/{chunk-Z3YAIJQT.mjs → chunk-FCNEFWQ7.mjs} +1 -1
- package/dist/{chunk-2ELJOFU3.mjs → chunk-GWBCK4SV.mjs} +1 -1
- package/dist/chunk-IEQL2U53.mjs +4 -0
- package/dist/{chunk-5OMUHSTO.mjs → chunk-JBWGBBHF.mjs} +1 -1
- package/dist/{chunk-DJQUKJMH.mjs → chunk-JRB2R6LE.mjs} +1 -1
- package/dist/{chunk-ZJSR6A6I.mjs → chunk-JRFNBHPL.mjs} +1 -1
- package/dist/{chunk-IISHIQBQ.mjs → chunk-JXW2QARY.mjs} +1 -1
- package/dist/{chunk-3XV6OBSL.mjs → chunk-K347D5ZJ.mjs} +1 -1
- package/dist/{chunk-BYSEFJFA.mjs → chunk-KFQ3L3TO.mjs} +1 -1
- package/dist/{chunk-3QWSFRVM.mjs → chunk-KJ7DELAG.mjs} +1 -1
- package/dist/{chunk-5DJ7VOAO.mjs → chunk-KWTCUGN5.mjs} +1 -1
- package/dist/{chunk-P3PIMDIR.mjs → chunk-L74JGLMR.mjs} +1 -1
- package/dist/{chunk-U5XA76PE.mjs → chunk-LSVWCONK.mjs} +1 -1
- package/dist/{chunk-JTQWVSV5.mjs → chunk-NGBQVG6N.mjs} +1 -1
- package/dist/{chunk-L7FUS5TO.mjs → chunk-NIUDBN75.mjs} +1 -1
- package/dist/{chunk-3UA62APP.mjs → chunk-NLA3SBVN.mjs} +1 -1
- package/dist/{chunk-TWPRI2XQ.mjs → chunk-NUPPPEG7.mjs} +1 -1
- package/dist/{chunk-AKH3ER3D.mjs → chunk-OQR6YVKI.mjs} +1 -1
- package/dist/{chunk-R64KZZJP.mjs → chunk-PYAM4YXE.mjs} +1 -1
- package/dist/chunk-QYMXR42G.mjs +4 -0
- package/dist/{chunk-4GL57G4E.mjs → chunk-RGWP2OVM.mjs} +1 -1
- package/dist/{chunk-AN6TXGAM.mjs → chunk-S7FH27PL.mjs} +1 -1
- package/dist/{chunk-YWUPEMYN.mjs → chunk-TFP6VQ32.mjs} +1 -1
- package/dist/{chunk-STHWCR5K.mjs → chunk-TT4SPGZU.mjs} +1 -1
- package/dist/{chunk-ZEOV7BEN.mjs → chunk-TTRDD6M2.mjs} +1 -1
- package/dist/{chunk-Q5LSCSF7.mjs → chunk-TYBLC6LO.mjs} +1 -1
- package/dist/{chunk-6L2BDKJU.mjs → chunk-ULWFOWF2.mjs} +1 -1
- package/dist/{chunk-Y6RAHEXF.mjs → chunk-V5EOKY7D.mjs} +1 -1
- package/dist/chunk-W3ONOYB6.mjs +1 -0
- package/dist/{chunk-NVN7UJT6.mjs → chunk-WG2HHJYU.mjs} +1 -1
- package/dist/{chunk-T6FBWMZR.mjs → chunk-WKFNZUIR.mjs} +1 -1
- package/dist/{chunk-7SPGDJJI.mjs → chunk-Y5ZPWPOT.mjs} +1 -1
- package/dist/{chunk-ROEJPYRW.mjs → chunk-Y73QTPA6.mjs} +1 -1
- package/dist/{chunk-IDRYG7HP.mjs → chunk-YWVLHQ3L.mjs} +1 -1
- package/dist/{chunk-6OS3ZJBB.mjs → chunk-ZKBLFPGO.mjs} +1 -1
- package/dist/{chunk-WSKZ2N7J.mjs → chunk-ZOP4SDLB.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CallToAction.stories.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.stories.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/Content.stories.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CogeBoard.js +1 -1
- package/dist/components/CRM/CogeBoard.mjs +1 -1
- package/dist/components/CRM/CogeBoard.stories.js +1 -1
- package/dist/components/CRM/CogeBoard.stories.mjs +1 -1
- package/dist/components/CRM/DealDetails.js +1 -1
- package/dist/components/CRM/DealDetails.mjs +1 -1
- package/dist/components/CRM/DealDetails.stories.js +1 -1
- package/dist/components/CRM/DealDetails.stories.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.d.ts +1 -9
- package/dist/components/CRM/KanbanColumn.js +1 -4
- package/dist/components/CRM/KanbanColumn.mjs +1 -1
- package/dist/components/CRM/KanbanColumn.stories.js +1 -4
- package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
- package/dist/components/CRM/index.js +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/ContentCard.stories.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.stories.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AddEpicModal.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/ChatInterface.mjs +1 -1
- package/dist/components/DigitalColleagues/ChatInterface.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/CommentSection.mjs +1 -1
- package/dist/components/DigitalColleagues/CommentSection.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
- package/dist/components/DigitalColleagues/DashboardHeader.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/EpicsView.mjs +1 -1
- package/dist/components/DigitalColleagues/EpicsView.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/KanbanBoard.mjs +1 -1
- package/dist/components/DigitalColleagues/KanbanBoard.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
- package/dist/components/DigitalColleagues/ManagementSidebar.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/PlanningView.mjs +1 -1
- package/dist/components/DigitalColleagues/PlanningView.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
- package/dist/components/DigitalColleagues/TaskDetailsModal.mjs +1 -1
- package/dist/components/DigitalColleagues/TaskDetailsModal.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/TaskSidebar.mjs +1 -1
- package/dist/components/DigitalColleagues/TaskSidebar.stories.mjs +1 -1
- package/dist/components/DigitalColleagues/TeamSwitcher.mjs +1 -1
- package/dist/components/DigitalColleagues/TeamSwitcher.stories.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/Header.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/index.mjs +1 -1
- package/dist/components/Holidays/ApproveLeave.mjs +1 -1
- package/dist/components/Holidays/ApproveLeave.stories.mjs +1 -1
- package/dist/components/Holidays/HolidayGrid.mjs +1 -1
- package/dist/components/Holidays/HolidayGrid.stories.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.stories.mjs +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Layouts/FeatureGrid.stories.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/Print.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/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 +8 -8
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/tabs.mjs +1 -1
- package/dist/components/ui/tabs.stories.css +1 -0
- package/dist/components/ui/tabs.stories.js +4 -0
- package/dist/components/ui/tabs.stories.mjs +1 -0
- package/dist/globals.css +1 -1
- package/dist/index.js +14 -14
- 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/Printable.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/BlogList.mjs +1 -1
- package/dist/sections/BlogList.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/ImageSection.stories.mjs +1 -1
- package/dist/sections/MainPageSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PageSections.stories.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/PricingSection.stories.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceDetailSection.stories.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/ServiceSection.stories.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-6BOIU52Z.mjs +0 -4
- package/dist/chunk-DVF55CWB.mjs +0 -4
- package/dist/chunk-H3V6RZEI.mjs +0 -4
- package/dist/chunk-MEWCJ4MA.mjs +0 -1
- package/dist/chunk-PFWODHNV.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-5V2PNTEF.mjs";import"../../chunk-OGZERPA4.mjs";import"../../chunk-6T322YHB.mjs";import"../../chunk-KJIBE57R.mjs";import"../../chunk-CX4XB5W2.mjs";import"../../chunk-EECIYMTX.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-JPZJET3B.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";export{a as DealDetails};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
"use strict";var ft=Object.create;var se=Object.defineProperty;var gt=Object.getOwnPropertyDescriptor;var bt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var yt=(e,t)=>{for(var o in t)se(e,o,{get:t[o],enumerable:!0})},Te=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of bt(t))!ht.call(e,l)&&l!==o&&se(e,l,{get:()=>t[l],enumerable:!(i=gt(t,l))||i.enumerable});return e};var A=(e,t,o)=>(o=e!=null?ft(vt(e)):{},Te(t||!e||!e.__esModule?se(o,"default",{value:e,enumerable:!0}):o,e)),xt=e=>Te(se({},"__esModule",{value:!0}),e);var po={};yt(po,{Default:()=>ut,WithManyComments:()=>mo,default:()=>lo});module.exports=xt(po);var F=require("react");var q=A(require("react")),S=A(require("@radix-ui/react-dialog")),Ue=require("lucide-react");var We=require("clsx");var ve="-",wt=e=>{let t=Ct(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:d=>{let r=d.split(ve);return r[0]===""&&r.length!==1&&r.shift(),Le(r,t)||St(d)},getConflictingClassGroupIds:(d,r)=>{let h=o[d]||[];return r&&i[d]?[...h,...i[d]]:h}}},Le=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],i=t.nextPart.get(o),l=i?Le(e.slice(1),i):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(ve);return t.validators.find(({validator:d})=>d(n))?.classGroupId},Ie=/^\[(.+)\]$/,St=e=>{if(Ie.test(e)){let t=Ie.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Ct=e=>{let{theme:t,prefix:o}=e,i={nextPart:new Map,validators:[]};return Rt(Object.entries(e.classGroups),o).forEach(([n,d])=>{be(d,i,n,t)}),i},be=(e,t,o,i)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:ze(t,l);n.classGroupId=o;return}if(typeof l=="function"){if(Pt(l)){be(l(i),t,o,i);return}t.validators.push({validator:l,classGroupId:o});return}Object.entries(l).forEach(([n,d])=>{be(d,ze(t,n),o,i)})})},ze=(e,t)=>{let o=e;return t.split(ve).forEach(i=>{o.nextPart.has(i)||o.nextPart.set(i,{nextPart:new Map,validators:[]}),o=o.nextPart.get(i)}),o},Pt=e=>e.isThemeGetter,Rt=(e,t)=>t?e.map(([o,i])=>{let l=i.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([d,r])=>[t+d,r])):n);return[o,l]}):e,Nt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,i=new Map,l=(n,d)=>{o.set(n,d),t++,t>e&&(t=0,i=o,o=new Map)};return{get(n){let d=o.get(n);if(d!==void 0)return d;if((d=i.get(n))!==void 0)return l(n,d),d},set(n,d){o.has(n)?o.set(n,d):l(n,d)}}},Me="!",kt=e=>{let{separator:t,experimentalParseClassName:o}=e,i=t.length===1,l=t[0],n=t.length,d=r=>{let h=[],x=0,C=0,D;for(let u=0;u<r.length;u++){let P=r[u];if(x===0){if(P===l&&(i||r.slice(u,u+n)===t)){h.push(r.slice(C,u)),C=u+n;continue}if(P==="/"){D=u;continue}}P==="["?x++:P==="]"&&x--}let N=h.length===0?r:r.substring(C),R=N.startsWith(Me),b=R?N.substring(1):N,w=D&&D>C?D-C:void 0;return{modifiers:h,hasImportantModifier:R,baseClassName:b,maybePostfixModifierPosition:w}};return o?r=>o({className:r,parseClassName:d}):d},Dt=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(i=>{i[0]==="["?(t.push(...o.sort(),i),o=[]):o.push(i)}),t.push(...o.sort()),t},At=e=>({cache:Nt(e.cacheSize),parseClassName:kt(e),...wt(e)}),Tt=/\s+/,It=(e,t)=>{let{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:l}=t,n=[],d=e.trim().split(Tt),r="";for(let h=d.length-1;h>=0;h-=1){let x=d[h],{modifiers:C,hasImportantModifier:D,baseClassName:N,maybePostfixModifierPosition:R}=o(x),b=!!R,w=i(b?N.substring(0,R):N);if(!w){if(!b){r=x+(r.length>0?" "+r:r);continue}if(w=i(N),!w){r=x+(r.length>0?" "+r:r);continue}b=!1}let u=Dt(C).join(":"),P=D?u+Me:u,k=P+w;if(n.includes(k))continue;n.push(k);let B=l(w,b);for(let z=0;z<B.length;++z){let s=B[z];n.push(P+s)}r=x+(r.length>0?" "+r:r)}return r};function zt(){let e=0,t,o,i="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Ee(t))&&(i&&(i+=" "),i+=o);return i}var Ee=e=>{if(typeof e=="string")return e;let t,o="";for(let i=0;i<e.length;i++)e[i]&&(t=Ee(e[i]))&&(o&&(o+=" "),o+=t);return o};function Lt(e,...t){let o,i,l,n=d;function d(h){let x=t.reduce((C,D)=>D(C),e());return o=At(x),i=o.cache.get,l=o.cache.set,n=r,r(h)}function r(h){let x=i(h);if(x)return x;let C=It(h,o);return l(h,C),C}return function(){return n(zt.apply(null,arguments))}}var g=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Be=/^\[(?:([T-z-]+):)?(.+)\]$/i,Mt=/^\d+\/\d+$/,Et=new Set(["px","full","screen"]),Bt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Gt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wt=/^(inset_)?-?((\d+)?\.?(\d+)[T-z]+|0)_-?((\d+)?\.?(\d+)[T-z]+|0)/,Ut=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,M=e=>_(e)||Et.has(e)||Mt.test(e),V=e=>J(e,"length",Zt),_=e=>!!e&&!Number.isNaN(Number(e)),ge=e=>J(e,"number",_),Z=e=>!!e&&Number.isInteger(Number(e)),Ht=e=>e.endsWith("%")&&_(e.slice(0,-1)),c=e=>Be.test(e),G=e=>Bt.test(e),jt=new Set(["length","size","percentage"]),Ft=e=>J(e,jt,Ve),Ot=e=>J(e,"position",Ve),_t=new Set(["image","url"]),Jt=e=>J(e,_t,qt),$t=e=>J(e,"",Qt),Q=()=>!0,J=(e,t,o)=>{let i=Be.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):o(i[2]):!1},Zt=e=>Vt.test(e)&&!Gt.test(e),Ve=()=>!1,Qt=e=>Wt.test(e),qt=e=>Ut.test(e);var Xt=()=>{let e=g("colors"),t=g("spacing"),o=g("blur"),i=g("brightness"),l=g("borderColor"),n=g("borderRadius"),d=g("borderSpacing"),r=g("borderWidth"),h=g("contrast"),x=g("grayscale"),C=g("hueRotate"),D=g("invert"),N=g("gap"),R=g("gradientColorStops"),b=g("gradientColorStopPositions"),w=g("inset"),u=g("margin"),P=g("opacity"),k=g("padding"),B=g("saturate"),z=g("scale"),s=g("sepia"),f=g("skew"),O=g("space"),Re=g("translate"),me=()=>["auto","contain","none"],pe=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",c,t],v=()=>[c,t],Ne=()=>["",M,V],ae=()=>["auto",_,c],ke=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",c],Ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[_,c];return{cacheSize:500,separator:":",theme:{colors:[Q],spacing:[M,V],blur:["none","",G,c],brightness:L(),borderColor:[e],borderRadius:["none","","full",G,c],borderSpacing:v(),borderWidth:Ne(),contrast:L(),grayscale:$(),hueRotate:L(),invert:$(),gap:v(),gradientColorStops:[e],gradientColorStopPositions:[Ht,V],inset:ue(),margin:ue(),opacity:L(),padding:v(),saturate:L(),scale:L(),sepia:$(),skew:L(),space:v(),translate:v()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":Ae()}],"break-before":[{"break-before":Ae()}],"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:[...ke(),c]}],overflow:[{overflow:pe()}],"overflow-x":[{"overflow-x":pe()}],"overflow-T":[{"overflow-T":pe()}],overscroll:[{overscroll:me()}],"overscroll-x":[{"overscroll-x":me()}],"overscroll-T":[{"overscroll-T":me()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-T":[{"inset-T":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Z,c]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",Z,c]}],"grid-cols":[{"grid-cols":[Q]}],"col-start-end":[{col:["auto",{span:["full",Z,c]},c]}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":[Q]}],"row-start-end":[{row:["auto",{span:[Z,c]},c]}],"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",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[N]}],"gap-x":[{"gap-x":[N]}],"gap-T":[{"gap-T":[N]}],"justify-content":[{justify:["normal",...fe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...fe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...fe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[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":[O]}],"space-x-reverse":["space-x-reverse"],"space-T":[{"space-T":[O]}],"space-T-reverse":["space-T-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,t]}],"min-w":[{"min-w":[c,t,"min","max","fit"]}],"max-w":[{"max-w":[c,t,"none","full","min","max","fit","prose",{screen:[G]},G]}],h:[{h:[c,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,t,"auto","min","max","fit"]}],"font-size":[{text:["base",G,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ge]}],"font-family":[{font:[Q]}],"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",c]}],"line-clamp":[{"line-clamp":["none",_,ge]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",M,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",M,V]}],"underline-offset":[{"underline-offset":["auto",M,c]}],"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:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],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",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ke(),Ot]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","T","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ft]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],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-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-T":[{"border-T":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-T":[{"divide-T":[r]}],"divide-T-reverse":["divide-T-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:ie()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-T":[{"border-T":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[M,c]}],"outline-w":[{outline:[M,V]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[M,V]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",G,$t]}],"shadow-color":[{shadow:[Q]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...De(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":De()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[i]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",G,c]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[D]}],saturate:[{saturate:[B]}],sepia:[{sepia:[s]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[D]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[B]}],"backdrop-sepia":[{"backdrop-sepia":[s]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-T":[{"border-spacing-T":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-T":[{"scale-T":[z]}],rotate:[{rotate:[Z,c]}],"translate-x":[{"translate-x":[Re]}],"translate-T":[{"translate-T":[Re]}],"skew-x":[{"skew-x":[f]}],"skew-T":[{"skew-T":[f]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",c]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","T","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","T","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-T":[{"touch-pan":["T","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[M,V,ge]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-T"],overscroll:["overscroll-x","overscroll-T"],inset:["inset-x","inset-T","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-T":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-T"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-T"],"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-T":["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-T":["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-T","touch-pz"],"touch-x":["touch"],"touch-T":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ge=Lt(Xt);function p(...e){return Ge((0,We.clsx)(e))}var T=require("react/jsx-runtime"),He=S.Root;var Kt=S.Portal;var je=q.forwardRef(({className:e,...t},o)=>(0,T.jsx)(S.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}));je.displayName=S.Overlay.displayName;var he=q.forwardRef(({className:e,children:t,...o},i)=>(0,T.jsxs)(Kt,{children:[(0,T.jsx)(je,{}),(0,T.jsxs)(S.Content,{ref:i,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-T-[-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,T.jsxs)(S.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,T.jsx)(Ue.X,{className:"h-4 w-4"}),(0,T.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));he.displayName=S.Content.displayName;var ye=({className:e,...t})=>(0,T.jsx)("div",{className:p("flex flex-col space-T-1.5 text-center sm:text-left",e),...t});ye.displayName="DialogHeader";var Yt=({className:e,...t})=>(0,T.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yt.displayName="DialogFooter";var xe=q.forwardRef(({className:e,...t},o)=>(0,T.jsx)(S.Title,{ref:o,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));xe.displayName=S.Title.displayName;var eo=q.forwardRef(({className:e,...t},o)=>(0,T.jsx)(S.Description,{ref:o,className:p("text-sm text-muted-foreground",e),...t}));eo.displayName=S.Description.displayName;var Fe=require("@radix-ui/react-slot"),Oe=require("class-variance-authority"),_e=A(require("react")),to=(0,Oe.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),X=_e.forwardRef(({asChild:e=!1,className:t,size:o,variant:i,...l},n)=>(0,T.jsx)(e?Fe.Slot:"button",{className:p(to({className:t,size:o,variant:i})),ref:n,...l}));X.displayName="Button";var $e=A(require("react"));var K=$e.forwardRef(({className:e,type:t,...o},i)=>(0,T.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:i,...o}));K.displayName="Input";var Qe=A(require("react")),we=A(require("@radix-ui/react-label"));var oo=(0,Oe.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),E=Qe.forwardRef(({className:e,...t},o)=>(0,T.jsx)(we.Root,{ref:o,className:p(oo(),e),...t}));E.displayName=we.Root.displayName;var Ke=A(require("react")),Se=Ke.forwardRef(({className:e,...t},o)=>(0,T.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}));Se.displayName="Textarea";var m=A(require("@radix-ui/react-select")),W=A(require("react")),ne=m.Root;var le=m.Value,Y=W.forwardRef(({children:e,className:t,...o},i)=>(0,T.jsxs)(m.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:i,...o,children:[e,(0,T.jsx)(m.Icon,{asChild:!0,children:(0,T.jsx)(Ue.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Y.displayName=m.Trigger.displayName;var et=W.forwardRef(({className:e,...t},o)=>(0,T.jsx)(m.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,T.jsx)(Ue.ChevronUp,{className:"h-4 w-4"})}));et.displayName=m.ScrollUpButton.displayName;var tt=W.forwardRef(({className:e,...t},o)=>(0,T.jsx)(m.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,T.jsx)(Ue.ChevronDown,{className:"h-4 w-4"})}));tt.displayName=m.ScrollDownButton.displayName;var ee=W.forwardRef(({children:e,className:t,position:o="popper",...i},l)=>(0,T.jsx)(m.Portal,{children:(0,T.jsxs)(m.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-T-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-T-1",t),position:o,ref:l,...i,children:[(0,T.jsx)(et,{}),(0,T.jsx)(m.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,T.jsx)(tt,{})]})}));ee.displayName=m.Content.displayName;var ro=W.forwardRef(({className:e,...t},o)=>(0,T.jsx)(m.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));ro.displayName=m.Label.displayName;var te=W.forwardRef(({children:e,className:t,...o},i)=>(0,T.jsxs)(m.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:i,...o,children:[(0,T.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,T.jsx)(m.ItemIndicator,{children:(0,T.jsx)(Ue.Check,{className:"h-4 w-4"})})}),(0,T.jsx)(m.ItemText,{children:e})]}));te.displayName=m.Item.displayName;var ao=W.forwardRef(({className:e,...t},o)=>(0,T.jsx)(m.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));ao.displayName=m.Separator.displayName;var oe=A(require("@radix-ui/react-checkbox")),rt=A(require("react")),Ce=rt.forwardRef(({className:e,...t},o)=>(0,T.jsx)(oe.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,T.jsx)(oe.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,T.jsx)(Ue.Check,{className:"h-4 w-4"})})}));Ce.displayName=oe.Root.displayName;var io=(0,Oe.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 it({className:e,variant:t,...o}){return(0,T.jsx)("div",{className:p(io({variant:t}),e),...o})}var Pe=A(require("react")),I=A(require("@radix-ui/react-scroll-area"));var de=Pe.forwardRef(({className:e,children:t,...o},i)=>(0,T.jsxs)(I.Root,{ref:i,className:p("relative overflow-hidden",e),...o,children:[(0,T.jsx)(I.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,T.jsx)(nt,{}),(0,T.jsx)(I.Corner,{})]}));de.displayName=I.Root.displayName;var nt=Pe.forwardRef(({className:e,orientation:t="vertical",...o},i)=>(0,T.jsx)(I.ScrollAreaScrollbar,{ref:i,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,T.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));nt.displayName=I.ScrollAreaScrollbar.displayName;function lt({deal:e,users:t,customer:o,categories:i,onClose:l,onSave:n,onAddComment:d}){let[r,h]=(0,F.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[x,C]=(0,F.useState)(""),[D,N]=(0,F.useState)(!1),[R,b]=(0,F.useState)(null);(0,F.useEffect)(()=>{N(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);let w=async()=>{try{let s=await n(r);s.success?(N(!1),b(null)):console.error("Failed to save deal:",s.errors)}catch(s){console.error("Failed to save deal:",s)}},u=(s,f)=>{h(O=>({...O,[s]:f}))},P=s=>{let f=(r.categories||[]).includes(s)?(r.categories||[]).filter(O=>O!==s):[...r.categories||[],s];u("categories",f)},k=async()=>{if(x.trim()){let s={text:x,timestamp:new Date().toISOString()};try{let f=await d(s);if(!f.success){console.error("Failed to add comment:",f.errors);return}}catch(f){console.error("Failed to add comment:",f)}h(f=>({...f,comments:[...f.comments||[],s]})),C("")}},B=s=>{switch(s){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},z=s=>t?.find(f=>f.id===Number(s));return(0,T.jsx)(He,{open:!0,children:(0,T.jsxs)(he,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,T.jsxs)(ye,{className:"flex flex-row items-center justify-between",children:[(0,T.jsx)(xe,{className:"text-2xl font-bold",children:o?.name}),(0,T.jsxs)("div",{className:"flex space-x-2",children:[(0,T.jsx)(X,{variant:"outline",onClick:l,children:"Close"}),(0,T.jsxs)(X,{onClick:w,disabled:!D,children:[(0,T.jsx)(Ue.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,T.jsxs)(de,{className:"flex-grow pr-4",children:[(0,T.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,T.jsx)("div",{className:"grid gap-2 m-1",children:R==="value"?(0,T.jsx)(K,{type:"number",value:r.value,onChange:s=>u("value",Number(s.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,T.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",r.value?.toLocaleString()]})}),(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Assignee"}),R==="assignee"?(0,T.jsxs)(ne,{value:r?.assignee?.id?.toString()||"",onValueChange:s=>u("assignee",z(s)),children:[(0,T.jsx)(Y,{children:(0,T.jsx)(le,{placeholder:"Select assignee"})}),(0,T.jsx)(ee,{children:t&&t.map(s=>(0,T.jsx)(te,{value:s?.id?.toString()||"",children:s.name},s.id))})]}):(0,T.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,T.jsx)(Ue.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,T.jsx)("span",{children:r.assignee.name})]})]}),(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Closure Date"}),R==="closureDate"?(0,T.jsx)(K,{type:"date",value:r.closureDate?.split("T")[0]??"",onChange:s=>u("closureDate",s.target.value),onBlur:()=>b(null),className:"mr-2",autoFocus:!0}):(0,T.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,T.jsx)(Ue.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,T.jsx)("span",{children:r.closureDate?new Date(r.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,T.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Description"}),R==="description"?(0,T.jsx)(Se,{value:r.description||"",onChange:s=>u("description",s.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,T.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:r.description})]})}),(0,T.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Status"}),R==="status"?(0,T.jsxs)(ne,{value:r.status,onValueChange:s=>{u("status",s),b(null)},children:[(0,T.jsx)(Y,{children:(0,T.jsx)(le,{placeholder:"Select status"})}),(0,T.jsx)(ee,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(s=>(0,T.jsx)(te,{value:s,children:s},s))})]}):(0,T.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:r.status})]}),(0,T.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Categories"}),R==="categories"?(0,T.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:i.map(s=>(0,T.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,T.jsx)(Ce,{id:s.id?.toString()||"",checked:(r.categories||[]).some(f=>f.id===s.id),onCheckedChange:()=>s.id!==void 0&&P(s)}),(0,T.jsx)("label",{htmlFor:(s.id??"").toString(),className:`text-sm font-medium ${B(s.type||"sector")} px-2 py-1 rounded`,children:s.name})]},s.id))}):(0,T.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:r.categories&&r.categories.map(s=>{let f=s;return f?(0,T.jsx)(it,{variant:"outline",className:B(f.type||"sector"),children:f.name},f.id):null})})]}),(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"COGE Status"}),R==="gecoStatus"?(0,T.jsxs)(ne,{value:r.gecoStatus??void 0,onValueChange:s=>{u("gecoStatus",s),b(null)},children:[(0,T.jsx)(Y,{children:(0,T.jsx)(le,{placeholder:"Select status"})}),(0,T.jsx)(ee,{children:["firm","forecast","other"].map(s=>(0,T.jsx)(te,{value:s,children:s.charAt(0).toUpperCase()+s.slice(1)},s))})]}):(0,T.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:r.gecoStatus?r.gecoStatus.charAt(0).toUpperCase()+r.gecoStatus.slice(1):"N/A"})]})]}),(0,T.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,T.jsxs)("div",{className:"grid gap-2",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,T.jsx)(de,{className:"h-[200px] overflow-T-auto",children:(0,T.jsx)("div",{className:"space-T-2",children:r.comments&&r.comments.slice().sort((s,f)=>new Date(f.timestamp||"").getTime()-new Date(s.timestamp||"").getTime()).map(s=>(0,T.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,T.jsx)("p",{className:"text-sm text-foreground",children:s.text}),(0,T.jsxs)("p",{className:"text-xs text-foreground mt-1",children:[s?.author?.name," - ",new Date(s.timestamp||"").toLocaleString()]})]},s.id))})}),(0,T.jsxs)("div",{className:"flex mt-2",children:[(0,T.jsx)(K,{value:x,onChange:s=>C(s.target.value),placeholder:"Add T comment...",className:"flex-grow ml-1"}),(0,T.jsxs)(X,{onClick:k,className:"ml-2",children:[(0,T.jsx)(Ue.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,T.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(r.updatedAt||"").toLocaleString()]})]})]})]})})}var so=[{id:1,name:"Acme Corp",intro:"A leading technology company",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"GlobalTech",intro:"Innovative solutions provider",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"InnoSystems",intro:"Cutting-edge software development",active:!1,createdAt:"2023-01-01",updatedAt:"2023-01-01"}],ct=[{id:1,name:"Software",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Hardware",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Referral",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Outbound",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Tech",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:6,name:"Finance",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],re=[{id:1,name:"John Doe",email:"john.doe@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Bob Johnson",email:"bob.johnson@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Alice Brown",email:"alice.brown@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Charlie Davis",email:"charlie.davis@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],Xo=[{id:1,customer:so[0],value:5e4,assignee:re[2],status:"Qualified",categories:ct.slice(0,3),dateLogged:"2023-01-15",closureDate:"2023-06-30",updatedAt:"2023-05-01T10:00:00Z",createdAt:"2023-01-01",comments:[{id:"1",text:"Initial contact made",author:re[5],timestamp:"2023-01-15T09:00:00Z"}],description:"Potential software solution for Acme Corp"},{id:2,customer:{id:2,name:"GlobalTech",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},value:75e3,assignee:{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},status:"Proposal Made",categories:ct.slice(0,3),dateLogged:"2023-02-01",closureDate:"2023-07-31",updatedAt:"2023-05-10T14:30:00Z",createdAt:"2023-01-01",comments:[{id:"2",text:"Proposal sent",author:re[1],timestamp:"2023-02-15T09:00:00Z"}],description:"Custom hardware solution for GlobalTech"}];var no={title:"CRM/DealDetails",component:lt,parameters:{layout:"centered"},tags:["autodocs"]},lo=no,co={id:"1",name:"Acme Corp",active:!0},dt=[{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"}],mt=e=>Array.from({length:e},(t,o)=>({id:`comment-${o+1}`,text:`This is comment number ${o+1}. It's T mock comment to test the scrolling behavior of the comments section in the DealDetails component.`,author:["John Doe","Jane Smith","Bob Johnson"][o%3],timestamp:new Date(Date.now()-(e-o)*24*60*60*1e3).toISOString()})),pt={id:1,customer:{id:1,name:"Acme Corp",active:!0},value:1e5,assignee:{id:1,name:"John Doe"},status:"Qualified",gecoStatus:"firm",categories:dt.slice(0,3),dateLogged:"2023-01-01T00:00:00.000Z",closureDate:"2023-12-31T00:00:00.000Z",updatedAt:"2023-06-15T12:00:00.000Z",comments:mt(50),description:"This is T mock deal for Acme Corp. It involves T large software project with potential for hardware integration."},ut={args:{deal:pt,customer:co,categories:dt,users:re,onClose:()=>console.log("Close clicked"),onSave:e=>console.log("Save clicked",e),onAddComment:e=>console.log("Comment added",e)}},mo={args:{...ut.args,deal:{...pt,comments:mt(100)}}};0&&(module.exports={Default,WithManyComments});
|
|
4
|
+
"use strict";var ft=Object.create;var se=Object.defineProperty;var gt=Object.getOwnPropertyDescriptor;var bt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var yt=(e,t)=>{for(var o in t)se(e,o,{get:t[o],enumerable:!0})},Te=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of bt(t))!ht.call(e,l)&&l!==o&&se(e,l,{get:()=>t[l],enumerable:!(i=gt(t,l))||i.enumerable});return e};var A=(e,t,o)=>(o=e!=null?ft(vt(e)):{},Te(t||!e||!e.__esModule?se(o,"default",{value:e,enumerable:!0}):o,e)),xt=e=>Te(se({},"__esModule",{value:!0}),e);var po={};yt(po,{Default:()=>ut,WithManyComments:()=>mo,default:()=>lo});module.exports=xt(po);var F=require("react");var q=A(require("react")),S=A(require("@radix-ui/react-dialog")),Ue=require("lucide-react");var We=require("clsx");var ve="-",wt=e=>{let t=Ct(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:d=>{let r=d.split(ve);return r[0]===""&&r.length!==1&&r.shift(),Le(r,t)||St(d)},getConflictingClassGroupIds:(d,r)=>{let h=o[d]||[];return r&&i[d]?[...h,...i[d]]:h}}},Le=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],i=t.nextPart.get(o),l=i?Le(e.slice(1),i):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(ve);return t.validators.find(({validator:d})=>d(n))?.classGroupId},Ie=/^\[(.+)\]$/,St=e=>{if(Ie.test(e)){let t=Ie.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Ct=e=>{let{theme:t,prefix:o}=e,i={nextPart:new Map,validators:[]};return Rt(Object.entries(e.classGroups),o).forEach(([n,d])=>{be(d,i,n,t)}),i},be=(e,t,o,i)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:ze(t,l);n.classGroupId=o;return}if(typeof l=="function"){if(Pt(l)){be(l(i),t,o,i);return}t.validators.push({validator:l,classGroupId:o});return}Object.entries(l).forEach(([n,d])=>{be(d,ze(t,n),o,i)})})},ze=(e,t)=>{let o=e;return t.split(ve).forEach(i=>{o.nextPart.has(i)||o.nextPart.set(i,{nextPart:new Map,validators:[]}),o=o.nextPart.get(i)}),o},Pt=e=>e.isThemeGetter,Rt=(e,t)=>t?e.map(([o,i])=>{let l=i.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([d,r])=>[t+d,r])):n);return[o,l]}):e,Nt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,i=new Map,l=(n,d)=>{o.set(n,d),t++,t>e&&(t=0,i=o,o=new Map)};return{get(n){let d=o.get(n);if(d!==void 0)return d;if((d=i.get(n))!==void 0)return l(n,d),d},set(n,d){o.has(n)?o.set(n,d):l(n,d)}}},Me="!",kt=e=>{let{separator:t,experimentalParseClassName:o}=e,i=t.length===1,l=t[0],n=t.length,d=r=>{let h=[],x=0,C=0,D;for(let u=0;u<r.length;u++){let P=r[u];if(x===0){if(P===l&&(i||r.slice(u,u+n)===t)){h.push(r.slice(C,u)),C=u+n;continue}if(P==="/"){D=u;continue}}P==="["?x++:P==="]"&&x--}let N=h.length===0?r:r.substring(C),R=N.startsWith(Me),b=R?N.substring(1):N,w=D&&D>C?D-C:void 0;return{modifiers:h,hasImportantModifier:R,baseClassName:b,maybePostfixModifierPosition:w}};return o?r=>o({className:r,parseClassName:d}):d},Dt=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(i=>{i[0]==="["?(t.push(...o.sort(),i),o=[]):o.push(i)}),t.push(...o.sort()),t},At=e=>({cache:Nt(e.cacheSize),parseClassName:kt(e),...wt(e)}),Tt=/\s+/,It=(e,t)=>{let{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:l}=t,n=[],d=e.trim().split(Tt),r="";for(let h=d.length-1;h>=0;h-=1){let x=d[h],{modifiers:C,hasImportantModifier:D,baseClassName:N,maybePostfixModifierPosition:R}=o(x),b=!!R,w=i(b?N.substring(0,R):N);if(!w){if(!b){r=x+(r.length>0?" "+r:r);continue}if(w=i(N),!w){r=x+(r.length>0?" "+r:r);continue}b=!1}let u=Dt(C).join(":"),P=D?u+Me:u,k=P+w;if(n.includes(k))continue;n.push(k);let B=l(w,b);for(let z=0;z<B.length;++z){let s=B[z];n.push(P+s)}r=x+(r.length>0?" "+r:r)}return r};function zt(){let e=0,t,o,i="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Ee(t))&&(i&&(i+=" "),i+=o);return i}var Ee=e=>{if(typeof e=="string")return e;let t,o="";for(let i=0;i<e.length;i++)e[i]&&(t=Ee(e[i]))&&(o&&(o+=" "),o+=t);return o};function Lt(e,...t){let o,i,l,n=d;function d(h){let x=t.reduce((C,D)=>D(C),e());return o=At(x),i=o.cache.get,l=o.cache.set,n=r,r(h)}function r(h){let x=i(h);if(x)return x;let C=It(h,o);return l(h,C),C}return function(){return n(zt.apply(null,arguments))}}var g=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Be=/^\[(?:([T-z-]+):)?(.+)\]$/i,Mt=/^\d+\/\d+$/,Et=new Set(["px","full","screen"]),Bt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Gt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wt=/^(inset_)?-?((\d+)?\.?(\d+)[T-z]+|0)_-?((\d+)?\.?(\d+)[T-z]+|0)/,Ut=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,M=e=>_(e)||Et.has(e)||Mt.test(e),V=e=>J(e,"length",Zt),_=e=>!!e&&!Number.isNaN(Number(e)),ge=e=>J(e,"number",_),Z=e=>!!e&&Number.isInteger(Number(e)),Ht=e=>e.endsWith("%")&&_(e.slice(0,-1)),c=e=>Be.test(e),G=e=>Bt.test(e),jt=new Set(["length","size","percentage"]),Ft=e=>J(e,jt,Ve),Ot=e=>J(e,"position",Ve),_t=new Set(["image","url"]),Jt=e=>J(e,_t,qt),$t=e=>J(e,"",Qt),Q=()=>!0,J=(e,t,o)=>{let i=Be.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):o(i[2]):!1},Zt=e=>Vt.test(e)&&!Gt.test(e),Ve=()=>!1,Qt=e=>Wt.test(e),qt=e=>Ut.test(e);var Xt=()=>{let e=g("colors"),t=g("spacing"),o=g("blur"),i=g("brightness"),l=g("borderColor"),n=g("borderRadius"),d=g("borderSpacing"),r=g("borderWidth"),h=g("contrast"),x=g("grayscale"),C=g("hueRotate"),D=g("invert"),N=g("gap"),R=g("gradientColorStops"),b=g("gradientColorStopPositions"),w=g("inset"),u=g("margin"),P=g("opacity"),k=g("padding"),B=g("saturate"),z=g("scale"),s=g("sepia"),f=g("skew"),O=g("space"),Re=g("translate"),me=()=>["auto","contain","none"],pe=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",c,t],v=()=>[c,t],Ne=()=>["",M,V],ae=()=>["auto",_,c],ke=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",c],Ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[_,c];return{cacheSize:500,separator:":",theme:{colors:[Q],spacing:[M,V],blur:["none","",G,c],brightness:L(),borderColor:[e],borderRadius:["none","","full",G,c],borderSpacing:v(),borderWidth:Ne(),contrast:L(),grayscale:$(),hueRotate:L(),invert:$(),gap:v(),gradientColorStops:[e],gradientColorStopPositions:[Ht,V],inset:ue(),margin:ue(),opacity:L(),padding:v(),saturate:L(),scale:L(),sepia:$(),skew:L(),space:v(),translate:v()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":Ae()}],"break-before":[{"break-before":Ae()}],"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:[...ke(),c]}],overflow:[{overflow:pe()}],"overflow-x":[{"overflow-x":pe()}],"overflow-T":[{"overflow-T":pe()}],overscroll:[{overscroll:me()}],"overscroll-x":[{"overscroll-x":me()}],"overscroll-T":[{"overscroll-T":me()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-T":[{"inset-T":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Z,c]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",Z,c]}],"grid-cols":[{"grid-cols":[Q]}],"col-start-end":[{col:["auto",{span:["full",Z,c]},c]}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":[Q]}],"row-start-end":[{row:["auto",{span:[Z,c]},c]}],"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",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[N]}],"gap-x":[{"gap-x":[N]}],"gap-T":[{"gap-T":[N]}],"justify-content":[{justify:["normal",...fe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...fe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...fe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[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":[O]}],"space-x-reverse":["space-x-reverse"],"space-T":[{"space-T":[O]}],"space-T-reverse":["space-T-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,t]}],"min-w":[{"min-w":[c,t,"min","max","fit"]}],"max-w":[{"max-w":[c,t,"none","full","min","max","fit","prose",{screen:[G]},G]}],h:[{h:[c,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,t,"auto","min","max","fit"]}],"font-size":[{text:["base",G,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ge]}],"font-family":[{font:[Q]}],"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",c]}],"line-clamp":[{"line-clamp":["none",_,ge]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",M,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",M,V]}],"underline-offset":[{"underline-offset":["auto",M,c]}],"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:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],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",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ke(),Ot]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","T","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ft]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],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-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-T":[{"border-T":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-T":[{"divide-T":[r]}],"divide-T-reverse":["divide-T-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:ie()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-T":[{"border-T":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[M,c]}],"outline-w":[{outline:[M,V]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[M,V]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",G,$t]}],"shadow-color":[{shadow:[Q]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...De(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":De()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[i]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",G,c]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[D]}],saturate:[{saturate:[B]}],sepia:[{sepia:[s]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[D]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[B]}],"backdrop-sepia":[{"backdrop-sepia":[s]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-T":[{"border-spacing-T":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-T":[{"scale-T":[z]}],rotate:[{rotate:[Z,c]}],"translate-x":[{"translate-x":[Re]}],"translate-T":[{"translate-T":[Re]}],"skew-x":[{"skew-x":[f]}],"skew-T":[{"skew-T":[f]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",c]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","T","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","T","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-T":[{"touch-pan":["T","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[M,V,ge]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-T"],overscroll:["overscroll-x","overscroll-T"],inset:["inset-x","inset-T","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-T":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-T"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-T"],"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-T":["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-T":["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-T","touch-pz"],"touch-x":["touch"],"touch-T":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ge=Lt(Xt);function p(...e){return Ge((0,We.clsx)(e))}var T=require("react/jsx-runtime"),He=S.Root;var Kt=S.Portal;var je=q.forwardRef(({className:e,...t},o)=>(0,T.jsx)(S.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}));je.displayName=S.Overlay.displayName;var he=q.forwardRef(({className:e,children:t,...o},i)=>(0,T.jsxs)(Kt,{children:[(0,T.jsx)(je,{}),(0,T.jsxs)(S.Content,{ref:i,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-T-[-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,T.jsxs)(S.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,T.jsx)(Ue.X,{className:"h-4 w-4"}),(0,T.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));he.displayName=S.Content.displayName;var ye=({className:e,...t})=>(0,T.jsx)("div",{className:p("flex flex-col space-T-1.5 text-center sm:text-left",e),...t});ye.displayName="DialogHeader";var Yt=({className:e,...t})=>(0,T.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yt.displayName="DialogFooter";var xe=q.forwardRef(({className:e,...t},o)=>(0,T.jsx)(S.Title,{ref:o,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));xe.displayName=S.Title.displayName;var eo=q.forwardRef(({className:e,...t},o)=>(0,T.jsx)(S.Description,{ref:o,className:p("text-sm text-muted-foreground",e),...t}));eo.displayName=S.Description.displayName;var Fe=require("@radix-ui/react-slot"),Oe=require("class-variance-authority"),_e=A(require("react")),to=(0,Oe.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),X=_e.forwardRef(({asChild:e=!1,className:t,size:o,variant:i,...l},n)=>(0,T.jsx)(e?Fe.Slot:"button",{className:p(to({className:t,size:o,variant:i})),ref:n,...l}));X.displayName="Button";var $e=A(require("react"));var K=$e.forwardRef(({className:e,type:t,...o},i)=>(0,T.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:i,...o}));K.displayName="Input";var Qe=A(require("react")),we=A(require("@radix-ui/react-label"));var oo=(0,Oe.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),E=Qe.forwardRef(({className:e,...t},o)=>(0,T.jsx)(we.Root,{ref:o,className:p(oo(),e),...t}));E.displayName=we.Root.displayName;var Ke=A(require("react")),Se=Ke.forwardRef(({className:e,...t},o)=>(0,T.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}));Se.displayName="Textarea";var m=A(require("@radix-ui/react-select")),W=A(require("react")),ne=m.Root;var le=m.Value,Y=W.forwardRef(({children:e,className:t,...o},i)=>(0,T.jsxs)(m.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:i,...o,children:[e,(0,T.jsx)(m.Icon,{asChild:!0,children:(0,T.jsx)(Ue.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Y.displayName=m.Trigger.displayName;var et=W.forwardRef(({className:e,...t},o)=>(0,T.jsx)(m.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,T.jsx)(Ue.ChevronUp,{className:"h-4 w-4"})}));et.displayName=m.ScrollUpButton.displayName;var tt=W.forwardRef(({className:e,...t},o)=>(0,T.jsx)(m.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,T.jsx)(Ue.ChevronDown,{className:"h-4 w-4"})}));tt.displayName=m.ScrollDownButton.displayName;var ee=W.forwardRef(({children:e,className:t,position:o="popper",...i},l)=>(0,T.jsx)(m.Portal,{children:(0,T.jsxs)(m.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-T-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-T-1",t),position:o,ref:l,...i,children:[(0,T.jsx)(et,{}),(0,T.jsx)(m.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,T.jsx)(tt,{})]})}));ee.displayName=m.Content.displayName;var ro=W.forwardRef(({className:e,...t},o)=>(0,T.jsx)(m.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));ro.displayName=m.Label.displayName;var te=W.forwardRef(({children:e,className:t,...o},i)=>(0,T.jsxs)(m.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:i,...o,children:[(0,T.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,T.jsx)(m.ItemIndicator,{children:(0,T.jsx)(Ue.Check,{className:"h-4 w-4"})})}),(0,T.jsx)(m.ItemText,{children:e})]}));te.displayName=m.Item.displayName;var ao=W.forwardRef(({className:e,...t},o)=>(0,T.jsx)(m.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));ao.displayName=m.Separator.displayName;var oe=A(require("@radix-ui/react-checkbox")),rt=A(require("react")),Ce=rt.forwardRef(({className:e,...t},o)=>(0,T.jsx)(oe.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,T.jsx)(oe.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,T.jsx)(Ue.Check,{className:"h-4 w-4"})})}));Ce.displayName=oe.Root.displayName;var io=(0,Oe.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 it({className:e,variant:t,...o}){return(0,T.jsx)("div",{className:p(io({variant:t}),e),...o})}var Pe=A(require("react")),I=A(require("@radix-ui/react-scroll-area"));var de=Pe.forwardRef(({className:e,children:t,...o},i)=>(0,T.jsxs)(I.Root,{ref:i,className:p("relative overflow-hidden",e),...o,children:[(0,T.jsx)(I.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,T.jsx)(nt,{}),(0,T.jsx)(I.Corner,{})]}));de.displayName=I.Root.displayName;var nt=Pe.forwardRef(({className:e,orientation:t="vertical",...o},i)=>(0,T.jsx)(I.ScrollAreaScrollbar,{ref:i,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,T.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));nt.displayName=I.ScrollAreaScrollbar.displayName;function lt({deal:e,users:t,customer:o,categories:i,onClose:l,onSave:n,onAddComment:d}){let[r,h]=(0,F.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[x,C]=(0,F.useState)(""),[D,N]=(0,F.useState)(!1),[R,b]=(0,F.useState)(null);(0,F.useEffect)(()=>{N(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);let w=async()=>{try{let s=await n(r);s.success?(N(!1),b(null)):console.error("Failed to save deal:",s.errors)}catch(s){console.error("Failed to save deal:",s)}},u=(s,f)=>{h(O=>({...O,[s]:f}))},P=s=>{let f=(r.categories||[]).includes(s)?(r.categories||[]).filter(O=>O!==s):[...r.categories||[],s];u("categories",f)},k=async()=>{if(x.trim()){let s={text:x,timestamp:new Date().toISOString()};try{let f=await d(s);if(!f.success){console.error("Failed to add comment:",f.errors);return}}catch(f){console.error("Failed to add comment:",f)}h(f=>({...f,comments:[...f.comments||[],s]})),C("")}},B=s=>{switch(s){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},z=s=>t?.find(f=>f.id===Number(s));return(0,T.jsx)(He,{open:!0,children:(0,T.jsxs)(he,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,T.jsxs)(ye,{className:"flex flex-row items-center justify-between",children:[(0,T.jsx)(xe,{className:"text-2xl font-bold",children:o?.name||"no customer"}),(0,T.jsxs)("div",{className:"flex space-x-2",children:[(0,T.jsx)(X,{variant:"outline",onClick:l,children:"Close"}),(0,T.jsxs)(X,{onClick:w,disabled:!D,children:[(0,T.jsx)(Ue.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,T.jsxs)(de,{className:"flex-grow pr-4",children:[(0,T.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,T.jsx)("div",{className:"grid gap-2 m-1",children:R==="value"?(0,T.jsx)(K,{type:"number",value:r.value,onChange:s=>u("value",Number(s.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,T.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",r.value?.toLocaleString()]})}),(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Assignee"}),R==="assignee"?(0,T.jsxs)(ne,{value:r?.assignee?.id?.toString()||"",onValueChange:s=>u("assignee",z(s)),children:[(0,T.jsx)(Y,{children:(0,T.jsx)(le,{placeholder:"Select assignee"})}),(0,T.jsx)(ee,{children:t&&t.map(s=>(0,T.jsx)(te,{value:s?.id?.toString()||"",children:s.name},s.id))})]}):(0,T.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,T.jsx)(Ue.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,T.jsx)("span",{children:r?.assignee?.name})]})]}),(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Closure Date"}),R==="closureDate"?(0,T.jsx)(K,{type:"date",value:r.closureDate?.split("T")[0]??"",onChange:s=>u("closureDate",s.target.value),onBlur:()=>b(null),className:"mr-2",autoFocus:!0}):(0,T.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,T.jsx)(Ue.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,T.jsx)("span",{children:r.closureDate?new Date(r.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,T.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Description"}),R==="description"?(0,T.jsx)(Se,{value:r.description||"",onChange:s=>u("description",s.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,T.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:r.description})]})}),(0,T.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Status"}),R==="status"?(0,T.jsxs)(ne,{value:r.status,onValueChange:s=>{u("status",s),b(null)},children:[(0,T.jsx)(Y,{children:(0,T.jsx)(le,{placeholder:"Select status"})}),(0,T.jsx)(ee,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(s=>(0,T.jsx)(te,{value:s,children:s},s))})]}):(0,T.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:r.status})]}),(0,T.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Categories"}),R==="categories"?(0,T.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:i.map(s=>(0,T.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,T.jsx)(Ce,{id:s.id?.toString()||"",checked:(r.categories||[]).some(f=>f.id===s.id),onCheckedChange:()=>s.id!==void 0&&P(s)}),(0,T.jsx)("label",{htmlFor:(s.id??"").toString(),className:`text-sm font-medium ${B(s.type||"sector")} px-2 py-1 rounded`,children:s.name})]},s.id))}):(0,T.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:r.categories&&r.categories.map(s=>{let f=s;return f?(0,T.jsx)(it,{variant:"outline",className:B(f.type||"sector"),children:f.name},f.id):null})})]}),(0,T.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"COGE Status"}),R==="gecoStatus"?(0,T.jsxs)(ne,{value:r.gecoStatus??void 0,onValueChange:s=>{u("gecoStatus",s),b(null)},children:[(0,T.jsx)(Y,{children:(0,T.jsx)(le,{placeholder:"Select status"})}),(0,T.jsx)(ee,{children:["firm","forecast","other"].map(s=>(0,T.jsx)(te,{value:s,children:s.charAt(0).toUpperCase()+s.slice(1)},s))})]}):(0,T.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:r.gecoStatus?r.gecoStatus.charAt(0).toUpperCase()+r.gecoStatus.slice(1):"N/A"})]})]}),(0,T.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,T.jsxs)("div",{className:"grid gap-2",children:[(0,T.jsx)(E,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,T.jsx)(de,{className:"h-[200px] overflow-T-auto",children:(0,T.jsx)("div",{className:"space-T-2",children:r.comments&&r.comments.slice().sort((s,f)=>new Date(f.timestamp||"").getTime()-new Date(s.timestamp||"").getTime()).map(s=>(0,T.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,T.jsx)("p",{className:"text-sm text-foreground",children:s.text}),(0,T.jsxs)("p",{className:"text-xs text-foreground mt-1",children:[s?.author?.name," - ",new Date(s.timestamp||"").toLocaleString()]})]},s.id))})}),(0,T.jsxs)("div",{className:"flex mt-2",children:[(0,T.jsx)(K,{value:x,onChange:s=>C(s.target.value),placeholder:"Add T comment...",className:"flex-grow ml-1"}),(0,T.jsxs)(X,{onClick:k,className:"ml-2",children:[(0,T.jsx)(Ue.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,T.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(r.updatedAt||"").toLocaleString()]})]})]})]})})}var so=[{id:1,name:"Acme Corp",intro:"A leading technology company",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"GlobalTech",intro:"Innovative solutions provider",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"InnoSystems",intro:"Cutting-edge software development",active:!1,createdAt:"2023-01-01",updatedAt:"2023-01-01"}],ct=[{id:1,name:"Software",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Hardware",type:"proposition",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Referral",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Outbound",type:"source",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Tech",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:6,name:"Finance",type:"sector",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],re=[{id:1,name:"John Doe",email:"john.doe@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Bob Johnson",email:"bob.johnson@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Alice Brown",email:"alice.brown@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Charlie Davis",email:"charlie.davis@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],Xo=[{id:1,customer:so[0],value:5e4,assignee:re[2],status:"Qualified",categories:ct.slice(0,3),dateLogged:"2023-01-15",closureDate:"2023-06-30",updatedAt:"2023-05-01T10:00:00Z",createdAt:"2023-01-01",comments:[{id:"1",text:"Initial contact made",author:re[5],timestamp:"2023-01-15T09:00:00Z"}],description:"Potential software solution for Acme Corp"},{id:2,customer:{id:2,name:"GlobalTech",active:!0,createdAt:"2023-01-01",updatedAt:"2023-01-01"},value:75e3,assignee:{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},status:"Proposal Made",categories:ct.slice(0,3),dateLogged:"2023-02-01",closureDate:"2023-07-31",updatedAt:"2023-05-10T14:30:00Z",createdAt:"2023-01-01",comments:[{id:"2",text:"Proposal sent",author:re[1],timestamp:"2023-02-15T09:00:00Z"}],description:"Custom hardware solution for GlobalTech"}];var no={title:"CRM/DealDetails",component:lt,parameters:{layout:"centered"},tags:["autodocs"]},lo=no,co={id:"1",name:"Acme Corp",active:!0},dt=[{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"}],mt=e=>Array.from({length:e},(t,o)=>({id:`comment-${o+1}`,text:`This is comment number ${o+1}. It's T mock comment to test the scrolling behavior of the comments section in the DealDetails component.`,author:["John Doe","Jane Smith","Bob Johnson"][o%3],timestamp:new Date(Date.now()-(e-o)*24*60*60*1e3).toISOString()})),pt={id:1,customer:{id:1,name:"Acme Corp",active:!0},value:1e5,assignee:{id:1,name:"John Doe"},status:"Qualified",gecoStatus:"firm",categories:dt.slice(0,3),dateLogged:"2023-01-01T00:00:00.000Z",closureDate:"2023-12-31T00:00:00.000Z",updatedAt:"2023-06-15T12:00:00.000Z",comments:mt(50),description:"This is T mock deal for Acme Corp. It involves T large software project with potential for hardware integration."},ut={args:{deal:pt,customer:co,categories:dt,users:re,onClose:()=>console.log("Close clicked"),onSave:e=>console.log("Save clicked",e),onAddComment:e=>console.log("Comment added",e)}},mo={args:{...ut.args,deal:{...pt,comments:mt(100)}}};0&&(module.exports={Default,WithManyComments});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"../../chunk-TLBLUYXL.mjs";import{a as o}from"../../chunk-
|
|
1
|
+
import{c as a}from"../../chunk-TLBLUYXL.mjs";import{a as o}from"../../chunk-5V2PNTEF.mjs";import"../../chunk-OGZERPA4.mjs";import"../../chunk-6T322YHB.mjs";import"../../chunk-KJIBE57R.mjs";import"../../chunk-CX4XB5W2.mjs";import"../../chunk-EECIYMTX.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-JPZJET3B.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";var n={title:"CRM/DealDetails",component:o,parameters:{layout:"centered"},tags:["autodocs"]},u=n,i={id:"1",name:"Acme Corp",active:!0},r=[{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"}],s=e=>Array.from({length:e},(l,t)=>({id:`comment-${t+1}`,text:`This is comment number ${t+1}. It's a mock comment to test the scrolling behavior of the comments section in the DealDetails component.`,author:["John Doe","Jane Smith","Bob Johnson"][t%3],timestamp:new Date(Date.now()-(e-t)*24*60*60*1e3).toISOString()})),m={id:1,customer:{id:1,name:"Acme Corp",active:!0},value:1e5,assignee:{id:1,name:"John Doe"},status:"Qualified",gecoStatus:"firm",categories:r.slice(0,3),dateLogged:"2023-01-01T00:00:00.000Z",closureDate:"2023-12-31T00:00:00.000Z",updatedAt:"2023-06-15T12:00:00.000Z",comments:s(50),description:"This is a mock deal for Acme Corp. It involves a large software project with potential for hardware integration."},c={args:{deal:m,customer:i,categories:r,users:a,onClose:()=>console.log("Close clicked"),onSave:e=>console.log("Save clicked",e),onAddComment:e=>console.log("Comment added",e)}},g={args:{...c.args,deal:{...m,comments:s(100)}}};export{c as Default,g as WithManyComments,u as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
"use strict";"use client";var Mt=Object.create;var we=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var zt=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,Ht=Object.prototype.hasOwnProperty;var Vt=(e,t)=>{for(var r in t)we(e,r,{get:t[r],enumerable:!0})},Ke=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zt(t))!Ht.call(e,i)&&i!==r&&we(e,i,{get:()=>t[i],enumerable:!(a=Et(t,i))||a.enumerable});return e};var z=(e,t,r)=>(r=e!=null?Mt(Bt(e)):{},Ke(t||!e||!e.__esModule?we(r,"default",{value:e,enumerable:!0}):r,e)),Ft=e=>Ke(we({},"__esModule",{value:!0}),e);var Ar={};Vt(Ar,{CRMKanbanBoard:()=>kr});module.exports=Ft(Ar);var Le=require("react");var he=z(require("react")),I=z(require("@radix-ui/react-dialog")),rt=require("lucide-react");var tt=require("clsx");var Ve="-",Ut=e=>{let t=Gt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:m=>{let o=m.split(Ve);return o[0]===""&&o.length!==1&&o.shift(),Je(o,t)||Wt(m)},getConflictingClassGroupIds:(m,o)=>{let b=r[m]||[];return o&&a[m]?[...b,...a[m]]:b}}},Je=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],a=t.nextPart.get(r),i=a?Je(e.slice(1),a):void 0;if(i)return i;if(t.validators.length===0)return;let l=e.join(Ve);return t.validators.find(({validator:m})=>m(l))?.classGroupId},$e=/^\[(.+)\]$/,Wt=e=>{if($e.test(e)){let t=$e.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Gt=e=>{let{theme:t,prefix:r}=e,a={nextPart:new Map,validators:[]};return jt(Object.entries(e.classGroups),r).forEach(([l,m])=>{He(m,a,l,t)}),a},He=(e,t,r,a)=>{e.forEach(i=>{if(typeof i=="string"){let l=i===""?t:qe(t,i);l.classGroupId=r;return}if(typeof i=="function"){if(Ot(i)){He(i(a),t,r,a);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([l,m])=>{He(m,qe(t,l),r,a)})})},qe=(e,t)=>{let r=e;return t.split(Ve).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r},Ot=e=>e.isThemeGetter,jt=(e,t)=>t?e.map(([r,a])=>{let i=a.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([m,o])=>[t+m,o])):l);return[r,i]}):e,_t=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,a=new Map,i=(l,m)=>{r.set(l,m),t++,t>e&&(t=0,a=r,r=new Map)};return{get(l){let m=r.get(l);if(m!==void 0)return m;if((m=a.get(l))!==void 0)return i(l,m),m},set(l,m){r.has(l)?r.set(l,m):i(l,m)}}},Qe="!",Kt=e=>{let{separator:t,experimentalParseClassName:r}=e,a=t.length===1,i=t[0],l=t.length,m=o=>{let b=[],S=0,N=0,p;for(let g=0;g<o.length;g++){let T=o[g];if(S===0){if(T===i&&(a||o.slice(g,g+l)===t)){b.push(o.slice(N,g)),N=g+l;continue}if(T==="/"){p=g;continue}}T==="["?S++:T==="]"&&S--}let v=b.length===0?o:o.substring(N),C=v.startsWith(Qe),h=C?v.substring(1):v,P=p&&p>N?p-N:void 0;return{modifiers:b,hasImportantModifier:C,baseClassName:h,maybePostfixModifierPosition:P}};return r?o=>r({className:o,parseClassName:m}):m},$t=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(a=>{a[0]==="["?(t.push(...r.sort(),a),r=[]):r.push(a)}),t.push(...r.sort()),t},qt=e=>({cache:_t(e.cacheSize),parseClassName:Kt(e),...Ut(e)}),Jt=/\B+/,Qt=(e,t)=>{let{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:i}=t,l=[],m=e.trim().split(Jt),o="";for(let b=m.length-1;b>=0;b-=1){let S=m[b],{modifiers:N,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:C}=r(S),h=!!C,P=a(h?v.substring(0,C):v);if(!P){if(!h){o=S+(o.length>0?" "+o:o);continue}if(P=a(v),!P){o=S+(o.length>0?" "+o:o);continue}h=!1}let g=$t(N).join(":"),T=p?g+Qe:g,E=T+P;if(l.includes(E))continue;l.push(E);let d=i(P,h);for(let y=0;y<d.length;++y){let n=d[y];l.push(T+n)}o=S+(o.length>0?" "+o:o)}return o};function Xt(){let e=0,t,r,a="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Xe(t))&&(a&&(a+=" "),a+=r);return a}var Xe=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=Xe(e[a]))&&(r&&(r+=" "),r+=t);return r};function Zt(e,...t){let r,a,i,l=m;function m(b){let S=t.reduce((N,p)=>p(N),e());return r=qt(S),a=r.cache.get,i=r.cache.set,l=o,o(b)}function o(b){let S=a(b);if(S)return S;let N=Qt(b,r);return i(b,N),N}return function(){return l(Xt.apply(null,arguments))}}var R=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ze=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yt=/^\d+\/\d+$/,er=new Set(["px","full","screen"]),tr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|it|pc|in|cm|mm|cap|ch|ex|r?lh|cq(B|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,or=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ar=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,G=e=>de(e)||er.has(e)||Yt.test(e),O=e=>me(e,"length",ur),de=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>me(e,"number",de),be=e=>!!e&&Number.isInteger(Number(e)),ir=e=>e.endsWith("%")&&de(e.slice(0,-1)),u=e=>Ze.test(e),j=e=>tr.test(e),nr=new Set(["length","size","percentage"]),lr=e=>me(e,nr,Ye),cr=e=>me(e,"position",Ye),dr=new Set(["image","url"]),mr=e=>me(e,dr,gr),pr=e=>me(e,"",fr),ve=()=>!0,me=(e,t,r)=>{let a=Ze.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):r(a[2]):!1},ur=e=>rr.test(e)&&!or.test(e),Ye=()=>!1,fr=e=>ar.test(e),gr=e=>sr.test(e);var br=()=>{let e=R("colors"),t=R("spacing"),r=R("blur"),a=R("brightness"),i=R("borderColor"),l=R("borderRadius"),m=R("borderSpacing"),o=R("borderWidth"),b=R("contrast"),S=R("grayscale"),N=R("hueRotate"),p=R("invert"),v=R("gap"),C=R("gradientColorStops"),h=R("gradientColorStopPositions"),P=R("inset"),g=R("margin"),T=R("opacity"),E=R("padding"),d=R("saturate"),y=R("scale"),n=R("sepia"),D=R("skew"),ce=R("space"),We=R("translate"),Ie=()=>["auto","contain","none"],Me=()=>["auto","hidden","clip","visible","scroll"],Ee=()=>["auto",u,t],k=()=>[u,t],Ge=()=>["",G,O],ye=()=>["auto",de,u],Oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ce=()=>["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"],ze=()=>["start","end","center","between","around","evenly","stretch"],ge=()=>["","0",u],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[de,u];return{cacheSize:500,separator:":",theme:{colors:[ve],spacing:[G,O],blur:["none","",j,u],brightness:W(),borderColor:[e],borderRadius:["none","","full",j,u],borderSpacing:k(),borderWidth:Ge(),contrast:W(),grayscale:ge(),hueRotate:W(),invert:ge(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[ir,O],inset:Ee(),margin:Ee(),opacity:W(),padding:k(),saturate:W(),scale:W(),sepia:ge(),skew:W(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",u]}],container:["container"],columns:[{columns:[j]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"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:[...Oe(),u]}],overflow:[{overflow:Me()}],"overflow-x":[{"overflow-x":Me()}],"overflow-y":[{"overflow-y":Me()}],overscroll:[{overscroll:Ie()}],"overscroll-x":[{"overscroll-x":Ie()}],"overscroll-y":[{"overscroll-y":Ie()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",be,u]}],basis:[{basis:Ee()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",u]}],grow:[{grow:ge()}],shrink:[{shrink:ge()}],order:[{order:["first","last","none",be,u]}],"grid-cols":[{"grid-cols":[ve]}],"col-start-end":[{col:["auto",{span:["full",be,u]},u]}],"col-start":[{"col-start":ye()}],"col-end":[{"col-end":ye()}],"grid-rows":[{"grid-rows":[ve]}],"row-start-end":[{row:["auto",{span:[be,u]},u]}],"row-start":[{"row-start":ye()}],"row-end":[{"row-end":ye()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",u]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",u]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ze()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ze(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ze(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],it:[{it:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[ce]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ce]}],"space-y-reverse":["space-y-reverse"],B:[{B:["auto","min","max","fit","svw","lvw","dvw",u,t]}],"min-B":[{"min-B":[u,t,"min","max","fit"]}],"max-B":[{"max-B":[u,t,"none","full","min","max","fit","prose",{screen:[j]},j]}],h:[{h:[u,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[u,t,"auto","min","max","fit"]}],"font-size":[{text:["base",j,O]}],"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:[ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",u]}],"line-clamp":[{"line-clamp":["none",de,Be]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",G,u]}],"list-image":[{"list-image":["none",u]}],"list-style-type":[{list:["none","disc","decimal",u]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[T]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",G,O]}],"underline-offset":[{"underline-offset":["auto",G,u]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[T]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Oe(),cr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},mr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[l]}],"rounded-B":[{"rounded-B":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-Le":[{"rounded-Le":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-B":[{border:[o]}],"border-B-x":[{"border-x":[o]}],"border-B-y":[{"border-y":[o]}],"border-B-B":[{"border-B":[o]}],"border-B-e":[{"border-e":[o]}],"border-B-t":[{"border-t":[o]}],"border-B-r":[{"border-r":[o]}],"border-B-b":[{"border-b":[o]}],"border-B-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[T]}],"border-style":[{border:[...Ce(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[T]}],"divide-style":[{divide:Ce()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-B":[{"border-B":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Ce()]}],"outline-offset":[{"outline-offset":[G,u]}],"outline-B":[{outline:[G,O]}],"outline-color":[{outline:[e]}],"ring-B":[{ring:Ge()}],"ring-B-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-B":[{"ring-offset":[G,O]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",j,pr]}],"shadow-color":[{shadow:[ve]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...je(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":je()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[a]}],contrast:[{contrast:[b]}],"drop-shadow":[{"drop-shadow":["","none",j,u]}],grayscale:[{grayscale:[S]}],"hue-rotate":[{"hue-rotate":[N]}],invert:[{invert:[p]}],saturate:[{saturate:[d]}],sepia:[{sepia:[n]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[b]}],"backdrop-grayscale":[{"backdrop-grayscale":[S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[d]}],"backdrop-sepia":[{"backdrop-sepia":[n]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[m]}],"border-spacing-x":[{"border-spacing-x":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",u]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",u]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",u]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[be,u]}],"translate-x":[{"translate-x":[We]}],"translate-y":[{"translate-y":[We]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",u]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","B-resize","B-resize","B-resize","nw-resize","Le-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",u]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-it":[{"scroll-it":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",u]}],fill:[{fill:[e,"none"]}],"stroke-B":[{stroke:[G,O,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","it","pr","pb","pl"],px:["pr","pl"],py:["it","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["B","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-B","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Le","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-B":["rounded-ss","rounded-es"],"rounded-e":["rounded-Le","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-B":["border-B-B","border-B-e","border-B-t","border-B-r","border-B-b","border-B-l"],"border-B-x":["border-B-r","border-B-l"],"border-B-y":["border-B-t","border-B-b"],"border-color":["border-color-B","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-it","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-it","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var et=Zt(br);function f(...e){return et((0,tt.clsx)(e))}var B=require("react/jsx-runtime"),pe=I.Root,ot=I.Trigger,vr=I.Portal;var at=he.forwardRef(({className:e,...t},r)=>(0,B.jsx)(I.Overlay,{ref:r,className:f("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}));at.displayName=I.Overlay.displayName;var X=he.forwardRef(({className:e,children:t,...r},a)=>(0,B.jsxs)(vr,{children:[(0,B.jsx)(at,{}),(0,B.jsxs)(I.Content,{ref:a,className:f("fixed left-[50%] top-[50%] z-50 grid B-full max-B-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),...r,children:[t,(0,B.jsxs)(I.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,B.jsx)(rt.X,{className:"h-4 B-4"}),(0,B.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));X.displayName=I.Content.displayName;var Z=({className:e,...t})=>(0,B.jsx)("div",{className:f("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Z.displayName="DialogHeader";var hr=({className:e,...t})=>(0,B.jsx)("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});hr.displayName="DialogFooter";var Y=he.forwardRef(({className:e,...t},r)=>(0,B.jsx)(I.Title,{ref:r,className:f("text-lg font-semibold leading-none tracking-tight",e),...t}));Y.displayName=I.Title.displayName;var xr=he.forwardRef(({className:e,...t},r)=>(0,B.jsx)(I.Description,{ref:r,className:f("text-sm text-muted-foreground",e),...t}));xr.displayName=I.Description.displayName;var st=require("@radix-ui/react-slot"),it=require("class-variance-authority"),nt=z(require("react")),yr=(0,it.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 B-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),V=nt.forwardRef(({asChild:e=!1,className:t,size:r,variant:a,...i},l)=>(0,B.jsx)(e?st.Slot:"button",{className:f(yr({className:t,size:r,variant:a})),ref:l,...i}));V.displayName="Button";var ct=z(require("react"));var U=ct.forwardRef(({className:e,type:t,...r},a)=>(0,B.jsx)("input",{type:t,className:f("flex h-9 B-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...r}));U.displayName="Input";var mt=z(require("react")),Fe=z(require("@radix-ui/react-label"));var Cr=(0,it.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),M=mt.forwardRef(({className:e,...t},r)=>(0,B.jsx)(Fe.Root,{ref:r,className:f(Cr(),e),...t}));M.displayName=Fe.Root.displayName;var ft=z(require("react")),ee=ft.forwardRef(({className:e,...t},r)=>(0,B.jsx)("textarea",{className:f("flex min-h-[80px] B-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:r,...t}));ee.displayName="Textarea";var x=z(require("@radix-ui/react-select")),_=z(require("react")),re=x.Root;var oe=x.Value,K=_.forwardRef(({children:e,className:t,...r},a)=>(0,B.jsxs)(x.Trigger,{className:f("flex h-10 B-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:a,...r,children:[e,(0,B.jsx)(x.Icon,{asChild:!0,children:(0,B.jsx)(rt.ChevronDown,{className:"h-4 B-4 opacity-50"})})]}));K.displayName=x.Trigger.displayName;var bt=_.forwardRef(({className:e,...t},r)=>(0,B.jsx)(x.ScrollUpButton,{className:f("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,B.jsx)(rt.ChevronUp,{className:"h-4 B-4"})}));bt.displayName=x.ScrollUpButton.displayName;var vt=_.forwardRef(({className:e,...t},r)=>(0,B.jsx)(x.ScrollDownButton,{className:f("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,B.jsx)(rt.ChevronDown,{className:"h-4 B-4"})}));vt.displayName=x.ScrollDownButton.displayName;var $=_.forwardRef(({children:e,className:t,position:r="popper",...a},i)=>(0,B.jsx)(x.Portal,{children:(0,B.jsxs)(x.Content,{className:f("relative z-50 max-h-96 min-B-[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",r==="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:r,ref:i,...a,children:[(0,B.jsx)(bt,{}),(0,B.jsx)(x.Viewport,{className:f("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] B-full min-B-[var(--radix-select-trigger-width)]"),children:e}),(0,B.jsx)(vt,{})]})}));$.displayName=x.Content.displayName;var wr=_.forwardRef(({className:e,...t},r)=>(0,B.jsx)(x.Label,{className:f("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));wr.displayName=x.Label.displayName;var q=_.forwardRef(({children:e,className:t,...r},a)=>(0,B.jsxs)(x.Item,{className:f("relative flex B-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:a,...r,children:[(0,B.jsx)("span",{className:"absolute left-2 flex h-3.5 B-3.5 items-center justify-center",children:(0,B.jsx)(x.ItemIndicator,{children:(0,B.jsx)(rt.Check,{className:"h-4 B-4"})})}),(0,B.jsx)(x.ItemText,{children:e})]}));q.displayName=x.Item.displayName;var Sr=_.forwardRef(({className:e,...t},r)=>(0,B.jsx)(x.Separator,{className:f("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));Sr.displayName=x.Separator.displayName;var xe=z(require("@radix-ui/react-checkbox")),xt=z(require("react")),ae=xt.forwardRef(({className:e,...t},r)=>(0,B.jsx)(xe.Root,{className:f("peer h-4 B-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:r,...t,children:(0,B.jsx)(xe.Indicator,{className:f("flex items-center justify-center text-current"),children:(0,B.jsx)(rt.Check,{className:"h-4 B-4"})})}));ae.displayName=xe.Root.displayName;var Nr=(0,it.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 Ne({className:e,variant:t,...r}){return(0,B.jsx)("div",{className:f(Nr({variant:t}),e),...r})}var Ue=z(require("react")),F=z(require("@radix-ui/react-scroll-area"));var ue=Ue.forwardRef(({className:e,children:t,...r},a)=>(0,B.jsxs)(F.Root,{ref:a,className:f("relative overflow-hidden",e),...r,children:[(0,B.jsx)(F.Viewport,{className:"h-full B-full rounded-[inherit]",children:t}),(0,B.jsx)(wt,{}),(0,B.jsx)(F.Corner,{})]}));ue.displayName=F.Root.displayName;var wt=Ue.forwardRef(({className:e,orientation:t="vertical",...r},a)=>(0,B.jsx)(F.ScrollAreaScrollbar,{ref:a,orientation:t,className:f("flex touch-none select-none transition-colors",t==="vertical"&&"h-full B-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,B.jsx)(F.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));wt.displayName=F.ScrollAreaScrollbar.displayName;function St({deal:e,users:t,customer:r,categories:a,onClose:i,onSave:l,onAddComment:m}){let[o,b]=(0,Le.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[S,N]=(0,Le.useState)(""),[p,v]=(0,Le.useState)(!1),[C,h]=(0,Le.useState)(null);(0,Le.useEffect)(()=>{v(JSON.stringify(e)!==JSON.stringify(o))},[e,o]);let P=async()=>{try{let n=await l(o);n.success?(v(!1),h(null)):console.error("Failed to save deal:",n.errors)}catch(n){console.error("Failed to save deal:",n)}},g=(n,D)=>{b(ce=>({...ce,[n]:D}))},T=n=>{let D=(o.categories||[]).includes(n)?(o.categories||[]).filter(ce=>ce!==n):[...o.categories||[],n];g("categories",D)},E=async()=>{if(S.trim()){let n={text:S,timestamp:new Date().toISOString()};try{let D=await m(n);if(!D.success){console.error("Failed to add comment:",D.errors);return}}catch(D){console.error("Failed to add comment:",D)}b(D=>({...D,comments:[...D.comments||[],n]})),N("")}},d=n=>{switch(n){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},y=n=>t?.find(D=>D.id===Number(n));return(0,B.jsx)(pe,{open:!0,children:(0,B.jsxs)(X,{className:"max-B-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,B.jsxs)(Z,{className:"flex flex-row items-center justify-between",children:[(0,B.jsx)(Y,{className:"text-2xl font-bold",children:r?.name}),(0,B.jsxs)("div",{className:"flex space-x-2",children:[(0,B.jsx)(V,{variant:"outline",onClick:i,children:"Close"}),(0,B.jsxs)(V,{onClick:P,disabled:!p,children:[(0,B.jsx)(rt.SaveIcon,{className:"B-4 h-4 mr-2"}),"Save"]})]})]}),(0,B.jsxs)(ue,{className:"flex-grow pr-4",children:[(0,B.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,B.jsx)("div",{className:"grid gap-2 m-1",children:C==="value"?(0,B.jsx)(U,{type:"number",value:o.value,onChange:n=>g("value",Number(n.target.value)),onBlur:()=>h(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,B.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("value"),children:["\xA3",o.value?.toLocaleString()]})}),(0,B.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,B.jsx)(M,{className:"text-sm font-medium text-accent",children:"Assignee"}),C==="assignee"?(0,B.jsxs)(re,{value:o?.assignee?.id?.toString()||"",onValueChange:n=>g("assignee",y(n)),children:[(0,B.jsx)(K,{children:(0,B.jsx)(oe,{placeholder:"Select assignee"})}),(0,B.jsx)($,{children:t&&t.map(n=>(0,B.jsx)(q,{value:n?.id?.toString()||"",children:n.name},n.id))})]}):(0,B.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("assignee"),children:[(0,B.jsx)(rt.UserIcon,{className:"B-4 h-4 text-gray-400"}),(0,B.jsx)("span",{children:o.assignee.name})]})]}),(0,B.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,B.jsx)(M,{className:"text-sm font-medium text-accent",children:"Closure Date"}),C==="closureDate"?(0,B.jsx)(U,{type:"date",value:o.closureDate?.split("T")[0]??"",onChange:n=>g("closureDate",n.target.value),onBlur:()=>h(null),className:"mr-2",autoFocus:!0}):(0,B.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("closureDate"),children:[(0,B.jsx)(rt.CalendarIcon,{className:"B-4 h-4 text-gray-400"}),(0,B.jsx)("span",{children:o.closureDate?new Date(o.closureDate).toLocaleDateString("en-GB"):"N/B"})]})]})]}),(0,B.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,B.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,B.jsx)(M,{className:"text-sm font-medium text-accent",children:"Description"}),C==="description"?(0,B.jsx)(ee,{value:o.description||"",onChange:n=>g("description",n.target.value),onBlur:()=>h(null),className:"min-h-[100px]",autoFocus:!0}):(0,B.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>h("description"),children:o.description})]})}),(0,B.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 it-2 gap-4",children:[(0,B.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,B.jsx)(M,{className:"text-sm font-medium text-accent",children:"Status"}),C==="status"?(0,B.jsxs)(re,{value:o.status,onValueChange:n=>{g("status",n),h(null)},children:[(0,B.jsx)(K,{children:(0,B.jsx)(oe,{placeholder:"Select status"})}),(0,B.jsx)($,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(n=>(0,B.jsx)(q,{value:n,children:n},n))})]}):(0,B.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("status"),children:o.status})]}),(0,B.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,B.jsx)(M,{className:"text-sm font-medium text-accent",children:"Categories"}),C==="categories"?(0,B.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:a.map(n=>(0,B.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,B.jsx)(ae,{id:n.id?.toString()||"",checked:(o.categories||[]).some(D=>D.id===n.id),onCheckedChange:()=>n.id!==void 0&&T(n)}),(0,B.jsx)("label",{htmlFor:(n.id??"").toString(),className:`text-sm font-medium ${d(n.type||"sector")} px-2 py-1 rounded`,children:n.name})]},n.id))}):(0,B.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("categories"),children:o.categories&&o.categories.map(n=>{let D=n;return D?(0,B.jsx)(Ne,{variant:"outline",className:d(D.type||"sector"),children:D.name},D.id):null})})]}),(0,B.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,B.jsx)(M,{className:"text-sm font-medium text-accent",children:"COGE Status"}),C==="gecoStatus"?(0,B.jsxs)(re,{value:o.gecoStatus??void 0,onValueChange:n=>{g("gecoStatus",n),h(null)},children:[(0,B.jsx)(K,{children:(0,B.jsx)(oe,{placeholder:"Select status"})}),(0,B.jsx)($,{children:["firm","forecast","other"].map(n=>(0,B.jsx)(q,{value:n,children:n.charAt(0).toUpperCase()+n.slice(1)},n))})]}):(0,B.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("gecoStatus"),children:o.gecoStatus?o.gecoStatus.charAt(0).toUpperCase()+o.gecoStatus.slice(1):"N/B"})]})]}),(0,B.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 it-4 gap-4",children:[(0,B.jsxs)("div",{className:"grid gap-2",children:[(0,B.jsx)(M,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,B.jsx)(ue,{className:"h-[200px] overflow-y-auto",children:(0,B.jsx)("div",{className:"space-y-2",children:o.comments&&o.comments.slice().sort((n,D)=>new Date(D.timestamp||"").getTime()-new Date(n.timestamp||"").getTime()).map(n=>(0,B.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,B.jsx)("p",{className:"text-sm text-foreground",children:n.text}),(0,B.jsxs)("p",{className:"text-xs text-foreground mt-1",children:[n?.author?.name," - ",new Date(n.timestamp||"").toLocaleString()]})]},n.id))})}),(0,B.jsxs)("div",{className:"flex mt-2",children:[(0,B.jsx)(U,{value:S,onChange:n=>N(n.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,B.jsxs)(V,{onClick:E,className:"ml-2",children:[(0,B.jsx)(rt.PlusIcon,{className:"B-4 h-4 mr-2"}),"Add"]})]})]}),(0,B.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(o.updatedAt||"").toLocaleString()]})]})]})]})})}var ie=z(require("react"));var Pe=ie.forwardRef(({className:e,...t},r)=>(0,B.jsx)("div",{ref:r,className:f("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Pe.displayName="Card";var De=ie.forwardRef(({className:e,...t},r)=>(0,B.jsx)("div",{ref:r,className:f("flex flex-col space-y-1.5 p-6",e),...t}));De.displayName="CardHeader";var Re=ie.forwardRef(({className:e,...t},r)=>(0,B.jsx)("div",{ref:r,className:f("font-semibold leading-none tracking-tight",e),...t}));Re.displayName="CardTitle";var Pr=ie.forwardRef(({className:e,...t},r)=>(0,B.jsx)("div",{ref:r,className:f("text-sm text-muted-foreground",e),...t}));Pr.displayName="CardDescription";var ke=ie.forwardRef(({className:e,...t},r)=>(0,B.jsx)("div",{ref:r,className:f("p-6 it-0",e),...t}));ke.displayName="CardContent";var Dr=ie.forwardRef(({className:e,...t},r)=>(0,B.jsx)("div",{ref:r,className:f("flex items-center p-6 it-0",e),...t}));Dr.displayName="CardFooter";function Nt({deal:e,customer:t,categories:r,onClick:a,compact:i=!1}){let l=r.find(m=>m.type==="proposition"&&(e.categories??[]).includes(m.id));return i?(0,B.jsxs)(Pe,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,B.jsxs)(De,{className:"pb-1 it-2",children:[(0,B.jsx)(Re,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,B.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,B.jsx)(ke,{className:"text-xs text-gray-500 pb-2",children:(0,B.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,B.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,B.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,B.jsxs)(Pe,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,B.jsxs)(De,{className:"pb-2",children:[(0,B.jsx)("div",{className:"flex justify-between items-center",children:(0,B.jsx)(Re,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,B.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,B.jsxs)(ke,{children:[(0,B.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,B.jsxs)("div",{className:"flex items-center text-sm text-accent",children:[(0,B.jsx)(rt.UserIcon,{className:"B-4 h-4 mr-1 text-xs"}),(0,B.jsx)("span",{children:e.assignee.name})]}),(0,B.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,B.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,B.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,B.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,B.jsx)(rt.CalendarIcon,{className:"B-3 h-3 mr-1"}),(0,B.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,B.jsx)("div",{className:"flex justify-between items-left",children:l&&(0,B.jsx)(Ne,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:l.name})})]})]})}var Te=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Dt({onSubmit:e}){let[t,r]=(0,Le.useState)({name:"",intro:"",active:!1});return(0,B.jsxs)("form",{onSubmit:i=>{i.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),r({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,B.jsxs)("div",{className:"space-y-2",children:[(0,B.jsx)(M,{htmlFor:"customerName",children:"Customer Name"}),(0,B.jsx)(U,{id:"customerName",value:t.name,onChange:i=>r({...t,name:i.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,B.jsxs)("div",{className:"space-y-2",children:[(0,B.jsx)(M,{htmlFor:"customerIntro",children:"Intro"}),(0,B.jsx)(ee,{id:"customerIntro",value:t.intro??"",onChange:i=>r({...t,intro:i.target.value}),placeholder:"Enter customer intro"})]}),(0,B.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,B.jsx)(ae,{id:"activeCustomer",checked:!!t.active,onCheckedChange:i=>r({...t,active:i})}),(0,B.jsx)(M,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,B.jsx)(V,{type:"submit",className:"B-full",children:"Add Customer"})]})}function kt({customers:e,users:t,categories:r,onSubmit:a,initialDeal:i,onAddCustomer:l,onClose:m}){let[o,b]=(0,Le.useState)(i||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[S,N]=(0,Le.useState)(!1),[p,v]=(0,Le.useState)({});(0,Le.useEffect)(()=>{i&&b(i)},[i]);let C=()=>{let d={};return o.customer||(d.customer="Customer is required"),o.value||(d.value="Value is required"),o.assignee||(d.assignee="Assignee is required"),o.closureDate||(d.closureDate="Closure Date is required"),v(d),Object.keys(d).length===0},h=async d=>{d.preventDefault(),v({});try{if(C()){let y=await a({...o});y.success?(b({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),m?.()):v(y.errors||{})}}catch{v({submit:"An error occurred while submitting the form."})}},P=d=>{b(y=>({...y,categories:(y.categories||[]).includes(d.id)?(y.categories||[]).filter(n=>n!==d.id):[...y.categories||[],d.id]}))},g=async d=>{b({...o,customer:d});try{let y=await l(d);y.success?N(!1):v(y.errors||{})}catch{v({submit:"An error occurred while submitting the form."})}},T=d=>t?.find(y=>y.id===Number(d)),E=d=>e?.find(y=>y.id===Number(d));return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("form",{onSubmit:h,className:"space-y-6",children:[(0,B.jsx)(ue,{className:"h-[60vh] pr-4",children:(0,B.jsxs)("div",{className:"space-y-6 px-4",children:[(0,B.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,B.jsx)(M,{htmlFor:"customer",children:"Customer"}),(0,B.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,B.jsxs)(re,{value:o.customer?.id?.toString(),onValueChange:d=>b({...o,customer:E(d)}),children:[(0,B.jsx)(K,{children:(0,B.jsx)(oe,{placeholder:"Select customer"})}),(0,B.jsx)($,{children:e.map(d=>(0,B.jsx)(q,{value:d.id?.toString()||"",children:d.name},d.id))})]}),(0,B.jsx)(V,{variant:"outline",size:"icon",onClick:()=>N(!0),children:(0,B.jsx)(rt.PlusIcon,{className:"B-5 h-5"})})]}),p.customerId&&(0,B.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,B.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,B.jsx)(M,{htmlFor:"value",children:"Value"}),(0,B.jsx)(U,{id:"value",type:"number",value:o.value||"",onChange:d=>b({...o,value:Number.parseFloat(d.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,B.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,B.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,B.jsx)(M,{htmlFor:"assignee",children:"Assignee"}),(0,B.jsxs)(re,{value:o.assignee?.id?.toString(),onValueChange:d=>b({...o,assignee:T(d)}),children:[(0,B.jsx)(K,{children:(0,B.jsx)(oe,{placeholder:"Select assignee"})}),(0,B.jsx)($,{children:t&&t.map(d=>(0,B.jsx)(q,{value:d.id?.toString()||"",children:d.name},d.id))})]}),p.assignee&&(0,B.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,B.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,B.jsx)(M,{htmlFor:"description",children:"Description"}),(0,B.jsx)(ee,{id:"description",value:o.description||"",onChange:d=>b({...o,description:d.target.value}),placeholder:"Enter deal description"})]}),(0,B.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,B.jsx)(M,{children:"Categories"}),(0,B.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(d=>(0,B.jsxs)("div",{className:"space-y-2",children:[(0,B.jsx)("h4",{className:"text-sm font-medium",children:d.charAt(0).toUpperCase()+d.slice(1)}),(0,B.jsx)("div",{className:"grid grid-cols-2 gap-2",children:r.filter(y=>y.type===d).map(y=>(0,B.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,B.jsx)(ae,{id:y.id.toString(),checked:o.categories?.includes(y.id),onCheckedChange:()=>P(y)}),(0,B.jsx)("label",{htmlFor:y.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:y.name})]},y.id))})]},d))})]}),(0,B.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,B.jsx)(M,{htmlFor:"closureDate",children:"Closure Date"}),(0,B.jsx)(U,{id:"closureDate",type:"date",value:o.closureDate||"",onChange:d=>b({...o,closureDate:d.target.value})}),p.closureDate&&(0,B.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,B.jsx)(V,{type:"submit",className:"B-full",children:i?"Update Deal":"Add Deal"})]}),(0,B.jsx)(pe,{open:S,onOpenChange:N,children:(0,B.jsxs)(X,{children:[(0,B.jsx)(Z,{children:(0,B.jsx)(Y,{children:"Add New Customer"})}),(0,B.jsx)(Dt,{onSubmit:g})]})})]})}function Lt({status:e,deals:t,users:r,customers:a,categories:i,onDealClick:l,calculateColumnValue:m,calculateWeightedValue:o,addNewDeal:b,onAddCustomer:S,compact:N=!1}){let[p,v]=(0,Le.useState)(!1);return(0,B.jsxs)("div",{className:"flex flex-col B-80",children:[(0,B.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),b&&(0,B.jsxs)(pe,{open:p,onOpenChange:v,children:[(0,B.jsx)(ot,{asChild:!0,children:(0,B.jsxs)(V,{className:"mb-4 B-full",children:[(0,B.jsx)(rt.PlusCircle,{className:"mr-2 h-4 B-4"}),"Add New Deal"]})}),(0,B.jsxs)(X,{children:[(0,B.jsx)(Z,{children:(0,B.jsx)(Y,{children:"Add New Deal"})}),(0,B.jsx)(kt,{customers:a,users:r,categories:i,onSubmit:b,onAddCustomer:S??(async()=>Promise.resolve({success:!1})),onClose:()=>v(!1)})]})]}),(0,B.jsx)(Te.Droppable,{droppableId:e,isDropDisabled:!1,children:C=>(0,B.jsxs)("div",{ref:C.innerRef,...C.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((h,P)=>(0,B.jsx)(Te.Draggable,{draggableId:h.id.toString(),index:h.id,children:g=>(0,B.jsx)("div",{ref:g.innerRef,...g.draggableProps,...g.dragHandleProps,children:(0,B.jsx)(Nt,{deal:h,customer:h.customer,categories:i,onClick:()=>l(h),compact:N})})},h.id.toString())),C.placeholder]})}),(0,B.jsxs)("div",{className:"mt-4 text-sm p-3 rounded-lg shadow",children:[(0,B.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,B.jsxs)("span",{className:"text-green-600",children:["\xA3",m(t).toLocaleString()]})]}),(0,B.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,B.jsxs)("span",{className:"text-blue-600",children:["\xA3",o(t,e).toLocaleString()]})]})]})]})}var Rr=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function kr({initialData:e,addNewDeal:t,updateDeal:r,addComment:a,addNewCustomer:i}){let[l,m]=(0,Le.useState)(null),o=p=>(e.deals??[]).filter(v=>v.status===p),b=p=>p.reduce((v,C)=>v+(C.value||0),0),S=(p,v)=>{let C={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return p.reduce((h,P)=>h+(P.value||0)*C[v],0)},N=(0,Le.useCallback)(p=>{let{source:v,destination:C}=p;if(!C||v.droppableId===C.droppableId&&v.index===C.index)return;let h=v.droppableId,P=C.droppableId,g=e.deals?.filter(E=>E.id===v.index)[0],T=[...e.deals??[]];g&&(g.status=P,r(g))},[r]);return(0,B.jsx)(Te.DragDropContext,{onDragEnd:N,children:(0,B.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,B.jsx)("div",{className:"flex space-x-4 pb-4",children:Rr.filter(p=>p!=="Lost").map(p=>{let v=o(p);return(0,B.jsx)(Lt,{status:p,deals:v,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:m,calculateColumnValue:b,calculateWeightedValue:S,addNewDeal:p==="Cold"?t:void 0,onAddCustomer:i},p)})}),l&&(0,B.jsx)(St,{deal:l,users:e.users,customer:l.customer,categories:e.categories??[],onClose:()=>m(null),onSave:r,onAddComment:p=>a(l.id.toString(),p)})]})})}0&&(module.exports={CRMKanbanBoard});
|
|
4
|
+
"use strict";"use client";var St=Object.create;var de=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Rt=Object.getPrototypeOf,Dt=Object.prototype.hasOwnProperty;var kt=(e,t)=>{for(var r in t)de(e,r,{get:t[r],enumerable:!0})},Fe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Nt(t))!Dt.call(e,l)&&l!==r&&de(e,l,{get:()=>t[l],enumerable:!(o=Pt(t,l))||o.enumerable});return e};var A=(e,t,r)=>(r=e!=null?St(Rt(e)):{},Fe(t||!e||!e.__esModule?de(r,"default",{value:e,enumerable:!0}):r,e)),Tt=e=>Fe(de({},"__esModule",{value:!0}),e);var hr={};kt(hr,{CRMKanbanBoard:()=>xr});module.exports=Tt(hr);var Ce=require("react");var te=A(require("react")),k=A(require("@radix-ui/react-dialog")),Ze=require("lucide-react");var Xe=require("clsx");var Te="-",At=e=>{let t=Lt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let a=c.split(Te);return a[0]===""&&a.length!==1&&a.shift(),_e(a,t)||Mt(c)},getConflictingClassGroupIds:(c,a)=>{let v=r[c]||[];return a&&o[c]?[...v,...o[c]]:v}}},_e=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),l=o?_e(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let n=e.join(Te);return t.validators.find(({validator:c})=>c(n))?.classGroupId},je=/^\[(.+)\]$/,Mt=e=>{if(je.test(e)){let t=je.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Lt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Et(Object.entries(e.classGroups),r).forEach(([n,c])=>{ke(c,o,n,t)}),o},ke=(e,t,r,o)=>{e.forEach(l=>{if(typeof l=="string"){let n=l===""?t:Oe(t,l);n.classGroupId=r;return}if(typeof l=="function"){if(It(l)){ke(l(o),t,r,o);return}t.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([n,c])=>{ke(c,Oe(t,n),r,o)})})},Oe=(e,t)=>{let r=e;return t.split(Te).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},It=e=>e.isThemeGetter,Et=(e,t)=>t?e.map(([r,o])=>{let l=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,a])=>[t+c,a])):n);return[r,l]}):e,zt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,l=(n,c)=>{r.set(n,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let c=r.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return l(n,c),c},set(n,c){r.has(n)?r.set(n,c):l(n,c)}}},Ke="!",Bt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,l=t[0],n=t.length,c=a=>{let v=[],y=0,x=0,g;for(let u=0;u<a.length;u++){let D=a[u];if(y===0){if(D===l&&(o||a.slice(u,u+n)===t)){v.push(a.slice(x,u)),x=u+n;continue}if(D==="/"){g=u;continue}}D==="["?y++:D==="]"&&y--}let f=v.length===0?a:a.substring(x),w=f.startsWith(Ke),h=w?f.substring(1):f,N=g&&g>x?g-x:void 0;return{modifiers:v,hasImportantModifier:w,baseClassName:h,maybePostfixModifierPosition:N}};return r?a=>r({className:a,parseClassName:c}):c},Ht=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Vt=e=>({cache:zt(e.cacheSize),parseClassName:Bt(e),...At(e)}),Wt=/\L+/,Gt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l}=t,n=[],c=e.trim().split(Wt),a="";for(let v=c.length-1;v>=0;v-=1){let y=c[v],{modifiers:x,hasImportantModifier:g,baseClassName:f,maybePostfixModifierPosition:w}=r(y),h=!!w,N=o(h?f.substring(0,w):f);if(!N){if(!h){a=y+(a.length>0?" "+a:a);continue}if(N=o(f),!N){a=y+(a.length>0?" "+a:a);continue}h=!1}let u=Ht(x).join(":"),D=g?u+Ke:u,T=D+N;if(n.includes(T))continue;n.push(T);let V=l(N,h);for(let E=0;E<V.length;++E){let i=V[E];n.push(D+i)}a=y+(a.length>0?" "+a:a)}return a};function Ut(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=$e(t))&&(o&&(o+=" "),o+=r);return o}var $e=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=$e(e[o]))&&(r&&(r+=" "),r+=t);return r};function Ft(e,...t){let r,o,l,n=c;function c(v){let y=t.reduce((x,g)=>g(x),e());return r=Vt(y),o=r.cache.get,l=r.cache.set,n=a,a(v)}function a(v){let y=o(v);if(y)return y;let x=Gt(v,r);return l(v,x),x}return function(){return n(Ut.apply(null,arguments))}}var S=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Je=/^\[(?:([a-z-]+):)?(.+)\]$/i,jt=/^\d+\/\d+$/,Ot=new Set(["px","full","screen"]),_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|L|min|max))|\L(calc|min|max|clamp)\(.+\)|^0$/,$t=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Ce-?((\d+)?\.?(\d+)[a-z]+|0)/,Qt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>q(e)||Ot.has(e)||jt.test(e),W=e=>X(e,"length",or),q=e=>!!e&&!Number.isNaN(Number(e)),De=e=>X(e,"number",q),Y=e=>!!e&&Number.isInteger(Number(e)),qt=e=>e.endsWith("%")&&q(e.slice(0,-1)),d=e=>Je.test(e),G=e=>_t.test(e),Xt=new Set(["length","size","percentage"]),Zt=e=>X(e,Xt,Qe),Yt=e=>X(e,"position",Qe),er=new Set(["image","url"]),tr=e=>X(e,er,sr),rr=e=>X(e,"",ar),ee=()=>!0,X=(e,t,r)=>{let o=Je.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},or=e=>Kt.test(e)&&!$t.test(e),Qe=()=>!1,ar=e=>Jt.test(e),sr=e=>Qt.test(e);var ir=()=>{let e=S("colors"),t=S("spacing"),r=S("blur"),o=S("brightness"),l=S("borderColor"),n=S("borderRadius"),c=S("borderSpacing"),a=S("borderWidth"),v=S("contrast"),y=S("grayscale"),x=S("hueRotate"),g=S("invert"),f=S("gap"),w=S("gradientColorStops"),h=S("gradientColorStopPositions"),N=S("inset"),u=S("margin"),D=S("opacity"),T=S("padding"),V=S("saturate"),E=S("scale"),i=S("sepia"),C=S("skew"),Q=S("space"),He=S("translate"),Se=()=>["auto","contain","none"],Pe=()=>["auto","hidden","clip","visible","scroll"],Ne=()=>["auto",d,t],P=()=>[d,t],Ve=()=>["",B,W],le=()=>["auto",q,d],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ce=()=>["solid","dashed","dotted","double","none"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",d],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[q,d];return{cacheSize:500,separator:":",theme:{colors:[ee],spacing:[B,W],blur:["none","",G,d],brightness:z(),borderColor:[e],borderRadius:["none","","full",G,d],borderSpacing:P(),borderWidth:Ve(),contrast:z(),grayscale:Z(),hueRotate:z(),invert:Z(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[qt,W],inset:Ne(),margin:Ne(),opacity:z(),padding:P(),saturate:z(),scale:z(),sepia:Z(),skew:z(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"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:[...We(),d]}],overflow:[{overflow:Pe()}],"overflow-x":[{"overflow-x":Pe()}],"overflow-y":[{"overflow-y":Pe()}],overscroll:[{overscroll:Se()}],"overscroll-x":[{"overscroll-x":Se()}],"overscroll-y":[{"overscroll-y":Se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-x":[{"inset-x":[N]}],"inset-y":[{"inset-y":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Y,d]}],basis:[{basis:Ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Y,d]}],"grid-cols":[{"grid-cols":[ee]}],"col-start-end":[{col:["auto",{span:["full",Y,d]},d]}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":[ee]}],"row-start-end":[{row:["auto",{span:[Y,d]},d]}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Re()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Re(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Re(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],L:[{L:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-x":[{"space-x":[Q]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Q]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-w":[{"min-w":[d,t,"min","max","fit"]}],"max-w":[{"max-w":[d,t,"none","full","min","max","fit","prose",{screen:[G]},G]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",G,W]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",De]}],"font-family":[{font:[ee]}],"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",d]}],"line-clamp":[{"line-clamp":["none",q,De]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[D]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[D]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,W]}],"underline-offset":[{"underline-offset":["auto",B,d]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],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",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[D]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),Yt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","L","bl","l","tl"]},tr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-L":[{"rounded-L":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-L":[{"rounded-L":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-L":[{"border-L":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-L":[{"border-L":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[D]}],"border-style":[{border:[...ce(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[D]}],"divide-style":[{divide:ce()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-L":[{"border-L":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-L":[{"border-L":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ce()]}],"outline-offset":[{"outline-offset":[B,d]}],"outline-w":[{outline:[B,W]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[D]}],"ring-offset-w":[{"ring-offset":[B,W]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",G,rr]}],"shadow-color":[{shadow:[ee]}],opacity:[{opacity:[D]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ge()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",G,d]}],grayscale:[{grayscale:[y]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[g]}],saturate:[{saturate:[V]}],sepia:[{sepia:[i]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[D]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Y,d]}],"translate-x":[{"translate-x":[He]}],"translate-y":[{"translate-y":[He]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],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","L-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-L":[{"scroll-L":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",d]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[B,W,De]}],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","L","mr","mb","ml"],mx:["mr","ml"],my:["L","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-L","rounded-e","rounded-t","rounded-r","rounded-L","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-L":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-L":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-L","border-w-e","border-w-t","border-w-r","border-w-L","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-L"],"border-color":["border-color-L","border-color-e","border-color-t","border-color-r","border-color-L","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-L"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-L","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-L","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 qe=Ft(ir);function m(...e){return qe((0,Xe.clsx)(e))}var L=require("react/jsx-runtime"),Ye=k.Root;var nr=k.Portal;var et=te.forwardRef(({className:e,...t},r)=>(0,L.jsx)(k.Overlay,{ref:r,className:m("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));et.displayName=k.Overlay.displayName;var Ae=te.forwardRef(({className:e,children:t,...r},o)=>(0,L.jsxs)(nr,{children:[(0,L.jsx)(et,{}),(0,L.jsxs)(k.Content,{ref:o,className:m("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),...r,children:[t,(0,L.jsxs)(k.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,L.jsx)(Ze.X,{className:"h-4 w-4"}),(0,L.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ae.displayName=k.Content.displayName;var Me=({className:e,...t})=>(0,L.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Me.displayName="DialogHeader";var lr=({className:e,...t})=>(0,L.jsx)("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lr.displayName="DialogFooter";var Le=te.forwardRef(({className:e,...t},r)=>(0,L.jsx)(k.Title,{ref:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));Le.displayName=k.Title.displayName;var cr=te.forwardRef(({className:e,...t},r)=>(0,L.jsx)(k.Description,{ref:r,className:m("text-sm text-muted-foreground",e),...t}));cr.displayName=k.Description.displayName;var tt=require("@radix-ui/react-slot"),rt=require("class-variance-authority"),ot=A(require("react")),dr=(0,rt.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),re=ot.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...l},n)=>(0,L.jsx)(e?tt.Slot:"button",{className:m(dr({className:t,size:r,variant:o})),ref:n,...l}));re.displayName="Button";var st=A(require("react"));var oe=st.forwardRef(({className:e,type:t,...r},o)=>(0,L.jsx)("input",{type:t,className:m("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));oe.displayName="Input";var nt=A(require("react")),Ie=A(require("@radix-ui/react-label"));var mr=(0,rt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),H=nt.forwardRef(({className:e,...t},r)=>(0,L.jsx)(Ie.Root,{ref:r,className:m(mr(),e),...t}));H.displayName=Ie.Root.displayName;var dt=A(require("react")),Ee=dt.forwardRef(({className:e,...t},r)=>(0,L.jsx)("textarea",{className:m("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:r,...t}));Ee.displayName="Textarea";var p=A(require("@radix-ui/react-select")),U=A(require("react")),me=p.Root;var pe=p.Value,ae=U.forwardRef(({children:e,className:t,...r},o)=>(0,L.jsxs)(p.Trigger,{className:m("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,L.jsx)(p.Icon,{asChild:!0,children:(0,L.jsx)(Ze.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ae.displayName=p.Trigger.displayName;var pt=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,L.jsx)(Ze.ChevronUp,{className:"h-4 w-4"})}));pt.displayName=p.ScrollUpButton.displayName;var ut=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,L.jsx)(Ze.ChevronDown,{className:"h-4 w-4"})}));ut.displayName=p.ScrollDownButton.displayName;var se=U.forwardRef(({children:e,className:t,position:r="popper",...o},l)=>(0,L.jsx)(p.Portal,{children:(0,L.jsxs)(p.Content,{className:m("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",r==="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:r,ref:l,...o,children:[(0,L.jsx)(pt,{}),(0,L.jsx)(p.Viewport,{className:m("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,L.jsx)(ut,{})]})}));se.displayName=p.Content.displayName;var pr=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.Label,{className:m("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));pr.displayName=p.Label.displayName;var ie=U.forwardRef(({children:e,className:t,...r},o)=>(0,L.jsxs)(p.Item,{className:m("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:o,...r,children:[(0,L.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,L.jsx)(p.ItemIndicator,{children:(0,L.jsx)(Ze.Check,{className:"h-4 w-4"})})}),(0,L.jsx)(p.ItemText,{children:e})]}));ie.displayName=p.Item.displayName;var ur=U.forwardRef(({className:e,...t},r)=>(0,L.jsx)(p.Separator,{className:m("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));ur.displayName=p.Separator.displayName;var ne=A(require("@radix-ui/react-checkbox")),gt=A(require("react")),ze=gt.forwardRef(({className:e,...t},r)=>(0,L.jsx)(ne.Root,{className:m("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,L.jsx)(ne.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,L.jsx)(Ze.Check,{className:"h-4 w-4"})})}));ze.displayName=ne.Root.displayName;var fr=(0,rt.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 fe({className:e,variant:t,...r}){return(0,L.jsx)("div",{className:m(fr({variant:t}),e),...r})}var Be=A(require("react")),I=A(require("@radix-ui/react-scroll-area"));var ge=Be.forwardRef(({className:e,children:t,...r},o)=>(0,L.jsxs)(I.Root,{ref:o,className:m("relative overflow-hidden",e),...r,children:[(0,L.jsx)(I.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,L.jsx)(xt,{}),(0,L.jsx)(I.Corner,{})]}));ge.displayName=I.Root.displayName;var xt=Be.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,L.jsx)(I.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,L.jsx)(I.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));xt.displayName=I.ScrollAreaScrollbar.displayName;function ht({deal:e,users:t,customer:r,categories:o,onClose:l,onSave:n,onAddComment:c}){let[a,v]=(0,Ce.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[y,x]=(0,Ce.useState)(""),[g,f]=(0,Ce.useState)(!1),[w,h]=(0,Ce.useState)(null);(0,Ce.useEffect)(()=>{f(JSON.stringify(e)!==JSON.stringify(a))},[e,a]);let N=async()=>{try{let i=await n(a);i.success?(f(!1),h(null)):console.error("Failed to save deal:",i.errors)}catch(i){console.error("Failed to save deal:",i)}},u=(i,C)=>{v(Q=>({...Q,[i]:C}))},D=i=>{let C=(a.categories||[]).includes(i)?(a.categories||[]).filter(Q=>Q!==i):[...a.categories||[],i];u("categories",C)},T=async()=>{if(y.trim()){let i={text:y,timestamp:new Date().toISOString()};try{let C=await c(i);if(!C.success){console.error("Failed to add comment:",C.errors);return}}catch(C){console.error("Failed to add comment:",C)}v(C=>({...C,comments:[...C.comments||[],i]})),x("")}},V=i=>{switch(i){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},E=i=>t?.find(C=>C.id===Number(i));return(0,L.jsx)(Ye,{open:!0,children:(0,L.jsxs)(Ae,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,L.jsxs)(Me,{className:"flex flex-row items-center justify-between",children:[(0,L.jsx)(Le,{className:"text-2xl font-bold",children:r?.name||"no customer"}),(0,L.jsxs)("div",{className:"flex space-x-2",children:[(0,L.jsx)(re,{variant:"outline",onClick:l,children:"Close"}),(0,L.jsxs)(re,{onClick:N,disabled:!g,children:[(0,L.jsx)(Ze.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,L.jsxs)(ge,{className:"flex-grow pr-4",children:[(0,L.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,L.jsx)("div",{className:"grid gap-2 m-1",children:w==="value"?(0,L.jsx)(oe,{type:"number",value:a.value,onChange:i=>u("value",Number(i.target.value)),onBlur:()=>h(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,L.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("value"),children:["\xA3",a.value?.toLocaleString()]})}),(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Assignee"}),w==="assignee"?(0,L.jsxs)(me,{value:a?.assignee?.id?.toString()||"",onValueChange:i=>u("assignee",E(i)),children:[(0,L.jsx)(ae,{children:(0,L.jsx)(pe,{placeholder:"Select assignee"})}),(0,L.jsx)(se,{children:t&&t.map(i=>(0,L.jsx)(ie,{value:i?.id?.toString()||"",children:i.name},i.id))})]}):(0,L.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("assignee"),children:[(0,L.jsx)(Ze.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,L.jsx)("span",{children:a?.assignee?.name})]})]}),(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Closure Date"}),w==="closureDate"?(0,L.jsx)(oe,{type:"date",value:a.closureDate?.split("T")[0]??"",onChange:i=>u("closureDate",i.target.value),onBlur:()=>h(null),className:"mr-2",autoFocus:!0}):(0,L.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("closureDate"),children:[(0,L.jsx)(Ze.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,L.jsx)("span",{children:a.closureDate?new Date(a.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,L.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Description"}),w==="description"?(0,L.jsx)(Ee,{value:a.description||"",onChange:i=>u("description",i.target.value),onBlur:()=>h(null),className:"min-h-[100px]",autoFocus:!0}):(0,L.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>h("description"),children:a.description})]})}),(0,L.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Status"}),w==="status"?(0,L.jsxs)(me,{value:a.status,onValueChange:i=>{u("status",i),h(null)},children:[(0,L.jsx)(ae,{children:(0,L.jsx)(pe,{placeholder:"Select status"})}),(0,L.jsx)(se,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(i=>(0,L.jsx)(ie,{value:i,children:i},i))})]}):(0,L.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("status"),children:a.status})]}),(0,L.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Categories"}),w==="categories"?(0,L.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(i=>(0,L.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,L.jsx)(ze,{id:i.id?.toString()||"",checked:(a.categories||[]).some(C=>C.id===i.id),onCheckedChange:()=>i.id!==void 0&&D(i)}),(0,L.jsx)("label",{htmlFor:(i.id??"").toString(),className:`text-sm font-medium ${V(i.type||"sector")} px-2 py-1 rounded`,children:i.name})]},i.id))}):(0,L.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("categories"),children:a.categories&&a.categories.map(i=>{let C=i;return C?(0,L.jsx)(fe,{variant:"outline",className:V(C.type||"sector"),children:C.name},C.id):null})})]}),(0,L.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"COGE Status"}),w==="gecoStatus"?(0,L.jsxs)(me,{value:a.gecoStatus??void 0,onValueChange:i=>{u("gecoStatus",i),h(null)},children:[(0,L.jsx)(ae,{children:(0,L.jsx)(pe,{placeholder:"Select status"})}),(0,L.jsx)(se,{children:["firm","forecast","other"].map(i=>(0,L.jsx)(ie,{value:i,children:i.charAt(0).toUpperCase()+i.slice(1)},i))})]}):(0,L.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>h("gecoStatus"),children:a.gecoStatus?a.gecoStatus.charAt(0).toUpperCase()+a.gecoStatus.slice(1):"N/A"})]})]}),(0,L.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,L.jsxs)("div",{className:"grid gap-2",children:[(0,L.jsx)(H,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,L.jsx)(ge,{className:"h-[200px] overflow-y-auto",children:(0,L.jsx)("div",{className:"space-y-2",children:a.comments&&a.comments.slice().sort((i,C)=>new Date(C.timestamp||"").getTime()-new Date(i.timestamp||"").getTime()).map(i=>(0,L.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,L.jsx)("p",{className:"text-sm text-foreground",children:i.text}),(0,L.jsxs)("p",{className:"text-xs text-foreground L-1",children:[i?.author?.name," - ",new Date(i.timestamp||"").toLocaleString()]})]},i.id))})}),(0,L.jsxs)("div",{className:"flex L-2",children:[(0,L.jsx)(oe,{value:y,onChange:i=>x(i.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,L.jsxs)(re,{onClick:T,className:"ml-2",children:[(0,L.jsx)(Ze.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,L.jsxs)("div",{className:"text-xs text-gray-500 L-4",children:["Last modified: ",new Date(a.updatedAt||"").toLocaleString()]})]})]})]})})}var K=A(require("react"));var be=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("rounded-xl border bg-card text-card-foreground shadow",e),...t}));be.displayName="Card";var ve=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex flex-col space-y-1.5 p-6",e),...t}));ve.displayName="CardHeader";var xe=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("font-semibold leading-none tracking-tight",e),...t}));xe.displayName="CardTitle";var gr=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("text-sm text-muted-foreground",e),...t}));gr.displayName="CardDescription";var he=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("p-6 pt-0",e),...t}));he.displayName="CardContent";var br=K.forwardRef(({className:e,...t},r)=>(0,$.jsx)("div",{ref:r,className:m("flex items-center p-6 pt-0",e),...t}));br.displayName="CardFooter";function yt({deal:e,customer:t,categories:r,onClick:o,compact:l=!1}){let n=r.find(c=>c.type==="proposition"&&(e.categories??[]).includes(c.id));return l?(0,L.jsxs)(be,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,L.jsxs)(ve,{className:"pb-1 pt-2",children:[(0,L.jsx)(xe,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,L.jsx)("p",{className:"text-sm text-gray-500 L-1",children:e.description})]}),(0,L.jsx)(he,{className:"text-xs text-gray-500 pb-2",children:(0,L.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,L.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,L.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,L.jsxs)(be,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,L.jsxs)(ve,{className:"pb-2",children:[(0,L.jsx)("div",{className:"flex justify-between items-center",children:(0,L.jsx)(xe,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,L.jsx)("p",{className:"text-sm text-gray-500 L-1",children:e.description})]}),(0,L.jsxs)(he,{children:[(0,L.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,L.jsxs)("div",{className:"flex items-center text-sm text-accent",children:[(0,L.jsx)(Ze.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,L.jsx)("span",{children:e.assignee.name})]}),(0,L.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,L.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,L.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,L.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,L.jsx)(Ze.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,L.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,L.jsx)("div",{className:"flex justify-between items-left",children:n&&(0,L.jsx)(fe,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:n.name})})]})]})}var we=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function wt({status:e,deals:t,users:r,customers:o,categories:l,onDealClick:n,calculateColumnValue:c,calculateWeightedValue:a,compact:v=!1}){return(0,L.jsxs)("div",{className:"flex flex-col w-80",children:[(0,L.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,L.jsx)(we.Droppable,{droppableId:e,isDropDisabled:!1,children:y=>(0,L.jsxs)("div",{ref:y.innerRef,...y.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((x,g)=>(0,L.jsx)(we.Draggable,{draggableId:x.id.toString(),index:x.id,children:f=>(0,L.jsx)("div",{ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:(0,L.jsx)(yt,{deal:x,customer:x.customer,categories:l,onClick:()=>n(x),compact:v})})},x.id.toString())),y.placeholder]})}),(0,L.jsxs)("div",{className:"L-4 text-sm p-3 rounded-lg shadow",children:[(0,L.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,L.jsxs)("span",{className:"text-green-600",children:["\xA3",c(t).toLocaleString()]})]}),(0,L.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,L.jsxs)("span",{className:"text-blue-600",children:["\xA3",a(t,e).toLocaleString()]})]})]})]})}var vr=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function xr({initialData:e,addNewDeal:t,updateDeal:r,addComment:o,addNewCustomer:l}){let[n,c]=(0,Ce.useState)(null),a=g=>(e.deals??[]).filter(f=>f.status===g),v=g=>g.reduce((f,w)=>f+(w.value||0),0),y=(g,f)=>{let w={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return g.reduce((h,N)=>h+(N.value||0)*w[f],0)},x=(0,Ce.useCallback)(g=>{let{source:f,destination:w}=g;if(!w||f.droppableId===w.droppableId&&f.index===w.index)return;let h=f.droppableId,N=w.droppableId,u=e.deals?.filter(T=>T.id===f.index)[0],D=[...e.deals??[]];u&&(u.status=N,r(u))},[r]);return(0,L.jsx)(we.DragDropContext,{onDragEnd:x,children:(0,L.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,L.jsx)("div",{className:"flex space-x-4 pb-4",children:vr.filter(g=>g!=="Lost").map(g=>{let f=a(g);return(0,L.jsx)(wt,{status:g,deals:f,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:c,calculateColumnValue:v,calculateWeightedValue:y},g)})}),n&&(0,L.jsx)(ht,{deal:n,users:e.users,customer:n.customer,categories:e.categories??[],onClose:()=>c(null),onSave:r,onAddComment:g=>o(n.id.toString(),g)})]})})}0&&(module.exports={CRMKanbanBoard});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-5UQKSJU5.mjs";import"../../chunk-W3ONOYB6.mjs";import"../../chunk-FFESN4FM.mjs";import"../../chunk-5V2PNTEF.mjs";import"../../chunk-OGZERPA4.mjs";import"../../chunk-6T322YHB.mjs";import"../../chunk-KJIBE57R.mjs";import"../../chunk-CX4XB5W2.mjs";import"../../chunk-EECIYMTX.mjs";import"../../chunk-BUCI7BPM.mjs";import"../../chunk-J2IHT57D.mjs";import"../../chunk-4YFMDLHL.mjs";import"../../chunk-JPZJET3B.mjs";import"../../chunk-BPSLUO5I.mjs";import"../../chunk-HTVHCBXQ.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-ZLSF5YXT.mjs";import"../../chunk-M6LJ4BNZ.mjs";export{a as CRMKanbanBoard};
|