cortex-react-components 2.9.2 → 2.10.0
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-KYUPRUH5.mjs → chunk-2AWS5Z43.mjs} +1 -1
- package/dist/{chunk-IF3425JX.mjs → chunk-2VOOH4YJ.mjs} +1 -1
- package/dist/{chunk-67QPOSVV.mjs → chunk-57PJ7CHJ.mjs} +1 -1
- package/dist/{chunk-5WVFEIMC.mjs → chunk-6DQ7FEQQ.mjs} +1 -1
- package/dist/{chunk-HKGW6JI2.mjs → chunk-75XBZHOC.mjs} +1 -1
- package/dist/{chunk-I2GNNRFH.mjs → chunk-AEFWTCCE.mjs} +1 -1
- package/dist/{chunk-YOETYY5S.mjs → chunk-AFQBDAWS.mjs} +1 -1
- package/dist/chunk-AM2SRWFU.mjs +1 -0
- package/dist/{chunk-VE5LRUED.mjs → chunk-ATDQQSX5.mjs} +1 -1
- package/dist/{chunk-M7NV6EFH.mjs → chunk-B2TBKNIJ.mjs} +1 -1
- package/dist/{chunk-ZEPEWKBV.mjs → chunk-BY5TSHJ5.mjs} +1 -1
- package/dist/{chunk-N3B3XNV3.mjs → chunk-FRXZ2OKW.mjs} +1 -1
- package/dist/{chunk-MXCW6SOT.mjs → chunk-FX6IXEMQ.mjs} +1 -1
- package/dist/{chunk-XBCYPOFD.mjs → chunk-GTK2SGS5.mjs} +1 -1
- package/dist/{chunk-I5NNEOCF.mjs → chunk-I2ZLKSWR.mjs} +1 -1
- package/dist/{chunk-ISBVFNWD.mjs → chunk-IDG2O4B7.mjs} +1 -1
- package/dist/{chunk-5SHZBJ5R.mjs → chunk-KY3ELFX5.mjs} +1 -1
- package/dist/{chunk-62A35O55.mjs → chunk-LQASBVUG.mjs} +1 -1
- package/dist/{chunk-YKG4FNS4.mjs → chunk-N52FSTLG.mjs} +1 -1
- package/dist/{chunk-ERJXTG6X.mjs → chunk-NPGGDQ6F.mjs} +1 -1
- package/dist/chunk-PFDPO3UX.mjs +1 -0
- package/dist/{chunk-2RQDJ5XT.mjs → chunk-Q7KKN6MH.mjs} +1 -1
- package/dist/{chunk-H3CJOE6S.mjs → chunk-QWFFSMKK.mjs} +1 -1
- package/dist/{chunk-PK3OBSCB.mjs → chunk-RUZVSK25.mjs} +1 -1
- package/dist/{chunk-FTZRG54P.mjs → chunk-RY4C3J33.mjs} +1 -1
- package/dist/{chunk-FKU4VQR6.mjs → chunk-S4ES6P3Y.mjs} +1 -1
- package/dist/chunk-SJQY7JRS.mjs +4 -0
- package/dist/{chunk-7GMAMIHM.mjs → chunk-SPAOEUCG.mjs} +1 -1
- package/dist/{chunk-LJQPLE4S.mjs → chunk-TUACRDU3.mjs} +1 -1
- package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
- package/dist/chunk-U6BCTHV7.mjs +1 -0
- package/dist/chunk-U7KI2WJW.mjs +4 -0
- package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
- package/dist/{chunk-255P6K5W.mjs → chunk-VBSFVJM5.mjs} +1 -1
- package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
- package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
- package/dist/chunk-ZMB6R6JX.mjs +1 -0
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/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/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.js +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/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/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/Card/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/AddTaskModal.d.ts +2 -1
- package/dist/components/Projects/AddTaskModal.js +1 -1
- package/dist/components/Projects/AddTaskModal.mjs +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 +3 -1
- package/dist/components/Projects/KanbanBoardView.js +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.d.ts +3 -2
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/TaskCard.js +1 -1
- package/dist/components/Projects/TaskCard.mjs +1 -1
- package/dist/components/Projects/TasksView.js +1 -1
- package/dist/components/Projects/TasksView.mjs +1 -1
- package/dist/components/index.js +11 -11
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +15 -15
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-2B5LH5XN.mjs +0 -4
- package/dist/chunk-6YHVVP3S.mjs +0 -1
- package/dist/chunk-EBTFLN5U.mjs +0 -1
- package/dist/chunk-GN25OSET.mjs +0 -1
- package/dist/chunk-NHXNMPM5.mjs +0 -4
- package/dist/chunk-OYZX5BM4.mjs +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
5
|
-
"use strict";"use client";var Yr=Object.create;var $t=Object.defineProperty;var Qr=Object.getOwnPropertyDescriptor;var ei=Object.getOwnPropertyNames;var ti=Object.getPrototypeOf,ai=Object.prototype.hasOwnProperty;var oi=(e,t)=>{for(var a in t)$t(e,a,{get:t[a],enumerable:!0})},io=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ei(t))!ai.call(e,s)&&s!==a&&$t(e,s,{get:()=>t[s],enumerable:!(o=Qr(t,s))||o.enumerable});return e};var re=(e,t,a)=>(a=e!=null?Yr(ti(e)):{},io(t||!e||!e.__esModule?$t(a,"default",{value:e,enumerable:!0}):a,e)),ri=e=>io($t({},"__esModule",{value:!0}),e);var qs={};oi(qs,{default:()=>Rr});module.exports=ri(qs);var ge=require("react");var pt=re(require("react"));var fo=require("clsx");var Sa="-",ii=e=>{let t=ni(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:d=>{let c=d.split(Sa);return c[0]===""&&c.length!==1&&c.shift(),lo(c,t)||si(d)},getConflictingClassGroupIds:(d,c)=>{let p=a[d]||[];return c&&o[d]?[...p,...o[d]]:p}}},lo=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?lo(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(Sa);return t.validators.find(({validator:d})=>d(i))?.classGroupId},so=/^\[(.+)\]$/,si=e=>{if(so.test(e)){let t=so.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},ni=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return di(Object.entries(e.classGroups),a).forEach(([i,d])=>{Na(d,o,i,t)}),o},Na=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:no(t,s);i.classGroupId=a;return}if(typeof s=="function"){if(li(s)){Na(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([i,d])=>{Na(d,no(t,i),a,o)})})},no=(e,t)=>{let a=e;return t.split(Sa).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},li=e=>e.isThemeGetter,di=(e,t)=>t?e.map(([a,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([d,c])=>[t+d,c])):i);return[a,s]}):e,ci=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(i,d)=>{a.set(i,d),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let d=a.get(i);if(d!==void 0)return d;if((d=o.get(i))!==void 0)return s(i,d),d},set(i,d){a.has(i)?a.set(i,d):s(i,d)}}},co="!",mi=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],i=t.length,d=c=>{let p=[],m=0,l=0,w;for(let x=0;x<c.length;x++){let G=c[x];if(m===0){if(G===s&&(o||c.slice(x,x+i)===t)){p.push(c.slice(l,x)),l=x+i;continue}if(G==="/"){w=x;continue}}G==="["?m++:G==="]"&&m--}let b=p.length===0?c:c.substring(l),D=b.startsWith(co),I=D?b.substring(1):b,K=w&&w>l?w-l:void 0;return{modifiers:p,hasImportantModifier:D,baseClassName:I,maybePostfixModifierPosition:K}};return a?c=>a({className:c,parseClassName:d}):d},pi=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},ui=e=>({cache:ci(e.cacheSize),parseClassName:mi(e),...ii(e)}),gi=/\s+/,fi=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],d=e.trim().split(gi),c="";for(let p=d.length-1;p>=0;p-=1){let m=d[p],{modifiers:l,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:D}=a(m),I=!!D,K=o(I?b.substring(0,D):b);if(!K){if(!I){c=m+(c.length>0?" "+c:c);continue}if(K=o(b),!K){c=m+(c.length>0?" "+c:c);continue}I=!1}let x=pi(l).join(":"),G=w?x+co:x,z=G+K;if(i.includes(z))continue;i.push(z);let _=s(K,I);for(let te=0;te<_.length;++te){let h=_[te];i.push(G+h)}c=m+(c.length>0?" "+c:c)}return c};function vi(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=mo(t))&&(o&&(o+=" "),o+=a);return o}var mo=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=mo(e[o]))&&(a&&(a+=" "),a+=t);return a};function bi(e,...t){let a,o,s,i=d;function d(p){let m=t.reduce((l,w)=>w(l),e());return a=ui(m),o=a.cache.get,s=a.cache.set,i=c,c(p)}function c(p){let m=o(p);if(m)return m;let l=fi(p,a);return s(p,l),l}return function(){return i(vi.apply(null,arguments))}}var de=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},po=/^\[(?:([a-z-]+):)?(.+)\]$/i,hi=/^\d+\/\d+$/,xi=new Set(["px","full","screen"]),yi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wi=/\d+(%|px|ut?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|ut?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ni=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Si=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ci=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,at=e=>Ct(e)||xi.has(e)||hi.test(e),nt=e=>Dt(e,"length",Mi),Ct=e=>!!e&&!Number.isNaN(Number(e)),wa=e=>Dt(e,"number",Ct),Mt=e=>!!e&&Number.isInteger(Number(e)),Di=e=>e.endsWith("%")&&Ct(e.slice(0,-1)),$=e=>po.test(e),lt=e=>yi.test(e),Ti=new Set(["length","size","percentage"]),Pi=e=>Dt(e,Ti,uo),ki=e=>Dt(e,"position",uo),Ri=new Set(["image","url"]),Ei=e=>Dt(e,Ri,Li),Ii=e=>Dt(e,"",Ai),At=()=>!0,Dt=(e,t,a)=>{let o=po.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Mi=e=>wi.test(e)&&!Ni.test(e),uo=()=>!1,Ai=e=>Si.test(e),Li=e=>Ci.test(e);var Fi=()=>{let e=de("colors"),t=de("spacing"),a=de("blur"),o=de("brightness"),s=de("borderColor"),i=de("borderRadius"),d=de("borderSpacing"),c=de("borderWidth"),p=de("contrast"),m=de("grayscale"),l=de("hueRotate"),w=de("invert"),b=de("gap"),D=de("gradientColorStops"),I=de("gradientColorStopPositions"),K=de("inset"),x=de("margin"),G=de("opacity"),z=de("padding"),_=de("saturate"),te=de("scale"),h=de("sepia"),B=de("skew"),ee=de("space"),O=de("translate"),P=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],fe=()=>["auto",$,t],k=()=>[$,t],Me=()=>["",at,nt],Ve=()=>["auto",Ct,$],Fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],v=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>["start","end","center","between","around","evenly","stretch"],Ie=()=>["","0",$],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[Ct,$];return{cacheSize:500,separator:":",theme:{colors:[At],spacing:[at,nt],blur:["none","",lt,$],brightness:M(),borderColor:[e],borderRadius:["none","","full",lt,$],borderSpacing:k(),borderWidth:Me(),contrast:M(),grayscale:Ie(),hueRotate:M(),invert:Ie(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Di,nt],inset:fe(),margin:fe(),opacity:M(),padding:k(),saturate:M(),scale:M(),sepia:Ie(),skew:M(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",$]}],container:["container"],columns:[{columns:[lt]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:[...Fe(),$]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[K]}],"inset-x":[{"inset-x":[K]}],"inset-y":[{"inset-y":[K]}],start:[{start:[K]}],end:[{end:[K]}],top:[{top:[K]}],right:[{right:[K]}],bottom:[{bottom:[K]}],left:[{left:[K]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Mt,$]}],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",$]}],grow:[{grow:Ie()}],shrink:[{shrink:Ie()}],order:[{order:["first","last","none",Mt,$]}],"grid-cols":[{"grid-cols":[At]}],"col-start-end":[{col:["auto",{span:["full",Mt,$]},$]}],"col-start":[{"col-start":Ve()}],"col-end":[{"col-end":Ve()}],"grid-rows":[{"grid-rows":[At]}],"row-start-end":[{row:["auto",{span:[Mt,$]},$]}],"row-start":[{"row-start":Ve()}],"row-end":[{"row-end":Ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","ge",$]}],"auto-rows":[{"auto-rows":["auto","min","max","ge",$]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...le()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...le(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...le(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[z]}],px:[{px:[z]}],py:[{py:[z]}],ps:[{ps:[z]}],pe:[{pe:[z]}],pt:[{pt:[z]}],pr:[{pr:[z]}],pb:[{pb:[z]}],pl:[{pl:[z]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],gt:[{gt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ee]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$,t]}],"min-w":[{"min-w":[$,t,"min","max","fit"]}],"max-w":[{"max-w":[$,t,"none","full","min","max","fit","prose",{screen:[lt]},lt]}],h:[{h:[$,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$,t,"auto","min","max","fit"]}],"font-size":[{text:["base",lt,nt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wa]}],"font-family":[{font:[At]}],"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",$]}],"line-clamp":[{"line-clamp":["none",Ct,wa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",at,$]}],"list-image":[{"list-image":["none",$]}],"list-style-type":[{list:["none","disc","decimal",$]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[G]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...v(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",at,nt]}],"underline-offset":[{"underline-offset":["auto",at,$]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$]}],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",$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[G]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Fe(),ki]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pi]}],"bg-image":[{bg:["none",{"gradient-to":["t","gt","ut","br","b","bl","l","tl"]},Ei]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[I]}],"gradient-via-pos":[{via:[I]}],"gradient-to-pos":[{to:[I]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-ut":[{"rounded-ut":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-gt":[{"rounded-gt":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-ut":[{"border-ut":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[G]}],"border-style":[{border:[...v(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[G]}],"divide-style":[{divide:v()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-ut":[{"border-ut":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...v()]}],"outline-offset":[{"outline-offset":[at,$]}],"outline-w":[{outline:[at,nt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[G]}],"ring-offset-w":[{"ring-offset":[at,nt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",lt,Ii]}],"shadow-color":[{shadow:[At]}],opacity:[{opacity:[G]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",lt,$]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[w]}],saturate:[{saturate:[_]}],sepia:[{sepia:[h]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[G]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[h]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",$]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",$]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[te]}],"scale-x":[{"scale-x":[te]}],"scale-y":[{"scale-y":[te]}],rotate:[{rotate:[Mt,$]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$]}],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","ut-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-gt":[{"scroll-gt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[at,nt,wa]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","gt","mr","mb","ml"],mx:["mr","ml"],my:["gt","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-ut","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-gt","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-gt"],"rounded-ut":["rounded-gt","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-ut","border-w-b","border-w-l"],"border-w-x":["border-w-ut","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-ut","border-color-b","border-color-l"],"border-color-x":["border-color-ut","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-gt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-gt","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 go=bi(Fi);function u(...e){return go((0,fo.clsx)(e))}var ut=require("react/jsx-runtime"),ie=pt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,className:u("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ie.displayName="Card";var Bi=pt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,className:u("flex flex-col space-y-1.5 p-6",e),...t}));Bi.displayName="CardHeader";var zi=pt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,className:u("font-semibold leading-none tracking-tight",e),...t}));zi.displayName="CardTitle";var Oi=pt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,className:u("text-sm text-muted-foreground",e),...t}));Oi.displayName="CardDescription";var Tt=pt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,className:u("p-6 pt-0",e),...t}));Tt.displayName="CardContent";var Vi=pt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,className:u("flex items-center p-6 pt-0",e),...t}));Vi.displayName="CardFooter";var vo=require("@radix-ui/react-slot"),bo=require("class-variance-authority"),ho=re(require("react")),Wt=(0,bo.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"}}}),y=ho.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},i)=>(0,ut.jsx)(e?vo.Slot:"button",{className:u(Wt({className:t,size:a,variant:o})),ref:i,...s}));y.displayName="Button";var yo=re(require("react"));var F=yo.forwardRef(({className:e,type:t,...a},o)=>(0,ut.jsx)("input",{type:t,className:u("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,...a}));F.displayName="Input";var No=re(require("react")),Ne=No.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("textarea",{className:u("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:a,...t}));Ne.displayName="Textarea";var Z=re(require("@radix-ui/react-select")),gt=require("lucide-react"),dt=re(require("react")),pe=Z.Root;var Se=Z.Value,ce=dt.forwardRef(({children:e,className:t,...a},o)=>(0,ut.jsxs)(Z.Trigger,{className:u("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,...a,children:[e,(0,ut.jsx)(Z.Icon,{asChild:!0,children:(0,ut.jsx)(gt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ce.displayName=Z.Trigger.displayName;var Co=dt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Z.ScrollUpButton,{className:u("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,ut.jsx)(gt.ChevronUp,{className:"h-4 w-4"})}));Co.displayName=Z.ScrollUpButton.displayName;var Do=dt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Z.ScrollDownButton,{className:u("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,ut.jsx)(gt.ChevronDown,{className:"h-4 w-4"})}));Do.displayName=Z.ScrollDownButton.displayName;var me=dt.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,ut.jsx)(Z.Portal,{children:(0,ut.jsxs)(Z.Content,{className:u("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="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:a,ref:s,...o,children:[(0,ut.jsx)(Co,{}),(0,ut.jsx)(Z.Viewport,{className:u("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,ut.jsx)(Do,{})]})}));me.displayName=Z.Content.displayName;var Hi=dt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Z.Label,{className:u("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Hi.displayName=Z.Label.displayName;var V=dt.forwardRef(({children:e,className:t,...a},o)=>(0,ut.jsxs)(Z.Item,{className:u("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,...a,children:[(0,ut.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ut.jsx)(Z.ItemIndicator,{children:(0,ut.jsx)(gt.Check,{className:"h-4 w-4"})})}),(0,ut.jsx)(Z.ItemText,{children:e})]}));V.displayName=Z.Item.displayName;var ji=dt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Z.Separator,{className:u("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));ji.displayName=Z.Separator.displayName;var J=re(require("react"));var To=(e=768)=>{let[t,a]=(0,ge.useState)(!1);return(0,ge.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Po=re(require("react")),Ca=re(require("@radix-ui/react-separator"));var Da=Po.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},s)=>(0,ut.jsx)(Ca.Root,{ref:s,decorative:a,orientation:t,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Da.displayName=Ca.Root.displayName;var Lt=re(require("react")),Te=re(require("@radix-ui/react-dialog")),Ro=require("@radix-ui/react-icons");var Io=Te.Root;var Ui=Te.Portal,Mo=Lt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Te.Overlay,{className:u("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,ref:a}));Mo.displayName=Te.Overlay.displayName;var Gi=(0,bo.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-ut data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ta=Lt.forwardRef(({side:e="right",className:t,children:a,...o},s)=>(0,ut.jsxs)(Ui,{children:[(0,ut.jsx)(Mo,{}),(0,ut.jsxs)(Te.Content,{ref:s,className:u(Gi({side:e}),t),...o,children:[(0,ut.jsxs)(Te.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-secondary",children:[(0,ut.jsx)(Ro.Cross2Icon,{className:"h-4 w-4"}),(0,ut.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));Ta.displayName=Te.Content.displayName;var _i=({className:e,...t})=>(0,ut.jsx)("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});_i.displayName="SheetHeader";var $i=({className:e,...t})=>(0,ut.jsx)("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$i.displayName="SheetFooter";var Wi=Lt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Te.Title,{ref:a,className:u("text-lg font-semibold text-foreground",e),...t}));Wi.displayName=Te.Title.displayName;var Ki=Lt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Te.Description,{ref:a,className:u("text-sm text-muted-foreground",e),...t}));Ki.displayName=Te.Description.displayName;function Pa({className:e,...t}){return(0,ut.jsx)("div",{className:u("animate-pulse rounded-md bg-primary/10",e),...t})}var Lo=re(require("react")),Xe=re(require("@radix-ui/react-tooltip"));var Fo=Xe.Provider,Bo=Xe.Root,zo=Xe.Trigger,Ra=Lo.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ut.jsx)(Xe.Portal,{children:(0,ut.jsx)(Xe.Content,{ref:o,sideOffset:t,className:u("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...a})}));Ra.displayName=Xe.Content.displayName;var qi="sidebar:state",Ji=60*60*24*7,Xi="16rem",Zi="18rem",Yi="3rem",Qi="b",Ho=J.createContext(null);function qt(){let e=J.useContext(Ho);if(!e)throw new Error("useSidebar must ut used within a SidebarProvider.");return e}var Ea=J.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:s,children:i,...d},c)=>{let p=To(),[m,l]=J.useState(!1),[w,b]=J.useState(e),D=t??w,I=J.useCallback(z=>{if(a)return a?.(typeof z=="function"?z(D):z);b(z),document.cookie=`${qi}=${D}; path=/; max-age=${Ji}`},[a,D]),K=J.useCallback(()=>p?l(z=>!z):I(z=>!z),[p,I,l]);J.useEffect(()=>{let z=_=>{_.key===Qi&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),K())};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[K]);let x=D?"expanded":"collapsed",G=J.useMemo(()=>({state:x,open:D,setOpen:I,isMobile:p,openMobile:m,setOpenMobile:l,toggleSidebar:K}),[x,D,I,p,m,l,K]);return(0,ut.jsx)(Ho.Provider,{value:G,children:(0,ut.jsx)(Fo,{delayDuration:0,children:(0,ut.jsx)("div",{style:{"--sidebar-width":Xi,"--sidebar-width-icon":Yi,...s},className:u("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:c,...d,children:i})})})});Ea.displayName="SidebarProvider";var es=J.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:s,...i},d)=>{let{isMobile:c,state:p,openMobile:m,setOpenMobile:l}=qt();return a==="none"?(0,ut.jsx)("div",{className:u("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:d,...i,children:s}):c?(0,ut.jsx)(Io,{open:m,onOpenChange:l,...i,children:(0,ut.jsx)(Ta,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Zi},side:e,children:(0,ut.jsx)("div",{className:"flex h-full w-full flex-col",children:s})})}):(0,ut.jsxs)("div",{ref:d,className:"group peer hidden md:block text-sidebar-foreground","data-state":p,"data-collapsible":p==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,ut.jsx)("div",{className:u("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,ut.jsx)("div",{className:u("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-ut group-data-[side=right]:border-l",o),...i,children:(0,ut.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});es.displayName="Sidebar";var ts=J.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:s}=qt();return(0,ut.jsxs)(y,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:u("h-7 w-7",e),onClick:i=>{t?.(i),s()},...a,children:[(0,ut.jsx)(gt.PanelLeft,{}),(0,ut.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});ts.displayName="SidebarTrigger";var as=J.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=qt();return(0,ut.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:u("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});as.displayName="SidebarRail";var os=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("main",{ref:a,className:u("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));os.displayName="SidebarInset";var rs=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(F,{ref:a,"data-sidebar":"input",className:u("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));rs.displayName="SidebarInput";var is=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,"data-sidebar":"header",className:u("flex flex-col gap-2 p-2",e),...t}));is.displayName="SidebarHeader";var ss=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,"data-sidebar":"footer",className:u("flex flex-col gap-2 p-2",e),...t}));ss.displayName="SidebarFooter";var ns=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Da,{ref:a,"data-sidebar":"separator",className:u("mx-2 w-auto bg-sidebar-border",e),...t}));ns.displayName="SidebarSeparator";var ls=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,"data-sidebar":"content",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ls.displayName="SidebarContent";var ds=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,"data-sidebar":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));ds.displayName="SidebarGroup";var cs=J.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,ut.jsx)(t?vo.Slot:"div",{ref:o,"data-sidebar":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-gt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));cs.displayName="SidebarGroupLabel";var ms=J.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,ut.jsx)(t?vo.Slot:"button",{ref:o,"data-sidebar":"group-action",className:u("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));ms.displayName="SidebarGroupAction";var ps=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,"data-sidebar":"group-content",className:u("w-full text-sm",e),...t}));ps.displayName="SidebarGroupContent";var us=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("ul",{ref:a,"data-sidebar":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));us.displayName="SidebarMenu";var gs=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:u("group/menu-item relative",e),...t}));gs.displayName="SidebarMenuItem";var fs=(0,bo.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),vs=J.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:s,className:i,...d},c)=>{let p=e?vo.Slot:"button",{isMobile:m,state:l}=qt(),w=(0,ut.jsx)(p,{ref:c,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:u(fs({variant:a,size:o}),i),...d});return s?(typeof s=="string"&&(s={children:s}),(0,ut.jsxs)(Bo,{children:[(0,ut.jsx)(zo,{asChild:!0,children:w}),(0,ut.jsx)(Ra,{side:"right",align:"center",hidden:l!=="collapsed"||m,...s})]})):w});vs.displayName="SidebarMenuButton";var bs=J.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},s)=>(0,ut.jsx)(t?vo.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:u("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));bs.displayName="SidebarMenuAction";var hs=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:u("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));hs.displayName="SidebarMenuBadge";var xs=J.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let s=J.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,ut.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:u("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,ut.jsx)(Pa,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,ut.jsx)(Pa,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});xs.displayName="SidebarMenuSkeleton";var ys=J.forwardRef(({className:e,...t},a)=>(0,ut.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:u("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));ys.displayName="SidebarMenuSub";var ws=J.forwardRef(({...e},t)=>(0,ut.jsx)("li",{ref:t,...e}));ws.displayName="SidebarMenuSubItem";var Ns=J.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...s},i)=>(0,ut.jsx)(e?vo.Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:u("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...s}));Ns.displayName="SidebarMenuSubButton";var jo=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:s,onDeleteProject:i,onAddProject:d,onUpdateEpic:c,onDeleteEpic:p,onAddEpic:m,onAddSprint:l,onUpdateSprint:w,onDeleteSprint:b,onViewChange:D,mobileMenuOpen:I,onToggleMobileMenu:K})=>{let[x,G]=(0,ge.useState)(null),[z,_]=(0,ge.useState)(null),[te,h]=(0,ge.useState)(null),[B,ee]=(0,ge.useState)(null),[O,P]=(0,ge.useState)({name:"",description:""}),[U,fe]=(0,ge.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[k,Me]=(0,ge.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[Ve,Fe]=(0,ge.useState)(!1),[v,X]=(0,ge.useState)(!1),[le,Ie]=(0,ge.useState)({name:"",description:""}),[C,M]=(0,ge.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),se=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],he=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],Be=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],qe=g=>{_(g.id),P({name:g.name,description:g.description||""})},Je=()=>{z&&O.name.trim()&&(s(z,{name:O.name.trim(),description:O.description.trim()}),_(null))},ua=()=>{_(null),P({name:"",description:""})},wt=()=>{le.name.trim()&&(d({name:le.name.trim(),description:le.description.trim(),isSelected:!1}),Ie({name:"",description:""}),Fe(!1))},ga=g=>{s(g,{isSelected:!0})},fa=g=>{h(g.id),fe({name:g.name,description:g.description||"",color:g.color,confidence:g.confidence,phase:g.phase,startDate:g.startDate.toISOString().split("T")[0],endDate:g.endDate.toISOString().split("T")[0],progress:g.progress})},va=()=>{te&&U.name.trim()&&(c(te,{name:U.name.trim(),description:U.description.trim(),color:U.color,confidence:U.confidence,phase:U.phase,startDate:new Date(U.startDate),endDate:new Date(U.endDate),progress:U.progress}),h(null))},Vt=()=>{h(null),fe({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},ba=g=>{ee(g.id),Me({name:g.name,description:g.description||"",startDate:g.startDate.toISOString().split("T")[0],endDate:g.endDate.toISOString().split("T")[0],isActive:g.isActive})},Ht=()=>{B&&k.name.trim()&&(w(B,{name:k.name.trim(),description:k.description.trim(),startDate:new Date(k.startDate),endDate:new Date(k.endDate),isActive:k.isActive}),ee(null))},ha=()=>{ee(null),Me({name:"",description:"",startDate:"",endDate:"",isActive:!1})},jt=()=>{C.name.trim()&&(l({name:C.name.trim(),description:C.description.trim(),startDate:new Date(C.startDate),endDate:new Date(C.endDate),isActive:C.isActive,isSelected:!1}),M({name:"",description:"",startDate:"",endDate:"",isActive:!1}),X(!1))},Nt=g=>{w(g,{isSelected:!0})},St=g=>g.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Ut=g=>{let N=he.find(q=>q.value===g);return N?{label:N.label,color:N.color}:{label:"Medium",color:"text-warning"}},It=g=>{let N=Be.find(q=>q.value===g);return N?{label:N.label,color:N.color}:{label:"Phase 1",color:"text-primary"}};return(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsxs)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${I?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,ut.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,ut.jsxs)("button",{onClick:()=>{D("kanban"),G(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3 z-50`,title:"Kanban View",children:[(0,ut.jsx)(gt.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,ut.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),(0,ut.jsxs)("button",{onClick:()=>{D("planning"),G(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="planning"?"bg-brand-plum":"bg-brand-plum/75 hover:bg-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[(0,ut.jsx)(gt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,ut.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),(0,ut.jsxs)("button",{onClick:()=>G(x==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${x==="projects"?"bg-sidebar-accent":"bg-sidebar-primary hover:bg-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[(0,ut.jsx)(gt.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,ut.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),(0,ut.jsxs)("button",{onClick:()=>{D("epics"),G(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="epics"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,ut.jsx)(gt.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,ut.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),(0,ut.jsxs)("button",{onClick:()=>G(x==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${x==="sprints"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[(0,ut.jsx)(gt.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,ut.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),(0,ut.jsxs)("button",{onClick:()=>{D("files"),G(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="files"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,ut.jsx)(gt.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,ut.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),(0,ut.jsxs)("button",{onClick:()=>{D("tasks"),G(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="tasks"?"bg-brand-cyan":"bg-brand-cyan/75 hover:bg-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[(0,ut.jsx)(gt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,ut.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),I&&(0,ut.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:K}),x&&(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>G(null)}),(0,ut.jsxs)("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg z-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[(0,ut.jsxs)("div",{className:"p-3 md:p-4 border-b flex items-center justify-between",children:[(0,ut.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[x==="projects"&&"Projects",x==="epics"&&"Manage Epics",x==="sprints"&&"Manage Sprints",x==="files"&&"Files"]}),(0,ut.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>G(null),children:(0,ut.jsx)(gt.X,{className:"h-4 w-4"})})]}),(0,ut.jsxs)("div",{className:"p-3 md:p-4 space-y-4 h-full overflow-y-auto",children:[x==="projects"&&(0,ut.jsx)(ie,{className:"p-3",children:(0,ut.jsxs)("div",{className:"space-y-3",children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ut.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,ut.jsxs)(y,{size:"sm",onClick:()=>Fe(!0),className:"gap-1",children:[(0,ut.jsx)(gt.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),Ve&&(0,ut.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,ut.jsx)(F,{value:le.name,onChange:g=>Ie(N=>({...N,name:g.target.value})),placeholder:"Project name",className:"text-sm"}),(0,ut.jsx)(Ne,{value:le.description,onChange:g=>Ie(N=>({...N,description:g.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,ut.jsxs)("div",{className:"flex gap-1",children:[(0,ut.jsx)(y,{size:"sm",onClick:wt,className:"text-xs h-6",children:"Save"}),(0,ut.jsx)(y,{size:"sm",variant:"outline",onClick:()=>Fe(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,ut.jsx)("div",{className:"space-y-2",children:e.map(g=>(0,ut.jsx)("div",{className:"border rounded p-2",children:z===g.id?(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(F,{value:O.name,onChange:N=>P(q=>({...q,name:N.target.value})),placeholder:"Project name",className:"text-sm"}),(0,ut.jsx)(Ne,{value:O.description,onChange:N=>P(q=>({...q,description:N.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,ut.jsxs)("div",{className:"flex gap-1",children:[(0,ut.jsx)(y,{size:"sm",onClick:Je,className:"text-xs h-6",children:"Save"}),(0,ut.jsx)(y,{size:"sm",variant:"outline",onClick:ua,className:"text-xs h-6",children:"Cancel"})]})]}):(0,ut.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${g.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>ga(g.id),children:[(0,ut.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ut.jsx)(gt.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,ut.jsx)("span",{className:"font-medium text-xs",children:g.name})]}),g.description&&(0,ut.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:g.description}),(0,ut.jsxs)("div",{className:"flex gap-1",onClick:N=>N.stopPropagation(),children:[(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>qe(g),className:"h-5 px-1",children:(0,ut.jsx)(gt.Edit2,{className:"h-3 w-3"})}),(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>i(g.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,ut.jsx)(gt.Trash2,{className:"h-3 w-3"})})]})]})},g.id))})]})}),x==="epics"&&(0,ut.jsx)(ie,{className:"p-3",children:(0,ut.jsxs)("div",{className:"space-y-3",children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ut.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,ut.jsxs)(y,{size:"sm",onClick:m,className:"gap-1",children:[(0,ut.jsx)(gt.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,ut.jsx)("div",{className:"space-y-4",children:t.map(g=>(0,ut.jsx)("div",{className:"border rounded-lg p-3",children:te===g.id?(0,ut.jsxs)("div",{className:"space-y-3",children:[(0,ut.jsx)(F,{value:U.name,onChange:N=>fe(q=>({...q,name:N.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,ut.jsx)(Ne,{value:U.description,onChange:N=>fe(q=>({...q,description:N.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)("label",{className:"text-xs font-medium",children:"Color"}),(0,ut.jsx)("div",{className:"flex gap-1 flex-wrap",children:se.map(N=>(0,ut.jsx)("button",{onClick:()=>fe(q=>({...q,color:N})),className:`w-6 h-6 rounded-full ${N} ${U.color===N?"ring-2 ring-ring":""}`},N))})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,ut.jsxs)("div",{className:"space-y-1",children:[(0,ut.jsx)("label",{className:"text-xs font-medium",children:"Confidence"}),(0,ut.jsxs)(pe,{value:U.confidence,onValueChange:N=>fe(q=>({...q,confidence:N})),children:[(0,ut.jsx)(ce,{className:"h-8 text-xs",children:(0,ut.jsx)(Se,{})}),(0,ut.jsx)(me,{children:he.map(N=>(0,ut.jsx)(V,{value:N.value,children:(0,ut.jsx)("span",{className:N.color,children:N.label})},N.value))})]})]}),(0,ut.jsxs)("div",{className:"space-y-1",children:[(0,ut.jsx)("label",{className:"text-xs font-medium",children:"Phase"}),(0,ut.jsxs)(pe,{value:U.phase.toString(),onValueChange:N=>fe(q=>({...q,phase:parseInt(N)})),children:[(0,ut.jsx)(ce,{className:"h-8 text-xs",children:(0,ut.jsx)(Se,{})}),(0,ut.jsx)(me,{children:Be.map(N=>(0,ut.jsx)(V,{value:N.value.toString(),children:(0,ut.jsx)("span",{className:N.color,children:N.label})},N.value))})]})]})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,ut.jsxs)("div",{className:"space-y-1",children:[(0,ut.jsx)("label",{className:"text-xs font-medium",children:"Start Date"}),(0,ut.jsx)(F,{type:"date",value:U.startDate,onChange:N=>fe(q=>({...q,startDate:N.target.value})),className:"text-xs h-8"})]}),(0,ut.jsxs)("div",{className:"space-y-1",children:[(0,ut.jsx)("label",{className:"text-xs font-medium",children:"End Date"}),(0,ut.jsx)(F,{type:"date",value:U.endDate,onChange:N=>fe(q=>({...q,endDate:N.target.value})),className:"text-xs h-8"})]})]}),(0,ut.jsxs)("div",{className:"space-y-1",children:[(0,ut.jsx)("label",{className:"text-xs font-medium",children:"Progress (%)"}),(0,ut.jsx)(F,{type:"number",min:"0",max:"100",value:U.progress,onChange:N=>fe(q=>({...q,progress:parseInt(N.target.value)||0})),className:"text-xs h-8"})]}),(0,ut.jsxs)("div",{className:"flex gap-2",children:[(0,ut.jsx)(y,{size:"sm",onClick:va,className:"text-xs",children:"Save"}),(0,ut.jsx)(y,{size:"sm",variant:"outline",onClick:Vt,className:"text-xs",children:"Cancel"})]})]}):(0,ut.jsxs)("div",{className:`cursor-pointer p-2 rounded transition-colors ${g.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>c(g.id,{isSelected:!g.isSelected}),children:[(0,ut.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,ut.jsx)("div",{className:`w-3 h-3 rounded-full ${g.color}`}),(0,ut.jsx)("span",{className:"font-medium text-sm",children:g.name})]}),g.description&&(0,ut.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:g.description}),(0,ut.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ut.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,ut.jsx)("span",{className:Ut(g.confidence).color,children:Ut(g.confidence).label})]}),(0,ut.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ut.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,ut.jsx)("span",{className:It(g.phase).color,children:It(g.phase).label})]}),(0,ut.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ut.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,ut.jsxs)("span",{className:"text-foreground",children:[St(g.startDate)," - ",St(g.endDate)]})]}),(0,ut.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ut.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ut.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,ut.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${g.progress}%`}})}),(0,ut.jsxs)("span",{className:"text-foreground",children:[g.progress,"%"]})]})]})]}),(0,ut.jsxs)("div",{className:"flex gap-1",onClick:N=>N.stopPropagation(),children:[(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>fa(g),className:"h-6 px-2",children:(0,ut.jsx)(gt.Edit2,{className:"h-3 w-3"})}),(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>p(g.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,ut.jsx)(gt.Trash2,{className:"h-3 w-3"})})]})]})},g.id))})]})}),x==="sprints"&&(0,ut.jsx)(ie,{className:"p-3",children:(0,ut.jsxs)("div",{className:"space-y-3",children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ut.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,ut.jsxs)(y,{size:"sm",onClick:()=>X(!0),className:"gap-1",children:[(0,ut.jsx)(gt.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),v&&(0,ut.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,ut.jsx)(F,{value:C.name,onChange:g=>M(N=>({...N,name:g.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,ut.jsx)(F,{type:"date",value:C.startDate,onChange:g=>M(N=>({...N,startDate:g.target.value})),className:"text-xs"}),(0,ut.jsx)(F,{type:"date",value:C.endDate,onChange:g=>M(N=>({...N,endDate:g.target.value})),className:"text-xs"})]}),(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ut.jsx)("input",{type:"checkbox",checked:C.isActive,onChange:g=>M(N=>({...N,isActive:g.target.checked})),className:"w-3 h-3"}),(0,ut.jsx)("span",{className:"text-xs",children:"Active"})]}),(0,ut.jsxs)("div",{className:"flex gap-1",children:[(0,ut.jsx)(y,{size:"sm",onClick:jt,className:"text-xs h-6",children:"Save"}),(0,ut.jsx)(y,{size:"sm",variant:"outline",onClick:()=>X(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,ut.jsx)("div",{className:"space-y-2",children:a.map(g=>(0,ut.jsx)("div",{className:"border rounded p-2",children:B===g.id?(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(F,{value:k.name,onChange:N=>Me(q=>({...q,name:N.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:g.id==="backlog"||g.id==="all-tasks"}),g.id!=="backlog"&&g.id!=="all-tasks"&&(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,ut.jsx)(F,{type:"date",value:k.startDate,onChange:N=>Me(q=>({...q,startDate:N.target.value})),className:"text-xs"}),(0,ut.jsx)(F,{type:"date",value:k.endDate,onChange:N=>Me(q=>({...q,endDate:N.target.value})),className:"text-xs"})]}),(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ut.jsx)("input",{type:"checkbox",checked:k.isActive,onChange:N=>Me(q=>({...q,isActive:N.target.checked})),className:"w-3 h-3"}),(0,ut.jsx)("span",{className:"text-xs",children:"Active"})]})]}),(0,ut.jsxs)("div",{className:"flex gap-1",children:[(0,ut.jsx)(y,{size:"sm",onClick:Ht,className:"text-xs h-6",children:"Save"}),(0,ut.jsx)(y,{size:"sm",variant:"outline",onClick:ha,className:"text-xs h-6",children:"Cancel"})]})]}):(0,ut.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${g.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>Nt(g.id),children:[(0,ut.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ut.jsx)(gt.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,ut.jsx)("span",{className:"font-medium text-xs",children:g.name}),g.isActive&&(0,ut.jsx)("span",{className:"text-xs bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(g.id==="backlog"||g.id==="all-tasks")&&(0,ut.jsx)("span",{className:"text-xs bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),g.id!=="backlog"&&g.id!=="all-tasks"&&(0,ut.jsxs)("p",{className:"text-xs text-muted-foreground mb-1",children:[g.startDate.toLocaleDateString()," - ",g.endDate.toLocaleDateString()]}),(0,ut.jsxs)("div",{className:"flex gap-1",onClick:N=>N.stopPropagation(),children:[(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>ba(g),className:"h-5 px-1",children:(0,ut.jsx)(gt.Edit2,{className:"h-3 w-3"})}),g.id!=="backlog"&&g.id!=="all-tasks"&&(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>b(g.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,ut.jsx)(gt.Trash2,{className:"h-3 w-3"})})]})]})},g.id))})]})})]})]})]})]})},Uo=e=>(0,ut.jsx)(Ea,{children:(0,ut.jsxs)("div",{className:"flex w-full",children:[(0,ut.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,ut.jsx)(jo,{...e})}),(0,ut.jsx)("div",{className:"md:hidden",children:(0,ut.jsx)(jo,{...e})}),(0,ut.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:(0,ut.jsx)("div",{className:"w-full",children:e.children})})]})});var Ss=(0,bo.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 ve({className:e,variant:t,...a}){return(0,ut.jsx)("div",{className:u(Ss({variant:t}),e),...a})}var $o=({title:e,status:t,taskCount:a,children:o,onDrop:s,isCompact:i=!1})=>{let d=m=>{m.preventDefault()},c=m=>{m.preventDefault(),s(t)};return(0,ut.jsxs)(ie,{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 ${i?"lg:max-w-xs":""}`,onDragOver:d,onDrop:c,children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,ut.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,ut.jsx)(ve,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,ut.jsx)("div",{className:"space-y-4 min-h-[200px]",children:o})]})};var Jt=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:s=!1})=>{let i=l=>{a(e)},d=()=>{o(e)},c=()=>{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"}},p=()=>{switch(e.type){case"story":return(0,ut.jsx)(gt.BookOpen,{className:"h-3 w-3"});case"bug":return(0,ut.jsx)(gt.Bug,{className:"h-3 w-3"});case"spike":return(0,ut.jsx)(gt.Zap,{className:"h-3 w-3"});case"task":default:return(0,ut.jsx)(gt.AlertCircle,{className:"h-3 w-3"})}},m=()=>{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 s?(0,ut.jsx)(ie,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:i,onClick:d,children:(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ut.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${m()}`,children:p()}),(0,ut.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,ut.jsxs)(ie,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:i,onClick:d,children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ut.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${m()}`,children:[p(),(0,ut.jsx)("span",{className:"capitalize",children:e.type})]}),(0,ut.jsxs)("div",{className:"flex gap-1",children:[(0,ut.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${c()}`,children:e.priority}),(0,ut.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,ut.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,ut.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,ut.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,ut.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ut.jsx)(gt.User,{className:"h-4 w-4"}),(0,ut.jsx)("span",{children:e.assignee})]})})]})};var Ft=re(require("react")),Pe=re(require("@radix-ui/react-dialog"));var Ze=Pe.Root;var Cs=Pe.Portal;var Ko=Ft.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Pe.Overlay,{ref:a,className:u("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}));Ko.displayName=Pe.Overlay.displayName;var je=Ft.forwardRef(({className:e,children:t,...a},o)=>(0,ut.jsxs)(Cs,{children:[(0,ut.jsx)(Ko,{}),(0,ut.jsxs)(Pe.Content,{ref:o,className:u("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,ut.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,ut.jsx)(gt.X,{className:"h-4 w-4"}),(0,ut.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));je.displayName=Pe.Content.displayName;var Ue=({className:e,...t})=>(0,ut.jsx)("div",{className:u("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ue.displayName="DialogHeader";var Bt=({className:e,...t})=>(0,ut.jsx)("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Bt.displayName="DialogFooter";var Ge=Ft.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Pe.Title,{ref:a,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));Ge.displayName=Pe.Title.displayName;var Ds=Ft.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Pe.Description,{ref:a,className:u("text-sm text-muted-foreground",e),...t}));Ds.displayName=Pe.Description.displayName;var qo=re(require("react")),Ia=re(require("@radix-ui/react-label"));var Ts=(0,bo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),R=qo.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Ia.Root,{ref:a,className:u(Ts(),e),...t}));R.displayName=Ia.Root.displayName;var vt=re(require("react")),kt=re(require("@radix-ui/react-toggle-group"));var Zo=re(require("react")),Ma=re(require("@radix-ui/react-toggle"));var Aa=(0,bo.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"}}),Ps=Zo.forwardRef(({className:e,variant:t,size:a,...o},s)=>(0,ut.jsx)(Ma.Root,{ref:s,className:u(Aa({variant:t,size:a,className:e})),...o}));Ps.displayName=Ma.Root.displayName;var er=vt.createContext({size:"default",variant:"default"}),bt=vt.forwardRef(({className:e,variant:t,size:a,children:o,...s},i)=>(0,ut.jsx)(kt.Root,{ref:i,className:u("flex items-center justify-center gap-1",e),...s,children:(0,ut.jsx)(er.Provider,{value:{variant:t,size:a},children:o})}));bt.displayName=kt.Root.displayName;var ht=vt.forwardRef(({className:e,children:t,variant:a,size:o,...s},i)=>{let d=vt.useContext(er);return(0,ut.jsx)(kt.Item,{ref:i,className:u(Aa({variant:d.variant||a,size:d.size||o}),e),...s,children:t})});ht.displayName=kt.Item.displayName;var ks=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:gt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:gt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:gt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:gt.Zap}],Rs=[{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"}],Zt=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:s,defaultEpicId:i})=>{let[d,c]=(0,ge.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,ge.useEffect)(()=>{e&&i&&c(l=>({...l,epicId:i}))},[e,i]),(0,ge.useEffect)(()=>{e&&c({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""})},[e]);let p=l=>{l.preventDefault(),d.title.trim()&&(a({title:d.title.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"}),c({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""}),t())},m=(l,w)=>{c(b=>({...b,[l]:w}))};return(0,ut.jsx)(Ze,{open:e,onOpenChange:t,children:(0,ut.jsxs)(je,{className:"sm:max-w-md",children:[(0,ut.jsx)(Ue,{children:(0,ut.jsx)(Ge,{children:"Add New Task"})}),(0,ut.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"title",children:"Task Title"}),(0,ut.jsx)(F,{id:"title",value:d.title,onChange:l=>m("title",l.target.value),placeholder:"Enter task title",required:!0})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"description",children:"Description"}),(0,ut.jsx)(Ne,{id:"description",value:d.description,onChange:l=>m("description",l.target.value),placeholder:"Enter task description",rows:3})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"Type"}),(0,ut.jsx)(bt,{type:"single",value:d.type,onValueChange:l=>l&&m("type",l),children:ks.map(l=>{let w=l.icon;return(0,ut.jsxs)(ht,{value:l.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,ut.jsx)(w,{className:"h-4 w-4"}),l.label]},l.value)})})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"Priority"}),(0,ut.jsx)(bt,{type:"single",value:d.priority,onValueChange:l=>l&&m("priority",l),children:Rs.map(l=>(0,ut.jsx)(ht,{value:l.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:l.label},l.value))})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"points",children:"Story Points"}),(0,ut.jsx)(F,{id:"points",type:"number",min:"1",max:"100",value:d.points,onChange:l=>m("points",parseInt(l.target.value)||1),placeholder:"Enter story points",required:!0})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"epic",children:"Epic"}),(0,ut.jsxs)(pe,{value:d.epicId,onValueChange:l=>m("epicId",l),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{placeholder:"Select an epic"})}),(0,ut.jsx)(me,{children:o.map(l=>(0,ut.jsx)(V,{value:l.id,children:(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ut.jsx)("div",{className:`w-3 h-3 rounded-full ${l.color}`}),l.name]})},l.id))})]})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,ut.jsxs)(pe,{value:d.sprintId,onValueChange:l=>m("sprintId",l),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{placeholder:"Select a sprint"})}),(0,ut.jsxs)(me,{children:[(0,ut.jsx)(V,{value:"none",children:"No Sprint"}),s.map(l=>(0,ut.jsx)(V,{value:l.id,children:(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[l.name,l.isActive&&(0,ut.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},l.id))]})]})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"assignee",children:"Assignee"}),(0,ut.jsx)(F,{id:"assignee",value:d.assignee,onChange:l=>m("assignee",l.target.value),placeholder:"Enter assignee name"})]}),(0,ut.jsxs)(Bt,{children:[(0,ut.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,ut.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Fa=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:s,className:i="",disabled:d=!1})=>{let[c,p]=(0,ge.useState)(!1),[m,l]=(0,ge.useState)(""),w=()=>{d||(p(!0),l(t))},b=async()=>{m!==t&&await s(e,m),p(!1)},D=I=>{I.key==="Enter"&&!o||I.key==="Enter"&&I.ctrlKey&&o?b():I.key==="Escape"&&(p(!1),l(""))};return(0,ut.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,ut.jsx)(R,{children:a}),c?o?(0,ut.jsx)(Ne,{value:m,onChange:I=>l(I.target.value),onBlur:b,onKeyDown:D,autoFocus:!0,rows:4,className:"resize-none"}):(0,ut.jsx)(F,{value:m,onChange:I=>l(I.target.value),onBlur:b,onKeyPress:D,autoFocus:!0,className:"text-lg font-medium"}):(0,ut.jsxs)("div",{onClick:w,className:`${d?"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,ut.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!d&&(0,ut.jsx)(gt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Yt=re(require("react")),rt=re(require("@radix-ui/react-avatar"));var Ba=Yt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(rt.Root,{ref:a,className:u("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ba.displayName=rt.Root.displayName;var Es=Yt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(rt.Image,{ref:a,className:u("aspect-square h-full w-full",e),...t}));Es.displayName=rt.Image.displayName;var za=Yt.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(rt.Fallback,{ref:a,className:u("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));za.displayName=rt.Fallback.displayName;var or=({comments:e,onAddComment:t})=>{let[a,o]=(0,ge.useState)(""),s=d=>d.split(" ").map(c=>c[0]).join("").toUpperCase(),i=()=>{a.trim()&&(t(a),o(""))};return(0,ut.jsxs)("div",{className:"space-y-4",children:[(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ut.jsx)(gt.MessageSquare,{className:"h-5 w-5"}),(0,ut.jsx)(R,{className:"text-lg font-medium",children:"Comments"}),(0,ut.jsx)(ve,{variant:"secondary",children:e.length})]}),(0,ut.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(d=>(0,ut.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,ut.jsx)(Ba,{className:"h-8 w-8 gt-1",children:(0,ut.jsx)(za,{className:"text-xs bg-muted text-muted-foreground",children:s(d.author)})}),(0,ut.jsxs)("div",{className:"flex-1",children:[(0,ut.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ut.jsx)("span",{className:"font-medium text-sm",children:d.author}),(0,ut.jsxs)("span",{className:"text-xs text-muted-foreground",children:[d.createdAt.toLocaleDateString()," at ",d.createdAt.toLocaleTimeString()]})]}),(0,ut.jsx)("p",{className:"text-sm text-muted-foreground",children:d.text})]})]},d.id))}),(0,ut.jsxs)("div",{className:"flex gap-2",children:[(0,ut.jsx)(Ne,{value:a,onChange:d=>o(d.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,ut.jsx)(y,{onClick:i,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,ut.jsx)(gt.Send,{className:"h-4 w-4"})})]})]})};var ta=({label:e,value:t,onValueChange:a,options:o,showColor:s=!1,disabled:i=!1})=>{let[d,c]=(0,ge.useState)(!1),p=o.find(l=>l.value===t);return(0,ut.jsxs)("div",{className:"space-y-1",children:[(0,ut.jsx)(R,{className:"text-xs text-muted-foreground",children:e}),(0,ut.jsxs)(pe,{value:t,onValueChange:a,open:d,onOpenChange:l=>{i||c(l)},disabled:i,children:[(0,ut.jsx)(ce,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,ut.jsxs)(ve,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&c(!d),children:[s&&p?.color&&(0,ut.jsx)("div",{className:`w-2 h-2 rounded-full ${p.color} mr-1`}),p?.label||"Select..."]})}),(0,ut.jsx)(me,{children:o.map(l=>(0,ut.jsx)(V,{value:l.value,children:s&&l.color?(0,ut.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ut.jsx)("div",{className:`w-3 h-3 rounded-full ${l.color}`}),l.label]}):l.label},l.value))})]})]})};var ir=({label:e,value:t,onValueChange:a,options:o,placeholder:s="Search...",allowCustomValue:i=!1,disabled:d=!1})=>{let[c,p]=(0,ge.useState)(!1),[m,l]=(0,ge.useState)(""),w=o.find(x=>x.value===t),b=o.filter(x=>x.label.toLowerCase().includes(m.toLowerCase())),D=x=>{a(x),p(!1),l("")},I=()=>{i&&m.trim()&&!o.find(x=>x.value===m.trim())&&(a(m.trim()),p(!1),l(""))};return(0,$e.jsxs)("div",{className:"space-y-1",children:[(0,$e.jsx)(R,{className:"text-xs text-muted-foreground",children:e}),(0,$e.jsxs)(pe,{value:t,onValueChange:D,open:c,onOpenChange:x=>{d||p(x)},disabled:d,children:[(0,$e.jsx)(ce,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,$e.jsx)(ve,{variant:"secondary",className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!d&&p(!c),children:w?.label||t||"Select..."})}),(0,$e.jsxs)(me,{children:[(0,$e.jsx)("div",{className:"p-2",children:(0,$e.jsx)(F,{placeholder:s,value:m,onChange:x=>l(x.target.value),onKeyDown:x=>{x.key==="Enter"&&i&&I()},className:"mb-2"})}),b.map(x=>(0,$e.jsx)(V,{value:x.value,children:x.label},x.value)),i&&m.trim()&&!b.find(x=>x.value===m.trim())&&(0,$e.jsxs)(V,{value:m.trim(),children:['Add "',m.trim(),'"']})]})]})]})};var Is=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:gt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:gt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:gt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:gt.Zap}],Ms=[{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"}],As=[{value:"John Doe",label:"John Doe"},{value:"Jane Smith",label:"Jane Smith"},{value:"Bob Wilson",label:"Bob Wilson"},{value:"Alice Johnson",label:"Alice Johnson"},{value:"Carol Brown",label:"Carol Brown"},{value:"David Lee",label:"David Lee"},{value:"Emma Davis",label:"Emma Davis"},{value:"Frank Miller",label:"Frank Miller"},{value:"Grace Taylor",label:"Grace Taylor"},{value:"Unassigned",label:"Unassigned"}],sr=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:s,onClose:i,onDelete:d,isUpdating:c=!1,isDeleting:p=!1,deleteState:m="idle"})=>{let l=b=>b.split(" ").map(D=>D[0]).join("").toUpperCase(),w=()=>m==="loading"?(0,ut.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,ut.jsx)(gt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):m==="success"?(0,ut.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,ut.jsx)(gt.Check,{className:"h-3 w-3"}),"Deleted"]}):m==="error"?(0,ut.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,ut.jsx)(gt.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,ut.jsxs)(y,{onClick:d,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:c||p,children:[(0,ut.jsx)(gt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,ut.jsxs)("div",{className:"flex flex-col h-full",children:[(0,ut.jsxs)("div",{className:"space-y-4",style:{opacity:c?.6:1},children:[(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{className:"text-xs text-muted-foreground",children:"Status"}),(0,ut.jsx)(ta,{label:"",value:e.status,onValueChange:b=>s("status",b),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:c})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{className:"text-xs text-muted-foreground",children:"Type"}),(0,ut.jsx)(bt,{type:"single",value:e.type,onValueChange:b=>b&&s("type",b),className:"grid grid-cols-2 gap-1",disabled:c,children:Is.map(b=>{let D=b.icon;return(0,ut.jsxs)(ht,{value:b.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:c,children:[(0,ut.jsx)(D,{className:"h-3 w-3"}),b.label]},b.value)})})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,ut.jsx)(bt,{type:"single",value:e.priority,onValueChange:b=>b&&s("priority",b),className:"grid grid-cols-3 gap-1",disabled:c,children:Ms.map(b=>(0,ut.jsx)(ht,{value:b.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:c,children:b.label},b.value))})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,ut.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:b=>s("points",b.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:c})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,ut.jsx)(ta,{label:"",value:e.epicId,onValueChange:b=>s("epicId",b),options:(t||[]).map(b=>({value:b.id,label:b.name,color:b.color})),showColor:!0,disabled:c})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,ut.jsx)(ta,{label:"",value:e.sprintId||"none",onValueChange:b=>s("sprintId",b==="none"?"":b),options:[{value:"none",label:"No Sprint"},...(a||[]).map(b=>({value:b.id,label:`${b.name}${b.isActive?" (Active)":""}`}))],disabled:c})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,ut.jsx)(ir,{label:"",value:e.assignee,onValueChange:b=>s("assignee",b),options:As,placeholder:"Search team members...",allowCustomValue:!0,disabled:c})]})]}),(0,ut.jsxs)("div",{className:"gt-auto pt-4 space-y-4",children:[(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(y,{onClick:i,variant:"outline",className:"w-full h-8 text-xs",disabled:c||p,children:"Close"}),w()]}),(0,ut.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,ut.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,ut.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ut.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,ut.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ut.jsx)(gt.User,{className:"h-3 w-3"}),(0,ut.jsx)("span",{children:"System"})]})]}),(0,ut.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ut.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,ut.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ut.jsx)(gt.Calendar,{className:"h-3 w-3"}),(0,ut.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,ut.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ut.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,ut.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ut.jsx)(gt.Clock,{className:"h-3 w-3"}),(0,ut.jsxs)("span",{children:[o.toLocaleDateString()," at ",o.toLocaleTimeString()]})]})]})]})]})]})};var aa=({isOpen:e,onClose:t,task:a,epics:o,sprints:s,onUpdateTask:i,onDeleteTask:d})=>{let[c,p]=(0,ge.useState)(new Date),[m,l]=(0,ge.useState)("idle"),[w,b]=(0,ge.useState)("idle"),[D,I]=(0,ge.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working on the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),K=async(B,ee)=>{if(ee!==a[B]){l("loading");try{await i(a.id,{[B]:ee}),p(new Date),l("success"),setTimeout(()=>l("idle"),1500)}catch{l("error"),setTimeout(()=>l("idle"),3e3)}}},x=async(B,ee)=>{if(ee!==a[B]){l("loading");try{await i(a.id,{[B]:ee}),p(new Date),l("success"),setTimeout(()=>l("idle"),1500)}catch{l("error"),setTimeout(()=>l("idle"),3e3)}}},G=B=>{let ee={id:Date.now().toString(),text:B,author:"Current User",createdAt:new Date};I([...D,ee])},z=async()=>{b("loading");try{await d(a.id),b("success"),setTimeout(()=>{t(),b("idle")},1e3)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}},_=m!=="loading"&&w!=="loading",te=()=>{_&&t()},h=()=>m==="loading"?(0,ut.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,ut.jsx)(gt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,ut.jsx)("span",{children:"Updating..."})]}):m==="success"?(0,ut.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,ut.jsx)(gt.Check,{className:"h-4 w-4"}),(0,ut.jsx)("span",{children:"Updated successfully"})]}):m==="error"?(0,ut.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,ut.jsx)(gt.X,{className:"h-4 w-4"}),(0,ut.jsx)("span",{children:"Update failed"})]}):null;return(0,ut.jsx)(Ze,{open:e,onOpenChange:te,children:(0,ut.jsxs)(je,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,ut.jsxs)(Ue,{children:[(0,ut.jsx)(Ge,{className:"sr-only",children:a.title}),(0,ut.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ut.jsx)("div",{className:"flex-1",children:h()}),!_&&(0,ut.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,ut.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,ut.jsx)(Fa,{fieldName:"title",value:a.title,label:"",onSave:K,className:"border-b border-border pb-3",disabled:m==="loading"}),(0,ut.jsx)(Fa,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:K,disabled:m==="loading"}),(0,ut.jsx)(or,{comments:D,onAddComment:G})]}),(0,ut.jsx)(sr,{task:a,epics:o,sprints:s,lastUpdated:c,onUpdateTask:x,onClose:te,onDelete:z,isUpdating:m==="loading",isDeleting:w==="loading",deleteState:w})]})]})})};var oa=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,s]=(0,ge.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}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],d=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],c=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],p=l=>{l.preventDefault(),o.name.trim()&&(a({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}),s({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())},m=(l,w)=>{s(b=>({...b,[l]:w}))};return(0,ut.jsx)(Ze,{open:e,onOpenChange:t,children:(0,ut.jsxs)(je,{className:"sm:max-w-md",children:[(0,ut.jsx)(Ue,{children:(0,ut.jsx)(Ge,{children:"Add New Epic"})}),(0,ut.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"name",children:"Epic Name"}),(0,ut.jsx)(F,{id:"name",value:o.name,onChange:l=>m("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"description",children:"Description"}),(0,ut.jsx)(Ne,{id:"description",value:o.description,onChange:l=>m("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"Color"}),(0,ut.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(l=>(0,ut.jsx)("button",{type:"button",onClick:()=>m("color",l),className:`w-8 h-8 rounded-full ${l} ${o.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"Confidence"}),(0,ut.jsxs)(pe,{value:o.confidence,onValueChange:l=>m("confidence",l),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{})}),(0,ut.jsx)(me,{children:d.map(l=>(0,ut.jsx)(V,{value:l.value,children:l.label},l.value))})]})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"Phase"}),(0,ut.jsxs)(pe,{value:o.phase.toString(),onValueChange:l=>m("phase",parseInt(l)),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{})}),(0,ut.jsx)(me,{children:c.map(l=>(0,ut.jsx)(V,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"Start Date"}),(0,ut.jsx)(F,{type:"date",value:o.startDate,onChange:l=>m("startDate",l.target.value)})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"End Date"}),(0,ut.jsx)(F,{type:"date",value:o.endDate,onChange:l=>m("endDate",l.target.value)})]})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"Progress (%)"}),(0,ut.jsx)(F,{type:"number",min:"0",max:"100",value:o.progress,onChange:l=>m("progress",parseInt(l.target.value)||0)})]}),(0,ut.jsxs)(Bt,{children:[(0,ut.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,ut.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var dr=require("motion/react");function lr(e,t){let[a,o]=(0,ge.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),s=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,ge.useEffect)(()=>{s(a)},[]),[a,s]}var ia=require("react-icons/fa");function et({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:i,children:d,className:c}){let[p,m]=lr(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),l=!s&&!t||p;return(0,ut.jsxs)(dr.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${c||""}`,children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,ut.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,ut.jsx)(ve,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,ut.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,ut.jsxs)("div",{className:"flex items-center gap-3",children:[l&&o&&(0,ut.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,ut.jsx)("button",{"aria-label":p?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>m(!p),style:{lineHeight:0},children:p?(0,ut.jsx)(ia.FaChevronDown,{size:22}):(0,ut.jsx)(ia.FaChevronUp,{size:22})})]})]}),!l&&(0,ut.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,ut.jsxs)("div",{className:"space-y-4",children:[(0,ut.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,ut.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,ut.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,ut.jsx)(y,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),d&&(0,ut.jsx)("div",{className:"hidden lg:block",children:d})]})]})}var cr=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialProjects:o=[],onAddTask:s,onUpdateTask:i,onDeleteTask:d,onTaskClick:c,onAddEpic:p})=>{let[m,l]=(0,ge.useState)(e),[w,b]=(0,ge.useState)(t),[D,I]=(0,ge.useState)(a),[K,x]=(0,ge.useState)(!1),[G,z]=(0,ge.useState)(!1),[_,te]=(0,ge.useState)(null),[h,B]=(0,ge.useState)(null),ee=w.filter(C=>!0).map(C=>C.id),O=D.find(C=>C.isSelected);ee.push("no-epic"),(0,ge.useEffect)(()=>{l(e)},[e]),(0,ge.useEffect)(()=>{b(t)},[t]),(0,ge.useEffect)(()=>{I(a)},[a]);let P=m.filter(C=>{let M=ee.includes(C.epicId)||!C.epicId;return!O||O.id==="all-tasks"?M:O.id==="backlog"?M&&!C.sprintId:M&&C.sprintId===O.id}),U=C=>P.filter(M=>M.status===C),fe=C=>{let M={};return w.forEach(se=>{M[se.id]=C.filter(he=>he.epicId===se.id)}),M["no-epic"]=C.filter(se=>!se.epicId),M},k=C=>{B(C)},Me=C=>{h&&(l(M=>M.map(se=>se.id===h.id?{...se,status:C}:se)),i?.(h.id,{status:C}),B(null))},Ve=C=>{let M={...C,id:Date.now().toString(),createdAt:new Date};l(se=>[...se,M]),s?.(C)},Fe=async(C,M)=>{l(se=>se.map(he=>he.id===C?{...he,...M}:he)),i&&await i(C,M)},v=async C=>{l(M=>M.filter(se=>se.id!==C)),_?.id===C&&te(null),d&&await d(C)},X=C=>{let M={...C,id:Date.now().toString(),isSelected:!0};b(se=>[...se,M]),p?.(C)},le=C=>{te(C),c?.(C)};return(0,ut.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ut.jsx)(et,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-ut from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>x(!0)},secondaryAction:{label:"Add epic",onClick:()=>z(!0)}}),(0,ut.jsx)("div",{className:"flex-1",children:(0,ut.jsxs)("div",{className:"w-full",children:[(0,ut.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{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"}].map(C=>{let M=U(C.status),se=fe(M);return(0,ut.jsx)($o,{title:C.title,status:C.status,taskCount:M.length,onDrop:Me,isCompact:C.status==="done",children:ee.map(he=>{let Be=w.find(Je=>Je.id===he),qe=se[he]||[];return qe.length===0?null:(0,ut.jsxs)("div",{className:"mb-6",children:[(0,ut.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,ut.jsx)("div",{className:`w-3 h-3 rounded-full ${Be?.color}`}),(0,ut.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:Be?.name||"No Epic"}),(0,ut.jsx)(ve,{variant:"secondary",className:"text-xs",children:qe.length})]})," ",(0,ut.jsx)("div",{className:"space-y-3",children:qe.map(Je=>(0,ut.jsx)(Jt,{task:Je,epic:Be,onDragStart:k,onTaskClick:le,isCompact:C.status==="done"},Je.id))})]},he)})},C.id)})}),(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(Zt,{isOpen:K,onClose:()=>x(!1),onAddTask:Ve,epics:w,sprints:D}),(0,ut.jsx)(oa,{isOpen:G,onClose:()=>z(!1),onAddEpic:X}),_&&(0,ut.jsx)(aa,{isOpen:!!_,onClose:()=>te(null),task:_,epics:w,sprints:D,onUpdateTask:Fe,onDeleteTask:v})]})]})})]})};var mr=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddTaskToEpic:i,onAddEpic:d,onUpdateEpic:c,onDeleteEpic:p})=>{let[m,l]=(0,ge.useState)(null),[w,b]=(0,ge.useState)(null),[D,I]=(0,ge.useState)({}),K=P=>{l(P)},x=P=>{P.preventDefault()},G=(P,U)=>{P.preventDefault(),m&&m.epicId!==U&&(o(m.id,{epicId:U}),l(null))},z=P=>e.filter(U=>U.epicId===P),_=P=>{b(P.id),I({name:P.name,description:P.description,confidence:P.confidence,phase:P.phase,progress:P.progress})},te=()=>{w&&D.name&&(c(w,D),b(null),I({}))},h=()=>{b(null),I({})},B=P=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&p(P)},ee=P=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[P]||`Phase ${P}`,O=P=>{switch(P){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,ut.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ut.jsx)(et,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-ut from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:d}}),(0,ut.jsx)("div",{className:"flex-1",children:(0,ut.jsx)("div",{className:"w-full",children:(0,ut.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.map(P=>{let U=z(P.id),fe=U.reduce((k,Me)=>k+Me.points,0);return(0,ut.jsxs)(ie,{className:`flex flex-col ${w===P.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:x,onDrop:k=>G(k,P.id),children:[(0,ut.jsx)("div",{className:"p-4 border-b border-border",children:w===P.id?(0,ut.jsxs)("div",{className:"space-y-4",children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ut.jsx)(F,{value:D.name||"",onChange:k=>I({...D,name:k.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,ut.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:te,className:"p-1 h-8 w-8",children:(0,ut.jsx)(gt.Check,{className:"h-4 w-4"})}),(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:h,className:"p-1 h-8 w-8",children:(0,ut.jsx)(gt.X,{className:"h-4 w-4"})})]})]}),(0,ut.jsx)(Ne,{value:D.description||"",onChange:k=>I({...D,description:k.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,ut.jsxs)(pe,{value:D.confidence||P.confidence,onValueChange:k=>I({...D,confidence:k}),children:[(0,ut.jsx)(ce,{className:"text-xs",children:(0,ut.jsx)(Se,{})}),(0,ut.jsxs)(me,{children:[(0,ut.jsx)(V,{value:"low",children:"Low"}),(0,ut.jsx)(V,{value:"medium",children:"Medium"}),(0,ut.jsx)(V,{value:"high",children:"High"})]})]})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,ut.jsxs)(pe,{value:D.phase?.toString()||P.phase.toString(),onValueChange:k=>I({...D,phase:parseInt(k)}),children:[(0,ut.jsx)(ce,{className:"text-xs",children:(0,ut.jsx)(Se,{})}),(0,ut.jsx)(me,{children:[1,2,3,4,5,6,7,8,9].map(k=>(0,ut.jsxs)(V,{value:k.toString(),children:["Phase ",k]},k))})]})]})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,ut.jsx)(F,{type:"number",min:"0",max:"100",value:D.progress||P.progress,onChange:k=>I({...D,progress:parseInt(k.target.value)||0}),className:"text-xs"})]})]}):(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,ut.jsx)("div",{className:`w-4 h-4 rounded-full ${P.color}`}),(0,ut.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:P.name}),(0,ut.jsxs)("div",{className:"flex gap-1",children:[(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>_(P),className:"p-1 h-8 w-8",children:(0,ut.jsx)(gt.Edit2,{className:"h-3 w-3"})}),(0,ut.jsx)(y,{size:"sm",variant:"ghost",onClick:()=>B(P.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,ut.jsx)(gt.Trash2,{className:"h-3 w-3"})})]})]}),(0,ut.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,ut.jsxs)(ve,{className:`text-xs ${O(P.confidence)}`,children:[P.confidence," confidence"]}),(0,ut.jsxs)(ve,{variant:"outline",className:"text-xs",children:["Phase ",P.phase]}),(0,ut.jsxs)(ve,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[U.length," tasks"]}),(0,ut.jsxs)(ve,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[fe," pts"]})]}),P.description&&(0,ut.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:P.description}),(0,ut.jsxs)("div",{className:"mb-3",children:[(0,ut.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,ut.jsx)("span",{className:"select-none",children:"Progress"}),(0,ut.jsxs)("span",{className:"select-none",children:[P.progress,"%"]})]}),(0,ut.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,ut.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${P.progress}%`}})})]}),(0,ut.jsxs)(y,{onClick:()=>i(P.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,ut.jsx)(gt.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,ut.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,ut.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:U.length===0?(0,ut.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,ut.jsx)(gt.Move,{className:"h-8 w-8 mb-2"}),(0,ut.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):U.map(k=>(0,ut.jsx)(Jt,{task:k,epic:P,onDragStart:K,onTaskClick:s,isCompact:!0},k.id))})})]},P.id)})})})})]})};var pr=require("react-day-picker");function na({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,ut.jsx)(pr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:u("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:u(Wt({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 gt-2",cell:u("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-ut-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-ut-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-ut-md":"[&:has([aria-selected])]:rounded-md"),day:u(Wt({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})}na.displayName="Calendar";var gr=re(require("react")),tt=re(require("@radix-ui/react-popover"));var Ha=tt.Root,ja=tt.Trigger;var la=gr.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,ut.jsx)(tt.Portal,{children:(0,ut.jsx)(tt.Content,{ref:s,align:t,sideOffset:a,className:u("z-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})}));la.displayName=tt.Content.displayName;var Ga=require("date-fns");var vr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,s]=(0,ge.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),i=c=>{c.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},d=()=>{s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,ut.jsx)(Ze,{open:e,onOpenChange:d,children:(0,ut.jsxs)(je,{className:"sm:max-w-md",children:[(0,ut.jsx)(Ue,{children:(0,ut.jsx)(Ge,{children:"Add New Sprint"})}),(0,ut.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"name",children:"Sprint Name *"}),(0,ut.jsx)(F,{id:"name",value:o.name,onChange:c=>s(p=>({...p,name:c.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{htmlFor:"description",children:"Description"}),(0,ut.jsx)(Ne,{id:"description",value:o.description,onChange:c=>s(p=>({...p,description:c.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"Start Date *"}),(0,ut.jsxs)(Ha,{children:[(0,ut.jsx)(ja,{asChild:!0,children:(0,ut.jsxs)(y,{variant:"outline",className:u("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,ut.jsx)(gt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,Ga.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,ut.jsx)(la,{className:"w-auto p-0",align:"start",children:(0,ut.jsx)(na,{mode:"single",selected:o.startDate,onSelect:c=>s(p=>({...p,startDate:c})),initialFocus:!0})})]})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsx)(R,{children:"End Date *"}),(0,ut.jsxs)(Ha,{children:[(0,ut.jsx)(ja,{asChild:!0,children:(0,ut.jsxs)(y,{variant:"outline",className:u("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,ut.jsx)(gt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,Ga.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,ut.jsx)(la,{className:"w-auto p-0",align:"start",children:(0,ut.jsx)(na,{mode:"single",selected:o.endDate,onSelect:c=>s(p=>({...p,endDate:c})),initialFocus:!0,disabled:c=>o.startDate?c<o.startDate:!1})})]})]})]}),(0,ut.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ut.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:c=>s(p=>({...p,isActive:c.target.checked})),className:"rounded border-gray-300"}),(0,ut.jsx)(R,{htmlFor:"isActive",children:"Set as active sprint"})]}),(0,ut.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,ut.jsx)(y,{type:"button",variant:"outline",onClick:d,children:"Cancel"}),(0,ut.jsx)(y,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var br=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddSprint:i})=>{let[d,c]=(0,ge.useState)(["2"]),[p,m]=(0,ge.useState)(null),[l,w]=(0,ge.useState)(!1),[b,D]=(0,ge.useState)(null),[I,K]=(0,ge.useState)(e.filter(v=>!v.sprintId)),[x,G]=(0,ge.useState)(e.filter(v=>v.sprintId&&d.includes(v.sprintId))),[z,_]=(0,ge.useState)(a.filter(v=>v.id!=="backlog"&&v.id!=="all-tasks").sort((v,X)=>v.startDate.getTime()-X.startDate.getTime()));(0,ge.useEffect)(()=>{K(e.filter(v=>!v.sprintId)),G(e.filter(v=>v.sprintId&&d.includes(v.sprintId))),_(a.filter(v=>v.id!=="backlog"&&v.id!=="all-tasks").sort((v,X)=>v.startDate.getTime()-X.startDate.getTime()))},[e,a,d]);let te=v=>t.find(X=>X.id===v),h=v=>a.find(X=>X.id===v),B=v=>{switch(v){case"high":return"bg-destructive/20 text-destructive";case"medium":return"bg-warning/20 text-warning";case"low":return"bg-success/20 text-success";default:return"bg-muted text-muted-foreground"}},ee=v=>v.split(" ").map(X=>X[0]).join("").toUpperCase(),O=v=>{m(v)},P=v=>{v.preventDefault()},U=v=>{D(v)},fe=()=>{D(null)},k=(v,X)=>{v.preventDefault(),D(null),p&&(o(p.id,{sprintId:X==="backlog"?void 0:X}),m(null))},Me=v=>{v==="backlog"||v==="all-tasks"||c(X=>X.includes(v)?X.filter(le=>le!==v):[...X,v])},Ve=v=>{i(v),w(!1)},Fe=({task:v,showSprint:X=!1})=>{let le=te(v.epicId),Ie=v.sprintId?h(v.sprintId):null,[C,M]=(0,ge.useState)(!1),se=qe=>{qe.defaultPrevented||C||s(v)},he=qe=>{M(!0),O(v)},Be=()=>{M(!1)};return(0,ut.jsx)(ie,{className:`p-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${C?"opacity-50 shadow-lg scale-105":""} ${p?.id===v.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:he,onDragEnd:Be,onClick:se,children:(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ut.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:v.title}),(0,ut.jsx)(ve,{className:`text-xs select-none pointer-events-none ${B(v.priority)}`,children:v.priority[0].toUpperCase()})]}),(0,ut.jsxs)("div",{className:"flex items-center justify-between text-xs pointer-events-none",children:[(0,ut.jsxs)("div",{className:"flex items-center gap-1",children:[le&&(0,ut.jsx)("div",{className:`w-2 h-2 rounded-full ${le.color}`}),(0,ut.jsx)("span",{className:"text-muted-foreground truncate select-none",children:le?.name})]}),(0,ut.jsx)("span",{className:"text-muted-foreground select-none",children:ee(v.assignee)})]}),X&&Ie&&(0,ut.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[(0,ut.jsx)(gt.Calendar,{className:"h-3 w-3"}),(0,ut.jsx)("span",{className:"select-none",children:Ie.name})]})]})})};return(0,ut.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ut.jsx)(et,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-ut from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>w(!0)}}),(0,ut.jsx)("div",{className:"flex-1",children:(0,ut.jsxs)("div",{className:"w-full",children:[(0,ut.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,ut.jsx)("div",{className:"lg:col-span-1",children:(0,ut.jsxs)(ie,{className:"p-4 h-full bg-card shadow-sm",onDragOver:P,onDragEnter:()=>U("backlog"),onDragLeave:fe,onDrop:v=>k(v,"backlog"),children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,ut.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,ut.jsx)(ve,{variant:"secondary",className:"bg-muted text-muted-foreground",children:I.length})]}),(0,ut.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${b==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[I.map(v=>(0,ut.jsx)(Fe,{task:v},v.id)),I.length===0&&(0,ut.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"})]})]})}),(0,ut.jsx)("div",{className:"lg:col-span-3",children:(0,ut.jsxs)("div",{className:"space-y-4",children:[(0,ut.jsxs)(ie,{className:"p-4 bg-card shadow-sm",children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ut.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),(0,ut.jsxs)(y,{onClick:()=>w(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,ut.jsx)(gt.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,ut.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:z.map(v=>(0,ut.jsxs)(y,{variant:d.includes(v.id)?"default":"outline",size:"sm",onClick:()=>Me(v.id),className:"text-xs h-8",children:[v.name,v.isActive&&(0,ut.jsx)("span",{className:"ml-1 text-success",children:"\u25CF"})]},v.id))})]}),(0,ut.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(v=>z.find(X=>X.id===v)).filter(Boolean).sort((v,X)=>v.startDate.getTime()-X.startDate.getTime()).map(v=>{let X=x.filter(le=>le.sprintId===v.id);return(0,ut.jsxs)(ie,{className:"p-4 bg-card shadow-sm",onDragOver:P,onDragEnter:()=>U(v.id),onDragLeave:fe,onDrop:le=>k(le,v.id),children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)("h3",{className:"font-semibold text-foreground select-none",children:v.name}),v.isActive&&(0,ut.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,ut.jsx)(ve,{variant:"secondary",className:"bg-muted text-muted-foreground",children:X.length})]}),(0,ut.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${b===v.id?"border-primary bg-primary/10":"border-border"}`,children:[X.map(le=>(0,ut.jsx)(Fe,{task:le},le.id)),X.length===0&&(0,ut.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},v.id)})})," "]})})]}),(0,ut.jsx)(vr,{isOpen:l,onClose:()=>w(!1),onAddSprint:Ve})]})})]})};var Ls=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},Fs=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),Bs=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},_a=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[s,i]=t.split(":");o.setHours(parseInt(s),parseInt(i))}return o<a},$a=e=>{let t=new Date;return e.toDateString()===t.toDateString()},zs=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Os=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[s,i]=(0,ge.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),d=p=>{p.preventDefault();let m=e.find(w=>w?.id===s.colleagueId);if(!m){console.error("No valid colleague selected");return}let l={title:s.title,description:s.description,dueDate:new Date(s.dueDate),dueTime:s.dueTime||void 0,colleague:m,isCompleted:!1,isRecurring:s.isRecurring,recurrencePattern:s.isRecurring?s.recurrencePattern:void 0,recurrenceInterval:s.isRecurring?s.recurrenceInterval:void 0,priority:s.priority,reminderEnabled:s.reminderEnabled,reminderMinutes:s.reminderEnabled?s.reminderMinutes:void 0,tags:s.tags?s.tags.split(",").map(w=>w.trim()):void 0};t(l),o(!1),i({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})},c=e.filter(Boolean);return(0,ut.jsx)(Ze,{open:a,onOpenChange:o,children:(0,ut.jsxs)(je,{className:"max-w-2xl",children:[(0,ut.jsx)(Ue,{children:(0,ut.jsx)(Ge,{children:"Add New Reminder"})}),(0,ut.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,ut.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"title",children:"Title"}),(0,ut.jsx)(F,{id:"title",value:s.title,onChange:p=>i({...s,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"description",children:"Description"}),(0,ut.jsx)(Ne,{id:"description",value:s.description,onChange:p=>i({...s,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"dueDate",children:"Due Date"}),(0,ut.jsx)(F,{id:"dueDate",type:"date",value:s.dueDate,onChange:p=>i({...s,dueDate:p.target.value}),required:!0})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,ut.jsx)(F,{id:"dueTime",type:"time",value:s.dueTime,onChange:p=>i({...s,dueTime:p.target.value})})]})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"colleague",children:"Assigned Colleague"}),(0,ut.jsxs)(pe,{value:s.colleagueId,onValueChange:p=>i({...s,colleagueId:p}),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{placeholder:"Select a digital colleague"})}),(0,ut.jsx)(me,{children:c.map(p=>(0,ut.jsx)(V,{value:p.id,children:p.name},p.id))})]})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ut.jsx)("input",{type:"checkbox",id:"isRecurring",checked:s.isRecurring,onChange:p=>i({...s,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,ut.jsx)(R,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),s.isRecurring&&(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,ut.jsxs)(pe,{value:s.recurrencePattern,onValueChange:p=>i({...s,recurrencePattern:p}),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{})}),(0,ut.jsxs)(me,{children:[(0,ut.jsx)(V,{value:"daily",children:"Daily"}),(0,ut.jsx)(V,{value:"weekly",children:"Weekly"}),(0,ut.jsx)(V,{value:"monthly",children:"Monthly"}),(0,ut.jsx)(V,{value:"yearly",children:"Yearly"})]})]})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"recurrenceInterval",children:"Every"}),(0,ut.jsx)(F,{id:"recurrenceInterval",type:"number",min:"1",value:s.recurrenceInterval,onChange:p=>i({...s,recurrenceInterval:parseInt(p.target.value)})})]})]})]}),(0,ut.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,ut.jsx)(y,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,ut.jsx)(y,{type:"submit",children:"Add Reminder"})]})]})]})})},Vs=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:s})=>{let[i,d]=(0,ge.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(", ")||""}),c=m=>{m.preventDefault();let l=t.find(w=>w?.id===i.colleagueId);if(!l){console.error("No valid colleague selected");return}a(e.id,{title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:l,priority:i.priority,isRecurring:i.isRecurring,recurrencePattern:i.isRecurring?i.recurrencePattern:void 0,recurrenceInterval:i.isRecurring?i.recurrenceInterval:void 0,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderEnabled?i.reminderMinutes:void 0,tags:i.tags?i.tags.split(",").map(w=>w.trim()):void 0}),s()},p=t.filter(Boolean);return(0,ut.jsx)(Ze,{open:o,onOpenChange:s,children:(0,ut.jsxs)(je,{className:"max-w-2xl",children:[(0,ut.jsx)(Ue,{children:(0,ut.jsx)(Ge,{children:"Edit Reminder"})}),(0,ut.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"edit-title",children:"Title"}),(0,ut.jsx)(F,{id:"edit-title",value:i.title,onChange:m=>d({...i,title:m.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"edit-priority",children:"Priority"}),(0,ut.jsxs)(pe,{value:i.priority,onValueChange:m=>d({...i,priority:m}),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{})}),(0,ut.jsxs)(me,{children:[(0,ut.jsx)(V,{value:"low",children:"\u{1F7E2} Low"}),(0,ut.jsx)(V,{value:"medium",children:"\u{1F7E1} Medium"}),(0,ut.jsx)(V,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"edit-description",children:"Description"}),(0,ut.jsx)(Ne,{id:"edit-description",value:i.description,onChange:m=>d({...i,description:m.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,ut.jsx)(F,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:m=>d({...i,dueDate:m.target.value}),required:!0})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,ut.jsx)(F,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:m=>d({...i,dueTime:m.target.value})})]})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,ut.jsxs)(pe,{value:i.colleagueId,onValueChange:m=>d({...i,colleagueId:m}),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{placeholder:"Select a digital colleague"})}),(0,ut.jsx)(me,{children:p.map(m=>(0,ut.jsx)(V,{value:m.id,children:m.name},m.id))})]})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ut.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring,onChange:m=>d({...i,isRecurring:m.target.checked}),className:"rounded border-border"}),(0,ut.jsx)(R,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,ut.jsxs)(pe,{value:i.recurrencePattern,onValueChange:m=>d({...i,recurrencePattern:m}),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{})}),(0,ut.jsxs)(me,{children:[(0,ut.jsx)(V,{value:"daily",children:"Daily"}),(0,ut.jsx)(V,{value:"weekly",children:"Weekly"}),(0,ut.jsx)(V,{value:"monthly",children:"Monthly"}),(0,ut.jsx)(V,{value:"yearly",children:"Yearly"})]})]})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,ut.jsx)(F,{id:"edit-recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:m=>d({...i,recurrenceInterval:parseInt(m.target.value)})})]})]})]}),(0,ut.jsxs)("div",{className:"space-y-2",children:[(0,ut.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ut.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:i.reminderEnabled,onChange:m=>d({...i,reminderEnabled:m.target.checked}),className:"rounded border-border"}),(0,ut.jsx)(R,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),i.reminderEnabled&&(0,ut.jsxs)("div",{className:"pl-6",children:[(0,ut.jsx)(R,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,ut.jsxs)(pe,{value:i.reminderMinutes.toString(),onValueChange:m=>d({...i,reminderMinutes:parseInt(m)}),children:[(0,ut.jsx)(ce,{children:(0,ut.jsx)(Se,{})}),(0,ut.jsxs)(me,{children:[(0,ut.jsx)(V,{value:"5",children:"5 minutes before"}),(0,ut.jsx)(V,{value:"15",children:"15 minutes before"}),(0,ut.jsx)(V,{value:"30",children:"30 minutes before"}),(0,ut.jsx)(V,{value:"60",children:"1 hour before"}),(0,ut.jsx)(V,{value:"1440",children:"1 day before"})]})]})]})]}),(0,ut.jsxs)("div",{children:[(0,ut.jsx)(R,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,ut.jsx)(F,{id:"edit-tags",value:i.tags,onChange:m=>d({...i,tags:m.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,ut.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,ut.jsx)(y,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,ut.jsx)(y,{type:"submit",children:"Save Changes"})]})]})]})})},Hs=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[s,i]=(0,ge.useState)(!1);if(!e||!e.id)return null;let d=_a(e.dueDate,e.dueTime),c=$a(e.dueDate),p=zs(e.dueDate),m=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},l=()=>c?"Today":p?"Tomorrow":d&&!e.isCompleted?"Overdue":Fs(e.dueDate);return(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(Vs,{reminder:e,colleagues:t,onUpdateReminder:a,open:s,onClose:()=>i(!1)}),(0,ut.jsx)(ie,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${d&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,ut.jsx)(Tt,{className:"p-4",children:(0,ut.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ut.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,ut.jsx)("button",{onClick:m,className:"gt-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,ut.jsx)(gt.CheckCircle,{className:"h-5 w-5"}):(0,ut.jsx)(gt.Circle,{className:"h-5 w-5"})}),(0,ut.jsxs)("div",{className:"flex-1",children:[(0,ut.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,ut.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,ut.jsx)("span",{className:"text-sm",children:Ls(e.priority)}),e.isRecurring&&(0,ut.jsx)(gt.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,ut.jsx)(gt.Bell,{className:"h-4 w-4 text-success"})]}),(0,ut.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,ut.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,ut.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ut.jsx)(gt.Calendar,{className:"h-4 w-4"}),(0,ut.jsx)("span",{className:d&&!e.isCompleted?"text-destructive font-medium":"",children:l()})]}),e.dueTime&&(0,ut.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ut.jsx)(gt.Clock,{className:"h-4 w-4"}),(0,ut.jsx)("span",{children:Bs(e.dueTime)})]}),(0,ut.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ut.jsx)(gt.User,{className:"h-4 w-4"}),(0,ut.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,ut.jsx)("div",{className:"flex flex-wrap gap-1 gt-2",children:e.tags.map((w,b)=>(0,ut.jsx)(ve,{variant:"secondary",className:"text-xs",children:w},b))})]})]}),(0,ut.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ut.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 w-8 p-0",children:(0,ut.jsx)(gt.Edit2,{className:"h-4 w-4"})}),(0,ut.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,ut.jsx)(gt.Trash2,{className:"h-4 w-4"})})]})]})})})]})},hr=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:s})=>{let[i,d]=(0,ge.useState)(e.filter(Boolean)),[c]=(0,ge.useState)(t.filter(Boolean)),[p,m]=(0,ge.useState)("all"),[l,w]=(0,ge.useState)(""),[b,D]=(0,ge.useState)(!1),I=h=>{if(!h.title||!h.colleague?.id){console.error("Invalid reminder data:",h);return}let B={...h,id:Date.now().toString(),createdAt:new Date};d(ee=>[...ee,B]),a?.(h)},K=(h,B)=>{if(!h){console.error("No reminder ID provided for update");return}d(ee=>ee.map(O=>O?.id===h?{...O,...B}:O)),o?.(h,B)},x=h=>{if(!h){console.error("No reminder ID provided for deletion");return}d(B=>B.filter(ee=>ee?.id!==h)),s?.(h)},z=i.filter(h=>{if(!h)return!1;if(l){let B=l.toLowerCase();if(!(h.title.toLowerCase().includes(B)||h.description.toLowerCase().includes(B)||h.colleague?.name?.toLowerCase().includes(B)||h.tags?.some(O=>O.toLowerCase().includes(B))))return!1}switch(p){case"pending":return!h.isCompleted;case"completed":return h.isCompleted;case"overdue":return!h.isCompleted&&_a(h.dueDate,h.dueTime);case"today":return $a(new Date(h.dueDate));default:return!0}}).sort((h,B)=>{if(!h||!B)return 0;if(h.isCompleted&&!B.isCompleted)return 1;if(!h.isCompleted&&B.isCompleted)return-1;let ee={high:3,medium:2,low:1},O=ee[B.priority]-ee[h.priority];return O!==0?O:h.dueDate.getTime()-B.dueDate.getTime()}),_={total:i.filter(Boolean).length,pending:i.filter(h=>h&&!h.isCompleted).length,completed:i.filter(h=>h&&h.isCompleted).length,overdue:i.filter(h=>h&&!h.isCompleted&&_a(h.dueDate,h.dueTime)).length,today:i.filter(h=>h&&$a(new Date(h.dueDate))).length},te=c.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,ut.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ut.jsx)(et,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-ut from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{D(!0)}}}),(0,ut.jsxs)("div",{className:"h-full bg-background",children:[(0,ut.jsx)(Os,{colleagues:c,onAddReminder:I,open:b,setOpen:D}),(0,ut.jsxs)("div",{className:"p-6",children:[(0,ut.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,ut.jsxs)("div",{children:[(0,ut.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,ut.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,ut.jsxs)(y,{className:"flex items-center space-x-2",onClick:()=>D(!0),children:[(0,ut.jsx)(gt.Plus,{className:"h-4 w-4"}),(0,ut.jsx)("span",{children:"Add Reminder"})]})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,ut.jsxs)(ie,{className:"p-4",children:[(0,ut.jsx)("div",{className:"text-2xl font-bold text-foreground",children:_.total}),(0,ut.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,ut.jsxs)(ie,{className:"p-4",children:[(0,ut.jsx)("div",{className:"text-2xl font-bold text-primary",children:_.pending}),(0,ut.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,ut.jsxs)(ie,{className:"p-4",children:[(0,ut.jsx)("div",{className:"text-2xl font-bold text-success",children:_.completed}),(0,ut.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,ut.jsxs)(ie,{className:"p-4",children:[(0,ut.jsx)("div",{className:"text-2xl font-bold text-destructive",children:_.overdue}),(0,ut.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,ut.jsxs)(ie,{className:"p-4",children:[(0,ut.jsx)("div",{className:"text-2xl font-bold text-warning",children:_.today}),(0,ut.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,ut.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,ut.jsx)("div",{className:"flex-1",children:(0,ut.jsx)(F,{placeholder:"Search reminders...",value:l,onChange:h=>w(h.target.value),className:"max-w-md"})}),(0,ut.jsxs)(pe,{value:p,onValueChange:h=>m(h),children:[(0,ut.jsx)(ce,{className:"w-40",children:(0,ut.jsx)(Se,{})}),(0,ut.jsxs)(me,{children:[(0,ut.jsxs)(V,{value:"all",children:["All (",_.total,")"]}),(0,ut.jsxs)(V,{value:"pending",children:["Pending (",_.pending,")"]}),(0,ut.jsxs)(V,{value:"completed",children:["Completed (",_.completed,")"]}),(0,ut.jsxs)(V,{value:"overdue",children:["Overdue (",_.overdue,")"]}),(0,ut.jsxs)(V,{value:"today",children:["Today (",_.today,")"]})]})]})]}),(0,ut.jsx)("div",{className:"space-y-4",children:z.length===0?(0,ut.jsxs)(ie,{className:"p-8 text-center",children:[(0,ut.jsx)("div",{className:"text-muted-foreground",children:l||p!=="all"?"No reminders match your filters":"No reminders yet"}),!l&&p==="all"&&(0,ut.jsx)("p",{className:"text-sm text-muted-foreground/60 gt-2",children:"Create your first reminder to get started"})]}):z.map(h=>h&&(0,ut.jsx)(Hs,{reminder:h,colleagues:c,onUpdateReminder:K,onDeleteReminder:x},h.id))})]})]})]})};var xt=re(require("@radix-ui/react-tabs"));function xr({className:e,...t}){return(0,ut.jsx)(xt.Root,{"data-slot":"tabs",className:u("flex flex-col gap-2",e),...t})}function yr({className:e,...t}){return(0,ut.jsx)(xt.List,{"data-slot":"tabs-list",className:u("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function wr({className:e,...t}){return(0,ut.jsx)(xt.Trigger,{"data-slot":"tabs-trigger",className:u("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var st=re(require("react")),Q=re(require("@radix-ui/react-dropdown-menu"));var Nr=Q.Root,Sr=Q.Trigger;var js=st.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,ut.jsxs)(Q.SubTrigger,{ref:s,className:u("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,ut.jsx)(Ro.ChevronRightIcon,{className:"ml-auto"})]}));js.displayName=Q.SubTrigger.displayName;var Us=st.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Q.SubContent,{ref:a,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...t}));Us.displayName=Q.SubContent.displayName;var Wa=st.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ut.jsx)(Q.Portal,{children:(0,ut.jsx)(Q.Content,{ref:o,sideOffset:t,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",e),...a})}));Wa.displayName=Q.Content.displayName;var Ka=st.forwardRef(({className:e,inset:t,...a},o)=>(0,ut.jsx)(Q.Item,{ref:o,className:u("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Ka.displayName=Q.Item.displayName;var Gs=st.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,ut.jsxs)(Q.CheckboxItem,{ref:s,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,ut.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ut.jsx)(Q.ItemIndicator,{children:(0,ut.jsx)(Ro.CheckIcon,{className:"h-4 w-4"})})}),t]}));Gs.displayName=Q.CheckboxItem.displayName;var _s=st.forwardRef(({className:e,children:t,...a},o)=>(0,ut.jsxs)(Q.RadioItem,{ref:o,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,ut.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ut.jsx)(Q.ItemIndicator,{children:(0,ut.jsx)(Ro.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));_s.displayName=Q.RadioItem.displayName;var $s=st.forwardRef(({className:e,inset:t,...a},o)=>(0,ut.jsx)(Q.Label,{ref:o,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));$s.displayName=Q.Label.displayName;var Ws=st.forwardRef(({className:e,...t},a)=>(0,ut.jsx)(Q.Separator,{ref:a,className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Ws.displayName=Q.Separator.displayName;var Ks=({className:e,...t})=>(0,ut.jsx)("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});Ks.displayName="DropdownMenuShortcut";function Dr({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:i=6}){let d=a.find(c=>c.value===e);return(0,ut.jsxs)(dr.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,ut.jsx)("div",{className:"hidden md:block",children:(0,ut.jsx)(xr,{value:e,onValueChange:t,children:(0,ut.jsx)(yr,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(c=>(0,ut.jsx)(dr.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,ut.jsx)(wr,{value:c.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:c.label})},c.value))})})}),(0,ut.jsx)("div",{className:"md:hidden",children:(0,ut.jsxs)(Nr,{children:[(0,ut.jsx)(Sr,{asChild:!0,children:(0,ut.jsxs)(y,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[d?.label||"Select",(0,ut.jsx)(gt.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,ut.jsx)(Wa,{align:"center",className:"w-[180px]",children:a.map(c=>(0,ut.jsx)(Ka,{onClick:()=>t?.(c.value),className:`cursor-pointer ${e===c.value?"bg-accent":""}`,children:c.label},c.value))})]})})]})}function ma({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:i}){return(0,ut.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[s&&(0,ut.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,ut.jsx)("div",{className:"col-span-6",children:"Name"}),(0,ut.jsx)("div",{className:"col-span-2",children:"Size"}),(0,ut.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,ut.jsx)("div",{className:"divide-y",children:e.map(d=>(0,ut.jsxs)(dr.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(d),children:[(0,ut.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,ut.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,ut.jsx)("div",{children:(0,ut.jsx)("p",{className:"font-medium",children:d.name})})]}),(0,ut.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:d.filesize}),(0,ut.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,ut.jsx)("span",{className:"text-sm md:text-base",children:typeof d.createdAt=="string"?d.createdAt:d.createdAt.toLocaleDateString()}),(0,ut.jsx)("div",{className:"flex gap-1",children:(0,ut.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:c=>{c.stopPropagation(),o?.(d)},children:(0,ut.jsx)(gt.Trash2,{className:"h-4 w-4"})})})]})]},d.name))})]})}function Ja({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:s,compactView:i=!1,className:d}){let[c,p]=(0,ge.useState)(e),[m,l]=(0,ge.useState)(""),[w,b]=(0,ge.useState)("all"),[D,I]=(0,ge.useState)("all");(0,ge.useEffect)(()=>{p(e)},[e]);let K=Array.from(new Set(c.map(O=>O.mimeType))),x=c.filter(O=>{let P=O.name.toLowerCase().includes(m.toLowerCase()),U=w==="all"||O.mimeType===w;return P&&U}),G=x.slice(0,10),z=x.filter(Boolean),_=()=>{t?.()},te=O=>{a?.(O)},h=O=>{console.log("deleting file",O),p(P=>P.filter(U=>U.name!==O.name)),o?.(O.id)},B=O=>{s?.(O)},ee=()=>{l(""),b("all")};return(0,ut.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,ut.jsx)(dr.AnimatePresence,{mode:"wait",children:(0,ut.jsx)(dr.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,ut.jsxs)("div",{className:`space-y-6 ${d||""}`,children:[(0,ut.jsx)(et,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-ut from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:_},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,ut.jsx)(ie,{children:(0,ut.jsx)(Tt,{className:"pt-6",children:(0,ut.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,ut.jsx)("div",{className:"flex-1",children:(0,ut.jsxs)("div",{className:"relative",children:[(0,ut.jsx)(gt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ut.jsx)(F,{placeholder:"Search files...",value:m,onChange:O=>l(O.target.value),className:"pl-9"})]})}),(m||w!=="all")&&(0,ut.jsxs)(y,{variant:"outline",onClick:ee,className:"gap-2",children:[(0,ut.jsx)(gt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,ut.jsxs)("div",{className:"space-y-4",children:[(0,ut.jsx)(Dr,{activeTab:D,onTabChange:I,tabOptions:[{value:"all",label:`All Files (${x.length})`},{value:"recent",label:`Recent (${G.length})`}],maxWidth:"500px",gridCols:3}),D==="all"&&(0,ut.jsx)(ma,{files:x,onFileClick:B,onFileEdit:te,onFileDelete:h,showHeader:!i}),D==="recent"&&(0,ut.jsx)(ma,{files:G,onFileClick:B,onFileEdit:te,onFileDelete:h,showHeader:!i}),D==="shared"&&(0,ut.jsx)(ma,{files:z,onFileClick:B,onFileEdit:te,onFileDelete:h,showHeader:!i})]}),x.length===0&&(0,ut.jsx)(ie,{children:(0,ut.jsx)(Tt,{className:"pt-6",children:(0,ut.jsxs)("div",{className:"text-center py-8",children:[(0,ut.jsx)(gt.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,ut.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,ut.jsx)("p",{className:"text-muted-foreground mb-4",children:m||w!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,ut.jsxs)(y,{onClick:_,className:"gap-2",children:[(0,ut.jsx)(gt.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var kr=require("next/navigation");function Rr({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:s=[],initialReminders:i=[],initialColleagues:d=[],initialFiles:c=[],initialView:p="kanban",onAddTask:m,onUpdateTask:l,onDeleteTask:w,onTaskClick:b,onAddEpic:D,onUpdateEpic:I,onDeleteEpic:K,onAddTaskToEpic:x,onAddSprint:G,onUpdateSprint:z,onDeleteSprint:_,onAddProject:te,onUpdateProject:h,onDeleteProject:B,onFileAdd:ee,onFileEdit:O,onFileDelete:P,onFileClick:U,onAddReminder:fe,onUpdateReminder:k,onDeleteReminder:Me,onViewChange:Ve,onToggleMobileMenu:Fe,onTeamClick:v,onTeamChange:X,onCopilotClick:le}){let[Ie,C]=(0,ge.useState)(t),[M,se]=(0,ge.useState)(a),[he,Be]=(0,ge.useState)(o),[qe,Je]=(0,ge.useState)(s),[ua,wt]=(0,ge.useState)(i),[ga,fa]=(0,ge.useState)(d),[va,Vt]=(0,ge.useState)(c),[ba,Ht]=(0,ge.useState)(!1),[ha,jt]=(0,ge.useState)(!1),[Nt,St]=(0,ge.useState)(null),[Ut,It]=(0,ge.useState)(null),[g,N]=(0,ge.useState)(null),[q,Xa]=(0,ge.useState)(p||"kanban"),[Er,Ir]=(0,ge.useState)(!1),Za=(0,kr.useRouter)();(0,ge.useEffect)(()=>{C(t)},[t]),(0,ge.useEffect)(()=>{Be(o)},[o]),(0,ge.useEffect)(()=>{se(a)},[a]),(0,ge.useEffect)(()=>{Je(s)},[s]),(0,ge.useEffect)(()=>{Vt(c)},[c]),(0,ge.useEffect)(()=>{fa(d)},[d]),(0,ge.useEffect)(()=>{wt(i)},[i]),(0,ge.useEffect)(()=>{Xa(p)},[p]);let Mr=M.filter(f=>f.isSelected).map(f=>f.id),Gt=he.find(f=>f.isSelected),Ar=Ie.filter(f=>{let T=Mr.includes(f.epicId);return!Gt||Gt.id==="all-tasks"?T:Gt.id==="backlog"?T&&!f.sprintId:T&&f.sprintId===Gt.id}),Js=f=>Ar.filter(T=>T.status===f),Xs=f=>{let T={};return M.forEach(j=>{T[j.id]=f.filter(ne=>ne.epicId===j.id)}),T},Zs=f=>{N(f)},Ys=f=>{g&&(C(T=>T.map(j=>j.id===g.id?{...j,status:f}:j)),N(null))},Ya=f=>{let T={...f,id:Date.now().toString(),createdAt:new Date};C(j=>[...j,T]),m?.(T)},_t=(f,T)=>{C(j=>j.map(ne=>ne.id===f?{...ne,...T}:ne)),l?.(f,T)},Lr=async(f,T)=>{_t(f,T)},Qa=f=>{C(T=>T.filter(j=>j.id!==f)),Nt?.id===f&&St(null),w?.(f)},Fr=async f=>{Qa(f)},Br=f=>{let T={...f,id:Date.now().toString(),isSelected:!1};Je(j=>[...j,T]),te?.(f)},zr=(f,T)=>{Je(j=>j.map(ne=>ne.id===f?T.isSelected?(Za.push(`/project/${f}`),{...ne,...T}):{...ne,...T}:T.isSelected&&f!==ne.id?{...ne,isSelected:!1}:ne)),h?.(f,T)},Or=f=>{Je(T=>T.filter(j=>j.id!==f)),B?.(f)},eo=f=>{let T={...f,id:Date.now().toString(),isSelected:!0};se(j=>[...j,T]),D?.({...T})},to=()=>{jt(!0)},ao=(f,T)=>{se(j=>j.map(ne=>ne.id===f?{...ne,...T}:ne)),I?.(f,T)},oo=f=>{se(T=>T.filter(j=>j.id!==f)),C(T=>T.filter(j=>j.epicId!==f)),K?.(f)},ro=f=>{let T={...f,id:Date.now().toString(),isSelected:!1};Be(j=>[...j,T]),G?.(f)},Vr=(f,T)=>{Be(j=>j.map(ne=>ne.id===f?T.isSelected?{...ne,...T}:{...ne,...T}:T.isSelected&&f!==ne.id?{...ne,isSelected:!1}:ne)),z?.(f,T)},Hr=f=>{f==="backlog"||f==="all-tasks"||(Be(T=>T.filter(j=>j.id!==f)),C(T=>T.map(j=>j.sprintId===f?{...j,sprintId:void 0}:j)),_?.(f))},xa=f=>{St(f)},jr=f=>{f==="planning"&&window.innerWidth<768||(Xa(f),Ve?.(f))},Ur=()=>{Ir(f=>!f),Fe?.()},Qs=()=>{Za.push("/")},en=f=>{console.log("Switching to team:",f)},tn=f=>{console.log("Switching to team:",f)},Gr=f=>{It(f),Ht(!0)},_r=()=>{Ht(!1),It(null)},$ut=f=>{let T={...f,id:Date.now().toString(),createdAt:new Date};wt(j=>[...j,T]),fe?.(f)},Wr=(f,T)=>{wt(j=>j.map(ne=>ne.id===f?{...ne,...T}:ne)),k?.(f,T)},Kr=f=>{wt(T=>T.filter(j=>j.id!==f)),Me?.(f)},qr=()=>{ee?.()},Jr=f=>{O?.(f)},Xr=f=>{Vt(T=>T.filter(j=>j.name!==f)),P?.(f)},Zr=f=>{U?.(f)},an=[{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"}],on=()=>{switch(q){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},ya=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],rn=ya.sort((f,T)=>T.lastUsed.getTime()-f.lastUsed.getTime()).slice(0,3),sn=ya.length>3,nn=ya.slice(3);return(0,ut.jsxs)(Uo,{projects:qe,epics:M,sprints:he,currentView:q,onUpdateProject:zr,onDeleteProject:Or,onAddProject:Br,onUpdateEpic:ao,onDeleteEpic:oo,onAddEpic:to,onAddSprint:ro,onUpdateSprint:Vr,onDeleteSprint:Hr,onViewChange:jr,mobileMenuOpen:Er,onToggleMobileMenu:Ur,children:[q==="kanban"&&(0,ut.jsx)("div",{className:"h-full",children:(0,ut.jsx)(cr,{initialProjects:qe,initialEpics:M,initialSprints:he,initialTasks:Ie,onAddTask:Ya,onUpdateTask:_t,onDeleteTask:Qa,onTaskClick:xa,onAddEpic:eo})}),q==="planning"&&(0,ut.jsx)("div",{className:"hidden md:block h-full",children:(0,ut.jsx)(br,{tasks:Ie,epics:M,sprints:he,onUpdateTask:_t,onTaskClick:xa,onAddSprint:ro})}),q==="tasks"&&(0,ut.jsx)("div",{className:"h-full",children:(0,ut.jsx)(hr,{initialReminders:ua,initialColleagues:ga,onAddReminder:$ut,onUpdateReminder:Wr,onDeleteReminder:Kr})}),q==="files"&&(0,ut.jsx)("div",{className:"h-full",children:(0,ut.jsx)(Ja,{initialFiles:va,onFileAdd:qr,onFileEdit:Jr,onFileDelete:Xr,onFileClick:Zr,compactView:!1})}),q==="epics"&&(0,ut.jsx)("div",{className:"h-full",children:(0,ut.jsx)(mr,{tasks:Ie,epics:M,sprints:he,onUpdateTask:_t,onTaskClick:xa,onAddTaskToEpic:Gr,onAddEpic:to,onUpdateEpic:ao,onDeleteEpic:oo})}),(0,ut.jsx)(Zt,{isOpen:ba,onClose:_r,onAddTask:Ya,epics:M,sprints:he,defaultEpicId:Ut||void 0}),(0,ut.jsx)(oa,{isOpen:ha,onClose:()=>jt(!1),onAddEpic:eo}),Nt&&(0,ut.jsx)(aa,{isOpen:!!Nt,onClose:()=>St(null),task:Nt,onUpdateTask:Lr,onDeleteTask:Fr,epics:M,sprints:he})]})}
|
|
5
|
+
"use strict";"use client";var Qr=Object.create;var Jt=Object.defineProperty;var ei=Object.getOwnPropertyDescriptor;var ti=Object.getOwnPropertyNames;var ai=Object.getPrototypeOf,oi=Object.prototype.hasOwnProperty;var ri=(e,t)=>{for(var a in t)Jt(e,a,{get:t[a],enumerable:!0})},no=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ti(t))!oi.call(e,i)&&i!==a&&Jt(e,i,{get:()=>t[i],enumerable:!(o=ei(t,i))||o.enumerable});return e};var ie=(e,t,a)=>(a=e!=null?Qr(ai(e)):{},no(t||!e||!e.__esModule?Jt(a,"default",{value:e,enumerable:!0}):a,e)),ii=e=>no(Jt({},"__esModule",{value:!0}),e);var Js={};ri(Js,{default:()=>Mr});module.exports=ii(Js);var ce=require("react");var xt=ie(require("react"));var bo=require("clsx");var Sa="-",si=e=>{let t=li(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:d=>{let l=d.split(Sa);return l[0]===""&&l.length!==1&&l.shift(),mo(l,t)||ni(d)},getConflictingClassGroupIds:(d,l)=>{let g=a[d]||[];return l&&o[d]?[...g,...o[d]]:g}}},mo=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),i=o?mo(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let s=e.join(Sa);return t.validators.find(({validator:d})=>d(s))?.classGroupId},lo=/^\[(.+)\]$/,ni=e=>{if(lo.test(e)){let t=lo.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},li=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return ci(Object.entries(e.classGroups),a).forEach(([s,d])=>{Na(d,o,s,t)}),o},Na=(e,t,a,o)=>{e.forEach(i=>{if(typeof i=="string"){let s=i===""?t:co(t,i);s.classGroupId=a;return}if(typeof i=="function"){if(di(i)){Na(i(o),t,a,o);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([s,d])=>{Na(d,co(t,s),a,o)})})},co=(e,t)=>{let a=e;return t.split(Sa).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},di=e=>e.isThemeGetter,ci=(e,t)=>t?e.map(([a,o])=>{let i=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([d,l])=>[t+d,l])):s);return[a,i]}):e,mi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,i=(s,d)=>{a.set(s,d),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let d=a.get(s);if(d!==void 0)return d;if((d=o.get(s))!==void 0)return i(s,d),d},set(s,d){a.has(s)?a.set(s,d):i(s,d)}}},po="!",pi=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,i=t[0],s=t.length,d=l=>{let g=[],m=0,c=0,p;for(let y=0;y<l.length;y++){let $=l[y];if(m===0){if($===i&&(o||l.slice(y,y+s)===t)){g.push(l.slice(c,y)),c=y+s;continue}if($==="/"){p=y;continue}}$==="["?m++:$==="]"&&m--}let b=g.length===0?l:l.substring(c),w=b.startsWith(po),I=w?b.substring(1):b,U=p&&p>c?p-c:void 0;return{modifiers:g,hasImportantModifier:w,baseClassName:I,maybePostfixModifierPosition:U}};return a?l=>a({className:l,parseClassName:d}):d},ui=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},gi=e=>({cache:mi(e.cacheSize),parseClassName:pi(e),...si(e)}),fi=/\s+/,vi=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:i}=t,s=[],d=e.trim().split(fi),l="";for(let g=d.length-1;g>=0;g-=1){let m=d[g],{modifiers:c,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:w}=a(m),I=!!w,U=o(I?b.substring(0,w):b);if(!U){if(!I){l=m+(l.length>0?" "+l:l);continue}if(U=o(b),!U){l=m+(l.length>0?" "+l:l);continue}I=!1}let y=ui(c).join(":"),$=p?y+po:y,z=$+U;if(s.includes(z))continue;s.push(z);let W=i(U,I);for(let oe=0;oe<W.length;++oe){let x=W[oe];s.push($+x)}l=m+(l.length>0?" "+l:l)}return l};function bi(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=uo(t))&&(o&&(o+=" "),o+=a);return o}var uo=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=uo(e[o]))&&(a&&(a+=" "),a+=t);return a};function hi(e,...t){let a,o,i,s=d;function d(g){let m=t.reduce((c,p)=>p(c),e());return a=gi(m),o=a.cache.get,i=a.cache.set,s=l,l(g)}function l(g){let m=o(g);if(m)return m;let c=vi(g,a);return i(g,c),c}return function(){return s(bi.apply(null,arguments))}}var pe=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},go=/^\[(?:([a-z-]+):)?(.+)\]$/i,xi=/^\d+\/\d+$/,yi=new Set(["px","full","screen"]),wi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ni=/\d+(%|px|yt?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|yt?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Si=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ci=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)yt-?((\d+)?\.?(\d+)[a-z]+|0)/,Di=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lt=e=>kt(e)||yi.has(e)||xi.test(e),pt=e=>Rt(e,"length",Ai),kt=e=>!!e&&!Number.isNaN(Number(e)),wa=e=>Rt(e,"number",kt),Bt=e=>!!e&&Number.isInteger(Number(e)),Ti=e=>e.endsWith("%")&&kt(e.slice(0,-1)),G=e=>go.test(e),ut=e=>wi.test(e),Pi=new Set(["length","size","percentage"]),ki=e=>Rt(e,Pi,fo),Ri=e=>Rt(e,"position",fo),Ei=new Set(["image","url"]),Ii=e=>Rt(e,Ei,Fi),Mi=e=>Rt(e,"",Li),zt=()=>!0,Rt=(e,t,a)=>{let o=go.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Ai=e=>Ni.test(e)&&!Si.test(e),fo=()=>!1,Li=e=>Ci.test(e),Fi=e=>Di.test(e);var Bi=()=>{let e=pe("colors"),t=pe("spacing"),a=pe("blur"),o=pe("brightness"),i=pe("borderColor"),s=pe("borderRadius"),d=pe("borderSpacing"),l=pe("borderWidth"),g=pe("contrast"),m=pe("grayscale"),c=pe("hueRotate"),p=pe("invert"),b=pe("gap"),w=pe("gradientColorStops"),I=pe("gradientColorStopPositions"),U=pe("inset"),y=pe("margin"),$=pe("opacity"),z=pe("padding"),W=pe("saturate"),oe=pe("scale"),x=pe("sepia"),A=pe("skew"),Y=pe("space"),H=pe("translate"),T=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],fe=()=>["auto",G,t],P=()=>[G,t],Pe=()=>["",lt,pt],Le=()=>["auto",kt,G],Ve=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],h=()=>["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"],me=()=>["start","end","center","between","around","evenly","stretch"],Fe=()=>["","0",G],ve=()=>["auto","avoid","all","avoid-page","page","left","right","column"],re=()=>[kt,G];return{cacheSize:500,separator:":",theme:{colors:[zt],spacing:[lt,pt],blur:["none","",ut,G],brightness:re(),borderColor:[e],borderRadius:["none","","full",ut,G],borderSpacing:P(),borderWidth:Pe(),contrast:re(),grayscale:Fe(),hueRotate:re(),invert:Fe(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Ti,pt],inset:fe(),margin:fe(),opacity:re(),padding:P(),saturate:re(),scale:re(),sepia:Fe(),skew:re(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[ut]}],"break-after":[{"break-after":ve()}],"break-before":[{"break-before":ve()}],"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:[...Ve(),G]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[U]}],"inset-x":[{"inset-x":[U]}],"inset-y":[{"inset-y":[U]}],start:[{start:[U]}],end:[{end:[U]}],top:[{top:[U]}],right:[{right:[U]}],bottom:[{bottom:[U]}],left:[{left:[U]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Bt,G]}],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",G]}],grow:[{grow:Fe()}],shrink:[{shrink:Fe()}],order:[{order:["first","last","none",Bt,G]}],"grid-cols":[{"grid-cols":[zt]}],"col-start-end":[{col:["auto",{span:["full",Bt,G]},G]}],"col-start":[{"col-start":Le()}],"col-end":[{"col-end":Le()}],"grid-rows":[{"grid-rows":[zt]}],"row-start-end":[{row:["auto",{span:[Bt,G]},G]}],"row-start":[{"row-start":Le()}],"row-end":[{"row-end":Le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...me()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...me(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...me(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[z]}],px:[{px:[z]}],py:[{py:[z]}],ps:[{ps:[z]}],pe:[{pe:[z]}],pt:[{pt:[z]}],pr:[{pr:[z]}],pb:[{pb:[z]}],pl:[{pl:[z]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[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",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[ut]},ut]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ut,pt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wa]}],"font-family":[{font:[zt]}],"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",G]}],"line-clamp":[{"line-clamp":["none",kt,wa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",lt,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[$]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...h(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",lt,pt]}],"underline-offset":[{"underline-offset":["auto",lt,G]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],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",G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[$]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ve(),Ri]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ki]}],"bg-image":[{bg:["none",{"gradient-to":["t","yt","yt","br","b","bl","l","tl"]},Ii]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[I]}],"gradient-via-pos":[{via:[I]}],"gradient-to-pos":[{to:[I]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-yt":[{"rounded-yt":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-yt":[{"rounded-yt":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-yt":[{"border-yt":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[$]}],"border-style":[{border:[...h(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[$]}],"divide-style":[{divide:h()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[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-yt":[{"border-yt":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...h()]}],"outline-offset":[{"outline-offset":[lt,G]}],"outline-w":[{outline:[lt,pt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[$]}],"ring-offset-w":[{"ring-offset":[lt,pt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ut,Mi]}],"shadow-color":[{shadow:[zt]}],opacity:[{opacity:[$]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",ut,G]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[p]}],saturate:[{saturate:[W]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[$]}],"backdrop-saturate":[{"backdrop-saturate":[W]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:re()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:re()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[oe]}],"scale-x":[{"scale-x":[oe]}],"scale-y":[{"scale-y":[oe]}],rotate:[{rotate:[Bt,G]}],"translate-x":[{"translate-x":[H]}],"translate-y":[{"translate-y":[H]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",G]}],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","yt-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[lt,pt,wa]}],stroke:[{stroke:[e,"none"]}],ce:["ce-only","not-ce-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-yt","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-yt","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-yt"],"rounded-yt":["rounded-yt","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-yt","border-w-b","border-w-l"],"border-w-x":["border-w-yt","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-yt","border-color-b","border-color-l"],"border-color-x":["border-color-yt","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var vo=hi(Bi);function u(...e){return vo((0,bo.clsx)(e))}var yt=require("react/jsx-runtime"),se=xt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,className:u("rounded-xl border bg-card text-card-foreground shadow",e),...t}));se.displayName="Card";var zi=xt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,className:u("flex flex-col space-y-1.5 p-6",e),...t}));zi.displayName="CardHeader";var Oi=xt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,className:u("font-semibold leading-none tracking-tight",e),...t}));Oi.displayName="CardTitle";var Vi=xt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,className:u("text-sm text-muted-foreground",e),...t}));Vi.displayName="CardDescription";var Et=xt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,className:u("p-6 pt-0",e),...t}));Et.displayName="CardContent";var Hi=xt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,className:u("flex items-center p-6 pt-0",e),...t}));Hi.displayName="CardFooter";var ho=require("@radix-ui/react-slot"),xo=require("class-variance-authority"),yo=ie(require("react")),Xt=(0,xo.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"}}}),N=yo.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...i},s)=>(0,yt.jsx)(e?ho.Slot:"button",{className:u(Xt({className:t,size:a,variant:o})),ref:s,...i}));N.displayName="Button";var No=ie(require("react"));var B=No.forwardRef(({className:e,type:t,...a},o)=>(0,yt.jsx)("input",{type:t,className:u("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,...a}));B.displayName="Input";var Co=ie(require("react")),Ce=Co.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("textarea",{className:u("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:a,...t}));Ce.displayName="Textarea";var J=ie(require("@radix-ui/react-select")),wt=require("lucide-react"),gt=ie(require("react")),ue=J.Root;var Ne=J.Value,le=gt.forwardRef(({children:e,className:t,...a},o)=>(0,yt.jsxs)(J.Trigger,{className:u("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,...a,children:[e,(0,yt.jsx)(J.Icon,{asChild:!0,children:(0,yt.jsx)(wt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));le.displayName=J.Trigger.displayName;var To=gt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(J.ScrollUpButton,{className:u("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,yt.jsx)(wt.ChevronUp,{className:"h-4 w-4"})}));To.displayName=J.ScrollUpButton.displayName;var Po=gt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(J.ScrollDownButton,{className:u("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,yt.jsx)(wt.ChevronDown,{className:"h-4 w-4"})}));Po.displayName=J.ScrollDownButton.displayName;var de=gt.forwardRef(({children:e,className:t,position:a="popper",...o},i)=>(0,yt.jsx)(J.Portal,{children:(0,yt.jsxs)(J.Content,{className:u("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="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:a,ref:i,...o,children:[(0,yt.jsx)(To,{}),(0,yt.jsx)(J.Viewport,{className:u("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,yt.jsx)(Po,{})]})}));de.displayName=J.Content.displayName;var ji=gt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(J.Label,{className:u("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));ji.displayName=J.Label.displayName;var F=gt.forwardRef(({children:e,className:t,...a},o)=>(0,yt.jsxs)(J.Item,{className:u("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,...a,children:[(0,yt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,yt.jsx)(J.ItemIndicator,{children:(0,yt.jsx)(wt.Check,{className:"h-4 w-4"})})}),(0,yt.jsx)(J.ItemText,{children:e})]}));F.displayName=J.Item.displayName;var Ui=gt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(J.Separator,{className:u("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Ui.displayName=J.Separator.displayName;var K=ie(require("react"));var ko=(e=768)=>{let[t,a]=(0,ce.useState)(!1);return(0,ce.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Ro=ie(require("react")),Ca=ie(require("@radix-ui/react-separator"));var Da=Ro.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},i)=>(0,yt.jsx)(Ca.Root,{ref:i,decorative:a,orientation:t,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Da.displayName=Ca.Root.displayName;var Ot=ie(require("react")),ke=ie(require("@radix-ui/react-dialog")),Io=require("@radix-ui/react-icons");var Ao=ke.Root;var $i=ke.Portal,Lo=Ot.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(ke.Overlay,{className:u("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,ref:a}));Lo.displayName=ke.Overlay.displayName;var Gi=(0,xo.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-yt data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ta=Ot.forwardRef(({side:e="right",className:t,children:a,...o},i)=>(0,yt.jsxs)($i,{children:[(0,yt.jsx)(Lo,{}),(0,yt.jsxs)(ke.Content,{ref:i,className:u(Gi({side:e}),t),...o,children:[(0,yt.jsxs)(ke.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-secondary",children:[(0,yt.jsx)(Io.Cross2Icon,{className:"h-4 w-4"}),(0,yt.jsx)("span",{className:"ce-only",children:"Close"})]}),a]})]}));Ta.displayName=ke.Content.displayName;var _i=({className:e,...t})=>(0,yt.jsx)("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});_i.displayName="SheetHeader";var Wi=({className:e,...t})=>(0,yt.jsx)("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wi.displayName="SheetFooter";var Ki=Ot.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(ke.Title,{ref:a,className:u("text-lg font-semibold text-foreground",e),...t}));Ki.displayName=ke.Title.displayName;var qi=Ot.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(ke.Description,{ref:a,className:u("text-sm text-muted-foreground",e),...t}));qi.displayName=ke.Description.displayName;function Pa({className:e,...t}){return(0,yt.jsx)("div",{className:u("animate-pulse rounded-md bg-primary/10",e),...t})}var Bo=ie(require("react")),Qe=ie(require("@radix-ui/react-tooltip"));var zo=Qe.Provider,Oo=Qe.Root,Vo=Qe.Trigger,Ra=Bo.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,yt.jsx)(Qe.Portal,{children:(0,yt.jsx)(Qe.Content,{ref:o,sideOffset:t,className:u("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...a})}));Ra.displayName=Qe.Content.displayName;var Ji="sidebar:state",Xi=60*60*24*7,Zi="16rem",Yi="18rem",Qi="3rem",es="b",Uo=K.createContext(null);function Yt(){let e=K.useContext(Uo);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var Ea=K.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:i,children:s,...d},l)=>{let g=ko(),[m,c]=K.useState(!1),[p,b]=K.useState(e),w=t??p,I=K.useCallback(z=>{if(a)return a?.(typeof z=="function"?z(w):z);b(z),document.cookie=`${Ji}=${w}; path=/; max-age=${Xi}`},[a,w]),U=K.useCallback(()=>g?c(z=>!z):I(z=>!z),[g,I,c]);K.useEffect(()=>{let z=W=>{W.key===es&&(W.metaKey||W.ctrlKey)&&(W.preventDefault(),U())};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[U]);let y=w?"expanded":"collapsed",$=K.useMemo(()=>({state:y,open:w,setOpen:I,isMobile:g,openMobile:m,setOpenMobile:c,toggleSidebar:U}),[y,w,I,g,m,c,U]);return(0,yt.jsx)(Uo.Provider,{value:$,children:(0,yt.jsx)(zo,{delayDuration:0,children:(0,yt.jsx)("div",{style:{"--sidebar-width":Zi,"--sidebar-width-icon":Qi,...i},className:u("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:l,...d,children:s})})})});Ea.displayName="SidebarProvider";var ts=K.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:i,...s},d)=>{let{isMobile:l,state:g,openMobile:m,setOpenMobile:c}=Yt();return a==="none"?(0,yt.jsx)("div",{className:u("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:d,...s,children:i}):l?(0,yt.jsx)(Ao,{open:m,onOpenChange:c,...s,children:(0,yt.jsx)(Ta,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Yi},side:e,children:(0,yt.jsx)("div",{className:"flex h-full w-full flex-col",children:i})})}):(0,yt.jsxs)("div",{ref:d,className:"group peer hidden md:block text-sidebar-foreground","data-state":g,"data-collapsible":g==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,yt.jsx)("div",{className:u("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)yt+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,yt.jsx)("div",{className:u("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)yt+_theme(spacing.4)yt+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-yt group-data-[side=right]:border-l",o),...s,children:(0,yt.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:i})})]})});ts.displayName="Sidebar";var as=K.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:i}=Yt();return(0,yt.jsxs)(N,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:u("h-7 w-7",e),onClick:s=>{t?.(s),i()},...a,children:[(0,yt.jsx)(wt.PanelLeft,{}),(0,yt.jsx)("span",{className:"ce-only",children:"Toggle Sidebar"})]})});as.displayName="SidebarTrigger";var os=K.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=Yt();return(0,yt.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:u("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]yt&]:cursor-w-resize [[data-side=right]yt&]:cursor-e-resize","[[data-side=left][data-state=collapsed]yt&]:cursor-e-resize [[data-side=right][data-state=collapsed]yt&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]yt&]:-right-2","[[data-side=right][data-collapsible=offcanvas]yt&]:-left-2",e),...t})});os.displayName="SidebarRail";var rs=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("main",{ref:a,className:u("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));rs.displayName="SidebarInset";var is=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(B,{ref:a,"data-sidebar":"input",className:u("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));is.displayName="SidebarInput";var ss=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,"data-sidebar":"header",className:u("flex flex-col gap-2 p-2",e),...t}));ss.displayName="SidebarHeader";var ns=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,"data-sidebar":"footer",className:u("flex flex-col gap-2 p-2",e),...t}));ns.displayName="SidebarFooter";var ls=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(Da,{ref:a,"data-sidebar":"separator",className:u("mx-2 w-auto bg-sidebar-border",e),...t}));ls.displayName="SidebarSeparator";var ds=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,"data-sidebar":"content",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ds.displayName="SidebarContent";var cs=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,"data-sidebar":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));cs.displayName="SidebarGroup";var ms=K.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,yt.jsx)(t?ho.Slot:"div",{ref:o,"data-sidebar":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));ms.displayName="SidebarGroupLabel";var ps=K.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,yt.jsx)(t?ho.Slot:"button",{ref:o,"data-sidebar":"group-action",className:u("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));ps.displayName="SidebarGroupAction";var us=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,"data-sidebar":"group-content",className:u("w-full text-sm",e),...t}));us.displayName="SidebarGroupContent";var gs=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("ul",{ref:a,"data-sidebar":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));gs.displayName="SidebarMenu";var fs=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:u("group/menu-item relative",e),...t}));fs.displayName="SidebarMenuItem";var vs=(0,xo.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),bs=K.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:i,className:s,...d},l)=>{let g=e?ho.Slot:"button",{isMobile:m,state:c}=Yt(),p=(0,yt.jsx)(g,{ref:l,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:u(vs({variant:a,size:o}),s),...d});return i?(typeof i=="string"&&(i={children:i}),(0,yt.jsxs)(Oo,{children:[(0,yt.jsx)(Vo,{asChild:!0,children:p}),(0,yt.jsx)(Ra,{side:"right",align:"center",hidden:c!=="collapsed"||m,...i})]})):p});bs.displayName="SidebarMenuButton";var hs=K.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},i)=>(0,yt.jsx)(t?ho.Slot:"button",{ref:i,"data-sidebar":"menu-action",className:u("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));hs.displayName="SidebarMenuAction";var xs=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:u("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));xs.displayName="SidebarMenuBadge";var ys=K.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let i=K.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,yt.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:u("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,yt.jsx)(Pa,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,yt.jsx)(Pa,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});ys.displayName="SidebarMenuSkeleton";var ws=K.forwardRef(({className:e,...t},a)=>(0,yt.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:u("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));ws.displayName="SidebarMenuSub";var Ns=K.forwardRef(({...e},t)=>(0,yt.jsx)("li",{ref:t,...e}));Ns.displayName="SidebarMenuSubItem";var Ss=K.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...i},s)=>(0,yt.jsx)(e?ho.Slot:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:u("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...i}));Ss.displayName="SidebarMenuSubButton";var $o=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:i,onDeleteProject:s,onAddProject:d,onUpdateEpic:l,onDeleteEpic:g,onAddEpic:m,onAddSprint:c,onUpdateSprint:p,onDeleteSprint:b,onViewChange:w,mobileMenuOpen:I,onToggleMobileMenu:U})=>{let[y,$]=(0,ce.useState)(null),[z,W]=(0,ce.useState)(null),[oe,x]=(0,ce.useState)(null),[A,Y]=(0,ce.useState)(null),[H,T]=(0,ce.useState)({name:"",description:""}),[j,fe]=(0,ce.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[P,Pe]=(0,ce.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[Le,Ve]=(0,ce.useState)(!1),[h,q]=(0,ce.useState)(!1),[me,Fe]=(0,ce.useState)({name:"",description:""}),[ve,re]=(0,ce.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),He=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],Ye=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],je=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],at=f=>{W(f.id),T({name:f.name,description:f.description||""})},L=()=>{z&&H.name.trim()&&(i(z,{name:H.name.trim(),description:H.description.trim()}),W(null))},ee=()=>{W(null),T({name:"",description:""})},xe=()=>{me.name.trim()&&(d({name:me.name.trim(),description:me.description.trim(),isSelected:!1}),Fe({name:"",description:""}),Ve(!1))},Ae=f=>{i(f,{isSelected:!0})},st=f=>{x(f.id),fe({name:f.name,description:f.description||"",color:f.color,confidence:f.confidence,phase:f.phase,startDate:f.startDate.toISOString().split("T")[0],endDate:f.endDate.toISOString().split("T")[0],progress:f.progress})},bt=()=>{oe&&j.name.trim()&&(l(oe,{name:j.name.trim(),description:j.description.trim(),color:j.color,confidence:j.confidence,phase:j.phase,startDate:new Date(j.startDate),endDate:new Date(j.endDate),progress:j.progress}),x(null))},nt=()=>{x(null),fe({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},va=f=>{Y(f.id),Pe({name:f.name,description:f.description||"",startDate:f.startDate.toISOString().split("T")[0],endDate:f.endDate.toISOString().split("T")[0],isActive:f.isActive})},ba=()=>{A&&P.name.trim()&&(p(A,{name:P.name.trim(),description:P.description.trim(),startDate:new Date(P.startDate),endDate:new Date(P.endDate),isActive:P.isActive}),Y(null))},$t=()=>{Y(null),Pe({name:"",description:"",startDate:"",endDate:"",isActive:!1})},ha=()=>{ve.name.trim()&&(c({name:ve.name.trim(),description:ve.description.trim(),startDate:new Date(ve.startDate),endDate:new Date(ve.endDate),isActive:ve.isActive,isSelected:!1}),re({name:"",description:"",startDate:"",endDate:"",isActive:!1}),q(!1))},Gt=f=>{p(f,{isSelected:!0})},_t=f=>f.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Ft=f=>{let C=Ye.find(Q=>Q.value===f);return C?{label:C.label,color:C.color}:{label:"Medium",color:"text-warning"}},Wt=f=>{let C=je.find(Q=>Q.value===f);return C?{label:C.label,color:C.color}:{label:"Phase 1",color:"text-primary"}};return(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsxs)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${I?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,yt.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,yt.jsxs)("button",{onClick:()=>{w("kanban"),$(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3 z-50`,title:"Kanban View",children:[(0,yt.jsx)(wt.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,yt.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),(0,yt.jsxs)("button",{onClick:()=>{w("planning"),$(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="planning"?"bg-brand-plum":"bg-brand-plum/75 hover:bg-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[(0,yt.jsx)(wt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,yt.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),(0,yt.jsxs)("button",{onClick:()=>$(y==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${y==="projects"?"bg-sidebar-accent":"bg-sidebar-primary hover:bg-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[(0,yt.jsx)(wt.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,yt.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),(0,yt.jsxs)("button",{onClick:()=>{w("epics"),$(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="epics"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,yt.jsx)(wt.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,yt.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),(0,yt.jsxs)("button",{onClick:()=>$(y==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${y==="sprints"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[(0,yt.jsx)(wt.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,yt.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),(0,yt.jsxs)("button",{onClick:()=>{w("files"),$(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="files"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,yt.jsx)(wt.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,yt.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),(0,yt.jsxs)("button",{onClick:()=>{w("tasks"),$(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="tasks"?"bg-brand-cyan":"bg-brand-cyan/75 hover:bg-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[(0,yt.jsx)(wt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,yt.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),I&&(0,yt.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:U}),y&&(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>$(null)}),(0,yt.jsxs)("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg z-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[(0,yt.jsxs)("div",{className:"p-3 md:p-4 border-b flex items-center justify-between",children:[(0,yt.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[y==="projects"&&"Projects",y==="epics"&&"Manage Epics",y==="sprints"&&"Manage Sprints",y==="files"&&"Files"]}),(0,yt.jsx)(N,{variant:"ghost",size:"sm",onClick:()=>$(null),children:(0,yt.jsx)(wt.yt,{className:"h-4 w-4"})})]}),(0,yt.jsxs)("div",{className:"p-3 md:p-4 space-y-4 h-full overflow-y-auto",children:[y==="projects"&&(0,yt.jsx)(se,{className:"p-3",children:(0,yt.jsxs)("div",{className:"space-y-3",children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yt.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,yt.jsxs)(N,{size:"sm",onClick:()=>Ve(!0),className:"gap-1",children:[(0,yt.jsx)(wt.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),Le&&(0,yt.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,yt.jsx)(B,{value:me.name,onChange:f=>Fe(C=>({...C,name:f.target.value})),placeholder:"Project name",className:"text-sm"}),(0,yt.jsx)(Ce,{value:me.description,onChange:f=>Fe(C=>({...C,description:f.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,yt.jsxs)("div",{className:"flex gap-1",children:[(0,yt.jsx)(N,{size:"sm",onClick:xe,className:"text-xs h-6",children:"Save"}),(0,yt.jsx)(N,{size:"sm",variant:"outline",onClick:()=>Ve(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,yt.jsx)("div",{className:"space-y-2",children:e.map(f=>(0,yt.jsx)("div",{className:"border rounded p-2",children:z===f.id?(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(B,{value:H.name,onChange:C=>T(Q=>({...Q,name:C.target.value})),placeholder:"Project name",className:"text-sm"}),(0,yt.jsx)(Ce,{value:H.description,onChange:C=>T(Q=>({...Q,description:C.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,yt.jsxs)("div",{className:"flex gap-1",children:[(0,yt.jsx)(N,{size:"sm",onClick:L,className:"text-xs h-6",children:"Save"}),(0,yt.jsx)(N,{size:"sm",variant:"outline",onClick:ee,className:"text-xs h-6",children:"Cancel"})]})]}):(0,yt.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${f.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>Ae(f.id),children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,yt.jsx)(wt.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,yt.jsx)("span",{className:"font-medium text-xs",children:f.name})]}),f.description&&(0,yt.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:f.description}),(0,yt.jsxs)("div",{className:"flex gap-1",onClick:C=>C.stopPropagation(),children:[(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>at(f),className:"h-5 px-1",children:(0,yt.jsx)(wt.Edit2,{className:"h-3 w-3"})}),(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>s(f.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,yt.jsx)(wt.Trash2,{className:"h-3 w-3"})})]})]})},f.id))})]})}),y==="epics"&&(0,yt.jsx)(se,{className:"p-3",children:(0,yt.jsxs)("div",{className:"space-y-3",children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yt.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,yt.jsxs)(N,{size:"sm",onClick:m,className:"gap-1",children:[(0,yt.jsx)(wt.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,yt.jsx)("div",{className:"space-y-4",children:t.map(f=>(0,yt.jsx)("div",{className:"border rounded-lg p-3",children:oe===f.id?(0,yt.jsxs)("div",{className:"space-y-3",children:[(0,yt.jsx)(B,{value:j.name,onChange:C=>fe(Q=>({...Q,name:C.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,yt.jsx)(Ce,{value:j.description,onChange:C=>fe(Q=>({...Q,description:C.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)("label",{className:"text-xs font-medium",children:"Color"}),(0,yt.jsx)("div",{className:"flex gap-1 flex-wrap",children:He.map(C=>(0,yt.jsx)("button",{onClick:()=>fe(Q=>({...Q,color:C})),className:`w-6 h-6 rounded-full ${C} ${j.color===C?"ring-2 ring-ring":""}`},C))})]}),(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,yt.jsxs)("div",{className:"space-y-1",children:[(0,yt.jsx)("label",{className:"text-xs font-medium",children:"Confidence"}),(0,yt.jsxs)(ue,{value:j.confidence,onValueChange:C=>fe(Q=>({...Q,confidence:C})),children:[(0,yt.jsx)(le,{className:"h-8 text-xs",children:(0,yt.jsx)(Ne,{})}),(0,yt.jsx)(de,{children:Ye.map(C=>(0,yt.jsx)(F,{value:C.value,children:(0,yt.jsx)("span",{className:C.color,children:C.label})},C.value))})]})]}),(0,yt.jsxs)("div",{className:"space-y-1",children:[(0,yt.jsx)("label",{className:"text-xs font-medium",children:"Phase"}),(0,yt.jsxs)(ue,{value:j.phase.toString(),onValueChange:C=>fe(Q=>({...Q,phase:parseInt(C)})),children:[(0,yt.jsx)(le,{className:"h-8 text-xs",children:(0,yt.jsx)(Ne,{})}),(0,yt.jsx)(de,{children:je.map(C=>(0,yt.jsx)(F,{value:C.value.toString(),children:(0,yt.jsx)("span",{className:C.color,children:C.label})},C.value))})]})]})]}),(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,yt.jsxs)("div",{className:"space-y-1",children:[(0,yt.jsx)("label",{className:"text-xs font-medium",children:"Start Date"}),(0,yt.jsx)(B,{type:"date",value:j.startDate,onChange:C=>fe(Q=>({...Q,startDate:C.target.value})),className:"text-xs h-8"})]}),(0,yt.jsxs)("div",{className:"space-y-1",children:[(0,yt.jsx)("label",{className:"text-xs font-medium",children:"End Date"}),(0,yt.jsx)(B,{type:"date",value:j.endDate,onChange:C=>fe(Q=>({...Q,endDate:C.target.value})),className:"text-xs h-8"})]})]}),(0,yt.jsxs)("div",{className:"space-y-1",children:[(0,yt.jsx)("label",{className:"text-xs font-medium",children:"Progress (%)"}),(0,yt.jsx)(B,{type:"number",min:"0",max:"100",value:j.progress,onChange:C=>fe(Q=>({...Q,progress:parseInt(C.target.value)||0})),className:"text-xs h-8"})]}),(0,yt.jsxs)("div",{className:"flex gap-2",children:[(0,yt.jsx)(N,{size:"sm",onClick:bt,className:"text-xs",children:"Save"}),(0,yt.jsx)(N,{size:"sm",variant:"outline",onClick:nt,className:"text-xs",children:"Cancel"})]})]}):(0,yt.jsxs)("div",{className:`cursor-pointer p-2 rounded transition-colors ${f.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>l(f.id,{isSelected:!f.isSelected}),children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,yt.jsx)("div",{className:`w-3 h-3 rounded-full ${f.color}`}),(0,yt.jsx)("span",{className:"font-medium text-sm",children:f.name})]}),f.description&&(0,yt.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:f.description}),(0,yt.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,yt.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,yt.jsx)("span",{className:Ft(f.confidence).color,children:Ft(f.confidence).label})]}),(0,yt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,yt.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,yt.jsx)("span",{className:Wt(f.phase).color,children:Wt(f.phase).label})]}),(0,yt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,yt.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,yt.jsxs)("span",{className:"text-foreground",children:[_t(f.startDate)," - ",_t(f.endDate)]})]}),(0,yt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,yt.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,yt.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${f.progress}%`}})}),(0,yt.jsxs)("span",{className:"text-foreground",children:[f.progress,"%"]})]})]})]}),(0,yt.jsxs)("div",{className:"flex gap-1",onClick:C=>C.stopPropagation(),children:[(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>st(f),className:"h-6 px-2",children:(0,yt.jsx)(wt.Edit2,{className:"h-3 w-3"})}),(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>g(f.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,yt.jsx)(wt.Trash2,{className:"h-3 w-3"})})]})]})},f.id))})]})}),y==="sprints"&&(0,yt.jsx)(se,{className:"p-3",children:(0,yt.jsxs)("div",{className:"space-y-3",children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yt.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,yt.jsxs)(N,{size:"sm",onClick:()=>q(!0),className:"gap-1",children:[(0,yt.jsx)(wt.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),h&&(0,yt.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,yt.jsx)(B,{value:ve.name,onChange:f=>re(C=>({...C,name:f.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,yt.jsx)(B,{type:"date",value:ve.startDate,onChange:f=>re(C=>({...C,startDate:f.target.value})),className:"text-xs"}),(0,yt.jsx)(B,{type:"date",value:ve.endDate,onChange:f=>re(C=>({...C,endDate:f.target.value})),className:"text-xs"})]}),(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)("input",{type:"checkbox",checked:ve.isActive,onChange:f=>re(C=>({...C,isActive:f.target.checked})),className:"w-3 h-3"}),(0,yt.jsx)("span",{className:"text-xs",children:"Active"})]}),(0,yt.jsxs)("div",{className:"flex gap-1",children:[(0,yt.jsx)(N,{size:"sm",onClick:ha,className:"text-xs h-6",children:"Save"}),(0,yt.jsx)(N,{size:"sm",variant:"outline",onClick:()=>q(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,yt.jsx)("div",{className:"space-y-2",children:a.map(f=>(0,yt.jsx)("div",{className:"border rounded p-2",children:A===f.id?(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(B,{value:P.name,onChange:C=>Pe(Q=>({...Q,name:C.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:f.id==="backlog"||f.id==="all-tasks"}),f.id!=="backlog"&&f.id!=="all-tasks"&&(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,yt.jsx)(B,{type:"date",value:P.startDate,onChange:C=>Pe(Q=>({...Q,startDate:C.target.value})),className:"text-xs"}),(0,yt.jsx)(B,{type:"date",value:P.endDate,onChange:C=>Pe(Q=>({...Q,endDate:C.target.value})),className:"text-xs"})]}),(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)("input",{type:"checkbox",checked:P.isActive,onChange:C=>Pe(Q=>({...Q,isActive:C.target.checked})),className:"w-3 h-3"}),(0,yt.jsx)("span",{className:"text-xs",children:"Active"})]})]}),(0,yt.jsxs)("div",{className:"flex gap-1",children:[(0,yt.jsx)(N,{size:"sm",onClick:ba,className:"text-xs h-6",children:"Save"}),(0,yt.jsx)(N,{size:"sm",variant:"outline",onClick:$t,className:"text-xs h-6",children:"Cancel"})]})]}):(0,yt.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${f.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>Gt(f.id),children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,yt.jsx)(wt.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,yt.jsx)("span",{className:"font-medium text-xs",children:f.name}),f.isActive&&(0,yt.jsx)("span",{className:"text-xs bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(f.id==="backlog"||f.id==="all-tasks")&&(0,yt.jsx)("span",{className:"text-xs bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),f.id!=="backlog"&&f.id!=="all-tasks"&&(0,yt.jsxs)("p",{className:"text-xs text-muted-foreground mb-1",children:[f.startDate.toLocaleDateString()," - ",f.endDate.toLocaleDateString()]}),(0,yt.jsxs)("div",{className:"flex gap-1",onClick:C=>C.stopPropagation(),children:[(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>va(f),className:"h-5 px-1",children:(0,yt.jsx)(wt.Edit2,{className:"h-3 w-3"})}),f.id!=="backlog"&&f.id!=="all-tasks"&&(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>b(f.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,yt.jsx)(wt.Trash2,{className:"h-3 w-3"})})]})]})},f.id))})]})})]})]})]})]})},Go=e=>(0,yt.jsx)(Ea,{children:(0,yt.jsxs)("div",{className:"flex w-full",children:[(0,yt.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,yt.jsx)($o,{...e})}),(0,yt.jsx)("div",{className:"md:hidden",children:(0,yt.jsx)($o,{...e})}),(0,yt.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:(0,yt.jsx)("div",{className:"w-full",children:e.children})})]})});var Cs=(0,xo.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 be({className:e,variant:t,...a}){return(0,yt.jsx)("div",{className:u(Cs({variant:t}),e),...a})}var Ko=({title:e,status:t,taskCount:a,children:o,onDrop:i,isCompact:s=!1})=>{let d=m=>{m.preventDefault()},l=m=>{m.preventDefault(),i(t)};return(0,yt.jsxs)(se,{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 ${s?"lg:max-w-xs":""}`,onDragOver:d,onDrop:l,children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,yt.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,yt.jsx)(be,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,yt.jsx)("div",{className:"space-y-4 min-h-[200px]",children:o})]})};var Qt=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:i=!1})=>{let s=c=>{a(e)},d=()=>{console.log("task clicked",e.title),o(e)},l=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},g=()=>{switch(e.type){case"story":return(0,yt.jsx)(wt.BookOpen,{className:"h-3 w-3"});case"bug":return(0,yt.jsx)(wt.Bug,{className:"h-3 w-3"});case"spike":return(0,yt.jsx)(wt.Zap,{className:"h-3 w-3"});case"task":default:return(0,yt.jsx)(wt.AlertCircle,{className:"h-3 w-3"})}},m=()=>{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,yt.jsx)(se,{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:d,children:(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${m()}`,children:g()}),(0,yt.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,yt.jsxs)(se,{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:d,children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,yt.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${m()}`,children:[g(),(0,yt.jsx)("span",{className:"capitalize",children:e.type})]}),(0,yt.jsxs)("div",{className:"flex gap-1",children:[(0,yt.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:e.priority}),(0,yt.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,yt.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,yt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,yt.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,yt.jsxs)("div",{className:"flex items-center gap-1",children:[(0,yt.jsx)(wt.User,{className:"h-4 w-4"}),(0,yt.jsx)("span",{children:e.assignee})]})})]})};var Vt=ie(require("react")),Re=ie(require("@radix-ui/react-dialog"));var et=Re.Root;var Ds=Re.Portal;var Jo=Vt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(Re.Overlay,{ref:a,className:u("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}));Jo.displayName=Re.Overlay.displayName;var _e=Vt.forwardRef(({className:e,children:t,...a},o)=>(0,$e.jsxs)(Ds,{children:[(0,$e.jsx)(Jo,{}),(0,$e.jsxs)(Re.Content,{ref:o,className:u("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,$e.jsxs)(Re.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,$e.jsx)(wt.yt,{className:"h-4 w-4"}),(0,$e.jsx)("span",{className:"ce-only",children:"Close"})]})]})]}));_e.displayName=Re.Content.displayName;var We=({className:e,...t})=>(0,$e.jsx)("div",{className:u("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});We.displayName="DialogHeader";var Ht=({className:e,...t})=>(0,$e.jsx)("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ht.displayName="DialogFooter";var Ke=Vt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(Re.Title,{ref:a,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));Ke.displayName=Re.Title.displayName;var Ts=Vt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(Re.Description,{ref:a,className:u("text-sm text-muted-foreground",e),...t}));Ts.displayName=Re.Description.displayName;var Xo=ie(require("react")),Ia=ie(require("@radix-ui/react-label"));var Ps=(0,xo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),k=Xo.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(Ia.Root,{ref:a,className:u(Ps(),e),...t}));k.displayName=Ia.Root.displayName;var St=ie(require("react")),Mt=ie(require("@radix-ui/react-toggle-group"));var Qo=ie(require("react")),Ma=ie(require("@radix-ui/react-toggle"));var Aa=(0,xo.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"}}),ks=Qo.forwardRef(({className:e,variant:t,size:a,...o},i)=>(0,yt.jsx)(Ma.Root,{ref:i,className:u(Aa({variant:t,size:a,className:e})),...o}));ks.displayName=Ma.Root.displayName;var ar=St.createContext({size:"default",variant:"default"}),Ct=St.forwardRef(({className:e,variant:t,size:a,children:o,...i},s)=>(0,yt.jsx)(Mt.Root,{ref:s,className:u("flex items-center justify-center gap-1",e),...i,children:(0,yt.jsx)(ar.Provider,{value:{variant:t,size:a},children:o})}));Ct.displayName=Mt.Root.displayName;var Dt=St.forwardRef(({className:e,children:t,variant:a,size:o,...i},s)=>{let d=St.useContext(ar);return(0,yt.jsx)(Mt.Item,{ref:s,className:u(Aa({variant:d.variant||a,size:d.size||o}),e),...i,children:t})});Dt.displayName=Mt.Item.displayName;var Rs=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:wt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:wt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:wt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:wt.Zap}],Es=[{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"}],ta=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:i,assignees:s,defaultEpicId:d})=>{let[l,g]=(0,ce.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,ce.useEffect)(()=>{e&&d&&g(p=>({...p,epicId:d}))},[e,d]),(0,ce.useEffect)(()=>{e&&g({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:d||"",sprintId:"none",assignee:""})},[e]);let m=p=>{p.preventDefault(),l.title.trim()&&(a({title:l.title.trim(),description:l.description.trim(),status:"todo",priority:l.priority,type:l.type,points:l.points,epicId:l.epicId,sprintId:l.sprintId==="none"?void 0:l.sprintId,assignee:l.assignee.trim()||"Unassigned"}),g({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:d||"",sprintId:"none",assignee:""}),t())},c=(p,b)=>{g(w=>({...w,[p]:b}))};return(0,yt.jsx)(et,{open:e,onOpenChange:t,children:(0,yt.jsxs)(_e,{className:"sm:max-w-md",children:[(0,yt.jsx)(We,{children:(0,yt.jsx)(Ke,{children:"Add New Task"})}),(0,yt.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"title",children:"Task Title"}),(0,yt.jsx)(B,{id:"title",value:l.title,onChange:p=>c("title",p.target.value),placeholder:"Enter task title",required:!0})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"description",children:"Description"}),(0,yt.jsx)(Ce,{id:"description",value:l.description,onChange:p=>c("description",p.target.value),placeholder:"Enter task description",rows:3})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"Type"}),(0,yt.jsx)(Ct,{type:"single",value:l.type,onValueChange:p=>p&&c("type",p),children:Rs.map(p=>{let b=p.icon;return(0,yt.jsxs)(Dt,{value:p.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,yt.jsx)(b,{className:"h-4 w-4"}),p.label]},p.value)})})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"Priority"}),(0,yt.jsx)(Ct,{type:"single",value:l.priority,onValueChange:p=>p&&c("priority",p),children:Es.map(p=>(0,yt.jsx)(Dt,{value:p.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:p.label},p.value))})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"points",children:"Story Points"}),(0,yt.jsx)(B,{id:"points",type:"number",min:"1",max:"100",value:l.points,onChange:p=>c("points",parseInt(p.target.value)||1),placeholder:"Enter story points",required:!0})]}),!d&&(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"epic",children:"Epic"}),(0,yt.jsxs)(ue,{value:l.epicId,onValueChange:p=>c("epicId",p),children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{placeholder:"Select an epic"})}),(0,yt.jsx)(de,{children:o.map(p=>(0,yt.jsx)(F,{value:p.id,children:(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)("div",{className:`w-3 h-3 rounded-full ${p.color}`}),p.name]})},p.id))})]})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,yt.jsxs)(ue,{value:l.sprintId,onValueChange:p=>c("sprintId",p),children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{placeholder:"Select a sprint"})}),(0,yt.jsxs)(de,{children:[(0,yt.jsx)(F,{value:"none",children:"No Sprint"}),i.map(p=>(0,yt.jsx)(F,{value:p.id,children:(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[p.name,p.isActive&&(0,yt.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},p.id))]})]})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"sprint",children:"Assignee"}),(0,yt.jsxs)(ue,{value:l.assignee,onValueChange:p=>c("assignee",p),children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{placeholder:"Select an Assignee"})}),(0,yt.jsxs)(de,{children:[(0,yt.jsx)(F,{value:"none",children:"No Assignee"}),s.map(p=>(0,yt.jsx)(F,{value:p.id,children:(0,yt.jsx)("div",{className:"flex items-center gap-2",children:p.name})},p.id))]})]})]}),(0,yt.jsxs)(Ht,{children:[(0,yt.jsx)(N,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,yt.jsx)(N,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Fa=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:i,className:s="",disabled:d=!1})=>{let[l,g]=(0,ce.useState)(!1),[m,c]=(0,ce.useState)(""),p=()=>{d||(g(!0),c(t))},b=async()=>{m!==t&&await i(e,m),g(!1)},w=I=>{I.key==="Enter"&&!o||I.key==="Enter"&&I.ctrlKey&&o?b():I.key==="Escape"&&(g(!1),c(""))};return(0,yt.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,yt.jsx)(k,{children:a}),l?o?(0,yt.jsx)(Ce,{value:m,onChange:I=>c(I.target.value),onBlur:b,onKeyDown:w,autoFocus:!0,rows:4,className:"resize-none"}):(0,yt.jsx)(B,{value:m,onChange:I=>c(I.target.value),onBlur:b,onKeyPress:w,autoFocus:!0,className:"text-lg font-medium"}):(0,yt.jsxs)("div",{onClick:p,className:`${d?"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,yt.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!d&&(0,yt.jsx)(wt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var aa=ie(require("react")),ct=ie(require("@radix-ui/react-avatar"));var Ba=aa.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(ct.Root,{ref:a,className:u("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ba.displayName=ct.Root.displayName;var Is=aa.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(ct.Image,{ref:a,className:u("aspect-square h-full w-full",e),...t}));Is.displayName=ct.Image.displayName;var za=aa.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(ct.Fallback,{ref:a,className:u("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));za.displayName=ct.Fallback.displayName;var ir=({comments:e,onAddComment:t})=>{let[a,o]=(0,ce.useState)(""),i=d=>d.split(" ").map(l=>l[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),o(""))};return(0,yt.jsxs)("div",{className:"space-y-4",children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)(wt.MessageSquare,{className:"h-5 w-5"}),(0,yt.jsx)(k,{className:"text-lg font-medium",children:"Comments"}),(0,yt.jsx)(be,{variant:"secondary",children:e.length})]}),(0,yt.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(d=>(0,yt.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,yt.jsx)(Ba,{className:"h-8 w-8 mt-1",children:(0,yt.jsx)(za,{className:"text-xs bg-muted text-muted-foreground",children:i(d.author)})}),(0,yt.jsxs)("div",{className:"flex-1",children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,yt.jsx)("span",{className:"font-medium text-sm",children:d.author}),(0,yt.jsxs)("span",{className:"text-xs text-muted-foreground",children:[d.createdAt.toLocaleDateString()," at ",d.createdAt.toLocaleTimeString()]})]}),(0,yt.jsx)("p",{className:"text-sm text-muted-foreground",children:d.text})]})]},d.id))}),(0,yt.jsxs)("div",{className:"flex gap-2",children:[(0,yt.jsx)(Ce,{value:a,onChange:d=>o(d.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,yt.jsx)(N,{onClick:s,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,yt.jsx)(wt.Send,{className:"h-4 w-4"})})]})]})};var ia=({label:e,value:t,onValueChange:a,options:o,showColor:i=!1,disabled:s=!1})=>{let[d,l]=(0,ce.useState)(!1),g=o.find(c=>c.value===t);return(0,yt.jsxs)("div",{className:"space-y-1",children:[(0,yt.jsx)(k,{className:"text-xs text-muted-foreground",children:e}),(0,yt.jsxs)(ue,{value:t,onValueChange:a,open:d,onOpenChange:c=>{s||l(c)},disabled:s,children:[(0,yt.jsx)(le,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,yt.jsxs)(be,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&l(!d),children:[i&&g?.color&&(0,yt.jsx)("div",{className:`w-2 h-2 rounded-full ${g.color} mr-1`}),g?.label||"Select..."]})}),(0,yt.jsx)(de,{children:o.map(c=>(0,yt.jsx)(F,{value:c.value,children:i&&c.color?(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.label]}):c.label},c.value))})]})]})};var nr=({label:e,value:t,onValueChange:a,options:o,placeholder:i="Search...",allowCustomValue:s=!1,disabled:d=!1})=>{let[l,g]=(0,ce.useState)(!1),[m,c]=(0,ce.useState)(""),p=o.find(y=>y.value===t),b=o.filter(y=>y.label.toLowerCase().includes(m.toLowerCase())),w=y=>{a(y),g(!1),c("")},I=()=>{s&&m.trim()&&!o.find(y=>y.value===m.trim())&&(a(m.trim()),g(!1),c(""))};return(0,yt.jsxs)("div",{className:"space-y-1",children:[(0,yt.jsx)(k,{className:"text-xs text-muted-foreground",children:e}),(0,yt.jsxs)(ue,{value:t,onValueChange:w,open:l,onOpenChange:y=>{d||g(y)},disabled:d,children:[(0,yt.jsx)(le,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,yt.jsx)(be,{variant:"secondary",className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!d&&g(!l),children:p?.label||t||"Select..."})}),(0,yt.jsxs)(de,{children:[(0,yt.jsx)("div",{className:"p-2",children:(0,yt.jsx)(B,{placeholder:i,value:m,onChange:y=>c(y.target.value),onKeyDown:y=>{y.key==="Enter"&&s&&I()},className:"mb-2"})}),b.map(y=>(0,yt.jsx)(F,{value:y.value,children:y.label},y.value)),s&&m.trim()&&!b.find(y=>y.value===m.trim())&&(0,yt.jsxs)(F,{value:m.trim(),children:['Add "',m.trim(),'"']})]})]})]})};var Ms=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:wt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:wt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:wt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:wt.Zap}],As=[{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"}],Ls=[{value:"John Doe",label:"John Doe"},{value:"Jane Smith",label:"Jane Smith"},{value:"Bob Wilson",label:"Bob Wilson"},{value:"Alice Johnson",label:"Alice Johnson"},{value:"Carol Brown",label:"Carol Brown"},{value:"David Lee",label:"David Lee"},{value:"Emma Davis",label:"Emma Davis"},{value:"Frank Miller",label:"Frank Miller"},{value:"Grace Taylor",label:"Grace Taylor"},{value:"Unassigned",label:"Unassigned"}],lr=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:i,onClose:s,onDelete:d,isUpdating:l=!1,isDeleting:g=!1,deleteState:m="idle"})=>{let c=b=>b.split(" ").map(w=>w[0]).join("").toUpperCase(),p=()=>m==="loading"?(0,yt.jsxs)(N,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,yt.jsx)(wt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):m==="success"?(0,yt.jsxs)(N,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,yt.jsx)(wt.Check,{className:"h-3 w-3"}),"Deleted"]}):m==="error"?(0,yt.jsxs)(N,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,yt.jsx)(wt.yt,{className:"h-3 w-3"}),"Delete failed"]}):(0,yt.jsxs)(N,{onClick:d,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:l||g,children:[(0,yt.jsx)(wt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,yt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,yt.jsxs)("div",{className:"space-y-4",style:{opacity:l?.6:1},children:[(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{className:"text-xs text-muted-foreground",children:"Status"}),(0,yt.jsx)(ia,{label:"",value:e.status,onValueChange:b=>i("status",b),options:[{value:"todo",label:"To yt"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{className:"text-xs text-muted-foreground",children:"Type"}),(0,yt.jsx)(Ct,{type:"single",value:e.type,onValueChange:b=>b&&i("type",b),className:"grid grid-cols-2 gap-1",disabled:l,children:Ms.map(b=>{let w=b.icon;return(0,yt.jsxs)(Dt,{value:b.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:[(0,yt.jsx)(w,{className:"h-3 w-3"}),b.label]},b.value)})})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,yt.jsx)(Ct,{type:"single",value:e.priority,onValueChange:b=>b&&i("priority",b),className:"grid grid-cols-3 gap-1",disabled:l,children:As.map(b=>(0,yt.jsx)(Dt,{value:b.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:b.label},b.value))})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,yt.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:b=>i("points",b.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:l})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,yt.jsx)(ia,{label:"",value:e.epicId,onValueChange:b=>i("epicId",b),options:(t||[]).map(b=>({value:b.id,label:b.name,color:b.color})),showColor:!0,disabled:l})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,yt.jsx)(ia,{label:"",value:e.sprintId||"none",onValueChange:b=>i("sprintId",b==="none"?"":b),options:[{value:"none",label:"No Sprint"},...(a||[]).map(b=>({value:b.id,label:`${b.name}${b.isActive?" (Active)":""}`}))],disabled:l})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,yt.jsx)(nr,{label:"",value:e.assignee,onValueChange:b=>i("assignee",b),options:Ls,placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,yt.jsxs)("div",{className:"mt-auto pt-4 space-y-4",children:[(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(N,{onClick:s,variant:"outline",className:"w-full h-8 text-xs",disabled:l||g,children:"Close"}),p()]}),(0,yt.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,yt.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,yt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,yt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,yt.jsx)(wt.User,{className:"h-3 w-3"}),(0,yt.jsx)("span",{children:"System"})]})]}),(0,yt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,yt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,yt.jsx)(wt.Calendar,{className:"h-3 w-3"}),(0,yt.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,yt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,yt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,yt.jsx)(wt.Clock,{className:"h-3 w-3"}),(0,yt.jsxs)("span",{children:[o.toLocaleDateString()," at ",o.toLocaleTimeString()]})]})]})]})]})]})};var dr=({isOpen:e,onClose:t,task:a,epics:o,sprints:i,onUpdateTask:s,onDeleteTask:d})=>{let[l,g]=(0,ce.useState)(new Date),[m,c]=(0,ce.useState)("idle"),[p,b]=(0,ce.useState)("idle"),[w,I]=(0,ce.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working on the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),U=async(A,Y)=>{if(Y!==a[A]){c("loading");try{await s(a.id,{[A]:Y}),g(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},y=async(A,Y)=>{if(Y!==a[A]){c("loading");try{await s(a.id,{[A]:Y}),g(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},$=A=>{let Y={id:Date.now().toString(),text:A,author:"Current User",createdAt:new Date};I([...w,Y])},z=async()=>{b("loading");try{await d(a.id),b("success"),setTimeout(()=>{t(),b("idle")},1e3)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}},W=m!=="loading"&&p!=="loading",oe=()=>{W&&t()},x=()=>m==="loading"?(0,yt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,yt.jsx)(wt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,yt.jsx)("span",{children:"Updating..."})]}):m==="success"?(0,yt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,yt.jsx)(wt.Check,{className:"h-4 w-4"}),(0,yt.jsx)("span",{children:"Updated successfully"})]}):m==="error"?(0,yt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,yt.jsx)(wt.yt,{className:"h-4 w-4"}),(0,yt.jsx)("span",{children:"Update failed"})]}):null;return(0,yt.jsx)(et,{open:e,onOpenChange:oe,children:(0,yt.jsxs)(_e,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,yt.jsxs)(We,{children:[(0,yt.jsx)(Ke,{className:"ce-only",children:a.title}),(0,yt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yt.jsx)("div",{className:"flex-1",children:x()}),!W&&(0,yt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,yt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,yt.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,yt.jsx)(Fa,{fieldName:"title",value:a.title,label:"",onSave:U,className:"border-b border-border pb-3",disabled:m==="loading"}),(0,yt.jsx)(Fa,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:U,disabled:m==="loading"}),(0,yt.jsx)(ir,{comments:w,onAddComment:$})]}),(0,yt.jsx)(lr,{task:a,epics:o,sprints:i,lastUpdated:l,onUpdateTask:y,onClose:oe,onDelete:z,isUpdating:m==="loading",isDeleting:p==="loading",deleteState:p})]})]})})};var sa=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,i]=(0,ce.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),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"],d=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],l=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],g=c=>{c.preventDefault(),o.name.trim()&&(a({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}),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())},m=(c,p)=>{i(b=>({...b,[c]:p}))};return(0,yt.jsx)(et,{open:e,onOpenChange:t,children:(0,yt.jsxs)(_e,{className:"sm:max-w-md",children:[(0,yt.jsx)(We,{children:(0,yt.jsx)(Ke,{children:"Add New Epic"})}),(0,yt.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"name",children:"Epic Name"}),(0,yt.jsx)(B,{id:"name",value:o.name,onChange:c=>m("name",c.target.value),placeholder:"Enter epic name",required:!0})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"description",children:"Description"}),(0,yt.jsx)(Ce,{id:"description",value:o.description,onChange:c=>m("description",c.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"Color"}),(0,yt.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(c=>(0,yt.jsx)("button",{type:"button",onClick:()=>m("color",c),className:`w-8 h-8 rounded-full ${c} ${o.color===c?"ring-2 ring-gray-400":""}`},c))})]}),(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"Confidence"}),(0,yt.jsxs)(ue,{value:o.confidence,onValueChange:c=>m("confidence",c),children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{})}),(0,yt.jsx)(de,{children:d.map(c=>(0,yt.jsx)(F,{value:c.value,children:c.label},c.value))})]})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"Phase"}),(0,yt.jsxs)(ue,{value:o.phase.toString(),onValueChange:c=>m("phase",parseInt(c)),children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{})}),(0,yt.jsx)(de,{children:l.map(c=>(0,yt.jsx)(F,{value:c.value.toString(),children:c.label},c.value))})]})]})]}),(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"Start Date"}),(0,yt.jsx)(B,{type:"date",value:o.startDate,onChange:c=>m("startDate",c.target.value)})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"End Date"}),(0,yt.jsx)(B,{type:"date",value:o.endDate,onChange:c=>m("endDate",c.target.value)})]})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"Progress (%)"}),(0,yt.jsx)(B,{type:"number",min:"0",max:"100",value:o.progress,onChange:c=>m("progress",parseInt(c.target.value)||0)})]}),(0,yt.jsxs)(Ht,{children:[(0,yt.jsx)(N,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,yt.jsx)(N,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var pr=require("motion/react");function mr(e,t){let[a,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}}),i=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,ce.useEffect)(()=>{i(a)},[]),[a,i]}var la=require("react-icons/pr");function rt({title:e,description:t,badge:a,primaryAction:o,secondaryAction:i,gradient:s,children:d,className:l}){let[g,m]=mr(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!i&&!t),c=!i&&!t||g;return(0,yt.jsxs)(pr.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 ${l||""}`,children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,yt.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,yt.jsx)(be,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,yt.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,yt.jsxs)("div",{className:"flex items-center gap-3",children:[c&&o&&(0,yt.jsx)(N,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(i||t)&&(0,yt.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:()=>m(!g),style:{lineHeight:0},children:g?(0,yt.jsx)(la.FaChevronDown,{size:22}):(0,yt.jsx)(la.FaChevronUp,{size:22})})]})]}),!c&&(0,yt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,yt.jsxs)("div",{className:"space-y-4",children:[(0,yt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,yt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,yt.jsx)(N,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),i&&(0,yt.jsx)(N,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),d&&(0,yt.jsx)("div",{className:"hidden lg:block",children:d})]})]})}var ur=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:i=[],initialProjects:s=[],onAddTask:d,onUpdateTask:l,onDeleteTask:g,onTaskClick:m,onAddEpic:c})=>{let[p,b]=(0,ce.useState)(e),[w,I]=(0,ce.useState)(t),[U,y]=(0,ce.useState)(a),[$,z]=(0,ce.useState)(!1),[W,oe]=(0,ce.useState)(!1),[x,A]=(0,ce.useState)(null),[Y,H]=(0,ce.useState)(null),[T,j]=(0,ce.useState)(o),[fe,P]=(0,ce.useState)(i),Pe=w.filter(L=>!0).map(L=>L.id),Le=U.find(L=>L.isSelected);Pe.push("no-epic"),(0,ce.useEffect)(()=>{b(e)},[e]),(0,ce.useEffect)(()=>{I(t)},[t]),(0,ce.useEffect)(()=>{y(a)},[a]);let Ve=p.filter(L=>{let ee=Pe.includes(L.epicId)||!L.epicId;return!Le||Le.id==="all-tasks"?ee:Le.id==="backlog"?ee&&!L.sprintId:ee&&L.sprintId===Le.id}),h=L=>Ve.filter(ee=>ee.status===L),q=L=>{let ee={};return w.forEach(xe=>{ee[xe.id]=L.filter(Ae=>Ae.epicId===xe.id)}),ee["no-epic"]=L.filter(xe=>!xe.epicId),ee},me=L=>{H(L)},Fe=L=>{Y&&(b(ee=>ee.map(xe=>xe.id===Y.id?{...xe,status:L}:xe)),l?.(Y.id,{status:L}),H(null))},ve=L=>{let ee={...L,id:Date.now().toString(),createdAt:new Date};b(xe=>[...xe,ee]),d?.(L)},re=async(L,ee)=>{b(xe=>xe.map(Ae=>Ae.id===L?{...Ae,...ee}:Ae)),l&&await l(L,ee)},He=async L=>{b(ee=>ee.filter(xe=>xe.id!==L)),x?.id===L&&A(null),g&&await g(L)},Ye=L=>{let ee={...L,id:Date.now().toString(),isSelected:!0};I(xe=>[...xe,ee]),c?.(L)},je=L=>{A(L),m?.(L)};return(0,yt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,yt.jsx)(rt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-yt from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>z(!0)},secondaryAction:{label:"Add epic",onClick:()=>oe(!0)}}),(0,yt.jsx)("div",{className:"flex-1",children:(0,yt.jsxs)("div",{className:"w-full",children:[(0,yt.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"To yt",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(L=>{let ee=h(L.status),xe=q(ee);return(0,yt.jsx)(Ko,{title:L.title,status:L.status,taskCount:ee.length,onDrop:Fe,isCompact:L.status==="done",children:Pe.map(Ae=>{let st=w.find(nt=>nt.id===Ae),bt=xe[Ae]||[];return bt.length===0?null:(0,yt.jsxs)("div",{className:"mb-6",children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,yt.jsx)("div",{className:`w-3 h-3 rounded-full ${st?.color}`}),(0,yt.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:st?.name||"No Epic"}),(0,yt.jsx)(be,{variant:"secondary",className:"text-xs",children:bt.length})]})," ",(0,yt.jsx)("div",{className:"space-y-3",children:bt.map(nt=>(0,yt.jsx)(Qt,{task:nt,epic:st,onDragStart:me,onTaskClick:je,isCompact:L.status==="done"},nt.id))})]},Ae)})},L.id)})}),(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(ta,{isOpen:$,onClose:()=>z(!1),onAddTask:ve,assignees:[...fe,...T],epics:w,sprints:U}),(0,yt.jsx)(sa,{isOpen:W,onClose:()=>oe(!1),onAddEpic:Ye}),x&&(0,yt.jsx)(dr,{isOpen:!!x,onClose:()=>A(null),task:x,epics:w,sprints:U,onUpdateTask:re,onDeleteTask:He})]})]})})]})};var gr=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddTaskToEpic:s,onAddEpic:d,onUpdateEpic:l,onDeleteEpic:g})=>{let[m,c]=(0,ce.useState)(null),[p,b]=(0,ce.useState)(null),[w,I]=(0,ce.useState)({}),U=T=>{c(T)},y=T=>{T.preventDefault()},$=(T,j)=>{T.preventDefault(),m&&m.epicId!==j&&(o(m.id,{epicId:j}),c(null))},z=T=>e.filter(j=>j.epicId===T),W=T=>{b(T.id),I({name:T.name,description:T.description,confidence:T.confidence,phase:T.phase,progress:T.progress})},oe=()=>{p&&w.name&&(l(p,w),b(null),I({}))},x=()=>{b(null),I({})},A=T=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&g(T)},Y=T=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[T]||`Phase ${T}`,H=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,yt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,yt.jsx)(rt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-yt from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:d}}),(0,yt.jsx)("div",{className:"flex-1",children:(0,yt.jsx)("div",{className:"w-full",children:(0,yt.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.map(T=>{let j=z(T.id),fe=j.reduce((P,Pe)=>P+Pe.points,0);return(0,yt.jsxs)(se,{className:`flex flex-col ${p===T.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:y,onDrop:P=>$(P,T.id),children:[(0,yt.jsx)("div",{className:"p-4 border-b border-border",children:p===T.id?(0,yt.jsxs)("div",{className:"space-y-4",children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,yt.jsx)(B,{value:w.name||"",onChange:P=>I({...w,name:P.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,yt.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:oe,className:"p-1 h-8 w-8",children:(0,yt.jsx)(wt.Check,{className:"h-4 w-4"})}),(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:x,className:"p-1 h-8 w-8",children:(0,yt.jsx)(wt.yt,{className:"h-4 w-4"})})]})]}),(0,yt.jsx)(Ce,{value:w.description||"",onChange:P=>I({...w,description:P.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,yt.jsxs)("div",{children:[(0,yt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,yt.jsxs)(ue,{value:w.confidence||T.confidence,onValueChange:P=>I({...w,confidence:P}),children:[(0,yt.jsx)(le,{className:"text-xs",children:(0,yt.jsx)(Ne,{})}),(0,yt.jsxs)(de,{children:[(0,yt.jsx)(F,{value:"low",children:"Low"}),(0,yt.jsx)(F,{value:"medium",children:"Medium"}),(0,yt.jsx)(F,{value:"high",children:"High"})]})]})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,yt.jsxs)(ue,{value:w.phase?.toString()||T.phase.toString(),onValueChange:P=>I({...w,phase:parseInt(P)}),children:[(0,yt.jsx)(le,{className:"text-xs",children:(0,yt.jsx)(Ne,{})}),(0,yt.jsx)(de,{children:[1,2,3,4,5,6,7,8,9].map(P=>(0,yt.jsxs)(F,{value:P.toString(),children:["Phase ",P]},P))})]})]})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,yt.jsx)(B,{type:"number",min:"0",max:"100",value:w.progress||T.progress,onChange:P=>I({...w,progress:parseInt(P.target.value)||0}),className:"text-xs"})]})]}):(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,yt.jsx)("div",{className:`w-4 h-4 rounded-full ${T.color}`}),(0,yt.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:T.name}),(0,yt.jsxs)("div",{className:"flex gap-1",children:[(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>W(T),className:"p-1 h-8 w-8",children:(0,yt.jsx)(wt.Edit2,{className:"h-3 w-3"})}),(0,yt.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>A(T.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,yt.jsx)(wt.Trash2,{className:"h-3 w-3"})})]})]}),(0,yt.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,yt.jsxs)(be,{className:`text-xs ${H(T.confidence)}`,children:[T.confidence," confidence"]}),(0,yt.jsxs)(be,{variant:"outline",className:"text-xs",children:["Phase ",T.phase]}),(0,yt.jsxs)(be,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[j.length," tasks"]}),(0,yt.jsxs)(be,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[fe," pts"]})]}),T.description&&(0,yt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:T.description}),(0,yt.jsxs)("div",{className:"mb-3",children:[(0,yt.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,yt.jsx)("span",{className:"select-none",children:"Progress"}),(0,yt.jsxs)("span",{className:"select-none",children:[T.progress,"%"]})]}),(0,yt.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,yt.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${T.progress}%`}})})]}),(0,yt.jsxs)(N,{onClick:()=>s(T.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,yt.jsx)(wt.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,yt.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,yt.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:j.length===0?(0,yt.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,yt.jsx)(wt.Move,{className:"h-8 w-8 mb-2"}),(0,yt.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):j.map(P=>(0,yt.jsx)(Qt,{task:P,epic:T,onDragStart:U,onTaskClick:i,isCompact:!0},P.id))})})]},T.id)})})})})]})};var fr=require("react-day-picker");function ca({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,yt.jsx)(fr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:u("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:u(Xt({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 mt-2",cell:u("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-yt-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-yt-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-yt-md":"[&:has([aria-selected])]:rounded-md"),day:u(Xt({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})}ca.displayName="Calendar";var br=ie(require("react")),it=ie(require("@radix-ui/react-popover"));var Ha=it.Root,ja=it.Trigger;var ma=br.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},i)=>(0,yt.jsx)(it.Portal,{children:(0,yt.jsx)(it.Content,{ref:i,align:t,sideOffset:a,className:u("z-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})}));ma.displayName=it.Content.displayName;var $a=require("date-fns");var xr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,i]=(0,ce.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),s=l=>{l.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},d=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,yt.jsx)(et,{open:e,onOpenChange:d,children:(0,yt.jsxs)(_e,{className:"sm:max-w-md",children:[(0,yt.jsx)(We,{children:(0,yt.jsx)(Ke,{children:"Add New Sprint"})}),(0,yt.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"name",children:"Sprint Name *"}),(0,yt.jsx)(B,{id:"name",value:o.name,onChange:l=>i(g=>({...g,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{htmlFor:"description",children:"Description"}),(0,yt.jsx)(Ce,{id:"description",value:o.description,onChange:l=>i(g=>({...g,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"Start Date *"}),(0,yt.jsxs)(Ha,{children:[(0,yt.jsx)(ja,{asChild:!0,children:(0,yt.jsxs)(N,{variant:"outline",className:u("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,yt.jsx)(wt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,$a.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,yt.jsx)(ma,{className:"w-auto p-0",align:"start",children:(0,yt.jsx)(ca,{mode:"single",selected:o.startDate,onSelect:l=>i(g=>({...g,startDate:l})),initialFocus:!0})})]})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)(k,{children:"End Date *"}),(0,yt.jsxs)(Ha,{children:[(0,yt.jsx)(ja,{asChild:!0,children:(0,yt.jsxs)(N,{variant:"outline",className:u("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,yt.jsx)(wt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,$a.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,yt.jsx)(ma,{className:"w-auto p-0",align:"start",children:(0,yt.jsx)(ca,{mode:"single",selected:o.endDate,onSelect:l=>i(g=>({...g,endDate:l})),initialFocus:!0,disabled:l=>o.startDate?l<o.startDate:!1})})]})]})]}),(0,yt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,yt.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:l=>i(g=>({...g,isActive:l.target.checked})),className:"rounded border-gray-300"}),(0,yt.jsx)(k,{htmlFor:"isActive",children:"Set as active sprint"})]}),(0,yt.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,yt.jsx)(N,{type:"button",variant:"outline",onClick:d,children:"Cancel"}),(0,yt.jsx)(N,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var yr=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddSprint:s})=>{let[d,l]=(0,ce.useState)(["2"]),[g,m]=(0,ce.useState)(null),[c,p]=(0,ce.useState)(!1),[b,w]=(0,ce.useState)(null),[I,U]=(0,ce.useState)(e.filter(h=>!h.sprintId)),[y,$]=(0,ce.useState)(e.filter(h=>h.sprintId&&d.includes(h.sprintId))),[z,W]=(0,ce.useState)(a.filter(h=>h.id!=="backlog"&&h.id!=="all-tasks").sort((h,q)=>h.startDate.getTime()-q.startDate.getTime()));(0,ce.useEffect)(()=>{U(e.filter(h=>!h.sprintId)),$(e.filter(h=>h.sprintId&&d.includes(h.sprintId))),W(a.filter(h=>h.id!=="backlog"&&h.id!=="all-tasks").sort((h,q)=>h.startDate.getTime()-q.startDate.getTime()))},[e,a,d]);let oe=h=>t.find(q=>q.id===h),x=h=>a.find(q=>q.id===h),A=h=>{switch(h){case"high":return"bg-destructive/20 text-destructive";case"medium":return"bg-warning/20 text-warning";case"low":return"bg-success/20 text-success";default:return"bg-muted text-muted-foreground"}},Y=h=>h.split(" ").map(q=>q[0]).join("").toUpperCase(),H=h=>{m(h)},T=h=>{h.preventDefault()},j=h=>{w(h)},fe=()=>{w(null)},P=(h,q)=>{h.preventDefault(),w(null),g&&(o(g.id,{sprintId:q==="backlog"?void 0:q}),m(null))},Pe=h=>{h==="backlog"||h==="all-tasks"||l(q=>q.includes(h)?q.filter(me=>me!==h):[...q,h])},Le=h=>{s(h),p(!1)},Ve=({task:h,showSprint:q=!1})=>{let me=oe(h.epicId),Fe=h.sprintId?x(h.sprintId):null,[ve,re]=(0,ce.useState)(!1),He=at=>{at.defaultPrevented||ve||i(h)},Ye=at=>{re(!0),H(h)},je=()=>{re(!1)};return(0,yt.jsx)(se,{className:`p-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${ve?"opacity-50 shadow-lg scale-105":""} ${g?.id===h.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:Ye,onDragEnd:je,onClick:He,children:(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,yt.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:h.title}),(0,yt.jsx)(be,{className:`text-xs select-none pointer-events-none ${A(h.priority)}`,children:h.priority[0].toUpperCase()})]}),(0,yt.jsxs)("div",{className:"flex items-center justify-between text-xs pointer-events-none",children:[(0,yt.jsxs)("div",{className:"flex items-center gap-1",children:[me&&(0,yt.jsx)("div",{className:`w-2 h-2 rounded-full ${me.color}`}),(0,yt.jsx)("span",{className:"text-muted-foreground truncate select-none",children:me?.name})]}),(0,yt.jsx)("span",{className:"text-muted-foreground select-none",children:Y(h.assignee)})]}),q&&Fe&&(0,yt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[(0,yt.jsx)(wt.Calendar,{className:"h-3 w-3"}),(0,yt.jsx)("span",{className:"select-none",children:Fe.name})]})]})})};return(0,yt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,yt.jsx)(rt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-yt from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>p(!0)}}),(0,yt.jsx)("div",{className:"flex-1",children:(0,yt.jsxs)("div",{className:"w-full",children:[(0,yt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,yt.jsx)("div",{className:"lg:col-span-1",children:(0,yt.jsxs)(se,{className:"p-4 h-full bg-card shadow-sm",onDragOver:T,onDragEnter:()=>j("backlog"),onDragLeave:fe,onDrop:h=>P(h,"backlog"),children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,yt.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,yt.jsx)(be,{variant:"secondary",className:"bg-muted text-muted-foreground",children:I.length})]}),(0,yt.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${b==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[I.map(h=>(0,yt.jsx)(Ve,{task:h},h.id)),I.length===0&&(0,yt.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"})]})]})}),(0,yt.jsx)("div",{className:"lg:col-span-3",children:(0,yt.jsxs)("div",{className:"space-y-4",children:[(0,yt.jsxs)(se,{className:"p-4 bg-card shadow-sm",children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,yt.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),(0,yt.jsxs)(N,{onClick:()=>p(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,yt.jsx)(wt.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,yt.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:z.map(h=>(0,yt.jsxs)(N,{variant:d.includes(h.id)?"default":"outline",size:"sm",onClick:()=>Pe(h.id),className:"text-xs h-8",children:[h.name,h.isActive&&(0,yt.jsx)("span",{className:"ml-1 text-success",children:"\u25CF"})]},h.id))})]}),(0,yt.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(h=>z.find(q=>q.id===h)).filter(Boolean).sort((h,q)=>h.startDate.getTime()-q.startDate.getTime()).map(h=>{let q=y.filter(me=>me.sprintId===h.id);return(0,yt.jsxs)(se,{className:"p-4 bg-card shadow-sm",onDragOver:T,onDragEnter:()=>j(h.id),onDragLeave:fe,onDrop:me=>P(me,h.id),children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,yt.jsxs)("div",{children:[(0,yt.jsx)("h3",{className:"font-semibold text-foreground select-none",children:h.name}),h.isActive&&(0,yt.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,yt.jsx)(be,{variant:"secondary",className:"bg-muted text-muted-foreground",children:q.length})]}),(0,yt.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${b===h.id?"border-primary bg-primary/10":"border-border"}`,children:[q.map(me=>(0,yt.jsx)(Ve,{task:me},me.id)),q.length===0&&(0,yt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},h.id)})})," "]})})]}),(0,yt.jsx)(xr,{isOpen:c,onClose:()=>p(!1),onAddSprint:Le})]})})]})};var Fs=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},Bs=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),zs=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Ga=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[i,s]=t.split(":");o.setHours(parseInt(i),parseInt(s))}return o<a},_a=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Os=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Vs=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[i,s]=(0,ce.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[d,l]=(0,ce.useState)(!1),g=c=>{c.preventDefault();let p=e.find(w=>w?.id.toString()===i.colleagueId.toString());if(!p){console.error("No valid colleague selected"),l(!0);return}l(!1);let b={title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:p,isCompleted:!1,isRecurring:i.isRecurring,recurrencePattern:i.isRecurring?i.recurrencePattern:void 0,recurrenceInterval:i.isRecurring?i.recurrenceInterval:void 0,priority:i.priority,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderEnabled?i.reminderMinutes:void 0,tags:i.tags?i.tags.split(",").map(w=>w.trim()):void 0};t(b),o(!1),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ce.useEffect)(()=>{i.colleagueId&&l(!1)},[i.colleagueId]);let m=e.filter(Boolean);return(0,yt.jsx)(et,{open:a,onOpenChange:o,children:(0,yt.jsxs)(_e,{className:"max-w-2xl",children:[(0,yt.jsx)(We,{children:(0,yt.jsx)(Ke,{children:"Add New Reminder"})}),(0,yt.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,yt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"title",children:"Title"}),(0,yt.jsx)(B,{id:"title",value:i.title,onChange:c=>s({...i,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"description",children:"Description"}),(0,yt.jsx)(Ce,{id:"description",value:i.description,onChange:c=>s({...i,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"dueDate",children:"Due Date"}),(0,yt.jsx)(B,{id:"dueDate",type:"date",value:i.dueDate,onChange:c=>s({...i,dueDate:c.target.value}),required:!0})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,yt.jsx)(B,{id:"dueTime",type:"time",value:i.dueTime,onChange:c=>s({...i,dueTime:c.target.value})})]})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{className:`${d?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,yt.jsxs)(ue,{value:i.colleagueId,onValueChange:c=>{s({...i,colleagueId:c})},required:!0,children:[(0,yt.jsx)(le,{className:`${d?"text-destructive border-red-500":""}`,children:(0,yt.jsx)(Ne,{className:`${d?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(c=>c?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,yt.jsx)(de,{children:m.map(c=>(0,yt.jsx)(F,{value:c.id,children:c.name},c.id))})]}),d&&(0,yt.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,yt.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:c=>s({...i,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,yt.jsx)(k,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,yt.jsxs)(ue,{value:i.recurrencePattern,onValueChange:c=>s({...i,recurrencePattern:c}),children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{})}),(0,yt.jsxs)(de,{children:[(0,yt.jsx)(F,{value:"daily",children:"Daily"}),(0,yt.jsx)(F,{value:"weekly",children:"Weekly"}),(0,yt.jsx)(F,{value:"monthly",children:"Monthly"}),(0,yt.jsx)(F,{value:"yearly",children:"Yearly"})]})]})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"recurrenceInterval",children:"Every"}),(0,yt.jsx)(B,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:c=>s({...i,recurrenceInterval:parseInt(c.target.value)})})]})]})]}),(0,yt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,yt.jsx)(N,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,yt.jsx)(N,{type:"submit",children:"Add Reminder"})]})]})]})})},Hs=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:i})=>{let[s,d]=(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(", ")||""}),l=m=>{m.preventDefault();let c=t.find(p=>p?.id===s.colleagueId);if(!c){console.error("No valid colleague selected");return}a(e.id,{title:s.title,description:s.description,dueDate:new Date(s.dueDate),dueTime:s.dueTime||void 0,colleague:c,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(p=>p.trim()):void 0}),i()},g=t.filter(Boolean);return(0,yt.jsx)(et,{open:o,onOpenChange:i,children:(0,yt.jsxs)(_e,{className:"max-w-2xl",children:[(0,yt.jsx)(We,{children:(0,yt.jsx)(Ke,{children:"Edit Reminder"})}),(0,yt.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"edit-title",children:"Title"}),(0,yt.jsx)(B,{id:"edit-title",value:s.title,onChange:m=>d({...s,title:m.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"edit-priority",children:"Priority"}),(0,yt.jsxs)(ue,{value:s.priority,onValueChange:m=>d({...s,priority:m}),children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{})}),(0,yt.jsxs)(de,{children:[(0,yt.jsx)(F,{value:"low",children:"\u{1F7E2} Low"}),(0,yt.jsx)(F,{value:"medium",children:"\u{1F7E1} Medium"}),(0,yt.jsx)(F,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"edit-description",children:"Description"}),(0,yt.jsx)(Ce,{id:"edit-description",value:s.description,onChange:m=>d({...s,description:m.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,yt.jsx)(B,{id:"edit-dueDate",type:"date",value:s.dueDate,onChange:m=>d({...s,dueDate:m.target.value}),required:!0})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,yt.jsx)(B,{id:"edit-dueTime",type:"time",value:s.dueTime,onChange:m=>d({...s,dueTime:m.target.value})})]})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,yt.jsxs)(ue,{value:s.colleagueId,onValueChange:m=>d({...s,colleagueId:m}),required:!0,children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{placeholder:"Select a digital colleague"})}),(0,yt.jsx)(de,{children:g.map(m=>(0,yt.jsx)(F,{value:m.id,children:m.name},m.id))})]})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,yt.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:s.isRecurring,onChange:m=>d({...s,isRecurring:m.target.checked}),className:"rounded border-border"}),(0,yt.jsx)(k,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),s.isRecurring&&(0,yt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,yt.jsxs)(ue,{value:s.recurrencePattern,onValueChange:m=>d({...s,recurrencePattern:m}),children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{})}),(0,yt.jsxs)(de,{children:[(0,yt.jsx)(F,{value:"daily",children:"Daily"}),(0,yt.jsx)(F,{value:"weekly",children:"Weekly"}),(0,yt.jsx)(F,{value:"monthly",children:"Monthly"}),(0,yt.jsx)(F,{value:"yearly",children:"Yearly"})]})]})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,yt.jsx)(B,{id:"edit-recurrenceInterval",type:"number",min:"1",value:s.recurrenceInterval,onChange:m=>d({...s,recurrenceInterval:parseInt(m.target.value)})})]})]})]}),(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,yt.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:s.reminderEnabled,onChange:m=>d({...s,reminderEnabled:m.target.checked}),className:"rounded border-border"}),(0,yt.jsx)(k,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),s.reminderEnabled&&(0,yt.jsxs)("div",{className:"pl-6",children:[(0,yt.jsx)(k,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,yt.jsxs)(ue,{value:s.reminderMinutes.toString(),onValueChange:m=>d({...s,reminderMinutes:parseInt(m)}),children:[(0,yt.jsx)(le,{children:(0,yt.jsx)(Ne,{})}),(0,yt.jsxs)(de,{children:[(0,yt.jsx)(F,{value:"5",children:"5 minutes before"}),(0,yt.jsx)(F,{value:"15",children:"15 minutes before"}),(0,yt.jsx)(F,{value:"30",children:"30 minutes before"}),(0,yt.jsx)(F,{value:"60",children:"1 hour before"}),(0,yt.jsx)(F,{value:"1440",children:"1 day before"})]})]})]})]}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)(k,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,yt.jsx)(B,{id:"edit-tags",value:s.tags,onChange:m=>d({...s,tags:m.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,yt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,yt.jsx)(N,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,yt.jsx)(N,{type:"submit",children:"Save Changes"})]})]})]})})},js=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[i,s]=(0,ce.useState)(!1);if(!e||!e.id)return null;let d=Ga(e.dueDate,e.dueTime),l=_a(e.dueDate),g=Os(e.dueDate),m=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},c=()=>l?"Today":g?"Tomorrow":d&&!e.isCompleted?"Overdue":Bs(e.dueDate);return(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(Hs,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>s(!1)}),(0,yt.jsx)(se,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${d&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,yt.jsx)(Et,{className:"p-4",children:(0,yt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,yt.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,yt.jsx)("button",{onClick:m,className:"mt-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,yt.jsx)(wt.CheckCircle,{className:"h-5 w-5"}):(0,yt.jsx)(wt.Circle,{className:"h-5 w-5"})}),(0,yt.jsxs)("div",{className:"flex-1",children:[(0,yt.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,yt.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,yt.jsx)("span",{className:"text-sm",children:Fs(e.priority)}),e.isRecurring&&(0,yt.jsx)(wt.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,yt.jsx)(wt.Bell,{className:"h-4 w-4 text-success"})]}),(0,yt.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,yt.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,yt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,yt.jsx)(wt.Calendar,{className:"h-4 w-4"}),(0,yt.jsx)("span",{className:d&&!e.isCompleted?"text-destructive font-medium":"",children:c()})]}),e.dueTime&&(0,yt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,yt.jsx)(wt.Clock,{className:"h-4 w-4"}),(0,yt.jsx)("span",{children:zs(e.dueTime)})]}),(0,yt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,yt.jsx)(wt.User,{className:"h-4 w-4"}),(0,yt.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,yt.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map((p,b)=>(0,yt.jsx)(be,{variant:"secondary",className:"text-xs",children:p},b))})]})]}),(0,yt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,yt.jsx)(N,{variant:"ghost",size:"sm",onClick:()=>s(!0),className:"h-8 w-8 p-0",children:(0,yt.jsx)(wt.Edit2,{className:"h-4 w-4"})}),(0,yt.jsx)(N,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,yt.jsx)(wt.Trash2,{className:"h-4 w-4"})})]})]})})})]})},wr=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:i})=>{let[s,d]=(0,ce.useState)(e.filter(Boolean)),[l]=(0,ce.useState)(t.filter(Boolean)),[g,m]=(0,ce.useState)("all"),[c,p]=(0,ce.useState)(""),[b,w]=(0,ce.useState)(!1),I=x=>{if(!x.title||!x.colleague?.id){console.error("Invalid reminder data:",x);return}let A={...x,id:Date.now().toString(),createdAt:new Date};d(Y=>[...Y,A]),a?.(x)},U=(x,A)=>{if(!x){console.error("No reminder ID provided for update");return}d(Y=>Y.map(H=>H?.id===x?{...H,...A}:H)),o?.(x,A)},y=x=>{if(!x){console.error("No reminder ID provided for deletion");return}d(A=>A.filter(Y=>Y?.id!==x)),i?.(x)},z=s.filter(x=>{if(!x)return!1;if(c){let A=c.toLowerCase();if(!(x.title.toLowerCase().includes(A)||x.description.toLowerCase().includes(A)||x.colleague?.name?.toLowerCase().includes(A)||x.tags?.some(H=>H.toLowerCase().includes(A))))return!1}switch(g){case"pending":return!x.isCompleted;case"completed":return x.isCompleted;case"overdue":return!x.isCompleted&&Ga(x.dueDate,x.dueTime);case"today":return _a(new Date(x.dueDate));default:return!0}}).sort((x,A)=>{if(!x||!A)return 0;if(x.isCompleted&&!A.isCompleted)return 1;if(!x.isCompleted&&A.isCompleted)return-1;let Y={high:3,medium:2,low:1},H=Y[A.priority]-Y[x.priority];return H!==0?H:x.dueDate.getTime()-A.dueDate.getTime()}),W={total:s.filter(Boolean).length,pending:s.filter(x=>x&&!x.isCompleted).length,completed:s.filter(x=>x&&x.isCompleted).length,overdue:s.filter(x=>x&&!x.isCompleted&&Ga(x.dueDate,x.dueTime)).length,today:s.filter(x=>x&&_a(new Date(x.dueDate))).length},oe=l.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,yt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,yt.jsx)(rt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-yt from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{w(!0)}}}),(0,yt.jsxs)("div",{className:"h-full bg-background",children:[(0,yt.jsx)(Vs,{colleagues:l,onAddReminder:I,open:b,setOpen:w}),(0,yt.jsxs)("div",{className:"p-6",children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,yt.jsxs)("div",{children:[(0,yt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,yt.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,yt.jsxs)(N,{className:"flex items-center space-x-2",onClick:()=>w(!0),children:[(0,yt.jsx)(wt.Plus,{className:"h-4 w-4"}),(0,yt.jsx)("span",{children:"Add Reminder"})]})]}),(0,yt.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,yt.jsxs)(se,{className:"p-4",children:[(0,yt.jsx)("div",{className:"text-2xl font-bold text-foreground",children:W.total}),(0,yt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,yt.jsxs)(se,{className:"p-4",children:[(0,yt.jsx)("div",{className:"text-2xl font-bold text-primary",children:W.pending}),(0,yt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,yt.jsxs)(se,{className:"p-4",children:[(0,yt.jsx)("div",{className:"text-2xl font-bold text-success",children:W.completed}),(0,yt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,yt.jsxs)(se,{className:"p-4",children:[(0,yt.jsx)("div",{className:"text-2xl font-bold text-destructive",children:W.overdue}),(0,yt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,yt.jsxs)(se,{className:"p-4",children:[(0,yt.jsx)("div",{className:"text-2xl font-bold text-warning",children:W.today}),(0,yt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,yt.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,yt.jsx)("div",{className:"flex-1",children:(0,yt.jsx)(B,{placeholder:"Search reminders...",value:c,onChange:x=>p(x.target.value),className:"max-w-md"})}),(0,yt.jsxs)(ue,{value:g,onValueChange:x=>m(x),children:[(0,yt.jsx)(le,{className:"w-40",children:(0,yt.jsx)(Ne,{})}),(0,yt.jsxs)(de,{children:[(0,yt.jsxs)(F,{value:"all",children:["All (",W.total,")"]}),(0,yt.jsxs)(F,{value:"pending",children:["Pending (",W.pending,")"]}),(0,yt.jsxs)(F,{value:"completed",children:["Completed (",W.completed,")"]}),(0,yt.jsxs)(F,{value:"overdue",children:["Overdue (",W.overdue,")"]}),(0,yt.jsxs)(F,{value:"today",children:["Today (",W.today,")"]})]})]})]}),(0,yt.jsx)("div",{className:"space-y-4",children:z.length===0?(0,yt.jsxs)(se,{className:"p-8 text-center",children:[(0,yt.jsx)("div",{className:"text-muted-foreground",children:c||g!=="all"?"No reminders match your filters":"No reminders yet"}),!c&&g==="all"&&(0,yt.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):z.map(x=>x&&(0,yt.jsx)(js,{reminder:x,colleagues:l,onUpdateReminder:U,onDeleteReminder:y},x.id))})]})]})]})};var Tt=ie(require("@radix-ui/react-tabs"));function Nr({className:e,...t}){return(0,yt.jsx)(Tt.Root,{"data-slot":"tabs",className:u("flex flex-col gap-2",e),...t})}function Sr({className:e,...t}){return(0,yt.jsx)(Tt.List,{"data-slot":"tabs-list",className:u("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Cr({className:e,...t}){return(0,yt.jsx)(Tt.Trigger,{"data-slot":"tabs-trigger",className:u("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var mt=ie(require("react")),Z=ie(require("@radix-ui/react-dropdown-menu"));var Dr=Z.Root,Tr=Z.Trigger;var Us=mt.forwardRef(({className:e,inset:t,children:a,...o},i)=>(0,yt.jsxs)(Z.SubTrigger,{ref:i,className:u("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,yt.jsx)(Io.ChevronRightIcon,{className:"ml-auto"})]}));Us.displayName=Z.SubTrigger.displayName;var $s=mt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(Z.SubContent,{ref:a,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...t}));$s.displayName=Z.SubContent.displayName;var Wa=mt.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,yt.jsx)(Z.Portal,{children:(0,yt.jsx)(Z.Content,{ref:o,sideOffset:t,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",e),...a})}));Wa.displayName=Z.Content.displayName;var Ka=mt.forwardRef(({className:e,inset:t,...a},o)=>(0,yt.jsx)(Z.Item,{ref:o,className:u("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Ka.displayName=Z.Item.displayName;var Gs=mt.forwardRef(({className:e,children:t,checked:a,...o},i)=>(0,yt.jsxs)(Z.CheckboxItem,{ref:i,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,yt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,yt.jsx)(Z.ItemIndicator,{children:(0,yt.jsx)(Io.CheckIcon,{className:"h-4 w-4"})})}),t]}));Gs.displayName=Z.CheckboxItem.displayName;var _s=mt.forwardRef(({className:e,children:t,...a},o)=>(0,yt.jsxs)(Z.RadioItem,{ref:o,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,yt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,yt.jsx)(Z.ItemIndicator,{children:(0,yt.jsx)(Io.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));_s.displayName=Z.RadioItem.displayName;var Ws=mt.forwardRef(({className:e,inset:t,...a},o)=>(0,yt.jsx)(Z.Label,{ref:o,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Ws.displayName=Z.Label.displayName;var Ks=mt.forwardRef(({className:e,...t},a)=>(0,yt.jsx)(Z.Separator,{ref:a,className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Ks.displayName=Z.Separator.displayName;var qs=({className:e,...t})=>(0,yt.jsx)("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});qs.displayName="DropdownMenuShortcut";function kr({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:i="700px",gridCols:s=6}){let d=a.find(l=>l.value===e);return(0,yt.jsxs)(pr.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,yt.jsx)("div",{className:"hidden md:block",children:(0,yt.jsx)(Nr,{value:e,onValueChange:t,children:(0,yt.jsx)(Sr,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:i,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(l=>(0,yt.jsx)(pr.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,yt.jsx)(Cr,{value:l.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:l.label})},l.value))})})}),(0,yt.jsx)("div",{className:"md:hidden",children:(0,yt.jsxs)(Dr,{children:[(0,yt.jsx)(Tr,{asChild:!0,children:(0,yt.jsxs)(N,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[d?.label||"Select",(0,yt.jsx)(wt.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,yt.jsx)(Wa,{align:"center",className:"w-[180px]",children:a.map(l=>(0,yt.jsx)(Ka,{onClick:()=>t?.(l.value),className:`cursor-pointer ${e===l.value?"bg-accent":""}`,children:l.label},l.value))})]})})]})}function ga({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:i=!0,className:s}){return(0,yt.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${s||""}`,children:[i&&(0,yt.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,yt.jsx)("div",{className:"col-span-6",children:"Name"}),(0,yt.jsx)("div",{className:"col-span-2",children:"Size"}),(0,yt.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,yt.jsx)("div",{className:"divide-y",children:e.map(d=>(0,yt.jsxs)(pr.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(d),children:[(0,yt.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,yt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,yt.jsx)("div",{children:(0,yt.jsx)("p",{className:"font-medium",children:d.name})})]}),(0,yt.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:d.filesize}),(0,yt.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,yt.jsx)("span",{className:"text-sm md:text-base",children:typeof d.createdAt=="string"?d.createdAt:d.createdAt.toLocaleDateString()}),(0,yt.jsx)("div",{className:"flex gap-1",children:(0,yt.jsx)(N,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:l=>{l.stopPropagation(),o?.(d)},children:(0,yt.jsx)(wt.Trash2,{className:"h-4 w-4"})})})]})]},d.name))})]})}function Ja({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:i,compactView:s=!1,className:d}){let[l,g]=(0,ce.useState)(e),[m,c]=(0,ce.useState)(""),[p,b]=(0,ce.useState)("all"),[w,I]=(0,ce.useState)("all");(0,ce.useEffect)(()=>{g(e)},[e]);let U=Array.from(new Set(l.map(H=>H.mimeType))),y=l.filter(H=>{let T=H.name.toLowerCase().includes(m.toLowerCase()),j=p==="all"||H.mimeType===p;return T&&j}),$=y.slice(0,10),z=y.filter(Boolean),W=()=>{t?.()},oe=H=>{a?.(H)},x=H=>{console.log("deleting file",H),g(T=>T.filter(j=>j.name!==H.name)),o?.(H.id)},A=H=>{i?.(H)},Y=()=>{c(""),b("all")};return(0,yt.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,yt.jsx)(pr.AnimatePresence,{mode:"wait",children:(0,yt.jsx)(pr.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,yt.jsxs)("div",{className:`space-y-6 ${d||""}`,children:[(0,yt.jsx)(rt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-yt from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:W},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,yt.jsx)(se,{children:(0,yt.jsx)(Et,{className:"pt-6",children:(0,yt.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,yt.jsx)("div",{className:"flex-1",children:(0,yt.jsxs)("div",{className:"relative",children:[(0,yt.jsx)(wt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,yt.jsx)(B,{placeholder:"Search files...",value:m,onChange:H=>c(H.target.value),className:"pl-9"})]})}),(m||p!=="all")&&(0,yt.jsxs)(N,{variant:"outline",onClick:Y,className:"gap-2",children:[(0,yt.jsx)(wt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,yt.jsxs)("div",{className:"space-y-4",children:[(0,yt.jsx)(kr,{activeTab:w,onTabChange:I,tabOptions:[{value:"all",label:`All Files (${y.length})`},{value:"recent",label:`Recent (${$.length})`}],maxWidth:"500px",gridCols:3}),w==="all"&&(0,yt.jsx)(ga,{files:y,onFileClick:A,onFileEdit:oe,onFileDelete:x,showHeader:!s}),w==="recent"&&(0,yt.jsx)(ga,{files:$,onFileClick:A,onFileEdit:oe,onFileDelete:x,showHeader:!s}),w==="shared"&&(0,yt.jsx)(ga,{files:z,onFileClick:A,onFileEdit:oe,onFileDelete:x,showHeader:!s})]}),y.length===0&&(0,yt.jsx)(se,{children:(0,yt.jsx)(Et,{className:"pt-6",children:(0,yt.jsxs)("div",{className:"text-center py-8",children:[(0,yt.jsx)(wt.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,yt.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,yt.jsx)("p",{className:"text-muted-foreground mb-4",children:m||p!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,yt.jsxs)(N,{onClick:W,className:"gap-2",children:[(0,yt.jsx)(wt.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var Ir=require("next/navigation");function Mr({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:i=[],initialReminders:s=[],initialColleagues:d=[],initialUsers:l=[],initialFiles:g=[],initialView:m="kanban",onAddTask:c,onUpdateTask:p,onDeleteTask:b,onTaskClick:w,onAddEpic:I,onUpdateEpic:U,onDeleteEpic:y,onAddTaskToEpic:$,onAddSprint:z,onUpdateSprint:W,onDeleteSprint:oe,onAddProject:x,onUpdateProject:A,onDeleteProject:Y,onFileAdd:H,onFileEdit:T,onFileDelete:j,onFileClick:fe,onAddReminder:P,onUpdateReminder:Pe,onDeleteReminder:Le,onViewChange:Ve,onToggleMobileMenu:h,onTeamClick:q,onTeamChange:me,onCopilotClick:Fe}){let[ve,re]=(0,ce.useState)(t),[He,Ye]=(0,ce.useState)(a),[je,at]=(0,ce.useState)(o),[L,ee]=(0,ce.useState)(i),[xe,Ae]=(0,ce.useState)(s),[st,bt]=(0,ce.useState)(d),[nt,va]=(0,ce.useState)(l),[ba,$t]=(0,ce.useState)(g),[ha,Gt]=(0,ce.useState)(!1),[_t,Ft]=(0,ce.useState)(!1),[Wt,f]=(0,ce.useState)(null),[C,Q]=(0,ce.useState)(null),[Xa,Za]=(0,ce.useState)(null),[ht,Ya]=(0,ce.useState)(m||"kanban"),[Ar,Lr]=(0,ce.useState)(!1),Qa=(0,Ir.useRouter)();(0,ce.useEffect)(()=>{re(t)},[t]),(0,ce.useEffect)(()=>{at(o)},[o]),(0,ce.useEffect)(()=>{Ye(a)},[a]),(0,ce.useEffect)(()=>{ee(i)},[i]),(0,ce.useEffect)(()=>{$t(g)},[g]),(0,ce.useEffect)(()=>{va(l)},[l]),(0,ce.useEffect)(()=>{bt(d)},[d]),(0,ce.useEffect)(()=>{Ae(s)},[s]),(0,ce.useEffect)(()=>{Ya(m)},[m]);let Fr=He.filter(v=>v.isSelected).map(v=>v.id),Kt=je.find(v=>v.isSelected),Br=ve.filter(v=>{let D=Fr.includes(v.epicId);return!Kt||Kt.id==="all-tasks"?D:Kt.id==="backlog"?D&&!v.sprintId:D&&v.sprintId===Kt.id}),Xs=v=>Br.filter(D=>D.status===v),Zs=v=>{let D={};return He.forEach(V=>{D[V.id]=v.filter(ne=>ne.epicId===V.id)}),D},Ys=v=>{Za(v)},Qs=v=>{Xa&&(re(D=>D.map(V=>V.id===Xa.id?{...V,status:v}:V)),Za(null))},eo=v=>{let D={...v,id:Date.now().toString(),createdAt:new Date};re(V=>[...V,D]),c?.(D)},qt=(v,D)=>{re(V=>V.map(ne=>ne.id===v?{...ne,...D}:ne)),p?.(v,D)},en=async(v,D)=>{qt(v,D)},to=v=>{re(D=>D.filter(V=>V.id!==v)),Wt?.id===v&&f(null),b?.(v)},tn=async v=>{to(v)},zr=v=>{let D={...v,id:Date.now().toString(),isSelected:!1};ee(V=>[...V,D]),x?.(v)},Or=(v,D)=>{ee(V=>V.map(ne=>ne.id===v?D.isSelected?(Qa.push(`/project/${v}`),{...ne,...D}):{...ne,...D}:D.isSelected&&v!==ne.id?{...ne,isSelected:!1}:ne)),A?.(v,D)},Vr=v=>{ee(D=>D.filter(V=>V.id!==v)),Y?.(v)},ao=v=>{let D={...v,id:Date.now().toString(),isSelected:!0};Ye(V=>[...V,D]),I?.({...D})},oo=()=>{Ft(!0)},ro=(v,D)=>{Ye(V=>V.map(ne=>ne.id===v?{...ne,...D}:ne)),U?.(v,D)},io=v=>{Ye(D=>D.filter(V=>V.id!==v)),re(D=>D.filter(V=>V.epicId!==v)),y?.(v)},so=v=>{let D={...v,id:Date.now().toString(),isSelected:!1};at(V=>[...V,D]),z?.(v)},Hr=(v,D)=>{at(V=>V.map(ne=>ne.id===v?D.isSelected?{...ne,...D}:{...ne,...D}:D.isSelected&&v!==ne.id?{...ne,isSelected:!1}:ne)),W?.(v,D)},jr=v=>{v==="backlog"||v==="all-tasks"||(at(D=>D.filter(V=>V.id!==v)),re(D=>D.map(V=>V.sprintId===v?{...V,sprintId:void 0}:V)),oe?.(v))},xa=v=>{f(v)},Ur=v=>{v==="planning"&&window.innerWidth<768||(Ya(v),Ve?.(v))},$yt=()=>{Lr(v=>!v),h?.()},an=()=>{Qa.push("/")},on=v=>{console.log("Switching to team:",v)},rn=v=>{console.log("Switching to team:",v)},Gr=v=>{Q(v),Gt(!0)},_r=()=>{Gt(!1),Q(null)},Wr=v=>{let D={...v,id:Date.now().toString(),createdAt:new Date};Ae(V=>[...V,D]),P?.(v)},Kr=(v,D)=>{Ae(V=>V.map(ne=>ne.id===v?{...ne,...D}:ne)),Pe?.(v,D)},qr=v=>{Ae(D=>D.filter(V=>V.id!==v)),Le?.(v)},Jr=()=>{H?.()},Xr=v=>{T?.(v)},Zr=v=>{$t(D=>D.filter(V=>V.name!==v)),j?.(v)},Yr=v=>{fe?.(v)},sn=[{id:"todo",title:"To yt",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],nn=()=>{switch(ht){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},ya=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ln=ya.sort((v,D)=>D.lastUsed.getTime()-v.lastUsed.getTime()).slice(0,3),dn=ya.length>3,cn=ya.slice(3);return(0,yt.jsxs)(Go,{projects:L,epics:He,sprints:je,currentView:ht,onUpdateProject:Or,onDeleteProject:Vr,onAddProject:zr,onUpdateEpic:ro,onDeleteEpic:io,onAddEpic:oo,onAddSprint:so,onUpdateSprint:Hr,onDeleteSprint:jr,onViewChange:Ur,mobileMenuOpen:Ar,onToggleMobileMenu:$yt,children:[ht==="kanban"&&(0,yt.jsx)("div",{className:"h-full",children:(0,yt.jsx)(ur,{initialProjects:L,initialEpics:He,initialSprints:je,initialTasks:ve,initialColleagues:st,initialUsers:nt,onAddTask:eo,onUpdateTask:qt,onDeleteTask:to,onTaskClick:xa,onAddEpic:ao})}),ht==="planning"&&(0,yt.jsx)("div",{className:"hidden md:block h-full",children:(0,yt.jsx)(yr,{tasks:ve,epics:He,sprints:je,onUpdateTask:qt,onTaskClick:xa,onAddSprint:so})}),ht==="tasks"&&(0,yt.jsx)("div",{className:"h-full",children:(0,yt.jsx)(wr,{initialReminders:xe,initialColleagues:st,onAddReminder:Wr,onUpdateReminder:Kr,onDeleteReminder:qr})}),ht==="files"&&(0,yt.jsx)("div",{className:"h-full",children:(0,yt.jsx)(Ja,{initialFiles:ba,onFileAdd:Jr,onFileEdit:Xr,onFileDelete:Zr,onFileClick:Yr,compactView:!1})}),ht==="epics"&&(0,yt.jsx)("div",{className:"h-full",children:(0,yt.jsx)(gr,{tasks:ve,epics:He,sprints:je,onUpdateTask:qt,onTaskClick:xa,onAddTaskToEpic:Gr,onAddEpic:oo,onUpdateEpic:ro,onDeleteEpic:io})}),(0,yt.jsx)(ta,{isOpen:ha,onClose:_r,onAddTask:eo,epics:He,sprints:je,assignees:[...st,...nt],defaultEpicId:C||void 0}),(0,yt.jsx)(sa,{isOpen:_t,onClose:()=>Ft(!1),onAddEpic:ao})]})}
|