@ehfuse/taskbox 0.5.190 → 0.5.191

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/index.js CHANGED
@@ -10,5 +10,5 @@
10
10
  `).replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&amp;/gi,"&").replace(/\n{3,}/g,`
11
11
 
12
12
  `).trim():"";function Sx(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Bt(e.start_date),n=Bt(e.due_date);(t||n)&&o.push(`\uAE30\uAC04: ${t&&n?`${t} ~ ${n}`:t||n}`),e.manager_name&&o.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let r=Uo(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=Tx(e.content);i&&o.push("",i);let l=String(e.note??"").trim();return l&&o.push("",`\uBE44\uACE0: ${l}`),o.join(`
13
- `)}function yx(e){navigator.clipboard.writeText(e).then(()=>(0,Ga.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Ga.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function hr(e,o){let t=Sx(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&yx(t)});return}yx(t)}var Ge=require("react/jsx-runtime");function Os({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1,activityItems:f,activityLoading:m,onLoadActivity:c,onPrint:b}){let p=Je(),[u,d]=(0,ja.useState)(!1),[w,_]=(0,ja.useState)(null),[k,g]=(0,ja.useState)(null),R=e.is_notice?Re(e.icon||To):null,S=!!e.is_notice,z=!!e.is_event,B=S&&o>0&&(e.author_account_seq??0)===o,D=!rn(e,o),M=!z&&(S?B:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsxs)(Wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,Ge.jsx)(Wo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,Ge.jsx)(Cx.default,{})}):null,M&&!s?(0,Ge.jsx)(Wo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${dt(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Ge.jsx)(Wo.Box,{sx:{display:"flex",flexShrink:0,mr:1.5},children:(0,Ge.jsx)(Ut,{onClick:A=>g({anchorEl:A.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC"})})}):null,s||!R?null:(0,Ge.jsx)(Wo.Box,{sx:{display:"flex",px:.5,color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:(0,Ge.jsx)(R,{sx:{fontSize:20}})}),w!==null?(0,Ge.jsx)(Wo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:w,onChange:A=>_(A.target.value),onBlur:()=>{w.trim()&&w.trim()!==e.title&&n(e.seq,w.trim()),_(null)},onKeyDown:A=>{A.key==="Enter"&&A.target.blur(),A.key==="Escape"&&_(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,Ge.jsx)(Wo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":z?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,Ge.jsx)(Wo.Box,{onClick:D?void 0:()=>_(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:D?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),c?(0,Ge.jsx)(Wo.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,Ge.jsx)(Wo.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>d(!0),sx:{color:"#6b7280"},children:(0,Ge.jsx)(_x.default,{sx:{fontSize:20}})})}):null,(0,Ge.jsx)(Wo.Tooltip,{title:p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,Ge.jsx)(Wo.IconButton,{"aria-label":p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>hr(e,p),sx:{color:"#6b7280"},children:p?(0,Ge.jsx)(vx.default,{sx:{fontSize:20}}):(0,Ge.jsx)(Ix.default,{sx:{fontSize:20}})})}),b?(0,Ge.jsx)(Wo.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,Ge.jsx)(Wo.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>b(e),sx:{color:"#6b7280"},children:(0,Ge.jsx)(wx.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,Ge.jsx)(Wo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,Ge.jsx)(Bx.default,{})}):null]}),(0,Ge.jsx)(eo,{open:!!k,anchorEl:k?.anchorEl??null,title:k?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:k?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>g(null),onConfirm:()=>{k&&t(e.seq,k.nextCompleted),g(null)}}),(0,Ge.jsx)(Fi,{open:u,taskSeq:e.seq,items:f,loading:m,onLoad:c,onClose:()=>d(!1)})]})}var Ft=require("react"),ue=require("@mui/material"),Ax=a(require("@mui/icons-material/ExpandLess"),1),Lx=a(require("@mui/icons-material/ExpandMore"),1),Nx=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),As=a(require("@mui/icons-material/Check"),1),Fx=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Hx=a(require("@mui/icons-material/SpeedOutlined"),1),Qa=a(require("@mui/icons-material/CheckCircle"),1),Wx=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Za=a(require("@mui/icons-material/CheckCircleOutlined"),1),Ls=a(require("@mui/icons-material/AccessTimeOutlined"),1),$x=a(require("@mui/icons-material/AutorenewOutlined"),1),Vx=a(require("@mui/icons-material/LabelOutlined"),1),Kx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Ux=a(require("@mui/icons-material/SubjectOutlined"),1),Gx=a(require("@mui/icons-material/StickyNote2Outlined"),1),jx=a(require("@mui/icons-material/PanToolAltOutlined"),1),Ns=a(require("@mui/icons-material/LockOutlined"),1),Fs=a(require("@mui/icons-material/PublicOutlined"),1),Hs=a(require("@mui/icons-material/Group"),1),Yx=a(require("@mui/icons-material/Repeat"),1),Xx=a(require("@mui/icons-material/EventOutlined"),1);var Hi=require("@ehfuse/alerts"),Qx=require("@ehfuse/mui-datetime-picker");var Dx=require("react"),Ex=require("@ehfuse/mui-form-controls"),Mx=require("react/jsx-runtime");function Rs({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,Dx.useState)(null);return(0,Mx.jsx)(Ex.TextField,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:l=>{i(l.target.value),t?.(l.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:l=>{l.key==="Enter"&&l.target.blur(),l.key==="Escape"&&i(null)},sx:{mt:1}})}var Jn=require("react"),Co=require("@mui/material"),Rx=a(require("@mui/icons-material/AccountTreeOutlined"),1),Px=a(require("@mui/icons-material/Add"),1),zx=a(require("@mui/icons-material/Close"),1),qx=a(require("@mui/icons-material/NextPlanOutlined"),1);function Zn(e){return e.relations??[]}function Wh(e,o,t){return Zn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Zn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Ox(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Ya(e,o){let t=new Map(o.map(u=>[u.seq,u]));t.set(e.seq,e);let n=new Map,r=(u,d)=>{n.has(u)||n.set(u,new Set),n.has(d)||n.set(d,new Set),n.get(u).add(d),n.get(d).add(u)};for(let u of t.values())for(let d of Zn(u))d.type==="follow_up"&&t.has(d.task_seq)&&r(u.seq,d.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let u=l.shift();for(let d of n.get(u)??[])i.has(d)||(i.add(d),l.push(d))}let s=[...i].map(u=>t.get(u)).filter(u=>!!u).sort((u,d)=>Ox(u).localeCompare(Ox(d))),f=new Set;for(let u of Zn(e))u.type==="related"&&f.add(u.task_seq);for(let u of t.values())u.seq!==e.seq&&Zn(u).some(d=>d.type==="related"&&d.task_seq===e.seq)&&f.add(u.seq);let m=[...f].map(u=>t.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),c=[...t.values()].filter(u=>u.seq!==e.seq&&Zn(u).some(d=>d.type==="duplicate_of"&&d.task_seq===e.seq)),b=Zn(e).find(u=>u.type==="duplicate_of")?.task_seq,p=b?t.get(b)??null:null;return{lineage:s,related:m,duplicates:c,duplicateOf:p}}function Xa(e,o){let t=Ya(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function Ps(e,o){return Xa(e,o)>0}var Ie=require("react/jsx-runtime");function zs({item:e,caption:o,onOpen:t,onUnlink:n}){let r=e.is_notice||e.is_event?Re(e.icon||(e.is_notice?To:zo)):null;return(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[o?(0,Ie.jsx)(Co.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?(0,Ie.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,Ie.jsxs)(Co.Box,{component:"span",onClick:t,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...t?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),(0,Ie.jsx)(Ze,{option:Uo(e),small:!0}),n?(0,Ie.jsx)(Co.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Ie.jsx)(zx.default,{sx:{fontSize:15}})}):null]})}function qs({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,f]=(0,Jn.useState)(!1),[m,c]=(0,Jn.useState)(null),[b,p]=(0,Jn.useState)(null),u=(0,Jn.useMemo)(()=>Ya(e,o),[e,o]),d=u.lineage.length>=2,w=(0,Jn.useMemo)(()=>Xa(e,o),[e,o]),_=(0,Jn.useMemo)(()=>{let g=new Set;for(let R of u.lineage)g.add(R.seq);for(let R of u.related)g.add(R.seq);for(let R of u.duplicates)g.add(R.seq);return u.duplicateOf&&g.add(u.duplicateOf.seq),[...g]},[u]),k=(g,R,S)=>{p({anchorEl:g,targetSeq:R,type:S})};return(0,Ie.jsxs)(_t,{icon:(0,Ie.jsx)(Rx.default,{sx:{fontSize:19,display:"block"}}),title:(0,Ie.jsxs)(Ie.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",w>0?(0,Ie.jsx)(Co.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:w}):null]}),titleExtra:t?null:(0,Ie.jsxs)(Co.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,Ie.jsx)(Co.Button,{size:"small",color:"inherit",startIcon:(0,Ie.jsx)(qx.default,{sx:{fontSize:16}}),onClick:g=>c(g.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,Ie.jsx)(Co.Button,{size:"small",color:"inherit",startIcon:(0,Ie.jsx)(Px.default,{sx:{fontSize:16}}),onClick:()=>f(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[d?(0,Ie.jsx)(Co.Box,{sx:{mb:u.related.length||u.duplicates.length||u.duplicateOf?1:0},children:u.lineage.map((g,R)=>{let S=g.seq===e.seq,z=R===u.lineage.length-1;return(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",gap:1},children:[(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,Ie.jsx)(Co.Box,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),z?null:(0,Ie.jsx)(Co.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,Ie.jsxs)(Co.Box,{sx:{flex:1,minWidth:0,pb:z?0:.5},children:[(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Ie.jsxs)(Co.Box,{component:"span",onClick:!S&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),(0,Ie.jsx)(Ze,{option:Uo(g),small:!0})]}),(0,Ie.jsx)(Co.Box,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,u.duplicateOf?(0,Ie.jsx)(zs,{item:u.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(u.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>k(g.currentTarget,u.duplicateOf.seq,"duplicate_of"):void 0}):null,u.duplicates.map(g=>(0,Ie.jsx)(zs,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?R=>k(R.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),u.related.map(g=>(0,Ie.jsx)(zs,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?R=>k(R.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),w===0?(0,Ie.jsx)(Co.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?(0,Ie.jsx)(Ri,{open:s,task:e,tasks:o,excludeSeqs:_,onClose:()=>f(!1),onSubmit:(g,R)=>r(e.seq,g,R)}):null,(0,Ie.jsx)(eo,{open:!!m,anchorEl:m,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>c(null),onConfirm:()=>{l?.(e.seq),c(null)}}),(0,Ie.jsx)(eo,{open:!!b,anchorEl:b?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{b&&i?.(e.seq,b.targetSeq,b.type),p(null)}})]})}var I=require("react/jsx-runtime");function er({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,I.jsx)(ue.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function Ws({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:f,onChangeDate:m,onChangeReminder:c,onMemberEdit:b,onChangePriority:p,onChangeVisibility:u,onChangeRepeat:d,departments:w=[],onChangeEventTime:_,onChangeEventPlace:k,onChangeEventAddress:g,onChangeNote:R,onChangeNoteDraft:S,onChangeContent:z,onChangeContentHeight:B,onAddChecklistItem:D,onToggleChecklistItem:M,onRemoveChecklistItem:A,onUpdateChecklistItem:C,onReorderChecklist:ie,onChangeChecklistHideCompleted:h,onConvertChecklistToTask:x,onOpenChecklistTask:v,onLinkChecklistTask:T,resolveChecklistTask:y,relatedTasksPool:E,onOpenRelatedTask:te,onLinkRelatedTask:ce,onUnlinkRelatedTask:Ae,onCreateFollowUpTask:fe,onAddAttachments:ke,onRemoveAttachment:Oe,onPreview:xe,onDownload:ve,onUpdateComment:j,onRemoveComment:re,onToggleCommentReaction:U,currentUserName:$="",myAccountSeq:Q=0,noticeAdmin:L=!1,hideProject:W=!1,hideLabel:N=!1,showTitle:K=!1,onChangeTitle:_e,onToggleCompleted:$e,onChangeIcon:Io,onChangeIconColor:Mo,employees:Ve=[],onAckConfirm:_o,onRequestConfirm:ee,onChangeBugField:V,sprints:Ro=[],sprintProject:Dt=!1,hideSprint:Rn=!1,onChangeSprint:ar,onChangeStoryPoints:q,onChangeResolution:Me,onClaimTask:Le,onVerifyBug:go}){let[so,jo]=(0,Ft.useState)(null),[Po,Pn]=(0,Ft.useState)(null),[Ye,F]=(0,Ft.useState)(null),[Y,Te]=(0,Ft.useState)(!1),ge={[Nt]:Y?{maxHeight:120,opacity:1,overflow:"hidden",transition:"max-height 0.25s ease, opacity 0.2s ease"}:{minHeight:0,maxHeight:0,opacity:0,overflow:"hidden",pointerEvents:"none",transition:"max-height 0.25s ease, opacity 0.2s ease"}},[ko,fo]=(0,Ft.useState)(null),[Xe,No]=(0,Ft.useState)(null),[Yo,Vo]=(0,Ft.useState)(null),[Ko,zn]=(0,Ft.useState)(null),[no,Et]=(0,Ft.useState)(null),[Mt,qn]=(0,Ft.useState)(null),[An,Ln]=(0,Ft.useState)(null),Qe=!!e.is_notice,co=!!e.is_event,$t=!!e.is_bug,ei=!!Le&&pi(e,Q),oi=!!Le&&fi(e,Q),ti=!!go&&$t&&!!e.completed&&Q>0&&(e.author_account_seq??0)===Q&&!(e.acks??[]).some(O=>O.account_seq===Q),Fo=!rn(e,Q),Tr=!e.is_event&&(e.is_notice?Q>0&&(e.author_account_seq??0)===Q:(e.author_account_seq??0)===Q||(e.manager_account_seq??0)===Q),yr=e.is_notice||e.is_event?Re(e.icon||(e.is_notice?To:zo)):null,Nn=Qe?!di(e,Q):Fo,ni=ei||oi?(0,I.jsxs)(Ut,{onClick:O=>Ln(O.currentTarget),children:[(0,I.jsx)(jx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ol=Qe?Li(e,Ve):"",Ot=Qe?ys(e,Ve,Q):null,lt=Qe?null:yi(e,Q),tl=!!(lt&&lt.total>0||Qe&&Ot),$i=!Qe,Vi=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Se,{icon:(0,I.jsx)(Kx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[jt(9),ge??null,...co?[]:[So(1)]],children:e.created_by?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(rt,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,I.jsx)(er,{})}),(0,I.jsx)(Se,{icon:(0,I.jsx)(Ls.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[jt(11),ge??null,...co?[]:[So(2)]],children:e.created_time?dt(e.created_time):(0,I.jsx)(er,{})})]});return(0,I.jsxs)(I.Fragment,{children:[K?(0,I.jsxs)(ue.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Tr?(0,I.jsx)(ue.Checkbox,{checked:e.completed,icon:(0,I.jsx)(Wx.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,I.jsx)(Qa.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(O,Vt)=>{Po||Pn({anchorEl:O.currentTarget,nextCompleted:Vt})},sx:{p:0,mt:.25}}):null,yr?(0,I.jsx)(ue.Box,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Qe?"#e5484d":"#1e3a8a")},children:(0,I.jsx)(yr,{sx:{fontSize:20}})}):null,(0,I.jsx)(ue.Box,{sx:{flex:1,minWidth:0},children:so!==null?(0,I.jsx)(ue.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:so,onChange:O=>jo(O.target.value),onBlur:()=>{so.trim()&&so.trim()!==e.title&&_e(e.seq,so.trim()),jo(null)},onKeyDown:O=>{O.key==="Enter"&&O.target.blur(),O.key==="Escape"&&jo(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,I.jsx)(ue.Box,{onClick:()=>jo(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:1.35,cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text"},children:e.title})}),(0,I.jsx)(eo,{open:!!Po,anchorEl:Po?.anchorEl??null,title:Po?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:Po?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>Pn(null),onConfirm:()=>{Po&&$e(e.seq,Po.nextCompleted),Pn(null)}})]}):null,(0,I.jsxs)(ue.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Nt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,I.jsx)(Ei,{hideProject:W,pinColumns:!0,values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminder:e.reminder,priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,hideDueDate:!co&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Qe,event:co,readOnly:Fo,targetSummary:ol,onChangeProject:O=>s(e.seq,O),onAddProject:f,onChangeStartDate:O=>m(e.seq,"start_date",O),onChangeDueDate:O=>m(e.seq,"due_date",O),onChangeReminder:O=>c(e.seq,O),onChangePriority:O=>p(e.seq,O),onChangeEventTime:O=>_?.(e.seq,O),onChangeEventPlace:O=>k?.(e.seq,O),onChangeEventAddress:O=>g?.(e.seq,O),onMemberEdit:O=>b(e,O,null),narrowCollapsedSx:ge,reminderLocked:e.completed,managerAction:ni,leading:(0,I.jsxs)(I.Fragment,{children:[ti||ni&&(Qe||co)?(0,I.jsxs)(ue.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Qe||co?ni:null,ti?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue.Button,{variant:"contained",size:"large",onClick:()=>go?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,I.jsx)(ue.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>go?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,$t&&e.ticket_no?(0,I.jsx)(Se,{icon:(0,I.jsx)(Nx.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:So(1),children:(0,I.jsx)(ue.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,co?null:(0,I.jsx)(ue.Box,{sx:$t&&e.ticket_no||$i||tl?So($t&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:(0,I.jsx)(Se,{icon:(0,I.jsx)($x.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Fo||e.completed?void 0:O=>fo(O),children:(0,I.jsx)(Ze,{option:Uo(e)})})}),Qe?null:(()=>{let O=Rt(e),Vt=O==="all"?(0,I.jsx)(Fs.default,{sx:{fontSize:17,color:"#2f80ed"}}):O==="group"?(0,I.jsx)(Hs.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,I.jsx)(Ns.default,{sx:{fontSize:17}}),kn=O==="all"?"\uC804\uCCB4\uACF5\uAC1C":O==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${w.find(P=>P.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return(0,I.jsx)(ue.Box,{sx:co?void 0:So($t?1:2),children:(0,I.jsx)(Se,{icon:Vt,label:"\uACF5\uAC1C",onClick:Fo||!u?void 0:P=>No(P),children:kn})})})(),!Qe&&!$t?(0,I.jsx)(ue.Box,{sx:co?void 0:So(1),children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Yx.default,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:Fo||!d?void 0:O=>Vo(O),children:e.repeat_rule?Ii(e.repeat_rule):(0,I.jsx)(er,{label:"\uC5C6\uC74C"})})}):null,!Qe&&!$t&&e.repeat_rule?(0,I.jsx)(ue.Box,{sx:co?void 0:So(2),children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Xx.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:Fo||!d?void 0:O=>zn(O),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:(0,I.jsx)(er,{})})}):null,lt&&lt.total>0?(0,I.jsx)(ue.Box,{sx:co?void 0:So(2),children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Za.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:lt.canConfirm?(0,I.jsx)(ue.Button,{size:"small",variant:"contained",onClick:()=>_o?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,I.jsxs)(ue.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:lt.myTime?(0,I.jsx)(Qa.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>F({anchorEl:O.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[lt.count," / ",lt.total]})})}):null,Qe&&Ot?(0,I.jsx)(ue.Box,{sx:So(2),children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Za.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,I.jsx)(ue.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Ot.canAck?(0,I.jsx)(ue.Button,{size:"small",variant:"contained",onClick:()=>_o?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,I.jsx)(ue.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Ot.acked?(0,I.jsx)(Qa.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>F({anchorEl:O.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Ot.total>0&&Ot.count>=Ot.total?"\uC644\uB8CC":(0,I.jsxs)(I.Fragment,{children:[Ot.count,(0,I.jsx)(ue.Box,{component:"span",sx:{mx:.4},children:"/"}),Ot.total]})})})})}):null,Dt&&!Rn&&!co&&!Qe?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Se,{icon:(0,I.jsx)(Fx.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Fo?void 0:O=>Et(O),sx:So(1),children:(e.sprint_seq??0)>0?Ro.find(O=>O.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,I.jsx)(er,{label:"\uBBF8\uBC30\uC815"})}),(0,I.jsx)(Se,{icon:(0,I.jsx)(Hx.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:So(2),children:(0,I.jsx)(cn,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Fo,onCommit:O=>q?.(e.seq,Number(O.replace(/[^0-9.]/g,""))||0)})})]}):null,co||N?null:(0,I.jsx)(ue.Box,{sx:[{gridColumn:"1 / -1"},ge??null],children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Vx.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Fo?void 0:O=>qn(O),children:(e.label_keys??[]).length>0?(0,I.jsx)(yn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,I.jsx)(er,{})})}),co?null:Vi]}),trailing:(0,I.jsxs)(I.Fragment,{children:[$t?(0,I.jsx)(Mi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Fo,showResolution:!!e.completed,onChangeRepro:O=>V?.(e.seq,"bug_repro",O),onChangeDevice:O=>V?.(e.seq,"bug_device",O),onChangeWhere:O=>V?.(e.seq,"bug_where",O),onChangeVersion:O=>V?.(e.seq,"bug_version",O),onChangeResolution:O=>Me?.(e.seq,O)}):null,co?Vi:null,e.completed?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Se,{icon:(0,I.jsx)(Za.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[jt(10),ge??null,...co?[]:[So(1)]],children:e.completed_by?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(rt,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,I.jsx)(er,{})}),(0,I.jsx)(Se,{icon:(0,I.jsx)(Ls.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[jt(12),ge??null,...co?[]:[So(2)]],children:e.completed_time?dt(e.completed_time):(0,I.jsx)(er,{})})]}):null]})}),(0,I.jsxs)(ue.Box,{sx:{display:"none",[Nt]:{display:"block",mt:1.5,mb:0}},children:[(0,I.jsx)(ue.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,I.jsx)(ue.ButtonBase,{onClick:()=>Te(O=>!O),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:Y?(0,I.jsxs)(I.Fragment,{children:["\uC811\uAE30 ",(0,I.jsx)(Ax.default,{sx:{fontSize:18}})]}):(0,I.jsxs)(I.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,I.jsx)(Lx.default,{sx:{fontSize:18}})]})})]}),(0,I.jsxs)(ue.Box,{children:[(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[Nt]:{mt:0,mb:1.25}}}),(0,I.jsx)(_t,{icon:(0,I.jsx)(Ux.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,I.jsx)(ue.Box,{sx:{userSelect:"text"},children:(0,I.jsx)(Oi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:B?O=>B(e.seq,O):void 0,readOnly:Fo,onChange:O=>z(e.seq,O)})})}),e.is_bug?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(_t,{icon:(0,I.jsx)(Gx.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,I.jsx)(ue.Box,{sx:{userSelect:"text"},children:(0,I.jsx)(Rs,{value:e.note,readOnly:Nn,onCommit:O=>R(e.seq,O),onDraftChange:S?O=>S(e.seq,O):void 0})})})]}),co?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(Pi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Nn,onAdd:D,onToggle:M,onRemove:A,onUpdate:C,onReorder:ie,hideCompleted:!!e.checklist_hide_completed,onChangeHideCompleted:h,onConvertToTask:x,onOpenLinkedTask:v,resolveLinkedTask:y,myAccountSeq:Q,linkCandidates:E,linkBaseTask:e,onLinkExistingTask:T})]}),E&&!co&&!Qe&&Ps(e,E)?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(qs,{task:e,tasks:E,readOnly:Fo,onOpenTask:te,onLink:ce,onUnlink:Ae,onCreateFollowUp:fe})]}):null,(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(zi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Nn,onAdd:ke,onRemove:Oe,onPreview:xe?O=>xe({...O,taskSeq:e.seq}):void 0,onDownload:ve?O=>ve({...O,taskSeq:e.seq}):void 0})]}),(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(Es,{taskSeq:e.seq,comments:e.comments??[],currentUserName:$,myAccountSeq:Q,avatarSrcByName:n,onUpdate:j,onRemove:re,onToggleReaction:U,onPreview:xe?O=>xe({...O,taskSeq:e.seq}):void 0,onDownload:ve?O=>ve({...O,taskSeq:e.seq}):void 0})]}),(0,I.jsx)(cr,{anchorEl:ko,value:e.status,options:Qe?wr:$t?Hn:Dr,onSelect:O=>r(e.seq,O),onClose:()=>fo(null)}),(0,I.jsx)(ue.Menu,{transitionDuration:0,anchorEl:Yo,open:!!Yo,onClose:()=>Vo(null),children:[{value:"",label:"\uC5C6\uC74C"},...Kr].map(O=>(0,I.jsx)(ue.MenuItem,{selected:(e.repeat_rule??"")===O.value,onClick:()=>{Vo(null),(async()=>{let Vt=e.repeat_rule??"";if(O.value===Vt)return;if(O.value===""){await(0,Hi.ConfirmDialog)({title:"\uBC18\uBCF5 \uD574\uC81C",message:"\uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uACE0 \uBC18\uBCF5\uC744 \uD574\uC81C\uD560\uAE4C\uC694? (\uC9C0\uB09C \uD68C\uCC28\uB294 \uB0A8\uC2B5\uB2C8\uB2E4)"})&&d?.(e.seq,"","");return}let kn=String(e.due_date??"").slice(0,10);if(!kn){(0,Hi.InfoAlert)(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uC77C\uC2DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}Vt&&!await(0,Hi.ConfirmDialog)({title:"\uBC18\uBCF5 \uBCC0\uACBD",message:"\uC774\uD6C4 \uD68C\uCC28\uB97C \uC0C8 \uADDC\uCE59\uC73C\uB85C \uB2E4\uC2DC \uC0DD\uC131\uD560\uAE4C\uC694? \uC774\uD6C4 \uD68C\uCC28\uC758 \uB313\uAE00\xB7\uCCA8\uBD80\uB294 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."})||d?.(e.seq,O.value,_i(kn,O.value))})()},sx:{fontSize:14,minWidth:140},children:O.label},O.value||"none"))}),(0,I.jsx)(Qx.DatePicker,{anchorEl:Ko,open:!!Ko,onClose:()=>zn(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:O=>{zn(null);let Vt=J=>String(J).padStart(2,"0"),kn=`${O.getFullYear()}-${Vt(O.getMonth()+1)}-${Vt(O.getDate())}`,P=e.repeat_rule??"";P&&d?.(e.seq,P,kn)}}),(0,I.jsx)(ue.Menu,{transitionDuration:0,anchorEl:Xe,open:!!Xe,onClose:()=>No(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:(0,I.jsx)(Ns.default,{sx:{fontSize:17,color:"#57564f"}}),selected:Rt(e)==="involved",onPick:()=>u?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:(0,I.jsx)(Fs.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Rt(e)==="all",onPick:()=>u?.(e.seq,"all",0)},...w.map(O=>({key:`group-${O.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${O.name}`,icon:(0,I.jsx)(Hs.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:Rt(e)==="group"&&(e.visibility_group_seq??0)===O.seq,onPick:()=>u?.(e.seq,"group",O.seq)}))].map(O=>(0,I.jsxs)(ue.MenuItem,{selected:O.selected,onClick:()=>{O.onPick(),No(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.icon,O.label,O.selected?(0,I.jsx)(As.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.key))}),(0,I.jsx)(ue.Menu,{transitionDuration:0,anchorEl:no,open:!!no,onClose:()=>Et(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ro.filter(O=>`custom-${O.group_seq}`===String(e.tab_key??"")).map(O=>({seq:O.seq,label:It(O)}))].map(O=>(0,I.jsxs)(ue.MenuItem,{onClick:()=>{ar?.(e.seq,O.seq),Et(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.label,(e.sprint_seq??0)===O.seq?(0,I.jsx)(As.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.seq))}),(0,I.jsx)(Ti,{anchorEl:Ye?.anchorEl??null,open:!!Ye?.open,acks:e.acks??[],total:Ot?.total??lt?.total??0,avatarSrcByName:n,onRequestConfirm:ee&&lt&&lt.count<lt.total?()=>{ee(e.seq),F(O=>O?{...O,open:!1}:null)}:void 0,onClose:()=>F(O=>O?{...O,open:!1}:null)}),(0,I.jsx)(Ai,{anchorEl:Mt,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:O=>i(e.seq,mi(e.label_keys??[],O)),onAddLabel:l,onClose:()=>qn(null)}),(0,I.jsx)(eo,{open:!!An,anchorEl:An,title:ei?"\uC774 \uC5C5\uBB34\uB97C \uAC00\uC838\uC640 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>Ln(null),onConfirm:()=>{Le?.(e.seq),Ln(null)}})]})}var Eo=require("react/jsx-runtime");function $h(){let e=new Date,o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())} ${o(e.getHours())}:${o(e.getMinutes())}`}function Vh({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:f,onChangeIconColor:m,activityItems:c,activityLoading:b,onLoadActivity:p,onPrint:u,...d}){let w=Je(),_=(0,_n.useRef)(null);o&&(_.current=o);let k=o??_.current,[g,R]=(0,_n.useState)(!1),[S,z]=(0,_n.useState)({}),B=Object.keys(S).length>0;(0,_n.useEffect)(()=>{z({})},[o?.seq,e]);let D=(0,_n.useRef)(null);if((0,_n.useEffect)(()=>{D.current?.scrollTo({top:0})},[o?.seq]),!k)return null;let M=w&&B?{...k,...S}:k,A=M.checklist??[],C=(T,y)=>{w?z(E=>({...E,...T})):y()},ie=()=>{let T=S;z({});let y=k.seq,E=T.title===void 0?void 0:String(T.title).trim();if(r){let te={...T};E!==void 0&&(E?te.title=E:delete te.title),Object.keys(te).length>0&&r(y,te),(0,$s.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}E&&s(y,E),T.icon!==void 0&&f(y,String(T.icon)),T.icon_color!==void 0&&m?.(y,String(T.icon_color)),T.status!==void 0&&d.onChangeStatus(y,T.status),T.label_keys!==void 0&&d.onChangeLabels(y,T.label_keys??[]),T.tab_key!==void 0&&d.onChangeProject(y,String(T.tab_key??"")),T.start_date!==void 0&&d.onChangeDate(y,"start_date",String(T.start_date??"")),T.due_date!==void 0&&d.onChangeDate(y,"due_date",String(T.due_date??"")),T.reminder!==void 0&&d.onChangeReminder(y,T.reminder),T.priority!==void 0&&d.onChangePriority(y,T.priority),T.event_time!==void 0&&d.onChangeEventTime?.(y,String(T.event_time??"")),T.event_place!==void 0&&d.onChangeEventPlace?.(y,String(T.event_place??"")),T.event_address!==void 0&&d.onChangeEventAddress?.(y,String(T.event_address??"")),T.content!==void 0&&d.onChangeContent(y,String(T.content??"")),T.note!==void 0&&d.onChangeNote(y,String(T.note??"")),T.visibility!==void 0&&d.onChangeVisibility?.(y,T.visibility,Number(T.visibility_group_seq??0)),(0,$s.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},h={...d,onChangeStatus:(T,y)=>C({status:y},()=>d.onChangeStatus(T,y)),onChangeLabels:(T,y)=>C({label_keys:y},()=>d.onChangeLabels(T,y)),onChangeProject:(T,y)=>C({tab_key:y},()=>d.onChangeProject(T,y)),onChangeDate:(T,y,E)=>C({[y]:E},()=>d.onChangeDate(T,y,E)),onChangeReminder:(T,y)=>C({reminder:y},()=>d.onChangeReminder(T,y)),onChangePriority:(T,y)=>C({priority:y},()=>d.onChangePriority(T,y)),onChangeEventTime:(T,y)=>C({event_time:y},()=>d.onChangeEventTime?.(T,y)),onChangeEventPlace:(T,y)=>C({event_place:y},()=>d.onChangeEventPlace?.(T,y)),onChangeEventAddress:(T,y)=>C({event_address:y},()=>d.onChangeEventAddress?.(T,y)),onChangeContent:(T,y)=>C({content:y},()=>d.onChangeContent(T,y)),onChangeNote:(T,y)=>C({note:y},()=>d.onChangeNote(T,y)),onMemberEdit:(T,y)=>d.onMemberEdit(T,y,w?E=>z(te=>({...te,...E})):null),onChangeNoteDraft:w?(T,y)=>C({note:y},()=>{}):void 0,onChangeVisibility:d.onChangeVisibility?(T,y,E)=>C({visibility:y,visibility_group_seq:E},()=>d.onChangeVisibility?.(T,y,E)):void 0,onAddChecklistItem:(T,y)=>C({checklist:[...A,{label:y,checked:!1}]},()=>d.onAddChecklistItem(T,y)),onToggleChecklistItem:(T,y,E)=>C({checklist:A.map((te,ce)=>ce===y?{...te,checked:E}:te)},()=>d.onToggleChecklistItem(T,y,E)),onRemoveChecklistItem:(T,y)=>C({checklist:A.filter((E,te)=>te!==y)},()=>d.onRemoveChecklistItem(T,y)),onUpdateChecklistItem:d.onUpdateChecklistItem?(T,y,E)=>C({checklist:A.map((te,ce)=>ce===y?{...te,label:E}:te)},()=>d.onUpdateChecklistItem?.(T,y,E)):void 0,onReorderChecklist:d.onReorderChecklist?(T,y)=>C({checklist:y},()=>d.onReorderChecklist?.(T,y)):void 0,onChangeChecklistHideCompleted:d.onChangeChecklistHideCompleted?(T,y)=>C({checklist_hide_completed:y},()=>d.onChangeChecklistHideCompleted?.(T,y)):void 0,onLinkChecklistTask:d.onLinkChecklistTask?(T,y,E)=>C({checklist:[...A,{label:E,checked:!1,task_seq:y}]},()=>d.onLinkChecklistTask?.(T,y,E)):void 0},x=(0,Eo.jsx)(Ws,{...h,task:M,myAccountSeq:i,onChangeTitle:(T,y)=>C({title:y},()=>s(T,y)),onToggleCompleted:l,onChangeIcon:(T,y)=>C({icon:y},()=>f(T,y)),onChangeIconColor:(T,y)=>C({icon_color:y},()=>m?.(T,y)),showTitle:w}),v=(0,Eo.jsx)(Ms,{onSubmit:(T,y)=>n(M.seq,T,y)},M.seq);return w?(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsx)(og.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:M.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":M.is_event?"\uC77C\uC815":M.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...p?[{icon:(0,Eo.jsx)(Jx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>R(!0)}]:[],{icon:(0,Eo.jsx)(Zx.default,{sx:{ml:p?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>hr(M,!0)},{icon:(0,Eo.jsx)(Ht.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!B,onClick:B?ie:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#e6e6e3",color:"#9a9a97"}},children:"\uC800\uC7A5"}),tooltip:""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:v},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:(0,Eo.jsx)(Ht.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:x})}]},k.seq),(0,Eo.jsx)(Fi,{open:g,taskSeq:M.seq,items:c,loading:b,onLoad:p,onClose:()=>R(!1)})]}):(0,Eo.jsx)(Ht.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:T=>T.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Eo.jsxs)(Ht.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,Eo.jsx)(Os,{task:M,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:f,onChangeIconColor:m,onClose:t,activityItems:c,activityLoading:b,onLoadActivity:p,onPrint:u}),(0,Eo.jsx)(Ht.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Eo.jsx)(Ht.Box,{sx:{flex:1,minHeight:0},children:(0,Eo.jsx)(eg.default,{ref:D,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:x})}),(0,Eo.jsx)(Ht.Divider,{sx:{borderColor:"#37352f"}}),(0,Eo.jsx)(Ht.Box,{sx:{flexShrink:0},children:v})]})})}var pn=require("react"),vo=require("@mui/material"),rg=require("@ehfuse/mui-form-dialog"),ig=a(require("@mui/icons-material/EditOutlined"),1),Vs=require("@ehfuse/alerts"),wn=require("@ehfuse/mui-form-controls");var Ja="custom-";function tg(e){return e.startsWith(Ja)}function Kh(e){return e>0?`${Ja}${e}`:""}function el(e){if(!tg(e))return 0;let o=Number(e.slice(Ja.length));return Number.isInteger(o)&&o>0?o:0}var qe=require("react/jsx-runtime"),Uh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function ng(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function Gh({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let f=o.filter(h=>h.useSprints&&!h.archived),[m,c]=(0,pn.useState)(""),[b,p]=(0,pn.useState)(""),[u,d]=(0,pn.useState)(""),[w,_]=(0,pn.useState)(""),[k,g]=(0,pn.useState)(""),[R,S]=(0,pn.useState)(!1),[z,B]=(0,pn.useState)(0);(0,pn.useEffect)(()=>{e&&(c(f.length===1?f[0].key:""),p(""),d(""),_(""),g(""),B(0))},[e]);let D=()=>{p(""),d(""),_(""),g(""),B(0)},M=h=>{B(h.seq),c(`custom-${h.group_seq}`),p(h.name),d(h.goal),_(h.start_date),g(h.end_date)},A=async()=>{let h=el(m);if(!h){(0,Vs.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!b.trim()){(0,Vs.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(z>0){i(z,{name:b.trim(),goal:u.trim(),start_date:w,end_date:k}),D();return}await r({group_seq:h,name:b.trim(),goal:u.trim(),start_date:w,end_date:k})&&D()}finally{S(!1)}},C=new Map(o.map(h=>[el(h.key),h.label])),ie=(0,qe.jsx)(vo.Box,{children:f.length===0?(0,qe.jsx)(vo.Box,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsxs)(vo.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,qe.jsx)(wn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:m,options:f.map(h=>({value:h.key,label:h.label})),onChange:h=>c(String(h.target.value)),disabled:z>0}),(0,qe.jsx)(wn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:b,onChange:h=>p(h.target.value)}),(0,qe.jsx)(wn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:w,onChange:h=>_(h.target.value)}),(0,qe.jsx)(wn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:k,onChange:h=>g(h.target.value)}),(0,qe.jsx)(wn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:u,onChange:h=>d(h.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,qe.jsxs)(vo.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[z>0?(0,qe.jsx)(vo.Button,{color:"inherit",onClick:D,disabled:R,children:"\uCDE8\uC18C"}):null,(0,qe.jsx)(vo.Button,{variant:"contained",onClick:()=>{A()},disabled:R,children:z>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,qe.jsx)(vo.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,qe.jsx)(vo.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(h=>(0,qe.jsxs)(vo.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,qe.jsxs)(vo.Box,{sx:{minWidth:0},children:[(0,qe.jsxs)(vo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,qe.jsx)(vo.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:h.name}),(0,qe.jsx)(vo.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:C.get(h.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,qe.jsxs)(vo.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[ng(h.start_date)," ~ ",ng(h.end_date)]})]}),h.goal?(0,qe.jsx)(vo.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:h.goal}):null]}),(0,qe.jsxs)(vo.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,qe.jsx)(wn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:h.status,options:Uh.map(x=>({value:x.value,label:x.label})),onChange:x=>l(h.seq,String(x.target.value)),sx:{width:104,flexShrink:0}}),(0,qe.jsx)(vo.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>M(h),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,qe.jsx)(ig.default,{sx:{fontSize:18}})}),(0,qe.jsx)(vo.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(h.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,qe.jsx)(an,{style:{width:16,height:16}})})]})]},h.seq))})]})});return(0,qe.jsx)(rg.FormDialog,{open:e,onClose:n,maxWidth:"sm",title:"\uBAA9\uD45C \uAD00\uB9AC",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-manage",sections:[{id:"sprint-manage",showTitle:!1,children:ie}],actions:{showCancelButton:!1,right:(0,qe.jsx)(vo.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var Ks=require("react"),je=require("@mui/material"),ag=require("@ehfuse/mui-form-dialog"),lg=a(require("@mui/icons-material/OpenInNewOutlined"),1),sg=a(require("@mui/icons-material/EventOutlined"),1),cg=require("@ehfuse/alerts");var Ee=require("react/jsx-runtime");function jh({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,Ks.useState)(""),[s,f]=(0,Ks.useState)(!1),m=async()=>{let p=i.trim();if(p){f(!0);try{await t(p)&&l("")}finally{f(!1)}}},c=async p=>{await(0,cg.ConfirmDialog)({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(p.seq)},b=(0,Ee.jsxs)(je.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,Ee.jsxs)(je.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,Ee.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,Ee.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,Ee.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,Ee.jsx)(je.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,Ee.jsx)(je.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((p,u)=>(0,Ee.jsxs)(je.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:u>0?"1px solid #efefed":"none"},children:[(0,Ee.jsx)(sg.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,Ee.jsx)(je.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,Ee.jsx)(je.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{c(p)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Ee.jsx)(an,{sx:{fontSize:18}})})]},p.seq))}):(0,Ee.jsx)(je.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,Ee.jsx)(je.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,Ee.jsx)(je.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,Ee.jsxs)(je.Box,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,mb:1,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[(0,Ee.jsx)(je.Box,{children:(0,Ee.jsxs)(je.Box,{component:"span",children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354(\uC6F9) > \uC67C\uCABD \uBAA9\uB85D\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 \u22EE > ",(0,Ee.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,Ee.jsx)(je.Box,{children:(0,Ee.jsxs)(je.Box,{component:"span",children:[(0,Ee.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,Ee.jsx)("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,Ee.jsx)(je.Box,{children:(0,Ee.jsx)(je.Box,{component:"span",children:"\uBE44\uBC00 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),(0,Ee.jsx)(je.Box,{children:(0,Ee.jsx)(je.Box,{component:"span",children:"\uC77C\uC815\uC740 \uC57D 10\uBD84 \uAC04\uACA9\uC73C\uB85C \uAC31\uC2E0\uB418\uACE0, \uBC18\uBCF5 \uC77C\uC815\uC740 \uC77C\uBC18\uC801\uC778 \uADDC\uCE59(\uB9E4\uC77C/\uB9E4\uC8FC/\uB9E4\uC6D4/\uB9E4\uB144)\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4."})})]}),(0,Ee.jsxs)(je.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,Ee.jsx)(je.TextField,{value:i,onChange:p=>l(p.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),(0,Ee.jsx)(je.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{m()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,Ee.jsx)(ag.FormDialog,{open:e,onClose:r,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-import",sections:[{id:"calendar-import",showTitle:!1,children:b}],actions:{showCancelButton:!1,left:(0,Ee.jsx)(je.Button,{variant:"outlined",startIcon:(0,Ee.jsx)(lg.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Ee.jsx)(je.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var $o=require("@mui/material"),mg=require("@ehfuse/mui-form-dialog"),ug=a(require("@mui/icons-material/ContentCopyOutlined"),1),Us=a(require("@mui/icons-material/OpenInNewOutlined"),1),Gs=require("@ehfuse/alerts"),He=require("react/jsx-runtime");function dg(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function Yh({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??dg,s=o.subscribed?l(o.token):"",f=()=>{navigator.clipboard.writeText(s).then(()=>(0,Gs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Gs.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},m=()=>{let b=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(b)}`,"_blank")},c=(0,He.jsxs)($o.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,He.jsxs)($o.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,He.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?(0,He.jsxs)($o.Box,{sx:{color:"#8a6d1d",bgcolor:"#faf1d7",borderRadius:1,px:1.5,py:1.25,lineHeight:1.7},children:["\uC9C0\uAE08\uC740 \uCE98\uB9B0\uB354\uC5D0 \uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",(0,He.jsx)("br",{}),(0,He.jsx)("b",{children:"\uB9C8\uAC10\uC77C\uC2DC\uAC00 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)($o.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,He.jsxs)($o.Box,{sx:{display:"flex",gap:2},children:[(0,He.jsx)($o.Button,{variant:"outlined",startIcon:(0,He.jsx)(ug.default,{}),onClick:f,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,He.jsx)($o.Button,{variant:"contained",startIcon:(0,He.jsx)(Us.default,{}),onClick:m,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,He.jsxs)($o.Box,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[(0,He.jsx)($o.Box,{children:(0,He.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,He.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,He.jsx)($o.Box,{children:(0,He.jsx)("span",{children:"\uAD6C\uAE00\uC774 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C(\uC218 \uC2DC\uAC04 \uAC04\uACA9) \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."})}),(0,He.jsx)($o.Box,{children:(0,He.jsx)("span",{children:"\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uCD94\uAC00\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."})}),(0,He.jsx)($o.Box,{children:(0,He.jsx)("span",{children:"\uC774 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uACF5\uC720\uD558\uBA74 \uB0B4 \uC5C5\uBB34 \uC77C\uC815\uC774 \uB178\uCD9C\uB429\uB2C8\uB2E4."})})]})]}):(0,He.jsx)($o.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,He.jsx)(mg.FormDialog,{open:e,onClose:i,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-subscribe",sections:[{id:"calendar-subscribe",showTitle:!1,children:c}],actions:{showCancelButton:!1,left:(0,He.jsx)($o.Button,{variant:"outlined",startIcon:(0,He.jsx)(Us.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,He.jsx)($o.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var fn=require("react"),xn=require("@mui/material"),pg=require("@ehfuse/mui-form-dialog"),fg=require("@ehfuse/mui-form-controls"),xg=require("@ehfuse/tree-view");var tt=require("react/jsx-runtime");function gg(e){return`${e.name}#${e.seq}`}function Xh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function Qh(e){let o=[],t=n=>{for(let r of n.employees??[])o.push(r);for(let r of n.groups??[])t(r)};for(let n of e)t(n);return o}function Zh(e,o){return o?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(t=>String(t).toLowerCase().includes(o)):!0}function Jh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:gg(e),renderLabel:(0,tt.jsx)(xn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,tt.jsx)(xn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function bg(e,o){let t=(e.groups??[]).map(r=>bg(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>Zh(r,o)).map(Jh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function ek({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,fn.useState)(""),f=(0,fn.useMemo)(()=>e.map(c=>bg(c,l.trim().toLowerCase())).filter(c=>c!==null),[e,l]),m=(0,fn.useMemo)(()=>o.filter(c=>t.includes(c.seq)).map(gg),[]);return(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(xn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,tt.jsx)(fg.SearchTextField,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:s,onClear:()=>s(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,tt.jsx)(xn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,tt.jsx)(xg.TreeView,{items:f,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:m,onChange:c=>i(c.map(Xh).filter(b=>b>0)),styles:{border:"none",borderRadius:"0"}})})]})}function ok({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:l="\uD655\uC778",onConfirm:s,onClose:f}){let m=Je(),[c,b]=(0,fn.useState)([]),[p,u]=(0,fn.useState)(0),d=(0,fn.useMemo)(()=>Qh(n),[n]),w=i??[];(0,fn.useEffect)(()=>{e&&(b(w),u(k=>k+1))},[e]);let _=()=>{let k=d.filter(g=>c.includes(g.seq));s(r?k:k.slice(0,1)),f()};return(0,tt.jsx)(pg.FormDialog,{open:e,onClose:f,title:`${o}${r&&c.length>0?` (${c.length}\uBA85)`:""}`,locale:"ko",fullScreen:m,mobilePresentation:m?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:(0,tt.jsx)(xn.Box,{sx:{...m?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...m?{}:{overflow:"hidden"},userSelect:"none"},children:(0,tt.jsx)(ek,{groups:n,allEmployees:d,initialSelectedSeqs:w,multiple:r,isMobile:m,onSelectionChange:b},p)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?(0,tt.jsx)(xn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,tt.jsx)(xn.Button,{variant:"contained",onClick:_,children:l})}})}var Zr=require("react"),Zt=require("@mui/material"),Tg=require("@ehfuse/mui-form-dialog"),yg=require("@ehfuse/mui-form-controls");var Qt=require("@mui/material"),yt=require("react/jsx-runtime");function tk(e,o){let t=o.filter(n=>n.sprint_seq===e.seq&&!n.archived&&n.completed);return{points:t.reduce((n,r)=>n+(r.story_points??0),0),count:t.length}}function js({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((c,b)=>`${c.start_date}|${c.seq}`.localeCompare(`${b.start_date}|${b.seq}`)).map(c=>({sprint:c,...tk(c,o)})),i=r.some(c=>c.points>0),l=r.map(c=>i?c.points:c.count),s=Math.max(1,...l),f=r.filter(c=>c.sprint.status==="closed").map(c=>i?c.points:c.count),m=f.length>0?Math.round(f.reduce((c,b)=>c+b,0)/f.length*10)/10:null;return r.length===0?(0,yt.jsx)(Qt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,yt.jsxs)(Qt.Box,{children:[(0,yt.jsxs)(Qt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,yt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),m!==null?(0,yt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,yt.jsx)(Qt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:m}),i?"SP":"\uAC74"]}):null]}),(0,yt.jsx)(Qt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(c=>{let b=i?c.points:c.count,p=Math.round((t-24)*b/s),u=c.sprint.status==="closed";return(0,yt.jsxs)(Qt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,yt.jsx)(Qt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:b}),(0,yt.jsx)(Qt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,p),borderRadius:"4px 4px 0 0",bgcolor:u?"#2f80ed":"#a9c9f5"}})]},c.sprint.seq)})}),(0,yt.jsx)(Qt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(c=>(0,yt.jsxs)(Qt.Box,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.sprint.name,c.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},c.sprint.seq))})]})}var kg=require("react"),or=require("@mui/material"),Lo=require("react/jsx-runtime");function hg(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function nk(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Ys(e){return e.slice(5).replace("-",".")}function Xs({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,kg.useMemo)(()=>{let k=hg(e.start_date),g=hg(e.end_date);if(!k||!g||g<k||Math.round((g.getTime()-k.getTime())/864e5)+1>366)return null;let S=o.filter(h=>h.sprint_seq===e.seq&&!h.archived);if(S.length===0)return{empty:!0};let z=S.some(h=>(h.story_points??0)>0),B=h=>z?h.story_points??0:1,D=S.reduce((h,x)=>h+B(x),0),M=new Map;for(let h of S){if(!h.completed)continue;let x=(h.completed_time??"").slice(0,10),v=/^\d{4}-\d{2}-\d{2}$/.test(x)?x:e.start_date;M.set(v,(M.get(v)??0)+B(h))}let A=[];for(let h=new Date(k);h<=g;h.setDate(h.getDate()+1))A.push(nk(h));let C=D,ie=[];for(let h of A){if(h>t)break;C-=M.get(h)??0,ie.push({day:h,value:Math.max(0,C)})}return{empty:!1,days:A,total:D,usePoints:z,actual:ie}},[e,o,t]);if(!r)return(0,Lo.jsx)(or.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return(0,Lo.jsx)(or.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:l,usePoints:s,actual:f}=r,m=600,c=200,b=8,p=k=>i.length===1?0:k/(i.length-1)*m,u=k=>b+(c-b*2)*(1-k/Math.max(1,l)),d=`${p(0)},${u(l)} ${p(i.length-1)},${u(0)}`,w=f.map(k=>`${p(i.indexOf(k.day))},${u(k.value)}`).join(" "),_=f[f.length-1];return(0,Lo.jsxs)(or.Box,{children:[(0,Lo.jsxs)(or.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Lo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),_?(0,Lo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Lo.jsx)(or.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:_.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,Lo.jsx)(or.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,Lo.jsxs)("svg",{viewBox:`0 0 ${m} ${c}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,Lo.jsx)("line",{x1:0,y1:u(0),x2:m,y2:u(0),stroke:"#e6e6e3",strokeWidth:1}),(0,Lo.jsx)("polyline",{points:d,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),f.length>1?(0,Lo.jsx)("polyline",{points:w,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,_?(0,Lo.jsx)("circle",{cx:p(i.indexOf(_.day)),cy:u(_.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,Lo.jsxs)(or.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,Lo.jsx)("span",{children:Ys(e.start_date)}),t>e.start_date&&t<e.end_date?(0,Lo.jsxs)("span",{children:["\uC624\uB298 ",Ys(t)]}):null,(0,Lo.jsx)("span",{children:Ys(e.end_date)})]})]})}var St=require("react/jsx-runtime");function rk({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Zr.useState)(0);(0,Zr.useEffect)(()=>{if(!e)return;let c=o.find(p=>p.status==="active")??o[0],b=o.find(p=>p.seq===r)??c;s(b?.seq??0)},[e]);let f=(0,Zr.useMemo)(()=>o.find(c=>c.seq===l)??null,[o,l]),m=(0,St.jsxs)(Zt.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,St.jsxs)(Zt.Box,{sx:{px:3,py:2.5},children:[(0,St.jsx)(Zt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,St.jsx)(js,{sprints:o,tasks:t})]}),(0,St.jsx)(Zt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,St.jsxs)(Zt.Box,{sx:{px:3,py:2.5},children:[(0,St.jsx)(Zt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,St.jsx)(yg.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(c=>({value:String(c.seq),label:It(c)})),onChange:c=>s(Number(c.target.value)||0),sx:{width:280,mb:2}}),f?(0,St.jsx)(Xs,{sprint:f,tasks:t,todayStr:n}):(0,St.jsx)(Zt.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694."})]})]});return(0,St.jsx)(Tg.FormDialog,{open:e,onClose:i,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:m}],actions:{showCancelButton:!1,right:(0,St.jsx)(Zt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var gn=require("@mui/material");var Dn=require("react/jsx-runtime");function ik({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,Dn.jsxs)(gn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,Dn.jsx)(gn.MenuItem,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(s=>{let f=t.includes(s.name);return(0,Dn.jsxs)(gn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,Dn.jsx)(gn.Checkbox,{size:"small",checked:f,sx:{p:0}}),(0,Dn.jsx)(rt,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,Dn.jsx)(gn.Divider,{}),(0,Dn.jsx)(gn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Sg=require("react"),Jr=require("@mui/material"),Bg=a(require("@mui/icons-material/KeyboardArrowDown"),1),Cg=a(require("@mui/icons-material/Check"),1);var bn=require("react/jsx-runtime");function ak({value:e,onChange:o,options:t}){let[n,r]=(0,Sg.useState)(null),i=t??aa,l=aa.find(s=>s.value===e)?.label??"";return(0,bn.jsxs)(bn.Fragment,{children:[(0,bn.jsxs)(Jr.ButtonBase,{onClick:s=>r(s.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[l,(0,bn.jsx)(Bg.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,bn.jsx)(Jr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,bn.jsxs)(Jr.MenuItem,{selected:s.value===e,onClick:()=>{o(s.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[s.label,s.value===e?(0,bn.jsx)(Cg.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var hn=require("@mui/material"),Ig=a(require("@mui/icons-material/Check"),1),_g=a(require("@ehfuse/overlay-scrollbar"),1);var Jt=require("react/jsx-runtime"),vg=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function lk({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return(0,Jt.jsx)(hn.Popover,{transitionDuration:0,open:!!e,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:(0,Jt.jsxs)(hn.Box,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[(0,Jt.jsx)(_g.default,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:(0,Jt.jsx)(hi,{value:o||on,onChange:l=>{n(l),i()}})}),r?(0,Jt.jsxs)(hn.Box,{sx:{px:1.25,pb:1.25},children:[(0,Jt.jsx)(hn.Divider,{sx:{mb:1,borderColor:"#efefed"}}),(0,Jt.jsx)(hn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:vg.map(l=>{let s=(t||vg[0])===l;return(0,Jt.jsx)(hn.ButtonBase,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${l}`,onClick:()=>r(l),sx:{width:26,height:26,borderRadius:"50%",bgcolor:l,display:"flex",alignItems:"center",justifyContent:"center"},children:s?(0,Jt.jsx)(Ig.default,{sx:{fontSize:15,color:"#ffffff"}}):null},l)})})]}):null]})})}var kr=require("@mui/material"),Qs=require("@ehfuse/mui-form-controls");function tr(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Wi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function sk(e=new Date){return{fromDate:tr(Wi(1,e)),toDate:tr(e)}}var En=require("react/jsx-runtime"),ck=[{label:"1\uAC1C\uC6D4",months:1},{label:"3\uAC1C\uC6D4",months:3},{label:"6\uAC1C\uC6D4",months:6},{label:"1\uB144",months:12},{label:"\uC804\uCCB4",months:0}];function Zs({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(tr(Wi(i)),tr(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===tr(Wi(i))&&o===tr(new Date);return(0,En.jsxs)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,En.jsx)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:ck.map(i=>{let l=r(i.months);return(0,En.jsx)(kr.ButtonBase,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:l?500:400,border:"1px solid",borderColor:l?"#2f80ed":"#dedddb",color:l?"#2f80ed":"#37352f",bgcolor:l?"#eef6ff":"transparent","&:hover":{bgcolor:l?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),(0,En.jsxs)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,En.jsx)(Qs.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,En.jsx)(kr.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,En.jsx)(Qs.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var wg=require("@mui/material");var Js=require("react/jsx-runtime");function mk({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,Js.jsx)(wg.Popover,{transitionDuration:0,anchorEl:e,open:!!e,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:(0,Js.jsx)(Zs,{fromDate:o,toDate:t,onChange:n})})}var nr=require("@mui/material"),Eg=a(require("@mui/icons-material/Checklist"),1),Mg=a(require("@mui/icons-material/Face"),1),Og=a(require("@mui/icons-material/Publish"),1),Rg=a(require("@mui/icons-material/NotificationsOutlined"),1),Pg=a(require("@mui/icons-material/BugReportOutlined"),1),zg=a(require("@mui/icons-material/DescriptionOutlined"),1),qg=a(require("@mui/icons-material/Inventory2Outlined"),1);var Wt=require("react/jsx-runtime");function Dg(e,o){return o>0?`${e} (${o})`:e}var uk=[{id:"my",label:"\uC804\uCCB4",icon:(0,Wt.jsx)(Eg.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Wt.jsx)(Rg.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Wt.jsx)(Mg.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Wt.jsx)(Og.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Wt.jsx)(Pg.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Wt.jsx)(qg.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Wt.jsx)(zg.default,{sx:{fontSize:18}}),hideCount:!0}];function dk(e){return{minHeight:46,minWidth:75,bgcolor:e.bg,color:e.color,borderRadius:"8px 8px 0 0",padding:"10px 18px",textTransform:"none",fontSize:14,fontWeight:500,border:`1px solid ${e.borderColor}`,borderBottom:"none","&:hover":{bgcolor:e.hoverBg},"&.Mui-selected":{bgcolor:e.selectedBg,color:e.selectedColor,border:`1px solid ${e.selectedBg}`,borderBottom:"none","&:hover":{bgcolor:e.selectedBg}},...e.sx}}function pk({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=pe(),l=dk(i.tabs),s=e;return r?(0,Wt.jsx)(nr.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(f=>{let m=o===f.id;return(0,Wt.jsx)(nr.ButtonBase,{onClick:()=>n(f.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:st(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:m?i.tabs.selectedBg:i.tabs.bg,color:m?i.tabs.selectedColor:i.tabs.color,borderColor:m?i.tabs.selectedBg:i.tabs.borderColor},children:Dg(f.label,f.hideCount?0:t[f.id]??0)},f.id)})}):(0,Wt.jsx)(nr.Tabs,{value:o,onChange:(f,m)=>n(m),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(f=>(0,Wt.jsx)(nr.Tab,{value:f.id,label:Dg(f.label,f.hideCount?0:t[f.id]??0),icon:f.icon,iconPosition:"start",sx:l},f.id))})}var rr=require("react"),Ce=require("@mui/material"),Ag=a(require("@mui/icons-material/OpenInNewOutlined"),1),Lg=a(require("@mui/icons-material/Check"),1),Ng=a(require("@mui/icons-material/CheckCircleOutlined"),1),Fg=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Hg=a(require("@mui/icons-material/SendOutlined"),1),Wg=a(require("@mui/icons-material/EventOutlined"),1),$g=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Vg=a(require("@mui/icons-material/ViewKanbanOutlined"),1),Kg=a(require("@mui/icons-material/ContentCopyOutlined"),1),Ug=a(require("@mui/icons-material/NextPlanOutlined"),1),Gg=a(require("@mui/icons-material/ContentPasteOutlined"),1),jg=a(require("@mui/icons-material/ShareOutlined"),1),Yg=a(require("@mui/icons-material/DirectionsRunOutlined"),1),ec=a(require("@mui/icons-material/ChevronRight"),1),Xg=a(require("@mui/icons-material/ArchiveOutlined"),1),Qg=a(require("@mui/icons-material/UnarchiveOutlined"),1),Zg=require("@ehfuse/alerts");var ae=require("react/jsx-runtime");function fk({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:f,onChangeReminder:m,onMemberEdit:c,onMoveProject:b,onDuplicate:p,onCreateFollowUp:u,onShare:d,onAssignSprint:w,onArchiveToggle:_,onDelete:k}){let g=Je(),R=nn(),[S,z]=(0,rr.useState)(null),[B,D]=(0,rr.useState)(null),[M,A]=(0,rr.useState)(null);(0,rr.useEffect)(()=>{e||(z(null),D(null),A(null))},[e]);let C=e?.task??null,ie=!!C?.is_notice,h=!!C?.is_event,x=C?!rn(C,r):!1,v=(0,rr.useMemo)(()=>new Set(t.filter(E=>E.useSprints).map(E=>E.key)),[t]),T=async(E="one")=>{let te=C;if(o(),!te)return;await(0,Zg.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:E==="series"?`"${te.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${te.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&k(te.seq,E)},y=()=>{C&&_(C.seq,!C.archived),o()};return(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsxs)(Ce.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:g?"none":"anchorPosition",anchorPosition:!g&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...g?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:g?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&i(C),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Ag.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,ae.jsxs)(Ce.MenuItem,{disabled:ie?(C?.author_account_seq??0)!==r:(C?.author_account_seq??0)!==r&&(C?.manager_account_seq??0)!==r,onClick:()=>{C&&l(C.seq,!C.completed),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:C?.completed?(0,ae.jsx)(Fg.default,{sx:{fontSize:19}}):(0,ae.jsx)(Ng.default,{sx:{fontSize:19}})}),C?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!ie&&s?(0,ae.jsxs)(Ce.MenuItem,{disabled:!(C?.manager_account_seq??0)&&(C?.receiver_account_seqs??[]).length===0,onClick:()=>{C&&s(C),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Hg.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,h?null:(0,ae.jsx)(Ce.Divider,{}),h?null:(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:E=>{C&&z({anchorEl:E.currentTarget,task:C})},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Wg.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC77C\uC2DC \uBCC0\uACBD"]}),!ie&&!h&&c?(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&c(C,"manager"),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)($g.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,h?null:(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:E=>{C&&D({anchorEl:E.currentTarget,task:C})},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Vg.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,ae.jsx)(ec.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,ae.jsx)(Ce.Divider,{}),p?(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:()=>{C&&p(C.seq),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Kg.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,u&&C&&!C.is_event&&!C.is_notice?(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&u(C.seq),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Ug.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&(d?d(C):hr(C,g)),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:g?(0,ae.jsx)(jg.default,{sx:{fontSize:19}}):(0,ae.jsx)(Gg.default,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),C&&!C.is_notice&&!C.is_event&&v.has(String(C.tab_key??""))&&w?(0,ae.jsxs)(Ce.MenuItem,{onClick:E=>A(E.currentTarget),sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Yg.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,ae.jsx)(ec.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,ae.jsxs)(Ce.MenuItem,{onClick:y,disabled:x||!C?.archived&&!(C&&li(C)),sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:C?.archived?(0,ae.jsx)(Qg.default,{sx:{fontSize:19}}):(0,ae.jsx)(Xg.default,{sx:{fontSize:19}})}),C?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,ae.jsx)(Ce.Divider,{}),(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:()=>{T("one")},sx:{fontSize:14,color:"#e5484d"},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(an,{sx:{fontSize:19,color:"#e5484d"}})}),(C?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(C?.repeat_group_key??0)>0?(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:()=>{T("series")},sx:{fontSize:14,color:"#e5484d"},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(an,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]}),(0,ae.jsx)(Ct,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:g,onClose:()=>{z(null),o()},onDateChange:E=>{S&&f(S.task.seq,E)},onReminderChange:E=>{S&&m?.(S.task.seq,E)}}),(0,ae.jsxs)(Ce.Menu,{transitionDuration:0,anchorEl:B?.anchorEl??null,open:!!B,onClose:()=>{D(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...R,children:[(0,ae.jsx)(Ce.MenuItem,{selected:!B?.task.tab_key,onClick:()=>{B&&b(B.task.seq,""),D(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(E=>!E.archived).map(E=>(0,ae.jsx)(Ce.MenuItem,{selected:B?.task.tab_key===E.key,onClick:()=>{B&&b(B.task.seq,E.key),D(null),o()},sx:{fontSize:14,minWidth:170},children:E.label},E.key))]}),(0,ae.jsx)(Ce.Menu,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>A(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(E=>`custom-${E.group_seq}`===String(C?.tab_key??"")).map(E=>({seq:E.seq,label:It(E)}))].map(E=>(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&w?.(C.seq,E.seq),A(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[E.label,(C?.sprint_seq??0)===E.seq?(0,ae.jsx)(Lg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))})]})}var Mn=require("@mui/material");var ir=require("react/jsx-runtime");function xk({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,ir.jsxs)(Mn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,ir.jsxs)(Mn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,ir.jsx)(Mn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,ir.jsx)(Ze,{option:l})]},l.key)}),(0,ir.jsx)(Mn.Divider,{}),(0,ir.jsx)(Mn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var On=require("@mui/material"),Jg=a(require("@mui/icons-material/Check"),1),eb=a(require("@mui/icons-material/BarChartOutlined"),1),ob=a(require("@mui/icons-material/SettingsOutlined"),1);var en=require("react/jsx-runtime");function gk(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,en.jsxs)(On.Menu,{transitionDuration:0,anchorEl:o,open:!!o,onClose:s,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(f=>({seq:f.seq,label:It(f)}))].map(f=>(0,en.jsxs)(On.MenuItem,{onClick:()=>{r(f.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[f.label,n===f.seq?(0,en.jsx)(Jg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},f.seq)),(0,en.jsx)(On.Divider,{}),l?(0,en.jsxs)(On.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,en.jsx)(eb.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,en.jsx)(On.Divider,{}):null,(0,en.jsxs)(On.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,en.jsx)(ob.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var bk={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function nb(e){return bk[e]??"tasks"}var hk={list:"\uBAA9\uB85D",card:"\uD504\uB85C\uC81D\uD2B8",kanban:"\uC0C1\uD0DC",sprint:"\uBAA9\uD45C",calendar:"\uC8FC\uAC04",month:"\uC6D4\uAC04",agenda:"\uC544\uC820\uB2E4",timeline:"\uD0C0\uC784\uB77C\uC778"},tb=["list","calendar","month","card","kanban","sprint","timeline"],kk=["list","card"];function Tk(e){let o=nb(e);switch(o){case"notice":return{kind:o,viewOptions:[],showCreate:!0,createLabel:"\uACF5\uC9C0\uC0AC\uD56D \uB4F1\uB85D",showGroupBy:!1,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!0,columns:{notice:!0}};case"bug":return{kind:o,viewOptions:tb,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"archive":return{kind:o,viewOptions:kk,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:o,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:o,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:o,viewOptions:tb,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}
13
+ `)}function yx(e){navigator.clipboard.writeText(e).then(()=>(0,Ga.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Ga.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function hr(e,o){let t=Sx(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&yx(t)});return}yx(t)}var Ge=require("react/jsx-runtime");function Os({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1,activityItems:f,activityLoading:m,onLoadActivity:c,onPrint:b}){let p=Je(),[u,d]=(0,ja.useState)(!1),[w,_]=(0,ja.useState)(null),[k,g]=(0,ja.useState)(null),R=e.is_notice?Re(e.icon||To):null,S=!!e.is_notice,z=!!e.is_event,B=S&&o>0&&(e.author_account_seq??0)===o,D=!rn(e,o),M=!z&&(S?B:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsxs)(Wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,Ge.jsx)(Wo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,Ge.jsx)(Cx.default,{})}):null,M&&!s?(0,Ge.jsx)(Wo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${dt(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Ge.jsx)(Wo.Box,{sx:{display:"flex",flexShrink:0,mr:1.5},children:(0,Ge.jsx)(Ut,{onClick:A=>g({anchorEl:A.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"})})}):null,s||!R?null:(0,Ge.jsx)(Wo.Box,{sx:{display:"flex",px:.5,color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:(0,Ge.jsx)(R,{sx:{fontSize:20}})}),w!==null?(0,Ge.jsx)(Wo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:w,onChange:A=>_(A.target.value),onBlur:()=>{w.trim()&&w.trim()!==e.title&&n(e.seq,w.trim()),_(null)},onKeyDown:A=>{A.key==="Enter"&&A.target.blur(),A.key==="Escape"&&_(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,Ge.jsx)(Wo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":z?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,Ge.jsx)(Wo.Box,{onClick:D?void 0:()=>_(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:D?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),c?(0,Ge.jsx)(Wo.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,Ge.jsx)(Wo.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>d(!0),sx:{color:"#6b7280"},children:(0,Ge.jsx)(_x.default,{sx:{fontSize:20}})})}):null,(0,Ge.jsx)(Wo.Tooltip,{title:p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,Ge.jsx)(Wo.IconButton,{"aria-label":p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>hr(e,p),sx:{color:"#6b7280"},children:p?(0,Ge.jsx)(vx.default,{sx:{fontSize:20}}):(0,Ge.jsx)(Ix.default,{sx:{fontSize:20}})})}),b?(0,Ge.jsx)(Wo.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,Ge.jsx)(Wo.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>b(e),sx:{color:"#6b7280"},children:(0,Ge.jsx)(wx.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,Ge.jsx)(Wo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,Ge.jsx)(Bx.default,{})}):null]}),(0,Ge.jsx)(eo,{open:!!k,anchorEl:k?.anchorEl??null,title:k?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:k?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>g(null),onConfirm:()=>{k&&t(e.seq,k.nextCompleted),g(null)}}),(0,Ge.jsx)(Fi,{open:u,taskSeq:e.seq,items:f,loading:m,onLoad:c,onClose:()=>d(!1)})]})}var Ft=require("react"),ue=require("@mui/material"),Ax=a(require("@mui/icons-material/ExpandLess"),1),Lx=a(require("@mui/icons-material/ExpandMore"),1),Nx=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),As=a(require("@mui/icons-material/Check"),1),Fx=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Hx=a(require("@mui/icons-material/SpeedOutlined"),1),Qa=a(require("@mui/icons-material/CheckCircle"),1),Wx=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Za=a(require("@mui/icons-material/CheckCircleOutlined"),1),Ls=a(require("@mui/icons-material/AccessTimeOutlined"),1),$x=a(require("@mui/icons-material/AutorenewOutlined"),1),Vx=a(require("@mui/icons-material/LabelOutlined"),1),Kx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Ux=a(require("@mui/icons-material/SubjectOutlined"),1),Gx=a(require("@mui/icons-material/StickyNote2Outlined"),1),jx=a(require("@mui/icons-material/PanToolAltOutlined"),1),Ns=a(require("@mui/icons-material/LockOutlined"),1),Fs=a(require("@mui/icons-material/PublicOutlined"),1),Hs=a(require("@mui/icons-material/Group"),1),Yx=a(require("@mui/icons-material/Repeat"),1),Xx=a(require("@mui/icons-material/EventOutlined"),1);var Hi=require("@ehfuse/alerts"),Qx=require("@ehfuse/mui-datetime-picker");var Dx=require("react"),Ex=require("@ehfuse/mui-form-controls"),Mx=require("react/jsx-runtime");function Rs({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,Dx.useState)(null);return(0,Mx.jsx)(Ex.TextField,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:l=>{i(l.target.value),t?.(l.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:l=>{l.key==="Enter"&&l.target.blur(),l.key==="Escape"&&i(null)},sx:{mt:1}})}var Jn=require("react"),Co=require("@mui/material"),Rx=a(require("@mui/icons-material/AccountTreeOutlined"),1),Px=a(require("@mui/icons-material/Add"),1),zx=a(require("@mui/icons-material/Close"),1),qx=a(require("@mui/icons-material/NextPlanOutlined"),1);function Zn(e){return e.relations??[]}function Wh(e,o,t){return Zn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Zn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Ox(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Ya(e,o){let t=new Map(o.map(u=>[u.seq,u]));t.set(e.seq,e);let n=new Map,r=(u,d)=>{n.has(u)||n.set(u,new Set),n.has(d)||n.set(d,new Set),n.get(u).add(d),n.get(d).add(u)};for(let u of t.values())for(let d of Zn(u))d.type==="follow_up"&&t.has(d.task_seq)&&r(u.seq,d.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let u=l.shift();for(let d of n.get(u)??[])i.has(d)||(i.add(d),l.push(d))}let s=[...i].map(u=>t.get(u)).filter(u=>!!u).sort((u,d)=>Ox(u).localeCompare(Ox(d))),f=new Set;for(let u of Zn(e))u.type==="related"&&f.add(u.task_seq);for(let u of t.values())u.seq!==e.seq&&Zn(u).some(d=>d.type==="related"&&d.task_seq===e.seq)&&f.add(u.seq);let m=[...f].map(u=>t.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),c=[...t.values()].filter(u=>u.seq!==e.seq&&Zn(u).some(d=>d.type==="duplicate_of"&&d.task_seq===e.seq)),b=Zn(e).find(u=>u.type==="duplicate_of")?.task_seq,p=b?t.get(b)??null:null;return{lineage:s,related:m,duplicates:c,duplicateOf:p}}function Xa(e,o){let t=Ya(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function Ps(e,o){return Xa(e,o)>0}var Ie=require("react/jsx-runtime");function zs({item:e,caption:o,onOpen:t,onUnlink:n}){let r=e.is_notice||e.is_event?Re(e.icon||(e.is_notice?To:zo)):null;return(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[o?(0,Ie.jsx)(Co.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?(0,Ie.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,Ie.jsxs)(Co.Box,{component:"span",onClick:t,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...t?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),(0,Ie.jsx)(Ze,{option:Uo(e),small:!0}),n?(0,Ie.jsx)(Co.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Ie.jsx)(zx.default,{sx:{fontSize:15}})}):null]})}function qs({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,f]=(0,Jn.useState)(!1),[m,c]=(0,Jn.useState)(null),[b,p]=(0,Jn.useState)(null),u=(0,Jn.useMemo)(()=>Ya(e,o),[e,o]),d=u.lineage.length>=2,w=(0,Jn.useMemo)(()=>Xa(e,o),[e,o]),_=(0,Jn.useMemo)(()=>{let g=new Set;for(let R of u.lineage)g.add(R.seq);for(let R of u.related)g.add(R.seq);for(let R of u.duplicates)g.add(R.seq);return u.duplicateOf&&g.add(u.duplicateOf.seq),[...g]},[u]),k=(g,R,S)=>{p({anchorEl:g,targetSeq:R,type:S})};return(0,Ie.jsxs)(_t,{icon:(0,Ie.jsx)(Rx.default,{sx:{fontSize:19,display:"block"}}),title:(0,Ie.jsxs)(Ie.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",w>0?(0,Ie.jsx)(Co.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:w}):null]}),titleExtra:t?null:(0,Ie.jsxs)(Co.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,Ie.jsx)(Co.Button,{size:"small",color:"inherit",startIcon:(0,Ie.jsx)(qx.default,{sx:{fontSize:16}}),onClick:g=>c(g.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,Ie.jsx)(Co.Button,{size:"small",color:"inherit",startIcon:(0,Ie.jsx)(Px.default,{sx:{fontSize:16}}),onClick:()=>f(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[d?(0,Ie.jsx)(Co.Box,{sx:{mb:u.related.length||u.duplicates.length||u.duplicateOf?1:0},children:u.lineage.map((g,R)=>{let S=g.seq===e.seq,z=R===u.lineage.length-1;return(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",gap:1},children:[(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,Ie.jsx)(Co.Box,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),z?null:(0,Ie.jsx)(Co.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,Ie.jsxs)(Co.Box,{sx:{flex:1,minWidth:0,pb:z?0:.5},children:[(0,Ie.jsxs)(Co.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Ie.jsxs)(Co.Box,{component:"span",onClick:!S&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),(0,Ie.jsx)(Ze,{option:Uo(g),small:!0})]}),(0,Ie.jsx)(Co.Box,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,u.duplicateOf?(0,Ie.jsx)(zs,{item:u.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(u.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>k(g.currentTarget,u.duplicateOf.seq,"duplicate_of"):void 0}):null,u.duplicates.map(g=>(0,Ie.jsx)(zs,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?R=>k(R.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),u.related.map(g=>(0,Ie.jsx)(zs,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?R=>k(R.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),w===0?(0,Ie.jsx)(Co.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?(0,Ie.jsx)(Ri,{open:s,task:e,tasks:o,excludeSeqs:_,onClose:()=>f(!1),onSubmit:(g,R)=>r(e.seq,g,R)}):null,(0,Ie.jsx)(eo,{open:!!m,anchorEl:m,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>c(null),onConfirm:()=>{l?.(e.seq),c(null)}}),(0,Ie.jsx)(eo,{open:!!b,anchorEl:b?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{b&&i?.(e.seq,b.targetSeq,b.type),p(null)}})]})}var I=require("react/jsx-runtime");function er({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,I.jsx)(ue.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function Ws({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:f,onChangeDate:m,onChangeReminder:c,onMemberEdit:b,onChangePriority:p,onChangeVisibility:u,onChangeRepeat:d,departments:w=[],onChangeEventTime:_,onChangeEventPlace:k,onChangeEventAddress:g,onChangeNote:R,onChangeNoteDraft:S,onChangeContent:z,onChangeContentHeight:B,onAddChecklistItem:D,onToggleChecklistItem:M,onRemoveChecklistItem:A,onUpdateChecklistItem:C,onReorderChecklist:ie,onChangeChecklistHideCompleted:h,onConvertChecklistToTask:x,onOpenChecklistTask:v,onLinkChecklistTask:T,resolveChecklistTask:y,relatedTasksPool:E,onOpenRelatedTask:te,onLinkRelatedTask:ce,onUnlinkRelatedTask:Ae,onCreateFollowUpTask:fe,onAddAttachments:ke,onRemoveAttachment:Oe,onPreview:xe,onDownload:ve,onUpdateComment:j,onRemoveComment:re,onToggleCommentReaction:U,currentUserName:$="",myAccountSeq:Q=0,noticeAdmin:L=!1,hideProject:W=!1,hideLabel:N=!1,showTitle:K=!1,onChangeTitle:_e,onToggleCompleted:$e,onChangeIcon:Io,onChangeIconColor:Mo,employees:Ve=[],onAckConfirm:_o,onRequestConfirm:ee,onChangeBugField:V,sprints:Ro=[],sprintProject:Dt=!1,hideSprint:Rn=!1,onChangeSprint:ar,onChangeStoryPoints:q,onChangeResolution:Me,onClaimTask:Le,onVerifyBug:go}){let[so,jo]=(0,Ft.useState)(null),[Po,Pn]=(0,Ft.useState)(null),[Ye,F]=(0,Ft.useState)(null),[Y,Te]=(0,Ft.useState)(!1),ge={[Nt]:Y?{maxHeight:120,opacity:1,overflow:"hidden",transition:"max-height 0.25s ease, opacity 0.2s ease"}:{minHeight:0,maxHeight:0,opacity:0,overflow:"hidden",pointerEvents:"none",transition:"max-height 0.25s ease, opacity 0.2s ease"}},[ko,fo]=(0,Ft.useState)(null),[Xe,No]=(0,Ft.useState)(null),[Yo,Vo]=(0,Ft.useState)(null),[Ko,zn]=(0,Ft.useState)(null),[no,Et]=(0,Ft.useState)(null),[Mt,qn]=(0,Ft.useState)(null),[An,Ln]=(0,Ft.useState)(null),Qe=!!e.is_notice,co=!!e.is_event,$t=!!e.is_bug,ei=!!Le&&pi(e,Q),oi=!!Le&&fi(e,Q),ti=!!go&&$t&&!!e.completed&&Q>0&&(e.author_account_seq??0)===Q&&!(e.acks??[]).some(O=>O.account_seq===Q),Fo=!rn(e,Q),Tr=!e.is_event&&(e.is_notice?Q>0&&(e.author_account_seq??0)===Q:(e.author_account_seq??0)===Q||(e.manager_account_seq??0)===Q),yr=e.is_notice||e.is_event?Re(e.icon||(e.is_notice?To:zo)):null,Nn=Qe?!di(e,Q):Fo,ni=ei||oi?(0,I.jsxs)(Ut,{onClick:O=>Ln(O.currentTarget),children:[(0,I.jsx)(jx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ol=Qe?Li(e,Ve):"",Ot=Qe?ys(e,Ve,Q):null,lt=Qe?null:yi(e,Q),tl=!!(lt&&lt.total>0||Qe&&Ot),$i=!Qe,Vi=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Se,{icon:(0,I.jsx)(Kx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[jt(9),ge??null,...co?[]:[So(1)]],children:e.created_by?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(rt,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,I.jsx)(er,{})}),(0,I.jsx)(Se,{icon:(0,I.jsx)(Ls.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[jt(11),ge??null,...co?[]:[So(2)]],children:e.created_time?dt(e.created_time):(0,I.jsx)(er,{})})]});return(0,I.jsxs)(I.Fragment,{children:[K?(0,I.jsxs)(ue.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Tr?(0,I.jsx)(ue.Checkbox,{checked:e.completed,icon:(0,I.jsx)(Wx.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,I.jsx)(Qa.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(O,Vt)=>{Po||Pn({anchorEl:O.currentTarget,nextCompleted:Vt})},sx:{p:0,mt:.25}}):null,yr?(0,I.jsx)(ue.Box,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Qe?"#e5484d":"#1e3a8a")},children:(0,I.jsx)(yr,{sx:{fontSize:20}})}):null,(0,I.jsx)(ue.Box,{sx:{flex:1,minWidth:0},children:so!==null?(0,I.jsx)(ue.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:so,onChange:O=>jo(O.target.value),onBlur:()=>{so.trim()&&so.trim()!==e.title&&_e(e.seq,so.trim()),jo(null)},onKeyDown:O=>{O.key==="Enter"&&O.target.blur(),O.key==="Escape"&&jo(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,I.jsx)(ue.Box,{onClick:()=>jo(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:1.35,cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text"},children:e.title})}),(0,I.jsx)(eo,{open:!!Po,anchorEl:Po?.anchorEl??null,title:Po?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:Po?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>Pn(null),onConfirm:()=>{Po&&$e(e.seq,Po.nextCompleted),Pn(null)}})]}):null,(0,I.jsxs)(ue.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Nt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,I.jsx)(Ei,{hideProject:W,pinColumns:!0,values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminder:e.reminder,priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,hideDueDate:!co&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Qe,event:co,readOnly:Fo,targetSummary:ol,onChangeProject:O=>s(e.seq,O),onAddProject:f,onChangeStartDate:O=>m(e.seq,"start_date",O),onChangeDueDate:O=>m(e.seq,"due_date",O),onChangeReminder:O=>c(e.seq,O),onChangePriority:O=>p(e.seq,O),onChangeEventTime:O=>_?.(e.seq,O),onChangeEventPlace:O=>k?.(e.seq,O),onChangeEventAddress:O=>g?.(e.seq,O),onMemberEdit:O=>b(e,O,null),narrowCollapsedSx:ge,reminderLocked:e.completed,managerAction:ni,leading:(0,I.jsxs)(I.Fragment,{children:[ti||ni&&(Qe||co)?(0,I.jsxs)(ue.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Qe||co?ni:null,ti?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue.Button,{variant:"contained",size:"large",onClick:()=>go?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,I.jsx)(ue.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>go?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,$t&&e.ticket_no?(0,I.jsx)(Se,{icon:(0,I.jsx)(Nx.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:So(1),children:(0,I.jsx)(ue.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,co?null:(0,I.jsx)(ue.Box,{sx:$t&&e.ticket_no||$i||tl?So($t&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:(0,I.jsx)(Se,{icon:(0,I.jsx)($x.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Fo||e.completed?void 0:O=>fo(O),children:(0,I.jsx)(Ze,{option:Uo(e)})})}),Qe?null:(()=>{let O=Rt(e),Vt=O==="all"?(0,I.jsx)(Fs.default,{sx:{fontSize:17,color:"#2f80ed"}}):O==="group"?(0,I.jsx)(Hs.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,I.jsx)(Ns.default,{sx:{fontSize:17}}),kn=O==="all"?"\uC804\uCCB4\uACF5\uAC1C":O==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${w.find(P=>P.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return(0,I.jsx)(ue.Box,{sx:co?void 0:So($t?1:2),children:(0,I.jsx)(Se,{icon:Vt,label:"\uACF5\uAC1C",onClick:Fo||!u?void 0:P=>No(P),children:kn})})})(),!Qe&&!$t?(0,I.jsx)(ue.Box,{sx:co?void 0:So(1),children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Yx.default,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:Fo||!d?void 0:O=>Vo(O),children:e.repeat_rule?Ii(e.repeat_rule):(0,I.jsx)(er,{label:"\uC5C6\uC74C"})})}):null,!Qe&&!$t&&e.repeat_rule?(0,I.jsx)(ue.Box,{sx:co?void 0:So(2),children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Xx.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:Fo||!d?void 0:O=>zn(O),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:(0,I.jsx)(er,{})})}):null,lt&&lt.total>0?(0,I.jsx)(ue.Box,{sx:co?void 0:So(2),children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Za.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:lt.canConfirm?(0,I.jsx)(ue.Button,{size:"small",variant:"contained",onClick:()=>_o?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,I.jsxs)(ue.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:lt.myTime?(0,I.jsx)(Qa.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>F({anchorEl:O.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[lt.count," / ",lt.total]})})}):null,Qe&&Ot?(0,I.jsx)(ue.Box,{sx:So(2),children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Za.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,I.jsx)(ue.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Ot.canAck?(0,I.jsx)(ue.Button,{size:"small",variant:"contained",onClick:()=>_o?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,I.jsx)(ue.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Ot.acked?(0,I.jsx)(Qa.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>F({anchorEl:O.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Ot.total>0&&Ot.count>=Ot.total?"\uC644\uB8CC":(0,I.jsxs)(I.Fragment,{children:[Ot.count,(0,I.jsx)(ue.Box,{component:"span",sx:{mx:.4},children:"/"}),Ot.total]})})})})}):null,Dt&&!Rn&&!co&&!Qe?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Se,{icon:(0,I.jsx)(Fx.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Fo?void 0:O=>Et(O),sx:So(1),children:(e.sprint_seq??0)>0?Ro.find(O=>O.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,I.jsx)(er,{label:"\uBBF8\uBC30\uC815"})}),(0,I.jsx)(Se,{icon:(0,I.jsx)(Hx.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:So(2),children:(0,I.jsx)(cn,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Fo,onCommit:O=>q?.(e.seq,Number(O.replace(/[^0-9.]/g,""))||0)})})]}):null,co||N?null:(0,I.jsx)(ue.Box,{sx:[{gridColumn:"1 / -1"},ge??null],children:(0,I.jsx)(Se,{icon:(0,I.jsx)(Vx.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Fo?void 0:O=>qn(O),children:(e.label_keys??[]).length>0?(0,I.jsx)(yn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,I.jsx)(er,{})})}),co?null:Vi]}),trailing:(0,I.jsxs)(I.Fragment,{children:[$t?(0,I.jsx)(Mi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Fo,showResolution:!!e.completed,onChangeRepro:O=>V?.(e.seq,"bug_repro",O),onChangeDevice:O=>V?.(e.seq,"bug_device",O),onChangeWhere:O=>V?.(e.seq,"bug_where",O),onChangeVersion:O=>V?.(e.seq,"bug_version",O),onChangeResolution:O=>Me?.(e.seq,O)}):null,co?Vi:null,e.completed?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Se,{icon:(0,I.jsx)(Za.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[jt(10),ge??null,...co?[]:[So(1)]],children:e.completed_by?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(rt,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,I.jsx)(er,{})}),(0,I.jsx)(Se,{icon:(0,I.jsx)(Ls.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[jt(12),ge??null,...co?[]:[So(2)]],children:e.completed_time?dt(e.completed_time):(0,I.jsx)(er,{})})]}):null]})}),(0,I.jsxs)(ue.Box,{sx:{display:"none",[Nt]:{display:"block",mt:1.5,mb:0}},children:[(0,I.jsx)(ue.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,I.jsx)(ue.ButtonBase,{onClick:()=>Te(O=>!O),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:Y?(0,I.jsxs)(I.Fragment,{children:["\uC811\uAE30 ",(0,I.jsx)(Ax.default,{sx:{fontSize:18}})]}):(0,I.jsxs)(I.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,I.jsx)(Lx.default,{sx:{fontSize:18}})]})})]}),(0,I.jsxs)(ue.Box,{children:[(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[Nt]:{mt:0,mb:1.25}}}),(0,I.jsx)(_t,{icon:(0,I.jsx)(Ux.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,I.jsx)(ue.Box,{sx:{userSelect:"text"},children:(0,I.jsx)(Oi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:B?O=>B(e.seq,O):void 0,readOnly:Fo,onChange:O=>z(e.seq,O)})})}),e.is_bug?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(_t,{icon:(0,I.jsx)(Gx.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,I.jsx)(ue.Box,{sx:{userSelect:"text"},children:(0,I.jsx)(Rs,{value:e.note,readOnly:Nn,onCommit:O=>R(e.seq,O),onDraftChange:S?O=>S(e.seq,O):void 0})})})]}),co?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(Pi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Nn,onAdd:D,onToggle:M,onRemove:A,onUpdate:C,onReorder:ie,hideCompleted:!!e.checklist_hide_completed,onChangeHideCompleted:h,onConvertToTask:x,onOpenLinkedTask:v,resolveLinkedTask:y,myAccountSeq:Q,linkCandidates:E,linkBaseTask:e,onLinkExistingTask:T})]}),E&&!co&&!Qe&&Ps(e,E)?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(qs,{task:e,tasks:E,readOnly:Fo,onOpenTask:te,onLink:ce,onUnlink:Ae,onCreateFollowUp:fe})]}):null,(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(zi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Nn,onAdd:ke,onRemove:Oe,onPreview:xe?O=>xe({...O,taskSeq:e.seq}):void 0,onDownload:ve?O=>ve({...O,taskSeq:e.seq}):void 0})]}),(0,I.jsx)(ue.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,I.jsx)(Es,{taskSeq:e.seq,comments:e.comments??[],currentUserName:$,myAccountSeq:Q,avatarSrcByName:n,onUpdate:j,onRemove:re,onToggleReaction:U,onPreview:xe?O=>xe({...O,taskSeq:e.seq}):void 0,onDownload:ve?O=>ve({...O,taskSeq:e.seq}):void 0})]}),(0,I.jsx)(cr,{anchorEl:ko,value:e.status,options:Qe?wr:$t?Hn:Dr,onSelect:O=>r(e.seq,O),onClose:()=>fo(null)}),(0,I.jsx)(ue.Menu,{transitionDuration:0,anchorEl:Yo,open:!!Yo,onClose:()=>Vo(null),children:[{value:"",label:"\uC5C6\uC74C"},...Kr].map(O=>(0,I.jsx)(ue.MenuItem,{selected:(e.repeat_rule??"")===O.value,onClick:()=>{Vo(null),(async()=>{let Vt=e.repeat_rule??"";if(O.value===Vt)return;if(O.value===""){await(0,Hi.ConfirmDialog)({title:"\uBC18\uBCF5 \uD574\uC81C",message:"\uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uACE0 \uBC18\uBCF5\uC744 \uD574\uC81C\uD560\uAE4C\uC694? (\uC9C0\uB09C \uD68C\uCC28\uB294 \uB0A8\uC2B5\uB2C8\uB2E4)"})&&d?.(e.seq,"","");return}let kn=String(e.due_date??"").slice(0,10);if(!kn){(0,Hi.InfoAlert)(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uC77C\uC2DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}Vt&&!await(0,Hi.ConfirmDialog)({title:"\uBC18\uBCF5 \uBCC0\uACBD",message:"\uC774\uD6C4 \uD68C\uCC28\uB97C \uC0C8 \uADDC\uCE59\uC73C\uB85C \uB2E4\uC2DC \uC0DD\uC131\uD560\uAE4C\uC694? \uC774\uD6C4 \uD68C\uCC28\uC758 \uB313\uAE00\xB7\uCCA8\uBD80\uB294 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."})||d?.(e.seq,O.value,_i(kn,O.value))})()},sx:{fontSize:14,minWidth:140},children:O.label},O.value||"none"))}),(0,I.jsx)(Qx.DatePicker,{anchorEl:Ko,open:!!Ko,onClose:()=>zn(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:O=>{zn(null);let Vt=J=>String(J).padStart(2,"0"),kn=`${O.getFullYear()}-${Vt(O.getMonth()+1)}-${Vt(O.getDate())}`,P=e.repeat_rule??"";P&&d?.(e.seq,P,kn)}}),(0,I.jsx)(ue.Menu,{transitionDuration:0,anchorEl:Xe,open:!!Xe,onClose:()=>No(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:(0,I.jsx)(Ns.default,{sx:{fontSize:17,color:"#57564f"}}),selected:Rt(e)==="involved",onPick:()=>u?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:(0,I.jsx)(Fs.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Rt(e)==="all",onPick:()=>u?.(e.seq,"all",0)},...w.map(O=>({key:`group-${O.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${O.name}`,icon:(0,I.jsx)(Hs.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:Rt(e)==="group"&&(e.visibility_group_seq??0)===O.seq,onPick:()=>u?.(e.seq,"group",O.seq)}))].map(O=>(0,I.jsxs)(ue.MenuItem,{selected:O.selected,onClick:()=>{O.onPick(),No(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.icon,O.label,O.selected?(0,I.jsx)(As.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.key))}),(0,I.jsx)(ue.Menu,{transitionDuration:0,anchorEl:no,open:!!no,onClose:()=>Et(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ro.filter(O=>`custom-${O.group_seq}`===String(e.tab_key??"")).map(O=>({seq:O.seq,label:It(O)}))].map(O=>(0,I.jsxs)(ue.MenuItem,{onClick:()=>{ar?.(e.seq,O.seq),Et(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.label,(e.sprint_seq??0)===O.seq?(0,I.jsx)(As.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.seq))}),(0,I.jsx)(Ti,{anchorEl:Ye?.anchorEl??null,open:!!Ye?.open,acks:e.acks??[],total:Ot?.total??lt?.total??0,avatarSrcByName:n,onRequestConfirm:ee&&lt&&lt.count<lt.total?()=>{ee(e.seq),F(O=>O?{...O,open:!1}:null)}:void 0,onClose:()=>F(O=>O?{...O,open:!1}:null)}),(0,I.jsx)(Ai,{anchorEl:Mt,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:O=>i(e.seq,mi(e.label_keys??[],O)),onAddLabel:l,onClose:()=>qn(null)}),(0,I.jsx)(eo,{open:!!An,anchorEl:An,title:ei?"\uC774 \uC5C5\uBB34\uB97C \uAC00\uC838\uC640 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>Ln(null),onConfirm:()=>{Le?.(e.seq),Ln(null)}})]})}var Eo=require("react/jsx-runtime");function $h(){let e=new Date,o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())} ${o(e.getHours())}:${o(e.getMinutes())}`}function Vh({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:f,onChangeIconColor:m,activityItems:c,activityLoading:b,onLoadActivity:p,onPrint:u,...d}){let w=Je(),_=(0,_n.useRef)(null);o&&(_.current=o);let k=o??_.current,[g,R]=(0,_n.useState)(!1),[S,z]=(0,_n.useState)({}),B=Object.keys(S).length>0;(0,_n.useEffect)(()=>{z({})},[o?.seq,e]);let D=(0,_n.useRef)(null);if((0,_n.useEffect)(()=>{D.current?.scrollTo({top:0})},[o?.seq]),!k)return null;let M=w&&B?{...k,...S}:k,A=M.checklist??[],C=(T,y)=>{w?z(E=>({...E,...T})):y()},ie=()=>{let T=S;z({});let y=k.seq,E=T.title===void 0?void 0:String(T.title).trim();if(r){let te={...T};E!==void 0&&(E?te.title=E:delete te.title),Object.keys(te).length>0&&r(y,te),(0,$s.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}E&&s(y,E),T.icon!==void 0&&f(y,String(T.icon)),T.icon_color!==void 0&&m?.(y,String(T.icon_color)),T.status!==void 0&&d.onChangeStatus(y,T.status),T.label_keys!==void 0&&d.onChangeLabels(y,T.label_keys??[]),T.tab_key!==void 0&&d.onChangeProject(y,String(T.tab_key??"")),T.start_date!==void 0&&d.onChangeDate(y,"start_date",String(T.start_date??"")),T.due_date!==void 0&&d.onChangeDate(y,"due_date",String(T.due_date??"")),T.reminder!==void 0&&d.onChangeReminder(y,T.reminder),T.priority!==void 0&&d.onChangePriority(y,T.priority),T.event_time!==void 0&&d.onChangeEventTime?.(y,String(T.event_time??"")),T.event_place!==void 0&&d.onChangeEventPlace?.(y,String(T.event_place??"")),T.event_address!==void 0&&d.onChangeEventAddress?.(y,String(T.event_address??"")),T.content!==void 0&&d.onChangeContent(y,String(T.content??"")),T.note!==void 0&&d.onChangeNote(y,String(T.note??"")),T.visibility!==void 0&&d.onChangeVisibility?.(y,T.visibility,Number(T.visibility_group_seq??0)),(0,$s.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},h={...d,onChangeStatus:(T,y)=>C({status:y},()=>d.onChangeStatus(T,y)),onChangeLabels:(T,y)=>C({label_keys:y},()=>d.onChangeLabels(T,y)),onChangeProject:(T,y)=>C({tab_key:y},()=>d.onChangeProject(T,y)),onChangeDate:(T,y,E)=>C({[y]:E},()=>d.onChangeDate(T,y,E)),onChangeReminder:(T,y)=>C({reminder:y},()=>d.onChangeReminder(T,y)),onChangePriority:(T,y)=>C({priority:y},()=>d.onChangePriority(T,y)),onChangeEventTime:(T,y)=>C({event_time:y},()=>d.onChangeEventTime?.(T,y)),onChangeEventPlace:(T,y)=>C({event_place:y},()=>d.onChangeEventPlace?.(T,y)),onChangeEventAddress:(T,y)=>C({event_address:y},()=>d.onChangeEventAddress?.(T,y)),onChangeContent:(T,y)=>C({content:y},()=>d.onChangeContent(T,y)),onChangeNote:(T,y)=>C({note:y},()=>d.onChangeNote(T,y)),onMemberEdit:(T,y)=>d.onMemberEdit(T,y,w?E=>z(te=>({...te,...E})):null),onChangeNoteDraft:w?(T,y)=>C({note:y},()=>{}):void 0,onChangeVisibility:d.onChangeVisibility?(T,y,E)=>C({visibility:y,visibility_group_seq:E},()=>d.onChangeVisibility?.(T,y,E)):void 0,onAddChecklistItem:(T,y)=>C({checklist:[...A,{label:y,checked:!1}]},()=>d.onAddChecklistItem(T,y)),onToggleChecklistItem:(T,y,E)=>C({checklist:A.map((te,ce)=>ce===y?{...te,checked:E}:te)},()=>d.onToggleChecklistItem(T,y,E)),onRemoveChecklistItem:(T,y)=>C({checklist:A.filter((E,te)=>te!==y)},()=>d.onRemoveChecklistItem(T,y)),onUpdateChecklistItem:d.onUpdateChecklistItem?(T,y,E)=>C({checklist:A.map((te,ce)=>ce===y?{...te,label:E}:te)},()=>d.onUpdateChecklistItem?.(T,y,E)):void 0,onReorderChecklist:d.onReorderChecklist?(T,y)=>C({checklist:y},()=>d.onReorderChecklist?.(T,y)):void 0,onChangeChecklistHideCompleted:d.onChangeChecklistHideCompleted?(T,y)=>C({checklist_hide_completed:y},()=>d.onChangeChecklistHideCompleted?.(T,y)):void 0,onLinkChecklistTask:d.onLinkChecklistTask?(T,y,E)=>C({checklist:[...A,{label:E,checked:!1,task_seq:y}]},()=>d.onLinkChecklistTask?.(T,y,E)):void 0},x=(0,Eo.jsx)(Ws,{...h,task:M,myAccountSeq:i,onChangeTitle:(T,y)=>C({title:y},()=>s(T,y)),onToggleCompleted:l,onChangeIcon:(T,y)=>C({icon:y},()=>f(T,y)),onChangeIconColor:(T,y)=>C({icon_color:y},()=>m?.(T,y)),showTitle:w}),v=(0,Eo.jsx)(Ms,{onSubmit:(T,y)=>n(M.seq,T,y)},M.seq);return w?(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsx)(og.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:M.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":M.is_event?"\uC77C\uC815":M.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...p?[{icon:(0,Eo.jsx)(Jx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>R(!0)}]:[],{icon:(0,Eo.jsx)(Zx.default,{sx:{ml:p?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>hr(M,!0)},{icon:(0,Eo.jsx)(Ht.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!B,onClick:B?ie:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#e6e6e3",color:"#9a9a97"}},children:"\uC800\uC7A5"}),tooltip:""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:v},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:(0,Eo.jsx)(Ht.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:x})}]},k.seq),(0,Eo.jsx)(Fi,{open:g,taskSeq:M.seq,items:c,loading:b,onLoad:p,onClose:()=>R(!1)})]}):(0,Eo.jsx)(Ht.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:T=>T.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Eo.jsxs)(Ht.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,Eo.jsx)(Os,{task:M,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:f,onChangeIconColor:m,onClose:t,activityItems:c,activityLoading:b,onLoadActivity:p,onPrint:u}),(0,Eo.jsx)(Ht.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Eo.jsx)(Ht.Box,{sx:{flex:1,minHeight:0},children:(0,Eo.jsx)(eg.default,{ref:D,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:x})}),(0,Eo.jsx)(Ht.Divider,{sx:{borderColor:"#37352f"}}),(0,Eo.jsx)(Ht.Box,{sx:{flexShrink:0},children:v})]})})}var pn=require("react"),vo=require("@mui/material"),rg=require("@ehfuse/mui-form-dialog"),ig=a(require("@mui/icons-material/EditOutlined"),1),Vs=require("@ehfuse/alerts"),wn=require("@ehfuse/mui-form-controls");var Ja="custom-";function tg(e){return e.startsWith(Ja)}function Kh(e){return e>0?`${Ja}${e}`:""}function el(e){if(!tg(e))return 0;let o=Number(e.slice(Ja.length));return Number.isInteger(o)&&o>0?o:0}var qe=require("react/jsx-runtime"),Uh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function ng(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function Gh({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let f=o.filter(h=>h.useSprints&&!h.archived),[m,c]=(0,pn.useState)(""),[b,p]=(0,pn.useState)(""),[u,d]=(0,pn.useState)(""),[w,_]=(0,pn.useState)(""),[k,g]=(0,pn.useState)(""),[R,S]=(0,pn.useState)(!1),[z,B]=(0,pn.useState)(0);(0,pn.useEffect)(()=>{e&&(c(f.length===1?f[0].key:""),p(""),d(""),_(""),g(""),B(0))},[e]);let D=()=>{p(""),d(""),_(""),g(""),B(0)},M=h=>{B(h.seq),c(`custom-${h.group_seq}`),p(h.name),d(h.goal),_(h.start_date),g(h.end_date)},A=async()=>{let h=el(m);if(!h){(0,Vs.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!b.trim()){(0,Vs.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(z>0){i(z,{name:b.trim(),goal:u.trim(),start_date:w,end_date:k}),D();return}await r({group_seq:h,name:b.trim(),goal:u.trim(),start_date:w,end_date:k})&&D()}finally{S(!1)}},C=new Map(o.map(h=>[el(h.key),h.label])),ie=(0,qe.jsx)(vo.Box,{children:f.length===0?(0,qe.jsx)(vo.Box,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsxs)(vo.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,qe.jsx)(wn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:m,options:f.map(h=>({value:h.key,label:h.label})),onChange:h=>c(String(h.target.value)),disabled:z>0}),(0,qe.jsx)(wn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:b,onChange:h=>p(h.target.value)}),(0,qe.jsx)(wn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:w,onChange:h=>_(h.target.value)}),(0,qe.jsx)(wn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:k,onChange:h=>g(h.target.value)}),(0,qe.jsx)(wn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:u,onChange:h=>d(h.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,qe.jsxs)(vo.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[z>0?(0,qe.jsx)(vo.Button,{color:"inherit",onClick:D,disabled:R,children:"\uCDE8\uC18C"}):null,(0,qe.jsx)(vo.Button,{variant:"contained",onClick:()=>{A()},disabled:R,children:z>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,qe.jsx)(vo.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,qe.jsx)(vo.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(h=>(0,qe.jsxs)(vo.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,qe.jsxs)(vo.Box,{sx:{minWidth:0},children:[(0,qe.jsxs)(vo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,qe.jsx)(vo.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:h.name}),(0,qe.jsx)(vo.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:C.get(h.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,qe.jsxs)(vo.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[ng(h.start_date)," ~ ",ng(h.end_date)]})]}),h.goal?(0,qe.jsx)(vo.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:h.goal}):null]}),(0,qe.jsxs)(vo.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,qe.jsx)(wn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:h.status,options:Uh.map(x=>({value:x.value,label:x.label})),onChange:x=>l(h.seq,String(x.target.value)),sx:{width:104,flexShrink:0}}),(0,qe.jsx)(vo.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>M(h),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,qe.jsx)(ig.default,{sx:{fontSize:18}})}),(0,qe.jsx)(vo.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(h.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,qe.jsx)(an,{style:{width:16,height:16}})})]})]},h.seq))})]})});return(0,qe.jsx)(rg.FormDialog,{open:e,onClose:n,maxWidth:"sm",title:"\uBAA9\uD45C \uAD00\uB9AC",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-manage",sections:[{id:"sprint-manage",showTitle:!1,children:ie}],actions:{showCancelButton:!1,right:(0,qe.jsx)(vo.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var Ks=require("react"),je=require("@mui/material"),ag=require("@ehfuse/mui-form-dialog"),lg=a(require("@mui/icons-material/OpenInNewOutlined"),1),sg=a(require("@mui/icons-material/EventOutlined"),1),cg=require("@ehfuse/alerts");var Ee=require("react/jsx-runtime");function jh({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,Ks.useState)(""),[s,f]=(0,Ks.useState)(!1),m=async()=>{let p=i.trim();if(p){f(!0);try{await t(p)&&l("")}finally{f(!1)}}},c=async p=>{await(0,cg.ConfirmDialog)({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(p.seq)},b=(0,Ee.jsxs)(je.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,Ee.jsxs)(je.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,Ee.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,Ee.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,Ee.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,Ee.jsx)(je.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,Ee.jsx)(je.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((p,u)=>(0,Ee.jsxs)(je.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:u>0?"1px solid #efefed":"none"},children:[(0,Ee.jsx)(sg.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,Ee.jsx)(je.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,Ee.jsx)(je.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{c(p)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Ee.jsx)(an,{sx:{fontSize:18}})})]},p.seq))}):(0,Ee.jsx)(je.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,Ee.jsx)(je.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,Ee.jsx)(je.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,Ee.jsxs)(je.Box,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,mb:1,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[(0,Ee.jsx)(je.Box,{children:(0,Ee.jsxs)(je.Box,{component:"span",children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354(\uC6F9) > \uC67C\uCABD \uBAA9\uB85D\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 \u22EE > ",(0,Ee.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,Ee.jsx)(je.Box,{children:(0,Ee.jsxs)(je.Box,{component:"span",children:[(0,Ee.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,Ee.jsx)("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,Ee.jsx)(je.Box,{children:(0,Ee.jsx)(je.Box,{component:"span",children:"\uBE44\uBC00 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),(0,Ee.jsx)(je.Box,{children:(0,Ee.jsx)(je.Box,{component:"span",children:"\uC77C\uC815\uC740 \uC57D 10\uBD84 \uAC04\uACA9\uC73C\uB85C \uAC31\uC2E0\uB418\uACE0, \uBC18\uBCF5 \uC77C\uC815\uC740 \uC77C\uBC18\uC801\uC778 \uADDC\uCE59(\uB9E4\uC77C/\uB9E4\uC8FC/\uB9E4\uC6D4/\uB9E4\uB144)\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4."})})]}),(0,Ee.jsxs)(je.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,Ee.jsx)(je.TextField,{value:i,onChange:p=>l(p.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),(0,Ee.jsx)(je.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{m()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,Ee.jsx)(ag.FormDialog,{open:e,onClose:r,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-import",sections:[{id:"calendar-import",showTitle:!1,children:b}],actions:{showCancelButton:!1,left:(0,Ee.jsx)(je.Button,{variant:"outlined",startIcon:(0,Ee.jsx)(lg.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Ee.jsx)(je.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var $o=require("@mui/material"),mg=require("@ehfuse/mui-form-dialog"),ug=a(require("@mui/icons-material/ContentCopyOutlined"),1),Us=a(require("@mui/icons-material/OpenInNewOutlined"),1),Gs=require("@ehfuse/alerts"),He=require("react/jsx-runtime");function dg(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function Yh({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??dg,s=o.subscribed?l(o.token):"",f=()=>{navigator.clipboard.writeText(s).then(()=>(0,Gs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Gs.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},m=()=>{let b=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(b)}`,"_blank")},c=(0,He.jsxs)($o.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,He.jsxs)($o.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,He.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?(0,He.jsxs)($o.Box,{sx:{color:"#8a6d1d",bgcolor:"#faf1d7",borderRadius:1,px:1.5,py:1.25,lineHeight:1.7},children:["\uC9C0\uAE08\uC740 \uCE98\uB9B0\uB354\uC5D0 \uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",(0,He.jsx)("br",{}),(0,He.jsx)("b",{children:"\uB9C8\uAC10\uC77C\uC2DC\uAC00 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)($o.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,He.jsxs)($o.Box,{sx:{display:"flex",gap:2},children:[(0,He.jsx)($o.Button,{variant:"outlined",startIcon:(0,He.jsx)(ug.default,{}),onClick:f,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,He.jsx)($o.Button,{variant:"contained",startIcon:(0,He.jsx)(Us.default,{}),onClick:m,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,He.jsxs)($o.Box,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[(0,He.jsx)($o.Box,{children:(0,He.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,He.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,He.jsx)($o.Box,{children:(0,He.jsx)("span",{children:"\uAD6C\uAE00\uC774 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C(\uC218 \uC2DC\uAC04 \uAC04\uACA9) \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."})}),(0,He.jsx)($o.Box,{children:(0,He.jsx)("span",{children:"\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uCD94\uAC00\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."})}),(0,He.jsx)($o.Box,{children:(0,He.jsx)("span",{children:"\uC774 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uACF5\uC720\uD558\uBA74 \uB0B4 \uC5C5\uBB34 \uC77C\uC815\uC774 \uB178\uCD9C\uB429\uB2C8\uB2E4."})})]})]}):(0,He.jsx)($o.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,He.jsx)(mg.FormDialog,{open:e,onClose:i,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-subscribe",sections:[{id:"calendar-subscribe",showTitle:!1,children:c}],actions:{showCancelButton:!1,left:(0,He.jsx)($o.Button,{variant:"outlined",startIcon:(0,He.jsx)(Us.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,He.jsx)($o.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var fn=require("react"),xn=require("@mui/material"),pg=require("@ehfuse/mui-form-dialog"),fg=require("@ehfuse/mui-form-controls"),xg=require("@ehfuse/tree-view");var tt=require("react/jsx-runtime");function gg(e){return`${e.name}#${e.seq}`}function Xh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function Qh(e){let o=[],t=n=>{for(let r of n.employees??[])o.push(r);for(let r of n.groups??[])t(r)};for(let n of e)t(n);return o}function Zh(e,o){return o?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(t=>String(t).toLowerCase().includes(o)):!0}function Jh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:gg(e),renderLabel:(0,tt.jsx)(xn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,tt.jsx)(xn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function bg(e,o){let t=(e.groups??[]).map(r=>bg(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>Zh(r,o)).map(Jh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function ek({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,fn.useState)(""),f=(0,fn.useMemo)(()=>e.map(c=>bg(c,l.trim().toLowerCase())).filter(c=>c!==null),[e,l]),m=(0,fn.useMemo)(()=>o.filter(c=>t.includes(c.seq)).map(gg),[]);return(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(xn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,tt.jsx)(fg.SearchTextField,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:s,onClear:()=>s(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,tt.jsx)(xn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,tt.jsx)(xg.TreeView,{items:f,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:m,onChange:c=>i(c.map(Xh).filter(b=>b>0)),styles:{border:"none",borderRadius:"0"}})})]})}function ok({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:l="\uD655\uC778",onConfirm:s,onClose:f}){let m=Je(),[c,b]=(0,fn.useState)([]),[p,u]=(0,fn.useState)(0),d=(0,fn.useMemo)(()=>Qh(n),[n]),w=i??[];(0,fn.useEffect)(()=>{e&&(b(w),u(k=>k+1))},[e]);let _=()=>{let k=d.filter(g=>c.includes(g.seq));s(r?k:k.slice(0,1)),f()};return(0,tt.jsx)(pg.FormDialog,{open:e,onClose:f,title:`${o}${r&&c.length>0?` (${c.length}\uBA85)`:""}`,locale:"ko",fullScreen:m,mobilePresentation:m?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:(0,tt.jsx)(xn.Box,{sx:{...m?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...m?{}:{overflow:"hidden"},userSelect:"none"},children:(0,tt.jsx)(ek,{groups:n,allEmployees:d,initialSelectedSeqs:w,multiple:r,isMobile:m,onSelectionChange:b},p)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?(0,tt.jsx)(xn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,tt.jsx)(xn.Button,{variant:"contained",onClick:_,children:l})}})}var Zr=require("react"),Zt=require("@mui/material"),Tg=require("@ehfuse/mui-form-dialog"),yg=require("@ehfuse/mui-form-controls");var Qt=require("@mui/material"),yt=require("react/jsx-runtime");function tk(e,o){let t=o.filter(n=>n.sprint_seq===e.seq&&!n.archived&&n.completed);return{points:t.reduce((n,r)=>n+(r.story_points??0),0),count:t.length}}function js({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((c,b)=>`${c.start_date}|${c.seq}`.localeCompare(`${b.start_date}|${b.seq}`)).map(c=>({sprint:c,...tk(c,o)})),i=r.some(c=>c.points>0),l=r.map(c=>i?c.points:c.count),s=Math.max(1,...l),f=r.filter(c=>c.sprint.status==="closed").map(c=>i?c.points:c.count),m=f.length>0?Math.round(f.reduce((c,b)=>c+b,0)/f.length*10)/10:null;return r.length===0?(0,yt.jsx)(Qt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,yt.jsxs)(Qt.Box,{children:[(0,yt.jsxs)(Qt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,yt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),m!==null?(0,yt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,yt.jsx)(Qt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:m}),i?"SP":"\uAC74"]}):null]}),(0,yt.jsx)(Qt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(c=>{let b=i?c.points:c.count,p=Math.round((t-24)*b/s),u=c.sprint.status==="closed";return(0,yt.jsxs)(Qt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,yt.jsx)(Qt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:b}),(0,yt.jsx)(Qt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,p),borderRadius:"4px 4px 0 0",bgcolor:u?"#2f80ed":"#a9c9f5"}})]},c.sprint.seq)})}),(0,yt.jsx)(Qt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(c=>(0,yt.jsxs)(Qt.Box,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.sprint.name,c.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},c.sprint.seq))})]})}var kg=require("react"),or=require("@mui/material"),Lo=require("react/jsx-runtime");function hg(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function nk(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Ys(e){return e.slice(5).replace("-",".")}function Xs({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,kg.useMemo)(()=>{let k=hg(e.start_date),g=hg(e.end_date);if(!k||!g||g<k||Math.round((g.getTime()-k.getTime())/864e5)+1>366)return null;let S=o.filter(h=>h.sprint_seq===e.seq&&!h.archived);if(S.length===0)return{empty:!0};let z=S.some(h=>(h.story_points??0)>0),B=h=>z?h.story_points??0:1,D=S.reduce((h,x)=>h+B(x),0),M=new Map;for(let h of S){if(!h.completed)continue;let x=(h.completed_time??"").slice(0,10),v=/^\d{4}-\d{2}-\d{2}$/.test(x)?x:e.start_date;M.set(v,(M.get(v)??0)+B(h))}let A=[];for(let h=new Date(k);h<=g;h.setDate(h.getDate()+1))A.push(nk(h));let C=D,ie=[];for(let h of A){if(h>t)break;C-=M.get(h)??0,ie.push({day:h,value:Math.max(0,C)})}return{empty:!1,days:A,total:D,usePoints:z,actual:ie}},[e,o,t]);if(!r)return(0,Lo.jsx)(or.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return(0,Lo.jsx)(or.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:l,usePoints:s,actual:f}=r,m=600,c=200,b=8,p=k=>i.length===1?0:k/(i.length-1)*m,u=k=>b+(c-b*2)*(1-k/Math.max(1,l)),d=`${p(0)},${u(l)} ${p(i.length-1)},${u(0)}`,w=f.map(k=>`${p(i.indexOf(k.day))},${u(k.value)}`).join(" "),_=f[f.length-1];return(0,Lo.jsxs)(or.Box,{children:[(0,Lo.jsxs)(or.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Lo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),_?(0,Lo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Lo.jsx)(or.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:_.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,Lo.jsx)(or.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,Lo.jsxs)("svg",{viewBox:`0 0 ${m} ${c}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,Lo.jsx)("line",{x1:0,y1:u(0),x2:m,y2:u(0),stroke:"#e6e6e3",strokeWidth:1}),(0,Lo.jsx)("polyline",{points:d,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),f.length>1?(0,Lo.jsx)("polyline",{points:w,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,_?(0,Lo.jsx)("circle",{cx:p(i.indexOf(_.day)),cy:u(_.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,Lo.jsxs)(or.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,Lo.jsx)("span",{children:Ys(e.start_date)}),t>e.start_date&&t<e.end_date?(0,Lo.jsxs)("span",{children:["\uC624\uB298 ",Ys(t)]}):null,(0,Lo.jsx)("span",{children:Ys(e.end_date)})]})]})}var St=require("react/jsx-runtime");function rk({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Zr.useState)(0);(0,Zr.useEffect)(()=>{if(!e)return;let c=o.find(p=>p.status==="active")??o[0],b=o.find(p=>p.seq===r)??c;s(b?.seq??0)},[e]);let f=(0,Zr.useMemo)(()=>o.find(c=>c.seq===l)??null,[o,l]),m=(0,St.jsxs)(Zt.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,St.jsxs)(Zt.Box,{sx:{px:3,py:2.5},children:[(0,St.jsx)(Zt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,St.jsx)(js,{sprints:o,tasks:t})]}),(0,St.jsx)(Zt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,St.jsxs)(Zt.Box,{sx:{px:3,py:2.5},children:[(0,St.jsx)(Zt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,St.jsx)(yg.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(c=>({value:String(c.seq),label:It(c)})),onChange:c=>s(Number(c.target.value)||0),sx:{width:280,mb:2}}),f?(0,St.jsx)(Xs,{sprint:f,tasks:t,todayStr:n}):(0,St.jsx)(Zt.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694."})]})]});return(0,St.jsx)(Tg.FormDialog,{open:e,onClose:i,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:m}],actions:{showCancelButton:!1,right:(0,St.jsx)(Zt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var gn=require("@mui/material");var Dn=require("react/jsx-runtime");function ik({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,Dn.jsxs)(gn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,Dn.jsx)(gn.MenuItem,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(s=>{let f=t.includes(s.name);return(0,Dn.jsxs)(gn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,Dn.jsx)(gn.Checkbox,{size:"small",checked:f,sx:{p:0}}),(0,Dn.jsx)(rt,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,Dn.jsx)(gn.Divider,{}),(0,Dn.jsx)(gn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Sg=require("react"),Jr=require("@mui/material"),Bg=a(require("@mui/icons-material/KeyboardArrowDown"),1),Cg=a(require("@mui/icons-material/Check"),1);var bn=require("react/jsx-runtime");function ak({value:e,onChange:o,options:t}){let[n,r]=(0,Sg.useState)(null),i=t??aa,l=aa.find(s=>s.value===e)?.label??"";return(0,bn.jsxs)(bn.Fragment,{children:[(0,bn.jsxs)(Jr.ButtonBase,{onClick:s=>r(s.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[l,(0,bn.jsx)(Bg.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,bn.jsx)(Jr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,bn.jsxs)(Jr.MenuItem,{selected:s.value===e,onClick:()=>{o(s.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[s.label,s.value===e?(0,bn.jsx)(Cg.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var hn=require("@mui/material"),Ig=a(require("@mui/icons-material/Check"),1),_g=a(require("@ehfuse/overlay-scrollbar"),1);var Jt=require("react/jsx-runtime"),vg=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function lk({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return(0,Jt.jsx)(hn.Popover,{transitionDuration:0,open:!!e,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:(0,Jt.jsxs)(hn.Box,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[(0,Jt.jsx)(_g.default,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:(0,Jt.jsx)(hi,{value:o||on,onChange:l=>{n(l),i()}})}),r?(0,Jt.jsxs)(hn.Box,{sx:{px:1.25,pb:1.25},children:[(0,Jt.jsx)(hn.Divider,{sx:{mb:1,borderColor:"#efefed"}}),(0,Jt.jsx)(hn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:vg.map(l=>{let s=(t||vg[0])===l;return(0,Jt.jsx)(hn.ButtonBase,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${l}`,onClick:()=>r(l),sx:{width:26,height:26,borderRadius:"50%",bgcolor:l,display:"flex",alignItems:"center",justifyContent:"center"},children:s?(0,Jt.jsx)(Ig.default,{sx:{fontSize:15,color:"#ffffff"}}):null},l)})})]}):null]})})}var kr=require("@mui/material"),Qs=require("@ehfuse/mui-form-controls");function tr(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Wi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function sk(e=new Date){return{fromDate:tr(Wi(1,e)),toDate:tr(e)}}var En=require("react/jsx-runtime"),ck=[{label:"1\uAC1C\uC6D4",months:1},{label:"3\uAC1C\uC6D4",months:3},{label:"6\uAC1C\uC6D4",months:6},{label:"1\uB144",months:12},{label:"\uC804\uCCB4",months:0}];function Zs({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(tr(Wi(i)),tr(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===tr(Wi(i))&&o===tr(new Date);return(0,En.jsxs)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,En.jsx)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:ck.map(i=>{let l=r(i.months);return(0,En.jsx)(kr.ButtonBase,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:l?500:400,border:"1px solid",borderColor:l?"#2f80ed":"#dedddb",color:l?"#2f80ed":"#37352f",bgcolor:l?"#eef6ff":"transparent","&:hover":{bgcolor:l?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),(0,En.jsxs)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,En.jsx)(Qs.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,En.jsx)(kr.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,En.jsx)(Qs.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var wg=require("@mui/material");var Js=require("react/jsx-runtime");function mk({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,Js.jsx)(wg.Popover,{transitionDuration:0,anchorEl:e,open:!!e,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:(0,Js.jsx)(Zs,{fromDate:o,toDate:t,onChange:n})})}var nr=require("@mui/material"),Eg=a(require("@mui/icons-material/Checklist"),1),Mg=a(require("@mui/icons-material/Face"),1),Og=a(require("@mui/icons-material/Publish"),1),Rg=a(require("@mui/icons-material/NotificationsOutlined"),1),Pg=a(require("@mui/icons-material/BugReportOutlined"),1),zg=a(require("@mui/icons-material/DescriptionOutlined"),1),qg=a(require("@mui/icons-material/Inventory2Outlined"),1);var Wt=require("react/jsx-runtime");function Dg(e,o){return o>0?`${e} (${o})`:e}var uk=[{id:"my",label:"\uC804\uCCB4",icon:(0,Wt.jsx)(Eg.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Wt.jsx)(Rg.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Wt.jsx)(Mg.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Wt.jsx)(Og.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Wt.jsx)(Pg.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Wt.jsx)(qg.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Wt.jsx)(zg.default,{sx:{fontSize:18}}),hideCount:!0}];function dk(e){return{minHeight:46,minWidth:75,bgcolor:e.bg,color:e.color,borderRadius:"8px 8px 0 0",padding:"10px 18px",textTransform:"none",fontSize:14,fontWeight:500,border:`1px solid ${e.borderColor}`,borderBottom:"none","&:hover":{bgcolor:e.hoverBg},"&.Mui-selected":{bgcolor:e.selectedBg,color:e.selectedColor,border:`1px solid ${e.selectedBg}`,borderBottom:"none","&:hover":{bgcolor:e.selectedBg}},...e.sx}}function pk({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=pe(),l=dk(i.tabs),s=e;return r?(0,Wt.jsx)(nr.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(f=>{let m=o===f.id;return(0,Wt.jsx)(nr.ButtonBase,{onClick:()=>n(f.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:st(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:m?i.tabs.selectedBg:i.tabs.bg,color:m?i.tabs.selectedColor:i.tabs.color,borderColor:m?i.tabs.selectedBg:i.tabs.borderColor},children:Dg(f.label,f.hideCount?0:t[f.id]??0)},f.id)})}):(0,Wt.jsx)(nr.Tabs,{value:o,onChange:(f,m)=>n(m),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(f=>(0,Wt.jsx)(nr.Tab,{value:f.id,label:Dg(f.label,f.hideCount?0:t[f.id]??0),icon:f.icon,iconPosition:"start",sx:l},f.id))})}var rr=require("react"),Ce=require("@mui/material"),Ag=a(require("@mui/icons-material/OpenInNewOutlined"),1),Lg=a(require("@mui/icons-material/Check"),1),Ng=a(require("@mui/icons-material/CheckCircleOutlined"),1),Fg=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Hg=a(require("@mui/icons-material/SendOutlined"),1),Wg=a(require("@mui/icons-material/EventOutlined"),1),$g=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Vg=a(require("@mui/icons-material/ViewKanbanOutlined"),1),Kg=a(require("@mui/icons-material/ContentCopyOutlined"),1),Ug=a(require("@mui/icons-material/NextPlanOutlined"),1),Gg=a(require("@mui/icons-material/ContentPasteOutlined"),1),jg=a(require("@mui/icons-material/ShareOutlined"),1),Yg=a(require("@mui/icons-material/DirectionsRunOutlined"),1),ec=a(require("@mui/icons-material/ChevronRight"),1),Xg=a(require("@mui/icons-material/ArchiveOutlined"),1),Qg=a(require("@mui/icons-material/UnarchiveOutlined"),1),Zg=require("@ehfuse/alerts");var ae=require("react/jsx-runtime");function fk({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:f,onChangeReminder:m,onMemberEdit:c,onMoveProject:b,onDuplicate:p,onCreateFollowUp:u,onShare:d,onAssignSprint:w,onArchiveToggle:_,onDelete:k}){let g=Je(),R=nn(),[S,z]=(0,rr.useState)(null),[B,D]=(0,rr.useState)(null),[M,A]=(0,rr.useState)(null);(0,rr.useEffect)(()=>{e||(z(null),D(null),A(null))},[e]);let C=e?.task??null,ie=!!C?.is_notice,h=!!C?.is_event,x=C?!rn(C,r):!1,v=(0,rr.useMemo)(()=>new Set(t.filter(E=>E.useSprints).map(E=>E.key)),[t]),T=async(E="one")=>{let te=C;if(o(),!te)return;await(0,Zg.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:E==="series"?`"${te.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${te.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&k(te.seq,E)},y=()=>{C&&_(C.seq,!C.archived),o()};return(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsxs)(Ce.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:g?"none":"anchorPosition",anchorPosition:!g&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...g?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:g?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&i(C),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Ag.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,ae.jsxs)(Ce.MenuItem,{disabled:ie?(C?.author_account_seq??0)!==r:(C?.author_account_seq??0)!==r&&(C?.manager_account_seq??0)!==r,onClick:()=>{C&&l(C.seq,!C.completed),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:C?.completed?(0,ae.jsx)(Fg.default,{sx:{fontSize:19}}):(0,ae.jsx)(Ng.default,{sx:{fontSize:19}})}),C?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!ie&&s?(0,ae.jsxs)(Ce.MenuItem,{disabled:!(C?.manager_account_seq??0)&&(C?.receiver_account_seqs??[]).length===0,onClick:()=>{C&&s(C),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Hg.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,h?null:(0,ae.jsx)(Ce.Divider,{}),h?null:(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:E=>{C&&z({anchorEl:E.currentTarget,task:C})},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Wg.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC77C\uC2DC \uBCC0\uACBD"]}),!ie&&!h&&c?(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&c(C,"manager"),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)($g.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,h?null:(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:E=>{C&&D({anchorEl:E.currentTarget,task:C})},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Vg.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,ae.jsx)(ec.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,ae.jsx)(Ce.Divider,{}),p?(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:()=>{C&&p(C.seq),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Kg.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,u&&C&&!C.is_event&&!C.is_notice?(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&u(C.seq),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Ug.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&(d?d(C):hr(C,g)),o()},sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:g?(0,ae.jsx)(jg.default,{sx:{fontSize:19}}):(0,ae.jsx)(Gg.default,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),C&&!C.is_notice&&!C.is_event&&v.has(String(C.tab_key??""))&&w?(0,ae.jsxs)(Ce.MenuItem,{onClick:E=>A(E.currentTarget),sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(Yg.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,ae.jsx)(ec.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,ae.jsxs)(Ce.MenuItem,{onClick:y,disabled:x||!C?.archived&&!(C&&li(C)),sx:{fontSize:14},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:C?.archived?(0,ae.jsx)(Qg.default,{sx:{fontSize:19}}):(0,ae.jsx)(Xg.default,{sx:{fontSize:19}})}),C?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,ae.jsx)(Ce.Divider,{}),(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:()=>{T("one")},sx:{fontSize:14,color:"#e5484d"},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(an,{sx:{fontSize:19,color:"#e5484d"}})}),(C?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(C?.repeat_group_key??0)>0?(0,ae.jsxs)(Ce.MenuItem,{disabled:x,onClick:()=>{T("series")},sx:{fontSize:14,color:"#e5484d"},children:[(0,ae.jsx)(Ce.ListItemIcon,{children:(0,ae.jsx)(an,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]}),(0,ae.jsx)(Ct,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:g,onClose:()=>{z(null),o()},onDateChange:E=>{S&&f(S.task.seq,E)},onReminderChange:E=>{S&&m?.(S.task.seq,E)}}),(0,ae.jsxs)(Ce.Menu,{transitionDuration:0,anchorEl:B?.anchorEl??null,open:!!B,onClose:()=>{D(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...R,children:[(0,ae.jsx)(Ce.MenuItem,{selected:!B?.task.tab_key,onClick:()=>{B&&b(B.task.seq,""),D(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(E=>!E.archived).map(E=>(0,ae.jsx)(Ce.MenuItem,{selected:B?.task.tab_key===E.key,onClick:()=>{B&&b(B.task.seq,E.key),D(null),o()},sx:{fontSize:14,minWidth:170},children:E.label},E.key))]}),(0,ae.jsx)(Ce.Menu,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>A(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(E=>`custom-${E.group_seq}`===String(C?.tab_key??"")).map(E=>({seq:E.seq,label:It(E)}))].map(E=>(0,ae.jsxs)(Ce.MenuItem,{onClick:()=>{C&&w?.(C.seq,E.seq),A(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[E.label,(C?.sprint_seq??0)===E.seq?(0,ae.jsx)(Lg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))})]})}var Mn=require("@mui/material");var ir=require("react/jsx-runtime");function xk({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,ir.jsxs)(Mn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,ir.jsxs)(Mn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,ir.jsx)(Mn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,ir.jsx)(Ze,{option:l})]},l.key)}),(0,ir.jsx)(Mn.Divider,{}),(0,ir.jsx)(Mn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var On=require("@mui/material"),Jg=a(require("@mui/icons-material/Check"),1),eb=a(require("@mui/icons-material/BarChartOutlined"),1),ob=a(require("@mui/icons-material/SettingsOutlined"),1);var en=require("react/jsx-runtime");function gk(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,en.jsxs)(On.Menu,{transitionDuration:0,anchorEl:o,open:!!o,onClose:s,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(f=>({seq:f.seq,label:It(f)}))].map(f=>(0,en.jsxs)(On.MenuItem,{onClick:()=>{r(f.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[f.label,n===f.seq?(0,en.jsx)(Jg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},f.seq)),(0,en.jsx)(On.Divider,{}),l?(0,en.jsxs)(On.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,en.jsx)(eb.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,en.jsx)(On.Divider,{}):null,(0,en.jsxs)(On.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,en.jsx)(ob.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var bk={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function nb(e){return bk[e]??"tasks"}var hk={list:"\uBAA9\uB85D",card:"\uD504\uB85C\uC81D\uD2B8",kanban:"\uC0C1\uD0DC",sprint:"\uBAA9\uD45C",calendar:"\uC8FC\uAC04",month:"\uC6D4\uAC04",agenda:"\uC544\uC820\uB2E4",timeline:"\uD0C0\uC784\uB77C\uC778"},tb=["list","calendar","month","card","kanban","sprint","timeline"],kk=["list","card"];function Tk(e){let o=nb(e);switch(o){case"notice":return{kind:o,viewOptions:[],showCreate:!0,createLabel:"\uACF5\uC9C0\uC0AC\uD56D \uB4F1\uB85D",showGroupBy:!1,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!0,columns:{notice:!0}};case"bug":return{kind:o,viewOptions:tb,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"archive":return{kind:o,viewOptions:kk,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:o,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:o,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:o,viewOptions:tb,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}
14
14
  //# sourceMappingURL=index.js.map