@ehfuse/taskbox 0.5.144 → 0.5.146

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,10 +5,10 @@
5
5
 
6
6
  `).trim()}function xi({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:l}){let s=(0,mt.useRef)(null),p=(0,mt.useRef)(null),c=i>0?i:0,d=(0,mt.useRef)(c),g=(0,mt.useRef)(l);g.current=l;let f=(0,mt.useRef)(null),m=(0,mt.useRef)(Date.now()+800),[x,O]=(0,mt.useState)(!1),v=Ke();(0,mt.useEffect)(()=>{if(n)return;let b=Kl(o);f.current===b||f.current===o||(f.current=b,m.current=Date.now()+800,s.current?.setHtml(b))},[e,o,n]);let h=(0,mt.useRef)(-1);return(0,mt.useEffect)(()=>{if(n||v||i<=0||h.current===i||(h.current=i,Math.abs(i-d.current)<1))return;let b=p.current?.querySelector(".ehfuse-editor-container");b&&(Math.abs(b.getBoundingClientRect().height-i)<1||(b.style.height=`${i}px`,d.current=i))},[n,v,i]),(0,mt.useEffect)(()=>{if(n||v)return;let b=p.current?.querySelector(".ehfuse-editor-container");if(!b||typeof ResizeObserver>"u")return;let w,B=new ResizeObserver(P=>{let S=Math.round(P[0]?.contentRect.height??0);S<=0||(window.clearTimeout(w),w=window.setTimeout(()=>{Math.abs(S-d.current)<1||(d.current=S,g.current?.(S))},300))});return B.observe(b),()=>{window.clearTimeout(w),B.disconnect()}},[n,v]),n?(0,Zt.jsxs)(Pn.Box,{sx:{position:"relative",mt:1},children:[(0,Zt.jsx)(Pn.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:Kl(o)}}),(0,Zt.jsx)(Pn.Tooltip,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,Zt.jsx)(Pn.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(Lp(o)).then(()=>{O(!0),window.setTimeout(()=>O(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:x?(0,Zt.jsx)(Ap.default,{sx:{fontSize:17,color:"#2f9e5b"}}):(0,Zt.jsx)(qp.default,{sx:{fontSize:17}})})})]}):(0,Zt.jsx)(Pn.Box,{ref:p,onDragOver:b=>b.stopPropagation(),onDrop:b=>b.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:(0,Zt.jsx)(ba.EhfuseEditor,{ref:s,defaultValue:Kl(o),autoHeight:v,resizable:!v,showToolbar:!v,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:ba.minimalToolbarOptions,locale:"ko",minHeight:c||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:b=>{let w=Date.now()<m.current,B=b===f.current;f.current=b,!(w||B)&&t(b)}})})}var Rr=require("react"),Oe=require("@mui/material"),Ul=a(require("@mui/icons-material/Close"),1),Vp=a(require("@mui/icons-material/AddCircle"),1),Vl=a(require("@mui/icons-material/AddTask"),1),Gp=a(require("@mui/icons-material/Checklist"),1),jp=a(require("@mui/icons-material/CheckCircle"),1),Yp=a(require("@mui/icons-material/Launch"),1),Xp=a(require("@mui/icons-material/LinkOutlined"),1),Qp=a(require("@mui/icons-material/RadioButtonUnchecked"),1);var zn=require("react"),Uo=require("@mui/material"),Fp=require("@ehfuse/mui-form-dialog"),Hp=require("@ehfuse/mui-form-controls"),Wp=require("@ehfuse/alerts"),$p=a(require("@mui/icons-material/CheckCircle"),1),Kp=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Up=require("@ehfuse/overlay-scrollbar");var Co=require("react/jsx-runtime"),Np=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function gi({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:l=!1,title:s="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:p="\uC5F0\uACB0",multiSelect:c=!1}){let d=Ke(),[g,f]=(0,zn.useState)("related"),[m,x]=(0,zn.useState)(""),[O,v]=(0,zn.useState)([]);(0,zn.useEffect)(()=>{e&&(f("related"),x(""),v([]))},[e]);let h=(0,zn.useMemo)(()=>{let S=new Set([o.seq,...n]),D=m.trim().toLowerCase();return t.filter(R=>S.has(R.seq)||R.is_event||R.is_notice?!1:D?R.title.toLowerCase().includes(D)||(R.ticket_no??"").toLowerCase().includes(D):!0).sort((R,I)=>!!R.completed!=!!I.completed?R.completed?1:-1:I.seq-R.seq)},[t,o.seq,n,m]),b=()=>{if(O.length===0){(0,Wp.ErrorAlert)("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let S of O)i(S,g);r()},w=S=>{v(D=>D.includes(S)?D.filter(R=>R!==S):c?[...D,S]:[S])},B=Np.find(S=>S.type===g)?.hint??"",P=(0,Co.jsxs)(Uo.Box,{sx:{...d?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...d?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[l?null:(0,Co.jsx)(Uo.Tabs,{value:g,onChange:(S,D)=>f(D),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Np.map(S=>(0,Co.jsx)(Uo.Tab,{value:S.type,label:S.label},S.type))}),l?null:(0,Co.jsx)(Uo.Box,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:B}),(0,Co.jsx)(Uo.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Co.jsx)(Hp.ClearTextField,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:m,onChange:S=>x(S.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,Co.jsx)(Uo.Box,{sx:{flex:1,minHeight:0},children:(0,Co.jsx)(Up.OverlayScrollbar,{style:{height:"100%"},contentStyle:{paddingTop:0},children:(0,Co.jsx)(Uo.Box,{sx:{display:"flex",flexDirection:"column"},children:h.length===0?(0,Co.jsx)(Uo.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):h.map(S=>{let D=co(S.icon||Ge),R=O.includes(S.seq);return(0,Co.jsxs)(Uo.Box,{onClick:()=>w(S.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:R?"#e3eefb":"transparent","&:hover":{bgcolor:R?"#e3eefb":"#f7f7f5"}},children:[R?(0,Co.jsx)($p.default,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):(0,Co.jsx)(Kp.default,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),D?(0,Co.jsx)(D,{sx:{fontSize:17,flexShrink:0,color:S.icon_color||"#1e3a8a"}}):null,(0,Co.jsxs)(Uo.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[S.ticket_no?`${S.ticket_no} `:"",S.title]}),(0,Co.jsx)(Uo.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,Co.jsx)(Ye,{option:Xo(S)})})]},S.seq)})})})})]});return(0,Co.jsx)(Fp.FormDialog,{open:e,onClose:r,maxWidth:"sm",fullScreen:d,mobilePresentation:d?"slide":"dialog",...d?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:d?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:s,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:P}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:(0,Co.jsx)(Uo.Button,{variant:"contained",disabled:O.length===0,onClick:b,children:p})}})}var le=require("react/jsx-runtime");function bi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:l=!1,onConvertToTask:s,onOpenLinkedTask:p,linkCandidates:c,linkBaseTask:d,onLinkExistingTask:g,resolveLinkedTask:f}){let[m,x]=(0,Rr.useState)(""),[O,v]=(0,Rr.useState)(!1),[h,b]=(0,Rr.useState)(null),w=Ke(),[B,P]=(0,Rr.useState)(null),[S,D]=(0,Rr.useState)(null),R=H=>{let u=H.task_seq?f?.(H.task_seq):void 0;return u?u.completed:H.checked},I=o.filter(R).length,E=()=>{m.trim()&&(t(e,m),x(""))};return(0,le.jsxs)(kt,{icon:(0,le.jsx)(Gp.default,{sx:{fontSize:19,display:"block"}}),title:(0,le.jsxs)(le.Fragment,{children:["\uD560\uC77C",o.length>0?(0,le.jsxs)(Oe.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[I," / ",o.length]}):null]}),titleExtra:o.length>0?(0,le.jsx)(Oe.Box,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,le.jsx)(Oe.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(I/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[(0,le.jsx)(Oe.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((H,u)=>{let y=H.task_seq?f?.(H.task_seq):void 0,k=R(H),T=!!H.task_seq;return(0,le.jsxs)(Oe.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1}},children:[(0,le.jsx)(Oe.Box,{component:"span",onClick:()=>n(e,u,!k),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:k?(0,le.jsx)(jp.default,{sx:{fontSize:18,color:"#2f80ed"}}):(0,le.jsx)(Qp.default,{sx:{fontSize:18,color:"#9a9a97"}})}),h?.index===u?(0,le.jsx)(Oe.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:h.label,enterKeyHint:"done",onChange:q=>b({index:u,label:q.target.value}),onBlur:()=>{h.label.trim()&&h.label.trim()!==H.label&&i?.(e,u,h.label),b(null)},onKeyDown:q=>{q.key==="Enter"&&q.target.blur(),q.key==="Escape"&&b(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,le.jsx)(Oe.Box,{component:"span",onClick:T?H.task_seq&&p?()=>p(H.task_seq):void 0:l||!i?void 0:w?()=>P({index:u,label:H.label}):()=>b({index:u,label:H.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:k?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...T?p?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:l||!i?{}:{cursor:"text"}},children:H.label}),T?(0,le.jsxs)(Oe.Box,{component:"span",onClick:H.task_seq&&p?()=>p(H.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...p?{cursor:"pointer"}:{}},children:[(0,le.jsx)(Yp.default,{sx:{fontSize:12}}),y?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!l&&!T&&s?(0,le.jsx)(Oe.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,le.jsx)(Oe.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:q=>D({anchorEl:q.currentTarget,index:u,label:H.label}),sx:{display:w?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,le.jsx)(Vl.default,{sx:{fontSize:16}})})}):null,l?null:(0,le.jsx)(Oe.IconButton,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,u),sx:{display:w?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,le.jsx)(Ul.default,{sx:{fontSize:15}})})]},`${H.label}-${u}`)})}),(0,le.jsxs)(Oe.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,le.jsx)(Oe.Box,{component:"input",spellCheck:!1,value:m,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:H=>x(H.target.value),onKeyDown:H=>{H.key==="Enter"&&E()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),c&&d&&g?(0,le.jsx)(Oe.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,le.jsx)(Oe.IconButton,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:H=>H.preventDefault(),onClick:()=>v(!0),sx:{flexShrink:0,color:"#9a9a97"},children:(0,le.jsx)(Xp.default,{sx:{fontSize:20}})})}):null,(0,le.jsx)(Oe.IconButton,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!m.trim(),onMouseDown:H=>H.preventDefault(),onClick:E,sx:{flexShrink:0,color:m.trim()?"#2f80ed":"#c9c8c5"},children:(0,le.jsx)(Vp.default,{sx:{fontSize:20}})})]}),c&&d&&g?(0,le.jsx)(gi,{open:O,task:d,tasks:c,excludeSeqs:o.map(H=>Number(H.task_seq??0)).filter(H=>H>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>v(!1),onSubmit:H=>{let u=c.find(y=>y.seq===H);g(e,H,String(u?.title??"").trim())}}):null,(0,le.jsx)(uo,{open:!!S,anchorEl:S?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>D(null),onConfirm:()=>{S&&s?.(e,S.index,S.label),D(null)}}),(0,le.jsx)(Oe.Dialog,{open:!!B,onClose:()=>P(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,le.jsxs)(Oe.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,le.jsx)(Oe.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,le.jsx)(Oe.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:B?.label??"",onChange:H=>P(u=>u&&{...u,label:H.target.value}),onKeyDown:H=>{if(H.key!=="Enter")return;let u=B;u&&u.label.trim()&&i?.(e,u.index,u.label.trim()),P(null)}}),(0,le.jsxs)(Oe.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!l&&s&&B&&!o[B.index]?.task_seq?(0,le.jsx)(Oe.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{s(e,B.index,o[B.index]?.label??""),P(null)},sx:{color:"#57564f"},children:(0,le.jsx)(Vl.default,{sx:{fontSize:20}})}):null,!l&&B?(0,le.jsx)(Oe.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,B.index),P(null)},sx:{color:"#e5484d"},children:(0,le.jsx)(Ul.default,{sx:{fontSize:19}})}):null,(0,le.jsx)(Oe.Box,{sx:{flex:1}}),(0,le.jsx)(Oe.Button,{color:"inherit",onClick:()=>P(null),children:"\uCDE8\uC18C"}),(0,le.jsx)(Oe.Button,{variant:"contained",disabled:!B?.label.trim(),onClick:()=>{B&&B.label.trim()&&i?.(e,B.index,B.label.trim()),P(null)},children:"\uD655\uC778"})]})]})})]})}var Sa=require("react"),Tt=require("@mui/material"),Jp=a(require("@mui/icons-material/Close"),1),Yl=a(require("@mui/icons-material/AttachFileOutlined"),1);var jb=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),ha=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return jb.has(o)};var Zp=require("@mui/material");var Pr=require("react/jsx-runtime");function Gl(e){let o=Kt(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),l=n??0;return!l||e>0&&(t??0)!==e?null:{index:l,total:r??0,queue:i??[]}}function ka(){let o=Kt().useValue("attachmentUpload.progress");return(0,Pr.jsxs)(Pr.Fragment,{children:[o??0,"%"]})}function jl(){let o=Kt().useValue("attachmentUpload.progress");return(0,Pr.jsx)(Zp.LinearProgress,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}var go=require("react/jsx-runtime");function Ta(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var ya={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function hi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:l}){let[s,p]=(0,Sa.useState)(!1),c=(0,Sa.useRef)(null),d=Ke(),g=dr(),f=ur(),m=Gl(e),x=e===0,O=B=>{if(i){i(B);return}window.open(f(B.uuid??""),"_blank","noopener,noreferrer")},v=B=>{if(l){l(B);return}window.open(f(B.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=B=>m?B+1<m.index?"done":B+1===m.index?"uploading":"waiting":"waiting",b=(B,P,S,D={})=>(0,go.jsxs)(Tt.Box,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:D.uploading?"#d5e6fb":"#e6e6e3",bgcolor:D.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[(0,go.jsxs)(Tt.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,go.jsx)(Yl.default,{sx:{fontSize:16,color:"#9a9a97"}}),P,(0,go.jsx)(Tt.Box,{component:"span",sx:{fontSize:12,color:D.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:S}),D.removeIndex!==void 0?(0,go.jsx)(Tt.IconButton,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,D.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,go.jsx)(Jp.default,{sx:{fontSize:15}})}):null]}),D.uploading?(0,go.jsx)(jl,{}):null]},B),w=B=>{let P=ha(B.name);return(0,go.jsx)(Tt.Box,{component:"button",type:"button",onClick:()=>P?O(B):v(B),title:`${B.name} ${P?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...ya,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:B.name})};return(0,go.jsxs)(kt,{icon:(0,go.jsx)(Yl.default,{sx:{fontSize:18,display:"block"}}),title:(0,go.jsxs)(go.Fragment,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[(0,go.jsxs)(Tt.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((B,P)=>{let S=`${B.uuid||B.name}-${P}`;if(x){let D=h(P),R=D==="uploading";return b(S,(0,go.jsx)(Tt.Box,{component:"span",sx:{...ya,color:D==="done"?"#37352f":"#9a9a97"},children:B.name}),R?(0,go.jsx)(ka,{}):Ta(B.size),{uploading:R,removeIndex:!r&&!m?P:void 0})}return B.uuid?b(S,w(B),Ta(B.size),{removeIndex:r?void 0:P}):b(S,(0,go.jsx)(Tt.Box,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...ya,color:"#9a9a97"},children:B.name}),Ta(B.size),{removeIndex:r?void 0:P})}),!x&&m?m.queue.slice(m.index-1).map((B,P)=>{let S=P===0;return b(`uploading-${m.index+P}-${B.name}`,(0,go.jsx)(Tt.Box,{component:"span",sx:{...ya,color:"#9a9a97"},children:B.name}),S?(0,go.jsx)(ka,{}):Ta(B.size),{uploading:S})}):null]}),(0,go.jsx)(Tt.Box,{onClick:()=>c.current?.click(),onDragOver:B=>{B.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:B=>{B.preventDefault(),p(!1);let P=Array.from(B.dataTransfer.files);P.length>0&&t(e,P)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:s?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:s?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:d?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${g}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${g}MB)`}),(0,go.jsx)(Tt.Box,{component:"input",ref:c,type:"file",multiple:!0,onChange:B=>{let P=Array.from(B.target.files??[]);P.length>0&&t(e,P),B.target.value=""},sx:{display:"none"}})]})}var af=require("react"),At=require("@mui/material"),lf=a(require("@mui/icons-material/Add"),1);var ki=require("react"),zr=require("@mui/material"),of=require("@ehfuse/mui-form-dialog"),tf=require("@ehfuse/mui-form-controls"),nf=require("@ehfuse/mui-color-picker"),rf=require("@ehfuse/alerts");var Jt=require("react/jsx-runtime"),ef="#2f80ed";function Xl({open:e,onClose:o,onSubmit:t}){let[n,r]=(0,ki.useState)(""),[i,l]=(0,ki.useState)(ef);(0,ki.useEffect)(()=>{e&&(r(""),l(ef))},[e]);let s=()=>{let d=n.trim();if(!d){(0,rf.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(d,i),o()},p=Qa(i),c=(0,Jt.jsxs)(zr.Box,{children:[(0,Jt.jsxs)(zr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,Jt.jsx)(tf.ClearTextField,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:d=>r(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),s())},fullWidth:!0,autoFocus:!0}),(0,Jt.jsx)(nf.ColorPicker,{value:i,onChange:d=>l(d),shape:"circle",colorSize:28})]}),(0,Jt.jsxs)(zr.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,Jt.jsx)(Ye,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...p}})]})]});return(0,Jt.jsx)(of.FormDialog,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:c}],actions:{showCancelButton:!0,right:(0,Jt.jsx)(zr.Button,{variant:"contained",onClick:s,children:"\uCD94\uAC00"})}})}var ut=require("react/jsx-runtime");function Ti({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[l,s]=(0,af.useState)(!1),p=Ut();return(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsxs)(At.Menu,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...p,children:[t.map(c=>{let d=o.includes(c.key);return(0,ut.jsxs)(At.MenuItem,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,ut.jsx)(At.Checkbox,{size:"small",checked:d,sx:{p:0}}),(0,ut.jsx)(Ye,{option:c})]},c.key)}),(0,ut.jsx)(At.Divider,{}),(0,ut.jsxs)(At.MenuItem,{onClick:()=>s(!0),sx:{fontSize:14,color:"#787774"},children:[(0,ut.jsx)(At.ListItemIcon,{children:(0,ut.jsx)(lf.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,ut.jsx)(Xl,{open:l,onClose:()=>s(!1),onSubmit:r})]})}function sf(e,o){let t=Number(e.author_account_seq??0);return o.filter(n=>{let r=Number(n.account_seq??0);return r>0&&r!==t})}function cf(e,o){let t=(e.target_account_seqs??[]).filter(g=>g>0);if(t.length===0)return null;let n=new Set(t),r=sf(e,o),i=new Map;for(let g of r){let f=String(g.department??"").trim();if(!f)continue;let m=i.get(f)??[];m.push(g),i.set(f,m)}let l=[],s=new Set;for(let[g,f]of i)if(f.every(x=>n.has(Number(x.account_seq??0)))){l.push(g);for(let x of f)s.add(Number(x.account_seq??0))}let p=new Map(r.map(g=>[Number(g.account_seq??0),g.name])),c=e.target_names??[],d=[];return t.forEach((g,f)=>{s.has(g)||d.push(p.get(g)??c[f]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:l,individualNames:d}}function yi(e,o){let t=cf(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function Yb(e,o){let t=cf(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function Ql(e,o,t){let n=(e.target_account_seqs??[]).filter(d=>d>0),r=sf(e,o),i=n.length>0?n.length:r.length,l=e.acks??[],s=t>0&&l.some(d=>d.account_seq===t),p=t>0&&Number(e.author_account_seq??0)===t,c=n.length===0||n.includes(t);return{count:l.length,total:i,acked:s,canAck:t>0&&!p&&c&&!s&&!e.completed}}function Zl(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(s=>s.size>n),i=e.filter(s=>s.size<=n),l=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
7
7
  \uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(s=>s.name).join(", ")}`:null;return{accepted:i,rejected:r,message:l}}var ne=require("react/jsx-runtime"),Jl="#0f9d58";function Ca({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:l=!1,hideBug:s=!1,leadingRow:p,hideLabel:c=!1,employees:d=[],myAccountSeq:g=0,departments:f=[],myGroupSeq:m=0,onMemberEdit:x,onAddProject:O,onAddLabelOption:v,contentSyncKey:h="create"}){let b=Kt(),w=dr(),B=e.useFormValue("manager_name"),P=e.useFormValue("receiver_names"),S=e.useFormValue("start_date"),D=!!e.useFormValue("is_event"),R=!!e.useFormValue("is_bug"),I=e.useFormValue("bug_repro")??"",E=e.useFormValue("bug_device")??"",H=e.useFormValue("bug_where")??"",u=e.useFormValue("bug_version")??"",y=e.useFormValue("event_time")??"",k=e.useFormValue("event_place")??"",T=e.useFormValue("event_address")??"",q=e.useFormValue("due_date"),F=e.useFormValue("estimated_time")??"",ge=e.useFormValue("reminder"),xe=e.useFormValue("priority"),we=e.useFormValue("content"),Ie=e.useFormValue("checklist")??[],De=e.useFormValue("tab_key"),Te=e.useFormValue("sprint_seq")??0,ie=e.useFormValue("story_points")??0,Ze=t.find(M=>M.key===De&&M.useSprints),ro=Ze?n.filter(M=>`custom-${M.group_seq}`===De):[],[G,Y]=(0,Ba.useState)(null),re=e.useFormValue("label_keys"),[C,W]=(0,Ba.useState)(null),oe=e.useFormValue("visibility")||"involved",X=Number(e.useFormValue("visibility_group_seq")??0),[We,io]=(0,Ba.useState)(null),bo=e.useFormValue("target_names"),So=e.useFormValue("target_account_seqs"),Io=b.useValue("createAttachmentFiles")??[],ee=i?yi({author_account_seq:g,target_names:bo,target_account_seqs:So},d):"";return(0,ne.jsxs)(ne.Fragment,{children:[p,i?null:(0,ne.jsxs)(no.Box,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...s?[]:[{value:"bug",label:"\uC624\uB958"}]].map(M=>{let Le=R?"bug":D?"event":"task",K=Le===M.value;return(0,ne.jsx)(no.ButtonBase,{onClick:()=>{if(Le===M.value)return;e.setFormValue("is_event",M.value==="event"),e.setFormValue("is_bug",M.value==="bug"),e.setFormValue("visibility",M.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0);let Ae=e.getFormValue("icon"),Bo=e.getFormValue("icon_color"),Go=[Ge,"event",pr].includes(Ae),Cn=!Bo||Bo===Jl||Bo===fr;Go&&e.setFormValue("icon",M.value==="event"?"event":M.value==="bug"?pr:Ge),Cn&&e.setFormValue("icon_color",M.value==="event"?Jl:M.value==="bug"?fr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:K?600:400,color:K?"#ffffff":"#787774",bgcolor:K?"#2563eb":"#f4f4f2"},children:M.label},M.label)}),(0,ne.jsxs)(no.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.75},children:[[{value:"involved",label:"\uBE44\uACF5\uAC1C",tip:"\uC791\uC131\uC790\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB9CC \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},...f.length>0?[{value:"group",label:"\uBD80\uC11C\uACF5\uAC1C",tip:"\uC120\uD0DD\uD55C \uBD80\uC11C\uC758 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"}]:[],{value:"all",label:"\uC804\uCCB4\uACF5\uAC1C",tip:"\uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"}].map(M=>{let Le=oe===M.value;return(0,ne.jsx)(no.Tooltip,{title:M.tip,arrow:!0,disableInteractive:!0,children:(0,ne.jsx)(no.ButtonBase,{onClick:()=>{oe!==M.value&&(e.setFormValue("visibility",M.value),e.setFormValue("visibility_group_seq",M.value==="group"&&(m||f[0]?.seq)||0))},sx:{px:1.5,py:.6,borderRadius:99,fontSize:13,fontWeight:Le?600:400,color:Le?"#2563eb":"#57564f",bgcolor:Le?"#eef4ff":"transparent",border:`1px solid ${Le?"#2563eb":"#d5d8dc"}`},children:M.label})},M.value)}),oe==="group"?(0,ne.jsx)(no.ButtonBase,{onClick:M=>io(M.currentTarget),sx:{px:1.5,py:.6,borderRadius:99,fontSize:13,fontWeight:600,color:"#ffffff",bgcolor:"#2563eb"},children:f.find(M=>M.seq===X)?.name??"\uBD80\uC11C \uC120\uD0DD"}):null]}),(0,ne.jsx)(no.Menu,{anchorEl:We,open:!!We,onClose:()=>io(null),transitionDuration:0,children:f.map(M=>(0,ne.jsx)(no.MenuItem,{selected:M.seq===X,onClick:()=>{e.setFormValue("visibility_group_seq",M.seq),io(null)},sx:{fontSize:14,minWidth:140},children:M.name},M.seq))})]}),(0,ne.jsx)(no.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ne.jsxs)(no.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[(0,ne.jsx)(pi,{hideProject:l,showEstimatedTime:!D,values:{tabKey:De,managerName:B,receiverNames:P,startDate:S,dueDate:q,reminder:ge,priority:xe,estimatedTime:F,eventTime:y,eventPlace:k,eventAddress:T},onChangeEstimatedTime:M=>e.setFormValue("estimated_time",M),customTabs:t,avatarSrcByName:r,notice:i,event:D,onChangeEventTime:M=>e.setFormValue("event_time",M),onChangeEventPlace:M=>e.setFormValue("event_place",M),onChangeEventAddress:M=>e.setFormValue("event_address",M),targetSummary:ee,onChangeProject:M=>e.setFormValue("tab_key",M),onAddProject:O,onChangeStartDate:M=>e.setFormValue("start_date",M),onChangeDueDate:M=>e.setFormValue("due_date",M),onChangeReminder:M=>e.setFormValue("reminder",M),onChangePriority:M=>e.setFormValue("priority",M),onMemberEdit:x,trailing:(0,ne.jsxs)(ne.Fragment,{children:[Ze&&!D&&!i?(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(Ce,{icon:(0,ne.jsx)(pf.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:M=>Y(M),children:Te>0?ro.find(M=>M.seq===Te)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":(0,ne.jsx)(no.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),(0,ne.jsx)(Ce,{icon:(0,ne.jsx)(ff.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,ne.jsx)(Qt,{value:ie>0?String(ie):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:M=>e.setFormValue("story_points",Number(M.replace(/[^0-9.]/g,""))||0)})})]}):null,R?(0,ne.jsx)(fi,{values:{repro:I,device:E,where:H,version:u},onChangeRepro:M=>e.setFormValue("bug_repro",M),onChangeDevice:M=>e.setFormValue("bug_device",M),onChangeWhere:M=>e.setFormValue("bug_where",M),onChangeVersion:M=>e.setFormValue("bug_version",M)}):null]}),leading:D||c?null:(0,ne.jsx)(no.Box,{sx:{gridColumn:"1 / -1"},children:(0,ne.jsx)(Ce,{icon:(0,ne.jsx)(df.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:M=>W(M),children:(re??[]).length>0?(0,ne.jsx)(cn,{labelKeys:re??[],labelOptions:o}):(0,ne.jsx)(no.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),(0,ne.jsx)(no.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,ne.jsx)(kt,{icon:(0,ne.jsx)(mf.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,ne.jsx)(xi,{syncKey:h,value:we,onChange:M=>e.setFormValue("content",M)})}),D?null:(0,ne.jsx)(no.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),D?null:(0,ne.jsx)(bi,{taskSeq:0,checklist:Ie,onAdd:(M,Le)=>e.setFormValue("checklist",[...Ie,{label:Le,checked:!1}]),onToggle:(M,Le,K)=>e.setFormValue("checklist",Ie.map((Ae,Bo)=>Bo===Le?{...Ae,checked:K}:Ae)),onRemove:(M,Le)=>e.setFormValue("checklist",Ie.filter((K,Ae)=>Ae!==Le)),onUpdate:(M,Le,K)=>e.setFormValue("checklist",Ie.map((Ae,Bo)=>Bo===Le?{...Ae,label:K}:Ae))}),(0,ne.jsx)(no.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,ne.jsx)(hi,{taskSeq:0,attachments:Io.map(M=>({name:M.name,size:M.size})),onAdd:(M,Le)=>{let K=Zl(Le,w);K.message&&(0,gf.InfoAlert)(K.message),K.accepted.length!==0&&b.setValue("createAttachmentFiles",[...b.getValue("createAttachmentFiles")??[],...K.accepted])},onRemove:(M,Le)=>b.setValue("createAttachmentFiles",Io.filter((K,Ae)=>Ae!==Le))}),R?null:(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(no.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,ne.jsx)(kt,{icon:(0,ne.jsx)(uf.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,ne.jsx)(xf.TextField,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),(0,ne.jsx)(no.Menu,{transitionDuration:0,anchorEl:G,open:!!G,onClose:()=>Y(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ro.map(M=>({seq:M.seq,label:ht(M)}))].map(M=>(0,ne.jsx)(no.MenuItem,{onClick:()=>{e.setFormValue("sprint_seq",M.seq),Y(null)},sx:{fontSize:14,minWidth:170},children:M.label},M.seq))}),(0,ne.jsx)(Ti,{anchorEl:C,selectedKeys:re??[],labelOptions:o,onToggle:M=>e.setFormValue("label_keys",Vr(re??[],M)),onAddLabel:(M,Le)=>v?.(M,Le),onClose:()=>W(null)})]})}var Re=require("react/jsx-runtime");function Xb({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:l=null,isNotice:s=!1,defaultBug:p=!1}=t,c=Kt(),d=(0,tr.useRef)(!1),[g,f]=(0,tr.useState)(0),[m,x]=(0,tr.useState)(null),O=n.useFormValue("title"),v=n.useFormValue("icon"),h=n.useFormValue("icon_color"),b=!!n.useFormValue("is_event"),w=!!n.useFormValue("is_bug"),B=Ke(),S=c.useValue("createSubmitting")??!1,D=Un(v||Ge),R=s?"\uACF5\uC9C0 \uB4F1\uB85D":b?"\uC77C\uC815 \uB4F1\uB85D":w?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",I=s?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":b?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":w?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";(0,tr.useEffect)(()=>{let u=d.current;d.current=e,!(!e||u)&&(n.setFormValues({...n.getFormValues(),title:"",icon:s?Yo:p?pr:Ge,icon_color:s?"#e5484d":p?fr:"",manager_name:l?.name??"",manager_account_seq:l?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:s,is_event:!1,is_bug:p,visibility:p?"all":"involved",visibility_group_seq:0,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:mo(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:i}),c.setValue("createAttachmentFiles",[]),f(y=>y+1))},[e]);let E=(0,Re.jsxs)(lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[(0,Re.jsx)(lo.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:u=>x(u.currentTarget),sx:{p:0,color:h||"#1e3a8a"},children:(0,Re.jsx)(D,{sx:{fontSize:20}})}),(0,Re.jsx)(lo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:O,placeholder:I,onChange:u=>n.setFormValue("title",u.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]}),H=(0,Re.jsx)(er,{anchorEl:m,value:v,color:h||"#1e3a8a",onSelect:u=>n.setFormValue("icon",u),onSelectColor:u=>n.setFormValue("icon_color",u),onClose:()=>x(null)});return B?(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(kf.FormDialog,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:R,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:(0,Re.jsx)(lo.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:S,onClick:S?void 0:n.submit,sx:{ml:2,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},children:"\uC800\uC7A5"}),tooltip:S?"\uC800\uC7A5 \uC911\u2026":""}]},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:!1},sections:[{id:"task-create",title:"",showTitle:!1,children:(0,Re.jsx)(lo.Box,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:(0,Re.jsx)(Ca,{...t,contentSyncKey:`create-${g}`,leadingRow:E})})}]}),H]}):(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(lo.Drawer,{anchor:"right",open:e,onClose:o,sx:{zIndex:u=>u.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Re.jsxs)(lo.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,Re.jsxs)(lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,Re.jsx)(lo.Tooltip,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,Re.jsx)(lo.IconButton,{size:"small",onClick:u=>x(u.currentTarget),sx:{color:h||"#1e3a8a"},children:(0,Re.jsx)(D,{sx:{fontSize:20}})})}),(0,Re.jsx)(lo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:O,placeholder:I,onChange:u=>n.setFormValue("title",u.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),(0,Re.jsx)(lo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:(0,Re.jsx)(bf.default,{})})]}),(0,Re.jsx)(lo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Re.jsx)(lo.Box,{sx:{flex:1,minHeight:0},children:(0,Re.jsx)(hf.default,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Re.jsx)(Ca,{...t,contentSyncKey:`create-${g}`})})}),(0,Re.jsx)(lo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Re.jsxs)(lo.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,Re.jsx)(lo.Button,{onClick:o,color:"inherit",disabled:S,children:"\uCDE8\uC18C"}),(0,Re.jsx)(lo.Button,{onClick:n.submit,variant:"contained",disabled:S,children:S?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),H]})}var hn=require("react"),Mt=require("@mui/material"),ux=a(require("@mui/icons-material/ShareOutlined"),1),dx=a(require("@mui/icons-material/HistoryOutlined"),1),px=a(require("@ehfuse/overlay-scrollbar"),1),fx=require("@ehfuse/mui-form-dialog"),us=require("@ehfuse/alerts");var Lt=require("react"),Q=require("@mui/material"),os=a(require("@mui/icons-material/Send"),1),yf=require("@ehfuse/mui-form-controls"),Si=a(require("@mui/icons-material/Close"),1),Sf=a(require("@mui/icons-material/EditOutlined"),1),Bf=a(require("@mui/icons-material/Favorite"),1),Cf=a(require("@mui/icons-material/FavoriteBorderOutlined"),1),vf=a(require("@mui/icons-material/CheckCircle"),1),If=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),nr=a(require("@mui/icons-material/AttachFileOutlined"),1),_f=a(require("@mui/icons-material/AddCircleOutline"),1),wf=a(require("@mui/icons-material/ImageOutlined"),1);var es=e=>{if(e===0)return"0 Bytes";let o=1024,t=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,n)).toFixed(2))+" "+t[n]};var N=require("react/jsx-runtime"),Qb=5;function Tf({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(c=>c.account_seq===t),l=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",s=r.length===0?l:(0,N.jsx)(Q.Box,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(c=>`${c.name} \xB7 ${c.time}`).join(`
8
- `)}),p=e==="like"?"#e5484d":"#2f80ed";return(0,N.jsx)(Q.Tooltip,{title:s,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,N.jsxs)(Q.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[(0,N.jsx)(Q.IconButton,{size:"small","aria-label":`\uB313\uAE00 ${l}`,onClick:n,sx:{color:i?p:"#c9c8c5",p:.5},children:e==="like"?i?(0,N.jsx)(Bf.default,{sx:{fontSize:16}}):(0,N.jsx)(Cf.default,{sx:{fontSize:16}}):i?(0,N.jsx)(vf.default,{sx:{fontSize:16}}):(0,N.jsx)(If.default,{sx:{fontSize:16}})}),r.length>0?(0,N.jsx)(Q.Box,{component:"span",sx:{fontSize:12,color:i?p:"#9a9a97",ml:-.25},children:r.length}):null]})})}function ts({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:l,onToggleReaction:s,onPreview:p,onDownload:c}){let[d,g]=(0,Lt.useState)(null),f=(0,Lt.useRef)(null),[m,x]=(0,Lt.useState)(null),[O,v]=(0,Lt.useState)(!1),h=Math.max(0,o.length-Qb),b=h>0&&!O,w=d?Math.min(d.index,h):h,B=o.map((I,E)=>({comment:I,index:E})).slice(b?w:0),P=ur(),S=I=>{if(p){p(I);return}window.open(P(I.uuid??""),"_blank","noopener,noreferrer")},D=I=>{if(c){c(I);return}window.open(P(I.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},R=rt().slots?.avatar;return(0,N.jsxs)(Q.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,N.jsxs)(Q.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,N.jsx)(mn,{sx:{fontSize:18,display:"block",color:"#37352f"}}),(0,N.jsxs)(Q.Box,{sx:{fontSize:ga,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),h>0&&(!b||w>0)?(0,N.jsx)(Q.Box,{role:"button",tabIndex:0,onClick:()=>v(I=>!I),onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),v(E=>!E))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:b?`\uC774\uC804 \uB313\uAE00 ${w}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?(0,N.jsx)(Q.Box,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(0,N.jsx)(Q.Box,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:B.map(({comment:I,index:E})=>{let H=!!t&&I.author===t;return(0,N.jsxs)(Q.Box,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let u=r?.get(I.author)??"";return R?(0,N.jsx)(Q.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,N.jsx)(R,{name:I.author,src:u||void 0,size:44})}):(0,N.jsx)(Q.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,N.jsx)(Gt,{src:u,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Gn[0]},iconFontSize:24})})})(),(0,N.jsxs)(Q.Box,{sx:{flex:1,minWidth:0},children:[(0,N.jsxs)(Q.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[(0,N.jsx)(Q.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:I.author}),(0,N.jsx)(Q.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:I.time}),H?(0,N.jsx)(Q.Box,{sx:{ml:"auto"}}):(0,N.jsxs)(Q.Box,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[(0,N.jsx)(Tf,{kind:"like",reactions:I.likes,myAccountSeq:n,onToggle:()=>s?.(e,E,"like")}),(0,N.jsx)(Tf,{kind:"ack",reactions:I.acks,myAccountSeq:n,onToggle:()=>s?.(e,E,"ack")})]}),H?(0,N.jsxs)(Q.Box,{className:"taskbox-comment-actions",sx:{display:"flex",alignItems:"center",gap:.25,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",backgroundColor:"#fff",opacity:0,transition:"opacity 0.15s"},children:[(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>g({index:E,text:I.text,attachments:[...I.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:(0,N.jsx)(Sf.default,{sx:{fontSize:15}})}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:u=>x({anchorEl:u.currentTarget,index:E}),sx:{color:"#9a9a97"},children:(0,N.jsx)(Si.default,{sx:{fontSize:15}})})]}):null]}),d?.index===E?(0,N.jsxs)(Q.Box,{sx:{mt:.5},children:[(0,N.jsx)(Q.Box,{component:"textarea",autoFocus:!0,spellCheck:!1,value:d.text,onChange:u=>g({...d,text:u.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),(0,N.jsxs)(Q.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[d.attachments.map((u,y)=>{let k=()=>g({...d,attachments:d.attachments.filter((T,q)=>q!==y)});return va(u.name)&&u.uuid?(0,N.jsxs)(Q.Box,{sx:{position:"relative"},children:[(0,N.jsx)(Q.Box,{component:"img",src:P(u.uuid,{thumb:"md"}),alt:u.name,title:u.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:k,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,N.jsx)(Si.default,{sx:{fontSize:14}})})]},`kept-${u.uuid}-${y}`):(0,N.jsx)(Q.Chip,{size:"small",icon:(0,N.jsx)(nr.default,{sx:{fontSize:14}}),label:u.name,onDelete:k,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${u.uuid??u.name}-${y}`)}),d.files.map((u,y)=>{let k=()=>g({...d,files:d.files.filter((T,q)=>q!==y)});return va(u.name)?(0,N.jsxs)(Q.Box,{sx:{position:"relative"},children:[(0,N.jsx)(Q.Box,{component:"img",src:URL.createObjectURL(u),alt:u.name,title:`${u.name} (\uC0C8 \uD30C\uC77C)`,onLoad:T=>URL.revokeObjectURL(T.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:k,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,N.jsx)(Si.default,{sx:{fontSize:14}})})]},`new-${u.name}-${y}`):(0,N.jsx)(Q.Chip,{size:"small",icon:(0,N.jsx)(nr.default,{sx:{fontSize:14}}),label:`${u.name} (\uC0C8 \uD30C\uC77C)`,onDelete:k,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${u.name}-${y}`)}),(0,N.jsx)(Q.Tooltip,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>f.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:(0,N.jsx)(_f.default,{sx:{fontSize:20}})})})]}),(0,N.jsxs)(Q.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[(0,N.jsx)(Q.Button,{size:"small",color:"inherit",onClick:()=>g(null),children:"\uCDE8\uC18C"}),(0,N.jsx)(Q.Button,{size:"small",variant:"contained",disabled:!d.text.trim()&&d.attachments.length===0&&d.files.length===0,onClick:()=>{i(e,E,d.text,{attachments:d.attachments,files:d.files}),g(null)},children:"\uC800\uC7A5"})]}),(0,N.jsx)(Q.Box,{component:"input",type:"file",multiple:!0,ref:f,sx:{display:"none"},onChange:u=>{let y=Array.from(u.target.files??[]);y.length>0&&g({...d,files:[...d.files,...y].slice(0,10)}),u.target.value=""}})]}):(0,N.jsxs)(Q.Box,{children:[I.text?(0,N.jsx)(Q.Box,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:I.text}):null,(I.attachments??[]).length>0?(0,N.jsx)(Q.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(I.attachments??[]).map((u,y)=>{let k=!!u.uuid;if(va(u.name)&&k)return(0,N.jsx)(Q.Box,{component:"img",src:P(u.uuid??"",{thumb:"md"}),alt:u.name,title:`${u.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>S(u),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${u.name}-${y}`);let q=ha(u.name);return(0,N.jsx)(Q.Chip,{size:"small",icon:(0,N.jsx)(nr.default,{sx:{fontSize:14}}),label:`${u.name} (${es(u.size)})`,clickable:k,onClick:k?()=>q?S(u):D(u):void 0,title:k?`${u.name} ${q?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:u.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${u.name}-${y}`)})}):null]})]})]},`${I.time}-${E}`)})}),(0,N.jsx)(uo,{open:!!m,anchorEl:m?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>x(null),onConfirm:()=>{m&&(l(e,m.index),g(null)),x(null)}})]})}function va(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function ns({onSubmit:e}){let[o,t]=(0,Lt.useState)(""),[n,r]=(0,Lt.useState)([]),[i,l]=(0,Lt.useState)(!1),s=(0,Lt.useRef)(null),p=(0,Lt.useRef)(null),c=Ke(),d=m=>{let x=Array.from(m??[]);x.length!==0&&r(O=>[...O,...x].slice(0,10))},g=()=>{let m=o.trim();!m&&n.length===0||(e(m,n.length>0?n:void 0),t(""),r([]))},f=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>s.current?.click(),sx:{color:"#9a9a97"},children:(0,N.jsx)(nr.default,{sx:{fontSize:20}})}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>p.current?.click(),sx:{color:"#9a9a97"},children:(0,N.jsx)(wf.default,{sx:{fontSize:20}})})]});return(0,N.jsxs)(Q.Box,{children:[n.length>0?(0,N.jsx)(Q.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((m,x)=>va(m.name)?(0,N.jsxs)(Q.Box,{sx:{position:"relative"},children:[(0,N.jsx)(Q.Box,{component:"img",src:URL.createObjectURL(m),alt:m.name,title:m.name,onLoad:O=>URL.revokeObjectURL(O.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(O=>O.filter((v,h)=>h!==x)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,N.jsx)(Si.default,{sx:{fontSize:14}})})]},`${m.name}-${x}`):(0,N.jsx)(Q.Chip,{size:"small",icon:(0,N.jsx)(nr.default,{sx:{fontSize:14}}),label:`${m.name} (${es(m.size)})`,onDelete:()=>r(O=>O.filter((v,h)=>h!==x)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${x}`))}):null,(0,N.jsxs)(Q.Box,{sx:{position:"relative",display:"flex"},onDragOver:m=>{Array.from(m.dataTransfer?.types??[]).includes("Files")&&(m.preventDefault(),l(!0))},onDragLeave:m=>{m.currentTarget.contains(m.relatedTarget)||l(!1)},onDrop:m=>{Array.from(m.dataTransfer?.types??[]).includes("Files")&&(m.preventDefault(),l(!1),d(m.dataTransfer?.files??null))},children:[i?(0,N.jsxs)(Q.Box,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[(0,N.jsx)(nr.default,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,(0,N.jsx)(yf.TextField,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:m=>t(m.target.value),fullWidth:!0,multiline:!0,minRows:c?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:c?15:6.5,pb:c?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),c?(0,N.jsxs)(Q.Box,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[f,(0,N.jsx)(Q.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:g,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,N.jsx)(os.default,{sx:{fontSize:22}})})]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Q.Box,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:f}),(0,N.jsx)(Q.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:g,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,N.jsx)(os.default,{sx:{fontSize:22}})})]})]}),(0,N.jsx)(Q.Box,{component:"input",ref:s,type:"file",multiple:!0,onChange:m=>{d(m.target.files),m.target.value=""},sx:{display:"none"}}),(0,N.jsx)(Q.Box,{component:"input",ref:p,type:"file",accept:"image/*",multiple:!0,onChange:m=>{d(m.target.files),m.target.value=""},sx:{display:"none"}})]})}var _a=require("react"),wo=require("@mui/material"),qf=a(require("@mui/icons-material/Close"),1),Af=a(require("@mui/icons-material/ArrowBack"),1),Lf=a(require("@mui/icons-material/ShareOutlined"),1),Nf=a(require("@mui/icons-material/ContentCopyOutlined"),1),Ff=a(require("@mui/icons-material/CheckCircle"),1),Hf=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Wf=a(require("@mui/icons-material/HistoryOutlined"),1),$f=a(require("@mui/icons-material/PrintOutlined"),1);var Mf=require("react"),dt=require("@mui/material"),Ef=require("@ehfuse/mui-form-dialog"),Of=require("@ehfuse/overlay-scrollbar");var ot=require("react/jsx-runtime"),Zb={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 Df(e){return String(e??"").trim()||"\uC5C6\uC74C"}function Jb(e){if(e.kind!=="field")return Zb[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) "${Df(t)}" \u2192 "${Df(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Bi({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let l=Ke();(0,Mf.useEffect)(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let s=(0,ot.jsx)(dt.Box,{sx:{height:l?"100%":420,minHeight:0},children:(0,ot.jsx)(Of.OverlayScrollbar,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,ot.jsxs)(dt.Box,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[n&&!t?(0,ot.jsxs)(dt.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,ot.jsx)(dt.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?(0,ot.jsx)(dt.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(p=>(0,ot.jsxs)(dt.Box,{sx:{display:"flex",flexDirection:l?"column":"row",gap:l?.25:1,alignItems:l?"stretch":"baseline",minWidth:0,flexShrink:0,...l?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[(0,ot.jsx)(dt.Box,{sx:{flexShrink:0,...l?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Ct(p.acted_time)}),(0,ot.jsxs)(dt.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,ot.jsx)(dt.Box,{component:"span",sx:{fontWeight:500},children:String(p.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,ot.jsx)(dt.Box,{component:"span",sx:{ml:.5},children:Jb(p)})]})]},p.seq))]})})});return(0,ot.jsx)(Ef.FormDialog,{open:e,onClose:i,maxWidth:"sm",fullScreen:l,mobilePresentation:l?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:l?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${t&&t.length>0?` (${t.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:s}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:(0,ot.jsx)(dt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var Ia=require("@ehfuse/alerts");var Rf=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
8
+ `)}),p=e==="like"?"#e5484d":"#2f80ed";return(0,N.jsx)(Q.Tooltip,{title:s,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,N.jsxs)(Q.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[(0,N.jsx)(Q.IconButton,{size:"small","aria-label":`\uB313\uAE00 ${l}`,onClick:n,sx:{color:i?p:"#c9c8c5",p:.5},children:e==="like"?i?(0,N.jsx)(Bf.default,{sx:{fontSize:16}}):(0,N.jsx)(Cf.default,{sx:{fontSize:16}}):i?(0,N.jsx)(vf.default,{sx:{fontSize:16}}):(0,N.jsx)(If.default,{sx:{fontSize:16}})}),r.length>0?(0,N.jsx)(Q.Box,{component:"span",sx:{fontSize:12,color:i?p:"#9a9a97",ml:-.25},children:r.length}):null]})})}function ts({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:l,onToggleReaction:s,onPreview:p,onDownload:c}){let[d,g]=(0,Lt.useState)(null),f=(0,Lt.useRef)(null),[m,x]=(0,Lt.useState)(null),[O,v]=(0,Lt.useState)(!1),h=Math.max(0,o.length-Qb),b=h>0&&!O,w=d?Math.min(d.index,h):h,B=o.map((I,E)=>({comment:I,index:E})).slice(b?w:0),P=ur(),S=I=>{if(p){p(I);return}window.open(P(I.uuid??""),"_blank","noopener,noreferrer")},D=I=>{if(c){c(I);return}window.open(P(I.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},R=rt().slots?.avatar;return(0,N.jsxs)(Q.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,N.jsxs)(Q.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,N.jsx)(mn,{sx:{fontSize:18,display:"block",color:"#37352f"}}),(0,N.jsxs)(Q.Box,{sx:{fontSize:ga,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),h>0&&(!b||w>0)?(0,N.jsx)(Q.Box,{role:"button",tabIndex:0,onClick:()=>v(I=>!I),onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),v(E=>!E))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:b?`\uC774\uC804 \uB313\uAE00 ${w}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?(0,N.jsx)(Q.Box,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(0,N.jsx)(Q.Box,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:B.map(({comment:I,index:E})=>{let H=!!t&&I.author===t;return(0,N.jsxs)(Q.Box,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let u=r?.get(I.author)??"";return R?(0,N.jsx)(Q.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,N.jsx)(R,{name:I.author,src:u||void 0,size:44})}):(0,N.jsx)(Q.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,N.jsx)(Gt,{src:u,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Gn[0]},iconFontSize:24})})})(),(0,N.jsxs)(Q.Box,{sx:{flex:1,minWidth:0},children:[(0,N.jsxs)(Q.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[(0,N.jsx)(Q.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:I.author}),(0,N.jsx)(Q.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:I.time}),H?(0,N.jsx)(Q.Box,{sx:{ml:"auto"}}):(0,N.jsxs)(Q.Box,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[(0,N.jsx)(Tf,{kind:"like",reactions:I.likes,myAccountSeq:n,onToggle:()=>s?.(e,E,"like")}),(0,N.jsx)(Tf,{kind:"ack",reactions:I.acks,myAccountSeq:n,onToggle:()=>s?.(e,E,"ack")})]}),H?(0,N.jsxs)(Q.Box,{className:"taskbox-comment-actions",sx:{display:"flex",alignItems:"center",gap:.25,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",backgroundColor:"#fff",opacity:0,transition:"opacity 0.15s"},children:[(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>g({index:E,text:I.text,attachments:[...I.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:(0,N.jsx)(Sf.default,{sx:{fontSize:15}})}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:u=>x({anchorEl:u.currentTarget,index:E}),sx:{color:"#9a9a97"},children:(0,N.jsx)(Si.default,{sx:{fontSize:15}})})]}):null]}),d?.index===E?(0,N.jsxs)(Q.Box,{sx:{mt:.5},children:[(0,N.jsx)(Q.Box,{component:"textarea",autoFocus:!0,spellCheck:!1,value:d.text,onChange:u=>g({...d,text:u.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),(0,N.jsxs)(Q.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[d.attachments.map((u,y)=>{let k=()=>g({...d,attachments:d.attachments.filter((T,q)=>q!==y)});return va(u.name)&&u.uuid?(0,N.jsxs)(Q.Box,{sx:{position:"relative"},children:[(0,N.jsx)(Q.Box,{component:"img",src:P(u.uuid,{thumb:"md"}),alt:u.name,title:u.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:k,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,N.jsx)(Si.default,{sx:{fontSize:14}})})]},`kept-${u.uuid}-${y}`):(0,N.jsx)(Q.Chip,{size:"small",icon:(0,N.jsx)(nr.default,{sx:{fontSize:14}}),label:u.name,onDelete:k,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${u.uuid??u.name}-${y}`)}),d.files.map((u,y)=>{let k=()=>g({...d,files:d.files.filter((T,q)=>q!==y)});return va(u.name)?(0,N.jsxs)(Q.Box,{sx:{position:"relative"},children:[(0,N.jsx)(Q.Box,{component:"img",src:URL.createObjectURL(u),alt:u.name,title:`${u.name} (\uC0C8 \uD30C\uC77C)`,onLoad:T=>URL.revokeObjectURL(T.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:k,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,N.jsx)(Si.default,{sx:{fontSize:14}})})]},`new-${u.name}-${y}`):(0,N.jsx)(Q.Chip,{size:"small",icon:(0,N.jsx)(nr.default,{sx:{fontSize:14}}),label:`${u.name} (\uC0C8 \uD30C\uC77C)`,onDelete:k,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${u.name}-${y}`)}),(0,N.jsx)(Q.Tooltip,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>f.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:(0,N.jsx)(_f.default,{sx:{fontSize:20}})})})]}),(0,N.jsxs)(Q.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[(0,N.jsx)(Q.Button,{size:"small",color:"inherit",onClick:()=>g(null),children:"\uCDE8\uC18C"}),(0,N.jsx)(Q.Button,{size:"small",variant:"contained",disabled:!d.text.trim()&&d.attachments.length===0&&d.files.length===0,onClick:()=>{i(e,E,d.text,{attachments:d.attachments,files:d.files}),g(null)},children:"\uC800\uC7A5"})]}),(0,N.jsx)(Q.Box,{component:"input",type:"file",multiple:!0,ref:f,sx:{display:"none"},onChange:u=>{let y=Array.from(u.target.files??[]);y.length>0&&g({...d,files:[...d.files,...y].slice(0,10)}),u.target.value=""}})]}):(0,N.jsxs)(Q.Box,{children:[I.text?(0,N.jsx)(Q.Box,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:I.text}):null,(I.attachments??[]).length>0?(0,N.jsx)(Q.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(I.attachments??[]).map((u,y)=>{let k=!!u.uuid;if(va(u.name)&&k)return(0,N.jsx)(Q.Box,{component:"img",src:P(u.uuid??"",{thumb:"md"}),alt:u.name,title:`${u.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>S(u),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${u.name}-${y}`);let q=ha(u.name);return(0,N.jsx)(Q.Chip,{size:"small",icon:(0,N.jsx)(nr.default,{sx:{fontSize:14}}),label:`${u.name} (${es(u.size)})`,clickable:k,onClick:k?()=>q?S(u):D(u):void 0,title:k?`${u.name} ${q?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:u.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${u.name}-${y}`)})}):null]})]})]},`${I.time}-${E}`)})}),(0,N.jsx)(uo,{open:!!m,anchorEl:m?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>x(null),onConfirm:()=>{m&&(l(e,m.index),g(null)),x(null)}})]})}function va(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function ns({onSubmit:e}){let[o,t]=(0,Lt.useState)(""),[n,r]=(0,Lt.useState)([]),[i,l]=(0,Lt.useState)(!1),s=(0,Lt.useRef)(null),p=(0,Lt.useRef)(null),c=Ke(),d=m=>{let x=Array.from(m??[]);x.length!==0&&r(O=>[...O,...x].slice(0,10))},g=()=>{let m=o.trim();!m&&n.length===0||(e(m,n.length>0?n:void 0),t(""),r([]))},f=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>s.current?.click(),sx:{color:"#9a9a97"},children:(0,N.jsx)(nr.default,{sx:{fontSize:20}})}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>p.current?.click(),sx:{color:"#9a9a97"},children:(0,N.jsx)(wf.default,{sx:{fontSize:20}})})]});return(0,N.jsxs)(Q.Box,{children:[n.length>0?(0,N.jsx)(Q.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((m,x)=>va(m.name)?(0,N.jsxs)(Q.Box,{sx:{position:"relative"},children:[(0,N.jsx)(Q.Box,{component:"img",src:URL.createObjectURL(m),alt:m.name,title:m.name,onLoad:O=>URL.revokeObjectURL(O.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),(0,N.jsx)(Q.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(O=>O.filter((v,h)=>h!==x)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,N.jsx)(Si.default,{sx:{fontSize:14}})})]},`${m.name}-${x}`):(0,N.jsx)(Q.Chip,{size:"small",icon:(0,N.jsx)(nr.default,{sx:{fontSize:14}}),label:`${m.name} (${es(m.size)})`,onDelete:()=>r(O=>O.filter((v,h)=>h!==x)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${x}`))}):null,(0,N.jsxs)(Q.Box,{sx:{position:"relative",display:"flex"},onDragOver:m=>{Array.from(m.dataTransfer?.types??[]).includes("Files")&&(m.preventDefault(),l(!0))},onDragLeave:m=>{m.currentTarget.contains(m.relatedTarget)||l(!1)},onDrop:m=>{Array.from(m.dataTransfer?.types??[]).includes("Files")&&(m.preventDefault(),l(!1),d(m.dataTransfer?.files??null))},children:[i?(0,N.jsxs)(Q.Box,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[(0,N.jsx)(nr.default,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,(0,N.jsx)(yf.TextField,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:m=>t(m.target.value),fullWidth:!0,multiline:!0,minRows:c?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:c?15:6.5,pb:c?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),c?(0,N.jsxs)(Q.Box,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[f,(0,N.jsx)(Q.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:g,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,N.jsx)(os.default,{sx:{fontSize:22}})})]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Q.Box,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:f}),(0,N.jsx)(Q.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:g,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,N.jsx)(os.default,{sx:{fontSize:22}})})]})]}),(0,N.jsx)(Q.Box,{component:"input",ref:s,type:"file",multiple:!0,onChange:m=>{d(m.target.files),m.target.value=""},sx:{display:"none"}}),(0,N.jsx)(Q.Box,{component:"input",ref:p,type:"file",accept:"image/*",multiple:!0,onChange:m=>{d(m.target.files),m.target.value=""},sx:{display:"none"}})]})}var _a=require("react"),wo=require("@mui/material"),qf=a(require("@mui/icons-material/Close"),1),Af=a(require("@mui/icons-material/ArrowBack"),1),Lf=a(require("@mui/icons-material/ShareOutlined"),1),Nf=a(require("@mui/icons-material/ContentCopyOutlined"),1),Ff=a(require("@mui/icons-material/CheckCircle"),1),Hf=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Wf=a(require("@mui/icons-material/HistoryOutlined"),1),$f=a(require("@mui/icons-material/Print"),1);var Mf=require("react"),dt=require("@mui/material"),Ef=require("@ehfuse/mui-form-dialog"),Of=require("@ehfuse/overlay-scrollbar");var ot=require("react/jsx-runtime"),Zb={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 Df(e){return String(e??"").trim()||"\uC5C6\uC74C"}function Jb(e){if(e.kind!=="field")return Zb[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) "${Df(t)}" \u2192 "${Df(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Bi({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let l=Ke();(0,Mf.useEffect)(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let s=(0,ot.jsx)(dt.Box,{sx:{height:l?"100%":420,minHeight:0},children:(0,ot.jsx)(Of.OverlayScrollbar,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,ot.jsxs)(dt.Box,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[n&&!t?(0,ot.jsxs)(dt.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,ot.jsx)(dt.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?(0,ot.jsx)(dt.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(p=>(0,ot.jsxs)(dt.Box,{sx:{display:"flex",flexDirection:l?"column":"row",gap:l?.25:1,alignItems:l?"stretch":"baseline",minWidth:0,flexShrink:0,...l?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[(0,ot.jsx)(dt.Box,{sx:{flexShrink:0,...l?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Ct(p.acted_time)}),(0,ot.jsxs)(dt.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,ot.jsx)(dt.Box,{component:"span",sx:{fontWeight:500},children:String(p.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,ot.jsx)(dt.Box,{component:"span",sx:{ml:.5},children:Jb(p)})]})]},p.seq))]})})});return(0,ot.jsx)(Ef.FormDialog,{open:e,onClose:i,maxWidth:"sm",fullScreen:l,mobilePresentation:l?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:l?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${t&&t.length>0?` (${t.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:s}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:(0,ot.jsx)(dt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var Ia=require("@ehfuse/alerts");var Rf=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
9
9
  `).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
10
10
  `).replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&amp;/gi,"&").replace(/\n{3,}/g,`
11
11
 
12
12
  `).trim():"";function zf(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Rt(e.start_date),n=Rt(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=Xo(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=Rf(e.content);i&&o.push("",i);let l=String(e.note??"").trim();return l&&o.push("",`\uBE44\uACE0: ${l}`),o.join(`
13
- `)}function Pf(e){navigator.clipboard.writeText(e).then(()=>(0,Ia.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Ia.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 rr(e,o){let t=zf(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Pf(t)});return}Pf(t)}var ze=require("react/jsx-runtime");function rs({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1,activityItems:p,activityLoading:c,onLoadActivity:d,onPrint:g}){let f=Ke(),[m,x]=(0,_a.useState)(!1),[O,v]=(0,_a.useState)(null),[h,b]=(0,_a.useState)(null),w=Un(e.icon||(e.is_notice?Yo:e.is_event?"event":Ge)),B=!!e.is_notice,P=!!e.is_event,S=B&&o>0&&(e.author_account_seq??0)===o,D=!Vt(e,o),R=!P&&(B?S:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsxs)(wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,ze.jsx)(wo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,ze.jsx)(Af.default,{})}):null,R&&!s?(0,ze.jsx)(wo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Ct(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,ze.jsx)(wo.Checkbox,{checked:e.completed,icon:(0,ze.jsx)(Hf.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,ze.jsx)(Ff.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(I,E)=>t(e.seq,E),sx:{p:0}})}):null,s?null:(0,ze.jsx)(wo.Tooltip,{title:D?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{size:"small",onClick:D?void 0:I=>b(I.currentTarget),sx:{color:e.icon_color||(B?"#e5484d":"#1e3a8a")},children:(0,ze.jsx)(w,{sx:{fontSize:20}})})}),O!==null?(0,ze.jsx)(wo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:O,onChange:I=>v(I.target.value),onBlur:()=>{O.trim()&&O.trim()!==e.title&&n(e.seq,O.trim()),v(null)},onKeyDown:I=>{I.key==="Enter"&&I.target.blur(),I.key==="Escape"&&v(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,ze.jsx)(wo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B?"\uACF5\uC9C0":P?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,ze.jsx)(wo.Box,{onClick:D?void 0:()=>v(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:D?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),d?(0,ze.jsx)(wo.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>x(!0),sx:{color:"#6b7280"},children:(0,ze.jsx)(Wf.default,{sx:{fontSize:20}})})}):null,(0,ze.jsx)(wo.Tooltip,{title:f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>rr(e,f),sx:{color:"#6b7280"},children:f?(0,ze.jsx)(Lf.default,{sx:{fontSize:20}}):(0,ze.jsx)(Nf.default,{sx:{fontSize:20}})})}),g?(0,ze.jsx)(wo.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:(0,ze.jsx)($f.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,ze.jsx)(wo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,ze.jsx)(qf.default,{})}):null]}),(0,ze.jsx)(er,{anchorEl:h,value:e.icon||(B?Yo:""),color:e.icon_color||(B?"#e5484d":"#1e3a8a"),onSelect:I=>r(e.seq,I),onSelectColor:I=>i?.(e.seq,I),onClose:()=>b(null)}),(0,ze.jsx)(Bi,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:d,onClose:()=>x(!1)})]})}var en=require("react"),ce=require("@mui/material"),Zf=a(require("@mui/icons-material/ExpandLess"),1),Jf=a(require("@mui/icons-material/ExpandMore"),1),ex=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),ox=a(require("@mui/icons-material/Check"),1),tx=a(require("@mui/icons-material/DirectionsRunOutlined"),1),nx=a(require("@mui/icons-material/SpeedOutlined"),1),Ma=a(require("@mui/icons-material/CheckCircle"),1),rx=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ea=a(require("@mui/icons-material/CheckCircleOutlined"),1),cs=a(require("@mui/icons-material/AccessTimeOutlined"),1),ix=a(require("@mui/icons-material/AutorenewOutlined"),1),ax=a(require("@mui/icons-material/LabelOutlined"),1),lx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),sx=a(require("@mui/icons-material/SubjectOutlined"),1),cx=a(require("@mui/icons-material/StickyNote2Outlined"),1),mx=a(require("@mui/icons-material/PanToolAltOutlined"),1);var Kf=require("react"),Uf=require("@ehfuse/mui-form-controls"),Vf=require("react/jsx-runtime");function is({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,Kf.useState)(null);return(0,Vf.jsx)(Uf.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 An=require("react"),To=require("@mui/material"),jf=a(require("@mui/icons-material/AccountTreeOutlined"),1),Yf=a(require("@mui/icons-material/Add"),1),Xf=a(require("@mui/icons-material/Close"),1),Qf=a(require("@mui/icons-material/NextPlanOutlined"),1);function qn(e){return e.relations??[]}function eh(e,o,t){return qn(e).some(n=>n.type===t&&n.task_seq===o.seq)||qn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Gf(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function wa(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,x)=>{n.has(m)||n.set(m,new Set),n.has(x)||n.set(x,new Set),n.get(m).add(x),n.get(x).add(m)};for(let m of t.values())for(let x of qn(m))x.type==="follow_up"&&t.has(x.task_seq)&&r(m.seq,x.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let m=l.shift();for(let x of n.get(m)??[])i.has(x)||(i.add(x),l.push(x))}let s=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,x)=>Gf(m).localeCompare(Gf(x))),p=new Set;for(let m of qn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&qn(m).some(x=>x.type==="related"&&x.task_seq===e.seq)&&p.add(m.seq);let c=[...p].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),d=[...t.values()].filter(m=>m.seq!==e.seq&&qn(m).some(x=>x.type==="duplicate_of"&&x.task_seq===e.seq)),g=qn(e).find(m=>m.type==="duplicate_of")?.task_seq,f=g?t.get(g)??null:null;return{lineage:s,related:c,duplicates:d,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 as(e,o){return Da(e,o)>0}var he=require("react/jsx-runtime");function ls({item:e,caption:o,onOpen:t,onUnlink:n}){let r=co(e.icon||Ge);return(0,he.jsxs)(To.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,he.jsx)(To.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,he.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,he.jsxs)(To.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,he.jsx)(Ye,{option:Xo(e),small:!0}),n?(0,he.jsx)(To.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,he.jsx)(Xf.default,{sx:{fontSize:15}})}):null]})}function ss({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,p]=(0,An.useState)(!1),[c,d]=(0,An.useState)(null),[g,f]=(0,An.useState)(null),m=(0,An.useMemo)(()=>wa(e,o),[e,o]),x=m.lineage.length>=2,O=(0,An.useMemo)(()=>Da(e,o),[e,o]),v=(0,An.useMemo)(()=>{let b=new Set;for(let w of m.lineage)b.add(w.seq);for(let w of m.related)b.add(w.seq);for(let w of m.duplicates)b.add(w.seq);return m.duplicateOf&&b.add(m.duplicateOf.seq),[...b]},[m]),h=(b,w,B)=>{f({anchorEl:b,targetSeq:w,type:B})};return(0,he.jsxs)(kt,{icon:(0,he.jsx)(jf.default,{sx:{fontSize:19,display:"block"}}),title:(0,he.jsxs)(he.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",O>0?(0,he.jsx)(To.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:O}):null]}),titleExtra:t?null:(0,he.jsxs)(To.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,he.jsx)(To.Button,{size:"small",color:"inherit",startIcon:(0,he.jsx)(Qf.default,{sx:{fontSize:16}}),onClick:b=>d(b.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,he.jsx)(To.Button,{size:"small",color:"inherit",startIcon:(0,he.jsx)(Yf.default,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[x?(0,he.jsx)(To.Box,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((b,w)=>{let B=b.seq===e.seq,P=w===m.lineage.length-1;return(0,he.jsxs)(To.Box,{sx:{display:"flex",gap:1},children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,he.jsx)(To.Box,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":b.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),P?null:(0,he.jsx)(To.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,he.jsxs)(To.Box,{sx:{flex:1,minWidth:0,pb:P?0:.5},children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,he.jsxs)(To.Box,{component:"span",onClick:!B&&n?()=>n(b.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":b.completed?"#9a9a97":"#37352f",textDecoration:b.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),(0,he.jsx)(Ye,{option:Xo(b),small:!0})]}),(0,he.jsx)(To.Box,{sx:{fontSize:12,color:"#9a9a97"},children:b.completed&&b.completed_time?`${b.completed_time} \uC644\uB8CC`:b.created_time??""})]})]},b.seq)})}):null,m.duplicateOf?(0,he.jsx)(ls,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?b=>h(b.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(b=>(0,he.jsx)(ls,{item:b,caption:"\uC911\uBCF5",onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,b.seq,"duplicate_of"):void 0},`dup-${b.seq}`)),m.related.map(b=>(0,he.jsx)(ls,{item:b,onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,b.seq,"related"):void 0},`rel-${b.seq}`)),O===0?(0,he.jsx)(To.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,he.jsx)(gi,{open:s,task:e,tasks:o,excludeSeqs:v,onClose:()=>p(!1),onSubmit:(b,w)=>r(e.seq,b,w)}):null,(0,he.jsx)(uo,{open:!!c,anchorEl:c,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:()=>d(null),onConfirm:()=>{l?.(e.seq),d(null)}}),(0,he.jsx)(uo,{open:!!g,anchorEl:g?.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:()=>{g&&i?.(e.seq,g.targetSeq,g.type),f(null)}})]})}var _=require("react/jsx-runtime");function qr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,_.jsx)(ce.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function ms({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:p,onChangeDate:c,onChangeReminder:d,onMemberEdit:g,onChangePriority:f,onChangeEstimatedTime:m,onChangeEventTime:x,onChangeEventPlace:O,onChangeEventAddress:v,onChangeNote:h,onChangeContent:b,onChangeContentHeight:w,onAddChecklistItem:B,onToggleChecklistItem:P,onRemoveChecklistItem:S,onUpdateChecklistItem:D,onConvertChecklistToTask:R,onOpenChecklistTask:I,onLinkChecklistTask:E,resolveChecklistTask:H,relatedTasksPool:u,onOpenRelatedTask:y,onLinkRelatedTask:k,onUnlinkRelatedTask:T,onCreateFollowUpTask:q,onAddAttachments:F,onRemoveAttachment:ge,onPreview:xe,onDownload:we,onUpdateComment:ke,onRemoveComment:Ie,onToggleCommentReaction:De,currentUserName:Te="",myAccountSeq:ie=0,noticeAdmin:Ze=!1,hideProject:ro=!1,hideLabel:G=!1,showTitle:Y=!1,onChangeTitle:re,onToggleCompleted:C,onChangeIcon:W,onChangeIconColor:oe,employees:X=[],onAckConfirm:We,onRequestConfirm:io,onChangeBugField:bo,sprints:So=[],sprintProject:je=!1,hideSprint:Io=!1,onChangeSprint:ee,onChangeStoryPoints:M,onChangeResolution:Le,onClaimTask:K,onVerifyBug:Ae}){let[Bo,Go]=(0,en.useState)(null),[Cn,Wt]=(0,en.useState)(null),[xt,ln]=(0,en.useState)(null),[$t,yt]=(0,en.useState)(null),[ar,Fe]=(0,en.useState)(!1),L={[Dt]:ar?{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"}},[j,de]=(0,en.useState)(null),[be,_e]=(0,en.useState)(null),[so,Oo]=(0,en.useState)(null),[zo,No]=(0,en.useState)(null),$e=!!e.is_notice,ae=!!e.is_event,jo=!!e.is_bug,tt=!!K&&Qr(e,ie),vn=!!K&&Zr(e,ie),Ot=!!Ae&&jo&&!!e.completed&&ie>0&&(e.author_account_seq??0)===ie&&!(e.acks??[]).some(A=>A.account_seq===ie),qo=!Vt(e,ie),St=!e.is_event&&(e.is_notice?ie>0&&(e.author_account_seq??0)===ie:(e.author_account_seq??0)===ie||(e.manager_account_seq??0)===ie),$n=Un(e.icon||(e.is_notice?Yo:e.is_event?"event":Ge)),Nr=$e?!Xr(e,ie):qo,lr=tt||vn?(0,_.jsxs)(jn,{onClick:A=>No(A.currentTarget),children:[(0,_.jsx)(mx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Fr=$e?yi(e,X):"",gt=$e?Ql(e,X,ie):null,Ro=!$e&&!ae?ii(e,ie):null,sr=!!(Ro&&Ro.total>0||$e&&gt);return(0,_.jsxs)(_.Fragment,{children:[Y?(0,_.jsxs)(ce.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[St?(0,_.jsx)(ce.Checkbox,{checked:e.completed,icon:(0,_.jsx)(rx.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,_.jsx)(Ma.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(A,cr)=>{xt||ln({anchorEl:A.currentTarget,nextCompleted:cr})},sx:{p:0,mt:.25}}):null,(0,_.jsx)(ce.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:qo?void 0:A=>Wt(A.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||($e?"#e5484d":"#1e3a8a")},children:(0,_.jsx)($n,{sx:{fontSize:20}})}),(0,_.jsx)(ce.Box,{sx:{flex:1,minWidth:0},children:Bo!==null?(0,_.jsx)(ce.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:Bo,onChange:A=>Go(A.target.value),onBlur:()=>{Bo.trim()&&Bo.trim()!==e.title&&re(e.seq,Bo.trim()),Go(null)},onKeyDown:A=>{A.key==="Enter"&&A.target.blur(),A.key==="Escape"&&Go(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,_.jsx)(ce.Box,{onClick:()=>Go(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:!!xt,anchorEl:xt?.anchorEl??null,title:xt?.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:xt?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ln(null),onConfirm:()=>{xt&&C(e.seq,xt.nextCompleted),ln(null)}}),(0,_.jsx)(er,{anchorEl:Cn,value:e.icon||($e?Yo:""),color:e.icon_color||($e?"#e5484d":"#1e3a8a"),onSelect:A=>W(e.seq,A),onSelectColor:A=>oe?.(e.seq,A),onClose:()=>Wt(null)})]}):null,(0,_.jsxs)(ce.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Dt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,_.jsx)(pi,{hideProject:ro,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:!ae,notice:$e,event:ae,readOnly:qo,targetSummary:Fr,onChangeProject:A=>s(e.seq,A),onAddProject:p,onChangeStartDate:A=>c(e.seq,"start_date",A),onChangeDueDate:A=>c(e.seq,"due_date",A),onChangeReminder:A=>d(e.seq,A),onChangePriority:A=>f(e.seq,A),onChangeEstimatedTime:A=>m(e.seq,A),onChangeEventTime:A=>x?.(e.seq,A),onChangeEventPlace:A=>O?.(e.seq,A),onChangeEventAddress:A=>v?.(e.seq,A),onMemberEdit:A=>g(e,A),narrowCollapsedSx:L,reminderLocked:e.completed,managerAction:lr,leading:(0,_.jsxs)(_.Fragment,{children:[Ot||lr&&($e||ae)?(0,_.jsxs)(ce.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[$e||ae?lr:null,Ot?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Button,{variant:"contained",size:"large",onClick:()=>Ae?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,_.jsx)(ce.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>Ae?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,jo&&e.ticket_no?(0,_.jsx)(Ce,{icon:(0,_.jsx)(ex.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,_.jsx)(ce.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,ae?null:(0,_.jsx)(ce.Box,{sx:jo&&e.ticket_no||sr?void 0:{gridColumn:"1 / -1"},children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(ix.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:qo||e.completed?void 0:A=>de(A),children:(0,_.jsx)(Ye,{option:Xo(e)})})}),Ro&&Ro.total>0?(0,_.jsx)(ce.Box,{children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Ro.canConfirm?(0,_.jsx)(ce.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)(ce.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Ro.myTime?(0,_.jsx)(Ma.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>yt({anchorEl:A.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Ro.count," / ",Ro.total]})})}):null,$e&&gt?(0,_.jsx)(ce.Box,{children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,_.jsx)(ce.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:gt.canAck?(0,_.jsx)(ce.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)(ce.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:gt.acked?(0,_.jsx)(Ma.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>yt({anchorEl:A.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:gt.total>0&&gt.count>=gt.total?"\uC644\uB8CC":(0,_.jsxs)(_.Fragment,{children:[gt.count,(0,_.jsx)(ce.Box,{component:"span",sx:{mx:.4},children:"/"}),gt.total]})})})})}):null,je&&!Io&&!ae&&!$e?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ce,{icon:(0,_.jsx)(tx.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:qo?void 0:A=>_e(A),children:(e.sprint_seq??0)>0?So.find(A=>A.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,_.jsx)(qr,{label:"\uBBF8\uBC30\uC815"})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(nx.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,_.jsx)(Qt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:qo,onCommit:A=>M?.(e.seq,Number(A.replace(/[^0-9.]/g,""))||0)})})]}):null,ae||G?null:(0,_.jsx)(ce.Box,{sx:[{gridColumn:"1 / -1"},L??null],children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(ax.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:qo?void 0:A=>Oo(A),children:(e.label_keys??[]).length>0?(0,_.jsx)(cn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,_.jsx)(qr,{})})})]}),trailing:(0,_.jsxs)(_.Fragment,{children:[jo?(0,_.jsx)(fi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:qo,showResolution:!!e.completed,onChangeRepro:A=>bo?.(e.seq,"bug_repro",A),onChangeDevice:A=>bo?.(e.seq,"bug_device",A),onChangeWhere:A=>bo?.(e.seq,"bug_where",A),onChangeVersion:A=>bo?.(e.seq,"bug_version",A),onChangeResolution:A=>Le?.(e.seq,A)}):null,(0,_.jsx)(Ce,{icon:(0,_.jsx)(lx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[Ao(9),L??null],children:e.created_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Zo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,_.jsx)(qr,{})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(cs.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[Ao(11),L??null],children:e.created_time?Ct(e.created_time):(0,_.jsx)(qr,{})}),e.completed?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[Ao(10),L??null],children:e.completed_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Zo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,_.jsx)(qr,{})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(cs.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[Ao(12),L??null],children:e.completed_time?Ct(e.completed_time):(0,_.jsx)(qr,{})})]}):null]})}),(0,_.jsxs)(ce.Box,{sx:{display:"none",[Dt]:{display:"block",mt:1.5,mb:0}},children:[(0,_.jsx)(ce.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,_.jsx)(ce.ButtonBase,{onClick:()=>Fe(A=>!A),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:ar?(0,_.jsxs)(_.Fragment,{children:["\uC811\uAE30 ",(0,_.jsx)(Zf.default,{sx:{fontSize:18}})]}):(0,_.jsxs)(_.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,_.jsx)(Jf.default,{sx:{fontSize:18}})]})})]}),(0,_.jsxs)(ce.Box,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[Dt]:{mt:0,mb:1.25}}}),(0,_.jsx)(kt,{icon:(0,_.jsx)(sx.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,_.jsx)(ce.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(xi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:w?A=>w(e.seq,A):void 0,readOnly:qo,onChange:A=>b(e.seq,A)})})}),e.is_bug?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(kt,{icon:(0,_.jsx)(cx.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,_.jsx)(ce.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(is,{value:e.note,readOnly:Nr,onCommit:A=>h(e.seq,A)})})})]}),ae?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(bi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Nr,onAdd:B,onToggle:P,onRemove:S,onUpdate:D,onConvertToTask:R,onOpenLinkedTask:I,resolveLinkedTask:H,linkCandidates:u,linkBaseTask:e,onLinkExistingTask:E})]}),u&&!ae&&!$e&&as(e,u)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ss,{task:e,tasks:u,readOnly:qo,onOpenTask:y,onLink:k,onUnlink:T,onCreateFollowUp:q})]}):null,(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(hi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Nr,onAdd:F,onRemove:ge,onPreview:xe?A=>xe({...A,taskSeq:e.seq}):void 0,onDownload:we?A=>we({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ts,{taskSeq:e.seq,comments:e.comments??[],currentUserName:Te,myAccountSeq:ie,avatarSrcByName:n,onUpdate:ke,onRemove:Ie,onToggleReaction:De,onPreview:xe?A=>xe({...A,taskSeq:e.seq}):void 0,onDownload:we?A=>we({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(jr,{anchorEl:j,value:e.status,options:$e?gr:jo?_n:br,onSelect:A=>r(e.seq,A),onClose:()=>de(null)}),(0,_.jsx)(ce.Menu,{transitionDuration:0,anchorEl:be,open:!!be,onClose:()=>_e(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...So.filter(A=>`custom-${A.group_seq}`===String(e.tab_key??"")).map(A=>({seq:A.seq,label:ht(A)}))].map(A=>(0,_.jsxs)(ce.MenuItem,{onClick:()=>{ee?.(e.seq,A.seq),_e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[A.label,(e.sprint_seq??0)===A.seq?(0,_.jsx)(ox.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},A.seq))}),(0,_.jsx)(ri,{anchorEl:$t?.anchorEl??null,open:!!$t?.open,acks:e.acks??[],total:gt?.total??Ro?.total??0,avatarSrcByName:n,onRequestConfirm:io&&Ro&&Ro.count<Ro.total?()=>{io(e.seq),yt(A=>A?{...A,open:!1}:null)}:void 0,onClose:()=>yt(A=>A?{...A,open:!1}:null)}),(0,_.jsx)(Ti,{anchorEl:so,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:A=>i(e.seq,Vr(e.label_keys??[],A)),onAddLabel:l,onClose:()=>Oo(null)}),(0,_.jsx)(uo,{open:!!zo,anchorEl:zo,title:tt?"\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:()=>No(null),onConfirm:()=>{K?.(e.seq),No(null)}})]})}var vo=require("react/jsx-runtime");function oh(){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 th({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m,...x}){let O=Ke(),v=(0,hn.useRef)(null);o&&(v.current=o);let h=o??v.current,[b,w]=(0,hn.useState)(!1),[B,P]=(0,hn.useState)({}),S=Object.keys(B).length>0;(0,hn.useEffect)(()=>{P({})},[o?.seq,e]);let D=(0,hn.useRef)(null);if((0,hn.useEffect)(()=>{D.current?.scrollTo({top:0})},[o?.seq]),!h)return null;let R=O&&S?{...h,...B}:h,I=(k,T)=>{O?P(q=>({...q,...k})):T()},E=()=>{let k=B;P({});let T=h.seq,q=k.title===void 0?void 0:String(k.title).trim();if(r){let F={...k};q!==void 0&&(q?F.title=q:delete F.title),Object.keys(F).length>0&&r(T,F),(0,us.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}q&&s(T,q),k.icon!==void 0&&p(T,String(k.icon)),k.icon_color!==void 0&&c?.(T,String(k.icon_color)),k.status!==void 0&&x.onChangeStatus(T,k.status),k.label_keys!==void 0&&x.onChangeLabels(T,k.label_keys??[]),k.tab_key!==void 0&&x.onChangeProject(T,String(k.tab_key??"")),k.start_date!==void 0&&x.onChangeDate(T,"start_date",String(k.start_date??"")),k.due_date!==void 0&&x.onChangeDate(T,"due_date",String(k.due_date??"")),k.reminder!==void 0&&x.onChangeReminder(T,k.reminder),k.priority!==void 0&&x.onChangePriority(T,k.priority),k.estimated_time!==void 0&&x.onChangeEstimatedTime(T,String(k.estimated_time??"")),k.event_time!==void 0&&x.onChangeEventTime?.(T,String(k.event_time??"")),k.event_place!==void 0&&x.onChangeEventPlace?.(T,String(k.event_place??"")),k.event_address!==void 0&&x.onChangeEventAddress?.(T,String(k.event_address??"")),k.content!==void 0&&x.onChangeContent(T,String(k.content??"")),k.note!==void 0&&x.onChangeNote(T,String(k.note??"")),(0,us.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},H={...x,onChangeStatus:(k,T)=>I({status:T},()=>x.onChangeStatus(k,T)),onChangeLabels:(k,T)=>I({label_keys:T},()=>x.onChangeLabels(k,T)),onChangeProject:(k,T)=>I({tab_key:T},()=>x.onChangeProject(k,T)),onChangeDate:(k,T,q)=>I({[T]:q},()=>x.onChangeDate(k,T,q)),onChangeReminder:(k,T)=>I({reminder:T},()=>x.onChangeReminder(k,T)),onChangePriority:(k,T)=>I({priority:T},()=>x.onChangePriority(k,T)),onChangeEstimatedTime:(k,T)=>I({estimated_time:T},()=>x.onChangeEstimatedTime(k,T)),onChangeEventTime:(k,T)=>I({event_time:T},()=>x.onChangeEventTime?.(k,T)),onChangeEventPlace:(k,T)=>I({event_place:T},()=>x.onChangeEventPlace?.(k,T)),onChangeEventAddress:(k,T)=>I({event_address:T},()=>x.onChangeEventAddress?.(k,T)),onChangeContent:(k,T)=>I({content:T},()=>x.onChangeContent(k,T)),onChangeNote:(k,T)=>I({note:T},()=>x.onChangeNote(k,T))},u=(0,vo.jsx)(ms,{...H,task:R,myAccountSeq:i,onChangeTitle:(k,T)=>I({title:T},()=>s(k,T)),onToggleCompleted:l,onChangeIcon:(k,T)=>I({icon:T},()=>p(k,T)),onChangeIconColor:(k,T)=>I({icon_color:T},()=>c?.(k,T)),showTitle:O}),y=(0,vo.jsx)(ns,{onSubmit:(k,T)=>n(R.seq,k,T)},R.seq);return O?(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(fx.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:R.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":R.is_event?"\uC77C\uC815":R.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:m?{visible:!0,color:"#6b7280",onClick:()=>m(R)}:{visible:!1},share:{visible:!1},custom:[...f?[{icon:(0,vo.jsx)(dx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>w(!0)}]:[],{icon:(0,vo.jsx)(ux.default,{sx:{ml:f?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>rr(R,!0)},{icon:(0,vo.jsx)(Mt.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!S,onClick:S?E: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:y},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,vo.jsx)(Mt.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:u})}]},h.seq),(0,vo.jsx)(Bi,{open:b,taskSeq:R.seq,items:d,loading:g,onLoad:f,onClose:()=>w(!1)})]}):(0,vo.jsx)(Mt.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,vo.jsxs)(Mt.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,vo.jsx)(rs,{task:R,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m}),(0,vo.jsx)(Mt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,vo.jsx)(Mt.Box,{sx:{flex:1,minHeight:0},children:(0,vo.jsx)(px.default,{ref:D,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:u})}),(0,vo.jsx)(Mt.Divider,{sx:{borderColor:"#37352f"}}),(0,vo.jsx)(Mt.Box,{sx:{flexShrink:0},children:y})]})})}var on=require("react"),yo=require("@mui/material"),bx=require("@ehfuse/mui-form-dialog"),hx=a(require("@mui/icons-material/EditOutlined"),1),ds=require("@ehfuse/alerts"),kn=require("@ehfuse/mui-form-controls");var Oa="custom-";function xx(e){return e.startsWith(Oa)}function nh(e){return e>0?`${Oa}${e}`:""}function Ra(e){if(!xx(e))return 0;let o=Number(e.slice(Oa.length));return Number.isInteger(o)&&o>0?o:0}var Pe=require("react/jsx-runtime"),rh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function gx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function ih({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let p=o.filter(u=>u.useSprints&&!u.archived),[c,d]=(0,on.useState)(""),[g,f]=(0,on.useState)(""),[m,x]=(0,on.useState)(""),[O,v]=(0,on.useState)(""),[h,b]=(0,on.useState)(""),[w,B]=(0,on.useState)(!1),[P,S]=(0,on.useState)(0);(0,on.useEffect)(()=>{e&&(d(p.length===1?p[0].key:""),f(""),x(""),v(""),b(""),S(0))},[e]);let D=()=>{f(""),x(""),v(""),b(""),S(0)},R=u=>{S(u.seq),d(`custom-${u.group_seq}`),f(u.name),x(u.goal),v(u.start_date),b(u.end_date)},I=async()=>{let u=Ra(c);if(!u){(0,ds.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){(0,ds.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(P>0){i(P,{name:g.trim(),goal:m.trim(),start_date:O,end_date:h}),D();return}await r({group_seq:u,name:g.trim(),goal:m.trim(),start_date:O,end_date:h})&&D()}finally{B(!1)}},E=new Map(o.map(u=>[Ra(u.key),u.label])),H=(0,Pe.jsx)(yo.Box,{children:p.length===0?(0,Pe.jsx)(yo.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)(yo.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Pe.jsx)(kn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:p.map(u=>({value:u.key,label:u.label})),onChange:u=>d(String(u.target.value)),disabled:P>0}),(0,Pe.jsx)(kn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:u=>f(u.target.value)}),(0,Pe.jsx)(kn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:O,onChange:u=>v(u.target.value)}),(0,Pe.jsx)(kn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:u=>b(u.target.value)}),(0,Pe.jsx)(kn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:u=>x(u.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Pe.jsxs)(yo.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[P>0?(0,Pe.jsx)(yo.Button,{color:"inherit",onClick:D,disabled:w,children:"\uCDE8\uC18C"}):null,(0,Pe.jsx)(yo.Button,{variant:"contained",onClick:()=>{I()},disabled:w,children:P>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Pe.jsx)(yo.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Pe.jsx)(yo.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Pe.jsxs)(yo.Box,{sx:{minWidth:0},children:[(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Pe.jsx)(yo.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:u.name}),(0,Pe.jsx)(yo.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:E.get(u.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,Pe.jsxs)(yo.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[gx(u.start_date)," ~ ",gx(u.end_date)]})]}),u.goal?(0,Pe.jsx)(yo.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:u.goal}):null]}),(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Pe.jsx)(kn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:u.status,options:rh.map(y=>({value:y.value,label:y.label})),onChange:y=>l(u.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),(0,Pe.jsx)(yo.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>R(u),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Pe.jsx)(hx.default,{sx:{fontSize:18}})}),(0,Pe.jsx)(yo.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(u.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Pe.jsx)(pn,{style:{width:16,height:16}})})]})]},u.seq))})]})});return(0,Pe.jsx)(bx.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:H}],actions:{showCancelButton:!1,right:(0,Pe.jsx)(yo.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var ps=require("react"),He=require("@mui/material"),kx=require("@ehfuse/mui-form-dialog"),Tx=a(require("@mui/icons-material/OpenInNewOutlined"),1),yx=a(require("@mui/icons-material/EventOutlined"),1),Sx=require("@ehfuse/alerts");var ve=require("react/jsx-runtime");function ah({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,ps.useState)(""),[s,p]=(0,ps.useState)(!1),c=async()=>{let f=i.trim();if(f){p(!0);try{await t(f)&&l("")}finally{p(!1)}}},d=async f=>{await(0,Sx.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)},g=(0,ve.jsxs)(He.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,ve.jsxs)(He.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,ve.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,ve.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,ve.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,ve.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,ve.jsx)(He.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,m)=>(0,ve.jsxs)(He.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[(0,ve.jsx)(yx.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,ve.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,ve.jsx)(He.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{d(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,ve.jsx)(pn,{sx:{fontSize:18}})})]},f.seq))}):(0,ve.jsx)(He.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,ve.jsx)(He.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,ve.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,ve.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,ve.jsx)(He.Box,{children:(0,ve.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,ve.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,ve.jsx)(He.Box,{children:(0,ve.jsxs)(He.Box,{component:"span",children:[(0,ve.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,ve.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,ve.jsx)(He.Box,{children:(0,ve.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,ve.jsx)(He.Box,{children:(0,ve.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,ve.jsxs)(He.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,ve.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,ve.jsx)(He.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{c()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,ve.jsx)(kx.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:g}],actions:{showCancelButton:!1,left:(0,ve.jsx)(He.Button,{variant:"outlined",startIcon:(0,ve.jsx)(Tx.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,ve.jsx)(He.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var Po=require("@mui/material"),Bx=require("@ehfuse/mui-form-dialog"),Cx=a(require("@mui/icons-material/ContentCopyOutlined"),1),fs=a(require("@mui/icons-material/OpenInNewOutlined"),1),xs=require("@ehfuse/alerts"),qe=require("react/jsx-runtime");function vx(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function lh({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??vx,s=o.subscribed?l(o.token):"",p=()=>{navigator.clipboard.writeText(s).then(()=>(0,xs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,xs.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let g=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(g)}`,"_blank")},d=(0,qe.jsxs)(Po.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,qe.jsxs)(Po.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,qe.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,qe.jsxs)(Po.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,qe.jsx)("br",{}),(0,qe.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,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Po.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,qe.jsxs)(Po.Box,{sx:{display:"flex",gap:2},children:[(0,qe.jsx)(Po.Button,{variant:"outlined",startIcon:(0,qe.jsx)(Cx.default,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,qe.jsx)(Po.Button,{variant:"contained",startIcon:(0,qe.jsx)(fs.default,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,qe.jsxs)(Po.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,qe.jsx)(Po.Box,{children:(0,qe.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,qe.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,qe.jsx)(Po.Box,{children:(0,qe.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,qe.jsx)(Po.Box,{children:(0,qe.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,qe.jsx)(Po.Box,{children:(0,qe.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,qe.jsx)(Po.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,qe.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:d}],actions:{showCancelButton:!1,left:(0,qe.jsx)(Po.Button,{variant:"outlined",startIcon:(0,qe.jsx)(fs.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,qe.jsx)(Po.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var tn=require("react"),nn=require("@mui/material"),Ix=require("@ehfuse/mui-form-dialog"),_x=require("@ehfuse/mui-form-controls"),wx=require("@ehfuse/tree-view");var Vo=require("react/jsx-runtime");function Dx(e){return`${e.name}#${e.seq}`}function sh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function ch(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 mh(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 uh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Dx(e),renderLabel:(0,Vo.jsx)(nn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,Vo.jsx)(nn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Mx(e,o){let t=(e.groups??[]).map(r=>Mx(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>mh(r,o)).map(uh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function dh({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,tn.useState)(""),p=(0,tn.useMemo)(()=>e.map(d=>Mx(d,l.trim().toLowerCase())).filter(d=>d!==null),[e,l]),c=(0,tn.useMemo)(()=>o.filter(d=>t.includes(d.seq)).map(Dx),[]);return(0,Vo.jsxs)(Vo.Fragment,{children:[(0,Vo.jsx)(nn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Vo.jsx)(_x.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,Vo.jsx)(nn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,Vo.jsx)(wx.TreeView,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:d=>i(d.map(sh).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function ph({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 c=Ke(),[d,g]=(0,tn.useState)([]),[f,m]=(0,tn.useState)(0),x=(0,tn.useMemo)(()=>ch(n),[n]),O=i??[];(0,tn.useEffect)(()=>{e&&(g(O),m(h=>h+1))},[e]);let v=()=>{let h=x.filter(b=>d.includes(b.seq));s(r?h:h.slice(0,1)),p()};return(0,Vo.jsx)(Ix.FormDialog,{open:e,onClose:p,title:`${o}${r&&d.length>0?` (${d.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"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,Vo.jsx)(nn.Box,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:(0,Vo.jsx)(dh,{groups:n,allEmployees:x,initialSelectedSeqs:O,multiple:r,isMobile:c,onSelectionChange:g},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,Vo.jsx)(nn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,Vo.jsx)(nn.Button,{variant:"contained",onClick:v,children:l})}})}var Ar=require("react"),Ft=require("@mui/material"),Rx=require("@ehfuse/mui-form-dialog"),Px=require("@ehfuse/mui-form-controls");var Nt=require("@mui/material"),pt=require("react/jsx-runtime");function fh(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 gs({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((d,g)=>`${d.start_date}|${d.seq}`.localeCompare(`${g.start_date}|${g.seq}`)).map(d=>({sprint:d,...fh(d,o)})),i=r.some(d=>d.points>0),l=r.map(d=>i?d.points:d.count),s=Math.max(1,...l),p=r.filter(d=>d.sprint.status==="closed").map(d=>i?d.points:d.count),c=p.length>0?Math.round(p.reduce((d,g)=>d+g,0)/p.length*10)/10:null;return r.length===0?(0,pt.jsx)(Nt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,pt.jsxs)(Nt.Box,{children:[(0,pt.jsxs)(Nt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,pt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?(0,pt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,pt.jsx)(Nt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),(0,pt.jsx)(Nt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(d=>{let g=i?d.points:d.count,f=Math.round((t-24)*g/s),m=d.sprint.status==="closed";return(0,pt.jsxs)(Nt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,pt.jsx)(Nt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),(0,pt.jsx)(Nt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},d.sprint.seq)})}),(0,pt.jsx)(Nt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(d=>(0,pt.jsxs)(Nt.Box,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[d.sprint.name,d.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},d.sprint.seq))})]})}var Ox=require("react"),Ln=require("@mui/material"),Eo=require("react/jsx-runtime");function Ex(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function xh(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function bs(e){return e.slice(5).replace("-",".")}function hs({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,Ox.useMemo)(()=>{let h=Ex(e.start_date),b=Ex(e.end_date);if(!h||!b||b<h||Math.round((b.getTime()-h.getTime())/864e5)+1>366)return null;let B=o.filter(u=>u.sprint_seq===e.seq&&!u.archived);if(B.length===0)return{empty:!0};let P=B.some(u=>(u.story_points??0)>0),S=u=>P?u.story_points??0:1,D=B.reduce((u,y)=>u+S(y),0),R=new Map;for(let u of B){if(!u.completed)continue;let y=(u.completed_time??"").slice(0,10),k=/^\d{4}-\d{2}-\d{2}$/.test(y)?y:e.start_date;R.set(k,(R.get(k)??0)+S(u))}let I=[];for(let u=new Date(h);u<=b;u.setDate(u.getDate()+1))I.push(xh(u));let E=D,H=[];for(let u of I){if(u>t)break;E-=R.get(u)??0,H.push({day:u,value:Math.max(0,E)})}return{empty:!1,days:I,total:D,usePoints:P,actual:H}},[e,o,t]);if(!r)return(0,Eo.jsx)(Ln.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,Eo.jsx)(Ln.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,c=600,d=200,g=8,f=h=>i.length===1?0:h/(i.length-1)*c,m=h=>g+(d-g*2)*(1-h/Math.max(1,l)),x=`${f(0)},${m(l)} ${f(i.length-1)},${m(0)}`,O=p.map(h=>`${f(i.indexOf(h.day))},${m(h.value)}`).join(" "),v=p[p.length-1];return(0,Eo.jsxs)(Ln.Box,{children:[(0,Eo.jsxs)(Ln.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Eo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),v?(0,Eo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Eo.jsx)(Ln.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:v.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,Eo.jsx)(Ln.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,Eo.jsxs)("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,Eo.jsx)("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),(0,Eo.jsx)("polyline",{points:x,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?(0,Eo.jsx)("polyline",{points:O,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,v?(0,Eo.jsx)("circle",{cx:f(i.indexOf(v.day)),cy:m(v.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,Eo.jsxs)(Ln.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,Eo.jsx)("span",{children:bs(e.start_date)}),t>e.start_date&&t<e.end_date?(0,Eo.jsxs)("span",{children:["\uC624\uB298 ",bs(t)]}):null,(0,Eo.jsx)("span",{children:bs(e.end_date)})]})]})}var ft=require("react/jsx-runtime");function gh({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Ar.useState)(0);(0,Ar.useEffect)(()=>{if(!e)return;let d=o.find(f=>f.status==="active")??o[0],g=o.find(f=>f.seq===r)??d;s(g?.seq??0)},[e]);let p=(0,Ar.useMemo)(()=>o.find(d=>d.seq===l)??null,[o,l]),c=(0,ft.jsxs)(Ft.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,ft.jsxs)(Ft.Box,{sx:{px:3,py:2.5},children:[(0,ft.jsx)(Ft.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,ft.jsx)(gs,{sprints:o,tasks:t})]}),(0,ft.jsx)(Ft.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ft.jsxs)(Ft.Box,{sx:{px:3,py:2.5},children:[(0,ft.jsx)(Ft.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,ft.jsx)(Px.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(d=>({value:String(d.seq),label:ht(d)})),onChange:d=>s(Number(d.target.value)||0),sx:{width:280,mb:2}}),p?(0,ft.jsx)(hs,{sprint:p,tasks:t,todayStr:n}):(0,ft.jsx)(Ft.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,ft.jsx)(Rx.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:c}],actions:{showCancelButton:!1,right:(0,ft.jsx)(Ft.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var rn=require("@mui/material");var Tn=require("react/jsx-runtime");function bh({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,Tn.jsxs)(rn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,Tn.jsx)(rn.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,Tn.jsxs)(rn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,Tn.jsx)(rn.Checkbox,{size:"small",checked:p,sx:{p:0}}),(0,Tn.jsx)(Zo,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,Tn.jsx)(rn.Divider,{}),(0,Tn.jsx)(rn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var zx=require("react"),Lr=require("@mui/material"),qx=a(require("@mui/icons-material/KeyboardArrowDown"),1),Ax=a(require("@mui/icons-material/Check"),1);var an=require("react/jsx-runtime");function hh({value:e,onChange:o,options:t}){let[n,r]=(0,zx.useState)(null),i=t??Fi,l=Fi.find(s=>s.value===e)?.label??"";return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsxs)(Lr.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,an.jsx)(qx.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,an.jsx)(Lr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,an.jsxs)(Lr.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,an.jsx)(Ax.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var ir=require("@mui/material"),ks=require("@ehfuse/mui-form-controls");function Nn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Ci(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function kh(e=new Date){return{fromDate:Nn(Ci(1,e)),toDate:Nn(e)}}var yn=require("react/jsx-runtime"),Th=[{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 Ts({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Nn(Ci(i)),Nn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Nn(Ci(i))&&o===Nn(new Date);return(0,yn.jsxs)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,yn.jsx)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:Th.map(i=>{let l=r(i.months);return(0,yn.jsx)(ir.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,yn.jsxs)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,yn.jsx)(ks.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,yn.jsx)(ir.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,yn.jsx)(ks.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Lx=require("@mui/material");var ys=require("react/jsx-runtime");function yh({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,ys.jsx)(Lx.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,ys.jsx)(Ts,{fromDate:o,toDate:t,onChange:n})})}var Fn=require("@mui/material"),Fx=a(require("@mui/icons-material/Checklist"),1),Hx=a(require("@mui/icons-material/Face"),1),Wx=a(require("@mui/icons-material/Publish"),1),$x=a(require("@mui/icons-material/NotificationsOutlined"),1),Kx=a(require("@mui/icons-material/BugReportOutlined"),1),Ux=a(require("@mui/icons-material/DescriptionOutlined"),1),Vx=a(require("@mui/icons-material/Inventory2Outlined"),1);var Et=require("react/jsx-runtime");function Nx(e,o){return o>0?`${e} (${o})`:e}var Sh=[{id:"my",label:"\uC804\uCCB4",icon:(0,Et.jsx)(Fx.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Et.jsx)($x.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Et.jsx)(Hx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Et.jsx)(Wx.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Et.jsx)(Kx.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Et.jsx)(Vx.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Et.jsx)(Ux.default,{sx:{fontSize:18}}),hideCount:!0}];function Bh(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 Ch({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=se(),l=Bh(i.tabs),s=e;return r?(0,Et.jsx)(Fn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(p=>{let c=o===p.id;return(0,Et.jsx)(Fn.ButtonBase,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:nt(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:Nx(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):(0,Et.jsx)(Fn.Tabs,{value:o,onChange:(p,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(p=>(0,Et.jsx)(Fn.Tab,{value:p.id,label:Nx(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:l},p.id))})}var Hn=require("react"),ye=require("@mui/material"),Gx=a(require("@mui/icons-material/OpenInNewOutlined"),1),jx=a(require("@mui/icons-material/Check"),1),Yx=a(require("@mui/icons-material/CheckCircleOutlined"),1),Xx=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Qx=a(require("@mui/icons-material/SendOutlined"),1),Zx=a(require("@mui/icons-material/EventOutlined"),1),Jx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),eg=a(require("@mui/icons-material/ViewKanbanOutlined"),1),og=a(require("@mui/icons-material/ContentCopyOutlined"),1),tg=a(require("@mui/icons-material/NextPlanOutlined"),1),ng=a(require("@mui/icons-material/ContentPasteOutlined"),1),rg=a(require("@mui/icons-material/ShareOutlined"),1),ig=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Ss=a(require("@mui/icons-material/ChevronRight"),1),ag=a(require("@mui/icons-material/ArchiveOutlined"),1),lg=a(require("@mui/icons-material/UnarchiveOutlined"),1),sg=require("@ehfuse/alerts");var J=require("react/jsx-runtime");function vh({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:p,onChangeReminder:c,onMemberEdit:d,onMoveProject:g,onDuplicate:f,onCreateFollowUp:m,onShare:x,onAssignSprint:O,onArchiveToggle:v,onDelete:h}){let b=Ke(),w=Ut(),[B,P]=(0,Hn.useState)(null),[S,D]=(0,Hn.useState)(null),[R,I]=(0,Hn.useState)(null);(0,Hn.useEffect)(()=>{e||(P(null),D(null),I(null))},[e]);let E=e?.task??null,H=!!E?.is_notice,u=!!E?.is_event,y=E?!Vt(E,r):!1,k=(0,Hn.useMemo)(()=>new Set(t.filter(F=>F.useSprints).map(F=>F.key)),[t]),T=async()=>{let F=E;if(o(),!F)return;await(0,sg.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${F.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(F.seq)},q=()=>{E&&v(E.seq,!E.archived),o()};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(ye.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:b?"none":"anchorPosition",anchorPosition:!b&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...b?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:b?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&i(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Gx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,J.jsxs)(ye.MenuItem,{disabled:H?(E?.author_account_seq??0)!==r:(E?.author_account_seq??0)!==r&&(E?.manager_account_seq??0)!==r,onClick:()=>{E&&l(E.seq,!E.completed),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:E?.completed?(0,J.jsx)(Xx.default,{sx:{fontSize:19}}):(0,J.jsx)(Yx.default,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!H&&s?(0,J.jsxs)(ye.MenuItem,{disabled:!(E?.manager_account_seq??0)&&(E?.receiver_account_seqs??[]).length===0,onClick:()=>{E&&s(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,u?null:(0,J.jsx)(ye.Divider,{}),u?null:(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:F=>{E&&P({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Zx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!H&&!u&&d?(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&d(E,"manager"),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Jx.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,u?null:(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:F=>{E&&D({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(eg.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,J.jsx)(Ss.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,J.jsx)(ye.Divider,{}),f?(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:()=>{E&&f(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(og.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(tg.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&(x?x(E):rr(E,b)),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:b?(0,J.jsx)(rg.default,{sx:{fontSize:19}}):(0,J.jsx)(ng.default,{sx:{fontSize:19}})}),b?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),E&&!E.is_notice&&!E.is_event&&k.has(String(E.tab_key??""))&&O?(0,J.jsxs)(ye.MenuItem,{onClick:F=>I(F.currentTarget),sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(ig.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,J.jsx)(Ss.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,J.jsxs)(ye.MenuItem,{onClick:q,disabled:y||!E?.archived&&!(E&&Kr(E)),sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:E?.archived?(0,J.jsx)(lg.default,{sx:{fontSize:19}}):(0,J.jsx)(ag.default,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,J.jsx)(ye.Divider,{}),(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:T,sx:{fontSize:14,color:"#e5484d"},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(pn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),(0,J.jsx)(dn,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:b,onClose:()=>{P(null),o()},onDateChange:F=>{B&&p(B.task.seq,F)},onReminderChange:F=>{B&&c?.(B.task.seq,F)}}),(0,J.jsxs)(ye.Menu,{transitionDuration:0,anchorEl:S?.anchorEl??null,open:!!S,onClose:()=>{D(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...w,children:[(0,J.jsx)(ye.MenuItem,{selected:!S?.task.tab_key,onClick:()=>{S&&g(S.task.seq,""),D(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(F=>!F.archived).map(F=>(0,J.jsx)(ye.MenuItem,{selected:S?.task.tab_key===F.key,onClick:()=>{S&&g(S.task.seq,F.key),D(null),o()},sx:{fontSize:14,minWidth:170},children:F.label},F.key))]}),(0,J.jsx)(ye.Menu,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>I(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(F=>`custom-${F.group_seq}`===String(E?.tab_key??"")).map(F=>({seq:F.seq,label:ht(F)}))].map(F=>(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&O?.(E.seq,F.seq),I(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[F.label,(E?.sprint_seq??0)===F.seq?(0,J.jsx)(jx.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},F.seq))})]})}var Sn=require("@mui/material");var Wn=require("react/jsx-runtime");function Ih({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,Wn.jsxs)(Sn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,Wn.jsxs)(Sn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Wn.jsx)(Sn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,Wn.jsx)(Ye,{option:l})]},l.key)}),(0,Wn.jsx)(Sn.Divider,{}),(0,Wn.jsx)(Sn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Bn=require("@mui/material"),cg=a(require("@mui/icons-material/Check"),1),mg=a(require("@mui/icons-material/BarChartOutlined"),1),ug=a(require("@mui/icons-material/SettingsOutlined"),1);var Ht=require("react/jsx-runtime");function _h(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,Ht.jsxs)(Bn.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:ht(p)}))].map(p=>(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{r(p.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?(0,Ht.jsx)(cg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),(0,Ht.jsx)(Bn.Divider,{}),l?(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,Ht.jsx)(mg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,Ht.jsx)(Bn.Divider,{}):null,(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,Ht.jsx)(ug.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var wh={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function pg(e){return wh[e]??"tasks"}var Dh={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"},dg=["list","calendar","month","card","kanban","sprint","timeline"],Mh=["list","card"];function Eh(e){let o=pg(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:dg,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:Mh,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:dg,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 Pf(e){navigator.clipboard.writeText(e).then(()=>(0,Ia.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Ia.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 rr(e,o){let t=zf(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Pf(t)});return}Pf(t)}var ze=require("react/jsx-runtime");function rs({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1,activityItems:p,activityLoading:c,onLoadActivity:d,onPrint:g}){let f=Ke(),[m,x]=(0,_a.useState)(!1),[O,v]=(0,_a.useState)(null),[h,b]=(0,_a.useState)(null),w=Un(e.icon||(e.is_notice?Yo:e.is_event?"event":Ge)),B=!!e.is_notice,P=!!e.is_event,S=B&&o>0&&(e.author_account_seq??0)===o,D=!Vt(e,o),R=!P&&(B?S:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsxs)(wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,ze.jsx)(wo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,ze.jsx)(Af.default,{})}):null,R&&!s?(0,ze.jsx)(wo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Ct(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,ze.jsx)(wo.Checkbox,{checked:e.completed,icon:(0,ze.jsx)(Hf.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,ze.jsx)(Ff.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(I,E)=>t(e.seq,E),sx:{p:0}})}):null,s?null:(0,ze.jsx)(wo.Tooltip,{title:D?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{size:"small",onClick:D?void 0:I=>b(I.currentTarget),sx:{color:e.icon_color||(B?"#e5484d":"#1e3a8a")},children:(0,ze.jsx)(w,{sx:{fontSize:20}})})}),O!==null?(0,ze.jsx)(wo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:O,onChange:I=>v(I.target.value),onBlur:()=>{O.trim()&&O.trim()!==e.title&&n(e.seq,O.trim()),v(null)},onKeyDown:I=>{I.key==="Enter"&&I.target.blur(),I.key==="Escape"&&v(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,ze.jsx)(wo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B?"\uACF5\uC9C0":P?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,ze.jsx)(wo.Box,{onClick:D?void 0:()=>v(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:D?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),d?(0,ze.jsx)(wo.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>x(!0),sx:{color:"#6b7280"},children:(0,ze.jsx)(Wf.default,{sx:{fontSize:20}})})}):null,(0,ze.jsx)(wo.Tooltip,{title:f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>rr(e,f),sx:{color:"#6b7280"},children:f?(0,ze.jsx)(Lf.default,{sx:{fontSize:20}}):(0,ze.jsx)(Nf.default,{sx:{fontSize:20}})})}),g?(0,ze.jsx)(wo.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:(0,ze.jsx)($f.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,ze.jsx)(wo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,ze.jsx)(qf.default,{})}):null]}),(0,ze.jsx)(er,{anchorEl:h,value:e.icon||(B?Yo:""),color:e.icon_color||(B?"#e5484d":"#1e3a8a"),onSelect:I=>r(e.seq,I),onSelectColor:I=>i?.(e.seq,I),onClose:()=>b(null)}),(0,ze.jsx)(Bi,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:d,onClose:()=>x(!1)})]})}var en=require("react"),ce=require("@mui/material"),Zf=a(require("@mui/icons-material/ExpandLess"),1),Jf=a(require("@mui/icons-material/ExpandMore"),1),ex=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),ox=a(require("@mui/icons-material/Check"),1),tx=a(require("@mui/icons-material/DirectionsRunOutlined"),1),nx=a(require("@mui/icons-material/SpeedOutlined"),1),Ma=a(require("@mui/icons-material/CheckCircle"),1),rx=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ea=a(require("@mui/icons-material/CheckCircleOutlined"),1),cs=a(require("@mui/icons-material/AccessTimeOutlined"),1),ix=a(require("@mui/icons-material/AutorenewOutlined"),1),ax=a(require("@mui/icons-material/LabelOutlined"),1),lx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),sx=a(require("@mui/icons-material/SubjectOutlined"),1),cx=a(require("@mui/icons-material/StickyNote2Outlined"),1),mx=a(require("@mui/icons-material/PanToolAltOutlined"),1);var Kf=require("react"),Uf=require("@ehfuse/mui-form-controls"),Vf=require("react/jsx-runtime");function is({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,Kf.useState)(null);return(0,Vf.jsx)(Uf.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 An=require("react"),To=require("@mui/material"),jf=a(require("@mui/icons-material/AccountTreeOutlined"),1),Yf=a(require("@mui/icons-material/Add"),1),Xf=a(require("@mui/icons-material/Close"),1),Qf=a(require("@mui/icons-material/NextPlanOutlined"),1);function qn(e){return e.relations??[]}function eh(e,o,t){return qn(e).some(n=>n.type===t&&n.task_seq===o.seq)||qn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Gf(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function wa(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,x)=>{n.has(m)||n.set(m,new Set),n.has(x)||n.set(x,new Set),n.get(m).add(x),n.get(x).add(m)};for(let m of t.values())for(let x of qn(m))x.type==="follow_up"&&t.has(x.task_seq)&&r(m.seq,x.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let m=l.shift();for(let x of n.get(m)??[])i.has(x)||(i.add(x),l.push(x))}let s=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,x)=>Gf(m).localeCompare(Gf(x))),p=new Set;for(let m of qn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&qn(m).some(x=>x.type==="related"&&x.task_seq===e.seq)&&p.add(m.seq);let c=[...p].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),d=[...t.values()].filter(m=>m.seq!==e.seq&&qn(m).some(x=>x.type==="duplicate_of"&&x.task_seq===e.seq)),g=qn(e).find(m=>m.type==="duplicate_of")?.task_seq,f=g?t.get(g)??null:null;return{lineage:s,related:c,duplicates:d,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 as(e,o){return Da(e,o)>0}var he=require("react/jsx-runtime");function ls({item:e,caption:o,onOpen:t,onUnlink:n}){let r=co(e.icon||Ge);return(0,he.jsxs)(To.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,he.jsx)(To.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,he.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,he.jsxs)(To.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,he.jsx)(Ye,{option:Xo(e),small:!0}),n?(0,he.jsx)(To.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,he.jsx)(Xf.default,{sx:{fontSize:15}})}):null]})}function ss({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,p]=(0,An.useState)(!1),[c,d]=(0,An.useState)(null),[g,f]=(0,An.useState)(null),m=(0,An.useMemo)(()=>wa(e,o),[e,o]),x=m.lineage.length>=2,O=(0,An.useMemo)(()=>Da(e,o),[e,o]),v=(0,An.useMemo)(()=>{let b=new Set;for(let w of m.lineage)b.add(w.seq);for(let w of m.related)b.add(w.seq);for(let w of m.duplicates)b.add(w.seq);return m.duplicateOf&&b.add(m.duplicateOf.seq),[...b]},[m]),h=(b,w,B)=>{f({anchorEl:b,targetSeq:w,type:B})};return(0,he.jsxs)(kt,{icon:(0,he.jsx)(jf.default,{sx:{fontSize:19,display:"block"}}),title:(0,he.jsxs)(he.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",O>0?(0,he.jsx)(To.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:O}):null]}),titleExtra:t?null:(0,he.jsxs)(To.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,he.jsx)(To.Button,{size:"small",color:"inherit",startIcon:(0,he.jsx)(Qf.default,{sx:{fontSize:16}}),onClick:b=>d(b.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,he.jsx)(To.Button,{size:"small",color:"inherit",startIcon:(0,he.jsx)(Yf.default,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[x?(0,he.jsx)(To.Box,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((b,w)=>{let B=b.seq===e.seq,P=w===m.lineage.length-1;return(0,he.jsxs)(To.Box,{sx:{display:"flex",gap:1},children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,he.jsx)(To.Box,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":b.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),P?null:(0,he.jsx)(To.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,he.jsxs)(To.Box,{sx:{flex:1,minWidth:0,pb:P?0:.5},children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,he.jsxs)(To.Box,{component:"span",onClick:!B&&n?()=>n(b.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":b.completed?"#9a9a97":"#37352f",textDecoration:b.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),(0,he.jsx)(Ye,{option:Xo(b),small:!0})]}),(0,he.jsx)(To.Box,{sx:{fontSize:12,color:"#9a9a97"},children:b.completed&&b.completed_time?`${b.completed_time} \uC644\uB8CC`:b.created_time??""})]})]},b.seq)})}):null,m.duplicateOf?(0,he.jsx)(ls,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?b=>h(b.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(b=>(0,he.jsx)(ls,{item:b,caption:"\uC911\uBCF5",onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,b.seq,"duplicate_of"):void 0},`dup-${b.seq}`)),m.related.map(b=>(0,he.jsx)(ls,{item:b,onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,b.seq,"related"):void 0},`rel-${b.seq}`)),O===0?(0,he.jsx)(To.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,he.jsx)(gi,{open:s,task:e,tasks:o,excludeSeqs:v,onClose:()=>p(!1),onSubmit:(b,w)=>r(e.seq,b,w)}):null,(0,he.jsx)(uo,{open:!!c,anchorEl:c,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:()=>d(null),onConfirm:()=>{l?.(e.seq),d(null)}}),(0,he.jsx)(uo,{open:!!g,anchorEl:g?.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:()=>{g&&i?.(e.seq,g.targetSeq,g.type),f(null)}})]})}var _=require("react/jsx-runtime");function qr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,_.jsx)(ce.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function ms({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:p,onChangeDate:c,onChangeReminder:d,onMemberEdit:g,onChangePriority:f,onChangeEstimatedTime:m,onChangeEventTime:x,onChangeEventPlace:O,onChangeEventAddress:v,onChangeNote:h,onChangeContent:b,onChangeContentHeight:w,onAddChecklistItem:B,onToggleChecklistItem:P,onRemoveChecklistItem:S,onUpdateChecklistItem:D,onConvertChecklistToTask:R,onOpenChecklistTask:I,onLinkChecklistTask:E,resolveChecklistTask:H,relatedTasksPool:u,onOpenRelatedTask:y,onLinkRelatedTask:k,onUnlinkRelatedTask:T,onCreateFollowUpTask:q,onAddAttachments:F,onRemoveAttachment:ge,onPreview:xe,onDownload:we,onUpdateComment:ke,onRemoveComment:Ie,onToggleCommentReaction:De,currentUserName:Te="",myAccountSeq:ie=0,noticeAdmin:Ze=!1,hideProject:ro=!1,hideLabel:G=!1,showTitle:Y=!1,onChangeTitle:re,onToggleCompleted:C,onChangeIcon:W,onChangeIconColor:oe,employees:X=[],onAckConfirm:We,onRequestConfirm:io,onChangeBugField:bo,sprints:So=[],sprintProject:je=!1,hideSprint:Io=!1,onChangeSprint:ee,onChangeStoryPoints:M,onChangeResolution:Le,onClaimTask:K,onVerifyBug:Ae}){let[Bo,Go]=(0,en.useState)(null),[Cn,Wt]=(0,en.useState)(null),[xt,ln]=(0,en.useState)(null),[$t,yt]=(0,en.useState)(null),[ar,Fe]=(0,en.useState)(!1),L={[Dt]:ar?{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"}},[j,de]=(0,en.useState)(null),[be,_e]=(0,en.useState)(null),[so,Oo]=(0,en.useState)(null),[zo,No]=(0,en.useState)(null),$e=!!e.is_notice,ae=!!e.is_event,jo=!!e.is_bug,tt=!!K&&Qr(e,ie),vn=!!K&&Zr(e,ie),Ot=!!Ae&&jo&&!!e.completed&&ie>0&&(e.author_account_seq??0)===ie&&!(e.acks??[]).some(A=>A.account_seq===ie),qo=!Vt(e,ie),St=!e.is_event&&(e.is_notice?ie>0&&(e.author_account_seq??0)===ie:(e.author_account_seq??0)===ie||(e.manager_account_seq??0)===ie),$n=Un(e.icon||(e.is_notice?Yo:e.is_event?"event":Ge)),Nr=$e?!Xr(e,ie):qo,lr=tt||vn?(0,_.jsxs)(jn,{onClick:A=>No(A.currentTarget),children:[(0,_.jsx)(mx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Fr=$e?yi(e,X):"",gt=$e?Ql(e,X,ie):null,Ro=!$e&&!ae?ii(e,ie):null,sr=!!(Ro&&Ro.total>0||$e&&gt);return(0,_.jsxs)(_.Fragment,{children:[Y?(0,_.jsxs)(ce.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[St?(0,_.jsx)(ce.Checkbox,{checked:e.completed,icon:(0,_.jsx)(rx.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,_.jsx)(Ma.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(A,cr)=>{xt||ln({anchorEl:A.currentTarget,nextCompleted:cr})},sx:{p:0,mt:.25}}):null,(0,_.jsx)(ce.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:qo?void 0:A=>Wt(A.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||($e?"#e5484d":"#1e3a8a")},children:(0,_.jsx)($n,{sx:{fontSize:20}})}),(0,_.jsx)(ce.Box,{sx:{flex:1,minWidth:0},children:Bo!==null?(0,_.jsx)(ce.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:Bo,onChange:A=>Go(A.target.value),onBlur:()=>{Bo.trim()&&Bo.trim()!==e.title&&re(e.seq,Bo.trim()),Go(null)},onKeyDown:A=>{A.key==="Enter"&&A.target.blur(),A.key==="Escape"&&Go(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,_.jsx)(ce.Box,{onClick:()=>Go(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:!!xt,anchorEl:xt?.anchorEl??null,title:xt?.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:xt?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ln(null),onConfirm:()=>{xt&&C(e.seq,xt.nextCompleted),ln(null)}}),(0,_.jsx)(er,{anchorEl:Cn,value:e.icon||($e?Yo:""),color:e.icon_color||($e?"#e5484d":"#1e3a8a"),onSelect:A=>W(e.seq,A),onSelectColor:A=>oe?.(e.seq,A),onClose:()=>Wt(null)})]}):null,(0,_.jsxs)(ce.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Dt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,_.jsx)(pi,{hideProject:ro,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:!ae,notice:$e,event:ae,readOnly:qo,targetSummary:Fr,onChangeProject:A=>s(e.seq,A),onAddProject:p,onChangeStartDate:A=>c(e.seq,"start_date",A),onChangeDueDate:A=>c(e.seq,"due_date",A),onChangeReminder:A=>d(e.seq,A),onChangePriority:A=>f(e.seq,A),onChangeEstimatedTime:A=>m(e.seq,A),onChangeEventTime:A=>x?.(e.seq,A),onChangeEventPlace:A=>O?.(e.seq,A),onChangeEventAddress:A=>v?.(e.seq,A),onMemberEdit:A=>g(e,A),narrowCollapsedSx:L,reminderLocked:e.completed,managerAction:lr,leading:(0,_.jsxs)(_.Fragment,{children:[Ot||lr&&($e||ae)?(0,_.jsxs)(ce.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[$e||ae?lr:null,Ot?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Button,{variant:"contained",size:"large",onClick:()=>Ae?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,_.jsx)(ce.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>Ae?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,jo&&e.ticket_no?(0,_.jsx)(Ce,{icon:(0,_.jsx)(ex.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,_.jsx)(ce.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,ae?null:(0,_.jsx)(ce.Box,{sx:jo&&e.ticket_no||sr?void 0:{gridColumn:"1 / -1"},children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(ix.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:qo||e.completed?void 0:A=>de(A),children:(0,_.jsx)(Ye,{option:Xo(e)})})}),Ro&&Ro.total>0?(0,_.jsx)(ce.Box,{children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Ro.canConfirm?(0,_.jsx)(ce.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)(ce.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Ro.myTime?(0,_.jsx)(Ma.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>yt({anchorEl:A.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Ro.count," / ",Ro.total]})})}):null,$e&&gt?(0,_.jsx)(ce.Box,{children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,_.jsx)(ce.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:gt.canAck?(0,_.jsx)(ce.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)(ce.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:gt.acked?(0,_.jsx)(Ma.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>yt({anchorEl:A.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:gt.total>0&&gt.count>=gt.total?"\uC644\uB8CC":(0,_.jsxs)(_.Fragment,{children:[gt.count,(0,_.jsx)(ce.Box,{component:"span",sx:{mx:.4},children:"/"}),gt.total]})})})})}):null,je&&!Io&&!ae&&!$e?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ce,{icon:(0,_.jsx)(tx.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:qo?void 0:A=>_e(A),children:(e.sprint_seq??0)>0?So.find(A=>A.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,_.jsx)(qr,{label:"\uBBF8\uBC30\uC815"})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(nx.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,_.jsx)(Qt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:qo,onCommit:A=>M?.(e.seq,Number(A.replace(/[^0-9.]/g,""))||0)})})]}):null,ae||G?null:(0,_.jsx)(ce.Box,{sx:[{gridColumn:"1 / -1"},L??null],children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(ax.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:qo?void 0:A=>Oo(A),children:(e.label_keys??[]).length>0?(0,_.jsx)(cn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,_.jsx)(qr,{})})})]}),trailing:(0,_.jsxs)(_.Fragment,{children:[jo?(0,_.jsx)(fi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:qo,showResolution:!!e.completed,onChangeRepro:A=>bo?.(e.seq,"bug_repro",A),onChangeDevice:A=>bo?.(e.seq,"bug_device",A),onChangeWhere:A=>bo?.(e.seq,"bug_where",A),onChangeVersion:A=>bo?.(e.seq,"bug_version",A),onChangeResolution:A=>Le?.(e.seq,A)}):null,(0,_.jsx)(Ce,{icon:(0,_.jsx)(lx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[Ao(9),L??null],children:e.created_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Zo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,_.jsx)(qr,{})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(cs.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[Ao(11),L??null],children:e.created_time?Ct(e.created_time):(0,_.jsx)(qr,{})}),e.completed?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[Ao(10),L??null],children:e.completed_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Zo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,_.jsx)(qr,{})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(cs.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[Ao(12),L??null],children:e.completed_time?Ct(e.completed_time):(0,_.jsx)(qr,{})})]}):null]})}),(0,_.jsxs)(ce.Box,{sx:{display:"none",[Dt]:{display:"block",mt:1.5,mb:0}},children:[(0,_.jsx)(ce.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,_.jsx)(ce.ButtonBase,{onClick:()=>Fe(A=>!A),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:ar?(0,_.jsxs)(_.Fragment,{children:["\uC811\uAE30 ",(0,_.jsx)(Zf.default,{sx:{fontSize:18}})]}):(0,_.jsxs)(_.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,_.jsx)(Jf.default,{sx:{fontSize:18}})]})})]}),(0,_.jsxs)(ce.Box,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[Dt]:{mt:0,mb:1.25}}}),(0,_.jsx)(kt,{icon:(0,_.jsx)(sx.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,_.jsx)(ce.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(xi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:w?A=>w(e.seq,A):void 0,readOnly:qo,onChange:A=>b(e.seq,A)})})}),e.is_bug?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(kt,{icon:(0,_.jsx)(cx.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,_.jsx)(ce.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(is,{value:e.note,readOnly:Nr,onCommit:A=>h(e.seq,A)})})})]}),ae?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(bi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Nr,onAdd:B,onToggle:P,onRemove:S,onUpdate:D,onConvertToTask:R,onOpenLinkedTask:I,resolveLinkedTask:H,linkCandidates:u,linkBaseTask:e,onLinkExistingTask:E})]}),u&&!ae&&!$e&&as(e,u)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ss,{task:e,tasks:u,readOnly:qo,onOpenTask:y,onLink:k,onUnlink:T,onCreateFollowUp:q})]}):null,(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(hi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Nr,onAdd:F,onRemove:ge,onPreview:xe?A=>xe({...A,taskSeq:e.seq}):void 0,onDownload:we?A=>we({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ts,{taskSeq:e.seq,comments:e.comments??[],currentUserName:Te,myAccountSeq:ie,avatarSrcByName:n,onUpdate:ke,onRemove:Ie,onToggleReaction:De,onPreview:xe?A=>xe({...A,taskSeq:e.seq}):void 0,onDownload:we?A=>we({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(jr,{anchorEl:j,value:e.status,options:$e?gr:jo?_n:br,onSelect:A=>r(e.seq,A),onClose:()=>de(null)}),(0,_.jsx)(ce.Menu,{transitionDuration:0,anchorEl:be,open:!!be,onClose:()=>_e(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...So.filter(A=>`custom-${A.group_seq}`===String(e.tab_key??"")).map(A=>({seq:A.seq,label:ht(A)}))].map(A=>(0,_.jsxs)(ce.MenuItem,{onClick:()=>{ee?.(e.seq,A.seq),_e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[A.label,(e.sprint_seq??0)===A.seq?(0,_.jsx)(ox.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},A.seq))}),(0,_.jsx)(ri,{anchorEl:$t?.anchorEl??null,open:!!$t?.open,acks:e.acks??[],total:gt?.total??Ro?.total??0,avatarSrcByName:n,onRequestConfirm:io&&Ro&&Ro.count<Ro.total?()=>{io(e.seq),yt(A=>A?{...A,open:!1}:null)}:void 0,onClose:()=>yt(A=>A?{...A,open:!1}:null)}),(0,_.jsx)(Ti,{anchorEl:so,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:A=>i(e.seq,Vr(e.label_keys??[],A)),onAddLabel:l,onClose:()=>Oo(null)}),(0,_.jsx)(uo,{open:!!zo,anchorEl:zo,title:tt?"\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:()=>No(null),onConfirm:()=>{K?.(e.seq),No(null)}})]})}var vo=require("react/jsx-runtime");function oh(){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 th({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m,...x}){let O=Ke(),v=(0,hn.useRef)(null);o&&(v.current=o);let h=o??v.current,[b,w]=(0,hn.useState)(!1),[B,P]=(0,hn.useState)({}),S=Object.keys(B).length>0;(0,hn.useEffect)(()=>{P({})},[o?.seq,e]);let D=(0,hn.useRef)(null);if((0,hn.useEffect)(()=>{D.current?.scrollTo({top:0})},[o?.seq]),!h)return null;let R=O&&S?{...h,...B}:h,I=(k,T)=>{O?P(q=>({...q,...k})):T()},E=()=>{let k=B;P({});let T=h.seq,q=k.title===void 0?void 0:String(k.title).trim();if(r){let F={...k};q!==void 0&&(q?F.title=q:delete F.title),Object.keys(F).length>0&&r(T,F),(0,us.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}q&&s(T,q),k.icon!==void 0&&p(T,String(k.icon)),k.icon_color!==void 0&&c?.(T,String(k.icon_color)),k.status!==void 0&&x.onChangeStatus(T,k.status),k.label_keys!==void 0&&x.onChangeLabels(T,k.label_keys??[]),k.tab_key!==void 0&&x.onChangeProject(T,String(k.tab_key??"")),k.start_date!==void 0&&x.onChangeDate(T,"start_date",String(k.start_date??"")),k.due_date!==void 0&&x.onChangeDate(T,"due_date",String(k.due_date??"")),k.reminder!==void 0&&x.onChangeReminder(T,k.reminder),k.priority!==void 0&&x.onChangePriority(T,k.priority),k.estimated_time!==void 0&&x.onChangeEstimatedTime(T,String(k.estimated_time??"")),k.event_time!==void 0&&x.onChangeEventTime?.(T,String(k.event_time??"")),k.event_place!==void 0&&x.onChangeEventPlace?.(T,String(k.event_place??"")),k.event_address!==void 0&&x.onChangeEventAddress?.(T,String(k.event_address??"")),k.content!==void 0&&x.onChangeContent(T,String(k.content??"")),k.note!==void 0&&x.onChangeNote(T,String(k.note??"")),(0,us.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},H={...x,onChangeStatus:(k,T)=>I({status:T},()=>x.onChangeStatus(k,T)),onChangeLabels:(k,T)=>I({label_keys:T},()=>x.onChangeLabels(k,T)),onChangeProject:(k,T)=>I({tab_key:T},()=>x.onChangeProject(k,T)),onChangeDate:(k,T,q)=>I({[T]:q},()=>x.onChangeDate(k,T,q)),onChangeReminder:(k,T)=>I({reminder:T},()=>x.onChangeReminder(k,T)),onChangePriority:(k,T)=>I({priority:T},()=>x.onChangePriority(k,T)),onChangeEstimatedTime:(k,T)=>I({estimated_time:T},()=>x.onChangeEstimatedTime(k,T)),onChangeEventTime:(k,T)=>I({event_time:T},()=>x.onChangeEventTime?.(k,T)),onChangeEventPlace:(k,T)=>I({event_place:T},()=>x.onChangeEventPlace?.(k,T)),onChangeEventAddress:(k,T)=>I({event_address:T},()=>x.onChangeEventAddress?.(k,T)),onChangeContent:(k,T)=>I({content:T},()=>x.onChangeContent(k,T)),onChangeNote:(k,T)=>I({note:T},()=>x.onChangeNote(k,T))},u=(0,vo.jsx)(ms,{...H,task:R,myAccountSeq:i,onChangeTitle:(k,T)=>I({title:T},()=>s(k,T)),onToggleCompleted:l,onChangeIcon:(k,T)=>I({icon:T},()=>p(k,T)),onChangeIconColor:(k,T)=>I({icon_color:T},()=>c?.(k,T)),showTitle:O}),y=(0,vo.jsx)(ns,{onSubmit:(k,T)=>n(R.seq,k,T)},R.seq);return O?(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(fx.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:R.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":R.is_event?"\uC77C\uC815":R.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...f?[{icon:(0,vo.jsx)(dx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>w(!0)}]:[],{icon:(0,vo.jsx)(ux.default,{sx:{ml:f?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>rr(R,!0)},{icon:(0,vo.jsx)(Mt.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!S,onClick:S?E: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:y},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,vo.jsx)(Mt.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:u})}]},h.seq),(0,vo.jsx)(Bi,{open:b,taskSeq:R.seq,items:d,loading:g,onLoad:f,onClose:()=>w(!1)})]}):(0,vo.jsx)(Mt.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,vo.jsxs)(Mt.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,vo.jsx)(rs,{task:R,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m}),(0,vo.jsx)(Mt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,vo.jsx)(Mt.Box,{sx:{flex:1,minHeight:0},children:(0,vo.jsx)(px.default,{ref:D,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:u})}),(0,vo.jsx)(Mt.Divider,{sx:{borderColor:"#37352f"}}),(0,vo.jsx)(Mt.Box,{sx:{flexShrink:0},children:y})]})})}var on=require("react"),yo=require("@mui/material"),bx=require("@ehfuse/mui-form-dialog"),hx=a(require("@mui/icons-material/EditOutlined"),1),ds=require("@ehfuse/alerts"),kn=require("@ehfuse/mui-form-controls");var Oa="custom-";function xx(e){return e.startsWith(Oa)}function nh(e){return e>0?`${Oa}${e}`:""}function Ra(e){if(!xx(e))return 0;let o=Number(e.slice(Oa.length));return Number.isInteger(o)&&o>0?o:0}var Pe=require("react/jsx-runtime"),rh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function gx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function ih({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let p=o.filter(u=>u.useSprints&&!u.archived),[c,d]=(0,on.useState)(""),[g,f]=(0,on.useState)(""),[m,x]=(0,on.useState)(""),[O,v]=(0,on.useState)(""),[h,b]=(0,on.useState)(""),[w,B]=(0,on.useState)(!1),[P,S]=(0,on.useState)(0);(0,on.useEffect)(()=>{e&&(d(p.length===1?p[0].key:""),f(""),x(""),v(""),b(""),S(0))},[e]);let D=()=>{f(""),x(""),v(""),b(""),S(0)},R=u=>{S(u.seq),d(`custom-${u.group_seq}`),f(u.name),x(u.goal),v(u.start_date),b(u.end_date)},I=async()=>{let u=Ra(c);if(!u){(0,ds.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){(0,ds.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(P>0){i(P,{name:g.trim(),goal:m.trim(),start_date:O,end_date:h}),D();return}await r({group_seq:u,name:g.trim(),goal:m.trim(),start_date:O,end_date:h})&&D()}finally{B(!1)}},E=new Map(o.map(u=>[Ra(u.key),u.label])),H=(0,Pe.jsx)(yo.Box,{children:p.length===0?(0,Pe.jsx)(yo.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)(yo.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Pe.jsx)(kn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:p.map(u=>({value:u.key,label:u.label})),onChange:u=>d(String(u.target.value)),disabled:P>0}),(0,Pe.jsx)(kn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:u=>f(u.target.value)}),(0,Pe.jsx)(kn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:O,onChange:u=>v(u.target.value)}),(0,Pe.jsx)(kn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:u=>b(u.target.value)}),(0,Pe.jsx)(kn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:u=>x(u.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Pe.jsxs)(yo.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[P>0?(0,Pe.jsx)(yo.Button,{color:"inherit",onClick:D,disabled:w,children:"\uCDE8\uC18C"}):null,(0,Pe.jsx)(yo.Button,{variant:"contained",onClick:()=>{I()},disabled:w,children:P>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Pe.jsx)(yo.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Pe.jsx)(yo.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Pe.jsxs)(yo.Box,{sx:{minWidth:0},children:[(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Pe.jsx)(yo.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:u.name}),(0,Pe.jsx)(yo.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:E.get(u.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,Pe.jsxs)(yo.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[gx(u.start_date)," ~ ",gx(u.end_date)]})]}),u.goal?(0,Pe.jsx)(yo.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:u.goal}):null]}),(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Pe.jsx)(kn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:u.status,options:rh.map(y=>({value:y.value,label:y.label})),onChange:y=>l(u.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),(0,Pe.jsx)(yo.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>R(u),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Pe.jsx)(hx.default,{sx:{fontSize:18}})}),(0,Pe.jsx)(yo.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(u.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Pe.jsx)(pn,{style:{width:16,height:16}})})]})]},u.seq))})]})});return(0,Pe.jsx)(bx.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:H}],actions:{showCancelButton:!1,right:(0,Pe.jsx)(yo.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var ps=require("react"),He=require("@mui/material"),kx=require("@ehfuse/mui-form-dialog"),Tx=a(require("@mui/icons-material/OpenInNewOutlined"),1),yx=a(require("@mui/icons-material/EventOutlined"),1),Sx=require("@ehfuse/alerts");var ve=require("react/jsx-runtime");function ah({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,ps.useState)(""),[s,p]=(0,ps.useState)(!1),c=async()=>{let f=i.trim();if(f){p(!0);try{await t(f)&&l("")}finally{p(!1)}}},d=async f=>{await(0,Sx.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)},g=(0,ve.jsxs)(He.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,ve.jsxs)(He.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,ve.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,ve.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,ve.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,ve.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,ve.jsx)(He.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,m)=>(0,ve.jsxs)(He.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[(0,ve.jsx)(yx.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,ve.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,ve.jsx)(He.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{d(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,ve.jsx)(pn,{sx:{fontSize:18}})})]},f.seq))}):(0,ve.jsx)(He.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,ve.jsx)(He.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,ve.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,ve.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,ve.jsx)(He.Box,{children:(0,ve.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,ve.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,ve.jsx)(He.Box,{children:(0,ve.jsxs)(He.Box,{component:"span",children:[(0,ve.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,ve.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,ve.jsx)(He.Box,{children:(0,ve.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,ve.jsx)(He.Box,{children:(0,ve.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,ve.jsxs)(He.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,ve.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,ve.jsx)(He.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{c()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,ve.jsx)(kx.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:g}],actions:{showCancelButton:!1,left:(0,ve.jsx)(He.Button,{variant:"outlined",startIcon:(0,ve.jsx)(Tx.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,ve.jsx)(He.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var Po=require("@mui/material"),Bx=require("@ehfuse/mui-form-dialog"),Cx=a(require("@mui/icons-material/ContentCopyOutlined"),1),fs=a(require("@mui/icons-material/OpenInNewOutlined"),1),xs=require("@ehfuse/alerts"),qe=require("react/jsx-runtime");function vx(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function lh({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??vx,s=o.subscribed?l(o.token):"",p=()=>{navigator.clipboard.writeText(s).then(()=>(0,xs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,xs.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let g=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(g)}`,"_blank")},d=(0,qe.jsxs)(Po.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,qe.jsxs)(Po.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,qe.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,qe.jsxs)(Po.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,qe.jsx)("br",{}),(0,qe.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,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Po.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,qe.jsxs)(Po.Box,{sx:{display:"flex",gap:2},children:[(0,qe.jsx)(Po.Button,{variant:"outlined",startIcon:(0,qe.jsx)(Cx.default,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,qe.jsx)(Po.Button,{variant:"contained",startIcon:(0,qe.jsx)(fs.default,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,qe.jsxs)(Po.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,qe.jsx)(Po.Box,{children:(0,qe.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,qe.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,qe.jsx)(Po.Box,{children:(0,qe.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,qe.jsx)(Po.Box,{children:(0,qe.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,qe.jsx)(Po.Box,{children:(0,qe.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,qe.jsx)(Po.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,qe.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:d}],actions:{showCancelButton:!1,left:(0,qe.jsx)(Po.Button,{variant:"outlined",startIcon:(0,qe.jsx)(fs.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,qe.jsx)(Po.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var tn=require("react"),nn=require("@mui/material"),Ix=require("@ehfuse/mui-form-dialog"),_x=require("@ehfuse/mui-form-controls"),wx=require("@ehfuse/tree-view");var Vo=require("react/jsx-runtime");function Dx(e){return`${e.name}#${e.seq}`}function sh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function ch(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 mh(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 uh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Dx(e),renderLabel:(0,Vo.jsx)(nn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,Vo.jsx)(nn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Mx(e,o){let t=(e.groups??[]).map(r=>Mx(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>mh(r,o)).map(uh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function dh({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,tn.useState)(""),p=(0,tn.useMemo)(()=>e.map(d=>Mx(d,l.trim().toLowerCase())).filter(d=>d!==null),[e,l]),c=(0,tn.useMemo)(()=>o.filter(d=>t.includes(d.seq)).map(Dx),[]);return(0,Vo.jsxs)(Vo.Fragment,{children:[(0,Vo.jsx)(nn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Vo.jsx)(_x.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,Vo.jsx)(nn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,Vo.jsx)(wx.TreeView,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:d=>i(d.map(sh).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function ph({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 c=Ke(),[d,g]=(0,tn.useState)([]),[f,m]=(0,tn.useState)(0),x=(0,tn.useMemo)(()=>ch(n),[n]),O=i??[];(0,tn.useEffect)(()=>{e&&(g(O),m(h=>h+1))},[e]);let v=()=>{let h=x.filter(b=>d.includes(b.seq));s(r?h:h.slice(0,1)),p()};return(0,Vo.jsx)(Ix.FormDialog,{open:e,onClose:p,title:`${o}${r&&d.length>0?` (${d.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"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,Vo.jsx)(nn.Box,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:(0,Vo.jsx)(dh,{groups:n,allEmployees:x,initialSelectedSeqs:O,multiple:r,isMobile:c,onSelectionChange:g},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,Vo.jsx)(nn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,Vo.jsx)(nn.Button,{variant:"contained",onClick:v,children:l})}})}var Ar=require("react"),Ft=require("@mui/material"),Rx=require("@ehfuse/mui-form-dialog"),Px=require("@ehfuse/mui-form-controls");var Nt=require("@mui/material"),pt=require("react/jsx-runtime");function fh(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 gs({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((d,g)=>`${d.start_date}|${d.seq}`.localeCompare(`${g.start_date}|${g.seq}`)).map(d=>({sprint:d,...fh(d,o)})),i=r.some(d=>d.points>0),l=r.map(d=>i?d.points:d.count),s=Math.max(1,...l),p=r.filter(d=>d.sprint.status==="closed").map(d=>i?d.points:d.count),c=p.length>0?Math.round(p.reduce((d,g)=>d+g,0)/p.length*10)/10:null;return r.length===0?(0,pt.jsx)(Nt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,pt.jsxs)(Nt.Box,{children:[(0,pt.jsxs)(Nt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,pt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?(0,pt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,pt.jsx)(Nt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),(0,pt.jsx)(Nt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(d=>{let g=i?d.points:d.count,f=Math.round((t-24)*g/s),m=d.sprint.status==="closed";return(0,pt.jsxs)(Nt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,pt.jsx)(Nt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),(0,pt.jsx)(Nt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},d.sprint.seq)})}),(0,pt.jsx)(Nt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(d=>(0,pt.jsxs)(Nt.Box,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[d.sprint.name,d.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},d.sprint.seq))})]})}var Ox=require("react"),Ln=require("@mui/material"),Eo=require("react/jsx-runtime");function Ex(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function xh(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function bs(e){return e.slice(5).replace("-",".")}function hs({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,Ox.useMemo)(()=>{let h=Ex(e.start_date),b=Ex(e.end_date);if(!h||!b||b<h||Math.round((b.getTime()-h.getTime())/864e5)+1>366)return null;let B=o.filter(u=>u.sprint_seq===e.seq&&!u.archived);if(B.length===0)return{empty:!0};let P=B.some(u=>(u.story_points??0)>0),S=u=>P?u.story_points??0:1,D=B.reduce((u,y)=>u+S(y),0),R=new Map;for(let u of B){if(!u.completed)continue;let y=(u.completed_time??"").slice(0,10),k=/^\d{4}-\d{2}-\d{2}$/.test(y)?y:e.start_date;R.set(k,(R.get(k)??0)+S(u))}let I=[];for(let u=new Date(h);u<=b;u.setDate(u.getDate()+1))I.push(xh(u));let E=D,H=[];for(let u of I){if(u>t)break;E-=R.get(u)??0,H.push({day:u,value:Math.max(0,E)})}return{empty:!1,days:I,total:D,usePoints:P,actual:H}},[e,o,t]);if(!r)return(0,Eo.jsx)(Ln.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,Eo.jsx)(Ln.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,c=600,d=200,g=8,f=h=>i.length===1?0:h/(i.length-1)*c,m=h=>g+(d-g*2)*(1-h/Math.max(1,l)),x=`${f(0)},${m(l)} ${f(i.length-1)},${m(0)}`,O=p.map(h=>`${f(i.indexOf(h.day))},${m(h.value)}`).join(" "),v=p[p.length-1];return(0,Eo.jsxs)(Ln.Box,{children:[(0,Eo.jsxs)(Ln.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Eo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),v?(0,Eo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Eo.jsx)(Ln.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:v.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,Eo.jsx)(Ln.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,Eo.jsxs)("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,Eo.jsx)("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),(0,Eo.jsx)("polyline",{points:x,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?(0,Eo.jsx)("polyline",{points:O,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,v?(0,Eo.jsx)("circle",{cx:f(i.indexOf(v.day)),cy:m(v.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,Eo.jsxs)(Ln.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,Eo.jsx)("span",{children:bs(e.start_date)}),t>e.start_date&&t<e.end_date?(0,Eo.jsxs)("span",{children:["\uC624\uB298 ",bs(t)]}):null,(0,Eo.jsx)("span",{children:bs(e.end_date)})]})]})}var ft=require("react/jsx-runtime");function gh({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Ar.useState)(0);(0,Ar.useEffect)(()=>{if(!e)return;let d=o.find(f=>f.status==="active")??o[0],g=o.find(f=>f.seq===r)??d;s(g?.seq??0)},[e]);let p=(0,Ar.useMemo)(()=>o.find(d=>d.seq===l)??null,[o,l]),c=(0,ft.jsxs)(Ft.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,ft.jsxs)(Ft.Box,{sx:{px:3,py:2.5},children:[(0,ft.jsx)(Ft.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,ft.jsx)(gs,{sprints:o,tasks:t})]}),(0,ft.jsx)(Ft.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ft.jsxs)(Ft.Box,{sx:{px:3,py:2.5},children:[(0,ft.jsx)(Ft.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,ft.jsx)(Px.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(d=>({value:String(d.seq),label:ht(d)})),onChange:d=>s(Number(d.target.value)||0),sx:{width:280,mb:2}}),p?(0,ft.jsx)(hs,{sprint:p,tasks:t,todayStr:n}):(0,ft.jsx)(Ft.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,ft.jsx)(Rx.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:c}],actions:{showCancelButton:!1,right:(0,ft.jsx)(Ft.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var rn=require("@mui/material");var Tn=require("react/jsx-runtime");function bh({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,Tn.jsxs)(rn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,Tn.jsx)(rn.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,Tn.jsxs)(rn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,Tn.jsx)(rn.Checkbox,{size:"small",checked:p,sx:{p:0}}),(0,Tn.jsx)(Zo,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,Tn.jsx)(rn.Divider,{}),(0,Tn.jsx)(rn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var zx=require("react"),Lr=require("@mui/material"),qx=a(require("@mui/icons-material/KeyboardArrowDown"),1),Ax=a(require("@mui/icons-material/Check"),1);var an=require("react/jsx-runtime");function hh({value:e,onChange:o,options:t}){let[n,r]=(0,zx.useState)(null),i=t??Fi,l=Fi.find(s=>s.value===e)?.label??"";return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsxs)(Lr.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,an.jsx)(qx.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,an.jsx)(Lr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,an.jsxs)(Lr.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,an.jsx)(Ax.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var ir=require("@mui/material"),ks=require("@ehfuse/mui-form-controls");function Nn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Ci(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function kh(e=new Date){return{fromDate:Nn(Ci(1,e)),toDate:Nn(e)}}var yn=require("react/jsx-runtime"),Th=[{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 Ts({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Nn(Ci(i)),Nn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Nn(Ci(i))&&o===Nn(new Date);return(0,yn.jsxs)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,yn.jsx)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:Th.map(i=>{let l=r(i.months);return(0,yn.jsx)(ir.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,yn.jsxs)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,yn.jsx)(ks.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,yn.jsx)(ir.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,yn.jsx)(ks.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Lx=require("@mui/material");var ys=require("react/jsx-runtime");function yh({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,ys.jsx)(Lx.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,ys.jsx)(Ts,{fromDate:o,toDate:t,onChange:n})})}var Fn=require("@mui/material"),Fx=a(require("@mui/icons-material/Checklist"),1),Hx=a(require("@mui/icons-material/Face"),1),Wx=a(require("@mui/icons-material/Publish"),1),$x=a(require("@mui/icons-material/NotificationsOutlined"),1),Kx=a(require("@mui/icons-material/BugReportOutlined"),1),Ux=a(require("@mui/icons-material/DescriptionOutlined"),1),Vx=a(require("@mui/icons-material/Inventory2Outlined"),1);var Et=require("react/jsx-runtime");function Nx(e,o){return o>0?`${e} (${o})`:e}var Sh=[{id:"my",label:"\uC804\uCCB4",icon:(0,Et.jsx)(Fx.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Et.jsx)($x.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Et.jsx)(Hx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Et.jsx)(Wx.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Et.jsx)(Kx.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Et.jsx)(Vx.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Et.jsx)(Ux.default,{sx:{fontSize:18}}),hideCount:!0}];function Bh(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 Ch({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=se(),l=Bh(i.tabs),s=e;return r?(0,Et.jsx)(Fn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(p=>{let c=o===p.id;return(0,Et.jsx)(Fn.ButtonBase,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:nt(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:Nx(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):(0,Et.jsx)(Fn.Tabs,{value:o,onChange:(p,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(p=>(0,Et.jsx)(Fn.Tab,{value:p.id,label:Nx(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:l},p.id))})}var Hn=require("react"),ye=require("@mui/material"),Gx=a(require("@mui/icons-material/OpenInNewOutlined"),1),jx=a(require("@mui/icons-material/Check"),1),Yx=a(require("@mui/icons-material/CheckCircleOutlined"),1),Xx=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Qx=a(require("@mui/icons-material/SendOutlined"),1),Zx=a(require("@mui/icons-material/EventOutlined"),1),Jx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),eg=a(require("@mui/icons-material/ViewKanbanOutlined"),1),og=a(require("@mui/icons-material/ContentCopyOutlined"),1),tg=a(require("@mui/icons-material/NextPlanOutlined"),1),ng=a(require("@mui/icons-material/ContentPasteOutlined"),1),rg=a(require("@mui/icons-material/ShareOutlined"),1),ig=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Ss=a(require("@mui/icons-material/ChevronRight"),1),ag=a(require("@mui/icons-material/ArchiveOutlined"),1),lg=a(require("@mui/icons-material/UnarchiveOutlined"),1),sg=require("@ehfuse/alerts");var J=require("react/jsx-runtime");function vh({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:p,onChangeReminder:c,onMemberEdit:d,onMoveProject:g,onDuplicate:f,onCreateFollowUp:m,onShare:x,onAssignSprint:O,onArchiveToggle:v,onDelete:h}){let b=Ke(),w=Ut(),[B,P]=(0,Hn.useState)(null),[S,D]=(0,Hn.useState)(null),[R,I]=(0,Hn.useState)(null);(0,Hn.useEffect)(()=>{e||(P(null),D(null),I(null))},[e]);let E=e?.task??null,H=!!E?.is_notice,u=!!E?.is_event,y=E?!Vt(E,r):!1,k=(0,Hn.useMemo)(()=>new Set(t.filter(F=>F.useSprints).map(F=>F.key)),[t]),T=async()=>{let F=E;if(o(),!F)return;await(0,sg.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${F.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(F.seq)},q=()=>{E&&v(E.seq,!E.archived),o()};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(ye.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:b?"none":"anchorPosition",anchorPosition:!b&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...b?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:b?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&i(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Gx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,J.jsxs)(ye.MenuItem,{disabled:H?(E?.author_account_seq??0)!==r:(E?.author_account_seq??0)!==r&&(E?.manager_account_seq??0)!==r,onClick:()=>{E&&l(E.seq,!E.completed),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:E?.completed?(0,J.jsx)(Xx.default,{sx:{fontSize:19}}):(0,J.jsx)(Yx.default,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!H&&s?(0,J.jsxs)(ye.MenuItem,{disabled:!(E?.manager_account_seq??0)&&(E?.receiver_account_seqs??[]).length===0,onClick:()=>{E&&s(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,u?null:(0,J.jsx)(ye.Divider,{}),u?null:(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:F=>{E&&P({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Zx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!H&&!u&&d?(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&d(E,"manager"),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Jx.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,u?null:(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:F=>{E&&D({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(eg.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,J.jsx)(Ss.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,J.jsx)(ye.Divider,{}),f?(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:()=>{E&&f(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(og.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(tg.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&(x?x(E):rr(E,b)),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:b?(0,J.jsx)(rg.default,{sx:{fontSize:19}}):(0,J.jsx)(ng.default,{sx:{fontSize:19}})}),b?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),E&&!E.is_notice&&!E.is_event&&k.has(String(E.tab_key??""))&&O?(0,J.jsxs)(ye.MenuItem,{onClick:F=>I(F.currentTarget),sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(ig.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,J.jsx)(Ss.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,J.jsxs)(ye.MenuItem,{onClick:q,disabled:y||!E?.archived&&!(E&&Kr(E)),sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:E?.archived?(0,J.jsx)(lg.default,{sx:{fontSize:19}}):(0,J.jsx)(ag.default,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,J.jsx)(ye.Divider,{}),(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:T,sx:{fontSize:14,color:"#e5484d"},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(pn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),(0,J.jsx)(dn,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:b,onClose:()=>{P(null),o()},onDateChange:F=>{B&&p(B.task.seq,F)},onReminderChange:F=>{B&&c?.(B.task.seq,F)}}),(0,J.jsxs)(ye.Menu,{transitionDuration:0,anchorEl:S?.anchorEl??null,open:!!S,onClose:()=>{D(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...w,children:[(0,J.jsx)(ye.MenuItem,{selected:!S?.task.tab_key,onClick:()=>{S&&g(S.task.seq,""),D(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(F=>!F.archived).map(F=>(0,J.jsx)(ye.MenuItem,{selected:S?.task.tab_key===F.key,onClick:()=>{S&&g(S.task.seq,F.key),D(null),o()},sx:{fontSize:14,minWidth:170},children:F.label},F.key))]}),(0,J.jsx)(ye.Menu,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>I(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(F=>`custom-${F.group_seq}`===String(E?.tab_key??"")).map(F=>({seq:F.seq,label:ht(F)}))].map(F=>(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&O?.(E.seq,F.seq),I(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[F.label,(E?.sprint_seq??0)===F.seq?(0,J.jsx)(jx.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},F.seq))})]})}var Sn=require("@mui/material");var Wn=require("react/jsx-runtime");function Ih({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,Wn.jsxs)(Sn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,Wn.jsxs)(Sn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Wn.jsx)(Sn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,Wn.jsx)(Ye,{option:l})]},l.key)}),(0,Wn.jsx)(Sn.Divider,{}),(0,Wn.jsx)(Sn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Bn=require("@mui/material"),cg=a(require("@mui/icons-material/Check"),1),mg=a(require("@mui/icons-material/BarChartOutlined"),1),ug=a(require("@mui/icons-material/SettingsOutlined"),1);var Ht=require("react/jsx-runtime");function _h(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,Ht.jsxs)(Bn.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:ht(p)}))].map(p=>(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{r(p.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?(0,Ht.jsx)(cg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),(0,Ht.jsx)(Bn.Divider,{}),l?(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,Ht.jsx)(mg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,Ht.jsx)(Bn.Divider,{}):null,(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,Ht.jsx)(ug.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var wh={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function pg(e){return wh[e]??"tasks"}var Dh={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"},dg=["list","calendar","month","card","kanban","sprint","timeline"],Mh=["list","card"];function Eh(e){let o=pg(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:dg,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:Mh,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:dg,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