cortex-react-components 2.13.2 → 2.13.3
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-RGOKBIQ5.mjs → chunk-255P6K5W.mjs} +1 -1
- package/dist/{chunk-6R6NYDWN.mjs → chunk-2HWSTGAP.mjs} +1 -1
- package/dist/chunk-2IMVYO7X.mjs +1 -0
- package/dist/{chunk-GTZJWMZR.mjs → chunk-2RQDJ5XT.mjs} +1 -1
- package/dist/{chunk-CR326IJ6.mjs → chunk-4L77KQ2E.mjs} +1 -1
- package/dist/chunk-5N4WW7O2.mjs +1 -0
- package/dist/{chunk-75F3LJMX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
- package/dist/{chunk-EM3T2XYC.mjs → chunk-5WVFEIMC.mjs} +1 -1
- package/dist/{chunk-ZEALRBXW.mjs → chunk-62A35O55.mjs} +1 -1
- package/dist/{chunk-RJGYVDOU.mjs → chunk-67QPOSVV.mjs} +1 -1
- package/dist/chunk-6BQNN2KT.mjs +1 -0
- package/dist/chunk-6NED7ZVK.mjs +1 -0
- package/dist/{chunk-CXOVEABI.mjs → chunk-7GMAMIHM.mjs} +1 -1
- package/dist/{chunk-ITJH72Z2.mjs → chunk-CLGBBNRB.mjs} +1 -1
- package/dist/{chunk-5EQXJS23.mjs → chunk-DMCFEJ2C.mjs} +1 -1
- package/dist/chunk-DTIHVFME.mjs +4 -0
- package/dist/{chunk-POIHYOIP.mjs → chunk-E6UOMRHI.mjs} +1 -1
- package/dist/chunk-E6Y5COQK.mjs +1 -0
- package/dist/{chunk-WIRQ5IRT.mjs → chunk-ERJXTG6X.mjs} +1 -1
- package/dist/{chunk-3NRXQBBS.mjs → chunk-FKU4VQR6.mjs} +1 -1
- package/dist/{chunk-GHOL5L32.mjs → chunk-H3CJOE6S.mjs} +1 -1
- package/dist/{chunk-NINFDOV5.mjs → chunk-HKGW6JI2.mjs} +1 -1
- package/dist/{chunk-LJXTXROJ.mjs → chunk-I2GNNRFH.mjs} +1 -1
- package/dist/{chunk-FE7ZGUPU.mjs → chunk-IF3425JX.mjs} +1 -1
- package/dist/{chunk-NSJPZJQF.mjs → chunk-IK3AM53W.mjs} +1 -1
- package/dist/chunk-KG7HG2VO.mjs +1 -0
- package/dist/{chunk-AJQHGVZ5.mjs → chunk-LJQPLE4S.mjs} +1 -1
- package/dist/{chunk-ZKSZJI4F.mjs → chunk-LVXEY6OU.mjs} +1 -1
- package/dist/{chunk-3HNU2NYP.mjs → chunk-M7NV6EFH.mjs} +1 -1
- package/dist/{chunk-KIYBEYSU.mjs → chunk-MXCW6SOT.mjs} +1 -1
- package/dist/{chunk-2BRDNDUB.mjs → chunk-N3B3XNV3.mjs} +1 -1
- package/dist/chunk-NGX2VCHS.mjs +1 -0
- package/dist/{chunk-3Y7QG6VP.mjs → chunk-NWISIJFD.mjs} +1 -1
- package/dist/{chunk-5MWZTJYP.mjs → chunk-PK3OBSCB.mjs} +1 -1
- package/dist/{chunk-Q67RF7VO.mjs → chunk-QG4QCB5I.mjs} +1 -1
- package/dist/{chunk-A7SGFSI5.mjs → chunk-QSXEJ2NO.mjs} +1 -1
- package/dist/{chunk-3AWUWWR4.mjs → chunk-RMWGIZJX.mjs} +1 -1
- package/dist/{chunk-KCEJXXM2.mjs → chunk-RVHCTANZ.mjs} +1 -1
- package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
- package/dist/{chunk-6MSM3CZ6.mjs → chunk-TL2RQFU5.mjs} +1 -1
- package/dist/{chunk-7FWAJQRH.mjs → chunk-TO7SVJIU.mjs} +1 -1
- package/dist/chunk-TOI73VEE.mjs +1 -0
- package/dist/{chunk-ZGQC6O62.mjs → chunk-UEBQJNVT.mjs} +1 -1
- package/dist/chunk-UVHMI3PU.mjs +1 -0
- package/dist/chunk-WSQHAE6Q.mjs +1 -0
- package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
- package/dist/{chunk-E2OSUDXP.mjs → chunk-XKGBG5FX.mjs} +1 -1
- package/dist/chunk-XNEPSYCO.mjs +1 -0
- package/dist/{chunk-C4RWEPVF.mjs → chunk-YKG4FNS4.mjs} +1 -1
- package/dist/{chunk-UXOUJ5YO.mjs → chunk-ZB7RDJRP.mjs} +1 -1
- package/dist/components/AdvancedComponents/app-header.mjs +1 -1
- package/dist/components/AdvancedComponents/index.mjs +1 -1
- 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/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/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/DigitalColleageusLayout.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.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/{DigitalColleageusLayout.mjs → FoundaryLayout.mjs} +1 -1
- package/dist/components/Foundary/MainPage.mjs +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/{digital-colleague-clone.mjs → foundary-clone.mjs} +1 -1
- package/dist/components/Foundary/{digital-colleague-options.mjs → foundary-options.mjs} +1 -1
- package/dist/components/Foundary/index.d.ts +3 -3
- 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/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/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/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.d.ts +1 -1
- package/dist/components/Projects/AddEpicModal.js +1 -1
- package/dist/components/Projects/AddEpicModal.mjs +1 -1
- package/dist/components/Projects/AddSprintModal.d.ts +1 -1
- package/dist/components/Projects/AddSprintModal.js +1 -1
- package/dist/components/Projects/AddSprintModal.mjs +1 -1
- package/dist/components/Projects/AddTaskModal.d.ts +2 -2
- 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 +1 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.d.ts +6 -4
- package/dist/components/Projects/KanbanBoardView.js +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/PlanningView.d.ts +1 -1
- package/dist/components/Projects/PlanningView.js +1 -1
- package/dist/components/Projects/PlanningView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.d.ts +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 -42
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/TaskCard.d.ts +2 -2
- package/dist/components/Projects/TaskCard.js +1 -1
- package/dist/components/Projects/TaskCard.mjs +1 -1
- package/dist/components/Projects/TaskDetailsModal.d.ts +1 -1
- package/dist/components/Projects/TaskDetailsModal.js +1 -1
- package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
- package/dist/components/Projects/TaskSidebar.d.ts +1 -1
- package/dist/components/Projects/TaskSidebar.js +1 -1
- package/dist/components/Projects/TaskSidebar.mjs +1 -1
- package/dist/components/Projects/TasksView.d.ts +1 -1
- package/dist/components/Projects/TasksView.js +1 -1
- package/dist/components/Projects/TasksView.mjs +1 -1
- package/dist/components/Projects/index.js +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/creative.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +12 -12
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/index.js +17 -17
- 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/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/dist/utils/extract-id.d.ts +1 -0
- package/dist/utils/extract-id.js +1 -0
- package/dist/utils/extract-id.mjs +1 -0
- package/package.json +1 -1
- package/dist/chunk-2C4UDLVF.mjs +0 -1
- package/dist/chunk-4A3MGS6I.mjs +0 -1
- package/dist/chunk-4HHGVL3E.mjs +0 -1
- package/dist/chunk-6DEY5ZDD.mjs +0 -1
- package/dist/chunk-6TUNKKV7.mjs +0 -1
- package/dist/chunk-GGJZVAC4.mjs +0 -4
- package/dist/chunk-KW6L6KBY.mjs +0 -1
- package/dist/chunk-MBPTBEOX.mjs +0 -1
- package/dist/chunk-NKDFAFWH.mjs +0 -1
- package/dist/chunk-O57JJTH5.mjs +0 -1
- package/dist/chunk-ORNGKQM7.mjs +0 -1
- /package/dist/{chunk-6LEH6XKI.mjs → chunk-M2REXGQW.mjs} +0 -0
- /package/dist/{chunk-SGK4ZXKR.mjs → chunk-NDZ26EG6.mjs} +0 -0
- /package/dist/components/Foundary/{DigitalColleageusLayout.css → FoundaryLayout.css} +0 -0
- /package/dist/components/Foundary/{DigitalColleageusLayout.d.ts → FoundaryLayout.d.ts} +0 -0
- /package/dist/components/Foundary/{DigitalColleageusLayout.js → FoundaryLayout.js} +0 -0
- /package/dist/components/Foundary/{digital-colleague-clone.css → foundary-clone.css} +0 -0
- /package/dist/components/Foundary/{digital-colleague-clone.d.ts → foundary-clone.d.ts} +0 -0
- /package/dist/components/Foundary/{digital-colleague-clone.js → foundary-clone.js} +0 -0
- /package/dist/components/Foundary/{digital-colleague-options.css → foundary-options.css} +0 -0
- /package/dist/components/Foundary/{digital-colleague-options.d.ts → foundary-options.d.ts} +0 -0
- /package/dist/components/Foundary/{digital-colleague-options.js → foundary-options.js} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
'use client'
|
|
4
4
|
|
|
5
|
-
"use strict";var cr=Object.create;var wt=Object.defineProperty;var mr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var ur=Object.getPrototypeOf,gr=Object.prototype.hasOwnProperty;var fr=(e,t)=>{for(var r in t)wt(e,r,{get:t[r],enumerable:!0})},pa=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of pr(t))!gr.call(e,n)&&n!==r&&wt(e,n,{get:()=>t[n],enumerable:!(o=mr(t,n))||o.enumerable});return e};var ie=(e,t,r)=>(r=e!=null?cr(ur(e)):{},pa(t||!e||!e.__esModule?wt(r,"default",{value:e,enumerable:!0}):r,e)),vr=e=>pa(wt({},"__esModule",{value:!0}),e);var ho={};fr(ho,{DCProjectCard:()=>Ea,EpicsView:()=>bo,KanbanBoardView:()=>io,PlanningView:()=>no,TasksView:()=>vo});module.exports=vr(ho);var Ra=require("motion/react"),dt=require("lucide-react");var wa=require("class-variance-authority");var Na=require("clsx");var Gt="-",br=e=>{let t=xr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let d=c.split(Gt);return d[0]===""&&d.length!==1&&d.shift(),fa(d,t)||hr(c)},getConflictingClassGroupIds:(c,d)=>{let g=r[c]||[];return d&&o[c]?[...g,...o[c]]:g}}},fa=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?fa(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let s=e.join(Gt);return t.validators.find(({validator:c})=>c(s))?.classGroupId},ua=/^\[(.+)\]$/,hr=e=>{if(ua.test(e)){let t=ua.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},xr=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Nr(Object.entries(e.classGroups),r).forEach(([s,c])=>{$t(c,o,s,t)}),o},$t=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let s=n===""?t:ga(t,n);s.classGroupId=r;return}if(typeof n=="function"){if(yr(n)){$t(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([s,c])=>{$t(c,ga(t,s),r,o)})})},ga=(e,t)=>{let r=e;return t.split(Gt).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},yr=e=>e.isThemeGetter,Nr=(e,t)=>t?e.map(([r,o])=>{let n=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([c,d])=>[t+c,d])):s);return[r,n]}):e,wr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,n=(s,c)=>{r.set(s,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(s){let c=r.get(s);if(c!==void 0)return c;if((c=o.get(s))!==void 0)return n(s,c),c},set(s,c){r.has(s)?r.set(s,c):n(s,c)}}},va="!",Cr=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],s=t.length,c=d=>{let g=[],p=0,l=0,f;for(let y=0;y<d.length;y++){let H=d[y];if(p===0){if(H===n&&(o||d.slice(y,y+s)===t)){g.push(d.slice(l,y)),l=y+s;continue}if(H==="/"){f=y;continue}}H==="["?p++:H==="]"&&p--}let P=g.length===0?d:d.substring(l),u=P.startsWith(va),x=u?P.substring(1):P,L=f&&f>l?f-l:void 0;return{modifiers:g,hasImportantModifier:u,baseClassName:x,maybePostfixModifierPosition:L}};return r?d=>r({className:d,parseClassName:c}):c},Sr=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},kr=e=>({cache:wr(e.cacheSize),parseClassName:Cr(e),...br(e)}),Dr=/\s+/,Tr=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,s=[],c=e.trim().split(Dr),d="";for(let g=c.length-1;g>=0;g-=1){let p=c[g],{modifiers:l,hasImportantModifier:f,baseClassName:P,maybePostfixModifierPosition:u}=r(p),x=!!u,L=o(x?P.substring(0,u):P);if(!L){if(!x){d=p+(d.length>0?" "+d:d);continue}if(L=o(P),!L){d=p+(d.length>0?" "+d:d);continue}x=!1}let y=Sr(l).join(":"),H=f?y+va:y,K=H+L;if(s.includes(K))continue;s.push(K);let j=n(L,x);for(let ae=0;ae<j.length;++ae){let v=j[ae];s.push(H+v)}d=p+(d.length>0?" "+d:d)}return d};function Pr(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ba(t))&&(o&&(o+=" "),o+=r);return o}var ba=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=ba(e[o]))&&(r&&(r+=" "),r+=t);return r};function Rr(e,...t){let r,o,n,s=c;function c(g){let p=t.reduce((l,f)=>f(l),e());return r=kr(p),o=r.cache.get,n=r.cache.set,s=d,d(g)}function d(g){let p=o(g);if(p)return p;let l=Tr(g,r);return n(g,l),l}return function(){return s(Pr.apply(null,arguments))}}var Z=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},ha=/^\[(?:([Ca-Ca-]+):)?(.+)\]$/Ca,Er=/^\d+\/\d+$/,Ir=new Set(["px","full","screen"]),Ar=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|Ca|Ca|min|max))|\Ca(calc|min|max|clamp)\(.+\)|^0$/,Br=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Mr=/^(inset_)?-?((\d+)?\.?(\d+)[Ca-Ca]+|0)_-?((\d+)?\.?(\d+)[Ca-Ca]+|0)/,zr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ge=e=>nt(e)||Ir.has(e)||Er.test(e),_e=e=>lt(e,"length",jr),nt=e=>!!e&&!Number.isNaN(Number(e)),Vt=e=>lt(e,"number",nt),pt=e=>!!e&&Number.isInteger(Number(e)),Fr=e=>e.endsWith("%")&&nt(e.slice(0,-1)),I=e=>ha.test(e),qe=e=>Ar.test(e),Or=new Set(["length","size","percentage"]),Hr=e=>lt(e,Or,xa),Vr=e=>lt(e,"position",xa),$r=new Set(["image","url"]),Gr=e=>lt(e,$r,_r),Ur=e=>lt(e,"",Wr),ut=()=>!0,lt=(e,t,r)=>{let o=ha.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},jr=e=>Lr.test(e)&&!Br.test(e),xa=()=>!1,Wr=e=>Mr.test(e),_r=e=>zr.test(e);var qr=()=>{let e=Z("colors"),t=Z("spacing"),r=Z("blur"),o=Z("brightness"),n=Z("borderColor"),s=Z("borderRadius"),c=Z("borderSpacing"),d=Z("borderWidth"),g=Z("contrast"),p=Z("grayscale"),l=Z("hueRotate"),f=Z("invert"),P=Z("gap"),u=Z("gradientColorStops"),x=Z("gradientColorStopPositions"),L=Z("inset"),y=Z("margin"),H=Z("opacity"),K=Z("padding"),j=Z("saturate"),ae=Z("scale"),v=Z("sepia"),F=Z("skew"),Y=Z("space"),J=Z("translate"),Se=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],xe=()=>["auto",I,t],E=()=>[I,t],w=()=>["",Ge,_e],_=()=>["auto",nt,I],Re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ve=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>["start","end","center","between","around","evenly","stretch"],De=()=>["","0",I],Ye=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ke=()=>[nt,I];return{cacheSize:500,separator:":",theme:{colors:[ut],spacing:[Ge,_e],blur:["none","",qe,I],brightness:ke(),borderColor:[e],borderRadius:["none","","full",qe,I],borderSpacing:E(),borderWidth:w(),contrast:ke(),grayscale:De(),hueRotate:ke(),invert:De(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[Fr,_e],inset:xe(),margin:xe(),opacity:ke(),padding:E(),saturate:ke(),scale:ke(),sepia:De(),skew:ke(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",I]}],container:["container"],columns:[{columns:[qe]}],"break-after":[{"break-after":Ye()}],"break-before":[{"break-before":Ye()}],"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:[...Re(),I]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:Se()}],"overscroll-x":[{"overscroll-x":Se()}],"overscroll-y":[{"overscroll-y":Se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[L]}],"inset-x":[{"inset-x":[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"],Ca:[{Ca:["auto",pt,I]}],basis:[{basis:xe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",I]}],grow:[{grow:De()}],shrink:[{shrink:De()}],order:[{order:["first","last","none",pt,I]}],"grid-cols":[{"grid-cols":[ut]}],"col-start-end":[{col:["auto",{span:["full",pt,I]},I]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[ut]}],"row-start-end":[{row:["auto",{span:[pt,I]},I]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",I]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",I]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...Ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[K]}],px:[{px:[K]}],py:[{py:[K]}],ps:[{ps:[K]}],pe:[{pe:[K]}],pt:[{pt:[K]}],pr:[{pr:[K]}],pb:[{pb:[K]}],pl:[{pl:[K]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],dt:[{dt:[y]}],dt:[{dt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[Y]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Y]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",I,t]}],"min-w":[{"min-w":[I,t,"min","max","fit"]}],"max-w":[{"max-w":[I,t,"none","full","min","max","fit","prose",{screen:[qe]},qe]}],h:[{h:[I,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[I,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[I,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[I,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qe,_e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vt]}],"font-family":[{font:[ut]}],"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",I]}],"line-clamp":[{"line-clamp":["none",nt,Vt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ge,I]}],"list-image":[{"list-image":["none",I]}],"list-style-type":[{list:["none","disc","decimal",I]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[H]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[H]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ge,_e]}],"underline-offset":[{"underline-offset":["auto",Ge,I]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",I]}],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",I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[H]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Re(),Vr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Hr]}],"bg-image":[{bg:["none",{"gradient-to":["t","ce","r","br","Ca","bl","l","tl"]},Gr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[u]}],"gradient-via":[{via:[u]}],"gradient-to":[{to:[u]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-Ca":[{"rounded-Ca":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-Ca":[{"rounded-Ca":[s]}],"rounded-Ca":[{"rounded-Ca":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-ce":[{"rounded-ce":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-Ca":[{"border-Ca":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[H]}],"border-style":[{border:[...ve(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[H]}],"divide-style":[{divide:ve()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-Ca":[{"border-Ca":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...ve()]}],"outline-offset":[{"outline-offset":[Ge,I]}],"outline-w":[{outline:[Ge,_e]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:w()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[H]}],"ring-offset-w":[{"ring-offset":[Ge,_e]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qe,Ur]}],"shadow-color":[{shadow:[ut]}],opacity:[{opacity:[H]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",qe,I]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[f]}],saturate:[{saturate:[j]}],sepia:[{sepia:[v]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[H]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[v]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",I]}],duration:[{duration:ke()}],ease:[{ease:["linear","in","out","in-out",I]}],delay:[{delay:ke()}],animate:[{animate:["none","spin","ping","pulse","bounce",I]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[ae]}],"scale-x":[{"scale-x":[ae]}],"scale-y":[{"scale-y":[ae]}],rotate:[{rotate:[pt,I]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"skew-x":[{"skew-x":[F]}],"skew-y":[{"skew-y":[F]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",I]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","Ca-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",I]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-dt":[{"scroll-dt":E()}],"scroll-dt":[{"scroll-dt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",I]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ge,_e,Vt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","dt","dt","mr","mb","ml"],mx:["mr","ml"],my:["dt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-Ca","rounded-l","rounded-ss","rounded-Ca","rounded-Ca","rounded-es","rounded-tl","rounded-ce","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Ca","rounded-Ca"],"rounded-t":["rounded-tl","rounded-ce"],"rounded-r":["rounded-ce","rounded-br"],"rounded-Ca":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-Ca","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-Ca"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-Ca","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-Ca"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-dt","scroll-dt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-dt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ya=Rr(qr);function k(...e){return ya((0,Na.clsx)(e))}var Ca=require("react/jsx-runtime"),Kr=(0,wa.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 W({className:e,variant:t,...r}){return(0,Ca.jsx)("div",{className:k(Kr({variant:t}),e),...r})}var Sa=require("@radix-ui/react-slot"),Da=ie(require("react")),Ct=(0,wa.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",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=Da.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...n},s)=>(0,Ca.jsx)(e?Sa.Slot:"button",{className:k(Ct({className:t,size:r,variant:o})),ref:s,...n}));D.displayName="Button";var Qe=ie(require("react"));var Q=Qe.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)("div",{ref:r,className:k("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Q.displayName="Card";var Ut=Qe.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)("div",{ref:r,className:k("flex flex-col space-y-1.5 p-6",e),...t}));Ut.displayName="CardHeader";var jt=Qe.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)("div",{ref:r,className:k("font-semibold leading-none tracking-tight",e),...t}));jt.displayName="CardTitle";var Wt=Qe.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)("div",{ref:r,className:k("text-sm text-muted-foreground",e),...t}));Wt.displayName="CardDescription";var gt=Qe.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)("div",{ref:r,className:k("p-6 pt-0",e),...t}));gt.displayName="CardContent";var _t=Qe.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)("div",{ref:r,className:k("flex items-center p-6 pt-0",e),...t}));_t.displayName="CardFooter";var Pa=ie(require("react")),ft=ie(require("@radix-ui/react-progress"));var Kt=Pa.forwardRef(({className:e,value:t,...r},o)=>(0,Ca.jsx)(ft.Root,{ref:o,className:k("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:(0,Ca.jsx)(ft.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Kt.displayName=ft.Root.displayName;function Ea({project:e,onOpen:t,onShare:r,className:o}){return(0,Ca.jsx)(Ra.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Ca.jsxs)(Q,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Ca.jsxs)(Ut,{children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)(jt,{children:e.name}),(0,Ca.jsxs)(W,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Ca.jsx)(Wt,{children:e.description})]}),(0,Ca.jsxs)(gt,{className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ca.jsx)("span",{children:"Progress"}),(0,Ca.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Ca.jsx)(Kt,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Ca.jsxs)("div",{className:"flex items-center",children:[(0,Ca.jsx)(dt.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,Ca.jsxs)("div",{className:"flex items-center",children:[(0,Ca.jsx)(dt.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,Ca.jsxs)(_t,{className:"flex gap-2",children:[(0,Ca.jsx)(D,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Ca.jsx)(D,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>r?.(e),children:(0,Ca.jsx)(dt.Share2,{className:"h-4 w-4"})})]})]})})}var ce=require("react");var Ia=({title:e,status:t,taskCount:r,children:o,onDrop:n,isCompact:s=!1,height:c})=>{let d=l=>{l.preventDefault()},g=l=>{l.preventDefault(),n(t)};return(0,Ca.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 ${s?"lg:max-w-xs":""}`,style:{height:c||"calc(100vh - 350px)"},onDragOver:d,onDrop:g,children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Ca.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,Ca.jsx)(W,{variant:"secondary",className:"bg-muted text-muted-foreground",children:r})]}),(0,Ca.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var St=({task:e,epic:t,onDragStart:r,onTaskClick:o,isCompact:n=!1})=>{let s=l=>{r(e)},c=()=>{o(e)},d=()=>{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"}},g=()=>{switch(e.type){case"story":return(0,Ca.jsx)(dt.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Ca.jsx)(dt.Bug,{className:"h-3 w-3"});case"spike":return(0,Ca.jsx)(dt.Zap,{className:"h-3 w-3"});case"task":default:return(0,Ca.jsx)(dt.AlertCircle,{className:"h-3 w-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 n?(0,Ca.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:s,onClick:c,children:(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:g()}),(0,Ca.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Ca.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:s,onClick:c,children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ca.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[g(),(0,Ca.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Ca.jsxs)("div",{className:"flex gap-1",children:[(0,Ca.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${d()}`,children:e.priority}),(0,Ca.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.points})]})]}),(0,Ca.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Ca.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,Ca.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ca.jsx)(dt.User,{className:"h-4 w-4"}),(0,Ca.jsx)("span",{children:e.assignee?.value?.name})]})})]})};var vt=ie(require("react")),pe=ie(require("@radix-ui/react-dialog"));var Oe=pe.Root;var Jr=pe.Portal;var La=vt.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(pe.Overlay,{ref:r,className:k("fixed inset-0 Ca-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}));La.displayName=pe.Overlay.displayName;var Ie=vt.forwardRef(({className:e,children:t,...r},o)=>(0,Ca.jsxs)(Jr,{children:[(0,Ca.jsx)(La,{}),(0,Ca.jsxs)(pe.Content,{ref:o,className:k("fixed left-[50%] top-[50%] Ca-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,(0,Ca.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,Ca.jsx)(dt.X,{className:"h-4 w-4"}),(0,Ca.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ie.displayName=pe.Content.displayName;var Ae=({className:e,...t})=>(0,Ca.jsx)("div",{className:k("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ae.displayName="DialogHeader";var bt=({className:e,...t})=>(0,Ca.jsx)("div",{className:k("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});bt.displayName="DialogFooter";var Le=vt.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(pe.Title,{ref:r,className:k("text-lg font-semibold leading-none tracking-tight",e),...t}));Le.displayName=pe.Title.displayName;var Xr=vt.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(pe.Description,{ref:r,className:k("text-sm text-muted-foreground",e),...t}));Xr.displayName=pe.Description.displayName;var Ba=ie(require("react"));var $=Ba.forwardRef(({className:e,type:t,...r},o)=>(0,Ca.jsx)("input",{type:t,className:k("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));$.displayName="Input";var za=ie(require("react")),be=za.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)("textarea",{className:k("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));be.displayName="Textarea";var M=ie(require("@radix-ui/react-select")),Ke=ie(require("react")),ue=M.Root;var Ce=M.Value,ne=Ke.forwardRef(({children:e,className:t,...r},o)=>(0,Ca.jsxs)(M.Trigger,{className:k("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...r,children:[e,(0,Ca.jsx)(M.Icon,{asChild:!0,children:(0,Ca.jsx)(dt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ne.displayName=M.Trigger.displayName;var Oa=Ke.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(M.ScrollUpButton,{className:k("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ca.jsx)(dt.ChevronUp,{className:"h-4 w-4"})}));Oa.displayName=M.ScrollUpButton.displayName;var Ha=Ke.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(M.ScrollDownButton,{className:k("flex cursor-default items-center justify-center py-1",e),ref:r,...t,children:(0,Ca.jsx)(dt.ChevronDown,{className:"h-4 w-4"})}));Ha.displayName=M.ScrollDownButton.displayName;var le=Ke.forwardRef(({children:e,className:t,position:r="popper",...o},n)=>(0,Ca.jsx)(M.Portal,{children:(0,Ca.jsxs)(M.Content,{className:k("relative Ca-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,ref:n,...o,children:[(0,Ca.jsx)(Oa,{}),(0,Ca.jsx)(M.Viewport,{className:k("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Ca.jsx)(Ha,{})]})}));le.displayName=M.Content.displayName;var Zr=Ke.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(M.Label,{className:k("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:r,...t}));Zr.displayName=M.Label.displayName;var A=Ke.forwardRef(({children:e,className:t,...r},o)=>(0,Ca.jsxs)(M.Item,{className:k("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...r,children:[(0,Ca.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ca.jsx)(M.ItemIndicator,{children:(0,Ca.jsx)(dt.Check,{className:"h-4 w-4"})})}),(0,Ca.jsx)(M.ItemText,{children:e})]}));A.displayName=M.Item.displayName;var Yr=Ke.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(M.Separator,{className:k("-mx-1 my-1 h-px bg-muted",e),ref:r,...t}));Yr.displayName=M.Separator.displayName;var Va=ie(require("react")),Jt=ie(require("@radix-ui/react-label"));var Qr=(0,$Ca.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),h=Va.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(Jt.Root,{ref:r,className:k(Qr(),e),...t}));h.displayName=Jt.Root.displayName;var rt=ie(require("react")),ct=ie(require("@radix-ui/react-toggle-group"));var Ua=ie(require("react")),Xt=ie(require("@radix-ui/react-toggle"));var Zt=(0,wa.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-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),eo=Ua.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Ca.jsx)(Xt.Root,{ref:n,className:k(Zt({variant:t,size:r,className:e})),...o}));eo.displayName=Xt.Root.displayName;var _a=rt.createContext({size:"default",variant:"default"}),ot=rt.forwardRef(({className:e,variant:t,size:r,children:o,...n},s)=>(0,Ca.jsx)(ct.Root,{ref:s,className:k("flex items-center justify-center gap-1",e),...n,children:(0,Ca.jsx)(_a.Provider,{value:{variant:t,size:r},children:o})}));ot.displayName=ct.Root.displayName;var st=rt.forwardRef(({className:e,children:t,variant:r,size:o,...n},s)=>{let c=rt.useContext(_a);return(0,Ca.jsx)(ct.Item,{ref:s,className:k(Zt({variant:c.variant||r,size:c.size||o}),e),...n,children:t})});st.displayName=ct.Item.displayName;var to=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:dt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:dt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:dt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:dt.Zap}],ao=[{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"}],qa=({isOpen:e,onClose:t,onAddTask:r,epics:o,sprints:n,assignees:s,defaultEpicId:c})=>{let[d,g]=(0,ce.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,ce.useEffect)(()=>{e&&c&&g(f=>({...f,epicId:c}))},[e,c]),(0,ce.useEffect)(()=>{e&&g({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""})},[e]);let p=f=>{f.preventDefault(),d.name.trim()&&(r({name:d.name.trim(),description:d.description.trim(),status:"todo",priority:d.priority,type:d.type,points:d.points,epicId:d.epicId,sprintId:d.sprintId==="none"?void 0:d.sprintId,assignee:d.assignee.trim()||"Unassigned"}),g({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""}),t())},l=(f,P)=>{g(u=>({...u,[f]:P}))};return(0,Ca.jsx)(Oe,{open:e,onOpenChange:t,children:(0,Ca.jsxs)(Ie,{className:"sm:max-w-md",children:[(0,Ca.jsx)(Ae,{children:(0,Ca.jsx)(Le,{children:"Add New Task"})}),(0,Ca.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"name",children:"Task Title"}),(0,Ca.jsx)($,{id:"name",value:d.name,onChange:f=>l("name",f.target.value),placeholder:"Enter task title",required:!0})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"description",children:"Description"}),(0,Ca.jsx)(be,{id:"description",value:d.description,onChange:f=>l("description",f.target.value),placeholder:"Enter task description",rows:3})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"Type"}),(0,Ca.jsx)(ot,{type:"single",value:d.type,onValueChange:f=>f&&l("type",f),children:to.map(f=>{let P=f.icon;return(0,Ca.jsxs)(st,{value:f.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Ca.jsx)(P,{className:"h-4 w-4"}),f.label]},f.value)})})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"Priority"}),(0,Ca.jsx)(ot,{type:"single",value:d.priority,onValueChange:f=>f&&l("priority",f),children:ao.map(f=>(0,Ca.jsx)(st,{value:f.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:f.label},f.value))})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"points",children:"Story Points"}),(0,Ca.jsx)($,{id:"points",type:"number",min:"1",max:"100",value:d.points,onChange:f=>l("points",parseInt(f.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"epic",children:"Epic"}),(0,Ca.jsxs)(ue,{value:d.epicId,onValueChange:f=>l("epicId",f),children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{placeholder:"Select an epic"})}),(0,Ca.jsx)(le,{children:o.map(f=>(0,Ca.jsx)(A,{value:f.id,children:(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsx)("div",{className:`w-3 h-3 rounded-full ${f.color}`}),f.name]})},f.id))})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Ca.jsxs)(ue,{value:d.sprintId,onValueChange:f=>l("sprintId",f),children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{placeholder:"Select Ca sprint"})}),(0,Ca.jsxs)(le,{children:[(0,Ca.jsx)(A,{value:"none",children:"No Sprint"}),n.map(f=>(0,Ca.jsx)(A,{value:f.id,children:(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[f.name,f.isActive&&(0,Ca.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},f.id))]})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"sprint",children:"Assignee"}),(0,Ca.jsxs)(ue,{value:d.assignee,onValueChange:f=>l("assignee",f),children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{placeholder:"Select an Assignee"})}),(0,Ca.jsxs)(le,{children:[(0,Ca.jsx)(A,{value:"none",children:"No Assignee"}),s.map(f=>(0,Ca.jsx)(A,{value:f.id,children:(0,Ca.jsx)("div",{className:"flex items-center gap-2",children:f.name})},f.id))]})]})]}),(0,Ca.jsxs)(bt,{children:[(0,Ca.jsx)(D,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Ca.jsx)(D,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Qt=({fieldName:e,value:t,label:r,multiline:o=!1,onSave:n,className:s="",disabled:c=!1})=>{let[d,g]=(0,ce.useState)(!1),[p,l]=(0,ce.useState)(""),f=()=>{c||(g(!0),l(t))},P=async()=>{p!==t&&await n(e,p),g(!1)},u=x=>{x.key==="Enter"&&!o||x.key==="Enter"&&x.ctrlKey&&o?P():x.key==="Escape"&&(g(!1),l(""))};return(0,Ca.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,Ca.jsx)(h,{children:r}),d?o?(0,Ca.jsx)(be,{value:p,onChange:x=>l(x.target.value),onBlur:P,onKeyDown:u,autoFocus:!0,rows:4,className:"resize-none"}):(0,Ca.jsx)($,{value:p,onChange:x=>l(x.target.value),onBlur:P,onKeyPress:u,autoFocus:!0,className:"text-lg font-medium"}):(0,Ca.jsxs)("div",{onClick:f,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 ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Ca.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,Ca.jsx)(dt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Dt=ie(require("react")),je=ie(require("@radix-ui/react-avatar"));var ea=Dt.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(je.Root,{ref:r,className:k("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ea.displayName=je.Root.displayName;var ro=Dt.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(je.Image,{ref:r,className:k("aspect-square h-full w-full",e),...t}));ro.displayName=je.Image.displayName;var ta=Dt.forwardRef(({className:e,...t},r)=>(0,Ca.jsx)(je.Fallback,{ref:r,className:k("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ta.displayName=je.Fallback.displayName;var Xa=({comments:e,onAddComment:t})=>{let[r,o]=(0,ce.useState)(""),n=c=>c.split(" ").map(d=>d[0]).join("").toUpperCase(),s=()=>{r.trim()&&(t(r),o(""))};return(0,Ca.jsxs)("div",{className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsx)(dt.MessageSquare,{className:"h-5 w-5"}),(0,Ca.jsx)(h,{className:"text-lg font-medium",children:"Comments"}),(0,Ca.jsx)(W,{variant:"secondary",children:e.length})]}),(0,Ca.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(c=>(0,Ca.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Ca.jsx)(ea,{className:"h-8 w-8 dt-1",children:(0,Ca.jsx)(ta,{className:"text-xs bg-muted text-muted-foreground",children:n(c.author)})}),(0,Ca.jsxs)("div",{className:"flex-1",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Ca.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,Ca.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c.createdAt.toLocaleDateString()," dt ",c.createdAt.toLocaleTimeString()]})]}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,Ca.jsxs)("div",{className:"flex gap-2",children:[(0,Ca.jsx)(be,{value:r,onChange:c=>o(c.target.value),placeholder:"Add Ca comment...",rows:2,className:"flex-1 resize-none"}),(0,Ca.jsx)(D,{onClick:s,disabled:!r.trim(),size:"sm",className:"self-end",children:(0,Ca.jsx)(dt.Send,{className:"h-4 w-4"})})]})]})};var Rt=({label:e,value:t,onValueChange:r,options:o,showColor:n=!1,disabled:s=!1})=>{let[c,d]=(0,ce.useState)(!1),g=o.find(l=>l.value===t);return(0,Ca.jsxs)("div",{className:"space-y-1",children:[(0,Ca.jsx)(h,{className:"text-xs text-muted-foreground",children:e}),(0,Ca.jsxs)(ue,{value:t,onValueChange:r,open:c,onOpenChange:l=>{s||d(l)},disabled:s,children:[(0,Ca.jsx)(ne,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Ca.jsxs)(W,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&d(!c),children:[n&&g?.color&&(0,Ca.jsx)("div",{className:`w-2 h-2 rounded-full ${g.color} mr-1`}),g?.label||"Select..."]})}),(0,Ca.jsx)(le,{children:o.map(l=>(0,Ca.jsx)(A,{value:l.value,children:n&&l.color?(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsx)("div",{className:`w-3 h-3 rounded-full ${l.color}`}),l.label]}):l.label},l.value))})]})]})};var Ya=({label:e,value:t,onValueChange:r,options:o,placeholder:n="Search...",allowCustomValue:s=!1,disabled:c=!1})=>{let[d,g]=(0,ce.useState)(!1),[p,l]=(0,ce.useState)(""),f=o.find(y=>y.value===t),P=o.filter(y=>y.label.toLowerCase().includes(p.toLowerCase())),u=y=>{r(y),g(!1),l("")},x=()=>{s&&p.trim()&&!o.find(y=>y.value===p.trim())&&(r(p.trim()),g(!1),l(""))};return(0,Ca.jsxs)("div",{className:"space-y-1",children:[(0,Ca.jsx)(h,{className:"text-xs text-muted-foreground",children:e}),(0,Ca.jsxs)(ue,{value:t,onValueChange:u,open:d,onOpenChange:y=>{c||g(y)},disabled:c,children:[(0,Ca.jsx)(ne,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Ca.jsx)(W,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&g(!d),children:f?.label||t||"Select..."})}),(0,Ca.jsxs)(le,{children:[(0,Ca.jsx)("div",{className:"p-2",children:(0,Ca.jsx)($,{placeholder:n,value:p,onChange:y=>l(y.target.value),onKeyDown:y=>{y.key==="Enter"&&s&&x()},className:"mb-2"})}),P.map(y=>(0,Ca.jsx)(A,{value:y.value,children:y.label},y.value)),s&&p.trim()&&!P.find(y=>y.value===p.trim())&&(0,Ca.jsxs)(A,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var oo=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:dt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:dt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:dt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:dt.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"}];var Qa=({task:e,epics:t,sprints:r,lastUpdated:o,onUpdateTask:n,onClose:s,onDelete:c,isUpdating:d=!1,isDeleting:g=!1,deleteState:p="idle",teamMembers:l})=>{let f=u=>u.split(" ").map(x=>x[0]).join("").toUpperCase(),P=()=>p==="loading"?(0,Ca.jsxs)(D,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Ca.jsx)(dt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,Ca.jsxs)(D,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Ca.jsx)(dt.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,Ca.jsxs)(D,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Ca.jsx)(dt.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Ca.jsxs)(D,{onClick:c,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:d||g,children:[(0,Ca.jsx)(dt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Ca.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Ca.jsxs)("div",{className:"space-y-4",style:{opacity:d?.6:1},children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Ca.jsx)(Rt,{label:"",value:e.status,onValueChange:u=>n("status",u),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:d})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Ca.jsx)(ot,{type:"single",value:e.type,onValueChange:u=>u&&n("type",u),className:"grid grid-cols-2 gap-1",disabled:d,children:oo.map(u=>{let x=u.icon;return(0,Ca.jsxs)(st,{value:u.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:d,children:[(0,Ca.jsx)(x,{className:"h-3 w-3"}),u.label]},u.value)})})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Ca.jsx)(ot,{type:"single",value:e.priority,onValueChange:u=>u&&n("priority",u),className:"grid grid-cols-3 gap-1",disabled:d,children:so.map(u=>(0,Ca.jsx)(st,{value:u.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:d,children:u.label},u.value))})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Ca.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:u=>n("points",u.target.value),className:"w-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:d})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Ca.jsx)(Rt,{label:"",value:e.epicId,onValueChange:u=>n("epicId",u),options:(t||[]).map(u=>({value:u.id,label:u?.name,color:u.color})),showColor:!0,disabled:d})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Ca.jsx)(Rt,{label:"",value:e.sprintId||"none",onValueChange:u=>n("sprintId",u==="none"?"":u),options:[{value:"none",label:"No Sprint"},...(r||[]).map(u=>({value:u.id,label:`${u?.name}${u.isActive?" (Active)":""}`}))],disabled:d})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Ca.jsx)(Ya,{label:"",value:e.assignee?.value?.name,onValueChange:u=>n("assignee",u),options:l.map(u=>({value:`${typeof u.email=="string"?"users":"digital-colleagues"}:${u.id}`,label:u?.name})),placeholder:"Search team members...",allowCustomValue:!0,disabled:d})]})]}),(0,Ca.jsxs)("div",{className:"dt-auto pt-4 space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{onClick:s,variant:"outline",className:"w-full h-8 text-xs",disabled:d||g,children:"Close"}),P()]}),(0,Ca.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,Ca.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Ca.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Ca.jsx)(dt.User,{className:"h-3 w-3"}),(0,Ca.jsx)("span",{children:"System"})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Ca.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Ca.jsx)(dt.Calendar,{className:"h-3 w-3"}),(0,Ca.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Ca.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Ca.jsx)(dt.Clock,{className:"h-3 w-3"}),(0,Ca.jsxs)("span",{children:[new Date(o).toLocaleDateString()," dt"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var er=({isOpen:e,onClose:t,initialTask:r,epics:o,sprints:n,onUpdateTask:s,onDeleteTask:c,onAddComment:d,colleagues:g})=>{let[p,l]=(0,ce.useState)(r),[f,P]=(0,ce.useState)(new Date),[u,x]=(0,ce.useState)("idle"),[L,y]=(0,ce.useState)("idle"),[H,K]=(0,ce.useState)([]);(0,ce.useEffect)(()=>{l(r)},[r]);let j=async(U,xe)=>{if(xe!==p[U]){x("loading");try{let E=await s(p.id,{[U]:xe});l(E),P(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch{x("error"),setTimeout(()=>x("idle"),3e3)}}},ae=async(U,xe)=>{if(xe!==p[U]){x("loading");try{let E=await s(p.id,{[U]:xe});l(E),P(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch{x("error"),setTimeout(()=>x("idle"),3e3)}}},v=async U=>{if(d){x("loading");try{let xe=await d?.({content:U,taskId:p.id});l(xe),P(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch{x("error"),setTimeout(()=>x("idle"),3e3)}}},F=async()=>{y("loading");try{await c(p.id),y("success"),setTimeout(()=>{t(),y("idle")},1e3)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}},Y=u!=="loading"&&L!=="loading",J=()=>{Y&&t()},Se=()=>u==="loading"?(0,Ca.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Ca.jsx)(dt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Ca.jsx)("span",{children:"Updating..."})]}):u==="success"?(0,Ca.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Ca.jsx)(dt.Check,{className:"h-4 w-4"}),(0,Ca.jsx)("span",{children:"Updated successfully"})]}):u==="error"?(0,Ca.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Ca.jsx)(dt.X,{className:"h-4 w-4"}),(0,Ca.jsx)("span",{children:"Update failed"})]}):null;return(0,Ca.jsx)(Oe,{open:e,onOpenChange:J,children:(0,Ca.jsxs)(Ie,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Ca.jsxs)(Ae,{children:[(0,Ca.jsx)(Le,{className:"sr-only",children:p.name}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("div",{className:"flex-1",children:Se()}),!Y&&(0,Ca.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Ca.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Ca.jsx)(Qt,{fieldName:"name",value:p.name,label:"",onSave:j,className:"border-Ca border-border pb-3",disabled:u==="loading"}),(0,Ca.jsx)(Qt,{fieldName:"description",value:p.description,label:"Description",multiline:!0,onSave:j,disabled:u==="loading"}),(0,Ca.jsx)(Xa,{comments:(p?.comments||[]).map(U=>({author:U.author.value.name,createdAt:new Date(U.timestamp),text:U.content,id:U.id})),onAddComment:v})]}),(0,Ca.jsx)(Qa,{task:p,epics:o,sprints:n,lastUpdated:f,onUpdateTask:ae,onClose:J,onDelete:F,isUpdating:u==="loading",isDeleting:L==="loading",deleteState:L,teamMembers:g})]})]})})};var ar=({isOpen:e,onClose:t,onAddEpic:r})=>{let[o,n]=(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}),s=["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"}],d=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],g=l=>{l.preventDefault(),o.name.trim()&&(r({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),n({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=(l,f)=>{n(P=>({...P,[l]:f}))};return(0,Ca.jsx)(Oe,{open:e,onOpenChange:t,children:(0,Ca.jsxs)(Ie,{className:"sm:max-w-md",children:[(0,Ca.jsx)(Ae,{children:(0,Ca.jsx)(Le,{children:"Add New Epic"})}),(0,Ca.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"name",children:"Epic Name"}),(0,Ca.jsx)($,{id:"name",value:o.name,onChange:l=>p("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"description",children:"Description"}),(0,Ca.jsx)(be,{id:"description",value:o.description,onChange:l=>p("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"Color"}),(0,Ca.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(l=>(0,Ca.jsx)("button",{type:"button",onClick:()=>p("color",l),className:`w-8 h-8 rounded-full ${l} ${o.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"Confidence"}),(0,Ca.jsxs)(ue,{value:o.confidence,onValueChange:l=>p("confidence",l),children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{})}),(0,Ca.jsx)(le,{children:c.map(l=>(0,Ca.jsx)(A,{value:l.value,children:l.label},l.value))})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"Phase"}),(0,Ca.jsxs)(ue,{value:o.phase.toString(),onValueChange:l=>p("phase",parseInt(l)),children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{})}),(0,Ca.jsx)(le,{children:d.map(l=>(0,Ca.jsx)(A,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"Start Date"}),(0,Ca.jsx)($,{type:"date",value:o.startDate,onChange:l=>p("startDate",l.target.value)})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"End Date"}),(0,Ca.jsx)($,{type:"date",value:o.endDate,onChange:l=>p("endDate",l.target.value)})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"Progress (%)"}),(0,Ca.jsx)($,{type:"number",min:"0",max:"100",value:o.progress,onChange:l=>p("progress",parseInt(l.target.value)||0)})]}),(0,Ca.jsxs)(bt,{children:[(0,Ca.jsx)(D,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Ca.jsx)(D,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};function rr(e,t){let[r,o]=(0,ce.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),n=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,ce.useEffect)(()=>{n(r)},[]),[r,n]}var It=require("react-icons/fa");function Ze({title:e,description:t,badge:r,primaryAction:o,secondaryAction:n,gradient:s,children:c,className:d}){let[g,p]=rr(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!n&&!t),l=!n&&!t||g;return(0,Ca.jsxs)(Ra.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${s} p-8 text-white ${d||""}`,children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-3",children:[r&&(0,Ca.jsx)(W,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:r}),(0,Ca.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Ca.jsxs)("div",{className:"flex items-center gap-3",children:[l&&o&&(0,Ca.jsx)(D,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(n||t)&&(0,Ca.jsx)("button",{"aria-label":g?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!g),style:{lineHeight:0},children:g?(0,Ca.jsx)(It.FaChevronDown,{size:22}):(0,Ca.jsx)(It.FaChevronUp,{size:22})})]})]}),!l&&(0,Ca.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Ca.jsxs)("div",{className:"space-y-4",children:[(0,Ca.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Ca.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Ca.jsx)(D,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),n&&(0,Ca.jsx)(D,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:n.onClick,children:n.label})]})]}),c&&(0,Ca.jsx)("div",{className:"hidden lg:block",children:c})]})]})}var io=({initialTasks:e=[],initialEpics:t=[],initialSprints:r=[],initialUsers:o=[],initialColleagues:n=[],initialProjects:s=[],onAddTask:c,onUpdateTask:d,onDeleteTask:g,onTaskClick:p,onAddEpic:l,onAddComment:f})=>{let[P,u]=(0,ce.useState)(e),[x,L]=(0,ce.useState)(t),[y,H]=(0,ce.useState)(r),[K,j]=(0,ce.useState)(!1),[ae,v]=(0,ce.useState)(!1),[F,Y]=(0,ce.useState)(null),[J,Se]=(0,ce.useState)(null),[U,xe]=(0,ce.useState)(o),[E,w]=(0,ce.useState)(n),[_,Re]=(0,ce.useState)(0),ve=(0,ce.useRef)(null),q=(0,ce.useRef)(null),Ee=x.filter(T=>!0).map(T=>T.id),De=y.find(T=>T.isSelected);Ee.push("no-epic"),(0,ce.useEffect)(()=>{u(e)},[e]),(0,ce.useEffect)(()=>{L(t)},[t]),(0,ce.useEffect)(()=>{H(r)},[r]),(0,ce.useEffect)(()=>{let T=()=>{if(ve.current){let he=ve.current.offsetHeight;Re(he)}};T();let V=new ResizeObserver(T);ve.current&&V.observe(ve.current);let X=()=>{setTimeout(T,100)};return window.addEventListener("storage",X),()=>{V.disconnect(),window.removeEventListener("storage",X)}},[]),(0,ce.useEffect)(()=>{let T=setTimeout(()=>{ve.current&&Re(ve.current.offsetHeight)},300);return()=>clearTimeout(T)},[K,ae]);let Ye=P.filter(T=>{let V=Ee.includes(T.epicId)||!T.epicId;return!De||De.id==="all-tasks"?V:De.id==="backlog"?V&&!T.sprintId:V&&T.sprintId===De.id}),ke=T=>Ye.filter(V=>V.status===T),We=T=>{let V={};return x.forEach(X=>{V[X.id]=T.filter(he=>he.epicId===X.id)}),V["no-epic"]=T.filter(X=>!X.epicId),V},Bt=T=>{Se(T)},xt=T=>{J&&(u(V=>V.map(X=>X.id===J.id?{...X,status:T}:X)),d?.(J.id,{status:T}),Se(null))},it=T=>{let V={...T,id:Date.now().toString(),createdAt:new Date};u(X=>[...X,V]),c?.(T)},Mt=async(T,V)=>{u(he=>he.map(m=>m.id===T?{...m,...V}:m)),d&&await d(T,V);let X=P.find(he=>he.id===T);if(!X)throw new Error("Task not found");return{...X,...V}},yt=async T=>{u(V=>V.filter(X=>X.id!==T)),F?.id===T&&Y(null),g&&await g(T)},zt=T=>{let V={...T,id:Date.now().toString(),isSelected:!0};L(X=>[...X,V]),l?.(T)},Ft=T=>{Y(T),p?.(T)},Ot=[{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"}],Nt=_>0?`calc(100vh - ${_+120}px)`:"calc(100vh - 12rem)";return(0,Ca.jsxs)("div",{ref:q,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Ca.jsx)("div",{ref:ve,className:"flex-shrink-0",children:(0,Ca.jsx)(Ze,{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:()=>j(!0)},secondaryAction:{label:"Add epic",onClick:()=>v(!0)}})}),(0,Ca.jsx)("div",{className:"flex-1 min-h-0 dt-8",children:(0,Ca.jsx)("div",{className:"h-full",style:{height:_>0?`calc(100vh - ${_+120}px)`:"calc(100vh - 12rem)"},children:(0,Ca.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Ot.map(T=>{let V=ke(T.status),X=We(V);return(0,Ca.jsx)(Ia,{title:T.title,status:T.status,taskCount:V.length,onDrop:xt,isCompact:T.status==="done",height:Nt,children:Ee.map(he=>{let m=x.find(B=>B.id===he),N=X[he]||[];return N.length===0?null:(0,Ca.jsxs)("div",{className:"mb-6",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Ca.jsx)("div",{className:`w-3 h-3 rounded-full ${m?.color}`}),(0,Ca.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:m?.name||"No Epic"}),(0,Ca.jsx)(W,{variant:"secondary",className:"text-xs",children:N.length})]})," ",(0,Ca.jsx)("div",{className:"space-y-3",children:N.map(B=>(0,Ca.jsx)(St,{task:B,epic:m,onDragStart:Bt,onTaskClick:Ft,isCompact:T.status==="done"},B.id))})]},he)})},T.id)})})})}),(0,Ca.jsx)(qa,{isOpen:K,onClose:()=>j(!1),onAddTask:it,assignees:[...E,...U],epics:x,sprints:y}),(0,Ca.jsx)(ar,{isOpen:ae,onClose:()=>v(!1),onAddEpic:zt}),F&&(0,Ca.jsx)(er,{isOpen:!!F,onClose:()=>Y(null),initialTask:F,epics:x,sprints:y,onUpdateTask:Mt,onDeleteTask:yt,colleagues:[...E,...U],onAddComment:f})]})};var sr=require("react-day-picker");function At({className:e,classNames:t,showOutsideDays:r=!0,...o}){return(0,Ca.jsx)(sr.DayPicker,{showOutsideDays:r,weekStartsOn:1,className:k("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-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-x-1 flex items-center",nav_button:k(Ct({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full dt-2",cell:k("relative p-0 text-center text-sm focus-within:relative focus-within:Ca-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.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:k(Ct({variant:"ghost"}),"h-8 w-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},...o})}At.displayName="Calendar";var nr=ie(require("react")),$e=ie(require("@radix-ui/react-popover"));var oa=$e.Root,sa=$e.Trigger;var Lt=nr.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},n)=>(0,Ca.jsx)($e.Portal,{children:(0,Ca.jsx)($e.Content,{ref:n,align:t,sideOffset:r,className:k("Ca-50 w-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),...o})}));Lt.displayName=$e.Content.displayName;var na=require("date-fns");var dr=({isOpen:e,onClose:t,onAddSprint:r})=>{let[o,n]=(0,ce.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),s=d=>{d.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(r({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),n({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},c=()=>{n({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,Ca.jsx)(Oe,{open:e,onOpenChange:c,children:(0,Ca.jsxs)(Ie,{className:"sm:max-w-md",children:[(0,Ca.jsx)(Ae,{children:(0,Ca.jsx)(Le,{children:"Add New Sprint"})}),(0,Ca.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"name",children:"Sprint Name *"}),(0,Ca.jsx)($,{id:"name",value:o.name,onChange:d=>n(g=>({...g,name:d.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{htmlFor:"description",children:"Description"}),(0,Ca.jsx)(be,{id:"description",value:o.description,onChange:d=>n(g=>({...g,description:d.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"Start Date *"}),(0,Ca.jsxs)(oa,{children:[(0,Ca.jsx)(sa,{asChild:!0,children:(0,Ca.jsxs)(D,{variant:"outline",className:k("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Ca.jsx)(dt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,na.format)(o.startDate,"PPP"):"Pick Ca date"]})}),(0,Ca.jsx)(Lt,{className:"w-auto p-0",align:"start",children:(0,Ca.jsx)(At,{mode:"single",selected:o.startDate,onSelect:d=>n(g=>({...g,startDate:d})),initialFocus:!0})})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(h,{children:"End Date *"}),(0,Ca.jsxs)(oa,{children:[(0,Ca.jsx)(sa,{asChild:!0,children:(0,Ca.jsxs)(D,{variant:"outline",className:k("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Ca.jsx)(dt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,na.format)(o.endDate,"PPP"):"Pick Ca date"]})}),(0,Ca.jsx)(Lt,{className:"w-auto p-0",align:"start",children:(0,Ca.jsx)(At,{mode:"single",selected:o.endDate,onSelect:d=>n(g=>({...g,endDate:d})),initialFocus:!0,disabled:d=>o.startDate?d<o.startDate:!1})})]})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ca.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:d=>n(g=>({...g,isActive:d.target.checked})),className:"rounded border-gray-300"}),(0,Ca.jsx)(h,{htmlFor:"isActive",children:"Set as active sprint"})]}),(0,Ca.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Ca.jsx)(D,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,Ca.jsx)(D,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var no=({tasks:e,epics:t,sprints:r,onUpdateTask:o,onTaskClick:n,onAddSprint:s,onUpdateSprint:c,onDeleteSprint:d})=>{let[g,p]=(0,ce.useState)([]),[l,f]=(0,ce.useState)(new Set),[P,u]=(0,ce.useState)(null),[x,L]=(0,ce.useState)(!1),[y,H]=(0,ce.useState)(null),[K,j]=(0,ce.useState)(null),[ae,v]=(0,ce.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[F,Y]=(0,ce.useState)("upcoming"),[J,Se]=(0,ce.useState)(!1),[U,xe]=(0,ce.useState)(0),E=(0,ce.useRef)(null),w=(0,ce.useRef)(null);(0,ce.useEffect)(()=>{let m=()=>{E.current&&xe(E.current.offsetHeight)};m();let N=new ResizeObserver(m);return E.current&&N.observe(E.current),()=>N.disconnect()},[]);let _=m=>t.find(N=>N.id===m),Re=m=>r.find(N=>N.id===m),ve=m=>{let N={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 N[m]||N.medium},q=m=>{let N=m.trim().split(" ");if(N.length===1)return N[0];let B=N[0],G=N[N.length-1][0].toUpperCase();return`${B} ${G}`},Ee=m=>{let N={},B=[];return m.forEach(G=>{G.epicId?(N[G.epicId]||(N[G.epicId]=[]),N[G.epicId].push(G)):B.push(G)}),{tasksByEpic:N,unassignedTasks:B}},De=r.filter(m=>m.id!=="backlog"&&m.id!=="all-tasks"),Ye=De.filter(m=>{switch(F){case"active":return m.isActive;case"upcoming":return!m.isActive;default:return!0}}),ke=De.filter(m=>g.includes(m.id)),We=e.filter(m=>!m.sprintId||m.sprintId==="backlog"||m.sprintId==="Backlog"),Bt=We.reduce((m,N)=>m+(N.points||0),0),xt=m=>{p(N=>N.includes(m)?N.filter(B=>B!==m):N.length<3?[...N,m]:N)},it=m=>{f(N=>{let B=new Set(N);return B.has(m)?B.delete(m):B.add(m),B})},Mt=m=>{s(m),L(!1)},yt=m=>{j(m.id),v({name:m.name,description:m.description||"",startDate:m.startDate instanceof Date?m.startDate.toISOString().split("T")[0]:m.startDate,endDate:m.endDate instanceof Date?m.endDate.toISOString().split("T")[0]:m.endDate,isActive:m.isActive})},zt=()=>{K&&(c(K,{name:ae.name,description:ae.description,startDate:new Date(ae.startDate),endDate:new Date(ae.endDate),isActive:ae.isActive}),j(null))},Ft=()=>{j(null),v({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Ot=(m,N)=>{u(N),m.dataTransfer.effectAllowed="move"},Nt=m=>{m.preventDefault(),m.dataTransfer.dropEffect="move"},T=m=>{H(m)},V=()=>{H(null)},X=(m,N)=>{if(m.preventDefault(),H(null),!P)return;let B=P.sprintId||void 0,G=N==="backlog"?void 0:N;B!==G&&o(P.id,{sprintId:G}),u(null)},he=({task:m,showSprint:N=!1})=>{let B=m.epicId?_(m.epicId):null,G=m.sprintId?Re(m.sprintId):null;return(0,Ca.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:Te=>{Te.dataTransfer.effectAllowed="move",Te.dataTransfer.setData("text/plain",m.id),Ot(Te,m)},onClick:Te=>{P===null&&n(m)},style:{userSelect:"none"},children:(0,Ca.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Ca.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Ca.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:m.name}),(0,Ca.jsx)(W,{className:`text-xs ${ve(m.priority)}`,children:m.priority[0].toUpperCase()})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-1",children:[B&&(0,Ca.jsx)("div",{className:`w-2 h-2 rounded-full ${B.color}`}),(0,Ca.jsx)("span",{className:"text-muted-foreground truncate",children:B?.name})]}),(0,Ca.jsx)("span",{className:"text-muted-foreground",children:q(m.assignee?.value?.name)})]}),N&&G&&(0,Ca.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Ca.jsx)(dt.Calendar,{className:"h-3 w-3"}),(0,Ca.jsx)("span",{children:G.name})]})]})})};return(0,Ca.jsxs)("div",{ref:w,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Ca.jsx)("div",{ref:E,className:"flex-shrink-0",children:(0,Ca.jsx)(Ze,{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,Ca.jsx)("div",{className:"flex-1 min-h-0 dt-8",children:(0,Ca.jsxs)("div",{className:"h-full",style:{height:U>0?`calc(100vh - ${U+120}px)`:"calc(100vh - 12rem)"},children:[(0,Ca.jsxs)("div",{className:"mb-4",children:[(0,Ca.jsx)(Q,{className:"p-3 bg-card shadow-sm",children:(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ca.jsx)("div",{children:(0,Ca.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"})}),g.length>0&&(0,Ca.jsx)("div",{className:"flex items-center gap-2",children:(0,Ca.jsx)("div",{className:"flex flex-wrap gap-1",children:ke.map(m=>(0,Ca.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Ca.jsx)("span",{className:"max-w-[80px] truncate",children:m.name}),m.isActive&&(0,Ca.jsx)("span",{className:"text-success text-[10px]",children:"\u25CF"}),(0,Ca.jsx)("button",{onClick:()=>xt(m.id),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Ca.jsx)(dt.X,{className:"h-4 w-4"})})]},m.id))})})]}),(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsxs)(D,{onClick:()=>L(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Ca.jsx)(dt.Plus,{className:"h-3 w-3"}),"Add"]}),(0,Ca.jsxs)(D,{onClick:()=>Se(!J),variant:"outline",size:"sm",className:"gap-1",children:[(0,Ca.jsx)(dt.Calendar,{className:"h-3 w-3"}),J?"Close":"Select"]})]})]})}),J&&(0,Ca.jsx)("div",{className:"fixed inset-0 bg-black/20 Ca-[5]",onClick:()=>Se(!1)}),(0,Ca.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl Ca-10 transition-all duration-300 ease-in-out ${J?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,Ca.jsxs)(Q,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Ca.jsxs)("div",{className:"p-4 border-Ca bg-muted/30 flex-shrink-0",children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Ca.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>Se(!1),className:"h-8 w-8 p-0",children:(0,Ca.jsx)(dt.X,{className:"h-4 w-4"})})]}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground dt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Ca.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Ca.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:r.length},{key:"active",label:"Active",count:r.filter(m=>m.isActive).length},{key:"upcoming",label:"Upcoming",count:r.filter(m=>!m.isActive).length}].map(m=>(0,Ca.jsxs)(D,{variant:F===m.key?"default":"outline",size:"sm",onClick:()=>Y(m.key),className:"text-xs h-8 px-3 flex-1",children:[m.label," (",m.count,")"]},m.key))}),(0,Ca.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:Ye.length>0?Ye.map(m=>{let N=g.includes(m.id),B=e.filter(ye=>ye.sprintId===m.id).length,G=!N&&g.length<3;return(0,Ca.jsx)("div",{className:`p-3 rounded-lg border transition-all ${N?"bg-primary/10 border-primary/30":G?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:K===m.id?(0,Ca.jsxs)("div",{className:"space-y-3",children:[(0,Ca.jsx)($,{value:ae.name,onChange:ye=>v(we=>({...we,name:ye.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Ca.jsx)(be,{value:ae.description,onChange:ye=>v(we=>({...we,description:ye.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Ca.jsxs)("div",{className:"flex gap-2",children:[(0,Ca.jsxs)(D,{size:"sm",onClick:()=>zt(),className:"flex-1",children:[(0,Ca.jsx)(dt.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,Ca.jsxs)(D,{size:"sm",variant:"outline",onClick:Ft,className:"flex-1",children:[(0,Ca.jsx)(dt.X,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,Ca.jsxs)("div",{children:[(0,Ca.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ca.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Ca.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:m.name}),m.isActive&&(0,Ca.jsx)(W,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Ca.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:m.description}),(0,Ca.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Ca.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Ca.jsx)(dt.CalendarDays,{className:"h-3 w-3"}),new Date(m.startDate).toLocaleDateString()]}),(0,Ca.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Ca.jsx)(dt.User,{className:"h-3 w-3"}),B," tasks"]})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Ca.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>yt(m),className:"h-6 w-6 p-0",children:(0,Ca.jsx)(dt.Edit2,{className:"h-3 w-3"})}),m.id!=="backlog"&&m.id!=="all-tasks"&&(0,Ca.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>d(m.id),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,Ca.jsx)(dt.Trash2,{className:"h-3 w-3"})})]})]}),(0,Ca.jsx)("div",{className:"flex items-center justify-between dt-2",children:(0,Ca.jsx)(D,{variant:N?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>xt(m.id),disabled:!N&&g.length>=3,children:(0,Ca.jsx)("span",{className:"pointer-events-none select-none",children:N?"Deselect":g.length>=3?"Limit Reached":"Select"})})})]})},m.id)}):(0,Ca.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Ca.jsx)(dt.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,Ca.jsxs)("p",{className:"text-sm",children:['No sprints found for "',F,'" filter']}),(0,Ca.jsx)(D,{variant:"link",size:"sm",onClick:()=>Y("all"),className:"text-xs",children:"Show all sprints"})]})}),g.length===0&&(0,Ca.jsx)("div",{className:"dt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Ca.jsxs)("div",{className:"text-center",children:[(0,Ca.jsx)(dt.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Ca.jsx)("p",{className:"text-xs text-muted-foreground dt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Ca.jsx)("div",{className:"lg:col-span-1",children:(0,Ca.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:Nt,onDragEnter:()=>T("backlog"),onDragLeave:V,onDrop:m=>X(m,"backlog"),style:{height:U>0?`calc(100vh - ${U+200}px)`:"calc(100vh - 16rem)"},children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Ca.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsxs)(W,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[We.length," tasks"]}),(0,Ca.jsxs)(W,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[Bt," pts"]})]})]}),(0,Ca.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${y==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:m,unassignedTasks:N}=Ee(We);return(0,Ca.jsxs)(Ca.Fragment,{children:[Object.entries(m).map(([B,G])=>{let ye=_(B);if(!ye)return null;let we=l.has(B);return(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.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:()=>it(B),children:[(0,Ca.jsx)("div",{className:`w-3 h-3 rounded-full ${ye.color}`}),(0,Ca.jsx)("span",{className:"font-medium text-muted-foreground",children:ye.name}),(0,Ca.jsxs)("span",{className:"text-muted-foreground",children:["(",G.length,")"]}),(0,Ca.jsx)("div",{className:"ml-auto",children:we?(0,Ca.jsx)(dt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Ca.jsx)(dt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!we&&(0,Ca.jsx)("div",{className:"space-y-2 pl-2",children:G.map(Te=>(0,Ca.jsx)(he,{task:Te},Te.id))})]},B)}),N.length>0&&(()=>{let B=l.has("no-epic");return(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.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:()=>it("no-epic"),children:[(0,Ca.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Ca.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Ca.jsxs)("span",{className:"text-muted-foreground",children:["(",N.length,")"]}),(0,Ca.jsx)("div",{className:"ml-auto",children:B?(0,Ca.jsx)(dt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Ca.jsx)(dt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!B&&(0,Ca.jsx)("div",{className:"space-y-2 pl-2",children:N.map(G=>(0,Ca.jsx)(he,{task:G},G.id))})]})})(),We.length===0&&(0,Ca.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"}),We.length>0&&Object.keys(m).length===0&&N.length===0&&(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),We.map(B=>(0,Ca.jsx)(he,{task:B},B.id))]})]})})()})]})}),ke.map(m=>{let N=e.filter(G=>G.sprintId===m.id),B=N.reduce((G,ye)=>G+(ye.points||0),0);return(0,Ca.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:Nt,onDragEnter:()=>T(m.id),onDragLeave:V,onDrop:G=>X(G,m.id),style:{height:U>0?`calc(100vh - ${U+200}px)`:"calc(100vh - 16rem)"},children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:m.name}),m.isActive&&(0,Ca.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsxs)(W,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[N.length," tasks"]}),(0,Ca.jsxs)(W,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[B," pts"]}),(0,Ca.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>yt(m),className:"h-6 px-2",children:(0,Ca.jsx)(dt.Edit2,{className:"h-3 w-3"})}),m.id!=="backlog"&&m.id!=="all-tasks"&&(0,Ca.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>d(m.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Ca.jsx)(dt.Trash2,{className:"h-3 w-3"})})]})]}),(0,Ca.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:G,unassignedTasks:ye}=Ee(N);return(0,Ca.jsxs)(Ca.Fragment,{children:[Object.entries(G).map(([we,Te])=>{let Ht=_(we);if(!Ht)return null;let ca=l.has(we);return(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.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:()=>it(we),children:[(0,Ca.jsx)("div",{className:`w-3 h-3 rounded-full ${Ht.color}`}),(0,Ca.jsx)("span",{className:"font-medium text-muted-foreground",children:Ht.name}),(0,Ca.jsxs)("span",{className:"text-muted-foreground",children:["(",Te.length,")"]}),(0,Ca.jsx)("div",{className:"ml-auto",children:ca?(0,Ca.jsx)(dt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Ca.jsx)(dt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!ca&&(0,Ca.jsx)("div",{className:"space-y-2 pl-2",children:Te.map(ma=>(0,Ca.jsx)(he,{task:ma},ma.id))})]},we)}),ye.length>0&&(()=>{let we=l.has("no-epic");return(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.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:()=>it("no-epic"),children:[(0,Ca.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Ca.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Ca.jsxs)("span",{className:"text-muted-foreground",children:["(",ye.length,")"]}),(0,Ca.jsx)("div",{className:"ml-auto",children:we?(0,Ca.jsx)(dt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Ca.jsx)(dt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!we&&(0,Ca.jsx)("div",{className:"space-y-2 pl-2",children:ye.map(Te=>(0,Ca.jsx)(he,{task:Te},Te.id))})]})})(),N.length===0&&(0,Ca.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},m.id)})]}),(0,Ca.jsx)(dr,{isOpen:x,onClose:()=>L(!1),onAddSprint:Mt})]})})]})};var lo=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},co=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),mo=e=>{let[t,r]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(r)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},la=(e,t)=>{let r=new Date,o=new Date(e);if(t){let[n,s]=t.split(":");o.setHours(parseInt(n),parseInt(s))}return o<r},da=e=>{let t=new Date;return e.toDateString()===t.toDateString()},po=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},uo=({colleagues:e,onAddReminder:t,open:r,setOpen:o})=>{let[n,s]=(0,ce.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,d]=(0,ce.useState)(!1),g=l=>{l.preventDefault();let f=e.find(u=>u?.id.toString()===n.colleagueId.toString());if(!f){console.error("No valid colleague selected"),d(!0);return}d(!1);let P={title:n.title,description:n.description,dueDate:new Date(n.dueDate),dueTime:n.dueTime||void 0,colleague:f,isCompleted:!1,isRecurring:n.isRecurring,recurrencePattern:n.isRecurring?n.recurrencePattern:void 0,recurrenceInterval:n.isRecurring?n.recurrenceInterval:void 0,priority:n.priority,reminderEnabled:n.reminderEnabled,reminderMinutes:n.reminderEnabled?n.reminderMinutes:void 0,tags:n.tags?n.tags.split(",").map(u=>u.trim()):void 0};t(P),o(!1),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ce.useEffect)(()=>{n.colleagueId&&d(!1)},[n.colleagueId]);let p=e.filter(Boolean);return(0,Ca.jsx)(Oe,{open:r,onOpenChange:o,children:(0,Ca.jsxs)(Ie,{className:"max-w-2xl",children:[(0,Ca.jsx)(Ae,{children:(0,Ca.jsx)(Le,{children:"Add New Reminder"})}),(0,Ca.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,Ca.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"title",children:"Title"}),(0,Ca.jsx)($,{id:"title",value:n.title,onChange:l=>s({...n,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"description",children:"Description"}),(0,Ca.jsx)(be,{id:"description",value:n.description,onChange:l=>s({...n,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"dueDate",children:"Due Date"}),(0,Ca.jsx)($,{id:"dueDate",type:"date",value:n.dueDate,onChange:l=>s({...n,dueDate:l.target.value}),required:!0})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Ca.jsx)($,{id:"dueTime",type:"time",value:n.dueTime,onChange:l=>s({...n,dueTime:l.target.value})})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Ca.jsxs)(ue,{value:n.colleagueId,onValueChange:l=>{s({...n,colleagueId:l})},required:!0,children:[(0,Ca.jsx)(ne,{className:`${c?"text-destructive border-red-500":""}`,children:(0,Ca.jsx)(Ce,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select Ca digital colleague",children:e.find(l=>l?.id.toString()===n.colleagueId.toString())?.name||"Select Ca digital colleague"})}),(0,Ca.jsx)(le,{children:p.map(l=>(0,Ca.jsx)(A,{value:l.id,children:l.name},l.id))})]}),c&&(0,Ca.jsx)("p",{className:"text-destructive text-sm",children:"Please select Ca digital colleague"})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ca.jsx)("input",{type:"checkbox",id:"isRecurring",checked:n.isRecurring,onChange:l=>s({...n,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,Ca.jsx)(h,{htmlFor:"isRecurring",children:"Make this Ca recurring reminder"})]}),n.isRecurring&&(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Ca.jsxs)(ue,{value:n.recurrencePattern,onValueChange:l=>s({...n,recurrencePattern:l}),children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{})}),(0,Ca.jsxs)(le,{children:[(0,Ca.jsx)(A,{value:"daily",children:"Daily"}),(0,Ca.jsx)(A,{value:"weekly",children:"Weekly"}),(0,Ca.jsx)(A,{value:"monthly",children:"Monthly"}),(0,Ca.jsx)(A,{value:"yearly",children:"Yearly"})]})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Ca.jsx)($,{id:"recurrenceInterval",type:"number",min:"1",value:n.recurrenceInterval,onChange:l=>s({...n,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,Ca.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Ca.jsx)(D,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,Ca.jsx)(D,{type:"submit",children:"Add Reminder"})]})]})]})})},go=({reminder:e,colleagues:t,onUpdateReminder:r,open:o,onClose:n})=>{let[s,c]=(0,ce.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("T")[0],dueTime:e.dueTime||"",colleagueId:e.colleague?.id||"",priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""}),d=p=>{p.preventDefault();let l=t.find(f=>f?.id===s.colleagueId);if(!l){console.error("No valid colleague selected");return}r(e.id,{title:s.title,description:s.description,dueDate:new Date(s.dueDate),dueTime:s.dueTime||void 0,colleague:l,priority:s.priority,isRecurring:s.isRecurring,recurrencePattern:s.isRecurring?s.recurrencePattern:void 0,recurrenceInterval:s.isRecurring?s.recurrenceInterval:void 0,reminderEnabled:s.reminderEnabled,reminderMinutes:s.reminderEnabled?s.reminderMinutes:void 0,tags:s.tags?s.tags.split(",").map(f=>f.trim()):void 0}),n()},g=t.filter(Boolean);return(0,Ca.jsx)(Oe,{open:o,onOpenChange:n,children:(0,Ca.jsxs)(Ie,{className:"max-w-2xl",children:[(0,Ca.jsx)(Ae,{children:(0,Ca.jsx)(Le,{children:"Edit Reminder"})}),(0,Ca.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"edit-title",children:"Title"}),(0,Ca.jsx)($,{id:"edit-title",value:s.title,onChange:p=>c({...s,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"edit-priority",children:"Priority"}),(0,Ca.jsxs)(ue,{value:s.priority,onValueChange:p=>c({...s,priority:p}),children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{})}),(0,Ca.jsxs)(le,{children:[(0,Ca.jsx)(A,{value:"low",children:"\u{1F7E2} Low"}),(0,Ca.jsx)(A,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Ca.jsx)(A,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"edit-description",children:"Description"}),(0,Ca.jsx)(be,{id:"edit-description",value:s.description,onChange:p=>c({...s,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Ca.jsx)($,{id:"edit-dueDate",type:"date",value:s.dueDate,onChange:p=>c({...s,dueDate:p.target.value}),required:!0})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Ca.jsx)($,{id:"edit-dueTime",type:"time",value:s.dueTime,onChange:p=>c({...s,dueTime:p.target.value})})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,Ca.jsxs)(ue,{value:s.colleagueId,onValueChange:p=>c({...s,colleagueId:p}),required:!0,children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{placeholder:"Select Ca digital colleague"})}),(0,Ca.jsx)(le,{children:g.map(p=>(0,Ca.jsx)(A,{value:p.id,children:p.name},p.id))})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ca.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:s.isRecurring,onChange:p=>c({...s,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,Ca.jsx)(h,{htmlFor:"edit-isRecurring",children:"Make this Ca recurring reminder"})]}),s.isRecurring&&(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,Ca.jsxs)(ue,{value:s.recurrencePattern,onValueChange:p=>c({...s,recurrencePattern:p}),children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{})}),(0,Ca.jsxs)(le,{children:[(0,Ca.jsx)(A,{value:"daily",children:"Daily"}),(0,Ca.jsx)(A,{value:"weekly",children:"Weekly"}),(0,Ca.jsx)(A,{value:"monthly",children:"Monthly"}),(0,Ca.jsx)(A,{value:"yearly",children:"Yearly"})]})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,Ca.jsx)($,{id:"edit-recurrenceInterval",type:"number",min:"1",value:s.recurrenceInterval,onChange:p=>c({...s,recurrenceInterval:parseInt(p.target.value)})})]})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ca.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:s.reminderEnabled,onChange:p=>c({...s,reminderEnabled:p.target.checked}),className:"rounded border-border"}),(0,Ca.jsx)(h,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),s.reminderEnabled&&(0,Ca.jsxs)("div",{className:"pl-6",children:[(0,Ca.jsx)(h,{htmlFor:"edit-reminderMinutes",children:"Remind dt"}),(0,Ca.jsxs)(ue,{value:s.reminderMinutes.toString(),onValueChange:p=>c({...s,reminderMinutes:parseInt(p)}),children:[(0,Ca.jsx)(ne,{children:(0,Ca.jsx)(Ce,{})}),(0,Ca.jsxs)(le,{children:[(0,Ca.jsx)(A,{value:"5",children:"5 minutes before"}),(0,Ca.jsx)(A,{value:"15",children:"15 minutes before"}),(0,Ca.jsx)(A,{value:"30",children:"30 minutes before"}),(0,Ca.jsx)(A,{value:"60",children:"1 hour before"}),(0,Ca.jsx)(A,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(h,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,Ca.jsx)($,{id:"edit-tags",value:s.tags,onChange:p=>c({...s,tags:p.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Ca.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Ca.jsx)(D,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,Ca.jsx)(D,{type:"submit",children:"Save Changes"})]})]})]})})},fo=({reminder:e,colleagues:t,onUpdateReminder:r,onDeleteReminder:o})=>{let[n,s]=(0,ce.useState)(!1);if(!e||!e.id)return null;let c=la(e.dueDate,e.dueTime),d=da(e.dueDate),g=po(e.dueDate),p=()=>{r(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},l=()=>d?"Today":g?"Tomorrow":c&&!e.isCompleted?"Overdue":co(e.dueDate);return(0,Ca.jsxs)(Ca.Fragment,{children:[(0,Ca.jsx)(go,{reminder:e,colleagues:t,onUpdateReminder:r,open:n,onClose:()=>s(!1)}),(0,Ca.jsx)(Q,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${c&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,Ca.jsx)(gt,{className:"p-4",children:(0,Ca.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ca.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Ca.jsx)("button",{onClick:p,className:"dt-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,Ca.jsx)(dt.CheckCircle,{className:"h-5 w-5"}):(0,Ca.jsx)(dt.Circle,{className:"h-5 w-5"})}),(0,Ca.jsxs)("div",{className:"flex-1",children:[(0,Ca.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,Ca.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,Ca.jsx)("span",{className:"text-sm",children:lo(e.priority)}),e.isRecurring&&(0,Ca.jsx)(dt.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,Ca.jsx)(dt.Bell,{className:"h-4 w-4 text-success"})]}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Ca.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Ca.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Ca.jsx)(dt.Calendar,{className:"h-4 w-4"}),(0,Ca.jsx)("span",{className:c&&!e.isCompleted?"text-destructive font-medium":"",children:l()})]}),e.dueTime&&(0,Ca.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Ca.jsx)(dt.Clock,{className:"h-4 w-4"}),(0,Ca.jsx)("span",{children:mo(e.dueTime)})]}),(0,Ca.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Ca.jsx)(dt.User,{className:"h-4 w-4"}),(0,Ca.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,Ca.jsx)("div",{className:"flex flex-wrap gap-1 dt-2",children:e.tags.map((f,P)=>(0,Ca.jsx)(W,{variant:"secondary",className:"text-xs",children:f},P))})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Ca.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>s(!0),className:"h-8 w-8 p-0",children:(0,Ca.jsx)(dt.Edit2,{className:"h-4 w-4"})}),(0,Ca.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,Ca.jsx)(dt.Trash2,{className:"h-4 w-4"})})]})]})})})]})},vo=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:r,onUpdateReminder:o,onDeleteReminder:n})=>{let[s,c]=(0,ce.useState)(e.filter(Boolean)),[d]=(0,ce.useState)(t.filter(Boolean)),[g,p]=(0,ce.useState)("all"),[l,f]=(0,ce.useState)(""),[P,u]=(0,ce.useState)(!1),x=v=>{if(!v.title||!v.colleague?.id){console.error("Invalid reminder data:",v);return}let F={...v,id:Date.now().toString(),createdAt:new Date};c(Y=>[...Y,F]),r?.(v)},L=(v,F)=>{if(!v){console.error("No reminder ID provided for update");return}c(Y=>Y.map(J=>J?.id===v?{...J,...F}:J)),o?.(v,F)},y=v=>{if(!v){console.error("No reminder ID provided for deletion");return}c(F=>F.filter(Y=>Y?.id!==v)),n?.(v)},K=s.filter(v=>{if(!v)return!1;if(l){let F=l.toLowerCase();if(!(v.title.toLowerCase().includes(F)||v.description.toLowerCase().includes(F)||v.colleague?.name?.toLowerCase().includes(F)||v.tags?.some(J=>J.toLowerCase().includes(F))))return!1}switch(g){case"pending":return!v.isCompleted;case"completed":return v.isCompleted;case"overdue":return!v.isCompleted&&la(v.dueDate,v.dueTime);case"today":return da(new Date(v.dueDate));default:return!0}}).sort((v,F)=>{if(!v||!F)return 0;if(v.isCompleted&&!F.isCompleted)return 1;if(!v.isCompleted&&F.isCompleted)return-1;let Y={high:3,medium:2,low:1},J=Y[F.priority]-Y[v.priority];return J!==0?J:v.dueDate.getTime()-F.dueDate.getTime()}),j={total:s.filter(Boolean).length,pending:s.filter(v=>v&&!v.isCompleted).length,completed:s.filter(v=>v&&v.isCompleted).length,overdue:s.filter(v=>v&&!v.isCompleted&&la(v.dueDate,v.dueTime)).length,today:s.filter(v=>v&&da(new Date(v.dueDate))).length},ae=d.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",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:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return(0,Ca.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ca.jsx)(Ze,{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:()=>{u(!0)}}}),(0,Ca.jsxs)("div",{className:"h-full bg-background",children:[(0,Ca.jsx)(uo,{colleagues:d,onAddReminder:x,open:P,setOpen:u}),(0,Ca.jsxs)("div",{className:"p-6",children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Ca.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Ca.jsxs)(D,{className:"flex items-center space-x-2",onClick:()=>u(!0),children:[(0,Ca.jsx)(dt.Plus,{className:"h-4 w-4"}),(0,Ca.jsx)("span",{children:"Add Reminder"})]})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Ca.jsxs)(Q,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-foreground",children:j.total}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Ca.jsxs)(Q,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-primary",children:j.pending}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Ca.jsxs)(Q,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-success",children:j.completed}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Ca.jsxs)(Q,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-destructive",children:j.overdue}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Ca.jsxs)(Q,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-warning",children:j.today}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Ca.jsx)("div",{className:"flex-1",children:(0,Ca.jsx)($,{placeholder:"Search reminders...",value:l,onChange:v=>f(v.target.value),className:"max-w-md"})}),(0,Ca.jsxs)(ue,{value:g,onValueChange:v=>p(v),children:[(0,Ca.jsx)(ne,{className:"w-40",children:(0,Ca.jsx)(Ce,{})}),(0,Ca.jsxs)(le,{children:[(0,Ca.jsxs)(A,{value:"all",children:["All (",j.total,")"]}),(0,Ca.jsxs)(A,{value:"pending",children:["Pending (",j.pending,")"]}),(0,Ca.jsxs)(A,{value:"completed",children:["Completed (",j.completed,")"]}),(0,Ca.jsxs)(A,{value:"overdue",children:["Overdue (",j.overdue,")"]}),(0,Ca.jsxs)(A,{value:"today",children:["Today (",j.today,")"]})]})]})]}),(0,Ca.jsx)("div",{className:"space-y-4",children:K.length===0?(0,Ca.jsxs)(Q,{className:"p-8 text-center",children:[(0,Ca.jsx)("div",{className:"text-muted-foreground",children:l||g!=="all"?"No reminders match your filters":"No reminders yet"}),!l&&g==="all"&&(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground/60 dt-2",children:"Create your first reminder to get started"})]}):K.map(v=>v&&(0,Ca.jsx)(fo,{reminder:v,colleagues:d,onUpdateReminder:L,onDeleteReminder:y},v.id))})]})]})]})};var bo=({tasks:e,epics:t,sprints:r,onUpdateTask:o,onTaskClick:n,onAddTaskToEpic:s,onAddEpic:c,onUpdateEpic:d,onDeleteEpic:g})=>{let[p,l]=(0,ce.useState)(null),[f,P]=(0,ce.useState)(null),[u,x]=(0,ce.useState)({}),[L,y]=(0,ce.useState)(0),H=(0,ce.useRef)(null),K=(0,ce.useRef)(null);(0,ce.useEffect)(()=>{let w=()=>{if(H.current){let ve=H.current.offsetHeight;y(ve)}};w();let _=new ResizeObserver(w);H.current&&_.observe(H.current);let Re=()=>{setTimeout(w,100)};return window.addEventListener("storage",Re),()=>{_.disconnect(),window.removeEventListener("storage",Re)}},[]),(0,ce.useEffect)(()=>{let w=setTimeout(()=>{H.current&&y(H.current.offsetHeight)},300);return()=>clearTimeout(w)},[f]);let j=w=>{l(w)},ae=w=>{w.preventDefault()},v=(w,_)=>{w.preventDefault(),p&&p.epicId!==_&&(o(p.id,{epicId:_}),l(null))},F=w=>e.filter(_=>_.epicId===w),Y=w=>{P(w.id),x({name:w.name,description:w.description,confidence:w.confidence,phase:w.phase,progress:w.progress})},J=()=>{f&&u.name&&(d(f,u),P(null),x({}))},Se=()=>{P(null),x({})},U=w=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&g(w)},xe=w=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[w]||`Phase ${w}`,E=w=>{switch(w){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,Ca.jsxs)("div",{ref:K,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Ca.jsx)("div",{ref:H,className:"flex-shrink-0",children:(0,Ca.jsx)(Ze,{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,Ca.jsx)("div",{className:"flex-1 min-h-0 dt-8",children:(0,Ca.jsx)("div",{className:"h-full overflow-y-auto",style:{height:L>0?`calc(100vh - ${L+120}px)`:"calc(100vh - 12rem)"},children:(0,Ca.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(w=>{let _=F(w.id),Re=_.reduce((q,Ee)=>q+Ee.points,0),ve=L>0?`calc(100vh - ${L+200}px)`:"calc(100vh - 14rem)";return(0,Ca.jsxs)(Q,{className:`flex flex-col ${f===w.id?"h-auto":""} bg-card shadow-sm`,style:{height:f===w.id?"auto":ve,minHeight:"400px"},onDragOver:ae,onDrop:q=>v(q,w.id),children:[(0,Ca.jsx)("div",{className:"p-4 border-Ca border-border",children:f===w.id?(0,Ca.jsxs)("div",{className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)($,{value:u.name||"",onChange:q=>x({...u,name:q.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Ca.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Ca.jsx)(D,{size:"sm",variant:"ghost",onClick:J,className:"p-1 h-8 w-8",children:(0,Ca.jsx)(dt.Check,{className:"h-4 w-4"})}),(0,Ca.jsx)(D,{size:"sm",variant:"ghost",onClick:Se,className:"p-1 h-8 w-8",children:(0,Ca.jsx)(dt.X,{className:"h-4 w-4"})})]})]}),(0,Ca.jsx)(be,{value:u.description||"",onChange:q=>x({...u,description:q.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Ca.jsxs)("select",{value:u.confidence||w.confidence,onChange:q=>x({...u,confidence:q.target.value}),className:"flex h-8 w-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,Ca.jsx)("option",{value:"low",children:"Low"}),(0,Ca.jsx)("option",{value:"medium",children:"Medium"}),(0,Ca.jsx)("option",{value:"high",children:"High"})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Ca.jsx)("select",{value:u.phase?.toString()||w.phase.toString(),onChange:q=>x({...u,phase:parseInt(q.target.value)}),className:"flex h-8 w-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(q=>(0,Ca.jsxs)("option",{value:q.toString(),children:["Phase ",q]},q))})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,Ca.jsx)($,{type:"number",min:"0",max:"100",value:u.progress||w.progress,onChange:q=>x({...u,progress:parseInt(q.target.value)||0}),className:"text-xs"})]})]}):(0,Ca.jsxs)(Ca.Fragment,{children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Ca.jsx)("div",{className:`w-4 h-4 rounded-full ${w.color}`}),(0,Ca.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:w.name}),(0,Ca.jsxs)("div",{className:"flex gap-1",children:[(0,Ca.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>Y(w),className:"p-1 h-8 w-8",children:(0,Ca.jsx)(dt.Edit2,{className:"h-3 w-3"})}),(0,Ca.jsx)(D,{size:"sm",variant:"ghost",onClick:()=>U(w.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Ca.jsx)(dt.Trash2,{className:"h-3 w-3"})})]})]}),(0,Ca.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Ca.jsxs)(W,{className:`text-xs ${E(w.confidence)}`,children:[w.confidence," confidence"]}),(0,Ca.jsxs)(W,{variant:"outline",className:"text-xs",children:["Phase ",w.phase]}),(0,Ca.jsxs)(W,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[_.length," tasks"]}),(0,Ca.jsxs)(W,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Re," pts"]})]}),w.description&&(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:w.description}),(0,Ca.jsxs)("div",{className:"mb-3",children:[(0,Ca.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,Ca.jsx)("span",{className:"select-none",children:"Progress"}),(0,Ca.jsxs)("span",{className:"select-none",children:[w.progress,"%"]})]}),(0,Ca.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,Ca.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${w.progress}%`}})})]}),(0,Ca.jsxs)(D,{onClick:()=>s(w.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Ca.jsx)(dt.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Ca.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Ca.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:_.length===0?(0,Ca.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,Ca.jsx)(dt.Move,{className:"h-8 w-8 mb-2"}),(0,Ca.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):_.map(q=>(0,Ca.jsx)(St,{task:q,epic:w,onDragStart:j,onTaskClick:n,isCompact:!0},q.id))})})]},w.id)})})})})]})};0&&(module.exports={DCProjectCard,EpicsView,KanbanBoardView,PlanningView,TasksView});
|
|
5
|
+
"use strict";var cr=Object.create;var St=Object.defineProperty;var mr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var ur=Object.getPrototypeOf,gr=Object.prototype.hasOwnProperty;var fr=(e,t)=>{for(var a in t)St(e,a,{get:t[a],enumerable:!0})},pa=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pr(t))!gr.call(e,i)&&i!==a&&St(e,i,{get:()=>t[i],enumerable:!(r=mr(t,i))||r.enumerable});return e};var ie=(e,t,a)=>(a=e!=null?cr(ur(e)):{},pa(t||!e||!e.__esModule?St(a,"default",{value:e,enumerable:!0}):a,e)),vr=e=>pa(St({},"__esModule",{value:!0}),e);var bo={};fr(bo,{DCProjectCard:()=>Ea,EpicsView:()=>vo,KanbanBoardView:()=>so,PlanningView:()=>no,TasksView:()=>fo});module.exports=vr(bo);var Ra=require("motion/react"),nt=require("lucide-react");var wa=require("class-variance-authority");var Na=require("clsx");var $t="-",br=e=>{let t=xr(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:m=>{let n=m.split($t);return n[0]===""&&n.length!==1&&n.shift(),fa(n,t)||hr(m)},getConflictingClassGroupIds:(m,n)=>{let u=a[m]||[];return n&&r[m]?[...u,...r[m]]:u}}},fa=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],r=t.nextPart.get(a),i=r?fa(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let s=e.join($t);return t.validators.find(({validator:m})=>m(s))?.classGroupId},ua=/^\[(.+)\]$/,hr=e=>{if(ua.test(e)){let t=ua.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},xr=e=>{let{theme:t,prefix:a}=e,r={nextPart:new Map,validators:[]};return Nr(Object.entries(e.classGroups),a).forEach(([s,m])=>{Gt(m,r,s,t)}),r},Gt=(e,t,a,r)=>{e.forEach(i=>{if(typeof i=="string"){let s=i===""?t:ga(t,i);s.classGroupId=a;return}if(typeof i=="function"){if(yr(i)){Gt(i(r),t,a,r);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([s,m])=>{Gt(m,ga(t,s),a,r)})})},ga=(e,t)=>{let a=e;return t.split($t).forEach(r=>{a.nextPart.has(r)||a.nextPart.set(r,{nextPart:new Map,validators:[]}),a=a.nextPart.get(r)}),a},yr=e=>e.isThemeGetter,Nr=(e,t)=>t?e.map(([a,r])=>{let i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([m,n])=>[t+m,n])):s);return[a,i]}):e,wr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,r=new Map,i=(s,m)=>{a.set(s,m),t++,t>e&&(t=0,r=a,a=new Map)};return{get(s){let m=a.get(s);if(m!==void 0)return m;if((m=r.get(s))!==void 0)return i(s,m),m},set(s,m){a.has(s)?a.set(s,m):i(s,m)}}},va="!",Cr=e=>{let{separator:t,experimentalParseClassName:a}=e,r=t.length===1,i=t[0],s=t.length,m=n=>{let u=[],p=0,d=0,g;for(let v=0;v<n.length;v++){let f=n[v];if(p===0){if(f===i&&(r||n.slice(v,v+s)===t)){u.push(n.slice(d,v)),d=v+s;continue}if(f==="/"){g=v;continue}}f==="["?p++:f==="]"&&p--}let R=u.length===0?n:n.substring(d),C=R.startsWith(va),h=C?R.substring(1):R,L=g&&g>d?g-d:void 0;return{modifiers:u,hasImportantModifier:C,baseClassName:h,maybePostfixModifierPosition:L}};return a?n=>a({className:n,parseClassName:m}):m},Sr=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},Dr=e=>({cache:wr(e.cacheSize),parseClassName:Cr(e),...br(e)}),kr=/\s+/,Tr=(e,t)=>{let{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],m=e.trim().split(kr),n="";for(let u=m.length-1;u>=0;u-=1){let p=m[u],{modifiers:d,hasImportantModifier:g,baseClassName:R,maybePostfixModifierPosition:C}=a(p),h=!!C,L=r(h?R.substring(0,C):R);if(!L){if(!h){n=p+(n.length>0?" "+n:n);continue}if(L=r(R),!L){n=p+(n.length>0?" "+n:n);continue}h=!1}let v=Sr(d).join(":"),f=g?v+va:v,M=f+L;if(s.includes(M))continue;s.push(M);let $=i(L,h);for(let te=0;te<$.length;++te){let S=$[te];s.push(f+S)}n=p+(n.length>0?" "+n:n)}return n};function Pr(){let e=0,t,a,r="";for(;e<arguments.length;)(t=arguments[e++])&&(a=ba(t))&&(r&&(r+=" "),r+=a);return r}var ba=e=>{if(typeof e=="string")return e;let t,a="";for(let r=0;r<e.length;r++)e[r]&&(t=ba(e[r]))&&(a&&(a+=" "),a+=t);return a};function Rr(e,...t){let a,r,i,s=m;function m(u){let p=t.reduce((d,g)=>g(d),e());return a=Dr(p),r=a.cache.get,i=a.cache.set,s=n,n(u)}function n(u){let p=r(u);if(p)return p;let d=Tr(u,a);return i(u,d),d}return function(){return s(Pr.apply(null,arguments))}}var q=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},ha=/^\[(?:([a-z-]+):)?(.+)\]$/i,Er=/^\d+\/\d+$/,Ir=new Set(["px","full","screen"]),Ar=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(Ca|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Br=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Mr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Ca-?((\d+)?\.?(\d+)[a-z]+|0)/,Or=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ge=e=>it(e)||Ir.has(e)||Er.test(e),je=e=>st(e,"length",jr),it=e=>!!e&&!Number.isNaN(Number(e)),Vt=e=>st(e,"number",it),pt=e=>!!e&&Number.isInteger(Number(e)),zr=e=>e.endsWith("%")&&it(e.slice(0,-1)),A=e=>ha.test(e),We=e=>Ar.test(e),Fr=new Set(["length","size","percentage"]),Hr=e=>st(e,Fr,xa),Vr=e=>st(e,"position",xa),Gr=new Set(["image","url"]),$r=e=>st(e,Gr,_r),Ur=e=>st(e,"",Wr),ut=()=>!0,st=(e,t,a)=>{let r=ha.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):a(r[2]):!1},jr=e=>Lr.test(e)&&!Br.test(e),xa=()=>!1,Wr=e=>Mr.test(e),_r=e=>Or.test(e);var Kr=()=>{let e=q("colors"),t=q("spacing"),a=q("blur"),r=q("brightness"),i=q("borderColor"),s=q("borderRadius"),m=q("borderSpacing"),n=q("borderWidth"),u=q("contrast"),p=q("grayscale"),d=q("hueRotate"),g=q("invert"),R=q("gap"),C=q("gradientColorStops"),h=q("gradientColorStopPositions"),L=q("inset"),v=q("margin"),f=q("opacity"),M=q("padding"),$=q("saturate"),te=q("scale"),S=q("sepia"),H=q("skew"),ae=q("space"),ee=q("translate"),ye=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],fe=()=>["auto",A,t],I=()=>[A,t],T=()=>["",Ge,je],j=()=>["auto",it,A],Ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],me=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ze=()=>["start","end","center","between","around","evenly","stretch"],Ve=()=>["","0",A],Ze=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Ne=()=>[it,A];return{cacheSize:500,separator:":",theme:{colors:[ut],spacing:[Ge,je],blur:["none","",We,A],brightness:Ne(),borderColor:[e],borderRadius:["none","","full",We,A],borderSpacing:I(),borderWidth:T(),contrast:Ne(),grayscale:Ve(),hueRotate:Ne(),invert:Ve(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[zr,je],inset:fe(),margin:fe(),opacity:Ne(),padding:I(),saturate:Ne(),scale:Ne(),sepia:Ve(),skew:Ne(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",A]}],container:["container"],columns:[{columns:[We]}],"break-after":[{"break-after":Ze()}],"break-before":[{"break-before":Ze()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ce(),A]}],overflow:[{overflow:z()}],"overflow-Ca":[{"overflow-Ca":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:ye()}],"overscroll-Ca":[{"overscroll-Ca":ye()}],"overscroll-y":[{"overscroll-y":ye()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[L]}],"inset-Ca":[{"inset-Ca":[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"],z:[{z:["auto",pt,A]}],basis:[{basis:fe()}],"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:Ve()}],shrink:[{shrink:Ve()}],order:[{order:["first","last","none",pt,A]}],"grid-cols":[{"grid-cols":[ut]}],"col-start-end":[{col:["auto",{span:["full",pt,A]},A]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[ut]}],"row-start-end":[{row:["auto",{span:[pt,A]},A]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"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:[R]}],"gap-Ca":[{"gap-Ca":[R]}],"gap-y":[{"gap-y":[R]}],"justify-content":[{justify:["normal",...ze()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ze(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ze(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-Ca":[{"space-Ca":[ae]}],"space-Ca-reverse":["space-Ca-reverse"],"space-y":[{"space-y":[ae]}],"space-y-reverse":["space-y-reverse"],Ca:[{Ca:["auto","min","max","fit","svw","lvw","dvw",A,t]}],"min-Ca":[{"min-Ca":[A,t,"min","max","fit"]}],"max-Ca":[{"max-Ca":[A,t,"none","full","min","max","fit","prose",{screen:[We]},We]}],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",We,je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vt]}],"font-family":[{font:[ut]}],"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",it,Vt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ge,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:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ge,je]}],"underline-offset":[{"underline-offset":["auto",Ge,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:[...Ce(),Vr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","Ca","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Hr]}],"bg-image":[{bg:["none",{"gradient-to":["t","le","r","br","b","bl","Ca","tl"]},$r]}],"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:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-Ca":[{"rounded-Ca":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-Ca":[{"rounded-Ca":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-le":[{"rounded-le":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-Ca":[{border:[n]}],"border-Ca-Ca":[{"border-Ca":[n]}],"border-Ca-y":[{"border-y":[n]}],"border-Ca-s":[{"border-s":[n]}],"border-Ca-e":[{"border-e":[n]}],"border-Ca-t":[{"border-t":[n]}],"border-Ca-r":[{"border-r":[n]}],"border-Ca-b":[{"border-b":[n]}],"border-Ca-Ca":[{"border-Ca":[n]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...me(),"hidden"]}],"divide-Ca":[{"divide-Ca":[n]}],"divide-Ca-reverse":["divide-Ca-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:me()}],"border-color":[{border:[i]}],"border-color-Ca":[{"border-Ca":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[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-Ca":[{"border-Ca":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...me()]}],"outline-offset":[{"outline-offset":[Ge,A]}],"outline-Ca":[{outline:[Ge,je]}],"outline-color":[{outline:[e]}],"ring-Ca":[{ring:T()}],"ring-Ca-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-Ca":[{"ring-offset":[Ge,je]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",We,Ur]}],"shadow-color":[{shadow:[ut]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",We,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":[m]}],"border-spacing-Ca":[{"border-spacing-Ca":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",A]}],duration:[{duration:Ne()}],ease:[{ease:["linear","in","out","in-out",A]}],delay:[{delay:Ne()}],animate:[{animate:["none","spin","ping","pulse","bounce",A]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[te]}],"scale-Ca":[{"scale-Ca":[te]}],"scale-y":[{"scale-y":[te]}],rotate:[{rotate:[pt,A]}],"translate-Ca":[{"translate-Ca":[ee]}],"translate-y":[{"translate-y":[ee]}],"skew-Ca":[{"skew-Ca":[H]}],"skew-y":[{"skew-y":[H]}],"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","s-resize","Ca-resize","Ca-resize","nw-resize","Ca-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","Ca",""]}],"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-mr":[{"scroll-mr":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","Ca","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-Ca":[{"touch-pan":["Ca","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-Ca":[{stroke:[Ge,je,Vt]}],stroke:[{stroke:[e,"none"]}],Ca:["Ca-only","not-Ca-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-Ca","overflow-y"],overscroll:["overscroll-Ca","overscroll-y"],inset:["inset-Ca","inset-y","start","end","top","right","bottom","left"],"inset-Ca":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-Ca","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["Ca","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-Ca","rounded-ss","rounded-Ca","rounded-ee","rounded-es","rounded-tl","rounded-le","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Ca","rounded-ee"],"rounded-t":["rounded-tl","rounded-le"],"rounded-r":["rounded-le","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-Ca":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-Ca","border-spacing-y"],"border-Ca":["border-Ca-s","border-Ca-e","border-Ca-t","border-Ca-r","border-Ca-b","border-Ca-Ca"],"border-Ca-Ca":["border-Ca-r","border-Ca-Ca"],"border-Ca-y":["border-Ca-t","border-Ca-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-Ca"],"border-color-Ca":["border-color-r","border-color-Ca"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-Ca","touch-y","touch-pz"],"touch-Ca":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ya=Rr(Kr);function y(...e){return ya((0,Na.clsx)(e))}var Ca=require("react/jsx-runtime"),qr=(0,wa.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 X({className:e,variant:t,...a}){return(0,Ca.jsx)("div",{className:y(qr({variant:t}),e),...a})}var Sa=require("@radix-ui/react-slot"),ka=ie(require("react")),Dt=(0,wa.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 Ca-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"}}}),k=ka.forwardRef(({asChild:e=!1,className:t,size:a,variant:r,...i},s)=>(0,Ca.jsx)(e?Sa.Slot:"button",{className:y(Dt({className:t,size:a,variant:r})),ref:s,...i}));k.displayName="Button";var Ye=ie(require("react"));var Z=Ye.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Z.displayName="Card";var Ut=Ye.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",e),...t}));Ut.displayName="CardHeader";var jt=Ye.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)("div",{ref:a,className:y("font-semibold leading-none tracking-tight",e),...t}));jt.displayName="CardTitle";var Wt=Ye.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)("div",{ref:a,className:y("text-sm text-muted-foreground",e),...t}));Wt.displayName="CardDescription";var gt=Ye.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)("div",{ref:a,className:y("p-6 pt-0",e),...t}));gt.displayName="CardContent";var _t=Ye.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)("div",{ref:a,className:y("flex items-center p-6 pt-0",e),...t}));_t.displayName="CardFooter";var Pa=ie(require("react")),ft=ie(require("@radix-ui/react-progress"));var qt=Pa.forwardRef(({className:e,value:t,...a},r)=>(0,Ca.jsx)(ft.Root,{ref:r,className:y("relative h-4 Ca-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Ca.jsx)(ft.Indicator,{className:"h-full Ca-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));qt.displayName=ft.Root.displayName;function Ea({project:e,onOpen:t,onShare:a,className:r}){return(0,Ca.jsx)(Ra.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,Ca.jsxs)(Z,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Ca.jsxs)(Ut,{children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)(jt,{children:e.name}),(0,Ca.jsxs)(X,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Ca.jsx)(Wt,{children:e.description})]}),(0,Ca.jsxs)(gt,{className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Ca.jsx)("span",{children:"Progress"}),(0,Ca.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Ca.jsx)(qt,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Ca.jsxs)("div",{className:"flex items-center",children:[(0,Ca.jsx)(nt.Users,{className:"mr-1 h-4 Ca-4"}),e.members," members"]}),(0,Ca.jsxs)("div",{className:"flex items-center",children:[(0,Ca.jsx)(nt.FileText,{className:"mr-1 h-4 Ca-4"}),e.files," files"]})]})]}),(0,Ca.jsxs)(_t,{className:"flex gap-2",children:[(0,Ca.jsx)(k,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Ca.jsx)(k,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Ca.jsx)(nt.Share2,{className:"h-4 Ca-4"})})]})]})})}var le=require("react");var Ia=({title:e,status:t,taskCount:a,children:r,onDrop:i,isCompact:s=!1,height:m})=>{let n=d=>{d.preventDefault()},u=d=>{d.preventDefault(),i(t)};return(0,Ca.jsxs)(Z,{className:`p-4 bg-card border-Ca-4 ${(()=>{switch(t){case"todo":return"border-Ca-gray-400";case"in-progress":return"border-Ca-blue-500";case"review":return"border-Ca-orange-500";case"done":return"border-Ca-green-500";default:return"border-Ca-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${s?"lg:max-Ca-xs":""}`,style:{height:m||"calc(100vh - 350px)"},onDragOver:n,onDrop:u,children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Ca.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,Ca.jsx)(X,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Ca.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:r})]})};var vt=({task:e,epic:t,onDragStart:a,onTaskClick:r,isCompact:i=!1})=>{let s=d=>{a(e)},m=()=>{r(e)},n=()=>{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,Ca.jsx)(nt.BookOpen,{className:"h-3 Ca-3"});case"bug":return(0,Ca.jsx)(nt.Bug,{className:"h-3 Ca-3"});case"spike":return(0,Ca.jsx)(nt.Zap,{className:"h-3 Ca-3"});case"task":default:return(0,Ca.jsx)(nt.AlertCircle,{className:"h-3 Ca-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,Ca.jsx)(Z,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:m,children:(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:u()}),(0,Ca.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Ca.jsxs)(Z,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:s,onClick:m,children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ca.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[u(),(0,Ca.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Ca.jsxs)("div",{className:"flex gap-1",children:[(0,Ca.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${n()}`,children:e.priority}),(0,Ca.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,Ca.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ca.jsx)(nt.User,{className:"h-4 Ca-4"}),(0,Ca.jsx)("span",{children:e.assignee?.value?.name})]}),(0,Ca.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ca.jsx)(nt.Calendar,{className:"h-4 Ca-4"}),(0,Ca.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var bt=ie(require("react")),de=ie(require("@radix-ui/react-dialog"));var Be=de.Root;var Jr=de.Portal;var La=bt.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(de.Overlay,{ref:a,className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));La.displayName=de.Overlay.displayName;var ke=bt.forwardRef(({className:e,children:t,...a},r)=>(0,Ca.jsxs)(Jr,{children:[(0,Ca.jsx)(La,{}),(0,Ca.jsxs)(de.Content,{ref:r,className:y("fixed left-[50%] top-[50%] z-50 grid Ca-full max-Ca-lg translate-Ca-[-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,Ca.jsxs)(de.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,Ca.jsx)(nt.X,{className:"h-4 Ca-4"}),(0,Ca.jsx)("span",{className:"Ca-only",children:"Close"})]})]})]}));ke.displayName=de.Content.displayName;var Te=({className:e,...t})=>(0,Ca.jsx)("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Te.displayName="DialogHeader";var ht=({className:e,...t})=>(0,Ca.jsx)("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-Ca-2",e),...t});ht.displayName="DialogFooter";var Pe=bt.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(de.Title,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",e),...t}));Pe.displayName=de.Title.displayName;var Xr=bt.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(de.Description,{ref:a,className:y("text-sm text-muted-foreground",e),...t}));Xr.displayName=de.Description.displayName;var Ba=ie(require("react"));var V=Ba.forwardRef(({className:e,type:t,...a},r)=>(0,Ca.jsx)("input",{type:t,className:y("flex h-9 Ca-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 Oa=ie(require("react")),pe=Oa.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)("textarea",{className:y("flex min-h-[80px] Ca-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}));pe.displayName="Textarea";var B=ie(require("@radix-ui/react-select")),_e=ie(require("react")),xe=B.Root;var Me=B.Value,ve=_e.forwardRef(({children:e,className:t,...a},r)=>(0,Ca.jsxs)(B.Trigger,{className:y("flex h-10 Ca-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,Ca.jsx)(B.Icon,{asChild:!0,children:(0,Ca.jsx)(nt.ChevronDown,{className:"h-4 Ca-4 opacity-50"})})]}));ve.displayName=B.Trigger.displayName;var Fa=_e.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(B.ScrollUpButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Ca.jsx)(nt.ChevronUp,{className:"h-4 Ca-4"})}));Fa.displayName=B.ScrollUpButton.displayName;var Ha=_e.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(B.ScrollDownButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Ca.jsx)(nt.ChevronDown,{className:"h-4 Ca-4"})}));Ha.displayName=B.ScrollDownButton.displayName;var be=_e.forwardRef(({children:e,className:t,position:a="popper",...r},i)=>(0,Ca.jsx)(B.Portal,{children:(0,Ca.jsxs)(B.Content,{className:y("relative z-50 max-h-96 min-Ca-[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-Ca-1 data-[side=right]:translate-Ca-1 data-[side=top]:-translate-y-1",t),position:a,ref:i,...r,children:[(0,Ca.jsx)(Fa,{}),(0,Ca.jsx)(B.Viewport,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] Ca-full min-Ca-[var(--radix-select-trigger-width)]"),children:e}),(0,Ca.jsx)(Ha,{})]})}));be.displayName=B.Content.displayName;var Zr=_e.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(B.Label,{className:y("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Zr.displayName=B.Label.displayName;var J=_e.forwardRef(({children:e,className:t,...a},r)=>(0,Ca.jsxs)(B.Item,{className:y("relative flex Ca-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,Ca.jsx)("span",{className:"absolute left-2 flex h-3.5 Ca-3.5 items-center justify-center",children:(0,Ca.jsx)(B.ItemIndicator,{children:(0,Ca.jsx)(nt.Check,{className:"h-4 Ca-4"})})}),(0,Ca.jsx)(B.ItemText,{children:e})]}));J.displayName=B.Item.displayName;var Yr=_e.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(B.Separator,{className:y("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Yr.displayName=B.Separator.displayName;var Va=ie(require("react")),Jt=ie(require("@radix-ui/react-label"));var Qr=(0,wa.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),D=Va.forwardRef(({className:e,...t},a)=>(0,$a.jsx)(Jt.Root,{ref:a,className:y(Qr(),e),...t}));D.displayName=Jt.Root.displayName;var at=ie(require("react")),lt=ie(require("@radix-ui/react-toggle-group"));var Ua=ie(require("react")),Xt=ie(require("@radix-ui/react-toggle"));var Zt=(0,wa.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-Ca-9",sm:"h-8 px-1.5 min-Ca-8",lg:"h-10 px-2.5 min-Ca-10"}},defaultVariants:{variant:"default",size:"default"}}),eo=Ua.forwardRef(({className:e,variant:t,size:a,...r},i)=>(0,Ca.jsx)(Xt.Root,{ref:i,className:y(Zt({variant:t,size:a,className:e})),...r}));eo.displayName=Xt.Root.displayName;var _a=at.createContext({size:"default",variant:"default"}),rt=at.forwardRef(({className:e,variant:t,size:a,children:r,...i},s)=>(0,Ca.jsx)(lt.Root,{ref:s,className:y("flex items-center justify-center gap-1",e),...i,children:(0,Ca.jsx)(_a.Provider,{value:{variant:t,size:a},children:r})}));rt.displayName=lt.Root.displayName;var ot=at.forwardRef(({className:e,children:t,variant:a,size:r,...i},s)=>{let m=at.useContext(_a);return(0,Ca.jsx)(lt.Item,{ref:s,className:y(Zt({variant:m.variant||a,size:m.size||r}),e),...i,children:t})});ot.displayName=lt.Item.displayName;var to=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:nt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:nt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:nt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:nt.Zap}],ao=[{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"}],Ka=({isOpen:e,onClose:t,onAddTask:a,epics:r,sprints:i,assignees:s,defaultEpicId:m})=>{let[n,u]=(0,le.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epicId:"",sprintId:"none",assignee:""});(0,le.useEffect)(()=>{e&&m&&u(g=>({...g,epicId:m}))},[e,m]),(0,le.useEffect)(()=>{e&&u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epicId:m||"",sprintId:"none",assignee:""})},[e]);let p=g=>{g.preventDefault(),n.name.trim()&&(a({name:n.name.trim(),description:n.description.trim(),status:"todo",priority:n.priority,type:n.type,storyPoints:n.storyPoints,epic:Number(n.epicId),sprint:Number(n.sprintId),assignee:n.assignee.trim()?{relationTo:"digital-colleagues",value:Number(n.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epicId:m||"",sprintId:"none",assignee:""}),t())},d=(g,R)=>{u(C=>({...C,[g]:R}))};return(0,Ca.jsx)(Be,{open:e,onOpenChange:t,children:(0,Ca.jsxs)(ke,{className:"sm:max-Ca-md",children:[(0,Ca.jsx)(Te,{children:(0,Ca.jsx)(Pe,{children:"Add New Task"})}),(0,Ca.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"name",children:"Task Title"}),(0,Ca.jsx)(V,{id:"name",value:n.name,onChange:g=>d("name",g.target.value),placeholder:"Enter task title",required:!0})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Ca.jsx)(pe,{id:"description",value:n.description,onChange:g=>d("description",g.target.value),placeholder:"Enter task description",rows:3})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"Type"}),(0,Ca.jsx)(rt,{type:"single",value:n.type||"",onValueChange:g=>g&&d("type",g),children:to.map(g=>{let R=g.icon;return(0,Ca.jsxs)(ot,{value:g.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Ca.jsx)(R,{className:"h-4 Ca-4"}),g.label]},g.value)})})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"Priority"}),(0,Ca.jsx)(rt,{type:"single",value:n.priority||"",onValueChange:g=>g&&d("priority",g),children:ao.map(g=>(0,Ca.jsx)(ot,{value:g.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:g.label},g.value))})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"points",children:"Story Points"}),(0,Ca.jsx)(V,{id:"points",type:"number",min:"1",max:"100",value:n.storyPoints,onChange:g=>d("storyPoints",parseInt(g.target.value)||1),placeholder:"Enter story points",required:!0})]}),!m&&(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"epic",children:"Epic"}),(0,Ca.jsxs)(xe,{value:n.epicId,onValueChange:g=>d("epicId",g),children:[(0,Ca.jsx)(ve,{children:(0,Ca.jsx)(Me,{placeholder:"Select an epic"})}),(0,Ca.jsx)(be,{children:r.map(g=>(0,Ca.jsx)(J,{value:g.id.toString(),children:(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsx)("div",{className:`Ca-3 h-3 rounded-full ${g.color}`}),g.name]})},g.id))})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Ca.jsxs)(xe,{value:n.sprintId,onValueChange:g=>d("sprintId",g),children:[(0,Ca.jsx)(ve,{children:(0,Ca.jsx)(Me,{placeholder:"Select a sprint"})}),(0,Ca.jsxs)(be,{children:[(0,Ca.jsx)(J,{value:"none",children:"No Sprint"}),i.map(g=>(0,Ca.jsx)(J,{value:g.id.toString(),children:(0,Ca.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"sprint",children:"Assignee"}),(0,Ca.jsxs)(xe,{value:n.assignee,onValueChange:g=>d("assignee",g),children:[(0,Ca.jsx)(ve,{children:(0,Ca.jsx)(Me,{placeholder:"Select an Assignee"})}),(0,Ca.jsxs)(be,{children:[(0,Ca.jsx)(J,{value:"none",children:"No Assignee"}),s.map(g=>(0,Ca.jsx)(J,{value:g.id.toString(),children:(0,Ca.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,Ca.jsxs)(ht,{children:[(0,Ca.jsx)(k,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Ca.jsx)(k,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Qt=({fieldName:e,value:t,label:a,multiline:r=!1,onSave:i,className:s="",disabled:m=!1})=>{let[n,u]=(0,le.useState)(!1),[p,d]=(0,le.useState)(""),g=()=>{m||(u(!0),d(t))},R=async()=>{p!==t&&await i(e,p),u(!1)},C=h=>{h.key==="Enter"&&!r||h.key==="Enter"&&h.ctrlKey&&r?R():h.key==="Escape"&&(u(!1),d(""))};return(0,$e.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,$e.jsx)(D,{children:a}),n?r?(0,$e.jsx)(pe,{value:p,onChange:h=>d(h.target.value),onBlur:R,onKeyDown:C,autoFocus:!0,rows:4,className:"resize-none"}):(0,$e.jsx)(V,{value:p,onChange:h=>d(h.target.value),onBlur:R,onKeyPress:C,autoFocus:!0,className:"text-lg font-medium"}):(0,$e.jsxs)("div",{onClick:g,className:`${m?"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,$e.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!m&&(0,$e.jsx)(nt.Edit,{className:"h-4 Ca-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Tt=ie(require("react")),Ue=ie(require("@radix-ui/react-avatar"));var ea=Tt.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(Ue.Root,{ref:a,className:y("relative flex h-10 Ca-10 shrink-0 overflow-hidden rounded-full",e),...t}));ea.displayName=Ue.Root.displayName;var ro=Tt.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(Ue.Image,{ref:a,className:y("aspect-square h-full Ca-full",e),...t}));ro.displayName=Ue.Image.displayName;var ta=Tt.forwardRef(({className:e,...t},a)=>(0,Ca.jsx)(Ue.Fallback,{ref:a,className:y("flex h-full Ca-full items-center justify-center rounded-full bg-muted",e),...t}));ta.displayName=Ue.Fallback.displayName;var Xa=({comments:e,onAddComment:t})=>{let[a,r]=(0,le.useState)(""),i=m=>m.split(" ").map(n=>n[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),r(""))};return(0,Ca.jsxs)("div",{className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsx)(nt.MessageSquare,{className:"h-5 Ca-5"}),(0,Ca.jsx)(D,{className:"text-lg font-medium",children:"Comments"}),(0,Ca.jsx)(X,{variant:"secondary",children:e.length})]}),(0,Ca.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(m=>(0,Ca.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Ca.jsx)(ea,{className:"h-8 Ca-8 mt-1",children:(0,Ca.jsx)(ta,{className:"text-xs bg-muted text-muted-foreground",children:i(m.author)})}),(0,Ca.jsxs)("div",{className:"flex-1",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Ca.jsx)("span",{className:"font-medium text-sm",children:m.author}),(0,Ca.jsxs)("span",{className:"text-xs text-muted-foreground",children:[m.createdAt.toLocaleDateString()," at ",m.createdAt.toLocaleTimeString()]})]}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground",children:m.text})]})]},m.id))}),(0,Ca.jsxs)("div",{className:"flex gap-2",children:[(0,Ca.jsx)(pe,{value:a,onChange:m=>r(m.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Ca.jsx)(k,{onClick:s,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Ca.jsx)(nt.Send,{className:"h-4 Ca-4"})})]})]})};var Et=({label:e,value:t,onValueChange:a,options:r,showColor:i=!1,disabled:s=!1})=>{let[m,n]=(0,le.useState)(!1),u=r.find(d=>d.value===t);return(0,Ca.jsxs)("div",{className:"space-y-1",children:[(0,Ca.jsx)(D,{className:"text-xs text-muted-foreground",children:e}),(0,Ca.jsxs)(xe,{value:t,onValueChange:a,open:m,onOpenChange:d=>{s||n(d)},disabled:s,children:[(0,Ca.jsx)(ve,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Ca.jsxs)(X,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&n(!m),children:[i&&u?.color&&(0,Ca.jsx)("div",{className:`Ca-2 h-2 rounded-full ${u.color} mr-1`}),u?.label||"Select..."]})}),(0,Ca.jsx)(be,{children:r.map(d=>(0,Ca.jsx)(J,{value:d.value,children:i&&d.color?(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsx)("div",{className:`Ca-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var Ya=({label:e,value:t,onValueChange:a,options:r,placeholder:i="Search...",allowCustomValue:s=!1,disabled:m=!1})=>{let[n,u]=(0,le.useState)(!1),[p,d]=(0,le.useState)(""),g=r.find(v=>v.value===t),R=r.filter(v=>v.label.toLowerCase().includes(p.toLowerCase())),C=v=>{a(v),u(!1),d("")},h=()=>{s&&p.trim()&&!r.find(v=>v.value===p.trim())&&(a(p.trim()),u(!1),d(""))};return(0,Ca.jsxs)("div",{className:"space-y-1",children:[(0,Ca.jsx)(D,{className:"text-xs text-muted-foreground",children:e}),(0,Ca.jsxs)(xe,{value:t,onValueChange:C,open:n,onOpenChange:v=>{m||u(v)},disabled:m,children:[(0,Ca.jsx)(ve,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Ca.jsx)(X,{variant:"secondary",className:`${m?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!m&&u(!n),children:g?.label||t||"Select..."})}),(0,Ca.jsxs)(be,{children:[(0,Ca.jsx)("div",{className:"p-2",children:(0,Ca.jsx)(V,{placeholder:i,value:p,onChange:v=>d(v.target.value),onKeyDown:v=>{v.key==="Enter"&&s&&h()},className:"mb-2"})}),R.map(v=>(0,Ca.jsx)(J,{value:v.value,children:v.label},v.value)),s&&p.trim()&&!R.find(v=>v.value===p.trim())&&(0,Ca.jsxs)(J,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var ue=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var oo=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:nt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:nt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:nt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:nt.Zap}],io=[{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 Qa=({task:e,epics:t,sprints:a,lastUpdated:r,onUpdateTask:i,onClose:s,onDelete:m,isUpdating:n=!1,isDeleting:u=!1,deleteState:p="idle",teamMembers:d})=>{let[g,R]=(0,le.useState)(e.storyPoints),C=(0,le.useRef)(null),h=(0,le.useCallback)((f,M)=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{i(f,M)},500)},[i]);(0,le.useEffect)(()=>{h("storyPoints",g?.toString()||"1")},[g]);let L=f=>f.split(" ").map(M=>M[0]).join("").toUpperCase(),v=()=>p==="loading"?(0,Ca.jsxs)(k,{disabled:!0,variant:"destructive",className:"Ca-full h-8 text-xs gap-1",children:[(0,Ca.jsx)(nt.Loader2,{className:"h-3 Ca-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,Ca.jsxs)(k,{disabled:!0,variant:"destructive",className:"Ca-full h-8 text-xs gap-1",children:[(0,Ca.jsx)(nt.Check,{className:"h-3 Ca-3"}),"Deleted"]}):p==="error"?(0,Ca.jsxs)(k,{disabled:!0,variant:"destructive",className:"Ca-full h-8 text-xs gap-1",children:[(0,Ca.jsx)(nt.X,{className:"h-3 Ca-3"}),"Delete failed"]}):(0,Ca.jsxs)(k,{onClick:m,variant:"destructive",className:"Ca-full h-8 text-xs gap-1",disabled:n||u,children:[(0,Ca.jsx)(nt.Trash2,{className:"h-3 Ca-3"}),"Delete Task"]});return(0,Ca.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Ca.jsxs)("div",{className:"space-y-4",style:{opacity:n?.6:1},children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Ca.jsx)(Et,{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:n})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Ca.jsx)(rt,{type:"single",value:e.type||"",onValueChange:f=>f&&i("type",f),className:"grid grid-cols-2 gap-1",disabled:n,children:oo.map(f=>{let M=f.icon;return(0,Ca.jsxs)(ot,{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:n,children:[(0,Ca.jsx)(M,{className:"h-3 Ca-3"}),f.label]},f.value)})})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Ca.jsx)(rt,{type:"single",value:e.priority||"",onValueChange:f=>f&&i("priority",f),className:"grid grid-cols-3 gap-1",disabled:n,children:io.map(f=>(0,Ca.jsx)(ot,{value:f.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:n,children:f.label},f.value))})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Ca.jsx)("input",{type:"number",min:"1",max:"100",value:g||1,onChange:f=>{let M=Number(f.target.value);M<1?R(1):M>100?R(100):R(M)},className:"Ca-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:n})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Ca.jsx)(Et,{label:"",value:ue(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:n})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Ca.jsx)(Et,{label:"",value:ue(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:n})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Ca.jsx)(Ya,{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:n})]})]}),(0,Ca.jsxs)("div",{className:"mt-auto pt-4 space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(k,{onClick:s,variant:"outline",className:"Ca-full h-8 text-xs",disabled:n||u,children:"Close"}),v()]}),(0,Ca.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,Ca.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Ca.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Ca.jsx)(nt.User,{className:"h-3 Ca-3"}),(0,Ca.jsx)("span",{children:"System"})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Ca.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Ca.jsx)(nt.Calendar,{className:"h-3 Ca-3"}),(0,Ca.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Ca.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Ca.jsx)(nt.Clock,{className:"h-3 Ca-3"}),(0,Ca.jsxs)("span",{children:[new Date(r).toLocaleDateString()," at"," ",new Date(r).toLocaleTimeString()]})]})]})]})]})]})};var er=({isOpen:e,onClose:t,initialTask:a,epics:r,sprints:i,onUpdateTask:s,onDeleteTask:m,onAddComment:n,colleagues:u})=>{let[p,d]=(0,le.useState)(a),[g,R]=(0,le.useState)(new Date),[C,h]=(0,le.useState)("idle"),[L,v]=(0,le.useState)("idle"),[f,M]=(0,le.useState)([]);(0,le.useEffect)(()=>{d(a)},[a]);let $=async(z,fe)=>{if(fe!==p[z]){h("loading");try{let I=await s(p.id.toString(),{[z]:fe});d(I),R(new Date),h("success"),setTimeout(()=>h("idle"),1500)}catch(I){console.log("error",I),h("error"),setTimeout(()=>h("idle"),3e3)}}},te=async(z,fe)=>{if(fe!==p[z]){h("loading");try{let I=await s(p.id.toString(),{[z]:fe});d(I),R(new Date),h("success"),setTimeout(()=>h("idle"),1500)}catch{h("error"),setTimeout(()=>h("idle"),3e3)}}},S=async z=>{if(n){h("loading");try{let fe=await n?.({content:z,taskId:p.id.toString()});d(fe),R(new Date),h("success"),setTimeout(()=>h("idle"),1500)}catch{h("error"),setTimeout(()=>h("idle"),3e3)}}},H=async()=>{v("loading");try{await m(p.id.toString()),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},ae=C!=="loading"&&L!=="loading",ee=()=>{ae&&t()},ye=()=>C==="loading"?(0,Ca.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Ca.jsx)(nt.Loader2,{className:"h-4 Ca-4 animate-spin"}),(0,Ca.jsx)("span",{children:"Updating..."})]}):C==="success"?(0,Ca.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Ca.jsx)(nt.Check,{className:"h-4 Ca-4"}),(0,Ca.jsx)("span",{children:"Updated successfully"})]}):C==="error"?(0,Ca.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Ca.jsx)(nt.X,{className:"h-4 Ca-4"}),(0,Ca.jsx)("span",{children:"Update failed"})]}):null;return(0,Ca.jsx)(Be,{open:e,onOpenChange:ee,children:(0,Ca.jsxs)(ke,{className:"max-Ca-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Ca.jsxs)(Te,{children:[(0,Ca.jsx)(Pe,{className:"Ca-only",children:p.name}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("div",{className:"flex-1",children:ye()}),!ae&&(0,Ca.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Ca.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Ca.jsx)(Qt,{fieldName:"name",value:p.name||"",label:"",onSave:$,className:"border-b border-border pb-3",disabled:C==="loading"}),(0,Ca.jsx)(Qt,{fieldName:"description",value:p.description||"",label:"Description",multiline:!0,onSave:$,disabled:C==="loading"}),(0,Ca.jsx)(Xa,{comments:(p?.comments||[]).map(z=>({author:z.author.value.name||"",createdAt:new Date(z.timestamp),text:z.text,id:z.id||""})),onAddComment:S})]}),(0,Ca.jsx)(Qa,{task:p,epics:r,sprints:i,lastUpdated:g,onUpdateTask:te,onClose:ee,onDelete:H,isUpdating:C==="loading",isDeleting:L==="loading",deleteState:L,teamMembers:u})]})]})})};var ar=({isOpen:e,onClose:t,onAddEpic:a})=>{let[r,i]=(0,le.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}),s=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],m=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],n=[{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(R=>({...R,[d]:g}))};return(0,Ca.jsx)(Be,{open:e,onOpenChange:t,children:(0,Ca.jsxs)(ke,{className:"sm:max-Ca-md",children:[(0,Ca.jsx)(Te,{children:(0,Ca.jsx)(Pe,{children:"Add New Epic"})}),(0,Ca.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"name",children:"Epic Name"}),(0,Ca.jsx)(V,{id:"name",value:r.name,onChange:d=>p("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Ca.jsx)(pe,{id:"description",value:r.description,onChange:d=>p("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"Color"}),(0,Ca.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(d=>(0,Ca.jsx)("button",{type:"button",onClick:()=>p("color",d),className:`Ca-8 h-8 rounded-full ${d} ${r.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"Confidence"}),(0,Ca.jsxs)(xe,{value:r.confidence,onValueChange:d=>p("confidence",d),children:[(0,Ca.jsx)(ve,{children:(0,Ca.jsx)(Me,{})}),(0,Ca.jsx)(be,{children:m.map(d=>(0,Ca.jsx)(J,{value:d.value,children:d.label},d.value))})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"Phase"}),(0,Ca.jsxs)(xe,{value:r.phase.toString(),onValueChange:d=>p("phase",parseInt(d)),children:[(0,Ca.jsx)(ve,{children:(0,Ca.jsx)(Me,{})}),(0,Ca.jsx)(be,{children:n.map(d=>(0,Ca.jsx)(J,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"Start Date"}),(0,Ca.jsx)(V,{type:"date",value:r.startDate,onChange:d=>p("startDate",d.target.value)})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"End Date"}),(0,Ca.jsx)(V,{type:"date",value:r.endDate,onChange:d=>p("endDate",d.target.value)})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"Progress (%)"}),(0,Ca.jsx)(V,{type:"number",min:"0",max:"100",value:r.progress,onChange:d=>p("progress",parseInt(d.target.value)||0)})]}),(0,Ca.jsxs)(ht,{children:[(0,Ca.jsx)(k,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Ca.jsx)(k,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};function rr(e,t){let[a,r]=(0,le.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),i=s=>{try{r(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,le.useEffect)(()=>{i(a)},[]),[a,i]}var At=require("react-icons/fa");function Xe({title:e,description:t,badge:a,primaryAction:r,secondaryAction:i,gradient:s,children:m,className:n}){let[u,p]=rr(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!i&&!t),d=!i&&!t||u;return(0,Ca.jsxs)(Ra.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${s} p-8 text-white ${n||""}`,children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Ca.jsx)(X,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Ca.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Ca.jsxs)("div",{className:"flex items-center gap-3",children:[d&&r&&(0,Ca.jsx)(k,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(i||t)&&(0,Ca.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,Ca.jsx)(At.FaChevronDown,{size:22}):(0,Ca.jsx)(At.FaChevronUp,{size:22})})]})]}),!d&&(0,Ca.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Ca.jsxs)("div",{className:"space-y-4",children:[(0,Ca.jsx)("p",{className:"max-Ca-[600px] text-white/80",children:t}),(0,Ca.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,Ca.jsx)(k,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),i&&(0,Ca.jsx)(k,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),m&&(0,Ca.jsx)("div",{className:"hidden lg:block",children:m})]})]})}var so=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:r=[],initialColleagues:i=[],initialProjects:s=[],onAddTask:m,onUpdateTask:n,onDeleteTask:u,onTaskClick:p,onAddEpic:d,onAddComment:g})=>{let[R,C]=(0,le.useState)(e),[h,L]=(0,le.useState)(t),[v,f]=(0,le.useState)(a),[M,$]=(0,le.useState)(!1),[te,S]=(0,le.useState)(!1),[H,ae]=(0,le.useState)(null),[ee,ye]=(0,le.useState)(null),[z,fe]=(0,le.useState)(r),[I,T]=(0,le.useState)(i),[j,Ce]=(0,le.useState)(0),me=(0,le.useRef)(null),K=(0,le.useRef)(null),ze=h.filter(P=>!0).map(P=>P.id),Ve=v.find(P=>P.isSelected);ze.push(0),(0,le.useEffect)(()=>{C(e)},[e]),(0,le.useEffect)(()=>{L(t)},[t]),(0,le.useEffect)(()=>{f(a)},[a]),(0,le.useEffect)(()=>{let P=()=>{if(me.current){let b=me.current.offsetHeight;Ce(b)}};P();let W=new ResizeObserver(P);me.current&&W.observe(me.current);let c=()=>{setTimeout(P,100)};return window.addEventListener("storage",c),()=>{W.disconnect(),window.removeEventListener("storage",c)}},[]),(0,le.useEffect)(()=>{let P=setTimeout(()=>{me.current&&Ce(me.current.offsetHeight)},300);return()=>clearTimeout(P)},[M,te]);let Ze=R.filter(P=>!0),Ne=P=>Ze.filter(W=>W.status===P),yt=P=>{let W={};return h.forEach(c=>{W[c.id]=P.filter(b=>ue(b.epic)===c.id)}),W["no-epic"]=P.filter(c=>!ue(c.epic)),W},ct=P=>{ye(P)},Mt=P=>{ee&&(C(W=>W.map(c=>c.id===ee.id?{...c,status:P}:c)),n?.(ee.id.toString(),{status:P}),ye(null))},Nt=P=>{let W={...P,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};C(c=>[...c,W]),m?.(P)},Ot=async(P,W)=>{if(C(b=>b.map(F=>F.id===Number(P)?{...F,...W}:F)),n)return await n(P,W);let c=R.find(b=>b.id===Number(P));if(!c)throw new Error("Task not found");return{...c,...W}},zt=async P=>{C(W=>W.filter(c=>c.id!==Number(P))),H?.id===Number(P)&&ae(null),u&&await u(P)},Ft=P=>{let W={...P,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};L(c=>[...c,W]),d?.(P)},mt=P=>{ae(P),p?.(P)},wt=[{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"}],Ct=j>0?`calc(100vh - ${j+120}px)`:"calc(100vh - 12rem)";return(0,Ca.jsxs)("div",{ref:K,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Ca.jsx)("div",{ref:me,className:"flex-shrink-0",children:(0,Ca.jsx)(Xe,{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,Ca.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Ca.jsx)("div",{className:"h-full",style:{height:j>0?`calc(100vh - ${j+120}px)`:"calc(100vh - 12rem)"},children:(0,Ca.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:wt.map(P=>{let W=Ne(P.status),c=yt(W);return(0,Ca.jsxs)(Ia,{title:P.title,status:P.status,taskCount:W.length,onDrop:Mt,isCompact:P.status==="done",height:Ct,children:[c["no-epic"].map(b=>(0,Ca.jsx)(vt,{epic:null,task:b,onDragStart:ct,onTaskClick:mt,isCompact:P.status==="done"})),ze.map(b=>{let F=h.find(ge=>ge.id===b),U=c[b]||[];return U.length===0?null:(0,Ca.jsxs)("div",{className:"mb-6",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Ca.jsx)("div",{className:`Ca-3 h-3 rounded-full ${F?.color}`}),(0,Ca.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:F?.name||"No Epic"}),(0,Ca.jsx)(X,{variant:"secondary",className:"text-xs",children:U.length})]})," ",(0,Ca.jsx)("div",{className:"space-y-3",children:U.map(ge=>(0,Ca.jsx)(vt,{task:ge,epic:F,onDragStart:ct,onTaskClick:mt,isCompact:P.status==="done"},ge.id))})]},b)})]},P.id)})})})}),(0,Ca.jsx)(Ka,{isOpen:M,onClose:()=>$(!1),onAddTask:Nt,assignees:[...I,...z],epics:h,sprints:v}),(0,Ca.jsx)(ar,{isOpen:te,onClose:()=>S(!1),onAddEpic:Ft}),H&&(0,Ca.jsx)(er,{isOpen:!!H,onClose:()=>ae(null),initialTask:H,epics:h,sprints:v,onUpdateTask:Ot,onDeleteTask:zt,colleagues:[...I,...z],onAddComment:g})]})};var ir=require("react-day-picker");function Lt({className:e,classNames:t,showOutsideDays:a=!0,...r}){return(0,Ca.jsx)(ir.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:y("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-Ca-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-Ca-1 flex items-center",nav_button:y(Dt({variant:"outline"}),"h-7 Ca-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"Ca-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md Ca-8 font-normal text-[0.8rem]",row:"flex Ca-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-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-Ca-md first:[&:has([aria-selected])]:rounded-Ca-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(Dt({variant:"ghost"}),"h-8 Ca-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})}Lt.displayName="Calendar";var nr=ie(require("react")),He=ie(require("@radix-ui/react-popover"));var oa=He.Root,ia=He.Trigger;var Bt=nr.forwardRef(({className:e,align:t="center",sideOffset:a=4,...r},i)=>(0,Ca.jsx)(He.Portal,{children:(0,Ca.jsx)(He.Content,{ref:i,align:t,sideOffset:a,className:y("z-50 Ca-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})}));Bt.displayName=He.Content.displayName;var na=require("date-fns");var dr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[r,i]=(0,le.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),s=n=>{n.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())},m=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Ca.jsx)(Be,{open:e,onOpenChange:m,children:(0,Ca.jsxs)(ke,{className:"sm:max-Ca-md",children:[(0,Ca.jsx)(Te,{children:(0,Ca.jsx)(Pe,{children:"Add New Sprint"})}),(0,Ca.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"name",children:"Sprint Name *"}),(0,Ca.jsx)(V,{id:"name",value:r.name,onChange:n=>i(u=>({...u,name:n.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Ca.jsx)(pe,{id:"description",value:r.description,onChange:n=>i(u=>({...u,description:n.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"Start Date *"}),(0,Ca.jsxs)(oa,{children:[(0,Ca.jsx)(ia,{asChild:!0,children:(0,Ca.jsxs)(k,{variant:"outline",className:y("Ca-full justify-start text-left font-normal",!r.startDate&&"text-muted-foreground"),children:[(0,Ca.jsx)(nt.CalendarIcon,{className:"mr-2 h-4 Ca-4"}),r.startDate?(0,na.format)(r.startDate,"PPP"):"Pick a date"]})}),(0,Ca.jsx)(Bt,{className:"Ca-auto p-0",align:"start",children:(0,Ca.jsx)(Lt,{mode:"single",selected:r.startDate,onSelect:n=>i(u=>({...u,startDate:n})),initialFocus:!0})})]})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsx)(D,{children:"End Date *"}),(0,Ca.jsxs)(oa,{children:[(0,Ca.jsx)(ia,{asChild:!0,children:(0,Ca.jsxs)(k,{variant:"outline",className:y("Ca-full justify-start text-left font-normal",!r.endDate&&"text-muted-foreground"),children:[(0,Ca.jsx)(nt.CalendarIcon,{className:"mr-2 h-4 Ca-4"}),r.endDate?(0,na.format)(r.endDate,"PPP"):"Pick a date"]})}),(0,Ca.jsx)(Bt,{className:"Ca-auto p-0",align:"start",children:(0,Ca.jsx)(Lt,{mode:"single",selected:r.endDate,onSelect:n=>i(u=>({...u,endDate:n})),initialFocus:!0,disabled:n=>r.startDate?n<r.startDate:!1})})]})]})]}),(0,Ca.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Ca.jsx)(k,{type:"button",variant:"outline",onClick:m,children:"Cancel"}),(0,Ca.jsx)(k,{type:"submit",disabled:!r.name||!r.startDate||!r.endDate,children:"Add Sprint"})]})]})]})})};var no=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddSprint:s,onUpdateSprint:m,onDeleteSprint:n})=>{let[u,p]=(0,le.useState)([]),[d,g]=(0,le.useState)(new Set),[R,C]=(0,le.useState)(null),[h,L]=(0,le.useState)(!1),[v,f]=(0,le.useState)(null),[M,$]=(0,le.useState)(null),[te,S]=(0,le.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[H,ae]=(0,le.useState)("upcoming"),[ee,ye]=(0,le.useState)(!1),[z,fe]=(0,le.useState)(0),I=(0,le.useRef)(null),T=(0,le.useRef)(null);(0,le.useEffect)(()=>{let c=()=>{I.current&&fe(I.current.offsetHeight)};c();let b=new ResizeObserver(c);return I.current&&b.observe(I.current),()=>b.disconnect()},[]);let j=c=>t.find(b=>b.id===Number(c)),Ce=c=>a.find(b=>b.id===Number(c)),me=c=>{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[c]||b.medium},K=c=>{let b=c.trim().split(" ");if(b.length===1)return b[0];let F=b[0],U=b[b.length-1][0].toUpperCase();return`${F} ${U}`},ze=c=>{let b={},F=[];return c.forEach(U=>{U.epic?(b[ue(U.epic)]||(b[ue(U.epic)]=[]),b[ue(U.epic)].push(U)):F.push(U)}),{tasksByEpic:b,unassignedTasks:F}},Ve=a.filter(c=>c.id!==1&&c.id!==2),Ze=Ve.filter(c=>{switch(H){default:return!0}}),Ne=Ve.filter(c=>u.includes(c.id.toString())),yt=c=>{p(b=>b.includes(c)?b.filter(F=>F!==c):b.length<3?[...b,c]:b)},ct=c=>{g(b=>{let F=new Set(b);return F.has(c)?F.delete(c):F.add(c),F})},Mt=c=>{s(c),L(!1)},Nt=c=>{$(c.id.toString()),S({name:c.name,description:c.description||"",startDate:c.startDate?new Date(c.startDate).toISOString().split("T")[0]:c.startDate,endDate:c.endDate?new Date(c.endDate).toISOString().split("T")[0]:c.endDate,isActive:!1})},Ot=()=>{M&&(m(M,{name:te.name,description:te.description,startDate:te.startDate,endDate:te.endDate}),$(null))},zt=()=>{$(null),S({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Ft=(c,b)=>{C(b),c.dataTransfer.effectAllowed="move"},mt=c=>{c.preventDefault(),c.dataTransfer.dropEffect="move"},wt=c=>{f(c)},Ct=()=>{f(null)},P=(c,b)=>{if(c.preventDefault(),f(null),!R)return;let F=ue(R.sprint)||void 0,U=b==="backlog"?void 0:b;C(null)},W=({task:c,showSprint:b=!1})=>{let F=c.epic?j(ue(c.epic).toString()):null,U=c.sprint?Ce(ue(c.sprint).toString()):null;return(0,Ca.jsx)(Z,{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:Fe=>{Fe.dataTransfer.effectAllowed="move",Fe.dataTransfer.setData("text/plain",c.id.toString()),Ft(Fe,c)},onClick:Fe=>{R===null&&i(c)},style:{userSelect:"none"},children:(0,Ca.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Ca.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Ca.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:c.name}),(0,Ca.jsx)(X,{className:`text-xs ${me(c.priority||"medium")}`,children:c.priority?.[0]?.toUpperCase()})]}),(0,Ca.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-1",children:[F&&(0,Ca.jsx)("div",{className:`Ca-2 h-2 rounded-full ${F.color}`}),(0,Ca.jsx)("span",{className:"text-muted-foreground truncate",children:F?.name})]}),(0,Ca.jsx)("span",{className:"text-muted-foreground",children:K(c.assignee?.value?.name)})]}),b&&U&&(0,Ca.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Ca.jsx)(nt.Calendar,{className:"h-3 Ca-3"}),(0,Ca.jsx)("span",{children:U.name})]})]})})};return(0,Ca.jsxs)("div",{ref:T,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Ca.jsx)("div",{ref:I,className:"flex-shrink-0",children:(0,Ca.jsx)(Xe,{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,Ca.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Ca.jsxs)("div",{className:"h-full",style:{height:z>0?`calc(100vh - ${z+120}px)`:"calc(100vh - 12rem)"},children:[(0,Ca.jsxs)("div",{className:"mb-4",children:[(0,Ca.jsx)(Z,{className:"p-3 bg-card shadow-sm",children:(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ca.jsx)("div",{children:(0,Ca.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"})}),u.length>0&&(0,Ca.jsx)("div",{className:"flex items-center gap-2",children:(0,Ca.jsx)("div",{className:"flex flex-wrap gap-1",children:Ne.map(c=>(0,Ca.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Ca.jsx)("span",{className:"max-Ca-[80px] truncate",children:c.name}),(0,Ca.jsx)("button",{onClick:()=>yt(c.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Ca.jsx)(nt.X,{className:"h-4 Ca-4"})})]},c.id))})})]}),(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsxs)(k,{onClick:()=>L(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Ca.jsx)(nt.Plus,{className:"h-3 Ca-3"}),"Add"]}),(0,Ca.jsxs)(k,{onClick:()=>ye(!ee),variant:"outline",size:"sm",className:"gap-1",children:[(0,Ca.jsx)(nt.Calendar,{className:"h-3 Ca-3"}),ee?"Close":"Select"]})]})]})}),ee&&(0,Ca.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>ye(!1)}),(0,Ca.jsx)("div",{className:`fixed top-0 right-0 h-full Ca-80 bg-background border-Ca shadow-xl z-10 transition-all duration-300 ease-in-out ${ee?"translate-Ca-0 opacity-100 visible":"translate-Ca-full opacity-0 invisible"}`,children:(0,Ca.jsxs)(Z,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Ca.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Ca.jsx)(k,{variant:"ghost",size:"sm",onClick:()=>ye(!1),className:"h-8 Ca-8 p-0",children:(0,Ca.jsx)(nt.X,{className:"h-4 Ca-4"})})]}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Ca.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Ca.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(c=>(0,Ca.jsxs)(k,{variant:H===c.key?"default":"outline",size:"sm",onClick:()=>ae(c.key),className:"text-xs h-8 px-3 flex-1",children:[c.label," (",c.count,")"]},c.key))}),(0,Ca.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:Ze.length>0?Ze.map(c=>{let b=u.includes(c.id.toString()),F=e.filter(ge=>ue(ge.sprint)===c.id).length,U=!b&&u.length<3;return(0,Ca.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:M===c.id.toString()?(0,Ca.jsxs)("div",{className:"space-y-3",children:[(0,Ca.jsx)(V,{value:te.name,onChange:ge=>S(Se=>({...Se,name:ge.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Ca.jsx)(pe,{value:te.description,onChange:ge=>S(Se=>({...Se,description:ge.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Ca.jsxs)("div",{className:"flex gap-2",children:[(0,Ca.jsxs)(k,{size:"sm",onClick:()=>Ot(),className:"flex-1",children:[(0,Ca.jsx)(nt.Check,{className:"h-3 Ca-3 mr-1"}),"Save"]}),(0,Ca.jsxs)(k,{size:"sm",variant:"outline",onClick:zt,className:"flex-1",children:[(0,Ca.jsx)(nt.X,{className:"h-3 Ca-3 mr-1"}),"Cancel"]})]})]}):(0,Ca.jsxs)("div",{children:[(0,Ca.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ca.jsxs)("div",{className:"flex-1 min-Ca-0",children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Ca.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:c.name}),(0,Ca.jsx)(X,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Ca.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:c.description}),(0,Ca.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Ca.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Ca.jsx)(nt.CalendarDays,{className:"h-3 Ca-3"}),new Date(c.startDate).toLocaleDateString()]}),(0,Ca.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Ca.jsx)(nt.User,{className:"h-3 Ca-3"}),F," tasks"]})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Ca.jsx)(k,{size:"sm",variant:"ghost",onClick:()=>Nt(c),className:"h-6 Ca-6 p-0",children:(0,Ca.jsx)(nt.Edit2,{className:"h-3 Ca-3"})}),c.id!==1&&c.id!==2&&(0,Ca.jsx)(k,{size:"sm",variant:"ghost",onClick:()=>n(c.id.toString()),className:"h-6 Ca-6 p-0 text-destructive hover:text-destructive",children:(0,Ca.jsx)(nt.Trash2,{className:"h-3 Ca-3"})})]})]}),(0,Ca.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,Ca.jsx)(k,{variant:b?"default":"outline",size:"sm",className:"text-xs Ca-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>yt(c.id.toString()),disabled:!b&&u.length>=3,children:(0,Ca.jsx)("span",{className:"pointer-events-none select-none",children:b?"Deselect":u.length>=3?"Limit Reached":"Select"})})})]})},c.id)}):(0,Ca.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Ca.jsx)(nt.Calendar,{className:"h-8 Ca-8 mx-auto mb-2 opacity-50"}),(0,Ca.jsxs)("p",{className:"text-sm",children:['No sprints found for "',H,'" filter']}),(0,Ca.jsx)(k,{variant:"link",size:"sm",onClick:()=>ae("all"),className:"text-xs",children:"Show all sprints"})]})}),u.length===0&&(0,Ca.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Ca.jsxs)("div",{className:"text-center",children:[(0,Ca.jsx)(nt.Calendar,{className:"h-6 Ca-6 mx-auto mb-2 text-muted-foreground"}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Ca.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Ca.jsx)("div",{className:"lg:col-span-1",children:(0,Ca.jsxs)(Z,{className:"p-4 h-full bg-card border-Ca-4 border-Ca-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:mt,onDragEnter:()=>wt("backlog"),onDragLeave:Ct,onDrop:c=>P(c,"backlog"),style:{height:z>0?`calc(100vh - ${z+200}px)`:"calc(100vh - 16rem)"},children:[(0,Ca.jsx)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:(0,Ca.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"})}),(0,Ca.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(0,Ca.jsx)(Ca.Fragment,{})})]})}),Ne.map(c=>{let b=e.filter(U=>ue(U.sprint)===c.id),F=b.reduce((U,ge)=>U+(ge.storyPoints||0),0);return(0,Ca.jsxs)(Z,{className:"p-4 h-full bg-card border-Ca-4 border-Ca-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:mt,onDragEnter:()=>wt(c.id.toString()),onDragLeave:Ct,onDrop:U=>P(U,c.id.toString()),style:{height:z>0?`calc(100vh - ${z+200}px)`:"calc(100vh - 16rem)"},children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Ca.jsx)("div",{children:(0,Ca.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:c.name})}),(0,Ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ca.jsxs)(X,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[b.length," tasks"]}),(0,Ca.jsxs)(X,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[F," pts"]}),(0,Ca.jsx)(k,{size:"sm",variant:"ghost",onClick:()=>Nt(c),className:"h-6 px-2",children:(0,Ca.jsx)(nt.Edit2,{className:"h-3 Ca-3"})})]})]}),(0,Ca.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:U,unassignedTasks:ge}=ze(b);return(0,Ca.jsxs)(Ca.Fragment,{children:[Object.entries(U).map(([Se,Fe])=>{let Ht=j(Se);if(!Ht)return null;let ca=d.has(Se);return(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.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:()=>ct(Se),children:[(0,Ca.jsx)("div",{className:`Ca-3 h-3 rounded-full ${Ht.color}`}),(0,Ca.jsx)("span",{className:"font-medium text-muted-foreground",children:Ht.name}),(0,Ca.jsxs)("span",{className:"text-muted-foreground",children:["(",Fe.length,")"]}),(0,Ca.jsx)("div",{className:"ml-auto",children:ca?(0,Ca.jsx)(nt.ChevronDown,{className:"h-3 Ca-3 text-muted-foreground"}):(0,Ca.jsx)(nt.ChevronUp,{className:"h-3 Ca-3 text-muted-foreground"})})]}),!ca&&(0,Ca.jsx)("div",{className:"space-y-2 pl-2",children:Fe.map(ma=>(0,Ca.jsx)(W,{task:ma},ma.id))})]},Se)}),ge.length>0&&(()=>{let Se=d.has("no-epic");return(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.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:()=>ct("no-epic"),children:[(0,Ca.jsx)("div",{className:"Ca-3 h-3 rounded-full bg-gray-400"}),(0,Ca.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Ca.jsxs)("span",{className:"text-muted-foreground",children:["(",ge.length,")"]}),(0,Ca.jsx)("div",{className:"ml-auto",children:Se?(0,Ca.jsx)(nt.ChevronDown,{className:"h-3 Ca-3 text-muted-foreground"}):(0,Ca.jsx)(nt.ChevronUp,{className:"h-3 Ca-3 text-muted-foreground"})})]}),!Se&&(0,Ca.jsx)("div",{className:"space-y-2 pl-2",children:ge.map(Fe=>(0,Ca.jsx)(W,{task:Fe},Fe.id))})]})})(),b.length===0&&(0,Ca.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},c.id)})]}),(0,Ca.jsx)(dr,{isOpen:h,onClose:()=>L(!1),onAddSprint:Mt})]})})]})};var lo=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),co=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})},la=(e,t)=>{let a=new Date,r=new Date(e);if(t){let[i,s]=t.split(":");r.setHours(parseInt(i),parseInt(s))}return r<a},da=e=>{let t=new Date;return e.toDateString()===t.toDateString()},mo=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},po=({colleagues:e,onAddReminder:t,open:a,setOpen:r})=>{let[i,s]=(0,le.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[m,n]=(0,le.useState)(!1),u=d=>{if(d.preventDefault(),!e.find(C=>C?.id.toString()===i.colleagueId.toString())){console.error("No valid colleague selected"),n(!0);return}n(!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),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,le.useEffect)(()=>{i.colleagueId&&n(!1)},[i.colleagueId]);let p=e.filter(Boolean);return(0,Ca.jsx)(Be,{open:a,onOpenChange:r,children:(0,Ca.jsxs)(ke,{className:"max-Ca-2xl",children:[(0,Ca.jsx)(Te,{children:(0,Ca.jsx)(Pe,{children:"Add New Reminder"})}),(0,Ca.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,Ca.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"title",children:"Title"}),(0,Ca.jsx)(V,{id:"title",value:i.title,onChange:d=>s({...i,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Ca.jsx)(pe,{id:"description",value:i.description,onChange:d=>s({...i,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"dueDate",children:"Due Date"}),(0,Ca.jsx)(V,{id:"dueDate",type:"date",value:i.dueDate,onChange:d=>s({...i,dueDate:d.target.value}),required:!0})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Ca.jsx)(V,{id:"dueTime",type:"time",value:i.dueTime,onChange:d=>s({...i,dueTime:d.target.value})})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{className:`${m?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Ca.jsxs)(xe,{value:i.colleagueId,onValueChange:d=>{s({...i,colleagueId:d})},required:!0,children:[(0,Ca.jsx)(ve,{className:`${m?"text-destructive border-red-500":""}`,children:(0,Ca.jsx)(Me,{className:`${m?"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,Ca.jsx)(be,{children:p.map(d=>(0,Ca.jsx)(J,{value:d.id.toString(),children:d.name},d.id))})]}),m&&(0,Ca.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Ca.jsxs)("div",{className:"space-y-2",children:[(0,Ca.jsxs)("div",{className:"flex items-center space-Ca-2",children:[(0,Ca.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:d=>s({...i,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Ca.jsx)(D,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Ca.jsxs)(xe,{value:i.recurrencePattern,onValueChange:d=>s({...i,recurrencePattern:d}),children:[(0,Ca.jsx)(ve,{children:(0,Ca.jsx)(Me,{})}),(0,Ca.jsxs)(be,{children:[(0,Ca.jsx)(J,{value:"daily",children:"Daily"}),(0,Ca.jsx)(J,{value:"weekly",children:"Weekly"}),(0,Ca.jsx)(J,{value:"monthly",children:"Monthly"}),(0,Ca.jsx)(J,{value:"yearly",children:"Yearly"})]})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Ca.jsx)(V,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:d=>s({...i,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Ca.jsxs)("div",{className:"flex justify-end space-Ca-2",children:[(0,Ca.jsx)(k,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),(0,Ca.jsx)(k,{type:"submit",children:"Add Reminder"})]})]})]})})},uo=({reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:i})=>{let[s,m]=(0,le.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),n=p=>{p.preventDefault(),a(e.id.toString(),{title:s.title,description:s.description,dueDate:new Date(s.dueDate||"").toISOString(),dueTime:s.dueTime||void 0,isRecurring:s.isRecurring}),i()},u=t.filter(Boolean);return(0,Ca.jsx)(Be,{open:r,onOpenChange:i,children:(0,Ca.jsxs)(ke,{className:"max-Ca-2xl",children:[(0,Ca.jsx)(Te,{children:(0,Ca.jsx)(Pe,{children:"Edit Reminder"})}),(0,Ca.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,Ca.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"edit-title",children:"Title"}),(0,Ca.jsx)(V,{id:"edit-title",value:s.title,onChange:p=>m({...s,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"edit-description",children:"Description"}),(0,Ca.jsx)(pe,{id:"edit-description",value:s.description||"",onChange:p=>m({...s,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Ca.jsx)(V,{id:"edit-dueDate",type:"date",value:s.dueDate,onChange:p=>m({...s,dueDate:p.target.value}),required:!0})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)(D,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Ca.jsx)(V,{id:"edit-dueTime",type:"time",value:s.dueTime,onChange:p=>m({...s,dueTime:p.target.value})})]})]}),(0,Ca.jsx)("div",{className:"space-y-2",children:(0,Ca.jsxs)("div",{className:"flex items-center space-Ca-2",children:[(0,Ca.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:s.isRecurring||!1,onChange:p=>m({...s,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,Ca.jsx)(D,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Ca.jsxs)("div",{className:"flex justify-end space-Ca-2",children:[(0,Ca.jsx)(k,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,Ca.jsx)(k,{type:"submit",children:"Save Changes"})]})]})]})})},go=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:r})=>{let[i,s]=(0,le.useState)(!1);if(!e||!e.id)return null;let m=la(new Date(e.dueDate||""),e.dueTime||""),n=da(new Date(e.dueDate||"")),u=mo(new Date(e.dueDate||"")),p=()=>{a(e.id.toString(),{})},d=()=>n?"Today":u?"Tomorrow":lo(new Date(e.dueDate||""));return(0,Ca.jsxs)(Ca.Fragment,{children:[(0,Ca.jsx)(uo,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>s(!1)}),(0,Ca.jsx)(Z,{children:(0,Ca.jsx)(gt,{className:"p-4",children:(0,Ca.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ca.jsxs)("div",{className:"flex items-start space-Ca-3 flex-1",children:[(0,Ca.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80"}),(0,Ca.jsxs)("div",{className:"flex-1",children:[(0,Ca.jsx)("div",{className:"flex items-center space-Ca-2 mb-1",children:(0,Ca.jsx)("h3",{children:e.title})}),(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Ca.jsxs)("div",{className:"flex items-center space-Ca-4 text-sm text-muted-foreground",children:[(0,Ca.jsx)("div",{className:"flex items-center space-Ca-1",children:(0,Ca.jsx)(nt.Calendar,{className:"h-4 Ca-4"})}),e.dueTime&&(0,Ca.jsxs)("div",{className:"flex items-center space-Ca-1",children:[(0,Ca.jsx)(nt.Clock,{className:"h-4 Ca-4"}),(0,Ca.jsx)("span",{children:co(e.dueTime)})]}),(0,Ca.jsx)("div",{className:"flex items-center space-Ca-1",children:(0,Ca.jsx)(nt.User,{className:"h-4 Ca-4"})})]})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center space-Ca-1",children:[(0,Ca.jsx)(k,{variant:"ghost",size:"sm",onClick:()=>s(!0),className:"h-8 Ca-8 p-0",children:(0,Ca.jsx)(nt.Edit2,{className:"h-4 Ca-4"})}),(0,Ca.jsx)(k,{variant:"ghost",size:"sm",onClick:()=>r(e.id.toString()),className:"h-8 Ca-8 p-0 text-destructive hover:text-destructive/80",children:(0,Ca.jsx)(nt.Trash2,{className:"h-4 Ca-4"})})]})]})})})]})},fo=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:r,onDeleteReminder:i})=>{let[s,m]=(0,le.useState)(e.filter(Boolean)),[n]=(0,le.useState)(t.filter(Boolean)),[u,p]=(0,le.useState)("all"),[d,g]=(0,le.useState)(""),[R,C]=(0,le.useState)(!1),h=S=>{if(!S.title){console.error("Invalid reminder data:",S);return}let H={...S,id:Date.now(),createdAt:new Date().toISOString()};m(ae=>[...ae,H]),a?.(S)},L=(S,H)=>{if(!S){console.error("No reminder ID provided for update");return}m(ae=>ae.map(ee=>ee?.id.toString()===S?{...ee,...H}:ee)),r?.(S,H)},v=S=>{if(!S){console.error("No reminder ID provided for deletion");return}m(H=>H.filter(ae=>ae?.id.toString()!==S)),i?.(S)},M=s.filter(S=>{if(!S)return!1;if(d){let H=d.toLowerCase();if(!(S.title.toLowerCase().includes(H)||S.description?.toLowerCase().includes(H)))return!1}switch(u){case"pending":case"completed":case"overdue":return la(new Date(S.dueDate||""),S.dueTime||"");case"today":return da(new Date(S.dueDate||""));default:return!0}}).sort((S,H)=>{if(!S||!H)return 0;let ae={high:3,medium:2,low:1},ee=0;return ee!==0?ee:new Date(S.dueDate||"").getTime()-new Date(H.dueDate||"").getTime()}),$={total:s.filter(Boolean).length,overdue:s.filter(S=>S&&la(new Date(S.dueDate||""),S.dueTime||"")).length,today:s.filter(S=>S&&da(new Date(S.dueDate||""))).length},te=n.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,Ca.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Ca.jsx)(Xe,{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,Ca.jsxs)("div",{className:"h-full bg-background",children:[(0,Ca.jsx)(po,{colleagues:n,onAddReminder:h,open:R,setOpen:C}),(0,Ca.jsxs)("div",{className:"p-6",children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Ca.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Ca.jsxs)(k,{className:"flex items-center space-Ca-2",onClick:()=>C(!0),children:[(0,Ca.jsx)(nt.Plus,{className:"h-4 Ca-4"}),(0,Ca.jsx)("span",{children:"Add Reminder"})]})]}),(0,Ca.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Ca.jsxs)(Z,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-foreground",children:$.total}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Ca.jsxs)(Z,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-primary",children:$.overdue}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Ca.jsxs)(Z,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-success",children:$.today}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Ca.jsxs)(Z,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-destructive",children:$.overdue}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Ca.jsxs)(Z,{className:"p-4",children:[(0,Ca.jsx)("div",{className:"text-2xl font-bold text-warning",children:$.today}),(0,Ca.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Ca.jsxs)("div",{className:"flex items-center space-Ca-4 mb-6",children:[(0,Ca.jsx)("div",{className:"flex-1",children:(0,Ca.jsx)(V,{placeholder:"Search reminders...",value:d,onChange:S=>g(S.target.value),className:"max-Ca-md"})}),(0,Ca.jsxs)(xe,{value:u,onValueChange:S=>p(S),children:[(0,Ca.jsx)(ve,{className:"Ca-40",children:(0,Ca.jsx)(Me,{})}),(0,Ca.jsxs)(be,{children:[(0,Ca.jsxs)(J,{value:"all",children:["All (",$.total,")"]}),(0,Ca.jsxs)(J,{value:"overdue",children:["Overdue (",$.overdue,")"]}),(0,Ca.jsxs)(J,{value:"overdue",children:["Overdue (",$.overdue,")"]}),(0,Ca.jsxs)(J,{value:"today",children:["Today (",$.today,")"]})]})]})]}),(0,Ca.jsx)("div",{className:"space-y-4",children:M.length===0?(0,Ca.jsxs)(Z,{className:"p-8 text-center",children:[(0,Ca.jsx)("div",{className:"text-muted-foreground",children:d||u!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&u==="all"&&(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):M.map(S=>S&&(0,Ca.jsx)(go,{reminder:S,colleagues:n,onUpdateReminder:L,onDeleteReminder:v},S.id))})]})]})]})};var vo=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddTaskToEpic:s,onAddEpic:m,onUpdateEpic:n,onDeleteEpic:u})=>{let[p,d]=(0,le.useState)(null),[g,R]=(0,le.useState)(null),[C,h]=(0,le.useState)({}),[L,v]=(0,le.useState)(0),f=(0,le.useRef)(null),M=(0,le.useRef)(null);(0,le.useEffect)(()=>{let T=()=>{if(f.current){let me=f.current.offsetHeight;v(me)}};T();let j=new ResizeObserver(T);f.current&&j.observe(f.current);let Ce=()=>{setTimeout(T,100)};return window.addEventListener("storage",Ce),()=>{j.disconnect(),window.removeEventListener("storage",Ce)}},[]),(0,le.useEffect)(()=>{let T=setTimeout(()=>{f.current&&v(f.current.offsetHeight)},300);return()=>clearTimeout(T)},[g]);let $=T=>{d(T)},te=T=>{T.preventDefault()},S=(T,j)=>{T.preventDefault(),p&&ue(p.epic).toString()!==j&&(r(p.id.toString(),{epic:Number(j)}),d(null))},H=T=>e.filter(j=>ue(j.epic).toString()===T),ae=T=>{R(T.id.toString()),h({name:T.name,description:T.description,confidence:T.confidence,phase:T.phase})},ee=()=>{g&&C.name&&(n(g.toString(),C),R(null),h({}))},ye=()=>{R(null),h({})},z=T=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&u(T)},fe=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,Ca.jsxs)("div",{ref:M,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Ca.jsx)("div",{ref:f,className:"flex-shrink-0",children:(0,Ca.jsx)(Xe,{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:m}})}),(0,Ca.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Ca.jsx)("div",{className:"h-full overflow-y-auto",style:{height:L>0?`calc(100vh - ${L+120}px)`:"calc(100vh - 12rem)"},children:(0,Ca.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 j=H(T.id.toString()),Ce=j.reduce((K,ze)=>K+(ze.storyPoints||0),0),me=L>0?`calc(100vh - ${L+200}px)`:"calc(100vh - 14rem)";return(0,Ca.jsxs)(Z,{className:`flex flex-col ${g===T.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:g===T.id.toString()?"auto":me,minHeight:"400px"},onDragOver:te,onDrop:K=>S(K,T.id.toString()),children:[(0,Ca.jsx)("div",{className:"p-4 border-b border-border",children:g===T.id.toString()?(0,Ca.jsxs)("div",{className:"space-y-4",children:[(0,Ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ca.jsx)(V,{value:C.name||"",onChange:K=>h({...C,name:K.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Ca.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Ca.jsx)(k,{size:"sm",variant:"ghost",onClick:ee,className:"p-1 h-8 Ca-8",children:(0,Ca.jsx)(nt.Check,{className:"h-4 Ca-4"})}),(0,Ca.jsx)(k,{size:"sm",variant:"ghost",onClick:ye,className:"p-1 h-8 Ca-8",children:(0,Ca.jsx)(nt.X,{className:"h-4 Ca-4"})})]})]}),(0,Ca.jsx)(pe,{value:C.description||"",onChange:K=>h({...C,description:K.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Ca.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Ca.jsxs)("select",{value:C.confidence||T.confidence,onChange:K=>h({...C,confidence:K.target.value}),className:"flex h-8 Ca-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,Ca.jsx)("option",{value:"low",children:"Low"}),(0,Ca.jsx)("option",{value:"medium",children:"Medium"}),(0,Ca.jsx)("option",{value:"high",children:"High"})]})]}),(0,Ca.jsxs)("div",{children:[(0,Ca.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Ca.jsx)("select",{value:C.phase?.toString()||T.phase.toString(),onChange:K=>h({...C,phase:parseInt(K.target.value)}),className:"flex h-8 Ca-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(K=>(0,Ca.jsxs)("option",{value:K.toString(),children:["Phase ",K]},K))})]})]})]}):(0,Ca.jsxs)(Ca.Fragment,{children:[(0,Ca.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Ca.jsx)("div",{className:`Ca-4 h-4 rounded-full ${T.color}`}),(0,Ca.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:T.name}),(0,Ca.jsxs)("div",{className:"flex gap-1",children:[(0,Ca.jsx)(k,{size:"sm",variant:"ghost",onClick:()=>ae(T),className:"p-1 h-8 Ca-8",children:(0,Ca.jsx)(nt.Edit2,{className:"h-3 Ca-3"})}),(0,Ca.jsx)(k,{size:"sm",variant:"ghost",onClick:()=>z(T.id.toString()),className:"p-1 h-8 Ca-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Ca.jsx)(nt.Trash2,{className:"h-3 Ca-3"})})]})]}),(0,Ca.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Ca.jsxs)(X,{className:`text-xs ${I(T.confidence)}`,children:[T.confidence," confidence"]}),(0,Ca.jsxs)(X,{variant:"outline",className:"text-xs",children:["Phase ",T.phase]}),(0,Ca.jsxs)(X,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[j.length," tasks"]}),(0,Ca.jsxs)(X,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Ce," pts"]})]}),T.description&&(0,Ca.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:T.description}),(0,Ca.jsxs)(k,{onClick:()=>s(T.id.toString()),variant:"outline",size:"sm",className:"Ca-full gap-2",children:[(0,Ca.jsx)(nt.Plus,{className:"h-4 Ca-4"}),"Add Task"]})]})}),(0,Ca.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Ca.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:j.length===0?(0,Ca.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,Ca.jsx)(nt.Move,{className:"h-8 Ca-8 mb-2"}),(0,Ca.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):j.map(K=>(0,Ca.jsx)(vt,{task:K,epic:T,onDragStart:$,onTaskClick:i,isCompact:!0},K.id))})})]},T.id)})})})})]})};0&&(module.exports={DCProjectCard,EpicsView,KanbanBoardView,PlanningView,TasksView});
|