@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/dialogs/TaskActivityDialog.d.ts +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5,10 +5,10 @@ var Ll="waiting",NS="replied";import{createContext as gu,useContext as hu,useMem
|
|
|
5
5
|
|
|
6
6
|
`).trim()}function Ii({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:a}){let l=bn(null),d=bn(null),s=i>0?i:0,u=bn(s),x=bn(a);x.current=a;let p=bn(null),c=bn(Date.now()+800),[f,M]=wk(!1),C=we();tl(()=>{if(n)return;let g=rl(o);p.current===g||p.current===o||(p.current=g,c.current=Date.now()+800,l.current?.setHtml(g))},[e,o,n]);let h=bn(-1);return tl(()=>{if(n||C||i<=0||h.current===i||(h.current=i,Math.abs(i-u.current)<1))return;let g=d.current?.querySelector(".ehfuse-editor-container");g&&(Math.abs(g.getBoundingClientRect().height-i)<1||(g.style.height=`${i}px`,u.current=i))},[n,C,i]),tl(()=>{if(n||C)return;let g=d.current?.querySelector(".ehfuse-editor-container");if(!g||typeof ResizeObserver>"u")return;let I,S=new ResizeObserver(w=>{let y=Math.round(w[0]?.contentRect.height??0);y<=0||(window.clearTimeout(I),I=window.setTimeout(()=>{Math.abs(y-u.current)<1||(u.current=y,x.current?.(y))},300))});return S.observe(g),()=>{window.clearTimeout(I),S.disconnect()}},[n,C]),n?Ak(nl,{sx:{position:"relative",mt:1},children:[kn(nl,{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:rl(o)}}),kn(Mk,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:kn(Dk,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(zk(o)).then(()=>{M(!0),window.setTimeout(()=>M(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:f?kn(Ok,{sx:{fontSize:17,color:"#2f9e5b"}}):kn(Ek,{sx:{fontSize:17}})})})]}):kn(nl,{ref:d,onDragOver:g=>g.stopPropagation(),onDrop:g=>g.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:kn(Rk,{ref:l,defaultValue:rl(o),autoHeight:C,resizable:!C,showToolbar:!C,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Pk,locale:"ko",minHeight:s||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:g=>{let I=Date.now()<c.current,S=g===p.current;p.current=g,!(I||S)&&t(g)}})})}import{useState as Dr}from"react";import{Box as To,Button as $c,Dialog as jk,IconButton as Qn,TextField as Yk,Tooltip as Kc}from"@mui/material";import Uc from"@mui/icons-material/Close";import Xk from"@mui/icons-material/AddCircle";import Vc from"@mui/icons-material/AddTask";import Qk from"@mui/icons-material/Checklist";import Zk from"@mui/icons-material/CheckCircle";import Jk from"@mui/icons-material/Launch";import eT from"@mui/icons-material/LinkOutlined";import oT from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as qk,useMemo as Lk,useState as il}from"react";import{Box as Pt,Button as Nk,Tab as Fk,Tabs as Hk}from"@mui/material";import{FormDialog as Wk}from"@ehfuse/mui-form-dialog";import{ClearTextField as $k}from"@ehfuse/mui-form-controls";import{ErrorAlert as Kk}from"@ehfuse/alerts";import Uk from"@mui/icons-material/CheckCircle";import Vk from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as Gk}from"@ehfuse/overlay-scrollbar";import{jsx as po,jsxs as al}from"react/jsx-runtime";var Wc=[{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 _i({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:a=!1,title:l="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:d="\uC5F0\uACB0",multiSelect:s=!1}){let u=we(),[x,p]=il("related"),[c,f]=il(""),[M,C]=il([]);qk(()=>{e&&(p("related"),f(""),C([]))},[e]);let h=Lk(()=>{let y=new Set([o.seq,...n]),_=c.trim().toLowerCase();return t.filter(E=>y.has(E.seq)||E.is_event||E.is_notice?!1:_?E.title.toLowerCase().includes(_)||(E.ticket_no??"").toLowerCase().includes(_):!0).sort((E,v)=>!!E.completed!=!!v.completed?E.completed?1:-1:v.seq-E.seq)},[t,o.seq,n,c]),g=()=>{if(M.length===0){Kk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let y of M)i(y,x);r()},I=y=>{C(_=>_.includes(y)?_.filter(E=>E!==y):s?[..._,y]:[y])},S=Wc.find(y=>y.type===x)?.hint??"",w=al(Pt,{sx:{...u?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...u?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[a?null:po(Hk,{value:x,onChange:(y,_)=>p(_),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Wc.map(y=>po(Fk,{value:y.type,label:y.label},y.type))}),a?null:po(Pt,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:S}),po(Pt,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:po($k,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:c,onChange:y=>f(y.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),po(Pt,{sx:{flex:1,minHeight:0},children:po(Gk,{style:{height:"100%"},contentStyle:{paddingTop:0},children:po(Pt,{sx:{display:"flex",flexDirection:"column"},children:h.length===0?po(Pt,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):h.map(y=>{let _=Ve(y.icon||Re),E=M.includes(y.seq);return al(Pt,{onClick:()=>I(y.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:E?"#e3eefb":"transparent","&:hover":{bgcolor:E?"#e3eefb":"#f7f7f5"}},children:[E?po(Uk,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):po(Vk,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),_?po(_,{sx:{fontSize:17,flexShrink:0,color:y.icon_color||"#1e3a8a"}}):null,al(Pt,{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:[y.ticket_no?`${y.ticket_no} `:"",y.title]}),po(Pt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:po(Le,{option:Io(y)})})]},y.seq)})})})})]});return po(Wk,{open:e,onClose:r,maxWidth:"sm",fullScreen:u,mobilePresentation:u?"slide":"dialog",...u?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:u?{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:l,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:w}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:po(Nk,{variant:"contained",disabled:M.length===0,onClick:g,children:d})}})}import{Fragment as tT,jsx as Te,jsxs as on}from"react/jsx-runtime";function wi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:d,linkCandidates:s,linkBaseTask:u,onLinkExistingTask:x,resolveLinkedTask:p}){let[c,f]=Dr(""),[M,C]=Dr(!1),[h,g]=Dr(null),I=we(),[S,w]=Dr(null),[y,_]=Dr(null),E=L=>{let m=L.task_seq?p?.(L.task_seq):void 0;return m?m.completed:L.checked},v=o.filter(E).length,D=()=>{c.trim()&&(t(e,c),f(""))};return on(Wo,{icon:Te(Qk,{sx:{fontSize:19,display:"block"}}),title:on(tT,{children:["\uD560\uC77C",o.length>0?on(To,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[v," / ",o.length]}):null]}),titleExtra:o.length>0?Te(To,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:Te(To,{sx:{height:"100%",borderRadius:3,width:`${Math.round(v/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[Te(To,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((L,m)=>{let T=L.task_seq?p?.(L.task_seq):void 0,b=E(L),k=!!L.task_seq;return on(To,{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:[Te(To,{component:"span",onClick:()=>n(e,m,!b),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:b?Te(Zk,{sx:{fontSize:18,color:"#2f80ed"}}):Te(oT,{sx:{fontSize:18,color:"#9a9a97"}})}),h?.index===m?Te(To,{component:"input",autoFocus:!0,spellCheck:!1,value:h.label,enterKeyHint:"done",onChange:R=>g({index:m,label:R.target.value}),onBlur:()=>{h.label.trim()&&h.label.trim()!==L.label&&i?.(e,m,h.label),g(null)},onKeyDown:R=>{R.key==="Enter"&&R.target.blur(),R.key==="Escape"&&g(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):Te(To,{component:"span",onClick:k?L.task_seq&&d?()=>d(L.task_seq):void 0:a||!i?void 0:I?()=>w({index:m,label:L.label}):()=>g({index:m,label:L.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:b?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...k?d?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:L.label}),k?on(To,{component:"span",onClick:L.task_seq&&d?()=>d(L.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",...d?{cursor:"pointer"}:{}},children:[Te(Jk,{sx:{fontSize:12}}),T?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!k&&l?Te(Kc,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:Te(Qn,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:R=>_({anchorEl:R.currentTarget,index:m,label:L.label}),sx:{display:I?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Te(Vc,{sx:{fontSize:16}})})}):null,a?null:Te(Qn,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,m),sx:{display:I?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Te(Uc,{sx:{fontSize:15}})})]},`${L.label}-${m}`)})}),on(To,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[Te(To,{component:"input",spellCheck:!1,value:c,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:L=>f(L.target.value),onKeyDown:L=>{L.key==="Enter"&&D()},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"}}}),s&&u&&x?Te(Kc,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:Te(Qn,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:L=>L.preventDefault(),onClick:()=>C(!0),sx:{flexShrink:0,color:"#9a9a97"},children:Te(eT,{sx:{fontSize:20}})})}):null,Te(Qn,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!c.trim(),onMouseDown:L=>L.preventDefault(),onClick:D,sx:{flexShrink:0,color:c.trim()?"#2f80ed":"#c9c8c5"},children:Te(Xk,{sx:{fontSize:20}})})]}),s&&u&&x?Te(_i,{open:M,task:u,tasks:s,excludeSeqs:o.map(L=>Number(L.task_seq??0)).filter(L=>L>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>C(!1),onSubmit:L=>{let m=s.find(T=>T.seq===L);x(e,L,String(m?.title??"").trim())}}):null,Te($e,{open:!!y,anchorEl:y?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>_(null),onConfirm:()=>{y&&l?.(e,y.index,y.label),_(null)}}),Te(jk,{open:!!S,onClose:()=>w(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:on(To,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[Te(To,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),Te(Yk,{autoFocus:!0,fullWidth:!0,size:"medium",value:S?.label??"",onChange:L=>w(m=>m&&{...m,label:L.target.value}),onKeyDown:L=>{if(L.key!=="Enter")return;let m=S;m&&m.label.trim()&&i?.(e,m.index,m.label.trim()),w(null)}}),on(To,{sx:{display:"flex",alignItems:"center",gap:1},children:[!a&&l&&S&&!o[S.index]?.task_seq?Te(Qn,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{l(e,S.index,o[S.index]?.label??""),w(null)},sx:{color:"#57564f"},children:Te(Vc,{sx:{fontSize:20}})}):null,!a&&S?Te(Qn,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,S.index),w(null)},sx:{color:"#e5484d"},children:Te(Uc,{sx:{fontSize:19}})}):null,Te(To,{sx:{flex:1}}),Te($c,{color:"inherit",onClick:()=>w(null),children:"\uCDE8\uC18C"}),Te($c,{variant:"contained",disabled:!S?.label.trim(),onClick:()=>{S&&S.label.trim()&&i?.(e,S.index,S.label.trim()),w(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as sT,useState as cT}from"react";import{Box as ut,IconButton as mT}from"@mui/material";import uT from"@mui/icons-material/Close";import Yc from"@mui/icons-material/AttachFileOutlined";var nT=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"]),Di=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return nT.has(o)};import{LinearProgress as rT}from"@mui/material";import{Fragment as iT,jsx as lT,jsxs as aT}from"react/jsx-runtime";function Gc(e){let o=gt(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),a=n??0;return!a||e>0&&(t??0)!==e?null:{index:a,total:r??0,queue:i??[]}}function ll(){let o=gt().useValue("attachmentUpload.progress");return aT(iT,{children:[o??0,"%"]})}function jc(){let o=gt().useValue("attachmentUpload.progress");return lT(rT,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as dT,jsx as Do,jsxs as Mr}from"react/jsx-runtime";function Mi(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Ei={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Oi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,d]=cT(!1),s=sT(null),u=we(),x=pr(),p=dr(),c=Gc(e),f=e===0,M=S=>{if(i){i(S);return}window.open(p(S.uuid??""),"_blank","noopener,noreferrer")},C=S=>{if(a){a(S);return}window.open(p(S.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=S=>c?S+1<c.index?"done":S+1===c.index?"uploading":"waiting":"waiting",g=(S,w,y,_={})=>Mr(ut,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:_.uploading?"#d5e6fb":"#e6e6e3",bgcolor:_.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Mr(ut,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Do(Yc,{sx:{fontSize:16,color:"#9a9a97"}}),w,Do(ut,{component:"span",sx:{fontSize:12,color:_.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:y}),_.removeIndex!==void 0?Do(mT,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,_.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Do(uT,{sx:{fontSize:15}})}):null]}),_.uploading?Do(jc,{}):null]},S),I=S=>{let w=Di(S.name);return Do(ut,{component:"button",type:"button",onClick:()=>w?M(S):C(S),title:`${S.name} ${w?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Ei,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:S.name})};return Mr(Wo,{icon:Do(Yc,{sx:{fontSize:18,display:"block"}}),title:Mr(dT,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Mr(ut,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((S,w)=>{let y=`${S.uuid||S.name}-${w}`;if(f){let _=h(w),E=_==="uploading";return g(y,Do(ut,{component:"span",sx:{...Ei,color:_==="done"?"#37352f":"#9a9a97"},children:S.name}),E?Do(ll,{}):Mi(S.size),{uploading:E,removeIndex:!r&&!c?w:void 0})}return S.uuid?g(y,I(S),Mi(S.size),{removeIndex:r?void 0:w}):g(y,Do(ut,{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:{...Ei,color:"#9a9a97"},children:S.name}),Mi(S.size),{removeIndex:r?void 0:w})}),!f&&c?c.queue.slice(c.index-1).map((S,w)=>{let y=w===0;return g(`uploading-${c.index+w}-${S.name}`,Do(ut,{component:"span",sx:{...Ei,color:"#9a9a97"},children:S.name}),y?Do(ll,{}):Mi(S.size),{uploading:y})}):null]}),Do(ut,{onClick:()=>s.current?.click(),onDragOver:S=>{S.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:S=>{S.preventDefault(),d(!1);let w=Array.from(S.dataTransfer.files);w.length>0&&t(e,w)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:l?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:l?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:u?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${x}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${x}MB)`}),Do(ut,{component:"input",ref:s,type:"file",multiple:!0,onChange:S=>{let w=Array.from(S.target.files??[]);w.length>0&&t(e,w),S.target.value=""},sx:{display:"none"}})]})}import{useState as kT}from"react";import{Checkbox as TT,Divider as yT,ListItemIcon as ST,Menu as BT,MenuItem as Jc}from"@mui/material";import CT from"@mui/icons-material/Add";import{useEffect as pT,useState as Xc}from"react";import{Box as sl,Button as fT}from"@mui/material";import{FormDialog as xT}from"@ehfuse/mui-form-dialog";import{ClearTextField as gT}from"@ehfuse/mui-form-controls";import{ColorPicker as hT}from"@ehfuse/mui-color-picker";import{ErrorAlert as bT}from"@ehfuse/alerts";import{jsx as Er,jsxs as cl}from"react/jsx-runtime";var Qc="#2f80ed";function Zc({open:e,onClose:o,onSubmit:t}){let[n,r]=Xc(""),[i,a]=Xc(Qc);pT(()=>{e&&(r(""),a(Qc))},[e]);let l=()=>{let u=n.trim();if(!u){bT("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(u,i),o()},d=rs(i),s=cl(sl,{children:[cl(sl,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Er(gT,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:u=>r(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Er(hT,{value:i,onChange:u=>a(u),shape:"circle",colorSize:28})]}),cl(sl,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Er(Le,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...d}})]})]});return Er(xT,{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:s}],actions:{showCancelButton:!0,right:Er(fT,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as vT,jsx as Zn,jsxs as Ri}from"react/jsx-runtime";function Pi({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=kT(!1),d=nt();return Ri(vT,{children:[Ri(BT,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...d,children:[t.map(s=>{let u=o.includes(s.key);return Ri(Jc,{onClick:()=>n(s.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Zn(TT,{size:"small",checked:u,sx:{p:0}}),Zn(Le,{option:s})]},s.key)}),Zn(yT,{}),Ri(Jc,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Zn(ST,{children:Zn(CT,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Zn(Zc,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function em(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 om(e,o){let t=(e.target_account_seqs??[]).filter(x=>x>0);if(t.length===0)return null;let n=new Set(t),r=em(e,o),i=new Map;for(let x of r){let p=String(x.department??"").trim();if(!p)continue;let c=i.get(p)??[];c.push(x),i.set(p,c)}let a=[],l=new Set;for(let[x,p]of i)if(p.every(f=>n.has(Number(f.account_seq??0)))){a.push(x);for(let f of p)l.add(Number(f.account_seq??0))}let d=new Map(r.map(x=>[Number(x.account_seq??0),x.name])),s=e.target_names??[],u=[];return t.forEach((x,p)=>{l.has(x)||u.push(d.get(x)??s[p]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:u}}function zi(e,o){let t=om(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function hR(e,o){let t=om(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function tm(e,o,t){let n=(e.target_account_seqs??[]).filter(u=>u>0),r=em(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(u=>u.account_seq===t),d=t>0&&Number(e.author_account_seq??0)===t,s=n.length===0||n.includes(t);return{count:a.length,total:i,acked:l,canAck:t>0&&!d&&s&&!l&&!e.completed}}function nm(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(l=>l.size>n),i=e.filter(l=>l.size<=n),a=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(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{Fragment as Ai,jsx as Be,jsxs as Pr}from"react/jsx-runtime";var im="#0f9d58";function ml({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,hideBug:l=!1,leadingRow:d,hideLabel:s=!1,employees:u=[],myAccountSeq:x=0,onMemberEdit:p,onAddProject:c,onAddLabelOption:f,contentSyncKey:M="create"}){let C=gt(),h=pr(),g=e.useFormValue("manager_name"),I=e.useFormValue("receiver_names"),S=e.useFormValue("start_date"),w=!!e.useFormValue("is_event"),y=!!e.useFormValue("is_bug"),_=e.useFormValue("bug_repro")??"",E=e.useFormValue("bug_device")??"",v=e.useFormValue("bug_where")??"",D=e.useFormValue("bug_version")??"",L=e.useFormValue("event_time")??"",m=e.useFormValue("event_place")??"",T=e.useFormValue("event_address")??"",b=e.useFormValue("due_date"),k=e.useFormValue("estimated_time")??"",R=e.useFormValue("reminder"),q=e.useFormValue("priority"),ae=e.useFormValue("content"),ce=e.useFormValue("checklist")??[],ie=e.useFormValue("tab_key"),ye=e.useFormValue("sprint_seq")??0,he=e.useFormValue("story_points")??0,me=t.find(A=>A.key===ie&&A.useSprints),ee=me?n.filter(A=>`custom-${A.group_seq}`===ie):[],[ze,Ae]=rm(null),H=e.useFormValue("label_keys"),[K,J]=rm(null),B=e.useFormValue("target_names"),F=e.useFormValue("target_account_seqs"),$=C.useValue("createAttachmentFiles")??[],Me=i?zi({author_account_seq:x,target_names:B,target_account_seqs:F},u):"";return Pr(Ai,{children:[d,i?null:Be(Or,{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"},...l?[]:[{value:"bug",label:"\uC624\uB958"}]].map(A=>{let ue=y?"bug":w?"event":"task",ge=ue===A.value;return Be(IT,{onClick:()=>{if(ue===A.value)return;e.setFormValue("is_event",A.value==="event"),e.setFormValue("is_bug",A.value==="bug"),e.setFormValue("is_open",A.value==="bug");let de=e.getFormValue("icon"),qe=e.getFormValue("icon_color"),Y=[Re,"event",fr].includes(de),Ie=!qe||qe===im||qe===xr;Y&&e.setFormValue("icon",A.value==="event"?"event":A.value==="bug"?fr:Re),Ie&&e.setFormValue("icon_color",A.value==="event"?im:A.value==="bug"?xr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:ge?600:400,color:ge?"#ffffff":"#787774",bgcolor:ge?"#2563eb":"#f4f4f2"},children:A.label},A.label)})}),Be(Rr,{sx:{borderColor:"#e6e6e3"}}),Pr(Or,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[Be(Ci,{hideProject:a,showEstimatedTime:!w,values:{tabKey:ie,managerName:g,receiverNames:I,startDate:S,dueDate:b,reminder:R,priority:q,estimatedTime:k,eventTime:L,eventPlace:m,eventAddress:T},onChangeEstimatedTime:A=>e.setFormValue("estimated_time",A),customTabs:t,avatarSrcByName:r,notice:i,event:w,onChangeEventTime:A=>e.setFormValue("event_time",A),onChangeEventPlace:A=>e.setFormValue("event_place",A),onChangeEventAddress:A=>e.setFormValue("event_address",A),targetSummary:Me,onChangeProject:A=>e.setFormValue("tab_key",A),onAddProject:c,onChangeStartDate:A=>e.setFormValue("start_date",A),onChangeDueDate:A=>e.setFormValue("due_date",A),onChangeReminder:A=>e.setFormValue("reminder",A),onChangePriority:A=>e.setFormValue("priority",A),onMemberEdit:p,trailing:Pr(Ai,{children:[me&&!w&&!i?Pr(Ai,{children:[Be(xe,{icon:Be(OT,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:A=>Ae(A),children:ye>0?ee.find(A=>A.seq===ye)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":Be(Or,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),Be(xe,{icon:Be(RT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:Be(Rt,{value:he>0?String(he):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:A=>e.setFormValue("story_points",Number(A.replace(/[^0-9.]/g,""))||0)})})]}):null,y?Be(vi,{values:{repro:_,device:E,where:v,version:D},onChangeRepro:A=>e.setFormValue("bug_repro",A),onChangeDevice:A=>e.setFormValue("bug_device",A),onChangeWhere:A=>e.setFormValue("bug_where",A),onChangeVersion:A=>e.setFormValue("bug_version",A)}):null]}),leading:w||s?null:Be(Or,{sx:{gridColumn:"1 / -1"},children:Be(xe,{icon:Be(ET,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:A=>J(A),children:(H??[]).length>0?Be(Wt,{labelKeys:H??[],labelOptions:o}):Be(Or,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),Be(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),Be(Wo,{icon:Be(DT,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:Be(Ii,{syncKey:M,value:ae,onChange:A=>e.setFormValue("content",A)})}),w?null:Be(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),w?null:Be(wi,{taskSeq:0,checklist:ce,onAdd:(A,ue)=>e.setFormValue("checklist",[...ce,{label:ue,checked:!1}]),onToggle:(A,ue,ge)=>e.setFormValue("checklist",ce.map((de,qe)=>qe===ue?{...de,checked:ge}:de)),onRemove:(A,ue)=>e.setFormValue("checklist",ce.filter((ge,de)=>de!==ue)),onUpdate:(A,ue,ge)=>e.setFormValue("checklist",ce.map((de,qe)=>qe===ue?{...de,label:ge}:de))}),Be(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),Be(Oi,{taskSeq:0,attachments:$.map(A=>({name:A.name,size:A.size})),onAdd:(A,ue)=>{let ge=nm(ue,h);ge.message&&zT(ge.message),ge.accepted.length!==0&&C.setValue("createAttachmentFiles",[...C.getValue("createAttachmentFiles")??[],...ge.accepted])},onRemove:(A,ue)=>C.setValue("createAttachmentFiles",$.filter((ge,de)=>de!==ue))}),y?null:Pr(Ai,{children:[Be(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),Be(Wo,{icon:Be(MT,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:Be(PT,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),Be(_T,{transitionDuration:0,anchorEl:ze,open:!!ze,onClose:()=>Ae(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ee.map(A=>({seq:A.seq,label:Fo(A)}))].map(A=>Be(wT,{onClick:()=>{e.setFormValue("sprint_seq",A.seq),Ae(null)},sx:{fontSize:14,minWidth:170},children:A.label},A.seq))}),Be(Pi,{anchorEl:K,selectedKeys:H??[],labelOptions:o,onToggle:A=>e.setFormValue("label_keys",Vr(H??[],A)),onAddLabel:(A,ue)=>f?.(A,ue),onClose:()=>J(null)})]})}import{Fragment as sm,jsx as Ge,jsxs as Jn}from"react/jsx-runtime";function iP({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:a=null,isNotice:l=!1,defaultBug:d=!1}=t,s=gt(),u=qT(!1),[x,p]=am(0),[c,f]=am(null),M=n.useFormValue("title"),C=n.useFormValue("icon"),h=n.useFormValue("icon_color"),g=!!n.useFormValue("is_event"),I=!!n.useFormValue("is_bug"),S=we(),y=s.useValue("createSubmitting")??!1,_=Pn(C||Re),E=l?"\uACF5\uC9C0 \uB4F1\uB85D":g?"\uC77C\uC815 \uB4F1\uB85D":I?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",v=l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":g?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":I?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";AT(()=>{let m=u.current;u.current=e,!(!e||m)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?vo:d?fr:Re,icon_color:l?"#e5484d":d?xr:"",manager_name:a?.name??"",manager_account_seq:a?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:d,is_open:d,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:We(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:i}),s.setValue("createAttachmentFiles",[]),p(T=>T+1))},[e]);let D=Jn(tn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[Ge(dl,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:m=>f(m.currentTarget),sx:{p:0,color:h||"#1e3a8a"},children:Ge(_,{sx:{fontSize:20}})}),Ge(tn,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:v,onChange:m=>n.setFormValue("title",m.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}}})]}),L=Ge(Xn,{anchorEl:c,value:C,color:h||"#1e3a8a",onSelect:m=>n.setFormValue("icon",m),onSelectColor:m=>n.setFormValue("icon_color",m),onClose:()=>f(null)});return S?Jn(sm,{children:[Ge(WT,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:E,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Ge(ul,{variant:"contained",size:"small",disableElevation:!0,disabled:y,onClick:y?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:y?"\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:Ge(tn,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Ge(ml,{...t,contentSyncKey:`create-${x}`,leadingRow:D})})}]}),L]}):Jn(sm,{children:[Ge(LT,{anchor:"right",open:e,onClose:o,sx:{zIndex:m=>m.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Jn(tn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[Jn(tn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[Ge(NT,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Ge(dl,{size:"small",onClick:m=>f(m.currentTarget),sx:{color:h||"#1e3a8a"},children:Ge(_,{sx:{fontSize:20}})})}),Ge(tn,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:v,onChange:m=>n.setFormValue("title",m.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}}}),Ge(dl,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Ge(FT,{})})]}),Ge(lm,{sx:{borderColor:"#e6e6e3"}}),Ge(tn,{sx:{flex:1,minHeight:0},children:Ge(HT,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Ge(ml,{...t,contentSyncKey:`create-${x}`})})}),Ge(lm,{sx:{borderColor:"#e6e6e3"}}),Jn(tn,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Ge(ul,{onClick:o,color:"inherit",disabled:y,children:"\uCDE8\uC18C"}),Ge(ul,{onClick:n.submit,variant:"contained",disabled:y,children:y?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),L]})}import{useEffect as wm,useRef as Dm,useState as Mm}from"react";import{Box as $i,Button as Uy,Divider as Em,Drawer as Vy}from"@mui/material";import Gy from"@mui/icons-material/ShareOutlined";import jy from"@mui/icons-material/HistoryOutlined";import Yy from"@ehfuse/overlay-scrollbar";import{FormDialog as Xy}from"@ehfuse/mui-form-dialog";import{SuccessAlert as Om}from"@ehfuse/alerts";import{useRef as fl,useState as er}from"react";import{Box as re,Button as cm,Chip as qi,IconButton as Qo,Tooltip as pm}from"@mui/material";import mm from"@mui/icons-material/Send";import{TextField as $T}from"@ehfuse/mui-form-controls";import Li from"@mui/icons-material/Close";import KT from"@mui/icons-material/EditOutlined";import UT from"@mui/icons-material/Favorite";import VT from"@mui/icons-material/FavoriteBorderOutlined";import GT from"@mui/icons-material/CheckCircle";import jT from"@mui/icons-material/CheckCircleOutlineOutlined";import or from"@mui/icons-material/AttachFileOutlined";import YT from"@mui/icons-material/AddCircleOutline";import XT from"@mui/icons-material/ImageOutlined";var pl=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]};import{Fragment as dm,jsx as U,jsxs as je}from"react/jsx-runtime";var QT=5;function um({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(s=>s.account_seq===t),a=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?a:U(re,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(s=>`${s.name} \xB7 ${s.time}`).join(`
|
|
8
|
-
`)}),d=e==="like"?"#e5484d":"#2f80ed";return U(pm,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(re,{sx:{display:"inline-flex",alignItems:"center"},children:[U(Qo,{size:"small","aria-label":`\uB313\uAE00 ${a}`,onClick:n,sx:{color:i?d:"#c9c8c5",p:.5},children:e==="like"?i?U(UT,{sx:{fontSize:16}}):U(VT,{sx:{fontSize:16}}):i?U(GT,{sx:{fontSize:16}}):U(jT,{sx:{fontSize:16}})}),r.length>0?U(re,{component:"span",sx:{fontSize:12,color:i?d:"#9a9a97",ml:-.25},children:r.length}):null]})})}function fm({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:a,onToggleReaction:l,onPreview:d,onDownload:s}){let[u,x]=er(null),p=fl(null),[c,f]=er(null),[M,C]=er(!1),h=Math.max(0,o.length-QT),g=h>0&&!M,I=u?Math.min(u.index,h):h,S=o.map((v,D)=>({comment:v,index:D})).slice(g?I:0),w=dr(),y=v=>{if(d){d(v);return}window.open(w(v.uuid??""),"_blank","noopener,noreferrer")},_=v=>{if(s){s(v);return}window.open(w(v.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},E=Ao().slots?.avatar;return je(re,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[je(re,{sx:{display:"flex",alignItems:"center",gap:1},children:[U(Kt,{sx:{fontSize:18,display:"block",color:"#37352f"}}),je(re,{sx:{fontSize:ol,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),h>0&&(!g||I>0)?U(re,{role:"button",tabIndex:0,onClick:()=>C(v=>!v),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),C(D=>!D))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:g?`\uC774\uC804 \uB313\uAE00 ${I}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?U(re,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,U(re,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:S.map(({comment:v,index:D})=>{let L=!!t&&v.author===t;return je(re,{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 m=r?.get(v.author)??"";return E?U(re,{sx:{display:"inline-flex",flexShrink:0},children:U(E,{name:v.author,src:m||void 0,size:44})}):U(re,{sx:{display:"inline-flex",flexShrink:0},children:U(rt,{src:m,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Ln[0]},iconFontSize:24})})})(),je(re,{sx:{flex:1,minWidth:0},children:[je(re,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[U(re,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.author}),U(re,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:v.time}),L?U(re,{sx:{ml:"auto"}}):je(re,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[U(um,{kind:"like",reactions:v.likes,myAccountSeq:n,onToggle:()=>l?.(e,D,"like")}),U(um,{kind:"ack",reactions:v.acks,myAccountSeq:n,onToggle:()=>l?.(e,D,"ack")})]}),L?je(re,{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:[U(Qo,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>x({index:D,text:v.text,attachments:[...v.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:U(KT,{sx:{fontSize:15}})}),U(Qo,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:m=>f({anchorEl:m.currentTarget,index:D}),sx:{color:"#9a9a97"},children:U(Li,{sx:{fontSize:15}})})]}):null]}),u?.index===D?je(re,{sx:{mt:.5},children:[U(re,{component:"textarea",autoFocus:!0,spellCheck:!1,value:u.text,onChange:m=>x({...u,text:m.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),je(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[u.attachments.map((m,T)=>{let b=()=>x({...u,attachments:u.attachments.filter((k,R)=>R!==T)});return Ni(m.name)&&m.uuid?je(re,{sx:{position:"relative"},children:[U(re,{component:"img",src:w(m.uuid,{thumb:"md"}),alt:m.name,title:m.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),U(Qo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:b,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:U(Li,{sx:{fontSize:14}})})]},`kept-${m.uuid}-${T}`):U(qi,{size:"small",icon:U(or,{sx:{fontSize:14}}),label:m.name,onDelete:b,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${m.uuid??m.name}-${T}`)}),u.files.map((m,T)=>{let b=()=>x({...u,files:u.files.filter((k,R)=>R!==T)});return Ni(m.name)?je(re,{sx:{position:"relative"},children:[U(re,{component:"img",src:URL.createObjectURL(m),alt:m.name,title:`${m.name} (\uC0C8 \uD30C\uC77C)`,onLoad:k=>URL.revokeObjectURL(k.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),U(Qo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:b,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:U(Li,{sx:{fontSize:14}})})]},`new-${m.name}-${T}`):U(qi,{size:"small",icon:U(or,{sx:{fontSize:14}}),label:`${m.name} (\uC0C8 \uD30C\uC77C)`,onDelete:b,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${m.name}-${T}`)}),U(pm,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:U(Qo,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>p.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:U(YT,{sx:{fontSize:20}})})})]}),je(re,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[U(cm,{size:"small",color:"inherit",onClick:()=>x(null),children:"\uCDE8\uC18C"}),U(cm,{size:"small",variant:"contained",disabled:!u.text.trim()&&u.attachments.length===0&&u.files.length===0,onClick:()=>{i(e,D,u.text,{attachments:u.attachments,files:u.files}),x(null)},children:"\uC800\uC7A5"})]}),U(re,{component:"input",type:"file",multiple:!0,ref:p,sx:{display:"none"},onChange:m=>{let T=Array.from(m.target.files??[]);T.length>0&&x({...u,files:[...u.files,...T].slice(0,10)}),m.target.value=""}})]}):je(re,{children:[v.text?U(re,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:v.text}):null,(v.attachments??[]).length>0?U(re,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(v.attachments??[]).map((m,T)=>{let b=!!m.uuid;if(Ni(m.name)&&b)return U(re,{component:"img",src:w(m.uuid??"",{thumb:"md"}),alt:m.name,title:`${m.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>y(m),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${m.name}-${T}`);let R=Di(m.name);return U(qi,{size:"small",icon:U(or,{sx:{fontSize:14}}),label:`${m.name} (${pl(m.size)})`,clickable:b,onClick:b?()=>R?y(m):_(m):void 0,title:b?`${m.name} ${R?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:m.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${T}`)})}):null]})]})]},`${v.time}-${D}`)})}),U($e,{open:!!c,anchorEl:c?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>f(null),onConfirm:()=>{c&&(a(e,c.index),x(null)),f(null)}})]})}function Ni(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function xm({onSubmit:e}){let[o,t]=er(""),[n,r]=er([]),[i,a]=er(!1),l=fl(null),d=fl(null),s=we(),u=c=>{let f=Array.from(c??[]);f.length!==0&&r(M=>[...M,...f].slice(0,10))},x=()=>{let c=o.trim();!c&&n.length===0||(e(c,n.length>0?n:void 0),t(""),r([]))},p=je(dm,{children:[U(Qo,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>l.current?.click(),sx:{color:"#9a9a97"},children:U(or,{sx:{fontSize:20}})}),U(Qo,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>d.current?.click(),sx:{color:"#9a9a97"},children:U(XT,{sx:{fontSize:20}})})]});return je(re,{children:[n.length>0?U(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((c,f)=>Ni(c.name)?je(re,{sx:{position:"relative"},children:[U(re,{component:"img",src:URL.createObjectURL(c),alt:c.name,title:c.name,onLoad:M=>URL.revokeObjectURL(M.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),U(Qo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(M=>M.filter((C,h)=>h!==f)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:U(Li,{sx:{fontSize:14}})})]},`${c.name}-${f}`):U(qi,{size:"small",icon:U(or,{sx:{fontSize:14}}),label:`${c.name} (${pl(c.size)})`,onDelete:()=>r(M=>M.filter((C,h)=>h!==f)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${c.name}-${f}`))}):null,je(re,{sx:{position:"relative",display:"flex"},onDragOver:c=>{Array.from(c.dataTransfer?.types??[]).includes("Files")&&(c.preventDefault(),a(!0))},onDragLeave:c=>{c.currentTarget.contains(c.relatedTarget)||a(!1)},onDrop:c=>{Array.from(c.dataTransfer?.types??[]).includes("Files")&&(c.preventDefault(),a(!1),u(c.dataTransfer?.files??null))},children:[i?je(re,{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:[U(or,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,U($T,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:c=>t(c.target.value),fullWidth:!0,multiline:!0,minRows:s?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:s?15:6.5,pb:s?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),s?je(re,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,U(Qo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:x,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:U(mm,{sx:{fontSize:22}})})]}):je(dm,{children:[U(re,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),U(Qo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:x,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:U(mm,{sx:{fontSize:22}})})]})]}),U(re,{component:"input",ref:l,type:"file",multiple:!0,onChange:c=>{u(c.target.files),c.target.value=""},sx:{display:"none"}}),U(re,{component:"input",ref:d,type:"file",accept:"image/*",multiple:!0,onChange:c=>{u(c.target.files),c.target.value=""},sx:{display:"none"}})]})}import{useState as xl}from"react";import{Box as Wi,Checkbox as sy,IconButton as nr,Tooltip as zr}from"@mui/material";import cy from"@mui/icons-material/Close";import my from"@mui/icons-material/ArrowBack";import uy from"@mui/icons-material/ShareOutlined";import dy from"@mui/icons-material/ContentCopyOutlined";import py from"@mui/icons-material/CheckCircle";import fy from"@mui/icons-material/CheckCircleOutlineOutlined";import xy from"@mui/icons-material/HistoryOutlined";import gy from"@mui/icons-material/PrintOutlined";import{useEffect as ZT}from"react";import{Box as zt,Button as JT,CircularProgress as ey}from"@mui/material";import{FormDialog as oy}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as ty}from"@ehfuse/overlay-scrollbar";import{jsx as At,jsxs as Fi}from"react/jsx-runtime";var ny={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 gm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function ry(e){if(e.kind!=="field")return ny[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) "${gm(t)}" \u2192 "${gm(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Hi({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let a=we();ZT(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let l=At(zt,{sx:{height:a?"100%":420,minHeight:0},children:At(ty,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Fi(zt,{sx:{px:a?2:0,display:"flex",flexDirection:"column",gap:1},children:[n&&!t?Fi(zt,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[At(ey,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?At(zt,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(d=>Fi(zt,{sx:{display:"flex",gap:1,alignItems:"baseline",minWidth:0,flexShrink:0},children:[At(zt,{sx:{flexShrink:0,width:"10.5em",whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Vo(d.acted_time)}),Fi(zt,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[At(zt,{component:"span",sx:{fontWeight:500},children:String(d.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),At(zt,{component:"span",sx:{ml:.5},children:ry(d)})]})]},d.seq))]})})});return At(oy,{open:e,onClose:i,maxWidth:"sm",fullScreen:a,mobilePresentation:a?"slide":"dialog",...a?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:a?{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:l}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!1,right:At(JT,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{InfoAlert as iy,SuccessAlert as ay}from"@ehfuse/alerts";var hm=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
8
|
+
`)}),d=e==="like"?"#e5484d":"#2f80ed";return U(pm,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(re,{sx:{display:"inline-flex",alignItems:"center"},children:[U(Qo,{size:"small","aria-label":`\uB313\uAE00 ${a}`,onClick:n,sx:{color:i?d:"#c9c8c5",p:.5},children:e==="like"?i?U(UT,{sx:{fontSize:16}}):U(VT,{sx:{fontSize:16}}):i?U(GT,{sx:{fontSize:16}}):U(jT,{sx:{fontSize:16}})}),r.length>0?U(re,{component:"span",sx:{fontSize:12,color:i?d:"#9a9a97",ml:-.25},children:r.length}):null]})})}function fm({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:a,onToggleReaction:l,onPreview:d,onDownload:s}){let[u,x]=er(null),p=fl(null),[c,f]=er(null),[M,C]=er(!1),h=Math.max(0,o.length-QT),g=h>0&&!M,I=u?Math.min(u.index,h):h,S=o.map((v,D)=>({comment:v,index:D})).slice(g?I:0),w=dr(),y=v=>{if(d){d(v);return}window.open(w(v.uuid??""),"_blank","noopener,noreferrer")},_=v=>{if(s){s(v);return}window.open(w(v.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},E=Ao().slots?.avatar;return je(re,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[je(re,{sx:{display:"flex",alignItems:"center",gap:1},children:[U(Kt,{sx:{fontSize:18,display:"block",color:"#37352f"}}),je(re,{sx:{fontSize:ol,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),h>0&&(!g||I>0)?U(re,{role:"button",tabIndex:0,onClick:()=>C(v=>!v),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),C(D=>!D))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:g?`\uC774\uC804 \uB313\uAE00 ${I}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?U(re,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,U(re,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:S.map(({comment:v,index:D})=>{let L=!!t&&v.author===t;return je(re,{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 m=r?.get(v.author)??"";return E?U(re,{sx:{display:"inline-flex",flexShrink:0},children:U(E,{name:v.author,src:m||void 0,size:44})}):U(re,{sx:{display:"inline-flex",flexShrink:0},children:U(rt,{src:m,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Ln[0]},iconFontSize:24})})})(),je(re,{sx:{flex:1,minWidth:0},children:[je(re,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[U(re,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.author}),U(re,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:v.time}),L?U(re,{sx:{ml:"auto"}}):je(re,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[U(um,{kind:"like",reactions:v.likes,myAccountSeq:n,onToggle:()=>l?.(e,D,"like")}),U(um,{kind:"ack",reactions:v.acks,myAccountSeq:n,onToggle:()=>l?.(e,D,"ack")})]}),L?je(re,{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:[U(Qo,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>x({index:D,text:v.text,attachments:[...v.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:U(KT,{sx:{fontSize:15}})}),U(Qo,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:m=>f({anchorEl:m.currentTarget,index:D}),sx:{color:"#9a9a97"},children:U(Li,{sx:{fontSize:15}})})]}):null]}),u?.index===D?je(re,{sx:{mt:.5},children:[U(re,{component:"textarea",autoFocus:!0,spellCheck:!1,value:u.text,onChange:m=>x({...u,text:m.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),je(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[u.attachments.map((m,T)=>{let b=()=>x({...u,attachments:u.attachments.filter((k,R)=>R!==T)});return Ni(m.name)&&m.uuid?je(re,{sx:{position:"relative"},children:[U(re,{component:"img",src:w(m.uuid,{thumb:"md"}),alt:m.name,title:m.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),U(Qo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:b,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:U(Li,{sx:{fontSize:14}})})]},`kept-${m.uuid}-${T}`):U(qi,{size:"small",icon:U(or,{sx:{fontSize:14}}),label:m.name,onDelete:b,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${m.uuid??m.name}-${T}`)}),u.files.map((m,T)=>{let b=()=>x({...u,files:u.files.filter((k,R)=>R!==T)});return Ni(m.name)?je(re,{sx:{position:"relative"},children:[U(re,{component:"img",src:URL.createObjectURL(m),alt:m.name,title:`${m.name} (\uC0C8 \uD30C\uC77C)`,onLoad:k=>URL.revokeObjectURL(k.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),U(Qo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:b,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:U(Li,{sx:{fontSize:14}})})]},`new-${m.name}-${T}`):U(qi,{size:"small",icon:U(or,{sx:{fontSize:14}}),label:`${m.name} (\uC0C8 \uD30C\uC77C)`,onDelete:b,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${m.name}-${T}`)}),U(pm,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:U(Qo,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>p.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:U(YT,{sx:{fontSize:20}})})})]}),je(re,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[U(cm,{size:"small",color:"inherit",onClick:()=>x(null),children:"\uCDE8\uC18C"}),U(cm,{size:"small",variant:"contained",disabled:!u.text.trim()&&u.attachments.length===0&&u.files.length===0,onClick:()=>{i(e,D,u.text,{attachments:u.attachments,files:u.files}),x(null)},children:"\uC800\uC7A5"})]}),U(re,{component:"input",type:"file",multiple:!0,ref:p,sx:{display:"none"},onChange:m=>{let T=Array.from(m.target.files??[]);T.length>0&&x({...u,files:[...u.files,...T].slice(0,10)}),m.target.value=""}})]}):je(re,{children:[v.text?U(re,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:v.text}):null,(v.attachments??[]).length>0?U(re,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(v.attachments??[]).map((m,T)=>{let b=!!m.uuid;if(Ni(m.name)&&b)return U(re,{component:"img",src:w(m.uuid??"",{thumb:"md"}),alt:m.name,title:`${m.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>y(m),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${m.name}-${T}`);let R=Di(m.name);return U(qi,{size:"small",icon:U(or,{sx:{fontSize:14}}),label:`${m.name} (${pl(m.size)})`,clickable:b,onClick:b?()=>R?y(m):_(m):void 0,title:b?`${m.name} ${R?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:m.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${T}`)})}):null]})]})]},`${v.time}-${D}`)})}),U($e,{open:!!c,anchorEl:c?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>f(null),onConfirm:()=>{c&&(a(e,c.index),x(null)),f(null)}})]})}function Ni(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function xm({onSubmit:e}){let[o,t]=er(""),[n,r]=er([]),[i,a]=er(!1),l=fl(null),d=fl(null),s=we(),u=c=>{let f=Array.from(c??[]);f.length!==0&&r(M=>[...M,...f].slice(0,10))},x=()=>{let c=o.trim();!c&&n.length===0||(e(c,n.length>0?n:void 0),t(""),r([]))},p=je(dm,{children:[U(Qo,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>l.current?.click(),sx:{color:"#9a9a97"},children:U(or,{sx:{fontSize:20}})}),U(Qo,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>d.current?.click(),sx:{color:"#9a9a97"},children:U(XT,{sx:{fontSize:20}})})]});return je(re,{children:[n.length>0?U(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((c,f)=>Ni(c.name)?je(re,{sx:{position:"relative"},children:[U(re,{component:"img",src:URL.createObjectURL(c),alt:c.name,title:c.name,onLoad:M=>URL.revokeObjectURL(M.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),U(Qo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(M=>M.filter((C,h)=>h!==f)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:U(Li,{sx:{fontSize:14}})})]},`${c.name}-${f}`):U(qi,{size:"small",icon:U(or,{sx:{fontSize:14}}),label:`${c.name} (${pl(c.size)})`,onDelete:()=>r(M=>M.filter((C,h)=>h!==f)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${c.name}-${f}`))}):null,je(re,{sx:{position:"relative",display:"flex"},onDragOver:c=>{Array.from(c.dataTransfer?.types??[]).includes("Files")&&(c.preventDefault(),a(!0))},onDragLeave:c=>{c.currentTarget.contains(c.relatedTarget)||a(!1)},onDrop:c=>{Array.from(c.dataTransfer?.types??[]).includes("Files")&&(c.preventDefault(),a(!1),u(c.dataTransfer?.files??null))},children:[i?je(re,{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:[U(or,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,U($T,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:c=>t(c.target.value),fullWidth:!0,multiline:!0,minRows:s?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:s?15:6.5,pb:s?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),s?je(re,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,U(Qo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:x,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:U(mm,{sx:{fontSize:22}})})]}):je(dm,{children:[U(re,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),U(Qo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:x,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:U(mm,{sx:{fontSize:22}})})]})]}),U(re,{component:"input",ref:l,type:"file",multiple:!0,onChange:c=>{u(c.target.files),c.target.value=""},sx:{display:"none"}}),U(re,{component:"input",ref:d,type:"file",accept:"image/*",multiple:!0,onChange:c=>{u(c.target.files),c.target.value=""},sx:{display:"none"}})]})}import{useState as xl}from"react";import{Box as Wi,Checkbox as sy,IconButton as nr,Tooltip as zr}from"@mui/material";import cy from"@mui/icons-material/Close";import my from"@mui/icons-material/ArrowBack";import uy from"@mui/icons-material/ShareOutlined";import dy from"@mui/icons-material/ContentCopyOutlined";import py from"@mui/icons-material/CheckCircle";import fy from"@mui/icons-material/CheckCircleOutlineOutlined";import xy from"@mui/icons-material/HistoryOutlined";import gy from"@mui/icons-material/PrintOutlined";import{useEffect as ZT}from"react";import{Box as zt,Button as JT,CircularProgress as ey}from"@mui/material";import{FormDialog as oy}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as ty}from"@ehfuse/overlay-scrollbar";import{jsx as At,jsxs as Fi}from"react/jsx-runtime";var ny={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 gm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function ry(e){if(e.kind!=="field")return ny[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) "${gm(t)}" \u2192 "${gm(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Hi({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let a=we();ZT(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let l=At(zt,{sx:{height:a?"100%":420,minHeight:0},children:At(ty,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Fi(zt,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[n&&!t?Fi(zt,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[At(ey,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?At(zt,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(d=>Fi(zt,{sx:{display:"flex",flexDirection:a?"column":"row",gap:a?.25:1,alignItems:a?"stretch":"baseline",minWidth:0,flexShrink:0,...a?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[At(zt,{sx:{flexShrink:0,...a?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Vo(d.acted_time)}),Fi(zt,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[At(zt,{component:"span",sx:{fontWeight:500},children:String(d.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),At(zt,{component:"span",sx:{ml:.5},children:ry(d)})]})]},d.seq))]})})});return At(oy,{open:e,onClose:i,maxWidth:"sm",fullScreen:a,mobilePresentation:a?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:a?{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:l}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:At(JT,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{InfoAlert as iy,SuccessAlert as ay}from"@ehfuse/alerts";var hm=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(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&").replace(/\n{3,}/g,`
|
|
11
11
|
|
|
12
12
|
`).trim():"";function ly(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=it(e.start_date),n=it(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=Io(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=hm(e.content);i&&o.push("",i);let a=String(e.note??"").trim();return a&&o.push("",`\uBE44\uACE0: ${a}`),o.join(`
|
|
13
|
-
`)}function bm(e){navigator.clipboard.writeText(e).then(()=>ay("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>iy("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function tr(e,o){let t=ly(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&bm(t)});return}bm(t)}import{Fragment as hy,jsx as Pe,jsxs as km}from"react/jsx-runtime";function Tm({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1,activityItems:d,activityLoading:s,onLoadActivity:u,onPrint:x}){let p=we(),[c,f]=xl(!1),[M,C]=xl(null),[h,g]=xl(null),I=Pn(e.icon||(e.is_notice?vo:e.is_event?"event":Re)),S=!!e.is_notice,w=!!e.is_event,y=S&&o>0&&(e.author_account_seq??0)===o,_=!ht(e,o),E=!w&&(S?y:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return km(hy,{children:[km(Wi,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?Pe(nr,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:Pe(my,{})}):null,E&&!l?Pe(zr,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Vo(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Pe(sy,{checked:e.completed,icon:Pe(fy,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:Pe(py,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(v,D)=>t(e.seq,D),sx:{p:0}})}):null,l?null:Pe(zr,{title:_?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Pe(nr,{size:"small",onClick:_?void 0:v=>g(v.currentTarget),sx:{color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:Pe(I,{sx:{fontSize:20}})})}),M!==null?Pe(Wi,{component:"input",autoFocus:!0,spellCheck:!1,value:M,onChange:v=>C(v.target.value),onBlur:()=>{M.trim()&&M.trim()!==e.title&&n(e.seq,M.trim()),C(null)},onKeyDown:v=>{v.key==="Enter"&&v.target.blur(),v.key==="Escape"&&C(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?Pe(Wi,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":w?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Pe(Wi,{onClick:_?void 0:()=>C(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:_?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),u?Pe(zr,{title:"\uD65C\uB3D9",arrow:!0,children:Pe(nr,{"aria-label":"\uD65C\uB3D9",onClick:()=>f(!0),sx:{color:"#6b7280"},children:Pe(xy,{sx:{fontSize:20}})})}):null,Pe(zr,{title:p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Pe(nr,{"aria-label":p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>tr(e,p),sx:{color:"#6b7280"},children:p?Pe(uy,{sx:{fontSize:20}}):Pe(dy,{sx:{fontSize:20}})})}),x?Pe(zr,{title:"\uC778\uC1C4",arrow:!0,children:Pe(nr,{"aria-label":"\uC778\uC1C4",onClick:()=>x(e),sx:{color:"#6b7280"},children:Pe(gy,{sx:{fontSize:20}})})}):null,a&&!l?Pe(nr,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:Pe(cy,{})}):null]}),Pe(Xn,{anchorEl:h,value:e.icon||(S?vo:""),color:e.icon_color||(S?"#e5484d":"#1e3a8a"),onSelect:v=>r(e.seq,v),onSelectColor:v=>i?.(e.seq,v),onClose:()=>g(null)}),Pe(Hi,{open:c,taskSeq:e.seq,items:d,loading:s,onLoad:u,onClose:()=>f(!1)})]})}import{useState as qt}from"react";import{Box as io,Button as rr,ButtonBase as _y,Checkbox as wy,Divider as yn,IconButton as Dy,Menu as My,MenuItem as Ey}from"@mui/material";import Oy from"@mui/icons-material/ExpandLess";import Ry from"@mui/icons-material/ExpandMore";import Py from"@mui/icons-material/ConfirmationNumberOutlined";import zy from"@mui/icons-material/Check";import Ay from"@mui/icons-material/DirectionsRunOutlined";import qy from"@mui/icons-material/SpeedOutlined";import yl from"@mui/icons-material/CheckCircle";import Ly from"@mui/icons-material/CheckCircleOutlineOutlined";import Sl from"@mui/icons-material/CheckCircleOutlined";import Im from"@mui/icons-material/AccessTimeOutlined";import Ny from"@mui/icons-material/AutorenewOutlined";import Fy from"@mui/icons-material/LabelOutlined";import Hy from"@mui/icons-material/PersonOutlineOutlined";import Wy from"@mui/icons-material/SubjectOutlined";import $y from"@mui/icons-material/StickyNote2Outlined";import Ky from"@mui/icons-material/PanToolAltOutlined";import{useState as by}from"react";import{TextField as ky}from"@ehfuse/mui-form-controls";import{jsx as Ty}from"react/jsx-runtime";function ym({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=by(null);return Ty(ky,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as bl,useState as kl}from"react";import{Box as fo,Button as Cm,IconButton as yy}from"@mui/material";import Sy from"@mui/icons-material/AccountTreeOutlined";import By from"@mui/icons-material/Add";import Cy from"@mui/icons-material/Close";import vy from"@mui/icons-material/NextPlanOutlined";function Tn(e){return e.relations??[]}function g2(e,o,t){return Tn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Tn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Sm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function gl(e,o){let t=new Map(o.map(c=>[c.seq,c]));t.set(e.seq,e);let n=new Map,r=(c,f)=>{n.has(c)||n.set(c,new Set),n.has(f)||n.set(f,new Set),n.get(c).add(f),n.get(f).add(c)};for(let c of t.values())for(let f of Tn(c))f.type==="follow_up"&&t.has(f.task_seq)&&r(c.seq,f.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let c=a.shift();for(let f of n.get(c)??[])i.has(f)||(i.add(f),a.push(f))}let l=[...i].map(c=>t.get(c)).filter(c=>!!c).sort((c,f)=>Sm(c).localeCompare(Sm(f))),d=new Set;for(let c of Tn(e))c.type==="related"&&d.add(c.task_seq);for(let c of t.values())c.seq!==e.seq&&Tn(c).some(f=>f.type==="related"&&f.task_seq===e.seq)&&d.add(c.seq);let s=[...d].map(c=>t.get(c)).filter(c=>c!==void 0&&c.seq!==e.seq),u=[...t.values()].filter(c=>c.seq!==e.seq&&Tn(c).some(f=>f.type==="duplicate_of"&&f.task_seq===e.seq)),x=Tn(e).find(c=>c.type==="duplicate_of")?.task_seq,p=x?t.get(x)??null:null;return{lineage:l,related:s,duplicates:u,duplicateOf:p}}function hl(e,o){let t=gl(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function Bm(e,o){return hl(e,o)>0}import{Fragment as Iy,jsx as Ue,jsxs as Zo}from"react/jsx-runtime";function Tl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Ve(e.icon||Re);return Zo(fo,{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?Ue(fo,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?Ue(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Zo(fo,{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]}),Ue(Le,{option:Io(e),small:!0}),n?Ue(yy,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ue(Cy,{sx:{fontSize:15}})}):null]})}function vm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,d]=kl(!1),[s,u]=kl(null),[x,p]=kl(null),c=bl(()=>gl(e,o),[e,o]),f=c.lineage.length>=2,M=bl(()=>hl(e,o),[e,o]),C=bl(()=>{let g=new Set;for(let I of c.lineage)g.add(I.seq);for(let I of c.related)g.add(I.seq);for(let I of c.duplicates)g.add(I.seq);return c.duplicateOf&&g.add(c.duplicateOf.seq),[...g]},[c]),h=(g,I,S)=>{p({anchorEl:g,targetSeq:I,type:S})};return Zo(Wo,{icon:Ue(Sy,{sx:{fontSize:19,display:"block"}}),title:Zo(Iy,{children:["\uAD00\uB828 \uC5C5\uBB34",M>0?Ue(fo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:M}):null]}),titleExtra:t?null:Zo(fo,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?Ue(Cm,{size:"small",color:"inherit",startIcon:Ue(vy,{sx:{fontSize:16}}),onClick:g=>u(g.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?Ue(Cm,{size:"small",color:"inherit",startIcon:Ue(By,{sx:{fontSize:16}}),onClick:()=>d(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Zo(fo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[f?Ue(fo,{sx:{mb:c.related.length||c.duplicates.length||c.duplicateOf?1:0},children:c.lineage.map((g,I)=>{let S=g.seq===e.seq,w=I===c.lineage.length-1;return Zo(fo,{sx:{display:"flex",gap:1},children:[Zo(fo,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Ue(fo,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),w?null:Ue(fo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Zo(fo,{sx:{flex:1,minWidth:0,pb:w?0:.5},children:[Zo(fo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Zo(fo,{component:"span",onClick:!S&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),Ue(Le,{option:Io(g),small:!0})]}),Ue(fo,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,c.duplicateOf?Ue(Tl,{item:c.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(c.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>h(g.currentTarget,c.duplicateOf.seq,"duplicate_of"):void 0}):null,c.duplicates.map(g=>Ue(Tl,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?I=>h(I.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),c.related.map(g=>Ue(Tl,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?I=>h(I.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),M===0?Ue(fo,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?Ue(_i,{open:l,task:e,tasks:o,excludeSeqs:C,onClose:()=>d(!1),onSubmit:(g,I)=>r(e.seq,g,I)}):null,Ue($e,{open:!!s,anchorEl:s,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:()=>u(null),onConfirm:()=>{a?.(e.seq),u(null)}}),Ue($e,{open:!!x,anchorEl:x?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{x&&i?.(e.seq,x.targetSeq,x.type),p(null)}})]})}import{Fragment as Mo,jsx as N,jsxs as Ye}from"react/jsx-runtime";function ir({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return N(io,{component:"span",sx:{color:"#9a9a97"},children:e})}function _m({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:d,onChangeDate:s,onChangeReminder:u,onMemberEdit:x,onChangePriority:p,onChangeEstimatedTime:c,onChangeEventTime:f,onChangeEventPlace:M,onChangeEventAddress:C,onChangeNote:h,onChangeContent:g,onChangeContentHeight:I,onAddChecklistItem:S,onToggleChecklistItem:w,onRemoveChecklistItem:y,onUpdateChecklistItem:_,onConvertChecklistToTask:E,onOpenChecklistTask:v,onLinkChecklistTask:D,resolveChecklistTask:L,relatedTasksPool:m,onOpenRelatedTask:T,onLinkRelatedTask:b,onUnlinkRelatedTask:k,onCreateFollowUpTask:R,onAddAttachments:q,onRemoveAttachment:ae,onPreview:le,onDownload:ce,onUpdateComment:ie,onRemoveComment:ye,onToggleCommentReaction:he,currentUserName:me="",myAccountSeq:ee=0,noticeAdmin:ze=!1,hideProject:Ae=!1,hideLabel:H=!1,showTitle:K=!1,onChangeTitle:J,onToggleCompleted:B,onChangeIcon:F,onChangeIconColor:Z,employees:$=[],onAckConfirm:Me,onRequestConfirm:A,onChangeBugField:ue,sprints:ge=[],sprintProject:de=!1,hideSprint:qe=!1,onChangeSprint:Y,onChangeStoryPoints:Ie,onChangeResolution:Ft,onClaimTask:j,onVerifyBug:Je}){let[Oo,Ro]=qt(null),[wn,ot]=qt(null),[Po,ft]=qt(null),[tt,qo]=qt(null),[Dn,ve]=qt(!1),z={[jo]:Dn?{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"}},[W,ne]=qt(null),[se,fe]=qt(null),[He,oo]=qt(null),[lo,co]=qt(null),_e=!!e.is_notice,oe=!!e.is_event,go=!!e.is_bug,Bo=!!j&&Xr(e,ee),Ht=!!j&&Qr(e,ee),Ko=!!Je&&go&&!!e.completed&&ee>0&&(e.author_account_seq??0)===ee&&!(e.acks??[]).some(P=>P.account_seq===ee),so=!ht(e,ee),Lo=!e.is_event&&(e.is_notice?ee>0&&(e.author_account_seq??0)===ee:(e.author_account_seq??0)===ee||(e.manager_account_seq??0)===ee),rn=Pn(e.icon||(e.is_notice?vo:e.is_event?"event":Re)),cr=_e?!Yr(e,ee):so,Mn=Bo||Ht?Ye(Nn,{onClick:P=>co(P.currentTarget),children:[N(Ky,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,mr=_e?zi(e,$):"",zo=_e?tm(e,$,ee):null,to=!_e&&!oe?li(e,ee):null,En=!!(to&&to.total>0||_e&&zo);return Ye(Mo,{children:[K?Ye(io,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Lo?N(wy,{checked:e.completed,icon:N(Ly,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:N(yl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(P,On)=>{Po||ft({anchorEl:P.currentTarget,nextCompleted:On})},sx:{p:0,mt:.25}}):null,N(Dy,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:so?void 0:P=>ot(P.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(_e?"#e5484d":"#1e3a8a")},children:N(rn,{sx:{fontSize:20}})}),N(io,{sx:{flex:1,minWidth:0},children:Oo!==null?N(io,{component:"input",autoFocus:!0,spellCheck:!1,value:Oo,onChange:P=>Ro(P.target.value),onBlur:()=>{Oo.trim()&&Oo.trim()!==e.title&&J(e.seq,Oo.trim()),Ro(null)},onKeyDown:P=>{P.key==="Enter"&&P.target.blur(),P.key==="Escape"&&Ro(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):N(io,{onClick:()=>Ro(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})}),N($e,{open:!!Po,anchorEl:Po?.anchorEl??null,title:Po?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:Po?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ft(null),onConfirm:()=>{Po&&B(e.seq,Po.nextCompleted),ft(null)}}),N(Xn,{anchorEl:wn,value:e.icon||(_e?vo:""),color:e.icon_color||(_e?"#e5484d":"#1e3a8a"),onSelect:P=>F(e.seq,P),onSelectColor:P=>Z?.(e.seq,P),onClose:()=>ot(null)})]}):null,Ye(io,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[jo]:{pb:0,"& > :last-child":{mb:0}}},children:[N(Ci,{hideProject:Ae,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:!oe,notice:_e,event:oe,readOnly:so,targetSummary:mr,onChangeProject:P=>l(e.seq,P),onAddProject:d,onChangeStartDate:P=>s(e.seq,"start_date",P),onChangeDueDate:P=>s(e.seq,"due_date",P),onChangeReminder:P=>u(e.seq,P),onChangePriority:P=>p(e.seq,P),onChangeEstimatedTime:P=>c(e.seq,P),onChangeEventTime:P=>f?.(e.seq,P),onChangeEventPlace:P=>M?.(e.seq,P),onChangeEventAddress:P=>C?.(e.seq,P),onMemberEdit:P=>x(e,P),narrowCollapsedSx:z,reminderLocked:e.completed,managerAction:Mn,leading:Ye(Mo,{children:[Ko||Mn&&(_e||oe)?Ye(io,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[_e||oe?Mn:null,Ko?Ye(Mo,{children:[N(rr,{variant:"contained",size:"large",onClick:()=>Je?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),N(rr,{variant:"outlined",size:"large",color:"error",onClick:()=>Je?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,go&&e.ticket_no?N(xe,{icon:N(Py,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:N(io,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,oe?null:N(io,{sx:go&&e.ticket_no||En?void 0:{gridColumn:"1 / -1"},children:N(xe,{icon:N(Ny,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:so||e.completed?void 0:P=>ne(P),children:N(Le,{option:Io(e)})})}),to&&to.total>0?N(io,{children:N(xe,{icon:N(Sl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:to.canConfirm?N(rr,{size:"small",variant:"contained",onClick:()=>Me?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ye(rr,{size:"small",variant:"outlined",color:"inherit",startIcon:to.myTime?N(yl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:P=>qo({anchorEl:P.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[to.count," / ",to.total]})})}):null,_e&&zo?N(io,{children:N(xe,{icon:N(Sl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:N(io,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:zo.canAck?N(rr,{size:"small",variant:"contained",onClick:()=>Me?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):N(rr,{size:"small",variant:"outlined",color:"inherit",startIcon:zo.acked?N(yl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:P=>qo({anchorEl:P.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:zo.total>0&&zo.count>=zo.total?"\uC644\uB8CC":Ye(Mo,{children:[zo.count,N(io,{component:"span",sx:{mx:.4},children:"/"}),zo.total]})})})})}):null,de&&!qe&&!oe&&!_e?Ye(Mo,{children:[N(xe,{icon:N(Ay,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:so?void 0:P=>fe(P),children:(e.sprint_seq??0)>0?ge.find(P=>P.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":N(ir,{label:"\uBBF8\uBC30\uC815"})}),N(xe,{icon:N(qy,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:N(Rt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:so,onCommit:P=>Ie?.(e.seq,Number(P.replace(/[^0-9.]/g,""))||0)})})]}):null,oe||H?null:N(io,{sx:[{gridColumn:"1 / -1"},z??null],children:N(xe,{icon:N(Fy,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:so?void 0:P=>oo(P),children:(e.label_keys??[]).length>0?N(Wt,{labelKeys:e.label_keys??[],labelOptions:t}):N(ir,{})})})]}),trailing:Ye(Mo,{children:[go?N(vi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:so,showResolution:!!e.completed,onChangeRepro:P=>ue?.(e.seq,"bug_repro",P),onChangeDevice:P=>ue?.(e.seq,"bug_device",P),onChangeWhere:P=>ue?.(e.seq,"bug_where",P),onChangeVersion:P=>ue?.(e.seq,"bug_version",P),onChangeResolution:P=>Ft?.(e.seq,P)}):null,N(xe,{icon:N(Hy,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[uo(9),z??null],children:e.created_by?Ye(Mo,{children:[N(_o,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):N(ir,{})}),N(xe,{icon:N(Im,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[uo(11),z??null],children:e.created_time?Vo(e.created_time):N(ir,{})}),e.completed?Ye(Mo,{children:[N(xe,{icon:N(Sl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[uo(10),z??null],children:e.completed_by?Ye(Mo,{children:[N(_o,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):N(ir,{})}),N(xe,{icon:N(Im,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[uo(12),z??null],children:e.completed_time?Vo(e.completed_time):N(ir,{})})]}):null]})}),Ye(io,{sx:{display:"none",[jo]:{display:"block",mt:1.5,mb:0}},children:[N(yn,{sx:{borderColor:"#e6e6e3"}}),N(_y,{onClick:()=>ve(P=>!P),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:Dn?Ye(Mo,{children:["\uC811\uAE30 ",N(Oy,{sx:{fontSize:18}})]}):Ye(Mo,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",N(Ry,{sx:{fontSize:18}})]})})]}),Ye(io,{children:[N(yn,{sx:{my:1.5,borderColor:"#e6e6e3",[jo]:{mt:0,mb:1.25}}}),N(Wo,{icon:N(Wy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:N(io,{sx:{userSelect:"text"},children:N(Ii,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:I?P=>I(e.seq,P):void 0,readOnly:so,onChange:P=>g(e.seq,P)})})}),e.is_bug?null:Ye(Mo,{children:[N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Wo,{icon:N($y,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:N(io,{sx:{userSelect:"text"},children:N(ym,{value:e.note,readOnly:cr,onCommit:P=>h(e.seq,P)})})})]}),oe?null:Ye(Mo,{children:[N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(wi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:cr,onAdd:S,onToggle:w,onRemove:y,onUpdate:_,onConvertToTask:E,onOpenLinkedTask:v,resolveLinkedTask:L,linkCandidates:m,linkBaseTask:e,onLinkExistingTask:D})]}),m&&!oe&&!_e&&Bm(e,m)?Ye(Mo,{children:[N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(vm,{task:e,tasks:m,readOnly:so,onOpenTask:T,onLink:b,onUnlink:k,onCreateFollowUp:R})]}):null,N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Oi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:cr,onAdd:q,onRemove:ae,onPreview:le?P=>le({...P,taskSeq:e.seq}):void 0,onDownload:ce?P=>ce({...P,taskSeq:e.seq}):void 0})]}),N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(fm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:me,myAccountSeq:ee,avatarSrcByName:n,onUpdate:ie,onRemove:ye,onToggleReaction:he,onPreview:le?P=>le({...P,taskSeq:e.seq}):void 0,onDownload:ce?P=>ce({...P,taskSeq:e.seq}):void 0})]}),N(jr,{anchorEl:W,value:e.status,options:_e?gr:go?ln:hr,onSelect:P=>r(e.seq,P),onClose:()=>ne(null)}),N(My,{transitionDuration:0,anchorEl:se,open:!!se,onClose:()=>fe(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ge.filter(P=>`custom-${P.group_seq}`===String(e.tab_key??"")).map(P=>({seq:P.seq,label:Fo(P)}))].map(P=>Ye(Ey,{onClick:()=>{Y?.(e.seq,P.seq),fe(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[P.label,(e.sprint_seq??0)===P.seq?N(zy,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},P.seq))}),N(ai,{anchorEl:tt?.anchorEl??null,open:!!tt?.open,acks:e.acks??[],total:zo?.total??to?.total??0,avatarSrcByName:n,onRequestConfirm:A&&to&&to.count<to.total?()=>{A(e.seq),qo(P=>P?{...P,open:!1}:null)}:void 0,onClose:()=>qo(P=>P?{...P,open:!1}:null)}),N(Pi,{anchorEl:He,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:P=>i(e.seq,Vr(e.label_keys??[],P)),onAddLabel:a,onClose:()=>oo(null)}),N($e,{open:!!lo,anchorEl:lo,title:Bo?"\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:()=>co(null),onConfirm:()=>{j?.(e.seq),co(null)}})]})}import{Fragment as Qy,jsx as yo,jsxs as Rm}from"react/jsx-runtime";function Fz(){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 Hz({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:s,activityItems:u,activityLoading:x,onLoadActivity:p,onPrint:c,...f}){let M=we(),C=Dm(null);o&&(C.current=o);let h=o??C.current,[g,I]=Mm(!1),[S,w]=Mm({}),y=Object.keys(S).length>0;wm(()=>{w({})},[o?.seq,e]);let _=Dm(null);if(wm(()=>{_.current?.scrollTo({top:0})},[o?.seq]),!h)return null;let E=M&&y?{...h,...S}:h,v=(b,k)=>{M?w(R=>({...R,...b})):k()},D=()=>{let b=S;w({});let k=h.seq,R=b.title===void 0?void 0:String(b.title).trim();if(r){let q={...b};R!==void 0&&(R?q.title=R:delete q.title),Object.keys(q).length>0&&r(k,q),Om({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}R&&l(k,R),b.icon!==void 0&&d(k,String(b.icon)),b.icon_color!==void 0&&s?.(k,String(b.icon_color)),b.status!==void 0&&f.onChangeStatus(k,b.status),b.label_keys!==void 0&&f.onChangeLabels(k,b.label_keys??[]),b.tab_key!==void 0&&f.onChangeProject(k,String(b.tab_key??"")),b.start_date!==void 0&&f.onChangeDate(k,"start_date",String(b.start_date??"")),b.due_date!==void 0&&f.onChangeDate(k,"due_date",String(b.due_date??"")),b.reminder!==void 0&&f.onChangeReminder(k,b.reminder),b.priority!==void 0&&f.onChangePriority(k,b.priority),b.estimated_time!==void 0&&f.onChangeEstimatedTime(k,String(b.estimated_time??"")),b.event_time!==void 0&&f.onChangeEventTime?.(k,String(b.event_time??"")),b.event_place!==void 0&&f.onChangeEventPlace?.(k,String(b.event_place??"")),b.event_address!==void 0&&f.onChangeEventAddress?.(k,String(b.event_address??"")),b.content!==void 0&&f.onChangeContent(k,String(b.content??"")),b.note!==void 0&&f.onChangeNote(k,String(b.note??"")),Om({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},L={...f,onChangeStatus:(b,k)=>v({status:k},()=>f.onChangeStatus(b,k)),onChangeLabels:(b,k)=>v({label_keys:k},()=>f.onChangeLabels(b,k)),onChangeProject:(b,k)=>v({tab_key:k},()=>f.onChangeProject(b,k)),onChangeDate:(b,k,R)=>v({[k]:R},()=>f.onChangeDate(b,k,R)),onChangeReminder:(b,k)=>v({reminder:k},()=>f.onChangeReminder(b,k)),onChangePriority:(b,k)=>v({priority:k},()=>f.onChangePriority(b,k)),onChangeEstimatedTime:(b,k)=>v({estimated_time:k},()=>f.onChangeEstimatedTime(b,k)),onChangeEventTime:(b,k)=>v({event_time:k},()=>f.onChangeEventTime?.(b,k)),onChangeEventPlace:(b,k)=>v({event_place:k},()=>f.onChangeEventPlace?.(b,k)),onChangeEventAddress:(b,k)=>v({event_address:k},()=>f.onChangeEventAddress?.(b,k)),onChangeContent:(b,k)=>v({content:k},()=>f.onChangeContent(b,k)),onChangeNote:(b,k)=>v({note:k},()=>f.onChangeNote(b,k))},m=yo(_m,{...L,task:E,myAccountSeq:i,onChangeTitle:(b,k)=>v({title:k},()=>l(b,k)),onToggleCompleted:a,onChangeIcon:(b,k)=>v({icon:k},()=>d(b,k)),onChangeIconColor:(b,k)=>v({icon_color:k},()=>s?.(b,k)),showTitle:M}),T=yo(xm,{onSubmit:(b,k)=>n(E.seq,b,k)},E.seq);return M?Rm(Qy,{children:[yo(Xy,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:E.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":E.is_event?"\uC77C\uC815":E.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:c?{visible:!0,color:"#6b7280",onClick:()=>c(E)}:{visible:!1},share:{visible:!1},custom:[...p?[{icon:yo(jy,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>I(!0)}]:[],{icon:yo(Gy,{sx:{ml:p?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>tr(E,!0)},{icon:yo(Uy,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?D: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:T},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:yo($i,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:m})}]},h.seq),yo(Hi,{open:g,taskSeq:E.seq,items:u,loading:x,onLoad:p,onClose:()=>I(!1)})]}):yo(Vy,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,sx:{zIndex:b=>b.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Rm($i,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[yo(Tm,{task:E,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:s,onClose:t,activityItems:u,activityLoading:x,onLoadActivity:p,onPrint:c}),yo(Em,{sx:{borderColor:"#e6e6e3"}}),yo($i,{sx:{flex:1,minHeight:0},children:yo(Yy,{ref:_,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:m})}),yo(Em,{sx:{borderColor:"#37352f"}}),yo($i,{sx:{flexShrink:0},children:T})]})})}import{useEffect as Jy,useState as Sn}from"react";import{Box as Eo,Button as vl,IconButton as Pm}from"@mui/material";import{FormDialog as e0}from"@ehfuse/mui-form-dialog";import o0 from"@mui/icons-material/EditOutlined";import{ErrorAlert as zm}from"@ehfuse/alerts";import{ClearTextField as Am,DateTextField as qm,LabelSelect as Lm}from"@ehfuse/mui-form-controls";var Bl="custom-";function Zy(e){return e.startsWith(Bl)}function Kz(e){return e>0?`${Bl}${e}`:""}function Cl(e){if(!Zy(e))return 0;let o=Number(e.slice(Bl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as n0,jsx as Qe,jsxs as nn}from"react/jsx-runtime";var t0=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Nm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function eA({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let d=o.filter(m=>m.useSprints&&!m.archived),[s,u]=Sn(""),[x,p]=Sn(""),[c,f]=Sn(""),[M,C]=Sn(""),[h,g]=Sn(""),[I,S]=Sn(!1),[w,y]=Sn(0);Jy(()=>{e&&(u(d.length===1?d[0].key:""),p(""),f(""),C(""),g(""),y(0))},[e]);let _=()=>{p(""),f(""),C(""),g(""),y(0)},E=m=>{y(m.seq),u(`custom-${m.group_seq}`),p(m.name),f(m.goal),C(m.start_date),g(m.end_date)},v=async()=>{let m=Cl(s);if(!m){zm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!x.trim()){zm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(w>0){i(w,{name:x.trim(),goal:c.trim(),start_date:M,end_date:h}),_();return}await r({group_seq:m,name:x.trim(),goal:c.trim(),start_date:M,end_date:h})&&_()}finally{S(!1)}},D=new Map(o.map(m=>[Cl(m.key),m.label])),L=Qe(Eo,{children:d.length===0?Qe(Eo,{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.'}):nn(n0,{children:[nn(Eo,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Qe(Lm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:s,options:d.map(m=>({value:m.key,label:m.label})),onChange:m=>u(String(m.target.value)),disabled:w>0}),Qe(Am,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:x,onChange:m=>p(m.target.value)}),Qe(qm,{size:"medium",label:"\uC2DC\uC791\uC77C",value:M,onChange:m=>C(m.target.value)}),Qe(qm,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:m=>g(m.target.value)}),Qe(Am,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:c,onChange:m=>f(m.target.value),sx:{gridColumn:"1 / -1"}})]}),nn(Eo,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[w>0?Qe(vl,{color:"inherit",onClick:_,disabled:I,children:"\uCDE8\uC18C"}):null,Qe(vl,{variant:"contained",onClick:()=>{v()},disabled:I,children:w>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Qe(Eo,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Qe(Eo,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(m=>nn(Eo,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[nn(Eo,{sx:{minWidth:0},children:[nn(Eo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Qe(Eo,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:m.name}),Qe(Eo,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:D.get(m.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),nn(Eo,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Nm(m.start_date)," ~ ",Nm(m.end_date)]})]}),m.goal?Qe(Eo,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:m.goal}):null]}),nn(Eo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Qe(Lm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:m.status,options:t0.map(T=>({value:T.value,label:T.label})),onChange:T=>a(m.seq,String(T.target.value)),sx:{width:104,flexShrink:0}}),Qe(Pm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>E(m),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Qe(o0,{sx:{fontSize:18}})}),Qe(Pm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(m.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Qe(yt,{style:{width:16,height:16}})})]})]},m.seq))})]})});return Qe(e0,{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:L}],actions:{showCancelButton:!1,right:Qe(vl,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Fm}from"react";import{Box as ao,Button as Il,Divider as r0,IconButton as i0,TextField as a0}from"@mui/material";import{FormDialog as l0}from"@ehfuse/mui-form-dialog";import s0 from"@mui/icons-material/OpenInNewOutlined";import c0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as m0}from"@ehfuse/alerts";import{jsx as Oe,jsxs as Bn}from"react/jsx-runtime";function mA({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=Fm(""),[l,d]=Fm(!1),s=async()=>{let p=i.trim();if(p){d(!0);try{await t(p)&&a("")}finally{d(!1)}}},u=async p=>{await m0({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(p.seq)},x=Bn(ao,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Bn(ao,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Oe("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Oe("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Oe("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Oe(ao,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Oe(ao,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((p,c)=>Bn(ao,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:c>0?"1px solid #efefed":"none"},children:[Oe(c0,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Oe(ao,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Oe(i0,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{u(p)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Oe(yt,{sx:{fontSize:18}})})]},p.seq))}):Oe(ao,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Oe(r0,{sx:{my:1,borderColor:"#e6e6e3"}}),Oe(ao,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Bn(ao,{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:[Oe(ao,{children:Bn(ao,{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 > ",Oe("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Oe(ao,{children:Bn(ao,{component:"span",children:[Oe("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Oe("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Oe(ao,{children:Oe(ao,{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."})}),Oe(ao,{children:Oe(ao,{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."})})]}),Bn(ao,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Oe(a0,{value:i,onChange:p=>a(p.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Oe(Il,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{s()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Oe(l0,{open:e,onClose:r,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-import",sections:[{id:"calendar-import",showTitle:!1,children:x}],actions:{showCancelButton:!1,left:Oe(Il,{variant:"outlined",startIcon:Oe(s0,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Oe(Il,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as Lt,Button as Ar,TextField as u0}from"@mui/material";import{FormDialog as d0}from"@ehfuse/mui-form-dialog";import p0 from"@mui/icons-material/ContentCopyOutlined";import Hm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Wm}from"@ehfuse/alerts";import{Fragment as x0,jsx as Ze,jsxs as Cn}from"react/jsx-runtime";function f0(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function bA({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??f0,l=o.subscribed?a(o.token):"",d=()=>{navigator.clipboard.writeText(l).then(()=>Wm("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Wm("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},s=()=>{let x=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(x)}`,"_blank")},u=Cn(Lt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Cn(Lt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Ze("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?Cn(Lt,{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.",Ze("br",{}),Ze("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?Cn(x0,{children:[Ze(u0,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Cn(Lt,{sx:{display:"flex",gap:2},children:[Ze(Ar,{variant:"outlined",startIcon:Ze(p0,{}),onClick:d,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Ze(Ar,{variant:"contained",startIcon:Ze(Hm,{}),onClick:s,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),Cn(Lt,{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:[Ze(Lt,{children:Cn("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Ze("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ze(Lt,{children:Ze("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."})}),Ze(Lt,{children:Ze("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."})}),Ze(Lt,{children:Ze("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."})})]})]}):Ze(Ar,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Ze(d0,{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:u}],actions:{showCancelButton:!1,left:Ze(Ar,{variant:"outlined",startIcon:Ze(Hm,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ze(Ar,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as g0,useMemo as _l,useState as wl}from"react";import{Box as qr,Button as h0,Typography as b0}from"@mui/material";import{FormDialog as k0}from"@ehfuse/mui-form-dialog";import{SearchTextField as T0}from"@ehfuse/mui-form-controls";import{TreeView as y0}from"@ehfuse/tree-view";import{Fragment as _0,jsx as Jo,jsxs as w0}from"react/jsx-runtime";function $m(e){return`${e.name}#${e.seq}`}function S0(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function B0(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 C0(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 v0(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:$m(e),renderLabel:Jo(qr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Jo(qr,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Km(e,o){let t=(e.groups??[]).map(r=>Km(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>C0(r,o)).map(v0);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function I0({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=wl(""),d=_l(()=>e.map(u=>Km(u,a.trim().toLowerCase())).filter(u=>u!==null),[e,a]),s=_l(()=>o.filter(u=>t.includes(u.seq)).map($m),[]);return w0(_0,{children:[Jo(qr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Jo(T0,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Jo(qr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Jo(y0,{items:d,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:s,onChange:u=>i(u.map(S0).filter(x=>x>0)),styles:{border:"none",borderRadius:"0"}})})]})}function _A({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:d}){let s=we(),[u,x]=wl([]),[p,c]=wl(0),f=_l(()=>B0(n),[n]),M=i??[];g0(()=>{e&&(x(M),c(h=>h+1))},[e]);let C=()=>{let h=f.filter(g=>u.includes(g.seq));l(r?h:h.slice(0,1)),d()};return Jo(k0,{open:e,onClose:d,title:`${o}${r&&u.length>0?` (${u.length}\uBA85)`:""}`,locale:"ko",fullScreen:s,mobilePresentation:s?"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:Jo(qr,{sx:{...s?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...s?{}:{overflow:"hidden"},userSelect:"none"},children:Jo(I0,{groups:n,allEmployees:f,initialSelectedSeqs:M,multiple:r,isMobile:s,onSelectionChange:x},p)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?Jo(b0,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:Jo(h0,{variant:"contained",onClick:C,children:a})}})}import{useEffect as O0,useMemo as R0,useState as P0}from"react";import{Box as sr,Button as z0,Divider as A0}from"@mui/material";import{FormDialog as q0}from"@ehfuse/mui-form-dialog";import{LabelSelect as L0}from"@ehfuse/mui-form-controls";import{Box as dt}from"@mui/material";import{jsx as ar,jsxs as lr}from"react/jsx-runtime";function D0(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 Um({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((u,x)=>`${u.start_date}|${u.seq}`.localeCompare(`${x.start_date}|${x.seq}`)).map(u=>({sprint:u,...D0(u,o)})),i=r.some(u=>u.points>0),a=r.map(u=>i?u.points:u.count),l=Math.max(1,...a),d=r.filter(u=>u.sprint.status==="closed").map(u=>i?u.points:u.count),s=d.length>0?Math.round(d.reduce((u,x)=>u+x,0)/d.length*10)/10:null;return r.length===0?ar(dt,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):lr(dt,{children:[lr(dt,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[lr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),s!==null?lr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",ar(dt,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:s}),i?"SP":"\uAC74"]}):null]}),ar(dt,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(u=>{let x=i?u.points:u.count,p=Math.round((t-24)*x/l),c=u.sprint.status==="closed";return lr(dt,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[ar(dt,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:x}),ar(dt,{sx:{width:"60%",maxWidth:56,height:Math.max(2,p),borderRadius:"4px 4px 0 0",bgcolor:c?"#2f80ed":"#a9c9f5"}})]},u.sprint.seq)})}),ar(dt,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(u=>lr(dt,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[u.sprint.name,u.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},u.sprint.seq))})]})}import{useMemo as M0}from"react";import{Box as vn}from"@mui/material";import{jsx as pt,jsxs as In}from"react/jsx-runtime";function Vm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function E0(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Dl(e){return e.slice(5).replace("-",".")}function Gm({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=M0(()=>{let h=Vm(e.start_date),g=Vm(e.end_date);if(!h||!g||g<h||Math.round((g.getTime()-h.getTime())/864e5)+1>366)return null;let S=o.filter(m=>m.sprint_seq===e.seq&&!m.archived);if(S.length===0)return{empty:!0};let w=S.some(m=>(m.story_points??0)>0),y=m=>w?m.story_points??0:1,_=S.reduce((m,T)=>m+y(T),0),E=new Map;for(let m of S){if(!m.completed)continue;let T=(m.completed_time??"").slice(0,10),b=/^\d{4}-\d{2}-\d{2}$/.test(T)?T:e.start_date;E.set(b,(E.get(b)??0)+y(m))}let v=[];for(let m=new Date(h);m<=g;m.setDate(m.getDate()+1))v.push(E0(m));let D=_,L=[];for(let m of v){if(m>t)break;D-=E.get(m)??0,L.push({day:m,value:Math.max(0,D)})}return{empty:!1,days:v,total:_,usePoints:w,actual:L}},[e,o,t]);if(!r)return pt(vn,{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 pt(vn,{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:a,usePoints:l,actual:d}=r,s=600,u=200,x=8,p=h=>i.length===1?0:h/(i.length-1)*s,c=h=>x+(u-x*2)*(1-h/Math.max(1,a)),f=`${p(0)},${c(a)} ${p(i.length-1)},${c(0)}`,M=d.map(h=>`${p(i.indexOf(h.day))},${c(h.value)}`).join(" "),C=d[d.length-1];return In(vn,{children:[In(vn,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[In("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),C?In("span",{children:["\uD604\uC7AC"," ",pt(vn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:C.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),pt(vn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:In("svg",{viewBox:`0 0 ${s} ${u}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[pt("line",{x1:0,y1:c(0),x2:s,y2:c(0),stroke:"#e6e6e3",strokeWidth:1}),pt("polyline",{points:f,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),d.length>1?pt("polyline",{points:M,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,C?pt("circle",{cx:p(i.indexOf(C.day)),cy:c(C.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),In(vn,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[pt("span",{children:Dl(e.start_date)}),t>e.start_date&&t<e.end_date?In("span",{children:["\uC624\uB298 ",Dl(t)]}):null,pt("span",{children:Dl(e.end_date)})]})]})}import{jsx as Nt,jsxs as Ml}from"react/jsx-runtime";function KA({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=P0(0);O0(()=>{if(!e)return;let u=o.find(p=>p.status==="active")??o[0],x=o.find(p=>p.seq===r)??u;l(x?.seq??0)},[e]);let d=R0(()=>o.find(u=>u.seq===a)??null,[o,a]),s=Ml(sr,{sx:{display:"flex",flexDirection:"column"},children:[Ml(sr,{sx:{px:3,py:2.5},children:[Nt(sr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),Nt(Um,{sprints:o,tasks:t})]}),Nt(A0,{sx:{borderColor:"#e6e6e3"}}),Ml(sr,{sx:{px:3,py:2.5},children:[Nt(sr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),Nt(L0,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(u=>({value:String(u.seq),label:Fo(u)})),onChange:u=>l(Number(u.target.value)||0),sx:{width:280,mb:2}}),d?Nt(Gm,{sprint:d,tasks:t,todayStr:n}):Nt(sr,{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 Nt(q0,{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:s}],actions:{showCancelButton:!1,right:Nt(z0,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as N0,Divider as F0,Menu as H0,MenuItem as El}from"@mui/material";import{jsx as Lr,jsxs as jm}from"react/jsx-runtime";function YA({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return jm(H0,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Lr(El,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let d=t.includes(l.name);return jm(El,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Lr(N0,{size:"small",checked:d,sx:{p:0}}),Lr(_o,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Lr(F0,{}),Lr(El,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as W0}from"react";import{ButtonBase as $0,Menu as K0,MenuItem as U0}from"@mui/material";import V0 from"@mui/icons-material/KeyboardArrowDown";import G0 from"@mui/icons-material/Check";import{Fragment as j0,jsx as Ol,jsxs as Rl}from"react/jsx-runtime";function nq({value:e,onChange:o,options:t}){let[n,r]=W0(null),i=t??sa,a=sa.find(l=>l.value===e)?.label??"";return Rl(j0,{children:[Rl($0,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,Ol(V0,{sx:{fontSize:17,color:"#9a9a97"}})]}),Ol(K0,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>Rl(U0,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Ol(G0,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Ui,ButtonBase as Y0}from"@mui/material";import{DateTextField as Ym}from"@ehfuse/mui-form-controls";function _n(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Ki(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function aq(e=new Date){return{fromDate:_n(Ki(1,e)),toDate:_n(e)}}import{jsx as Nr,jsxs as Xm}from"react/jsx-runtime";var X0=[{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 Qm({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(_n(Ki(i)),_n(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===_n(Ki(i))&&o===_n(new Date);return Xm(Ui,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Nr(Ui,{sx:{display:"flex",alignItems:"center",gap:1.5},children:X0.map(i=>{let a=r(i.months);return Nr(Y0,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),Xm(Ui,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Nr(Ym,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Nr(Ui,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Nr(Ym,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as Q0}from"@mui/material";import{jsx as Zm}from"react/jsx-runtime";function xq({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return Zm(Q0,{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:Zm(Qm,{fromDate:o,toDate:t,onChange:n})})}import{Box as Z0,ButtonBase as J0,Tab as eS,Tabs as oS}from"@mui/material";import tS from"@mui/icons-material/Checklist";import nS from"@mui/icons-material/Face";import rS from"@mui/icons-material/Publish";import iS from"@mui/icons-material/NotificationsOutlined";import aS from"@mui/icons-material/BugReportOutlined";import lS from"@mui/icons-material/DescriptionOutlined";import sS from"@mui/icons-material/Inventory2Outlined";import{jsx as et}from"react/jsx-runtime";function Jm(e,o){return o>0?`${e} (${o})`:e}var wq=[{id:"my",label:"\uC804\uCCB4",icon:et(tS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:et(iS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:et(nS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:et(rS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:et(aS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:et(sS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:et(lS,{sx:{fontSize:18}}),hideCount:!0}];function cS(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 Dq({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=te(),a=cS(i.tabs),l=e;return r?et(Z0,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(d=>{let s=o===d.id;return et(J0,{onClick:()=>n(d.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Co(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:s?i.tabs.selectedBg:i.tabs.bg,color:s?i.tabs.selectedColor:i.tabs.color,borderColor:s?i.tabs.selectedBg:i.tabs.borderColor},children:Jm(d.label,d.hideCount?0:t[d.id]??0)},d.id)})}):et(oS,{value:o,onChange:(d,s)=>n(s),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(d=>et(eS,{value:d.id,label:Jm(d.label,d.hideCount?0:t[d.id]??0),icon:d.icon,iconPosition:"start",sx:a},d.id))})}import{useEffect as mS,useMemo as uS,useState as Pl}from"react";import{Divider as zl,ListItemIcon as $o,Menu as Al,MenuItem as So}from"@mui/material";import dS from"@mui/icons-material/OpenInNewOutlined";import pS from"@mui/icons-material/Check";import fS from"@mui/icons-material/CheckCircleOutlined";import xS from"@mui/icons-material/RadioButtonUnchecked";import gS from"@mui/icons-material/SendOutlined";import hS from"@mui/icons-material/EventOutlined";import bS from"@mui/icons-material/PersonOutlineOutlined";import kS from"@mui/icons-material/ViewKanbanOutlined";import TS from"@mui/icons-material/ContentCopyOutlined";import yS from"@mui/icons-material/NextPlanOutlined";import SS from"@mui/icons-material/ContentPasteOutlined";import BS from"@mui/icons-material/ShareOutlined";import CS from"@mui/icons-material/DirectionsRunOutlined";import eu from"@mui/icons-material/ChevronRight";import vS from"@mui/icons-material/ArchiveOutlined";import IS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as _S}from"@ehfuse/alerts";import{Fragment as wS,jsx as pe,jsxs as xo}from"react/jsx-runtime";function iL({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:d,onChangeReminder:s,onMemberEdit:u,onMoveProject:x,onDuplicate:p,onCreateFollowUp:c,onShare:f,onAssignSprint:M,onArchiveToggle:C,onDelete:h}){let g=we(),I=nt(),[S,w]=Pl(null),[y,_]=Pl(null),[E,v]=Pl(null);mS(()=>{e||(w(null),_(null),v(null))},[e]);let D=e?.task??null,L=!!D?.is_notice,m=!!D?.is_event,T=D?!ht(D,r):!1,b=uS(()=>new Set(t.filter(q=>q.useSprints).map(q=>q.key)),[t]),k=async()=>{let q=D;if(o(),!q)return;await _S({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${q.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(q.seq)},R=()=>{D&&C(D.seq,!D.archived),o()};return xo(wS,{children:[xo(Al,{open:!!e,onClose:o,transitionDuration:0,anchorReference:g?"none":"anchorPosition",anchorPosition:!g&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...g?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:g?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[xo(So,{onClick:()=>{D&&i(D),o()},sx:{fontSize:14},children:[pe($o,{children:pe(dS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),xo(So,{disabled:L?(D?.author_account_seq??0)!==r:(D?.author_account_seq??0)!==r&&(D?.manager_account_seq??0)!==r,onClick:()=>{D&&a(D.seq,!D.completed),o()},sx:{fontSize:14},children:[pe($o,{children:D?.completed?pe(xS,{sx:{fontSize:19}}):pe(fS,{sx:{fontSize:19}})}),D?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!L&&l?xo(So,{disabled:!(D?.manager_account_seq??0)&&(D?.receiver_account_seqs??[]).length===0,onClick:()=>{D&&l(D),o()},sx:{fontSize:14},children:[pe($o,{children:pe(gS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,m?null:pe(zl,{}),m?null:xo(So,{disabled:T,onClick:q=>{D&&w({anchorEl:q.currentTarget,task:D})},sx:{fontSize:14},children:[pe($o,{children:pe(hS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!L&&!m&&u?xo(So,{onClick:()=>{D&&u(D,"manager"),o()},sx:{fontSize:14},children:[pe($o,{children:pe(bS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,m?null:xo(So,{disabled:T,onClick:q=>{D&&_({anchorEl:q.currentTarget,task:D})},sx:{fontSize:14},children:[pe($o,{children:pe(kS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",pe(eu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),pe(zl,{}),p?xo(So,{disabled:T,onClick:()=>{D&&p(D.seq),o()},sx:{fontSize:14},children:[pe($o,{children:pe(TS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,c&&D&&!D.is_event&&!D.is_notice?xo(So,{onClick:()=>{D&&c(D.seq),o()},sx:{fontSize:14},children:[pe($o,{children:pe(yS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,xo(So,{onClick:()=>{D&&(f?f(D):tr(D,g)),o()},sx:{fontSize:14},children:[pe($o,{children:g?pe(BS,{sx:{fontSize:19}}):pe(SS,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),D&&!D.is_notice&&!D.is_event&&b.has(String(D.tab_key??""))&&M?xo(So,{onClick:q=>v(q.currentTarget),sx:{fontSize:14},children:[pe($o,{children:pe(CS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",pe(eu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,xo(So,{onClick:R,disabled:T||!D?.archived&&!(D&&Kr(D)),sx:{fontSize:14},children:[pe($o,{children:D?.archived?pe(IS,{sx:{fontSize:19}}):pe(vS,{sx:{fontSize:19}})}),D?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),pe(zl,{}),xo(So,{disabled:T,onClick:k,sx:{fontSize:14,color:"#e5484d"},children:[pe($o,{children:pe(yt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),pe(Ut,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:g,onClose:()=>{w(null),o()},onDateChange:q=>{S&&d(S.task.seq,q)},onReminderChange:q=>{S&&s?.(S.task.seq,q)}}),xo(Al,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{_(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...I,children:[pe(So,{selected:!y?.task.tab_key,onClick:()=>{y&&x(y.task.seq,""),_(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(q=>!q.archived).map(q=>pe(So,{selected:y?.task.tab_key===q.key,onClick:()=>{y&&x(y.task.seq,q.key),_(null),o()},sx:{fontSize:14,minWidth:170},children:q.label},q.key))]}),pe(Al,{transitionDuration:0,anchorEl:E,open:!!E,onClose:()=>v(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(q=>`custom-${q.group_seq}`===String(D?.tab_key??"")).map(q=>({seq:q.seq,label:Fo(q)}))].map(q=>xo(So,{onClick:()=>{D&&M?.(D.seq,q.seq),v(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[q.label,(D?.sprint_seq??0)===q.seq?pe(pS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},q.seq))})]})}import{Checkbox as DS,Divider as MS,Menu as ES,MenuItem as ou}from"@mui/material";import{jsx as Vi,jsxs as tu}from"react/jsx-runtime";function mL({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return tu(ES,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return tu(ou,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[Vi(DS,{size:"small",checked:l,sx:{p:0}}),Vi(Le,{option:a})]},a.key)}),Vi(MS,{}),Vi(ou,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as nu,Menu as OS,MenuItem as ql}from"@mui/material";import RS from"@mui/icons-material/Check";import PS from"@mui/icons-material/BarChartOutlined";import zS from"@mui/icons-material/SettingsOutlined";import{jsx as Fr,jsxs as Gi}from"react/jsx-runtime";function bL(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return Gi(OS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(d=>({seq:d.seq,label:Fo(d)}))].map(d=>Gi(ql,{onClick:()=>{r(d.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[d.label,n===d.seq?Fr(RS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},d.seq)),Fr(nu,{}),a?Gi(ql,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[Fr(PS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?Fr(nu,{}):null,Gi(ql,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[Fr(zS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var AS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function qS(e){return AS[e]??"tasks"}var yL={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"},ru=["list","calendar","month","card","kanban","sprint","timeline"],LS=["list","card"];function SL(e){let o=qS(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:ru,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:LS,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:ru,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"}:{}}}}export{QI as ALL_TASK_VIEWER_ACCOUNT_SEQS,Zc as AddLabelDialog,ni as AddTabDialog,jc as AttachmentUploadGauge,ll as AttachmentUploadPercent,ta as BUG_DEVICE_OPTIONS,xr as BUG_ICON_COLOR,cI as BUG_KANBAN_COLUMNS,oa as BUG_REPRO_OPTIONS,na as BUG_RESOLUTION_OPTIONS,ln as BUG_STATUS_OPTIONS,fr as BUG_TASK_ICON,vi as BugPropertiesGrid,Af as COLUMN_WIDTHS,ia as COMPLETED_STATUS_OPTION,Bl as CUSTOM_TAB_KEY_PREFIX,mA as CalendarImportDialog,bA as CalendarSubscribeDialog,Kt as CommentBubbleIcon,Fn as ConfirmCountButton,Is as DATE_REMINDER_OPTIONS,Yi as DEFAULT_PROJECT_ICON,wq as DEFAULT_TASKBOX_TAB_ITEMS,Re as DEFAULT_TASK_ICON,ol as DRAWER_SECTION_TITLE_FONT_SIZE,xq as DateRangeFilterPopover,Wo as DrawerSection,Ut as DueDatePickerPopover,xf as ENDED_EVENT_STATUS_OPTION,im as EVENT_ICON_COLOR,_A as EmployeeSelectDialog,sa as GROUP_BY_OPTIONS,Un as GoogleEventChip,nq as GroupByMenuButton,ti as IconPickerGrid,Oc as InlineAddressInput,Rt as InlineTextValue,aa as KANBAN_CLOSED_COLUMN_KEY,mL as LabelFilterMenu,Pi as LabelSelectMenu,hr as MANUAL_TASK_STATUS_OPTIONS,YA as MemberFilterMenu,gr as NOTICE_STATUS_OPTIONS,vo as NOTICE_TASK_ICON,jl as NO_TASK_ICON,Xi as PROJECT_ICON_OPTIONS,xe as PropertyRow,Ln as RECEIVER_AVATAR_COLORS,_s as REMINDER_OPTIONS,_o as ReceiverAvatarStack,vm as RelatedTasksSection,NS as STATUS_KEY_REPLIED,Ll as STATUS_KEY_WAITING,Rs as SortableTaskCard,Gm as SprintBurndownChart,KA as SprintChartsDialog,bL as SprintFilterMenu,eA as SprintManageDialog,Um as SprintVelocityChart,jr as StatusSelectMenu,ua as TASKBOX_COLUMNS,jo as TASKBOX_DRAWER_NARROW_MQ,Yl as TASKBOX_UI_STATE_ID,yL as TASKBOX_VIEW_LABELS,jM as TASKBOX_VIEW_MODES,an as TASK_STATUS_OPTIONS,Mx as TIME_REMINDER_OPTIONS,ai as TaskAckListPopover,Nn as TaskActionButton,Hi as TaskActivityDialog,Oi as TaskAttachmentsSection,Tc as TaskBoxColumnSummary,Oa as TaskBoxGroupBoard,PE as TaskBoxMobileList,cc as TaskBoxMonthAgenda,rc as TaskBoxMonthCalendar,lE as TaskBoxSprintColumnSummary,Ms as TaskBoxTable,Dq as TaskBoxTabs,xc as TaskBoxTimeline,GM as TaskBoxView,Js as TaskBoxWeekCalendar,Sr as TaskCardContent,wi as TaskChecklistSection,xm as TaskCommentInput,fm as TaskCommentsSection,Ii as TaskContentEditor,iL as TaskContextMenu,Ci as TaskCorePropertiesGrid,ml as TaskCreateBody,iP as TaskCreateDrawer,Qm as TaskDateRangeFilter,_m as TaskDetailBody,Hz as TaskDetailDrawer,Tm as TaskDetailHeader,Xn as TaskIconPickerPopover,Wt as TaskLabelChips,_i as TaskLinkDialog,ym as TaskNoteField,Uo as TaskPriorityChip,Le as TaskStatusChip,hI as TaskStatusChips,ku as TaskboxProvider,f0 as buildCalendarFeedUrl,si as buildCardBaseSx,rs as buildStatusOptionColors,ca as buildTaskGroupSections,gl as buildTaskRelationsModel,ly as buildTaskShareText,Wr as buildTaskboxTheme,us as canAssignBugManager,Xr as canClaimTaskItem,ht as canEditTaskItem,Yr as canViewTaskItem,Qr as canVolunteerTaskItem,hl as countTaskRelations,hc as countWorkdays,mf as createTaskboxTheme,kc as daysLeftUntil,Qi as defaultTaskBoxFormValues,Zi as defaultTaskboxUiStateValues,nm as filterFilesWithinLimit,ew as formatConfirmTime,gc as formatHours,it as formatKoreanDate,Vo as formatKoreanDateTime,Fo as formatSprintOptionLabel,os as getBugDeviceName,es as getBugReproName,$r as getBugResolutionName,gf as getBugStatusOption,aq as getDefaultDateRange,br as getEventDisplayStatusOption,uI as getNoDueStatusRank,tm as getNoticeAckInfo,ts as getNoticeStatusOption,hR as getNoticeTargetDisplay,Pn as getProjectIconAnchorComponent,Ve as getProjectIconComponent,ya as getReminderLabel,Ta as getReminderOptions,ns as getStatusOptionsForTask,SL as getTabHeaderConfig,pa as getTaskBoxColumnDefs,ls as getTaskBoxGridTemplate,qS as getTaskBoxTabKind,li as getTaskConfirmInfo,Io as getTaskDisplayStatusOption,Ur as getTaskStatusOption,Wn as groupGoogleEventsByDate,Cl as groupSeqFromTabKey,g2 as hasRelation,Bm as hasTaskRelations,zk as htmlToPlainText,Zy as isCustomTabKey,fa as isOpenPoolTaskItem,ra as isPastEvent,Kr as isTaskDone,mI as isWaitingTask,Ki as monthsAgoDate,uo as narrowOrderSx,Fz as nowDateTimeString,kb as parseEstimatedHours,Tn as relationsOf,An as resolveTaskStatusOptions,ea as resolveTaskboxTheme,tr as shareTaskText,bc as sumRemainingHours,zi as summarizeNoticeTargets,Kz as tabKeyFromGroupSeq,_n as toYmd,Vr as toggleLabelKey,dr as useBuildFileUrl,Gc as useTaskAttachmentUploadMeta,Ao as useTaskboxConfig,rf as useTaskboxForm,te as useTaskboxTheme,gt as useTaskboxUiState,pr as useUploadMaxMb};
|
|
13
|
+
`)}function bm(e){navigator.clipboard.writeText(e).then(()=>ay("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>iy("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function tr(e,o){let t=ly(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&bm(t)});return}bm(t)}import{Fragment as hy,jsx as Pe,jsxs as km}from"react/jsx-runtime";function Tm({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1,activityItems:d,activityLoading:s,onLoadActivity:u,onPrint:x}){let p=we(),[c,f]=xl(!1),[M,C]=xl(null),[h,g]=xl(null),I=Pn(e.icon||(e.is_notice?vo:e.is_event?"event":Re)),S=!!e.is_notice,w=!!e.is_event,y=S&&o>0&&(e.author_account_seq??0)===o,_=!ht(e,o),E=!w&&(S?y:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return km(hy,{children:[km(Wi,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?Pe(nr,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:Pe(my,{})}):null,E&&!l?Pe(zr,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Vo(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Pe(sy,{checked:e.completed,icon:Pe(fy,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:Pe(py,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(v,D)=>t(e.seq,D),sx:{p:0}})}):null,l?null:Pe(zr,{title:_?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Pe(nr,{size:"small",onClick:_?void 0:v=>g(v.currentTarget),sx:{color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:Pe(I,{sx:{fontSize:20}})})}),M!==null?Pe(Wi,{component:"input",autoFocus:!0,spellCheck:!1,value:M,onChange:v=>C(v.target.value),onBlur:()=>{M.trim()&&M.trim()!==e.title&&n(e.seq,M.trim()),C(null)},onKeyDown:v=>{v.key==="Enter"&&v.target.blur(),v.key==="Escape"&&C(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?Pe(Wi,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":w?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Pe(Wi,{onClick:_?void 0:()=>C(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:_?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),u?Pe(zr,{title:"\uD65C\uB3D9",arrow:!0,children:Pe(nr,{"aria-label":"\uD65C\uB3D9",onClick:()=>f(!0),sx:{color:"#6b7280"},children:Pe(xy,{sx:{fontSize:20}})})}):null,Pe(zr,{title:p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Pe(nr,{"aria-label":p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>tr(e,p),sx:{color:"#6b7280"},children:p?Pe(uy,{sx:{fontSize:20}}):Pe(dy,{sx:{fontSize:20}})})}),x?Pe(zr,{title:"\uC778\uC1C4",arrow:!0,children:Pe(nr,{"aria-label":"\uC778\uC1C4",onClick:()=>x(e),sx:{color:"#6b7280"},children:Pe(gy,{sx:{fontSize:20}})})}):null,a&&!l?Pe(nr,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:Pe(cy,{})}):null]}),Pe(Xn,{anchorEl:h,value:e.icon||(S?vo:""),color:e.icon_color||(S?"#e5484d":"#1e3a8a"),onSelect:v=>r(e.seq,v),onSelectColor:v=>i?.(e.seq,v),onClose:()=>g(null)}),Pe(Hi,{open:c,taskSeq:e.seq,items:d,loading:s,onLoad:u,onClose:()=>f(!1)})]})}import{useState as qt}from"react";import{Box as io,Button as rr,ButtonBase as _y,Checkbox as wy,Divider as yn,IconButton as Dy,Menu as My,MenuItem as Ey}from"@mui/material";import Oy from"@mui/icons-material/ExpandLess";import Ry from"@mui/icons-material/ExpandMore";import Py from"@mui/icons-material/ConfirmationNumberOutlined";import zy from"@mui/icons-material/Check";import Ay from"@mui/icons-material/DirectionsRunOutlined";import qy from"@mui/icons-material/SpeedOutlined";import yl from"@mui/icons-material/CheckCircle";import Ly from"@mui/icons-material/CheckCircleOutlineOutlined";import Sl from"@mui/icons-material/CheckCircleOutlined";import Im from"@mui/icons-material/AccessTimeOutlined";import Ny from"@mui/icons-material/AutorenewOutlined";import Fy from"@mui/icons-material/LabelOutlined";import Hy from"@mui/icons-material/PersonOutlineOutlined";import Wy from"@mui/icons-material/SubjectOutlined";import $y from"@mui/icons-material/StickyNote2Outlined";import Ky from"@mui/icons-material/PanToolAltOutlined";import{useState as by}from"react";import{TextField as ky}from"@ehfuse/mui-form-controls";import{jsx as Ty}from"react/jsx-runtime";function ym({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=by(null);return Ty(ky,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as bl,useState as kl}from"react";import{Box as fo,Button as Cm,IconButton as yy}from"@mui/material";import Sy from"@mui/icons-material/AccountTreeOutlined";import By from"@mui/icons-material/Add";import Cy from"@mui/icons-material/Close";import vy from"@mui/icons-material/NextPlanOutlined";function Tn(e){return e.relations??[]}function g2(e,o,t){return Tn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Tn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Sm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function gl(e,o){let t=new Map(o.map(c=>[c.seq,c]));t.set(e.seq,e);let n=new Map,r=(c,f)=>{n.has(c)||n.set(c,new Set),n.has(f)||n.set(f,new Set),n.get(c).add(f),n.get(f).add(c)};for(let c of t.values())for(let f of Tn(c))f.type==="follow_up"&&t.has(f.task_seq)&&r(c.seq,f.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let c=a.shift();for(let f of n.get(c)??[])i.has(f)||(i.add(f),a.push(f))}let l=[...i].map(c=>t.get(c)).filter(c=>!!c).sort((c,f)=>Sm(c).localeCompare(Sm(f))),d=new Set;for(let c of Tn(e))c.type==="related"&&d.add(c.task_seq);for(let c of t.values())c.seq!==e.seq&&Tn(c).some(f=>f.type==="related"&&f.task_seq===e.seq)&&d.add(c.seq);let s=[...d].map(c=>t.get(c)).filter(c=>c!==void 0&&c.seq!==e.seq),u=[...t.values()].filter(c=>c.seq!==e.seq&&Tn(c).some(f=>f.type==="duplicate_of"&&f.task_seq===e.seq)),x=Tn(e).find(c=>c.type==="duplicate_of")?.task_seq,p=x?t.get(x)??null:null;return{lineage:l,related:s,duplicates:u,duplicateOf:p}}function hl(e,o){let t=gl(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function Bm(e,o){return hl(e,o)>0}import{Fragment as Iy,jsx as Ue,jsxs as Zo}from"react/jsx-runtime";function Tl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Ve(e.icon||Re);return Zo(fo,{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?Ue(fo,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?Ue(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Zo(fo,{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]}),Ue(Le,{option:Io(e),small:!0}),n?Ue(yy,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ue(Cy,{sx:{fontSize:15}})}):null]})}function vm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,d]=kl(!1),[s,u]=kl(null),[x,p]=kl(null),c=bl(()=>gl(e,o),[e,o]),f=c.lineage.length>=2,M=bl(()=>hl(e,o),[e,o]),C=bl(()=>{let g=new Set;for(let I of c.lineage)g.add(I.seq);for(let I of c.related)g.add(I.seq);for(let I of c.duplicates)g.add(I.seq);return c.duplicateOf&&g.add(c.duplicateOf.seq),[...g]},[c]),h=(g,I,S)=>{p({anchorEl:g,targetSeq:I,type:S})};return Zo(Wo,{icon:Ue(Sy,{sx:{fontSize:19,display:"block"}}),title:Zo(Iy,{children:["\uAD00\uB828 \uC5C5\uBB34",M>0?Ue(fo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:M}):null]}),titleExtra:t?null:Zo(fo,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?Ue(Cm,{size:"small",color:"inherit",startIcon:Ue(vy,{sx:{fontSize:16}}),onClick:g=>u(g.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?Ue(Cm,{size:"small",color:"inherit",startIcon:Ue(By,{sx:{fontSize:16}}),onClick:()=>d(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Zo(fo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[f?Ue(fo,{sx:{mb:c.related.length||c.duplicates.length||c.duplicateOf?1:0},children:c.lineage.map((g,I)=>{let S=g.seq===e.seq,w=I===c.lineage.length-1;return Zo(fo,{sx:{display:"flex",gap:1},children:[Zo(fo,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Ue(fo,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),w?null:Ue(fo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Zo(fo,{sx:{flex:1,minWidth:0,pb:w?0:.5},children:[Zo(fo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Zo(fo,{component:"span",onClick:!S&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),Ue(Le,{option:Io(g),small:!0})]}),Ue(fo,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,c.duplicateOf?Ue(Tl,{item:c.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(c.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>h(g.currentTarget,c.duplicateOf.seq,"duplicate_of"):void 0}):null,c.duplicates.map(g=>Ue(Tl,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?I=>h(I.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),c.related.map(g=>Ue(Tl,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?I=>h(I.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),M===0?Ue(fo,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?Ue(_i,{open:l,task:e,tasks:o,excludeSeqs:C,onClose:()=>d(!1),onSubmit:(g,I)=>r(e.seq,g,I)}):null,Ue($e,{open:!!s,anchorEl:s,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:()=>u(null),onConfirm:()=>{a?.(e.seq),u(null)}}),Ue($e,{open:!!x,anchorEl:x?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{x&&i?.(e.seq,x.targetSeq,x.type),p(null)}})]})}import{Fragment as Mo,jsx as N,jsxs as Ye}from"react/jsx-runtime";function ir({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return N(io,{component:"span",sx:{color:"#9a9a97"},children:e})}function _m({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:d,onChangeDate:s,onChangeReminder:u,onMemberEdit:x,onChangePriority:p,onChangeEstimatedTime:c,onChangeEventTime:f,onChangeEventPlace:M,onChangeEventAddress:C,onChangeNote:h,onChangeContent:g,onChangeContentHeight:I,onAddChecklistItem:S,onToggleChecklistItem:w,onRemoveChecklistItem:y,onUpdateChecklistItem:_,onConvertChecklistToTask:E,onOpenChecklistTask:v,onLinkChecklistTask:D,resolveChecklistTask:L,relatedTasksPool:m,onOpenRelatedTask:T,onLinkRelatedTask:b,onUnlinkRelatedTask:k,onCreateFollowUpTask:R,onAddAttachments:q,onRemoveAttachment:ae,onPreview:le,onDownload:ce,onUpdateComment:ie,onRemoveComment:ye,onToggleCommentReaction:he,currentUserName:me="",myAccountSeq:ee=0,noticeAdmin:ze=!1,hideProject:Ae=!1,hideLabel:H=!1,showTitle:K=!1,onChangeTitle:J,onToggleCompleted:B,onChangeIcon:F,onChangeIconColor:Z,employees:$=[],onAckConfirm:Me,onRequestConfirm:A,onChangeBugField:ue,sprints:ge=[],sprintProject:de=!1,hideSprint:qe=!1,onChangeSprint:Y,onChangeStoryPoints:Ie,onChangeResolution:Ft,onClaimTask:j,onVerifyBug:Je}){let[Oo,Ro]=qt(null),[wn,ot]=qt(null),[Po,ft]=qt(null),[tt,qo]=qt(null),[Dn,ve]=qt(!1),z={[jo]:Dn?{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"}},[W,ne]=qt(null),[se,fe]=qt(null),[He,oo]=qt(null),[lo,co]=qt(null),_e=!!e.is_notice,oe=!!e.is_event,go=!!e.is_bug,Bo=!!j&&Xr(e,ee),Ht=!!j&&Qr(e,ee),Ko=!!Je&&go&&!!e.completed&&ee>0&&(e.author_account_seq??0)===ee&&!(e.acks??[]).some(P=>P.account_seq===ee),so=!ht(e,ee),Lo=!e.is_event&&(e.is_notice?ee>0&&(e.author_account_seq??0)===ee:(e.author_account_seq??0)===ee||(e.manager_account_seq??0)===ee),rn=Pn(e.icon||(e.is_notice?vo:e.is_event?"event":Re)),cr=_e?!Yr(e,ee):so,Mn=Bo||Ht?Ye(Nn,{onClick:P=>co(P.currentTarget),children:[N(Ky,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,mr=_e?zi(e,$):"",zo=_e?tm(e,$,ee):null,to=!_e&&!oe?li(e,ee):null,En=!!(to&&to.total>0||_e&&zo);return Ye(Mo,{children:[K?Ye(io,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Lo?N(wy,{checked:e.completed,icon:N(Ly,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:N(yl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(P,On)=>{Po||ft({anchorEl:P.currentTarget,nextCompleted:On})},sx:{p:0,mt:.25}}):null,N(Dy,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:so?void 0:P=>ot(P.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(_e?"#e5484d":"#1e3a8a")},children:N(rn,{sx:{fontSize:20}})}),N(io,{sx:{flex:1,minWidth:0},children:Oo!==null?N(io,{component:"input",autoFocus:!0,spellCheck:!1,value:Oo,onChange:P=>Ro(P.target.value),onBlur:()=>{Oo.trim()&&Oo.trim()!==e.title&&J(e.seq,Oo.trim()),Ro(null)},onKeyDown:P=>{P.key==="Enter"&&P.target.blur(),P.key==="Escape"&&Ro(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):N(io,{onClick:()=>Ro(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})}),N($e,{open:!!Po,anchorEl:Po?.anchorEl??null,title:Po?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:Po?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ft(null),onConfirm:()=>{Po&&B(e.seq,Po.nextCompleted),ft(null)}}),N(Xn,{anchorEl:wn,value:e.icon||(_e?vo:""),color:e.icon_color||(_e?"#e5484d":"#1e3a8a"),onSelect:P=>F(e.seq,P),onSelectColor:P=>Z?.(e.seq,P),onClose:()=>ot(null)})]}):null,Ye(io,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[jo]:{pb:0,"& > :last-child":{mb:0}}},children:[N(Ci,{hideProject:Ae,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:!oe,notice:_e,event:oe,readOnly:so,targetSummary:mr,onChangeProject:P=>l(e.seq,P),onAddProject:d,onChangeStartDate:P=>s(e.seq,"start_date",P),onChangeDueDate:P=>s(e.seq,"due_date",P),onChangeReminder:P=>u(e.seq,P),onChangePriority:P=>p(e.seq,P),onChangeEstimatedTime:P=>c(e.seq,P),onChangeEventTime:P=>f?.(e.seq,P),onChangeEventPlace:P=>M?.(e.seq,P),onChangeEventAddress:P=>C?.(e.seq,P),onMemberEdit:P=>x(e,P),narrowCollapsedSx:z,reminderLocked:e.completed,managerAction:Mn,leading:Ye(Mo,{children:[Ko||Mn&&(_e||oe)?Ye(io,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[_e||oe?Mn:null,Ko?Ye(Mo,{children:[N(rr,{variant:"contained",size:"large",onClick:()=>Je?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),N(rr,{variant:"outlined",size:"large",color:"error",onClick:()=>Je?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,go&&e.ticket_no?N(xe,{icon:N(Py,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:N(io,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,oe?null:N(io,{sx:go&&e.ticket_no||En?void 0:{gridColumn:"1 / -1"},children:N(xe,{icon:N(Ny,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:so||e.completed?void 0:P=>ne(P),children:N(Le,{option:Io(e)})})}),to&&to.total>0?N(io,{children:N(xe,{icon:N(Sl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:to.canConfirm?N(rr,{size:"small",variant:"contained",onClick:()=>Me?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ye(rr,{size:"small",variant:"outlined",color:"inherit",startIcon:to.myTime?N(yl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:P=>qo({anchorEl:P.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[to.count," / ",to.total]})})}):null,_e&&zo?N(io,{children:N(xe,{icon:N(Sl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:N(io,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:zo.canAck?N(rr,{size:"small",variant:"contained",onClick:()=>Me?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):N(rr,{size:"small",variant:"outlined",color:"inherit",startIcon:zo.acked?N(yl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:P=>qo({anchorEl:P.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:zo.total>0&&zo.count>=zo.total?"\uC644\uB8CC":Ye(Mo,{children:[zo.count,N(io,{component:"span",sx:{mx:.4},children:"/"}),zo.total]})})})})}):null,de&&!qe&&!oe&&!_e?Ye(Mo,{children:[N(xe,{icon:N(Ay,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:so?void 0:P=>fe(P),children:(e.sprint_seq??0)>0?ge.find(P=>P.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":N(ir,{label:"\uBBF8\uBC30\uC815"})}),N(xe,{icon:N(qy,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:N(Rt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:so,onCommit:P=>Ie?.(e.seq,Number(P.replace(/[^0-9.]/g,""))||0)})})]}):null,oe||H?null:N(io,{sx:[{gridColumn:"1 / -1"},z??null],children:N(xe,{icon:N(Fy,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:so?void 0:P=>oo(P),children:(e.label_keys??[]).length>0?N(Wt,{labelKeys:e.label_keys??[],labelOptions:t}):N(ir,{})})})]}),trailing:Ye(Mo,{children:[go?N(vi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:so,showResolution:!!e.completed,onChangeRepro:P=>ue?.(e.seq,"bug_repro",P),onChangeDevice:P=>ue?.(e.seq,"bug_device",P),onChangeWhere:P=>ue?.(e.seq,"bug_where",P),onChangeVersion:P=>ue?.(e.seq,"bug_version",P),onChangeResolution:P=>Ft?.(e.seq,P)}):null,N(xe,{icon:N(Hy,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[uo(9),z??null],children:e.created_by?Ye(Mo,{children:[N(_o,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):N(ir,{})}),N(xe,{icon:N(Im,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[uo(11),z??null],children:e.created_time?Vo(e.created_time):N(ir,{})}),e.completed?Ye(Mo,{children:[N(xe,{icon:N(Sl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[uo(10),z??null],children:e.completed_by?Ye(Mo,{children:[N(_o,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):N(ir,{})}),N(xe,{icon:N(Im,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[uo(12),z??null],children:e.completed_time?Vo(e.completed_time):N(ir,{})})]}):null]})}),Ye(io,{sx:{display:"none",[jo]:{display:"block",mt:1.5,mb:0}},children:[N(yn,{sx:{borderColor:"#e6e6e3"}}),N(_y,{onClick:()=>ve(P=>!P),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:Dn?Ye(Mo,{children:["\uC811\uAE30 ",N(Oy,{sx:{fontSize:18}})]}):Ye(Mo,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",N(Ry,{sx:{fontSize:18}})]})})]}),Ye(io,{children:[N(yn,{sx:{my:1.5,borderColor:"#e6e6e3",[jo]:{mt:0,mb:1.25}}}),N(Wo,{icon:N(Wy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:N(io,{sx:{userSelect:"text"},children:N(Ii,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:I?P=>I(e.seq,P):void 0,readOnly:so,onChange:P=>g(e.seq,P)})})}),e.is_bug?null:Ye(Mo,{children:[N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Wo,{icon:N($y,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:N(io,{sx:{userSelect:"text"},children:N(ym,{value:e.note,readOnly:cr,onCommit:P=>h(e.seq,P)})})})]}),oe?null:Ye(Mo,{children:[N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(wi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:cr,onAdd:S,onToggle:w,onRemove:y,onUpdate:_,onConvertToTask:E,onOpenLinkedTask:v,resolveLinkedTask:L,linkCandidates:m,linkBaseTask:e,onLinkExistingTask:D})]}),m&&!oe&&!_e&&Bm(e,m)?Ye(Mo,{children:[N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(vm,{task:e,tasks:m,readOnly:so,onOpenTask:T,onLink:b,onUnlink:k,onCreateFollowUp:R})]}):null,N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Oi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:cr,onAdd:q,onRemove:ae,onPreview:le?P=>le({...P,taskSeq:e.seq}):void 0,onDownload:ce?P=>ce({...P,taskSeq:e.seq}):void 0})]}),N(yn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(fm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:me,myAccountSeq:ee,avatarSrcByName:n,onUpdate:ie,onRemove:ye,onToggleReaction:he,onPreview:le?P=>le({...P,taskSeq:e.seq}):void 0,onDownload:ce?P=>ce({...P,taskSeq:e.seq}):void 0})]}),N(jr,{anchorEl:W,value:e.status,options:_e?gr:go?ln:hr,onSelect:P=>r(e.seq,P),onClose:()=>ne(null)}),N(My,{transitionDuration:0,anchorEl:se,open:!!se,onClose:()=>fe(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ge.filter(P=>`custom-${P.group_seq}`===String(e.tab_key??"")).map(P=>({seq:P.seq,label:Fo(P)}))].map(P=>Ye(Ey,{onClick:()=>{Y?.(e.seq,P.seq),fe(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[P.label,(e.sprint_seq??0)===P.seq?N(zy,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},P.seq))}),N(ai,{anchorEl:tt?.anchorEl??null,open:!!tt?.open,acks:e.acks??[],total:zo?.total??to?.total??0,avatarSrcByName:n,onRequestConfirm:A&&to&&to.count<to.total?()=>{A(e.seq),qo(P=>P?{...P,open:!1}:null)}:void 0,onClose:()=>qo(P=>P?{...P,open:!1}:null)}),N(Pi,{anchorEl:He,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:P=>i(e.seq,Vr(e.label_keys??[],P)),onAddLabel:a,onClose:()=>oo(null)}),N($e,{open:!!lo,anchorEl:lo,title:Bo?"\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:()=>co(null),onConfirm:()=>{j?.(e.seq),co(null)}})]})}import{Fragment as Qy,jsx as yo,jsxs as Rm}from"react/jsx-runtime";function Fz(){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 Hz({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:s,activityItems:u,activityLoading:x,onLoadActivity:p,onPrint:c,...f}){let M=we(),C=Dm(null);o&&(C.current=o);let h=o??C.current,[g,I]=Mm(!1),[S,w]=Mm({}),y=Object.keys(S).length>0;wm(()=>{w({})},[o?.seq,e]);let _=Dm(null);if(wm(()=>{_.current?.scrollTo({top:0})},[o?.seq]),!h)return null;let E=M&&y?{...h,...S}:h,v=(b,k)=>{M?w(R=>({...R,...b})):k()},D=()=>{let b=S;w({});let k=h.seq,R=b.title===void 0?void 0:String(b.title).trim();if(r){let q={...b};R!==void 0&&(R?q.title=R:delete q.title),Object.keys(q).length>0&&r(k,q),Om({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}R&&l(k,R),b.icon!==void 0&&d(k,String(b.icon)),b.icon_color!==void 0&&s?.(k,String(b.icon_color)),b.status!==void 0&&f.onChangeStatus(k,b.status),b.label_keys!==void 0&&f.onChangeLabels(k,b.label_keys??[]),b.tab_key!==void 0&&f.onChangeProject(k,String(b.tab_key??"")),b.start_date!==void 0&&f.onChangeDate(k,"start_date",String(b.start_date??"")),b.due_date!==void 0&&f.onChangeDate(k,"due_date",String(b.due_date??"")),b.reminder!==void 0&&f.onChangeReminder(k,b.reminder),b.priority!==void 0&&f.onChangePriority(k,b.priority),b.estimated_time!==void 0&&f.onChangeEstimatedTime(k,String(b.estimated_time??"")),b.event_time!==void 0&&f.onChangeEventTime?.(k,String(b.event_time??"")),b.event_place!==void 0&&f.onChangeEventPlace?.(k,String(b.event_place??"")),b.event_address!==void 0&&f.onChangeEventAddress?.(k,String(b.event_address??"")),b.content!==void 0&&f.onChangeContent(k,String(b.content??"")),b.note!==void 0&&f.onChangeNote(k,String(b.note??"")),Om({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},L={...f,onChangeStatus:(b,k)=>v({status:k},()=>f.onChangeStatus(b,k)),onChangeLabels:(b,k)=>v({label_keys:k},()=>f.onChangeLabels(b,k)),onChangeProject:(b,k)=>v({tab_key:k},()=>f.onChangeProject(b,k)),onChangeDate:(b,k,R)=>v({[k]:R},()=>f.onChangeDate(b,k,R)),onChangeReminder:(b,k)=>v({reminder:k},()=>f.onChangeReminder(b,k)),onChangePriority:(b,k)=>v({priority:k},()=>f.onChangePriority(b,k)),onChangeEstimatedTime:(b,k)=>v({estimated_time:k},()=>f.onChangeEstimatedTime(b,k)),onChangeEventTime:(b,k)=>v({event_time:k},()=>f.onChangeEventTime?.(b,k)),onChangeEventPlace:(b,k)=>v({event_place:k},()=>f.onChangeEventPlace?.(b,k)),onChangeEventAddress:(b,k)=>v({event_address:k},()=>f.onChangeEventAddress?.(b,k)),onChangeContent:(b,k)=>v({content:k},()=>f.onChangeContent(b,k)),onChangeNote:(b,k)=>v({note:k},()=>f.onChangeNote(b,k))},m=yo(_m,{...L,task:E,myAccountSeq:i,onChangeTitle:(b,k)=>v({title:k},()=>l(b,k)),onToggleCompleted:a,onChangeIcon:(b,k)=>v({icon:k},()=>d(b,k)),onChangeIconColor:(b,k)=>v({icon_color:k},()=>s?.(b,k)),showTitle:M}),T=yo(xm,{onSubmit:(b,k)=>n(E.seq,b,k)},E.seq);return M?Rm(Qy,{children:[yo(Xy,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:E.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":E.is_event?"\uC77C\uC815":E.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:c?{visible:!0,color:"#6b7280",onClick:()=>c(E)}:{visible:!1},share:{visible:!1},custom:[...p?[{icon:yo(jy,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>I(!0)}]:[],{icon:yo(Gy,{sx:{ml:p?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>tr(E,!0)},{icon:yo(Uy,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?D: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:T},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:yo($i,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:m})}]},h.seq),yo(Hi,{open:g,taskSeq:E.seq,items:u,loading:x,onLoad:p,onClose:()=>I(!1)})]}):yo(Vy,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:b=>b.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Rm($i,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[yo(Tm,{task:E,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:s,onClose:t,activityItems:u,activityLoading:x,onLoadActivity:p,onPrint:c}),yo(Em,{sx:{borderColor:"#e6e6e3"}}),yo($i,{sx:{flex:1,minHeight:0},children:yo(Yy,{ref:_,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:m})}),yo(Em,{sx:{borderColor:"#37352f"}}),yo($i,{sx:{flexShrink:0},children:T})]})})}import{useEffect as Jy,useState as Sn}from"react";import{Box as Eo,Button as vl,IconButton as Pm}from"@mui/material";import{FormDialog as e0}from"@ehfuse/mui-form-dialog";import o0 from"@mui/icons-material/EditOutlined";import{ErrorAlert as zm}from"@ehfuse/alerts";import{ClearTextField as Am,DateTextField as qm,LabelSelect as Lm}from"@ehfuse/mui-form-controls";var Bl="custom-";function Zy(e){return e.startsWith(Bl)}function Kz(e){return e>0?`${Bl}${e}`:""}function Cl(e){if(!Zy(e))return 0;let o=Number(e.slice(Bl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as n0,jsx as Qe,jsxs as nn}from"react/jsx-runtime";var t0=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Nm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function eA({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let d=o.filter(m=>m.useSprints&&!m.archived),[s,u]=Sn(""),[x,p]=Sn(""),[c,f]=Sn(""),[M,C]=Sn(""),[h,g]=Sn(""),[I,S]=Sn(!1),[w,y]=Sn(0);Jy(()=>{e&&(u(d.length===1?d[0].key:""),p(""),f(""),C(""),g(""),y(0))},[e]);let _=()=>{p(""),f(""),C(""),g(""),y(0)},E=m=>{y(m.seq),u(`custom-${m.group_seq}`),p(m.name),f(m.goal),C(m.start_date),g(m.end_date)},v=async()=>{let m=Cl(s);if(!m){zm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!x.trim()){zm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(w>0){i(w,{name:x.trim(),goal:c.trim(),start_date:M,end_date:h}),_();return}await r({group_seq:m,name:x.trim(),goal:c.trim(),start_date:M,end_date:h})&&_()}finally{S(!1)}},D=new Map(o.map(m=>[Cl(m.key),m.label])),L=Qe(Eo,{children:d.length===0?Qe(Eo,{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.'}):nn(n0,{children:[nn(Eo,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Qe(Lm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:s,options:d.map(m=>({value:m.key,label:m.label})),onChange:m=>u(String(m.target.value)),disabled:w>0}),Qe(Am,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:x,onChange:m=>p(m.target.value)}),Qe(qm,{size:"medium",label:"\uC2DC\uC791\uC77C",value:M,onChange:m=>C(m.target.value)}),Qe(qm,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:m=>g(m.target.value)}),Qe(Am,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:c,onChange:m=>f(m.target.value),sx:{gridColumn:"1 / -1"}})]}),nn(Eo,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[w>0?Qe(vl,{color:"inherit",onClick:_,disabled:I,children:"\uCDE8\uC18C"}):null,Qe(vl,{variant:"contained",onClick:()=>{v()},disabled:I,children:w>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Qe(Eo,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Qe(Eo,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(m=>nn(Eo,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[nn(Eo,{sx:{minWidth:0},children:[nn(Eo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Qe(Eo,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:m.name}),Qe(Eo,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:D.get(m.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),nn(Eo,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Nm(m.start_date)," ~ ",Nm(m.end_date)]})]}),m.goal?Qe(Eo,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:m.goal}):null]}),nn(Eo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Qe(Lm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:m.status,options:t0.map(T=>({value:T.value,label:T.label})),onChange:T=>a(m.seq,String(T.target.value)),sx:{width:104,flexShrink:0}}),Qe(Pm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>E(m),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Qe(o0,{sx:{fontSize:18}})}),Qe(Pm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(m.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Qe(yt,{style:{width:16,height:16}})})]})]},m.seq))})]})});return Qe(e0,{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:L}],actions:{showCancelButton:!1,right:Qe(vl,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Fm}from"react";import{Box as ao,Button as Il,Divider as r0,IconButton as i0,TextField as a0}from"@mui/material";import{FormDialog as l0}from"@ehfuse/mui-form-dialog";import s0 from"@mui/icons-material/OpenInNewOutlined";import c0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as m0}from"@ehfuse/alerts";import{jsx as Oe,jsxs as Bn}from"react/jsx-runtime";function mA({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=Fm(""),[l,d]=Fm(!1),s=async()=>{let p=i.trim();if(p){d(!0);try{await t(p)&&a("")}finally{d(!1)}}},u=async p=>{await m0({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(p.seq)},x=Bn(ao,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Bn(ao,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Oe("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Oe("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Oe("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Oe(ao,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Oe(ao,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((p,c)=>Bn(ao,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:c>0?"1px solid #efefed":"none"},children:[Oe(c0,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Oe(ao,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Oe(i0,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{u(p)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Oe(yt,{sx:{fontSize:18}})})]},p.seq))}):Oe(ao,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Oe(r0,{sx:{my:1,borderColor:"#e6e6e3"}}),Oe(ao,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Bn(ao,{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:[Oe(ao,{children:Bn(ao,{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 > ",Oe("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Oe(ao,{children:Bn(ao,{component:"span",children:[Oe("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Oe("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Oe(ao,{children:Oe(ao,{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."})}),Oe(ao,{children:Oe(ao,{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."})})]}),Bn(ao,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Oe(a0,{value:i,onChange:p=>a(p.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Oe(Il,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{s()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Oe(l0,{open:e,onClose:r,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-import",sections:[{id:"calendar-import",showTitle:!1,children:x}],actions:{showCancelButton:!1,left:Oe(Il,{variant:"outlined",startIcon:Oe(s0,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Oe(Il,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as Lt,Button as Ar,TextField as u0}from"@mui/material";import{FormDialog as d0}from"@ehfuse/mui-form-dialog";import p0 from"@mui/icons-material/ContentCopyOutlined";import Hm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Wm}from"@ehfuse/alerts";import{Fragment as x0,jsx as Ze,jsxs as Cn}from"react/jsx-runtime";function f0(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function bA({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??f0,l=o.subscribed?a(o.token):"",d=()=>{navigator.clipboard.writeText(l).then(()=>Wm("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Wm("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},s=()=>{let x=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(x)}`,"_blank")},u=Cn(Lt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Cn(Lt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Ze("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?Cn(Lt,{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.",Ze("br",{}),Ze("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?Cn(x0,{children:[Ze(u0,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Cn(Lt,{sx:{display:"flex",gap:2},children:[Ze(Ar,{variant:"outlined",startIcon:Ze(p0,{}),onClick:d,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Ze(Ar,{variant:"contained",startIcon:Ze(Hm,{}),onClick:s,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),Cn(Lt,{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:[Ze(Lt,{children:Cn("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Ze("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ze(Lt,{children:Ze("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."})}),Ze(Lt,{children:Ze("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."})}),Ze(Lt,{children:Ze("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."})})]})]}):Ze(Ar,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Ze(d0,{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:u}],actions:{showCancelButton:!1,left:Ze(Ar,{variant:"outlined",startIcon:Ze(Hm,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ze(Ar,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as g0,useMemo as _l,useState as wl}from"react";import{Box as qr,Button as h0,Typography as b0}from"@mui/material";import{FormDialog as k0}from"@ehfuse/mui-form-dialog";import{SearchTextField as T0}from"@ehfuse/mui-form-controls";import{TreeView as y0}from"@ehfuse/tree-view";import{Fragment as _0,jsx as Jo,jsxs as w0}from"react/jsx-runtime";function $m(e){return`${e.name}#${e.seq}`}function S0(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function B0(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 C0(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 v0(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:$m(e),renderLabel:Jo(qr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Jo(qr,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Km(e,o){let t=(e.groups??[]).map(r=>Km(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>C0(r,o)).map(v0);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function I0({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=wl(""),d=_l(()=>e.map(u=>Km(u,a.trim().toLowerCase())).filter(u=>u!==null),[e,a]),s=_l(()=>o.filter(u=>t.includes(u.seq)).map($m),[]);return w0(_0,{children:[Jo(qr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Jo(T0,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Jo(qr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Jo(y0,{items:d,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:s,onChange:u=>i(u.map(S0).filter(x=>x>0)),styles:{border:"none",borderRadius:"0"}})})]})}function _A({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:d}){let s=we(),[u,x]=wl([]),[p,c]=wl(0),f=_l(()=>B0(n),[n]),M=i??[];g0(()=>{e&&(x(M),c(h=>h+1))},[e]);let C=()=>{let h=f.filter(g=>u.includes(g.seq));l(r?h:h.slice(0,1)),d()};return Jo(k0,{open:e,onClose:d,title:`${o}${r&&u.length>0?` (${u.length}\uBA85)`:""}`,locale:"ko",fullScreen:s,mobilePresentation:s?"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:Jo(qr,{sx:{...s?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...s?{}:{overflow:"hidden"},userSelect:"none"},children:Jo(I0,{groups:n,allEmployees:f,initialSelectedSeqs:M,multiple:r,isMobile:s,onSelectionChange:x},p)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?Jo(b0,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:Jo(h0,{variant:"contained",onClick:C,children:a})}})}import{useEffect as O0,useMemo as R0,useState as P0}from"react";import{Box as sr,Button as z0,Divider as A0}from"@mui/material";import{FormDialog as q0}from"@ehfuse/mui-form-dialog";import{LabelSelect as L0}from"@ehfuse/mui-form-controls";import{Box as dt}from"@mui/material";import{jsx as ar,jsxs as lr}from"react/jsx-runtime";function D0(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 Um({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((u,x)=>`${u.start_date}|${u.seq}`.localeCompare(`${x.start_date}|${x.seq}`)).map(u=>({sprint:u,...D0(u,o)})),i=r.some(u=>u.points>0),a=r.map(u=>i?u.points:u.count),l=Math.max(1,...a),d=r.filter(u=>u.sprint.status==="closed").map(u=>i?u.points:u.count),s=d.length>0?Math.round(d.reduce((u,x)=>u+x,0)/d.length*10)/10:null;return r.length===0?ar(dt,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):lr(dt,{children:[lr(dt,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[lr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),s!==null?lr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",ar(dt,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:s}),i?"SP":"\uAC74"]}):null]}),ar(dt,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(u=>{let x=i?u.points:u.count,p=Math.round((t-24)*x/l),c=u.sprint.status==="closed";return lr(dt,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[ar(dt,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:x}),ar(dt,{sx:{width:"60%",maxWidth:56,height:Math.max(2,p),borderRadius:"4px 4px 0 0",bgcolor:c?"#2f80ed":"#a9c9f5"}})]},u.sprint.seq)})}),ar(dt,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(u=>lr(dt,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[u.sprint.name,u.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},u.sprint.seq))})]})}import{useMemo as M0}from"react";import{Box as vn}from"@mui/material";import{jsx as pt,jsxs as In}from"react/jsx-runtime";function Vm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function E0(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Dl(e){return e.slice(5).replace("-",".")}function Gm({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=M0(()=>{let h=Vm(e.start_date),g=Vm(e.end_date);if(!h||!g||g<h||Math.round((g.getTime()-h.getTime())/864e5)+1>366)return null;let S=o.filter(m=>m.sprint_seq===e.seq&&!m.archived);if(S.length===0)return{empty:!0};let w=S.some(m=>(m.story_points??0)>0),y=m=>w?m.story_points??0:1,_=S.reduce((m,T)=>m+y(T),0),E=new Map;for(let m of S){if(!m.completed)continue;let T=(m.completed_time??"").slice(0,10),b=/^\d{4}-\d{2}-\d{2}$/.test(T)?T:e.start_date;E.set(b,(E.get(b)??0)+y(m))}let v=[];for(let m=new Date(h);m<=g;m.setDate(m.getDate()+1))v.push(E0(m));let D=_,L=[];for(let m of v){if(m>t)break;D-=E.get(m)??0,L.push({day:m,value:Math.max(0,D)})}return{empty:!1,days:v,total:_,usePoints:w,actual:L}},[e,o,t]);if(!r)return pt(vn,{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 pt(vn,{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:a,usePoints:l,actual:d}=r,s=600,u=200,x=8,p=h=>i.length===1?0:h/(i.length-1)*s,c=h=>x+(u-x*2)*(1-h/Math.max(1,a)),f=`${p(0)},${c(a)} ${p(i.length-1)},${c(0)}`,M=d.map(h=>`${p(i.indexOf(h.day))},${c(h.value)}`).join(" "),C=d[d.length-1];return In(vn,{children:[In(vn,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[In("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),C?In("span",{children:["\uD604\uC7AC"," ",pt(vn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:C.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),pt(vn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:In("svg",{viewBox:`0 0 ${s} ${u}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[pt("line",{x1:0,y1:c(0),x2:s,y2:c(0),stroke:"#e6e6e3",strokeWidth:1}),pt("polyline",{points:f,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),d.length>1?pt("polyline",{points:M,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,C?pt("circle",{cx:p(i.indexOf(C.day)),cy:c(C.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),In(vn,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[pt("span",{children:Dl(e.start_date)}),t>e.start_date&&t<e.end_date?In("span",{children:["\uC624\uB298 ",Dl(t)]}):null,pt("span",{children:Dl(e.end_date)})]})]})}import{jsx as Nt,jsxs as Ml}from"react/jsx-runtime";function KA({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=P0(0);O0(()=>{if(!e)return;let u=o.find(p=>p.status==="active")??o[0],x=o.find(p=>p.seq===r)??u;l(x?.seq??0)},[e]);let d=R0(()=>o.find(u=>u.seq===a)??null,[o,a]),s=Ml(sr,{sx:{display:"flex",flexDirection:"column"},children:[Ml(sr,{sx:{px:3,py:2.5},children:[Nt(sr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),Nt(Um,{sprints:o,tasks:t})]}),Nt(A0,{sx:{borderColor:"#e6e6e3"}}),Ml(sr,{sx:{px:3,py:2.5},children:[Nt(sr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),Nt(L0,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(u=>({value:String(u.seq),label:Fo(u)})),onChange:u=>l(Number(u.target.value)||0),sx:{width:280,mb:2}}),d?Nt(Gm,{sprint:d,tasks:t,todayStr:n}):Nt(sr,{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 Nt(q0,{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:s}],actions:{showCancelButton:!1,right:Nt(z0,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as N0,Divider as F0,Menu as H0,MenuItem as El}from"@mui/material";import{jsx as Lr,jsxs as jm}from"react/jsx-runtime";function YA({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return jm(H0,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Lr(El,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let d=t.includes(l.name);return jm(El,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Lr(N0,{size:"small",checked:d,sx:{p:0}}),Lr(_o,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Lr(F0,{}),Lr(El,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as W0}from"react";import{ButtonBase as $0,Menu as K0,MenuItem as U0}from"@mui/material";import V0 from"@mui/icons-material/KeyboardArrowDown";import G0 from"@mui/icons-material/Check";import{Fragment as j0,jsx as Ol,jsxs as Rl}from"react/jsx-runtime";function nq({value:e,onChange:o,options:t}){let[n,r]=W0(null),i=t??sa,a=sa.find(l=>l.value===e)?.label??"";return Rl(j0,{children:[Rl($0,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,Ol(V0,{sx:{fontSize:17,color:"#9a9a97"}})]}),Ol(K0,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>Rl(U0,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Ol(G0,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Ui,ButtonBase as Y0}from"@mui/material";import{DateTextField as Ym}from"@ehfuse/mui-form-controls";function _n(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Ki(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function aq(e=new Date){return{fromDate:_n(Ki(1,e)),toDate:_n(e)}}import{jsx as Nr,jsxs as Xm}from"react/jsx-runtime";var X0=[{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 Qm({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(_n(Ki(i)),_n(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===_n(Ki(i))&&o===_n(new Date);return Xm(Ui,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Nr(Ui,{sx:{display:"flex",alignItems:"center",gap:1.5},children:X0.map(i=>{let a=r(i.months);return Nr(Y0,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),Xm(Ui,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Nr(Ym,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Nr(Ui,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Nr(Ym,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as Q0}from"@mui/material";import{jsx as Zm}from"react/jsx-runtime";function xq({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return Zm(Q0,{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:Zm(Qm,{fromDate:o,toDate:t,onChange:n})})}import{Box as Z0,ButtonBase as J0,Tab as eS,Tabs as oS}from"@mui/material";import tS from"@mui/icons-material/Checklist";import nS from"@mui/icons-material/Face";import rS from"@mui/icons-material/Publish";import iS from"@mui/icons-material/NotificationsOutlined";import aS from"@mui/icons-material/BugReportOutlined";import lS from"@mui/icons-material/DescriptionOutlined";import sS from"@mui/icons-material/Inventory2Outlined";import{jsx as et}from"react/jsx-runtime";function Jm(e,o){return o>0?`${e} (${o})`:e}var wq=[{id:"my",label:"\uC804\uCCB4",icon:et(tS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:et(iS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:et(nS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:et(rS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:et(aS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:et(sS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:et(lS,{sx:{fontSize:18}}),hideCount:!0}];function cS(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 Dq({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=te(),a=cS(i.tabs),l=e;return r?et(Z0,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(d=>{let s=o===d.id;return et(J0,{onClick:()=>n(d.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Co(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:s?i.tabs.selectedBg:i.tabs.bg,color:s?i.tabs.selectedColor:i.tabs.color,borderColor:s?i.tabs.selectedBg:i.tabs.borderColor},children:Jm(d.label,d.hideCount?0:t[d.id]??0)},d.id)})}):et(oS,{value:o,onChange:(d,s)=>n(s),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(d=>et(eS,{value:d.id,label:Jm(d.label,d.hideCount?0:t[d.id]??0),icon:d.icon,iconPosition:"start",sx:a},d.id))})}import{useEffect as mS,useMemo as uS,useState as Pl}from"react";import{Divider as zl,ListItemIcon as $o,Menu as Al,MenuItem as So}from"@mui/material";import dS from"@mui/icons-material/OpenInNewOutlined";import pS from"@mui/icons-material/Check";import fS from"@mui/icons-material/CheckCircleOutlined";import xS from"@mui/icons-material/RadioButtonUnchecked";import gS from"@mui/icons-material/SendOutlined";import hS from"@mui/icons-material/EventOutlined";import bS from"@mui/icons-material/PersonOutlineOutlined";import kS from"@mui/icons-material/ViewKanbanOutlined";import TS from"@mui/icons-material/ContentCopyOutlined";import yS from"@mui/icons-material/NextPlanOutlined";import SS from"@mui/icons-material/ContentPasteOutlined";import BS from"@mui/icons-material/ShareOutlined";import CS from"@mui/icons-material/DirectionsRunOutlined";import eu from"@mui/icons-material/ChevronRight";import vS from"@mui/icons-material/ArchiveOutlined";import IS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as _S}from"@ehfuse/alerts";import{Fragment as wS,jsx as pe,jsxs as xo}from"react/jsx-runtime";function iL({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:d,onChangeReminder:s,onMemberEdit:u,onMoveProject:x,onDuplicate:p,onCreateFollowUp:c,onShare:f,onAssignSprint:M,onArchiveToggle:C,onDelete:h}){let g=we(),I=nt(),[S,w]=Pl(null),[y,_]=Pl(null),[E,v]=Pl(null);mS(()=>{e||(w(null),_(null),v(null))},[e]);let D=e?.task??null,L=!!D?.is_notice,m=!!D?.is_event,T=D?!ht(D,r):!1,b=uS(()=>new Set(t.filter(q=>q.useSprints).map(q=>q.key)),[t]),k=async()=>{let q=D;if(o(),!q)return;await _S({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${q.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(q.seq)},R=()=>{D&&C(D.seq,!D.archived),o()};return xo(wS,{children:[xo(Al,{open:!!e,onClose:o,transitionDuration:0,anchorReference:g?"none":"anchorPosition",anchorPosition:!g&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...g?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:g?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[xo(So,{onClick:()=>{D&&i(D),o()},sx:{fontSize:14},children:[pe($o,{children:pe(dS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),xo(So,{disabled:L?(D?.author_account_seq??0)!==r:(D?.author_account_seq??0)!==r&&(D?.manager_account_seq??0)!==r,onClick:()=>{D&&a(D.seq,!D.completed),o()},sx:{fontSize:14},children:[pe($o,{children:D?.completed?pe(xS,{sx:{fontSize:19}}):pe(fS,{sx:{fontSize:19}})}),D?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!L&&l?xo(So,{disabled:!(D?.manager_account_seq??0)&&(D?.receiver_account_seqs??[]).length===0,onClick:()=>{D&&l(D),o()},sx:{fontSize:14},children:[pe($o,{children:pe(gS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,m?null:pe(zl,{}),m?null:xo(So,{disabled:T,onClick:q=>{D&&w({anchorEl:q.currentTarget,task:D})},sx:{fontSize:14},children:[pe($o,{children:pe(hS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!L&&!m&&u?xo(So,{onClick:()=>{D&&u(D,"manager"),o()},sx:{fontSize:14},children:[pe($o,{children:pe(bS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,m?null:xo(So,{disabled:T,onClick:q=>{D&&_({anchorEl:q.currentTarget,task:D})},sx:{fontSize:14},children:[pe($o,{children:pe(kS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",pe(eu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),pe(zl,{}),p?xo(So,{disabled:T,onClick:()=>{D&&p(D.seq),o()},sx:{fontSize:14},children:[pe($o,{children:pe(TS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,c&&D&&!D.is_event&&!D.is_notice?xo(So,{onClick:()=>{D&&c(D.seq),o()},sx:{fontSize:14},children:[pe($o,{children:pe(yS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,xo(So,{onClick:()=>{D&&(f?f(D):tr(D,g)),o()},sx:{fontSize:14},children:[pe($o,{children:g?pe(BS,{sx:{fontSize:19}}):pe(SS,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),D&&!D.is_notice&&!D.is_event&&b.has(String(D.tab_key??""))&&M?xo(So,{onClick:q=>v(q.currentTarget),sx:{fontSize:14},children:[pe($o,{children:pe(CS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",pe(eu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,xo(So,{onClick:R,disabled:T||!D?.archived&&!(D&&Kr(D)),sx:{fontSize:14},children:[pe($o,{children:D?.archived?pe(IS,{sx:{fontSize:19}}):pe(vS,{sx:{fontSize:19}})}),D?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),pe(zl,{}),xo(So,{disabled:T,onClick:k,sx:{fontSize:14,color:"#e5484d"},children:[pe($o,{children:pe(yt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),pe(Ut,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:g,onClose:()=>{w(null),o()},onDateChange:q=>{S&&d(S.task.seq,q)},onReminderChange:q=>{S&&s?.(S.task.seq,q)}}),xo(Al,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{_(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...I,children:[pe(So,{selected:!y?.task.tab_key,onClick:()=>{y&&x(y.task.seq,""),_(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(q=>!q.archived).map(q=>pe(So,{selected:y?.task.tab_key===q.key,onClick:()=>{y&&x(y.task.seq,q.key),_(null),o()},sx:{fontSize:14,minWidth:170},children:q.label},q.key))]}),pe(Al,{transitionDuration:0,anchorEl:E,open:!!E,onClose:()=>v(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(q=>`custom-${q.group_seq}`===String(D?.tab_key??"")).map(q=>({seq:q.seq,label:Fo(q)}))].map(q=>xo(So,{onClick:()=>{D&&M?.(D.seq,q.seq),v(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[q.label,(D?.sprint_seq??0)===q.seq?pe(pS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},q.seq))})]})}import{Checkbox as DS,Divider as MS,Menu as ES,MenuItem as ou}from"@mui/material";import{jsx as Vi,jsxs as tu}from"react/jsx-runtime";function mL({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return tu(ES,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return tu(ou,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[Vi(DS,{size:"small",checked:l,sx:{p:0}}),Vi(Le,{option:a})]},a.key)}),Vi(MS,{}),Vi(ou,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as nu,Menu as OS,MenuItem as ql}from"@mui/material";import RS from"@mui/icons-material/Check";import PS from"@mui/icons-material/BarChartOutlined";import zS from"@mui/icons-material/SettingsOutlined";import{jsx as Fr,jsxs as Gi}from"react/jsx-runtime";function bL(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return Gi(OS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(d=>({seq:d.seq,label:Fo(d)}))].map(d=>Gi(ql,{onClick:()=>{r(d.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[d.label,n===d.seq?Fr(RS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},d.seq)),Fr(nu,{}),a?Gi(ql,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[Fr(PS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?Fr(nu,{}):null,Gi(ql,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[Fr(zS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var AS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function qS(e){return AS[e]??"tasks"}var yL={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"},ru=["list","calendar","month","card","kanban","sprint","timeline"],LS=["list","card"];function SL(e){let o=qS(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:ru,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:LS,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:ru,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"}:{}}}}export{QI as ALL_TASK_VIEWER_ACCOUNT_SEQS,Zc as AddLabelDialog,ni as AddTabDialog,jc as AttachmentUploadGauge,ll as AttachmentUploadPercent,ta as BUG_DEVICE_OPTIONS,xr as BUG_ICON_COLOR,cI as BUG_KANBAN_COLUMNS,oa as BUG_REPRO_OPTIONS,na as BUG_RESOLUTION_OPTIONS,ln as BUG_STATUS_OPTIONS,fr as BUG_TASK_ICON,vi as BugPropertiesGrid,Af as COLUMN_WIDTHS,ia as COMPLETED_STATUS_OPTION,Bl as CUSTOM_TAB_KEY_PREFIX,mA as CalendarImportDialog,bA as CalendarSubscribeDialog,Kt as CommentBubbleIcon,Fn as ConfirmCountButton,Is as DATE_REMINDER_OPTIONS,Yi as DEFAULT_PROJECT_ICON,wq as DEFAULT_TASKBOX_TAB_ITEMS,Re as DEFAULT_TASK_ICON,ol as DRAWER_SECTION_TITLE_FONT_SIZE,xq as DateRangeFilterPopover,Wo as DrawerSection,Ut as DueDatePickerPopover,xf as ENDED_EVENT_STATUS_OPTION,im as EVENT_ICON_COLOR,_A as EmployeeSelectDialog,sa as GROUP_BY_OPTIONS,Un as GoogleEventChip,nq as GroupByMenuButton,ti as IconPickerGrid,Oc as InlineAddressInput,Rt as InlineTextValue,aa as KANBAN_CLOSED_COLUMN_KEY,mL as LabelFilterMenu,Pi as LabelSelectMenu,hr as MANUAL_TASK_STATUS_OPTIONS,YA as MemberFilterMenu,gr as NOTICE_STATUS_OPTIONS,vo as NOTICE_TASK_ICON,jl as NO_TASK_ICON,Xi as PROJECT_ICON_OPTIONS,xe as PropertyRow,Ln as RECEIVER_AVATAR_COLORS,_s as REMINDER_OPTIONS,_o as ReceiverAvatarStack,vm as RelatedTasksSection,NS as STATUS_KEY_REPLIED,Ll as STATUS_KEY_WAITING,Rs as SortableTaskCard,Gm as SprintBurndownChart,KA as SprintChartsDialog,bL as SprintFilterMenu,eA as SprintManageDialog,Um as SprintVelocityChart,jr as StatusSelectMenu,ua as TASKBOX_COLUMNS,jo as TASKBOX_DRAWER_NARROW_MQ,Yl as TASKBOX_UI_STATE_ID,yL as TASKBOX_VIEW_LABELS,jM as TASKBOX_VIEW_MODES,an as TASK_STATUS_OPTIONS,Mx as TIME_REMINDER_OPTIONS,ai as TaskAckListPopover,Nn as TaskActionButton,Hi as TaskActivityDialog,Oi as TaskAttachmentsSection,Tc as TaskBoxColumnSummary,Oa as TaskBoxGroupBoard,PE as TaskBoxMobileList,cc as TaskBoxMonthAgenda,rc as TaskBoxMonthCalendar,lE as TaskBoxSprintColumnSummary,Ms as TaskBoxTable,Dq as TaskBoxTabs,xc as TaskBoxTimeline,GM as TaskBoxView,Js as TaskBoxWeekCalendar,Sr as TaskCardContent,wi as TaskChecklistSection,xm as TaskCommentInput,fm as TaskCommentsSection,Ii as TaskContentEditor,iL as TaskContextMenu,Ci as TaskCorePropertiesGrid,ml as TaskCreateBody,iP as TaskCreateDrawer,Qm as TaskDateRangeFilter,_m as TaskDetailBody,Hz as TaskDetailDrawer,Tm as TaskDetailHeader,Xn as TaskIconPickerPopover,Wt as TaskLabelChips,_i as TaskLinkDialog,ym as TaskNoteField,Uo as TaskPriorityChip,Le as TaskStatusChip,hI as TaskStatusChips,ku as TaskboxProvider,f0 as buildCalendarFeedUrl,si as buildCardBaseSx,rs as buildStatusOptionColors,ca as buildTaskGroupSections,gl as buildTaskRelationsModel,ly as buildTaskShareText,Wr as buildTaskboxTheme,us as canAssignBugManager,Xr as canClaimTaskItem,ht as canEditTaskItem,Yr as canViewTaskItem,Qr as canVolunteerTaskItem,hl as countTaskRelations,hc as countWorkdays,mf as createTaskboxTheme,kc as daysLeftUntil,Qi as defaultTaskBoxFormValues,Zi as defaultTaskboxUiStateValues,nm as filterFilesWithinLimit,ew as formatConfirmTime,gc as formatHours,it as formatKoreanDate,Vo as formatKoreanDateTime,Fo as formatSprintOptionLabel,os as getBugDeviceName,es as getBugReproName,$r as getBugResolutionName,gf as getBugStatusOption,aq as getDefaultDateRange,br as getEventDisplayStatusOption,uI as getNoDueStatusRank,tm as getNoticeAckInfo,ts as getNoticeStatusOption,hR as getNoticeTargetDisplay,Pn as getProjectIconAnchorComponent,Ve as getProjectIconComponent,ya as getReminderLabel,Ta as getReminderOptions,ns as getStatusOptionsForTask,SL as getTabHeaderConfig,pa as getTaskBoxColumnDefs,ls as getTaskBoxGridTemplate,qS as getTaskBoxTabKind,li as getTaskConfirmInfo,Io as getTaskDisplayStatusOption,Ur as getTaskStatusOption,Wn as groupGoogleEventsByDate,Cl as groupSeqFromTabKey,g2 as hasRelation,Bm as hasTaskRelations,zk as htmlToPlainText,Zy as isCustomTabKey,fa as isOpenPoolTaskItem,ra as isPastEvent,Kr as isTaskDone,mI as isWaitingTask,Ki as monthsAgoDate,uo as narrowOrderSx,Fz as nowDateTimeString,kb as parseEstimatedHours,Tn as relationsOf,An as resolveTaskStatusOptions,ea as resolveTaskboxTheme,tr as shareTaskText,bc as sumRemainingHours,zi as summarizeNoticeTargets,Kz as tabKeyFromGroupSeq,_n as toYmd,Vr as toggleLabelKey,dr as useBuildFileUrl,Gc as useTaskAttachmentUploadMeta,Ao as useTaskboxConfig,rf as useTaskboxForm,te as useTaskboxTheme,gt as useTaskboxUiState,pr as useUploadMaxMb};
|
|
14
14
|
//# sourceMappingURL=index.esm.js.map
|