@ehfuse/taskbox 0.5.179 → 0.5.180

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  `).replace(/<\/(p|div|li|h[1-6]|blockquote)>/gi,`
4
4
  `),t=document.createElement("div");return t.innerHTML=o,(t.textContent??"").replace(/\n{3,}/g,`
5
5
 
6
- `).trim()}function Ri({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:l}){let s=(0,ht.useRef)(null),f=(0,ht.useRef)(null),m=i>0?i:0,c=(0,ht.useRef)(m),b=(0,ht.useRef)(l);b.current=l;let p=(0,ht.useRef)(null),u=(0,ht.useRef)(Date.now()+800),[d,_]=(0,ht.useState)(!1),w=eo();(0,ht.useEffect)(()=>{if(n)return;let g=ks(o);p.current===g||p.current===o||(p.current=g,u.current=Date.now()+800,s.current?.setHtml(g))},[e,o,n]);let k=(0,ht.useRef)(-1);return(0,ht.useEffect)(()=>{if(n||w||i<=0||k.current===i||(k.current=i,Math.abs(i-c.current)<1))return;let g=f.current?.querySelector(".ehfuse-editor-container");g&&(Math.abs(g.getBoundingClientRect().height-i)<1||(g.style.height=`${i}px`,c.current=i))},[n,w,i]),(0,ht.useEffect)(()=>{if(n||w)return;let g=f.current?.querySelector(".ehfuse-editor-container");if(!g||typeof ResizeObserver>"u")return;let E,S=new ResizeObserver(z=>{let B=Math.round(z[0]?.contentRect.height??0);B<=0||(window.clearTimeout(E),E=window.setTimeout(()=>{Math.abs(B-c.current)<1||(c.current=B,b.current?.(B))},300))});return S.observe(g),()=>{window.clearTimeout(E),S.disconnect()}},[n,w]),n?(0,dn.jsxs)(Yn.Box,{sx:{position:"relative",mt:1},children:[(0,dn.jsx)(Yn.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:ks(o)}}),(0,dn.jsx)(Yn.Tooltip,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,dn.jsx)(Yn.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(Ef(o)).then(()=>{_(!0),window.setTimeout(()=>_(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:d?(0,dn.jsx)(Df.default,{sx:{fontSize:17,color:"#2f9e5b"}}):(0,dn.jsx)(wf.default,{sx:{fontSize:17}})})})]}):(0,dn.jsx)(Yn.Box,{ref:f,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:(0,dn.jsx)(Ha.EhfuseEditor,{ref:s,defaultValue:ks(o),autoHeight:w,resizable:!w,showToolbar:!w,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Ha.minimalToolbarOptions,locale:"ko",minHeight:m||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:g=>{let E=Date.now()<u.current,S=g===p.current;p.current=g,!(E||S)&&t(g)}})})}var Xr=require("react"),De=require("@mui/material"),pn=require("@dnd-kit/core"),Wa=require("@dnd-kit/modifiers"),Qn=require("@dnd-kit/sortable"),Lf=require("@dnd-kit/utilities"),Ts=a(require("@mui/icons-material/Close"),1),Nf=a(require("@mui/icons-material/AddCircle"),1),ys=a(require("@mui/icons-material/AddTask"),1),Ff=a(require("@mui/icons-material/Checklist"),1),Hf=a(require("@mui/icons-material/CheckCircle"),1),Wf=a(require("@mui/icons-material/DragIndicator"),1),$f=a(require("@mui/icons-material/Launch"),1),Vf=a(require("@mui/icons-material/LinkOutlined"),1),Kf=a(require("@mui/icons-material/RadioButtonUnchecked"),1);var Xn=require("react"),Jo=require("@mui/material"),Of=require("@ehfuse/mui-form-dialog"),Rf=require("@ehfuse/mui-form-controls"),Pf=require("@ehfuse/alerts"),zf=a(require("@mui/icons-material/CheckCircle"),1),qf=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Af=require("@ehfuse/overlay-scrollbar");var Do=require("react/jsx-runtime"),Mf=[{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 Pi({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:l=!1,title:s="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:f="\uC5F0\uACB0",multiSelect:m=!1}){let c=eo(),[b,p]=(0,Xn.useState)("related"),[u,d]=(0,Xn.useState)(""),[_,w]=(0,Xn.useState)([]);(0,Xn.useEffect)(()=>{e&&(p("related"),d(""),w([]))},[e]);let k=(0,Xn.useMemo)(()=>{let B=new Set([o.seq,...n]),D=u.trim().toLowerCase();return t.filter(P=>B.has(P.seq)||P.is_event||P.is_notice||P.linked_only?!1:D?P.title.toLowerCase().includes(D)||(P.ticket_no??"").toLowerCase().includes(D):!0).sort((P,A)=>!!P.completed!=!!A.completed?P.completed?1:-1:A.seq-P.seq)},[t,o.seq,n,u]),g=()=>{if(_.length===0){(0,Pf.ErrorAlert)("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let B of _)i(B,b);r()},E=B=>{w(D=>D.includes(B)?D.filter(P=>P!==B):m?[...D,B]:[B])},S=Mf.find(B=>B.type===b)?.hint??"",z=(0,Do.jsxs)(Jo.Box,{sx:{...c?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...c?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[l?null:(0,Do.jsx)(Jo.Tabs,{value:b,onChange:(B,D)=>p(D),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Mf.map(B=>(0,Do.jsx)(Jo.Tab,{value:B.type,label:B.label},B.type))}),l?null:(0,Do.jsx)(Jo.Box,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:S}),(0,Do.jsx)(Jo.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Do.jsx)(Rf.ClearTextField,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:u,onChange:B=>d(B.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,Do.jsx)(Jo.Box,{sx:{flex:1,minHeight:0},children:(0,Do.jsx)(Af.OverlayScrollbar,{style:{height:"100%"},contentStyle:{paddingTop:0},children:(0,Do.jsx)(Jo.Box,{sx:{display:"flex",flexDirection:"column"},children:k.length===0?(0,Do.jsx)(Jo.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):k.map(B=>{let D=B.is_notice||B.is_event?Pe(B.icon||(B.is_notice?To:Po)):null,P=_.includes(B.seq);return(0,Do.jsxs)(Jo.Box,{onClick:()=>E(B.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:P?"#e3eefb":"transparent","&:hover":{bgcolor:P?"#e3eefb":"#f7f7f5"}},children:[P?(0,Do.jsx)(zf.default,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):(0,Do.jsx)(qf.default,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),D?(0,Do.jsx)(D,{sx:{fontSize:17,flexShrink:0,color:B.icon_color||"#1e3a8a"}}):null,(0,Do.jsxs)(Jo.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[B.ticket_no?`${B.ticket_no} `:"",B.title]}),(0,Do.jsx)(Jo.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,Do.jsx)(Je,{option:Vo(B)})})]},B.seq)})})})})]});return(0,Do.jsx)(Of.FormDialog,{open:e,onClose:r,maxWidth:"sm",fullScreen:c,mobilePresentation:c?"slide":"dialog",...c?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:c?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:s,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:z}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:(0,Do.jsx)(Jo.Button,{variant:"contained",disabled:_.length===0,onClick:g,children:f})}})}var ae=require("react/jsx-runtime");function Wh({id:e,children:o}){let{attributes:t,listeners:n,setNodeRef:r,transform:i,transition:l,isDragging:s}=(0,Qn.useSortable)({id:e});return(0,ae.jsx)(De.Box,{ref:r,sx:{transform:Lf.CSS.Transform.toString(i),transition:l,...s?{opacity:.6,position:"relative",zIndex:1}:{}},children:o({handleProps:{...t,...n},dragging:s})})}function $h({sortable:e,sensors:o,rowIds:t,onDragEnd:n,children:r}){let i=(0,ae.jsx)(De.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:r});return e?(0,ae.jsx)(pn.DndContext,{sensors:o,collisionDetection:pn.closestCenter,modifiers:[Wa.restrictToVerticalAxis,Wa.restrictToParentElement],onDragEnd:n,children:(0,ae.jsx)(Qn.SortableContext,{items:t,strategy:Qn.verticalListSortingStrategy,children:i})}):i}function zi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,onReorder:l,removeLocked:s=!1,onConvertToTask:f,onOpenLinkedTask:m,linkCandidates:c,linkBaseTask:b,onLinkExistingTask:p,resolveLinkedTask:u,myAccountSeq:d=0}){let[_,w]=(0,Xr.useState)(""),[k,g]=(0,Xr.useState)(!1),[E,S]=(0,Xr.useState)(null),z=eo(),[B,D]=(0,Xr.useState)(null),[P,A]=(0,Xr.useState)(null),C=W=>{let te=W.task_seq?u?.(W.task_seq):void 0;return te?te.completed:W.checked},ie=W=>{if(!W.task_seq||d<=0)return!1;let te=u?.(W.task_seq);return te?!El(te,d):!1},h=o.filter(C).length,x=!!l&&!z&&!s,v=(0,pn.useSensors)((0,pn.useSensor)(pn.PointerSensor,{activationConstraint:{distance:5}})),T=(W,te)=>W.task_seq?`linked-${W.task_seq}`:`row-${te}`,y=o.map(T),M=W=>{let{active:te,over:se}=W;if(!se||te.id===se.id)return;let he=y.indexOf(String(te.id)),ge=y.indexOf(String(se.id));he<0||ge<0||l?.(e,(0,Qn.arrayMove)(o,he,ge))},oe=()=>{_.trim()&&(t(e,_),w(""))};return(0,ae.jsxs)(Dt,{icon:(0,ae.jsx)(Ff.default,{sx:{fontSize:19,display:"block"}}),title:(0,ae.jsxs)(ae.Fragment,{children:["\uD560\uC77C",o.length>0?(0,ae.jsxs)(De.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[h," / ",o.length]}):null]}),titleExtra:o.length>0?(0,ae.jsx)(De.Box,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,ae.jsx)(De.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(h/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[(0,ae.jsx)($h,{sortable:x,sensors:v,rowIds:y,onDragEnd:M,children:o.map((W,te)=>{let se=W.task_seq?u?.(W.task_seq):void 0,he=C(W),ge=!!W.task_seq,ue=ie(W),Oe=$e=>(0,ae.jsxs)(De.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,...x?{ml:-2.5,pl:0}:{},py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1},"&:hover .taskbox-checklist-handle":{opacity:1}},children:[$e?(0,ae.jsx)(De.Box,{className:"taskbox-checklist-handle",...$e,sx:{display:"inline-flex",flexShrink:0,alignItems:"center",color:"#c9c8c5",opacity:0,transition:"opacity 0.15s",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:(0,ae.jsx)(Wf.default,{sx:{fontSize:16}})}):null,(0,ae.jsx)(De.Tooltip,{title:ue?"\uC5F0\uACB0 \uC5C5\uBB34\uC758 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uC644\uB8CC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4":"",arrow:!0,disableInteractive:!0,children:(0,ae.jsx)(De.Box,{component:"span",onClick:ue?void 0:()=>n(e,te,!he),sx:{display:"inline-flex",flexShrink:0,cursor:ue?"default":"pointer"},children:he?(0,ae.jsx)(Hf.default,{sx:{fontSize:18,color:ue?"#a9c6ec":"#2f80ed"}}):(0,ae.jsx)(Kf.default,{sx:{fontSize:18,color:ue?"#d6d5d1":"#9a9a97"}})})}),E?.index===te?(0,ae.jsx)(De.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:E.label,enterKeyHint:"done",onChange:Le=>S({index:te,label:Le.target.value}),onBlur:()=>{E.label.trim()&&E.label.trim()!==W.label&&i?.(e,te,E.label),S(null)},onKeyDown:Le=>{Le.key==="Enter"&&Le.target.blur(),Le.key==="Escape"&&S(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,ae.jsx)(De.Box,{component:"span",onClick:ge?W.task_seq&&m?()=>m(W.task_seq):void 0:s||!i?void 0:z?()=>D({index:te,label:W.label}):()=>S({index:te,label:W.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:he?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...ge?m?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:s||!i?{}:{cursor:"text"}},children:W.label}),ge?(0,ae.jsxs)(De.Box,{component:"span",onClick:W.task_seq&&m?()=>m(W.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",...m?{cursor:"pointer"}:{}},children:[(0,ae.jsx)($f.default,{sx:{fontSize:12}}),se?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!s&&!ge&&f?(0,ae.jsx)(De.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,ae.jsx)(De.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:Le=>A({anchorEl:Le.currentTarget,index:te,label:W.label}),sx:{display:z?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ae.jsx)(ys.default,{sx:{fontSize:16}})})}):null,s?null:(0,ae.jsx)(De.IconButton,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,te),sx:{display:z?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ae.jsx)(Ts.default,{sx:{fontSize:15}})})]});return x?(0,ae.jsx)(Wh,{id:y[te],children:({handleProps:$e})=>Oe($e)},y[te]):(0,ae.jsx)(De.Box,{children:Oe(null)},y[te])})}),(0,ae.jsxs)(De.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,ae.jsx)(De.Box,{component:"input",spellCheck:!1,value:_,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:W=>w(W.target.value),onKeyDown:W=>{W.key==="Enter"&&oe()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),c&&b&&p?(0,ae.jsx)(De.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,ae.jsx)(De.IconButton,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:W=>W.preventDefault(),onClick:()=>g(!0),sx:{flexShrink:0,color:"#9a9a97"},children:(0,ae.jsx)(Vf.default,{sx:{fontSize:20}})})}):null,(0,ae.jsx)(De.IconButton,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!_.trim(),onMouseDown:W=>W.preventDefault(),onClick:oe,sx:{flexShrink:0,color:_.trim()?"#2f80ed":"#c9c8c5"},children:(0,ae.jsx)(Nf.default,{sx:{fontSize:20}})})]}),c&&b&&p?(0,ae.jsx)(Pi,{open:k,task:b,tasks:c,excludeSeqs:o.map(W=>Number(W.task_seq??0)).filter(W=>W>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>g(!1),onSubmit:W=>{let te=c.find(se=>se.seq===W);p(e,W,String(te?.title??"").trim())}}):null,(0,ae.jsx)(oo,{open:!!P,anchorEl:P?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>A(null),onConfirm:()=>{P&&f?.(e,P.index,P.label),A(null)}}),(0,ae.jsx)(De.Dialog,{open:!!B,onClose:()=>D(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,ae.jsxs)(De.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,ae.jsx)(De.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,ae.jsx)(De.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:B?.label??"",onChange:W=>D(te=>te&&{...te,label:W.target.value}),onKeyDown:W=>{if(W.key!=="Enter")return;let te=B;te&&te.label.trim()&&i?.(e,te.index,te.label.trim()),D(null)}}),(0,ae.jsxs)(De.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!s&&f&&B&&!o[B.index]?.task_seq?(0,ae.jsx)(De.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{f(e,B.index,o[B.index]?.label??""),D(null)},sx:{color:"#57564f"},children:(0,ae.jsx)(ys.default,{sx:{fontSize:20}})}):null,!s&&B?(0,ae.jsx)(De.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,B.index),D(null)},sx:{color:"#e5484d"},children:(0,ae.jsx)(Ts.default,{sx:{fontSize:19}})}):null,(0,ae.jsx)(De.Box,{sx:{flex:1}}),(0,ae.jsx)(De.Button,{color:"inherit",onClick:()=>D(null),children:"\uCDE8\uC18C"}),(0,ae.jsx)(De.Button,{variant:"contained",disabled:!B?.label.trim(),onClick:()=>{B&&B.label.trim()&&i?.(e,B.index,B.label.trim()),D(null)},children:"\uD655\uC778"})]})]})})]})}var Ga=require("react"),Et=require("@mui/material"),Gf=a(require("@mui/icons-material/Close"),1),Cs=a(require("@mui/icons-material/AttachFileOutlined"),1);var Vh=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"]),$a=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Vh.has(o)};var Uf=require("@mui/material");var Qr=require("react/jsx-runtime");function Ss(e){let o=rn(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),l=n??0;return!l||e>0&&(t??0)!==e?null:{index:l,total:r??0,queue:i??[]}}function Va(){let o=rn().useValue("attachmentUpload.progress");return(0,Qr.jsxs)(Qr.Fragment,{children:[o??0,"%"]})}function Bs(){let o=rn().useValue("attachmentUpload.progress");return(0,Qr.jsx)(Uf.LinearProgress,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}var bo=require("react/jsx-runtime");function Ka(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Ua={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function qi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:l}){let[s,f]=(0,Ga.useState)(!1),m=(0,Ga.useRef)(null),c=eo(),b=Ir(),p=vr(),u=Ss(e),d=e===0,_=S=>{if(i){i(S);return}window.open(p(S.uuid??""),"_blank","noopener,noreferrer")},w=S=>{if(l){l(S);return}window.open(p(S.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},k=S=>u?S+1<u.index?"done":S+1===u.index?"uploading":"waiting":"waiting",g=(S,z,B,D={})=>(0,bo.jsxs)(Et.Box,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:D.uploading?"#d5e6fb":"#e6e6e3",bgcolor:D.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[(0,bo.jsxs)(Et.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,bo.jsx)(Cs.default,{sx:{fontSize:16,color:"#9a9a97"}}),z,(0,bo.jsx)(Et.Box,{component:"span",sx:{fontSize:12,color:D.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:B}),D.removeIndex!==void 0?(0,bo.jsx)(Et.IconButton,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,D.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,bo.jsx)(Gf.default,{sx:{fontSize:15}})}):null]}),D.uploading?(0,bo.jsx)(Bs,{}):null]},S),E=S=>{let z=$a(S.name);return(0,bo.jsx)(Et.Box,{component:"button",type:"button",onClick:()=>z?_(S):w(S),title:`${S.name} ${z?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Ua,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(0,bo.jsxs)(Dt,{icon:(0,bo.jsx)(Cs.default,{sx:{fontSize:18,display:"block"}}),title:(0,bo.jsxs)(bo.Fragment,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[(0,bo.jsxs)(Et.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((S,z)=>{let B=`${S.uuid||S.name}-${z}`;if(d){let D=k(z),P=D==="uploading";return g(B,(0,bo.jsx)(Et.Box,{component:"span",sx:{...Ua,color:D==="done"?"#37352f":"#9a9a97"},children:S.name}),P?(0,bo.jsx)(Va,{}):Ka(S.size),{uploading:P,removeIndex:!r&&!u?z:void 0})}return S.uuid?g(B,E(S),Ka(S.size),{removeIndex:r?void 0:z}):g(B,(0,bo.jsx)(Et.Box,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...Ua,color:"#9a9a97"},children:S.name}),Ka(S.size),{removeIndex:r?void 0:z})}),!d&&u?u.queue.slice(u.index-1).map((S,z)=>{let B=z===0;return g(`uploading-${u.index+z}-${S.name}`,(0,bo.jsx)(Et.Box,{component:"span",sx:{...Ua,color:"#9a9a97"},children:S.name}),B?(0,bo.jsx)(Va,{}):Ka(S.size),{uploading:B})}):null]}),(0,bo.jsx)(Et.Box,{onClick:()=>m.current?.click(),onDragOver:S=>{S.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:S=>{S.preventDefault(),f(!1);let z=Array.from(S.dataTransfer.files);z.length>0&&t(e,z)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:s?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:s?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:c?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${b}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${b}MB)`}),(0,bo.jsx)(Et.Box,{component:"input",ref:m,type:"file",multiple:!0,onChange:S=>{let z=Array.from(S.target.files??[]);z.length>0&&t(e,z),S.target.value=""},sx:{display:"none"}})]})}var Jf=require("react"),Yt=require("@mui/material"),ex=a(require("@mui/icons-material/Add"),1);var Ai=require("react"),Zr=require("@mui/material"),Yf=require("@ehfuse/mui-form-dialog"),Xf=require("@ehfuse/mui-form-controls"),Qf=require("@ehfuse/mui-color-picker"),Zf=require("@ehfuse/alerts");var fn=require("react/jsx-runtime"),jf="#2f80ed";function vs({open:e,onClose:o,onSubmit:t}){let[n,r]=(0,Ai.useState)(""),[i,l]=(0,Ai.useState)(jf);(0,Ai.useEffect)(()=>{e&&(r(""),l(jf))},[e]);let s=()=>{let c=n.trim();if(!c){(0,Zf.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(c,i),o()},f=Cl(i),m=(0,fn.jsxs)(Zr.Box,{children:[(0,fn.jsxs)(Zr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,fn.jsx)(Xf.ClearTextField,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:c=>r(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),s())},fullWidth:!0,autoFocus:!0}),(0,fn.jsx)(Qf.ColorPicker,{value:i,onChange:c=>l(c),shape:"circle",colorSize:28})]}),(0,fn.jsxs)(Zr.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,fn.jsx)(Je,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...f}})]})]});return(0,fn.jsx)(Yf.FormDialog,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:m}],actions:{showCancelButton:!0,right:(0,fn.jsx)(Zr.Button,{variant:"contained",onClick:s,children:"\uCD94\uAC00"})}})}var kt=require("react/jsx-runtime");function Li({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[l,s]=(0,Jf.useState)(!1),f=an();return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsxs)(Yt.Menu,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...f,children:[t.map(m=>{let c=o.includes(m.key);return(0,kt.jsxs)(Yt.MenuItem,{onClick:()=>n(m.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,kt.jsx)(Yt.Checkbox,{size:"small",checked:c,sx:{p:0}}),(0,kt.jsx)(Je,{option:m})]},m.key)}),(0,kt.jsx)(Yt.Divider,{}),(0,kt.jsxs)(Yt.MenuItem,{onClick:()=>s(!0),sx:{fontSize:14,color:"#787774"},children:[(0,kt.jsx)(Yt.ListItemIcon,{children:(0,kt.jsx)(ex.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,kt.jsx)(vs,{open:l,onClose:()=>s(!1),onSubmit:r})]})}function ox(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 tx(e,o){let t=(e.target_account_seqs??[]).filter(b=>b>0);if(t.length===0)return null;let n=new Set(t),r=ox(e,o),i=new Map;for(let b of r){let p=String(b.department??"").trim();if(!p)continue;let u=i.get(p)??[];u.push(b),i.set(p,u)}let l=[],s=new Set;for(let[b,p]of i)if(p.every(d=>n.has(Number(d.account_seq??0)))){l.push(b);for(let d of p)s.add(Number(d.account_seq??0))}let f=new Map(r.map(b=>[Number(b.account_seq??0),b.name])),m=e.target_names??[],c=[];return t.forEach((b,p)=>{s.has(b)||c.push(f.get(b)??m[p]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:l,individualNames:c}}function Ni(e,o){let t=tx(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function Kh(e,o){let t=tx(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function Is(e,o,t){let n=(e.target_account_seqs??[]).filter(c=>c>0),r=ox(e,o),i=n.length>0?n.length:r.length,l=e.acks??[],s=t>0&&l.some(c=>c.account_seq===t),f=t>0&&Number(e.author_account_seq??0)===t,m=n.length===0||n.includes(t);return{count:l.length,total:i,acked:s,canAck:t>0&&!f&&m&&!s&&!e.completed}}function _s(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(s=>s.size>n),i=e.filter(s=>s.size<=n),l=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
6
+ `).trim()}function Ri({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:l}){let s=(0,ht.useRef)(null),f=(0,ht.useRef)(null),m=i>0?i:0,c=(0,ht.useRef)(m),b=(0,ht.useRef)(l);b.current=l;let p=(0,ht.useRef)(null),u=(0,ht.useRef)(Date.now()+800),[d,_]=(0,ht.useState)(!1),w=eo();(0,ht.useEffect)(()=>{if(n)return;let g=ks(o);p.current===g||p.current===o||(p.current=g,u.current=Date.now()+800,s.current?.setHtml(g))},[e,o,n]);let k=(0,ht.useRef)(-1);return(0,ht.useEffect)(()=>{if(n||w||i<=0||k.current===i||(k.current=i,Math.abs(i-c.current)<1))return;let g=f.current?.querySelector(".ehfuse-editor-container");g&&(Math.abs(g.getBoundingClientRect().height-i)<1||(g.style.height=`${i}px`,c.current=i))},[n,w,i]),(0,ht.useEffect)(()=>{if(n||w)return;let g=f.current?.querySelector(".ehfuse-editor-container");if(!g||typeof ResizeObserver>"u")return;let E,S=new ResizeObserver(z=>{let B=Math.round(z[0]?.contentRect.height??0);B<=0||(window.clearTimeout(E),E=window.setTimeout(()=>{Math.abs(B-c.current)<1||(c.current=B,b.current?.(B))},300))});return S.observe(g),()=>{window.clearTimeout(E),S.disconnect()}},[n,w]),n?(0,dn.jsxs)(Yn.Box,{sx:{position:"relative",mt:1},children:[(0,dn.jsx)(Yn.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:ks(o)}}),(0,dn.jsx)(Yn.Tooltip,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,dn.jsx)(Yn.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(Ef(o)).then(()=>{_(!0),window.setTimeout(()=>_(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:d?(0,dn.jsx)(Df.default,{sx:{fontSize:17,color:"#2f9e5b"}}):(0,dn.jsx)(wf.default,{sx:{fontSize:17}})})})]}):(0,dn.jsx)(Yn.Box,{ref:f,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:(0,dn.jsx)(Ha.EhfuseEditor,{ref:s,defaultValue:ks(o),autoHeight:w,resizable:!w,showToolbar:!w,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Ha.minimalToolbarOptions,locale:"ko",minHeight:m||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:g=>{let E=Date.now()<u.current,S=g===p.current;p.current=g,!(E||S)&&t(g)}})})}var Xr=require("react"),De=require("@mui/material"),pn=require("@dnd-kit/core"),Wa=require("@dnd-kit/modifiers"),Qn=require("@dnd-kit/sortable"),Lf=require("@dnd-kit/utilities"),Ts=a(require("@mui/icons-material/Close"),1),Nf=a(require("@mui/icons-material/AddCircle"),1),ys=a(require("@mui/icons-material/AddTask"),1),Ff=a(require("@mui/icons-material/Checklist"),1),Hf=a(require("@mui/icons-material/CheckCircle"),1),Wf=a(require("@mui/icons-material/DragIndicator"),1),$f=a(require("@mui/icons-material/Launch"),1),Vf=a(require("@mui/icons-material/LinkOutlined"),1),Kf=a(require("@mui/icons-material/RadioButtonUnchecked"),1);var Xn=require("react"),Jo=require("@mui/material"),Of=require("@ehfuse/mui-form-dialog"),Rf=require("@ehfuse/mui-form-controls"),Pf=require("@ehfuse/alerts"),zf=a(require("@mui/icons-material/CheckCircle"),1),qf=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Af=require("@ehfuse/overlay-scrollbar");var Do=require("react/jsx-runtime"),Mf=[{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 Pi({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:l=!1,title:s="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:f="\uC5F0\uACB0",multiSelect:m=!1}){let c=eo(),[b,p]=(0,Xn.useState)("related"),[u,d]=(0,Xn.useState)(""),[_,w]=(0,Xn.useState)([]);(0,Xn.useEffect)(()=>{e&&(p("related"),d(""),w([]))},[e]);let k=(0,Xn.useMemo)(()=>{let B=new Set([o.seq,...n]),D=u.trim().toLowerCase();return t.filter(P=>B.has(P.seq)||P.is_event||P.is_notice||P.linked_only?!1:D?P.title.toLowerCase().includes(D)||(P.ticket_no??"").toLowerCase().includes(D):!0).sort((P,A)=>!!P.completed!=!!A.completed?P.completed?1:-1:A.seq-P.seq)},[t,o.seq,n,u]),g=()=>{if(_.length===0){(0,Pf.ErrorAlert)("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let B of _)i(B,b);r()},E=B=>{w(D=>D.includes(B)?D.filter(P=>P!==B):m?[...D,B]:[B])},S=Mf.find(B=>B.type===b)?.hint??"",z=(0,Do.jsxs)(Jo.Box,{sx:{...c?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...c?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[l?null:(0,Do.jsx)(Jo.Tabs,{value:b,onChange:(B,D)=>p(D),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Mf.map(B=>(0,Do.jsx)(Jo.Tab,{value:B.type,label:B.label},B.type))}),l?null:(0,Do.jsx)(Jo.Box,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:S}),(0,Do.jsx)(Jo.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Do.jsx)(Rf.ClearTextField,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:u,onChange:B=>d(B.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,Do.jsx)(Jo.Box,{sx:{flex:1,minHeight:0},children:(0,Do.jsx)(Af.OverlayScrollbar,{style:{height:"100%"},contentStyle:{paddingTop:0},children:(0,Do.jsx)(Jo.Box,{sx:{display:"flex",flexDirection:"column"},children:k.length===0?(0,Do.jsx)(Jo.Box,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):k.map(B=>{let D=B.is_notice||B.is_event?Pe(B.icon||(B.is_notice?To:Po)):null,P=_.includes(B.seq);return(0,Do.jsxs)(Jo.Box,{onClick:()=>E(B.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:P?"#e3eefb":"transparent","&:hover":{bgcolor:P?"#e3eefb":"#f7f7f5"}},children:[P?(0,Do.jsx)(zf.default,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):(0,Do.jsx)(qf.default,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),D?(0,Do.jsx)(D,{sx:{fontSize:17,flexShrink:0,color:B.icon_color||"#1e3a8a"}}):null,(0,Do.jsxs)(Jo.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[B.ticket_no?`${B.ticket_no} `:"",B.title]}),(0,Do.jsx)(Jo.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,Do.jsx)(Je,{option:Vo(B)})})]},B.seq)})})})})]});return(0,Do.jsx)(Of.FormDialog,{open:e,onClose:r,maxWidth:"sm",fullScreen:c,mobilePresentation:c?"slide":"dialog",...c?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:c?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:s,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:z}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:(0,Do.jsx)(Jo.Button,{variant:"contained",disabled:_.length===0,onClick:g,children:f})}})}var ae=require("react/jsx-runtime");function Wh({id:e,children:o}){let{attributes:t,listeners:n,setNodeRef:r,transform:i,transition:l,isDragging:s}=(0,Qn.useSortable)({id:e});return(0,ae.jsx)(De.Box,{ref:r,sx:{transform:Lf.CSS.Transform.toString(i),transition:l,...s?{opacity:.6,position:"relative",zIndex:1}:{}},children:o({handleProps:{...t,...n},dragging:s})})}function $h({sortable:e,sensors:o,rowIds:t,onDragEnd:n,children:r}){let i=(0,ae.jsx)(De.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:r});return e?(0,ae.jsx)(pn.DndContext,{sensors:o,collisionDetection:pn.closestCenter,modifiers:[Wa.restrictToVerticalAxis,Wa.restrictToParentElement],onDragEnd:n,children:(0,ae.jsx)(Qn.SortableContext,{items:t,strategy:Qn.verticalListSortingStrategy,children:i})}):i}function zi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,onReorder:l,removeLocked:s=!1,onConvertToTask:f,onOpenLinkedTask:m,linkCandidates:c,linkBaseTask:b,onLinkExistingTask:p,resolveLinkedTask:u,myAccountSeq:d=0}){let[_,w]=(0,Xr.useState)(""),[k,g]=(0,Xr.useState)(!1),[E,S]=(0,Xr.useState)(null),z=eo(),[B,D]=(0,Xr.useState)(null),[P,A]=(0,Xr.useState)(null),C=W=>{let te=W.task_seq?u?.(W.task_seq):void 0;return te?te.completed:W.checked},ie=W=>{if(!W.task_seq||d<=0)return!1;let te=u?.(W.task_seq);return te?!El(te,d):!1},h=o.filter(C).length,x=!!l&&!z&&!s,v=(0,pn.useSensors)((0,pn.useSensor)(pn.PointerSensor,{activationConstraint:{distance:5}})),T=(W,te)=>W.task_seq?`linked-${W.task_seq}`:`row-${te}`,y=o.map(T),M=W=>{let{active:te,over:se}=W;if(!se||te.id===se.id)return;let he=y.indexOf(String(te.id)),ge=y.indexOf(String(se.id));he<0||ge<0||l?.(e,(0,Qn.arrayMove)(o,he,ge))},oe=()=>{_.trim()&&(t(e,_),w(""))};return(0,ae.jsxs)(Dt,{icon:(0,ae.jsx)(Ff.default,{sx:{fontSize:19,display:"block"}}),title:(0,ae.jsxs)(ae.Fragment,{children:["\uD560\uC77C",o.length>0?(0,ae.jsxs)(De.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[h," / ",o.length]}):null]}),titleExtra:o.length>0?(0,ae.jsx)(De.Box,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,ae.jsx)(De.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(h/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[(0,ae.jsx)($h,{sortable:x,sensors:v,rowIds:y,onDragEnd:M,children:o.map((W,te)=>{let se=W.task_seq?u?.(W.task_seq):void 0,he=C(W),ge=!!W.task_seq,ue=ie(W),Oe=$e=>(0,ae.jsxs)(De.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,...x?{ml:-3,pl:.5}:{},py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1},"&:hover .taskbox-checklist-handle":{opacity:1}},children:[$e?(0,ae.jsx)(De.Box,{className:"taskbox-checklist-handle",...$e,sx:{display:"inline-flex",flexShrink:0,alignItems:"center",color:"#c9c8c5",opacity:0,transition:"opacity 0.15s",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:(0,ae.jsx)(Wf.default,{sx:{fontSize:16}})}):null,(0,ae.jsx)(De.Tooltip,{title:ue?"\uC5F0\uACB0 \uC5C5\uBB34\uC758 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uC644\uB8CC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4":"",arrow:!0,disableInteractive:!0,children:(0,ae.jsx)(De.Box,{component:"span",onClick:ue?void 0:()=>n(e,te,!he),sx:{display:"inline-flex",flexShrink:0,cursor:ue?"default":"pointer"},children:he?(0,ae.jsx)(Hf.default,{sx:{fontSize:18,color:ue?"#a9c6ec":"#2f80ed"}}):(0,ae.jsx)(Kf.default,{sx:{fontSize:18,color:ue?"#d6d5d1":"#9a9a97"}})})}),E?.index===te?(0,ae.jsx)(De.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:E.label,enterKeyHint:"done",onChange:Le=>S({index:te,label:Le.target.value}),onBlur:()=>{E.label.trim()&&E.label.trim()!==W.label&&i?.(e,te,E.label),S(null)},onKeyDown:Le=>{Le.key==="Enter"&&Le.target.blur(),Le.key==="Escape"&&S(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,ae.jsx)(De.Box,{component:"span",onClick:ge?W.task_seq&&m?()=>m(W.task_seq):void 0:s||!i?void 0:z?()=>D({index:te,label:W.label}):()=>S({index:te,label:W.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:he?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...ge?m?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:s||!i?{}:{cursor:"text"}},children:W.label}),ge?(0,ae.jsxs)(De.Box,{component:"span",onClick:W.task_seq&&m?()=>m(W.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",...m?{cursor:"pointer"}:{}},children:[(0,ae.jsx)($f.default,{sx:{fontSize:12}}),se?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!s&&!ge&&f?(0,ae.jsx)(De.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,ae.jsx)(De.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:Le=>A({anchorEl:Le.currentTarget,index:te,label:W.label}),sx:{display:z?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ae.jsx)(ys.default,{sx:{fontSize:16}})})}):null,s?null:(0,ae.jsx)(De.IconButton,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,te),sx:{display:z?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ae.jsx)(Ts.default,{sx:{fontSize:15}})})]});return x?(0,ae.jsx)(Wh,{id:y[te],children:({handleProps:$e})=>Oe($e)},y[te]):(0,ae.jsx)(De.Box,{children:Oe(null)},y[te])})}),(0,ae.jsxs)(De.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,ae.jsx)(De.Box,{component:"input",spellCheck:!1,value:_,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:W=>w(W.target.value),onKeyDown:W=>{W.key==="Enter"&&oe()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),c&&b&&p?(0,ae.jsx)(De.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,ae.jsx)(De.IconButton,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:W=>W.preventDefault(),onClick:()=>g(!0),sx:{flexShrink:0,color:"#9a9a97"},children:(0,ae.jsx)(Vf.default,{sx:{fontSize:20}})})}):null,(0,ae.jsx)(De.IconButton,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!_.trim(),onMouseDown:W=>W.preventDefault(),onClick:oe,sx:{flexShrink:0,color:_.trim()?"#2f80ed":"#c9c8c5"},children:(0,ae.jsx)(Nf.default,{sx:{fontSize:20}})})]}),c&&b&&p?(0,ae.jsx)(Pi,{open:k,task:b,tasks:c,excludeSeqs:o.map(W=>Number(W.task_seq??0)).filter(W=>W>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>g(!1),onSubmit:W=>{let te=c.find(se=>se.seq===W);p(e,W,String(te?.title??"").trim())}}):null,(0,ae.jsx)(oo,{open:!!P,anchorEl:P?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>A(null),onConfirm:()=>{P&&f?.(e,P.index,P.label),A(null)}}),(0,ae.jsx)(De.Dialog,{open:!!B,onClose:()=>D(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,ae.jsxs)(De.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,ae.jsx)(De.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,ae.jsx)(De.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:B?.label??"",onChange:W=>D(te=>te&&{...te,label:W.target.value}),onKeyDown:W=>{if(W.key!=="Enter")return;let te=B;te&&te.label.trim()&&i?.(e,te.index,te.label.trim()),D(null)}}),(0,ae.jsxs)(De.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!s&&f&&B&&!o[B.index]?.task_seq?(0,ae.jsx)(De.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{f(e,B.index,o[B.index]?.label??""),D(null)},sx:{color:"#57564f"},children:(0,ae.jsx)(ys.default,{sx:{fontSize:20}})}):null,!s&&B?(0,ae.jsx)(De.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,B.index),D(null)},sx:{color:"#e5484d"},children:(0,ae.jsx)(Ts.default,{sx:{fontSize:19}})}):null,(0,ae.jsx)(De.Box,{sx:{flex:1}}),(0,ae.jsx)(De.Button,{color:"inherit",onClick:()=>D(null),children:"\uCDE8\uC18C"}),(0,ae.jsx)(De.Button,{variant:"contained",disabled:!B?.label.trim(),onClick:()=>{B&&B.label.trim()&&i?.(e,B.index,B.label.trim()),D(null)},children:"\uD655\uC778"})]})]})})]})}var Ga=require("react"),Et=require("@mui/material"),Gf=a(require("@mui/icons-material/Close"),1),Cs=a(require("@mui/icons-material/AttachFileOutlined"),1);var Vh=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"]),$a=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Vh.has(o)};var Uf=require("@mui/material");var Qr=require("react/jsx-runtime");function Ss(e){let o=rn(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),l=n??0;return!l||e>0&&(t??0)!==e?null:{index:l,total:r??0,queue:i??[]}}function Va(){let o=rn().useValue("attachmentUpload.progress");return(0,Qr.jsxs)(Qr.Fragment,{children:[o??0,"%"]})}function Bs(){let o=rn().useValue("attachmentUpload.progress");return(0,Qr.jsx)(Uf.LinearProgress,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}var bo=require("react/jsx-runtime");function Ka(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Ua={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function qi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:l}){let[s,f]=(0,Ga.useState)(!1),m=(0,Ga.useRef)(null),c=eo(),b=Ir(),p=vr(),u=Ss(e),d=e===0,_=S=>{if(i){i(S);return}window.open(p(S.uuid??""),"_blank","noopener,noreferrer")},w=S=>{if(l){l(S);return}window.open(p(S.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},k=S=>u?S+1<u.index?"done":S+1===u.index?"uploading":"waiting":"waiting",g=(S,z,B,D={})=>(0,bo.jsxs)(Et.Box,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:D.uploading?"#d5e6fb":"#e6e6e3",bgcolor:D.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[(0,bo.jsxs)(Et.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,bo.jsx)(Cs.default,{sx:{fontSize:16,color:"#9a9a97"}}),z,(0,bo.jsx)(Et.Box,{component:"span",sx:{fontSize:12,color:D.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:B}),D.removeIndex!==void 0?(0,bo.jsx)(Et.IconButton,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,D.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,bo.jsx)(Gf.default,{sx:{fontSize:15}})}):null]}),D.uploading?(0,bo.jsx)(Bs,{}):null]},S),E=S=>{let z=$a(S.name);return(0,bo.jsx)(Et.Box,{component:"button",type:"button",onClick:()=>z?_(S):w(S),title:`${S.name} ${z?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Ua,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(0,bo.jsxs)(Dt,{icon:(0,bo.jsx)(Cs.default,{sx:{fontSize:18,display:"block"}}),title:(0,bo.jsxs)(bo.Fragment,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[(0,bo.jsxs)(Et.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((S,z)=>{let B=`${S.uuid||S.name}-${z}`;if(d){let D=k(z),P=D==="uploading";return g(B,(0,bo.jsx)(Et.Box,{component:"span",sx:{...Ua,color:D==="done"?"#37352f":"#9a9a97"},children:S.name}),P?(0,bo.jsx)(Va,{}):Ka(S.size),{uploading:P,removeIndex:!r&&!u?z:void 0})}return S.uuid?g(B,E(S),Ka(S.size),{removeIndex:r?void 0:z}):g(B,(0,bo.jsx)(Et.Box,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...Ua,color:"#9a9a97"},children:S.name}),Ka(S.size),{removeIndex:r?void 0:z})}),!d&&u?u.queue.slice(u.index-1).map((S,z)=>{let B=z===0;return g(`uploading-${u.index+z}-${S.name}`,(0,bo.jsx)(Et.Box,{component:"span",sx:{...Ua,color:"#9a9a97"},children:S.name}),B?(0,bo.jsx)(Va,{}):Ka(S.size),{uploading:B})}):null]}),(0,bo.jsx)(Et.Box,{onClick:()=>m.current?.click(),onDragOver:S=>{S.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:S=>{S.preventDefault(),f(!1);let z=Array.from(S.dataTransfer.files);z.length>0&&t(e,z)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:s?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:s?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:c?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${b}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${b}MB)`}),(0,bo.jsx)(Et.Box,{component:"input",ref:m,type:"file",multiple:!0,onChange:S=>{let z=Array.from(S.target.files??[]);z.length>0&&t(e,z),S.target.value=""},sx:{display:"none"}})]})}var Jf=require("react"),Yt=require("@mui/material"),ex=a(require("@mui/icons-material/Add"),1);var Ai=require("react"),Zr=require("@mui/material"),Yf=require("@ehfuse/mui-form-dialog"),Xf=require("@ehfuse/mui-form-controls"),Qf=require("@ehfuse/mui-color-picker"),Zf=require("@ehfuse/alerts");var fn=require("react/jsx-runtime"),jf="#2f80ed";function vs({open:e,onClose:o,onSubmit:t}){let[n,r]=(0,Ai.useState)(""),[i,l]=(0,Ai.useState)(jf);(0,Ai.useEffect)(()=>{e&&(r(""),l(jf))},[e]);let s=()=>{let c=n.trim();if(!c){(0,Zf.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(c,i),o()},f=Cl(i),m=(0,fn.jsxs)(Zr.Box,{children:[(0,fn.jsxs)(Zr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,fn.jsx)(Xf.ClearTextField,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:c=>r(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),s())},fullWidth:!0,autoFocus:!0}),(0,fn.jsx)(Qf.ColorPicker,{value:i,onChange:c=>l(c),shape:"circle",colorSize:28})]}),(0,fn.jsxs)(Zr.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,fn.jsx)(Je,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...f}})]})]});return(0,fn.jsx)(Yf.FormDialog,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:m}],actions:{showCancelButton:!0,right:(0,fn.jsx)(Zr.Button,{variant:"contained",onClick:s,children:"\uCD94\uAC00"})}})}var kt=require("react/jsx-runtime");function Li({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[l,s]=(0,Jf.useState)(!1),f=an();return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsxs)(Yt.Menu,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...f,children:[t.map(m=>{let c=o.includes(m.key);return(0,kt.jsxs)(Yt.MenuItem,{onClick:()=>n(m.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,kt.jsx)(Yt.Checkbox,{size:"small",checked:c,sx:{p:0}}),(0,kt.jsx)(Je,{option:m})]},m.key)}),(0,kt.jsx)(Yt.Divider,{}),(0,kt.jsxs)(Yt.MenuItem,{onClick:()=>s(!0),sx:{fontSize:14,color:"#787774"},children:[(0,kt.jsx)(Yt.ListItemIcon,{children:(0,kt.jsx)(ex.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,kt.jsx)(vs,{open:l,onClose:()=>s(!1),onSubmit:r})]})}function ox(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 tx(e,o){let t=(e.target_account_seqs??[]).filter(b=>b>0);if(t.length===0)return null;let n=new Set(t),r=ox(e,o),i=new Map;for(let b of r){let p=String(b.department??"").trim();if(!p)continue;let u=i.get(p)??[];u.push(b),i.set(p,u)}let l=[],s=new Set;for(let[b,p]of i)if(p.every(d=>n.has(Number(d.account_seq??0)))){l.push(b);for(let d of p)s.add(Number(d.account_seq??0))}let f=new Map(r.map(b=>[Number(b.account_seq??0),b.name])),m=e.target_names??[],c=[];return t.forEach((b,p)=>{s.has(b)||c.push(f.get(b)??m[p]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:l,individualNames:c}}function Ni(e,o){let t=tx(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function Kh(e,o){let t=tx(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function Is(e,o,t){let n=(e.target_account_seqs??[]).filter(c=>c>0),r=ox(e,o),i=n.length>0?n.length:r.length,l=e.acks??[],s=t>0&&l.some(c=>c.account_seq===t),f=t>0&&Number(e.author_account_seq??0)===t,m=n.length===0||n.includes(t);return{count:l.length,total:i,acked:s,canAck:t>0&&!f&&m&&!s&&!e.completed}}function _s(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(s=>s.size>n),i=e.filter(s=>s.size<=n),l=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
7
7
  \uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(s=>s.name).join(", ")}`:null;return{accepted:i,rejected:r,message:l}}var ux=require("@ehfuse/mui-datetime-picker"),ne=require("react/jsx-runtime"),Os="#0f9d58";function ja({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:l=!1,hideBug:s=!1,leadingRow:f,hideLabel:m=!1,employees:c=[],myAccountSeq:b=0,departments:p=[],myGroupSeq:u=0,onMemberEdit:d,onAddProject:_,onAddLabelOption:w,contentSyncKey:k="create"}){let g=rn(),E=Ir(),S=e.useFormValue("manager_name"),z=e.useFormValue("receiver_names"),B=e.useFormValue("start_date"),D=!!e.useFormValue("is_event"),P=!!e.useFormValue("is_bug"),A=e.useFormValue("bug_repro")??"",C=e.useFormValue("bug_device")??"",ie=e.useFormValue("bug_where")??"",h=e.useFormValue("bug_version")??"",x=e.useFormValue("event_time")??"",v=e.useFormValue("event_place")??"",T=e.useFormValue("event_address")??"",y=e.useFormValue("due_date"),M=e.useFormValue("reminder"),oe=e.useFormValue("priority"),W=e.useFormValue("content"),se=e.useFormValue("checklist")??[],he=e.useFormValue("tab_key"),ge=e.useFormValue("sprint_seq")??0,ue=e.useFormValue("story_points")??0,Oe=t.find(q=>q.key===he&&q.useSprints),$e=Oe?n.filter(q=>`custom-${q.group_seq}`===he):[],[Le,Q]=(0,Jr.useState)(null),$=e.useFormValue("label_keys"),[pe,N]=(0,Jr.useState)(null),V=e.useFormValue("visibility")||"involved",L=Number(e.useFormValue("visibility_group_seq")??0),[U,be]=(0,Jr.useState)(null),Xe=e.useFormValue("repeat_rule")||"",Io=e.useFormValue("repeat_until")||"",[ho,Ke]=(0,Jr.useState)(null),[_o,J]=(0,Jr.useState)(null),K=e.useFormValue("target_names"),Lo=e.useFormValue("target_account_seqs"),Pn=g.useValue("createAttachmentFiles")??[],ar=i?Ni({author_account_seq:b,target_names:K,target_account_seqs:Lo},c):"";return(0,ne.jsxs)(ne.Fragment,{children:[f,i?null:(0,ne.jsx)(ao.Box,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...s?[]:[{value:"bug",label:"\uC624\uB958"}]].map(q=>{let _e=P?"bug":D?"event":"task",Ne=_e===q.value;return(0,ne.jsx)(ao.ButtonBase,{onClick:()=>{if(_e===q.value)return;e.setFormValue("is_event",q.value==="event"),e.setFormValue("is_bug",q.value==="bug"),e.setFormValue("visibility",q.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),q.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let lo=e.getFormValue("icon"),uo=e.getFormValue("icon_color"),Ro=[nn,"event",_r].includes(lo),ot=!uo||uo===Os||uo===wr;Ro&&e.setFormValue("icon",q.value==="event"?"event":q.value==="bug"?_r:nn),ot&&e.setFormValue("icon_color",q.value==="event"?Os:q.value==="bug"?wr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:Ne?600:400,color:Ne?"#ffffff":"#787774",bgcolor:Ne?"#2563eb":"#f4f4f2"},children:q.label},q.label)})}),(0,ne.jsx)(ao.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ne.jsxs)(ao.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[(0,ne.jsx)(Mi,{hideProject:l,hideDueDate:!D&&!!Xe,hideReminder:!!Xe,values:{tabKey:he,managerName:S,receiverNames:z,startDate:B,dueDate:y,reminder:M,priority:oe,eventTime:x,eventPlace:v,eventAddress:T},customTabs:t,avatarSrcByName:r,notice:i,event:D,onChangeEventTime:q=>e.setFormValue("event_time",q),onChangeEventPlace:q=>e.setFormValue("event_place",q),onChangeEventAddress:q=>e.setFormValue("event_address",q),targetSummary:ar,onChangeProject:q=>e.setFormValue("tab_key",q),onAddProject:_,onChangeStartDate:q=>e.setFormValue("start_date",q),onChangeDueDate:q=>e.setFormValue("due_date",q),onChangeReminder:q=>e.setFormValue("reminder",q),onChangePriority:q=>e.setFormValue("priority",q),onMemberEdit:d,createLayout:!0,beforeStart:(0,ne.jsxs)(ne.Fragment,{children:[!i&&!P?(0,ne.jsx)(Se,{icon:(0,ne.jsx)(lx.default,{sx:{fontSize:17,...Xe?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:q=>Ke(q),sx:D?void 0:jn(2),children:Xe?Ii(Xe):(0,ne.jsx)(ao.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!i&&!P&&Xe?(0,ne.jsx)(Se,{icon:(0,ne.jsx)(sx.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:q=>J(q),sx:D?void 0:jn(2),children:Io?vt(Io):(0,ne.jsx)(ao.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:(0,ne.jsxs)(ne.Fragment,{children:[i?null:(0,ne.jsx)(Se,{icon:V==="all"?(0,ne.jsx)(Ds.default,{sx:{fontSize:17,color:"#2f80ed"}}):V==="group"?(0,ne.jsx)(Es.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,ne.jsx)(ws.default,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:q=>be(q),sx:D?void 0:jn(1),children:V==="all"?"\uC804\uCCB4\uACF5\uAC1C":V==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${p.find(q=>q.seq===L)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),Oe&&!D&&!i?(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(Se,{icon:(0,ne.jsx)(ax.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:q=>Q(q),sx:jn(1),children:ge>0?$e.find(q=>q.seq===ge)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":(0,ne.jsx)(ao.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),(0,ne.jsx)(Se,{icon:(0,ne.jsx)(cx.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:jn(1),children:(0,ne.jsx)(un,{value:ue>0?String(ue):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:q=>e.setFormValue("story_points",Number(q.replace(/[^0-9.]/g,""))||0)})})]}):null,P?(0,ne.jsx)(Oi,{values:{repro:A,device:C,where:ie,version:h},onChangeRepro:q=>e.setFormValue("bug_repro",q),onChangeDevice:q=>e.setFormValue("bug_device",q),onChangeWhere:q=>e.setFormValue("bug_where",q),onChangeVersion:q=>e.setFormValue("bug_version",q)}):null]}),leading:D||m?null:(0,ne.jsx)(ao.Box,{sx:{gridColumn:"1 / -1"},children:(0,ne.jsx)(Se,{icon:(0,ne.jsx)(ix.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:q=>N(q),children:($??[]).length>0?(0,ne.jsx)(Sn,{labelKeys:$??[],labelOptions:o}):(0,ne.jsx)(ao.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),(0,ne.jsx)(ao.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,ne.jsx)(Dt,{icon:(0,ne.jsx)(nx.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,ne.jsx)(Ri,{syncKey:k,value:W,onChange:q=>e.setFormValue("content",q)})}),D?null:(0,ne.jsx)(ao.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),D?null:(0,ne.jsx)(zi,{taskSeq:0,checklist:se,onAdd:(q,_e)=>e.setFormValue("checklist",[...se,{label:_e,checked:!1}]),onToggle:(q,_e,Ne)=>e.setFormValue("checklist",se.map((lo,uo)=>uo===_e?{...lo,checked:Ne}:lo)),onRemove:(q,_e)=>e.setFormValue("checklist",se.filter((Ne,lo)=>lo!==_e)),onUpdate:(q,_e,Ne)=>e.setFormValue("checklist",se.map((lo,uo)=>uo===_e?{...lo,label:Ne}:lo))}),(0,ne.jsx)(ao.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,ne.jsx)(qi,{taskSeq:0,attachments:Pn.map(q=>({name:q.name,size:q.size})),onAdd:(q,_e)=>{let Ne=_s(_e,E);Ne.message&&(0,Ms.InfoAlert)(Ne.message),Ne.accepted.length!==0&&g.setValue("createAttachmentFiles",[...g.getValue("createAttachmentFiles")??[],...Ne.accepted])},onRemove:(q,_e)=>g.setValue("createAttachmentFiles",Pn.filter((Ne,lo)=>lo!==_e))}),P?null:(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(ao.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,ne.jsx)(Dt,{icon:(0,ne.jsx)(rx.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,ne.jsx)(mx.TextField,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),(0,ne.jsx)(ao.Menu,{transitionDuration:0,anchorEl:Le,open:!!Le,onClose:()=>Q(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...$e.map(q=>({seq:q.seq,label:_t(q)}))].map(q=>(0,ne.jsx)(ao.MenuItem,{onClick:()=>{e.setFormValue("sprint_seq",q.seq),Q(null)},sx:{fontSize:14,minWidth:170},children:q.label},q.seq))}),(0,ne.jsx)(ao.Menu,{transitionDuration:0,anchorEl:ho,open:!!ho,onClose:()=>Ke(null),children:[{value:"",label:"\uC5C6\uC74C"},...Gr].map(q=>(0,ne.jsx)(ao.MenuItem,{selected:Xe===q.value,onClick:()=>{if(Ke(null),q.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let _e;if(D){if(_e=String(e.getFormValue("due_date")??"").slice(0,10),!_e){(0,Ms.InfoAlert)("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(_e=String(e.getFormValue("start_date")??"").slice(0,10),!_e){let Ne=new Date,lo=uo=>String(uo).padStart(2,"0");_e=`${Ne.getFullYear()}-${lo(Ne.getMonth()+1)}-${lo(Ne.getDate())}`}e.setFormValue("due_date",""),e.setFormValue("reminder","none")}e.setFormValue("repeat_rule",q.value),e.setFormValue("repeat_until",_i(_e,q.value))},sx:{fontSize:14,minWidth:140},children:q.label},q.value||"none"))}),(0,ne.jsx)(ux.DatePicker,{anchorEl:_o,open:!!_o,onClose:()=>J(null),selectedDate:Io?new Date(`${Io}T00:00:00`):new Date,onDateChange:q=>{let _e=Ne=>String(Ne).padStart(2,"0");e.setFormValue("repeat_until",`${q.getFullYear()}-${_e(q.getMonth()+1)}-${_e(q.getDate())}`),J(null)}}),(0,ne.jsx)(ao.Menu,{transitionDuration:0,anchorEl:U,open:!!U,onClose:()=>be(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",tip:"\uC791\uC131\uC790\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB9CC \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:(0,ne.jsx)(ws.default,{sx:{fontSize:17,color:"#57564f"}}),selected:V==="involved",onPick:()=>{e.setFormValue("visibility","involved"),e.setFormValue("visibility_group_seq",0)}},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",tip:"\uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:(0,ne.jsx)(Ds.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:V==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...p].sort((q,_e)=>q.seq===u?-1:_e.seq===u?1:0).map(q=>({key:`group-${q.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${q.name}`,tip:`${q.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:(0,ne.jsx)(Es.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:V==="group"&&L===q.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",q.seq)}}))].map(q=>(0,ne.jsx)(ao.Tooltip,{title:q.tip,arrow:!0,disableInteractive:!0,placement:"right",children:(0,ne.jsxs)(ao.MenuItem,{selected:q.selected,onClick:()=>{q.onPick(),be(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[q.icon,q.label]})},q.key))}),(0,ne.jsx)(Li,{anchorEl:pe,selectedKeys:$??[],labelOptions:o,onToggle:q=>e.setFormValue("label_keys",mi($??[],q)),onAddLabel:(q,_e)=>w?.(q,_e),onClose:()=>N(null)})]})}var Ve=require("react/jsx-runtime");function Uh({open:e,onClose:o,...t}){let{form:n,presetTitle:r="",presetContent:i="",presetVisibility:l,presetVisibilityGroupSeq:s=0,presetDueDate:f="",presetTabKey:m="",presetManager:c=null,isNotice:b=!1,defaultBug:p=!1}=t,u=rn(),d=(0,ei.useRef)(!1),[_,w]=(0,ei.useState)(0),k=n.useFormValue("title"),g=n.useFormValue("icon"),E=n.useFormValue("icon_color"),S=!!n.useFormValue("is_event"),z=!!n.useFormValue("is_bug"),B=eo(),P=u.useValue("createSubmitting")??!1,A=b||S?Pe(g||(b?To:Po)):null,C=b?"\uACF5\uC9C0 \uB4F1\uB85D":S?"\uC77C\uC815 \uB4F1\uB85D":z?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",ie=b?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":S?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":z?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";(0,ei.useEffect)(()=>{let x=d.current;d.current=e,!(!e||x)&&(n.setFormValues({...n.getFormValues(),title:r,icon:b?To:p?_r:nn,icon_color:b?"#e5484d":p?wr:"",manager_name:c?.name??"",manager_account_seq:c?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:b,is_event:!1,is_bug:p,visibility:l??(p?"all":"involved"),visibility_group_seq:l==="group"?s:0,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:"",due_date:f,reminder:"none",priority:"medium",note:"",content:i,checklist:[],tab_key:m}),u.setValue("createAttachmentFiles",[]),w(v=>v+1))},[e]);let h=(0,Ve.jsxs)(Bo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[A?(0,Ve.jsx)(Bo.Box,{sx:{display:"flex",p:0,color:E||"#1e3a8a"},children:(0,Ve.jsx)(A,{sx:{fontSize:20}})}):null,(0,Ve.jsx)(Bo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:k,placeholder:ie,onChange:x=>n.setFormValue("title",x.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}}})]});return B?(0,Ve.jsx)(Ve.Fragment,{children:(0,Ve.jsx)(fx.FormDialog,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:C,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:(0,Ve.jsx)(Bo.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:P,onClick:P?void 0:n.submit,sx:{ml:2,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#e6e6e3",color:"#9a9a97"}},children:"\uC800\uC7A5"}),tooltip:P?"\uC800\uC7A5 \uC911\u2026":""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!1},sections:[{id:"task-create",title:"",showTitle:!1,children:(0,Ve.jsx)(Bo.Box,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:(0,Ve.jsx)(ja,{...t,contentSyncKey:`create-${_}`,leadingRow:h})})}]})}):(0,Ve.jsx)(Ve.Fragment,{children:(0,Ve.jsx)(Bo.Drawer,{anchor:"right",open:e,onClose:o,sx:{zIndex:x=>x.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Ve.jsxs)(Bo.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,Ve.jsxs)(Bo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[A?(0,Ve.jsx)(Bo.Box,{sx:{display:"flex",px:.5,color:E||"#1e3a8a"},children:(0,Ve.jsx)(A,{sx:{fontSize:20}})}):null,(0,Ve.jsx)(Bo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:k,placeholder:ie,onChange:x=>n.setFormValue("title",x.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),(0,Ve.jsx)(Bo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:(0,Ve.jsx)(dx.default,{})})]}),(0,Ve.jsx)(Bo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Ve.jsx)(Bo.Box,{sx:{flex:1,minHeight:0},children:(0,Ve.jsx)(px.default,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Ve.jsx)(ja,{...t,contentSyncKey:`create-${_}`})})}),(0,Ve.jsx)(Bo.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Ve.jsxs)(Bo.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,Ve.jsx)(Bo.Button,{onClick:o,color:"inherit",disabled:P,children:"\uCDE8\uC18C"}),(0,Ve.jsx)(Bo.Button,{onClick:n.submit,variant:"contained",disabled:P,children:P?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})})})}var wn=require("react"),Ht=require("@mui/material"),ag=a(require("@mui/icons-material/ShareOutlined"),1),lg=a(require("@mui/icons-material/HistoryOutlined"),1),sg=a(require("@ehfuse/overlay-scrollbar"),1),cg=require("@ehfuse/mui-form-dialog"),js=require("@ehfuse/alerts");var Xt=require("react"),ee=require("@mui/material"),Ps=a(require("@mui/icons-material/Send"),1),gx=require("@ehfuse/mui-form-controls"),Fi=a(require("@mui/icons-material/Close"),1),bx=a(require("@mui/icons-material/EditOutlined"),1),hx=a(require("@mui/icons-material/Favorite"),1),kx=a(require("@mui/icons-material/FavoriteBorderOutlined"),1),Tx=a(require("@mui/icons-material/CheckCircle"),1),yx=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),yr=a(require("@mui/icons-material/AttachFileOutlined"),1),Sx=a(require("@mui/icons-material/AddCircleOutline"),1),Bx=a(require("@mui/icons-material/ImageOutlined"),1);var Rs=e=>{if(e===0)return"0 Bytes";let o=1024,t=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,n)).toFixed(2))+" "+t[n]};var F=require("react/jsx-runtime"),Gh=5;function xx({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(m=>m.account_seq===t),l=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",s=r.length===0?l:(0,F.jsx)(ee.Box,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(m=>`${m.name} \xB7 ${m.time}`).join(`
8
8
  `)}),f=e==="like"?"#e5484d":"#2f80ed";return(0,F.jsx)(ee.Tooltip,{title:s,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,F.jsxs)(ee.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[(0,F.jsx)(ee.IconButton,{size:"small","aria-label":`\uB313\uAE00 ${l}`,onClick:n,sx:{color:i?f:"#c9c8c5",p:.5},children:e==="like"?i?(0,F.jsx)(hx.default,{sx:{fontSize:16}}):(0,F.jsx)(kx.default,{sx:{fontSize:16}}):i?(0,F.jsx)(Tx.default,{sx:{fontSize:16}}):(0,F.jsx)(yx.default,{sx:{fontSize:16}})}),r.length>0?(0,F.jsx)(ee.Box,{component:"span",sx:{fontSize:12,color:i?f:"#9a9a97",ml:-.25},children:r.length}):null]})})}function zs({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:l,onToggleReaction:s,onPreview:f,onDownload:m}){let[c,b]=(0,Xt.useState)(null),p=(0,Xt.useRef)(null),[u,d]=(0,Xt.useState)(null),[_,w]=(0,Xt.useState)(!1),k=Math.max(0,o.length-Gh),g=k>0&&!_,E=c?Math.min(c.index,k):k,S=o.map((A,C)=>({comment:A,index:C})).slice(g?E:0),z=vr(),B=A=>{if(f){f(A);return}window.open(z(A.uuid??""),"_blank","noopener,noreferrer")},D=A=>{if(m){m(A);return}window.open(z(A.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},P=ct().slots?.avatar;return(0,F.jsxs)(ee.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,F.jsxs)(ee.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,F.jsx)(Bn,{sx:{fontSize:18,display:"block",color:"#37352f"}}),(0,F.jsxs)(ee.Box,{sx:{fontSize:Fa,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),k>0&&(!g||E>0)?(0,F.jsx)(ee.Box,{role:"button",tabIndex:0,onClick:()=>w(A=>!A),onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),w(C=>!C))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:g?`\uC774\uC804 \uB313\uAE00 ${E}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?(0,F.jsx)(ee.Box,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(0,F.jsx)(ee.Box,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:S.map(({comment:A,index:C})=>{let ie=!!t&&A.author===t;return(0,F.jsxs)(ee.Box,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let h=r?.get(A.author)??"";return P?(0,F.jsx)(ee.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,F.jsx)(P,{name:A.author,src:h||void 0,size:44})}):(0,F.jsx)(ee.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,F.jsx)(zt,{src:h,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...xr[0]},iconFontSize:24})})})(),(0,F.jsxs)(ee.Box,{sx:{flex:1,minWidth:0},children:[(0,F.jsxs)(ee.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[(0,F.jsx)(ee.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:A.author}),(0,F.jsx)(ee.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:A.time}),ie?(0,F.jsx)(ee.Box,{sx:{ml:"auto"}}):(0,F.jsxs)(ee.Box,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[(0,F.jsx)(xx,{kind:"like",reactions:A.likes,myAccountSeq:n,onToggle:()=>s?.(e,C,"like")}),(0,F.jsx)(xx,{kind:"ack",reactions:A.acks,myAccountSeq:n,onToggle:()=>s?.(e,C,"ack")})]}),ie?(0,F.jsxs)(ee.Box,{className:"taskbox-comment-actions",sx:{display:"flex",alignItems:"center",gap:.25,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",backgroundColor:"#fff",opacity:0,transition:"opacity 0.15s"},children:[(0,F.jsx)(ee.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>b({index:C,text:A.text,attachments:[...A.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:(0,F.jsx)(bx.default,{sx:{fontSize:15}})}),(0,F.jsx)(ee.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:h=>d({anchorEl:h.currentTarget,index:C}),sx:{color:"#9a9a97"},children:(0,F.jsx)(Fi.default,{sx:{fontSize:15}})})]}):null]}),c?.index===C?(0,F.jsxs)(ee.Box,{sx:{mt:.5},children:[(0,F.jsx)(ee.Box,{component:"textarea",autoFocus:!0,spellCheck:!1,value:c.text,onChange:h=>b({...c,text:h.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),(0,F.jsxs)(ee.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[c.attachments.map((h,x)=>{let v=()=>b({...c,attachments:c.attachments.filter((T,y)=>y!==x)});return Ya(h.name)&&h.uuid?(0,F.jsxs)(ee.Box,{sx:{position:"relative"},children:[(0,F.jsx)(ee.Box,{component:"img",src:z(h.uuid,{thumb:"md"}),alt:h.name,title:h.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),(0,F.jsx)(ee.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:v,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,F.jsx)(Fi.default,{sx:{fontSize:14}})})]},`kept-${h.uuid}-${x}`):(0,F.jsx)(ee.Chip,{size:"small",icon:(0,F.jsx)(yr.default,{sx:{fontSize:14}}),label:h.name,onDelete:v,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${h.uuid??h.name}-${x}`)}),c.files.map((h,x)=>{let v=()=>b({...c,files:c.files.filter((T,y)=>y!==x)});return Ya(h.name)?(0,F.jsxs)(ee.Box,{sx:{position:"relative"},children:[(0,F.jsx)(ee.Box,{component:"img",src:URL.createObjectURL(h),alt:h.name,title:`${h.name} (\uC0C8 \uD30C\uC77C)`,onLoad:T=>URL.revokeObjectURL(T.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),(0,F.jsx)(ee.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:v,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,F.jsx)(Fi.default,{sx:{fontSize:14}})})]},`new-${h.name}-${x}`):(0,F.jsx)(ee.Chip,{size:"small",icon:(0,F.jsx)(yr.default,{sx:{fontSize:14}}),label:`${h.name} (\uC0C8 \uD30C\uC77C)`,onDelete:v,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${h.name}-${x}`)}),(0,F.jsx)(ee.Tooltip,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:(0,F.jsx)(ee.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>p.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:(0,F.jsx)(Sx.default,{sx:{fontSize:20}})})})]}),(0,F.jsxs)(ee.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[(0,F.jsx)(ee.Button,{size:"small",color:"inherit",onClick:()=>b(null),children:"\uCDE8\uC18C"}),(0,F.jsx)(ee.Button,{size:"small",variant:"contained",disabled:!c.text.trim()&&c.attachments.length===0&&c.files.length===0,onClick:()=>{i(e,C,c.text,{attachments:c.attachments,files:c.files}),b(null)},children:"\uC800\uC7A5"})]}),(0,F.jsx)(ee.Box,{component:"input",type:"file",multiple:!0,ref:p,sx:{display:"none"},onChange:h=>{let x=Array.from(h.target.files??[]);x.length>0&&b({...c,files:[...c.files,...x].slice(0,10)}),h.target.value=""}})]}):(0,F.jsxs)(ee.Box,{children:[A.text?(0,F.jsx)(ee.Box,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:A.text}):null,(A.attachments??[]).length>0?(0,F.jsx)(ee.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(A.attachments??[]).map((h,x)=>{let v=!!h.uuid;if(Ya(h.name)&&v)return(0,F.jsx)(ee.Box,{component:"img",src:z(h.uuid??"",{thumb:"md"}),alt:h.name,title:`${h.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>B(h),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${h.name}-${x}`);let y=$a(h.name);return(0,F.jsx)(ee.Chip,{size:"small",icon:(0,F.jsx)(yr.default,{sx:{fontSize:14}}),label:`${h.name} (${Rs(h.size)})`,clickable:v,onClick:v?()=>y?B(h):D(h):void 0,title:v?`${h.name} ${y?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:h.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${h.name}-${x}`)})}):null]})]})]},`${A.time}-${C}`)})}),(0,F.jsx)(oo,{open:!!u,anchorEl:u?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>d(null),onConfirm:()=>{u&&(l(e,u.index),b(null)),d(null)}})]})}function Ya(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function qs({onSubmit:e}){let[o,t]=(0,Xt.useState)(""),[n,r]=(0,Xt.useState)([]),[i,l]=(0,Xt.useState)(!1),s=(0,Xt.useRef)(null),f=(0,Xt.useRef)(null),m=eo(),c=u=>{let d=Array.from(u??[]);d.length!==0&&r(_=>[..._,...d].slice(0,10))},b=()=>{let u=o.trim();!u&&n.length===0||(e(u,n.length>0?n:void 0),t(""),r([]))},p=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ee.IconButton,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>s.current?.click(),sx:{color:"#9a9a97"},children:(0,F.jsx)(yr.default,{sx:{fontSize:20}})}),(0,F.jsx)(ee.IconButton,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>f.current?.click(),sx:{color:"#9a9a97"},children:(0,F.jsx)(Bx.default,{sx:{fontSize:20}})})]});return(0,F.jsxs)(ee.Box,{children:[n.length>0?(0,F.jsx)(ee.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((u,d)=>Ya(u.name)?(0,F.jsxs)(ee.Box,{sx:{position:"relative"},children:[(0,F.jsx)(ee.Box,{component:"img",src:URL.createObjectURL(u),alt:u.name,title:u.name,onLoad:_=>URL.revokeObjectURL(_.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),(0,F.jsx)(ee.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(_=>_.filter((w,k)=>k!==d)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:(0,F.jsx)(Fi.default,{sx:{fontSize:14}})})]},`${u.name}-${d}`):(0,F.jsx)(ee.Chip,{size:"small",icon:(0,F.jsx)(yr.default,{sx:{fontSize:14}}),label:`${u.name} (${Rs(u.size)})`,onDelete:()=>r(_=>_.filter((w,k)=>k!==d)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${u.name}-${d}`))}):null,(0,F.jsxs)(ee.Box,{sx:{position:"relative",display:"flex"},onDragOver:u=>{Array.from(u.dataTransfer?.types??[]).includes("Files")&&(u.preventDefault(),l(!0))},onDragLeave:u=>{u.currentTarget.contains(u.relatedTarget)||l(!1)},onDrop:u=>{Array.from(u.dataTransfer?.types??[]).includes("Files")&&(u.preventDefault(),l(!1),c(u.dataTransfer?.files??null))},children:[i?(0,F.jsxs)(ee.Box,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[(0,F.jsx)(yr.default,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,(0,F.jsx)(gx.TextField,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:u=>t(u.target.value),fullWidth:!0,multiline:!0,minRows:m?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:m?15:6.5,pb:m?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),m?(0,F.jsxs)(ee.Box,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,(0,F.jsx)(ee.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:b,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,F.jsx)(Ps.default,{sx:{fontSize:22}})})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ee.Box,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),(0,F.jsx)(ee.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:b,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,F.jsx)(Ps.default,{sx:{fontSize:22}})})]})]}),(0,F.jsx)(ee.Box,{component:"input",ref:s,type:"file",multiple:!0,onChange:u=>{c(u.target.files),u.target.value=""},sx:{display:"none"}}),(0,F.jsx)(ee.Box,{component:"input",ref:f,type:"file",accept:"image/*",multiple:!0,onChange:u=>{c(u.target.files),u.target.value=""},sx:{display:"none"}})]})}var Qa=require("react"),Fo=require("@mui/material"),Mx=a(require("@mui/icons-material/Close"),1),Ox=a(require("@mui/icons-material/ArrowBack"),1),Rx=a(require("@mui/icons-material/ShareOutlined"),1),Px=a(require("@mui/icons-material/ContentCopyOutlined"),1),zx=a(require("@mui/icons-material/HistoryOutlined"),1),qx=a(require("@mui/icons-material/Print"),1);var vx=require("react"),Tt=require("@mui/material"),Ix=require("@ehfuse/mui-form-dialog"),_x=require("@ehfuse/overlay-scrollbar");var at=require("react/jsx-runtime"),jh={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 Cx(e){return String(e??"").trim()||"\uC5C6\uC74C"}function Yh(e){if(e.kind!=="field")return jh[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) "${Cx(t)}" \u2192 "${Cx(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Hi({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let l=eo();(0,vx.useEffect)(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let s=(0,at.jsx)(Tt.Box,{sx:{height:l?"100%":420,minHeight:0},children:(0,at.jsx)(_x.OverlayScrollbar,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,at.jsxs)(Tt.Box,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[n&&!t?(0,at.jsxs)(Tt.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,at.jsx)(Tt.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?(0,at.jsx)(Tt.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(f=>(0,at.jsxs)(Tt.Box,{sx:{display:"flex",flexDirection:l?"column":"row",gap:l?.25:1,alignItems:l?"stretch":"baseline",minWidth:0,flexShrink:0,...l?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[(0,at.jsx)(Tt.Box,{sx:{flexShrink:0,...l?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:dt(f.acted_time)}),(0,at.jsxs)(Tt.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,at.jsx)(Tt.Box,{component:"span",sx:{fontWeight:500},children:String(f.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,at.jsx)(Tt.Box,{component:"span",sx:{ml:.5},children:Yh(f)})]})]},f.seq))]})})});return(0,at.jsx)(Ix.FormDialog,{open:e,onClose:i,maxWidth:"sm",fullScreen:l,mobilePresentation:l?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:l?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${t&&t.length>0?` (${t.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:s}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:(0,at.jsx)(Tt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var Xa=require("@ehfuse/alerts");var wx=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,`