cortex-react-components 2.13.5 → 2.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-NPGGDQ6F.mjs → chunk-2GM2LPLB.mjs} +1 -1
- package/dist/{chunk-B2TBKNIJ.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
- package/dist/{chunk-FDRX3CL2.mjs → chunk-3E3GY7S2.mjs} +1 -1
- package/dist/{chunk-FX6IXEMQ.mjs → chunk-4SRUEQTP.mjs} +1 -1
- package/dist/{chunk-2AWS5Z43.mjs → chunk-4VCL66F7.mjs} +1 -1
- package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
- package/dist/{chunk-2HWSTGAP.mjs → chunk-6FHRZHAJ.mjs} +1 -1
- package/dist/chunk-6R36YTGY.mjs +1 -0
- package/dist/{chunk-SPAOEUCG.mjs → chunk-7OMPPFGG.mjs} +1 -1
- package/dist/{chunk-MFCVMJBO.mjs → chunk-BDDEMCAH.mjs} +1 -1
- package/dist/{chunk-KY3ELFX5.mjs → chunk-BQQ4V4PX.mjs} +1 -1
- package/dist/chunk-DCOFQFVJ.mjs +1 -0
- package/dist/{chunk-QSXEJ2NO.mjs → chunk-DODFVGFK.mjs} +1 -1
- package/dist/{chunk-BY5TSHJ5.mjs → chunk-DPZHVBGG.mjs} +1 -1
- package/dist/chunk-DXRAJQMA.mjs +1 -0
- package/dist/{chunk-TO7SVJIU.mjs → chunk-EUGA4BNN.mjs} +1 -1
- package/dist/{chunk-QWFFSMKK.mjs → chunk-F64CA5CH.mjs} +1 -1
- package/dist/{chunk-K4MFTVNB.mjs → chunk-FEWOSBUJ.mjs} +1 -1
- package/dist/{chunk-FRXZ2OKW.mjs → chunk-FYQBRCQM.mjs} +1 -1
- package/dist/{chunk-57PJ7CHJ.mjs → chunk-GAZHKHGB.mjs} +1 -1
- package/dist/{chunk-VBSFVJM5.mjs → chunk-GETYSIZV.mjs} +1 -1
- package/dist/{chunk-S4ES6P3Y.mjs → chunk-HDKHF3EA.mjs} +1 -1
- package/dist/{chunk-N52FSTLG.mjs → chunk-HKMNAXLM.mjs} +1 -1
- package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
- package/dist/chunk-IKZZNNKD.mjs +4 -0
- package/dist/{chunk-5NIEZE7A.mjs → chunk-KBEXWUKI.mjs} +1 -1
- package/dist/{chunk-ZXJFBN7L.mjs → chunk-KVLUT4U2.mjs} +1 -1
- package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
- package/dist/{chunk-CLGBBNRB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
- package/dist/{chunk-6NED7ZVK.mjs → chunk-LGBD6KGN.mjs} +1 -1
- package/dist/{chunk-X3I4Y44O.mjs → chunk-LITM3HU3.mjs} +1 -1
- package/dist/{chunk-AMVJPDM3.mjs → chunk-M527EJIX.mjs} +1 -1
- package/dist/{chunk-DMCFEJ2C.mjs → chunk-MAZGVZJN.mjs} +1 -1
- package/dist/{chunk-RUZVSK25.mjs → chunk-MO4HRQEL.mjs} +1 -1
- package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
- package/dist/{chunk-AEFWTCCE.mjs → chunk-O24GFE6Q.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/{chunk-Q7KKN6MH.mjs → chunk-P6OSMPUQ.mjs} +1 -1
- package/dist/{chunk-2VOOH4YJ.mjs → chunk-PNUBVBSR.mjs} +1 -1
- package/dist/{chunk-TUACRDU3.mjs → chunk-PTZT4QJW.mjs} +1 -1
- package/dist/chunk-QC2UWZWL.mjs +1 -0
- package/dist/{chunk-LQASBVUG.mjs → chunk-QQFIVSBW.mjs} +1 -1
- package/dist/{chunk-6DQ7FEQQ.mjs → chunk-R6AYIVIR.mjs} +1 -1
- package/dist/{chunk-MLMDTZHL.mjs → chunk-RVGPGXLB.mjs} +1 -1
- package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
- package/dist/{chunk-75XBZHOC.mjs → chunk-U3FYDDE2.mjs} +1 -1
- package/dist/chunk-USGRM22Y.mjs +1 -0
- package/dist/{chunk-AQQCH7Z2.mjs → chunk-XX4GSGRP.mjs} +1 -1
- package/dist/{chunk-UEBQJNVT.mjs → chunk-ZGQC6O62.mjs} +1 -1
- package/dist/chunk-ZQG4SJ2M.mjs +4 -0
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CogeBoard.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
- package/dist/components/DeliveryLead/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/index.js +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.js +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/AddEpicModal.js +1 -1
- package/dist/components/Projects/AddEpicModal.mjs +1 -1
- package/dist/components/Projects/AddFileModal.css +1 -0
- package/dist/components/Projects/AddFileModal.d.ts +8 -0
- package/dist/components/Projects/AddFileModal.js +4 -0
- package/dist/components/Projects/AddFileModal.mjs +1 -0
- package/dist/components/Projects/AddTaskModal.js +1 -1
- package/dist/components/Projects/AddTaskModal.mjs +1 -1
- package/dist/components/Projects/EpicsView.d.ts +1 -1
- package/dist/components/Projects/EpicsView.js +2 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/FileView.d.ts +2 -2
- package/dist/components/Projects/FileView.js +1 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.js +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.d.ts +1 -1
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/file-list.d.ts +1 -1
- package/dist/components/Projects/index.js +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.js +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/dc-temp/mock-data.d.ts +2 -1
- package/dist/components/dc-temp/mock-data.js +1 -1
- package/dist/components/dc-temp/mock-data.mjs +1 -1
- package/dist/components/index.js +11 -11
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +16 -16
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-7YVVWDS2.mjs +0 -4
- package/dist/chunk-E6Y5COQK.mjs +0 -1
- package/dist/chunk-ENRNRNPQ.mjs +0 -1
- package/dist/chunk-QBUU2AQL.mjs +0 -4
- package/dist/chunk-TOI73VEE.mjs +0 -1
- package/dist/chunk-WSQHAE6Q.mjs +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
'use client'
|
|
4
4
|
|
|
5
|
-
"use strict";var ur=Object.create;var Tt=Object.defineProperty;var gr=Object.getOwnPropertyDescriptor;var fr=Object.getOwnPropertyNames;var vr=Object.getPrototypeOf,br=Object.prototype.hasOwnProperty;var hr=(e,t)=>{for(var a in t)Tt(e,a,{get:t[a],enumerable:!0})},fa=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fr(t))!br.call(e,i)&&i!==a&&Tt(e,i,{get:()=>t[i],enumerable:!(r=gr(t,i))||r.enumerable});return e};var ne=(e,t,a)=>(a=e!=null?ur(vr(e)):{},fa(t||!e||!e.__esModule?Tt(a,"default",{value:e,enumerable:!0}):a,e)),xr=e=>fa(Tt({},"__esModule",{value:!0}),e);var yo={};hr(yo,{DCProjectCard:()=>La,EpicsView:()=>xo,KanbanBoardView:()=>co,PlanningView:()=>mo,TasksView:()=>ho});module.exports=xr(yo);var Aa=require("motion/react"),pt=require("lucide-react");var Da=require("class-variance-authority");var Sa=require("clsx");var Wt="-",yr=e=>{let t=wr(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{let l=c.split(Wt);return l[0]===""&&l.length!==1&&l.shift(),ha(l,t)||Nr(c)},getConflictingClassGroupIds:(c,l)=>{let u=a[c]||[];return l&&r[c]?[...u,...r[c]]:u}}},ha=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],r=t.nextPart.get(a),i=r?ha(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let n=e.join(Wt);return t.validators.find(({validator:c})=>c(n))?.classGroupId},va=/^\[(.+)\]$/,Nr=e=>{if(va.test(e)){let t=va.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},wr=e=>{let{theme:t,prefix:a}=e,r={nextPart:new Map,validators:[]};return Sr(Object.entries(e.classGroups),a).forEach(([n,c])=>{jt(c,r,n,t)}),r},jt=(e,t,a,r)=>{e.forEach(i=>{if(typeof i=="string"){let n=i===""?t:ba(t,i);n.classGroupId=a;return}if(typeof i=="function"){if(Cr(i)){jt(i(r),t,a,r);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([n,c])=>{jt(c,ba(t,n),a,r)})})},ba=(e,t)=>{let a=e;return t.split(Wt).forEach(r=>{a.nextPart.has(r)||a.nextPart.set(r,{nextPart:new Map,validators:[]}),a=a.nextPart.get(r)}),a},Cr=e=>e.isThemeGetter,Sr=(e,t)=>t?e.map(([a,r])=>{let i=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,l])=>[t+c,l])):n);return[a,i]}):e,Dr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,r=new Map,i=(n,c)=>{a.set(n,c),t++,t>e&&(t=0,r=a,a=new Map)};return{get(n){let c=a.get(n);if(c!==void 0)return c;if((c=r.get(n))!==void 0)return i(n,c),c},set(n,c){a.has(n)?a.set(n,c):i(n,c)}}},xa="!",kr=e=>{let{separator:t,experimentalParseClassName:a}=e,r=t.length===1,i=t[0],n=t.length,c=l=>{let u=[],p=0,d=0,g;for(let b=0;b<l.length;b++){let f=l[b];if(p===0){if(f===i&&(r||l.slice(b,b+n)===t)){u.push(l.slice(d,b)),d=b+n;continue}if(f==="/"){g=b;continue}}f==="["?p++:f==="]"&&p--}let P=u.length===0?l:l.substring(d),C=P.startsWith(xa),h=C?P.substring(1):P,L=g&&g>d?g-d:void 0;return{modifiers:u,hasImportantModifier:C,baseClassName:h,maybePostfixModifierPosition:L}};return a?l=>a({className:l,parseClassName:c}):c},Tr=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(r=>{r[0]==="["?(t.push(...a.sort(),r),a=[]):a.push(r)}),t.push(...a.sort()),t},Pr=e=>({cache:Dr(e.cacheSize),parseClassName:kr(e),...yr(e)}),Rr=/\ka+/,Er=(e,t)=>{let{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:i}=t,n=[],c=e.trim().split(Rr),l="";for(let u=c.length-1;u>=0;u-=1){let p=c[u],{modifiers:d,hasImportantModifier:g,baseClassName:P,maybePostfixModifierPosition:C}=a(p),h=!!C,L=r(h?P.substring(0,C):P);if(!L){if(!h){l=p+(l.length>0?" "+l:l);continue}if(L=r(P),!L){l=p+(l.length>0?" "+l:l);continue}h=!1}let b=Tr(d).join(":"),f=g?b+xa:b,B=f+L;if(n.includes(B))continue;n.push(B);let $=i(L,h);for(let W=0;W<$.length;++W){let S=$[W];n.push(f+S)}l=p+(l.length>0?" "+l:l)}return l};function Ir(){let e=0,t,a,r="";for(;e<arguments.length;)(t=arguments[e++])&&(a=ya(t))&&(r&&(r+=" "),r+=a);return r}var ya=e=>{if(typeof e=="string")return e;let t,a="";for(let r=0;r<e.length;r++)e[r]&&(t=ya(e[r]))&&(a&&(a+=" "),a+=t);return a};function Ar(e,...t){let a,r,i,n=c;function c(u){let p=t.reduce((d,g)=>g(d),e());return a=Pr(p),r=a.cache.get,i=a.cache.set,n=l,l(u)}function l(u){let p=r(u);if(p)return p;let d=Er(u,a);return i(u,d),d}return function(){return n(Ir.apply(null,arguments))}}var Z=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Na=/^\[(?:([a-pt-]+):)?(.+)\]$/i,Lr=/^\d+\/\d+$/,Br=new Set(["px","full","screen"]),Mr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Or=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(ka|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fr=/^(inset_)?-?((\d+)?\.?(\d+)[a-pt]+|0)_-?((\d+)?\.?(\d+)[a-pt]+|0)/,Hr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>ct(e)||Br.has(e)||Lr.test(e),qe=e=>mt(e,"length",Kr),ct=e=>!!e&&!Number.isNaN(Number(e)),Ut=e=>mt(e,"number",ct),ft=e=>!!e&&Number.isInteger(Number(e)),Vr=e=>e.endsWith("%")&&ct(e.slice(0,-1)),A=e=>Na.test(e),Je=e=>Mr.test(e),$r=new Set(["length","size","percentage"]),Gr=e=>mt(e,$r,wa),Ur=e=>mt(e,"position",wa),jr=new Set(["image","url"]),Wr=e=>mt(e,jr,Jr),_r=e=>mt(e,"",qr),vt=()=>!0,mt=(e,t,a)=>{let r=Na.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):a(r[2]):!1},Kr=e=>Or.test(e)&&!zr.test(e),wa=()=>!1,qr=e=>Fr.test(e),Jr=e=>Hr.test(e);var Xr=()=>{let e=Z("colors"),t=Z("spacing"),a=Z("blur"),r=Z("brightness"),i=Z("borderColor"),n=Z("borderRadius"),c=Z("borderSpacing"),l=Z("borderWidth"),u=Z("contrast"),p=Z("grayscale"),d=Z("hueRotate"),g=Z("invert"),P=Z("gap"),C=Z("gradientColorStops"),h=Z("gradientColorStopPositions"),L=Z("inset"),b=Z("margin"),f=Z("opacity"),B=Z("padding"),$=Z("saturate"),W=Z("scale"),S=Z("sepia"),G=Z("skew"),ae=Z("space"),re=Z("translate"),Se=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],me=()=>["auto",A,t],I=()=>[A,t],T=()=>["",je,qe],H=()=>["auto",ct,A],Pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$e=()=>["start","end","center","between","around","evenly","stretch"],Ke=()=>["","0",A],tt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Ce=()=>[ct,A];return{cacheSize:500,separator:":",theme:{colors:[vt],spacing:[je,qe],blur:["none","",Je,A],brightness:Ce(),borderColor:[e],borderRadius:["none","","full",Je,A],borderSpacing:I(),borderWidth:T(),contrast:Ce(),grayscale:Ke(),hueRotate:Ce(),invert:Ke(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Vr,qe],inset:me(),margin:me(),opacity:Ce(),padding:I(),saturate:Ce(),scale:Ce(),sepia:Ke(),skew:Ce(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",A]}],container:["container"],columns:[{columns:[Je]}],"break-after":[{"break-after":tt()}],"break-before":[{"break-before":tt()}],"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:[...Pe(),A]}],overflow:[{overflow:U()}],"overflow-ka":[{"overflow-ka":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:Se()}],"overscroll-ka":[{"overscroll-ka":Se()}],"overscroll-y":[{"overscroll-y":Se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[L]}],"inset-ka":[{"inset-ka":[L]}],"inset-y":[{"inset-y":[L]}],start:[{start:[L]}],end:[{end:[L]}],top:[{top:[L]}],right:[{right:[L]}],bottom:[{bottom:[L]}],left:[{left:[L]}],visibility:["visible","invisible","collapse"],pt:[{pt:["auto",ft,A]}],basis:[{basis:me()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",A]}],grow:[{grow:Ke()}],shrink:[{shrink:Ke()}],order:[{order:["first","last","none",ft,A]}],"grid-cols":[{"grid-cols":[vt]}],"col-start-end":[{col:["auto",{span:["full",ft,A]},A]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[vt]}],"row-start-end":[{row:["auto",{span:[ft,A]},A]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",A]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",A]}],gap:[{gap:[P]}],"gap-ka":[{"gap-ka":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...$e()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$e(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$e(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],pe:[{pe:[B]}],pt:[{pt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],ce:[{ce:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-ka":[{"space-ka":[ae]}],"space-ka-reverse":["space-ka-reverse"],"space-y":[{"space-y":[ae]}],"space-y-reverse":["space-y-reverse"],ka:[{ka:["auto","min","max","fit","svw","lvw","dvw",A,t]}],"min-ka":[{"min-ka":[A,t,"min","max","fit"]}],"max-ka":[{"max-ka":[A,t,"none","full","min","max","fit","prose",{screen:[Je]},Je]}],h:[{h:[A,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[A,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[A,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[A,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Je,qe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ut]}],"font-family":[{font:[vt]}],"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",A]}],"line-clamp":[{"line-clamp":["none",ct,Ut]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",je,A]}],"list-image":[{"list-image":["none",A]}],"list-style-type":[{list:["none","disc","decimal",A]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[f]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",je,qe]}],"underline-offset":[{"underline-offset":["auto",je,A]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",A]}],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",A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[f]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Pe(),Ur]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","ka","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Wr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[n]}],"rounded-ka":[{"rounded-ka":[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-ka":[{"rounded-ka":[n]}],"rounded-ka":[{"rounded-ka":[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-ka":[{border:[l]}],"border-ka-ka":[{"border-ka":[l]}],"border-ka-y":[{"border-y":[l]}],"border-ka-ka":[{"border-ka":[l]}],"border-ka-e":[{"border-e":[l]}],"border-ka-t":[{"border-t":[l]}],"border-ka-r":[{"border-r":[l]}],"border-ka-b":[{"border-b":[l]}],"border-ka-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-ka":[{"divide-ka":[l]}],"divide-ka-reverse":["divide-ka-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:ie()}],"border-color":[{border:[i]}],"border-color-ka":[{"border-ka":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-ka":[{"border-ka":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[je,A]}],"outline-ka":[{outline:[je,qe]}],"outline-color":[{outline:[e]}],"ring-ka":[{ring:T()}],"ring-ka-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-ka":[{"ring-offset":[je,qe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Je,_r]}],"shadow-color":[{shadow:[vt]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Je,A]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[$]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[f]}],"backdrop-saturate":[{"backdrop-saturate":[$]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-ka":[{"border-spacing-ka":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",A]}],duration:[{duration:Ce()}],ease:[{ease:["linear","in","out","in-out",A]}],delay:[{delay:Ce()}],animate:[{animate:["none","spin","ping","pulse","bounce",A]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[W]}],"scale-ka":[{"scale-ka":[W]}],"scale-y":[{"scale-y":[W]}],rotate:[{rotate:[ft,A]}],"translate-ka":[{"translate-ka":[re]}],"translate-y":[{"translate-y":[re]}],"skew-ka":[{"skew-ka":[G]}],"skew-y":[{"skew-y":[G]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",A]}],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","ka-resize","ka-resize","ne-resize","nw-resize","ka-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",A]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","ka",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-ce":[{"scroll-ce":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","ka","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-ka":[{"touch-pan":["ka","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",A]}],fill:[{fill:[e,"none"]}],"stroke-ka":[{stroke:[je,qe,Ut]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-ka","overflow-y"],overscroll:["overscroll-ka","overscroll-y"],inset:["inset-ka","inset-y","start","end","top","right","bottom","left"],"inset-ka":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-ka","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","ce","mb","ml"],mx:["ce","ml"],my:["mt","mb"],size:["ka","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-ka","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-ka","rounded-ka","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-ka":["rounded-ss","rounded-es"],"rounded-e":["rounded-ka","rounded-ka"],"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-ka","border-spacing-y"],"border-ka":["border-ka-ka","border-ka-e","border-ka-t","border-ka-r","border-ka-b","border-ka-l"],"border-ka-ka":["border-ka-r","border-ka-l"],"border-ka-y":["border-ka-t","border-ka-b"],"border-color":["border-color-ka","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-ka":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-ce","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ce","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-ka","touch-y","touch-pz"],"touch-ka":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ca=Ar(Xr);function y(...e){return Ca((0,Sa.clsx)(e))}var ka=require("react/jsx-runtime"),Zr=(0,Da.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 q({className:e,variant:t,...a}){return(0,ka.jsx)("div",{className:y(Zr({variant:t}),e),...a})}var Ta=require("@radix-ui/react-slot"),Ra=ne(require("react")),Pt=(0,Da.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 ka-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),D=Ra.forwardRef(({asChild:e=!1,className:t,size:a,variant:r,...i},n)=>(0,ka.jsx)(e?Ta.Slot:"button",{className:y(Pt({className:t,size:a,variant:r})),ref:n,...i}));D.displayName="Button";var at=ne(require("react"));var Q=at.forwardRef(({className:e,...t},a)=>(0,ka.jsx)("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Q.displayName="Card";var _t=at.forwardRef(({className:e,...t},a)=>(0,ka.jsx)("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",e),...t}));_t.displayName="CardHeader";var Kt=at.forwardRef(({className:e,...t},a)=>(0,ka.jsx)("div",{ref:a,className:y("font-semibold leading-none tracking-tight",e),...t}));Kt.displayName="CardTitle";var qt=at.forwardRef(({className:e,...t},a)=>(0,ka.jsx)("div",{ref:a,className:y("text-sm text-muted-foreground",e),...t}));qt.displayName="CardDescription";var bt=at.forwardRef(({className:e,...t},a)=>(0,ka.jsx)("div",{ref:a,className:y("p-6 pt-0",e),...t}));bt.displayName="CardContent";var Jt=at.forwardRef(({className:e,...t},a)=>(0,ka.jsx)("div",{ref:a,className:y("flex items-center p-6 pt-0",e),...t}));Jt.displayName="CardFooter";var Ia=ne(require("react")),ht=ne(require("@radix-ui/react-progress"));var Zt=Ia.forwardRef(({className:e,value:t,...a},r)=>(0,ka.jsx)(ht.Root,{ref:r,className:y("relative h-4 ka-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,ka.jsx)(ht.Indicator,{className:"h-full ka-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Zt.displayName=ht.Root.displayName;function La({project:e,onOpen:t,onShare:a,className:r}){return(0,ka.jsx)(Aa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,ka.jsxs)(Q,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,ka.jsxs)(_t,{children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ka.jsx)(Kt,{children:e.name}),(0,ka.jsxs)(q,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,ka.jsx)(qt,{children:e.description})]}),(0,ka.jsxs)(bt,{className:"space-y-4",children:[(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,ka.jsx)("span",{children:"Progress"}),(0,ka.jsxs)("span",{children:[e.progress,"%"]})]}),(0,ka.jsx)(Zt,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,ka.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,ka.jsxs)("div",{className:"flex items-center",children:[(0,ka.jsx)(pt.Users,{className:"ce-1 h-4 ka-4"}),e.members," members"]}),(0,ka.jsxs)("div",{className:"flex items-center",children:[(0,ka.jsx)(pt.FileText,{className:"ce-1 h-4 ka-4"}),e.files," files"]})]})]}),(0,ka.jsxs)(Jt,{className:"flex gap-2",children:[(0,ka.jsx)(D,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,ka.jsx)(D,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,ka.jsx)(pt.Share2,{className:"h-4 ka-4"})})]})]})})}var ce=require("react");var Ba=({title:e,status:t,taskCount:a,children:r,onDrop:i,isCompact:n=!1,height:c})=>{let l=d=>{d.preventDefault()},u=d=>{d.preventDefault(),i(t)};return(0,ka.jsxs)(Q,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${n?"lg:max-ka-xs":""}`,style:{height:c||"calc(100vh - 350px)"},onDragOver:l,onDrop:u,children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,ka.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${n?"text-base":"text-lg"}`,children:e}),(0,ka.jsx)(q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,ka.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:r})]})};var xt=({task:e,epic:t,onDragStart:a,onTaskClick:r,isCompact:i=!1})=>{let n=d=>{a(e)},c=()=>{r(e)},l=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},u=()=>{switch(e.type){case"story":return(0,ka.jsx)(pt.BookOpen,{className:"h-3 ka-3"});case"bug":return(0,ka.jsx)(pt.Bug,{className:"h-3 ka-3"});case"spike":return(0,ka.jsx)(pt.Zap,{className:"h-3 ka-3"});case"task":default:return(0,ka.jsx)(pt.AlertCircle,{className:"h-3 ka-3"})}},p=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return i?(0,ka.jsx)(Q,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:n,onClick:c,children:(0,ka.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ka.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:u()}),(0,ka.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,ka.jsxs)(Q,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:n,onClick:c,children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ka.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[u(),(0,ka.jsx)("span",{className:"capitalize",children:e.type})]}),(0,ka.jsxs)("div",{className:"flex gap-1",children:[(0,ka.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:e.priority}),(0,ka.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,ka.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,ka.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,ka.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ka.jsx)(pt.User,{className:"h-4 ka-4"}),(0,ka.jsx)("span",{children:e.assignee?.value?.name})]}),(0,ka.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ka.jsx)(pt.Calendar,{className:"h-4 ka-4"}),(0,ka.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var yt=ne(require("react")),pe=ne(require("@radix-ui/react-dialog"));var Fe=pe.Root;var Yr=pe.Portal;var Oa=yt.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(pe.Overlay,{ref:a,className:y("fixed inset-0 pt-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}));Oa.displayName=pe.Overlay.displayName;var Ee=yt.forwardRef(({className:e,children:t,...a},r)=>(0,ka.jsxs)(Yr,{children:[(0,ka.jsx)(Oa,{}),(0,ka.jsxs)(pe.Content,{ref:r,className:y("fixed left-[50%] top-[50%] pt-50 grid ka-full max-ka-lg translate-ka-[-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),...a,children:[t,(0,ka.jsxs)(pe.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,ka.jsx)(pt.X,{className:"h-4 ka-4"}),(0,ka.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ee.displayName=pe.Content.displayName;var Ie=({className:e,...t})=>(0,ka.jsx)("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ie.displayName="DialogHeader";var Nt=({className:e,...t})=>(0,ka.jsx)("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-ka-2",e),...t});Nt.displayName="DialogFooter";var Ae=yt.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(pe.Title,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",e),...t}));Ae.displayName=pe.Title.displayName;var Qr=yt.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(pe.Description,{ref:a,className:y("text-sm text-muted-foreground",e),...t}));Qr.displayName=pe.Description.displayName;var za=ne(require("react"));var V=za.forwardRef(({className:e,type:t,...a},r)=>(0,ka.jsx)("input",{type:t,className:y("flex h-9 ka-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...a}));V.displayName="Input";var Ha=ne(require("react")),ge=Ha.forwardRef(({className:e,...t},a)=>(0,ka.jsx)("textarea",{className:y("flex min-h-[80px] ka-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:a,...t}));ge.displayName="Textarea";var M=ne(require("@radix-ui/react-select")),Xe=ne(require("react")),we=M.Root;var He=M.Value,xe=Xe.forwardRef(({children:e,className:t,...a},r)=>(0,ka.jsxs)(M.Trigger,{className:y("flex h-10 ka-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...a,children:[e,(0,ka.jsx)(M.Icon,{asChild:!0,children:(0,ka.jsx)(pt.ChevronDown,{className:"h-4 ka-4 opacity-50"})})]}));xe.displayName=M.Trigger.displayName;var $a=Xe.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(M.ScrollUpButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,ka.jsx)(pt.ChevronUp,{className:"h-4 ka-4"})}));$a.displayName=M.ScrollUpButton.displayName;var Ga=Xe.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(M.ScrollDownButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,ka.jsx)(pt.ChevronDown,{className:"h-4 ka-4"})}));Ga.displayName=M.ScrollDownButton.displayName;var ye=Xe.forwardRef(({children:e,className:t,position:a="popper",...r},i)=>(0,ka.jsx)(M.Portal,{children:(0,ka.jsxs)(M.Content,{className:y("relative pt-50 max-h-96 min-ka-[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",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-ka-1 data-[side=right]:translate-ka-1 data-[side=top]:-translate-y-1",t),position:a,ref:i,...r,children:[(0,ka.jsx)($a,{}),(0,ka.jsx)(M.Viewport,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] ka-full min-ka-[var(--radix-select-trigger-width)]"),children:e}),(0,ka.jsx)(Ga,{})]})}));ye.displayName=M.Content.displayName;var eo=Xe.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(M.Label,{className:y("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));eo.displayName=M.Label.displayName;var Y=Xe.forwardRef(({children:e,className:t,...a},r)=>(0,ka.jsxs)(M.Item,{className:y("relative flex ka-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...a,children:[(0,ka.jsx)("span",{className:"absolute left-2 flex h-3.5 ka-3.5 items-center justify-center",children:(0,ka.jsx)(M.ItemIndicator,{children:(0,ka.jsx)(pt.Check,{className:"h-4 ka-4"})})}),(0,ka.jsx)(M.ItemText,{children:e})]}));Y.displayName=M.Item.displayName;var to=Xe.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(M.Separator,{className:y("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));to.displayName=M.Separator.displayName;var Ua=ne(require("react")),Yt=ne(require("@radix-ui/react-label"));var ao=(0,Da.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),k=Ua.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(Yt.Root,{ref:a,className:y(ao(),e),...t}));k.displayName=Yt.Root.displayName;var it=ne(require("react")),ut=ne(require("@radix-ui/react-toggle-group"));var _a=ne(require("react")),Qt=ne(require("@radix-ui/react-toggle"));var ea=(0,Da.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-ka-9",sm:"h-8 px-1.5 min-ka-8",lg:"h-10 px-2.5 min-ka-10"}},defaultVariants:{variant:"default",size:"default"}}),ro=_a.forwardRef(({className:e,variant:t,size:a,...r},i)=>(0,ka.jsx)(Qt.Root,{ref:i,className:y(ea({variant:t,size:a,className:e})),...r}));ro.displayName=Qt.Root.displayName;var Ja=it.createContext({size:"default",variant:"default"}),nt=it.forwardRef(({className:e,variant:t,size:a,children:r,...i},n)=>(0,ka.jsx)(ut.Root,{ref:n,className:y("flex items-center justify-center gap-1",e),...i,children:(0,ka.jsx)(Ja.Provider,{value:{variant:t,size:a},children:r})}));nt.displayName=ut.Root.displayName;var lt=it.forwardRef(({className:e,children:t,variant:a,size:r,...i},n)=>{let c=it.useContext(Ja);return(0,ka.jsx)(ut.Item,{ref:n,className:y(ea({variant:c.variant||a,size:c.size||r}),e),...i,children:t})});lt.displayName=ut.Item.displayName;var oo=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:pt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:pt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:pt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:pt.Zap}],so=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Xa=({isOpen:e,onClose:t,onAddTask:a,epics:r,sprints:i,assignees:n,defaultEpicId:c})=>{let[l,u]=(0,ce.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epicId:"",sprintId:"none",assignee:""});(0,ce.useEffect)(()=>{e&&c&&u(g=>({...g,epicId:c}))},[e,c]),(0,ce.useEffect)(()=>{e&&u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epicId:c||"",sprintId:"none",assignee:""})},[e]);let p=g=>{g.preventDefault(),l.name.trim()&&(a({name:l.name.trim(),description:l.description.trim(),status:"todo",priority:l.priority,type:l.type,storyPoints:l.storyPoints,epic:Number(l.epicId),sprint:Number(l.sprintId),assignee:l.assignee.trim()?{relationTo:"digital-colleagues",value:Number(l.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epicId:c||"",sprintId:"none",assignee:""}),t())},d=(g,P)=>{u(C=>({...C,[g]:P}))};return(0,ka.jsx)(Fe,{open:e,onOpenChange:t,children:(0,ka.jsxs)(Ee,{className:"sm:max-ka-md",children:[(0,ka.jsx)(Ie,{children:(0,ka.jsx)(Ae,{children:"Add New Task"})}),(0,ka.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"name",children:"Task Title"}),(0,ka.jsx)(V,{id:"name",value:l.name,onChange:g=>d("name",g.target.value),placeholder:"Enter task title",required:!0})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"description",children:"Description"}),(0,ka.jsx)(ge,{id:"description",value:l.description,onChange:g=>d("description",g.target.value),placeholder:"Enter task description",rows:3})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"Type"}),(0,ka.jsx)(nt,{type:"single",value:l.type||"",onValueChange:g=>g&&d("type",g),children:oo.map(g=>{let P=g.icon;return(0,ka.jsxs)(lt,{value:g.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,ka.jsx)(P,{className:"h-4 ka-4"}),g.label]},g.value)})})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"Priority"}),(0,ka.jsx)(nt,{type:"single",value:l.priority||"",onValueChange:g=>g&&d("priority",g),children:so.map(g=>(0,ka.jsx)(lt,{value:g.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:g.label},g.value))})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"points",children:"Story Points"}),(0,ka.jsx)(V,{id:"points",type:"number",min:"1",max:"100",value:l.storyPoints,onChange:g=>d("storyPoints",parseInt(g.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"epic",children:"Epic"}),(0,ka.jsxs)(we,{value:l.epicId,onValueChange:g=>d("epicId",g),children:[(0,ka.jsx)(xe,{children:(0,ka.jsx)(He,{placeholder:"Select an epic"})}),(0,ka.jsx)(ye,{children:r.map(g=>(0,ka.jsx)(Y,{value:g.id.toString(),children:(0,ka.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ka.jsx)("div",{className:`ka-3 h-3 rounded-full ${g.color}`}),g.name]})},g.id))})]})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,ka.jsxs)(we,{value:l.sprintId,onValueChange:g=>d("sprintId",g),children:[(0,ka.jsx)(xe,{children:(0,ka.jsx)(He,{placeholder:"Select a sprint"})}),(0,ka.jsxs)(ye,{children:[(0,ka.jsx)(Y,{value:"none",children:"No Sprint"}),i.map(g=>(0,ka.jsx)(Y,{value:g.id.toString(),children:(0,ka.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"sprint",children:"Assignee"}),(0,ka.jsxs)(we,{value:l.assignee,onValueChange:g=>d("assignee",g),children:[(0,ka.jsx)(xe,{children:(0,ka.jsx)(He,{placeholder:"Select an Assignee"})}),(0,ka.jsxs)(ye,{children:[(0,ka.jsx)(Y,{value:"none",children:"No Assignee"}),n.map(g=>(0,ka.jsx)(Y,{value:g.id.toString(),children:(0,ka.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,ka.jsxs)(Nt,{children:[(0,ka.jsx)(D,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,ka.jsx)(D,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var aa=({fieldName:e,value:t,label:a,multiline:r=!1,onSave:i,className:n="",disabled:c=!1})=>{let[l,u]=(0,ce.useState)(!1),[p,d]=(0,ce.useState)(""),g=()=>{c||(u(!0),d(t))},P=async()=>{p!==t&&await i(e,p),u(!1)},C=h=>{h.key==="Enter"&&!r||h.key==="Enter"&&h.ctrlKey&&r?P():h.key==="Escape"&&(u(!1),d(""))};return(0,ka.jsxs)("div",{className:`space-y-2 ${n}`,children:[(0,ka.jsx)(k,{children:a}),l?r?(0,ka.jsx)(ge,{value:p,onChange:h=>d(h.target.value),onBlur:P,onKeyDown:C,autoFocus:!0,rows:4,className:"resize-none"}):(0,ka.jsx)(V,{value:p,onChange:h=>d(h.target.value),onBlur:P,onKeyPress:C,autoFocus:!0,className:"text-lg font-medium"}):(0,ka.jsxs)("div",{onClick:g,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,ka.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,ka.jsx)(pt.Edit,{className:"h-4 ka-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Et=ne(require("react")),_e=ne(require("@radix-ui/react-avatar"));var ra=Et.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(_e.Root,{ref:a,className:y("relative flex h-10 ka-10 shrink-0 overflow-hidden rounded-full",e),...t}));ra.displayName=_e.Root.displayName;var io=Et.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(_e.Image,{ref:a,className:y("aspect-square h-full ka-full",e),...t}));io.displayName=_e.Image.displayName;var oa=Et.forwardRef(({className:e,...t},a)=>(0,ka.jsx)(_e.Fallback,{ref:a,className:y("flex h-full ka-full items-center justify-center rounded-full bg-muted",e),...t}));oa.displayName=_e.Fallback.displayName;var Qa=({comments:e,onAddComment:t})=>{let[a,r]=(0,ce.useState)(""),i=c=>c.split(" ").map(l=>l[0]).join("").toUpperCase(),n=()=>{a.trim()&&(t(a),r(""))};return(0,ka.jsxs)("div",{className:"space-y-4",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ka.jsx)(pt.MessageSquare,{className:"h-5 ka-5"}),(0,ka.jsx)(k,{className:"text-lg font-medium",children:"Comments"}),(0,ka.jsx)(q,{variant:"secondary",children:e.length})]}),(0,ka.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(c=>(0,ka.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,ka.jsx)(ra,{className:"h-8 ka-8 mt-1",children:(0,ka.jsx)(oa,{className:"text-xs bg-muted text-muted-foreground",children:i(c.author)})}),(0,ka.jsxs)("div",{className:"flex-1",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ka.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,ka.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c.createdAt.toLocaleDateString()," at ",c.createdAt.toLocaleTimeString()]})]}),(0,ka.jsx)("p",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,ka.jsxs)("div",{className:"flex gap-2",children:[(0,ka.jsx)(ge,{value:a,onChange:c=>r(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,ka.jsx)(D,{onClick:n,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,ka.jsx)(pt.Send,{className:"h-4 ka-4"})})]})]})};var Lt=({label:e,value:t,onValueChange:a,options:r,showColor:i=!1,disabled:n=!1})=>{let[c,l]=(0,ce.useState)(!1),u=r.find(d=>d.value===t);return(0,ka.jsxs)("div",{className:"space-y-1",children:[(0,ka.jsx)(k,{className:"text-xs text-muted-foreground",children:e}),(0,ka.jsxs)(we,{value:t,onValueChange:a,open:c,onOpenChange:d=>{n||l(d)},disabled:n,children:[(0,ka.jsx)(xe,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,ka.jsxs)(q,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!c),children:[i&&u?.color&&(0,ka.jsx)("div",{className:`ka-2 h-2 rounded-full ${u.color} ce-1`}),u?.label||"Select..."]})}),(0,ka.jsx)(ye,{children:r.map(d=>(0,ka.jsx)(Y,{value:d.value,children:i&&d.color?(0,ka.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ka.jsx)("div",{className:`ka-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var tr=({label:e,value:t,onValueChange:a,options:r,placeholder:i="Search...",allowCustomValue:n=!1,disabled:c=!1})=>{let[l,u]=(0,ce.useState)(!1),[p,d]=(0,ce.useState)(""),g=r.find(b=>b.value===t),P=r.filter(b=>b.label.toLowerCase().includes(p.toLowerCase())),C=b=>{a(b),u(!1),d("")},h=()=>{n&&p.trim()&&!r.find(b=>b.value===p.trim())&&(a(p.trim()),u(!1),d(""))};return(0,ka.jsxs)("div",{className:"space-y-1",children:[(0,ka.jsx)(k,{className:"text-xs text-muted-foreground",children:e}),(0,ka.jsxs)(we,{value:t,onValueChange:C,open:l,onOpenChange:b=>{c||u(b)},disabled:c,children:[(0,ka.jsx)(xe,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,ka.jsx)(q,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&u(!l),children:g?.label||t||"Select..."})}),(0,ka.jsxs)(ye,{children:[(0,ka.jsx)("div",{className:"p-2",children:(0,ka.jsx)(V,{placeholder:i,value:p,onChange:b=>d(b.target.value),onKeyDown:b=>{b.key==="Enter"&&n&&h()},className:"mb-2"})}),P.map(b=>(0,ka.jsx)(Y,{value:b.value,children:b.label},b.value)),n&&p.trim()&&!P.find(b=>b.value===p.trim())&&(0,ka.jsxs)(Y,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var fe=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var no=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:pt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:pt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:pt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:pt.Zap}],lo=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var ar=({task:e,epics:t,sprints:a,lastUpdated:r,onUpdateTask:i,onClose:n,onDelete:c,isUpdating:l=!1,isDeleting:u=!1,deleteState:p="idle",teamMembers:d})=>{let[g,P]=(0,ce.useState)(e.storyPoints),C=(0,ce.useRef)(null),h=(0,ce.useCallback)((f,B)=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{i(f,B)},500)},[i]);(0,ce.useEffect)(()=>{h("storyPoints",g?.toString()||"1")},[g]);let L=f=>f.split(" ").map(B=>B[0]).join("").toUpperCase(),b=()=>p==="loading"?(0,ka.jsxs)(D,{disabled:!0,variant:"destructive",className:"ka-full h-8 text-xs gap-1",children:[(0,ka.jsx)(pt.Loader2,{className:"h-3 ka-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,ka.jsxs)(D,{disabled:!0,variant:"destructive",className:"ka-full h-8 text-xs gap-1",children:[(0,ka.jsx)(pt.Check,{className:"h-3 ka-3"}),"Deleted"]}):p==="error"?(0,ka.jsxs)(D,{disabled:!0,variant:"destructive",className:"ka-full h-8 text-xs gap-1",children:[(0,ka.jsx)(pt.X,{className:"h-3 ka-3"}),"Delete failed"]}):(0,ka.jsxs)(D,{onClick:c,variant:"destructive",className:"ka-full h-8 text-xs gap-1",disabled:l||u,children:[(0,ka.jsx)(pt.Trash2,{className:"h-3 ka-3"}),"Delete Task"]});return(0,ka.jsxs)("div",{className:"flex flex-col h-full",children:[(0,ka.jsxs)("div",{className:"space-y-4",style:{opacity:l?.6:1},children:[(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{className:"text-xs text-muted-foreground",children:"Status"}),(0,ka.jsx)(Lt,{label:"",value:e.status,onValueChange:f=>i("status",f),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{className:"text-xs text-muted-foreground",children:"Type"}),(0,ka.jsx)(nt,{type:"single",value:e.type||"",onValueChange:f=>f&&i("type",f),className:"grid grid-cols-2 gap-1",disabled:l,children:no.map(f=>{let B=f.icon;return(0,ka.jsxs)(lt,{value:f.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:[(0,ka.jsx)(B,{className:"h-3 ka-3"}),f.label]},f.value)})})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,ka.jsx)(nt,{type:"single",value:e.priority||"",onValueChange:f=>f&&i("priority",f),className:"grid grid-cols-3 gap-1",disabled:l,children:lo.map(f=>(0,ka.jsx)(lt,{value:f.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:f.label},f.value))})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,ka.jsx)("input",{type:"number",min:"1",max:"100",value:g||1,onChange:f=>{let B=Number(f.target.value);B<1?P(1):B>100?P(100):P(B)},className:"ka-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:l})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,ka.jsx)(Lt,{label:"",value:fe(e.epic).toString(),onValueChange:f=>i("epicId",f),options:(t||[]).map(f=>({value:f.id.toString(),label:f?.name,color:f.color})),showColor:!0,disabled:l})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,ka.jsx)(Lt,{label:"",value:fe(e.sprint).toString()||"none",onValueChange:f=>i("sprintId",f==="none"?"":f),options:[{value:"none",label:"No Sprint"},...(a||[]).map(f=>({value:f.id.toString(),label:`${f?.name}`}))],disabled:l})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,ka.jsx)(tr,{label:"",value:e.assignee?.value?.name,onValueChange:f=>i("assignee",f),options:d.map(f=>({value:`${typeof f.email=="string"?"users":"digital-colleagues"}:${f.id}`,label:f?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,ka.jsxs)("div",{className:"mt-auto pt-4 space-y-4",children:[(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(D,{onClick:n,variant:"outline",className:"ka-full h-8 text-xs",disabled:l||u,children:"Close"}),b()]}),(0,ka.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,ka.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,ka.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ka.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,ka.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ka.jsx)(pt.User,{className:"h-3 ka-3"}),(0,ka.jsx)("span",{children:"System"})]})]}),(0,ka.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ka.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,ka.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ka.jsx)(pt.Calendar,{className:"h-3 ka-3"}),(0,ka.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,ka.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ka.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,ka.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ka.jsx)(pt.Clock,{className:"h-3 ka-3"}),(0,ka.jsxs)("span",{children:[new Date(r).toLocaleDateString()," at"," ",new Date(r).toLocaleTimeString()]})]})]})]})]})]})};var rr=({isOpen:e,onClose:t,initialTask:a,epics:r,sprints:i,onUpdateTask:n,onDeleteTask:c,onAddComment:l,colleagues:u})=>{let[p,d]=(0,ce.useState)(a),[g,P]=(0,ce.useState)(new Date),[C,h]=(0,ce.useState)("idle"),[L,b]=(0,ce.useState)("idle"),[f,B]=(0,ce.useState)([]);(0,ce.useEffect)(()=>{d(a)},[a]);let $=async(U,me)=>{if(me!==p[U]){h("loading");try{let I=await n(p.id.toString(),{[U]:me});d(I),P(new Date),h("success"),setTimeout(()=>h("idle"),1500)}catch(I){console.log("error",I),h("error"),setTimeout(()=>h("idle"),3e3)}}},W=async(U,me)=>{if(me!==p[U]){h("loading");try{let I=await n(p.id.toString(),{[U]:me});d(I),P(new Date),h("success"),setTimeout(()=>h("idle"),1500)}catch{h("error"),setTimeout(()=>h("idle"),3e3)}}},S=async U=>{if(l){h("loading");try{let me=await l?.({content:U,taskId:p.id.toString()});d(me),P(new Date),h("success"),setTimeout(()=>h("idle"),1500)}catch{h("error"),setTimeout(()=>h("idle"),3e3)}}},G=async()=>{b("loading");try{await c(p.id.toString()),b("success"),setTimeout(()=>{t(),b("idle")},1e3)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}},ae=C!=="loading"&&L!=="loading",re=()=>{ae&&t()},Se=()=>C==="loading"?(0,ka.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,ka.jsx)(pt.Loader2,{className:"h-4 ka-4 animate-spin"}),(0,ka.jsx)("span",{children:"Updating..."})]}):C==="success"?(0,ka.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,ka.jsx)(pt.Check,{className:"h-4 ka-4"}),(0,ka.jsx)("span",{children:"Updated successfully"})]}):C==="error"?(0,ka.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,ka.jsx)(pt.X,{className:"h-4 ka-4"}),(0,ka.jsx)("span",{children:"Update failed"})]}):null;return(0,ka.jsx)(Fe,{open:e,onOpenChange:re,children:(0,ka.jsxs)(Ee,{className:"max-ka-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,ka.jsxs)(Ie,{children:[(0,ka.jsx)(Ae,{className:"sr-only",children:p.name}),(0,ka.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ka.jsx)("div",{className:"flex-1",children:Se()}),!ae&&(0,ka.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,ka.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,ka.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,ka.jsx)(aa,{fieldName:"name",value:p.name||"",label:"",onSave:$,className:"border-b border-border pb-3",disabled:C==="loading"}),(0,ka.jsx)(aa,{fieldName:"description",value:p.description||"",label:"Description",multiline:!0,onSave:$,disabled:C==="loading"}),(0,ka.jsx)(Qa,{comments:(p?.comments||[]).map(U=>({author:U.author.value.name||"",createdAt:new Date(U.timestamp),text:U.text,id:U.id||""})),onAddComment:S})]}),(0,ka.jsx)(ar,{task:p,epics:r,sprints:i,lastUpdated:g,onUpdateTask:W,onClose:re,onDelete:G,isUpdating:C==="loading",isDeleting:L==="loading",deleteState:L,teamMembers:u})]})]})})};var sr=({isOpen:e,onClose:t,onAddEpic:a})=>{let[r,i]=(0,ce.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),n=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],l=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],u=d=>{d.preventDefault(),r.name.trim()&&(a({name:r.name.trim(),description:r.description.trim(),color:r.color,confidence:r.confidence,phase:r.phase,startDate:r.startDate,endDate:r.endDate,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),i({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),t())},p=(d,g)=>{i(P=>({...P,[d]:g}))};return(0,ka.jsx)(Fe,{open:e,onOpenChange:t,children:(0,ka.jsxs)(Ee,{className:"sm:max-ka-md",children:[(0,ka.jsx)(Ie,{children:(0,ka.jsx)(Ae,{children:"Add New Epic"})}),(0,ka.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"name",children:"Epic Name"}),(0,ka.jsx)(V,{id:"name",value:r.name,onChange:d=>p("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"description",children:"Description"}),(0,ka.jsx)(ge,{id:"description",value:r.description,onChange:d=>p("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"Color"}),(0,ka.jsx)("div",{className:"flex gap-2 flex-wrap",children:n.map(d=>(0,ka.jsx)("button",{type:"button",onClick:()=>p("color",d),className:`ka-8 h-8 rounded-full ${d} ${r.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,ka.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"Confidence"}),(0,ka.jsxs)(we,{value:r.confidence,onValueChange:d=>p("confidence",d),children:[(0,ka.jsx)(xe,{children:(0,ka.jsx)(He,{})}),(0,ka.jsx)(ye,{children:c.map(d=>(0,ka.jsx)(Y,{value:d.value,children:d.label},d.value))})]})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"Phase"}),(0,ka.jsxs)(we,{value:r.phase.toString(),onValueChange:d=>p("phase",parseInt(d)),children:[(0,ka.jsx)(xe,{children:(0,ka.jsx)(He,{})}),(0,ka.jsx)(ye,{children:l.map(d=>(0,ka.jsx)(Y,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,ka.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"Start Date"}),(0,ka.jsx)(V,{type:"date",value:r.startDate,onChange:d=>p("startDate",d.target.value)})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"End Date"}),(0,ka.jsx)(V,{type:"date",value:r.endDate,onChange:d=>p("endDate",d.target.value)})]})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"Progress (%)"}),(0,ka.jsx)(V,{type:"number",min:"0",max:"100",value:r.progress,onChange:d=>p("progress",parseInt(d.target.value)||0)})]}),(0,ka.jsxs)(Nt,{children:[(0,ka.jsx)(D,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,ka.jsx)(D,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};function ir(e,t){let[a,r]=(0,ce.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),i=n=>{try{r(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,ce.useEffect)(()=>{i(a)},[]),[a,i]}var Mt=require("react-icons/fa");function et({title:e,description:t,badge:a,primaryAction:r,secondaryAction:i,gradient:n,children:c,className:l}){let[u,p]=ir(`hero-section-minimized-${e.replace(/\ka+/g,"-").toLowerCase()}`,!i&&!t),d=!i&&!t||u;return(0,ka.jsxs)(Aa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${l||""}`,children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,ka.jsx)(q,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,ka.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,ka.jsxs)("div",{className:"flex items-center gap-3",children:[d&&r&&(0,ka.jsx)(D,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(i||t)&&(0,ka.jsx)("button",{"aria-label":u?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!u),style:{lineHeight:0},children:u?(0,ka.jsx)(Mt.FaChevronDown,{size:22}):(0,ka.jsx)(Mt.FaChevronUp,{size:22})})]})]}),!d&&(0,ka.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,ka.jsxs)("div",{className:"space-y-4",children:[(0,ka.jsx)("p",{className:"max-ka-[600px] text-white/80",children:t}),(0,ka.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,ka.jsx)(D,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),i&&(0,ka.jsx)(D,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),c&&(0,ka.jsx)("div",{className:"hidden lg:block",children:c})]})]})}var co=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:r=[],initialColleagues:i=[],initialProjects:n=[],onAddTask:c,onUpdateTask:l,onDeleteTask:u,onTaskClick:p,onAddEpic:d,onAddComment:g})=>{let[P,C]=(0,ce.useState)(e),[h,L]=(0,ce.useState)(t),[b,f]=(0,ce.useState)(a),[B,$]=(0,ce.useState)(!1),[W,S]=(0,ce.useState)(!1),[G,ae]=(0,ce.useState)(null),[re,Se]=(0,ce.useState)(null),[U,me]=(0,ce.useState)(r),[I,T]=(0,ce.useState)(i),[H,Pe]=(0,ce.useState)(0),ie=(0,ce.useRef)(null),X=(0,ce.useRef)(null),$e=h.filter(R=>!0).map(R=>R.id),Ke=b.find(R=>R.isSelected);$e.push(0),(0,ce.useEffect)(()=>{C(e)},[e]),(0,ce.useEffect)(()=>{L(t)},[t]),(0,ce.useEffect)(()=>{f(a)},[a]),(0,ce.useEffect)(()=>{let R=()=>{if(ie.current){let be=ie.current.offsetHeight;Pe(be)}};R();let _=new ResizeObserver(R);ie.current&&_.observe(ie.current);let K=()=>{setTimeout(R,100)};return window.addEventListener("storage",K),()=>{_.disconnect(),window.removeEventListener("storage",K)}},[]),(0,ce.useEffect)(()=>{let R=setTimeout(()=>{ie.current&&Pe(ie.current.offsetHeight)},300);return()=>clearTimeout(R)},[B,W]);let tt=P.filter(R=>!0),Ce=R=>tt.filter(_=>_.status===R),Ct=R=>{let _={};return h.forEach(K=>{_[K.id]=R.filter(be=>fe(be.epic)===K.id)}),_["no-epic"]=R.filter(K=>!fe(K.epic)),_},Ue=R=>{Se(R)},Ft=R=>{re&&(C(_=>_.map(K=>K.id===re.id?{...K,status:R}:K)),l?.(re.id.toString(),{status:R}),Se(null))},St=R=>{let _={...R,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};C(K=>[...K,_]),c?.(R)},dt=async(R,_)=>{if(C(be=>be.map(De=>De.id===Number(R)?{...De,..._}:De)),l)return await l(R,_);let K=P.find(be=>be.id===Number(R));if(!K)throw new Error("Task not found");return{...K,..._}},Ht=async R=>{C(_=>_.filter(K=>K.id!==Number(R))),G?.id===Number(R)&&ae(null),u&&await u(R)},Dt=R=>{let _={...R,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};L(K=>[...K,_]),d?.(R)},kt=R=>{ae(R),p?.(R)},Vt=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],$t=H>0?`calc(100vh - ${H+120}px)`:"calc(100vh - 12rem)";return(0,ka.jsxs)("div",{ref:X,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,ka.jsx)("div",{ref:ie,className:"flex-shrink-0",children:(0,ka.jsx)(et,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>$(!0)},secondaryAction:{label:"Add epic",onClick:()=>S(!0)}})}),(0,ka.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,ka.jsx)("div",{className:"h-full",style:{height:H>0?`calc(100vh - ${H+120}px)`:"calc(100vh - 12rem)"},children:(0,ka.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Vt.map(R=>{let _=Ce(R.status),K=Ct(_);return(0,ka.jsxs)(Ba,{title:R.title,status:R.status,taskCount:_.length,onDrop:Ft,isCompact:R.status==="done",height:$t,children:[K["no-epic"].map(be=>(0,ka.jsx)(xt,{epic:null,task:be,onDragStart:Ue,onTaskClick:kt,isCompact:R.status==="done"})),$e.map(be=>{let De=h.find(v=>v.id===be),m=K[be]||[];return m.length===0?null:(0,ka.jsxs)("div",{className:"mb-6",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,ka.jsx)("div",{className:`ka-3 h-3 rounded-full ${De?.color}`}),(0,ka.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:De?.name||"No Epic"}),(0,ka.jsx)(q,{variant:"secondary",className:"text-xs",children:m.length})]})," ",(0,ka.jsx)("div",{className:"space-y-3",children:m.map(v=>(0,ka.jsx)(xt,{task:v,epic:De,onDragStart:Ue,onTaskClick:kt,isCompact:R.status==="done"},v.id))})]},be)})]},R.id)})})})}),(0,ka.jsx)(Xa,{isOpen:B,onClose:()=>$(!1),onAddTask:St,assignees:[...I,...U],epics:h,sprints:b}),(0,ka.jsx)(sr,{isOpen:W,onClose:()=>S(!1),onAddEpic:Dt}),G&&(0,ka.jsx)(rr,{isOpen:!!G,onClose:()=>ae(null),initialTask:G,epics:h,sprints:b,onUpdateTask:dt,onDeleteTask:Ht,colleagues:[...I,...U],onAddComment:g})]})};var lr=require("react-day-picker");function Ot({className:e,classNames:t,showOutsideDays:a=!0,...r}){return(0,ka.jsx)(lr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:y("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-ka-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-ka-1 flex items-center",nav_button:y(Pt({variant:"outline"}),"h-7 ka-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"ka-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md ka-8 font-normal text-[0.8rem]",row:"flex ka-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:pt-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(Pt({variant:"ghost"}),"h-8 ka-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...r})}Ot.displayName="Calendar";var cr=ne(require("react")),Ge=ne(require("@radix-ui/react-popover"));var na=Ge.Root,la=Ge.Trigger;var zt=cr.forwardRef(({className:e,align:t="center",sideOffset:a=4,...r},i)=>(0,ka.jsx)(Ge.Portal,{children:(0,ka.jsx)(Ge.Content,{ref:i,align:t,sideOffset:a,className:y("pt-50 ka-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...r})}));zt.displayName=Ge.Content.displayName;var ca=require("date-fns");var pr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[r,i]=(0,ce.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),n=l=>{l.preventDefault(),!(!r.name||!r.startDate||!r.endDate)&&(a({name:r.name,description:r.description,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),i({name:"",description:"",startDate:void 0,endDate:void 0}),t())},c=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,ka.jsx)(Fe,{open:e,onOpenChange:c,children:(0,ka.jsxs)(Ee,{className:"sm:max-ka-md",children:[(0,ka.jsx)(Ie,{children:(0,ka.jsx)(Ae,{children:"Add New Sprint"})}),(0,ka.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"name",children:"Sprint Name *"}),(0,ka.jsx)(V,{id:"name",value:r.name,onChange:l=>i(u=>({...u,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{htmlFor:"description",children:"Description"}),(0,ka.jsx)(ge,{id:"description",value:r.description,onChange:l=>i(u=>({...u,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,ka.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"Start Date *"}),(0,ka.jsxs)(na,{children:[(0,ka.jsx)(la,{asChild:!0,children:(0,ka.jsxs)(D,{variant:"outline",className:y("ka-full justify-start text-left font-normal",!r.startDate&&"text-muted-foreground"),children:[(0,ka.jsx)(pt.CalendarIcon,{className:"ce-2 h-4 ka-4"}),r.startDate?(0,ca.format)(r.startDate,"PPP"):"Pick a date"]})}),(0,ka.jsx)(zt,{className:"ka-auto p-0",align:"start",children:(0,ka.jsx)(Ot,{mode:"single",selected:r.startDate,onSelect:l=>i(u=>({...u,startDate:l})),initialFocus:!0})})]})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)(k,{children:"End Date *"}),(0,ka.jsxs)(na,{children:[(0,ka.jsx)(la,{asChild:!0,children:(0,ka.jsxs)(D,{variant:"outline",className:y("ka-full justify-start text-left font-normal",!r.endDate&&"text-muted-foreground"),children:[(0,ka.jsx)(pt.CalendarIcon,{className:"ce-2 h-4 ka-4"}),r.endDate?(0,ca.format)(r.endDate,"PPP"):"Pick a date"]})}),(0,ka.jsx)(zt,{className:"ka-auto p-0",align:"start",children:(0,ka.jsx)(Ot,{mode:"single",selected:r.endDate,onSelect:l=>i(u=>({...u,endDate:l})),initialFocus:!0,disabled:l=>r.startDate?l<r.startDate:!1})})]})]})]}),(0,ka.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,ka.jsx)(D,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,ka.jsx)(D,{type:"submit",disabled:!r.name||!r.startDate||!r.endDate,children:"Add Sprint"})]})]})]})})};var mo=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddSprint:n,onUpdateSprint:c,onDeleteSprint:l})=>{let[u,p]=(0,ce.useState)([]),[d,g]=(0,ce.useState)(new Set),[P,C]=(0,ce.useState)(null),[h,L]=(0,ce.useState)(!1),[b,f]=(0,ce.useState)(null),[B,$]=(0,ce.useState)(null),[W,S]=(0,ce.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[G,ae]=(0,ce.useState)([]),[re,Se]=(0,ce.useState)("upcoming"),[U,me]=(0,ce.useState)(!1),[I,T]=(0,ce.useState)(0),H=(0,ce.useRef)(null),Pe=(0,ce.useRef)(null);(0,ce.useEffect)(()=>{let m=()=>{H.current&&T(H.current.offsetHeight)};m();let v=new ResizeObserver(m);return H.current&&v.observe(H.current),()=>v.disconnect()},[]);let ie=m=>t.find(v=>v.id===Number(m)),X=m=>a.find(v=>v.id===Number(m)),$e=m=>{let v={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return v[m]||v.medium},Ke=m=>{if(!m||m?.length===0)return"";let v=m?.trim().split(" ");if(v?.length===1)return v[0];let F=v[0],j=v[v.length-1][0].toUpperCase();return`${F} ${j}`},tt=m=>{let v={},F=[];return m.forEach(j=>{j.epic?(v[fe(j.epic)]||(v[fe(j.epic)]=[]),v[fe(j.epic)].push(j)):F.push(j)}),{tasksByEpic:v,unassignedTasks:F}};(0,ce.useEffect)(()=>{ae(a)},[a]);let Ce=G.filter(m=>{switch(re){default:return!0}}),Ct=G.filter(m=>u.includes(m.id.toString())),Ue=e.filter(m=>!m.sprint||m.status==="backlog"),Ft=Ue.reduce((m,v)=>m+(v.storyPoints||0),0),St=m=>{p(v=>v.includes(m)?v.filter(F=>F!==m):v?.length<3?[...v,m]:v)},dt=m=>{g(v=>{let F=new Set(v);return F.has(m)?F.delete(m):F.add(m),F})},Ht=m=>{n(m),L(!1)},Dt=m=>{$(m.id.toString()),S({name:m.name,description:m.description||"",startDate:m.startDate?new Date(m.startDate).toISOString().split("T")[0]:m.startDate,endDate:m.endDate?new Date(m.endDate).toISOString().split("T")[0]:m.endDate,isActive:!1})},kt=()=>{B&&(c(B,{name:W.name,description:W.description,startDate:W.startDate,endDate:W.endDate}),ae(m=>m.map(v=>(v.id===Number(B)&&(v.name=W.name,v.description=W.description,v.startDate=W.startDate,v.endDate=W.endDate),v))),$(null))},Vt=()=>{$(null),S({name:"",description:"",startDate:"",endDate:"",isActive:!1})},$t=(m,v)=>{C(v),m.dataTransfer.effectAllowed="move"},R=m=>{m.preventDefault(),m.dataTransfer.dropEffect="move"},_=m=>{f(m)},K=()=>{f(null)},be=(m,v)=>{if(m.preventDefault(),f(null),!P)return;(fe(P.sprint)||void 0)!==Number(v)&&r(P.id.toString(),{sprint:Number(v)}),C(null)},De=({task:m,showSprint:v=!1})=>{let F=m.epic?ie(fe(m.epic).toString()):null,j=m.sprint?X(fe(m.sprint).toString()):null;return(0,ka.jsx)(Q,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:ke=>{ke.dataTransfer.effectAllowed="move",ke.dataTransfer.setData("text/plain",m.id.toString()),$t(ke,m)},onClick:ke=>{P===null&&i(m)},style:{userSelect:"none"},children:(0,ka.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,ka.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,ka.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:m.name}),(0,ka.jsx)(q,{className:`text-xs ${$e(m.priority||"medium")}`,children:m.priority?.[0]?.toUpperCase()})]}),(0,ka.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-1",children:[F&&(0,ka.jsx)("div",{className:`ka-2 h-2 rounded-full ${F.color}`}),(0,ka.jsx)("span",{className:"text-muted-foreground truncate",children:F?.name})]}),(0,ka.jsx)("span",{className:"text-muted-foreground",children:Ke(m.assignee?.value?.name)})]}),v&&j&&(0,ka.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ka.jsx)(pt.Calendar,{className:"h-3 ka-3"}),(0,ka.jsx)("span",{children:j.name})]})]})})};return(0,ka.jsxs)("div",{ref:Pe,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,ka.jsx)("div",{ref:H,className:"flex-shrink-0",children:(0,ka.jsx)(et,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>L(!0)}})}),(0,ka.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,ka.jsxs)("div",{className:"h-full",style:{height:I>0?`calc(100vh - ${I+120}px)`:"calc(100vh - 12rem)"},children:[(0,ka.jsxs)("div",{className:"mb-4",children:[(0,ka.jsx)(Q,{className:"p-3 bg-card shadow-sm",children:(0,ka.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ka.jsxs)("div",{children:[(0,ka.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,ka.jsxs)("p",{className:"text-xs text-muted-foreground",children:[u?.length,"/3 selected"]})]}),u?.length>0&&(0,ka.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ka.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,ka.jsx)("div",{className:"flex flex-wrap gap-1",children:Ct.map(m=>(0,ka.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,ka.jsx)("span",{className:"max-ka-[80px] truncate",children:m.name}),(0,ka.jsx)("button",{onClick:()=>St(m.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,ka.jsx)(pt.X,{className:"h-4 ka-4"})})]},m.id))})]})]}),(0,ka.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ka.jsxs)(D,{onClick:()=>L(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,ka.jsx)(pt.Plus,{className:"h-3 ka-3"}),"Add"]}),(0,ka.jsxs)(D,{onClick:()=>me(!U),variant:"outline",size:"sm",className:"gap-1",children:[(0,ka.jsx)(pt.Calendar,{className:"h-3 ka-3"}),U?"Close":"Select"]})]})]})}),U&&(0,ka.jsx)("div",{className:"fixed inset-0 bg-black/20 pt-[5]",onClick:()=>me(!1)}),(0,ka.jsx)("div",{className:`fixed top-0 right-0 h-full ka-80 bg-background border-l shadow-xl pt-10 transition-all duration-300 ease-in-out ${U?"translate-ka-0 opacity-100 visible":"translate-ka-full opacity-0 invisible"}`,children:(0,ka.jsxs)(Q,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,ka.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ka.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,ka.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>me(!1),className:"h-8 ka-8 p-0",children:(0,ka.jsx)(pt.X,{className:"h-4 ka-4"})})]}),(0,ka.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,ka.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,ka.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(m=>(0,ka.jsxs)(D,{variant:re===m.key?"default":"outline",size:"sm",onClick:()=>Se(m.key),className:"text-xs h-8 px-3 flex-1",children:[m.label," (",m.count,")"]},m.key))}),(0,ka.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:Ce.length>0?Ce.map(m=>{let v=u.includes(m.id.toString()),F=e.filter(he=>fe(he.sprint)===m.id).length,j=!v&&u.length<3;return(0,ka.jsx)("div",{className:`p-3 rounded-lg border transition-all ${v?"bg-primary/10 border-primary/30":j?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:B===m.id.toString()?(0,ka.jsxs)("div",{className:"space-y-3",children:[(0,ka.jsx)(V,{value:W.name,onChange:he=>S(Ne=>({...Ne,name:he.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,ka.jsx)(ge,{value:W.description,onChange:he=>S(Ne=>({...Ne,description:he.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,ka.jsxs)("div",{className:"flex gap-2",children:[(0,ka.jsxs)(D,{size:"sm",onClick:()=>kt(),className:"flex-1",children:[(0,ka.jsx)(pt.Check,{className:"h-3 ka-3 ce-1"}),"Save"]}),(0,ka.jsxs)(D,{size:"sm",variant:"outline",onClick:Vt,className:"flex-1",children:[(0,ka.jsx)(pt.X,{className:"h-3 ka-3 ce-1"}),"Cancel"]})]})]}):(0,ka.jsxs)("div",{children:[(0,ka.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ka.jsxs)("div",{className:"flex-1 min-ka-0",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ka.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:m.name}),(0,ka.jsx)(q,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,ka.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:m.description}),(0,ka.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,ka.jsxs)("span",{className:"flex items-center gap-1",children:[(0,ka.jsx)(pt.CalendarDays,{className:"h-3 ka-3"}),new Date(m.startDate).toLocaleDateString()]}),(0,ka.jsxs)("span",{className:"flex items-center gap-1",children:[(0,ka.jsx)(pt.User,{className:"h-3 ka-3"}),F," tasks"]})]})]}),(0,ka.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,ka.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>Dt(m),className:"h-6 ka-6 p-0",children:(0,ka.jsx)(pt.Edit2,{className:"h-3 ka-3"})}),(0,ka.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>l(m.id.toString()),className:"h-6 ka-6 p-0 text-destructive hover:text-destructive",children:(0,ka.jsx)(pt.Trash2,{className:"h-3 ka-3"})})]})]}),(0,ka.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,ka.jsx)(D,{variant:v?"default":"outline",size:"sm",className:"text-xs ka-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>St(m.id.toString()),disabled:!v&&u?.length>=3,children:(0,ka.jsx)("span",{className:"pointer-events-none select-none",children:v?"Deselect":u?.length>=3?"Limit Reached":"Select"})})})]})},m.id)}):(0,ka.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,ka.jsx)(pt.Calendar,{className:"h-8 ka-8 mx-auto mb-2 opacity-50"}),(0,ka.jsxs)("p",{className:"text-sm",children:['No sprints found for "',re,'" filter']}),(0,ka.jsx)(D,{variant:"link",size:"sm",onClick:()=>Se("all"),className:"text-xs",children:"Show all sprints"})]})}),u?.length===0&&(0,ka.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,ka.jsxs)("div",{className:"text-center",children:[(0,ka.jsx)(pt.Calendar,{className:"h-6 ka-6 mx-auto mb-2 text-muted-foreground"}),(0,ka.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,ka.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,ka.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,ka.jsx)("div",{className:"lg:col-span-1",children:(0,ka.jsxs)(Q,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:R,onDragEnter:()=>_("backlog"),onDragLeave:K,onDrop:m=>be(m,"backlog"),style:{height:I>0?`calc(100vh - ${I+200}px)`:"calc(100vh - 16rem)"},children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,ka.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,ka.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ka.jsxs)(q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[Ue?.length," tasks"]}),(0,ka.jsxs)(q,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[Ft," pts"]})]})]}),(0,ka.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${b==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:m,unassignedTasks:v}=tt(Ue);return(0,ka.jsxs)(ka.Fragment,{children:[Object.entries(m).map(([F,j])=>{let he=ie(F);if(!he)return null;let Ne=d.has(F);return(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>dt(F),children:[(0,ka.jsx)("div",{className:`ka-3 h-3 rounded-full ${he.color}`}),(0,ka.jsx)("span",{className:"font-medium text-muted-foreground",children:he.name}),(0,ka.jsxs)("span",{className:"text-muted-foreground",children:["(",j?.length,")"]}),(0,ka.jsx)("div",{className:"ml-auto",children:Ne?(0,ka.jsx)(pt.ChevronDown,{className:"h-3 ka-3 text-muted-foreground"}):(0,ka.jsx)(pt.ChevronUp,{className:"h-3 ka-3 text-muted-foreground"})})]}),!Ne&&(0,ka.jsx)("div",{className:"space-y-2 pl-2",children:j.map(ke=>(0,ka.jsx)(De,{task:ke},ke.id))})]},F)}),v?.length>0&&(()=>{let F=d.has("no-epic");return(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>dt("no-epic"),children:[(0,ka.jsx)("div",{className:"ka-3 h-3 rounded-full bg-gray-400"}),(0,ka.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,ka.jsxs)("span",{className:"text-muted-foreground",children:["(",v?.length,")"]}),(0,ka.jsx)("div",{className:"ml-auto",children:F?(0,ka.jsx)(pt.ChevronDown,{className:"h-3 ka-3 text-muted-foreground"}):(0,ka.jsx)(pt.ChevronUp,{className:"h-3 ka-3 text-muted-foreground"})})]}),!F&&(0,ka.jsx)("div",{className:"space-y-2 pl-2",children:v?.map(j=>(0,ka.jsx)(De,{task:j},j.id))})]})})(),Ue?.length===0&&(0,ka.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),Ue?.length>0&&Object.keys(m).length===0&&v.length===0&&(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),Ue?.map(F=>(0,ka.jsx)(De,{task:F},F.id))]})]})})()})]})}),Ct.map(m=>{let v=e.filter(j=>fe(j?.sprint)===m.id),F=v.reduce((j,he)=>j+(he?.storyPoints||0),0);return(0,ka.jsxs)(Q,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:R,onDragEnter:()=>_(m.id.toString()),onDragLeave:K,onDrop:j=>be(j,m.id.toString()),style:{height:I>0?`calc(100vh - ${I+200}px)`:"calc(100vh - 16rem)"},children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,ka.jsx)("div",{children:(0,ka.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:m.name})}),(0,ka.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ka.jsxs)(q,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[v?.length," tasks"]}),(0,ka.jsxs)(q,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[F," pts"]}),(0,ka.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>{me(!0),Dt(m)},className:"h-6 px-2",children:(0,ka.jsx)(pt.Edit2,{className:"h-3 ka-3"})}),(0,ka.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>l(m.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,ka.jsx)(pt.Trash2,{className:"h-3 ka-3"})})]})]}),(0,ka.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:j,unassignedTasks:he}=tt(v);return(0,ka.jsxs)(ka.Fragment,{children:[Object.entries(j).map(([Ne,ke])=>{let Gt=ie(Ne);if(!Gt)return null;let ua=d.has(Ne);return(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>dt(Ne),children:[(0,ka.jsx)("div",{className:`ka-3 h-3 rounded-full ${Gt.color}`}),(0,ka.jsx)("span",{className:"font-medium text-muted-foreground",children:Gt.name}),(0,ka.jsxs)("span",{className:"text-muted-foreground",children:["(",ke?.length,")"]}),(0,ka.jsx)("div",{className:"ml-auto",children:ua?(0,ka.jsx)(pt.ChevronDown,{className:"h-3 ka-3 text-muted-foreground"}):(0,ka.jsx)(pt.ChevronUp,{className:"h-3 ka-3 text-muted-foreground"})})]}),!ua&&(0,ka.jsx)("div",{className:"space-y-2 pl-2",children:ke?.map(ga=>(0,ka.jsx)(De,{task:ga},ga.id))})]},Ne)}),he?.length>0&&(()=>{let Ne=d.has("no-epic");return(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>dt("no-epic"),children:[(0,ka.jsx)("div",{className:"ka-3 h-3 rounded-full bg-gray-400"}),(0,ka.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,ka.jsxs)("span",{className:"text-muted-foreground",children:["(",he?.length,")"]}),(0,ka.jsx)("div",{className:"ml-auto",children:Ne?(0,ka.jsx)(pt.ChevronDown,{className:"h-3 ka-3 text-muted-foreground"}):(0,ka.jsx)(pt.ChevronUp,{className:"h-3 ka-3 text-muted-foreground"})})]}),!Ne&&(0,ka.jsx)("div",{className:"space-y-2 pl-2",children:he?.map(ke=>(0,ka.jsx)(De,{task:ke},ke.id))})]})})(),v?.length===0&&(0,ka.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},m.id)})]}),(0,ka.jsx)(pr,{isOpen:h,onClose:()=>L(!1),onAddSprint:Ht})]})})]})};var po=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),uo=e=>{let[t,a]=e.split(":"),r=new Date;return r.setHours(parseInt(t),parseInt(a)),r.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},ma=(e,t)=>{let a=new Date,r=new Date(e);if(t){let[i,n]=t.split(":");r.setHours(parseInt(i),parseInt(n))}return r<a},pa=e=>{let t=new Date;return e.toDateString()===t.toDateString()},go=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},fo=({colleagues:e,onAddReminder:t,open:a,setOpen:r})=>{let[i,n]=(0,ce.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,l]=(0,ce.useState)(!1),u=d=>{if(d.preventDefault(),!e.find(C=>C?.id.toString()===i.colleagueId.toString())){console.error("No valid colleague selected"),l(!0);return}l(!1);let P={title:i.title,description:i.description,dueDate:new Date(i.dueDate).toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring,assignedColleague:Number(i.colleagueId),project:1,updatedAt:new Date().toISOString()};t(P),r(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ce.useEffect)(()=>{i.colleagueId&&l(!1)},[i.colleagueId]);let p=e.filter(Boolean);return(0,ka.jsx)(Fe,{open:a,onOpenChange:r,children:(0,ka.jsxs)(Ee,{className:"max-ka-2xl",children:[(0,ka.jsx)(Ie,{children:(0,ka.jsx)(Ae,{children:"Add New Reminder"})}),(0,ka.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,ka.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"title",children:"Title"}),(0,ka.jsx)(V,{id:"title",value:i.title,onChange:d=>n({...i,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"description",children:"Description"}),(0,ka.jsx)(ge,{id:"description",value:i.description,onChange:d=>n({...i,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,ka.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"dueDate",children:"Due Date"}),(0,ka.jsx)(V,{id:"dueDate",type:"date",value:i.dueDate,onChange:d=>n({...i,dueDate:d.target.value}),required:!0})]}),(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,ka.jsx)(V,{id:"dueTime",type:"time",value:i.dueTime,onChange:d=>n({...i,dueTime:d.target.value})})]})]}),(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,ka.jsxs)(we,{value:i.colleagueId,onValueChange:d=>{n({...i,colleagueId:d})},required:!0,children:[(0,ka.jsx)(xe,{className:`${c?"text-destructive border-red-500":""}`,children:(0,ka.jsx)(He,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,ka.jsx)(ye,{children:p.map(d=>(0,ka.jsx)(Y,{value:d.id.toString(),children:d.name},d.id))})]}),c&&(0,ka.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,ka.jsxs)("div",{className:"space-y-2",children:[(0,ka.jsxs)("div",{className:"flex items-center space-ka-2",children:[(0,ka.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:d=>n({...i,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,ka.jsx)(k,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,ka.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,ka.jsxs)(we,{value:i.recurrencePattern,onValueChange:d=>n({...i,recurrencePattern:d}),children:[(0,ka.jsx)(xe,{children:(0,ka.jsx)(He,{})}),(0,ka.jsxs)(ye,{children:[(0,ka.jsx)(Y,{value:"daily",children:"Daily"}),(0,ka.jsx)(Y,{value:"weekly",children:"Weekly"}),(0,ka.jsx)(Y,{value:"monthly",children:"Monthly"}),(0,ka.jsx)(Y,{value:"yearly",children:"Yearly"})]})]})]}),(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"recurrenceInterval",children:"Every"}),(0,ka.jsx)(V,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:d=>n({...i,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,ka.jsxs)("div",{className:"flex justify-end space-ka-2",children:[(0,ka.jsx)(D,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),(0,ka.jsx)(D,{type:"submit",children:"Add Reminder"})]})]})]})})},vo=({reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:i})=>{let[n,c]=(0,ce.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),l=p=>{p.preventDefault(),a(e.id.toString(),{title:n.title,description:n.description,dueDate:new Date(n.dueDate||"").toISOString(),dueTime:n.dueTime||void 0,isRecurring:n.isRecurring}),i()},u=t.filter(Boolean);return(0,ka.jsx)(Fe,{open:r,onOpenChange:i,children:(0,ka.jsxs)(Ee,{className:"max-ka-2xl",children:[(0,ka.jsx)(Ie,{children:(0,ka.jsx)(Ae,{children:"Edit Reminder"})}),(0,ka.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,ka.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"edit-title",children:"Title"}),(0,ka.jsx)(V,{id:"edit-title",value:n.title,onChange:p=>c({...n,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"edit-description",children:"Description"}),(0,ka.jsx)(ge,{id:"edit-description",value:n.description||"",onChange:p=>c({...n,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,ka.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,ka.jsx)(V,{id:"edit-dueDate",type:"date",value:n.dueDate,onChange:p=>c({...n,dueDate:p.target.value}),required:!0})]}),(0,ka.jsxs)("div",{children:[(0,ka.jsx)(k,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,ka.jsx)(V,{id:"edit-dueTime",type:"time",value:n.dueTime,onChange:p=>c({...n,dueTime:p.target.value})})]})]}),(0,ka.jsx)("div",{className:"space-y-2",children:(0,ka.jsxs)("div",{className:"flex items-center space-ka-2",children:[(0,ka.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:n.isRecurring||!1,onChange:p=>c({...n,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,ka.jsx)(k,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,ka.jsxs)("div",{className:"flex justify-end space-ka-2",children:[(0,ka.jsx)(D,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,ka.jsx)(D,{type:"submit",children:"Save Changes"})]})]})]})})},bo=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:r})=>{let[i,n]=(0,ce.useState)(!1);if(!e||!e.id)return null;let c=ma(new Date(e.dueDate||""),e.dueTime||""),l=pa(new Date(e.dueDate||"")),u=go(new Date(e.dueDate||"")),p=()=>{a(e.id.toString(),{})},d=()=>l?"Today":u?"Tomorrow":po(new Date(e.dueDate||""));return(0,ka.jsxs)(ka.Fragment,{children:[(0,ka.jsx)(vo,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>n(!1)}),(0,ka.jsx)(Q,{children:(0,ka.jsx)(bt,{className:"p-4",children:(0,ka.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ka.jsxs)("div",{className:"flex items-start space-ka-3 flex-1",children:[(0,ka.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80"}),(0,ka.jsxs)("div",{className:"flex-1",children:[(0,ka.jsx)("div",{className:"flex items-center space-ka-2 mb-1",children:(0,ka.jsx)("h3",{children:e.title})}),(0,ka.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,ka.jsxs)("div",{className:"flex items-center space-ka-4 text-sm text-muted-foreground",children:[(0,ka.jsx)("div",{className:"flex items-center space-ka-1",children:(0,ka.jsx)(pt.Calendar,{className:"h-4 ka-4"})}),e.dueTime&&(0,ka.jsxs)("div",{className:"flex items-center space-ka-1",children:[(0,ka.jsx)(pt.Clock,{className:"h-4 ka-4"}),(0,ka.jsx)("span",{children:uo(e.dueTime)})]}),(0,ka.jsx)("div",{className:"flex items-center space-ka-1",children:(0,ka.jsx)(pt.User,{className:"h-4 ka-4"})})]})]})]}),(0,ka.jsxs)("div",{className:"flex items-center space-ka-1",children:[(0,ka.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>n(!0),className:"h-8 ka-8 p-0",children:(0,ka.jsx)(pt.Edit2,{className:"h-4 ka-4"})}),(0,ka.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>r(e.id.toString()),className:"h-8 ka-8 p-0 text-destructive hover:text-destructive/80",children:(0,ka.jsx)(pt.Trash2,{className:"h-4 ka-4"})})]})]})})})]})},ho=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:r,onDeleteReminder:i})=>{let[n,c]=(0,ce.useState)(e.filter(Boolean)),[l]=(0,ce.useState)(t.filter(Boolean)),[u,p]=(0,ce.useState)("all"),[d,g]=(0,ce.useState)(""),[P,C]=(0,ce.useState)(!1),h=S=>{if(!S.title){console.error("Invalid reminder data:",S);return}let G={...S,id:Date.now(),createdAt:new Date().toISOString()};c(ae=>[...ae,G]),a?.(S)},L=(S,G)=>{if(!S){console.error("No reminder ID provided for update");return}c(ae=>ae.map(re=>re?.id.toString()===S?{...re,...G}:re)),r?.(S,G)},b=S=>{if(!S){console.error("No reminder ID provided for deletion");return}c(G=>G.filter(ae=>ae?.id.toString()!==S)),i?.(S)},B=n.filter(S=>{if(!S)return!1;if(d){let G=d.toLowerCase();if(!(S.title.toLowerCase().includes(G)||S.description?.toLowerCase().includes(G)))return!1}switch(u){case"pending":case"completed":case"overdue":return ma(new Date(S.dueDate||""),S.dueTime||"");case"today":return pa(new Date(S.dueDate||""));default:return!0}}).sort((S,G)=>{if(!S||!G)return 0;let ae={high:3,medium:2,low:1},re=0;return re!==0?re:new Date(S.dueDate||"").getTime()-new Date(G.dueDate||"").getTime()}),$={total:n.filter(Boolean).length,overdue:n.filter(S=>S&&ma(new Date(S.dueDate||""),S.dueTime||"")).length,today:n.filter(S=>S&&pa(new Date(S.dueDate||""))).length},W=l.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,ka.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ka.jsx)(et,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{C(!0)}}}),(0,ka.jsxs)("div",{className:"h-full bg-background",children:[(0,ka.jsx)(fo,{colleagues:l,onAddReminder:h,open:P,setOpen:C}),(0,ka.jsxs)("div",{className:"p-6",children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,ka.jsxs)("div",{children:[(0,ka.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,ka.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,ka.jsxs)(D,{className:"flex items-center space-ka-2",onClick:()=>C(!0),children:[(0,ka.jsx)(pt.Plus,{className:"h-4 ka-4"}),(0,ka.jsx)("span",{children:"Add Reminder"})]})]}),(0,ka.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,ka.jsxs)(Q,{className:"p-4",children:[(0,ka.jsx)("div",{className:"text-2xl font-bold text-foreground",children:$.total}),(0,ka.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,ka.jsxs)(Q,{className:"p-4",children:[(0,ka.jsx)("div",{className:"text-2xl font-bold text-primary",children:$.overdue}),(0,ka.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,ka.jsxs)(Q,{className:"p-4",children:[(0,ka.jsx)("div",{className:"text-2xl font-bold text-success",children:$.today}),(0,ka.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,ka.jsxs)(Q,{className:"p-4",children:[(0,ka.jsx)("div",{className:"text-2xl font-bold text-destructive",children:$.overdue}),(0,ka.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,ka.jsxs)(Q,{className:"p-4",children:[(0,ka.jsx)("div",{className:"text-2xl font-bold text-warning",children:$.today}),(0,ka.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,ka.jsxs)("div",{className:"flex items-center space-ka-4 mb-6",children:[(0,ka.jsx)("div",{className:"flex-1",children:(0,ka.jsx)(V,{placeholder:"Search reminders...",value:d,onChange:S=>g(S.target.value),className:"max-ka-md"})}),(0,ka.jsxs)(we,{value:u,onValueChange:S=>p(S),children:[(0,ka.jsx)(xe,{className:"ka-40",children:(0,ka.jsx)(He,{})}),(0,ka.jsxs)(ye,{children:[(0,ka.jsxs)(Y,{value:"all",children:["All (",$.total,")"]}),(0,ka.jsxs)(Y,{value:"overdue",children:["Overdue (",$.overdue,")"]}),(0,ka.jsxs)(Y,{value:"overdue",children:["Overdue (",$.overdue,")"]}),(0,ka.jsxs)(Y,{value:"today",children:["Today (",$.today,")"]})]})]})]}),(0,ka.jsx)("div",{className:"space-y-4",children:B.length===0?(0,ka.jsxs)(Q,{className:"p-8 text-center",children:[(0,ka.jsx)("div",{className:"text-muted-foreground",children:d||u!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&u==="all"&&(0,ka.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):B.map(S=>S&&(0,ka.jsx)(bo,{reminder:S,colleagues:l,onUpdateReminder:L,onDeleteReminder:b},S.id))})]})]})]})};var xo=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddTaskToEpic:n,onAddEpic:c,onUpdateEpic:l,onDeleteEpic:u})=>{let[p,d]=(0,ce.useState)(null),[g,P]=(0,ce.useState)(null),[C,h]=(0,ce.useState)({}),[L,b]=(0,ce.useState)(0),f=(0,ce.useRef)(null),B=(0,ce.useRef)(null);(0,ce.useEffect)(()=>{let T=()=>{if(f.current){let ie=f.current.offsetHeight;b(ie)}};T();let H=new ResizeObserver(T);f.current&&H.observe(f.current);let Pe=()=>{setTimeout(T,100)};return window.addEventListener("storage",Pe),()=>{H.disconnect(),window.removeEventListener("storage",Pe)}},[]),(0,ce.useEffect)(()=>{let T=setTimeout(()=>{f.current&&b(f.current.offsetHeight)},300);return()=>clearTimeout(T)},[g]);let $=T=>{d(T)},W=T=>{T.preventDefault()},S=(T,H)=>{T.preventDefault(),p&&fe(p.epic).toString()!==H&&(r(p.id.toString(),{epic:Number(H)}),d(null))},G=T=>e.filter(H=>fe(H.epic).toString()===T),ae=T=>{P(T.id.toString()),h({name:T.name,description:T.description,confidence:T.confidence,phase:T.phase})},re=()=>{g&&C.name&&(l(g.toString(),C),P(null),h({}))},Se=()=>{P(null),h({})},U=T=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&u(T)},me=T=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[T]||`Phase ${T}`,I=T=>{switch(T){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,ka.jsxs)("div",{ref:B,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,ka.jsx)("div",{ref:f,className:"flex-shrink-0",children:(0,ka.jsx)(et,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:c}})}),(0,ka.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,ka.jsx)("div",{className:"h-full overflow-y-auto",style:{height:L>0?`calc(100vh - ${L+120}px)`:"calc(100vh - 12rem)"},children:(0,ka.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:t.map(T=>{let H=G(T.id.toString()),Pe=H.reduce((X,$e)=>X+($e.storyPoints||0),0),ie=L>0?`calc(100vh - ${L+200}px)`:"calc(100vh - 14rem)";return(0,ka.jsxs)(Q,{className:`flex flex-col ${g===T.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:g===T.id.toString()?"auto":ie,minHeight:"400px"},onDragOver:W,onDrop:X=>S(X,T.id.toString()),children:[(0,ka.jsx)("div",{className:"p-4 border-b border-border",children:g===T.id.toString()?(0,ka.jsxs)("div",{className:"space-y-4",children:[(0,ka.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ka.jsx)(V,{value:C.name||"",onChange:X=>h({...C,name:X.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,ka.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,ka.jsx)(D,{size:"sm",variant:"ghost",onClick:re,className:"p-1 h-8 ka-8",children:(0,ka.jsx)(pt.Check,{className:"h-4 ka-4"})}),(0,ka.jsx)(D,{size:"sm",variant:"ghost",onClick:Se,className:"p-1 h-8 ka-8",children:(0,ka.jsx)(pt.X,{className:"h-4 ka-4"})})]})]}),(0,ka.jsx)(ge,{value:C.description||"",onChange:X=>h({...C,description:X.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,ka.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,ka.jsxs)("div",{children:[(0,ka.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,ka.jsxs)("select",{value:C.confidence||T.confidence,onChange:X=>h({...C,confidence:X.target.value}),className:"flex h-8 ka-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[(0,ka.jsx)("option",{value:"low",children:"Low"}),(0,ka.jsx)("option",{value:"medium",children:"Medium"}),(0,ka.jsx)("option",{value:"high",children:"High"})]})]}),(0,ka.jsxs)("div",{children:[(0,ka.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,ka.jsx)("select",{value:C.phase?.toString()||T.phase.toString(),onChange:X=>h({...C,phase:parseInt(X.target.value)}),className:"flex h-8 ka-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[1,2,3,4,5,6,7,8,9].map(X=>(0,ka.jsxs)("option",{value:X.toString(),children:["Phase ",X]},X))})]})]})]}):(0,ka.jsxs)(ka.Fragment,{children:[(0,ka.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,ka.jsx)("div",{className:`ka-4 h-4 rounded-full ${T.color}`}),(0,ka.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:T.name}),(0,ka.jsxs)("div",{className:"flex gap-1",children:[(0,ka.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>ae(T),className:"p-1 h-8 ka-8",children:(0,ka.jsx)(pt.Edit2,{className:"h-3 ka-3"})}),(0,ka.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>U(T.id.toString()),className:"p-1 h-8 ka-8 hover:bg-destructive/10 hover:text-destructive",children:(0,ka.jsx)(pt.Trash2,{className:"h-3 ka-3"})})]})]}),(0,ka.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,ka.jsxs)(q,{className:`text-xs ${I(T.confidence)}`,children:[T.confidence," confidence"]}),(0,ka.jsxs)(q,{variant:"outline",className:"text-xs",children:["Phase ",T.phase]}),(0,ka.jsxs)(q,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[H.length," tasks"]}),(0,ka.jsxs)(q,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Pe," pts"]})]}),T.description&&(0,ka.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:T.description}),(0,ka.jsxs)(D,{onClick:()=>n(T.id.toString()),variant:"outline",size:"sm",className:"ka-full gap-2",children:[(0,ka.jsx)(pt.Plus,{className:"h-4 ka-4"}),"Add Task"]})]})}),(0,ka.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,ka.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${p?"border-primary bg-primary/10":"border-border"}`,children:H.length===0?(0,ka.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,ka.jsx)(pt.Move,{className:"h-8 ka-8 mb-2"}),(0,ka.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):H.map(X=>(0,ka.jsx)(xt,{task:X,epic:T,onDragStart:$,onTaskClick:i,isCompact:!0},X.id))})})]},T.id)})})})})]})};0&&(module.exports={DCProjectCard,EpicsView,KanbanBoardView,PlanningView,TasksView});
|
|
5
|
+
"use strict";var ur=Object.create;var Pt=Object.defineProperty;var gr=Object.getOwnPropertyDescriptor;var fr=Object.getOwnPropertyNames;var vr=Object.getPrototypeOf,br=Object.prototype.hasOwnProperty;var hr=(e,t)=>{for(var a in t)Pt(e,a,{get:t[a],enumerable:!0})},ba=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fr(t))!br.call(e,i)&&i!==a&&Pt(e,i,{get:()=>t[i],enumerable:!(r=gr(t,i))||r.enumerable});return e};var ne=(e,t,a)=>(a=e!=null?ur(vr(e)):{},ba(t||!e||!e.__esModule?Pt(a,"default",{value:e,enumerable:!0}):a,e)),xr=e=>ba(Pt({},"__esModule",{value:!0}),e);var yo={};hr(yo,{DCProjectCard:()=>Ma,EpicsView:()=>xo,KanbanBoardView:()=>co,PlanningView:()=>mo,TasksView:()=>ho});module.exports=xr(yo);var Ba=require("motion/react"),ft=require("lucide-react");var Ta=require("class-variance-authority");var ka=require("clsx");var Kt="-",yr=e=>{let t=wr(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{let l=c.split(Kt);return l[0]===""&&l.length!==1&&l.shift(),ya(l,t)||Nr(c)},getConflictingClassGroupIds:(c,l)=>{let u=a[c]||[];return l&&r[c]?[...u,...r[c]]:u}}},ya=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],r=t.nextPart.get(a),i=r?ya(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let n=e.join(Kt);return t.validators.find(({validator:c})=>c(n))?.classGroupId},ha=/^\[(.+)\]$/,Nr=e=>{if(ha.test(e)){let t=ha.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},wr=e=>{let{theme:t,prefix:a}=e,r={nextPart:new Map,validators:[]};return Sr(Object.entries(e.classGroups),a).forEach(([n,c])=>{_t(c,r,n,t)}),r},_t=(e,t,a,r)=>{e.forEach(i=>{if(typeof i=="string"){let n=i===""?t:xa(t,i);n.classGroupId=a;return}if(typeof i=="function"){if(Cr(i)){_t(i(r),t,a,r);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([n,c])=>{_t(c,xa(t,n),a,r)})})},xa=(e,t)=>{let a=e;return t.split(Kt).forEach(r=>{a.nextPart.has(r)||a.nextPart.set(r,{nextPart:new Map,validators:[]}),a=a.nextPart.get(r)}),a},Cr=e=>e.isThemeGetter,Sr=(e,t)=>t?e.map(([a,r])=>{let i=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,l])=>[t+c,l])):n);return[a,i]}):e,Dr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,r=new Map,i=(n,c)=>{a.set(n,c),t++,t>e&&(t=0,r=a,a=new Map)};return{get(n){let c=a.get(n);if(c!==void 0)return c;if((c=r.get(n))!==void 0)return i(n,c),c},set(n,c){a.has(n)?a.set(n,c):i(n,c)}}},Na="!",kr=e=>{let{separator:t,experimentalParseClassName:a}=e,r=t.length===1,i=t[0],n=t.length,c=l=>{let u=[],p=0,d=0,g;for(let v=0;v<l.length;v++){let f=l[v];if(p===0){if(f===i&&(r||l.slice(v,v+n)===t)){u.push(l.slice(d,v)),d=v+n;continue}if(f==="/"){g=v;continue}}f==="["?p++:f==="]"&&p--}let R=u.length===0?l:l.substring(d),T=R.startsWith(Na),D=T?R.substring(1):R,E=g&&g>d?g-d:void 0;return{modifiers:u,hasImportantModifier:T,baseClassName:D,maybePostfixModifierPosition:E}};return a?l=>a({className:l,parseClassName:c}):c},Tr=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(r=>{r[0]==="["?(t.push(...a.sort(),r),a=[]):a.push(r)}),t.push(...a.sort()),t},Pr=e=>({cache:Dr(e.cacheSize),parseClassName:kr(e),...yr(e)}),Rr=/\Pa+/,Er=(e,t)=>{let{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:i}=t,n=[],c=e.trim().split(Rr),l="";for(let u=c.length-1;u>=0;u-=1){let p=c[u],{modifiers:d,hasImportantModifier:g,baseClassName:R,maybePostfixModifierPosition:T}=a(p),D=!!T,E=r(D?R.substring(0,T):R);if(!E){if(!D){l=p+(l.length>0?" "+l:l);continue}if(E=r(R),!E){l=p+(l.length>0?" "+l:l);continue}D=!1}let v=Tr(d).join(":"),f=g?v+Na:v,B=f+E;if(n.includes(B))continue;n.push(B);let V=i(E,D);for(let $=0;$<V.length;++$){let C=V[$];n.push(f+C)}l=p+(l.length>0?" "+l:l)}return l};function Ar(){let e=0,t,a,r="";for(;e<arguments.length;)(t=arguments[e++])&&(a=wa(t))&&(r&&(r+=" "),r+=a);return r}var wa=e=>{if(typeof e=="string")return e;let t,a="";for(let r=0;r<e.length;r++)e[r]&&(t=wa(e[r]))&&(a&&(a+=" "),a+=t);return a};function Ir(e,...t){let a,r,i,n=c;function c(u){let p=t.reduce((d,g)=>g(d),e());return a=Pr(p),r=a.cache.get,i=a.cache.set,n=l,l(u)}function l(u){let p=r(u);if(p)return p;let d=Er(u,a);return i(u,d),d}return function(){return n(Ar.apply(null,arguments))}}var J=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ca=/^\[(?:([a-ft-]+):)?(.+)\]$/i,Lr=/^\d+\/\d+$/,Br=new Set(["px","full","screen"]),Mr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Or=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(Pa|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fr=/^(inset_)?-?((\d+)?\.?(\d+)[a-ft]+|0)_-?((\d+)?\.?(\d+)[a-ft]+|0)/,Hr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_e=e=>ut(e)||Br.has(e)||Lr.test(e),Ze=e=>gt(e,"length",Kr),ut=e=>!!e&&!Number.isNaN(Number(e)),Wt=e=>gt(e,"number",ut),ht=e=>!!e&&Number.isInteger(Number(e)),Vr=e=>e.endsWith("%")&&ut(e.slice(0,-1)),L=e=>Ca.test(e),Ye=e=>Mr.test(e),$r=new Set(["length","size","percentage"]),Gr=e=>gt(e,$r,Sa),Ur=e=>gt(e,"position",Sa),jr=new Set(["image","url"]),Wr=e=>gt(e,jr,Jr),_r=e=>gt(e,"",qr),xt=()=>!0,gt=(e,t,a)=>{let r=Ca.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):a(r[2]):!1},Kr=e=>Or.test(e)&&!zr.test(e),Sa=()=>!1,qr=e=>Fr.test(e),Jr=e=>Hr.test(e);var Xr=()=>{let e=J("colors"),t=J("spacing"),a=J("blur"),r=J("brightness"),i=J("borderColor"),n=J("borderRadius"),c=J("borderSpacing"),l=J("borderWidth"),u=J("contrast"),p=J("grayscale"),d=J("hueRotate"),g=J("invert"),R=J("gap"),T=J("gradientColorStops"),D=J("gradientColorStopPositions"),E=J("inset"),v=J("margin"),f=J("opacity"),B=J("padding"),V=J("saturate"),$=J("scale"),C=J("sepia"),H=J("skew"),ae=J("space"),re=J("translate"),me=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],ie=()=>["auto",L,t],A=()=>[L,t],ot=()=>["",_e,Ze],he=()=>["auto",ut,L],Ue=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ge=()=>["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"],$e=()=>["start","end","center","between","around","evenly","stretch"],je=()=>["","0",L],We=()=>["auto","avoid","all","avoid-page","page","left","right","column"],h=()=>[ut,L];return{cacheSize:500,separator:":",theme:{colors:[xt],spacing:[_e,Ze],blur:["none","",Ye,L],brightness:h(),borderColor:[e],borderRadius:["none","","full",Ye,L],borderSpacing:A(),borderWidth:ot(),contrast:h(),grayscale:je(),hueRotate:h(),invert:je(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[Vr,Ze],inset:ie(),margin:ie(),opacity:h(),padding:A(),saturate:h(),scale:h(),sepia:je(),skew:h(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",L]}],container:["container"],columns:[{columns:[Ye]}],"break-after":[{"break-after":We()}],"break-before":[{"break-before":We()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ue(),L]}],overflow:[{overflow:G()}],"overflow-Pa":[{"overflow-Pa":G()}],"overflow-Pa":[{"overflow-Pa":G()}],overscroll:[{overscroll:me()}],"overscroll-Pa":[{"overscroll-Pa":me()}],"overscroll-Pa":[{"overscroll-Pa":me()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-Pa":[{"inset-Pa":[E]}],"inset-Pa":[{"inset-Pa":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],ft:[{ft:["auto",ht,L]}],basis:[{basis:ie()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",L]}],grow:[{grow:je()}],shrink:[{shrink:je()}],order:[{order:["first","last","none",ht,L]}],"grid-cols":[{"grid-cols":[xt]}],"col-start-end":[{col:["auto",{span:["full",ht,L]},L]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[xt]}],"row-start-end":[{row:["auto",{span:[ht,L]},L]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",L]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",L]}],gap:[{gap:[R]}],"gap-Pa":[{"gap-Pa":[R]}],"gap-Pa":[{"gap-Pa":[R]}],"justify-content":[{justify:["normal",...$e()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$e(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$e(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],pe:[{pe:[B]}],pt:[{pt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],ce:[{ce:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-Pa":[{"space-Pa":[ae]}],"space-Pa-reverse":["space-Pa-reverse"],"space-Pa":[{"space-Pa":[ae]}],"space-Pa-reverse":["space-Pa-reverse"],Pa:[{Pa:["auto","min","max","fit","svw","lvw","dvw",L,t]}],"min-Pa":[{"min-Pa":[L,t,"min","max","fit"]}],"max-Pa":[{"max-Pa":[L,t,"none","full","min","max","fit","prose",{screen:[Ye]},Ye]}],h:[{h:[L,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[L,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[L,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[L,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ye,Ze]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wt]}],"font-family":[{font:[xt]}],"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",L]}],"line-clamp":[{"line-clamp":["none",ut,Wt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_e,L]}],"list-image":[{"list-image":["none",L]}],"list-style-type":[{list:["none","disc","decimal",L]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[f]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_e,Ze]}],"underline-offset":[{"underline-offset":["auto",_e,L]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",L]}],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",L]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[f]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ue(),Ur]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","Pa","Pa","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gr]}],"bg-image":[{bg:["none",{"gradient-to":["t","ce","r","br","b","bl","l","tl"]},Wr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[D]}],"gradient-via-pos":[{via:[D]}],"gradient-to-pos":[{to:[D]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[n]}],"rounded-Pa":[{"rounded-Pa":[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-Pa":[{"rounded-Pa":[n]}],"rounded-Pa":[{"rounded-Pa":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-ce":[{"rounded-ce":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-Pa":[{border:[l]}],"border-Pa-Pa":[{"border-Pa":[l]}],"border-Pa-Pa":[{"border-Pa":[l]}],"border-Pa-Pa":[{"border-Pa":[l]}],"border-Pa-e":[{"border-e":[l]}],"border-Pa-t":[{"border-t":[l]}],"border-Pa-r":[{"border-r":[l]}],"border-Pa-b":[{"border-b":[l]}],"border-Pa-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...ge(),"hidden"]}],"divide-Pa":[{"divide-Pa":[l]}],"divide-Pa-reverse":["divide-Pa-reverse"],"divide-Pa":[{"divide-Pa":[l]}],"divide-Pa-reverse":["divide-Pa-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:ge()}],"border-color":[{border:[i]}],"border-color-Pa":[{"border-Pa":[i]}],"border-color-Pa":[{"border-Pa":[i]}],"border-color-Pa":[{"border-Pa":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ge()]}],"outline-offset":[{"outline-offset":[_e,L]}],"outline-Pa":[{outline:[_e,Ze]}],"outline-color":[{outline:[e]}],"ring-Pa":[{ring:ot()}],"ring-Pa-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-Pa":[{"ring-offset":[_e,Ze]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ye,_r]}],"shadow-color":[{shadow:[xt]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[...Je(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Je()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ye,L]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[V]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[f]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-Pa":[{"border-spacing-Pa":[c]}],"border-spacing-Pa":[{"border-spacing-Pa":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",L]}],duration:[{duration:h()}],ease:[{ease:["linear","in","out","in-out",L]}],delay:[{delay:h()}],animate:[{animate:["none","spin","ping","pulse","bounce",L]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[$]}],"scale-Pa":[{"scale-Pa":[$]}],"scale-Pa":[{"scale-Pa":[$]}],rotate:[{rotate:[ht,L]}],"translate-Pa":[{"translate-Pa":[re]}],"translate-Pa":[{"translate-Pa":[re]}],"skew-Pa":[{"skew-Pa":[H]}],"skew-Pa":[{"skew-Pa":[H]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",L]}],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","Pa-resize","Pa-resize","ne-resize","nw-resize","Pa-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",L]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","Pa","Pa",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-ce":[{"scroll-ce":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","Pa","Pa","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-Pa":[{"touch-pan":["Pa","left","right"]}],"touch-Pa":[{"touch-pan":["Pa","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",L]}],fill:[{fill:[e,"none"]}],"stroke-Pa":[{stroke:[_e,Ze,Wt]}],stroke:[{stroke:[e,"none"]}],ce:["ce-only","not-ce-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-Pa","overflow-Pa"],overscroll:["overscroll-Pa","overscroll-Pa"],inset:["inset-Pa","inset-Pa","start","end","top","right","bottom","left"],"inset-Pa":["right","left"],"inset-Pa":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-Pa","gap-Pa"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","ce","mb","ml"],mx:["ce","ml"],my:["mt","mb"],size:["Pa","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-Pa","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Pa","rounded-Pa","rounded-es","rounded-tl","rounded-ce","rounded-br","rounded-bl"],"rounded-Pa":["rounded-ss","rounded-es"],"rounded-e":["rounded-Pa","rounded-Pa"],"rounded-t":["rounded-tl","rounded-ce"],"rounded-r":["rounded-ce","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-Pa","border-spacing-Pa"],"border-Pa":["border-Pa-Pa","border-Pa-e","border-Pa-t","border-Pa-r","border-Pa-b","border-Pa-l"],"border-Pa-Pa":["border-Pa-r","border-Pa-l"],"border-Pa-Pa":["border-Pa-t","border-Pa-b"],"border-color":["border-color-Pa","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-Pa":["border-color-r","border-color-l"],"border-color-Pa":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-ce","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ce","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-Pa","touch-Pa","touch-pz"],"touch-Pa":["touch"],"touch-Pa":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Da=Ir(Xr);function N(...e){return Da((0,ka.clsx)(e))}var Pa=require("react/jsx-runtime"),Zr=(0,Ta.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 K({className:e,variant:t,...a}){return(0,Pa.jsx)("div",{className:N(Zr({variant:t}),e),...a})}var Ra=require("@radix-ui/react-slot"),Aa=ne(require("react")),Rt=(0,Ta.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 Pa-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),S=Aa.forwardRef(({asChild:e=!1,className:t,size:a,variant:r,...i},n)=>(0,Pa.jsx)(e?Ra.Slot:"button",{className:N(Rt({className:t,size:a,variant:r})),ref:n,...i}));S.displayName="Button";var it=ne(require("react"));var Y=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:N("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Y.displayName="Card";var qt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:N("flex flex-col space-Pa-1.5 p-6",e),...t}));qt.displayName="CardHeader";var Jt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:N("font-semibold leading-none tracking-tight",e),...t}));Jt.displayName="CardTitle";var Xt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:N("text-sm text-muted-foreground",e),...t}));Xt.displayName="CardDescription";var yt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:N("p-6 pt-0",e),...t}));yt.displayName="CardContent";var Zt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:N("flex items-center p-6 pt-0",e),...t}));Zt.displayName="CardFooter";var La=ne(require("react")),Nt=ne(require("@radix-ui/react-progress"));var Qt=La.forwardRef(({className:e,value:t,...a},r)=>(0,Pa.jsx)(Nt.Root,{ref:r,className:N("relative h-4 Pa-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Pa.jsx)(Nt.Indicator,{className:"h-full Pa-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Qt.displayName=Nt.Root.displayName;function Ma({project:e,onOpen:t,onShare:a,className:r}){return(0,Pa.jsx)(Ba.motion.div,{whileHover:{scale:1.02,Pa:-5},whileTap:{scale:.98},className:r,children:(0,Pa.jsxs)(Y,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Pa.jsxs)(qt,{children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)(Jt,{children:e.name}),(0,Pa.jsxs)(K,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Pa.jsx)(Xt,{children:e.description})]}),(0,Pa.jsxs)(yt,{className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Pa.jsx)("span",{children:"Progress"}),(0,Pa.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Pa.jsx)(Qt,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Pa.jsxs)("div",{className:"flex items-center",children:[(0,Pa.jsx)(ft.Users,{className:"ce-1 h-4 Pa-4"}),e.members," members"]}),(0,Pa.jsxs)("div",{className:"flex items-center",children:[(0,Pa.jsx)(ft.FileText,{className:"ce-1 h-4 Pa-4"}),e.files," files"]})]})]}),(0,Pa.jsxs)(Zt,{className:"flex gap-2",children:[(0,Pa.jsx)(S,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Pa.jsx)(S,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Pa.jsx)(ft.Share2,{className:"h-4 Pa-4"})})]})]})})}var ce=require("react");var Oa=({title:e,status:t,taskCount:a,children:r,onDrop:i,isCompact:n=!1,height:c})=>{let l=d=>{d.preventDefault()},u=d=>{d.preventDefault(),i(t)};return(0,Pa.jsxs)(Y,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${n?"lg:max-Pa-xs":""}`,style:{height:c||"calc(100vh - 350px)"},onDragOver:l,onDrop:u,children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Pa.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${n?"text-base":"text-lg"}`,children:e}),(0,Pa.jsx)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Pa.jsx)("div",{className:"flex-1 overflow-Pa-auto space-Pa-4 min-h-0",children:r})]})};var wt=({task:e,epic:t,onDragStart:a,onTaskClick:r,isCompact:i=!1})=>{let n=d=>{a(e)},c=()=>{r(e)},l=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},u=()=>{switch(e.type){case"story":return(0,Pa.jsx)(ft.BookOpen,{className:"h-3 Pa-3"});case"bug":return(0,Pa.jsx)(ft.Bug,{className:"h-3 Pa-3"});case"spike":return(0,Pa.jsx)(ft.Zap,{className:"h-3 Pa-3"});case"task":default:return(0,Pa.jsx)(ft.AlertCircle,{className:"h-3 Pa-3"})}},p=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return i?(0,Pa.jsx)(Y,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:n,onClick:c,children:(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:u()}),(0,Pa.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Pa.jsxs)(Y,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:n,onClick:c,children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Pa.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[u(),(0,Pa.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Pa.jsxs)("div",{className:"flex gap-1",children:[(0,Pa.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:e.priority}),(0,Pa.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,Pa.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.User,{className:"h-4 Pa-4"}),(0,Pa.jsx)("span",{children:e.assignee?.value?.name})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-4 Pa-4"}),(0,Pa.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var Ct=ne(require("react")),pe=ne(require("@radix-ui/react-dialog"));var He=pe.Root;var Yr=pe.Portal;var Fa=Ct.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(pe.Overlay,{ref:a,className:N("fixed inset-0 ft-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}));Fa.displayName=pe.Overlay.displayName;var Ae=Ct.forwardRef(({className:e,children:t,...a},r)=>(0,Pa.jsxs)(Yr,{children:[(0,Pa.jsx)(Fa,{}),(0,Pa.jsxs)(pe.Content,{ref:r,className:N("fixed left-[50%] top-[50%] ft-50 grid Pa-full max-Pa-lg translate-Pa-[-50%] translate-Pa-[-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),...a,children:[t,(0,Pa.jsxs)(pe.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,Pa.jsx)(ft.X,{className:"h-4 Pa-4"}),(0,Pa.jsx)("span",{className:"ce-only",children:"Close"})]})]})]}));Ae.displayName=pe.Content.displayName;var Ie=({className:e,...t})=>(0,Pa.jsx)("div",{className:N("flex flex-col space-Pa-1.5 text-center sm:text-left",e),...t});Ie.displayName="DialogHeader";var St=({className:e,...t})=>(0,Pa.jsx)("div",{className:N("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-Pa-2",e),...t});St.displayName="DialogFooter";var Le=Ct.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(pe.Title,{ref:a,className:N("text-lg font-semibold leading-none tracking-tight",e),...t}));Le.displayName=pe.Title.displayName;var Qr=Ct.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(pe.Description,{ref:a,className:N("text-sm text-muted-foreground",e),...t}));Qr.displayName=pe.Description.displayName;var Ha=ne(require("react"));var j=Ha.forwardRef(({className:e,type:t,...a},r)=>(0,Pa.jsx)("input",{type:t,className:N("flex h-9 Pa-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...a}));j.displayName="Input";var $a=ne(require("react")),fe=$a.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("textarea",{className:N("flex min-h-[80px] Pa-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:a,...t}));fe.displayName="Textarea";var M=ne(require("@radix-ui/react-select")),Qe=ne(require("react")),ke=M.Root;var Ve=M.Value,we=Qe.forwardRef(({children:e,className:t,...a},r)=>(0,Pa.jsxs)(M.Trigger,{className:N("flex h-10 Pa-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:r,...a,children:[e,(0,Pa.jsx)(M.Icon,{asChild:!0,children:(0,Pa.jsx)(ft.ChevronDown,{className:"h-4 Pa-4 opacity-50"})})]}));we.displayName=M.Trigger.displayName;var Ua=Qe.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.ScrollUpButton,{className:N("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Pa.jsx)(ft.ChevronUp,{className:"h-4 Pa-4"})}));Ua.displayName=M.ScrollUpButton.displayName;var ja=Qe.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.ScrollDownButton,{className:N("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Pa.jsx)(ft.ChevronDown,{className:"h-4 Pa-4"})}));ja.displayName=M.ScrollDownButton.displayName;var Ce=Qe.forwardRef(({children:e,className:t,position:a="popper",...r},i)=>(0,Pa.jsx)(M.Portal,{children:(0,Pa.jsxs)(M.Content,{className:N("relative ft-50 max-h-96 min-Pa-[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",a==="popper"&&"data-[side=bottom]:translate-Pa-1 data-[side=left]:-translate-Pa-1 data-[side=right]:translate-Pa-1 data-[side=top]:-translate-Pa-1",t),position:a,ref:i,...r,children:[(0,Pa.jsx)(Ua,{}),(0,Pa.jsx)(M.Viewport,{className:N("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] Pa-full min-Pa-[var(--radix-select-trigger-width)]"),children:e}),(0,Pa.jsx)(ja,{})]})}));Ce.displayName=M.Content.displayName;var eo=Qe.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.Label,{className:N("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));eo.displayName=M.Label.displayName;var X=Qe.forwardRef(({children:e,className:t,...a},r)=>(0,Pa.jsxs)(M.Item,{className:N("relative flex Pa-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:r,...a,children:[(0,Pa.jsx)("span",{className:"absolute left-2 flex h-3.5 Pa-3.5 items-center justify-center",children:(0,Pa.jsx)(M.ItemIndicator,{children:(0,Pa.jsx)(ft.Check,{className:"h-4 Pa-4"})})}),(0,Pa.jsx)(M.ItemText,{children:e})]}));X.displayName=M.Item.displayName;var to=Qe.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.Separator,{className:N("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));to.displayName=M.Separator.displayName;var Wa=ne(require("react")),ea=ne(require("@radix-ui/react-label"));var ao=(0,Ta.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),k=Wa.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(ea.Root,{ref:a,className:N(ao(),e),...t}));k.displayName=ea.Root.displayName;var ct=ne(require("react")),vt=ne(require("@radix-ui/react-toggle-group"));var qa=ne(require("react")),ta=ne(require("@radix-ui/react-toggle"));var aa=(0,Ta.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-Pa-9",sm:"h-8 px-1.5 min-Pa-8",lg:"h-10 px-2.5 min-Pa-10"}},defaultVariants:{variant:"default",size:"default"}}),ro=qa.forwardRef(({className:e,variant:t,size:a,...r},i)=>(0,Pa.jsx)(ta.Root,{ref:i,className:N(aa({variant:t,size:a,className:e})),...r}));ro.displayName=ta.Root.displayName;var Za=ct.createContext({size:"default",variant:"default"}),mt=ct.forwardRef(({className:e,variant:t,size:a,children:r,...i},n)=>(0,Pa.jsx)(vt.Root,{ref:n,className:N("flex items-center justify-center gap-1",e),...i,children:(0,Pa.jsx)(Za.Provider,{value:{variant:t,size:a},children:r})}));mt.displayName=vt.Root.displayName;var pt=ct.forwardRef(({className:e,children:t,variant:a,size:r,...i},n)=>{let c=ct.useContext(Za);return(0,Pa.jsx)(vt.Item,{ref:n,className:N(aa({variant:c.variant||a,size:c.size||r}),e),...i,children:t})});pt.displayName=vt.Item.displayName;var oo=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ft.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:ft.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ft.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ft.Zap}],so=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],At=({isOpen:e,onClose:t,onAddTask:a,epics:r,sprints:i,assignees:n,defaultEpicId:c})=>{let[l,u]=(0,ce.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,ce.useEffect)(()=>{e&&c&&u(g=>({...g,epic:c}))},[e,c]),(0,ce.useEffect)(()=>{e&&u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:c||"",sprint:"none",assignee:""})},[e]);let p=g=>{g.preventDefault(),l.name.trim()&&(a({name:l.name.trim(),description:l.description.trim(),status:"todo",priority:l.priority,type:l.type,storyPoints:l.storyPoints,epic:Number(l.epic),sprint:Number(l.sprint),assignee:l.assignee.trim()?{relationTo:"digital-colleagues",value:Number(l.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:c||"",sprint:"",assignee:""}),t())},d=(g,R)=>{u(T=>({...T,[g]:R}))};return(0,Pa.jsx)(He,{open:e,onOpenChange:t,children:(0,Pa.jsxs)(Ae,{className:"sm:max-Pa-md",children:[(0,Pa.jsx)(Ie,{children:(0,Pa.jsx)(Le,{children:"Add New Task"})}),(0,Pa.jsxs)("form",{onSubmit:p,className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"name",children:"Task Title"}),(0,Pa.jsx)(j,{id:"name",value:l.name,onChange:g=>d("name",g.target.value),placeholder:"Enter task title",required:!0})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(fe,{id:"description",value:l.description,onChange:g=>d("description",g.target.value),placeholder:"Enter task description",rows:3})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{children:"Type"}),(0,Pa.jsx)(mt,{type:"single",value:l.type||"",onValueChange:g=>g&&d("type",g),children:oo.map(g=>{let R=g.icon;return(0,Pa.jsxs)(pt,{value:g.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Pa.jsx)(R,{className:"h-4 Pa-4"}),g.label]},g.value)})})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{children:"Priority"}),(0,Pa.jsx)(mt,{type:"single",value:l.priority||"",onValueChange:g=>g&&d("priority",g),children:so.map(g=>(0,Pa.jsx)(pt,{value:g.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:g.label},g.value))})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"points",children:"Story Points"}),(0,Pa.jsx)(j,{id:"points",type:"number",min:"1",max:"100",value:l.storyPoints,onChange:g=>d("storyPoints",parseInt(g.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"epic",children:"Epic"}),(0,Pa.jsxs)(ke,{value:l.epic,onValueChange:g=>d("epic",g),children:[(0,Pa.jsx)(we,{children:(0,Pa.jsx)(Ve,{placeholder:"Select an epic"})}),(0,Pa.jsx)(Ce,{children:r.map(g=>(0,Pa.jsx)(X,{value:g.id.toString(),children:(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("div",{className:`Pa-3 h-3 rounded-full ${g.color}`}),g.name]})},g.id))})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Pa.jsxs)(ke,{value:l.sprint,onValueChange:g=>d("sprint",g),children:[(0,Pa.jsx)(we,{children:(0,Pa.jsx)(Ve,{placeholder:"Select a sprint"})}),(0,Pa.jsxs)(Ce,{children:[(0,Pa.jsx)(X,{value:"none",children:"No Sprint"}),i.map(g=>(0,Pa.jsx)(X,{value:g.id.toString(),children:(0,Pa.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"sprint",children:"Assignee"}),(0,Pa.jsxs)(ke,{value:l.assignee,onValueChange:g=>d("assignee",g),children:[(0,Pa.jsx)(we,{children:(0,Pa.jsx)(Ve,{placeholder:"Select an Assignee"})}),(0,Pa.jsxs)(Ce,{children:[(0,Pa.jsx)(X,{value:"none",children:"No Assignee"}),n.map(g=>(0,Pa.jsx)(X,{value:g.id.toString(),children:(0,Pa.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,Pa.jsxs)(St,{children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var oa=({fieldName:e,value:t,label:a,multiline:r=!1,onSave:i,className:n="",disabled:c=!1})=>{let[l,u]=(0,ce.useState)(!1),[p,d]=(0,ce.useState)(""),g=()=>{c||(u(!0),d(t))},R=async()=>{p!==t&&await i(e,p),u(!1)},T=D=>{D.key==="Enter"&&!r||D.key==="Enter"&&D.ctrlKey&&r?R():D.key==="Escape"&&(u(!1),d(""))};return(0,Pa.jsxs)("div",{className:`space-Pa-2 ${n}`,children:[(0,Pa.jsx)(k,{children:a}),l?r?(0,Pa.jsx)(fe,{value:p,onChange:D=>d(D.target.value),onBlur:R,onKeyDown:T,autoFocus:!0,rows:4,className:"resize-none"}):(0,Pa.jsx)(j,{value:p,onChange:D=>d(D.target.value),onBlur:R,onKeyPress:T,autoFocus:!0,className:"text-lg font-medium"}):(0,Pa.jsxs)("div",{onClick:g,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Pa.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,Pa.jsx)(ft.Edit,{className:"h-4 Pa-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var It=ne(require("react")),qe=ne(require("@radix-ui/react-avatar"));var sa=It.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(qe.Root,{ref:a,className:N("relative flex h-10 Pa-10 shrink-0 overflow-hidden rounded-full",e),...t}));sa.displayName=qe.Root.displayName;var io=It.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(qe.Image,{ref:a,className:N("aspect-square h-full Pa-full",e),...t}));io.displayName=qe.Image.displayName;var ia=It.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(qe.Fallback,{ref:a,className:N("flex h-full Pa-full items-center justify-center rounded-full bg-muted",e),...t}));ia.displayName=qe.Fallback.displayName;var er=({comments:e,onAddComment:t})=>{let[a,r]=(0,ce.useState)(""),i=c=>c.split(" ").map(l=>l[0]).join("").toUpperCase(),n=()=>{a.trim()&&(t(a),r(""))};return(0,Pa.jsxs)("div",{className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)(ft.MessageSquare,{className:"h-5 Pa-5"}),(0,Pa.jsx)(k,{className:"text-lg font-medium",children:"Comments"}),(0,Pa.jsx)(K,{variant:"secondary",children:e.length})]}),(0,Pa.jsx)("div",{className:"space-Pa-4 max-h-60 overflow-Pa-auto",children:e.map(c=>(0,Pa.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Pa.jsx)(sa,{className:"h-8 Pa-8 mt-1",children:(0,Pa.jsx)(ia,{className:"text-xs bg-muted text-muted-foreground",children:i(c.author)})}),(0,Pa.jsxs)("div",{className:"flex-1",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Pa.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,Pa.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c.createdAt.toLocaleDateString()," ce ",c.createdAt.toLocaleTimeString()]})]}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,Pa.jsxs)("div",{className:"flex gap-2",children:[(0,Pa.jsx)(fe,{value:a,onChange:c=>r(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Pa.jsx)(S,{onClick:n,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Pa.jsx)(ft.Send,{className:"h-4 Pa-4"})})]})]})};var Mt=({label:e,value:t,onValueChange:a,options:r,showColor:i=!1,disabled:n=!1})=>{let[c,l]=(0,ce.useState)(!1),u=r.find(d=>d.value===t);return(0,Pa.jsxs)("div",{className:"space-Pa-1",children:[(0,Pa.jsx)(k,{className:"text-xs text-muted-foreground",children:e}),(0,Pa.jsxs)(ke,{value:t,onValueChange:a,open:c,onOpenChange:d=>{n||l(d)},disabled:n,children:[(0,Pa.jsx)(we,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Pa.jsxs)(K,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!c),children:[i&&u?.color&&(0,Pa.jsx)("div",{className:`Pa-2 h-2 rounded-full ${u.color} ce-1`}),u?.label||"Select..."]})}),(0,Pa.jsx)(Ce,{children:r.map(d=>(0,Pa.jsx)(X,{value:d.value,children:i&&d.color?(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("div",{className:`Pa-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var ar=({label:e,value:t,onValueChange:a,options:r,placeholder:i="Search...",allowCustomValue:n=!1,disabled:c=!1})=>{let[l,u]=(0,ce.useState)(!1),[p,d]=(0,ce.useState)(""),g=r.find(v=>v.value===t),R=r.filter(v=>v.label.toLowerCase().includes(p.toLowerCase())),T=v=>{a(v),u(!1),d("")},D=()=>{n&&p.trim()&&!r.find(v=>v.value===p.trim())&&(a(p.trim()),u(!1),d(""))};return(0,Pa.jsxs)("div",{className:"space-Pa-1",children:[(0,Pa.jsx)(k,{className:"text-xs text-muted-foreground",children:e}),(0,Pa.jsxs)(ke,{value:t,onValueChange:T,open:l,onOpenChange:v=>{c||u(v)},disabled:c,children:[(0,Pa.jsx)(we,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Pa.jsx)(K,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&u(!l),children:g?.label||t||"Select..."})}),(0,Pa.jsxs)(Ce,{children:[(0,Pa.jsx)("div",{className:"p-2",children:(0,Pa.jsx)(j,{placeholder:i,value:p,onChange:v=>d(v.target.value),onKeyDown:v=>{v.key==="Enter"&&n&&D()},className:"mb-2"})}),R.map(v=>(0,Pa.jsx)(X,{value:v.value,children:v.label},v.value)),n&&p.trim()&&!R.find(v=>v.value===p.trim())&&(0,Pa.jsxs)(X,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var ve=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var no=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ft.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:ft.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ft.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ft.Zap}],lo=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var rr=({task:e,epics:t,sprints:a,lastUpdated:r,onUpdateTask:i,onClose:n,onDelete:c,isUpdating:l=!1,isDeleting:u=!1,deleteState:p="idle",teamMembers:d})=>{let[g,R]=(0,ce.useState)(e.storyPoints),T=(0,ce.useRef)(null),D=(0,ce.useCallback)((f,B)=>{T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{i(f,B)},500)},[i]);(0,ce.useEffect)(()=>{D("storyPoints",g?.toString()||"1")},[g]);let E=f=>f.split(" ").map(B=>B[0]).join("").toUpperCase(),v=()=>p==="loading"?(0,Pa.jsxs)(S,{disabled:!0,variant:"destructive",className:"Pa-full h-8 text-xs gap-1",children:[(0,Pa.jsx)(ft.Loader2,{className:"h-3 Pa-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,Pa.jsxs)(S,{disabled:!0,variant:"destructive",className:"Pa-full h-8 text-xs gap-1",children:[(0,Pa.jsx)(ft.Check,{className:"h-3 Pa-3"}),"Deleted"]}):p==="error"?(0,Pa.jsxs)(S,{disabled:!0,variant:"destructive",className:"Pa-full h-8 text-xs gap-1",children:[(0,Pa.jsx)(ft.X,{className:"h-3 Pa-3"}),"Delete failed"]}):(0,Pa.jsxs)(S,{onClick:c,variant:"destructive",className:"Pa-full h-8 text-xs gap-1",disabled:l||u,children:[(0,Pa.jsx)(ft.Trash2,{className:"h-3 Pa-3"}),"Delete Task"]});return(0,Pa.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Pa.jsxs)("div",{className:"space-Pa-4",style:{opacity:l?.6:1},children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Pa.jsx)(Mt,{label:"",value:e.status,onValueChange:f=>i("status",f),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Pa.jsx)(mt,{type:"single",value:e.type||"",onValueChange:f=>f&&i("type",f),className:"grid grid-cols-2 gap-1",disabled:l,children:no.map(f=>{let B=f.icon;return(0,Pa.jsxs)(pt,{value:f.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:[(0,Pa.jsx)(B,{className:"h-3 Pa-3"}),f.label]},f.value)})})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Pa.jsx)(mt,{type:"single",value:e.priority||"",onValueChange:f=>f&&i("priority",f),className:"grid grid-cols-3 gap-1",disabled:l,children:lo.map(f=>(0,Pa.jsx)(pt,{value:f.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:f.label},f.value))})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Pa.jsx)("input",{type:"number",min:"1",max:"100",value:g||1,onChange:f=>{let B=Number(f.target.value);B<1?R(1):B>100?R(100):R(B)},className:"Pa-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Pa.jsx)(Mt,{label:"",value:ve(e.epic).toString(),onValueChange:f=>i("epicId",f),options:(t||[]).map(f=>({value:f.id.toString(),label:f?.name,color:f.color})),showColor:!0,disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Pa.jsx)(Mt,{label:"",value:ve(e.sprint).toString()||"none",onValueChange:f=>i("sprintId",f==="none"?"":f),options:[{value:"none",label:"No Sprint"},...(a||[]).map(f=>({value:f.id.toString(),label:`${f?.name}`}))],disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Pa.jsx)(ar,{label:"",value:e.assignee?.value?.name,onValueChange:f=>i("assignee",f),options:d.map(f=>({value:`${typeof f.email=="string"?"users":"digital-colleagues"}:${f.id}`,label:f?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,Pa.jsxs)("div",{className:"mt-auto pt-4 space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(S,{onClick:n,variant:"outline",className:"Pa-full h-8 text-xs",disabled:l||u,children:"Close"}),v()]}),(0,Pa.jsxs)("div",{className:"pt-4 border-t border-border space-Pa-2",children:[(0,Pa.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.User,{className:"h-3 Pa-3"}),(0,Pa.jsx)("span",{children:"System"})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-3 Pa-3"}),(0,Pa.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.Clock,{className:"h-3 Pa-3"}),(0,Pa.jsxs)("span",{children:[new Date(r).toLocaleDateString()," ce"," ",new Date(r).toLocaleTimeString()]})]})]})]})]})]})};var or=({isOpen:e,onClose:t,initialTask:a,epics:r,sprints:i,onUpdateTask:n,onDeleteTask:c,onAddComment:l,colleagues:u})=>{let[p,d]=(0,ce.useState)(a),[g,R]=(0,ce.useState)(new Date),[T,D]=(0,ce.useState)("idle"),[E,v]=(0,ce.useState)("idle"),[f,B]=(0,ce.useState)([]);(0,ce.useEffect)(()=>{d(a)},[a]);let V=async(G,ie)=>{if(ie!==p[G]){D("loading");try{let A=await n(p.id.toString(),{[G]:ie});d(A),R(new Date),D("success"),setTimeout(()=>D("idle"),1500)}catch(A){console.log("error",A),D("error"),setTimeout(()=>D("idle"),3e3)}}},$=async(G,ie)=>{if(ie!==p[G]){D("loading");try{let A=await n(p.id.toString(),{[G]:ie});d(A),R(new Date),D("success"),setTimeout(()=>D("idle"),1500)}catch{D("error"),setTimeout(()=>D("idle"),3e3)}}},C=async G=>{if(l){D("loading");try{let ie=await l?.({content:G,taskId:p.id.toString()});d(ie),R(new Date),D("success"),setTimeout(()=>D("idle"),1500)}catch{D("error"),setTimeout(()=>D("idle"),3e3)}}},H=async()=>{v("loading");try{await c(p.id.toString()),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},ae=T!=="loading"&&E!=="loading",re=()=>{ae&&t()},me=()=>T==="loading"?(0,Pa.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Pa.jsx)(ft.Loader2,{className:"h-4 Pa-4 animate-spin"}),(0,Pa.jsx)("span",{children:"Updating..."})]}):T==="success"?(0,Pa.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Pa.jsx)(ft.Check,{className:"h-4 Pa-4"}),(0,Pa.jsx)("span",{children:"Updated successfully"})]}):T==="error"?(0,Pa.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Pa.jsx)(ft.X,{className:"h-4 Pa-4"}),(0,Pa.jsx)("span",{children:"Update failed"})]}):null;return(0,Pa.jsx)(He,{open:e,onOpenChange:re,children:(0,Pa.jsxs)(Ae,{className:"max-Pa-3xl max-h-[80vh] overflow-Pa-auto p-4",children:[(0,Pa.jsxs)(Ie,{children:[(0,Pa.jsx)(Le,{className:"ce-only",children:p.name}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("div",{className:"flex-1",children:me()}),!ae&&(0,Pa.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Pa.jsxs)("div",{className:"lg:col-span-2 space-Pa-4",children:[(0,Pa.jsx)(oa,{fieldName:"name",value:p.name||"",label:"",onSave:V,className:"border-b border-border pb-3",disabled:T==="loading"}),(0,Pa.jsx)(oa,{fieldName:"description",value:p.description||"",label:"Description",multiline:!0,onSave:V,disabled:T==="loading"}),(0,Pa.jsx)(er,{comments:(p?.comments||[]).map(G=>({author:G.author.value.name||"",createdAt:new Date(G.timestamp),text:G.text,id:G.id||""})),onAddComment:C})]}),(0,Pa.jsx)(rr,{task:p,epics:r,sprints:i,lastUpdated:g,onUpdateTask:$,onClose:re,onDelete:H,isUpdating:T==="loading",isDeleting:E==="loading",deleteState:E,teamMembers:u})]})]})})};var Ot=({isOpen:e,onClose:t,onAddEpic:a})=>{let[r,i]=(0,ce.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),n=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],l=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],u=d=>{d.preventDefault(),r.name.trim()&&(a({name:r.name.trim(),description:r.description.trim(),color:r.color,confidence:r.confidence,phase:r.phase,startDate:r.startDate,endDate:r.endDate,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),i({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},p=(d,g)=>{i(R=>({...R,[d]:g}))};return(0,Pa.jsx)(He,{open:e,onOpenChange:t,children:(0,Pa.jsxs)(Ae,{className:"sm:max-Pa-md",children:[(0,Pa.jsx)(Ie,{children:(0,Pa.jsx)(Le,{children:"Add New Epic"})}),(0,Pa.jsxs)("form",{onSubmit:u,className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"name",children:"Epic Name"}),(0,Pa.jsx)(j,{id:"name",value:r.name,onChange:d=>p("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(fe,{id:"description",value:r.description,onChange:d=>p("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{children:"Color"}),(0,Pa.jsx)("div",{className:"flex gap-2 flex-wrap",children:n.map(d=>(0,Pa.jsx)("button",{type:"button",onClick:()=>p("color",d),className:`Pa-8 h-8 rounded-full ${d} ${r.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{children:"Confidence"}),(0,Pa.jsxs)(ke,{value:r.confidence,onValueChange:d=>p("confidence",d),children:[(0,Pa.jsx)(we,{children:(0,Pa.jsx)(Ve,{})}),(0,Pa.jsx)(Ce,{children:c.map(d=>(0,Pa.jsx)(X,{value:d.value,children:d.label},d.value))})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{children:"Phase"}),(0,Pa.jsxs)(ke,{value:r.phase.toString(),onValueChange:d=>p("phase",parseInt(d)),children:[(0,Pa.jsx)(we,{children:(0,Pa.jsx)(Ve,{})}),(0,Pa.jsx)(Ce,{children:l.map(d=>(0,Pa.jsx)(X,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{children:"Start Date"}),(0,Pa.jsx)(j,{type:"date",value:r.startDate,onChange:d=>p("startDate",d.target.value)})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{children:"End Date"}),(0,Pa.jsx)(j,{type:"date",value:r.endDate,onChange:d=>p("endDate",d.target.value)})]})]}),(0,Pa.jsxs)(St,{children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};function ir(e,t){let[a,r]=(0,ce.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),i=n=>{try{r(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,ce.useEffect)(()=>{i(a)},[]),[a,i]}var Ft=require("react-icons/fa");function rt({title:e,description:t,badge:a,primaryAction:r,secondaryAction:i,gradient:n,children:c,className:l}){let[u,p]=ir(`hero-section-minimized-${e.replace(/\Pa+/g,"-").toLowerCase()}`,!i&&!t),d=!i&&!t||u;return(0,Pa.jsxs)(Ba.motion.div,{initial:{opacity:0,Pa:20},animate:{opacity:1,Pa:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${l||""}`,children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Pa.jsx)(K,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Pa.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-3",children:[d&&r&&(0,Pa.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(i||t)&&(0,Pa.jsx)("button",{"aria-label":u?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!u),style:{lineHeight:0},children:u?(0,Pa.jsx)(Ft.FaChevronDown,{size:22}):(0,Pa.jsx)(Ft.FaChevronUp,{size:22})})]})]}),!d&&(0,Pa.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Pa.jsxs)("div",{className:"space-Pa-4",children:[(0,Pa.jsx)("p",{className:"max-Pa-[600px] text-white/80",children:t}),(0,Pa.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,Pa.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),i&&(0,Pa.jsx)(S,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),c&&(0,Pa.jsx)("div",{className:"hidden lg:block",children:c})]})]})}var co=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:r=[],initialColleagues:i=[],initialProjects:n=[],onAddTask:c,onUpdateTask:l,onDeleteTask:u,onTaskClick:p,onAddEpic:d,onAddComment:g})=>{let[R,T]=(0,ce.useState)(e),[D,E]=(0,ce.useState)(t),[v,f]=(0,ce.useState)(a),[B,V]=(0,ce.useState)(!1),[$,C]=(0,ce.useState)(!1),[H,ae]=(0,ce.useState)(null),[re,me]=(0,ce.useState)(null),[G,ie]=(0,ce.useState)(r),[A,ot]=(0,ce.useState)(i),[he,Ue]=(0,ce.useState)(0),ge=(0,ce.useRef)(null),Je=(0,ce.useRef)(null),$e=D.filter(P=>!0).map(P=>P.id),je=v.find(P=>P.isSelected);$e.push(0),(0,ce.useEffect)(()=>{T(e)},[e]),(0,ce.useEffect)(()=>{E(t)},[t]),(0,ce.useEffect)(()=>{f(a)},[a]),(0,ce.useEffect)(()=>{let P=()=>{if(ge.current){let ye=ge.current.offsetHeight;Ue(ye)}};P();let W=new ResizeObserver(P);ge.current&&W.observe(ge.current);let _=()=>{setTimeout(P,100)};return window.addEventListener("storage",_),()=>{W.disconnect(),window.removeEventListener("storage",_)}},[]),(0,ce.useEffect)(()=>{let P=setTimeout(()=>{ge.current&&Ue(ge.current.offsetHeight)},300);return()=>clearTimeout(P)},[B,$]);let We=R.filter(P=>!0),h=P=>We.filter(W=>W.status===P),Z=P=>{let W={};return D.forEach(_=>{W[_.id]=P.filter(ye=>ve(ye.epic)===_.id)}),W["no-epic"]=P.filter(_=>!ve(_.epic)),W},xe=P=>{me(P)},st=P=>{re&&(T(W=>W.map(_=>_.id===re.id?{..._,status:P}:_)),l?.(re.id.toString(),{status:P}),me(null))},te=P=>{let W={...P,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};T(_=>[..._,W]),c?.(P)},Xe=async(P,W)=>{if(T(ye=>ye.map(Te=>Te.id===Number(P)?{...Te,...W}:Te)),l)return await l(P,W);let _=R.find(ye=>ye.id===Number(P));if(!_)throw new Error("Task not found");return{..._,...W}},$t=async P=>{T(W=>W.filter(_=>_.id!==Number(P))),H?.id===Number(P)&&ae(null),u&&await u(P)},kt=P=>{let W={...P,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};E(_=>[..._,W]),d?.(P)},Tt=P=>{ae(P),p?.(P)},Gt=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Ut=he>0?`calc(100vh - ${he+120}px)`:"calc(100vh - 12rem)";return(0,Pa.jsxs)("div",{ref:Je,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Pa.jsx)("div",{ref:ge,className:"flex-shrink-0",children:(0,Pa.jsx)(rt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>V(!0)},secondaryAction:{label:"Add epic",onClick:()=>C(!0)}})}),(0,Pa.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Pa.jsx)("div",{className:"h-full",style:{height:he>0?`calc(100vh - ${he+120}px)`:"calc(100vh - 12rem)"},children:(0,Pa.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Gt.map(P=>{let W=h(P.status),_=Z(W);return(0,Pa.jsxs)(Oa,{title:P.title,status:P.status,taskCount:W.length,onDrop:st,isCompact:P.status==="done",height:Ut,children:[_["no-epic"].map(ye=>(0,Pa.jsx)(wt,{epic:null,task:ye,onDragStart:xe,onTaskClick:Tt,isCompact:P.status==="done"})),$e.map(ye=>{let Te=D.find(b=>b.id===ye),m=_[ye]||[];return m.length===0?null:(0,Pa.jsxs)("div",{className:"mb-6",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Pa.jsx)("div",{className:`Pa-3 h-3 rounded-full ${Te?.color}`}),(0,Pa.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:Te?.name||"No Epic"}),(0,Pa.jsx)(K,{variant:"secondary",className:"text-xs",children:m.length})]})," ",(0,Pa.jsx)("div",{className:"space-Pa-3",children:m.map(b=>(0,Pa.jsx)(wt,{task:b,epic:Te,onDragStart:xe,onTaskClick:Tt,isCompact:P.status==="done"},b.id))})]},ye)})]},P.id)})})})}),(0,Pa.jsx)(At,{isOpen:B,onClose:()=>V(!1),onAddTask:te,assignees:[...A,...G],epics:D,sprints:v}),(0,Pa.jsx)(Ot,{isOpen:$,onClose:()=>C(!1),onAddEpic:kt}),H&&(0,Pa.jsx)(or,{isOpen:!!H,onClose:()=>ae(null),initialTask:H,epics:D,sprints:v,onUpdateTask:Xe,onDeleteTask:$t,colleagues:[...A,...G],onAddComment:g})]})};var lr=require("react-day-picker");function Ht({className:e,classNames:t,showOutsideDays:a=!0,...r}){return(0,Pa.jsx)(lr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:N("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-Pa-4 sm:space-Pa-4 sm:space-Pa-0",month:"space-Pa-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-Pa-1 flex items-center",nav_button:N(Rt({variant:"outline"}),"h-7 Pa-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"Pa-full border-collapse space-Pa-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md Pa-8 font-normal text-[0.8rem]",row:"flex Pa-full mt-2",cell:N("relative p-0 text-center text-sm focus-within:relative focus-within:ft-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:N(Rt({variant:"ghost"}),"h-8 Pa-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...r})}Ht.displayName="Calendar";var cr=ne(require("react")),Ge=ne(require("@radix-ui/react-popover"));var da=Ge.Root,ca=Ge.Trigger;var Vt=cr.forwardRef(({className:e,align:t="center",sideOffset:a=4,...r},i)=>(0,Pa.jsx)(Ge.Portal,{children:(0,Pa.jsx)(Ge.Content,{ref:i,align:t,sideOffset:a,className:N("ft-50 Pa-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...r})}));Vt.displayName=Ge.Content.displayName;var pa=require("date-fns");var pr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[r,i]=(0,ce.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),n=l=>{l.preventDefault(),!(!r.name||!r.startDate||!r.endDate)&&(a({name:r.name,description:r.description,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),i({name:"",description:"",startDate:void 0,endDate:void 0}),t())},c=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Pa.jsx)(He,{open:e,onOpenChange:c,children:(0,Pa.jsxs)(Ae,{className:"sm:max-Pa-md",children:[(0,Pa.jsx)(Ie,{children:(0,Pa.jsx)(Le,{children:"Add New Sprint"})}),(0,Pa.jsxs)("form",{onSubmit:n,className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"name",children:"Sprint Name *"}),(0,Pa.jsx)(j,{id:"name",value:r.name,onChange:l=>i(u=>({...u,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(fe,{id:"description",value:r.description,onChange:l=>i(u=>({...u,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{children:"Start Date *"}),(0,Pa.jsxs)(da,{children:[(0,Pa.jsx)(ca,{asChild:!0,children:(0,Pa.jsxs)(S,{variant:"outline",className:N("Pa-full justify-start text-left font-normal",!r.startDate&&"text-muted-foreground"),children:[(0,Pa.jsx)(ft.CalendarIcon,{className:"ce-2 h-4 Pa-4"}),r.startDate?(0,pa.format)(r.startDate,"PPP"):"Pick a date"]})}),(0,Pa.jsx)(Vt,{className:"Pa-auto p-0",align:"start",children:(0,Pa.jsx)(Ht,{mode:"single",selected:r.startDate,onSelect:l=>i(u=>({...u,startDate:l})),initialFocus:!0})})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(k,{children:"End Date *"}),(0,Pa.jsxs)(da,{children:[(0,Pa.jsx)(ca,{asChild:!0,children:(0,Pa.jsxs)(S,{variant:"outline",className:N("Pa-full justify-start text-left font-normal",!r.endDate&&"text-muted-foreground"),children:[(0,Pa.jsx)(ft.CalendarIcon,{className:"ce-2 h-4 Pa-4"}),r.endDate?(0,pa.format)(r.endDate,"PPP"):"Pick a date"]})}),(0,Pa.jsx)(Vt,{className:"Pa-auto p-0",align:"start",children:(0,Pa.jsx)(Ht,{mode:"single",selected:r.endDate,onSelect:l=>i(u=>({...u,endDate:l})),initialFocus:!0,disabled:l=>r.startDate?l<r.startDate:!1})})]})]})]}),(0,Pa.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",disabled:!r.name||!r.startDate||!r.endDate,children:"Add Sprint"})]})]})]})})};var mo=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddSprint:n,onUpdateSprint:c,onDeleteSprint:l})=>{let[u,p]=(0,ce.useState)([]),[d,g]=(0,ce.useState)(new Set),[R,T]=(0,ce.useState)(null),[D,E]=(0,ce.useState)(!1),[v,f]=(0,ce.useState)(null),[B,V]=(0,ce.useState)(null),[$,C]=(0,ce.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[H,ae]=(0,ce.useState)([]),[re,me]=(0,ce.useState)("upcoming"),[G,ie]=(0,ce.useState)(!1),[A,ot]=(0,ce.useState)(0),he=(0,ce.useRef)(null),Ue=(0,ce.useRef)(null);(0,ce.useEffect)(()=>{let m=()=>{he.current&&ot(he.current.offsetHeight)};m();let b=new ResizeObserver(m);return he.current&&b.observe(he.current),()=>b.disconnect()},[]);let ge=m=>t.find(b=>b.id===Number(m)),Je=m=>a.find(b=>b.id===Number(m)),$e=m=>{let b={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return b[m]||b.medium},je=m=>{if(!m||m?.length===0)return"";let b=m?.trim().split(" ");if(b?.length===1)return b[0];let F=b[0],U=b[b.length-1][0].toUpperCase();return`${F} ${U}`},We=m=>{let b={},F=[];return m.forEach(U=>{U.epic?(b[ve(U.epic)]||(b[ve(U.epic)]=[]),b[ve(U.epic)].push(U)):F.push(U)}),{tasksByEpic:b,unassignedTasks:F}};(0,ce.useEffect)(()=>{ae(a)},[a]);let h=H.filter(m=>{switch(re){default:return!0}}),Z=H.filter(m=>u.includes(m.id.toString())),xe=e.filter(m=>!m.sprint||m.status==="backlog"),st=xe.reduce((m,b)=>m+(b.storyPoints||0),0),te=m=>{p(b=>b.includes(m)?b.filter(F=>F!==m):b?.length<3?[...b,m]:b)},Xe=m=>{g(b=>{let F=new Set(b);return F.has(m)?F.delete(m):F.add(m),F})},$t=m=>{n(m),E(!1)},kt=m=>{V(m.id.toString()),C({name:m.name,description:m.description||"",startDate:m.startDate?new Date(m.startDate).toISOString().split("T")[0]:m.startDate,endDate:m.endDate?new Date(m.endDate).toISOString().split("T")[0]:m.endDate,isActive:!1})},Tt=()=>{B&&(c(B,{name:$.name,description:$.description,startDate:$.startDate,endDate:$.endDate}),ae(m=>m.map(b=>(b.id===Number(B)&&(b.name=$.name,b.description=$.description,b.startDate=$.startDate,b.endDate=$.endDate),b))),V(null))},Gt=()=>{V(null),C({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Ut=(m,b)=>{T(b),m.dataTransfer.effectAllowed="move"},P=m=>{m.preventDefault(),m.dataTransfer.dropEffect="move"},W=m=>{f(m)},_=()=>{f(null)},ye=(m,b)=>{if(m.preventDefault(),f(null),!R)return;(ve(R.sprint)||void 0)!==Number(b)&&r(R.id.toString(),{sprint:Number(b)}),T(null)},Te=({task:m,showSprint:b=!1})=>{let F=m.epic?ge(ve(m.epic).toString()):null,U=m.sprint?Je(ve(m.sprint).toString()):null;return(0,Pa.jsx)(Y,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:Pe=>{Pe.dataTransfer.effectAllowed="move",Pe.dataTransfer.setData("text/plain",m.id.toString()),Ut(Pe,m)},onClick:Pe=>{R===null&&i(m)},style:{userSelect:"none"},children:(0,Pa.jsxs)("div",{className:"space-Pa-2 pointer-events-none",children:[(0,Pa.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Pa.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:m.name}),(0,Pa.jsx)(K,{className:`text-xs ${$e(m.priority||"medium")}`,children:m.priority?.[0]?.toUpperCase()})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-1",children:[F&&(0,Pa.jsx)("div",{className:`Pa-2 h-2 rounded-full ${F.color}`}),(0,Pa.jsx)("span",{className:"text-muted-foreground truncate",children:F?.name})]}),(0,Pa.jsx)("span",{className:"text-muted-foreground",children:je(m.assignee?.value?.name)})]}),b&&U&&(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-3 Pa-3"}),(0,Pa.jsx)("span",{children:U.name})]})]})})};return(0,Pa.jsxs)("div",{ref:Ue,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Pa.jsx)("div",{ref:he,className:"flex-shrink-0",children:(0,Pa.jsx)(rt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>E(!0)}})}),(0,Pa.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Pa.jsxs)("div",{className:"h-full",style:{height:A>0?`calc(100vh - ${A+120}px)`:"calc(100vh - 12rem)"},children:[(0,Pa.jsxs)("div",{className:"mb-4",children:[(0,Pa.jsx)(Y,{className:"p-3 bg-card shadow-sm",children:(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,Pa.jsxs)("p",{className:"text-xs text-muted-foreground",children:[u?.length,"/3 selected"]})]}),u?.length>0&&(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,Pa.jsx)("div",{className:"flex flex-wrap gap-1",children:Z.map(m=>(0,Pa.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Pa.jsx)("span",{className:"max-Pa-[80px] truncate",children:m.name}),(0,Pa.jsx)("button",{onClick:()=>te(m.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Pa.jsx)(ft.X,{className:"h-4 Pa-4"})})]},m.id))})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsxs)(S,{onClick:()=>E(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Pa.jsx)(ft.Plus,{className:"h-3 Pa-3"}),"Add"]}),(0,Pa.jsxs)(S,{onClick:()=>ie(!G),variant:"outline",size:"sm",className:"gap-1",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-3 Pa-3"}),G?"Close":"Select"]})]})]})}),G&&(0,Pa.jsx)("div",{className:"fixed inset-0 bg-black/20 ft-[5]",onClick:()=>ie(!1)}),(0,Pa.jsx)("div",{className:`fixed top-0 right-0 h-full Pa-80 bg-background border-l shadow-xl ft-10 transition-all duration-300 ease-in-out ${G?"translate-Pa-0 opacity-100 visible":"translate-Pa-full opacity-0 invisible"}`,children:(0,Pa.jsxs)(Y,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Pa.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Pa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>ie(!1),className:"h-8 Pa-8 p-0",children:(0,Pa.jsx)(ft.X,{className:"h-4 Pa-4"})})]}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Pa.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Pa.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(m=>(0,Pa.jsxs)(S,{variant:re===m.key?"default":"outline",size:"sm",onClick:()=>me(m.key),className:"text-xs h-8 px-3 flex-1",children:[m.label," (",m.count,")"]},m.key))}),(0,Pa.jsx)("div",{className:"space-Pa-2 flex-1 overflow-Pa-auto",children:h.length>0?h.map(m=>{let b=u.includes(m.id.toString()),F=e.filter(Ne=>ve(Ne.sprint)===m.id).length,U=!b&&u.length<3;return(0,Pa.jsx)("div",{className:`p-3 rounded-lg border transition-all ${b?"bg-primary/10 border-primary/30":U?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:B===m.id.toString()?(0,Pa.jsxs)("div",{className:"space-Pa-3",children:[(0,Pa.jsx)(j,{value:$.name,onChange:Ne=>C(De=>({...De,name:Ne.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Pa.jsx)(fe,{value:$.description,onChange:Ne=>C(De=>({...De,description:Ne.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Pa.jsxs)("div",{className:"flex gap-2",children:[(0,Pa.jsxs)(S,{size:"sm",onClick:()=>Tt(),className:"flex-1",children:[(0,Pa.jsx)(ft.Check,{className:"h-3 Pa-3 ce-1"}),"Save"]}),(0,Pa.jsxs)(S,{size:"sm",variant:"outline",onClick:Gt,className:"flex-1",children:[(0,Pa.jsx)(ft.X,{className:"h-3 Pa-3 ce-1"}),"Cancel"]})]})]}):(0,Pa.jsxs)("div",{children:[(0,Pa.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Pa.jsxs)("div",{className:"flex-1 min-Pa-0",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Pa.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:m.name}),(0,Pa.jsx)(K,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Pa.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:m.description}),(0,Pa.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Pa.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.CalendarDays,{className:"h-3 Pa-3"}),new Date(m.startDate).toLocaleDateString()]}),(0,Pa.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.User,{className:"h-3 Pa-3"}),F," tasks"]})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>kt(m),className:"h-6 Pa-6 p-0",children:(0,Pa.jsx)(ft.Edit2,{className:"h-3 Pa-3"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>l(m.id.toString()),className:"h-6 Pa-6 p-0 text-destructive hover:text-destructive",children:(0,Pa.jsx)(ft.Trash2,{className:"h-3 Pa-3"})})]})]}),(0,Pa.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,Pa.jsx)(S,{variant:b?"default":"outline",size:"sm",className:"text-xs Pa-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>te(m.id.toString()),disabled:!b&&u?.length>=3,children:(0,Pa.jsx)("span",{className:"pointer-events-none select-none",children:b?"Deselect":u?.length>=3?"Limit Reached":"Select"})})})]})},m.id)}):(0,Pa.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-8 Pa-8 mx-auto mb-2 opacity-50"}),(0,Pa.jsxs)("p",{className:"text-sm",children:['No sprints found for "',re,'" filter']}),(0,Pa.jsx)(S,{variant:"link",size:"sm",onClick:()=>me("all"),className:"text-xs",children:"Show all sprints"})]})}),u?.length===0&&(0,Pa.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Pa.jsxs)("div",{className:"text-center",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-6 Pa-6 mx-auto mb-2 text-muted-foreground"}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Pa.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Pa.jsx)("div",{className:"lg:col-span-1",children:(0,Pa.jsxs)(Y,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:P,onDragEnter:()=>W("backlog"),onDragLeave:_,onDrop:m=>ye(m,"backlog"),style:{height:A>0?`calc(100vh - ${A+200}px)`:"calc(100vh - 16rem)"},children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Pa.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsxs)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[xe?.length," tasks"]}),(0,Pa.jsxs)(K,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[st," pts"]})]})]}),(0,Pa.jsx)("div",{className:`flex-1 overflow-Pa-auto space-Pa-3 min-h-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:m,unassignedTasks:b}=We(xe);return(0,Pa.jsxs)(Pa.Fragment,{children:[Object.entries(m).map(([F,U])=>{let Ne=ge(F);if(!Ne)return null;let De=d.has(F);return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Xe(F),children:[(0,Pa.jsx)("div",{className:`Pa-3 h-3 rounded-full ${Ne.color}`}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:Ne.name}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",U?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:De?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 Pa-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 Pa-3 text-muted-foreground"})})]}),!De&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:U.map(Pe=>(0,Pa.jsx)(Te,{task:Pe},Pe.id))})]},F)}),b?.length>0&&(()=>{let F=d.has("no-epic");return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Xe("no-epic"),children:[(0,Pa.jsx)("div",{className:"Pa-3 h-3 rounded-full bg-gray-400"}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",b?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:F?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 Pa-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 Pa-3 text-muted-foreground"})})]}),!F&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:b?.map(U=>(0,Pa.jsx)(Te,{task:U},U.id))})]})})(),xe?.length===0&&(0,Pa.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),xe?.length>0&&Object.keys(m).length===0&&b.length===0&&(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),xe?.map(F=>(0,Pa.jsx)(Te,{task:F},F.id))]})]})})()})]})}),Z.map(m=>{let b=e.filter(U=>ve(U?.sprint)===m.id),F=b.reduce((U,Ne)=>U+(Ne?.storyPoints||0),0);return(0,Pa.jsxs)(Y,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:P,onDragEnter:()=>W(m.id.toString()),onDragLeave:_,onDrop:U=>ye(U,m.id.toString()),style:{height:A>0?`calc(100vh - ${A+200}px)`:"calc(100vh - 16rem)"},children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Pa.jsx)("div",{children:(0,Pa.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:m.name})}),(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsxs)(K,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[b?.length," tasks"]}),(0,Pa.jsxs)(K,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[F," pts"]}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>{ie(!0),kt(m)},className:"h-6 px-2",children:(0,Pa.jsx)(ft.Edit2,{className:"h-3 Pa-3"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>l(m.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Pa.jsx)(ft.Trash2,{className:"h-3 Pa-3"})})]})]}),(0,Pa.jsx)("div",{className:"flex-1 overflow-Pa-auto space-Pa-3 min-h-0",children:(()=>{let{tasksByEpic:U,unassignedTasks:Ne}=We(b);return(0,Pa.jsxs)(Pa.Fragment,{children:[Object.entries(U).map(([De,Pe])=>{let jt=ge(De);if(!jt)return null;let fa=d.has(De);return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Xe(De),children:[(0,Pa.jsx)("div",{className:`Pa-3 h-3 rounded-full ${jt.color}`}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:jt.name}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",Pe?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:fa?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 Pa-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 Pa-3 text-muted-foreground"})})]}),!fa&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:Pe?.map(va=>(0,Pa.jsx)(Te,{task:va},va.id))})]},De)}),Ne?.length>0&&(()=>{let De=d.has("no-epic");return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Xe("no-epic"),children:[(0,Pa.jsx)("div",{className:"Pa-3 h-3 rounded-full bg-gray-400"}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",Ne?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:De?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 Pa-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 Pa-3 text-muted-foreground"})})]}),!De&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:Ne?.map(Pe=>(0,Pa.jsx)(Te,{task:Pe},Pe.id))})]})})(),b?.length===0&&(0,Pa.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},m.id)})]}),(0,Pa.jsx)(pr,{isOpen:D,onClose:()=>E(!1),onAddSprint:$t})]})})]})};var po=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),uo=e=>{let[t,a]=e.split(":"),r=new Date;return r.setHours(parseInt(t),parseInt(a)),r.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},ua=(e,t)=>{let a=new Date,r=new Date(e);if(t){let[i,n]=t.split(":");r.setHours(parseInt(i),parseInt(n))}return r<a},ga=e=>{let t=new Date;return e.toDateString()===t.toDateString()},go=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},fo=({colleagues:e,onAddReminder:t,open:a,setOpen:r})=>{let[i,n]=(0,ce.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,l]=(0,ce.useState)(!1),u=d=>{if(d.preventDefault(),!e.find(T=>T?.id.toString()===i.colleagueId.toString())){console.error("No valid colleague selected"),l(!0);return}l(!1);let R={title:i.title,description:i.description,dueDate:new Date(i.dueDate).toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring,assignedColleague:Number(i.colleagueId),project:1,updatedAt:new Date().toISOString()};t(R),r(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ce.useEffect)(()=>{i.colleagueId&&l(!1)},[i.colleagueId]);let p=e.filter(Boolean);return(0,Pa.jsx)(He,{open:a,onOpenChange:r,children:(0,Pa.jsxs)(Ae,{className:"max-Pa-2xl",children:[(0,Pa.jsx)(Ie,{children:(0,Pa.jsx)(Le,{children:"Add New Reminder"})}),(0,Pa.jsxs)("form",{onSubmit:u,className:"space-Pa-4",children:[(0,Pa.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"title",children:"Title"}),(0,Pa.jsx)(j,{id:"title",value:i.title,onChange:d=>n({...i,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(fe,{id:"description",value:i.description,onChange:d=>n({...i,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"dueDate",children:"Due Date"}),(0,Pa.jsx)(j,{id:"dueDate",type:"date",value:i.dueDate,onChange:d=>n({...i,dueDate:d.target.value}),required:!0})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Pa.jsx)(j,{id:"dueTime",type:"time",value:i.dueTime,onChange:d=>n({...i,dueTime:d.target.value})})]})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Pa.jsxs)(ke,{value:i.colleagueId,onValueChange:d=>{n({...i,colleagueId:d})},required:!0,children:[(0,Pa.jsx)(we,{className:`${c?"text-destructive border-red-500":""}`,children:(0,Pa.jsx)(Ve,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Pa.jsx)(Ce,{children:p.map(d=>(0,Pa.jsx)(X,{value:d.id.toString(),children:d.name},d.id))})]}),c&&(0,Pa.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-2",children:[(0,Pa.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:d=>n({...i,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Pa.jsx)(k,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Pa.jsxs)(ke,{value:i.recurrencePattern,onValueChange:d=>n({...i,recurrencePattern:d}),children:[(0,Pa.jsx)(we,{children:(0,Pa.jsx)(Ve,{})}),(0,Pa.jsxs)(Ce,{children:[(0,Pa.jsx)(X,{value:"daily",children:"Daily"}),(0,Pa.jsx)(X,{value:"weekly",children:"Weekly"}),(0,Pa.jsx)(X,{value:"monthly",children:"Monthly"}),(0,Pa.jsx)(X,{value:"yearly",children:"Yearly"})]})]})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Pa.jsx)(j,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:d=>n({...i,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Pa.jsxs)("div",{className:"flex justify-end space-Pa-2",children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",children:"Add Reminder"})]})]})]})})},vo=({reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:i})=>{let[n,c]=(0,ce.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),l=p=>{p.preventDefault(),a(e.id.toString(),{title:n.title,description:n.description,dueDate:new Date(n.dueDate||"").toISOString(),dueTime:n.dueTime||void 0,isRecurring:n.isRecurring}),i()},u=t.filter(Boolean);return(0,Pa.jsx)(He,{open:r,onOpenChange:i,children:(0,Pa.jsxs)(Ae,{className:"max-Pa-2xl",children:[(0,Pa.jsx)(Ie,{children:(0,Pa.jsx)(Le,{children:"Edit Reminder"})}),(0,Pa.jsxs)("form",{onSubmit:l,className:"space-Pa-4",children:[(0,Pa.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"edit-title",children:"Title"}),(0,Pa.jsx)(j,{id:"edit-title",value:n.title,onChange:p=>c({...n,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"edit-description",children:"Description"}),(0,Pa.jsx)(fe,{id:"edit-description",value:n.description||"",onChange:p=>c({...n,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Pa.jsx)(j,{id:"edit-dueDate",type:"date",value:n.dueDate,onChange:p=>c({...n,dueDate:p.target.value}),required:!0})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(k,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Pa.jsx)(j,{id:"edit-dueTime",type:"time",value:n.dueTime,onChange:p=>c({...n,dueTime:p.target.value})})]})]}),(0,Pa.jsx)("div",{className:"space-Pa-2",children:(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-2",children:[(0,Pa.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:n.isRecurring||!1,onChange:p=>c({...n,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,Pa.jsx)(k,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Pa.jsxs)("div",{className:"flex justify-end space-Pa-2",children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",children:"Save Changes"})]})]})]})})},bo=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:r})=>{let[i,n]=(0,ce.useState)(!1);if(!e||!e.id)return null;let c=ua(new Date(e.dueDate||""),e.dueTime||""),l=ga(new Date(e.dueDate||"")),u=go(new Date(e.dueDate||"")),p=()=>{a(e.id.toString(),{})},d=()=>l?"Today":u?"Tomorrow":po(new Date(e.dueDate||""));return(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsx)(vo,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>n(!1)}),(0,Pa.jsx)(Y,{children:(0,Pa.jsx)(yt,{className:"p-4",children:(0,Pa.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Pa.jsxs)("div",{className:"flex items-start space-Pa-3 flex-1",children:[(0,Pa.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80"}),(0,Pa.jsxs)("div",{className:"flex-1",children:[(0,Pa.jsx)("div",{className:"flex items-center space-Pa-2 mb-1",children:(0,Pa.jsx)("h3",{children:e.title})}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-4 text-sm text-muted-foreground",children:[(0,Pa.jsx)("div",{className:"flex items-center space-Pa-1",children:(0,Pa.jsx)(ft.Calendar,{className:"h-4 Pa-4"})}),e.dueTime&&(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(ft.Clock,{className:"h-4 Pa-4"}),(0,Pa.jsx)("span",{children:uo(e.dueTime)})]}),(0,Pa.jsx)("div",{className:"flex items-center space-Pa-1",children:(0,Pa.jsx)(ft.User,{className:"h-4 Pa-4"})})]})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>n(!0),className:"h-8 Pa-8 p-0",children:(0,Pa.jsx)(ft.Edit2,{className:"h-4 Pa-4"})}),(0,Pa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>r(e.id.toString()),className:"h-8 Pa-8 p-0 text-destructive hover:text-destructive/80",children:(0,Pa.jsx)(ft.Trash2,{className:"h-4 Pa-4"})})]})]})})})]})},ho=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:r,onDeleteReminder:i})=>{let[n,c]=(0,ce.useState)(e.filter(Boolean)),[l]=(0,ce.useState)(t.filter(Boolean)),[u,p]=(0,ce.useState)("all"),[d,g]=(0,ce.useState)(""),[R,T]=(0,ce.useState)(!1),D=C=>{if(!C.title){console.error("Invalid reminder data:",C);return}let H={...C,id:Date.now(),createdAt:new Date().toISOString()};c(ae=>[...ae,H]),a?.(C)},E=(C,H)=>{if(!C){console.error("No reminder ID provided for update");return}c(ae=>ae.map(re=>re?.id.toString()===C?{...re,...H}:re)),r?.(C,H)},v=C=>{if(!C){console.error("No reminder ID provided for deletion");return}c(H=>H.filter(ae=>ae?.id.toString()!==C)),i?.(C)},B=n.filter(C=>{if(!C)return!1;if(d){let H=d.toLowerCase();if(!(C.title.toLowerCase().includes(H)||C.description?.toLowerCase().includes(H)))return!1}switch(u){case"pending":case"completed":case"overdue":return ua(new Date(C.dueDate||""),C.dueTime||"");case"today":return ga(new Date(C.dueDate||""));default:return!0}}).sort((C,H)=>{if(!C||!H)return 0;let ae={high:3,medium:2,low:1},re=0;return re!==0?re:new Date(C.dueDate||"").getTime()-new Date(H.dueDate||"").getTime()}),V={total:n.filter(Boolean).length,overdue:n.filter(C=>C&&ua(new Date(C.dueDate||""),C.dueTime||"")).length,today:n.filter(C=>C&&ga(new Date(C.dueDate||""))).length},$=l.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,Pa.jsxs)("div",{className:"px-2 md:px-4 py-4 space-Pa-8",children:[(0,Pa.jsx)(rt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{T(!0)}}}),(0,Pa.jsxs)("div",{className:"h-full bg-background",children:[(0,Pa.jsx)(fo,{colleagues:l,onAddReminder:D,open:R,setOpen:T}),(0,Pa.jsxs)("div",{className:"p-6",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Pa.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Pa.jsxs)(S,{className:"flex items-center space-Pa-2",onClick:()=>T(!0),children:[(0,Pa.jsx)(ft.Plus,{className:"h-4 Pa-4"}),(0,Pa.jsx)("span",{children:"Add Reminder"})]})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Pa.jsxs)(Y,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-foreground",children:V.total}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Pa.jsxs)(Y,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-primary",children:V.overdue}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Pa.jsxs)(Y,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-success",children:V.today}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Pa.jsxs)(Y,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-destructive",children:V.overdue}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Pa.jsxs)(Y,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-warning",children:V.today}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-4 mb-6",children:[(0,Pa.jsx)("div",{className:"flex-1",children:(0,Pa.jsx)(j,{placeholder:"Search reminders...",value:d,onChange:C=>g(C.target.value),className:"max-Pa-md"})}),(0,Pa.jsxs)(ke,{value:u,onValueChange:C=>p(C),children:[(0,Pa.jsx)(we,{className:"Pa-40",children:(0,Pa.jsx)(Ve,{})}),(0,Pa.jsxs)(Ce,{children:[(0,Pa.jsxs)(X,{value:"all",children:["All (",V.total,")"]}),(0,Pa.jsxs)(X,{value:"overdue",children:["Overdue (",V.overdue,")"]}),(0,Pa.jsxs)(X,{value:"overdue",children:["Overdue (",V.overdue,")"]}),(0,Pa.jsxs)(X,{value:"today",children:["Today (",V.today,")"]})]})]})]}),(0,Pa.jsx)("div",{className:"space-Pa-4",children:B.length===0?(0,Pa.jsxs)(Y,{className:"p-8 text-center",children:[(0,Pa.jsx)("div",{className:"text-muted-foreground",children:d||u!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&u==="all"&&(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):B.map(C=>C&&(0,Pa.jsx)(bo,{reminder:C,colleagues:l,onUpdateReminder:E,onDeleteReminder:v},C.id))})]})]})]})};var xo=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddTaskToEpic:n,onAddEpic:c,onUpdateEpic:l,onDeleteEpic:u})=>{let[p,d]=(0,ce.useState)(t),[g,R]=(0,ce.useState)(null),[T,D]=(0,ce.useState)(null),[E,v]=(0,ce.useState)({}),[f,B]=(0,ce.useState)(0),[V,$]=(0,ce.useState)(!1),[C,H]=(0,ce.useState)(!1),[ae,re]=(0,ce.useState)(null),me=(0,ce.useRef)(null),G=(0,ce.useRef)(null);(0,ce.useEffect)(()=>{d(t)},[t]),(0,ce.useEffect)(()=>{let h=()=>{if(me.current){let st=me.current.offsetHeight;B(st)}};h();let Z=new ResizeObserver(h);me.current&&Z.observe(me.current);let xe=()=>{setTimeout(h,100)};return window.addEventListener("storage",xe),()=>{Z.disconnect(),window.removeEventListener("storage",xe)}},[]),(0,ce.useEffect)(()=>{let h=setTimeout(()=>{me.current&&B(me.current.offsetHeight)},300);return()=>clearTimeout(h)},[T]);let ie=h=>{R(h)},A=h=>{h.preventDefault()},ot=(h,Z)=>{h.preventDefault(),g&&ve(g.epic).toString()!==Z&&(r(g.id.toString(),{epic:Number(Z)}),R(null))},he=h=>e.filter(Z=>ve(Z.epic).toString()===h),Ue=h=>{D(h.id.toString()),v({name:h.name,description:h.description,confidence:h.confidence,phase:h.phase})},ge=async()=>{T&&E.name&&(await l(T.toString(),E),d(h=>h.map(Z=>Z.id.toString()===T?{...Z,...E}:Z)),D(null),v({}))},Je=()=>{D(null),v({})},$e=async h=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await u(h),d(Z=>Z.filter(xe=>xe.id.toString()!==h)))},je=h=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[h]||`Phase ${h}`,We=h=>{switch(h){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsxs)("div",{ref:G,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Pa.jsx)("div",{ref:me,className:"flex-shrink-0",children:(0,Pa.jsx)(rt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>$(!0)}})}),(0,Pa.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Pa.jsx)("div",{className:"h-full overflow-Pa-auto",style:{height:f>0?`calc(100vh - ${f+120}px)`:"calc(100vh - 12rem)"},children:(0,Pa.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:p.map(h=>{let Z=he(h.id.toString()),xe=Z.reduce((te,Xe)=>te+(Xe.storyPoints||0),0),st=f>0?`calc(100vh - ${f+200}px)`:"calc(100vh - 14rem)";return(0,Pa.jsxs)(Y,{className:`flex flex-col ${T===h.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:T===h.id.toString()?"auto":st,minHeight:"400px"},onDragOver:A,onDrop:te=>ot(te,h.id.toString()),children:[(0,Pa.jsx)("div",{className:"p-4 border-b border-border",children:T===h.id.toString()?(0,Pa.jsxs)("div",{className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)(j,{value:E.name||"",onChange:te=>v({...E,name:te.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Pa.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:ge,className:"p-1 h-8 Pa-8",children:(0,Pa.jsx)(ft.Check,{className:"h-4 Pa-4"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:Je,className:"p-1 h-8 Pa-8",children:(0,Pa.jsx)(ft.X,{className:"h-4 Pa-4"})})]})]}),(0,Pa.jsx)(fe,{value:E.description||"",onChange:te=>v({...E,description:te.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Pa.jsxs)("select",{value:E.confidence||h.confidence,onChange:te=>v({...E,confidence:te.target.value}),className:"flex h-8 Pa-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[(0,Pa.jsx)("option",{value:"low",children:"Low"}),(0,Pa.jsx)("option",{value:"medium",children:"Medium"}),(0,Pa.jsx)("option",{value:"high",children:"High"})]})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Pa.jsx)("select",{value:E.phase?.toString()||h.phase.toString(),onChange:te=>v({...E,phase:parseInt(te.target.value)}),className:"flex h-8 Pa-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[1,2,3,4,5,6,7,8,9].map(te=>(0,Pa.jsxs)("option",{value:te.toString(),children:["Phase ",te]},te))})]})]})]}):(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Pa.jsx)("div",{className:`Pa-4 h-4 rounded-full ${h.color}`}),(0,Pa.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:h.name}),(0,Pa.jsxs)("div",{className:"flex gap-1",children:[(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Ue(h),className:"p-1 h-8 Pa-8",children:(0,Pa.jsx)(ft.Edit2,{className:"h-3 Pa-3"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>$e(h.id.toString()),className:"p-1 h-8 Pa-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Pa.jsx)(ft.Trash2,{className:"h-3 Pa-3"})})]})]}),(0,Pa.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Pa.jsxs)(K,{className:`text-xs ${We(h.confidence)}`,children:[h.confidence," confidence"]}),(0,Pa.jsxs)(K,{variant:"outline",className:"text-xs",children:["Phase ",h.phase]}),(0,Pa.jsxs)(K,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Z.length," tasks"]}),(0,Pa.jsxs)(K,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[xe," pts"]})]}),h.description&&(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:h.description}),(0,Pa.jsxs)(S,{onClick:()=>{H(!0),re(h)},variant:"outline",size:"sm",className:"Pa-full gap-2",children:[(0,Pa.jsx)(ft.Plus,{className:"h-4 Pa-4"}),"Add Task"]})]})}),(0,Pa.jsx)("div",{className:"flex-1 p-4 overflow-Pa-auto",children:(0,Pa.jsx)("div",{className:`space-Pa-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:Z.length===0?(0,Pa.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,Pa.jsx)(ft.Move,{className:"h-8 Pa-8 mb-2"}),(0,Pa.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):Z.map(te=>(0,Pa.jsx)(wt,{task:te,epic:h,onDragStart:ie,onTaskClick:i,isCompact:!0},te.id))})})]},h.id)})})})})]}),(0,Pa.jsx)(Ot,{isOpen:V,onClose:()=>$(!1),onAddEpic:c}),(0,Pa.jsx)(At,{isOpen:C,onClose:()=>H(!1),onAddTask:n,assignees:[],epics:[],defaultEpicId:ae?.id.toString()||"",sprints:a})]})};0&&(module.exports={DCProjectCard,EpicsView,KanbanBoardView,PlanningView,TasksView});
|