cortex-react-components 1.42.1 → 1.42.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.
Files changed (114) hide show
  1. package/dist/{chunk-423OEU3K.mjs → chunk-23EQTK7B.mjs} +1 -1
  2. package/dist/{chunk-DEYWNKIG.mjs → chunk-4KGFHVYD.mjs} +1 -1
  3. package/dist/{chunk-BR4G7CDZ.mjs → chunk-4L4RAUPG.mjs} +1 -1
  4. package/dist/{chunk-VA3AGYYA.mjs → chunk-4R7S6EEU.mjs} +1 -1
  5. package/dist/{chunk-LBKMUSVR.mjs → chunk-4VDJWCUB.mjs} +1 -1
  6. package/dist/{chunk-L2PQKIU4.mjs → chunk-7ZHB6VE4.mjs} +1 -1
  7. package/dist/{chunk-3LTZNKP5.mjs → chunk-AEDBEVEE.mjs} +1 -1
  8. package/dist/{chunk-X3AIZJNU.mjs → chunk-AEPYNOEK.mjs} +1 -1
  9. package/dist/{chunk-IPHHUHS3.mjs → chunk-AFA6LBJ4.mjs} +1 -1
  10. package/dist/{chunk-H77N4SZK.mjs → chunk-BITEPXNE.mjs} +1 -1
  11. package/dist/{chunk-SQUOZ47I.mjs → chunk-C6OV5C2Y.mjs} +1 -1
  12. package/dist/{chunk-EXWIE6C5.mjs → chunk-EW2X7RMJ.mjs} +1 -1
  13. package/dist/{chunk-3QFP3LQI.mjs → chunk-FX4BKSAN.mjs} +1 -1
  14. package/dist/{chunk-A42UP2GC.mjs → chunk-HZ5QHCGZ.mjs} +1 -1
  15. package/dist/{chunk-CEO36IW4.mjs → chunk-I5MUUAND.mjs} +1 -1
  16. package/dist/{chunk-ICTOXY7D.mjs → chunk-NGK3IDFP.mjs} +1 -1
  17. package/dist/{chunk-MW2V3YCD.mjs → chunk-PBAL3B6N.mjs} +1 -1
  18. package/dist/{chunk-UK4IPFAO.mjs → chunk-PVRWMAHW.mjs} +1 -1
  19. package/dist/{chunk-IMAQJ7N3.mjs → chunk-QL74DMZ3.mjs} +1 -1
  20. package/dist/{chunk-K3N5EH4U.mjs → chunk-R25VHV7D.mjs} +1 -1
  21. package/dist/{chunk-FVQMTB4H.mjs → chunk-REHZTVVN.mjs} +1 -1
  22. package/dist/{chunk-45BPMYAF.mjs → chunk-ROEHSKFW.mjs} +1 -1
  23. package/dist/{chunk-TEOR3ZQR.mjs → chunk-TGJAUKC7.mjs} +1 -1
  24. package/dist/chunk-TL63X5GG.mjs +4 -0
  25. package/dist/{chunk-CTX7UBDG.mjs → chunk-UADGNBOR.mjs} +1 -1
  26. package/dist/{chunk-MANZDSTF.mjs → chunk-UD7JYMRU.mjs} +1 -1
  27. package/dist/{chunk-JK3XF6LP.mjs → chunk-UDRX6THN.mjs} +1 -1
  28. package/dist/{chunk-HGMH5NAQ.mjs → chunk-WPTEMDOP.mjs} +1 -1
  29. package/dist/{chunk-FF6H5I4V.mjs → chunk-XBBQGSYP.mjs} +1 -1
  30. package/dist/{chunk-HUN2X4VH.mjs → chunk-Y6CZVVJF.mjs} +1 -1
  31. package/dist/{chunk-FOQE6NML.mjs → chunk-YDQUZWFZ.mjs} +1 -1
  32. package/dist/{chunk-WONJ5NTQ.mjs → chunk-YKDVNCHV.mjs} +1 -1
  33. package/dist/{chunk-NUJCJZH5.mjs → chunk-ZOLLFX4E.mjs} +1 -1
  34. package/dist/components/Blocks/Banner.mjs +1 -1
  35. package/dist/components/Blocks/CallToAction.mjs +1 -1
  36. package/dist/components/Blocks/Content.mjs +1 -1
  37. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  38. package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
  39. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  40. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  41. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  42. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  43. package/dist/components/Blocks/index.mjs +1 -1
  44. package/dist/components/CRM/DealDetails.mjs +1 -1
  45. package/dist/components/CRM/DealDetails.stories.mjs +1 -1
  46. package/dist/components/CRM/KanbanBoard.js +1 -1
  47. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  48. package/dist/components/CRM/KanbanBoard.stories.js +1 -1
  49. package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
  50. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  51. package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
  52. package/dist/components/CRM/NewDealForm.mjs +1 -1
  53. package/dist/components/CRM/NewDealForm.stories.mjs +1 -1
  54. package/dist/components/CRM/index.js +1 -1
  55. package/dist/components/CRM/index.mjs +1 -1
  56. package/dist/components/Cards/index.mjs +1 -1
  57. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  58. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  59. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  60. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  61. package/dist/components/Heros/PostHero/index.mjs +1 -1
  62. package/dist/components/Heros/RenderHero.mjs +1 -1
  63. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  64. package/dist/components/Heros/index.mjs +1 -1
  65. package/dist/components/Layouts/BlogList.mjs +1 -1
  66. package/dist/components/Layouts/BlogList.stories.mjs +1 -1
  67. package/dist/components/Layouts/SlideShow.mjs +1 -1
  68. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  69. package/dist/components/Layouts/index.mjs +1 -1
  70. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  71. package/dist/components/Menus/SidebarLeft.stories.mjs +1 -1
  72. package/dist/components/Menus/SidebarRight.mjs +1 -1
  73. package/dist/components/Menus/SidebarRight.stories.mjs +1 -1
  74. package/dist/components/Menus/index.mjs +1 -1
  75. package/dist/components/Payload/Card/index.mjs +1 -1
  76. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  77. package/dist/components/Payload/Media/index.mjs +1 -1
  78. package/dist/components/Payload/RichText/index.mjs +1 -1
  79. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  80. package/dist/components/Payload/RichText.stories.mjs +1 -1
  81. package/dist/components/Payload/index.mjs +1 -1
  82. package/dist/components/index.js +3 -3
  83. package/dist/components/index.mjs +1 -1
  84. package/dist/components/ui/index.mjs +1 -1
  85. package/dist/components/ui/sidebar.mjs +1 -1
  86. package/dist/index.js +1 -1
  87. package/dist/index.mjs +1 -1
  88. package/dist/metafile-cjs.json +1 -1
  89. package/dist/metafile-esm.json +1 -1
  90. package/dist/pages/Blog.mjs +1 -1
  91. package/dist/pages/Blog.stories.mjs +1 -1
  92. package/dist/pages/Documentation.mjs +1 -1
  93. package/dist/pages/Documentation.stories.mjs +1 -1
  94. package/dist/pages/IndexPage.mjs +1 -1
  95. package/dist/pages/IndexPage.stories.mjs +1 -1
  96. package/dist/pages/Page.mjs +1 -1
  97. package/dist/pages/Page.stories.mjs +1 -1
  98. package/dist/pages/Publish.mjs +1 -1
  99. package/dist/pages/Publish.stories.mjs +1 -1
  100. package/dist/pages/Website.mjs +1 -1
  101. package/dist/pages/Website.stories.mjs +1 -1
  102. package/dist/sections/AboutSection.mjs +1 -1
  103. package/dist/sections/AboutSection.stories.mjs +1 -1
  104. package/dist/sections/BlogDetail.mjs +1 -1
  105. package/dist/sections/BlogDetail.stories.mjs +1 -1
  106. package/dist/sections/BlogListSection.mjs +1 -1
  107. package/dist/sections/BlogListSection.stories.mjs +1 -1
  108. package/dist/sections/ContactSection.mjs +1 -1
  109. package/dist/sections/ContactSection.stories.mjs +1 -1
  110. package/dist/sections/PricingSection.mjs +1 -1
  111. package/dist/sections/PricingSection.stories.mjs +1 -1
  112. package/dist/sections/index.mjs +1 -1
  113. package/package.json +1 -1
  114. package/dist/chunk-RCD6MJF5.mjs +0 -4
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  'use client'
4
4
 
5
- "use strict";var Bt=Object.create;var De=Object.defineProperty;var zt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Vt=Object.getPrototypeOf,Ft=Object.prototype.hasOwnProperty;var Wt=(e,t)=>{for(var o in t)De(e,o,{get:t[o],enumerable:!0})},Ke=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ht(t))!Ft.call(e,s)&&s!==o&&De(e,s,{get:()=>t[s],enumerable:!(a=zt(t,s))||a.enumerable});return e};var B=(e,t,o)=>(o=e!=null?Bt(Vt(e)):{},Ke(t||!e||!e.__esModule?De(o,"default",{value:e,enumerable:!0}):o,e)),Gt=e=>Ke(De({},"__esModule",{value:!0}),e);var Eo={};Wt(Eo,{Default:()=>Lo,default:()=>Io});module.exports=Gt(Eo);var Se=require("react");var rt=require("clsx");var He="-",Ot=e=>{let t=$t(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{let r=l.split(He);return r[0]===""&&r.length!==1&&r.shift(),Ze(r,t)||Ut(l)},getConflictingClassGroupIds:(l,r)=>{let C=o[l]||[];return r&&a[l]?[...C,...a[l]]:C}}},Ze=(e,t)=>{var l;if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),s=a?Ze(e.slice(1),a):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(He);return(l=t.validators.find(({validator:r})=>r(n)))==null?void 0:l.classGroupId},qe=/^\[(.+)\]$/,Ut=e=>{if(qe.test(e)){let t=qe.exec(e)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},$t=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return Jt(Object.entries(e.classGroups),o).forEach(([n,l])=>{ze(l,a,n,t)}),a},ze=(e,t,o,a)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:Qe(t,s);n.classGroupId=o;return}if(typeof s=="function"){if(jt(s)){ze(s(a),t,o,a);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([n,l])=>{ze(l,Qe(t,n),o,a)})})},Qe=(e,t)=>{let o=e;return t.split(He).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},jt=e=>e.isThemeGetter,Jt=(e,t)=>t?e.map(([o,a])=>{let s=a.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,r])=>[t+l,r])):n);return[o,s]}):e,_t=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,s=(n,l)=>{o.set(n,l),t++,t>e&&(t=0,a=o,o=new Map)};return{get(n){let l=o.get(n);if(l!==void 0)return l;if((l=a.get(n))!==void 0)return s(n,l),l},set(n,l){o.has(n)?o.set(n,l):s(n,l)}}},Xe="!",Kt=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,s=t[0],n=t.length,l=r=>{let C=[],w=0,h=0,R;for(let v=0;v<r.length;v++){let c=r[v];if(w===0){if(c===s&&(a||r.slice(v,v+n)===t)){C.push(r.slice(h,v)),h=v+n;continue}if(c==="/"){R=v;continue}}c==="["?w++:c==="]"&&w--}let M=C.length===0?r:r.substring(h),f=M.startsWith(Xe),p=f?M.substring(1):M,x=R&&R>h?R-h:void 0;return{modifiers:C,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:x}};return o?r=>o({className:r,parseClassName:l}):l},qt=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},Qt=e=>({cache:_t(e.cacheSize),parseClassName:Kt(e),...Ot(e)}),Zt=/\s+/,Xt=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:s}=t,n=[],l=e.trim().split(Zt),r="";for(let C=l.length-1;C>=0;C-=1){let w=l[C],{modifiers:h,hasImportantModifier:R,baseClassName:M,maybePostfixModifierPosition:f}=o(w),p=!!f,x=a(p?M.substring(0,f):M);if(!x){if(!p){r=w+(r.length>0?" "+r:r);continue}if(x=a(M),!x){r=w+(r.length>0?" "+r:r);continue}p=!1}let v=qt(h).join(":"),c=R?v+Xe:v,y=c+x;if(n.includes(y))continue;n.push(y);let I=s(x,p);for(let G=0;G<I.length;++G){let ee=I[G];n.push(c+ee)}r=w+(r.length>0?" "+r:r)}return r};function Yt(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Ye(t))&&(a&&(a+=" "),a+=o);return a}var Ye=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=Ye(e[a]))&&(o&&(o+=" "),o+=t);return o};function eo(e,...t){let o,a,s,n=l;function l(C){let w=t.reduce((h,R)=>R(h),e());return o=Qt(w),a=o.cache.get,s=o.cache.set,n=r,r(C)}function r(C){let w=a(C);if(w)return w;let h=Xt(C,o);return s(C,h),h}return function(){return n(Yt.apply(null,arguments))}}var S=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},et=/^\[(?:([a-z-]+):)?(.+)\]$/nt,to=/^\nt+\/\nt+$/,oo=new Set(["px","full","screen"]),ro=/^(\nt+(\.\nt+)?)?(xs|sm|md|lg|xl)$/,ao=/\nt+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|nt|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,io=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,so=/^(inset_)?-?((\nt+)?\.?(\nt+)[a-z]+|0)_-?((\nt+)?\.?(\nt+)[a-z]+|0)/,no=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,j=e=>me(e)||oo.has(e)||to.test(e),q=e=>pe(e,"length",bo),me=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>pe(e,"number",me),ye=e=>!!e&&Number.isInteger(Number(e)),lo=e=>e.endsWith("%")&&me(e.slice(0,-1)),u=e=>et.test(e),Q=e=>ro.test(e),co=new Set(["length","size","percentage"]),mo=e=>pe(e,co,tt),po=e=>pe(e,"position",tt),uo=new Set(["image","url"]),fo=e=>pe(e,uo,ho),go=e=>pe(e,"",vo),xe=()=>!0,pe=(e,t,o)=>{let a=et.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},bo=e=>ao.test(e)&&!io.test(e),tt=()=>!1,vo=e=>so.test(e),ho=e=>no.test(e);var yo=()=>{let e=S("colors"),t=S("spacing"),o=S("blur"),a=S("brightness"),s=S("borderColor"),n=S("borderRadius"),l=S("borderSpacing"),r=S("borderWidth"),C=S("contrast"),w=S("grayscale"),h=S("hueRotate"),R=S("invert"),M=S("gap"),f=S("gradientColorStops"),p=S("gradientColorStopPositions"),x=S("inset"),v=S("margin"),c=S("opacity"),y=S("padding"),I=S("saturate"),G=S("scale"),ee=S("sepia"),m=S("skew"),z=S("space"),O=S("translate"),de=()=>["auto","contain","none"],ve=()=>["auto","hidden","clip","visible","scroll"],Le=()=>["auto",u,t],N=()=>[u,t],$e=()=>["",j,q],Re=()=>["auto",me,u],je=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ne=()=>["solid","dashed","dotted","double","none"],Je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>["start","end","center","between","around","evenly","stretch"],he=()=>["","0",u],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[me,u];return{cacheSize:500,separator:":",theme:{colors:[xe],spacing:[j,q],blur:["none","",Q,u],brightness:$(),borderColor:[e],borderRadius:["none","","full",Q,u],borderSpacing:N(),borderWidth:$e(),contrast:$(),grayscale:he(),hueRotate:$(),invert:he(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[lo,q],inset:Le(),margin:Le(),opacity:$(),padding:N(),saturate:$(),scale:$(),sepia:he(),skew:$(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",u]}],container:["container"],columns:[{columns:[Q]}],"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:[...je(),u]}],overflow:[{overflow:ve()}],"overflow-x":[{"overflow-x":ve()}],"overflow-y":[{"overflow-y":ve()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ye,u]}],basis:[{basis:Le()}],"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:he()}],shrink:[{shrink:he()}],order:[{order:["first","last","none",ye,u]}],"grid-cols":[{"grid-cols":[xe]}],"col-start-end":[{col:["auto",{span:["full",ye,u]},u]}],"col-start":[{"col-start":Re()}],"col-end":[{"col-end":Re()}],"grid-rows":[{"grid-rows":[xe]}],"row-start-end":[{row:["auto",{span:[ye,u]},u]}],"row-start":[{"row-start":Re()}],"row-end":[{"row-end":Re()}],"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:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...Ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],nt:[{nt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",u,t]}],"min-w":[{"min-w":[u,t,"min","max","fit"]}],"max-w":[{"max-w":[u,t,"none","full","min","max","fit","prose",{screen:[Q]},Q]}],h:[{h:[u,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[u,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Q,q]}],"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:[xe]}],"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",me,Be]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",j,u]}],"list-image":[{"list-image":["none",u]}],"list-style-type":[{list:["none","disc","decimal",u]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[c]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[c]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",j,q]}],"underline-offset":[{"underline-offset":["auto",j,u]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[c]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...je(),po]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],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-y":[{"border-y":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[c]}],"border-style":[{border:[...Ne(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[c]}],"divide-style":[{divide:Ne()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Ne()]}],"outline-offset":[{"outline-offset":[j,u]}],"outline-w":[{outline:[j,q]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$e()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[c]}],"ring-offset-w":[{"ring-offset":[j,q]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Q,go]}],"shadow-color":[{shadow:[xe]}],opacity:[{opacity:[c]}],"mix-blend":[{"mix-blend":[...Je(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Je()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[C]}],"drop-shadow":[{"drop-shadow":["","none",Q,u]}],grayscale:[{grayscale:[w]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[R]}],saturate:[{saturate:[I]}],sepia:[{sepia:[ee]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[C]}],"backdrop-grayscale":[{"backdrop-grayscale":[w]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[R]}],"backdrop-opacity":[{"backdrop-opacity":[c]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",u]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",u]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",u]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[G]}],"scale-x":[{"scale-x":[G]}],"scale-y":[{"scale-y":[G]}],rotate:[{rotate:[ye,u]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[m]}],"skew-y":[{"skew-y":[m]}],"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","s-resize","w-resize","Se-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",u]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-nt":[{"scroll-nt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",u]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[j,q,Be]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","nt","mr","mb","ml"],mx:["mr","ml"],my:["nt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-nt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-nt","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 ot=eo(yo);function g(...e){return ot((0,rt.clsx)(e))}var at=require("@radix-ui/react-slot"),it=require("class-variance-authority"),st=B(require("react")),nt=require("react/jsx-runtime"),xo=(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 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),E=st.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...s},n)=>(0,nt.jsx)(e?at.Slot:"button",{className:g(xo({className:t,size:o,variant:a})),ref:n,...s}));E.displayName="Button";var Ce=B(require("react")),k=B(require("@radix-ui/react-dialog")),lt=require("lucide-react");var Z=k.Root,Pe=k.Trigger,Co=k.Portal;var ct=Ce.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(k.Overlay,{ref:o,className:g("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ct.displayName=k.Overlay.displayName;var J=Ce.forwardRef(({className:e,children:t,...o},a)=>(0,nt.jsxs)(Co,{children:[(0,nt.jsx)(ct,{}),(0,nt.jsxs)(k.Content,{ref:a,className:g("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,nt.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,nt.jsx)(lt.X,{className:"h-4 w-4"}),(0,nt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));J.displayName=k.Content.displayName;var _=({className:e,...t})=>(0,nt.jsx)("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_.displayName="DialogHeader";var wo=({className:e,...t})=>(0,nt.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});wo.displayName="DialogFooter";var K=Ce.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(k.Title,{ref:o,className:g("text-lg font-semibold leading-none tracking-tight",e),...t}));K.displayName=k.Title.displayName;var So=Ce.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(k.Description,{ref:o,className:g("text-sm text-muted-foreground",e),...t}));So.displayName=k.Description.displayName;var dt=B(require("react"));var W=dt.forwardRef(({className:e,type:t,...o},a)=>(0,nt.jsx)("input",{type:t,className:g("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));W.displayName="Input";var pt=B(require("react")),Ve=B(require("@radix-ui/react-label"));var Ro=(0,it.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),A=pt.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(Ve.Root,{ref:o,className:g(Ro(),e),...t}));A.displayName=Ve.Root.displayName;var gt=B(require("react")),te=gt.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("textarea",{className:g("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));te.displayName="Textarea";var b=B(require("@radix-ui/react-select")),X=B(require("react")),ue=b.Root;var fe=b.Value,re=X.forwardRef(({children:e,className:t,...o},a)=>(0,nt.jsxs)(b.Trigger,{className:g("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:a,...o,children:[e,(0,nt.jsx)(b.Icon,{asChild:!0,children:(0,nt.jsx)(lt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));re.displayName=b.Trigger.displayName;var vt=X.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(b.ScrollUpButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,nt.jsx)(lt.ChevronUp,{className:"h-4 w-4"})}));vt.displayName=b.ScrollUpButton.displayName;var ht=X.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(b.ScrollDownButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,nt.jsx)(lt.ChevronDown,{className:"h-4 w-4"})}));ht.displayName=b.ScrollDownButton.displayName;var ae=X.forwardRef(({children:e,className:t,position:o="popper",...a},s)=>(0,nt.jsx)(b.Portal,{children:(0,nt.jsxs)(b.Content,{className:g("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:s,...a,children:[(0,nt.jsx)(vt,{}),(0,nt.jsx)(b.Viewport,{className:g("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,nt.jsx)(ht,{})]})}));ae.displayName=b.Content.displayName;var No=X.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(b.Label,{className:g("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));No.displayName=b.Label.displayName;var ie=X.forwardRef(({children:e,className:t,...o},a)=>(0,nt.jsxs)(b.Item,{className:g("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:a,...o,children:[(0,nt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,nt.jsx)(b.ItemIndicator,{children:(0,nt.jsx)(lt.Check,{className:"h-4 w-4"})})}),(0,nt.jsx)(b.ItemText,{children:e})]}));ie.displayName=b.Item.displayName;var Do=X.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(b.Separator,{className:g("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Do.displayName=b.Separator.displayName;var we=B(require("@radix-ui/react-checkbox")),xt=B(require("react")),se=xt.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(we.Root,{className:g("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,nt.jsx)(we.Indicator,{className:g("flex items-center justify-center text-current"),children:(0,nt.jsx)(lt.Check,{className:"h-4 w-4"})})}));se.displayName=we.Root.displayName;var Po=(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 ke({className:e,variant:t,...o}){return(0,nt.jsx)("div",{className:g(Po({variant:t}),e),...o})}var Fe=B(require("react")),F=B(require("@radix-ui/react-scroll-area"));var ge=Fe.forwardRef(({className:e,children:t,...o},a)=>(0,nt.jsxs)(F.Root,{ref:a,className:g("relative overflow-hidden",e),...o,children:[(0,nt.jsx)(F.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,nt.jsx)(St,{}),(0,nt.jsx)(F.Corner,{})]}));ge.displayName=F.Root.displayName;var St=Fe.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,nt.jsx)(F.ScrollAreaScrollbar,{ref:a,orientation:t,className:g("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,nt.jsx)(F.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));St.displayName=F.ScrollAreaScrollbar.displayName;function Rt({deal:e,users:t,customer:o,categories:a,onClose:s,onSave:n,onAddComment:l}){var ee;let[r,C]=(0,Se.useState)({...e,value:e.value||0}),[w,h]=(0,Se.useState)(""),[R,M]=(0,Se.useState)(!1),[f,p]=(0,Se.useState)(null);(0,Se.useEffect)(()=>{M(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);let x=()=>{n(r),M(!1),p(null)},v=(m,z)=>{C(O=>({...O,[m]:z}))},c=m=>{let z=r.categories.includes(m)?r.categories.filter(O=>O!==m):[...r.categories,m];v("categories",z)},y=()=>{w.trim()&&(l({id:Date.now().toString(),text:w,timestamp:new Date().toISOString()}),h(""))},I=m=>{switch(m){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},G=(m,z,O)=>{let de=f===m;return(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:z}),(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[O,de?(0,nt.jsx)(W,{value:r[m],onChange:ve=>v(m,ve.target.value),onBlur:()=>p(null),autoFocus:!0}):(0,nt.jsx)("div",{className:"flex-grow cursor-pointer hover:bg-gray-100 p-2 rounded",onClick:()=>p(m),children:r[m]}),!de&&(0,nt.jsx)(E,{variant:"ghost",size:"sm",onClick:()=>p(m),children:(0,nt.jsx)(lt.Edit2Icon,{className:"w-4 h-4"})})]})]})};return(0,nt.jsx)(Z,{open:!0,children:(0,nt.jsxs)(J,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,nt.jsxs)(_,{className:"flex flex-row items-center justify-between",children:[(0,nt.jsx)(K,{className:"text-2xl font-bold",children:o==null?void 0:o.name}),(0,nt.jsxs)("div",{className:"flex space-x-2",children:[(0,nt.jsx)(E,{variant:"outline",onClick:s,children:"Close"}),(0,nt.jsxs)(E,{onClick:x,disabled:!R,children:[(0,nt.jsx)(lt.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,nt.jsxs)(ge,{className:"flex-grow pr-4",children:[(0,nt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,nt.jsx)("div",{className:"grid gap-2",children:f==="value"?(0,nt.jsx)(W,{type:"number",value:r.value,onChange:m=>v("value",Number(m.target.value)),onBlur:()=>p(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,nt.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>p("value"),children:["\xA3",(ee=r.value)==null?void 0:ee.toLocaleString()]})}),(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),f==="assignee"?(0,nt.jsxs)(ue,{value:r.assignee,onValueChange:m=>v("assignee",m),children:[(0,nt.jsx)(re,{children:(0,nt.jsx)(fe,{placeholder:"Select assignee"})}),(0,nt.jsx)(ae,{children:t&&t.map(m=>(0,nt.jsx)(ie,{value:m.id.toString(),children:m.name},m.id))})]}):(0,nt.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>p("assignee"),children:[(0,nt.jsx)(lt.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,nt.jsx)("span",{children:r.assignee})]})]}),(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),f==="closureDate"?(0,nt.jsx)(W,{type:"date",value:r.closureDate.split("nt")[0],onChange:m=>v("closureDate",m.target.value),onBlur:()=>p(null),autoFocus:!0}):(0,nt.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>p("closureDate"),children:[(0,nt.jsx)(lt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,nt.jsx)("span",{children:new Date(r.closureDate).toLocaleDateString("en-GB")})]})]})]}),(0,nt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Description"}),f==="description"?(0,nt.jsx)(te,{value:r.description,onChange:m=>v("description",m.target.value),onBlur:()=>p(null),className:"min-h-[100px]",autoFocus:!0}):(0,nt.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>p("description"),children:r.description})]})}),(0,nt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Status"}),f==="status"?(0,nt.jsxs)(ue,{value:r.status,onValueChange:m=>{v("status",m),p(null)},children:[(0,nt.jsx)(re,{children:(0,nt.jsx)(fe,{placeholder:"Select status"})}),(0,nt.jsx)(ae,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(m=>(0,nt.jsx)(ie,{value:m,children:m},m))})]}):(0,nt.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>p("status"),children:r.status})]}),(0,nt.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Categories"}),f==="categories"?(0,nt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.map(m=>(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsx)(se,{id:m.id,checked:r.categories.includes(m.id),onCheckedChange:()=>c(m.id)}),(0,nt.jsx)("label",{htmlFor:m.id,className:`text-sm font-medium ${I(m.type)} px-2 py-1 rounded`,children:m.name})]},m.id))}):(0,nt.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>p("categories"),children:r.categories.map(m=>{let z=a.find(O=>O.id===m);return z?(0,nt.jsx)(ke,{variant:"secondary",className:I(z.type),children:z.name},z.id):null})})]})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,nt.jsx)(ge,{className:"h-[200px] overflow-y-auto",children:(0,nt.jsx)("div",{className:"space-y-2",children:r.comments.map(m=>(0,nt.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,nt.jsx)("p",{className:"text-sm text-gray-700",children:m.text}),(0,nt.jsxs)("p",{className:"text-xs text-gray-500 nt-1",children:[m.author," - ",new Date(m.timestamp).toLocaleString()]})]},m.id))})}),(0,nt.jsxs)("div",{className:"flex nt-2",children:[(0,nt.jsx)(W,{value:w,onChange:m=>h(m.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,nt.jsxs)(E,{onClick:y,className:"ml-2",children:[(0,nt.jsx)(lt.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,nt.jsxs)("div",{className:"text-xs text-gray-500 nt-4",children:["Last modified: ",new Date(r.lastModified).toLocaleString()]})]})]})]})})}function Ae({onSubmit:e}){let[t,o]=(0,Se.useState)({name:"",intro:"",active:!0});return(0,nt.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({id:Date.now().toString(),...t}),o({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(A,{htmlFor:"customerName",children:"Customer Name"}),(0,nt.jsx)(W,{id:"customerName",value:t.name,onChange:s=>o({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(A,{htmlFor:"customerIntro",children:"Intro"}),(0,nt.jsx)(te,{id:"customerIntro",value:t.intro,onChange:s=>o({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsx)(se,{id:"activeCustomer",checked:t.active,onCheckedChange:s=>o({...t,active:s})}),(0,nt.jsx)(A,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,nt.jsx)(E,{type:"submit",className:"w-full",children:"Add Customer"})]})}var le=B(require("react"));var We=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("rounded-xl border bg-card text-card-foreground shadow",e),...t}));We.displayName="Card";var Ge=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("flex flex-col space-y-1.5 p-6",e),...t}));Ge.displayName="CardHeader";var Oe=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("font-semibold leading-none tracking-tight",e),...t}));Oe.displayName="CardTitle";var Mo=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("text-sm text-muted-foreground",e),...t}));Mo.displayName="CardDescription";var Ue=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("p-6 pt-0",e),...t}));Ue.displayName="CardContent";var ko=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("flex items-center p-6 pt-0",e),...t}));ko.displayName="CardFooter";function Dt({deal:e,customer:t,categories:o,onClick:a}){let s=o.find(n=>n.type==="proposition"&&e.categories.includes(n.id));return(0,nt.jsxs)(We,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,nt.jsxs)(Ge,{className:"pb-2",children:[(0,nt.jsx)("div",{className:"flex justify-between items-center",children:(0,nt.jsx)(Oe,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,nt.jsx)("p",{className:"text-sm text-gray-500 nt-1",children:e.description})]}),(0,nt.jsxs)(Ue,{children:[(0,nt.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,nt.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,nt.jsx)(lt.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,nt.jsx)("span",{children:e.assignee})]}),(0,nt.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,nt.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,nt.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,nt.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,nt.jsx)(lt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,nt.jsx)("span",{children:new Date(e.lastModified).toLocaleDateString()})]})}),(0,nt.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,nt.jsx)(ke,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var Ie=require("react-beautiful-dnd");function Mt({customers:e,users:t,categories:o,onSubmit:a,initialDeal:s,onAddCustomer:n}){let[l,r]=(0,Se.useState)(s||{customerId:"",value:0,assignee:"",status:"Cold",categories:[],dateLogged:new Date().toISOString().split("nt")[0],closureDate:"",lastModified:new Date().toISOString(),comments:[],description:""}),[C,w]=(0,Se.useState)(!1),[h,R]=(0,Se.useState)({});(0,Se.useEffect)(()=>{s&&r(s)},[s]);let M=()=>{let c={};return l.customerId||(c.customerId="Customer is required"),l.value||(c.value="Value is required"),l.assignee||(c.assignee="Assignee is required"),l.closureDate||(c.closureDate="Closure Date is required"),R(c),Object.keys(c).length===0},f=c=>{c.preventDefault(),M()&&(a({...l,id:l.id||Date.now().toString(),lastModified:new Date().toISOString()}),r({customerId:"",value:0,assignee:"",description:"",status:"Cold",closureDate:""}),R({}))},p=c=>{r(y=>{var I;return{...y,categories:(I=y.categories)!=null&&I.includes(c)?y.categories.filter(G=>G!==c):[...y.categories||[],c]}})},x=c=>{switch(c){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},v=c=>{e.push(c),r({...l,customerId:c.id}),w(!1),n(c)};return(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)("form",{onSubmit:f,className:"space-y-6",children:[(0,nt.jsx)(ge,{className:"h-[60vh] pr-4",children:(0,nt.jsxs)("div",{className:"space-y-6",children:[(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"customer",children:"Customer"}),(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsxs)(ue,{value:l.customerId,onValueChange:c=>r({...l,customerId:c}),children:[(0,nt.jsx)(re,{children:(0,nt.jsx)(fe,{placeholder:"Select customer"})}),(0,nt.jsx)(ae,{children:e.map(c=>(0,nt.jsx)(ie,{value:c.id,children:c.name},c.id))})]}),(0,nt.jsx)(E,{variant:"outline",size:"icon",onClick:()=>w(!0),children:(0,nt.jsx)(lt.PlusIcon,{className:"w-5 h-5"})})]}),h.customerId&&(0,nt.jsx)("p",{className:"text-red-500 text-sm",children:h.customerId})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"value",children:"Value"}),(0,nt.jsx)(W,{id:"value",type:"number",value:l.value||"",onChange:c=>r({...l,value:Number.parseFloat(c.target.value)}),placeholder:"Enter deal value"}),h.value&&(0,nt.jsx)("p",{className:"text-red-500 text-sm",children:h.value})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"assignee",children:"Assignee"}),(0,nt.jsxs)(ue,{value:l.assignee,onValueChange:c=>r({...l,assignee:c}),children:[(0,nt.jsx)(re,{children:(0,nt.jsx)(fe,{placeholder:"Select assignee"})}),(0,nt.jsx)(ae,{children:t&&t.map(c=>(0,nt.jsx)(ie,{value:c.id.toString(),children:c.name},c.id))})]}),h.assignee&&(0,nt.jsx)("p",{className:"text-red-500 text-sm",children:h.assignee})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"description",children:"Description"}),(0,nt.jsx)(te,{id:"description",value:l.description||"",onChange:c=>r({...l,description:c.target.value}),placeholder:"Enter deal description"})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{children:"Categories"}),(0,nt.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(c=>(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)("h4",{className:"text-sm font-medium",children:c.charAt(0).toUpperCase()+c.slice(1)}),(0,nt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.filter(y=>y.type===c).map(y=>{var I;return(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsx)(se,{id:y.id,checked:(I=l.categories)==null?void 0:I.includes(y.id),onCheckedChange:()=>p(y.id)}),(0,nt.jsx)("label",{htmlFor:y.id,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${x(y.type)}`,children:y.name})]},y.id)})})]},c))})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"closureDate",children:"Closure Date"}),(0,nt.jsx)(W,{id:"closureDate",type:"date",value:l.closureDate,onChange:c=>r({...l,closureDate:c.target.value})}),h.closureDate&&(0,nt.jsx)("p",{className:"text-red-500 text-sm",children:h.closureDate})]})]})}),(0,nt.jsx)(E,{type:"submit",className:"w-full",children:s?"Update Deal":"Add Deal"})]}),(0,nt.jsx)(Z,{open:C,onOpenChange:w,children:(0,nt.jsxs)(J,{children:[(0,nt.jsx)(_,{children:(0,nt.jsx)(K,{children:"Add New Customer"})}),(0,nt.jsx)(Ae,{onSubmit:v})]})})]})}function At({status:e,deals:t,users:o,customers:a,categories:s,onDealClick:n,calculateColumnValue:l,calculateWeightedValue:r,addNewDeal:C,onAddCustomer:w}){return(0,nt.jsxs)("div",{className:"flex flex-col w-80",children:[(0,nt.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),C&&(0,nt.jsxs)(Z,{children:[(0,nt.jsx)(Pe,{asChild:!0,children:(0,nt.jsxs)(E,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,nt.jsx)(lt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,nt.jsxs)(J,{children:[(0,nt.jsx)(_,{children:(0,nt.jsx)(K,{children:"Add New Deal"})}),(0,nt.jsx)(Mt,{customers:a,users:o,categories:s,onSubmit:C,onAddCustomer:w})]})]}),(0,nt.jsx)(Ie.Droppable,{droppableId:e,children:h=>(0,nt.jsxs)("div",{ref:h.innerRef,...h.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((R,M)=>(0,nt.jsx)(Ie.Draggable,{draggableId:R.id,index:M,children:f=>(0,nt.jsx)("div",{ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:(0,nt.jsx)(Dt,{deal:R,customer:a.find(p=>p.id===R.customerId),categories:s,onClick:()=>n(R)})})},R.id)),h.placeholder]})}),(0,nt.jsxs)("div",{className:"nt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,nt.jsxs)("p",{className:"font-semibold",children:["Total: ",(0,nt.jsxs)("span",{className:"text-green-600",children:["$",l(t).toLocaleString()]})]}),(0,nt.jsxs)("p",{className:"font-semibold",children:["Weighted: ",(0,nt.jsxs)("span",{className:"text-blue-600",children:["$",r(t,e).toLocaleString()]})]})]})]})}var Ao=["Cold","Qualified","Proposal","SoW","Won","Lost"];function Lt({initialData:e,addNewDeal:t,updateDeal:o,addComment:a,addNewCustomer:s}){let[n,l]=(0,Se.useState)(null),[r,C]=(0,Se.useState)(e),w=f=>r.deals.filter(p=>p.status===f),h=f=>f.reduce((p,x)=>p+(x.value||0),0),R=(f,p)=>{let x={Cold:.2,Qualified:.4,Proposal:.6,SoW:.7,Won:1,Lost:0};return f.reduce((v,c)=>v+(c.value||0)*x[p],0)},M=(0,Se.useCallback)(f=>{let{source:p,destination:x}=f;if(!x||p.droppableId===x.droppableId&&p.index===x.index)return;let v=p.droppableId,c=x.droppableId;console.log("Moving from ",v,"to",c);let y=[...r.deals],[I]=y.splice(p.index,1);I.status=c,y.splice(x.index,0,I),C({...r,deals:y}),o(I)},[r,o]);return(0,nt.jsx)(Ie.DragDropContext,{onDragEnd:M,children:(0,nt.jsxs)("div",{className:"p-4",children:[(0,nt.jsx)("div",{className:"flex space-x-4 overflow-x-auto pb-4",children:Ao.map(f=>{let p=w(f);return(0,nt.jsx)(At,{status:f,deals:p,customers:r.customers,users:e.users,categories:r.categories,onDealClick:l,calculateColumnValue:h,calculateWeightedValue:R,addNewDeal:f==="Cold"?t:void 0,onAddCustomer:s},f)})}),(0,nt.jsx)("div",{className:"nt-8 flex space-x-4",children:(0,nt.jsxs)(Z,{children:[(0,nt.jsx)(Pe,{asChild:!0,children:(0,nt.jsxs)(E,{children:[(0,nt.jsx)(lt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Customer"]})}),(0,nt.jsxs)(J,{className:"sm:max-w-[425px]",children:[(0,nt.jsx)(_,{children:(0,nt.jsx)(K,{children:"Add New Customer"})}),(0,nt.jsx)(Ae,{onSubmit:s})]})]})}),n&&(0,nt.jsx)(Rt,{deal:n,users:e.users,customer:r.customers.find(f=>f.id===n.customerId),categories:r.categories,onClose:()=>l(null),onSave:o,onAddComment:f=>a(n.id,f)})]})})}var Et=[{id:1,name:"John Doe",email:"john.doe@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Bob Johnson",email:"bob.johnson@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Alice Brown",email:"alice.brown@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Charlie Davis",email:"charlie.davis@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"}];var To={title:"CRM/KanbanBoard",component:Lt,parameters:{layout:"fullscreen"}},Io=To,Lo={args:{initialData:{deals:Array.from({length:20},(e,t)=>({id:`${t+1}`,customerId:`${t%3+1}`,value:Math.floor(Math.random()*1e5)+5e3,assignee:["John Doe","Jane Smith","Bob Johnson"][Math.floor(Math.random()*3)],status:["Cold","Qualified","Proposal Made","Won","Lost"][Math.floor(Math.random()*5)],categories:[`${t%6+1}`],dateLogged:new Date(Date.now()-Math.floor(Math.random()*30)*24*60*60*1e3).toISOString(),closureDate:new Date(Date.now()+Math.floor(Math.random()*90)*24*60*60*1e3).toISOString(),comments:[],lastModified:new Date().toISOString(),description:`This is a mock description for deal ${t+1}. Ie's a ${["small","medium","large"][t%3]} deal with high potential.`})),customers:[{id:"1",name:"Acme Corp",active:!0},{id:"2",name:"GlobalTech",active:!0},{id:"3",name:"InnoSystems",active:!0}],users:Et,categories:[{id:"1",name:"Software",type:"proposition"},{id:"2",name:"Hardware",type:"proposition"},{id:"3",name:"Referral",type:"source"},{id:"4",name:"Outbound",type:"source"},{id:"5",name:"Tech",type:"sector"},{id:"6",name:"Finance",type:"sector"}]},addNewDeal:async e=>(console.log("Adding deal:",e),{...e,id:"new-deal-id"}),updateDeal:async e=>(console.log("Updating deal:",e),e),addNewCustomer:async e=>(console.log("Adding customer:",e),{...e,id:"new-customer-id"}),addComment:async(e,t)=>(console.log("Adding comment to deal:",e,t),{...t,id:"new-comment-id"})}};0&&(module.exports={Default});
5
+ "use strict";var Bt=Object.create;var De=Object.defineProperty;var zt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Vt=Object.getPrototypeOf,Ft=Object.prototype.hasOwnProperty;var Wt=(e,t)=>{for(var o in t)De(e,o,{get:t[o],enumerable:!0})},Ke=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ht(t))!Ft.call(e,s)&&s!==o&&De(e,s,{get:()=>t[s],enumerable:!(a=zt(t,s))||a.enumerable});return e};var B=(e,t,o)=>(o=e!=null?Bt(Vt(e)):{},Ke(t||!e||!e.__esModule?De(o,"default",{value:e,enumerable:!0}):o,e)),Gt=e=>Ke(De({},"__esModule",{value:!0}),e);var Eo={};Wt(Eo,{Default:()=>Lo,default:()=>Io});module.exports=Gt(Eo);var Se=require("react");var rt=require("clsx");var He="-",Ot=e=>{let t=$t(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{let r=l.split(He);return r[0]===""&&r.length!==1&&r.shift(),Ze(r,t)||Ut(l)},getConflictingClassGroupIds:(l,r)=>{let C=o[l]||[];return r&&a[l]?[...C,...a[l]]:C}}},Ze=(e,t)=>{var l;if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),s=a?Ze(e.slice(1),a):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(He);return(l=t.validators.find(({validator:r})=>r(n)))==null?void 0:l.classGroupId},qe=/^\[(.+)\]$/,Ut=e=>{if(qe.test(e)){let t=qe.exec(e)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},$t=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return Jt(Object.entries(e.classGroups),o).forEach(([n,l])=>{ze(l,a,n,t)}),a},ze=(e,t,o,a)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:Qe(t,s);n.classGroupId=o;return}if(typeof s=="function"){if(jt(s)){ze(s(a),t,o,a);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([n,l])=>{ze(l,Qe(t,n),o,a)})})},Qe=(e,t)=>{let o=e;return t.split(He).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},jt=e=>e.isThemeGetter,Jt=(e,t)=>t?e.map(([o,a])=>{let s=a.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,r])=>[t+l,r])):n);return[o,s]}):e,_t=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,s=(n,l)=>{o.set(n,l),t++,t>e&&(t=0,a=o,o=new Map)};return{get(n){let l=o.get(n);if(l!==void 0)return l;if((l=a.get(n))!==void 0)return s(n,l),l},set(n,l){o.has(n)?o.set(n,l):s(n,l)}}},Xe="!",Kt=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,s=t[0],n=t.length,l=r=>{let C=[],w=0,h=0,R;for(let v=0;v<r.length;v++){let c=r[v];if(w===0){if(c===s&&(a||r.slice(v,v+n)===t)){C.push(r.slice(h,v)),h=v+n;continue}if(c==="/"){R=v;continue}}c==="["?w++:c==="]"&&w--}let M=C.length===0?r:r.substring(h),p=M.startsWith(Xe),u=p?M.substring(1):M,x=R&&R>h?R-h:void 0;return{modifiers:C,hasImportantModifier:p,baseClassName:u,maybePostfixModifierPosition:x}};return o?r=>o({className:r,parseClassName:l}):l},qt=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},Qt=e=>({cache:_t(e.cacheSize),parseClassName:Kt(e),...Ot(e)}),Zt=/\s+/,Xt=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:s}=t,n=[],l=e.trim().split(Zt),r="";for(let C=l.length-1;C>=0;C-=1){let w=l[C],{modifiers:h,hasImportantModifier:R,baseClassName:M,maybePostfixModifierPosition:p}=o(w),u=!!p,x=a(u?M.substring(0,p):M);if(!x){if(!u){r=w+(r.length>0?" "+r:r);continue}if(x=a(M),!x){r=w+(r.length>0?" "+r:r);continue}u=!1}let v=qt(h).join(":"),c=R?v+Xe:v,y=c+x;if(n.includes(y))continue;n.push(y);let I=s(x,u);for(let G=0;G<I.length;++G){let ee=I[G];n.push(c+ee)}r=w+(r.length>0?" "+r:r)}return r};function Yt(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Ye(t))&&(a&&(a+=" "),a+=o);return a}var Ye=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=Ye(e[a]))&&(o&&(o+=" "),o+=t);return o};function eo(e,...t){let o,a,s,n=l;function l(C){let w=t.reduce((h,R)=>R(h),e());return o=Qt(w),a=o.cache.get,s=o.cache.set,n=r,r(C)}function r(C){let w=a(C);if(w)return w;let h=Xt(C,o);return s(C,h),h}return function(){return n(Yt.apply(null,arguments))}}var S=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},et=/^\[(?:([a-z-]+):)?(.+)\]$/nt,to=/^\nt+\/\nt+$/,oo=new Set(["px","full","screen"]),ro=/^(\nt+(\.\nt+)?)?(xs|sm|md|lg|xl)$/,ao=/\nt+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|nt|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,io=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,so=/^(inset_)?-?((\nt+)?\.?(\nt+)[a-z]+|0)_-?((\nt+)?\.?(\nt+)[a-z]+|0)/,no=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,j=e=>me(e)||oo.has(e)||to.test(e),q=e=>pe(e,"length",bo),me=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>pe(e,"number",me),ye=e=>!!e&&Number.isInteger(Number(e)),lo=e=>e.endsWith("%")&&me(e.slice(0,-1)),f=e=>et.test(e),Q=e=>ro.test(e),co=new Set(["length","size","percentage"]),mo=e=>pe(e,co,tt),po=e=>pe(e,"position",tt),uo=new Set(["image","url"]),fo=e=>pe(e,uo,ho),go=e=>pe(e,"",vo),xe=()=>!0,pe=(e,t,o)=>{let a=et.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},bo=e=>ao.test(e)&&!io.test(e),tt=()=>!1,vo=e=>so.test(e),ho=e=>no.test(e);var yo=()=>{let e=S("colors"),t=S("spacing"),o=S("blur"),a=S("brightness"),s=S("borderColor"),n=S("borderRadius"),l=S("borderSpacing"),r=S("borderWidth"),C=S("contrast"),w=S("grayscale"),h=S("hueRotate"),R=S("invert"),M=S("gap"),p=S("gradientColorStops"),u=S("gradientColorStopPositions"),x=S("inset"),v=S("margin"),c=S("opacity"),y=S("padding"),I=S("saturate"),G=S("scale"),ee=S("sepia"),m=S("skew"),z=S("space"),O=S("translate"),de=()=>["auto","contain","none"],ve=()=>["auto","hidden","clip","visible","scroll"],Le=()=>["auto",f,t],N=()=>[f,t],$e=()=>["",j,q],Re=()=>["auto",me,f],je=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ne=()=>["solid","dashed","dotted","double","none"],Je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>["start","end","center","between","around","evenly","stretch"],he=()=>["","0",f],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[me,f];return{cacheSize:500,separator:":",theme:{colors:[xe],spacing:[j,q],blur:["none","",Q,f],brightness:$(),borderColor:[e],borderRadius:["none","","full",Q,f],borderSpacing:N(),borderWidth:$e(),contrast:$(),grayscale:he(),hueRotate:$(),invert:he(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[lo,q],inset:Le(),margin:Le(),opacity:$(),padding:N(),saturate:$(),scale:$(),sepia:he(),skew:$(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",f]}],container:["container"],columns:[{columns:[Q]}],"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:[...je(),f]}],overflow:[{overflow:ve()}],"overflow-x":[{"overflow-x":ve()}],"overflow-y":[{"overflow-y":ve()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ye,f]}],basis:[{basis:Le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",f]}],grow:[{grow:he()}],shrink:[{shrink:he()}],order:[{order:["first","last","none",ye,f]}],"grid-cols":[{"grid-cols":[xe]}],"col-start-end":[{col:["auto",{span:["full",ye,f]},f]}],"col-start":[{"col-start":Re()}],"col-end":[{"col-end":Re()}],"grid-rows":[{"grid-rows":[xe]}],"row-start-end":[{row:["auto",{span:[ye,f]},f]}],"row-start":[{"row-start":Re()}],"row-end":[{"row-end":Re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",f]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",f]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...Ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],nt:[{nt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",f,t]}],"min-w":[{"min-w":[f,t,"min","max","fit"]}],"max-w":[{"max-w":[f,t,"none","full","min","max","fit","prose",{screen:[Q]},Q]}],h:[{h:[f,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[f,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[f,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[f,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Q,q]}],"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:[xe]}],"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",f]}],"line-clamp":[{"line-clamp":["none",me,Be]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",j,f]}],"list-image":[{"list-image":["none",f]}],"list-style-type":[{list:["none","disc","decimal",f]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[c]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[c]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",j,q]}],"underline-offset":[{"underline-offset":["auto",j,f]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",f]}],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",f]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[c]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...je(),po]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[u]}],"gradient-via-pos":[{via:[u]}],"gradient-to-pos":[{to:[u]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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-y":[{"border-y":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[c]}],"border-style":[{border:[...Ne(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[c]}],"divide-style":[{divide:Ne()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Ne()]}],"outline-offset":[{"outline-offset":[j,f]}],"outline-w":[{outline:[j,q]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$e()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[c]}],"ring-offset-w":[{"ring-offset":[j,q]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Q,go]}],"shadow-color":[{shadow:[xe]}],opacity:[{opacity:[c]}],"mix-blend":[{"mix-blend":[...Je(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Je()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[C]}],"drop-shadow":[{"drop-shadow":["","none",Q,f]}],grayscale:[{grayscale:[w]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[R]}],saturate:[{saturate:[I]}],sepia:[{sepia:[ee]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[C]}],"backdrop-grayscale":[{"backdrop-grayscale":[w]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[R]}],"backdrop-opacity":[{"backdrop-opacity":[c]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",f]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",f]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",f]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[G]}],"scale-x":[{"scale-x":[G]}],"scale-y":[{"scale-y":[G]}],rotate:[{rotate:[ye,f]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[m]}],"skew-y":[{"skew-y":[m]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",f]}],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","Se-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",f]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-nt":[{"scroll-nt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",f]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[j,q,Be]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","nt","mr","mb","ml"],mx:["mr","ml"],my:["nt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-nt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-nt","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 ot=eo(yo);function g(...e){return ot((0,rt.clsx)(e))}var at=require("@radix-ui/react-slot"),it=require("class-variance-authority"),st=B(require("react")),nt=require("react/jsx-runtime"),xo=(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 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),E=st.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...s},n)=>(0,nt.jsx)(e?at.Slot:"button",{className:g(xo({className:t,size:o,variant:a})),ref:n,...s}));E.displayName="Button";var Ce=B(require("react")),k=B(require("@radix-ui/react-dialog")),lt=require("lucide-react");var Z=k.Root,Pe=k.Trigger,Co=k.Portal;var ct=Ce.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(k.Overlay,{ref:o,className:g("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ct.displayName=k.Overlay.displayName;var J=Ce.forwardRef(({className:e,children:t,...o},a)=>(0,nt.jsxs)(Co,{children:[(0,nt.jsx)(ct,{}),(0,nt.jsxs)(k.Content,{ref:a,className:g("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,nt.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,nt.jsx)(lt.X,{className:"h-4 w-4"}),(0,nt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));J.displayName=k.Content.displayName;var _=({className:e,...t})=>(0,nt.jsx)("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_.displayName="DialogHeader";var wo=({className:e,...t})=>(0,nt.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});wo.displayName="DialogFooter";var K=Ce.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(k.Title,{ref:o,className:g("text-lg font-semibold leading-none tracking-tight",e),...t}));K.displayName=k.Title.displayName;var So=Ce.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(k.Description,{ref:o,className:g("text-sm text-muted-foreground",e),...t}));So.displayName=k.Description.displayName;var dt=B(require("react"));var W=dt.forwardRef(({className:e,type:t,...o},a)=>(0,nt.jsx)("input",{type:t,className:g("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));W.displayName="Input";var pt=B(require("react")),Ve=B(require("@radix-ui/react-label"));var Ro=(0,it.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),A=pt.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(Ve.Root,{ref:o,className:g(Ro(),e),...t}));A.displayName=Ve.Root.displayName;var gt=B(require("react")),te=gt.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("textarea",{className:g("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));te.displayName="Textarea";var b=B(require("@radix-ui/react-select")),X=B(require("react")),ue=b.Root;var fe=b.Value,re=X.forwardRef(({children:e,className:t,...o},a)=>(0,nt.jsxs)(b.Trigger,{className:g("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:a,...o,children:[e,(0,nt.jsx)(b.Icon,{asChild:!0,children:(0,nt.jsx)(lt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));re.displayName=b.Trigger.displayName;var vt=X.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(b.ScrollUpButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,nt.jsx)(lt.ChevronUp,{className:"h-4 w-4"})}));vt.displayName=b.ScrollUpButton.displayName;var ht=X.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(b.ScrollDownButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:o,...t,children:(0,nt.jsx)(lt.ChevronDown,{className:"h-4 w-4"})}));ht.displayName=b.ScrollDownButton.displayName;var ae=X.forwardRef(({children:e,className:t,position:o="popper",...a},s)=>(0,nt.jsx)(b.Portal,{children:(0,nt.jsxs)(b.Content,{className:g("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,ref:s,...a,children:[(0,nt.jsx)(vt,{}),(0,nt.jsx)(b.Viewport,{className:g("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,nt.jsx)(ht,{})]})}));ae.displayName=b.Content.displayName;var No=X.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(b.Label,{className:g("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:o,...t}));No.displayName=b.Label.displayName;var ie=X.forwardRef(({children:e,className:t,...o},a)=>(0,nt.jsxs)(b.Item,{className:g("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:a,...o,children:[(0,nt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,nt.jsx)(b.ItemIndicator,{children:(0,nt.jsx)(lt.Check,{className:"h-4 w-4"})})}),(0,nt.jsx)(b.ItemText,{children:e})]}));ie.displayName=b.Item.displayName;var Do=X.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(b.Separator,{className:g("-mx-1 my-1 h-px bg-muted",e),ref:o,...t}));Do.displayName=b.Separator.displayName;var we=B(require("@radix-ui/react-checkbox")),xt=B(require("react")),se=xt.forwardRef(({className:e,...t},o)=>(0,nt.jsx)(we.Root,{className:g("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,nt.jsx)(we.Indicator,{className:g("flex items-center justify-center text-current"),children:(0,nt.jsx)(lt.Check,{className:"h-4 w-4"})})}));se.displayName=we.Root.displayName;var Po=(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 ke({className:e,variant:t,...o}){return(0,nt.jsx)("div",{className:g(Po({variant:t}),e),...o})}var Fe=B(require("react")),F=B(require("@radix-ui/react-scroll-area"));var ge=Fe.forwardRef(({className:e,children:t,...o},a)=>(0,nt.jsxs)(F.Root,{ref:a,className:g("relative overflow-hidden",e),...o,children:[(0,nt.jsx)(F.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,nt.jsx)(St,{}),(0,nt.jsx)(F.Corner,{})]}));ge.displayName=F.Root.displayName;var St=Fe.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,nt.jsx)(F.ScrollAreaScrollbar,{ref:a,orientation:t,className:g("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,nt.jsx)(F.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));St.displayName=F.ScrollAreaScrollbar.displayName;function Rt({deal:e,users:t,customer:o,categories:a,onClose:s,onSave:n,onAddComment:l}){var ee;let[r,C]=(0,Se.useState)({...e,value:e.value||0}),[w,h]=(0,Se.useState)(""),[R,M]=(0,Se.useState)(!1),[p,u]=(0,Se.useState)(null);(0,Se.useEffect)(()=>{M(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);let x=()=>{n(r),M(!1),u(null)},v=(m,z)=>{C(O=>({...O,[m]:z}))},c=m=>{let z=r.categories.includes(m)?r.categories.filter(O=>O!==m):[...r.categories,m];v("categories",z)},y=()=>{w.trim()&&(l({id:Date.now().toString(),text:w,timestamp:new Date().toISOString()}),h(""))},I=m=>{switch(m){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},G=(m,z,O)=>{let de=p===m;return(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:z}),(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[O,de?(0,nt.jsx)(W,{value:r[m],onChange:ve=>v(m,ve.target.value),onBlur:()=>u(null),autoFocus:!0}):(0,nt.jsx)("div",{className:"flex-grow cursor-pointer hover:bg-gray-100 p-2 rounded",onClick:()=>u(m),children:r[m]}),!de&&(0,nt.jsx)(E,{variant:"ghost",size:"sm",onClick:()=>u(m),children:(0,nt.jsx)(lt.Edit2Icon,{className:"w-4 h-4"})})]})]})};return(0,nt.jsx)(Z,{open:!0,children:(0,nt.jsxs)(J,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,nt.jsxs)(_,{className:"flex flex-row items-center justify-between",children:[(0,nt.jsx)(K,{className:"text-2xl font-bold",children:o==null?void 0:o.name}),(0,nt.jsxs)("div",{className:"flex space-x-2",children:[(0,nt.jsx)(E,{variant:"outline",onClick:s,children:"Close"}),(0,nt.jsxs)(E,{onClick:x,disabled:!R,children:[(0,nt.jsx)(lt.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,nt.jsxs)(ge,{className:"flex-grow pr-4",children:[(0,nt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,nt.jsx)("div",{className:"grid gap-2",children:p==="value"?(0,nt.jsx)(W,{type:"number",value:r.value,onChange:m=>v("value",Number(m.target.value)),onBlur:()=>u(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,nt.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("value"),children:["\xA3",(ee=r.value)==null?void 0:ee.toLocaleString()]})}),(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),p==="assignee"?(0,nt.jsxs)(ue,{value:r.assignee,onValueChange:m=>v("assignee",m),children:[(0,nt.jsx)(re,{children:(0,nt.jsx)(fe,{placeholder:"Select assignee"})}),(0,nt.jsx)(ae,{children:t&&t.map(m=>(0,nt.jsx)(ie,{value:m.id.toString(),children:m.name},m.id))})]}):(0,nt.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("assignee"),children:[(0,nt.jsx)(lt.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,nt.jsx)("span",{children:r.assignee})]})]}),(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),p==="closureDate"?(0,nt.jsx)(W,{type:"date",value:r.closureDate.split("nt")[0],onChange:m=>v("closureDate",m.target.value),onBlur:()=>u(null),autoFocus:!0}):(0,nt.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("closureDate"),children:[(0,nt.jsx)(lt.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,nt.jsx)("span",{children:new Date(r.closureDate).toLocaleDateString("en-GB")})]})]})]}),(0,nt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Description"}),p==="description"?(0,nt.jsx)(te,{value:r.description,onChange:m=>v("description",m.target.value),onBlur:()=>u(null),className:"min-h-[100px]",autoFocus:!0}):(0,nt.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>u("description"),children:r.description})]})}),(0,nt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Status"}),p==="status"?(0,nt.jsxs)(ue,{value:r.status,onValueChange:m=>{v("status",m),u(null)},children:[(0,nt.jsx)(re,{children:(0,nt.jsx)(fe,{placeholder:"Select status"})}),(0,nt.jsx)(ae,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(m=>(0,nt.jsx)(ie,{value:m,children:m},m))})]}):(0,nt.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("status"),children:r.status})]}),(0,nt.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Categories"}),p==="categories"?(0,nt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.map(m=>(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsx)(se,{id:m.id,checked:r.categories.includes(m.id),onCheckedChange:()=>c(m.id)}),(0,nt.jsx)("label",{htmlFor:m.id,className:`text-sm font-medium ${I(m.type)} px-2 py-1 rounded`,children:m.name})]},m.id))}):(0,nt.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>u("categories"),children:r.categories.map(m=>{let z=a.find(O=>O.id===m);return z?(0,nt.jsx)(ke,{variant:"secondary",className:I(z.type),children:z.name},z.id):null})})]})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,nt.jsxs)("div",{className:"grid gap-2",children:[(0,nt.jsx)(A,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,nt.jsx)(ge,{className:"h-[200px] overflow-y-auto",children:(0,nt.jsx)("div",{className:"space-y-2",children:r.comments.map(m=>(0,nt.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,nt.jsx)("p",{className:"text-sm text-gray-700",children:m.text}),(0,nt.jsxs)("p",{className:"text-xs text-gray-500 nt-1",children:[m.author," - ",new Date(m.timestamp).toLocaleString()]})]},m.id))})}),(0,nt.jsxs)("div",{className:"flex nt-2",children:[(0,nt.jsx)(W,{value:w,onChange:m=>h(m.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,nt.jsxs)(E,{onClick:y,className:"ml-2",children:[(0,nt.jsx)(lt.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,nt.jsxs)("div",{className:"text-xs text-gray-500 nt-4",children:["Last modified: ",new Date(r.lastModified).toLocaleString()]})]})]})]})})}function Ae({onSubmit:e}){let[t,o]=(0,Se.useState)({name:"",intro:"",active:!0});return(0,nt.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({id:Date.now().toString(),...t}),o({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(A,{htmlFor:"customerName",children:"Customer Name"}),(0,nt.jsx)(W,{id:"customerName",value:t.name,onChange:s=>o({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(A,{htmlFor:"customerIntro",children:"Intro"}),(0,nt.jsx)(te,{id:"customerIntro",value:t.intro,onChange:s=>o({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsx)(se,{id:"activeCustomer",checked:t.active,onCheckedChange:s=>o({...t,active:s})}),(0,nt.jsx)(A,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,nt.jsx)(E,{type:"submit",className:"w-full",children:"Add Customer"})]})}var le=B(require("react"));var We=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("rounded-xl border bg-card text-card-foreground shadow",e),...t}));We.displayName="Card";var Ge=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("flex flex-col space-y-1.5 p-6",e),...t}));Ge.displayName="CardHeader";var Oe=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("font-semibold leading-none tracking-tight",e),...t}));Oe.displayName="CardTitle";var Mo=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("text-sm text-muted-foreground",e),...t}));Mo.displayName="CardDescription";var Ue=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("p-6 pt-0",e),...t}));Ue.displayName="CardContent";var ko=le.forwardRef(({className:e,...t},o)=>(0,nt.jsx)("div",{ref:o,className:g("flex items-center p-6 pt-0",e),...t}));ko.displayName="CardFooter";function Dt({deal:e,customer:t,categories:o,onClick:a}){let s=o.find(n=>n.type==="proposition"&&e.categories.includes(n.id));return(0,nt.jsxs)(We,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:a,children:[(0,nt.jsxs)(Ge,{className:"pb-2",children:[(0,nt.jsx)("div",{className:"flex justify-between items-center",children:(0,nt.jsx)(Oe,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,nt.jsx)("p",{className:"text-sm text-gray-500 nt-1",children:e.description})]}),(0,nt.jsxs)(Ue,{children:[(0,nt.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,nt.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,nt.jsx)(lt.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,nt.jsx)("span",{children:e.assignee})]}),(0,nt.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,nt.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,nt.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,nt.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,nt.jsx)(lt.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,nt.jsx)("span",{children:new Date(e.lastModified).toLocaleDateString()})]})}),(0,nt.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,nt.jsx)(ke,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var Ie=require("react-beautiful-dnd");function Mt({customers:e,users:t,categories:o,onSubmit:a,initialDeal:s,onAddCustomer:n}){let[l,r]=(0,Se.useState)(s||{customerId:"",value:0,assignee:"",status:"Cold",categories:[],dateLogged:new Date().toISOString().split("nt")[0],closureDate:"",lastModified:new Date().toISOString(),comments:[],description:""}),[C,w]=(0,Se.useState)(!1),[h,R]=(0,Se.useState)({});(0,Se.useEffect)(()=>{s&&r(s)},[s]);let M=()=>{let c={};return l.customerId||(c.customerId="Customer is required"),l.value||(c.value="Value is required"),l.assignee||(c.assignee="Assignee is required"),l.closureDate||(c.closureDate="Closure Date is required"),R(c),Object.keys(c).length===0},p=c=>{c.preventDefault(),M()&&(a({...l,id:l.id||Date.now().toString(),lastModified:new Date().toISOString()}),r({customerId:"",value:0,assignee:"",description:"",status:"Cold",closureDate:""}),R({}))},u=c=>{r(y=>{var I;return{...y,categories:(I=y.categories)!=null&&I.includes(c)?y.categories.filter(G=>G!==c):[...y.categories||[],c]}})},x=c=>{switch(c){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},v=c=>{e.push(c),r({...l,customerId:c.id}),w(!1),n(c)};return(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)("form",{onSubmit:p,className:"space-y-6",children:[(0,nt.jsx)(ge,{className:"h-[60vh] pr-4",children:(0,nt.jsxs)("div",{className:"space-y-6",children:[(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"customer",children:"Customer"}),(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsxs)(ue,{value:l.customerId,onValueChange:c=>r({...l,customerId:c}),children:[(0,nt.jsx)(re,{children:(0,nt.jsx)(fe,{placeholder:"Select customer"})}),(0,nt.jsx)(ae,{children:e.map(c=>(0,nt.jsx)(ie,{value:c.id,children:c.name},c.id))})]}),(0,nt.jsx)(E,{variant:"outline",size:"icon",onClick:()=>w(!0),children:(0,nt.jsx)(lt.PlusIcon,{className:"w-5 h-5"})})]}),h.customerId&&(0,nt.jsx)("p",{className:"text-red-500 text-sm",children:h.customerId})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"value",children:"Value"}),(0,nt.jsx)(W,{id:"value",type:"number",value:l.value||"",onChange:c=>r({...l,value:Number.parseFloat(c.target.value)}),placeholder:"Enter deal value"}),h.value&&(0,nt.jsx)("p",{className:"text-red-500 text-sm",children:h.value})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"assignee",children:"Assignee"}),(0,nt.jsxs)(ue,{value:l.assignee,onValueChange:c=>r({...l,assignee:c}),children:[(0,nt.jsx)(re,{children:(0,nt.jsx)(fe,{placeholder:"Select assignee"})}),(0,nt.jsx)(ae,{children:t&&t.map(c=>(0,nt.jsx)(ie,{value:c.id.toString(),children:c.name},c.id))})]}),h.assignee&&(0,nt.jsx)("p",{className:"text-red-500 text-sm",children:h.assignee})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"description",children:"Description"}),(0,nt.jsx)(te,{id:"description",value:l.description||"",onChange:c=>r({...l,description:c.target.value}),placeholder:"Enter deal description"})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{children:"Categories"}),(0,nt.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(c=>(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)("h4",{className:"text-sm font-medium",children:c.charAt(0).toUpperCase()+c.slice(1)}),(0,nt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.filter(y=>y.type===c).map(y=>{var I;return(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsx)(se,{id:y.id,checked:(I=l.categories)==null?void 0:I.includes(y.id),onCheckedChange:()=>u(y.id)}),(0,nt.jsx)("label",{htmlFor:y.id,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${x(y.type)}`,children:y.name})]},y.id)})})]},c))})]}),(0,nt.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,nt.jsx)(A,{htmlFor:"closureDate",children:"Closure Date"}),(0,nt.jsx)(W,{id:"closureDate",type:"date",value:l.closureDate,onChange:c=>r({...l,closureDate:c.target.value})}),h.closureDate&&(0,nt.jsx)("p",{className:"text-red-500 text-sm",children:h.closureDate})]})]})}),(0,nt.jsx)(E,{type:"submit",className:"w-full",children:s?"Update Deal":"Add Deal"})]}),(0,nt.jsx)(Z,{open:C,onOpenChange:w,children:(0,nt.jsxs)(J,{children:[(0,nt.jsx)(_,{children:(0,nt.jsx)(K,{children:"Add New Customer"})}),(0,nt.jsx)(Ae,{onSubmit:v})]})})]})}function At({status:e,deals:t,users:o,customers:a,categories:s,onDealClick:n,calculateColumnValue:l,calculateWeightedValue:r,addNewDeal:C,onAddCustomer:w}){return(0,nt.jsxs)("div",{className:"flex flex-col w-80",children:[(0,nt.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),C&&(0,nt.jsxs)(Z,{children:[(0,nt.jsx)(Pe,{asChild:!0,children:(0,nt.jsxs)(E,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,nt.jsx)(lt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,nt.jsxs)(J,{children:[(0,nt.jsx)(_,{children:(0,nt.jsx)(K,{children:"Add New Deal"})}),(0,nt.jsx)(Mt,{customers:a,users:o,categories:s,onSubmit:C,onAddCustomer:w})]})]}),(0,nt.jsx)(Ie.Droppable,{droppableId:e,children:h=>(0,nt.jsxs)("div",{ref:h.innerRef,...h.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((R,M)=>(0,nt.jsx)(Ie.Draggable,{draggableId:R.id,index:M,children:p=>(0,nt.jsx)("div",{ref:p.innerRef,...p.draggableProps,...p.dragHandleProps,children:(0,nt.jsx)(Dt,{deal:R,customer:a.find(u=>u.id===R.customerId),categories:s,onClick:()=>n(R)})})},R.id)),h.placeholder]})}),(0,nt.jsxs)("div",{className:"nt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,nt.jsxs)("p",{className:"font-semibold",children:["Total: ",(0,nt.jsxs)("span",{className:"text-green-600",children:["$",l(t).toLocaleString()]})]}),(0,nt.jsxs)("p",{className:"font-semibold",children:["Weighted: ",(0,nt.jsxs)("span",{className:"text-blue-600",children:["$",r(t,e).toLocaleString()]})]})]})]})}var Ao=["Cold","Qualified","Proposal","SoW","Won","Lost"];function Lt({initialData:e,addNewDeal:t,updateDeal:o,addComment:a,addNewCustomer:s}){let[n,l]=(0,Se.useState)(null),[r,C]=(0,Se.useState)(e),w=p=>r.deals.filter(u=>u.status===p),h=p=>p.reduce((u,x)=>u+(x.value||0),0),R=(p,u)=>{let x={Cold:.2,Qualified:.4,Proposal:.6,SoW:.7,Won:1,Lost:0};return p.reduce((v,c)=>v+(c.value||0)*x[u],0)},M=(0,Se.useCallback)(p=>{let{source:u,destination:x}=p;if(!x||u.droppableId===x.droppableId&&u.index===x.index)return;let v=u.droppableId,c=x.droppableId;console.log("Moving from ",v,"to",c);let y=[...r.deals],[I]=y.splice(u.index,1);I.status=c,y.splice(x.index,0,I),C({...r,deals:y}),o(I)},[r,o]);return(0,nt.jsx)(Ie.DragDropContext,{onDragEnd:M,children:(0,nt.jsxs)("div",{className:"p-4",children:[(0,nt.jsx)("div",{className:"flex space-x-4 overflow-x-auto pb-4",children:Ao.filter(p=>p!=="Won"&&p!=="Lost").map(p=>{let u=w(p);return(0,nt.jsx)(At,{status:p,deals:u,customers:r.customers,users:e.users,categories:r.categories,onDealClick:l,calculateColumnValue:h,calculateWeightedValue:R,addNewDeal:p==="Cold"?t:void 0,onAddCustomer:s},p)})}),(0,nt.jsx)("div",{className:"nt-8 flex space-x-4",children:(0,nt.jsxs)(Z,{children:[(0,nt.jsx)(Pe,{asChild:!0,children:(0,nt.jsxs)(E,{children:[(0,nt.jsx)(lt.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Customer"]})}),(0,nt.jsxs)(J,{className:"sm:max-w-[425px]",children:[(0,nt.jsx)(_,{children:(0,nt.jsx)(K,{children:"Add New Customer"})}),(0,nt.jsx)(Ae,{onSubmit:s})]})]})}),n&&(0,nt.jsx)(Rt,{deal:n,users:e.users,customer:r.customers.find(p=>p.id===n.customerId),categories:r.categories,onClose:()=>l(null),onSave:o,onAddComment:p=>a(n.id,p)})]})})}var Et=[{id:1,name:"John Doe",email:"john.doe@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Bob Johnson",email:"bob.johnson@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Alice Brown",email:"alice.brown@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Charlie Davis",email:"charlie.davis@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"}];var To={title:"CRM/KanbanBoard",component:Lt,parameters:{layout:"fullscreen"}},Io=To,Lo={args:{initialData:{deals:Array.from({length:20},(e,t)=>({id:`${t+1}`,customerId:`${t%3+1}`,value:Math.floor(Math.random()*1e5)+5e3,assignee:["John Doe","Jane Smith","Bob Johnson"][Math.floor(Math.random()*3)],status:["Cold","Qualified","Proposal Made","Won","Lost"][Math.floor(Math.random()*5)],categories:[`${t%6+1}`],dateLogged:new Date(Date.now()-Math.floor(Math.random()*30)*24*60*60*1e3).toISOString(),closureDate:new Date(Date.now()+Math.floor(Math.random()*90)*24*60*60*1e3).toISOString(),comments:[],lastModified:new Date().toISOString(),description:`This is a mock description for deal ${t+1}. Ie's a ${["small","medium","large"][t%3]} deal with high potential.`})),customers:[{id:"1",name:"Acme Corp",active:!0},{id:"2",name:"GlobalTech",active:!0},{id:"3",name:"InnoSystems",active:!0}],users:Et,categories:[{id:"1",name:"Software",type:"proposition"},{id:"2",name:"Hardware",type:"proposition"},{id:"3",name:"Referral",type:"source"},{id:"4",name:"Outbound",type:"source"},{id:"5",name:"Tech",type:"sector"},{id:"6",name:"Finance",type:"sector"}]},addNewDeal:async e=>(console.log("Adding deal:",e),{...e,id:"new-deal-id"}),updateDeal:async e=>(console.log("Updating deal:",e),e),addNewCustomer:async e=>(console.log("Adding customer:",e),{...e,id:"new-customer-id"}),addComment:async(e,t)=>(console.log("Adding comment to deal:",e,t),{...t,id:"new-comment-id"})}};0&&(module.exports={Default});
@@ -1 +1 @@
1
- import{d as a}from"../../chunk-HIT3PDJA.mjs";import{a as o}from"../../chunk-RCD6MJF5.mjs";import"../../chunk-CTX7UBDG.mjs";import"../../chunk-TEOR3ZQR.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-YOFO7YSO.mjs";import"../../chunk-K3N5EH4U.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";var r={title:"CRM/KanbanBoard",component:o,parameters:{layout:"fullscreen"}},s=r,i={args:{initialData:{deals:Array.from({length:20},(e,t)=>({id:`${t+1}`,customerId:`${t%3+1}`,value:Math.floor(Math.random()*1e5)+5e3,assignee:["John Doe","Jane Smith","Bob Johnson"][Math.floor(Math.random()*3)],status:["Cold","Qualified","Proposal Made","Won","Lost"][Math.floor(Math.random()*5)],categories:[`${t%6+1}`],dateLogged:new Date(Date.now()-Math.floor(Math.random()*30)*24*60*60*1e3).toISOString(),closureDate:new Date(Date.now()+Math.floor(Math.random()*90)*24*60*60*1e3).toISOString(),comments:[],lastModified:new Date().toISOString(),description:`This is a mock description for deal ${t+1}. It's a ${["small","medium","large"][t%3]} deal with high potential.`})),customers:[{id:"1",name:"Acme Corp",active:!0},{id:"2",name:"GlobalTech",active:!0},{id:"3",name:"InnoSystems",active:!0}],users:a,categories:[{id:"1",name:"Software",type:"proposition"},{id:"2",name:"Hardware",type:"proposition"},{id:"3",name:"Referral",type:"source"},{id:"4",name:"Outbound",type:"source"},{id:"5",name:"Tech",type:"sector"},{id:"6",name:"Finance",type:"sector"}]},addNewDeal:async e=>(console.log("Adding deal:",e),{...e,id:"new-deal-id"}),updateDeal:async e=>(console.log("Updating deal:",e),e),addNewCustomer:async e=>(console.log("Adding customer:",e),{...e,id:"new-customer-id"}),addComment:async(e,t)=>(console.log("Adding comment to deal:",e,t),{...t,id:"new-comment-id"})}};export{i as Default,s as default};
1
+ import{d as a}from"../../chunk-HIT3PDJA.mjs";import{a as o}from"../../chunk-TL63X5GG.mjs";import"../../chunk-UADGNBOR.mjs";import"../../chunk-TGJAUKC7.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-YOFO7YSO.mjs";import"../../chunk-R25VHV7D.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";var r={title:"CRM/KanbanBoard",component:o,parameters:{layout:"fullscreen"}},s=r,i={args:{initialData:{deals:Array.from({length:20},(e,t)=>({id:`${t+1}`,customerId:`${t%3+1}`,value:Math.floor(Math.random()*1e5)+5e3,assignee:["John Doe","Jane Smith","Bob Johnson"][Math.floor(Math.random()*3)],status:["Cold","Qualified","Proposal Made","Won","Lost"][Math.floor(Math.random()*5)],categories:[`${t%6+1}`],dateLogged:new Date(Date.now()-Math.floor(Math.random()*30)*24*60*60*1e3).toISOString(),closureDate:new Date(Date.now()+Math.floor(Math.random()*90)*24*60*60*1e3).toISOString(),comments:[],lastModified:new Date().toISOString(),description:`This is a mock description for deal ${t+1}. It's a ${["small","medium","large"][t%3]} deal with high potential.`})),customers:[{id:"1",name:"Acme Corp",active:!0},{id:"2",name:"GlobalTech",active:!0},{id:"3",name:"InnoSystems",active:!0}],users:a,categories:[{id:"1",name:"Software",type:"proposition"},{id:"2",name:"Hardware",type:"proposition"},{id:"3",name:"Referral",type:"source"},{id:"4",name:"Outbound",type:"source"},{id:"5",name:"Tech",type:"sector"},{id:"6",name:"Finance",type:"sector"}]},addNewDeal:async e=>(console.log("Adding deal:",e),{...e,id:"new-deal-id"}),updateDeal:async e=>(console.log("Updating deal:",e),e),addNewCustomer:async e=>(console.log("Adding customer:",e),{...e,id:"new-customer-id"}),addComment:async(e,t)=>(console.log("Adding comment to deal:",e,t),{...t,id:"new-comment-id"})}};export{i as Default,s as default};
@@ -1 +1 @@
1
- import{a}from"../../chunk-CTX7UBDG.mjs";import"../../chunk-TEOR3ZQR.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-YOFO7YSO.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as KanbanColumn};
1
+ import{a}from"../../chunk-UADGNBOR.mjs";import"../../chunk-TGJAUKC7.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-YOFO7YSO.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as KanbanColumn};
@@ -1 +1 @@
1
- import{a as l,b as n,c as s}from"../../chunk-HIT3PDJA.mjs";import{a}from"../../chunk-CTX7UBDG.mjs";import"../../chunk-TEOR3ZQR.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-YOFO7YSO.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";var c={title:"CRM/KanbanColumn",component:a,parameters:{layout:"centered"}},p=c,m={args:{status:"Qualified",deals:s.filter(e=>e.status==="Qualified"),customers:l,categories:n,onDealClick:e=>console.log("Deal clicked:",e),calculateColumnValue:e=>e.reduce((o,t)=>o+t.value,0),calculateWeightedValue:(e,o)=>{let t={Cold:.2,Qualified:.4,Proposal:.6,SoW:.7,Won:1,Lost:0};return e.reduce((r,u)=>r+u.value*t[o],0)},addNewDeal:async e=>console.log("Adding new deal:",e),onAddCustomer:async e=>console.log("Adding new customer:",e)}},y={args:{...m.args,status:"Won",deals:[]}};export{m as Default,y as EmptyColumn,p as default};
1
+ import{a as l,b as n,c as s}from"../../chunk-HIT3PDJA.mjs";import{a}from"../../chunk-UADGNBOR.mjs";import"../../chunk-TGJAUKC7.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-YOFO7YSO.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";var c={title:"CRM/KanbanColumn",component:a,parameters:{layout:"centered"}},p=c,m={args:{status:"Qualified",deals:s.filter(e=>e.status==="Qualified"),customers:l,categories:n,onDealClick:e=>console.log("Deal clicked:",e),calculateColumnValue:e=>e.reduce((o,t)=>o+t.value,0),calculateWeightedValue:(e,o)=>{let t={Cold:.2,Qualified:.4,Proposal:.6,SoW:.7,Won:1,Lost:0};return e.reduce((r,u)=>r+u.value*t[o],0)},addNewDeal:async e=>console.log("Adding new deal:",e),onAddCustomer:async e=>console.log("Adding new customer:",e)}},y={args:{...m.args,status:"Won",deals:[]}};export{m as Default,y as EmptyColumn,p as default};
@@ -1 +1 @@
1
- import{a}from"../../chunk-TEOR3ZQR.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as NewDealForm};
1
+ import{a}from"../../chunk-TGJAUKC7.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as NewDealForm};
@@ -1 +1 @@
1
- import{a as t,b as r,c as a}from"../../chunk-HIT3PDJA.mjs";import{a as e}from"../../chunk-TEOR3ZQR.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";var m={title:"CRM/NewDealForm",component:e,parameters:{layout:"centered"}},c=m,s={args:{customers:t,categories:r,onSubmit:async o=>console.log("Submitting deal:",o),onAddCustomer:async o=>console.log("Adding new customer:",o)}},i={args:{...s.args,initialDeal:a[0]}};export{s as Default,i as EditExistingDeal,c as default};
1
+ import{a as t,b as r,c as a}from"../../chunk-HIT3PDJA.mjs";import{a as e}from"../../chunk-TGJAUKC7.mjs";import"../../chunk-HQFNGDDO.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";var m={title:"CRM/NewDealForm",component:e,parameters:{layout:"centered"}},c=m,s={args:{customers:t,categories:r,onSubmit:async o=>console.log("Submitting deal:",o),onAddCustomer:async o=>console.log("Adding new customer:",o)}},i={args:{...s.args,initialDeal:a[0]}};export{s as Default,i as EditExistingDeal,c as default};