@ehfuse/taskbox 0.5.135 → 0.5.137
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.esm.js +1 -1
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
`).replace(/<[^>]+>/g,"").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&").replace(/\n{3,}/g,`
|
|
11
11
|
|
|
12
12
|
`).trim():"";function Df(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Ot(e.start_date),n=Ot(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=Go(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=_f(e.content);i&&o.push("",i);let l=String(e.note??"").trim();return l&&o.push("",`\uBE44\uACE0: ${l}`),o.join(`
|
|
13
|
-
`)}function wf(e){navigator.clipboard.writeText(e).then(()=>(0,_a.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,_a.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 ar(e,o){let t=Df(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&wf(t)});return}wf(t)}var oo=require("react/jsx-runtime");function as({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1}){let p=Ye(),[m,c]=(0,is.useState)(null),[x,f]=(0,is.useState)(null),u=Vn(e.icon||(e.is_notice?Vo:e.is_event?"event":Ve)),h=!!e.is_notice,R=!!e.is_event,I=h&&o>0&&(e.author_account_seq??0)===o,b=!$t(e,o),g=!R&&(h?I:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsxs)(Wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,oo.jsx)(Wo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,oo.jsx)(Mf.default,{})}):null,g&&!s?(0,oo.jsx)(Wo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Bt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,oo.jsx)(Wo.Checkbox,{checked:e.completed,icon:(0,oo.jsx)(zf.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,oo.jsx)(Pf.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(C,B)=>t(e.seq,B),sx:{p:0}})}):null,s?null:(0,oo.jsx)(Wo.Tooltip,{title:b?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,oo.jsx)(Wo.IconButton,{size:"small",onClick:b?void 0:C=>f(C.currentTarget),sx:{color:e.icon_color||(h?"#e5484d":"#1e3a8a")},children:(0,oo.jsx)(u,{sx:{fontSize:20}})})}),m!==null?(0,oo.jsx)(Wo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:m,onChange:C=>c(C.target.value),onBlur:()=>{m.trim()&&m.trim()!==e.title&&n(e.seq,m.trim()),c(null)},onKeyDown:C=>{C.key==="Enter"&&C.target.blur(),C.key==="Escape"&&c(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,oo.jsx)(Wo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h?"\uACF5\uC9C0":R?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,oo.jsx)(Wo.Box,{onClick:b?void 0:()=>c(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:b?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),(0,oo.jsx)(Wo.Tooltip,{title:p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,oo.jsx)(Wo.IconButton,{"aria-label":p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>ar(e,p),sx:{color:"#6b7280"},children:p?(0,oo.jsx)(Of.default,{sx:{fontSize:20}}):(0,oo.jsx)(Rf.default,{sx:{fontSize:20}})})}),l&&!s?(0,oo.jsx)(Wo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,oo.jsx)(Ef.default,{})}):null]}),(0,oo.jsx)(tr,{anchorEl:x,value:e.icon||(h?Vo:""),color:e.icon_color||(h?"#e5484d":"#1e3a8a"),onSelect:C=>r(e.seq,C),onSelectColor:C=>i?.(e.seq,C),onClose:()=>f(null)})]})}var Qt=require("react"),le=require("@mui/material"),Yf=a(require("@mui/icons-material/ExpandLess"),1),jf=a(require("@mui/icons-material/ExpandMore"),1),Xf=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),Qf=a(require("@mui/icons-material/Check"),1),Zf=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Jf=a(require("@mui/icons-material/SpeedOutlined"),1),Ea=a(require("@mui/icons-material/CheckCircle"),1),ex=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ma=a(require("@mui/icons-material/CheckCircleOutlined"),1),ds=a(require("@mui/icons-material/AccessTimeOutlined"),1),ox=a(require("@mui/icons-material/AutorenewOutlined"),1),tx=a(require("@mui/icons-material/LabelOutlined"),1),nx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),rx=a(require("@mui/icons-material/SubjectOutlined"),1),ix=a(require("@mui/icons-material/StickyNote2Outlined"),1),ax=a(require("@mui/icons-material/PanToolAltOutlined"),1);var qf=require("react"),Af=require("@ehfuse/mui-form-controls"),Lf=require("react/jsx-runtime");function ls({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,qf.useState)(null);return(0,Lf.jsx)(Af.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 Pn=require("react"),ko=require("@mui/material"),Ff=a(require("@mui/icons-material/AccountTreeOutlined"),1),Hf=a(require("@mui/icons-material/Add"),1),Wf=a(require("@mui/icons-material/Close"),1),$f=a(require("@mui/icons-material/NextPlanOutlined"),1);function Rn(e){return e.relations??[]}function Nh(e,o,t){return Rn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Rn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Nf(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function wa(e,o){let t=new Map(o.map(u=>[u.seq,u]));t.set(e.seq,e);let n=new Map,r=(u,h)=>{n.has(u)||n.set(u,new Set),n.has(h)||n.set(h,new Set),n.get(u).add(h),n.get(h).add(u)};for(let u of t.values())for(let h of Rn(u))h.type==="follow_up"&&t.has(h.task_seq)&&r(u.seq,h.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let u=l.shift();for(let h of n.get(u)??[])i.has(h)||(i.add(h),l.push(h))}let s=[...i].map(u=>t.get(u)).filter(u=>!!u).sort((u,h)=>Nf(u).localeCompare(Nf(h))),p=new Set;for(let u of Rn(e))u.type==="related"&&p.add(u.task_seq);for(let u of t.values())u.seq!==e.seq&&Rn(u).some(h=>h.type==="related"&&h.task_seq===e.seq)&&p.add(u.seq);let m=[...p].map(u=>t.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),c=[...t.values()].filter(u=>u.seq!==e.seq&&Rn(u).some(h=>h.type==="duplicate_of"&&h.task_seq===e.seq)),x=Rn(e).find(u=>u.type==="duplicate_of")?.task_seq,f=x?t.get(x)??null:null;return{lineage:s,related:m,duplicates:c,duplicateOf:f}}function Da(e,o){let t=wa(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function ss(e,o){return Da(e,o)>0}var Te=require("react/jsx-runtime");function cs({item:e,caption:o,onOpen:t,onUnlink:n}){let r=co(e.icon||Ve);return(0,Te.jsxs)(ko.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,Te.jsx)(ko.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,Te.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,Te.jsxs)(ko.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,Te.jsx)(Ge,{option:Go(e),small:!0}),n?(0,Te.jsx)(ko.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,Te.jsx)(Wf.default,{sx:{fontSize:15}})}):null]})}function ms({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,p]=(0,Pn.useState)(!1),[m,c]=(0,Pn.useState)(null),[x,f]=(0,Pn.useState)(null),u=(0,Pn.useMemo)(()=>wa(e,o),[e,o]),h=u.lineage.length>=2,R=(0,Pn.useMemo)(()=>Da(e,o),[e,o]),I=(0,Pn.useMemo)(()=>{let g=new Set;for(let C of u.lineage)g.add(C.seq);for(let C of u.related)g.add(C.seq);for(let C of u.duplicates)g.add(C.seq);return u.duplicateOf&&g.add(u.duplicateOf.seq),[...g]},[u]),b=(g,C,B)=>{f({anchorEl:g,targetSeq:C,type:B})};return(0,Te.jsxs)(gt,{icon:(0,Te.jsx)(Ff.default,{sx:{fontSize:19,display:"block"}}),title:(0,Te.jsxs)(Te.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",R>0?(0,Te.jsx)(ko.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:R}):null]}),titleExtra:t?null:(0,Te.jsxs)(ko.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,Te.jsx)(ko.Button,{size:"small",color:"inherit",startIcon:(0,Te.jsx)($f.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,Te.jsx)(ko.Button,{size:"small",color:"inherit",startIcon:(0,Te.jsx)(Hf.default,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[h?(0,Te.jsx)(ko.Box,{sx:{mb:u.related.length||u.duplicates.length||u.duplicateOf?1:0},children:u.lineage.map((g,C)=>{let B=g.seq===e.seq,M=C===u.lineage.length-1;return(0,Te.jsxs)(ko.Box,{sx:{display:"flex",gap:1},children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,Te.jsx)(ko.Box,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),M?null:(0,Te.jsx)(ko.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,Te.jsxs)(ko.Box,{sx:{flex:1,minWidth:0,pb:M?0:.5},children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Te.jsxs)(ko.Box,{component:"span",onClick:!B&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),(0,Te.jsx)(Ge,{option:Go(g),small:!0})]}),(0,Te.jsx)(ko.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,Te.jsx)(cs,{item:u.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(u.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>b(g.currentTarget,u.duplicateOf.seq,"duplicate_of"):void 0}):null,u.duplicates.map(g=>(0,Te.jsx)(cs,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?C=>b(C.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),u.related.map(g=>(0,Te.jsx)(cs,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?C=>b(C.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),R===0?(0,Te.jsx)(ko.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,Te.jsx)(gi,{open:s,task:e,tasks:o,excludeSeqs:I,onClose:()=>p(!1),onSubmit:(g,C)=>r(e.seq,g,C)}):null,(0,Te.jsx)(uo,{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,Te.jsx)(uo,{open:!!x,anchorEl:x?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>f(null),onConfirm:()=>{x&&i?.(e.seq,x.targetSeq,x.type),f(null)}})]})}var Uf=require("react"),ct=require("@mui/material"),Vf=a(require("@mui/icons-material/HistoryOutlined"),1),Gf=a(require("@mui/icons-material/ExpandMore"),1);var $o=require("react/jsx-runtime"),Fh={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function Kf(e){return String(e??"").trim()||"\uC5C6\uC74C"}function Hh(e){if(e.kind!=="field")return Fh[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let o=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",t=String(e.old_value??"").trim(),n=String(e.new_value??"").trim();return!t&&n?`${o}\uC744(\uB97C) "${n}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:t&&!n?`${o}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${o}\uC744(\uB97C) "${Kf(t)}" \u2192 "${Kf(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function us({taskSeq:e,items:o,loading:t,onExpand:n}){let[r,i]=(0,Uf.useState)(!1),l=()=>{let s=!r;i(s),s&&!o&&n?.(e)};return(0,$o.jsxs)(ct.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,$o.jsxs)(ct.Box,{role:"button",tabIndex:0,onClick:l,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),l())},sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",fontSize:Pr,fontWeight:500,color:"#37352f",userSelect:"none"},children:[(0,$o.jsx)(Vf.default,{sx:{fontSize:18,display:"block",color:"#37352f"}}),"\uD65C\uB3D9",o&&o.length>0?` (${o.length})`:"",(0,$o.jsx)(Gf.default,{sx:{ml:"auto",fontSize:20,color:"#9a9a97",transition:"transform 120ms",transform:r?"rotate(180deg)":"none"}})]}),r?(0,$o.jsxs)(ct.Box,{sx:{mt:1,display:"flex",flexDirection:"column",gap:1},children:[t&&!o?(0,$o.jsxs)(ct.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,$o.jsx)(ct.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,o&&o.length===0?(0,$o.jsx)(ct.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(o??[]).map(s=>(0,$o.jsxs)(ct.Box,{sx:{display:"flex",gap:1,alignItems:"baseline",minWidth:0},children:[(0,$o.jsx)(ct.Box,{sx:{flexShrink:0,width:5,height:5,borderRadius:"50%",bgcolor:"#d5d8dc",transform:"translateY(-2px)"}}),(0,$o.jsxs)(ct.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,$o.jsx)(ct.Box,{component:"span",sx:{fontWeight:500},children:String(s.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,$o.jsx)(ct.Box,{component:"span",sx:{ml:.5},children:Hh(s)}),(0,$o.jsx)(ct.Box,{component:"span",sx:{ml:.75,fontSize:13.5,color:"#9a9a97"},children:Bt(s.acted_time)})]})]},s.seq))]}):null]})}var _=require("react/jsx-runtime");function Lr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,_.jsx)(le.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function ps({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:p,onChangeDate:m,onChangeReminder:c,onMemberEdit:x,onChangePriority:f,onChangeEstimatedTime:u,onChangeEventTime:h,onChangeEventPlace:R,onChangeEventAddress:I,onChangeNote:b,onChangeContent:g,onChangeContentHeight:C,onAddChecklistItem:B,onToggleChecklistItem:M,onRemoveChecklistItem:S,onUpdateChecklistItem:E,onConvertChecklistToTask:y,onOpenChecklistTask:k,onLinkChecklistTask:w,resolveChecklistTask:A,relatedTasksPool:d,onOpenRelatedTask:T,onLinkRelatedTask:z,onUnlinkRelatedTask:N,onCreateFollowUpTask:H,onAddAttachments:W,onRemoveAttachment:he,onPreview:pe,onDownload:ye,onUpdateComment:be,onRemoveComment:ze,onToggleCommentReaction:_e,currentUserName:ge="",myAccountSeq:re=0,noticeAdmin:qe=!1,hideProject:to=!1,hideLabel:V=!1,showTitle:$=!1,onChangeTitle:te,onToggleCompleted:v,onChangeIcon:O,onChangeIconColor:J,employees:se=[],onAckConfirm:We,onRequestConfirm:L,activityItems:we,activityLoading:Ae,onLoadActivity:ke,onChangeBugField:Q,sprints:Ne=[],sprintProject:j=!1,hideSprint:Co=!1,onChangeSprint:bt,onChangeStoryPoints:sr,onChangeResolution:Tn,onClaimTask:kt,onVerifyBug:nn}){let[Mt,rn]=(0,Qt.useState)(null),[yn,Hn]=(0,Qt.useState)(null),[Eo,Wn]=(0,Qt.useState)(null),[Ue,q]=(0,Qt.useState)(null),[G,ee]=(0,Qt.useState)(!1),me={[wt]:G?{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"}},[so,no]=(0,Qt.useState)(null),[Ro,Se]=(0,Qt.useState)(null),[vo,yo]=(0,Qt.useState)(null),[Io,Tt]=(0,Qt.useState)(null),ro=!!e.is_notice,io=!!e.is_event,Zo=!!e.is_bug,cr=!!kt&&Xr(e,re),Ci=!!kt&&Qr(e,re),mr=!!nn&&Zo&&!!e.completed&&re>0&&(e.author_account_seq??0)===re&&!(e.acks??[]).some(P=>P.account_seq===re),dt=!$t(e,re),$n=!e.is_event&&(e.is_notice?re>0&&(e.author_account_seq??0)===re:(e.author_account_seq??0)===re||(e.manager_account_seq??0)===re),ur=Vn(e.icon||(e.is_notice?Vo:e.is_event?"event":Ve)),Kn=ro?!jr(e,re):dt,Sn=cr||Ci?(0,_.jsxs)(jn,{onClick:P=>Tt(P.currentTarget),children:[(0,_.jsx)(ax.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,vi=ro?yi(e,se):"",pt=ro?Ql(e,se,re):null,Jo=!ro&&!io?ii(e,re):null,Ii=!!(Jo&&Jo.total>0||ro&&pt);return(0,_.jsxs)(_.Fragment,{children:[$?(0,_.jsxs)(le.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[$n?(0,_.jsx)(le.Checkbox,{checked:e.completed,icon:(0,_.jsx)(ex.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,_.jsx)(Ea.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(P,Pa)=>{Eo||Wn({anchorEl:P.currentTarget,nextCompleted:Pa})},sx:{p:0,mt:.25}}):null,(0,_.jsx)(le.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:dt?void 0:P=>Hn(P.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(ro?"#e5484d":"#1e3a8a")},children:(0,_.jsx)(ur,{sx:{fontSize:20}})}),(0,_.jsx)(le.Box,{sx:{flex:1,minWidth:0},children:Mt!==null?(0,_.jsx)(le.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:Mt,onChange:P=>rn(P.target.value),onBlur:()=>{Mt.trim()&&Mt.trim()!==e.title&&te(e.seq,Mt.trim()),rn(null)},onKeyDown:P=>{P.key==="Enter"&&P.target.blur(),P.key==="Escape"&&rn(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,_.jsx)(le.Box,{onClick:()=>rn(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,_.jsx)(uo,{open:!!Eo,anchorEl:Eo?.anchorEl??null,title:Eo?.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:Eo?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>Wn(null),onConfirm:()=>{Eo&&v(e.seq,Eo.nextCompleted),Wn(null)}}),(0,_.jsx)(tr,{anchorEl:yn,value:e.icon||(ro?Vo:""),color:e.icon_color||(ro?"#e5484d":"#1e3a8a"),onSelect:P=>O(e.seq,P),onSelectColor:P=>J?.(e.seq,P),onClose:()=>Hn(null)})]}):null,(0,_.jsxs)(le.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[wt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,_.jsx)(pi,{hideProject:to,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,estimatedTime:e.estimated_time,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,showEstimatedTime:!io,notice:ro,event:io,readOnly:dt,targetSummary:vi,onChangeProject:P=>s(e.seq,P),onAddProject:p,onChangeStartDate:P=>m(e.seq,"start_date",P),onChangeDueDate:P=>m(e.seq,"due_date",P),onChangeReminder:P=>c(e.seq,P),onChangePriority:P=>f(e.seq,P),onChangeEstimatedTime:P=>u(e.seq,P),onChangeEventTime:P=>h?.(e.seq,P),onChangeEventPlace:P=>R?.(e.seq,P),onChangeEventAddress:P=>I?.(e.seq,P),onMemberEdit:P=>x(e,P),narrowCollapsedSx:me,reminderLocked:e.completed,managerAction:Sn,leading:(0,_.jsxs)(_.Fragment,{children:[mr||Sn&&(ro||io)?(0,_.jsxs)(le.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[ro||io?Sn:null,mr?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Button,{variant:"contained",size:"large",onClick:()=>nn?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,_.jsx)(le.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>nn?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Zo&&e.ticket_no?(0,_.jsx)(ve,{icon:(0,_.jsx)(Xf.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,_.jsx)(le.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,io?null:(0,_.jsx)(le.Box,{sx:Zo&&e.ticket_no||Ii?void 0:{gridColumn:"1 / -1"},children:(0,_.jsx)(ve,{icon:(0,_.jsx)(ox.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:dt||e.completed?void 0:P=>no(P),children:(0,_.jsx)(Ge,{option:Go(e)})})}),Jo&&Jo.total>0?(0,_.jsx)(le.Box,{children:(0,_.jsx)(ve,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Jo.canConfirm?(0,_.jsx)(le.Button,{size:"small",variant:"contained",onClick:()=>We?.(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,_.jsxs)(le.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Jo.myTime?(0,_.jsx)(Ea.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:P=>q({anchorEl:P.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Jo.count," / ",Jo.total]})})}):null,ro&&pt?(0,_.jsx)(le.Box,{children:(0,_.jsx)(ve,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,_.jsx)(le.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:pt.canAck?(0,_.jsx)(le.Button,{size:"small",variant:"contained",onClick:()=>We?.(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,_.jsx)(le.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:pt.acked?(0,_.jsx)(Ea.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:P=>q({anchorEl:P.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:pt.total>0&&pt.count>=pt.total?"\uC644\uB8CC":(0,_.jsxs)(_.Fragment,{children:[pt.count,(0,_.jsx)(le.Box,{component:"span",sx:{mx:.4},children:"/"}),pt.total]})})})})}):null,j&&!Co&&!io&&!ro?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ve,{icon:(0,_.jsx)(Zf.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:dt?void 0:P=>Se(P),children:(e.sprint_seq??0)>0?Ne.find(P=>P.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,_.jsx)(Lr,{label:"\uBBF8\uBC30\uC815"})}),(0,_.jsx)(ve,{icon:(0,_.jsx)(Jf.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,_.jsx)(Yt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:dt,onCommit:P=>sr?.(e.seq,Number(P.replace(/[^0-9.]/g,""))||0)})})]}):null,io||V?null:(0,_.jsx)(le.Box,{sx:[{gridColumn:"1 / -1"},me??null],children:(0,_.jsx)(ve,{icon:(0,_.jsx)(tx.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:dt?void 0:P=>yo(P),children:(e.label_keys??[]).length>0?(0,_.jsx)(ln,{labelKeys:e.label_keys??[],labelOptions:t}):(0,_.jsx)(Lr,{})})})]}),trailing:(0,_.jsxs)(_.Fragment,{children:[Zo?(0,_.jsx)(fi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:dt,showResolution:!!e.completed,onChangeRepro:P=>Q?.(e.seq,"bug_repro",P),onChangeDevice:P=>Q?.(e.seq,"bug_device",P),onChangeWhere:P=>Q?.(e.seq,"bug_where",P),onChangeVersion:P=>Q?.(e.seq,"bug_version",P),onChangeResolution:P=>Tn?.(e.seq,P)}):null,(0,_.jsx)(ve,{icon:(0,_.jsx)(nx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[Po(9),me??null],children:e.created_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(jo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,_.jsx)(Lr,{})}),(0,_.jsx)(ve,{icon:(0,_.jsx)(ds.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[Po(11),me??null],children:e.created_time?Bt(e.created_time):(0,_.jsx)(Lr,{})}),e.completed?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ve,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[Po(10),me??null],children:e.completed_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(jo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,_.jsx)(Lr,{})}),(0,_.jsx)(ve,{icon:(0,_.jsx)(ds.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[Po(12),me??null],children:e.completed_time?Bt(e.completed_time):(0,_.jsx)(Lr,{})})]}):null]})}),(0,_.jsxs)(le.Box,{sx:{display:"none",[wt]:{display:"block",mt:1.5,mb:0}},children:[(0,_.jsx)(le.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,_.jsx)(le.ButtonBase,{onClick:()=>ee(P=>!P),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:G?(0,_.jsxs)(_.Fragment,{children:["\uC811\uAE30 ",(0,_.jsx)(Yf.default,{sx:{fontSize:18}})]}):(0,_.jsxs)(_.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,_.jsx)(jf.default,{sx:{fontSize:18}})]})})]}),(0,_.jsxs)(le.Box,{children:[(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[wt]:{mt:0,mb:1.25}}}),(0,_.jsx)(gt,{icon:(0,_.jsx)(rx.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,_.jsx)(le.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(xi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:C?P=>C(e.seq,P):void 0,readOnly:dt,onChange:P=>g(e.seq,P)})})}),e.is_bug?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(gt,{icon:(0,_.jsx)(ix.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,_.jsx)(le.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(ls,{value:e.note,readOnly:Kn,onCommit:P=>b(e.seq,P)})})})]}),io?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(hi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Kn,onAdd:B,onToggle:M,onRemove:S,onUpdate:E,onConvertToTask:y,onOpenLinkedTask:k,resolveLinkedTask:A,linkCandidates:d,linkBaseTask:e,onLinkExistingTask:w})]}),d&&!io&&!ro&&ss(e,d)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ms,{task:e,tasks:d,readOnly:dt,onOpenTask:T,onLink:z,onUnlink:N,onCreateFollowUp:H})]}):null,(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(bi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Kn,onAdd:W,onRemove:he,onPreview:pe?P=>pe({...P,taskSeq:e.seq}):void 0,onDownload:ye?P=>ye({...P,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ns,{taskSeq:e.seq,comments:e.comments??[],currentUserName:ge,myAccountSeq:re,avatarSrcByName:n,onUpdate:be,onRemove:ze,onToggleReaction:_e,onPreview:pe?P=>pe({...P,taskSeq:e.seq}):void 0,onDownload:ye?P=>ye({...P,taskSeq:e.seq}):void 0}),ke?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Divider,{sx:{mb:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(us,{taskSeq:e.seq,items:we,loading:Ae,onExpand:ke})]}):null]}),(0,_.jsx)(Yr,{anchorEl:so,value:e.status,options:ro?hr:Zo?Cn:br,onSelect:P=>r(e.seq,P),onClose:()=>no(null)}),(0,_.jsx)(le.Menu,{transitionDuration:0,anchorEl:Ro,open:!!Ro,onClose:()=>Se(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ne.filter(P=>`custom-${P.group_seq}`===String(e.tab_key??"")).map(P=>({seq:P.seq,label:xt(P)}))].map(P=>(0,_.jsxs)(le.MenuItem,{onClick:()=>{bt?.(e.seq,P.seq),Se(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[P.label,(e.sprint_seq??0)===P.seq?(0,_.jsx)(Qf.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},P.seq))}),(0,_.jsx)(ri,{anchorEl:Ue?.anchorEl??null,open:!!Ue?.open,acks:e.acks??[],total:pt?.total??Jo?.total??0,avatarSrcByName:n,onRequestConfirm:L&&Jo&&Jo.count<Jo.total?()=>{L(e.seq),q(P=>P?{...P,open:!1}:null)}:void 0,onClose:()=>q(P=>P?{...P,open:!1}:null)}),(0,_.jsx)(Ti,{anchorEl:vo,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:P=>i(e.seq,Vr(e.label_keys??[],P)),onAddLabel:l,onClose:()=>yo(null)}),(0,_.jsx)(uo,{open:!!Io,anchorEl:Io,title:cr?"\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:()=>Tt(null),onConfirm:()=>{kt?.(e.seq),Tt(null)}})]})}var Ko=require("react/jsx-runtime");function Wh(){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 $h({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:m,...c}){let x=Ye(),f=(0,zn.useRef)(null);o&&(f.current=o);let u=o??f.current,[h,R]=(0,zn.useState)({}),I=Object.keys(h).length>0;(0,zn.useEffect)(()=>{R({})},[o?.seq,e]);let b=(0,zn.useRef)(null);if((0,zn.useEffect)(()=>{b.current?.scrollTo({top:0})},[o?.seq]),!u)return null;let g=x&&I?{...u,...h}:u,C=(y,k)=>{x?R(w=>({...w,...y})):k()},B=()=>{let y=h;R({});let k=u.seq,w=y.title===void 0?void 0:String(y.title).trim();if(r){let A={...y};w!==void 0&&(w?A.title=w:delete A.title),Object.keys(A).length>0&&r(k,A),(0,fs.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}w&&s(k,w),y.icon!==void 0&&p(k,String(y.icon)),y.icon_color!==void 0&&m?.(k,String(y.icon_color)),y.status!==void 0&&c.onChangeStatus(k,y.status),y.label_keys!==void 0&&c.onChangeLabels(k,y.label_keys??[]),y.tab_key!==void 0&&c.onChangeProject(k,String(y.tab_key??"")),y.start_date!==void 0&&c.onChangeDate(k,"start_date",String(y.start_date??"")),y.due_date!==void 0&&c.onChangeDate(k,"due_date",String(y.due_date??"")),y.reminder!==void 0&&c.onChangeReminder(k,y.reminder),y.priority!==void 0&&c.onChangePriority(k,y.priority),y.estimated_time!==void 0&&c.onChangeEstimatedTime(k,String(y.estimated_time??"")),y.event_time!==void 0&&c.onChangeEventTime?.(k,String(y.event_time??"")),y.event_place!==void 0&&c.onChangeEventPlace?.(k,String(y.event_place??"")),y.event_address!==void 0&&c.onChangeEventAddress?.(k,String(y.event_address??"")),y.content!==void 0&&c.onChangeContent(k,String(y.content??"")),y.note!==void 0&&c.onChangeNote(k,String(y.note??"")),(0,fs.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},M={...c,onChangeStatus:(y,k)=>C({status:k},()=>c.onChangeStatus(y,k)),onChangeLabels:(y,k)=>C({label_keys:k},()=>c.onChangeLabels(y,k)),onChangeProject:(y,k)=>C({tab_key:k},()=>c.onChangeProject(y,k)),onChangeDate:(y,k,w)=>C({[k]:w},()=>c.onChangeDate(y,k,w)),onChangeReminder:(y,k)=>C({reminder:k},()=>c.onChangeReminder(y,k)),onChangePriority:(y,k)=>C({priority:k},()=>c.onChangePriority(y,k)),onChangeEstimatedTime:(y,k)=>C({estimated_time:k},()=>c.onChangeEstimatedTime(y,k)),onChangeEventTime:(y,k)=>C({event_time:k},()=>c.onChangeEventTime?.(y,k)),onChangeEventPlace:(y,k)=>C({event_place:k},()=>c.onChangeEventPlace?.(y,k)),onChangeEventAddress:(y,k)=>C({event_address:k},()=>c.onChangeEventAddress?.(y,k)),onChangeContent:(y,k)=>C({content:k},()=>c.onChangeContent(y,k)),onChangeNote:(y,k)=>C({note:k},()=>c.onChangeNote(y,k))},S=(0,Ko.jsx)(ps,{...M,task:g,myAccountSeq:i,onChangeTitle:(y,k)=>C({title:k},()=>s(y,k)),onToggleCompleted:l,onChangeIcon:(y,k)=>C({icon:k},()=>p(y,k)),onChangeIconColor:(y,k)=>C({icon_color:k},()=>m?.(y,k)),showTitle:x}),E=(0,Ko.jsx)(rs,{onSubmit:(y,k)=>n(g.seq,y,k)},g.seq);return x?(0,Ko.jsx)(cx.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:g.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":g.is_event?"\uC77C\uC815":g.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:(0,Ko.jsx)(lx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>ar(g,!0)},{icon:(0,Ko.jsx)(Dt.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!I,onClick:I?B:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},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:E},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,Ko.jsx)(Dt.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:S})}]},u.seq):(0,Ko.jsx)(Dt.Drawer,{anchor:"right",open:e,onClose:t,sx:{zIndex:y=>y.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Ko.jsxs)(Dt.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,Ko.jsx)(as,{task:g,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:m,onClose:t}),(0,Ko.jsx)(Dt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Ko.jsx)(Dt.Box,{sx:{flex:1,minHeight:0},children:(0,Ko.jsx)(sx.default,{ref:b,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:S})}),(0,Ko.jsx)(Dt.Divider,{sx:{borderColor:"#37352f"}}),(0,Ko.jsx)(Dt.Box,{sx:{flexShrink:0},children:E})]})})}var Zt=require("react"),To=require("@mui/material"),dx=require("@ehfuse/mui-form-dialog"),px=a(require("@mui/icons-material/EditOutlined"),1),xs=require("@ehfuse/alerts"),xn=require("@ehfuse/mui-form-controls");var Oa="custom-";function mx(e){return e.startsWith(Oa)}function Kh(e){return e>0?`${Oa}${e}`:""}function Ra(e){if(!mx(e))return 0;let o=Number(e.slice(Oa.length));return Number.isInteger(o)&&o>0?o:0}var Pe=require("react/jsx-runtime"),Uh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function ux(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function Vh({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let p=o.filter(d=>d.useSprints&&!d.archived),[m,c]=(0,Zt.useState)(""),[x,f]=(0,Zt.useState)(""),[u,h]=(0,Zt.useState)(""),[R,I]=(0,Zt.useState)(""),[b,g]=(0,Zt.useState)(""),[C,B]=(0,Zt.useState)(!1),[M,S]=(0,Zt.useState)(0);(0,Zt.useEffect)(()=>{e&&(c(p.length===1?p[0].key:""),f(""),h(""),I(""),g(""),S(0))},[e]);let E=()=>{f(""),h(""),I(""),g(""),S(0)},y=d=>{S(d.seq),c(`custom-${d.group_seq}`),f(d.name),h(d.goal),I(d.start_date),g(d.end_date)},k=async()=>{let d=Ra(m);if(!d){(0,xs.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!x.trim()){(0,xs.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(M>0){i(M,{name:x.trim(),goal:u.trim(),start_date:R,end_date:b}),E();return}await r({group_seq:d,name:x.trim(),goal:u.trim(),start_date:R,end_date:b})&&E()}finally{B(!1)}},w=new Map(o.map(d=>[Ra(d.key),d.label])),A=(0,Pe.jsx)(To.Box,{children:p.length===0?(0,Pe.jsx)(To.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,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsxs)(To.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Pe.jsx)(xn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:m,options:p.map(d=>({value:d.key,label:d.label})),onChange:d=>c(String(d.target.value)),disabled:M>0}),(0,Pe.jsx)(xn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:x,onChange:d=>f(d.target.value)}),(0,Pe.jsx)(xn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:R,onChange:d=>I(d.target.value)}),(0,Pe.jsx)(xn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:b,onChange:d=>g(d.target.value)}),(0,Pe.jsx)(xn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:u,onChange:d=>h(d.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Pe.jsxs)(To.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[M>0?(0,Pe.jsx)(To.Button,{color:"inherit",onClick:E,disabled:C,children:"\uCDE8\uC18C"}):null,(0,Pe.jsx)(To.Button,{variant:"contained",onClick:()=>{k()},disabled:C,children:M>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Pe.jsx)(To.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Pe.jsx)(To.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(d=>(0,Pe.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Pe.jsxs)(To.Box,{sx:{minWidth:0},children:[(0,Pe.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Pe.jsx)(To.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:d.name}),(0,Pe.jsx)(To.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:w.get(d.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,Pe.jsxs)(To.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[ux(d.start_date)," ~ ",ux(d.end_date)]})]}),d.goal?(0,Pe.jsx)(To.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:d.goal}):null]}),(0,Pe.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Pe.jsx)(xn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:d.status,options:Uh.map(T=>({value:T.value,label:T.label})),onChange:T=>l(d.seq,String(T.target.value)),sx:{width:104,flexShrink:0}}),(0,Pe.jsx)(To.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(d),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Pe.jsx)(px.default,{sx:{fontSize:18}})}),(0,Pe.jsx)(To.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(d.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Pe.jsx)(mn,{style:{width:16,height:16}})})]})]},d.seq))})]})});return(0,Pe.jsx)(dx.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:A}],actions:{showCancelButton:!1,right:(0,Pe.jsx)(To.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var gs=require("react"),He=require("@mui/material"),fx=require("@ehfuse/mui-form-dialog"),xx=a(require("@mui/icons-material/OpenInNewOutlined"),1),gx=a(require("@mui/icons-material/EventOutlined"),1),hx=require("@ehfuse/alerts");var Ie=require("react/jsx-runtime");function Gh({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,gs.useState)(""),[s,p]=(0,gs.useState)(!1),m=async()=>{let f=i.trim();if(f){p(!0);try{await t(f)&&l("")}finally{p(!1)}}},c=async f=>{await(0,hx.ConfirmDialog)({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(f.seq)},x=(0,Ie.jsxs)(He.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,Ie.jsxs)(He.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,Ie.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,Ie.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,Ie.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,Ie.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,Ie.jsx)(He.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,u)=>(0,Ie.jsxs)(He.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:u>0?"1px solid #efefed":"none"},children:[(0,Ie.jsx)(gx.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,Ie.jsx)(He.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,Ie.jsx)(He.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{c(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Ie.jsx)(mn,{sx:{fontSize:18}})})]},f.seq))}):(0,Ie.jsx)(He.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,Ie.jsx)(He.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,Ie.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,Ie.jsxs)(He.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,Ie.jsx)(He.Box,{children:(0,Ie.jsxs)(He.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,Ie.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,Ie.jsx)(He.Box,{children:(0,Ie.jsxs)(He.Box,{component:"span",children:[(0,Ie.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,Ie.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,Ie.jsx)(He.Box,{children:(0,Ie.jsx)(He.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,Ie.jsx)(He.Box,{children:(0,Ie.jsx)(He.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,Ie.jsxs)(He.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,Ie.jsx)(He.TextField,{value:i,onChange:f=>l(f.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,Ie.jsx)(He.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{m()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,Ie.jsx)(fx.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:x}],actions:{showCancelButton:!1,left:(0,Ie.jsx)(He.Button,{variant:"outlined",startIcon:(0,Ie.jsx)(xx.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Ie.jsx)(He.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var Oo=require("@mui/material"),bx=require("@ehfuse/mui-form-dialog"),kx=a(require("@mui/icons-material/ContentCopyOutlined"),1),hs=a(require("@mui/icons-material/OpenInNewOutlined"),1),bs=require("@ehfuse/alerts"),Le=require("react/jsx-runtime");function Tx(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??Tx,s=o.subscribed?l(o.token):"",p=()=>{navigator.clipboard.writeText(s).then(()=>(0,bs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,bs.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 x=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(x)}`,"_blank")},c=(0,Le.jsxs)(Oo.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,Le.jsxs)(Oo.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,Le.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,Le.jsxs)(Oo.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,Le.jsx)("br",{}),(0,Le.jsx)("b",{children:"\uB9C8\uAC10\uAE30\uD55C\uC774 \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,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(Oo.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,Le.jsxs)(Oo.Box,{sx:{display:"flex",gap:2},children:[(0,Le.jsx)(Oo.Button,{variant:"outlined",startIcon:(0,Le.jsx)(kx.default,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,Le.jsx)(Oo.Button,{variant:"contained",startIcon:(0,Le.jsx)(hs.default,{}),onClick:m,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,Le.jsxs)(Oo.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,Le.jsx)(Oo.Box,{children:(0,Le.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,Le.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,Le.jsx)(Oo.Box,{children:(0,Le.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,Le.jsx)(Oo.Box,{children:(0,Le.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,Le.jsx)(Oo.Box,{children:(0,Le.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,Le.jsx)(Oo.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,Le.jsx)(bx.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,Le.jsx)(Oo.Button,{variant:"outlined",startIcon:(0,Le.jsx)(hs.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Le.jsx)(Oo.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var Jt=require("react"),en=require("@mui/material"),yx=require("@ehfuse/mui-form-dialog"),Sx=require("@ehfuse/mui-form-controls"),Bx=require("@ehfuse/tree-view");var Uo=require("react/jsx-runtime");function Cx(e){return`${e.name}#${e.seq}`}function jh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function Xh(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 Qh(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 Zh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Cx(e),renderLabel:(0,Uo.jsx)(en.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,Uo.jsx)(en.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function vx(e,o){let t=(e.groups??[]).map(r=>vx(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>Qh(r,o)).map(Zh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function Jh({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,Jt.useState)(""),p=(0,Jt.useMemo)(()=>e.map(c=>vx(c,l.trim().toLowerCase())).filter(c=>c!==null),[e,l]),m=(0,Jt.useMemo)(()=>o.filter(c=>t.includes(c.seq)).map(Cx),[]);return(0,Uo.jsxs)(Uo.Fragment,{children:[(0,Uo.jsx)(en.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Uo.jsx)(Sx.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,Uo.jsx)(en.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,Uo.jsx)(Bx.TreeView,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:m,onChange:c=>i(c.map(jh).filter(x=>x>0)),styles:{border:"none",borderRadius:"0"}})})]})}function eb({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:l="\uD655\uC778",onConfirm:s,onClose:p}){let m=Ye(),[c,x]=(0,Jt.useState)([]),[f,u]=(0,Jt.useState)(0),h=(0,Jt.useMemo)(()=>Xh(n),[n]),R=i??[];(0,Jt.useEffect)(()=>{e&&(x(R),u(b=>b+1))},[e]);let I=()=>{let b=h.filter(g=>c.includes(g.seq));s(r?b:b.slice(0,1)),p()};return(0,Uo.jsx)(yx.FormDialog,{open:e,onClose:p,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,Uo.jsx)(en.Box,{sx:{...m?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...m?{}:{overflow:"hidden"},userSelect:"none"},children:(0,Uo.jsx)(Jh,{groups:n,allEmployees:h,initialSelectedSeqs:R,multiple:r,isMobile:m,onSelectionChange:x},f)})}],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,Uo.jsx)(en.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,Uo.jsx)(en.Button,{variant:"contained",onClick:I,children:l})}})}var Nr=require("react"),Nt=require("@mui/material"),wx=require("@ehfuse/mui-form-dialog"),Dx=require("@ehfuse/mui-form-controls");var Lt=require("@mui/material"),mt=require("react/jsx-runtime");function ob(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 ks({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((c,x)=>`${c.start_date}|${c.seq}`.localeCompare(`${x.start_date}|${x.seq}`)).map(c=>({sprint:c,...ob(c,o)})),i=r.some(c=>c.points>0),l=r.map(c=>i?c.points:c.count),s=Math.max(1,...l),p=r.filter(c=>c.sprint.status==="closed").map(c=>i?c.points:c.count),m=p.length>0?Math.round(p.reduce((c,x)=>c+x,0)/p.length*10)/10:null;return r.length===0?(0,mt.jsx)(Lt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,mt.jsxs)(Lt.Box,{children:[(0,mt.jsxs)(Lt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,mt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),m!==null?(0,mt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,mt.jsx)(Lt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:m}),i?"SP":"\uAC74"]}):null]}),(0,mt.jsx)(Lt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(c=>{let x=i?c.points:c.count,f=Math.round((t-24)*x/s),u=c.sprint.status==="closed";return(0,mt.jsxs)(Lt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,mt.jsx)(Lt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:x}),(0,mt.jsx)(Lt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:u?"#2f80ed":"#a9c9f5"}})]},c.sprint.seq)})}),(0,mt.jsx)(Lt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(c=>(0,mt.jsxs)(Lt.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 _x=require("react"),qn=require("@mui/material"),Do=require("react/jsx-runtime");function Ix(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function tb(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Ts(e){return e.slice(5).replace("-",".")}function ys({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,_x.useMemo)(()=>{let b=Ix(e.start_date),g=Ix(e.end_date);if(!b||!g||g<b||Math.round((g.getTime()-b.getTime())/864e5)+1>366)return null;let B=o.filter(d=>d.sprint_seq===e.seq&&!d.archived);if(B.length===0)return{empty:!0};let M=B.some(d=>(d.story_points??0)>0),S=d=>M?d.story_points??0:1,E=B.reduce((d,T)=>d+S(T),0),y=new Map;for(let d of B){if(!d.completed)continue;let T=(d.completed_time??"").slice(0,10),z=/^\d{4}-\d{2}-\d{2}$/.test(T)?T:e.start_date;y.set(z,(y.get(z)??0)+S(d))}let k=[];for(let d=new Date(b);d<=g;d.setDate(d.getDate()+1))k.push(tb(d));let w=E,A=[];for(let d of k){if(d>t)break;w-=y.get(d)??0,A.push({day:d,value:Math.max(0,w)})}return{empty:!1,days:k,total:E,usePoints:M,actual:A}},[e,o,t]);if(!r)return(0,Do.jsx)(qn.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,Do.jsx)(qn.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:p}=r,m=600,c=200,x=8,f=b=>i.length===1?0:b/(i.length-1)*m,u=b=>x+(c-x*2)*(1-b/Math.max(1,l)),h=`${f(0)},${u(l)} ${f(i.length-1)},${u(0)}`,R=p.map(b=>`${f(i.indexOf(b.day))},${u(b.value)}`).join(" "),I=p[p.length-1];return(0,Do.jsxs)(qn.Box,{children:[(0,Do.jsxs)(qn.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Do.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),I?(0,Do.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Do.jsx)(qn.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:I.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,Do.jsx)(qn.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,Do.jsxs)("svg",{viewBox:`0 0 ${m} ${c}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,Do.jsx)("line",{x1:0,y1:u(0),x2:m,y2:u(0),stroke:"#e6e6e3",strokeWidth:1}),(0,Do.jsx)("polyline",{points:h,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?(0,Do.jsx)("polyline",{points:R,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,I?(0,Do.jsx)("circle",{cx:f(i.indexOf(I.day)),cy:u(I.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,Do.jsxs)(qn.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,Do.jsx)("span",{children:Ts(e.start_date)}),t>e.start_date&&t<e.end_date?(0,Do.jsxs)("span",{children:["\uC624\uB298 ",Ts(t)]}):null,(0,Do.jsx)("span",{children:Ts(e.end_date)})]})]})}var ut=require("react/jsx-runtime");function nb({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Nr.useState)(0);(0,Nr.useEffect)(()=>{if(!e)return;let c=o.find(f=>f.status==="active")??o[0],x=o.find(f=>f.seq===r)??c;s(x?.seq??0)},[e]);let p=(0,Nr.useMemo)(()=>o.find(c=>c.seq===l)??null,[o,l]),m=(0,ut.jsxs)(Nt.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,ut.jsxs)(Nt.Box,{sx:{px:3,py:2.5},children:[(0,ut.jsx)(Nt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,ut.jsx)(ks,{sprints:o,tasks:t})]}),(0,ut.jsx)(Nt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ut.jsxs)(Nt.Box,{sx:{px:3,py:2.5},children:[(0,ut.jsx)(Nt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,ut.jsx)(Dx.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(c=>({value:String(c.seq),label:xt(c)})),onChange:c=>s(Number(c.target.value)||0),sx:{width:280,mb:2}}),p?(0,ut.jsx)(ys,{sprint:p,tasks:t,todayStr:n}):(0,ut.jsx)(Nt.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,ut.jsx)(wx.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,ut.jsx)(Nt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var on=require("@mui/material");var gn=require("react/jsx-runtime");function rb({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,gn.jsxs)(on.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,gn.jsx)(on.MenuItem,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(s=>{let p=t.includes(s.name);return(0,gn.jsxs)(on.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,gn.jsx)(on.Checkbox,{size:"small",checked:p,sx:{p:0}}),(0,gn.jsx)(jo,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,gn.jsx)(on.Divider,{}),(0,gn.jsx)(on.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Ex=require("react"),Fr=require("@mui/material"),Mx=a(require("@mui/icons-material/KeyboardArrowDown"),1),Ox=a(require("@mui/icons-material/Check"),1);var tn=require("react/jsx-runtime");function ib({value:e,onChange:o,options:t}){let[n,r]=(0,Ex.useState)(null),i=t??$i,l=$i.find(s=>s.value===e)?.label??"";return(0,tn.jsxs)(tn.Fragment,{children:[(0,tn.jsxs)(Fr.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,tn.jsx)(Mx.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,tn.jsx)(Fr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,tn.jsxs)(Fr.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,tn.jsx)(Ox.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var lr=require("@mui/material"),Ss=require("@ehfuse/mui-form-controls");function An(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Bi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function ab(e=new Date){return{fromDate:An(Bi(1,e)),toDate:An(e)}}var hn=require("react/jsx-runtime"),lb=[{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 Bs({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(An(Bi(i)),An(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===An(Bi(i))&&o===An(new Date);return(0,hn.jsxs)(lr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,hn.jsx)(lr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:lb.map(i=>{let l=r(i.months);return(0,hn.jsx)(lr.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,hn.jsxs)(lr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,hn.jsx)(Ss.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,hn.jsx)(lr.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,hn.jsx)(Ss.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Rx=require("@mui/material");var Cs=require("react/jsx-runtime");function sb({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,Cs.jsx)(Rx.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,Cs.jsx)(Bs,{fromDate:o,toDate:t,onChange:n})})}var Ln=require("@mui/material"),zx=a(require("@mui/icons-material/Checklist"),1),qx=a(require("@mui/icons-material/Face"),1),Ax=a(require("@mui/icons-material/Publish"),1),Lx=a(require("@mui/icons-material/NotificationsOutlined"),1),Nx=a(require("@mui/icons-material/BugReportOutlined"),1),Fx=a(require("@mui/icons-material/DescriptionOutlined"),1),Hx=a(require("@mui/icons-material/Inventory2Outlined"),1);var Et=require("react/jsx-runtime");function Px(e,o){return o>0?`${e} (${o})`:e}var cb=[{id:"my",label:"\uC804\uCCB4",icon:(0,Et.jsx)(zx.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Et.jsx)(Lx.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Et.jsx)(qx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Et.jsx)(Ax.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Et.jsx)(Nx.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Et.jsx)(Hx.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Et.jsx)(Fx.default,{sx:{fontSize:18}}),hideCount:!0}];function mb(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 ub({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=ce(),l=mb(i.tabs),s=e;return r?(0,Et.jsx)(Ln.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(p=>{let m=o===p.id;return(0,Et.jsx)(Ln.ButtonBase,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:et(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:Px(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):(0,Et.jsx)(Ln.Tabs,{value:o,onChange:(p,m)=>n(m),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(p=>(0,Et.jsx)(Ln.Tab,{value:p.id,label:Px(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:l},p.id))})}var Nn=require("react"),Be=require("@mui/material"),Wx=a(require("@mui/icons-material/OpenInNewOutlined"),1),$x=a(require("@mui/icons-material/Check"),1),Kx=a(require("@mui/icons-material/CheckCircleOutlined"),1),Ux=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Vx=a(require("@mui/icons-material/SendOutlined"),1),Gx=a(require("@mui/icons-material/EventOutlined"),1),Yx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),jx=a(require("@mui/icons-material/ViewKanbanOutlined"),1),Xx=a(require("@mui/icons-material/ContentCopyOutlined"),1),Qx=a(require("@mui/icons-material/NextPlanOutlined"),1),Zx=a(require("@mui/icons-material/ContentPasteOutlined"),1),Jx=a(require("@mui/icons-material/ShareOutlined"),1),eg=a(require("@mui/icons-material/DirectionsRunOutlined"),1),vs=a(require("@mui/icons-material/ChevronRight"),1),og=a(require("@mui/icons-material/ArchiveOutlined"),1),tg=a(require("@mui/icons-material/UnarchiveOutlined"),1),ng=require("@ehfuse/alerts");var Z=require("react/jsx-runtime");function db({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:p,onChangeReminder:m,onMemberEdit:c,onMoveProject:x,onDuplicate:f,onCreateFollowUp:u,onShare:h,onAssignSprint:R,onArchiveToggle:I,onDelete:b}){let g=Ye(),C=Wt(),[B,M]=(0,Nn.useState)(null),[S,E]=(0,Nn.useState)(null),[y,k]=(0,Nn.useState)(null);(0,Nn.useEffect)(()=>{e||(M(null),E(null),k(null))},[e]);let w=e?.task??null,A=!!w?.is_notice,d=!!w?.is_event,T=w?!$t(w,r):!1,z=(0,Nn.useMemo)(()=>new Set(t.filter(W=>W.useSprints).map(W=>W.key)),[t]),N=async()=>{let W=w;if(o(),!W)return;await(0,ng.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${W.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&b(W.seq)},H=()=>{w&&I(w.seq,!w.archived),o()};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Be.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,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&i(w),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Wx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,Z.jsxs)(Be.MenuItem,{disabled:A?(w?.author_account_seq??0)!==r:(w?.author_account_seq??0)!==r&&(w?.manager_account_seq??0)!==r,onClick:()=>{w&&l(w.seq,!w.completed),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:w?.completed?(0,Z.jsx)(Ux.default,{sx:{fontSize:19}}):(0,Z.jsx)(Kx.default,{sx:{fontSize:19}})}),w?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!A&&s?(0,Z.jsxs)(Be.MenuItem,{disabled:!(w?.manager_account_seq??0)&&(w?.receiver_account_seqs??[]).length===0,onClick:()=>{w&&s(w),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Vx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,d?null:(0,Z.jsx)(Be.Divider,{}),d?null:(0,Z.jsxs)(Be.MenuItem,{disabled:T,onClick:W=>{w&&M({anchorEl:W.currentTarget,task:w})},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Gx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!A&&!d&&c?(0,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&c(w,"manager"),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Yx.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,d?null:(0,Z.jsxs)(Be.MenuItem,{disabled:T,onClick:W=>{w&&E({anchorEl:W.currentTarget,task:w})},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(jx.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,Z.jsx)(vs.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,Z.jsx)(Be.Divider,{}),f?(0,Z.jsxs)(Be.MenuItem,{disabled:T,onClick:()=>{w&&f(w.seq),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Xx.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,u&&w&&!w.is_event&&!w.is_notice?(0,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&u(w.seq),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&(h?h(w):ar(w,g)),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:g?(0,Z.jsx)(Jx.default,{sx:{fontSize:19}}):(0,Z.jsx)(Zx.default,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),w&&!w.is_notice&&!w.is_event&&z.has(String(w.tab_key??""))&&R?(0,Z.jsxs)(Be.MenuItem,{onClick:W=>k(W.currentTarget),sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(eg.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,Z.jsx)(vs.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,Z.jsxs)(Be.MenuItem,{onClick:H,disabled:T||!w?.archived&&!(w&&Kr(w)),sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:w?.archived?(0,Z.jsx)(tg.default,{sx:{fontSize:19}}):(0,Z.jsx)(og.default,{sx:{fontSize:19}})}),w?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,Z.jsx)(Be.Divider,{}),(0,Z.jsxs)(Be.MenuItem,{disabled:T,onClick:N,sx:{fontSize:14,color:"#e5484d"},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(mn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),(0,Z.jsx)(cn,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:g,onClose:()=>{M(null),o()},onDateChange:W=>{B&&p(B.task.seq,W)},onReminderChange:W=>{B&&m?.(B.task.seq,W)}}),(0,Z.jsxs)(Be.Menu,{transitionDuration:0,anchorEl:S?.anchorEl??null,open:!!S,onClose:()=>{E(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...C,children:[(0,Z.jsx)(Be.MenuItem,{selected:!S?.task.tab_key,onClick:()=>{S&&x(S.task.seq,""),E(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(W=>!W.archived).map(W=>(0,Z.jsx)(Be.MenuItem,{selected:S?.task.tab_key===W.key,onClick:()=>{S&&x(S.task.seq,W.key),E(null),o()},sx:{fontSize:14,minWidth:170},children:W.label},W.key))]}),(0,Z.jsx)(Be.Menu,{transitionDuration:0,anchorEl:y,open:!!y,onClose:()=>k(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(W=>`custom-${W.group_seq}`===String(w?.tab_key??"")).map(W=>({seq:W.seq,label:xt(W)}))].map(W=>(0,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&R?.(w.seq,W.seq),k(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[W.label,(w?.sprint_seq??0)===W.seq?(0,Z.jsx)($x.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},W.seq))})]})}var bn=require("@mui/material");var Fn=require("react/jsx-runtime");function pb({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,Fn.jsxs)(bn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,Fn.jsxs)(bn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Fn.jsx)(bn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,Fn.jsx)(Ge,{option:l})]},l.key)}),(0,Fn.jsx)(bn.Divider,{}),(0,Fn.jsx)(bn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var kn=require("@mui/material"),rg=a(require("@mui/icons-material/Check"),1),ig=a(require("@mui/icons-material/BarChartOutlined"),1),ag=a(require("@mui/icons-material/SettingsOutlined"),1);var Ft=require("react/jsx-runtime");function fb(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,Ft.jsxs)(kn.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(p=>({seq:p.seq,label:xt(p)}))].map(p=>(0,Ft.jsxs)(kn.MenuItem,{onClick:()=>{r(p.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?(0,Ft.jsx)(rg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),(0,Ft.jsx)(kn.Divider,{}),l?(0,Ft.jsxs)(kn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,Ft.jsx)(ig.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,Ft.jsx)(kn.Divider,{}):null,(0,Ft.jsxs)(kn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,Ft.jsx)(ag.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var xb={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function sg(e){return xb[e]??"tasks"}var gb={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"},lg=["list","calendar","month","card","kanban","sprint","timeline"],hb=["list","card"];function bb(e){let o=sg(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:lg,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:hb,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:lg,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 wf(e){navigator.clipboard.writeText(e).then(()=>(0,_a.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,_a.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 ar(e,o){let t=Df(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&wf(t)});return}wf(t)}var oo=require("react/jsx-runtime");function as({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1}){let p=Ye(),[m,c]=(0,is.useState)(null),[x,f]=(0,is.useState)(null),u=Vn(e.icon||(e.is_notice?Vo:e.is_event?"event":Ve)),h=!!e.is_notice,R=!!e.is_event,I=h&&o>0&&(e.author_account_seq??0)===o,b=!$t(e,o),g=!R&&(h?I:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsxs)(Wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,oo.jsx)(Wo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,oo.jsx)(Mf.default,{})}):null,g&&!s?(0,oo.jsx)(Wo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Bt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,oo.jsx)(Wo.Checkbox,{checked:e.completed,icon:(0,oo.jsx)(zf.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,oo.jsx)(Pf.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(C,B)=>t(e.seq,B),sx:{p:0}})}):null,s?null:(0,oo.jsx)(Wo.Tooltip,{title:b?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,oo.jsx)(Wo.IconButton,{size:"small",onClick:b?void 0:C=>f(C.currentTarget),sx:{color:e.icon_color||(h?"#e5484d":"#1e3a8a")},children:(0,oo.jsx)(u,{sx:{fontSize:20}})})}),m!==null?(0,oo.jsx)(Wo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:m,onChange:C=>c(C.target.value),onBlur:()=>{m.trim()&&m.trim()!==e.title&&n(e.seq,m.trim()),c(null)},onKeyDown:C=>{C.key==="Enter"&&C.target.blur(),C.key==="Escape"&&c(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,oo.jsx)(Wo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h?"\uACF5\uC9C0":R?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,oo.jsx)(Wo.Box,{onClick:b?void 0:()=>c(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:b?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),(0,oo.jsx)(Wo.Tooltip,{title:p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,oo.jsx)(Wo.IconButton,{"aria-label":p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>ar(e,p),sx:{color:"#6b7280"},children:p?(0,oo.jsx)(Of.default,{sx:{fontSize:20}}):(0,oo.jsx)(Rf.default,{sx:{fontSize:20}})})}),l&&!s?(0,oo.jsx)(Wo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,oo.jsx)(Ef.default,{})}):null]}),(0,oo.jsx)(tr,{anchorEl:x,value:e.icon||(h?Vo:""),color:e.icon_color||(h?"#e5484d":"#1e3a8a"),onSelect:C=>r(e.seq,C),onSelectColor:C=>i?.(e.seq,C),onClose:()=>f(null)})]})}var Qt=require("react"),le=require("@mui/material"),Yf=a(require("@mui/icons-material/ExpandLess"),1),jf=a(require("@mui/icons-material/ExpandMore"),1),Xf=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),Qf=a(require("@mui/icons-material/Check"),1),Zf=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Jf=a(require("@mui/icons-material/SpeedOutlined"),1),Ea=a(require("@mui/icons-material/CheckCircle"),1),ex=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ma=a(require("@mui/icons-material/CheckCircleOutlined"),1),ds=a(require("@mui/icons-material/AccessTimeOutlined"),1),ox=a(require("@mui/icons-material/AutorenewOutlined"),1),tx=a(require("@mui/icons-material/LabelOutlined"),1),nx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),rx=a(require("@mui/icons-material/SubjectOutlined"),1),ix=a(require("@mui/icons-material/StickyNote2Outlined"),1),ax=a(require("@mui/icons-material/PanToolAltOutlined"),1);var qf=require("react"),Af=require("@ehfuse/mui-form-controls"),Lf=require("react/jsx-runtime");function ls({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,qf.useState)(null);return(0,Lf.jsx)(Af.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 Pn=require("react"),ko=require("@mui/material"),Ff=a(require("@mui/icons-material/AccountTreeOutlined"),1),Hf=a(require("@mui/icons-material/Add"),1),Wf=a(require("@mui/icons-material/Close"),1),$f=a(require("@mui/icons-material/NextPlanOutlined"),1);function Rn(e){return e.relations??[]}function Nh(e,o,t){return Rn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Rn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Nf(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function wa(e,o){let t=new Map(o.map(u=>[u.seq,u]));t.set(e.seq,e);let n=new Map,r=(u,h)=>{n.has(u)||n.set(u,new Set),n.has(h)||n.set(h,new Set),n.get(u).add(h),n.get(h).add(u)};for(let u of t.values())for(let h of Rn(u))h.type==="follow_up"&&t.has(h.task_seq)&&r(u.seq,h.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let u=l.shift();for(let h of n.get(u)??[])i.has(h)||(i.add(h),l.push(h))}let s=[...i].map(u=>t.get(u)).filter(u=>!!u).sort((u,h)=>Nf(u).localeCompare(Nf(h))),p=new Set;for(let u of Rn(e))u.type==="related"&&p.add(u.task_seq);for(let u of t.values())u.seq!==e.seq&&Rn(u).some(h=>h.type==="related"&&h.task_seq===e.seq)&&p.add(u.seq);let m=[...p].map(u=>t.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),c=[...t.values()].filter(u=>u.seq!==e.seq&&Rn(u).some(h=>h.type==="duplicate_of"&&h.task_seq===e.seq)),x=Rn(e).find(u=>u.type==="duplicate_of")?.task_seq,f=x?t.get(x)??null:null;return{lineage:s,related:m,duplicates:c,duplicateOf:f}}function Da(e,o){let t=wa(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function ss(e,o){return Da(e,o)>0}var Te=require("react/jsx-runtime");function cs({item:e,caption:o,onOpen:t,onUnlink:n}){let r=co(e.icon||Ve);return(0,Te.jsxs)(ko.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,Te.jsx)(ko.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,Te.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,Te.jsxs)(ko.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,Te.jsx)(Ge,{option:Go(e),small:!0}),n?(0,Te.jsx)(ko.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,Te.jsx)(Wf.default,{sx:{fontSize:15}})}):null]})}function ms({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,p]=(0,Pn.useState)(!1),[m,c]=(0,Pn.useState)(null),[x,f]=(0,Pn.useState)(null),u=(0,Pn.useMemo)(()=>wa(e,o),[e,o]),h=u.lineage.length>=2,R=(0,Pn.useMemo)(()=>Da(e,o),[e,o]),I=(0,Pn.useMemo)(()=>{let g=new Set;for(let C of u.lineage)g.add(C.seq);for(let C of u.related)g.add(C.seq);for(let C of u.duplicates)g.add(C.seq);return u.duplicateOf&&g.add(u.duplicateOf.seq),[...g]},[u]),b=(g,C,B)=>{f({anchorEl:g,targetSeq:C,type:B})};return(0,Te.jsxs)(gt,{icon:(0,Te.jsx)(Ff.default,{sx:{fontSize:19,display:"block"}}),title:(0,Te.jsxs)(Te.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",R>0?(0,Te.jsx)(ko.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:R}):null]}),titleExtra:t?null:(0,Te.jsxs)(ko.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,Te.jsx)(ko.Button,{size:"small",color:"inherit",startIcon:(0,Te.jsx)($f.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,Te.jsx)(ko.Button,{size:"small",color:"inherit",startIcon:(0,Te.jsx)(Hf.default,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[h?(0,Te.jsx)(ko.Box,{sx:{mb:u.related.length||u.duplicates.length||u.duplicateOf?1:0},children:u.lineage.map((g,C)=>{let B=g.seq===e.seq,M=C===u.lineage.length-1;return(0,Te.jsxs)(ko.Box,{sx:{display:"flex",gap:1},children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,Te.jsx)(ko.Box,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),M?null:(0,Te.jsx)(ko.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,Te.jsxs)(ko.Box,{sx:{flex:1,minWidth:0,pb:M?0:.5},children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Te.jsxs)(ko.Box,{component:"span",onClick:!B&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),(0,Te.jsx)(Ge,{option:Go(g),small:!0})]}),(0,Te.jsx)(ko.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,Te.jsx)(cs,{item:u.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(u.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>b(g.currentTarget,u.duplicateOf.seq,"duplicate_of"):void 0}):null,u.duplicates.map(g=>(0,Te.jsx)(cs,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?C=>b(C.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),u.related.map(g=>(0,Te.jsx)(cs,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?C=>b(C.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),R===0?(0,Te.jsx)(ko.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,Te.jsx)(gi,{open:s,task:e,tasks:o,excludeSeqs:I,onClose:()=>p(!1),onSubmit:(g,C)=>r(e.seq,g,C)}):null,(0,Te.jsx)(uo,{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,Te.jsx)(uo,{open:!!x,anchorEl:x?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>f(null),onConfirm:()=>{x&&i?.(e.seq,x.targetSeq,x.type),f(null)}})]})}var Uf=require("react"),ct=require("@mui/material"),Vf=a(require("@mui/icons-material/HistoryOutlined"),1),Gf=a(require("@mui/icons-material/ExpandMore"),1);var $o=require("react/jsx-runtime"),Fh={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function Kf(e){return String(e??"").trim()||"\uC5C6\uC74C"}function Hh(e){if(e.kind!=="field")return Fh[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let o=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",t=String(e.old_value??"").trim(),n=String(e.new_value??"").trim();return!t&&n?`${o}\uC744(\uB97C) "${n}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:t&&!n?`${o}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${o}\uC744(\uB97C) "${Kf(t)}" \u2192 "${Kf(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function us({taskSeq:e,items:o,loading:t,onExpand:n}){let[r,i]=(0,Uf.useState)(!1),l=()=>{let s=!r;i(s),s&&!o&&n?.(e)};return(0,$o.jsxs)(ct.Box,{sx:{px:2,pb:r?2:0,display:"flex",flexDirection:"column",gap:.25},children:[(0,$o.jsxs)(ct.Box,{role:"button",tabIndex:0,onClick:l,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),l())},sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",fontSize:Pr,fontWeight:500,color:"#37352f",userSelect:"none"},children:[(0,$o.jsx)(Vf.default,{sx:{fontSize:18,display:"block",color:"#37352f"}}),"\uD65C\uB3D9",o&&o.length>0?` (${o.length})`:"",(0,$o.jsx)(Gf.default,{sx:{ml:"auto",fontSize:20,color:"#9a9a97",transition:"transform 120ms",transform:r?"rotate(180deg)":"none"}})]}),r?(0,$o.jsxs)(ct.Box,{sx:{mt:1,display:"flex",flexDirection:"column",gap:1},children:[t&&!o?(0,$o.jsxs)(ct.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,$o.jsx)(ct.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,o&&o.length===0?(0,$o.jsx)(ct.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(o??[]).map(s=>(0,$o.jsxs)(ct.Box,{sx:{display:"flex",gap:1,alignItems:"baseline",minWidth:0},children:[(0,$o.jsx)(ct.Box,{sx:{flexShrink:0,width:5,height:5,borderRadius:"50%",bgcolor:"#d5d8dc",transform:"translateY(-2px)"}}),(0,$o.jsxs)(ct.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,$o.jsx)(ct.Box,{component:"span",sx:{fontWeight:500},children:String(s.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,$o.jsx)(ct.Box,{component:"span",sx:{ml:.5},children:Hh(s)}),(0,$o.jsx)(ct.Box,{component:"span",sx:{ml:.75,fontSize:13.5,color:"#9a9a97"},children:Bt(s.acted_time)})]})]},s.seq))]}):null]})}var _=require("react/jsx-runtime");function Lr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,_.jsx)(le.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function ps({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:p,onChangeDate:m,onChangeReminder:c,onMemberEdit:x,onChangePriority:f,onChangeEstimatedTime:u,onChangeEventTime:h,onChangeEventPlace:R,onChangeEventAddress:I,onChangeNote:b,onChangeContent:g,onChangeContentHeight:C,onAddChecklistItem:B,onToggleChecklistItem:M,onRemoveChecklistItem:S,onUpdateChecklistItem:E,onConvertChecklistToTask:y,onOpenChecklistTask:k,onLinkChecklistTask:w,resolveChecklistTask:A,relatedTasksPool:d,onOpenRelatedTask:T,onLinkRelatedTask:z,onUnlinkRelatedTask:N,onCreateFollowUpTask:H,onAddAttachments:W,onRemoveAttachment:he,onPreview:pe,onDownload:ye,onUpdateComment:be,onRemoveComment:ze,onToggleCommentReaction:_e,currentUserName:ge="",myAccountSeq:re=0,noticeAdmin:qe=!1,hideProject:to=!1,hideLabel:V=!1,showTitle:$=!1,onChangeTitle:te,onToggleCompleted:v,onChangeIcon:O,onChangeIconColor:J,employees:se=[],onAckConfirm:We,onRequestConfirm:L,activityItems:we,activityLoading:Ae,onLoadActivity:ke,onChangeBugField:Q,sprints:Ne=[],sprintProject:j=!1,hideSprint:Co=!1,onChangeSprint:bt,onChangeStoryPoints:sr,onChangeResolution:Tn,onClaimTask:kt,onVerifyBug:nn}){let[Mt,rn]=(0,Qt.useState)(null),[yn,Hn]=(0,Qt.useState)(null),[Eo,Wn]=(0,Qt.useState)(null),[Ue,q]=(0,Qt.useState)(null),[G,ee]=(0,Qt.useState)(!1),me={[wt]:G?{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"}},[so,no]=(0,Qt.useState)(null),[Ro,Se]=(0,Qt.useState)(null),[vo,yo]=(0,Qt.useState)(null),[Io,Tt]=(0,Qt.useState)(null),ro=!!e.is_notice,io=!!e.is_event,Zo=!!e.is_bug,cr=!!kt&&Xr(e,re),Ci=!!kt&&Qr(e,re),mr=!!nn&&Zo&&!!e.completed&&re>0&&(e.author_account_seq??0)===re&&!(e.acks??[]).some(P=>P.account_seq===re),dt=!$t(e,re),$n=!e.is_event&&(e.is_notice?re>0&&(e.author_account_seq??0)===re:(e.author_account_seq??0)===re||(e.manager_account_seq??0)===re),ur=Vn(e.icon||(e.is_notice?Vo:e.is_event?"event":Ve)),Kn=ro?!jr(e,re):dt,Sn=cr||Ci?(0,_.jsxs)(jn,{onClick:P=>Tt(P.currentTarget),children:[(0,_.jsx)(ax.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,vi=ro?yi(e,se):"",pt=ro?Ql(e,se,re):null,Jo=!ro&&!io?ii(e,re):null,Ii=!!(Jo&&Jo.total>0||ro&&pt);return(0,_.jsxs)(_.Fragment,{children:[$?(0,_.jsxs)(le.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[$n?(0,_.jsx)(le.Checkbox,{checked:e.completed,icon:(0,_.jsx)(ex.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,_.jsx)(Ea.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(P,Pa)=>{Eo||Wn({anchorEl:P.currentTarget,nextCompleted:Pa})},sx:{p:0,mt:.25}}):null,(0,_.jsx)(le.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:dt?void 0:P=>Hn(P.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(ro?"#e5484d":"#1e3a8a")},children:(0,_.jsx)(ur,{sx:{fontSize:20}})}),(0,_.jsx)(le.Box,{sx:{flex:1,minWidth:0},children:Mt!==null?(0,_.jsx)(le.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:Mt,onChange:P=>rn(P.target.value),onBlur:()=>{Mt.trim()&&Mt.trim()!==e.title&&te(e.seq,Mt.trim()),rn(null)},onKeyDown:P=>{P.key==="Enter"&&P.target.blur(),P.key==="Escape"&&rn(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,_.jsx)(le.Box,{onClick:()=>rn(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,_.jsx)(uo,{open:!!Eo,anchorEl:Eo?.anchorEl??null,title:Eo?.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:Eo?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>Wn(null),onConfirm:()=>{Eo&&v(e.seq,Eo.nextCompleted),Wn(null)}}),(0,_.jsx)(tr,{anchorEl:yn,value:e.icon||(ro?Vo:""),color:e.icon_color||(ro?"#e5484d":"#1e3a8a"),onSelect:P=>O(e.seq,P),onSelectColor:P=>J?.(e.seq,P),onClose:()=>Hn(null)})]}):null,(0,_.jsxs)(le.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[wt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,_.jsx)(pi,{hideProject:to,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,estimatedTime:e.estimated_time,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,showEstimatedTime:!io,notice:ro,event:io,readOnly:dt,targetSummary:vi,onChangeProject:P=>s(e.seq,P),onAddProject:p,onChangeStartDate:P=>m(e.seq,"start_date",P),onChangeDueDate:P=>m(e.seq,"due_date",P),onChangeReminder:P=>c(e.seq,P),onChangePriority:P=>f(e.seq,P),onChangeEstimatedTime:P=>u(e.seq,P),onChangeEventTime:P=>h?.(e.seq,P),onChangeEventPlace:P=>R?.(e.seq,P),onChangeEventAddress:P=>I?.(e.seq,P),onMemberEdit:P=>x(e,P),narrowCollapsedSx:me,reminderLocked:e.completed,managerAction:Sn,leading:(0,_.jsxs)(_.Fragment,{children:[mr||Sn&&(ro||io)?(0,_.jsxs)(le.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[ro||io?Sn:null,mr?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Button,{variant:"contained",size:"large",onClick:()=>nn?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,_.jsx)(le.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>nn?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Zo&&e.ticket_no?(0,_.jsx)(ve,{icon:(0,_.jsx)(Xf.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,_.jsx)(le.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,io?null:(0,_.jsx)(le.Box,{sx:Zo&&e.ticket_no||Ii?void 0:{gridColumn:"1 / -1"},children:(0,_.jsx)(ve,{icon:(0,_.jsx)(ox.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:dt||e.completed?void 0:P=>no(P),children:(0,_.jsx)(Ge,{option:Go(e)})})}),Jo&&Jo.total>0?(0,_.jsx)(le.Box,{children:(0,_.jsx)(ve,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Jo.canConfirm?(0,_.jsx)(le.Button,{size:"small",variant:"contained",onClick:()=>We?.(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,_.jsxs)(le.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Jo.myTime?(0,_.jsx)(Ea.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:P=>q({anchorEl:P.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Jo.count," / ",Jo.total]})})}):null,ro&&pt?(0,_.jsx)(le.Box,{children:(0,_.jsx)(ve,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,_.jsx)(le.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:pt.canAck?(0,_.jsx)(le.Button,{size:"small",variant:"contained",onClick:()=>We?.(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,_.jsx)(le.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:pt.acked?(0,_.jsx)(Ea.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:P=>q({anchorEl:P.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:pt.total>0&&pt.count>=pt.total?"\uC644\uB8CC":(0,_.jsxs)(_.Fragment,{children:[pt.count,(0,_.jsx)(le.Box,{component:"span",sx:{mx:.4},children:"/"}),pt.total]})})})})}):null,j&&!Co&&!io&&!ro?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ve,{icon:(0,_.jsx)(Zf.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:dt?void 0:P=>Se(P),children:(e.sprint_seq??0)>0?Ne.find(P=>P.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,_.jsx)(Lr,{label:"\uBBF8\uBC30\uC815"})}),(0,_.jsx)(ve,{icon:(0,_.jsx)(Jf.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,_.jsx)(Yt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:dt,onCommit:P=>sr?.(e.seq,Number(P.replace(/[^0-9.]/g,""))||0)})})]}):null,io||V?null:(0,_.jsx)(le.Box,{sx:[{gridColumn:"1 / -1"},me??null],children:(0,_.jsx)(ve,{icon:(0,_.jsx)(tx.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:dt?void 0:P=>yo(P),children:(e.label_keys??[]).length>0?(0,_.jsx)(ln,{labelKeys:e.label_keys??[],labelOptions:t}):(0,_.jsx)(Lr,{})})})]}),trailing:(0,_.jsxs)(_.Fragment,{children:[Zo?(0,_.jsx)(fi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:dt,showResolution:!!e.completed,onChangeRepro:P=>Q?.(e.seq,"bug_repro",P),onChangeDevice:P=>Q?.(e.seq,"bug_device",P),onChangeWhere:P=>Q?.(e.seq,"bug_where",P),onChangeVersion:P=>Q?.(e.seq,"bug_version",P),onChangeResolution:P=>Tn?.(e.seq,P)}):null,(0,_.jsx)(ve,{icon:(0,_.jsx)(nx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[Po(9),me??null],children:e.created_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(jo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,_.jsx)(Lr,{})}),(0,_.jsx)(ve,{icon:(0,_.jsx)(ds.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[Po(11),me??null],children:e.created_time?Bt(e.created_time):(0,_.jsx)(Lr,{})}),e.completed?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ve,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[Po(10),me??null],children:e.completed_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(jo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,_.jsx)(Lr,{})}),(0,_.jsx)(ve,{icon:(0,_.jsx)(ds.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[Po(12),me??null],children:e.completed_time?Bt(e.completed_time):(0,_.jsx)(Lr,{})})]}):null]})}),(0,_.jsxs)(le.Box,{sx:{display:"none",[wt]:{display:"block",mt:1.5,mb:0}},children:[(0,_.jsx)(le.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,_.jsx)(le.ButtonBase,{onClick:()=>ee(P=>!P),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:G?(0,_.jsxs)(_.Fragment,{children:["\uC811\uAE30 ",(0,_.jsx)(Yf.default,{sx:{fontSize:18}})]}):(0,_.jsxs)(_.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,_.jsx)(jf.default,{sx:{fontSize:18}})]})})]}),(0,_.jsxs)(le.Box,{children:[(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[wt]:{mt:0,mb:1.25}}}),(0,_.jsx)(gt,{icon:(0,_.jsx)(rx.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,_.jsx)(le.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(xi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:C?P=>C(e.seq,P):void 0,readOnly:dt,onChange:P=>g(e.seq,P)})})}),e.is_bug?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(gt,{icon:(0,_.jsx)(ix.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,_.jsx)(le.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(ls,{value:e.note,readOnly:Kn,onCommit:P=>b(e.seq,P)})})})]}),io?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(hi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Kn,onAdd:B,onToggle:M,onRemove:S,onUpdate:E,onConvertToTask:y,onOpenLinkedTask:k,resolveLinkedTask:A,linkCandidates:d,linkBaseTask:e,onLinkExistingTask:w})]}),d&&!io&&!ro&&ss(e,d)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ms,{task:e,tasks:d,readOnly:dt,onOpenTask:T,onLink:z,onUnlink:N,onCreateFollowUp:H})]}):null,(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(bi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Kn,onAdd:W,onRemove:he,onPreview:pe?P=>pe({...P,taskSeq:e.seq}):void 0,onDownload:ye?P=>ye({...P,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ns,{taskSeq:e.seq,comments:e.comments??[],currentUserName:ge,myAccountSeq:re,avatarSrcByName:n,onUpdate:be,onRemove:ze,onToggleReaction:_e,onPreview:pe?P=>pe({...P,taskSeq:e.seq}):void 0,onDownload:ye?P=>ye({...P,taskSeq:e.seq}):void 0}),ke?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(le.Divider,{sx:{mb:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(us,{taskSeq:e.seq,items:we,loading:Ae,onExpand:ke})]}):null]}),(0,_.jsx)(Yr,{anchorEl:so,value:e.status,options:ro?hr:Zo?Cn:br,onSelect:P=>r(e.seq,P),onClose:()=>no(null)}),(0,_.jsx)(le.Menu,{transitionDuration:0,anchorEl:Ro,open:!!Ro,onClose:()=>Se(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ne.filter(P=>`custom-${P.group_seq}`===String(e.tab_key??"")).map(P=>({seq:P.seq,label:xt(P)}))].map(P=>(0,_.jsxs)(le.MenuItem,{onClick:()=>{bt?.(e.seq,P.seq),Se(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[P.label,(e.sprint_seq??0)===P.seq?(0,_.jsx)(Qf.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},P.seq))}),(0,_.jsx)(ri,{anchorEl:Ue?.anchorEl??null,open:!!Ue?.open,acks:e.acks??[],total:pt?.total??Jo?.total??0,avatarSrcByName:n,onRequestConfirm:L&&Jo&&Jo.count<Jo.total?()=>{L(e.seq),q(P=>P?{...P,open:!1}:null)}:void 0,onClose:()=>q(P=>P?{...P,open:!1}:null)}),(0,_.jsx)(Ti,{anchorEl:vo,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:P=>i(e.seq,Vr(e.label_keys??[],P)),onAddLabel:l,onClose:()=>yo(null)}),(0,_.jsx)(uo,{open:!!Io,anchorEl:Io,title:cr?"\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:()=>Tt(null),onConfirm:()=>{kt?.(e.seq),Tt(null)}})]})}var Ko=require("react/jsx-runtime");function Wh(){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 $h({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:m,...c}){let x=Ye(),f=(0,zn.useRef)(null);o&&(f.current=o);let u=o??f.current,[h,R]=(0,zn.useState)({}),I=Object.keys(h).length>0;(0,zn.useEffect)(()=>{R({})},[o?.seq,e]);let b=(0,zn.useRef)(null);if((0,zn.useEffect)(()=>{b.current?.scrollTo({top:0})},[o?.seq]),!u)return null;let g=x&&I?{...u,...h}:u,C=(y,k)=>{x?R(w=>({...w,...y})):k()},B=()=>{let y=h;R({});let k=u.seq,w=y.title===void 0?void 0:String(y.title).trim();if(r){let A={...y};w!==void 0&&(w?A.title=w:delete A.title),Object.keys(A).length>0&&r(k,A),(0,fs.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}w&&s(k,w),y.icon!==void 0&&p(k,String(y.icon)),y.icon_color!==void 0&&m?.(k,String(y.icon_color)),y.status!==void 0&&c.onChangeStatus(k,y.status),y.label_keys!==void 0&&c.onChangeLabels(k,y.label_keys??[]),y.tab_key!==void 0&&c.onChangeProject(k,String(y.tab_key??"")),y.start_date!==void 0&&c.onChangeDate(k,"start_date",String(y.start_date??"")),y.due_date!==void 0&&c.onChangeDate(k,"due_date",String(y.due_date??"")),y.reminder!==void 0&&c.onChangeReminder(k,y.reminder),y.priority!==void 0&&c.onChangePriority(k,y.priority),y.estimated_time!==void 0&&c.onChangeEstimatedTime(k,String(y.estimated_time??"")),y.event_time!==void 0&&c.onChangeEventTime?.(k,String(y.event_time??"")),y.event_place!==void 0&&c.onChangeEventPlace?.(k,String(y.event_place??"")),y.event_address!==void 0&&c.onChangeEventAddress?.(k,String(y.event_address??"")),y.content!==void 0&&c.onChangeContent(k,String(y.content??"")),y.note!==void 0&&c.onChangeNote(k,String(y.note??"")),(0,fs.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},M={...c,onChangeStatus:(y,k)=>C({status:k},()=>c.onChangeStatus(y,k)),onChangeLabels:(y,k)=>C({label_keys:k},()=>c.onChangeLabels(y,k)),onChangeProject:(y,k)=>C({tab_key:k},()=>c.onChangeProject(y,k)),onChangeDate:(y,k,w)=>C({[k]:w},()=>c.onChangeDate(y,k,w)),onChangeReminder:(y,k)=>C({reminder:k},()=>c.onChangeReminder(y,k)),onChangePriority:(y,k)=>C({priority:k},()=>c.onChangePriority(y,k)),onChangeEstimatedTime:(y,k)=>C({estimated_time:k},()=>c.onChangeEstimatedTime(y,k)),onChangeEventTime:(y,k)=>C({event_time:k},()=>c.onChangeEventTime?.(y,k)),onChangeEventPlace:(y,k)=>C({event_place:k},()=>c.onChangeEventPlace?.(y,k)),onChangeEventAddress:(y,k)=>C({event_address:k},()=>c.onChangeEventAddress?.(y,k)),onChangeContent:(y,k)=>C({content:k},()=>c.onChangeContent(y,k)),onChangeNote:(y,k)=>C({note:k},()=>c.onChangeNote(y,k))},S=(0,Ko.jsx)(ps,{...M,task:g,myAccountSeq:i,onChangeTitle:(y,k)=>C({title:k},()=>s(y,k)),onToggleCompleted:l,onChangeIcon:(y,k)=>C({icon:k},()=>p(y,k)),onChangeIconColor:(y,k)=>C({icon_color:k},()=>m?.(y,k)),showTitle:x}),E=(0,Ko.jsx)(rs,{onSubmit:(y,k)=>n(g.seq,y,k)},g.seq);return x?(0,Ko.jsx)(cx.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:g.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":g.is_event?"\uC77C\uC815":g.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:(0,Ko.jsx)(lx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>ar(g,!0)},{icon:(0,Ko.jsx)(Dt.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!I,onClick:I?B:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},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:E},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,Ko.jsx)(Dt.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:S})}]},u.seq):(0,Ko.jsx)(Dt.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,sx:{zIndex:y=>y.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Ko.jsxs)(Dt.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,Ko.jsx)(as,{task:g,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:m,onClose:t}),(0,Ko.jsx)(Dt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Ko.jsx)(Dt.Box,{sx:{flex:1,minHeight:0},children:(0,Ko.jsx)(sx.default,{ref:b,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:S})}),(0,Ko.jsx)(Dt.Divider,{sx:{borderColor:"#37352f"}}),(0,Ko.jsx)(Dt.Box,{sx:{flexShrink:0},children:E})]})})}var Zt=require("react"),To=require("@mui/material"),dx=require("@ehfuse/mui-form-dialog"),px=a(require("@mui/icons-material/EditOutlined"),1),xs=require("@ehfuse/alerts"),xn=require("@ehfuse/mui-form-controls");var Oa="custom-";function mx(e){return e.startsWith(Oa)}function Kh(e){return e>0?`${Oa}${e}`:""}function Ra(e){if(!mx(e))return 0;let o=Number(e.slice(Oa.length));return Number.isInteger(o)&&o>0?o:0}var Pe=require("react/jsx-runtime"),Uh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function ux(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function Vh({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let p=o.filter(d=>d.useSprints&&!d.archived),[m,c]=(0,Zt.useState)(""),[x,f]=(0,Zt.useState)(""),[u,h]=(0,Zt.useState)(""),[R,I]=(0,Zt.useState)(""),[b,g]=(0,Zt.useState)(""),[C,B]=(0,Zt.useState)(!1),[M,S]=(0,Zt.useState)(0);(0,Zt.useEffect)(()=>{e&&(c(p.length===1?p[0].key:""),f(""),h(""),I(""),g(""),S(0))},[e]);let E=()=>{f(""),h(""),I(""),g(""),S(0)},y=d=>{S(d.seq),c(`custom-${d.group_seq}`),f(d.name),h(d.goal),I(d.start_date),g(d.end_date)},k=async()=>{let d=Ra(m);if(!d){(0,xs.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!x.trim()){(0,xs.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(M>0){i(M,{name:x.trim(),goal:u.trim(),start_date:R,end_date:b}),E();return}await r({group_seq:d,name:x.trim(),goal:u.trim(),start_date:R,end_date:b})&&E()}finally{B(!1)}},w=new Map(o.map(d=>[Ra(d.key),d.label])),A=(0,Pe.jsx)(To.Box,{children:p.length===0?(0,Pe.jsx)(To.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,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsxs)(To.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Pe.jsx)(xn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:m,options:p.map(d=>({value:d.key,label:d.label})),onChange:d=>c(String(d.target.value)),disabled:M>0}),(0,Pe.jsx)(xn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:x,onChange:d=>f(d.target.value)}),(0,Pe.jsx)(xn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:R,onChange:d=>I(d.target.value)}),(0,Pe.jsx)(xn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:b,onChange:d=>g(d.target.value)}),(0,Pe.jsx)(xn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:u,onChange:d=>h(d.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Pe.jsxs)(To.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[M>0?(0,Pe.jsx)(To.Button,{color:"inherit",onClick:E,disabled:C,children:"\uCDE8\uC18C"}):null,(0,Pe.jsx)(To.Button,{variant:"contained",onClick:()=>{k()},disabled:C,children:M>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Pe.jsx)(To.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Pe.jsx)(To.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(d=>(0,Pe.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Pe.jsxs)(To.Box,{sx:{minWidth:0},children:[(0,Pe.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Pe.jsx)(To.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:d.name}),(0,Pe.jsx)(To.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:w.get(d.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,Pe.jsxs)(To.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[ux(d.start_date)," ~ ",ux(d.end_date)]})]}),d.goal?(0,Pe.jsx)(To.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:d.goal}):null]}),(0,Pe.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Pe.jsx)(xn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:d.status,options:Uh.map(T=>({value:T.value,label:T.label})),onChange:T=>l(d.seq,String(T.target.value)),sx:{width:104,flexShrink:0}}),(0,Pe.jsx)(To.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(d),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Pe.jsx)(px.default,{sx:{fontSize:18}})}),(0,Pe.jsx)(To.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(d.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Pe.jsx)(mn,{style:{width:16,height:16}})})]})]},d.seq))})]})});return(0,Pe.jsx)(dx.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:A}],actions:{showCancelButton:!1,right:(0,Pe.jsx)(To.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var gs=require("react"),He=require("@mui/material"),fx=require("@ehfuse/mui-form-dialog"),xx=a(require("@mui/icons-material/OpenInNewOutlined"),1),gx=a(require("@mui/icons-material/EventOutlined"),1),hx=require("@ehfuse/alerts");var Ie=require("react/jsx-runtime");function Gh({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,gs.useState)(""),[s,p]=(0,gs.useState)(!1),m=async()=>{let f=i.trim();if(f){p(!0);try{await t(f)&&l("")}finally{p(!1)}}},c=async f=>{await(0,hx.ConfirmDialog)({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(f.seq)},x=(0,Ie.jsxs)(He.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,Ie.jsxs)(He.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,Ie.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,Ie.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,Ie.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,Ie.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,Ie.jsx)(He.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,u)=>(0,Ie.jsxs)(He.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:u>0?"1px solid #efefed":"none"},children:[(0,Ie.jsx)(gx.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,Ie.jsx)(He.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,Ie.jsx)(He.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{c(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Ie.jsx)(mn,{sx:{fontSize:18}})})]},f.seq))}):(0,Ie.jsx)(He.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,Ie.jsx)(He.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,Ie.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,Ie.jsxs)(He.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,Ie.jsx)(He.Box,{children:(0,Ie.jsxs)(He.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,Ie.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,Ie.jsx)(He.Box,{children:(0,Ie.jsxs)(He.Box,{component:"span",children:[(0,Ie.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,Ie.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,Ie.jsx)(He.Box,{children:(0,Ie.jsx)(He.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,Ie.jsx)(He.Box,{children:(0,Ie.jsx)(He.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,Ie.jsxs)(He.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,Ie.jsx)(He.TextField,{value:i,onChange:f=>l(f.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,Ie.jsx)(He.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{m()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,Ie.jsx)(fx.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:x}],actions:{showCancelButton:!1,left:(0,Ie.jsx)(He.Button,{variant:"outlined",startIcon:(0,Ie.jsx)(xx.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Ie.jsx)(He.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var Oo=require("@mui/material"),bx=require("@ehfuse/mui-form-dialog"),kx=a(require("@mui/icons-material/ContentCopyOutlined"),1),hs=a(require("@mui/icons-material/OpenInNewOutlined"),1),bs=require("@ehfuse/alerts"),Le=require("react/jsx-runtime");function Tx(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??Tx,s=o.subscribed?l(o.token):"",p=()=>{navigator.clipboard.writeText(s).then(()=>(0,bs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,bs.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 x=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(x)}`,"_blank")},c=(0,Le.jsxs)(Oo.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,Le.jsxs)(Oo.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,Le.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,Le.jsxs)(Oo.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,Le.jsx)("br",{}),(0,Le.jsx)("b",{children:"\uB9C8\uAC10\uAE30\uD55C\uC774 \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,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(Oo.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,Le.jsxs)(Oo.Box,{sx:{display:"flex",gap:2},children:[(0,Le.jsx)(Oo.Button,{variant:"outlined",startIcon:(0,Le.jsx)(kx.default,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,Le.jsx)(Oo.Button,{variant:"contained",startIcon:(0,Le.jsx)(hs.default,{}),onClick:m,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,Le.jsxs)(Oo.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,Le.jsx)(Oo.Box,{children:(0,Le.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,Le.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,Le.jsx)(Oo.Box,{children:(0,Le.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,Le.jsx)(Oo.Box,{children:(0,Le.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,Le.jsx)(Oo.Box,{children:(0,Le.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,Le.jsx)(Oo.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,Le.jsx)(bx.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,Le.jsx)(Oo.Button,{variant:"outlined",startIcon:(0,Le.jsx)(hs.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Le.jsx)(Oo.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var Jt=require("react"),en=require("@mui/material"),yx=require("@ehfuse/mui-form-dialog"),Sx=require("@ehfuse/mui-form-controls"),Bx=require("@ehfuse/tree-view");var Uo=require("react/jsx-runtime");function Cx(e){return`${e.name}#${e.seq}`}function jh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function Xh(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 Qh(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 Zh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Cx(e),renderLabel:(0,Uo.jsx)(en.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,Uo.jsx)(en.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function vx(e,o){let t=(e.groups??[]).map(r=>vx(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>Qh(r,o)).map(Zh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function Jh({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,Jt.useState)(""),p=(0,Jt.useMemo)(()=>e.map(c=>vx(c,l.trim().toLowerCase())).filter(c=>c!==null),[e,l]),m=(0,Jt.useMemo)(()=>o.filter(c=>t.includes(c.seq)).map(Cx),[]);return(0,Uo.jsxs)(Uo.Fragment,{children:[(0,Uo.jsx)(en.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Uo.jsx)(Sx.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,Uo.jsx)(en.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,Uo.jsx)(Bx.TreeView,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:m,onChange:c=>i(c.map(jh).filter(x=>x>0)),styles:{border:"none",borderRadius:"0"}})})]})}function eb({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:l="\uD655\uC778",onConfirm:s,onClose:p}){let m=Ye(),[c,x]=(0,Jt.useState)([]),[f,u]=(0,Jt.useState)(0),h=(0,Jt.useMemo)(()=>Xh(n),[n]),R=i??[];(0,Jt.useEffect)(()=>{e&&(x(R),u(b=>b+1))},[e]);let I=()=>{let b=h.filter(g=>c.includes(g.seq));s(r?b:b.slice(0,1)),p()};return(0,Uo.jsx)(yx.FormDialog,{open:e,onClose:p,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,Uo.jsx)(en.Box,{sx:{...m?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...m?{}:{overflow:"hidden"},userSelect:"none"},children:(0,Uo.jsx)(Jh,{groups:n,allEmployees:h,initialSelectedSeqs:R,multiple:r,isMobile:m,onSelectionChange:x},f)})}],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,Uo.jsx)(en.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,Uo.jsx)(en.Button,{variant:"contained",onClick:I,children:l})}})}var Nr=require("react"),Nt=require("@mui/material"),wx=require("@ehfuse/mui-form-dialog"),Dx=require("@ehfuse/mui-form-controls");var Lt=require("@mui/material"),mt=require("react/jsx-runtime");function ob(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 ks({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((c,x)=>`${c.start_date}|${c.seq}`.localeCompare(`${x.start_date}|${x.seq}`)).map(c=>({sprint:c,...ob(c,o)})),i=r.some(c=>c.points>0),l=r.map(c=>i?c.points:c.count),s=Math.max(1,...l),p=r.filter(c=>c.sprint.status==="closed").map(c=>i?c.points:c.count),m=p.length>0?Math.round(p.reduce((c,x)=>c+x,0)/p.length*10)/10:null;return r.length===0?(0,mt.jsx)(Lt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,mt.jsxs)(Lt.Box,{children:[(0,mt.jsxs)(Lt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,mt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),m!==null?(0,mt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,mt.jsx)(Lt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:m}),i?"SP":"\uAC74"]}):null]}),(0,mt.jsx)(Lt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(c=>{let x=i?c.points:c.count,f=Math.round((t-24)*x/s),u=c.sprint.status==="closed";return(0,mt.jsxs)(Lt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,mt.jsx)(Lt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:x}),(0,mt.jsx)(Lt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:u?"#2f80ed":"#a9c9f5"}})]},c.sprint.seq)})}),(0,mt.jsx)(Lt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(c=>(0,mt.jsxs)(Lt.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 _x=require("react"),qn=require("@mui/material"),Do=require("react/jsx-runtime");function Ix(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function tb(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Ts(e){return e.slice(5).replace("-",".")}function ys({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,_x.useMemo)(()=>{let b=Ix(e.start_date),g=Ix(e.end_date);if(!b||!g||g<b||Math.round((g.getTime()-b.getTime())/864e5)+1>366)return null;let B=o.filter(d=>d.sprint_seq===e.seq&&!d.archived);if(B.length===0)return{empty:!0};let M=B.some(d=>(d.story_points??0)>0),S=d=>M?d.story_points??0:1,E=B.reduce((d,T)=>d+S(T),0),y=new Map;for(let d of B){if(!d.completed)continue;let T=(d.completed_time??"").slice(0,10),z=/^\d{4}-\d{2}-\d{2}$/.test(T)?T:e.start_date;y.set(z,(y.get(z)??0)+S(d))}let k=[];for(let d=new Date(b);d<=g;d.setDate(d.getDate()+1))k.push(tb(d));let w=E,A=[];for(let d of k){if(d>t)break;w-=y.get(d)??0,A.push({day:d,value:Math.max(0,w)})}return{empty:!1,days:k,total:E,usePoints:M,actual:A}},[e,o,t]);if(!r)return(0,Do.jsx)(qn.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,Do.jsx)(qn.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:p}=r,m=600,c=200,x=8,f=b=>i.length===1?0:b/(i.length-1)*m,u=b=>x+(c-x*2)*(1-b/Math.max(1,l)),h=`${f(0)},${u(l)} ${f(i.length-1)},${u(0)}`,R=p.map(b=>`${f(i.indexOf(b.day))},${u(b.value)}`).join(" "),I=p[p.length-1];return(0,Do.jsxs)(qn.Box,{children:[(0,Do.jsxs)(qn.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Do.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),I?(0,Do.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Do.jsx)(qn.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:I.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,Do.jsx)(qn.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,Do.jsxs)("svg",{viewBox:`0 0 ${m} ${c}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,Do.jsx)("line",{x1:0,y1:u(0),x2:m,y2:u(0),stroke:"#e6e6e3",strokeWidth:1}),(0,Do.jsx)("polyline",{points:h,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?(0,Do.jsx)("polyline",{points:R,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,I?(0,Do.jsx)("circle",{cx:f(i.indexOf(I.day)),cy:u(I.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,Do.jsxs)(qn.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,Do.jsx)("span",{children:Ts(e.start_date)}),t>e.start_date&&t<e.end_date?(0,Do.jsxs)("span",{children:["\uC624\uB298 ",Ts(t)]}):null,(0,Do.jsx)("span",{children:Ts(e.end_date)})]})]})}var ut=require("react/jsx-runtime");function nb({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Nr.useState)(0);(0,Nr.useEffect)(()=>{if(!e)return;let c=o.find(f=>f.status==="active")??o[0],x=o.find(f=>f.seq===r)??c;s(x?.seq??0)},[e]);let p=(0,Nr.useMemo)(()=>o.find(c=>c.seq===l)??null,[o,l]),m=(0,ut.jsxs)(Nt.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,ut.jsxs)(Nt.Box,{sx:{px:3,py:2.5},children:[(0,ut.jsx)(Nt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,ut.jsx)(ks,{sprints:o,tasks:t})]}),(0,ut.jsx)(Nt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ut.jsxs)(Nt.Box,{sx:{px:3,py:2.5},children:[(0,ut.jsx)(Nt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,ut.jsx)(Dx.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(c=>({value:String(c.seq),label:xt(c)})),onChange:c=>s(Number(c.target.value)||0),sx:{width:280,mb:2}}),p?(0,ut.jsx)(ys,{sprint:p,tasks:t,todayStr:n}):(0,ut.jsx)(Nt.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,ut.jsx)(wx.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,ut.jsx)(Nt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var on=require("@mui/material");var gn=require("react/jsx-runtime");function rb({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,gn.jsxs)(on.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,gn.jsx)(on.MenuItem,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(s=>{let p=t.includes(s.name);return(0,gn.jsxs)(on.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,gn.jsx)(on.Checkbox,{size:"small",checked:p,sx:{p:0}}),(0,gn.jsx)(jo,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,gn.jsx)(on.Divider,{}),(0,gn.jsx)(on.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Ex=require("react"),Fr=require("@mui/material"),Mx=a(require("@mui/icons-material/KeyboardArrowDown"),1),Ox=a(require("@mui/icons-material/Check"),1);var tn=require("react/jsx-runtime");function ib({value:e,onChange:o,options:t}){let[n,r]=(0,Ex.useState)(null),i=t??$i,l=$i.find(s=>s.value===e)?.label??"";return(0,tn.jsxs)(tn.Fragment,{children:[(0,tn.jsxs)(Fr.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,tn.jsx)(Mx.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,tn.jsx)(Fr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,tn.jsxs)(Fr.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,tn.jsx)(Ox.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var lr=require("@mui/material"),Ss=require("@ehfuse/mui-form-controls");function An(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Bi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function ab(e=new Date){return{fromDate:An(Bi(1,e)),toDate:An(e)}}var hn=require("react/jsx-runtime"),lb=[{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 Bs({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(An(Bi(i)),An(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===An(Bi(i))&&o===An(new Date);return(0,hn.jsxs)(lr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,hn.jsx)(lr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:lb.map(i=>{let l=r(i.months);return(0,hn.jsx)(lr.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,hn.jsxs)(lr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,hn.jsx)(Ss.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,hn.jsx)(lr.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,hn.jsx)(Ss.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Rx=require("@mui/material");var Cs=require("react/jsx-runtime");function sb({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,Cs.jsx)(Rx.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,Cs.jsx)(Bs,{fromDate:o,toDate:t,onChange:n})})}var Ln=require("@mui/material"),zx=a(require("@mui/icons-material/Checklist"),1),qx=a(require("@mui/icons-material/Face"),1),Ax=a(require("@mui/icons-material/Publish"),1),Lx=a(require("@mui/icons-material/NotificationsOutlined"),1),Nx=a(require("@mui/icons-material/BugReportOutlined"),1),Fx=a(require("@mui/icons-material/DescriptionOutlined"),1),Hx=a(require("@mui/icons-material/Inventory2Outlined"),1);var Et=require("react/jsx-runtime");function Px(e,o){return o>0?`${e} (${o})`:e}var cb=[{id:"my",label:"\uC804\uCCB4",icon:(0,Et.jsx)(zx.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Et.jsx)(Lx.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Et.jsx)(qx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Et.jsx)(Ax.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Et.jsx)(Nx.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Et.jsx)(Hx.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Et.jsx)(Fx.default,{sx:{fontSize:18}}),hideCount:!0}];function mb(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 ub({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=ce(),l=mb(i.tabs),s=e;return r?(0,Et.jsx)(Ln.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(p=>{let m=o===p.id;return(0,Et.jsx)(Ln.ButtonBase,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:et(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:Px(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):(0,Et.jsx)(Ln.Tabs,{value:o,onChange:(p,m)=>n(m),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(p=>(0,Et.jsx)(Ln.Tab,{value:p.id,label:Px(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:l},p.id))})}var Nn=require("react"),Be=require("@mui/material"),Wx=a(require("@mui/icons-material/OpenInNewOutlined"),1),$x=a(require("@mui/icons-material/Check"),1),Kx=a(require("@mui/icons-material/CheckCircleOutlined"),1),Ux=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Vx=a(require("@mui/icons-material/SendOutlined"),1),Gx=a(require("@mui/icons-material/EventOutlined"),1),Yx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),jx=a(require("@mui/icons-material/ViewKanbanOutlined"),1),Xx=a(require("@mui/icons-material/ContentCopyOutlined"),1),Qx=a(require("@mui/icons-material/NextPlanOutlined"),1),Zx=a(require("@mui/icons-material/ContentPasteOutlined"),1),Jx=a(require("@mui/icons-material/ShareOutlined"),1),eg=a(require("@mui/icons-material/DirectionsRunOutlined"),1),vs=a(require("@mui/icons-material/ChevronRight"),1),og=a(require("@mui/icons-material/ArchiveOutlined"),1),tg=a(require("@mui/icons-material/UnarchiveOutlined"),1),ng=require("@ehfuse/alerts");var Z=require("react/jsx-runtime");function db({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:p,onChangeReminder:m,onMemberEdit:c,onMoveProject:x,onDuplicate:f,onCreateFollowUp:u,onShare:h,onAssignSprint:R,onArchiveToggle:I,onDelete:b}){let g=Ye(),C=Wt(),[B,M]=(0,Nn.useState)(null),[S,E]=(0,Nn.useState)(null),[y,k]=(0,Nn.useState)(null);(0,Nn.useEffect)(()=>{e||(M(null),E(null),k(null))},[e]);let w=e?.task??null,A=!!w?.is_notice,d=!!w?.is_event,T=w?!$t(w,r):!1,z=(0,Nn.useMemo)(()=>new Set(t.filter(W=>W.useSprints).map(W=>W.key)),[t]),N=async()=>{let W=w;if(o(),!W)return;await(0,ng.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${W.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&b(W.seq)},H=()=>{w&&I(w.seq,!w.archived),o()};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Be.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,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&i(w),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Wx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,Z.jsxs)(Be.MenuItem,{disabled:A?(w?.author_account_seq??0)!==r:(w?.author_account_seq??0)!==r&&(w?.manager_account_seq??0)!==r,onClick:()=>{w&&l(w.seq,!w.completed),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:w?.completed?(0,Z.jsx)(Ux.default,{sx:{fontSize:19}}):(0,Z.jsx)(Kx.default,{sx:{fontSize:19}})}),w?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!A&&s?(0,Z.jsxs)(Be.MenuItem,{disabled:!(w?.manager_account_seq??0)&&(w?.receiver_account_seqs??[]).length===0,onClick:()=>{w&&s(w),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Vx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,d?null:(0,Z.jsx)(Be.Divider,{}),d?null:(0,Z.jsxs)(Be.MenuItem,{disabled:T,onClick:W=>{w&&M({anchorEl:W.currentTarget,task:w})},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Gx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!A&&!d&&c?(0,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&c(w,"manager"),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Yx.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,d?null:(0,Z.jsxs)(Be.MenuItem,{disabled:T,onClick:W=>{w&&E({anchorEl:W.currentTarget,task:w})},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(jx.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,Z.jsx)(vs.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,Z.jsx)(Be.Divider,{}),f?(0,Z.jsxs)(Be.MenuItem,{disabled:T,onClick:()=>{w&&f(w.seq),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Xx.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,u&&w&&!w.is_event&&!w.is_notice?(0,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&u(w.seq),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&(h?h(w):ar(w,g)),o()},sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:g?(0,Z.jsx)(Jx.default,{sx:{fontSize:19}}):(0,Z.jsx)(Zx.default,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),w&&!w.is_notice&&!w.is_event&&z.has(String(w.tab_key??""))&&R?(0,Z.jsxs)(Be.MenuItem,{onClick:W=>k(W.currentTarget),sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(eg.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,Z.jsx)(vs.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,Z.jsxs)(Be.MenuItem,{onClick:H,disabled:T||!w?.archived&&!(w&&Kr(w)),sx:{fontSize:14},children:[(0,Z.jsx)(Be.ListItemIcon,{children:w?.archived?(0,Z.jsx)(tg.default,{sx:{fontSize:19}}):(0,Z.jsx)(og.default,{sx:{fontSize:19}})}),w?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,Z.jsx)(Be.Divider,{}),(0,Z.jsxs)(Be.MenuItem,{disabled:T,onClick:N,sx:{fontSize:14,color:"#e5484d"},children:[(0,Z.jsx)(Be.ListItemIcon,{children:(0,Z.jsx)(mn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),(0,Z.jsx)(cn,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:g,onClose:()=>{M(null),o()},onDateChange:W=>{B&&p(B.task.seq,W)},onReminderChange:W=>{B&&m?.(B.task.seq,W)}}),(0,Z.jsxs)(Be.Menu,{transitionDuration:0,anchorEl:S?.anchorEl??null,open:!!S,onClose:()=>{E(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...C,children:[(0,Z.jsx)(Be.MenuItem,{selected:!S?.task.tab_key,onClick:()=>{S&&x(S.task.seq,""),E(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(W=>!W.archived).map(W=>(0,Z.jsx)(Be.MenuItem,{selected:S?.task.tab_key===W.key,onClick:()=>{S&&x(S.task.seq,W.key),E(null),o()},sx:{fontSize:14,minWidth:170},children:W.label},W.key))]}),(0,Z.jsx)(Be.Menu,{transitionDuration:0,anchorEl:y,open:!!y,onClose:()=>k(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(W=>`custom-${W.group_seq}`===String(w?.tab_key??"")).map(W=>({seq:W.seq,label:xt(W)}))].map(W=>(0,Z.jsxs)(Be.MenuItem,{onClick:()=>{w&&R?.(w.seq,W.seq),k(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[W.label,(w?.sprint_seq??0)===W.seq?(0,Z.jsx)($x.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},W.seq))})]})}var bn=require("@mui/material");var Fn=require("react/jsx-runtime");function pb({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,Fn.jsxs)(bn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,Fn.jsxs)(bn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Fn.jsx)(bn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,Fn.jsx)(Ge,{option:l})]},l.key)}),(0,Fn.jsx)(bn.Divider,{}),(0,Fn.jsx)(bn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var kn=require("@mui/material"),rg=a(require("@mui/icons-material/Check"),1),ig=a(require("@mui/icons-material/BarChartOutlined"),1),ag=a(require("@mui/icons-material/SettingsOutlined"),1);var Ft=require("react/jsx-runtime");function fb(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,Ft.jsxs)(kn.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(p=>({seq:p.seq,label:xt(p)}))].map(p=>(0,Ft.jsxs)(kn.MenuItem,{onClick:()=>{r(p.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?(0,Ft.jsx)(rg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),(0,Ft.jsx)(kn.Divider,{}),l?(0,Ft.jsxs)(kn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,Ft.jsx)(ig.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,Ft.jsx)(kn.Divider,{}):null,(0,Ft.jsxs)(kn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,Ft.jsx)(ag.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var xb={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function sg(e){return xb[e]??"tasks"}var gb={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"},lg=["list","calendar","month","card","kanban","sprint","timeline"],hb=["list","card"];function bb(e){let o=sg(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:lg,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:hb,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:lg,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
|