@ehfuse/taskbox 0.5.141 → 0.5.143

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 fi({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:l}){let s=(0,lt.useRef)(null),p=(0,lt.useRef)(null),c=i>0?i:0,d=(0,lt.useRef)(c),g=(0,lt.useRef)(l);g.current=l;let f=(0,lt.useRef)(null),m=(0,lt.useRef)(Date.now()+800),[x,O]=(0,lt.useState)(!1),v=Ue();(0,lt.useEffect)(()=>{if(n)return;let h=Wl(o);f.current===h||f.current===o||(f.current=h,m.current=Date.now()+800,s.current?.setHtml(h))},[e,o,n]);let b=(0,lt.useRef)(-1);return(0,lt.useEffect)(()=>{if(n||v||i<=0||b.current===i||(b.current=i,Math.abs(i-d.current)<1))return;let h=p.current?.querySelector(".ehfuse-editor-container");h&&(Math.abs(h.getBoundingClientRect().height-i)<1||(h.style.height=`${i}px`,d.current=i))},[n,v,i]),(0,lt.useEffect)(()=>{if(n||v)return;let h=p.current?.querySelector(".ehfuse-editor-container");if(!h||typeof ResizeObserver>"u")return;let w,B=new ResizeObserver(M=>{let S=Math.round(M[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(h),()=>{window.clearTimeout(w),B.disconnect()}},[n,v]),n?(0,Qt.jsxs)(Rn.Box,{sx:{position:"relative",mt:1},children:[(0,Qt.jsx)(Rn.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:Wl(o)}}),(0,Qt.jsx)(Rn.Tooltip,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,Qt.jsx)(Rn.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(zp(o)).then(()=>{O(!0),window.setTimeout(()=>O(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:x?(0,Qt.jsx)(Pp.default,{sx:{fontSize:17,color:"#2f9e5b"}}):(0,Qt.jsx)(Rp.default,{sx:{fontSize:17}})})})]}):(0,Qt.jsx)(Rn.Box,{ref:p,onDragOver:h=>h.stopPropagation(),onDrop:h=>h.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,Qt.jsx)(ha.EhfuseEditor,{ref:s,defaultValue:Wl(o),autoHeight:v,resizable:!v,showToolbar:!v,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:ha.minimalToolbarOptions,locale:"ko",minHeight:c||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:h=>{let w=Date.now()<m.current,B=h===f.current;f.current=h,!(w||B)&&t(h)}})})}var Rr=require("react"),Pe=require("@mui/material"),$l=a(require("@mui/icons-material/Close"),1),$p=a(require("@mui/icons-material/AddCircle"),1),Kl=a(require("@mui/icons-material/AddTask"),1),Kp=a(require("@mui/icons-material/Checklist"),1),Up=a(require("@mui/icons-material/CheckCircle"),1),Vp=a(require("@mui/icons-material/Launch"),1),Gp=a(require("@mui/icons-material/LinkOutlined"),1),jp=a(require("@mui/icons-material/RadioButtonUnchecked"),1);var Pn=require("react"),$o=require("@mui/material"),qp=require("@ehfuse/mui-form-dialog"),Lp=require("@ehfuse/mui-form-controls"),Np=require("@ehfuse/alerts"),Fp=a(require("@mui/icons-material/CheckCircle"),1),Hp=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Wp=require("@ehfuse/overlay-scrollbar");var yo=require("react/jsx-runtime"),Ap=[{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 xi({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=Ue(),[g,f]=(0,Pn.useState)("related"),[m,x]=(0,Pn.useState)(""),[O,v]=(0,Pn.useState)([]);(0,Pn.useEffect)(()=>{e&&(f("related"),x(""),v([]))},[e]);let b=(0,Pn.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]),h=()=>{if(O.length===0){(0,Np.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=Ap.find(S=>S.type===g)?.hint??"",M=(0,yo.jsxs)($o.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,yo.jsx)($o.Tabs,{value:g,onChange:(S,D)=>f(D),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Ap.map(S=>(0,yo.jsx)($o.Tab,{value:S.type,label:S.label},S.type))}),l?null:(0,yo.jsx)($o.Box,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:B}),(0,yo.jsx)($o.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,yo.jsx)(Lp.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,yo.jsx)($o.Box,{sx:{flex:1,minHeight:0},children:(0,yo.jsx)(Wp.OverlayScrollbar,{style:{height:"100%"},contentStyle:{paddingTop:0},children:(0,yo.jsx)($o.Box,{sx:{display:"flex",flexDirection:"column"},children:b.length===0?(0,yo.jsx)($o.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."}):b.map(S=>{let D=co(S.icon||Ye),R=O.includes(S.seq);return(0,yo.jsxs)($o.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,yo.jsx)(Fp.default,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):(0,yo.jsx)(Hp.default,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),D?(0,yo.jsx)(D,{sx:{fontSize:17,flexShrink:0,color:S.icon_color||"#1e3a8a"}}):null,(0,yo.jsxs)($o.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,yo.jsx)($o.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,yo.jsx)(Xe,{option:Go(S)})})]},S.seq)})})})})]});return(0,yo.jsx)(qp.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:M}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:(0,yo.jsx)($o.Button,{variant:"contained",disabled:O.length===0,onClick:h,children:p})}})}var ae=require("react/jsx-runtime");function gi({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),[b,h]=(0,Rr.useState)(null),w=Ue(),[B,M]=(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,ae.jsxs)(bt,{icon:(0,ae.jsx)(Kp.default,{sx:{fontSize:19,display:"block"}}),title:(0,ae.jsxs)(ae.Fragment,{children:["\uD560\uC77C",o.length>0?(0,ae.jsxs)(Pe.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[I," / ",o.length]}):null]}),titleExtra:o.length>0?(0,ae.jsx)(Pe.Box,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,ae.jsx)(Pe.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(I/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[(0,ae.jsx)(Pe.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,ae.jsxs)(Pe.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,ae.jsx)(Pe.Box,{component:"span",onClick:()=>n(e,u,!k),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:k?(0,ae.jsx)(Up.default,{sx:{fontSize:18,color:"#2f80ed"}}):(0,ae.jsx)(jp.default,{sx:{fontSize:18,color:"#9a9a97"}})}),b?.index===u?(0,ae.jsx)(Pe.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:b.label,enterKeyHint:"done",onChange:z=>h({index:u,label:z.target.value}),onBlur:()=>{b.label.trim()&&b.label.trim()!==H.label&&i?.(e,u,b.label),h(null)},onKeyDown:z=>{z.key==="Enter"&&z.target.blur(),z.key==="Escape"&&h(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,ae.jsx)(Pe.Box,{component:"span",onClick:T?H.task_seq&&p?()=>p(H.task_seq):void 0:l||!i?void 0:w?()=>M({index:u,label:H.label}):()=>h({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,ae.jsxs)(Pe.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,ae.jsx)(Vp.default,{sx:{fontSize:12}}),y?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!l&&!T&&s?(0,ae.jsx)(Pe.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,ae.jsx)(Pe.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:z=>D({anchorEl:z.currentTarget,index:u,label:H.label}),sx:{display:w?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ae.jsx)(Kl.default,{sx:{fontSize:16}})})}):null,l?null:(0,ae.jsx)(Pe.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,ae.jsx)($l.default,{sx:{fontSize:15}})})]},`${H.label}-${u}`)})}),(0,ae.jsxs)(Pe.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,ae.jsx)(Pe.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,ae.jsx)(Pe.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,ae.jsx)(Pe.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,ae.jsx)(Gp.default,{sx:{fontSize:20}})})}):null,(0,ae.jsx)(Pe.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,ae.jsx)($p.default,{sx:{fontSize:20}})})]}),c&&d&&g?(0,ae.jsx)(xi,{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,ae.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,ae.jsx)(Pe.Dialog,{open:!!B,onClose:()=>M(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,ae.jsxs)(Pe.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,ae.jsx)(Pe.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,ae.jsx)(Pe.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:B?.label??"",onChange:H=>M(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()),M(null)}}),(0,ae.jsxs)(Pe.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!l&&s&&B&&!o[B.index]?.task_seq?(0,ae.jsx)(Pe.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{s(e,B.index,o[B.index]?.label??""),M(null)},sx:{color:"#57564f"},children:(0,ae.jsx)(Kl.default,{sx:{fontSize:20}})}):null,!l&&B?(0,ae.jsx)(Pe.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,B.index),M(null)},sx:{color:"#e5484d"},children:(0,ae.jsx)($l.default,{sx:{fontSize:19}})}):null,(0,ae.jsx)(Pe.Box,{sx:{flex:1}}),(0,ae.jsx)(Pe.Button,{color:"inherit",onClick:()=>M(null),children:"\uCDE8\uC18C"}),(0,ae.jsx)(Pe.Button,{variant:"contained",disabled:!B?.label.trim(),onClick:()=>{B&&B.label.trim()&&i?.(e,B.index,B.label.trim()),M(null)},children:"\uD655\uC778"})]})]})})]})}var Sa=require("react"),kt=require("@mui/material"),Xp=a(require("@mui/icons-material/Close"),1),Gl=a(require("@mui/icons-material/AttachFileOutlined"),1);var Uh=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"]),ba=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Uh.has(o)};var Yp=require("@mui/material");var Pr=require("react/jsx-runtime");function Ul(e){let o=$t(),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=$t().useValue("attachmentUpload.progress");return(0,Pr.jsxs)(Pr.Fragment,{children:[o??0,"%"]})}function Vl(){let o=$t().useValue("attachmentUpload.progress");return(0,Pr.jsx)(Yp.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=Ue(),g=dr(),f=ur(),m=Ul(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")},b=B=>m?B+1<m.index?"done":B+1===m.index?"uploading":"waiting":"waiting",h=(B,M,S,D={})=>(0,go.jsxs)(kt.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)(kt.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,go.jsx)(Gl.default,{sx:{fontSize:16,color:"#9a9a97"}}),M,(0,go.jsx)(kt.Box,{component:"span",sx:{fontSize:12,color:D.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:S}),D.removeIndex!==void 0?(0,go.jsx)(kt.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)(Xp.default,{sx:{fontSize:15}})}):null]}),D.uploading?(0,go.jsx)(Vl,{}):null]},B),w=B=>{let M=ba(B.name);return(0,go.jsx)(kt.Box,{component:"button",type:"button",onClick:()=>M?O(B):v(B),title:`${B.name} ${M?"\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)(bt,{icon:(0,go.jsx)(Gl.default,{sx:{fontSize:18,display:"block"}}),title:(0,go.jsxs)(go.Fragment,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[(0,go.jsxs)(kt.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((B,M)=>{let S=`${B.uuid||B.name}-${M}`;if(x){let D=b(M),R=D==="uploading";return h(S,(0,go.jsx)(kt.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?M:void 0})}return B.uuid?h(S,w(B),Ta(B.size),{removeIndex:r?void 0:M}):h(S,(0,go.jsx)(kt.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:M})}),!x&&m?m.queue.slice(m.index-1).map((B,M)=>{let S=M===0;return h(`uploading-${m.index+M}-${B.name}`,(0,go.jsx)(kt.Box,{component:"span",sx:{...ya,color:"#9a9a97"},children:B.name}),S?(0,go.jsx)(ka,{}):Ta(B.size),{uploading:S})}):null]}),(0,go.jsx)(kt.Box,{onClick:()=>c.current?.click(),onDragOver:B=>{B.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:B=>{B.preventDefault(),p(!1);let M=Array.from(B.dataTransfer.files);M.length>0&&t(e,M)},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)(kt.Box,{component:"input",ref:c,type:"file",multiple:!0,onChange:B=>{let M=Array.from(B.target.files??[]);M.length>0&&t(e,M),B.target.value=""},sx:{display:"none"}})]})}var tf=require("react"),At=require("@mui/material"),nf=a(require("@mui/icons-material/Add"),1);var bi=require("react"),zr=require("@mui/material"),Zp=require("@ehfuse/mui-form-dialog"),Jp=require("@ehfuse/mui-form-controls"),ef=require("@ehfuse/mui-color-picker"),of=require("@ehfuse/alerts");var Zt=require("react/jsx-runtime"),Qp="#2f80ed";function jl({open:e,onClose:o,onSubmit:t}){let[n,r]=(0,bi.useState)(""),[i,l]=(0,bi.useState)(Qp);(0,bi.useEffect)(()=>{e&&(r(""),l(Qp))},[e]);let s=()=>{let d=n.trim();if(!d){(0,of.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(d,i),o()},p=Xa(i),c=(0,Zt.jsxs)(zr.Box,{children:[(0,Zt.jsxs)(zr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,Zt.jsx)(Jp.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,Zt.jsx)(ef.ColorPicker,{value:i,onChange:d=>l(d),shape:"circle",colorSize:28})]}),(0,Zt.jsxs)(zr.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,Zt.jsx)(Xe,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...p}})]})]});return(0,Zt.jsx)(Zp.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,Zt.jsx)(zr.Button,{variant:"contained",onClick:s,children:"\uCD94\uAC00"})}})}var st=require("react/jsx-runtime");function ki({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[l,s]=(0,tf.useState)(!1),p=Kt();return(0,st.jsxs)(st.Fragment,{children:[(0,st.jsxs)(At.Menu,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...p,children:[t.map(c=>{let d=o.includes(c.key);return(0,st.jsxs)(At.MenuItem,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,st.jsx)(At.Checkbox,{size:"small",checked:d,sx:{p:0}}),(0,st.jsx)(Xe,{option:c})]},c.key)}),(0,st.jsx)(At.Divider,{}),(0,st.jsxs)(At.MenuItem,{onClick:()=>s(!0),sx:{fontSize:14,color:"#787774"},children:[(0,st.jsx)(At.ListItemIcon,{children:(0,st.jsx)(nf.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,st.jsx)(jl,{open:l,onClose:()=>s(!1),onSubmit:r})]})}function rf(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 af(e,o){let t=(e.target_account_seqs??[]).filter(g=>g>0);if(t.length===0)return null;let n=new Set(t),r=rf(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 Ti(e,o){let t=af(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function Vh(e,o){let t=af(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function Yl(e,o,t){let n=(e.target_account_seqs??[]).filter(d=>d>0),r=rf(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 Xl(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 me=require("react/jsx-runtime"),Zl="#0f9d58";function Ba({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,onMemberEdit:f,onAddProject:m,onAddLabelOption:x,contentSyncKey:O="create"}){let v=$t(),b=dr(),h=e.useFormValue("manager_name"),w=e.useFormValue("receiver_names"),B=e.useFormValue("start_date"),M=!!e.useFormValue("is_event"),S=!!e.useFormValue("is_bug"),D=e.useFormValue("bug_repro")??"",R=e.useFormValue("bug_device")??"",I=e.useFormValue("bug_where")??"",E=e.useFormValue("bug_version")??"",H=e.useFormValue("event_time")??"",u=e.useFormValue("event_place")??"",y=e.useFormValue("event_address")??"",k=e.useFormValue("due_date"),T=e.useFormValue("estimated_time")??"",z=e.useFormValue("reminder"),F=e.useFormValue("priority"),ge=e.useFormValue("content"),ke=e.useFormValue("checklist")??[],xe=e.useFormValue("tab_key"),qe=e.useFormValue("sprint_seq")??0,Ee=e.useFormValue("story_points")??0,ye=t.find(N=>N.key===xe&&N.useSprints),re=ye?n.filter(N=>`custom-${N.group_seq}`===xe):[],[Je,eo]=(0,Ql.useState)(null),K=e.useFormValue("label_keys"),[Y,ne]=(0,Ql.useState)(null),C=e.useFormValue("target_names"),W=e.useFormValue("target_account_seqs"),j=v.useValue("createAttachmentFiles")??[],Ge=i?Ti({author_account_seq:g,target_names:C,target_account_seqs:W},d):"";return(0,me.jsxs)(me.Fragment,{children:[p,i?null:(0,me.jsx)(Eo.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(N=>{let Se=S?"bug":M?"event":"task",Me=Se===N.value;return(0,me.jsx)(Eo.ButtonBase,{onClick:()=>{if(Se===N.value)return;e.setFormValue("is_event",N.value==="event"),e.setFormValue("is_bug",N.value==="bug"),e.setFormValue("is_open",N.value==="bug");let Be=e.getFormValue("icon"),oo=e.getFormValue("icon_color"),ee=[Ye,"event",pr].includes(Be),$e=!oo||oo===Zl||oo===fr;ee&&e.setFormValue("icon",N.value==="event"?"event":N.value==="bug"?pr:Ye),$e&&e.setFormValue("icon_color",N.value==="event"?Zl:N.value==="bug"?fr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:Me?600:400,color:Me?"#ffffff":"#787774",bgcolor:Me?"#2563eb":"#f4f4f2"},children:N.label},N.label)})}),(0,me.jsx)(Eo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,me.jsxs)(Eo.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[(0,me.jsx)(di,{hideProject:l,showEstimatedTime:!M,values:{tabKey:xe,managerName:h,receiverNames:w,startDate:B,dueDate:k,reminder:z,priority:F,estimatedTime:T,eventTime:H,eventPlace:u,eventAddress:y},onChangeEstimatedTime:N=>e.setFormValue("estimated_time",N),customTabs:t,avatarSrcByName:r,notice:i,event:M,onChangeEventTime:N=>e.setFormValue("event_time",N),onChangeEventPlace:N=>e.setFormValue("event_place",N),onChangeEventAddress:N=>e.setFormValue("event_address",N),targetSummary:Ge,onChangeProject:N=>e.setFormValue("tab_key",N),onAddProject:m,onChangeStartDate:N=>e.setFormValue("start_date",N),onChangeDueDate:N=>e.setFormValue("due_date",N),onChangeReminder:N=>e.setFormValue("reminder",N),onChangePriority:N=>e.setFormValue("priority",N),onMemberEdit:f,trailing:(0,me.jsxs)(me.Fragment,{children:[ye&&!M&&!i?(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(_e,{icon:(0,me.jsx)(mf.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:N=>eo(N),children:qe>0?re.find(N=>N.seq===qe)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":(0,me.jsx)(Eo.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),(0,me.jsx)(_e,{icon:(0,me.jsx)(uf.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,me.jsx)(Xt,{value:Ee>0?String(Ee):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:N=>e.setFormValue("story_points",Number(N.replace(/[^0-9.]/g,""))||0)})})]}):null,S?(0,me.jsx)(pi,{values:{repro:D,device:R,where:I,version:E},onChangeRepro:N=>e.setFormValue("bug_repro",N),onChangeDevice:N=>e.setFormValue("bug_device",N),onChangeWhere:N=>e.setFormValue("bug_where",N),onChangeVersion:N=>e.setFormValue("bug_version",N)}):null]}),leading:M||c?null:(0,me.jsx)(Eo.Box,{sx:{gridColumn:"1 / -1"},children:(0,me.jsx)(_e,{icon:(0,me.jsx)(cf.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:N=>ne(N),children:(K??[]).length>0?(0,me.jsx)(sn,{labelKeys:K??[],labelOptions:o}):(0,me.jsx)(Eo.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),(0,me.jsx)(Eo.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,me.jsx)(bt,{icon:(0,me.jsx)(lf.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,me.jsx)(fi,{syncKey:O,value:ge,onChange:N=>e.setFormValue("content",N)})}),M?null:(0,me.jsx)(Eo.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),M?null:(0,me.jsx)(gi,{taskSeq:0,checklist:ke,onAdd:(N,Se)=>e.setFormValue("checklist",[...ke,{label:Se,checked:!1}]),onToggle:(N,Se,Me)=>e.setFormValue("checklist",ke.map((Be,oo)=>oo===Se?{...Be,checked:Me}:Be)),onRemove:(N,Se)=>e.setFormValue("checklist",ke.filter((Me,Be)=>Be!==Se)),onUpdate:(N,Se,Me)=>e.setFormValue("checklist",ke.map((Be,oo)=>oo===Se?{...Be,label:Me}:Be))}),(0,me.jsx)(Eo.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,me.jsx)(hi,{taskSeq:0,attachments:j.map(N=>({name:N.name,size:N.size})),onAdd:(N,Se)=>{let Me=Xl(Se,b);Me.message&&(0,pf.InfoAlert)(Me.message),Me.accepted.length!==0&&v.setValue("createAttachmentFiles",[...v.getValue("createAttachmentFiles")??[],...Me.accepted])},onRemove:(N,Se)=>v.setValue("createAttachmentFiles",j.filter((Me,Be)=>Be!==Se))}),S?null:(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(Eo.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,me.jsx)(bt,{icon:(0,me.jsx)(sf.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,me.jsx)(df.TextField,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),(0,me.jsx)(Eo.Menu,{transitionDuration:0,anchorEl:Je,open:!!Je,onClose:()=>eo(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...re.map(N=>({seq:N.seq,label:ht(N)}))].map(N=>(0,me.jsx)(Eo.MenuItem,{onClick:()=>{e.setFormValue("sprint_seq",N.seq),eo(null)},sx:{fontSize:14,minWidth:170},children:N.label},N.seq))}),(0,me.jsx)(ki,{anchorEl:Y,selectedKeys:K??[],labelOptions:o,onToggle:N=>e.setFormValue("label_keys",Vr(K??[],N)),onAddLabel:(N,Se)=>x?.(N,Se),onClose:()=>ne(null)})]})}var ze=require("react/jsx-runtime");function Gh({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:l=null,isNotice:s=!1,defaultBug:p=!1}=t,c=$t(),d=(0,or.useRef)(!1),[g,f]=(0,or.useState)(0),[m,x]=(0,or.useState)(null),O=n.useFormValue("title"),v=n.useFormValue("icon"),b=n.useFormValue("icon_color"),h=!!n.useFormValue("is_event"),w=!!n.useFormValue("is_bug"),B=Ue(),S=c.useValue("createSubmitting")??!1,D=Kn(v||Ye),R=s?"\uACF5\uC9C0 \uB4F1\uB85D":h?"\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":h?"\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,or.useEffect)(()=>{let u=d.current;d.current=e,!(!e||u)&&(n.setFormValues({...n.getFormValues(),title:"",icon:s?Vo:p?pr:Ye,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,is_open:p,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,ze.jsxs)(lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[(0,ze.jsx)(lo.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:u=>x(u.currentTarget),sx:{p:0,color:b||"#1e3a8a"},children:(0,ze.jsx)(D,{sx:{fontSize:20}})}),(0,ze.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,ze.jsx)(Jn,{anchorEl:m,value:v,color:b||"#1e3a8a",onSelect:u=>n.setFormValue("icon",u),onSelectColor:u=>n.setFormValue("icon_color",u),onClose:()=>x(null)});return B?(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(gf.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,ze.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,ze.jsx)(lo.Box,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:(0,ze.jsx)(Ba,{...t,contentSyncKey:`create-${g}`,leadingRow:E})})}]}),H]}):(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(lo.Drawer,{anchor:"right",open:e,onClose:o,sx:{zIndex:u=>u.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,ze.jsxs)(lo.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,ze.jsxs)(lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,ze.jsx)(lo.Tooltip,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,ze.jsx)(lo.IconButton,{size:"small",onClick:u=>x(u.currentTarget),sx:{color:b||"#1e3a8a"},children:(0,ze.jsx)(D,{sx:{fontSize:20}})})}),(0,ze.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,ze.jsx)(lo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:(0,ze.jsx)(ff.default,{})})]}),(0,ze.jsx)(lo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ze.jsx)(lo.Box,{sx:{flex:1,minHeight:0},children:(0,ze.jsx)(xf.default,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,ze.jsx)(Ba,{...t,contentSyncKey:`create-${g}`})})}),(0,ze.jsx)(lo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ze.jsxs)(lo.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,ze.jsx)(lo.Button,{onClick:o,color:"inherit",disabled:S,children:"\uCDE8\uC18C"}),(0,ze.jsx)(lo.Button,{onClick:n.submit,variant:"contained",disabled:S,children:S?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),H]})}var hn=require("react"),Dt=require("@mui/material"),sx=a(require("@mui/icons-material/ShareOutlined"),1),cx=a(require("@mui/icons-material/HistoryOutlined"),1),mx=a(require("@ehfuse/overlay-scrollbar"),1),ux=require("@ehfuse/mui-form-dialog"),ms=require("@ehfuse/alerts");var qt=require("react"),X=require("@mui/material"),es=a(require("@mui/icons-material/Send"),1),bf=require("@ehfuse/mui-form-controls"),yi=a(require("@mui/icons-material/Close"),1),kf=a(require("@mui/icons-material/EditOutlined"),1),Tf=a(require("@mui/icons-material/Favorite"),1),yf=a(require("@mui/icons-material/FavoriteBorderOutlined"),1),Sf=a(require("@mui/icons-material/CheckCircle"),1),Bf=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),tr=a(require("@mui/icons-material/AttachFileOutlined"),1),Cf=a(require("@mui/icons-material/AddCircleOutline"),1),vf=a(require("@mui/icons-material/ImageOutlined"),1);var Jl=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 L=require("react/jsx-runtime"),jh=5;function hf({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,L.jsx)(X.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,L.jsx)(X.Tooltip,{title:s,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,L.jsxs)(X.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[(0,L.jsx)(X.IconButton,{size:"small","aria-label":`\uB313\uAE00 ${l}`,onClick:n,sx:{color:i?p:"#c9c8c5",p:.5},children:e==="like"?i?(0,L.jsx)(Tf.default,{sx:{fontSize:16}}):(0,L.jsx)(yf.default,{sx:{fontSize:16}}):i?(0,L.jsx)(Sf.default,{sx:{fontSize:16}}):(0,L.jsx)(Bf.default,{sx:{fontSize:16}})}),r.length>0?(0,L.jsx)(X.Box,{component:"span",sx:{fontSize:12,color:i?p:"#9a9a97",ml:-.25},children:r.length}):null]})})}function os({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,qt.useState)(null),f=(0,qt.useRef)(null),[m,x]=(0,qt.useState)(null),[O,v]=(0,qt.useState)(!1),b=Math.max(0,o.length-jh),h=b>0&&!O,w=d?Math.min(d.index,b):b,B=o.map((I,E)=>({comment:I,index:E})).slice(h?w:0),M=ur(),S=I=>{if(p){p(I);return}window.open(M(I.uuid??""),"_blank","noopener,noreferrer")},D=I=>{if(c){c(I);return}window.open(M(I.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},R=ot().slots?.avatar;return(0,L.jsxs)(X.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,L.jsxs)(X.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,L.jsx)(cn,{sx:{fontSize:18,display:"block",color:"#37352f"}}),(0,L.jsxs)(X.Box,{sx:{fontSize:ga,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),b>0&&(!h||w>0)?(0,L.jsx)(X.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:h?`\uC774\uC804 \uB313\uAE00 ${w}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?(0,L.jsx)(X.Box,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(0,L.jsx)(X.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,L.jsxs)(X.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,L.jsx)(X.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,L.jsx)(R,{name:I.author,src:u||void 0,size:44})}):(0,L.jsx)(X.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,L.jsx)(Vt,{src:u,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Vn[0]},iconFontSize:24})})})(),(0,L.jsxs)(X.Box,{sx:{flex:1,minWidth:0},children:[(0,L.jsxs)(X.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[(0,L.jsx)(X.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:I.author}),(0,L.jsx)(X.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:I.time}),H?(0,L.jsx)(X.Box,{sx:{ml:"auto"}}):(0,L.jsxs)(X.Box,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[(0,L.jsx)(hf,{kind:"like",reactions:I.likes,myAccountSeq:n,onToggle:()=>s?.(e,E,"like")}),(0,L.jsx)(hf,{kind:"ack",reactions:I.acks,myAccountSeq:n,onToggle:()=>s?.(e,E,"ack")})]}),H?(0,L.jsxs)(X.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,L.jsx)(X.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,L.jsx)(kf.default,{sx:{fontSize:15}})}),(0,L.jsx)(X.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:u=>x({anchorEl:u.currentTarget,index:E}),sx:{color:"#9a9a97"},children:(0,L.jsx)(yi.default,{sx:{fontSize:15}})})]}):null]}),d?.index===E?(0,L.jsxs)(X.Box,{sx:{mt:.5},children:[(0,L.jsx)(X.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,L.jsxs)(X.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,z)=>z!==y)});return Ca(u.name)&&u.uuid?(0,L.jsxs)(X.Box,{sx:{position:"relative"},children:[(0,L.jsx)(X.Box,{component:"img",src:M(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,L.jsx)(X.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,L.jsx)(yi.default,{sx:{fontSize:14}})})]},`kept-${u.uuid}-${y}`):(0,L.jsx)(X.Chip,{size:"small",icon:(0,L.jsx)(tr.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,z)=>z!==y)});return Ca(u.name)?(0,L.jsxs)(X.Box,{sx:{position:"relative"},children:[(0,L.jsx)(X.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,L.jsx)(X.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,L.jsx)(yi.default,{sx:{fontSize:14}})})]},`new-${u.name}-${y}`):(0,L.jsx)(X.Chip,{size:"small",icon:(0,L.jsx)(tr.default,{sx:{fontSize:14}}),label:`${u.name} (\uC0C8 \uD30C\uC77C)`,onDelete:k,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${u.name}-${y}`)}),(0,L.jsx)(X.Tooltip,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:(0,L.jsx)(X.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>f.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:(0,L.jsx)(Cf.default,{sx:{fontSize:20}})})})]}),(0,L.jsxs)(X.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[(0,L.jsx)(X.Button,{size:"small",color:"inherit",onClick:()=>g(null),children:"\uCDE8\uC18C"}),(0,L.jsx)(X.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,L.jsx)(X.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,L.jsxs)(X.Box,{children:[I.text?(0,L.jsx)(X.Box,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:I.text}):null,(I.attachments??[]).length>0?(0,L.jsx)(X.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(I.attachments??[]).map((u,y)=>{let k=!!u.uuid;if(Ca(u.name)&&k)return(0,L.jsx)(X.Box,{component:"img",src:M(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 z=ba(u.name);return(0,L.jsx)(X.Chip,{size:"small",icon:(0,L.jsx)(tr.default,{sx:{fontSize:14}}),label:`${u.name} (${Jl(u.size)})`,clickable:k,onClick:k?()=>z?S(u):D(u):void 0,title:k?`${u.name} ${z?"\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,L.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 Ca(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function ts({onSubmit:e}){let[o,t]=(0,qt.useState)(""),[n,r]=(0,qt.useState)([]),[i,l]=(0,qt.useState)(!1),s=(0,qt.useRef)(null),p=(0,qt.useRef)(null),c=Ue(),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,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(X.IconButton,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>s.current?.click(),sx:{color:"#9a9a97"},children:(0,L.jsx)(tr.default,{sx:{fontSize:20}})}),(0,L.jsx)(X.IconButton,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>p.current?.click(),sx:{color:"#9a9a97"},children:(0,L.jsx)(vf.default,{sx:{fontSize:20}})})]});return(0,L.jsxs)(X.Box,{children:[n.length>0?(0,L.jsx)(X.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((m,x)=>Ca(m.name)?(0,L.jsxs)(X.Box,{sx:{position:"relative"},children:[(0,L.jsx)(X.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,L.jsx)(X.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(O=>O.filter((v,b)=>b!==x)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,L.jsx)(yi.default,{sx:{fontSize:14}})})]},`${m.name}-${x}`):(0,L.jsx)(X.Chip,{size:"small",icon:(0,L.jsx)(tr.default,{sx:{fontSize:14}}),label:`${m.name} (${Jl(m.size)})`,onDelete:()=>r(O=>O.filter((v,b)=>b!==x)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${x}`))}):null,(0,L.jsxs)(X.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,L.jsxs)(X.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,L.jsx)(tr.default,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,(0,L.jsx)(bf.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,L.jsxs)(X.Box,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[f,(0,L.jsx)(X.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:g,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,L.jsx)(es.default,{sx:{fontSize:22}})})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(X.Box,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:f}),(0,L.jsx)(X.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,L.jsx)(es.default,{sx:{fontSize:22}})})]})]}),(0,L.jsx)(X.Box,{component:"input",ref:s,type:"file",multiple:!0,onChange:m=>{d(m.target.files),m.target.value=""},sx:{display:"none"}}),(0,L.jsx)(X.Box,{component:"input",ref:p,type:"file",accept:"image/*",multiple:!0,onChange:m=>{d(m.target.files),m.target.value=""},sx:{display:"none"}})]})}var Ia=require("react"),Co=require("@mui/material"),Rf=a(require("@mui/icons-material/Close"),1),Pf=a(require("@mui/icons-material/ArrowBack"),1),zf=a(require("@mui/icons-material/ShareOutlined"),1),Af=a(require("@mui/icons-material/ContentCopyOutlined"),1),qf=a(require("@mui/icons-material/CheckCircle"),1),Lf=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Nf=a(require("@mui/icons-material/HistoryOutlined"),1),Ff=a(require("@mui/icons-material/PrintOutlined"),1);var _f=require("react"),ct=require("@mui/material"),wf=require("@ehfuse/mui-form-dialog"),Df=require("@ehfuse/overlay-scrollbar");var Zo=require("react/jsx-runtime"),Yh={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 If(e){return String(e??"").trim()||"\uC5C6\uC74C"}function Xh(e){if(e.kind!=="field")return Yh[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) "${If(t)}" \u2192 "${If(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Si({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let l=Ue();(0,_f.useEffect)(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let s=(0,Zo.jsx)(ct.Box,{sx:{height:l?"100%":420,minHeight:0},children:(0,Zo.jsx)(Df.OverlayScrollbar,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Zo.jsxs)(ct.Box,{sx:{px:l?2:0,display:"flex",flexDirection:"column",gap:1},children:[n&&!t?(0,Zo.jsxs)(ct.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,Zo.jsx)(ct.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?(0,Zo.jsx)(ct.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(p=>(0,Zo.jsxs)(ct.Box,{sx:{display:"flex",gap:1,alignItems:"baseline",minWidth:0,flexShrink:0},children:[(0,Zo.jsx)(ct.Box,{sx:{flexShrink:0,width:"10.5em",whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Bt(p.acted_time)}),(0,Zo.jsxs)(ct.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,Zo.jsx)(ct.Box,{component:"span",sx:{fontWeight:500},children:String(p.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,Zo.jsx)(ct.Box,{component:"span",sx:{ml:.5},children:Xh(p)})]})]},p.seq))]})})});return(0,Zo.jsx)(wf.FormDialog,{open:e,onClose:i,maxWidth:"sm",fullScreen:l,mobilePresentation:l?"slide":"dialog",...l?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop: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,sectionContentPaddingTop:0,actions:{showCancelButton:!1,right:(0,Zo.jsx)(ct.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var va=require("@ehfuse/alerts");var Mf=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
8
+ `)}),p=e==="like"?"#e5484d":"#2f80ed";return(0,L.jsx)(X.Tooltip,{title:s,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,L.jsxs)(X.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[(0,L.jsx)(X.IconButton,{size:"small","aria-label":`\uB313\uAE00 ${l}`,onClick:n,sx:{color:i?p:"#c9c8c5",p:.5},children:e==="like"?i?(0,L.jsx)(Tf.default,{sx:{fontSize:16}}):(0,L.jsx)(yf.default,{sx:{fontSize:16}}):i?(0,L.jsx)(Sf.default,{sx:{fontSize:16}}):(0,L.jsx)(Bf.default,{sx:{fontSize:16}})}),r.length>0?(0,L.jsx)(X.Box,{component:"span",sx:{fontSize:12,color:i?p:"#9a9a97",ml:-.25},children:r.length}):null]})})}function os({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,qt.useState)(null),f=(0,qt.useRef)(null),[m,x]=(0,qt.useState)(null),[O,v]=(0,qt.useState)(!1),b=Math.max(0,o.length-jh),h=b>0&&!O,w=d?Math.min(d.index,b):b,B=o.map((I,E)=>({comment:I,index:E})).slice(h?w:0),M=ur(),S=I=>{if(p){p(I);return}window.open(M(I.uuid??""),"_blank","noopener,noreferrer")},D=I=>{if(c){c(I);return}window.open(M(I.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},R=ot().slots?.avatar;return(0,L.jsxs)(X.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,L.jsxs)(X.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,L.jsx)(cn,{sx:{fontSize:18,display:"block",color:"#37352f"}}),(0,L.jsxs)(X.Box,{sx:{fontSize:ga,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),b>0&&(!h||w>0)?(0,L.jsx)(X.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:h?`\uC774\uC804 \uB313\uAE00 ${w}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?(0,L.jsx)(X.Box,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(0,L.jsx)(X.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,L.jsxs)(X.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,L.jsx)(X.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,L.jsx)(R,{name:I.author,src:u||void 0,size:44})}):(0,L.jsx)(X.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,L.jsx)(Vt,{src:u,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Vn[0]},iconFontSize:24})})})(),(0,L.jsxs)(X.Box,{sx:{flex:1,minWidth:0},children:[(0,L.jsxs)(X.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[(0,L.jsx)(X.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:I.author}),(0,L.jsx)(X.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:I.time}),H?(0,L.jsx)(X.Box,{sx:{ml:"auto"}}):(0,L.jsxs)(X.Box,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[(0,L.jsx)(hf,{kind:"like",reactions:I.likes,myAccountSeq:n,onToggle:()=>s?.(e,E,"like")}),(0,L.jsx)(hf,{kind:"ack",reactions:I.acks,myAccountSeq:n,onToggle:()=>s?.(e,E,"ack")})]}),H?(0,L.jsxs)(X.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,L.jsx)(X.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,L.jsx)(kf.default,{sx:{fontSize:15}})}),(0,L.jsx)(X.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:u=>x({anchorEl:u.currentTarget,index:E}),sx:{color:"#9a9a97"},children:(0,L.jsx)(yi.default,{sx:{fontSize:15}})})]}):null]}),d?.index===E?(0,L.jsxs)(X.Box,{sx:{mt:.5},children:[(0,L.jsx)(X.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,L.jsxs)(X.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,z)=>z!==y)});return Ca(u.name)&&u.uuid?(0,L.jsxs)(X.Box,{sx:{position:"relative"},children:[(0,L.jsx)(X.Box,{component:"img",src:M(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,L.jsx)(X.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,L.jsx)(yi.default,{sx:{fontSize:14}})})]},`kept-${u.uuid}-${y}`):(0,L.jsx)(X.Chip,{size:"small",icon:(0,L.jsx)(tr.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,z)=>z!==y)});return Ca(u.name)?(0,L.jsxs)(X.Box,{sx:{position:"relative"},children:[(0,L.jsx)(X.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,L.jsx)(X.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,L.jsx)(yi.default,{sx:{fontSize:14}})})]},`new-${u.name}-${y}`):(0,L.jsx)(X.Chip,{size:"small",icon:(0,L.jsx)(tr.default,{sx:{fontSize:14}}),label:`${u.name} (\uC0C8 \uD30C\uC77C)`,onDelete:k,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${u.name}-${y}`)}),(0,L.jsx)(X.Tooltip,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:(0,L.jsx)(X.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>f.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:(0,L.jsx)(Cf.default,{sx:{fontSize:20}})})})]}),(0,L.jsxs)(X.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[(0,L.jsx)(X.Button,{size:"small",color:"inherit",onClick:()=>g(null),children:"\uCDE8\uC18C"}),(0,L.jsx)(X.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,L.jsx)(X.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,L.jsxs)(X.Box,{children:[I.text?(0,L.jsx)(X.Box,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:I.text}):null,(I.attachments??[]).length>0?(0,L.jsx)(X.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(I.attachments??[]).map((u,y)=>{let k=!!u.uuid;if(Ca(u.name)&&k)return(0,L.jsx)(X.Box,{component:"img",src:M(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 z=ba(u.name);return(0,L.jsx)(X.Chip,{size:"small",icon:(0,L.jsx)(tr.default,{sx:{fontSize:14}}),label:`${u.name} (${Jl(u.size)})`,clickable:k,onClick:k?()=>z?S(u):D(u):void 0,title:k?`${u.name} ${z?"\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,L.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 Ca(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function ts({onSubmit:e}){let[o,t]=(0,qt.useState)(""),[n,r]=(0,qt.useState)([]),[i,l]=(0,qt.useState)(!1),s=(0,qt.useRef)(null),p=(0,qt.useRef)(null),c=Ue(),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,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(X.IconButton,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>s.current?.click(),sx:{color:"#9a9a97"},children:(0,L.jsx)(tr.default,{sx:{fontSize:20}})}),(0,L.jsx)(X.IconButton,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>p.current?.click(),sx:{color:"#9a9a97"},children:(0,L.jsx)(vf.default,{sx:{fontSize:20}})})]});return(0,L.jsxs)(X.Box,{children:[n.length>0?(0,L.jsx)(X.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((m,x)=>Ca(m.name)?(0,L.jsxs)(X.Box,{sx:{position:"relative"},children:[(0,L.jsx)(X.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,L.jsx)(X.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(O=>O.filter((v,b)=>b!==x)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,L.jsx)(yi.default,{sx:{fontSize:14}})})]},`${m.name}-${x}`):(0,L.jsx)(X.Chip,{size:"small",icon:(0,L.jsx)(tr.default,{sx:{fontSize:14}}),label:`${m.name} (${Jl(m.size)})`,onDelete:()=>r(O=>O.filter((v,b)=>b!==x)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${x}`))}):null,(0,L.jsxs)(X.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,L.jsxs)(X.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,L.jsx)(tr.default,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,(0,L.jsx)(bf.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,L.jsxs)(X.Box,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[f,(0,L.jsx)(X.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:g,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,L.jsx)(es.default,{sx:{fontSize:22}})})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(X.Box,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:f}),(0,L.jsx)(X.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,L.jsx)(es.default,{sx:{fontSize:22}})})]})]}),(0,L.jsx)(X.Box,{component:"input",ref:s,type:"file",multiple:!0,onChange:m=>{d(m.target.files),m.target.value=""},sx:{display:"none"}}),(0,L.jsx)(X.Box,{component:"input",ref:p,type:"file",accept:"image/*",multiple:!0,onChange:m=>{d(m.target.files),m.target.value=""},sx:{display:"none"}})]})}var Ia=require("react"),Co=require("@mui/material"),Rf=a(require("@mui/icons-material/Close"),1),Pf=a(require("@mui/icons-material/ArrowBack"),1),zf=a(require("@mui/icons-material/ShareOutlined"),1),Af=a(require("@mui/icons-material/ContentCopyOutlined"),1),qf=a(require("@mui/icons-material/CheckCircle"),1),Lf=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Nf=a(require("@mui/icons-material/HistoryOutlined"),1),Ff=a(require("@mui/icons-material/PrintOutlined"),1);var _f=require("react"),ct=require("@mui/material"),wf=require("@ehfuse/mui-form-dialog"),Df=require("@ehfuse/overlay-scrollbar");var Zo=require("react/jsx-runtime"),Yh={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 If(e){return String(e??"").trim()||"\uC5C6\uC74C"}function Xh(e){if(e.kind!=="field")return Yh[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) "${If(t)}" \u2192 "${If(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Si({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let l=Ue();(0,_f.useEffect)(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let s=(0,Zo.jsx)(ct.Box,{sx:{height:l?"100%":420,minHeight:0},children:(0,Zo.jsx)(Df.OverlayScrollbar,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Zo.jsxs)(ct.Box,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[n&&!t?(0,Zo.jsxs)(ct.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,Zo.jsx)(ct.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?(0,Zo.jsx)(ct.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(p=>(0,Zo.jsxs)(ct.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,Zo.jsx)(ct.Box,{sx:{flexShrink:0,...l?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Bt(p.acted_time)}),(0,Zo.jsxs)(ct.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,Zo.jsx)(ct.Box,{component:"span",sx:{fontWeight:500},children:String(p.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,Zo.jsx)(ct.Box,{component:"span",sx:{ml:.5},children:Xh(p)})]})]},p.seq))]})})});return(0,Zo.jsx)(wf.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,Zo.jsx)(ct.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var va=require("@ehfuse/alerts");var Mf=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 Of(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Ot(e.start_date),n=Ot(e.due_date);(t||n)&&o.push(`\uAE30\uAC04: ${t&&n?`${t} ~ ${n}`:t||n}`),e.manager_name&&o.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let r=Go(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=Mf(e.content);i&&o.push("",i);let l=String(e.note??"").trim();return l&&o.push("",`\uBE44\uACE0: ${l}`),o.join(`
13
- `)}function Ef(e){navigator.clipboard.writeText(e).then(()=>(0,va.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,va.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 nr(e,o){let t=Of(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Ef(t)});return}Ef(t)}var Le=require("react/jsx-runtime");function ns({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=Ue(),[m,x]=(0,Ia.useState)(!1),[O,v]=(0,Ia.useState)(null),[b,h]=(0,Ia.useState)(null),w=Kn(e.icon||(e.is_notice?Vo:e.is_event?"event":Ye)),B=!!e.is_notice,M=!!e.is_event,S=B&&o>0&&(e.author_account_seq??0)===o,D=!Ut(e,o),R=!M&&(B?S:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsxs)(Co.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,Le.jsx)(Co.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,Le.jsx)(Pf.default,{})}):null,R&&!s?(0,Le.jsx)(Co.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Bt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Le.jsx)(Co.Checkbox,{checked:e.completed,icon:(0,Le.jsx)(Lf.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,Le.jsx)(qf.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(I,E)=>t(e.seq,E),sx:{p:0}})}):null,s?null:(0,Le.jsx)(Co.Tooltip,{title:D?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,Le.jsx)(Co.IconButton,{size:"small",onClick:D?void 0:I=>h(I.currentTarget),sx:{color:e.icon_color||(B?"#e5484d":"#1e3a8a")},children:(0,Le.jsx)(w,{sx:{fontSize:20}})})}),O!==null?(0,Le.jsx)(Co.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,Le.jsx)(Co.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B?"\uACF5\uC9C0":M?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,Le.jsx)(Co.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,Le.jsx)(Co.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,Le.jsx)(Co.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>x(!0),sx:{color:"#6b7280"},children:(0,Le.jsx)(Nf.default,{sx:{fontSize:20}})})}):null,(0,Le.jsx)(Co.Tooltip,{title:f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,Le.jsx)(Co.IconButton,{"aria-label":f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>nr(e,f),sx:{color:"#6b7280"},children:f?(0,Le.jsx)(zf.default,{sx:{fontSize:20}}):(0,Le.jsx)(Af.default,{sx:{fontSize:20}})})}),g?(0,Le.jsx)(Co.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,Le.jsx)(Co.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:(0,Le.jsx)(Ff.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,Le.jsx)(Co.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,Le.jsx)(Rf.default,{})}):null]}),(0,Le.jsx)(Jn,{anchorEl:b,value:e.icon||(B?Vo:""),color:e.icon_color||(B?"#e5484d":"#1e3a8a"),onSelect:I=>r(e.seq,I),onSelectColor:I=>i?.(e.seq,I),onClose:()=>h(null)}),(0,Le.jsx)(Si,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:d,onClose:()=>x(!1)})]})}var Jt=require("react"),se=require("@mui/material"),Yf=a(require("@mui/icons-material/ExpandLess"),1),Xf=a(require("@mui/icons-material/ExpandMore"),1),Qf=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),Zf=a(require("@mui/icons-material/Check"),1),Jf=a(require("@mui/icons-material/DirectionsRunOutlined"),1),ex=a(require("@mui/icons-material/SpeedOutlined"),1),Da=a(require("@mui/icons-material/CheckCircle"),1),ox=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ma=a(require("@mui/icons-material/CheckCircleOutlined"),1),ss=a(require("@mui/icons-material/AccessTimeOutlined"),1),tx=a(require("@mui/icons-material/AutorenewOutlined"),1),nx=a(require("@mui/icons-material/LabelOutlined"),1),rx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),ix=a(require("@mui/icons-material/SubjectOutlined"),1),ax=a(require("@mui/icons-material/StickyNote2Outlined"),1),lx=a(require("@mui/icons-material/PanToolAltOutlined"),1);var Hf=require("react"),Wf=require("@ehfuse/mui-form-controls"),$f=require("react/jsx-runtime");function rs({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,Hf.useState)(null);return(0,$f.jsx)(Wf.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"),ko=require("@mui/material"),Uf=a(require("@mui/icons-material/AccountTreeOutlined"),1),Vf=a(require("@mui/icons-material/Add"),1),Gf=a(require("@mui/icons-material/Close"),1),jf=a(require("@mui/icons-material/NextPlanOutlined"),1);function zn(e){return e.relations??[]}function Qh(e,o,t){return zn(e).some(n=>n.type===t&&n.task_seq===o.seq)||zn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Kf(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function _a(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 zn(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)=>Kf(m).localeCompare(Kf(x))),p=new Set;for(let m of zn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&zn(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&&zn(m).some(x=>x.type==="duplicate_of"&&x.task_seq===e.seq)),g=zn(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 wa(e,o){let t=_a(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function is(e,o){return wa(e,o)>0}var Te=require("react/jsx-runtime");function as({item:e,caption:o,onOpen:t,onUnlink:n}){let r=co(e.icon||Ye);return(0,Te.jsxs)(ko.Box,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[o?(0,Te.jsx)(ko.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?(0,Te.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,Te.jsxs)(ko.Box,{component:"span",onClick:t,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...t?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),(0,Te.jsx)(Xe,{option:Go(e),small:!0}),n?(0,Te.jsx)(ko.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Te.jsx)(Gf.default,{sx:{fontSize:15}})}):null]})}function ls({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)(()=>_a(e,o),[e,o]),x=m.lineage.length>=2,O=(0,An.useMemo)(()=>wa(e,o),[e,o]),v=(0,An.useMemo)(()=>{let h=new Set;for(let w of m.lineage)h.add(w.seq);for(let w of m.related)h.add(w.seq);for(let w of m.duplicates)h.add(w.seq);return m.duplicateOf&&h.add(m.duplicateOf.seq),[...h]},[m]),b=(h,w,B)=>{f({anchorEl:h,targetSeq:w,type:B})};return(0,Te.jsxs)(bt,{icon:(0,Te.jsx)(Uf.default,{sx:{fontSize:19,display:"block"}}),title:(0,Te.jsxs)(Te.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",O>0?(0,Te.jsx)(ko.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:O}):null]}),titleExtra:t?null:(0,Te.jsxs)(ko.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,Te.jsx)(ko.Button,{size:"small",color:"inherit",startIcon:(0,Te.jsx)(jf.default,{sx:{fontSize:16}}),onClick:h=>d(h.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,Te.jsx)(ko.Button,{size:"small",color:"inherit",startIcon:(0,Te.jsx)(Vf.default,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[x?(0,Te.jsx)(ko.Box,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((h,w)=>{let B=h.seq===e.seq,M=w===m.lineage.length-1;return(0,Te.jsxs)(ko.Box,{sx:{display:"flex",gap:1},children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,Te.jsx)(ko.Box,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":h.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),M?null:(0,Te.jsx)(ko.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,Te.jsxs)(ko.Box,{sx:{flex:1,minWidth:0,pb:M?0:.5},children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Te.jsxs)(ko.Box,{component:"span",onClick:!B&&n?()=>n(h.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":h.completed?"#9a9a97":"#37352f",textDecoration:h.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[h.ticket_no?`${h.ticket_no} `:"",h.title]}),(0,Te.jsx)(Xe,{option:Go(h),small:!0})]}),(0,Te.jsx)(ko.Box,{sx:{fontSize:12,color:"#9a9a97"},children:h.completed&&h.completed_time?`${h.completed_time} \uC644\uB8CC`:h.created_time??""})]})]},h.seq)})}):null,m.duplicateOf?(0,Te.jsx)(as,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?h=>b(h.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(h=>(0,Te.jsx)(as,{item:h,caption:"\uC911\uBCF5",onOpen:n?()=>n(h.seq):void 0,onUnlink:!t&&i?w=>b(w.currentTarget,h.seq,"duplicate_of"):void 0},`dup-${h.seq}`)),m.related.map(h=>(0,Te.jsx)(as,{item:h,onOpen:n?()=>n(h.seq):void 0,onUnlink:!t&&i?w=>b(w.currentTarget,h.seq,"related"):void 0},`rel-${h.seq}`)),O===0?(0,Te.jsx)(ko.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?(0,Te.jsx)(xi,{open:s,task:e,tasks:o,excludeSeqs:v,onClose:()=>p(!1),onSubmit:(h,w)=>r(e.seq,h,w)}):null,(0,Te.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,Te.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 Ar({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,_.jsx)(se.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function cs({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:b,onChangeContent:h,onChangeContentHeight:w,onAddChecklistItem:B,onToggleChecklistItem:M,onRemoveChecklistItem:S,onUpdateChecklistItem:D,onConvertChecklistToTask:R,onOpenChecklistTask:I,onLinkChecklistTask:E,resolveChecklistTask:H,relatedTasksPool:u,onOpenRelatedTask:y,onLinkRelatedTask:k,onUnlinkRelatedTask:T,onCreateFollowUpTask:z,onAddAttachments:F,onRemoveAttachment:ge,onPreview:he,onDownload:ke,onUpdateComment:xe,onRemoveComment:qe,onToggleCommentReaction:Ee,currentUserName:ye="",myAccountSeq:re=0,noticeAdmin:Je=!1,hideProject:eo=!1,hideLabel:K=!1,showTitle:Y=!1,onChangeTitle:ne,onToggleCompleted:C,onChangeIcon:W,onChangeIconColor:oe,employees:j=[],onAckConfirm:Ge,onRequestConfirm:N,onChangeBugField:Se,sprints:Me=[],sprintProject:Be=!1,hideSprint:oo=!1,onChangeSprint:ee,onChangeStoryPoints:$e,onChangeResolution:Bn,onClaimTask:Z,onVerifyBug:vo}){let[dt,pt]=(0,Jt.useState)(null),[ir,Ht]=(0,Jt.useState)(null),[ft,an]=(0,Jt.useState)(null),[Wt,Tt]=(0,Jt.useState)(null),[ar,He]=(0,Jt.useState)(!1),q={[wt]: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"}},[G,ue]=(0,Jt.useState)(null),[be,De]=(0,Jt.useState)(null),[so,Do]=(0,Jt.useState)(null),[Ro,qo]=(0,Jt.useState)(null),Ke=!!e.is_notice,ie=!!e.is_event,Uo=!!e.is_bug,Jo=!!Z&&Xr(e,re),Cn=!!Z&&Qr(e,re),Et=!!vo&&Uo&&!!e.completed&&re>0&&(e.author_account_seq??0)===re&&!(e.acks??[]).some(A=>A.account_seq===re),Po=!Ut(e,re),yt=!e.is_event&&(e.is_notice?re>0&&(e.author_account_seq??0)===re:(e.author_account_seq??0)===re||(e.manager_account_seq??0)===re),Wn=Kn(e.icon||(e.is_notice?Vo:e.is_event?"event":Ye)),Nr=Ke?!Yr(e,re):Po,lr=Jo||Cn?(0,_.jsxs)(Gn,{onClick:A=>qo(A.currentTarget),children:[(0,_.jsx)(lx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Fr=Ke?Ti(e,j):"",xt=Ke?Yl(e,j,re):null,Mo=!Ke&&!ie?ri(e,re):null,sr=!!(Mo&&Mo.total>0||Ke&&xt);return(0,_.jsxs)(_.Fragment,{children:[Y?(0,_.jsxs)(se.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[yt?(0,_.jsx)(se.Checkbox,{checked:e.completed,icon:(0,_.jsx)(ox.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,_.jsx)(Da.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(A,cr)=>{ft||an({anchorEl:A.currentTarget,nextCompleted:cr})},sx:{p:0,mt:.25}}):null,(0,_.jsx)(se.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:Po?void 0:A=>Ht(A.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(Ke?"#e5484d":"#1e3a8a")},children:(0,_.jsx)(Wn,{sx:{fontSize:20}})}),(0,_.jsx)(se.Box,{sx:{flex:1,minWidth:0},children:dt!==null?(0,_.jsx)(se.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:dt,onChange:A=>pt(A.target.value),onBlur:()=>{dt.trim()&&dt.trim()!==e.title&&ne(e.seq,dt.trim()),pt(null)},onKeyDown:A=>{A.key==="Enter"&&A.target.blur(),A.key==="Escape"&&pt(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,_.jsx)(se.Box,{onClick:()=>pt(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:!!ft,anchorEl:ft?.anchorEl??null,title:ft?.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:ft?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>an(null),onConfirm:()=>{ft&&C(e.seq,ft.nextCompleted),an(null)}}),(0,_.jsx)(Jn,{anchorEl:ir,value:e.icon||(Ke?Vo:""),color:e.icon_color||(Ke?"#e5484d":"#1e3a8a"),onSelect:A=>W(e.seq,A),onSelectColor:A=>oe?.(e.seq,A),onClose:()=>Ht(null)})]}):null,(0,_.jsxs)(se.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[wt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,_.jsx)(di,{hideProject:eo,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:!ie,notice:Ke,event:ie,readOnly:Po,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:q,reminderLocked:e.completed,managerAction:lr,leading:(0,_.jsxs)(_.Fragment,{children:[Et||lr&&(Ke||ie)?(0,_.jsxs)(se.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ke||ie?lr:null,Et?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se.Button,{variant:"contained",size:"large",onClick:()=>vo?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,_.jsx)(se.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>vo?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Uo&&e.ticket_no?(0,_.jsx)(_e,{icon:(0,_.jsx)(Qf.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,_.jsx)(se.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,ie?null:(0,_.jsx)(se.Box,{sx:Uo&&e.ticket_no||sr?void 0:{gridColumn:"1 / -1"},children:(0,_.jsx)(_e,{icon:(0,_.jsx)(tx.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Po||e.completed?void 0:A=>ue(A),children:(0,_.jsx)(Xe,{option:Go(e)})})}),Mo&&Mo.total>0?(0,_.jsx)(se.Box,{children:(0,_.jsx)(_e,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Mo.canConfirm?(0,_.jsx)(se.Button,{size:"small",variant:"contained",onClick:()=>Ge?.(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)(se.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Mo.myTime?(0,_.jsx)(Da.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>Tt({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:[Mo.count," / ",Mo.total]})})}):null,Ke&&xt?(0,_.jsx)(se.Box,{children:(0,_.jsx)(_e,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,_.jsx)(se.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:xt.canAck?(0,_.jsx)(se.Button,{size:"small",variant:"contained",onClick:()=>Ge?.(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)(se.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:xt.acked?(0,_.jsx)(Da.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>Tt({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:xt.total>0&&xt.count>=xt.total?"\uC644\uB8CC":(0,_.jsxs)(_.Fragment,{children:[xt.count,(0,_.jsx)(se.Box,{component:"span",sx:{mx:.4},children:"/"}),xt.total]})})})})}):null,Be&&!oo&&!ie&&!Ke?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(_e,{icon:(0,_.jsx)(Jf.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Po?void 0:A=>De(A),children:(e.sprint_seq??0)>0?Me.find(A=>A.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,_.jsx)(Ar,{label:"\uBBF8\uBC30\uC815"})}),(0,_.jsx)(_e,{icon:(0,_.jsx)(ex.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,_.jsx)(Xt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Po,onCommit:A=>$e?.(e.seq,Number(A.replace(/[^0-9.]/g,""))||0)})})]}):null,ie||K?null:(0,_.jsx)(se.Box,{sx:[{gridColumn:"1 / -1"},q??null],children:(0,_.jsx)(_e,{icon:(0,_.jsx)(nx.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Po?void 0:A=>Do(A),children:(e.label_keys??[]).length>0?(0,_.jsx)(sn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,_.jsx)(Ar,{})})})]}),trailing:(0,_.jsxs)(_.Fragment,{children:[Uo?(0,_.jsx)(pi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Po,showResolution:!!e.completed,onChangeRepro:A=>Se?.(e.seq,"bug_repro",A),onChangeDevice:A=>Se?.(e.seq,"bug_device",A),onChangeWhere:A=>Se?.(e.seq,"bug_where",A),onChangeVersion:A=>Se?.(e.seq,"bug_version",A),onChangeResolution:A=>Bn?.(e.seq,A)}):null,(0,_.jsx)(_e,{icon:(0,_.jsx)(rx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[zo(9),q??null],children:e.created_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Yo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,_.jsx)(Ar,{})}),(0,_.jsx)(_e,{icon:(0,_.jsx)(ss.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[zo(11),q??null],children:e.created_time?Bt(e.created_time):(0,_.jsx)(Ar,{})}),e.completed?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(_e,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[zo(10),q??null],children:e.completed_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Yo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,_.jsx)(Ar,{})}),(0,_.jsx)(_e,{icon:(0,_.jsx)(ss.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[zo(12),q??null],children:e.completed_time?Bt(e.completed_time):(0,_.jsx)(Ar,{})})]}):null]})}),(0,_.jsxs)(se.Box,{sx:{display:"none",[wt]:{display:"block",mt:1.5,mb:0}},children:[(0,_.jsx)(se.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,_.jsx)(se.ButtonBase,{onClick:()=>He(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)(Yf.default,{sx:{fontSize:18}})]}):(0,_.jsxs)(_.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,_.jsx)(Xf.default,{sx:{fontSize:18}})]})})]}),(0,_.jsxs)(se.Box,{children:[(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[wt]:{mt:0,mb:1.25}}}),(0,_.jsx)(bt,{icon:(0,_.jsx)(ix.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,_.jsx)(se.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(fi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:w?A=>w(e.seq,A):void 0,readOnly:Po,onChange:A=>h(e.seq,A)})})}),e.is_bug?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(bt,{icon:(0,_.jsx)(ax.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,_.jsx)(se.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(rs,{value:e.note,readOnly:Nr,onCommit:A=>b(e.seq,A)})})})]}),ie?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(gi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Nr,onAdd:B,onToggle:M,onRemove:S,onUpdate:D,onConvertToTask:R,onOpenLinkedTask:I,resolveLinkedTask:H,linkCandidates:u,linkBaseTask:e,onLinkExistingTask:E})]}),u&&!ie&&!Ke&&is(e,u)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ls,{task:e,tasks:u,readOnly:Po,onOpenTask:y,onLink:k,onUnlink:T,onCreateFollowUp:z})]}):null,(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(hi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Nr,onAdd:F,onRemove:ge,onPreview:he?A=>he({...A,taskSeq:e.seq}):void 0,onDownload:ke?A=>ke({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(os,{taskSeq:e.seq,comments:e.comments??[],currentUserName:ye,myAccountSeq:re,avatarSrcByName:n,onUpdate:xe,onRemove:qe,onToggleReaction:Ee,onPreview:he?A=>he({...A,taskSeq:e.seq}):void 0,onDownload:ke?A=>ke({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(jr,{anchorEl:G,value:e.status,options:Ke?gr:Uo?In:hr,onSelect:A=>r(e.seq,A),onClose:()=>ue(null)}),(0,_.jsx)(se.Menu,{transitionDuration:0,anchorEl:be,open:!!be,onClose:()=>De(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Me.filter(A=>`custom-${A.group_seq}`===String(e.tab_key??"")).map(A=>({seq:A.seq,label:ht(A)}))].map(A=>(0,_.jsxs)(se.MenuItem,{onClick:()=>{ee?.(e.seq,A.seq),De(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[A.label,(e.sprint_seq??0)===A.seq?(0,_.jsx)(Zf.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},A.seq))}),(0,_.jsx)(ni,{anchorEl:Wt?.anchorEl??null,open:!!Wt?.open,acks:e.acks??[],total:xt?.total??Mo?.total??0,avatarSrcByName:n,onRequestConfirm:N&&Mo&&Mo.count<Mo.total?()=>{N(e.seq),Tt(A=>A?{...A,open:!1}:null)}:void 0,onClose:()=>Tt(A=>A?{...A,open:!1}:null)}),(0,_.jsx)(ki,{anchorEl:so,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:A=>i(e.seq,Vr(e.label_keys??[],A)),onAddLabel:l,onClose:()=>Do(null)}),(0,_.jsx)(uo,{open:!!Ro,anchorEl:Ro,title:Jo?"\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:()=>qo(null),onConfirm:()=>{Z?.(e.seq),qo(null)}})]})}var So=require("react/jsx-runtime");function Zh(){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 Jh({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=Ue(),v=(0,hn.useRef)(null);o&&(v.current=o);let b=o??v.current,[h,w]=(0,hn.useState)(!1),[B,M]=(0,hn.useState)({}),S=Object.keys(B).length>0;(0,hn.useEffect)(()=>{M({})},[o?.seq,e]);let D=(0,hn.useRef)(null);if((0,hn.useEffect)(()=>{D.current?.scrollTo({top:0})},[o?.seq]),!b)return null;let R=O&&S?{...b,...B}:b,I=(k,T)=>{O?M(z=>({...z,...k})):T()},E=()=>{let k=B;M({});let T=b.seq,z=k.title===void 0?void 0:String(k.title).trim();if(r){let F={...k};z!==void 0&&(z?F.title=z:delete F.title),Object.keys(F).length>0&&r(T,F),(0,ms.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}z&&s(T,z),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,ms.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,z)=>I({[T]:z},()=>x.onChangeDate(k,T,z)),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,So.jsx)(cs,{...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,So.jsx)(ts,{onSubmit:(k,T)=>n(R.seq,k,T)},R.seq);return O?(0,So.jsxs)(So.Fragment,{children:[(0,So.jsx)(ux.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,So.jsx)(cx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>w(!0)}]:[],{icon:(0,So.jsx)(sx.default,{sx:{ml:f?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>nr(R,!0)},{icon:(0,So.jsx)(Dt.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,So.jsx)(Dt.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:u})}]},b.seq),(0,So.jsx)(Si,{open:h,taskSeq:R.seq,items:d,loading:g,onLoad:f,onClose:()=>w(!1)})]}):(0,So.jsx)(Dt.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,So.jsxs)(Dt.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,So.jsx)(ns,{task:R,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m}),(0,So.jsx)(Dt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,So.jsx)(Dt.Box,{sx:{flex:1,minHeight:0},children:(0,So.jsx)(mx.default,{ref:D,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:u})}),(0,So.jsx)(Dt.Divider,{sx:{borderColor:"#37352f"}}),(0,So.jsx)(Dt.Box,{sx:{flexShrink:0},children:y})]})})}var en=require("react"),To=require("@mui/material"),fx=require("@ehfuse/mui-form-dialog"),xx=a(require("@mui/icons-material/EditOutlined"),1),us=require("@ehfuse/alerts"),bn=require("@ehfuse/mui-form-controls");var Ea="custom-";function dx(e){return e.startsWith(Ea)}function eb(e){return e>0?`${Ea}${e}`:""}function Oa(e){if(!dx(e))return 0;let o=Number(e.slice(Ea.length));return Number.isInteger(o)&&o>0?o:0}var Ae=require("react/jsx-runtime"),ob=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function px(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function tb({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,en.useState)(""),[g,f]=(0,en.useState)(""),[m,x]=(0,en.useState)(""),[O,v]=(0,en.useState)(""),[b,h]=(0,en.useState)(""),[w,B]=(0,en.useState)(!1),[M,S]=(0,en.useState)(0);(0,en.useEffect)(()=>{e&&(d(p.length===1?p[0].key:""),f(""),x(""),v(""),h(""),S(0))},[e]);let D=()=>{f(""),x(""),v(""),h(""),S(0)},R=u=>{S(u.seq),d(`custom-${u.group_seq}`),f(u.name),x(u.goal),v(u.start_date),h(u.end_date)},I=async()=>{let u=Oa(c);if(!u){(0,us.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){(0,us.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(M>0){i(M,{name:g.trim(),goal:m.trim(),start_date:O,end_date:b}),D();return}await r({group_seq:u,name:g.trim(),goal:m.trim(),start_date:O,end_date:b})&&D()}finally{B(!1)}},E=new Map(o.map(u=>[Oa(u.key),u.label])),H=(0,Ae.jsx)(To.Box,{children:p.length===0?(0,Ae.jsx)(To.Box,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsxs)(To.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Ae.jsx)(bn.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:M>0}),(0,Ae.jsx)(bn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:u=>f(u.target.value)}),(0,Ae.jsx)(bn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:O,onChange:u=>v(u.target.value)}),(0,Ae.jsx)(bn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:b,onChange:u=>h(u.target.value)}),(0,Ae.jsx)(bn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:u=>x(u.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Ae.jsxs)(To.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[M>0?(0,Ae.jsx)(To.Button,{color:"inherit",onClick:D,disabled:w,children:"\uCDE8\uC18C"}):null,(0,Ae.jsx)(To.Button,{variant:"contained",onClick:()=>{I()},disabled:w,children:M>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Ae.jsx)(To.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Ae.jsx)(To.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>(0,Ae.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Ae.jsxs)(To.Box,{sx:{minWidth:0},children:[(0,Ae.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Ae.jsx)(To.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:u.name}),(0,Ae.jsx)(To.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,Ae.jsxs)(To.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[px(u.start_date)," ~ ",px(u.end_date)]})]}),u.goal?(0,Ae.jsx)(To.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:u.goal}):null]}),(0,Ae.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Ae.jsx)(bn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:u.status,options:ob.map(y=>({value:y.value,label:y.label})),onChange:y=>l(u.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),(0,Ae.jsx)(To.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>R(u),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Ae.jsx)(xx.default,{sx:{fontSize:18}})}),(0,Ae.jsx)(To.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(u.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Ae.jsx)(dn,{style:{width:16,height:16}})})]})]},u.seq))})]})});return(0,Ae.jsx)(fx.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,Ae.jsx)(To.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var ds=require("react"),We=require("@mui/material"),gx=require("@ehfuse/mui-form-dialog"),hx=a(require("@mui/icons-material/OpenInNewOutlined"),1),bx=a(require("@mui/icons-material/EventOutlined"),1),kx=require("@ehfuse/alerts");var we=require("react/jsx-runtime");function nb({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,ds.useState)(""),[s,p]=(0,ds.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,kx.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,we.jsxs)(We.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,we.jsxs)(We.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,we.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,we.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,we.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,we.jsx)(We.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,we.jsx)(We.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,m)=>(0,we.jsxs)(We.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[(0,we.jsx)(bx.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,we.jsx)(We.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,we.jsx)(We.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{d(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,we.jsx)(dn,{sx:{fontSize:18}})})]},f.seq))}):(0,we.jsx)(We.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,we.jsx)(We.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,we.jsx)(We.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,we.jsxs)(We.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,we.jsx)(We.Box,{children:(0,we.jsxs)(We.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,we.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,we.jsx)(We.Box,{children:(0,we.jsxs)(We.Box,{component:"span",children:[(0,we.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,we.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,we.jsx)(We.Box,{children:(0,we.jsx)(We.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,we.jsx)(We.Box,{children:(0,we.jsx)(We.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,we.jsxs)(We.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,we.jsx)(We.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,we.jsx)(We.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{c()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,we.jsx)(gx.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,we.jsx)(We.Button,{variant:"outlined",startIcon:(0,we.jsx)(hx.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,we.jsx)(We.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var Oo=require("@mui/material"),Tx=require("@ehfuse/mui-form-dialog"),yx=a(require("@mui/icons-material/ContentCopyOutlined"),1),ps=a(require("@mui/icons-material/OpenInNewOutlined"),1),fs=require("@ehfuse/alerts"),Ne=require("react/jsx-runtime");function Sx(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function rb({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??Sx,s=o.subscribed?l(o.token):"",p=()=>{navigator.clipboard.writeText(s).then(()=>(0,fs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,fs.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,Ne.jsxs)(Oo.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,Ne.jsxs)(Oo.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,Ne.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,Ne.jsxs)(Oo.Box,{sx:{color:"#8a6d1d",bgcolor:"#faf1d7",borderRadius:1,px:1.5,py:1.25,lineHeight:1.7},children:["\uC9C0\uAE08\uC740 \uCE98\uB9B0\uB354\uC5D0 \uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",(0,Ne.jsx)("br",{}),(0,Ne.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,Ne.jsxs)(Ne.Fragment,{children:[(0,Ne.jsx)(Oo.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,Ne.jsxs)(Oo.Box,{sx:{display:"flex",gap:2},children:[(0,Ne.jsx)(Oo.Button,{variant:"outlined",startIcon:(0,Ne.jsx)(yx.default,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,Ne.jsx)(Oo.Button,{variant:"contained",startIcon:(0,Ne.jsx)(ps.default,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,Ne.jsxs)(Oo.Box,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[(0,Ne.jsx)(Oo.Box,{children:(0,Ne.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,Ne.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,Ne.jsx)(Oo.Box,{children:(0,Ne.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,Ne.jsx)(Oo.Box,{children:(0,Ne.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,Ne.jsx)(Oo.Box,{children:(0,Ne.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,Ne.jsx)(Oo.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,Ne.jsx)(Tx.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,Ne.jsx)(Oo.Button,{variant:"outlined",startIcon:(0,Ne.jsx)(ps.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Ne.jsx)(Oo.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var on=require("react"),tn=require("@mui/material"),Bx=require("@ehfuse/mui-form-dialog"),Cx=require("@ehfuse/mui-form-controls"),vx=require("@ehfuse/tree-view");var Ko=require("react/jsx-runtime");function Ix(e){return`${e.name}#${e.seq}`}function ib(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function ab(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 lb(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 sb(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Ix(e),renderLabel:(0,Ko.jsx)(tn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,Ko.jsx)(tn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function _x(e,o){let t=(e.groups??[]).map(r=>_x(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>lb(r,o)).map(sb);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function cb({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,on.useState)(""),p=(0,on.useMemo)(()=>e.map(d=>_x(d,l.trim().toLowerCase())).filter(d=>d!==null),[e,l]),c=(0,on.useMemo)(()=>o.filter(d=>t.includes(d.seq)).map(Ix),[]);return(0,Ko.jsxs)(Ko.Fragment,{children:[(0,Ko.jsx)(tn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Ko.jsx)(Cx.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,Ko.jsx)(tn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,Ko.jsx)(vx.TreeView,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:d=>i(d.map(ib).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function mb({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=Ue(),[d,g]=(0,on.useState)([]),[f,m]=(0,on.useState)(0),x=(0,on.useMemo)(()=>ab(n),[n]),O=i??[];(0,on.useEffect)(()=>{e&&(g(O),m(b=>b+1))},[e]);let v=()=>{let b=x.filter(h=>d.includes(h.seq));s(r?b:b.slice(0,1)),p()};return(0,Ko.jsx)(Bx.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,Ko.jsx)(tn.Box,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:(0,Ko.jsx)(cb,{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,Ko.jsx)(tn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,Ko.jsx)(tn.Button,{variant:"contained",onClick:v,children:l})}})}var qr=require("react"),Nt=require("@mui/material"),Mx=require("@ehfuse/mui-form-dialog"),Ex=require("@ehfuse/mui-form-controls");var Lt=require("@mui/material"),mt=require("react/jsx-runtime");function ub(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 xs({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,...ub(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,mt.jsx)(Lt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,mt.jsxs)(Lt.Box,{children:[(0,mt.jsxs)(Lt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,mt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?(0,mt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,mt.jsx)(Lt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),(0,mt.jsx)(Lt.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,mt.jsxs)(Lt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,mt.jsx)(Lt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),(0,mt.jsx)(Lt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},d.sprint.seq)})}),(0,mt.jsx)(Lt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(d=>(0,mt.jsxs)(Lt.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 Dx=require("react"),qn=require("@mui/material"),wo=require("react/jsx-runtime");function wx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function db(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function gs(e){return e.slice(5).replace("-",".")}function hs({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,Dx.useMemo)(()=>{let b=wx(e.start_date),h=wx(e.end_date);if(!b||!h||h<b||Math.round((h.getTime()-b.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 M=B.some(u=>(u.story_points??0)>0),S=u=>M?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(b);u<=h;u.setDate(u.getDate()+1))I.push(db(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:M,actual:H}},[e,o,t]);if(!r)return(0,wo.jsx)(qn.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return(0,wo.jsx)(qn.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:l,usePoints:s,actual:p}=r,c=600,d=200,g=8,f=b=>i.length===1?0:b/(i.length-1)*c,m=b=>g+(d-g*2)*(1-b/Math.max(1,l)),x=`${f(0)},${m(l)} ${f(i.length-1)},${m(0)}`,O=p.map(b=>`${f(i.indexOf(b.day))},${m(b.value)}`).join(" "),v=p[p.length-1];return(0,wo.jsxs)(qn.Box,{children:[(0,wo.jsxs)(qn.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,wo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),v?(0,wo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,wo.jsx)(qn.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:v.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,wo.jsx)(qn.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,wo.jsxs)("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,wo.jsx)("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),(0,wo.jsx)("polyline",{points:x,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?(0,wo.jsx)("polyline",{points:O,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,v?(0,wo.jsx)("circle",{cx:f(i.indexOf(v.day)),cy:m(v.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,wo.jsxs)(qn.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,wo.jsx)("span",{children:gs(e.start_date)}),t>e.start_date&&t<e.end_date?(0,wo.jsxs)("span",{children:["\uC624\uB298 ",gs(t)]}):null,(0,wo.jsx)("span",{children:gs(e.end_date)})]})]})}var ut=require("react/jsx-runtime");function pb({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,qr.useState)(0);(0,qr.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,qr.useMemo)(()=>o.find(d=>d.seq===l)??null,[o,l]),c=(0,ut.jsxs)(Nt.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,ut.jsxs)(Nt.Box,{sx:{px:3,py:2.5},children:[(0,ut.jsx)(Nt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,ut.jsx)(xs,{sprints:o,tasks:t})]}),(0,ut.jsx)(Nt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ut.jsxs)(Nt.Box,{sx:{px:3,py:2.5},children:[(0,ut.jsx)(Nt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,ut.jsx)(Ex.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,ut.jsx)(hs,{sprint:p,tasks:t,todayStr:n}):(0,ut.jsx)(Nt.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694."})]})]});return(0,ut.jsx)(Mx.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,ut.jsx)(Nt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var nn=require("@mui/material");var kn=require("react/jsx-runtime");function fb({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,kn.jsxs)(nn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,kn.jsx)(nn.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,kn.jsxs)(nn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,kn.jsx)(nn.Checkbox,{size:"small",checked:p,sx:{p:0}}),(0,kn.jsx)(Yo,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,kn.jsx)(nn.Divider,{}),(0,kn.jsx)(nn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Ox=require("react"),Lr=require("@mui/material"),Rx=a(require("@mui/icons-material/KeyboardArrowDown"),1),Px=a(require("@mui/icons-material/Check"),1);var rn=require("react/jsx-runtime");function xb({value:e,onChange:o,options:t}){let[n,r]=(0,Ox.useState)(null),i=t??Ni,l=Ni.find(s=>s.value===e)?.label??"";return(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.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,rn.jsx)(Rx.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,rn.jsx)(Lr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,rn.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,rn.jsx)(Px.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var rr=require("@mui/material"),bs=require("@ehfuse/mui-form-controls");function Ln(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Bi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function gb(e=new Date){return{fromDate:Ln(Bi(1,e)),toDate:Ln(e)}}var Tn=require("react/jsx-runtime"),hb=[{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 ks({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Ln(Bi(i)),Ln(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Ln(Bi(i))&&o===Ln(new Date);return(0,Tn.jsxs)(rr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,Tn.jsx)(rr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:hb.map(i=>{let l=r(i.months);return(0,Tn.jsx)(rr.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,Tn.jsxs)(rr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Tn.jsx)(bs.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,Tn.jsx)(rr.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,Tn.jsx)(bs.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var zx=require("@mui/material");var Ts=require("react/jsx-runtime");function bb({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,Ts.jsx)(zx.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,Ts.jsx)(ks,{fromDate:o,toDate:t,onChange:n})})}var Nn=require("@mui/material"),qx=a(require("@mui/icons-material/Checklist"),1),Lx=a(require("@mui/icons-material/Face"),1),Nx=a(require("@mui/icons-material/Publish"),1),Fx=a(require("@mui/icons-material/NotificationsOutlined"),1),Hx=a(require("@mui/icons-material/BugReportOutlined"),1),Wx=a(require("@mui/icons-material/DescriptionOutlined"),1),$x=a(require("@mui/icons-material/Inventory2Outlined"),1);var Mt=require("react/jsx-runtime");function Ax(e,o){return o>0?`${e} (${o})`:e}var kb=[{id:"my",label:"\uC804\uCCB4",icon:(0,Mt.jsx)(qx.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Mt.jsx)(Fx.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Mt.jsx)(Lx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Mt.jsx)(Nx.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Mt.jsx)(Hx.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Mt.jsx)($x.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Mt.jsx)(Wx.default,{sx:{fontSize:18}}),hideCount:!0}];function Tb(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 yb({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=le(),l=Tb(i.tabs),s=e;return r?(0,Mt.jsx)(Nn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(p=>{let c=o===p.id;return(0,Mt.jsx)(Nn.ButtonBase,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:et(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:Ax(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):(0,Mt.jsx)(Nn.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,Mt.jsx)(Nn.Tab,{value:p.id,label:Ax(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:l},p.id))})}var Fn=require("react"),Ce=require("@mui/material"),Kx=a(require("@mui/icons-material/OpenInNewOutlined"),1),Ux=a(require("@mui/icons-material/Check"),1),Vx=a(require("@mui/icons-material/CheckCircleOutlined"),1),Gx=a(require("@mui/icons-material/RadioButtonUnchecked"),1),jx=a(require("@mui/icons-material/SendOutlined"),1),Yx=a(require("@mui/icons-material/EventOutlined"),1),Xx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Qx=a(require("@mui/icons-material/ViewKanbanOutlined"),1),Zx=a(require("@mui/icons-material/ContentCopyOutlined"),1),Jx=a(require("@mui/icons-material/NextPlanOutlined"),1),eg=a(require("@mui/icons-material/ContentPasteOutlined"),1),og=a(require("@mui/icons-material/ShareOutlined"),1),tg=a(require("@mui/icons-material/DirectionsRunOutlined"),1),ys=a(require("@mui/icons-material/ChevronRight"),1),ng=a(require("@mui/icons-material/ArchiveOutlined"),1),rg=a(require("@mui/icons-material/UnarchiveOutlined"),1),ig=require("@ehfuse/alerts");var J=require("react/jsx-runtime");function Sb({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:b}){let h=Ue(),w=Kt(),[B,M]=(0,Fn.useState)(null),[S,D]=(0,Fn.useState)(null),[R,I]=(0,Fn.useState)(null);(0,Fn.useEffect)(()=>{e||(M(null),D(null),I(null))},[e]);let E=e?.task??null,H=!!E?.is_notice,u=!!E?.is_event,y=E?!Ut(E,r):!1,k=(0,Fn.useMemo)(()=>new Set(t.filter(F=>F.useSprints).map(F=>F.key)),[t]),T=async()=>{let F=E;if(o(),!F)return;await(0,ig.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${F.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&b(F.seq)},z=()=>{E&&v(E.seq,!E.archived),o()};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Ce.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:h?"none":"anchorPosition",anchorPosition:!h&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...h?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:h?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,J.jsxs)(Ce.MenuItem,{onClick:()=>{E&&i(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Kx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,J.jsxs)(Ce.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)(Ce.ListItemIcon,{children:E?.completed?(0,J.jsx)(Gx.default,{sx:{fontSize:19}}):(0,J.jsx)(Vx.default,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!H&&s?(0,J.jsxs)(Ce.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)(Ce.ListItemIcon,{children:(0,J.jsx)(jx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,u?null:(0,J.jsx)(Ce.Divider,{}),u?null:(0,J.jsxs)(Ce.MenuItem,{disabled:y,onClick:F=>{E&&M({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Yx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!H&&!u&&d?(0,J.jsxs)(Ce.MenuItem,{onClick:()=>{E&&d(E,"manager"),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Xx.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,u?null:(0,J.jsxs)(Ce.MenuItem,{disabled:y,onClick:F=>{E&&D({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,J.jsx)(ys.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,J.jsx)(Ce.Divider,{}),f?(0,J.jsxs)(Ce.MenuItem,{disabled:y,onClick:()=>{E&&f(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Zx.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?(0,J.jsxs)(Ce.MenuItem,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Jx.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,J.jsxs)(Ce.MenuItem,{onClick:()=>{E&&(x?x(E):nr(E,h)),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:h?(0,J.jsx)(og.default,{sx:{fontSize:19}}):(0,J.jsx)(eg.default,{sx:{fontSize:19}})}),h?"\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)(Ce.MenuItem,{onClick:F=>I(F.currentTarget),sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(tg.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,J.jsx)(ys.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,J.jsxs)(Ce.MenuItem,{onClick:z,disabled:y||!E?.archived&&!(E&&Kr(E)),sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:E?.archived?(0,J.jsx)(rg.default,{sx:{fontSize:19}}):(0,J.jsx)(ng.default,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,J.jsx)(Ce.Divider,{}),(0,J.jsxs)(Ce.MenuItem,{disabled:y,onClick:T,sx:{fontSize:14,color:"#e5484d"},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(dn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),(0,J.jsx)(un,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:h,onClose:()=>{M(null),o()},onDateChange:F=>{B&&p(B.task.seq,F)},onReminderChange:F=>{B&&c?.(B.task.seq,F)}}),(0,J.jsxs)(Ce.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)(Ce.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)(Ce.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)(Ce.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)(Ce.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)(Ux.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},F.seq))})]})}var yn=require("@mui/material");var Hn=require("react/jsx-runtime");function Bb({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,Hn.jsxs)(yn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,Hn.jsxs)(yn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Hn.jsx)(yn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,Hn.jsx)(Xe,{option:l})]},l.key)}),(0,Hn.jsx)(yn.Divider,{}),(0,Hn.jsx)(yn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Sn=require("@mui/material"),ag=a(require("@mui/icons-material/Check"),1),lg=a(require("@mui/icons-material/BarChartOutlined"),1),sg=a(require("@mui/icons-material/SettingsOutlined"),1);var Ft=require("react/jsx-runtime");function Cb(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,Ft.jsxs)(Sn.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,Ft.jsxs)(Sn.MenuItem,{onClick:()=>{r(p.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?(0,Ft.jsx)(ag.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),(0,Ft.jsx)(Sn.Divider,{}),l?(0,Ft.jsxs)(Sn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,Ft.jsx)(lg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,Ft.jsx)(Sn.Divider,{}):null,(0,Ft.jsxs)(Sn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,Ft.jsx)(sg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var vb={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function mg(e){return vb[e]??"tasks"}var Ib={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"},cg=["list","calendar","month","card","kanban","sprint","timeline"],_b=["list","card"];function wb(e){let o=mg(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:cg,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:_b,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:cg,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 Ef(e){navigator.clipboard.writeText(e).then(()=>(0,va.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,va.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 nr(e,o){let t=Of(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Ef(t)});return}Ef(t)}var Le=require("react/jsx-runtime");function ns({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=Ue(),[m,x]=(0,Ia.useState)(!1),[O,v]=(0,Ia.useState)(null),[b,h]=(0,Ia.useState)(null),w=Kn(e.icon||(e.is_notice?Vo:e.is_event?"event":Ye)),B=!!e.is_notice,M=!!e.is_event,S=B&&o>0&&(e.author_account_seq??0)===o,D=!Ut(e,o),R=!M&&(B?S:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsxs)(Co.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,Le.jsx)(Co.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,Le.jsx)(Pf.default,{})}):null,R&&!s?(0,Le.jsx)(Co.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Bt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Le.jsx)(Co.Checkbox,{checked:e.completed,icon:(0,Le.jsx)(Lf.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,Le.jsx)(qf.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(I,E)=>t(e.seq,E),sx:{p:0}})}):null,s?null:(0,Le.jsx)(Co.Tooltip,{title:D?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,Le.jsx)(Co.IconButton,{size:"small",onClick:D?void 0:I=>h(I.currentTarget),sx:{color:e.icon_color||(B?"#e5484d":"#1e3a8a")},children:(0,Le.jsx)(w,{sx:{fontSize:20}})})}),O!==null?(0,Le.jsx)(Co.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,Le.jsx)(Co.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B?"\uACF5\uC9C0":M?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,Le.jsx)(Co.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,Le.jsx)(Co.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,Le.jsx)(Co.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>x(!0),sx:{color:"#6b7280"},children:(0,Le.jsx)(Nf.default,{sx:{fontSize:20}})})}):null,(0,Le.jsx)(Co.Tooltip,{title:f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,Le.jsx)(Co.IconButton,{"aria-label":f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>nr(e,f),sx:{color:"#6b7280"},children:f?(0,Le.jsx)(zf.default,{sx:{fontSize:20}}):(0,Le.jsx)(Af.default,{sx:{fontSize:20}})})}),g?(0,Le.jsx)(Co.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,Le.jsx)(Co.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:(0,Le.jsx)(Ff.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,Le.jsx)(Co.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,Le.jsx)(Rf.default,{})}):null]}),(0,Le.jsx)(Jn,{anchorEl:b,value:e.icon||(B?Vo:""),color:e.icon_color||(B?"#e5484d":"#1e3a8a"),onSelect:I=>r(e.seq,I),onSelectColor:I=>i?.(e.seq,I),onClose:()=>h(null)}),(0,Le.jsx)(Si,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:d,onClose:()=>x(!1)})]})}var Jt=require("react"),se=require("@mui/material"),Yf=a(require("@mui/icons-material/ExpandLess"),1),Xf=a(require("@mui/icons-material/ExpandMore"),1),Qf=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),Zf=a(require("@mui/icons-material/Check"),1),Jf=a(require("@mui/icons-material/DirectionsRunOutlined"),1),ex=a(require("@mui/icons-material/SpeedOutlined"),1),Da=a(require("@mui/icons-material/CheckCircle"),1),ox=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ma=a(require("@mui/icons-material/CheckCircleOutlined"),1),ss=a(require("@mui/icons-material/AccessTimeOutlined"),1),tx=a(require("@mui/icons-material/AutorenewOutlined"),1),nx=a(require("@mui/icons-material/LabelOutlined"),1),rx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),ix=a(require("@mui/icons-material/SubjectOutlined"),1),ax=a(require("@mui/icons-material/StickyNote2Outlined"),1),lx=a(require("@mui/icons-material/PanToolAltOutlined"),1);var Hf=require("react"),Wf=require("@ehfuse/mui-form-controls"),$f=require("react/jsx-runtime");function rs({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,Hf.useState)(null);return(0,$f.jsx)(Wf.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"),ko=require("@mui/material"),Uf=a(require("@mui/icons-material/AccountTreeOutlined"),1),Vf=a(require("@mui/icons-material/Add"),1),Gf=a(require("@mui/icons-material/Close"),1),jf=a(require("@mui/icons-material/NextPlanOutlined"),1);function zn(e){return e.relations??[]}function Qh(e,o,t){return zn(e).some(n=>n.type===t&&n.task_seq===o.seq)||zn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Kf(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function _a(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 zn(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)=>Kf(m).localeCompare(Kf(x))),p=new Set;for(let m of zn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&zn(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&&zn(m).some(x=>x.type==="duplicate_of"&&x.task_seq===e.seq)),g=zn(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 wa(e,o){let t=_a(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function is(e,o){return wa(e,o)>0}var Te=require("react/jsx-runtime");function as({item:e,caption:o,onOpen:t,onUnlink:n}){let r=co(e.icon||Ye);return(0,Te.jsxs)(ko.Box,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[o?(0,Te.jsx)(ko.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?(0,Te.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,Te.jsxs)(ko.Box,{component:"span",onClick:t,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...t?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),(0,Te.jsx)(Xe,{option:Go(e),small:!0}),n?(0,Te.jsx)(ko.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Te.jsx)(Gf.default,{sx:{fontSize:15}})}):null]})}function ls({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)(()=>_a(e,o),[e,o]),x=m.lineage.length>=2,O=(0,An.useMemo)(()=>wa(e,o),[e,o]),v=(0,An.useMemo)(()=>{let h=new Set;for(let w of m.lineage)h.add(w.seq);for(let w of m.related)h.add(w.seq);for(let w of m.duplicates)h.add(w.seq);return m.duplicateOf&&h.add(m.duplicateOf.seq),[...h]},[m]),b=(h,w,B)=>{f({anchorEl:h,targetSeq:w,type:B})};return(0,Te.jsxs)(bt,{icon:(0,Te.jsx)(Uf.default,{sx:{fontSize:19,display:"block"}}),title:(0,Te.jsxs)(Te.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",O>0?(0,Te.jsx)(ko.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:O}):null]}),titleExtra:t?null:(0,Te.jsxs)(ko.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,Te.jsx)(ko.Button,{size:"small",color:"inherit",startIcon:(0,Te.jsx)(jf.default,{sx:{fontSize:16}}),onClick:h=>d(h.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,Te.jsx)(ko.Button,{size:"small",color:"inherit",startIcon:(0,Te.jsx)(Vf.default,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[x?(0,Te.jsx)(ko.Box,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((h,w)=>{let B=h.seq===e.seq,M=w===m.lineage.length-1;return(0,Te.jsxs)(ko.Box,{sx:{display:"flex",gap:1},children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,Te.jsx)(ko.Box,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":h.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),M?null:(0,Te.jsx)(ko.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,Te.jsxs)(ko.Box,{sx:{flex:1,minWidth:0,pb:M?0:.5},children:[(0,Te.jsxs)(ko.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Te.jsxs)(ko.Box,{component:"span",onClick:!B&&n?()=>n(h.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":h.completed?"#9a9a97":"#37352f",textDecoration:h.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[h.ticket_no?`${h.ticket_no} `:"",h.title]}),(0,Te.jsx)(Xe,{option:Go(h),small:!0})]}),(0,Te.jsx)(ko.Box,{sx:{fontSize:12,color:"#9a9a97"},children:h.completed&&h.completed_time?`${h.completed_time} \uC644\uB8CC`:h.created_time??""})]})]},h.seq)})}):null,m.duplicateOf?(0,Te.jsx)(as,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?h=>b(h.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(h=>(0,Te.jsx)(as,{item:h,caption:"\uC911\uBCF5",onOpen:n?()=>n(h.seq):void 0,onUnlink:!t&&i?w=>b(w.currentTarget,h.seq,"duplicate_of"):void 0},`dup-${h.seq}`)),m.related.map(h=>(0,Te.jsx)(as,{item:h,onOpen:n?()=>n(h.seq):void 0,onUnlink:!t&&i?w=>b(w.currentTarget,h.seq,"related"):void 0},`rel-${h.seq}`)),O===0?(0,Te.jsx)(ko.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?(0,Te.jsx)(xi,{open:s,task:e,tasks:o,excludeSeqs:v,onClose:()=>p(!1),onSubmit:(h,w)=>r(e.seq,h,w)}):null,(0,Te.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,Te.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 Ar({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,_.jsx)(se.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function cs({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:b,onChangeContent:h,onChangeContentHeight:w,onAddChecklistItem:B,onToggleChecklistItem:M,onRemoveChecklistItem:S,onUpdateChecklistItem:D,onConvertChecklistToTask:R,onOpenChecklistTask:I,onLinkChecklistTask:E,resolveChecklistTask:H,relatedTasksPool:u,onOpenRelatedTask:y,onLinkRelatedTask:k,onUnlinkRelatedTask:T,onCreateFollowUpTask:z,onAddAttachments:F,onRemoveAttachment:ge,onPreview:he,onDownload:ke,onUpdateComment:xe,onRemoveComment:qe,onToggleCommentReaction:Ee,currentUserName:ye="",myAccountSeq:re=0,noticeAdmin:Je=!1,hideProject:eo=!1,hideLabel:K=!1,showTitle:Y=!1,onChangeTitle:ne,onToggleCompleted:C,onChangeIcon:W,onChangeIconColor:oe,employees:j=[],onAckConfirm:Ge,onRequestConfirm:N,onChangeBugField:Se,sprints:Me=[],sprintProject:Be=!1,hideSprint:oo=!1,onChangeSprint:ee,onChangeStoryPoints:$e,onChangeResolution:Bn,onClaimTask:Z,onVerifyBug:vo}){let[dt,pt]=(0,Jt.useState)(null),[ir,Ht]=(0,Jt.useState)(null),[ft,an]=(0,Jt.useState)(null),[Wt,Tt]=(0,Jt.useState)(null),[ar,He]=(0,Jt.useState)(!1),q={[wt]: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"}},[G,ue]=(0,Jt.useState)(null),[be,De]=(0,Jt.useState)(null),[so,Do]=(0,Jt.useState)(null),[Ro,qo]=(0,Jt.useState)(null),Ke=!!e.is_notice,ie=!!e.is_event,Uo=!!e.is_bug,Jo=!!Z&&Xr(e,re),Cn=!!Z&&Qr(e,re),Et=!!vo&&Uo&&!!e.completed&&re>0&&(e.author_account_seq??0)===re&&!(e.acks??[]).some(A=>A.account_seq===re),Po=!Ut(e,re),yt=!e.is_event&&(e.is_notice?re>0&&(e.author_account_seq??0)===re:(e.author_account_seq??0)===re||(e.manager_account_seq??0)===re),Wn=Kn(e.icon||(e.is_notice?Vo:e.is_event?"event":Ye)),Nr=Ke?!Yr(e,re):Po,lr=Jo||Cn?(0,_.jsxs)(Gn,{onClick:A=>qo(A.currentTarget),children:[(0,_.jsx)(lx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Fr=Ke?Ti(e,j):"",xt=Ke?Yl(e,j,re):null,Mo=!Ke&&!ie?ri(e,re):null,sr=!!(Mo&&Mo.total>0||Ke&&xt);return(0,_.jsxs)(_.Fragment,{children:[Y?(0,_.jsxs)(se.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[yt?(0,_.jsx)(se.Checkbox,{checked:e.completed,icon:(0,_.jsx)(ox.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,_.jsx)(Da.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(A,cr)=>{ft||an({anchorEl:A.currentTarget,nextCompleted:cr})},sx:{p:0,mt:.25}}):null,(0,_.jsx)(se.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:Po?void 0:A=>Ht(A.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(Ke?"#e5484d":"#1e3a8a")},children:(0,_.jsx)(Wn,{sx:{fontSize:20}})}),(0,_.jsx)(se.Box,{sx:{flex:1,minWidth:0},children:dt!==null?(0,_.jsx)(se.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:dt,onChange:A=>pt(A.target.value),onBlur:()=>{dt.trim()&&dt.trim()!==e.title&&ne(e.seq,dt.trim()),pt(null)},onKeyDown:A=>{A.key==="Enter"&&A.target.blur(),A.key==="Escape"&&pt(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,_.jsx)(se.Box,{onClick:()=>pt(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:!!ft,anchorEl:ft?.anchorEl??null,title:ft?.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:ft?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>an(null),onConfirm:()=>{ft&&C(e.seq,ft.nextCompleted),an(null)}}),(0,_.jsx)(Jn,{anchorEl:ir,value:e.icon||(Ke?Vo:""),color:e.icon_color||(Ke?"#e5484d":"#1e3a8a"),onSelect:A=>W(e.seq,A),onSelectColor:A=>oe?.(e.seq,A),onClose:()=>Ht(null)})]}):null,(0,_.jsxs)(se.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[wt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,_.jsx)(di,{hideProject:eo,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:!ie,notice:Ke,event:ie,readOnly:Po,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:q,reminderLocked:e.completed,managerAction:lr,leading:(0,_.jsxs)(_.Fragment,{children:[Et||lr&&(Ke||ie)?(0,_.jsxs)(se.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ke||ie?lr:null,Et?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se.Button,{variant:"contained",size:"large",onClick:()=>vo?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,_.jsx)(se.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>vo?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Uo&&e.ticket_no?(0,_.jsx)(_e,{icon:(0,_.jsx)(Qf.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,_.jsx)(se.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,ie?null:(0,_.jsx)(se.Box,{sx:Uo&&e.ticket_no||sr?void 0:{gridColumn:"1 / -1"},children:(0,_.jsx)(_e,{icon:(0,_.jsx)(tx.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Po||e.completed?void 0:A=>ue(A),children:(0,_.jsx)(Xe,{option:Go(e)})})}),Mo&&Mo.total>0?(0,_.jsx)(se.Box,{children:(0,_.jsx)(_e,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Mo.canConfirm?(0,_.jsx)(se.Button,{size:"small",variant:"contained",onClick:()=>Ge?.(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)(se.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Mo.myTime?(0,_.jsx)(Da.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>Tt({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:[Mo.count," / ",Mo.total]})})}):null,Ke&&xt?(0,_.jsx)(se.Box,{children:(0,_.jsx)(_e,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,_.jsx)(se.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:xt.canAck?(0,_.jsx)(se.Button,{size:"small",variant:"contained",onClick:()=>Ge?.(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)(se.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:xt.acked?(0,_.jsx)(Da.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>Tt({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:xt.total>0&&xt.count>=xt.total?"\uC644\uB8CC":(0,_.jsxs)(_.Fragment,{children:[xt.count,(0,_.jsx)(se.Box,{component:"span",sx:{mx:.4},children:"/"}),xt.total]})})})})}):null,Be&&!oo&&!ie&&!Ke?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(_e,{icon:(0,_.jsx)(Jf.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Po?void 0:A=>De(A),children:(e.sprint_seq??0)>0?Me.find(A=>A.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,_.jsx)(Ar,{label:"\uBBF8\uBC30\uC815"})}),(0,_.jsx)(_e,{icon:(0,_.jsx)(ex.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,_.jsx)(Xt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Po,onCommit:A=>$e?.(e.seq,Number(A.replace(/[^0-9.]/g,""))||0)})})]}):null,ie||K?null:(0,_.jsx)(se.Box,{sx:[{gridColumn:"1 / -1"},q??null],children:(0,_.jsx)(_e,{icon:(0,_.jsx)(nx.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Po?void 0:A=>Do(A),children:(e.label_keys??[]).length>0?(0,_.jsx)(sn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,_.jsx)(Ar,{})})})]}),trailing:(0,_.jsxs)(_.Fragment,{children:[Uo?(0,_.jsx)(pi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Po,showResolution:!!e.completed,onChangeRepro:A=>Se?.(e.seq,"bug_repro",A),onChangeDevice:A=>Se?.(e.seq,"bug_device",A),onChangeWhere:A=>Se?.(e.seq,"bug_where",A),onChangeVersion:A=>Se?.(e.seq,"bug_version",A),onChangeResolution:A=>Bn?.(e.seq,A)}):null,(0,_.jsx)(_e,{icon:(0,_.jsx)(rx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[zo(9),q??null],children:e.created_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Yo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,_.jsx)(Ar,{})}),(0,_.jsx)(_e,{icon:(0,_.jsx)(ss.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[zo(11),q??null],children:e.created_time?Bt(e.created_time):(0,_.jsx)(Ar,{})}),e.completed?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(_e,{icon:(0,_.jsx)(Ma.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[zo(10),q??null],children:e.completed_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Yo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,_.jsx)(Ar,{})}),(0,_.jsx)(_e,{icon:(0,_.jsx)(ss.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[zo(12),q??null],children:e.completed_time?Bt(e.completed_time):(0,_.jsx)(Ar,{})})]}):null]})}),(0,_.jsxs)(se.Box,{sx:{display:"none",[wt]:{display:"block",mt:1.5,mb:0}},children:[(0,_.jsx)(se.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,_.jsx)(se.ButtonBase,{onClick:()=>He(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)(Yf.default,{sx:{fontSize:18}})]}):(0,_.jsxs)(_.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,_.jsx)(Xf.default,{sx:{fontSize:18}})]})})]}),(0,_.jsxs)(se.Box,{children:[(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[wt]:{mt:0,mb:1.25}}}),(0,_.jsx)(bt,{icon:(0,_.jsx)(ix.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,_.jsx)(se.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(fi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:w?A=>w(e.seq,A):void 0,readOnly:Po,onChange:A=>h(e.seq,A)})})}),e.is_bug?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(bt,{icon:(0,_.jsx)(ax.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,_.jsx)(se.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(rs,{value:e.note,readOnly:Nr,onCommit:A=>b(e.seq,A)})})})]}),ie?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(gi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Nr,onAdd:B,onToggle:M,onRemove:S,onUpdate:D,onConvertToTask:R,onOpenLinkedTask:I,resolveLinkedTask:H,linkCandidates:u,linkBaseTask:e,onLinkExistingTask:E})]}),u&&!ie&&!Ke&&is(e,u)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ls,{task:e,tasks:u,readOnly:Po,onOpenTask:y,onLink:k,onUnlink:T,onCreateFollowUp:z})]}):null,(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(hi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Nr,onAdd:F,onRemove:ge,onPreview:he?A=>he({...A,taskSeq:e.seq}):void 0,onDownload:ke?A=>ke({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(se.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(os,{taskSeq:e.seq,comments:e.comments??[],currentUserName:ye,myAccountSeq:re,avatarSrcByName:n,onUpdate:xe,onRemove:qe,onToggleReaction:Ee,onPreview:he?A=>he({...A,taskSeq:e.seq}):void 0,onDownload:ke?A=>ke({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(jr,{anchorEl:G,value:e.status,options:Ke?gr:Uo?In:hr,onSelect:A=>r(e.seq,A),onClose:()=>ue(null)}),(0,_.jsx)(se.Menu,{transitionDuration:0,anchorEl:be,open:!!be,onClose:()=>De(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Me.filter(A=>`custom-${A.group_seq}`===String(e.tab_key??"")).map(A=>({seq:A.seq,label:ht(A)}))].map(A=>(0,_.jsxs)(se.MenuItem,{onClick:()=>{ee?.(e.seq,A.seq),De(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[A.label,(e.sprint_seq??0)===A.seq?(0,_.jsx)(Zf.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},A.seq))}),(0,_.jsx)(ni,{anchorEl:Wt?.anchorEl??null,open:!!Wt?.open,acks:e.acks??[],total:xt?.total??Mo?.total??0,avatarSrcByName:n,onRequestConfirm:N&&Mo&&Mo.count<Mo.total?()=>{N(e.seq),Tt(A=>A?{...A,open:!1}:null)}:void 0,onClose:()=>Tt(A=>A?{...A,open:!1}:null)}),(0,_.jsx)(ki,{anchorEl:so,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:A=>i(e.seq,Vr(e.label_keys??[],A)),onAddLabel:l,onClose:()=>Do(null)}),(0,_.jsx)(uo,{open:!!Ro,anchorEl:Ro,title:Jo?"\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:()=>qo(null),onConfirm:()=>{Z?.(e.seq),qo(null)}})]})}var So=require("react/jsx-runtime");function Zh(){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 Jh({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=Ue(),v=(0,hn.useRef)(null);o&&(v.current=o);let b=o??v.current,[h,w]=(0,hn.useState)(!1),[B,M]=(0,hn.useState)({}),S=Object.keys(B).length>0;(0,hn.useEffect)(()=>{M({})},[o?.seq,e]);let D=(0,hn.useRef)(null);if((0,hn.useEffect)(()=>{D.current?.scrollTo({top:0})},[o?.seq]),!b)return null;let R=O&&S?{...b,...B}:b,I=(k,T)=>{O?M(z=>({...z,...k})):T()},E=()=>{let k=B;M({});let T=b.seq,z=k.title===void 0?void 0:String(k.title).trim();if(r){let F={...k};z!==void 0&&(z?F.title=z:delete F.title),Object.keys(F).length>0&&r(T,F),(0,ms.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}z&&s(T,z),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,ms.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,z)=>I({[T]:z},()=>x.onChangeDate(k,T,z)),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,So.jsx)(cs,{...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,So.jsx)(ts,{onSubmit:(k,T)=>n(R.seq,k,T)},R.seq);return O?(0,So.jsxs)(So.Fragment,{children:[(0,So.jsx)(ux.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,So.jsx)(cx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>w(!0)}]:[],{icon:(0,So.jsx)(sx.default,{sx:{ml:f?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>nr(R,!0)},{icon:(0,So.jsx)(Dt.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,So.jsx)(Dt.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:u})}]},b.seq),(0,So.jsx)(Si,{open:h,taskSeq:R.seq,items:d,loading:g,onLoad:f,onClose:()=>w(!1)})]}):(0,So.jsx)(Dt.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,So.jsxs)(Dt.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,So.jsx)(ns,{task:R,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m}),(0,So.jsx)(Dt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,So.jsx)(Dt.Box,{sx:{flex:1,minHeight:0},children:(0,So.jsx)(mx.default,{ref:D,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:u})}),(0,So.jsx)(Dt.Divider,{sx:{borderColor:"#37352f"}}),(0,So.jsx)(Dt.Box,{sx:{flexShrink:0},children:y})]})})}var en=require("react"),To=require("@mui/material"),fx=require("@ehfuse/mui-form-dialog"),xx=a(require("@mui/icons-material/EditOutlined"),1),us=require("@ehfuse/alerts"),bn=require("@ehfuse/mui-form-controls");var Ea="custom-";function dx(e){return e.startsWith(Ea)}function eb(e){return e>0?`${Ea}${e}`:""}function Oa(e){if(!dx(e))return 0;let o=Number(e.slice(Ea.length));return Number.isInteger(o)&&o>0?o:0}var Ae=require("react/jsx-runtime"),ob=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function px(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function tb({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,en.useState)(""),[g,f]=(0,en.useState)(""),[m,x]=(0,en.useState)(""),[O,v]=(0,en.useState)(""),[b,h]=(0,en.useState)(""),[w,B]=(0,en.useState)(!1),[M,S]=(0,en.useState)(0);(0,en.useEffect)(()=>{e&&(d(p.length===1?p[0].key:""),f(""),x(""),v(""),h(""),S(0))},[e]);let D=()=>{f(""),x(""),v(""),h(""),S(0)},R=u=>{S(u.seq),d(`custom-${u.group_seq}`),f(u.name),x(u.goal),v(u.start_date),h(u.end_date)},I=async()=>{let u=Oa(c);if(!u){(0,us.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){(0,us.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(M>0){i(M,{name:g.trim(),goal:m.trim(),start_date:O,end_date:b}),D();return}await r({group_seq:u,name:g.trim(),goal:m.trim(),start_date:O,end_date:b})&&D()}finally{B(!1)}},E=new Map(o.map(u=>[Oa(u.key),u.label])),H=(0,Ae.jsx)(To.Box,{children:p.length===0?(0,Ae.jsx)(To.Box,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsxs)(To.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Ae.jsx)(bn.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:M>0}),(0,Ae.jsx)(bn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:u=>f(u.target.value)}),(0,Ae.jsx)(bn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:O,onChange:u=>v(u.target.value)}),(0,Ae.jsx)(bn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:b,onChange:u=>h(u.target.value)}),(0,Ae.jsx)(bn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:u=>x(u.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Ae.jsxs)(To.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[M>0?(0,Ae.jsx)(To.Button,{color:"inherit",onClick:D,disabled:w,children:"\uCDE8\uC18C"}):null,(0,Ae.jsx)(To.Button,{variant:"contained",onClick:()=>{I()},disabled:w,children:M>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Ae.jsx)(To.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Ae.jsx)(To.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>(0,Ae.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Ae.jsxs)(To.Box,{sx:{minWidth:0},children:[(0,Ae.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Ae.jsx)(To.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:u.name}),(0,Ae.jsx)(To.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,Ae.jsxs)(To.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[px(u.start_date)," ~ ",px(u.end_date)]})]}),u.goal?(0,Ae.jsx)(To.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:u.goal}):null]}),(0,Ae.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Ae.jsx)(bn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:u.status,options:ob.map(y=>({value:y.value,label:y.label})),onChange:y=>l(u.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),(0,Ae.jsx)(To.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>R(u),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Ae.jsx)(xx.default,{sx:{fontSize:18}})}),(0,Ae.jsx)(To.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(u.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Ae.jsx)(dn,{style:{width:16,height:16}})})]})]},u.seq))})]})});return(0,Ae.jsx)(fx.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,Ae.jsx)(To.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var ds=require("react"),We=require("@mui/material"),gx=require("@ehfuse/mui-form-dialog"),hx=a(require("@mui/icons-material/OpenInNewOutlined"),1),bx=a(require("@mui/icons-material/EventOutlined"),1),kx=require("@ehfuse/alerts");var we=require("react/jsx-runtime");function nb({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,ds.useState)(""),[s,p]=(0,ds.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,kx.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,we.jsxs)(We.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,we.jsxs)(We.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,we.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,we.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,we.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,we.jsx)(We.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,we.jsx)(We.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,m)=>(0,we.jsxs)(We.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[(0,we.jsx)(bx.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,we.jsx)(We.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,we.jsx)(We.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{d(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,we.jsx)(dn,{sx:{fontSize:18}})})]},f.seq))}):(0,we.jsx)(We.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,we.jsx)(We.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,we.jsx)(We.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,we.jsxs)(We.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,we.jsx)(We.Box,{children:(0,we.jsxs)(We.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,we.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,we.jsx)(We.Box,{children:(0,we.jsxs)(We.Box,{component:"span",children:[(0,we.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,we.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,we.jsx)(We.Box,{children:(0,we.jsx)(We.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,we.jsx)(We.Box,{children:(0,we.jsx)(We.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,we.jsxs)(We.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,we.jsx)(We.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,we.jsx)(We.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{c()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,we.jsx)(gx.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,we.jsx)(We.Button,{variant:"outlined",startIcon:(0,we.jsx)(hx.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,we.jsx)(We.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var Oo=require("@mui/material"),Tx=require("@ehfuse/mui-form-dialog"),yx=a(require("@mui/icons-material/ContentCopyOutlined"),1),ps=a(require("@mui/icons-material/OpenInNewOutlined"),1),fs=require("@ehfuse/alerts"),Ne=require("react/jsx-runtime");function Sx(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function rb({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??Sx,s=o.subscribed?l(o.token):"",p=()=>{navigator.clipboard.writeText(s).then(()=>(0,fs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,fs.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,Ne.jsxs)(Oo.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,Ne.jsxs)(Oo.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,Ne.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,Ne.jsxs)(Oo.Box,{sx:{color:"#8a6d1d",bgcolor:"#faf1d7",borderRadius:1,px:1.5,py:1.25,lineHeight:1.7},children:["\uC9C0\uAE08\uC740 \uCE98\uB9B0\uB354\uC5D0 \uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",(0,Ne.jsx)("br",{}),(0,Ne.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,Ne.jsxs)(Ne.Fragment,{children:[(0,Ne.jsx)(Oo.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,Ne.jsxs)(Oo.Box,{sx:{display:"flex",gap:2},children:[(0,Ne.jsx)(Oo.Button,{variant:"outlined",startIcon:(0,Ne.jsx)(yx.default,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,Ne.jsx)(Oo.Button,{variant:"contained",startIcon:(0,Ne.jsx)(ps.default,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,Ne.jsxs)(Oo.Box,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[(0,Ne.jsx)(Oo.Box,{children:(0,Ne.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,Ne.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,Ne.jsx)(Oo.Box,{children:(0,Ne.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,Ne.jsx)(Oo.Box,{children:(0,Ne.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,Ne.jsx)(Oo.Box,{children:(0,Ne.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,Ne.jsx)(Oo.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,Ne.jsx)(Tx.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,Ne.jsx)(Oo.Button,{variant:"outlined",startIcon:(0,Ne.jsx)(ps.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Ne.jsx)(Oo.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var on=require("react"),tn=require("@mui/material"),Bx=require("@ehfuse/mui-form-dialog"),Cx=require("@ehfuse/mui-form-controls"),vx=require("@ehfuse/tree-view");var Ko=require("react/jsx-runtime");function Ix(e){return`${e.name}#${e.seq}`}function ib(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function ab(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 lb(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 sb(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Ix(e),renderLabel:(0,Ko.jsx)(tn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,Ko.jsx)(tn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function _x(e,o){let t=(e.groups??[]).map(r=>_x(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>lb(r,o)).map(sb);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function cb({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,on.useState)(""),p=(0,on.useMemo)(()=>e.map(d=>_x(d,l.trim().toLowerCase())).filter(d=>d!==null),[e,l]),c=(0,on.useMemo)(()=>o.filter(d=>t.includes(d.seq)).map(Ix),[]);return(0,Ko.jsxs)(Ko.Fragment,{children:[(0,Ko.jsx)(tn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Ko.jsx)(Cx.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,Ko.jsx)(tn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,Ko.jsx)(vx.TreeView,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:d=>i(d.map(ib).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function mb({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=Ue(),[d,g]=(0,on.useState)([]),[f,m]=(0,on.useState)(0),x=(0,on.useMemo)(()=>ab(n),[n]),O=i??[];(0,on.useEffect)(()=>{e&&(g(O),m(b=>b+1))},[e]);let v=()=>{let b=x.filter(h=>d.includes(h.seq));s(r?b:b.slice(0,1)),p()};return(0,Ko.jsx)(Bx.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,Ko.jsx)(tn.Box,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:(0,Ko.jsx)(cb,{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,Ko.jsx)(tn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,Ko.jsx)(tn.Button,{variant:"contained",onClick:v,children:l})}})}var qr=require("react"),Nt=require("@mui/material"),Mx=require("@ehfuse/mui-form-dialog"),Ex=require("@ehfuse/mui-form-controls");var Lt=require("@mui/material"),mt=require("react/jsx-runtime");function ub(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 xs({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,...ub(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,mt.jsx)(Lt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,mt.jsxs)(Lt.Box,{children:[(0,mt.jsxs)(Lt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,mt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?(0,mt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,mt.jsx)(Lt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),(0,mt.jsx)(Lt.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,mt.jsxs)(Lt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,mt.jsx)(Lt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),(0,mt.jsx)(Lt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},d.sprint.seq)})}),(0,mt.jsx)(Lt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(d=>(0,mt.jsxs)(Lt.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 Dx=require("react"),qn=require("@mui/material"),wo=require("react/jsx-runtime");function wx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function db(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function gs(e){return e.slice(5).replace("-",".")}function hs({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,Dx.useMemo)(()=>{let b=wx(e.start_date),h=wx(e.end_date);if(!b||!h||h<b||Math.round((h.getTime()-b.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 M=B.some(u=>(u.story_points??0)>0),S=u=>M?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(b);u<=h;u.setDate(u.getDate()+1))I.push(db(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:M,actual:H}},[e,o,t]);if(!r)return(0,wo.jsx)(qn.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return(0,wo.jsx)(qn.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:l,usePoints:s,actual:p}=r,c=600,d=200,g=8,f=b=>i.length===1?0:b/(i.length-1)*c,m=b=>g+(d-g*2)*(1-b/Math.max(1,l)),x=`${f(0)},${m(l)} ${f(i.length-1)},${m(0)}`,O=p.map(b=>`${f(i.indexOf(b.day))},${m(b.value)}`).join(" "),v=p[p.length-1];return(0,wo.jsxs)(qn.Box,{children:[(0,wo.jsxs)(qn.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,wo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),v?(0,wo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,wo.jsx)(qn.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:v.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,wo.jsx)(qn.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,wo.jsxs)("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,wo.jsx)("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),(0,wo.jsx)("polyline",{points:x,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?(0,wo.jsx)("polyline",{points:O,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,v?(0,wo.jsx)("circle",{cx:f(i.indexOf(v.day)),cy:m(v.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,wo.jsxs)(qn.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,wo.jsx)("span",{children:gs(e.start_date)}),t>e.start_date&&t<e.end_date?(0,wo.jsxs)("span",{children:["\uC624\uB298 ",gs(t)]}):null,(0,wo.jsx)("span",{children:gs(e.end_date)})]})]})}var ut=require("react/jsx-runtime");function pb({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,qr.useState)(0);(0,qr.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,qr.useMemo)(()=>o.find(d=>d.seq===l)??null,[o,l]),c=(0,ut.jsxs)(Nt.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,ut.jsxs)(Nt.Box,{sx:{px:3,py:2.5},children:[(0,ut.jsx)(Nt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,ut.jsx)(xs,{sprints:o,tasks:t})]}),(0,ut.jsx)(Nt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ut.jsxs)(Nt.Box,{sx:{px:3,py:2.5},children:[(0,ut.jsx)(Nt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,ut.jsx)(Ex.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,ut.jsx)(hs,{sprint:p,tasks:t,todayStr:n}):(0,ut.jsx)(Nt.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694."})]})]});return(0,ut.jsx)(Mx.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,ut.jsx)(Nt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var nn=require("@mui/material");var kn=require("react/jsx-runtime");function fb({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,kn.jsxs)(nn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,kn.jsx)(nn.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,kn.jsxs)(nn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,kn.jsx)(nn.Checkbox,{size:"small",checked:p,sx:{p:0}}),(0,kn.jsx)(Yo,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,kn.jsx)(nn.Divider,{}),(0,kn.jsx)(nn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Ox=require("react"),Lr=require("@mui/material"),Rx=a(require("@mui/icons-material/KeyboardArrowDown"),1),Px=a(require("@mui/icons-material/Check"),1);var rn=require("react/jsx-runtime");function xb({value:e,onChange:o,options:t}){let[n,r]=(0,Ox.useState)(null),i=t??Ni,l=Ni.find(s=>s.value===e)?.label??"";return(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.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,rn.jsx)(Rx.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,rn.jsx)(Lr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,rn.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,rn.jsx)(Px.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var rr=require("@mui/material"),bs=require("@ehfuse/mui-form-controls");function Ln(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Bi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function gb(e=new Date){return{fromDate:Ln(Bi(1,e)),toDate:Ln(e)}}var Tn=require("react/jsx-runtime"),hb=[{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 ks({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Ln(Bi(i)),Ln(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Ln(Bi(i))&&o===Ln(new Date);return(0,Tn.jsxs)(rr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,Tn.jsx)(rr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:hb.map(i=>{let l=r(i.months);return(0,Tn.jsx)(rr.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,Tn.jsxs)(rr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Tn.jsx)(bs.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,Tn.jsx)(rr.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,Tn.jsx)(bs.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var zx=require("@mui/material");var Ts=require("react/jsx-runtime");function bb({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,Ts.jsx)(zx.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,Ts.jsx)(ks,{fromDate:o,toDate:t,onChange:n})})}var Nn=require("@mui/material"),qx=a(require("@mui/icons-material/Checklist"),1),Lx=a(require("@mui/icons-material/Face"),1),Nx=a(require("@mui/icons-material/Publish"),1),Fx=a(require("@mui/icons-material/NotificationsOutlined"),1),Hx=a(require("@mui/icons-material/BugReportOutlined"),1),Wx=a(require("@mui/icons-material/DescriptionOutlined"),1),$x=a(require("@mui/icons-material/Inventory2Outlined"),1);var Mt=require("react/jsx-runtime");function Ax(e,o){return o>0?`${e} (${o})`:e}var kb=[{id:"my",label:"\uC804\uCCB4",icon:(0,Mt.jsx)(qx.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Mt.jsx)(Fx.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Mt.jsx)(Lx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Mt.jsx)(Nx.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Mt.jsx)(Hx.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Mt.jsx)($x.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Mt.jsx)(Wx.default,{sx:{fontSize:18}}),hideCount:!0}];function Tb(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 yb({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=le(),l=Tb(i.tabs),s=e;return r?(0,Mt.jsx)(Nn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(p=>{let c=o===p.id;return(0,Mt.jsx)(Nn.ButtonBase,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:et(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:Ax(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):(0,Mt.jsx)(Nn.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,Mt.jsx)(Nn.Tab,{value:p.id,label:Ax(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:l},p.id))})}var Fn=require("react"),Ce=require("@mui/material"),Kx=a(require("@mui/icons-material/OpenInNewOutlined"),1),Ux=a(require("@mui/icons-material/Check"),1),Vx=a(require("@mui/icons-material/CheckCircleOutlined"),1),Gx=a(require("@mui/icons-material/RadioButtonUnchecked"),1),jx=a(require("@mui/icons-material/SendOutlined"),1),Yx=a(require("@mui/icons-material/EventOutlined"),1),Xx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Qx=a(require("@mui/icons-material/ViewKanbanOutlined"),1),Zx=a(require("@mui/icons-material/ContentCopyOutlined"),1),Jx=a(require("@mui/icons-material/NextPlanOutlined"),1),eg=a(require("@mui/icons-material/ContentPasteOutlined"),1),og=a(require("@mui/icons-material/ShareOutlined"),1),tg=a(require("@mui/icons-material/DirectionsRunOutlined"),1),ys=a(require("@mui/icons-material/ChevronRight"),1),ng=a(require("@mui/icons-material/ArchiveOutlined"),1),rg=a(require("@mui/icons-material/UnarchiveOutlined"),1),ig=require("@ehfuse/alerts");var J=require("react/jsx-runtime");function Sb({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:b}){let h=Ue(),w=Kt(),[B,M]=(0,Fn.useState)(null),[S,D]=(0,Fn.useState)(null),[R,I]=(0,Fn.useState)(null);(0,Fn.useEffect)(()=>{e||(M(null),D(null),I(null))},[e]);let E=e?.task??null,H=!!E?.is_notice,u=!!E?.is_event,y=E?!Ut(E,r):!1,k=(0,Fn.useMemo)(()=>new Set(t.filter(F=>F.useSprints).map(F=>F.key)),[t]),T=async()=>{let F=E;if(o(),!F)return;await(0,ig.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${F.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&b(F.seq)},z=()=>{E&&v(E.seq,!E.archived),o()};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Ce.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:h?"none":"anchorPosition",anchorPosition:!h&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...h?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:h?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,J.jsxs)(Ce.MenuItem,{onClick:()=>{E&&i(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Kx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,J.jsxs)(Ce.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)(Ce.ListItemIcon,{children:E?.completed?(0,J.jsx)(Gx.default,{sx:{fontSize:19}}):(0,J.jsx)(Vx.default,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!H&&s?(0,J.jsxs)(Ce.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)(Ce.ListItemIcon,{children:(0,J.jsx)(jx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,u?null:(0,J.jsx)(Ce.Divider,{}),u?null:(0,J.jsxs)(Ce.MenuItem,{disabled:y,onClick:F=>{E&&M({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Yx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!H&&!u&&d?(0,J.jsxs)(Ce.MenuItem,{onClick:()=>{E&&d(E,"manager"),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Xx.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,u?null:(0,J.jsxs)(Ce.MenuItem,{disabled:y,onClick:F=>{E&&D({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,J.jsx)(ys.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,J.jsx)(Ce.Divider,{}),f?(0,J.jsxs)(Ce.MenuItem,{disabled:y,onClick:()=>{E&&f(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Zx.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?(0,J.jsxs)(Ce.MenuItem,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(Jx.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,J.jsxs)(Ce.MenuItem,{onClick:()=>{E&&(x?x(E):nr(E,h)),o()},sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:h?(0,J.jsx)(og.default,{sx:{fontSize:19}}):(0,J.jsx)(eg.default,{sx:{fontSize:19}})}),h?"\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)(Ce.MenuItem,{onClick:F=>I(F.currentTarget),sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(tg.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,J.jsx)(ys.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,J.jsxs)(Ce.MenuItem,{onClick:z,disabled:y||!E?.archived&&!(E&&Kr(E)),sx:{fontSize:14},children:[(0,J.jsx)(Ce.ListItemIcon,{children:E?.archived?(0,J.jsx)(rg.default,{sx:{fontSize:19}}):(0,J.jsx)(ng.default,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,J.jsx)(Ce.Divider,{}),(0,J.jsxs)(Ce.MenuItem,{disabled:y,onClick:T,sx:{fontSize:14,color:"#e5484d"},children:[(0,J.jsx)(Ce.ListItemIcon,{children:(0,J.jsx)(dn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),(0,J.jsx)(un,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:h,onClose:()=>{M(null),o()},onDateChange:F=>{B&&p(B.task.seq,F)},onReminderChange:F=>{B&&c?.(B.task.seq,F)}}),(0,J.jsxs)(Ce.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)(Ce.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)(Ce.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)(Ce.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)(Ce.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)(Ux.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},F.seq))})]})}var yn=require("@mui/material");var Hn=require("react/jsx-runtime");function Bb({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,Hn.jsxs)(yn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,Hn.jsxs)(yn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Hn.jsx)(yn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,Hn.jsx)(Xe,{option:l})]},l.key)}),(0,Hn.jsx)(yn.Divider,{}),(0,Hn.jsx)(yn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Sn=require("@mui/material"),ag=a(require("@mui/icons-material/Check"),1),lg=a(require("@mui/icons-material/BarChartOutlined"),1),sg=a(require("@mui/icons-material/SettingsOutlined"),1);var Ft=require("react/jsx-runtime");function Cb(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,Ft.jsxs)(Sn.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,Ft.jsxs)(Sn.MenuItem,{onClick:()=>{r(p.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?(0,Ft.jsx)(ag.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),(0,Ft.jsx)(Sn.Divider,{}),l?(0,Ft.jsxs)(Sn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,Ft.jsx)(lg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,Ft.jsx)(Sn.Divider,{}):null,(0,Ft.jsxs)(Sn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,Ft.jsx)(sg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var vb={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function mg(e){return vb[e]??"tasks"}var Ib={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"},cg=["list","calendar","month","card","kanban","sprint","timeline"],_b=["list","card"];function wb(e){let o=mg(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:cg,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:_b,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:cg,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