@ehfuse/taskbox 0.5.11 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +7 -7
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +7 -7
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var Mn="waiting",sr="replied";import{createContext as xm,useContext as gm,useMemo as nl}from"react";import{Box as bm}from"@mui/material";var fi="--app-mobile-font-offset";function po(e,o=0){return`calc(${e}px + max(0px, var(${fi}, 0px) - ${o}px))`}import{jsx as tl}from"react/jsx-runtime";var rl=xm({});function hm({config:e,children:o}){let t=nl(()=>e??{},[e]),n=t.mobileFontOffsetPx;return tl(rl.Provider,{value:t,children:n===void 0?o:tl(bm,{sx:{display:"contents",[fi]:`${n}px`},children:o})})}function yo(){return gm(rl)}function xi(){let{buildFileUrl:e}=yo();return nl(()=>e||((o,t)=>{let n=[];return t?.thumb&&n.push(`thumb=${t.thumb}`),t?.download&&n.push("download=1"),`/api/v1/files/${o}${n.length?`?${n.join("&")}`:""}`}),[e])}function En(){let{uploadMaxMb:e}=yo();return e??50}import{useGlobalForm as tp}from"@ehfuse/forma";import il from"@mui/icons-material/DoNotDisturbAltOutlined";import al from"@mui/icons-material/BookmarkBorderOutlined";import km from"@mui/icons-material/LabelOutlined";import Tm from"@mui/icons-material/FlagOutlined";import ym from"@mui/icons-material/StarBorderOutlined";import Sm from"@mui/icons-material/FolderOutlined";import Bm from"@mui/icons-material/EventOutlined";import Cm from"@mui/icons-material/BuildOutlined";import vm from"@mui/icons-material/LocalShippingOutlined";import Im from"@mui/icons-material/StorefrontOutlined";import _m from"@mui/icons-material/GroupsOutlined";import wm from"@mui/icons-material/LightbulbOutlined";import Dm from"@mui/icons-material/FavoriteBorderOutlined";import Om from"@mui/icons-material/AssignmentOutlined";import Mm from"@mui/icons-material/HomeOutlined";import Em from"@mui/icons-material/WorkOutline";import Pm from"@mui/icons-material/SchoolOutlined";import Rm from"@mui/icons-material/LocalHospitalOutlined";import zm from"@mui/icons-material/RestaurantOutlined";import qm from"@mui/icons-material/LocalFloristOutlined";import Am from"@mui/icons-material/DirectionsCarOutlined";import Lm from"@mui/icons-material/CampaignOutlined";import Nm from"@mui/icons-material/SavingsOutlined";import Fm from"@mui/icons-material/Inventory2Outlined";import Hm from"@mui/icons-material/CleaningServicesOutlined";import ll from"@mui/icons-material/HandymanOutlined";import Wm from"@mui/icons-material/LocalPhoneOutlined";import $m from"@mui/icons-material/EmailOutlined";import Km from"@mui/icons-material/ShoppingCartOutlined";import Um from"@mui/icons-material/BarChartOutlined";import Vm from"@mui/icons-material/PrintOutlined";import Gm from"@mui/icons-material/SecurityOutlined";import Ym from"@mui/icons-material/AlarmOutlined";import jm from"@mui/icons-material/AttachFileOutlined";import Xm from"@mui/icons-material/PhotoCameraOutlined";import Qm from"@mui/icons-material/ImageOutlined";import Jm from"@mui/icons-material/MenuBookOutlined";import Zm from"@mui/icons-material/EditOutlined";import eu from"@mui/icons-material/KeyOutlined";import ou from"@mui/icons-material/LockOutlined";import tu from"@mui/icons-material/LockOpenOutlined";import nu from"@mui/icons-material/SettingsOutlined";import ru from"@mui/icons-material/CloudOutlined";import iu from"@mui/icons-material/WifiOutlined";import au from"@mui/icons-material/ComputerOutlined";import lu from"@mui/icons-material/SmartphoneOutlined";import su from"@mui/icons-material/TvOutlined";import cu from"@mui/icons-material/AccessTimeOutlined";import mu from"@mui/icons-material/TimerOutlined";import uu from"@mui/icons-material/MapOutlined";import du from"@mui/icons-material/PlaceOutlined";import pu from"@mui/icons-material/NavigationOutlined";import fu from"@mui/icons-material/FlightOutlined";import xu from"@mui/icons-material/TrainOutlined";import gu from"@mui/icons-material/DirectionsBusOutlined";import bu from"@mui/icons-material/DirectionsBikeOutlined";import hu from"@mui/icons-material/DirectionsWalkOutlined";import ku from"@mui/icons-material/DirectionsRunOutlined";import Tu from"@mui/icons-material/FitnessCenterOutlined";import yu from"@mui/icons-material/SportsSoccerOutlined";import Su from"@mui/icons-material/EmojiEventsOutlined";import Bu from"@mui/icons-material/CardGiftcardOutlined";import Cu from"@mui/icons-material/CakeOutlined";import sl from"@mui/icons-material/CoffeeOutlined";import vu from"@mui/icons-material/LocalPizzaOutlined";import Iu from"@mui/icons-material/ShoppingBagOutlined";import cl from"@mui/icons-material/CreditCardOutlined";import _u from"@mui/icons-material/AccountBalanceOutlined";import wu from"@mui/icons-material/AccountBalanceWalletOutlined";import Du from"@mui/icons-material/AttachMoneyOutlined";import Ou from"@mui/icons-material/ReceiptLongOutlined";import Mu from"@mui/icons-material/CalculateOutlined";import Eu from"@mui/icons-material/TrendingUpOutlined";import Pu from"@mui/icons-material/ListAltOutlined";import Ru from"@mui/icons-material/TaskAltOutlined";import zu from"@mui/icons-material/DoneAllOutlined";import qu from"@mui/icons-material/WarningAmberOutlined";import Au from"@mui/icons-material/InfoOutlined";import Lu from"@mui/icons-material/HelpOutlined";import Nu from"@mui/icons-material/SupportAgentOutlined";import Fu from"@mui/icons-material/PersonOutlined";import Hu from"@mui/icons-material/PersonAddOutlined";import Wu from"@mui/icons-material/BadgeOutlined";import $u from"@mui/icons-material/WbSunnyOutlined";import Ku from"@mui/icons-material/DarkModeOutlined";import Uu from"@mui/icons-material/LocalFireDepartmentOutlined";import Vu from"@mui/icons-material/WaterDropOutlined";import Gu from"@mui/icons-material/BoltOutlined";import Yu from"@mui/icons-material/AutorenewOutlined";import ju from"@mui/icons-material/ScienceOutlined";import Xu from"@mui/icons-material/MedicalServicesOutlined";import Qu from"@mui/icons-material/NotificationsOutlined";import Ju from"@mui/icons-material/SendOutlined";import Zu from"@mui/icons-material/LinkOutlined";import ed from"@mui/icons-material/PublicOutlined";import ml from"@mui/icons-material/ApartmentOutlined";import od from"@mui/icons-material/PlumbingOutlined";import td from"@mui/icons-material/ElectricalServicesOutlined";import nd from"@mui/icons-material/ChatOutlined";import rd from"@mui/icons-material/DescriptionOutlined";import id from"@mui/icons-material/FactCheckOutlined";import ad from"@mui/icons-material/RocketLaunchOutlined";import ld from"@mui/icons-material/PaletteOutlined";import sd from"@mui/icons-material/MusicNoteOutlined";import cd from"@mui/icons-material/VideocamOutlined";import md from"@mui/icons-material/ThumbUpOutlined";import ud from"@mui/icons-material/PushPinOutlined";import dd from"@mui/icons-material/SearchOutlined";import pd from"@mui/icons-material/VisibilityOutlined";import fd from"@mui/icons-material/VerifiedOutlined";import xd from"@mui/icons-material/TrackChangesOutlined";import gd from"@mui/icons-material/ExtensionOutlined";import bd from"@mui/icons-material/CodeOutlined";import hd from"@mui/icons-material/BugReportOutlined";import kd from"@mui/icons-material/SmartToyOutlined";import Td from"@mui/icons-material/StorageOutlined";import yd from"@mui/icons-material/QrCode2Outlined";import Sd from"@mui/icons-material/FileDownloadOutlined";import Bd from"@mui/icons-material/FileUploadOutlined";import Cd from"@mui/icons-material/MicOutlined";import vd from"@mui/icons-material/HeadphonesOutlined";import Id from"@mui/icons-material/MovieOutlined";import _d from"@mui/icons-material/SportsEsportsOutlined";import wd from"@mui/icons-material/BrushOutlined";import Dd from"@mui/icons-material/ArchitectureOutlined";import Od from"@mui/icons-material/EngineeringOutlined";import Md from"@mui/icons-material/FactoryOutlined";import Ed from"@mui/icons-material/AgricultureOutlined";import Pd from"@mui/icons-material/DirectionsBoatOutlined";import Rd from"@mui/icons-material/TwoWheelerOutlined";import zd from"@mui/icons-material/HandshakeOutlined";import qd from"@mui/icons-material/GavelOutlined";import Ad from"@mui/icons-material/BalanceOutlined";import Ld from"@mui/icons-material/TranslateOutlined";import Nd from"@mui/icons-material/PsychologyOutlined";import Fd from"@mui/icons-material/PetsOutlined";import Hd from"@mui/icons-material/CelebrationOutlined";import Wd from"@mui/icons-material/BeachAccessOutlined";import $d from"@mui/icons-material/AcUnitOutlined";import Kd from"@mui/icons-material/ForestOutlined";import Ud from"@mui/icons-material/LandscapeOutlined";import Vd from"@mui/icons-material/HotelOutlined";import Gd from"@mui/icons-material/LocalLaundryServiceOutlined";import Yd from"@mui/icons-material/ChairOutlined";import jd from"@mui/icons-material/LocalBarOutlined";import Xd from"@mui/icons-material/LunchDiningOutlined";import Qd from"@mui/icons-material/IcecreamOutlined";import Jd from"@mui/icons-material/WorkspacePremiumOutlined";import Zd from"@mui/icons-material/DiamondOutlined";import ep from"@mui/icons-material/VaccinesOutlined";var gi="bookmark",_e="label",Mo="notifications",Pn="warning",Rn="#e53e3e",ul="none",bi=[{key:ul,Icon:il},{key:"label",Icon:km},{key:"bookmark",Icon:al},{key:"flag",Icon:Tm},{key:"star",Icon:ym},{key:"folder",Icon:Sm},{key:"event",Icon:Bm},{key:"build",Icon:Cm},{key:"shipping",Icon:vm},{key:"store",Icon:Im},{key:"groups",Icon:_m},{key:"idea",Icon:wm},{key:"heart",Icon:Dm},{key:"assignment",Icon:Om},{key:"home",Icon:Mm},{key:"work",Icon:Em},{key:"school",Icon:Pm},{key:"hospital",Icon:Rm},{key:"restaurant",Icon:zm},{key:"flower",Icon:qm},{key:"car",Icon:Am},{key:"campaign",Icon:Lm},{key:"savings",Icon:Nm},{key:"inventory",Icon:Fm},{key:"cleaning",Icon:Hm},{key:"handyman",Icon:ll},{key:"phone",Icon:Wm},{key:"email",Icon:$m},{key:"cart",Icon:Km},{key:"chart",Icon:Um},{key:"print",Icon:Vm},{key:"security",Icon:Gm},{key:"alarm",Icon:Ym},{key:"attach",Icon:jm},{key:"camera",Icon:Xm},{key:"image",Icon:Qm},{key:"book",Icon:Jm},{key:"edit",Icon:Zm},{key:"key",Icon:eu},{key:"lock",Icon:ou},{key:"unlock",Icon:tu},{key:"settings",Icon:nu},{key:"cloud",Icon:ru},{key:"wifi",Icon:iu},{key:"computer",Icon:au},{key:"smartphone",Icon:lu},{key:"tv",Icon:su},{key:"clock",Icon:cu},{key:"timer",Icon:mu},{key:"map",Icon:uu},{key:"place",Icon:du},{key:"navigation",Icon:pu},{key:"flight",Icon:fu},{key:"train",Icon:xu},{key:"bus",Icon:gu},{key:"bike",Icon:bu},{key:"walk",Icon:hu},{key:"run",Icon:ku},{key:"fitness",Icon:Tu},{key:"soccer",Icon:yu},{key:"trophy",Icon:Su},{key:"gift",Icon:Bu},{key:"cake",Icon:Cu},{key:"coffee",Icon:sl},{key:"pizza",Icon:vu},{key:"bag",Icon:Iu},{key:"card",Icon:cl},{key:"bank",Icon:_u},{key:"wallet",Icon:wu},{key:"money",Icon:Du},{key:"receipt",Icon:Ou},{key:"calculate",Icon:Mu},{key:"trending",Icon:Eu},{key:"listalt",Icon:Pu},{key:"task",Icon:Ru},{key:"doneall",Icon:zu},{key:"warning",Icon:qu},{key:"info",Icon:Au},{key:"help",Icon:Lu},{key:"support",Icon:Nu},{key:"person",Icon:Fu},{key:"personadd",Icon:Hu},{key:"badge",Icon:Wu},{key:"sun",Icon:$u},{key:"moon",Icon:Ku},{key:"fire",Icon:Uu},{key:"water",Icon:Vu},{key:"bolt",Icon:Gu},{key:"renew",Icon:Yu},{key:"science",Icon:ju},{key:"medical",Icon:Xu},{key:"notifications",Icon:Qu},{key:"send",Icon:Ju},{key:"link",Icon:Zu},{key:"public",Icon:ed},{key:"apartment",Icon:ml},{key:"plumbing",Icon:od},{key:"electrical",Icon:td},{key:"chat",Icon:nd},{key:"description",Icon:rd},{key:"factcheck",Icon:id},{key:"rocket",Icon:ad},{key:"palette",Icon:ld},{key:"music",Icon:sd},{key:"video",Icon:cd},{key:"thumbup",Icon:md},{key:"pin",Icon:ud},{key:"search",Icon:dd},{key:"eye",Icon:pd},{key:"verified",Icon:fd},{key:"target",Icon:xd},{key:"extension",Icon:gd},{key:"code",Icon:bd},{key:"bug",Icon:hd},{key:"robot",Icon:kd},{key:"storage",Icon:Td},{key:"qrcode",Icon:yd},{key:"download",Icon:Sd},{key:"upload",Icon:Bd},{key:"mic",Icon:Cd},{key:"headphones",Icon:vd},{key:"movie",Icon:Id},{key:"game",Icon:_d},{key:"brush",Icon:wd},{key:"architecture",Icon:Dd},{key:"engineering",Icon:Od},{key:"factory",Icon:Md},{key:"agriculture",Icon:Ed},{key:"boat",Icon:Pd},{key:"motorcycle",Icon:Rd},{key:"handshake",Icon:zd},{key:"gavel",Icon:qd},{key:"balance",Icon:Ad},{key:"translate",Icon:Ld},{key:"psychology",Icon:Nd},{key:"pets",Icon:Fd},{key:"celebration",Icon:Hd},{key:"beach",Icon:Wd},{key:"snow",Icon:$d},{key:"forest",Icon:Kd},{key:"mountain",Icon:Ud},{key:"hotel",Icon:Vd},{key:"laundry",Icon:Gd},{key:"chair",Icon:Yd},{key:"bar",Icon:jd},{key:"burger",Icon:Xd},{key:"icecream",Icon:Qd},{key:"medal",Icon:Jd},{key:"diamond",Icon:Zd},{key:"vaccine",Icon:ep}],op={cafe:sl,payment:cl,business:ml,construction:ll};function Oe(e){return e===ul?null:bi.find(o=>o.key===e)?.Icon??op[String(e??"")]??al}function cr(e){return Oe(e)??il}var hi={title:"",icon:_e,icon_color:"",manager_name:"",manager_account_seq:0,receiver_names:[],receiver_account_seqs:[],is_notice:!1,is_event:!1,is_bug:!1,is_open:!1,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",sprint_seq:0,story_points:0,event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:"",due_date:"",reminder:"none",priority:"medium",label_keys:[],note:"",content:"",checklist:[],tab_key:""},ki={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function np(e){let{formId:o="taskbox-create-form",initialValues:t,onValidate:n,onSubmit:r}=e;return tp({formId:o,initialValues:{...hi,...t},onValidate:n,onSubmit:r})}import{useGlobalFormaState as rp}from"@ehfuse/forma";var dl="taskbox-ui-state";function et(){return rp({stateId:dl,initialValues:ki})}import{useMemo as ip}from"react";import{useTheme as ap}from"@mui/material";function ln(e,o){let t=Math.max(0,Math.min(1,o));if(t<=0)return"transparent";let n=e.trim().replace("#",""),r=n.length===3?n.split("").map(u=>u+u).join(""):n;if(!/^[0-9a-fA-F]{6}$/.test(r))return e;let a=Number.parseInt(r.slice(0,2),16),i=Number.parseInt(r.slice(2,4),16),l=Number.parseInt(r.slice(4,6),16);return`rgba(${a}, ${i}, ${l}, ${t})`}function Ti(e,o){let t=Math.max(0,Math.min(1,o)),n=e.trim().replace("#",""),r=n.length===3?n.split("").map(c=>c+c).join(""):n;if(!/^[0-9a-fA-F]{6}$/.test(r))return e;let a=c=>Math.round(c+(255-c)*t),i=a(Number.parseInt(r.slice(0,2),16)),l=a(Number.parseInt(r.slice(2,4),16)),u=a(Number.parseInt(r.slice(4,6),16));return`#${[i,l,u].map(c=>c.toString(16).padStart(2,"0")).join("")}`}function yi(e,o,t){return t==="dark"?{accent:e,accentContrast:o,accentSoft:"#1d2b45",accentOnSurface:Ti(e,.45),danger:"#f87171",dangerSoft:"#3a1f22",success:"#4ade80",warning:"#fbbf24",textStrong:"#f8fafc",textPrimary:"#e2e8f0",textSecondary:"#a3adbb",textMuted:"#77808d",textInverse:"#0f1216",surface:"#161a1f",surfaceSubtle:"#1e232a",surfaceHover:"#272d36",border:"#2c333c",borderStrong:"#3b434e"}:{accent:e,accentContrast:o,accentSoft:"#eef4ff",accentOnSurface:e,danger:"#e5484d",dangerSoft:"#fdebec",success:"#16a34a",warning:"#e8a33d",textStrong:"#000000",textPrimary:"#37352f",textSecondary:"#787774",textMuted:"#9a9a97",textInverse:"#ffffff",surface:"#ffffff",surfaceSubtle:"#fafaf9",surfaceHover:"#f4f4f2",border:"#e6e6e3",borderStrong:"#dedddb"}}function lp(e,o){let t=o==="dark";return{bg:t?Ti(e.accent,.45):e.accent,color:t?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6}}function pl(e,o){return{...e,...o??{}}}function mr(e,o="light"){let t=lp(e,o),n=e.accentOnSurface;return{mode:o,colors:e,table:{bg:e.surface,borderColor:e.borderStrong,headerBg:e.surface,headerColor:e.textSecondary,headerActiveColor:e.textStrong,headerFilteredColor:n,headerFontSize:13,rowBg:e.surface,rowColor:e.textPrimary,rowSubColor:e.textSecondary,rowTitleColor:e.textStrong,rowTitleFontWeight:o==="dark"?400:500,rowHoverBg:e.surfaceHover,rowBorderColor:e.border,cellHoverBg:e.surfaceHover,emptyColor:e.textMuted,groupHeader:{bg:e.surfaceSubtle,hoverBg:e.surfaceHover,borderColor:e.border,labelColor:o==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:o==="dark"?400:700,minHeight:48,badge:{...t,borderRadius:4,width:34}}},board:{columnBg:e.surfaceSubtle,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...t,borderRadius:4,width:34}},summary:{gaugeTrackColor:o==="dark"?e.borderStrong:"#ececea",gaugeBarColor:n,gaugeCompleteColor:e.success,gaugeHeight:6,numberColor:n,overdueColor:e.danger,textColor:e.textStrong},actionButton:{bg:e.accent,color:e.accentContrast,hoverBg:e.accent},tabs:{bg:o==="dark"?e.surfaceSubtle:e.surface,color:o==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:o==="dark"?e.border:e.borderStrong,selectedBg:o==="dark"?e.surfaceHover:e.textStrong,selectedColor:o==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:e.surface,dateBandBg:e.surface,otherMonthBg:e.surfaceSubtle,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:o==="dark"?e.surfaceSubtle:e.surface,borderColor:e.border,hoverBg:e.surfaceHover,titleColor:e.textPrimary,subColor:e.textSecondary},timeline:{bg:e.surface,gridColor:e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,todayLineColor:e.accentOnSurface,barColor:e.accentOnSurface,overdueBarColor:e.danger},avatar:{ringColor:o==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:o==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function Si(e,o){if(!o)return e;let t=o.mode??e.mode,r={...t===e.mode?e.colors:yi(e.colors.accent,e.colors.accentContrast,t),...o.colors??{}},a=mr(r,t),{groupHeader:i,...l}=o.table??{},{badge:u,...c}=o.board??{},{badge:p,...d}=i??{};return{mode:t,colors:r,table:{...a.table,...l,groupHeader:{...a.table.groupHeader,...d,badge:pl(a.table.groupHeader.badge,p)}},board:{...a.board,...c,badge:pl(a.board.badge,u)},summary:{...a.summary,...o.summary??{}},chip:{...a.chip,...o.chip??{}},actionButton:{...a.actionButton,...o.actionButton??{}},tabs:{...a.tabs,...o.tabs??{}},avatar:{...a.avatar,...o.avatar??{}},calendar:{...a.calendar,...o.calendar??{}},card:{...a.card,...o.card??{}},timeline:{...a.timeline,...o.timeline??{}}}}function sp(e={}){let{mode:o="light",accent:t="#2563eb",accentContrast:n="#ffffff",input:r}=e;return Si(mr(yi(t,n,o),o),r)}function le(){let e=ap(),{theme:o}=yo(),t=e.palette.primary.main,n=e.palette.primary.contrastText,r=e.palette.mode==="dark"?"dark":"light";return ip(()=>Si(mr(yi(t,n,r),r),o),[t,n,r,o])}import{useCallback as rt,useEffect as Fl,useMemo as Hn,useRef as Af,useState as it}from"react";import{Box as Po,Divider as Lf,ListItemIcon as Nf,Menu as Hl,MenuItem as wr}from"@mui/material";import Ff from"@mui/icons-material/Add";import Hf from"@mui/icons-material/ArrowUpward";import Wf from"@mui/icons-material/ArrowDownward";import $f from"@mui/icons-material/KeyboardArrowDown";import Kf from"@mui/icons-material/KeyboardArrowRight";import Yi from"@mui/icons-material/Check";import Uf from"@mui/icons-material/FilterList";import Vf from"@mui/icons-material/InboxOutlined";import{Virtuoso as Wl}from"react-virtuoso";import Gf from"@ehfuse/overlay-scrollbar";import{DatePicker as Yf}from"@ehfuse/mui-datetime-picker";function cp(e){let o=String(e??"").trim().replace("T"," "),t=o.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3]),Number(t[4]??0),Number(t[5]??0),Number(t[6]??0)):new Date(o)}function qe(e,o="YYYY-MM-DD"){let t=typeof e=="string"?cp(e):e;if(!e||e===""||isNaN(t.getTime()))return"";let n=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),a=t.getDate().toString().padStart(2,"0"),i=n.toString().slice(-2);switch(o){case"YYYY-MM-DD":return`${n}-${r}-${a}`;case"YY.MM.DD":return`${i}.${r}.${a}`;case"MM/DD/YYYY":return`${r}/${a}/${n}`;case"DD.MM.YYYY":return`${a}.${r}.${n}`;case"YYYYMMDD":return`${n}${r}${a}`;default:return o.replace(/YYYY/g,n.toString()).replace(/YY/g,i).replace(/MM/g,r).replace(/DD/g,a)}}import{Box as fl}from"@mui/material";import{jsx as up,jsxs as dp}from"react/jsx-runtime";var mp={high:{label:"\uB192\uC74C",dot:"#e5484d",bgcolor:"#fdebec",color:"#c4554d"},medium:{label:"\uC911\uAC04",dot:"#2f80ed",bgcolor:"#e3eefb",color:"#1d4f91"},low:{label:"\uB0AE\uC74C",dot:"#9a9a97",bgcolor:"#efefed",color:"#57564f"}};function Eo({priority:e,small:o=!1,plain:t=!1}){let n=mp[e],r=le(),a=r.mode==="dark",i=t||e==="low";return dp(fl,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:o?.5:.75,px:i?0:o?.9:1.25,py:i?0:o?.25:.5,borderRadius:.75,fontSize:o?11.5:13,fontWeight:500,bgcolor:i?"transparent":a?ln(n.dot,r.chip.darkBgAlpha):n.bgcolor,color:i?a?r.chip.plainColor:n.color:a?r.chip.darkTextSource==="fg"?n.color:n.dot:n.color,whiteSpace:"nowrap"},children:[up(fl,{component:"span",sx:{width:o?6:8,height:o?6:8,borderRadius:"50%",bgcolor:n.dot}}),n.label]})}import{Menu as bp,MenuItem as hp}from"@mui/material";import kp from"@mui/icons-material/Check";function Uo(){return{}}var Bi=[{key:"always",name:"\uD56D\uC0C1"},{key:"often",name:"\uC790\uC8FC"},{key:"sometimes",name:"\uAC00\uB054"},{key:"once",name:"1\uD68C"},{key:"unable",name:"\uC7AC\uD604\uBD88\uAC00"}],Ci=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],vi=[{key:"fixed",name:"\uC218\uC815\uC644\uB8CC"},{key:"duplicate",name:"\uC911\uBCF5"},{key:"cannot_reproduce",name:"\uC7AC\uD604\uBD88\uAC00"},{key:"by_design",name:"\uC0AC\uC591\uB300\uB85C"},{key:"wont_fix",name:"\uC548 \uACE0\uCE68"}];function xl(e){return Bi.find(o=>o.key===e)?.name??""}function gl(e){return Ci.find(o=>o.key===e)?.name??""}function ur(e){return vi.find(o=>o.key===e)?.name??""}function Ii(e,o=new Date){if(!e.is_event)return!1;let t=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return!1;let n=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(n)){let a=new Date(`${t}T${n}:00`);return!Number.isNaN(a.getTime())&&a.getTime()<=o.getTime()}let r=new Date(`${t}T00:00:00`);return Number.isNaN(r.getTime())?!1:(r.setDate(r.getDate()+1),r.getTime()<=o.getTime())}function dr(e,o=new Date){return e.is_event?Ii(e,o):!!e.completed}var zt=[{key:"not_started",name:"\uC2DC\uC791\uC804",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"},{key:"in_progress",name:"\uC9C4\uD589\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"hold",name:"\uBCF4\uB958",bg:"#fbeee0",fg:"#8a5a2b",dot:"#d9730d"},{key:Mn,name:"\uD655\uC778\uC911",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:sr,name:"\uD655\uC778\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"}],qn=zt.filter(e=>e.key!==Mn&&e.key!==sr);function pr(e){return zt.find(o=>o.key===e)??zt[0]}var _i={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function fo(e){if(e.is_notice)return bl(e.status);if(e.is_bug&&e.completed){let o=ur(e.resolution)||"\uC644\uB8CC";return{..._i,name:o}}return e.completed?_i:e.is_bug?fp(e.status):pr(e.status)}var pp={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function An(e){return Ii(e)?pp:null}var zn=[{key:"notice_scheduled",name:"\uAC8C\uC2DC\uC608\uC815",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:"notice_active",name:"\uAC8C\uC2DC\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"notice_closed",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"}];function bl(e){return zn.find(o=>o.key===e)??zn[1]}var wi="__closed__",qt=[{key:"bug_received",name:"\uC811\uC218",bg:"#fdeaea",fg:"#9b2c2c",dot:"#e53e3e"},{key:"bug_confirmed",name:"\uD655\uC778\uC911",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:"bug_in_progress",name:"\uC9C4\uD589\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"bug_hold",name:"\uBCF4\uB958",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"}],PC=[...qt.filter(e=>e.key!=="bug_hold"),{key:wi,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...qt.filter(e=>e.key==="bug_hold")];function fp(e){return qt.find(o=>o.key===e)??qt[0]}function hl(e){return e.is_notice?zn:e.is_bug?qt:qn}function Di(e){return e.status===Mn}var xp={in_progress:0,[Mn]:1,not_started:2,hold:3,[sr]:4};function RC(e){return e.completed?9:xp[String(e.status??"")]??2}function kt(e,o){let t=new Map(o.map(r=>[r.key,r])),n=(e.label_keys??[]).map(r=>t.get(r)).filter(r=>!!r);if(e.is_event){let r=An({is_event:!0,due_date:String(e.due_date??""),event_time:e.event_time});return r?[r,...n]:n}return e.is_notice?String(e.status??"")==="notice_active"?n:[bl(e.status),...n]:e.is_bug?[fo({...e,is_notice:!1}),...n]:e.completed?[_i,...n]:[pr(e.status),...n]}function kl(e){return{bg:`${e}1f`,fg:e,dot:e}}function fr(e,o){return e.includes(o)?e.filter(t=>t!==o):[...e,o]}import{Box as xr}from"@mui/material";import{jsx as Ln,jsxs as gp}from"react/jsx-runtime";function we({option:e,small:o=!1}){let t=le(),n=t.mode==="dark",r=e.key==="not_started";return gp(xr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:o?.5:.75,px:r?0:o?.9:1.25,py:r?0:o?.25:.5,borderRadius:1.25,fontSize:o?11.5:13,fontWeight:500,bgcolor:r?"transparent":n?ln(e.dot,t.chip.darkBgAlpha):e.bg,color:r?n?t.chip.plainColor:e.fg:n?t.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[Ln(xr,{component:"span",sx:{width:o?6:8,height:o?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function FC({task:e,statusOptions:o,small:t=!1}){let n=kt(e,o);return n.length===0?null:Ln(xr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:n.map(r=>Ln(we,{option:r,small:t},r.key))})}function Tt({labelKeys:e,labelOptions:o}){let t=new Map(o.map(r=>[r.key,r])),n=e.map(r=>t.get(r)).filter(r=>!!r);return n.length===0?null:Ln(xr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:n.map(r=>Ln(we,{option:r,small:!0},r.key))})}import{jsx as Oi,jsxs as Tp}from"react/jsx-runtime";function gr({anchorEl:e,value:o,options:t=zt,onSelect:n,onClose:r}){let a=Uo();return Oi(bp,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,...a,children:t.map(i=>Tp(hp,{onClick:()=>{n(i.key),r()},sx:{fontSize:14,minWidth:150,gap:1},children:[Oi(we,{option:i}),o===i.key?Oi(kp,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},i.key))})}function br(e,o){if(o<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===o)return!0;let t=(e.target_account_seqs??[]).filter(n=>n>0);return t.length===0||t.includes(o)}return Mi(e)?!0:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o||(e.receiver_account_seqs??[]).includes(o)}function Mi(e){return e.is_notice||!e.is_open||e.completed||e.archived?!1:(e.manager_account_seq??0)===0}function hr(e,o){return o<=0?!1:Mi(e)}function kr(e,o){return o<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||Mi(e)?!1:(e.receiver_account_seqs??[]).includes(o)||(e.author_account_seq??0)===o}function Tl(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function ot(e,o){return o<=0?!1:e.is_notice?(e.author_account_seq??0)===o:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o||(e.receiver_account_seqs??[]).includes(o)}var XC=[119,121,141,143];var Ei=[{value:"due",label:"\uADF8\uB8F9 : \uB9C8\uAC10\uAE30\uD55C"},{value:"status",label:"\uADF8\uB8F9 : \uC0C1\uD0DC"},{value:"manager",label:"\uADF8\uB8F9 : \uCC45\uC784\uC790"},{value:"tab",label:"\uADF8\uB8F9 : \uD504\uB85C\uC81D\uD2B8"},{value:"none",label:"\uADF8\uB8F9 \uC5C6\uC74C"}];function yp(e){let o=new Date(`${e}T00:00:00`);return o.setDate(o.getDate()+(6-o.getDay())),qe(o)}var Sp=[{key:"overdue",label:"\uC9C0\uB0A8"},{key:"today",label:"\uC624\uB298"},{key:"this_week",label:"\uC774\uBC88 \uC8FC"},{key:"later",label:"\uC774\uD6C4"},{key:"no_due",label:"\uB9C8\uAC10 \uC5C6\uC74C"}];function Bp(e,o,t){let n=e.due_date.slice(0,10);return n?n<o?"overdue":n===o?"today":n<=t?"this_week":"later":"no_due"}function Pi(e,o,t,n=[],r=[],a="",i){let l=e.filter(s=>s.is_notice);if(l.length>0){let s=Pi(e.filter(m=>!m.is_notice),o,t,n,r,a,i);return[{key:"__notice__",label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:l},...s]}let u=new Map,c=(s,m)=>{let f=u.get(s);f?f.push(m):u.set(s,[m])},p;if(o==="due"){let s=yp(t);for(let m of e)c(Bp(m,t,s),m);p=Sp}else if(o==="status"){for(let s of e)c(pr(s.status).key,s);p=zt.map(s=>({key:s.key,label:s.name}))}else if(o==="tab"){for(let s of e)c(s.tab_key?.trim()||"__none__",s);p=[...n.filter(s=>!s.archived).map(s=>({key:s.key,label:s.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...n.filter(s=>s.archived).map(s=>({key:s.key,label:`${s.label} (\uBCF4\uAD00\uB428)`}))]}else if(i?.enabled){let s=Number(i.myAccountSeq??0),m=a.trim();for(let f of e){if(!(Number(f.manager_account_seq??0)>0||String(f.manager_name??"").trim()!=="")){c("__none__",f);continue}let b=s>0&&Number(f.manager_account_seq??0)===s||!!m&&String(f.manager_name??"").trim()===m;c(b?"__manager__":"__reference__",f)}p=[{key:"__manager__",label:"\uCC45\uC784\uC790"},{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__reference__",label:"\uCC38\uC870\uC790"}]}else{for(let b of e)c(String(b.manager_name??"").trim()||"__none__",b);let s=a.trim(),m=[...u.keys()].filter(b=>b!=="__none__").sort((b,h)=>{if(s){if(b===s)return-1;if(h===s)return 1}return b.localeCompare(h)}),f=!!s&&m.includes(s),B=m.filter(b=>b!==s);p=[...f?[{key:s,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},...B.map(b=>({key:b,label:b}))]}let d=[];for(let s of p){let m=u.get(s.key);!m||m.length===0||d.push({key:s.key,label:s.label,tasks:m})}return d}import Cp from"@mui/icons-material/NotesOutlined";import vp from"@mui/icons-material/AutorenewOutlined";import Ip from"@mui/icons-material/CalendarTodayOutlined";import _p from"@mui/icons-material/EventOutlined";import wp from"@mui/icons-material/PersonOutlineOutlined";import Sl from"@mui/icons-material/PeopleAltOutlined";import qi from"@mui/icons-material/CheckCircleOutlineOutlined";import Dp from"@mui/icons-material/FlagOutlined";import Op from"@mui/icons-material/AccessTimeOutlined";import Mp from"@mui/icons-material/StickyNote2Outlined";import Ep from"@mui/icons-material/ViewKanbanOutlined";import Pp from"@mui/icons-material/ConfirmationNumberOutlined";import{jsx as ao}from"react/jsx-runtime";var Rp={role_mark:"11px",completed:"44px",ticket_no:"100px",title:"minmax(220px, 1.8fr)",status:"110px",start_date:"110px",due_date:"120px",manager_name:"110px",receiver_names:"170px",targets:"170px",priority:"84px",ack:"104px",confirm:"100px",project:"150px",request:"100px",completed_time:"150px",note:"minmax(200px, 1.2fr)"};function Tr(e){return Ai(e).map(o=>Rp[o.id]).join(" ")}var zp={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:ao(Op,{sx:{fontSize:15}}),align:"center",sortable:!0},qp={id:"ticket_no",label:"\uD2F0\uCF13",icon:ao(Pp,{sx:{fontSize:15}}),align:"center"},Ap={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:ao(Ep,{sx:{fontSize:15}}),projectFilter:!0},Lp={id:"targets",label:"\uB300\uC0C1\uC790",icon:ao(Sl,{sx:{fontSize:15}})},yl={id:"priority",label:"\uC911\uC694\uB3C4",icon:ao(Dp,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},Np={id:"ack",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0},Fp={id:"confirm",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Ri(e){let o=e.findIndex(n=>n.id==="receiver_names"||n.id==="targets"),t=o>=0?o+1:e.findIndex(n=>n.id==="note");return t<0?[...e,yl]:[...e.slice(0,t),yl,...e.slice(t)]}function Ai(e){let{showProject:o=!1,showManager:t=!0,showActions:n=!0,showRequest:r=!0,notice:a=!1,bug:i=!1,confirmMode:l="none"}=e??{},u=d=>{if(!i)return d;let s=d.filter(B=>B.id!=="note"),m=s.findIndex(B=>B.id==="completed"),f=m>=0?m+1:0;return[...s.slice(0,f),qp,...s.slice(f)]};if(a)return u(Ri(zi.filter(d=>!["manager_name","receiver_names","request"].includes(d.id)).flatMap(d=>d.id==="due_date"?[d,Lp]:d.id==="note"?[Np,d]:[d])));let c=t?zi:zi.filter(d=>d.id!=="manager_name");if(n)r||(c=c.filter(d=>d.id!=="request"));else{c=c.filter(s=>s.id!=="request");let d=c.findIndex(s=>s.id==="note");c=[...c.slice(0,d),zp,...c.slice(d)]}if(l==="action"){let d=c.findIndex(s=>s.id==="note");c=[...c.slice(0,d),Fp,...c.slice(d)]}if(!o)return u(Ri(c));let p=c.findIndex(d=>d.id==="receiver_names");return u(Ri([...c.slice(0,p+1),Ap,...c.slice(p+1)]))}var zi=[{id:"role_mark",label:"",icon:null},{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:ao(Cp,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:ao(vp,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC790",icon:ao(Ip,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uAE30\uD55C",icon:ao(_p,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:ao(wp,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:ao(Sl,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:ao(Mp,{sx:{fontSize:15}})}];import{Button as Bl,ClickAwayListener as $p,Dialog as Kp,Paper as Up,Popper as Vp,Typography as Gp,Box as Yp}from"@mui/material";import{useMediaQuery as Hp,useTheme as Wp}from"@mui/material";function He(){let{isMobile:e}=yo(),o=Wp(),t=Hp(o.breakpoints.up("lg"));return e!==void 0?e:!t}import{Fragment as Xp,jsx as yt,jsxs as Cl}from"react/jsx-runtime";function jp({title:e,content:o,confirmText:t,cancelText:n,titleFontSize:r,actionFontSize:a,actionMinHeight:i,onCancel:l,onConfirm:u}){return Cl(Xp,{children:[yt(Gp,{component:"div",sx:{fontSize:r,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),o,Cl(Yp,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[yt(Bl,{size:"medium",variant:"outlined",color:"inherit",onClick:l,fullWidth:!0,sx:{fontSize:a,minHeight:i,fontWeight:700},children:n}),yt(Bl,{size:"medium",variant:"contained",color:"primary",onClick:u,fullWidth:!0,sx:{fontSize:a,minHeight:i,fontWeight:700},children:t})]})]})}function Ue({open:e,anchorEl:o,title:t="\uD655\uC778\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",content:n,confirmText:r="\uD655\uC778",cancelText:a="\uCDE8\uC18C",placement:i="top",minWidth:l=160,minHeight:u,titleFontSize:c=17,actionFontSize:p=16,actionMinHeight:d=44,zIndex:s=1300,onCancel:m,onConfirm:f}){let B=He(),b=yt(jp,{title:t,content:n,confirmText:r,cancelText:a,titleFontSize:c,actionFontSize:p,actionMinHeight:d,onCancel:m,onConfirm:f});return B?yt(Kp,{open:e,onClose:m,sx:{zIndex:s},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:b}):yt(Vp,{open:e,anchorEl:o,placement:i,sx:{zIndex:s},children:yt($p,{onClickAway:m,children:yt(Up,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:l,minHeight:u,justifyContent:u?"space-between":"flex-start"},onClick:h=>h.stopPropagation(),onMouseDown:h=>h.stopPropagation(),children:b})})})}import{useEffect as cf,useRef as mf,useState as El}from"react";import{Box as be,Button as uf,Checkbox as df,Tooltip as Fi}from"@mui/material";import pf from"@mui/icons-material/AlarmOutlined";import ff from"@mui/icons-material/CheckCircle";import xf from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as Qp,useState as vl}from"react";import{Avatar as Il}from"@mui/material";import Jp from"@mui/icons-material/PersonOutlineOutlined";import{jsx as Ni}from"react/jsx-runtime";var Li=new Set,_l=e=>e.startsWith("data:")||e.startsWith("blob:");function sn({src:e,avatarSx:o,iconFontSize:t=40}){let[n,r]=vl(()=>e?_l(e)||Li.has(e):!1),[a,i]=vl(!1),l={position:"relative",overflow:"hidden",borderRadius:"15px"},u=o?[l,...Array.isArray(o)?o:[o]]:l;return Qp(()=>{i(!1),r(e?_l(e)||Li.has(e):!1)},[e]),!e||a?Ni(Il,{sx:u,children:Ni(Jp,{sx:{fontSize:t}})}):Ni(Il,{src:e,imgProps:{onLoad:()=>{Li.add(e),r(!0)},onError:()=>i(!0),style:n?void 0:{opacity:0}},sx:u})}var Zp=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),yr=(e,o)=>{if(!o||!o.trim())return[{text:e,highlight:!1}];try{let t=Zp(o.trim()),n=new RegExp(`(${t})`,"gi");return e.split(n).map(a=>a.toLowerCase()===o.trim().toLowerCase()?{text:a,highlight:!0}:{text:a,highlight:!1}).filter(a=>a.text)}catch{return[{text:e,highlight:!1}]}};var ef=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Vo(e){let o=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(o))return"";let t=new Date(`${o}T00:00:00`);return Number.isNaN(t.getTime())?"":`${o.slice(2).replaceAll("-",".")} (${ef[t.getDay()]})`}function tt(e){let o=String(e??"").trim(),[t,n=""]=o.split(" "),r=Vo(t);return r?n?`${r} ${n.slice(0,5)}`:r:""}import{Box as wl,Tooltip as of}from"@mui/material";import{jsx as Sr}from"react/jsx-runtime";var cn=[{bgcolor:"#dbe7ff",color:"#24408e"},{bgcolor:"#ffe4d6",color:"#8a4b21"},{bgcolor:"#dcf2e3",color:"#1f6b3a"},{bgcolor:"#f3e3f7",color:"#6d2f80"},{bgcolor:"#fdf0cf",color:"#8a6d1d"},{bgcolor:"#e0f0f6",color:"#1d5f78"},{bgcolor:"#efe6dc",color:"#6b4a2b"}];function xo({names:e,size:o=22,ringFirst:t=!1,avatarSrcByName:n}){let r=le();return Sr(wl,{sx:{display:"flex",alignItems:"center"},children:e.map((a,i)=>{let l=t&&i===0;return Sr(of,{title:l?`\uCC45\uC784\uC790 \xB7 ${a}`:a,arrow:!0,children:Sr(wl,{sx:{ml:i===0?0:"-7px",zIndex:i,borderRadius:"50%",border:`2px solid ${l?r.avatar.ringColor:r.avatar.separatorColor}`,display:"inline-flex",...r.avatar.sx},children:Sr(sn,{src:n?.get(a)??"",avatarSx:{width:o,height:o,fontSize:Math.round(o/2),borderRadius:"50%",...cn[i%cn.length]},iconFontSize:Math.round(o*.6)})})},`${a}-${i}`)})})}import{Box as Dl,Button as Ml}from"@mui/material";import tf from"@mui/icons-material/CheckCircle";import{Fragment as af,jsx as Nn,jsxs as Ol}from"react/jsx-runtime";function nf(e){let o=e.mode==="dark";return{minWidth:0,width:"100%",px:1,py:.25,fontSize:13,color:e.table.rowColor,borderColor:e.colors.borderStrong,background:o?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:o?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function rf(e){return{minWidth:0,px:1.25,py:.25,fontSize:13,whiteSpace:"nowrap",color:e.actionButton.color,backgroundColor:e.actionButton.bg,backgroundImage:"none",boxShadow:"none","&:hover":{backgroundColor:e.actionButton.hoverBg,boxShadow:"none",filter:"brightness(1.08)"},...e.actionButton.sx}}function mn({onClick:e,children:o,fullWidth:t=!1,sx:n}){let r=le();return Nn(Ml,{size:"small",variant:"contained",color:"inherit",fullWidth:t,sx:[rf(r),...Array.isArray(n)?n:n?[n]:[]],onClick:a=>{a.stopPropagation(),e(a)},children:o})}function un({canConfirm:e,count:o,total:t,myConfirmed:n=!1,onConfirm:r,onShowList:a}){let i=le(),l=nf(i);return e?Nn(mn,{onClick:()=>r(),children:"\uD655\uC778"}):Ol(Ml,{size:"small",variant:"outlined",color:"inherit",sx:l,onClick:u=>{u.stopPropagation(),a(u.currentTarget)},children:[n?Nn(tf,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,Nn(Dl,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:t>0&&o>=t?"\uC644\uB8CC":Ol(af,{children:[o,Nn(Dl,{component:"span",sx:{mx:.15},children:"/"}),t]})})]})}import{SvgIcon as lf}from"@mui/material";import{jsx as Br,jsxs as sf}from"react/jsx-runtime";function Cr({sx:e,...o}){return sf(lf,{viewBox:"0 0 48 48",...o,sx:{fill:"none",...e},children:[Br("path",{d:"M24,6C13.23,6,4.5,12.93,4.5,21.46c0,5.39,3.5,10.13,8.79,12.89l-1.76,7.06a.46.46,0,0,0,.68.51L21,36.7a24,24,0,0,0,3,.2c10.77,0,19.5-6.91,19.5-15.44S34.77,6,24,6Z",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Br("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Br("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Br("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as Wi,jsx as U,jsxs as dn}from"react/jsx-runtime";function Pl(e){let o=String(e??"").trim();return o?o.slice(2,10).replaceAll("-","."):"-"}function Hi(e,o){let t=String(e??"").trim()||"-";return yr(t,o).map((n,r)=>U("span",{className:n.highlight?"font-semibold text-blue-600":void 0,children:n.text},`${n.text}-${r}`))}function vr({names:e,searchText:o,avatarSrcByName:t,emphasize:n=!1}){let r=e.filter(a=>a.trim());if(r.length===0)return null;if(r.length===1){let a=r[0]??"";return dn(Wi,{children:[U(sn,{src:t?.get(a)??"",avatarSx:{width:24,height:24,borderRadius:"50%",...cn[0]},iconFontSize:15}),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...n?{fontWeight:500,color:"#2f80ed"}:{}},children:Hi(a,o)})]})}return U(xo,{names:r,size:22,avatarSrcByName:t})}function Rl({display:e,summary:o,searchText:t,avatarSrcByName:n}){if(!e||e.kind==="everyone")return U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:r,individualNames:a}=e;if(r.length===0)return U(vr,{names:a,searchText:t,avatarSrcByName:n});let i=[...r,...a],l=i.join(", ");return i.length>2?U(Fi,{title:l,arrow:!0,children:U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${i[0]}, ${i[1]} \uC678 ${i.length-2}\uBA85`})}):U(Fi,{title:l,arrow:!0,children:dn(be,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[U(be,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.join(", ")+(a.length>0?",":"")}),a.length>0?U(vr,{names:a,searchText:t,avatarSrcByName:n}):null]})})}function zl({task:e,statusOptions:o,avatarSrcByName:t,searchText:n,myAccountSeq:r=0,todayStr:a,showProject:i=!1,showManager:l=!0,showActions:u=!0,showRequest:c=!0,confirmMode:p="none",bugMode:d=!1,confirmInfo:s,onConfirmTask:m,projectLabel:f="",projectIcon:B="",onProjectClick:b,onRequestToggleCompleted:h,onDateClick:x,onChangeNote:T,onMemberClick:g,onClaimClick:v,onVolunteerClick:C,onStatusClick:I,onOpenDetail:M,onTaskContextMenu:J,hideBottomBorder:E=!1,completeLocked:X=!1,unread:w=!1,notice:y=!1,noticeReadOnly:H=!1,noteLocked:N=!1,targetSummary:$="",targetDisplay:P,onArchiveTask:te,ackInfo:de,onAckConfirm:A,onAckListClick:W,onPriorityClick:K}){let[F,O]=El(!1),[L,Q]=El(""),Z=mf(null);cf(()=>{if(!F)return;let V=Ee=>{let Xe=Z.current;Xe&&(Ee.target instanceof Node&&Xe.contains(Ee.target)||Xe.blur())};return document.addEventListener("mousedown",V,!0),document.addEventListener("touchstart",V,!0),()=>{document.removeEventListener("mousedown",V,!0),document.removeEventListener("touchstart",V,!0)}},[F]);let ue=[e.manager_account_seq??0,...e.receiver_account_seqs??[]].some(V=>V>0&&V!==(e.author_account_seq??0)),ee=H,ye=r>0&&!e.is_notice&&!e.is_event&&(e.manager_account_seq??0)===r,R=ee||!!e.is_notice,k=le(),ne=!!v&&hr(e,r),re=!!C&&kr(e,r),ve=R&&!Tl(e),$e=e.is_notice?U(un,{canConfirm:!!de?.canAck,count:de?.count??0,total:de?.total??0,myConfirmed:!!de?.acked,onConfirm:()=>A?.(e),onShowList:V=>W?.(e,V)}):null,Ie=!e.is_notice&&!!e.due_date&&e.due_date.slice(0,10)<=a?"#e5484d":"#2f80ed";return dn(be,{onContextMenu:V=>J(e,V),sx:{display:"grid",gridTemplateColumns:Tr({showProject:i,showManager:l,showActions:u,showRequest:c,notice:y,confirmMode:p,bug:d}),minHeight:48,fontSize:15,bgcolor:k.table.rowBg,color:k.table.rowColor,borderBottom:E?"none":`1px solid ${k.table.rowBorderColor}`,"&:hover":{bgcolor:k.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${k.table.rowBorderColor}`},"& > .cell:first-of-type":{px:0,borderRight:"none"},"& > .cell:nth-of-type(2)":{pl:1.5,pr:2},"& > .cell:last-child":{borderRight:"none",pr:2}},children:[U(be,{className:"cell",children:ye?U(be,{sx:{width:3,alignSelf:"stretch",my:.5,ml:.5,bgcolor:"#2f80ed",borderRadius:1.5}}):null}),U(be,{className:"cell",sx:{justifyContent:"center"},children:!ee&&!X?U(Fi,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${tt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:U(df,{checked:e.completed,icon:U(xf,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:U(ff,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:V=>V.stopPropagation(),onChange:(V,Ee)=>h({anchorEl:V.currentTarget,task:e,nextCompleted:Ee}),sx:{p:.5}})}):null}),d?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:e.ticket_no||"-"}):null,dn(be,{className:"cell",onClick:()=>M(e),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}},children:[(()=>{let V=Oe(e.icon||(e.is_notice?Mo:_e));if(!V)return null;let Ee=e.icon_color||(e.is_notice?"#e5484d":"#1e3a8a");return U(V,{sx:{fontSize:18,flexShrink:0,color:Ee}})})(),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:e.completed?400:k.table.rowTitleFontWeight,color:e.completed?k.colors.textMuted:k.table.rowTitleColor,textDecoration:e.completed?"line-through":"none"},children:Hi(e.title,n)}),(e.comment_count??e.comments?.length??0)>0?U(Cr,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,U(be,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:U(Tt,{labelKeys:e.label_keys??[],labelOptions:o})}),w?U(be,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,dr(e)&&!e.archived&&!ee&&te?U(uf,{size:"small",variant:"outlined",color:"inherit",sx:{ml:"auto",flexShrink:0,minWidth:0,px:1.25,py:.25,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},onClick:V=>{V.stopPropagation(),te(e)},children:"\uBCF4\uAD00"}):null]}),(()=>{let V=ee||!!e.is_event||!!e.completed;return U(be,{className:"cell",onClick:V?void 0:Ee=>I(e,Ee.currentTarget),sx:{py:.5,justifyContent:"center",...V?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:e.is_event?(()=>{let Ee=An(e);return Ee?U(we,{option:Ee}):null})():U(we,{option:fo(e)})})})(),U(be,{className:"cell",onClick:ee?void 0:V=>x(e,"start_date",V.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:Pl(e.start_date)}),U(be,{className:"cell",onClick:ee?void 0:V=>x(e,"due_date",V.currentTarget),sx:{justifyContent:"center",gap:.5,color:Ie,fontWeight:500,whiteSpace:"nowrap",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:e.due_date?dn(Wi,{children:[Pl(e.due_date),U(pf,{sx:{fontSize:15}})]}):null}),y?U(be,{className:"cell",onClick:ee?void 0:()=>g(e,"targets"),sx:{gap:.75,...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Rl,{display:P,summary:$,searchText:n,avatarSrcByName:t})}):null,!y&&e.is_notice?U(be,{className:"cell",onClick:ee?void 0:()=>g(e,"targets"),sx:{gridColumn:l?"span 2":"auto",gap:.75,...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Rl,{display:P,summary:$,searchText:n,avatarSrcByName:t})}):null,!y&&!e.is_notice&&!e.is_event&&l?U(be,{className:"cell",onClick:ve?void 0:()=>g(e,"manager"),sx:{gap:.75,...ne||re?{justifyContent:"center"}:{},...ve?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:ne?U(mn,{onClick:V=>v?.(e,V.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):re?U(mn,{onClick:V=>C?.(e,V.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):U(vr,{names:e.manager_name?[e.manager_name]:[],searchText:n,avatarSrcByName:t,emphasize:ye})}):null,!y&&!e.is_notice?U(be,{className:"cell",onClick:R?void 0:()=>g(e,"receivers"),sx:{gridColumn:e.is_event&&l?"span 2":"auto",gap:.75,...R?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(vr,{names:e.receiver_names,searchText:n,avatarSrcByName:t})}):null,U(be,{className:"cell",onClick:ee?void 0:V=>K?.(e,V.currentTarget),sx:{py:.5,justifyContent:"center",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Eo,{priority:e.priority,plain:!0})}),i?U(be,{className:"cell",onClick:ee?void 0:V=>b?.(e,V.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:f?dn(Wi,{children:[(()=>{let V=Oe(B);return V?U(V,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f})]}):null}):null,y?U(be,{className:"cell",sx:{justifyContent:"center"},children:$e}):null,!y&&u&&c?U(be,{className:"cell",sx:{justifyContent:"center"},children:e.is_notice?$e:ue?U(un,{canConfirm:!!s?.canConfirm,count:s?.count??0,total:s?.total??0,myConfirmed:!!s?.myTime,onConfirm:()=>m?.(e),onShowList:V=>W?.(e,V)}):null}):null,!y&&p==="action"?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:k.table.rowSubColor},children:e.is_notice?$e:s&&s.total>0?U(un,{canConfirm:!!s.canConfirm,count:s.count,total:s.total,myConfirmed:!!s.myTime,onConfirm:()=>m?.(e),onShowList:V=>W?.(e,V)}):"-"}):null,!y&&!u?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:k.table.rowSubColor},children:e.completed_time||"-"}):null,d?null:U(be,{className:"cell",onClick:()=>{!N&&!F&&(Q(e.note),O(!0))},sx:{color:"#6f6f6c",cursor:N?"default":"text"},children:F?U(be,{component:"input",ref:Z,autoFocus:!0,spellCheck:!1,value:L,onChange:V=>Q(V.target.value),onBlur:()=>{O(!1),L.trim()!==e.note&&T(e.seq,L)},onKeyDown:V=>{V.key==="Enter"&&V.target.blur(),V.key==="Escape"&&(Q(e.note),O(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:k.table.rowTitleColor,caretColor:k.table.rowTitleColor,p:0,m:0}}):U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.note?Hi(e.note,n):""})})]})}import{useState as gf}from"react";import{Box as Fn,Button as ql,ButtonBase as bf,Dialog as hf,Divider as Al,Menu as kf,MenuItem as Tf,Popover as yf}from"@mui/material";import Sf from"@mui/icons-material/ChevronRight";import Bf from"@mui/icons-material/Check";import Cf from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as vf}from"@ehfuse/mui-datetime-picker";import{Fragment as wf,jsx as Co,jsxs as At}from"react/jsx-runtime";var If=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],Ll=[{value:"day_before",label:"1\uC77C \uC804"},{value:"two_days_before",label:"2\uC77C \uC804"},{value:"three_days_before",label:"3\uC77C \uC804"},{value:"week_before",label:"1\uC8FC\uC77C \uC804"}],Nl=[{value:"none",label:"\uC5C6\uC74C"},...If,...Ll];function $i(e){return e?Nl:[{value:"none",label:"\uC5C6\uC74C"},...Ll]}function Ki(e){return e==="same_day"?"\uB2F9\uC77C":Nl.find(o=>o.value===e)?.label??"\uC5C6\uC74C"}function _f(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function St({anchorEl:e,open:o,date:t,reminder:n,hideReminder:r=!1,centered:a=!1,onClose:i,onDateChange:l,onReminderChange:u}){let[c,p]=gf(null),d=Uo(),s=At(Fn,{sx:{width:300,maxWidth:"100%"},children:[Co(Fn,{sx:{height:320},children:Co(vf,{selectedDate:_f(t),onSelect:m=>{l(qe(m)),i()},onClose:i,showFooter:!1,autoApply:!0})}),r?null:At(wf,{children:[Co(Al,{sx:{borderColor:"#e6e6e3"}}),At(bf,{onClick:m=>p(m.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[At(Fn,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Co(Cf,{sx:{fontSize:17,color:"#9a9a97"}}),"\uB9AC\uB9C8\uC778\uB354"]}),At(Fn,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[Ki(n),Co(Sf,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Co(kf,{transitionDuration:0,anchorEl:c,open:!!c,onClose:()=>p(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...d,children:$i(!1).map(m=>At(Tf,{selected:m.value===n,onClick:()=>{u(m.value),p(null)},sx:{fontSize:14,minWidth:120,justifyContent:"space-between",gap:1},children:[m.label,m.value===n?Co(Bf,{sx:{fontSize:16,color:"#2f80ed"}}):null]},m.value))})]}),Co(Al,{sx:{borderColor:"#e6e6e3"}}),At(Fn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[Co(ql,{size:"small",onClick:()=>{l(qe(new Date)),i()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),Co(ql,{size:"small",onClick:i,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return a?Co(hf,{open:o,onClose:i,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:s}):Co(yf,{transitionDuration:0,open:o,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{borderRadius:2,boxShadow:"0 8px 24px rgba(0,0,0,0.14)"}}},children:s})}import{useEffect as Mf,useState as Vi}from"react";import{Box as Lt,Button as Ef,Switch as Pf}from"@mui/material";import{FormDialog as Rf}from"@ehfuse/mui-form-dialog";import{ClearTextField as zf}from"@ehfuse/mui-form-controls";import{ErrorAlert as qf}from"@ehfuse/alerts";import{Box as Df,ButtonBase as Of}from"@mui/material";import{jsx as Ui}from"react/jsx-runtime";function Ir({value:e,onChange:o}){return Ui(Df,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:bi.map(({key:t,Icon:n})=>{let r=t===e;return Ui(Of,{onClick:()=>o(t),sx:{display:"flex",alignItems:"center",justifyContent:"center",height:40,minWidth:40,borderRadius:1,border:r?"2px solid #2563eb":"1px solid #dedddb",bgcolor:r?"#eef4ff":"#fff",color:r?"#1e3a8a":"#787774","&:hover":{bgcolor:r?"#eef4ff":"#f4f4f2"}},children:Ui(n,{sx:{fontSize:20}})},t)})})}import{jsx as nt,jsxs as Gi}from"react/jsx-runtime";function _r({open:e,title:o="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:t="",initialIcon:n=gi,confirmText:r="\uCD94\uAC00",initialUseSprints:a=!1,onClose:i,onSubmit:l}){let[u,c]=Vi(""),[p,d]=Vi(gi),[s,m]=Vi(!1);Mf(()=>{e&&(c(t),d(n),m(a))},[e]);let f=()=>{let b=u.trim();if(!b){qf("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}l(b,p,s),i()};return nt(Rf,{open:e,onClose:i,maxWidth:"xs",title:o,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:Gi(Lt,{children:[nt(zf,{label:"\uD504\uB85C\uC81D\uD2B8 \uC774\uB984",value:u,onChange:b=>c(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),f())},fullWidth:!0,autoFocus:!0,sx:{mt:.5}}),nt(Lt,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),nt(Lt,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:nt(Ir,{value:p,onChange:d})}),Gi(Lt,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[Gi(Lt,{children:[nt(Lt,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),nt(Lt,{sx:{fontSize:12.5,color:"#9a9a97"},children:"\uBAA9\uD45C \uBC30\uC815\uC73C\uB85C \uBC18\uBCF5 \uC8FC\uAE30\uB97C \uAD00\uB9AC\uD569\uB2C8\uB2E4(\uAC1C\uBC1C\uD300\uC6A9)"})]}),nt(Pf,{checked:s,onChange:(b,h)=>m(h)})]})]})}],actions:{showCancelButton:!0,right:nt(Ef,{variant:"contained",onClick:f,children:r})}})}import{jsx as he,jsxs as Go}from"react/jsx-runtime";function jf(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function $l({tasks:e,statusOptions:o,avatarSrcByName:t,searchText:n,todayStr:r,sortBy:a,sortDirection:i,onSort:l,onRequestReply:u,onToggleCompleted:c,onChangeTaskDate:p,onChangeTaskReminder:d,groupBy:s,collapsedGroupKeys:m,customTabs:f,onToggleGroup:B,renderGroupSummary:b,renderGroupTitleSummary:h,onChangeTaskProject:x,onAddProject:T,onChangeNote:g,onMemberClick:v,onClaimTask:C,onChangeTaskStatus:I,onOpenDetail:M,onTaskContextMenu:J,onMemberFilterClick:E,activeMemberFilters:X=[],onStatusFilterClick:w,statusFilterActive:y=!1,onAckFilterClick:H,ackFilterActive:N=!1,onProjectFilterClick:$,projectFilterActive:P=!1,onPriorityFilterClick:te,priorityFilterActive:de=!1,columns:A,getConfirmInfo:W,onConfirmTask:K,myAccountSeq:F=0,currentUserName:O="",groupManagerByMyRole:L=!1,allowManagerVolunteer:Q=!0,noticeAdmin:Z=!1,getTargetSummary:ue,getTargetDisplay:ee,onArchiveTask:ye,isTaskUnread:R,getAckInfo:k,onAckConfirm:ne,onAckListClick:re,onChangeTaskPriority:ve,onEndReached:$e}){let se=le(),Ie=Hn(()=>({showManager:!0,showActions:!0,showRequest:!0,...A}),[A]),V=Ie.showManager??!0,Ee=Ie.showActions??!0,Xe=Ie.showRequest??!0,bt=Ie.confirmMode??"none",Wo=Ie.notice??!1,Zo=Ie.bug??!1,$o=s!=="none",Pt=Hn(()=>$o?Pi(e,s,r,f,o,O,{enabled:L,myAccountSeq:F}):[],[$o,e,s,r,f,o,O,L,F]),rn=Hn(()=>new Set(m),[m]),Oo=Ie.showProject??(!Wo&&s!=="tab"),no=Hn(()=>Ai({...Ie,showProject:Oo}),[Ie,Oo]),mo=Tr({...Ie,showProject:Oo}),uo=Hn(()=>{let S=new Map;for(let G of f)S.set(G.key,{label:G.archived?`${G.label} (\uBCF4\uAD00\uB428)`:G.label,icon:G.icon});return S},[f]),Rt=Af(null),[pe,D]=it(null),z=e.length>0;Fl(()=>{if(!z){D(null);return}let S=window.requestAnimationFrame(()=>{D(Rt.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(S)},[z]);let[ie,ce]=it(!1);Fl(()=>{if(!pe)return;let S=()=>ce(pe.scrollHeight>pe.clientHeight);S();let G=new ResizeObserver(S);return G.observe(pe),pe.firstElementChild&&G.observe(pe.firstElementChild),()=>G.disconnect()},[pe]);let[ae,fe]=it(null),[_,ro]=it(null),[Qe,io]=it(null),[Pe,ht]=it(null),[_n,wn]=it(!1),[an,nr]=it(null),Dn=an?e.find(S=>S.seq===an.taskSeq)??null:null,[rr,pi]=it(null),ir=rr?e.find(S=>S.seq===rr.taskSeq)??null:null,Qa=rt((S,G)=>{pi({anchorEl:G,taskSeq:S.seq})},[]),Ja=rt((S,G)=>{nr({anchorEl:G,taskSeq:S.seq})},[]),um=rt((S,G)=>{if(!G)return;l(S,a===S&&i==="asc"?"desc":"asc")},[l,a,i]),Za=rt((S,G,Fe)=>{fe({anchorEl:Fe,taskSeq:S.seq,field:G,date:S[G],reminder:S.reminder,completed:S.completed})},[]),el=rt((S,G)=>{ht({anchorEl:G,task:S})},[]),dm=rt(S=>{ae&&(p(ae.taskSeq,ae.field,qe(S)),fe(null))},[ae,p]),pm=rt(S=>{ae&&(p(ae.taskSeq,ae.field,S),fe(G=>G&&{...G,date:S}))},[ae,p]),fm=rt(S=>{ae&&(d(ae.taskSeq,S),fe(G=>G&&{...G,reminder:S}))},[ae,d]),ol=rt((S,G=!1)=>he(zl,{hideBottomBorder:G,task:S,statusOptions:o,avatarSrcByName:t,searchText:n,myAccountSeq:F,todayStr:r,showProject:Oo,showManager:V,showActions:Ee,showRequest:Xe,confirmMode:bt,confirmInfo:S.is_notice?void 0:W?.(S),onConfirmTask:K,projectLabel:uo.get(S.tab_key??"")?.label??"",projectIcon:uo.get(S.tab_key??"")?.icon??"",onProjectClick:el,onRequestReply:u,onRequestToggleCompleted:ro,onDateClick:Za,onChangeNote:g,onMemberClick:v,onClaimClick:C?(Fe,Ko)=>io({anchorEl:Ko,taskSeq:Fe.seq,title:Fe.title,kind:"claim"}):void 0,onVolunteerClick:Q?(Fe,Ko)=>io({anchorEl:Ko,taskSeq:Fe.seq,title:Fe.title,kind:"volunteer"}):void 0,onStatusClick:Ja,onOpenDetail:M,onTaskContextMenu:J,notice:Wo,bugMode:Zo,noticeReadOnly:!ot(S,F),noteLocked:S.is_notice?!br(S,F):!ot(S,F),completeLocked:S.is_event?!0:S.is_notice?(S.author_account_seq??0)!==F:(S.author_account_seq??0)!==F&&(S.manager_account_seq??0)!==F,targetSummary:S.is_notice?ue?.(S):void 0,targetDisplay:S.is_notice?ee?.(S):void 0,onArchiveTask:ye,unread:R?.(S)??!1,ackInfo:S.is_notice?k?.(S):void 0,onAckConfirm:ne,onAckListClick:re,onPriorityClick:Qa},S.seq),[n,o,t,r,Oo,V,Ee,Xe,bt,W,K,Wo,Zo,F,Z,ue,ee,ye,R,k,ne,re,Qa,uo,el,u,Za,g,v,C,Ja,M,J]);return Go(Po,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${se.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:se.table.bg,color:se.table.rowColor,...se.table.sx},children:[he(Po,{sx:{display:"grid",gridTemplateColumns:mo,borderBottom:`1px solid ${se.table.borderColor}`,flexShrink:0,bgcolor:se.table.headerBg,"& > *":{borderRight:`1px solid ${se.table.rowBorderColor}`},"& > *:first-of-type":{px:0,borderRight:"none"},"& > *:nth-of-type(2)":{pl:1.5,pr:2},"& > *:last-child":{borderRight:"none",pr:2},...se.table.headerSx},children:no.map(S=>{let G=a===S.id,Fe=!!S.memberFilter,Ko=Fe&&X.includes(S.memberFilter),ar=Fe||!!S.statusFilter||!!S.ackFilter||!!S.projectFilter||!!S.priorityFilter,lr=Ko||!!S.statusFilter&&y||!!S.ackFilter&&N||!!S.projectFilter&&P||!!S.priorityFilter&&de;return Go(Po,{onClick:On=>{S.memberFilter?E(S.memberFilter,On.currentTarget):S.statusFilter?w(On.currentTarget):S.ackFilter?H?.(On.currentTarget):S.projectFilter?$?.(On.currentTarget):S.priorityFilter?te?.(On.currentTarget):um(S.id,S.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:S.align==="center"?"center":"flex-start",gap:.5,px:1,py:1,minWidth:0,fontSize:se.table.headerFontSize,color:S.sortable||ar?se.table.headerActiveColor:se.table.headerColor,whiteSpace:"nowrap",cursor:S.sortable||ar?"pointer":"default",userSelect:"none",...G?{color:se.table.headerFilteredColor}:{},...lr?{color:se.table.headerFilteredColor,fontWeight:600}:{}},children:[S.icon,S.label,lr?he(Uf,{sx:{fontSize:14}}):null,G?i==="asc"?he(Hf,{sx:{fontSize:13}}):he(Wf,{sx:{fontSize:13}}):null]},S.id)})}),e.length===0?he(Po,{sx:{py:8,textAlign:"center",color:se.table.emptyColor,fontSize:14},children:Zo?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Wo?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):he(Po,{sx:{flex:1,minHeight:0},children:he(Gf,{ref:Rt,style:{height:"100%"},thumb:{width:8},children:pe?$o?he(Wl,{customScrollParent:pe,data:Pt,computeItemKey:(S,G)=>G.key,itemContent:(S,G)=>{let Fe=rn.has(G.key),Ko=S===Pt.length-1;return Go(Po,{children:[Go(Po,{onClick:()=>B(G.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:se.table.groupHeader.minHeight,bgcolor:se.table.groupHeader.bg,borderBottom:`1px solid ${se.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:se.table.groupHeader.hoverBg},...se.table.groupHeader.sx},children:[Fe?he(Kf,{sx:{fontSize:20,color:se.colors.textMuted}}):he($f,{sx:{fontSize:20,color:se.colors.textMuted}}),he(Po,{component:"span",sx:{fontSize:se.table.groupHeader.labelFontSize,fontWeight:se.table.groupHeader.labelFontWeight,color:se.table.groupHeader.labelColor},children:G.label}),h?he(Po,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:h(G.key,G.tasks)}):null,Go(Po,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[b?b(G.key,G.tasks):null,he(Po,{component:"span",sx:{flexShrink:0,width:se.table.groupHeader.badge.width,py:.1,borderRadius:`${se.table.groupHeader.badge.borderRadius}px`,bgcolor:se.table.groupHeader.badge.bg,border:se.table.groupHeader.badge.border,color:se.table.groupHeader.badge.color,fontSize:se.table.groupHeader.badge.fontSize,fontWeight:se.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:G.tasks.length})]})]}),Fe?null:G.tasks.map((ar,lr)=>ol(ar,Ko&&lr===G.tasks.length-1&&ie))]})}}):he(Wl,{customScrollParent:pe,data:e,computeItemKey:(S,G)=>G.seq,endReached:$e,itemContent:(S,G)=>ol(G,S===e.length-1&&ie)}):null})}),he(gr,{anchorEl:an?.anchorEl??null,value:Dn?.status??"",options:Dn?hl(Dn):qn,onSelect:S=>{Dn&&I(Dn.seq,S)},onClose:()=>nr(null)}),he(Hl,{transitionDuration:0,anchorEl:rr?.anchorEl??null,open:!!rr,onClose:()=>pi(null),children:["high","medium","low"].map(S=>Go(wr,{selected:ir?.priority===S,onClick:()=>{ir&&ve?.(ir.seq,S),pi(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[he(Eo,{priority:S,small:!0}),ir?.priority===S?he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},S))}),Go(Hl,{anchorEl:Pe?.anchorEl??null,open:!!Pe,onClose:()=>ht(null),transitionDuration:0,children:[Go(wr,{selected:!Pe?.task.tab_key,onClick:()=>{Pe&&x(Pe.task.seq,""),ht(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[he(Vf,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",Pe?.task.tab_key?null:he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),f.filter(S=>!S.archived).map(S=>{let G=Oe(S.icon),Fe=Pe?.task.tab_key===S.key;return Go(wr,{selected:Fe,onClick:()=>{Pe&&x(Pe.task.seq,S.key),ht(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[G?he(G,{sx:{fontSize:17,color:"#1e3a8a"}}):null,S.label,Fe?he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},S.key)}),T?[he(Lf,{},"add-project-divider"),Go(wr,{onClick:()=>wn(!0),sx:{fontSize:14,color:"#787774"},children:[he(Nf,{children:he(Ff,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),T?he(_r,{open:_n,onClose:()=>wn(!1),onSubmit:(S,G)=>{let Fe=Pe?.task.seq??0;(async()=>{let Ko=await T(S,G);Ko&&Fe&&x(Fe,Ko)})(),ht(null)}}):null,he(Yf,{anchorEl:ae?.anchorEl??null,open:!!ae&&ae?.field==="start_date",onClose:()=>fe(null),selectedDate:jf(ae?.date??""),onDateChange:dm}),he(St,{anchorEl:ae?.anchorEl??null,open:!!ae&&ae?.field==="due_date",date:ae?.date??"",reminder:ae?.reminder??"none",hideReminder:!!ae?.completed,onClose:()=>fe(null),onDateChange:pm,onReminderChange:fm}),he(Ue,{open:!!Qe,anchorEl:Qe?.anchorEl??null,title:Qe?.kind==="claim"?"\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:()=>io(null),onConfirm:()=>{Qe&&C?.(Qe.taskSeq),io(null)}}),he(Ue,{open:!!_,anchorEl:_?.anchorEl??null,title:_?.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:_?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ro(null),onConfirm:()=>{_&&c(_.task,_.nextCompleted),ro(null)}})]})}import{useCallback as lt,useMemo as st,useRef as xx,useState as ct}from"react";import{Box as Se,ButtonBase as ns,Divider as Gl,IconButton as Yl,Menu as jl,MenuItem as Ct}from"@mui/material";import Ji from"@mui/icons-material/Add";import Xl from"@mui/icons-material/MoreVert";import Ql from"@mui/icons-material/EditOutlined";import Jl from"@mui/icons-material/ArchiveOutlined";import Zl from"@mui/icons-material/UnarchiveOutlined";import gx from"@mui/icons-material/NotificationsOutlined";import bx from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as Xf}from"@mui/material";import{jsx as Kl}from"react/jsx-runtime";function at({sx:e,...o}){return Kl(Xf,{viewBox:"0 0 24 24",...o,sx:{fill:"none",...e},children:Kl("path",{d:"M4 6H20M16 6L15.7294 5.18807C15.4671 4.40125 15.3359 4.00784 15.0927 3.71698C14.8779 3.46013 14.6021 3.26132 14.2905 3.13878C13.9376 3 13.523 3 12.6936 3H11.3064C10.477 3 10.0624 3 9.70951 3.13878C9.39792 3.26132 9.12208 3.46013 8.90729 3.71698C8.66405 4.00784 8.53292 4.40125 8.27064 5.18807L8 6M18 6V16.2C18 17.8802 18 18.7202 17.673 19.362C17.3854 19.9265 16.9265 20.3854 16.362 20.673C15.7202 21 14.8802 21 13.2 21H10.8C9.11984 21 8.27976 21 7.63803 20.673C7.07354 20.3854 6.6146 19.9265 6.32698 19.362C6 18.7202 6 17.8802 6 16.2V6M14 10V17M10 10V17",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}import{DndContext as hx,DragOverlay as kx,PointerSensor as Tx,pointerWithin as yx,rectIntersection as Sx,useDroppable as Bx,useSensor as Cx,useSensors as vx}from"@dnd-kit/core";import{SortableContext as rs,arrayMove as es,horizontalListSortingStrategy as Ix,useSortable as _x,verticalListSortingStrategy as wx}from"@dnd-kit/sortable";import{CSS as Dx}from"@dnd-kit/utilities";import Zi from"@ehfuse/overlay-scrollbar";import{useState as ox}from"react";import{Box as Bt,ButtonBase as tx,Checkbox as nx,Tooltip as rx}from"@mui/material";import ix from"@mui/icons-material/AlarmOutlined";import ax from"@mui/icons-material/TimerOutlined";import{Box as Nt,Button as Qf,Popover as Jf}from"@mui/material";import Zf from"@mui/icons-material/CheckCircle";import{jsx as Ft,jsxs as Dr}from"react/jsx-runtime";function Or({anchorEl:e,open:o,acks:t,total:n,avatarSrcByName:r,onRequestConfirm:a,onClose:i}){let l=He();return Ft(Jf,{open:o&&(l||!!e),anchorEl:e,onClose:i,transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...l?{anchorReference:"none",slotProps:{paper:{sx:{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxWidth:"calc(100vw - 48px)",maxHeight:"70vh",borderRadius:3}}}}:{},children:Dr(Nt,{sx:{minWidth:240,maxWidth:320,py:1},children:[Dr(Nt,{sx:{px:2,pb:.75,fontSize:po(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",t.length,"/",n]}),t.length===0?Ft(Nt,{sx:{px:2,py:1.5,fontSize:po(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>Dr(Nt,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Ft(xo,{names:[u.name],size:22,avatarSrcByName:r}),Ft(Nt,{component:"span",sx:{fontSize:po(14),color:"#37352f",whiteSpace:"nowrap"},children:u.name}),Ft(Nt,{component:"span",sx:{ml:"auto",fontSize:po(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:tt(u.time)}),Ft(Zf,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},u.account_seq)),a?Ft(Nt,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:Dr(Qf,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{a(),i()},sx:{fontSize:po(13)},children:["\uD655\uC778 \uC694\uCCAD (",n-t.length,"\uBA85 \uBBF8\uD655\uC778)"]})}):null]})})}function ex(e){let o=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(t=>t>0&&t!==o))]}function Ul(e,o){let t=ex(e),n=e.acks??[],r=o>0?n.find(a=>a.account_seq===o):void 0;return{myTime:r?.time??"",canConfirm:o>0&&t.includes(o)&&!r,count:n.filter(a=>t.includes(a.account_seq)).length,total:t.length}}function h1(e){let o=String(e??"").trim();return o?o.slice(5,16).replaceAll("-","."):""}import{Fragment as cx,jsx as go,jsxs as Ht}from"react/jsx-runtime";function pn(e){return{border:`1px solid ${e.borderColor}`,borderRadius:1,p:1,bgcolor:e.bg,display:"flex",flexDirection:"column",gap:.75,boxShadow:"0 1px 2px rgba(0,0,0,0.04)",...e.sx}}function lx(e){let o=e.trim();return o?o.slice(2,10).replaceAll("-","."):"-"}function sx(){let e=new Date,o=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${o}-${t}`}function Wt({task:e,statusOptions:o,showDueDate:t=!1,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:a,titleFontSize:i=13}){let l=le(),c=!!e.due_date&&e.due_date.slice(0,10)<=sx()?l.colors.danger:l.colors.accentOnSurface,p=Ul(e,0),[d,s]=ox(null),m=kt(e,o),f=new Set(e.label_keys??[]),B=m.filter(h=>!f.has(h.key)),b=m.filter(h=>f.has(h.key));return Ht(cx,{children:[Ht(Bt,{sx:{display:"flex",alignItems:"center",gap:.5},children:[go(nx,{size:"small",checked:e.completed,onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),onChange:(h,x)=>n?.({anchorEl:h.currentTarget,taskSeq:e.seq,nextCompleted:x}),sx:{p:0}}),go(rx,{title:e.title,arrow:!0,enterDelay:300,children:Ht(Bt,{sx:{flex:1,minWidth:0,pr:3.5,fontSize:i,fontWeight:l.mode==="dark"||e.completed?400:500,color:l.mode==="dark"?l.colors.textStrong:l.colors.textPrimary,lineHeight:1.35,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})}),(e.comment_count??e.comments?.length??0)>0?go(Cr,{sx:{fontSize:15,flexShrink:0,color:l.colors.textMuted}}):null]}),e.is_bug&&e.ticket_no?go(Bt,{sx:{pl:3,mt:-.5,fontSize:12.5,color:l.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,Ht(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[Ht(Bt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[B.map(h=>go(we,{option:h,small:!0},h.key)),go(Eo,{priority:e.priority,small:!0}),b.map(h=>go(we,{option:h,small:!0},h.key))]}),t&&String(e.due_date??"").trim()?Ht(tx,{disabled:!a,onPointerDown:h=>h.stopPropagation(),onClick:h=>{h.stopPropagation(),a?.(e,h.currentTarget)},sx:{display:"inline-flex",alignItems:"center",gap:.25,px:.5,py:.1,borderRadius:.75,fontSize:13,fontWeight:500,color:c,whiteSpace:"nowrap","&:hover":a?{bgcolor:l.colors.border}:void 0},children:[lx(e.due_date),go(ix,{sx:{fontSize:15}})]}):null]}),t&&e.estimated_time?Ht(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:l.colors.textSecondary},children:[go(ax,{sx:{fontSize:14}}),e.estimated_time]}):null,go(xo,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),p.total>0?go(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:go(Bt,{sx:{flexShrink:0,width:64},onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),children:go(un,{canConfirm:!1,count:p.count,total:p.total,onConfirm:()=>{},onShowList:h=>s(h)})})}):null,go(Or,{anchorEl:d,open:!!d,acks:e.acks??[],total:p.total,onRequestConfirm:r&&p.count<p.total?()=>{r(e),s(null)}:void 0,onClose:()=>s(null)})]})}import{Box as mx}from"@mui/material";import{useSortable as ux}from"@dnd-kit/sortable";import{CSS as dx}from"@dnd-kit/utilities";import{jsx as Vl}from"react/jsx-runtime";function px(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function Mr({task:e,statusOptions:o,variant:t="card",showDueDate:n=!1,onRequestArchiveToggle:r,onRequestReply:a,onDueDateClick:i,onCardClick:l,onCardContextMenu:u,titleFontSize:c}){let p=le(),{attributes:d,listeners:s,setNodeRef:m,transform:f,transition:B,isDragging:b}=ux({id:String(e.seq)}),h=t==="list";return Vl(mx,{ref:m,...d,...s,onClick:l?()=>l(e):void 0,onContextMenu:u?x=>u(e,x):void 0,sx:{...h?px(p.card):pn(p.card),opacity:b?.35:e.completed?.55:1,transform:dx.Translate.toString(f),transition:B,position:"relative",cursor:"default",touchAction:"none","&:hover":h?{bgcolor:p.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:Vl(Wt,{task:e,statusOptions:o,showDueDate:n,onRequestArchiveToggle:r,onRequestReply:a,onDueDateClick:i,titleFontSize:c})})}function fx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function vo(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let o=fx(e.end_date);return o?`${e.name} (~${o})`:e.name}import{jsx as j,jsxs as Me}from"react/jsx-runtime";var os=2,Er="group-",Io="colmove-",ji="__default__",Xi=wi,Qi="__other__",Pr="sprint-",ts=`${Pr}0`,Ox={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function is(e){return{flexShrink:0,width:e.width,py:.1,borderRadius:`${e.borderRadius}px`,bgcolor:e.bg,border:e.border,color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums",...e.sx}}function Mx({column:e,tasks:o,statusOptions:t,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:a,onAddTask:i,canAdd:l,onOpenMenu:u,onCardClick:c,onCardContextMenu:p,grow:d,summary:s,onOpenSprintMenu:m}){let f=le(),{setNodeRef:B,isOver:b}=Bx({id:`${Er}${e.key}`}),{attributes:h,listeners:x,setNodeRef:T,transform:g,transition:v,isDragging:C}=_x({id:`${Io}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Me(Se,{ref:I=>{B(I),T(I)},sx:{flex:d?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:I=>I.shadows[1],bgcolor:b?f.colors.accentSoft:f.board.columnBg,transition:"background-color 0.15s",overflow:"hidden",transform:Dx.Translate.toString(g),...v?{transition:`${v}, background-color 0.15s`}:{},opacity:C?.6:1},children:[Me(Se,{...h,...x,sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${f.card.borderColor}`,flexShrink:0,touchAction:"none",cursor:e.isDefault||e.isArchived||e.locked?"default":"grab",opacity:e.isArchived?.65:1},children:[e.dot?j(Se,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let I=Oe(e.icon);return I?j(I,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),j(Se,{component:"span",sx:{fontSize:f.board.columnHeaderFontSize,fontWeight:700,color:f.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),j(Se,{component:"span",sx:{...is(f.board.badge),ml:"auto"},children:o.length}),e.sprint&&m?j(Yl,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:I=>I.stopPropagation(),onClick:I=>m(I.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:j(Xl,{sx:{fontSize:18}})}):e.locked?null:j(Yl,{size:"small","aria-label":"\uD504\uB85C\uC81D\uD2B8 \uBA54\uB274",onPointerDown:I=>I.stopPropagation(),onClick:I=>u({anchorEl:I.currentTarget,column:e}),sx:{color:"#9a9a97"},children:j(Xl,{sx:{fontSize:18}})})]}),s?j(Se,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${f.card.borderColor}`,flexShrink:0},children:s}):null,j(Se,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:j(Zi,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},children:Me(Se,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[j(rs,{items:o.map(I=>String(I.seq)),strategy:wx,children:o.map(I=>j(Mr,{task:I,statusOptions:t,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:a,onCardClick:c,onCardContextMenu:p},I.seq))}),o.length===0&&!l?j(Se,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,o.length===0&&l?j(Se,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Me(ns,{className:"taskbox-board-add",onClick:()=>i(e.isDefault?"":e.key),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${f.card.borderColor}`,bgcolor:f.card.bg,color:f.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.card.hoverBg}},children:[j(Ji,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function ea({tasks:e,statusOptions:o,customTabs:t,mode:n="active",onToggleCompleted:r,onRequestReply:a,onChangeDueDate:i,onChangeReminder:l,onMoveTask:u,columnAxis:c="project",statusColumns:p=[],onMoveTaskStatus:d,sprintColumns:s=[],onMoveTaskSprint:m,onAddGroup:f,onAddTask:B,canAdd:b=!0,onRequestRename:h,onArchiveProject:x,onDeleteProject:T,onReorderProjects:g,onOpenDetail:v,onTaskContextMenu:C,renderColumnSummary:I,onEditSprint:M,onChangeSprintStatus:J,onRemoveSprint:E}){let X=le(),[w,y]=ct(null),[H,N]=ct(null),[$,P]=ct(null),[te,de]=ct(null),[A,W]=ct(null),[K,F]=ct(null),[O,L]=ct(null),[Q,Z]=ct(null),[ue,ee]=ct(null),ye=xx(!1),R=st(()=>new Map(e.map(D=>[D.seq,D])),[e]),k=st(()=>{let D=e.filter(z=>z.is_notice);return D.sort((z,ie)=>z.completed!==ie.completed?z.completed?1:-1:ie.seq-z.seq),D},[e]),ne=st(()=>t.filter(D=>!D.archived),[t]),re=st(()=>t.filter(D=>D.archived),[t]),ve=D=>({key:D.key,label:D.label,icon:D.icon,isDefault:!1,isArchived:D.archived}),$e=st(()=>new Set(p.map(D=>D.key)),[p]),se=st(()=>new Set(s.map(D=>D.seq)),[s]),Ie=st(()=>{if(c==="sprint")return[{key:ts,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...s.map(D=>({key:`${Pr}${D.seq}`,label:vo(D),icon:"",isDefault:!1,isArchived:!1,dot:Ox[D.status],locked:!0,sprint:D}))];if(c==="status"){let D=p.map(z=>({key:z.key,label:z.name,icon:"",isDefault:!1,isArchived:!1,dot:z.dot,locked:!0}));return D.some(z=>z.key===Xi)?D:[...D,{key:Xi,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return n==="archived"?re.map(ve):[{key:ji,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...ne.map(ve)]},[c,p,s,n,ne,re]),V=vx(Cx(Tx,{activationConstraint:{distance:5}})),Ee=lt(D=>{let z=String(D.active.id).startsWith(Io),ie=yx(D),ce=ie.length>0?ie:Sx(D);if(z)return ce.filter(_=>String(_.id).startsWith(Io));let ae=ce.filter(_=>!String(_.id).startsWith(Io)),fe=ae.filter(_=>!String(_.id).startsWith(Er));return fe.length>0?fe:ae},[]),Xe=st(()=>{let D=new Map;for(let z of e){if(z.is_notice)continue;let ie;if(c==="sprint"){let ae=z.sprint_seq??0;ie=se.has(ae)?`${Pr}${ae}`:ts}else ie=c==="status"?z.completed?Xi:$e.has(String(z.status??""))?String(z.status??""):Qi:z.tab_key?.trim()||ji;let ce=D.get(ie);ce?ce.push(z):D.set(ie,[z])}for(let z of D.values())z.sort((ie,ce)=>{if(ie.completed!==ce.completed)return ie.completed?1:-1;let ae=(ie.group_sort_no??0)>0,fe=(ce.group_sort_no??0)>0;return ae&&fe?(ie.group_sort_no??0)-(ce.group_sort_no??0):ae!==fe?ae?-1:1:ie.due_date!==ce.due_date?ie.due_date<ce.due_date?-1:1:ie.seq-ce.seq});return D},[e,c,$e,se]),bt=st(()=>c!=="status"||(Xe.get(Qi)??[]).length===0?Ie:[...Ie,{key:Qi,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Ie,Xe]),Wo=lt(D=>O?(O.get(D)??[]).map(z=>R.get(z)).filter(z=>!!z):Xe.get(D)??[],[O,R,Xe]),Zo=lt(D=>{let z=String(D.active.id);if(z.startsWith(Io)){ee(z.slice(Io.length));return}Z(Number(z)),L(new Map(Ie.map(ie=>[ie.key,(Xe.get(ie.key)??[]).map(ce=>ce.seq)])))},[Ie,Xe]),$o=lt((D,z)=>{if(D.startsWith(Er))return{key:D.slice(Er.length),overSeq:null};let ie=Number(D);for(let[ce,ae]of z)if(ae.includes(ie))return{key:ce,overSeq:ie};return null},[]),Pt=lt(D=>{let{active:z,over:ie}=D;!ie||String(z.id).startsWith(Io)||L(ce=>{if(!ce)return ce;let ae=Number(z.id),fe=$o(String(ie.id),ce);if(!fe)return ce;let _=[...ce.entries()].find(([,Pe])=>Pe.includes(ae))?.[0];if(!_||_===fe.key)return ce;let ro=new Map(ce);ro.set(_,(ro.get(_)??[]).filter(Pe=>Pe!==ae));let Qe=[...ro.get(fe.key)??[]],io=Qe.length;if(fe.overSeq!==null){let Pe=Qe.indexOf(fe.overSeq);Pe!==-1&&(io=Pe)}return Qe.splice(io,0,ae),ro.set(fe.key,Qe),ro})},[$o]),rn=lt(D=>{let z=String(D.active.id);if(z.startsWith(Io)){ee(null);let io=String(D.over?.id??"");if(!io.startsWith(Io))return;let Pe=z.slice(Io.length),ht=io.slice(Io.length);if(Pe===ht)return;let _n=t.map(nr=>nr.key),wn=_n.indexOf(Pe),an=_n.indexOf(ht);if(wn===-1||an===-1)return;g(es(_n,wn,an));return}let ie=O;if(L(null),Z(null),ye.current=!0,!ie||!D.over)return;let ce=Number(z),ae=[...ie.entries()].find(([,io])=>io.includes(ce));if(!ae)return;let[fe,_]=ae,ro=[..._],Qe=$o(String(D.over.id),ie);if(Qe&&Qe.key===fe&&Qe.overSeq!==null&&Qe.overSeq!==ce){let io=ro.indexOf(ce),Pe=ro.indexOf(Qe.overSeq);io!==-1&&Pe!==-1&&(ro=es(ro,io,Pe))}if(c==="status"){d?.(ce,fe);return}if(c==="sprint"){m?.(ce,Number(fe.slice(Pr.length))||0);return}u(ce,fe===ji?"":fe,ro)},[t,O,$o,u,g,c,d,m]),Oo=lt(()=>{L(null),Z(null),ee(null),ye.current=!0},[]),no=lt(D=>{if(ye.current){ye.current=!1;return}v(D)},[v]),mo=Q!==null?R.get(Q)??null:null,uo=ue!==null?Ie.find(D=>D.key===ue)??null:null,Rt=lt((D,z)=>{F({anchorEl:z,taskSeq:D.seq,date:D.due_date,reminder:D.reminder})},[]),pe=H?.column??null;return Me(Se,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:`1px solid ${X.card.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",p:os,bgcolor:X.colors.surfaceSubtle},children:[Me(hx,{sensors:V,collisionDetection:Ee,onDragStart:Zo,onDragOver:Pt,onDragEnd:rn,onDragCancel:Oo,children:[j(Se,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:n==="archived"&&Ie.length===0?j(Se,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):j(Zi,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,children:Me(Se,{sx:{display:"flex",alignItems:"flex-start",gap:os,height:"100%",minWidth:"min-content",pb:.5},children:[n==="active"&&k.length>0?Me(Se,{sx:{flex:c!=="project"?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:D=>D.shadows[1],bgcolor:X.card.bg,overflow:"hidden"},children:[Me(Se,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${X.card.borderColor}`,flexShrink:0,minHeight:48},children:[j(gx,{sx:{fontSize:17,color:"#e8763a"}}),j(Se,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:X.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Me(Se,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",k.length,")"]})]}),j(Se,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:j(Zi,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},children:j(Se,{sx:{display:"flex",flexDirection:"column"},children:k.map(D=>Me(Se,{onClick:()=>no(D),onContextMenu:z=>C(D,z),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${X.card.borderColor}`,bgcolor:X.card.bg,cursor:"pointer","&:hover":{bgcolor:X.card.hoverBg}},children:[j(Wt,{task:D,statusOptions:o,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:y}),(()=>{let z=(D.target_names??[]).filter(ce=>ce.trim());if(z.length===0)return null;let ie=z.length>2?`${z[0]}, ${z[1]} \uC678 ${z.length-2}`:z.join(", ");return Me(Se,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[j(bx,{sx:{fontSize:14,flexShrink:0}}),j(Se,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:ie})]})})()]},D.seq))})})})]}):null,j(rs,{items:ne.map(D=>`${Io}${D.key}`),strategy:Ix,children:bt.map(D=>j(Mx,{column:D,tasks:Wo(D.key),summary:I?.(D.key,Wo(D.key)),onOpenSprintMenu:M||J||E?(z,ie)=>P({anchorEl:z,sprint:ie}):void 0,statusOptions:o,onRequestArchiveToggle:y,onRequestReply:a,onDueDateClick:Rt,onAddTask:B,canAdd:b&&c==="project",onOpenMenu:N,onCardClick:no,onCardContextMenu:C,grow:c!=="project"},D.key))}),n==="active"&&c==="project"?Me(ns,{onClick:f,sx:{flex:"0 0 270px",minWidth:270,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,py:2,border:"1.5px dashed #cfcfcc",borderRadius:1.5,color:"#787774",fontSize:14,"&:hover":{bgcolor:"#eef2f6",borderColor:"#9a9a97"}},children:[j(Ji,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,n==="active"&&bt.length===0&&k.length===0?j(Se,{sx:{flex:1,minWidth:240,display:"flex",alignItems:"center",justifyContent:"center",color:"#9a9a97",fontSize:14,py:6},children:c==="project"?"\uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0C8 \uD504\uB85C\uC81D\uD2B8\uB97C \uCD94\uAC00\uD574 \uC5C5\uBB34\uB97C \uC815\uB9AC\uD558\uC138\uC694.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})}),j(kx,{children:mo?j(Se,{sx:{...pn,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:j(Wt,{task:mo,statusOptions:o,showDueDate:!0,titleFontSize:15})}):uo?Me(Se,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:X.card.bg,border:`1px solid ${X.card.borderColor}`,borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let D=Oe(uo.icon);return D?j(D,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),j(Se,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:X.board.columnHeaderColor},children:uo.label}),j(Se,{component:"span",sx:is(X.board.badge),children:(Xe.get(uo.key)??[]).length})]}):null})]}),Me(jl,{transitionDuration:0,anchorEl:H?.anchorEl??null,open:!!H,onClose:()=>N(null),children:[pe&&!pe.isArchived&&b?Me(Ct,{onClick:()=>{pe&&B(pe.isDefault?"":pe.key),N(null)},sx:{fontSize:14,gap:1},children:[j(Ji,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,pe&&!pe.isDefault&&!pe.isArchived?Me(Ct,{onClick:()=>{h(pe.key,pe.label,pe.icon),N(null)},sx:{fontSize:14,gap:1},children:[j(Ql,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,pe&&!pe.isDefault&&!pe.isArchived?Me(Ct,{onClick:()=>{x(pe.key,!0),N(null)},sx:{fontSize:14,gap:1},children:[j(Jl,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,pe&&pe.isArchived?Me(Ct,{onClick:()=>{x(pe.key,!1),N(null)},sx:{fontSize:14,gap:1},children:[j(Zl,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,pe&&!pe.isDefault?j(Gl,{}):null,pe&&!pe.isDefault?Me(Ct,{onClick:()=>{H&&W(H),N(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[j(at,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Me(jl,{transitionDuration:0,anchorEl:$?.anchorEl??null,open:!!$,onClose:()=>P(null),children:[M?Me(Ct,{onClick:()=>{$&&M($.sprint.seq),P(null)},sx:{fontSize:14,gap:1},children:[j(Ql,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,J?Me(Ct,{onClick:()=>{$&&J($.sprint.seq,$.sprint.status==="closed"?"active":"closed"),P(null)},sx:{fontSize:14,gap:1},children:[$?.sprint.status==="closed"?j(Zl,{sx:{fontSize:18,color:"#787774"}}):j(Jl,{sx:{fontSize:18,color:"#787774"}}),$?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,E?j(Gl,{}):null,E?Me(Ct,{onClick:()=>{$&&de($),P(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[j(at,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),j(Ue,{open:!!te,anchorEl:te?.anchorEl??null,title:`"${te?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>de(null),onConfirm:()=>{te&&E?.(te.sprint.seq),de(null)}}),j(St,{anchorEl:K?.anchorEl??null,open:!!K,date:K?.date??"",reminder:K?.reminder??"none",onClose:()=>F(null),onDateChange:D=>{K&&(i(K.taskSeq,D),F(z=>z&&{...z,date:D}))},onReminderChange:D=>{K&&(l(K.taskSeq,D),F(z=>z&&{...z,reminder:D}))}}),j(Ue,{open:!!A,anchorEl:A?.anchorEl??null,title:`"${A?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
2
|
-
\uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>W(null),onConfirm:()=>{A&&T(A.column.key),W(null)}}),j(Ue,{open:!!w,anchorEl:w?.anchorEl??null,title:w?.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:w?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>y(null),onConfirm:()=>{w&&r(w.taskSeq,w.nextCompleted),y(null)}})]})}import{useCallback as It,useMemo as Wn,useRef as Ax,useState as $n}from"react";import{Box as Ve,Button as Lx,ButtonBase as ls,IconButton as as}from"@mui/material";import Nx from"@mui/icons-material/Add";import Fx from"@mui/icons-material/ChevronLeft";import Hx from"@mui/icons-material/ChevronRight";import Wx from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as $x}from"@ehfuse/mui-datetime-picker";import{DndContext as Kx,DragOverlay as Ux,PointerSensor as Vx,pointerWithin as Gx,rectIntersection as Yx,useDroppable as jx,useSensor as Xx,useSensors as Qx}from"@dnd-kit/core";import{SortableContext as Jx,arrayMove as Zx,verticalListSortingStrategy as eg}from"@dnd-kit/sortable";import og from"@ehfuse/overlay-scrollbar";import{useEffect as Ex,useState as Px}from"react";function vt(e){let{loadHolidays:o}=yo(),[t,n]=Px(()=>new Map),r=e.join(",");return Ex(()=>{if(!o||!r){n(new Map);return}let a=!1;return o(r.split(",").map(Number)).then(i=>{if(a)return;let l=new Map;for(let u of i)l.has(u.date)||l.set(u.date,u.name);n(l)}).catch(()=>{}),()=>{a=!0}},[o,r]),t}function Rx(e){let[o,t,n]=e.split("-").map(Number),r=new Date(Date.UTC(o,t-1,n+1)),a=i=>String(i).padStart(2,"0");return`${r.getUTCFullYear()}-${a(r.getUTCMonth()+1)}-${a(r.getUTCDate())}`}function fn(e){let o=new Map;for(let t of e){let n=t.start_date;for(let r=0;r<62&&n<=t.end_date;r+=1){let a=o.get(n);a?a.push(t):o.set(n,[t]),n=Rx(n)}}for(let t of o.values())t.sort((n,r)=>(n.time||"99:99").localeCompare(r.time||"99:99")||n.title.localeCompare(r.title));return o}import{Box as oa,Tooltip as zx}from"@mui/material";import{jsx as ta,jsxs as qx}from"react/jsx-runtime";function xn({event:e,small:o=!1}){let t=e.time?`${e.time} ${e.title}`:e.title,n=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",r=a=>{a.stopPropagation();let[i,l,u]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${i}/${l}/${u}`,"_blank")};return ta(zx,{title:`(${n}) ${t}`,arrow:!0,enterDelay:300,children:qx(oa,{onClick:r,onPointerDown:a=>a.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:o?.6:.8,borderRadius:.75,bgcolor:"#f1f1ef",color:"#37352f",fontSize:15,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,minWidth:0,maxWidth:"100%",cursor:"pointer","&:hover":{bgcolor:"#ececea"}},children:[ta(oa,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),ta(oa,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:t})]})})}import{jsx as Be,jsxs as mt}from"react/jsx-runtime";var tg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],Rr="day-";function na(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(o.getDate()-o.getDay()),o}function ra(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function ng(e){let o=e[0],t=e[e.length-1];return o.getMonth()===t.getMonth()?`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4`:o.getFullYear()===t.getFullYear()?`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4 - ${t.getMonth()+1}\uC6D4`:`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4 - ${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4`}function rg(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function ig({dayKey:e,isToday:o,dayLabel:t,holidayName:n,tasks:r,googleEvents:a,statusOptions:i,onRequestArchiveToggle:l,onRequestReply:u,onAddSchedule:c,canAdd:p,onCardClick:d,onCardContextMenu:s,summary:m}){let f=le(),{setNodeRef:B}=jx({id:`${Rr}${e}`});return mt(Ve,{ref:B,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:o?f.calendar.todayBg:f.calendar.cellBg},children:[mt(Ve,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:36,bgcolor:o?f.calendar.todayBg:f.calendar.dateBandBg,borderBottom:r.length>0?`1px solid ${f.calendar.borderColor}`:"none",flexShrink:0},children:[n?Be(Ve,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:f.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}):null,o?Be(Ve,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:f.colors.danger,color:f.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Be(Ve,{component:"span",sx:{fontSize:13.5,fontWeight:o?700:400,color:n?f.colors.danger:f.colors.textPrimary,flexShrink:0},children:t})]}),m?Be(Ve,{sx:{px:1,py:1,borderBottom:`1px solid ${f.calendar.borderColor}`,flexShrink:0},children:m}):null,Be(Ve,{sx:{flex:1,minHeight:0,bgcolor:o?f.calendar.todayBg:f.colors.surfaceSubtle},children:Be(og,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:mt(Ve,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[a.length>0?Be(Ve,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:a.map(b=>Be(xn,{event:b},b.uid))}):null,Be(Jx,{items:r.map(b=>String(b.seq)),strategy:eg,children:r.map(b=>Be(Mr,{titleFontSize:15,task:b,statusOptions:i,variant:"list",onRequestArchiveToggle:l,onRequestReply:u,onCardClick:d,onCardContextMenu:s},b.seq))}),Be(Ve,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...p?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:mt(ls,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${f.calendar.borderColor}`,bgcolor:f.calendar.cellBg,color:f.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.calendar.hoverBg}},children:[Be(Nx,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function ss({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onToggleCompleted:r,onMoveTask:a,onRequestReply:i,onAddSchedule:l,canAdd:u=!0,onOpenDetail:c,onTaskContextMenu:p,renderColumnSummary:d}){let s=le(),[m,f]=$n(()=>na(new Date)),[B,b]=$n(null),[h,x]=$n(null),[T,g]=$n(null),[v,C]=$n(null),I=Ax(!1),M=Wn(()=>Array.from({length:7},(O,L)=>ra(m,L)),[m]),J=Wn(()=>new Map(e.map(O=>[O.seq,O])),[e]),E=Wn(()=>[...new Set(M.map(O=>O.getFullYear()))],[M]),X=vt(E),w=Qx(Xx(Vx,{activationConstraint:{distance:5}})),y=It(O=>{let L=Gx(O),Q=L.length>0?L:Yx(O),Z=Q.filter(ue=>!String(ue.id).startsWith(Rr));return Z.length>0?Z:Q},[]),H=Wn(()=>fn(o),[o]),N=Wn(()=>{let O=new Map;for(let L of e){let Q=L.due_date.slice(0,10);if(!Q)continue;let Z=O.get(Q);Z?Z.push(L):O.set(Q,[L])}for(let L of O.values())L.sort((Q,Z)=>{let ue=Q.sort_no>0,ee=Z.sort_no>0;if(ue&&ee)return Q.sort_no-Z.sort_no;if(ue!==ee)return ue?-1:1;if(Q.completed!==Z.completed)return Q.completed?1:-1;let ye=Di(Q),R=Di(Z);return ye!==R?ye?-1:1:Q.seq-Z.seq});return O},[e]),$=It(O=>T?(T.get(O)??[]).map(L=>J.get(L)).filter(L=>!!L):N.get(O)??[],[T,J,N]),P=It(O=>{C(Number(O.active.id)),g(new Map(M.map(L=>{let Q=qe(L);return[Q,(N.get(Q)??[]).map(Z=>Z.seq)]})))},[M,N]),te=It((O,L)=>{if(O.startsWith(Rr))return{day:O.slice(Rr.length),overSeq:null};let Q=Number(O);for(let[Z,ue]of L)if(ue.includes(Q))return{day:Z,overSeq:Q};return null},[]),de=It(O=>{let{active:L,over:Q}=O;Q&&g(Z=>{if(!Z)return Z;let ue=Number(L.id),ee=te(String(Q.id),Z);if(!ee)return Z;let ye=[...Z.entries()].find(([,re])=>re.includes(ue))?.[0];if(!ye||ye===ee.day)return Z;let R=new Map(Z);R.set(ye,(R.get(ye)??[]).filter(re=>re!==ue));let k=[...R.get(ee.day)??[]],ne=k.length;if(ee.overSeq!==null){let re=k.indexOf(ee.overSeq);re!==-1&&(ne=re)}return k.splice(ne,0,ue),R.set(ee.day,k),R})},[te]),A=It(O=>{let{active:L,over:Q}=O,Z=T;if(g(null),C(null),I.current=!0,!Z||!Q)return;let ue=Number(L.id),ee=[...Z.entries()].find(([,re])=>re.includes(ue));if(!ee)return;let[ye,R]=ee,k=[...R],ne=te(String(Q.id),Z);if(ne&&ne.day===ye&&ne.overSeq!==null&&ne.overSeq!==ue){let re=k.indexOf(ue),ve=k.indexOf(ne.overSeq);re!==-1&&ve!==-1&&(k=Zx(k,re,ve))}a(ue,ye,k)},[T,a,te]),W=It(()=>{g(null),C(null),I.current=!0},[]),K=It(O=>{if(I.current){I.current=!1;return}c(O)},[c]),F=v!==null?J.get(v)??null:null;return mt(Ve,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${s.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[mt(Ve,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:s.calendar.headerBg,borderBottom:`1px solid ${s.calendar.borderColor}`,flexShrink:0},children:[mt(Ve,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Be(as,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>f(ra(m,-7)),children:Be(Fx,{sx:{fontSize:20,color:s.colors.textSecondary}})}),Be(Lx,{size:"small",color:"inherit",onClick:()=>f(na(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:13,fontWeight:s.mode==="dark"?400:500,color:s.mode==="dark"?s.colors.textStrong:s.colors.textPrimary},children:"\uC624\uB298"}),Be(as,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>f(ra(m,7)),children:Be(Hx,{sx:{fontSize:20,color:s.colors.textSecondary}})})]}),mt(ls,{onClick:O=>x(O.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:s.mode==="dark"?400:700,color:s.mode==="dark"?s.colors.textStrong:s.colors.textPrimary,"&:hover":{bgcolor:s.colors.surfaceHover}},children:[ng(M),Be(Wx,{sx:{fontSize:18,color:s.colors.textMuted}})]})]}),Be(Ve,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:s.calendar.headerBg,borderBottom:`1px solid ${s.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${s.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:M.map(O=>{let L=O.getDay(),Q=X.has(qe(O));return Be(Ve,{sx:{py:.75,textAlign:"center",fontSize:12.5,color:L===0||Q?s.colors.danger:L===6?s.colors.accentOnSurface:s.colors.textSecondary},children:tg[L]},qe(O))})}),Be(Ve,{sx:{flex:1,minHeight:0},children:mt(Kx,{sensors:w,collisionDetection:y,onDragStart:P,onDragOver:de,onDragEnd:A,onDragCancel:W,children:[Be(Ve,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${s.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:M.map(O=>{let L=qe(O);return Be(ig,{dayKey:L,isToday:L===n,dayLabel:rg(O),holidayName:X.get(L)??"",summary:d?.(L,$(L)),tasks:$(L),googleEvents:H.get(L)??[],statusOptions:t,onRequestArchiveToggle:b,onRequestReply:i,onAddSchedule:l,canAdd:u,onCardClick:K,onCardContextMenu:p},L)})}),Be(Ux,{children:F?Be(Ve,{sx:{...pn,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:Be(Wt,{task:F,statusOptions:t})}):null})]})}),Be($x,{anchorEl:h,open:!!h,onClose:()=>x(null),selectedDate:m,onDateChange:O=>{f(na(O)),x(null)}}),Be(Ue,{open:!!B,anchorEl:B?.anchorEl??null,title:B?.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:B?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>b(null),onConfirm:()=>{B&&r(B.taskSeq,B.nextCompleted),b(null)}})]})}import{useCallback as Kn,useMemo as $t,useState as zr}from"react";import{Box as Ge,Button as ag,ButtonBase as us,IconButton as cs,Tooltip as lg}from"@mui/material";import sg from"@mui/icons-material/Add";import cg from"@mui/icons-material/ChevronLeft";import mg from"@mui/icons-material/ChevronRight";import ug from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as dg}from"@ehfuse/mui-datetime-picker";import{DndContext as pg,DragOverlay as fg,PointerSensor as xg,pointerWithin as gg,rectIntersection as bg,useDraggable as hg,useDroppable as ds,useSensor as kg,useSensors as Tg}from"@dnd-kit/core";import yg from"@ehfuse/overlay-scrollbar";import{jsx as De,jsxs as Ro}from"react/jsx-runtime";var Sg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],qr="mday-",Ar="mchip-",ps=15,fs={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"};function Bg(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(o.getDate()-o.getDay()),o}function Lr(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(1),o}function Cg(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function ms(e,o){let t=Lr(e);return t.setMonth(t.getMonth()+o),t}function vg({task:e,statusOptions:o,isPreview:t=!1,onOpenDetail:n,onContextMenu:r}){let a=le(),i=a.mode==="dark",{attributes:l,listeners:u,setNodeRef:c,isDragging:p}=hg({id:String(e.seq),disabled:t}),{setNodeRef:d}=ds({id:`${Ar}${e.seq}`,disabled:t}),s=Oe(e.icon||_e),[m]=kt(e,o);return De(lg,{title:e.title,arrow:!0,enterDelay:400,children:Ro(Ge,{ref:f=>{c(f),d(f)},...l,...u,onClick:()=>n(e),onContextMenu:f=>r(e,f),sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,flexShrink:0,borderRadius:.75,bgcolor:m?i?ln(m.dot,a.chip.darkBgAlpha):m.bg:i?a.card.bg:a.colors.surfaceHover,color:m?i?a.chip.darkTextSource==="fg"?m.fg:m.dot:m.fg:a.colors.textPrimary,fontSize:ps,fontWeight:i||e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:t?.5:p?.35:e.completed?.6:1,border:t?`1px dashed ${a.colors.accent}`:"1px solid transparent",pointerEvents:t?"none":"auto",cursor:"pointer",touchAction:"none",overflow:"hidden","&:hover":{filter:"brightness(0.96)"}},children:[De(Ge,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,bgcolor:fs[e.priority]}}),s?De(s,{sx:{fontSize:14,flexShrink:0,opacity:.75}}):null,Ro(Ge,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:i?a.colors.textStrong:a.colors.textPrimary},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})]})})}function Ig({dayKey:e,dayNumber:o,isToday:t,isOtherMonth:n,weekday:r,holidayName:a,tasks:i,googleEvents:l,statusOptions:u,previewSeq:c,onOpenDetail:p,onTaskContextMenu:d,onAddSchedule:s,canAdd:m}){let f=le(),B=f.mode==="dark",{setNodeRef:b,isOver:h}=ds({id:`${qr}${e}`}),x=i,T=!!a||r===0;return Ro(Ge,{ref:b,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.25,p:.5,bgcolor:h?f.colors.accentSoft:t?f.calendar.todayBg:n?f.colors.surfaceSubtle:f.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...m?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:36,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:t?f.calendar.todayBg:f.calendar.dateBandBg,borderBottom:`1px solid ${f.calendar.borderColor}`},children:[a?De(Ge,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:f.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a}):null,t?De(Ge,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:f.colors.danger,color:f.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,De(Ge,{component:"span",sx:{fontSize:13.5,fontWeight:t?700:400,color:n?f.colors.textMuted:T?f.colors.danger:r===6?f.colors.accentOnSurface:f.colors.textPrimary,flexShrink:0},children:o})]}),l.map(g=>De(xn,{event:g,small:!0},g.uid)),x.map(g=>De(vg,{task:g,statusOptions:u,isPreview:g.seq===c,onOpenDetail:p,onContextMenu:d},g.seq)),De(Ge,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:Ro(us,{className:"taskbox-month-add",onClick:()=>s(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:.75,borderBottom:`1px dashed ${f.calendar.borderColor}`,bgcolor:f.calendar.cellBg,color:f.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.calendar.hoverBg}},children:[De(sg,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function xs({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onMoveTask:r,onAddSchedule:a,canAdd:i=!0,onOpenDetail:l,onTaskContextMenu:u}){let c=le(),p=c.mode==="dark",[d,s]=zr(()=>Lr(new Date)),[m,f]=zr(null),[B,b]=zr(null),[h,x]=zr(null),T=$t(()=>{let A=Bg(d);return Array.from({length:42},(W,K)=>Cg(A,K))},[d]),g=$t(()=>new Map(e.map(A=>[A.seq,A])),[e]),v=$t(()=>fn(o),[o]),C=$t(()=>[...new Set(T.map(A=>A.getFullYear()))],[T]),I=vt(C),M=$t(()=>{let A=new Map;for(let W of e){let K=W.due_date.slice(0,10);if(!K)continue;let F=A.get(K);F?F.push(W):A.set(K,[W])}for(let W of A.values())W.sort((K,F)=>{let O=K.sort_no>0,L=F.sort_no>0;return O&&L?K.sort_no-F.sort_no:O!==L?O?-1:1:K.completed!==F.completed?K.completed?1:-1:K.seq-F.seq});return A},[e]),J=Tg(kg(xg,{activationConstraint:{distance:5}})),E=Kn(A=>{let W=gg(A),K=W.length>0?W:bg(A),F=K.filter(O=>String(O.id).startsWith(Ar));return F.length>0?F:K.filter(O=>String(O.id).startsWith(qr))},[]),X=Kn(A=>{b(Number(A.active.id))},[]),w=Kn(A=>{x(A.over?String(A.over.id):null)},[]),y=$t(()=>{let A=new Map;for(let[W,K]of M)for(let F of K)A.set(F.seq,W);return A},[M]),H=B!==null?g.get(B)?.due_date.slice(0,10)??"":"",N=$t(()=>{if(B===null||!h)return null;if(h.startsWith(Ar)){let A=Number(h.slice(Ar.length)),W=y.get(A);if(!W)return null;let K=(M.get(W)??[]).filter(O=>O.seq!==B),F=K.findIndex(O=>O.seq===A);return{day:W,index:F===-1?K.length:F}}if(h.startsWith(qr)){let A=h.slice(qr.length),W=(M.get(A)??[]).filter(K=>K.seq!==B);return{day:A,index:W.length}}return null},[B,y,h,M]),$=Kn(A=>{let W=M.get(A)??[];if(B===null||!N)return W;let K=g.get(B);if(!K)return W;let F=W.filter(O=>O.seq!==B);return A===N.day?[...F.slice(0,N.index),K,...F.slice(N.index)]:A===H?F:W},[B,H,N,g,M]),P=Kn(A=>{let W=B,K=N;if(b(null),x(null),W===null||!K)return;let F=(M.get(K.day)??[]).filter(L=>L.seq!==W),O=[...F.slice(0,K.index).map(L=>L.seq),W,...F.slice(K.index).map(L=>L.seq)];r(W,K.day,O)},[B,N,r,M]),te=B!==null?g.get(B)??null:null,de=`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4`;return Ro(Ge,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${c.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:c.calendar.headerBg,borderBottom:`1px solid ${c.calendar.borderColor}`,flexShrink:0},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:.25},children:[De(cs,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>s(ms(d,-1)),children:De(cg,{sx:{fontSize:20,color:c.colors.textSecondary}})}),De(ag,{size:"small",color:"inherit",onClick:()=>s(Lr(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:13,fontWeight:c.mode==="dark"?400:500,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),De(cs,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>s(ms(d,1)),children:De(mg,{sx:{fontSize:20,color:c.colors.textSecondary}})})]}),Ro(us,{onClick:A=>f(A.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:c.mode==="dark"?400:700,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary,"&:hover":{bgcolor:c.colors.surfaceHover}},children:[de,De(ug,{sx:{fontSize:18,color:c.colors.textMuted}})]})]}),De(Ge,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:c.calendar.headerBg,borderBottom:`1px solid ${c.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${c.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:Sg.map((A,W)=>De(Ge,{sx:{py:.75,textAlign:"center",fontSize:12.5,color:W===0?c.colors.danger:W===6?c.colors.accentOnSurface:c.colors.textSecondary},children:A},A))}),De(Ge,{sx:{flex:1,minHeight:0},children:Ro(pg,{sensors:J,collisionDetection:E,onDragStart:X,onDragOver:w,onDragEnd:P,onDragCancel:()=>{b(null),x(null)},children:[De(yg,{style:{height:"100%"},thumb:{width:8},children:De(Ge,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${c.calendar.borderColor}`,borderBottom:`1px solid ${c.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:T.map(A=>{let W=qe(A);return De(Ig,{dayKey:W,dayNumber:A.getDate(),isToday:W===n,isOtherMonth:A.getMonth()!==d.getMonth(),weekday:A.getDay(),holidayName:I.get(W)??"",tasks:$(W),googleEvents:v.get(W)??[],statusOptions:t,previewSeq:N?.day===W?B:null,onOpenDetail:l,onTaskContextMenu:u,onAddSchedule:a,canAdd:i},W)})})}),De(fg,{children:te?Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:c.calendar.cellBg,border:`1px solid ${c.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:ps,fontWeight:500,color:c.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[De(Ge,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:fs[te.priority]}}),te.title]}):null})]})}),De(dg,{anchorEl:m,open:!!m,onClose:()=>f(null),selectedDate:d,onDateChange:A=>{s(Lr(A)),f(null)}})]})}import{useEffect as _g,useMemo as Nr,useRef as wg,useState as gs}from"react";import{Box as So,Button as Dg,IconButton as bs}from"@mui/material";import Og from"@mui/icons-material/ChevronLeft";import Mg from"@mui/icons-material/ChevronRight";import Eg from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Pg}from"@ehfuse/mui-datetime-picker";import{jsx as lo,jsxs as _t}from"react/jsx-runtime";var Rg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],zg={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"};function ia(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(1),o}function hs(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function qg({task:e,statusOptions:o,onOpenDetail:t}){let n=le(),[r]=kt(e,o),a=Oe(e.icon||(e.is_notice?Mo:_e));return _t(So,{onClick:i=>{i.stopPropagation(),t(e)},sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:1,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:r?.bg??n.colors.surfaceHover,color:r?.fg??n.colors.textPrimary,fontSize:15,fontWeight:e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:e.completed?.6:1,cursor:"pointer",overflow:"hidden"},children:[lo(So,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,bgcolor:zg[e.priority]??n.colors.accentOnSurface}}),a?lo(a,{sx:{fontSize:16,flexShrink:0,opacity:.75}}):null,_t(So,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:n.colors.textPrimary},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})]})}function ks({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onOpenDetail:r,onAddSchedule:a}){let i=le(),[l,u]=gs(()=>ia(new Date)),[c,p]=gs(!1),d=Nr(()=>{let x=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();return Array.from({length:x},(T,g)=>{let v=new Date(l.getFullYear(),l.getMonth(),g+1);return{ymd:hs(v),dayNumber:g+1,weekday:v.getDay()}})},[l]),s=Nr(()=>{let x=new Map;for(let T of e){let g=T.due_date.slice(0,10);if(!g)continue;let v=x.get(g);v?v.push(T):x.set(g,[T])}for(let T of x.values())T.sort((g,v)=>g.completed!==v.completed?g.completed?1:-1:g.seq-v.seq);return x},[e]),m=Nr(()=>fn(o),[o]),f=Nr(()=>[l.getFullYear()],[l]),B=vt(f),b=wg(null),h=n.slice(0,7)===hs(l).slice(0,7);return _g(()=>{if(!h)return;let x=C=>{let I=C?.parentElement??null;for(;I;){let M=window.getComputedStyle(I);if(/(auto|scroll)/.test(M.overflowY)&&I.scrollHeight>I.clientHeight)return I;I=I.parentElement}return null},T=()=>{let C=b.current,I=x(C);if(!I||!C)return;let M=C.getBoundingClientRect().top-I.getBoundingClientRect().top+I.scrollTop;I.scrollTop=Math.max(0,M-I.clientHeight/2+C.clientHeight/2)},g=setTimeout(T,100),v=setTimeout(T,400);return()=>{clearTimeout(g),clearTimeout(v)}},[h,l]),_t(So,{sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:i.colors.surface},children:[_t(So,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[lo(bs,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>u(x=>new Date(x.getFullYear(),x.getMonth()-1,1)),children:lo(Og,{sx:{fontSize:20,color:i.colors.textSecondary}})}),lo(Dg,{size:"small",color:"inherit",onClick:()=>u(ia(new Date)),sx:{minWidth:0,px:1,fontSize:13.5,color:i.mode==="dark"?i.colors.textStrong:i.colors.textPrimary},children:"\uC624\uB298"}),lo(bs,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>u(x=>new Date(x.getFullYear(),x.getMonth()+1,1)),children:lo(Mg,{sx:{fontSize:20,color:i.colors.textSecondary}})}),_t(So,{onClick:()=>p(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:i.mode==="dark"?400:700,color:i.mode==="dark"?i.colors.textStrong:i.colors.textPrimary,cursor:"pointer"},children:[l.getFullYear(),"\uB144 ",l.getMonth()+1,"\uC6D4",lo(Eg,{sx:{fontSize:20,color:i.colors.textMuted}})]})]}),lo(So,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${i.calendar.borderColor}`},children:d.map(({ymd:x,dayNumber:T,weekday:g})=>{let v=B.get(x)??"",C=x===n,I=!!v||g===0,M=s.get(x)??[],J=m.get(x)??[],E=M.length>0||J.length>0;return _t(So,{ref:C?b:void 0,onClick:a?()=>a(x):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:E?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${i.calendar.borderColor}`,...a?{cursor:"pointer"}:{}},children:[lo(So,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:_t(So,{sx:{display:"flex",alignItems:"center",gap:.5},children:[lo(So,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:26,height:26,borderRadius:"50%",fontSize:15.5,fontWeight:C?700:500,color:C?i.colors.surface:I?i.colors.danger:g===6?i.colors.accentOnSurface:i.colors.textPrimary,bgcolor:C?i.colors.accentOnSurface:"transparent"},children:T}),lo(So,{component:"span",sx:{fontSize:12.5,color:I?i.colors.danger:g===6?i.colors.accentOnSurface:i.colors.textSecondary},children:Rg[g]})]})}),_t(So,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[J.map(X=>lo(xn,{event:X},X.uid)),M.map(X=>lo(qg,{task:X,statusOptions:t,onOpenDetail:r},X.seq))]})]},x)})}),lo(Pg,{open:c,centered:!0,monthOnly:!0,onClose:()=>p(!1),selectedDate:l,onDateChange:x=>{u(ia(x)),p(!1)}})]})}import{useCallback as Ts,useEffect as ys,useMemo as aa,useRef as Hr,useState as Wr}from"react";import{Box as Ae,Tooltip as Cs}from"@mui/material";import Ag from"@ehfuse/overlay-scrollbar";import Lg from"@mui/icons-material/CheckCircle";import Ng from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as Fg,PointerSensor as Hg,closestCenter as Wg,useSensor as $g,useSensors as Kg}from"@dnd-kit/core";import{SortableContext as Ug,arrayMove as Vg,useSortable as Gg,verticalListSortingStrategy as Yg}from"@dnd-kit/sortable";import jg from"@mui/icons-material/DragIndicator";import{jsx as Re,jsxs as wt}from"react/jsx-runtime";var la=36,Xg=48,Ss=40,Qg=24,Jg=4,Zg=14,Bs=36,eb=12.5,gn=220,ob={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function Kt(e){let o=String(e??"").trim();if(!o)return null;let t=new Date(`${o}T00:00:00`);return Number.isNaN(t.getTime())?null:t}function Fr(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function sa(e,o){return Math.round((o.getTime()-e.getTime())/864e5)}function tb({task:e,dragHandle:o,onPointerDown:t,onClick:n}){let r=le(),a=Hr(null),[i,l]=Wr("");return Re(Cs,{title:i,arrow:!0,enterDelay:300,children:wt(Ae,{onPointerDown:t,onClick:u=>n(e,u),onMouseEnter:()=>{let u=a.current;l(u&&u.scrollWidth>u.clientWidth?e.title:"")},sx:{width:gn,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:r.timeline.bg,borderRight:`1px solid ${r.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:r.mode==="dark"||e.completed?400:500,color:e.completed?r.colors.textMuted:r.mode==="dark"?r.colors.textStrong:r.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:r.colors.surfaceHover}},children:[o,Re(Ae,{ref:a,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function nb({id:e,showIndicator:o,children:t}){let n=le(),{attributes:r,listeners:a,setNodeRef:i}=Gg({id:e});return wt(Ae,{ref:i,sx:{position:"relative"},children:[o?Re(Ae,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:n.colors.accentOnSurface,zIndex:5}}):null,t({...r,...a})]})}function vs({tasks:e,todayStr:o,onOpenDetail:t,onToggleChecklist:n,onReorderTasks:r,onTaskContextMenu:a}){let i=le(),l=aa(()=>[...e].sort((y,H)=>{let N=(y.timeline_sort_no??0)>0,$=(H.timeline_sort_no??0)>0;if(N&&$)return(y.timeline_sort_no??0)-(H.timeline_sort_no??0);if(N!==$)return N?-1:1;let P=y.due_date||y.start_date,te=H.due_date||H.start_date;return P!==te?P<te?-1:1:y.seq-H.seq}),[e]),[u,c]=Wr(null),[p,d]=Wr(null),s=Kg($g(Hg,{activationConstraint:{distance:4}})),m=Ts(y=>{c(y.over?Number(y.over.id):null)},[]),f=Ts(y=>{c(null),d(null);let{active:H,over:N}=y;if(!N||H.id===N.id)return;let $=l.map(de=>de.seq),P=$.indexOf(Number(H.id)),te=$.indexOf(Number(N.id));P===-1||te===-1||r(Vg($,P,te))},[l,r]),B=aa(()=>{let y=Kt(o)??new Date,H=y,N=Fr(y,21);for(let te of l){let de=Kt(te.start_date)??Kt(te.due_date),A=Kt(te.due_date)??de;de&&de<H&&(H=de),A&&A>N&&(N=A)}let $=Fr(H,-3),P=sa($,Fr(N,3))+1;return Array.from({length:P},(te,de)=>Fr($,de))},[l,o]),b=B[0],h=B.findIndex(y=>qe(y)===o),{dayWidths:x,dayOffsets:T,gridWidth:g}=aa(()=>{let y=B.map(($,P)=>$.getDate()===1||P===0?Xg:la),H=[],N=0;for(let $ of y)H.push(N),N+=$;return{dayWidths:y,dayOffsets:H,gridWidth:N}},[B]),v=gn+g,C=Hr(null),I=y=>{C.current={x:y.clientX,y:y.clientY}},M=(y,H)=>{let N=C.current;C.current=null,!(N&&(Math.abs(H.clientX-N.x)>5||Math.abs(H.clientY-N.y)>5))&&t(y)},J=Hr(null),[E,X]=Wr(!1);ys(()=>{let y=J.current?.getScrollContainer();if(!y)return;let H=()=>X(y.scrollHeight>y.clientHeight);H();let N=new ResizeObserver(H);return N.observe(y),()=>N.disconnect()},[l.length]);let w=Hr(!1);return ys(()=>{if(l.length===0||w.current)return;w.current=!0;let y=window.requestAnimationFrame(()=>{let H=J.current?.getScrollContainer();!H||h<0||(H.scrollLeft=Math.max(0,T[h]-la*3))});return()=>window.cancelAnimationFrame(y)},[l.length]),Re(Ae,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${i.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:i.timeline.headerBg},children:Re(Ae,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:Re(Ag,{ref:J,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:wt(Ae,{sx:{width:v,position:"relative",bgcolor:i.timeline.bg},children:[wt(Ae,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:i.timeline.headerBg,borderBottom:`1px solid ${i.timeline.gridColor}`},children:[Re(Ae,{sx:{width:gn,height:Bs,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:i.timeline.headerBg,borderRight:`1px solid ${i.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:i.colors.textSecondary},children:"\uC81C\uBAA9"}),B.map((y,H)=>{let N=y.getDay(),$=H===h,P=y.getDate()===1||H===0;return Re(Ae,{sx:{width:x[H],height:Bs,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:eb,fontWeight:$&&i.mode!=="dark"?700:400,color:$?i.timeline.bg:N===0?i.colors.danger:N===6?i.colors.accentOnSurface:i.colors.textSecondary,bgcolor:$?i.colors.danger:"transparent",borderRight:`1px solid ${i.timeline.gridColor}`,whiteSpace:"nowrap"},children:P?`${y.getMonth()+1}/${y.getDate()}`:y.getDate()},qe(y))})]}),Re(Fg,{sensors:s,collisionDetection:Wg,onDragStart:y=>d(Number(y.active.id)),onDragOver:m,onDragEnd:f,onDragCancel:()=>{c(null),d(null)},children:Re(Ug,{items:l.map(y=>String(y.seq)),strategy:Yg,children:wt(Ae,{sx:{position:"relative"},children:[B.map((y,H)=>{let N=y.getDay(),$=H===h;return!$&&N!==0&&N!==6?null:Re(Ae,{sx:{position:"absolute",top:0,bottom:0,left:gn+T[H],width:x[H],bgcolor:$?"rgba(229,72,77,0.07)":i.colors.surfaceSubtle,zIndex:0}},`stripe-${qe(y)}`)}),l.map((y,H)=>{let N=Kt(y.start_date)??Kt(y.due_date),$=Kt(y.due_date)??N,P=N?Math.min(B.length-1,Math.max(0,sa(b,N))):0,te=$?Math.min(B.length-1,Math.max(P,sa(b,$))):P,de=ob[y.priority],A=gn+T[P]+2,W=T[te]+x[te]-T[P]-4,K=y.checklist??[];return Re(nb,{id:String(y.seq),showIndicator:u===y.seq&&p!==y.seq,children:F=>wt(Ae,{sx:{borderBottom:H===l.length-1&&E?"none":`1px solid ${i.timeline.gridColor}`,position:"relative",zIndex:1,opacity:p===y.seq?.45:1},children:[wt(Ae,{onContextMenu:O=>a(y,O),sx:{display:"flex",height:Ss,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[Re(tb,{task:y,dragHandle:Re(Ae,{component:"span",className:"taskbox-timeline-handle",...F,onClick:O=>O.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:i.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:i.colors.accentOnSurface}},children:(()=>{let O=Oe(y.icon||_e)??jg;return Re(O,{sx:{fontSize:17}})})()}),onPointerDown:I,onClick:M}),Re(Cs,{title:`${y.title} (${y.start_date||"?"} ~ ${y.due_date||"?"})`,arrow:!0,enterDelay:300,children:Re(Ae,{onPointerDown:I,onClick:O=>M(y,O),sx:{position:"absolute",top:(Ss-20)/2,left:A,width:Math.max(la-4,W),height:20,borderRadius:1,bgcolor:de.bg,border:`1px solid ${de.border}`,opacity:y.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),K.map((O,L)=>Re(Ae,{sx:{display:"flex",height:Qg,position:"relative",mt:L===0?`${Jg}px`:0,mb:L===K.length-1?`${Zg}px`:0},children:Re(Ae,{sx:{width:gn,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:i.timeline.bg,borderRight:`1px solid ${i.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:O.checked?i.colors.textMuted:i.colors.textPrimary},children:wt(Ae,{onClick:()=>n(y.seq,L,!O.checked),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[O.checked?Re(Lg,{sx:{fontSize:17,color:i.colors.accentOnSurface,flexShrink:0}}):Re(Ng,{sx:{fontSize:17,color:i.colors.textMuted,flexShrink:0}}),Re(Ae,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:O.checked?"line-through":"none"},children:O.label})]})})},`${y.seq}-check-${L}`))]})},y.seq)}),l.length===0?Re(Ae,{sx:{py:8,textAlign:"center",color:i.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})})})}import{jsx as Ut}from"react/jsx-runtime";function Nw(e){switch(e.view){case"card":case"kanban":{let{view:o,...t}=e;return Ut(ea,{...t,columnAxis:o==="kanban"?"status":"project"})}case"sprint":{let{view:o,...t}=e;return Ut(ea,{...t,columnAxis:"sprint"})}case"calendar":{let{view:o,...t}=e;return Ut(ss,{...t})}case"month":{let{view:o,...t}=e;return Ut(xs,{...t})}case"agenda":{let{view:o,...t}=e;return Ut(ks,{...t})}case"timeline":{let{view:o,...t}=e;return Ut(vs,{...t})}default:{let{view:o,...t}=e;return Ut($l,{...t})}}}var Fw=["list","card","kanban","calendar","month","timeline"];import{Box as bo}from"@mui/material";function rb(e){let o=String(e??"").trim();if(!o)return 0;let t=0,n=!1;for(let r of o.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let a=parseFloat(r[1]),i=r[2].toLowerCase();n=!0,i==="m"||i==="\uBD84"?t+=a/60:i==="d"||i==="\uC77C"?t+=a*8:t+=a}if(!n){let r=parseFloat(o);Number.isFinite(r)&&(t+=r)}return t}function Is(e){let o=Math.round(e*10)/10;return`${o%1===0?o.toFixed(0):o.toFixed(1)}\uC2DC\uAC04`}function _s(e,o,t){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(o))return 0;let n=new Date(`${e}T00:00:00`),r=new Date(`${o}T00:00:00`);if(r<n||r.getTime()-n.getTime()>3660*864e5)return 0;let a=0;for(let i=new Date(n);i<=r;i.setDate(i.getDate()+1)){let l=i.getDay();if(l===0||l===6)continue;let u=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")}`;t.has(u)||(a+=1)}return a}function ws(e){return e.reduce((o,t)=>t.completed?o:o+rb(t.estimated_time),0)}import{Fragment as ib,jsx as Dt,jsxs as zo}from"react/jsx-runtime";function Ds(e,o){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(o))return null;let t=new Date(`${e}T00:00:00`),n=new Date(`${o}T00:00:00`);return Math.round((t.getTime()-n.getTime())/864e5)}function Os({tasks:e,todayStr:o,showProgress:t=!0,dday:n=null,workdaysLeft:r=null,showPoints:a=!0,showHours:i=!0,showOverdue:l=!0,showInfo:u=!0,inline:c=!1}){let p=le(),d=e.filter(M=>!M.archived),s=d.filter(M=>M.completed).length,m=d.length>0?Math.round(s/d.length*100):0,f=d.filter(M=>!M.completed&&!M.is_event&&!!M.due_date&&M.due_date.slice(0,10)<o).length,B=d.reduce((M,J)=>J.completed?M:M+(J.story_points??0),0),b=ws(d),h=t?Dt(bo,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:p.summary.gaugeHeight,borderRadius:3,bgcolor:p.summary.gaugeTrackColor},children:Dt(bo,{sx:{height:"100%",borderRadius:3,width:`${m}%`,bgcolor:m>=100?p.summary.gaugeCompleteColor:p.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,x=t?zo(bo,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:p.summary.textColor},children:[m,"%"]}):null,T={color:p.summary.numberColor,fontWeight:700,fontSize:c?15:14},g=d.length-s,v=zo(ib,{children:[c?null:zo("span",{children:["\uB0A8\uC740 ",Dt(bo,{component:"span",sx:T,children:g}),"\uAC74"]}),l&&f>0?zo(bo,{component:"span",sx:{color:p.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",Dt(bo,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:f}),"\uAC74"]}):null,a&&B>0?zo("span",{children:[Dt(bo,{component:"span",sx:T,children:B}),"SP"]}):null,i&&b>0?zo("span",{children:["\uC57D ",Dt(bo,{component:"span",sx:T,children:Is(b).replace("\uC2DC\uAC04","")}),"\uC2DC\uAC04"]}):null]}),C=typeof r=="number"&&Number.isFinite(r)?zo("span",{children:["\uADFC\uBB34\uC77C ",Dt(bo,{component:"span",sx:T,children:r}),"\uC77C"]}):null,I=typeof n=="number"&&Number.isFinite(n)?Dt(bo,{component:"span",sx:{ml:c?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:p.summary.overdueColor,color:p.colors.textInverse,lineHeight:1.6},children:n===0?"D-day":n>0?`D-${n}`:`D+${-n}`}):null;return c?zo(bo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:p.summary.textColor,whiteSpace:"nowrap",...p.summary.sx},children:[u?v:null,u?C:null,u?I:null,h,x]}):zo(bo,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[t?zo(bo,{sx:{display:"flex",alignItems:"center",gap:1},children:[h,x]}):null,zo(bo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:p.summary.textColor},children:[v,C,I]})]})}import{useMemo as ab}from"react";import{jsx as lb}from"react/jsx-runtime";function Zw({sprint:e,tasks:o,todayStr:t,...n}){let r=e.status==="closed"?null:Ds(e.end_date,t),a=r!==null&&r>=0,i=ab(()=>{if(!a)return[];let c=Number(t.slice(0,4)),p=Number(e.end_date.slice(0,4))||c,d=[];for(let s=c;s<=Math.max(c,p);s+=1)d.push(s);return d},[a,t,e.end_date]),l=vt(i),u=a?_s(t,e.end_date,new Set(l.keys())):null;return lb(Os,{tasks:o,todayStr:t,dday:r,workdaysLeft:u,...n})}import{useEffect as bb,useRef as hb,useState as kb}from"react";import{Box as ma}from"@mui/material";import{Children as sb}from"react";import{Box as ca,CircularProgress as cb}from"@mui/material";import{jsx as $r}from"react/jsx-runtime";var Ms={xs:2,md:3};function Es(){return $r(ca,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:$r(cb,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function Ps({children:e}){return $r(ca,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:Ms,pb:Ms},children:sb.map(e,o=>o==null||o===!1?null:$r(ca,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:o}))})}import{Box as dt,Button as pb,Checkbox as fb,Typography as Ot}from"@mui/material";import zs from"@mui/icons-material/CheckCircle";import xb from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as db,jsx as Rs}from"react/jsx-runtime";var mb="taskbox-search-highlight";function ub(e,o){let t=o?.keyPrefix??"hl";return e.map((n,r)=>Rs("span",{className:n.highlight?o?.highlightClassName??mb:o?.className,style:n.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:n.text},`${t}-${n.text}-${r}`))}function Kr({text:e,keyword:o,fallback:t="-",className:n,highlightClassName:r,keyPrefix:a}){let i=String(e??"").trim()||t,l=yr(i,o);return Rs(db,{children:ub(l,{className:n,highlightClassName:r,keyPrefix:a})})}import{jsx as ge,jsxs as bn}from"react/jsx-runtime";var gb={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:po(12.5),fontWeight:500,lineHeight:1.4},ut={fontSize:po(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function Yo({label:e,children:o}){return bn(dt,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[ge(dt,{sx:gb,children:e}),ge(dt,{sx:{...ut,flex:1,pt:.2},children:o})]})}function qs({task:e,statusOptions:o,projectLabel:t,searchText:n,todayStr:r,onRequestToggleCompleted:a,onOpenDetail:i,onTaskContextMenu:l,targetSummary:u="",ackInfo:c,completeLocked:p=!1,unread:d=!1,noticeReadOnly:s=!1,onAckConfirm:m,onAckListClick:f,myManaged:B=!1}){let b=e.is_event?An(e):fo(e),h=Vo(e.start_date),x=Vo(e.due_date),T=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<r,g=(e.receiver_names??[]).filter(Boolean);return bn(dt,{role:"button",tabIndex:0,onClick:()=>i(e),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),i(e))},onContextMenu:v=>l(e,v),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",position:"relative"},children:[B?ge(dt,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,bn(dt,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[!s&&!p?ge(fb,{checked:e.completed,icon:ge(xb,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:ge(zs,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:v=>v.stopPropagation(),onChange:(v,C)=>a({anchorEl:v.currentTarget,taskSeq:e.seq,nextCompleted:C}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{let v=Oe(e.icon||(e.is_notice?Mo:_e));if(!v)return null;let C=e.icon_color||(e.is_notice?"#e5484d":"#1e3a8a");return ge(v,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:C}})})(),ge(Ot,{sx:{fontSize:po(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed?"#9a9a97":"#111827",textDecoration:e.completed?"line-through":"none"},children:ge(Kr,{text:e.title,keyword:n})}),d?ge(dt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:po(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),bn(dt,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[ge(Yo,{label:b?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:bn(dt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:[b?ge(we,{option:b,small:!0}):null,ge(Eo,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?ge(Yo,{label:"\uB77C\uBCA8",children:ge(Tt,{labelKeys:e.label_keys,labelOptions:o})}):null,t?ge(Yo,{label:"\uD504\uB85C\uC81D\uD2B8",children:ge(Ot,{sx:ut,children:t})}):null,h?ge(Yo,{label:"\uC2DC\uC791",children:ge(Ot,{sx:ut,children:h})}):null,x?ge(Yo,{label:"\uB9C8\uAC10",children:bn(Ot,{sx:{...ut,color:T?"#e5484d":ut.color,fontWeight:T?600:400},children:[x,T?" \xB7 \uC9C0\uC5F0":""]})}):null,e.is_notice?ge(Yo,{label:"\uB300\uC0C1\uC790",children:ge(Ot,{sx:ut,children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,e.is_notice&&c?ge(Yo,{label:"\uD655\uC778",children:ge(pb,{size:"small",variant:c.canAck?"contained":"outlined",color:"inherit",startIcon:c.acked?ge(zs,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:v=>{v.stopPropagation(),c.canAck?m?.(e):f?.(e,v.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:po(13),...c.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:c.canAck?"\uD655\uC778":`${c.count}/${c.total}`})}):null,!e.is_notice&&e.manager_name?ge(Yo,{label:"\uCC45\uC784\uC790",children:ge(Ot,{sx:ut,children:ge(Kr,{text:e.manager_name,keyword:n})})}):null,!e.is_notice&&g.length>0?ge(Yo,{label:"\uCC38\uC870\uC790",children:ge(Ot,{sx:ut,children:g.join(", ")})}):null,e.note?ge(Yo,{label:"\uBE44\uACE0",children:ge(Ot,{sx:ut,children:ge(Kr,{text:e.note,keyword:n})})}):null]})]})}import{jsx as hn,jsxs as Tb}from"react/jsx-runtime";function ID({tasks:e,statusOptions:o,customTabs:t,loading:n,searchText:r,todayStr:a,onToggleCompleted:i,onOpenDetail:l,onTaskContextMenu:u,getTargetSummary:c,getAckInfo:p,getNoticeReadOnly:d,isTaskUnread:s,getCompleteLocked:m,onAckConfirm:f,onAckListClick:B,onEndReached:b,myAccountSeq:h=0}){let x=new Map(t.map(C=>[C.key,C.label])),[T,g]=kb(null),v=hb(null);return bb(()=>{let C=v.current;if(!b||!C)return;let I=new IntersectionObserver(M=>{M[0]?.isIntersecting&&b()});return I.observe(C),()=>I.disconnect()},[b,e.length]),e.length===0?n?hn(Es,{}):hn(ma,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Tb(ma,{sx:{minWidth:0},children:[hn(Ps,{children:e.map(C=>hn(qs,{myManaged:h>0&&!C.is_notice&&!C.is_event&&(C.manager_account_seq??0)===h,task:C,statusOptions:o,projectLabel:C.tab_key?x.get(C.tab_key)??"":"",searchText:r,todayStr:a,onRequestToggleCompleted:g,onOpenDetail:l,onTaskContextMenu:u,targetSummary:C.is_notice?c?.(C):void 0,ackInfo:C.is_notice?p?.(C):void 0,noticeReadOnly:C.is_notice?d?.(C):!1,unread:s?.(C)??!1,completeLocked:m?.(C)??!1,onAckConfirm:f,onAckListClick:B},C.seq))}),b?hn(ma,{ref:v,sx:{height:"1px"}}):null,hn(Ue,{open:!!T,anchorEl:T?.anchorEl??null,title:T?.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:T?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>g(null),onConfirm:()=>{T&&i(T.taskSeq,T.nextCompleted),g(null)}})]})}import{useEffect as uk,useRef as dk,useState as pc}from"react";import{Box as Qn,Button as fc,Divider as pk,Drawer as fk,IconButton as Ca,Tooltip as xk}from"@mui/material";import gk from"@mui/icons-material/Close";import bk from"@mui/icons-material/ArrowBack";import hk from"@ehfuse/overlay-scrollbar";import{Box as ua,ButtonBase as yb,Divider as Sb,Popover as Bb}from"@mui/material";import Cb from"@mui/icons-material/Check";import vb from"@ehfuse/overlay-scrollbar";import{jsx as Vt,jsxs as Ls}from"react/jsx-runtime";var As=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Ur({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:a}){return Vt(Bb,{transitionDuration:0,open:!!e,anchorEl:e,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:Ls(ua,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[Vt(vb,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:Vt(Ir,{value:o||_e,onChange:i=>{n(i),a()}})}),r?Ls(ua,{sx:{px:1.25,pb:1.25},children:[Vt(Sb,{sx:{mb:1,borderColor:"#efefed"}}),Vt(ua,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:As.map(i=>{let l=(t||As[0])===i;return Vt(yb,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${i}`,onClick:()=>r(i),sx:{width:26,height:26,borderRadius:"50%",bgcolor:i,display:"flex",alignItems:"center",justifyContent:"center"},children:l?Vt(Cb,{sx:{fontSize:15,color:"#ffffff"}}):null},i)})})]}):null]})})}import{useState as mc}from"react";import{Box as Yn,ButtonBase as ok,Divider as jn,Menu as tk,MenuItem as nk}from"@mui/material";import rk from"@mui/icons-material/SubjectOutlined";import ik from"@mui/icons-material/StickyNote2Outlined";import ak from"@mui/icons-material/LabelOutlined";import lk from"@mui/icons-material/DirectionsRunOutlined";import sk from"@mui/icons-material/SpeedOutlined";import{TextField as ck}from"@ehfuse/mui-form-controls";import{InfoAlert as mk}from"@ehfuse/alerts";import{useState as Mt}from"react";import{Box as Gs,Divider as Kb,ListItemIcon as Ub,Menu as fa,MenuItem as Un}from"@mui/material";import Vb from"@mui/icons-material/Add";import Gr from"@mui/icons-material/Check";import Gb from"@mui/icons-material/ViewKanbanOutlined";import Yb from"@mui/icons-material/CalendarTodayOutlined";import jb from"@mui/icons-material/EventOutlined";import Xb from"@mui/icons-material/PersonOutlineOutlined";import $s from"@mui/icons-material/PeopleAltOutlined";import Qb from"@mui/icons-material/FlagOutlined";import Ks from"@mui/icons-material/TimerOutlined";import Jb from"@mui/icons-material/NotificationsNoneOutlined";import Zb from"@mui/icons-material/InboxOutlined";import eh from"@mui/icons-material/PlaceOutlined";import oh from"@mui/icons-material/MapOutlined";import{DatePicker as th,TimePicker as Us}from"@ehfuse/mui-datetime-picker";var jo="@media (max-width: 719.95px)";function so(e){return{[jo]:{order:e}}}import{useEffect as Ib,useState as _b}from"react";import{Box as wb}from"@mui/material";import{jsx as Db}from"react/jsx-runtime";function pt({value:e,placeholder:o,readOnly:t,onCommit:n}){let r=le(),[a,i]=_b(e);return Ib(()=>i(e),[e]),Db(wb,{component:"input",spellCheck:!1,value:a,readOnly:t,placeholder:o,onChange:l=>i(l.target.value),onBlur:()=>{a.trim()!==e&&n(a.trim())},onKeyDown:l=>{l.key==="Enter"&&l.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:r.colors.textPrimary,caretColor:r.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as da}from"@mui/material";import{jsx as Ob,jsxs as Ns}from"react/jsx-runtime";function xe({icon:e,label:o,onClick:t,sx:n,children:r}){return Ns(da,{sx:[{display:"flex",alignItems:"center",minHeight:26,[jo]:{minHeight:25}},...Array.isArray(n)?n:[n]],children:[Ns(da,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,o]}),Ob(da,{onClick:t?a=>t(a.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:t?"pointer":"default","&:hover":t?{bgcolor:"#f2f2f0"}:void 0,[jo]:{py:.25}},children:r})]})}import{Suspense as Mb,lazy as Eb,useEffect as Pb,useState as Fs}from"react";import{Box as pa,Dialog as Rb,DialogContent as zb,DialogTitle as qb,IconButton as Hs,Tooltip as Ab}from"@mui/material";import Lb from"@mui/icons-material/Close";import Nb from"@mui/icons-material/Search";import{Fragment as $b,jsx as qo,jsxs as Vr}from"react/jsx-runtime";function Fb(e){return qo(pa,{sx:{p:3,fontSize:14,color:"#9a9a97"},children:"\uC8FC\uC18C \uAC80\uC0C9 \uBAA8\uB4C8(react-daum-postcode)\uC744 \uBD88\uB7EC\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC785\uB825\uD574 \uC8FC\uC138\uC694."})}var Hb=Eb(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:Fb})));function Wb(e){if(e.addressType!=="R")return e.address;let o="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(o+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(o+=o!==""?`, ${e.buildingName}`:e.buildingName),o!==""?`${e.address} (${o})`:e.address}function Ws({value:e,placeholder:o="\uC8FC\uC18C \uC785\uB825",readOnly:t,onCommit:n}){let[r,a]=Fs(e),[i,l]=Fs(!1),u=yo().slots?.addressSearch;Pb(()=>a(e),[e]);let c=d=>{a(d),l(!1),d!==e&&n(d)};return Vr($b,{children:[Vr(pa,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[qo(pa,{component:"input",spellCheck:!1,value:r,readOnly:t,placeholder:o,onChange:d=>a(d.target.value),onBlur:()=>{i||r.trim()!==e&&n(r.trim())},onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),!t&&l(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),t?null:qo(Ab,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:qo(Hs,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>l(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:qo(Nb,{sx:{fontSize:17}})})})]}),u?qo(u,{open:i,onComplete:c,onClose:()=>l(!1)}):Vr(Rb,{open:i,onClose:()=>l(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[Vr(qb,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",qo(Hs,{onClick:()=>l(!1),size:"small",children:qo(Lb,{})})]}),qo(zb,{style:{padding:0},dividers:!0,children:i?qo(Mb,{fallback:null,children:qo(Hb,{onComplete:d=>{c(Wb(d))},onClose:()=>l(!1),defaultQuery:r,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Yr,jsx as Y,jsxs as Ao}from"react/jsx-runtime";function nh(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function Vs(e){let[o="00",t="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(o)?o:"00",minute:/^\d{2}$/.test(t)?t:"00"}}function Gt({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Y(Gs,{component:"span",sx:{color:"#9a9a97"},children:e})}function jr({values:e,customTabs:o,avatarSrcByName:t,showEstimatedTime:n=!1,managerLocked:r=!1,notice:a=!1,event:i=!1,readOnly:l=!1,targetSummary:u="",narrowCollapsedSx:c,reminderLocked:p=!1,managerAction:d,hideProject:s=!1,leading:m,trailing:f,onChangeProject:B,onChangeStartDate:b,onChangeDueDate:h,onChangeReminder:x,onChangePriority:T,onChangeEstimatedTime:g,onChangeEventTime:v,onChangeEventPlace:C,onChangeEventAddress:I,onMemberEdit:M,onAddProject:J}){let[E,X]=Mt(null),[w,y]=Mt(!1),[H,N]=Mt(null),[$,P]=Mt(null),[te,de]=Mt(null),[A,W]=Mt(null),[K,F]=Mt(null),[O,L]=Mt(null),Q=He(),Z=Uo(),ue=R=>[so(R),...c?Array.isArray(c)?c:[c]:[]],ee=o.find(R=>R.key===e.tabKey),ye=o.filter(R=>!R.archived);return Ao(Yr,{children:[Ao(Gs,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",columnGap:3,rowGap:.25,px:2,[jo]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[m,s?null:Y(xe,{icon:Y(Gb,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:l?void 0:R=>X(R),sx:ue(1),children:ee?(()=>{let R=Oe(ee.icon);return Ao(Yr,{children:[R?Y(R,{sx:{fontSize:16,color:"#1e3a8a"}}):null,ee.label]})})():"\uAE30\uBCF8"}),a?Y(xe,{icon:Y($s,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:l?void 0:()=>M("targets"),sx:so(7),children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!a&&!i?Y(xe,{icon:Y(Xb,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:r||l||!e.managerName&&d?void 0:()=>M("manager"),sx:so(7),children:e.managerName?Ao(Yr,{children:[Y(xo,{names:[e.managerName],size:20,avatarSrcByName:t}),e.managerName]}):d??Y(Gt,{})}):null,i?null:Y(xe,{icon:Y(Yb,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC790",onClick:l?void 0:R=>de(R),sx:so(2),children:e.startDate?Vo(e.startDate):Y(Gt,{})}),a?null:Y(xe,{icon:Y($s,{sx:{fontSize:17}}),label:i?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:l?void 0:()=>M("receivers"),sx:so(i?7:8),children:e.receiverNames.length>0?Ao(Yr,{children:[Y(xo,{names:e.receiverNames,size:20,avatarSrcByName:t}),e.receiverNames.length===1?e.receiverNames[0]:null]}):Y(Gt,{})}),Y(xe,{icon:Y(jb,{sx:{fontSize:17}}),label:i?"\uB0A0\uC9DC":"\uB9C8\uAC10\uAE30\uD55C",onClick:l?void 0:R=>W(R),sx:so(3),children:e.dueDate?Vo(e.dueDate):Y(Gt,{})}),i?Y(xe,{icon:Y(Ks,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:l?void 0:R=>L(R),sx:so(4),children:e.eventTime?e.eventTime:Y(Gt,{label:"\uC885\uC77C"})}):null,i?Y(xe,{icon:Y(eh,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:so(5),children:Y(pt,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:l,onCommit:R=>C?.(R)})}):null,n?Y(xe,{icon:Y(Ks,{sx:{fontSize:17}}),label:"\uC608\uC0C1\uC2DC\uAC04",onClick:l?void 0:R=>F(R),sx:ue(4),children:e.estimatedTime?e.estimatedTime:Y(Gt,{})}):null,Y(xe,{icon:Y(Jb,{sx:{fontSize:17}}),label:"\uB9AC\uB9C8\uC778\uB354",onClick:l||p?void 0:R=>P(R),sx:ue(i?8:5),children:e.reminder==="none"?Y(Gt,{label:"\uC5C6\uC74C"}):Ki(e.reminder)}),i?Y(xe,{icon:Y(oh,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},so(6)],children:Y(Ws,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:l,onCommit:R=>I?.(R)})}):null,i?null:Y(xe,{icon:Y(Qb,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:l?void 0:R=>N(R),sx:ue(6),children:Y(Eo,{priority:e.priority,small:!0})}),f]}),Ao(fa,{transitionDuration:0,anchorEl:E,open:!!E,onClose:()=>X(null),...Z,children:[Ao(Un,{selected:!e.tabKey,onClick:()=>{B(""),X(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Y(Zb,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),ye.map(R=>{let k=Oe(R.icon),ne=e.tabKey===R.key;return Ao(Un,{selected:ne,onClick:()=>{B(R.key),X(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[k?Y(k,{sx:{fontSize:17,color:"#1e3a8a"}}):null,R.label,ne?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R.key)}),J?[Y(Kb,{},"add-project-divider"),Ao(Un,{onClick:()=>y(!0),sx:{fontSize:14,color:"#787774"},children:[Y(Ub,{children:Y(Vb,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),J?Y(_r,{open:w,onClose:()=>y(!1),onSubmit:(R,k,ne)=>{(async()=>{let re=await J(R,k,ne);re&&B(re)})(),X(null)}}):null,Y(fa,{transitionDuration:0,anchorEl:H,open:!!H,onClose:()=>N(null),...Z,children:["high","medium","low"].map(R=>Ao(Un,{selected:e.priority===R,onClick:()=>{T(R),N(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[Y(Eo,{priority:R,small:!0}),e.priority===R?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R))}),Y(fa,{transitionDuration:0,anchorEl:$,open:!!$,onClose:()=>P(null),...Z,children:$i(i&&!!e.eventTime).map(R=>Ao(Un,{selected:e.reminder===R.value,onClick:()=>{x(R.value),P(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[R.label,e.reminder===R.value?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R.value))}),n?Y(Us,{anchorEl:K,open:!!K,onClose:()=>F(null),value:Vs(e.estimatedTime),format:"HH:mm",minuteStep:5,autoApply:!0,centered:Q,locale:"ko",onChange:(R,k)=>{g?.(`${R}:${k}`),F(null)}}):null,i?Y(Us,{anchorEl:O,open:!!O,onClose:()=>L(null),value:Vs(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:Q,locale:"ko",onChange:(R,k)=>{v?.(`${R}:${k}`),L(null)}}):null,Y(th,{anchorEl:te,open:!!te,onClose:()=>de(null),selectedDate:nh(e.startDate),centered:Q,onDateChange:R=>{b(qe(R)),de(null)}}),Y(St,{anchorEl:A,open:!!A,date:e.dueDate,reminder:e.reminder,hideReminder:p,centered:Q,onClose:()=>W(null),onDateChange:h,onReminderChange:x})]})}import{useState as rh}from"react";import{Box as ih,Menu as ah,MenuItem as lh}from"@mui/material";import sh from"@mui/icons-material/RepeatOutlined";import ch from"@mui/icons-material/DevicesOutlined";import mh from"@mui/icons-material/ScreenSearchDesktopOutlined";import uh from"@mui/icons-material/SellOutlined";import dh from"@mui/icons-material/TaskAltOutlined";import{Fragment as Ys,jsx as Ye,jsxs as js}from"react/jsx-runtime";function xa({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Ye(ih,{component:"span",sx:{color:"#9a9a97"},children:e})}function Xr({values:e,readOnly:o=!1,showResolution:t=!1,onChangeRepro:n,onChangeDevice:r,onChangeWhere:a,onChangeVersion:i,onChangeResolution:l}){let[u,c]=rh(null),p=u?.field==="repro"?Bi:u?.field==="device"?Ci:vi,d=s=>{u?.field==="repro"?n(s):u?.field==="device"?r(s):u?.field==="resolution"&&l?.(s),c(null)};return js(Ys,{children:[js(Ys,{children:[Ye(xe,{icon:Ye(sh,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:o?void 0:s=>c({field:"repro",el:s}),children:xl(e.repro)||Ye(xa,{label:"\uC120\uD0DD"})}),Ye(xe,{icon:Ye(ch,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:o?void 0:s=>c({field:"device",el:s}),children:gl(e.device)||Ye(xa,{label:"\uC120\uD0DD"})}),Ye(xe,{icon:Ye(mh,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Ye(pt,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:o,onCommit:a})}),Ye(xe,{icon:Ye(uh,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Ye(pt,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:o,onCommit:i})}),t?Ye(xe,{icon:Ye(dh,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:o?void 0:s=>c({field:"resolution",el:s}),children:ur(e.resolution)||Ye(xa,{label:"\uC120\uD0DD"})}):null]}),Ye(ah,{open:!!u,anchorEl:u?.el??null,onClose:()=>c(null),transitionDuration:0,children:p.map(s=>Ye(lh,{onClick:()=>d(s.key),sx:{fontSize:14},children:s.name},s.key))})]})}import{Box as Xs}from"@mui/material";import{jsxs as Qs}from"react/jsx-runtime";function _o({icon:e,title:o,titleExtra:t,children:n}){return Qs(Xs,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[Qs(Xs,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:14.5,fontWeight:500,color:"#37352f"},children:[e,o,t]}),n]})}import{useEffect as ph,useRef as ga,useState as fh}from"react";import{Box as ba,IconButton as xh,Tooltip as gh}from"@mui/material";import bh from"@mui/icons-material/ContentCopyOutlined";import hh from"@mui/icons-material/Check";import{EhfuseEditor as kh,minimalToolbarOptions as Th}from"@ehfuse/editor";import{jsx as Yt,jsxs as Sh}from"react/jsx-runtime";function ha(e){let o=e.trim();return o?o.startsWith("<")?e:`<p>${o}</p>`:"<p></p>"}function yh(e){let o=e.replace(/<br\s*\/?>/gi,`
|
|
1
|
+
var Mn="waiting",sr="replied";import{createContext as bm,useContext as hm,useMemo as nl}from"react";import{Box as km}from"@mui/material";var fi="--app-mobile-font-offset";function po(e,o=0){return`calc(${e}px + max(0px, var(${fi}, 0px) - ${o}px))`}import{jsx as tl}from"react/jsx-runtime";var rl=bm({});function Tm({config:e,children:o}){let t=nl(()=>e??{},[e]),n=t.mobileFontOffsetPx;return tl(rl.Provider,{value:t,children:n===void 0?o:tl(km,{sx:{display:"contents",[fi]:`${n}px`},children:o})})}function yo(){return hm(rl)}function xi(){let{buildFileUrl:e}=yo();return nl(()=>e||((o,t)=>{let n=[];return t?.thumb&&n.push(`thumb=${t.thumb}`),t?.download&&n.push("download=1"),`/api/v1/files/${o}${n.length?`?${n.join("&")}`:""}`}),[e])}function En(){let{uploadMaxMb:e}=yo();return e??50}import{useGlobalForm as rp}from"@ehfuse/forma";import il from"@mui/icons-material/DoNotDisturbAltOutlined";import al from"@mui/icons-material/BookmarkBorderOutlined";import ym from"@mui/icons-material/LabelOutlined";import Sm from"@mui/icons-material/FlagOutlined";import Bm from"@mui/icons-material/StarBorderOutlined";import Cm from"@mui/icons-material/FolderOutlined";import vm from"@mui/icons-material/EventOutlined";import Im from"@mui/icons-material/BuildOutlined";import _m from"@mui/icons-material/LocalShippingOutlined";import wm from"@mui/icons-material/StorefrontOutlined";import Dm from"@mui/icons-material/GroupsOutlined";import Om from"@mui/icons-material/LightbulbOutlined";import Mm from"@mui/icons-material/FavoriteBorderOutlined";import Em from"@mui/icons-material/AssignmentOutlined";import Pm from"@mui/icons-material/HomeOutlined";import Rm from"@mui/icons-material/WorkOutline";import zm from"@mui/icons-material/SchoolOutlined";import qm from"@mui/icons-material/LocalHospitalOutlined";import Am from"@mui/icons-material/RestaurantOutlined";import Lm from"@mui/icons-material/LocalFloristOutlined";import Nm from"@mui/icons-material/DirectionsCarOutlined";import Fm from"@mui/icons-material/CampaignOutlined";import Hm from"@mui/icons-material/SavingsOutlined";import Wm from"@mui/icons-material/Inventory2Outlined";import $m from"@mui/icons-material/CleaningServicesOutlined";import ll from"@mui/icons-material/HandymanOutlined";import Km from"@mui/icons-material/LocalPhoneOutlined";import Um from"@mui/icons-material/EmailOutlined";import Vm from"@mui/icons-material/ShoppingCartOutlined";import Gm from"@mui/icons-material/BarChartOutlined";import Ym from"@mui/icons-material/PrintOutlined";import jm from"@mui/icons-material/SecurityOutlined";import Xm from"@mui/icons-material/AlarmOutlined";import Qm from"@mui/icons-material/AttachFileOutlined";import Jm from"@mui/icons-material/PhotoCameraOutlined";import Zm from"@mui/icons-material/ImageOutlined";import eu from"@mui/icons-material/MenuBookOutlined";import ou from"@mui/icons-material/EditOutlined";import tu from"@mui/icons-material/KeyOutlined";import nu from"@mui/icons-material/LockOutlined";import ru from"@mui/icons-material/LockOpenOutlined";import iu from"@mui/icons-material/SettingsOutlined";import au from"@mui/icons-material/CloudOutlined";import lu from"@mui/icons-material/WifiOutlined";import su from"@mui/icons-material/ComputerOutlined";import cu from"@mui/icons-material/SmartphoneOutlined";import mu from"@mui/icons-material/TvOutlined";import uu from"@mui/icons-material/AccessTimeOutlined";import du from"@mui/icons-material/TimerOutlined";import pu from"@mui/icons-material/MapOutlined";import fu from"@mui/icons-material/PlaceOutlined";import xu from"@mui/icons-material/NavigationOutlined";import gu from"@mui/icons-material/FlightOutlined";import bu from"@mui/icons-material/TrainOutlined";import hu from"@mui/icons-material/DirectionsBusOutlined";import ku from"@mui/icons-material/DirectionsBikeOutlined";import Tu from"@mui/icons-material/DirectionsWalkOutlined";import yu from"@mui/icons-material/DirectionsRunOutlined";import Su from"@mui/icons-material/FitnessCenterOutlined";import Bu from"@mui/icons-material/SportsSoccerOutlined";import Cu from"@mui/icons-material/EmojiEventsOutlined";import vu from"@mui/icons-material/CardGiftcardOutlined";import Iu from"@mui/icons-material/CakeOutlined";import sl from"@mui/icons-material/CoffeeOutlined";import _u from"@mui/icons-material/LocalPizzaOutlined";import wu from"@mui/icons-material/ShoppingBagOutlined";import cl from"@mui/icons-material/CreditCardOutlined";import Du from"@mui/icons-material/AccountBalanceOutlined";import Ou from"@mui/icons-material/AccountBalanceWalletOutlined";import Mu from"@mui/icons-material/AttachMoneyOutlined";import Eu from"@mui/icons-material/ReceiptLongOutlined";import Pu from"@mui/icons-material/CalculateOutlined";import Ru from"@mui/icons-material/TrendingUpOutlined";import zu from"@mui/icons-material/ListAltOutlined";import qu from"@mui/icons-material/TaskAltOutlined";import Au from"@mui/icons-material/DoneAllOutlined";import Lu from"@mui/icons-material/WarningAmberOutlined";import Nu from"@mui/icons-material/InfoOutlined";import Fu from"@mui/icons-material/HelpOutlined";import Hu from"@mui/icons-material/SupportAgentOutlined";import Wu from"@mui/icons-material/PersonOutlined";import $u from"@mui/icons-material/PersonAddOutlined";import Ku from"@mui/icons-material/BadgeOutlined";import Uu from"@mui/icons-material/WbSunnyOutlined";import Vu from"@mui/icons-material/DarkModeOutlined";import Gu from"@mui/icons-material/LocalFireDepartmentOutlined";import Yu from"@mui/icons-material/WaterDropOutlined";import ju from"@mui/icons-material/BoltOutlined";import Xu from"@mui/icons-material/AutorenewOutlined";import Qu from"@mui/icons-material/ScienceOutlined";import Ju from"@mui/icons-material/MedicalServicesOutlined";import Zu from"@mui/icons-material/NotificationsOutlined";import ed from"@mui/icons-material/SendOutlined";import od from"@mui/icons-material/LinkOutlined";import td from"@mui/icons-material/PublicOutlined";import ml from"@mui/icons-material/ApartmentOutlined";import nd from"@mui/icons-material/PlumbingOutlined";import rd from"@mui/icons-material/ElectricalServicesOutlined";import id from"@mui/icons-material/ChatOutlined";import ad from"@mui/icons-material/DescriptionOutlined";import ld from"@mui/icons-material/FactCheckOutlined";import sd from"@mui/icons-material/RocketLaunchOutlined";import cd from"@mui/icons-material/PaletteOutlined";import md from"@mui/icons-material/MusicNoteOutlined";import ud from"@mui/icons-material/VideocamOutlined";import dd from"@mui/icons-material/ThumbUpOutlined";import pd from"@mui/icons-material/PushPinOutlined";import fd from"@mui/icons-material/SearchOutlined";import xd from"@mui/icons-material/VisibilityOutlined";import gd from"@mui/icons-material/VerifiedOutlined";import bd from"@mui/icons-material/TrackChangesOutlined";import hd from"@mui/icons-material/ExtensionOutlined";import kd from"@mui/icons-material/CodeOutlined";import Td from"@mui/icons-material/BugReportOutlined";import yd from"@mui/icons-material/SmartToyOutlined";import Sd from"@mui/icons-material/StorageOutlined";import Bd from"@mui/icons-material/QrCode2Outlined";import Cd from"@mui/icons-material/FileDownloadOutlined";import vd from"@mui/icons-material/FileUploadOutlined";import Id from"@mui/icons-material/MicOutlined";import _d from"@mui/icons-material/HeadphonesOutlined";import wd from"@mui/icons-material/MovieOutlined";import Dd from"@mui/icons-material/SportsEsportsOutlined";import Od from"@mui/icons-material/BrushOutlined";import Md from"@mui/icons-material/ArchitectureOutlined";import Ed from"@mui/icons-material/EngineeringOutlined";import Pd from"@mui/icons-material/FactoryOutlined";import Rd from"@mui/icons-material/AgricultureOutlined";import zd from"@mui/icons-material/DirectionsBoatOutlined";import qd from"@mui/icons-material/TwoWheelerOutlined";import Ad from"@mui/icons-material/HandshakeOutlined";import Ld from"@mui/icons-material/GavelOutlined";import Nd from"@mui/icons-material/BalanceOutlined";import Fd from"@mui/icons-material/TranslateOutlined";import Hd from"@mui/icons-material/PsychologyOutlined";import Wd from"@mui/icons-material/PetsOutlined";import $d from"@mui/icons-material/CelebrationOutlined";import Kd from"@mui/icons-material/BeachAccessOutlined";import Ud from"@mui/icons-material/AcUnitOutlined";import Vd from"@mui/icons-material/ForestOutlined";import Gd from"@mui/icons-material/LandscapeOutlined";import Yd from"@mui/icons-material/HotelOutlined";import jd from"@mui/icons-material/LocalLaundryServiceOutlined";import Xd from"@mui/icons-material/ChairOutlined";import Qd from"@mui/icons-material/LocalBarOutlined";import Jd from"@mui/icons-material/LunchDiningOutlined";import Zd from"@mui/icons-material/IcecreamOutlined";import ep from"@mui/icons-material/WorkspacePremiumOutlined";import op from"@mui/icons-material/DiamondOutlined";import tp from"@mui/icons-material/VaccinesOutlined";var gi="bookmark",_e="label",Mo="notifications",Pn="warning",Rn="#e53e3e",ul="none",bi=[{key:ul,Icon:il},{key:"label",Icon:ym},{key:"bookmark",Icon:al},{key:"flag",Icon:Sm},{key:"star",Icon:Bm},{key:"folder",Icon:Cm},{key:"event",Icon:vm},{key:"build",Icon:Im},{key:"shipping",Icon:_m},{key:"store",Icon:wm},{key:"groups",Icon:Dm},{key:"idea",Icon:Om},{key:"heart",Icon:Mm},{key:"assignment",Icon:Em},{key:"home",Icon:Pm},{key:"work",Icon:Rm},{key:"school",Icon:zm},{key:"hospital",Icon:qm},{key:"restaurant",Icon:Am},{key:"flower",Icon:Lm},{key:"car",Icon:Nm},{key:"campaign",Icon:Fm},{key:"savings",Icon:Hm},{key:"inventory",Icon:Wm},{key:"cleaning",Icon:$m},{key:"handyman",Icon:ll},{key:"phone",Icon:Km},{key:"email",Icon:Um},{key:"cart",Icon:Vm},{key:"chart",Icon:Gm},{key:"print",Icon:Ym},{key:"security",Icon:jm},{key:"alarm",Icon:Xm},{key:"attach",Icon:Qm},{key:"camera",Icon:Jm},{key:"image",Icon:Zm},{key:"book",Icon:eu},{key:"edit",Icon:ou},{key:"key",Icon:tu},{key:"lock",Icon:nu},{key:"unlock",Icon:ru},{key:"settings",Icon:iu},{key:"cloud",Icon:au},{key:"wifi",Icon:lu},{key:"computer",Icon:su},{key:"smartphone",Icon:cu},{key:"tv",Icon:mu},{key:"clock",Icon:uu},{key:"timer",Icon:du},{key:"map",Icon:pu},{key:"place",Icon:fu},{key:"navigation",Icon:xu},{key:"flight",Icon:gu},{key:"train",Icon:bu},{key:"bus",Icon:hu},{key:"bike",Icon:ku},{key:"walk",Icon:Tu},{key:"run",Icon:yu},{key:"fitness",Icon:Su},{key:"soccer",Icon:Bu},{key:"trophy",Icon:Cu},{key:"gift",Icon:vu},{key:"cake",Icon:Iu},{key:"coffee",Icon:sl},{key:"pizza",Icon:_u},{key:"bag",Icon:wu},{key:"card",Icon:cl},{key:"bank",Icon:Du},{key:"wallet",Icon:Ou},{key:"money",Icon:Mu},{key:"receipt",Icon:Eu},{key:"calculate",Icon:Pu},{key:"trending",Icon:Ru},{key:"listalt",Icon:zu},{key:"task",Icon:qu},{key:"doneall",Icon:Au},{key:"warning",Icon:Lu},{key:"info",Icon:Nu},{key:"help",Icon:Fu},{key:"support",Icon:Hu},{key:"person",Icon:Wu},{key:"personadd",Icon:$u},{key:"badge",Icon:Ku},{key:"sun",Icon:Uu},{key:"moon",Icon:Vu},{key:"fire",Icon:Gu},{key:"water",Icon:Yu},{key:"bolt",Icon:ju},{key:"renew",Icon:Xu},{key:"science",Icon:Qu},{key:"medical",Icon:Ju},{key:"notifications",Icon:Zu},{key:"send",Icon:ed},{key:"link",Icon:od},{key:"public",Icon:td},{key:"apartment",Icon:ml},{key:"plumbing",Icon:nd},{key:"electrical",Icon:rd},{key:"chat",Icon:id},{key:"description",Icon:ad},{key:"factcheck",Icon:ld},{key:"rocket",Icon:sd},{key:"palette",Icon:cd},{key:"music",Icon:md},{key:"video",Icon:ud},{key:"thumbup",Icon:dd},{key:"pin",Icon:pd},{key:"search",Icon:fd},{key:"eye",Icon:xd},{key:"verified",Icon:gd},{key:"target",Icon:bd},{key:"extension",Icon:hd},{key:"code",Icon:kd},{key:"bug",Icon:Td},{key:"robot",Icon:yd},{key:"storage",Icon:Sd},{key:"qrcode",Icon:Bd},{key:"download",Icon:Cd},{key:"upload",Icon:vd},{key:"mic",Icon:Id},{key:"headphones",Icon:_d},{key:"movie",Icon:wd},{key:"game",Icon:Dd},{key:"brush",Icon:Od},{key:"architecture",Icon:Md},{key:"engineering",Icon:Ed},{key:"factory",Icon:Pd},{key:"agriculture",Icon:Rd},{key:"boat",Icon:zd},{key:"motorcycle",Icon:qd},{key:"handshake",Icon:Ad},{key:"gavel",Icon:Ld},{key:"balance",Icon:Nd},{key:"translate",Icon:Fd},{key:"psychology",Icon:Hd},{key:"pets",Icon:Wd},{key:"celebration",Icon:$d},{key:"beach",Icon:Kd},{key:"snow",Icon:Ud},{key:"forest",Icon:Vd},{key:"mountain",Icon:Gd},{key:"hotel",Icon:Yd},{key:"laundry",Icon:jd},{key:"chair",Icon:Xd},{key:"bar",Icon:Qd},{key:"burger",Icon:Jd},{key:"icecream",Icon:Zd},{key:"medal",Icon:ep},{key:"diamond",Icon:op},{key:"vaccine",Icon:tp}],np={cafe:sl,payment:cl,business:ml,construction:ll};function Oe(e){return e===ul?null:bi.find(o=>o.key===e)?.Icon??np[String(e??"")]??al}function cr(e){return Oe(e)??il}var hi={title:"",icon:_e,icon_color:"",manager_name:"",manager_account_seq:0,receiver_names:[],receiver_account_seqs:[],is_notice:!1,is_event:!1,is_bug:!1,is_open:!1,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",sprint_seq:0,story_points:0,event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:"",due_date:"",reminder:"none",priority:"medium",label_keys:[],note:"",content:"",checklist:[],tab_key:""},ki={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function ip(e){let{formId:o="taskbox-create-form",initialValues:t,onValidate:n,onSubmit:r}=e;return rp({formId:o,initialValues:{...hi,...t},onValidate:n,onSubmit:r})}import{useGlobalFormaState as ap}from"@ehfuse/forma";var dl="taskbox-ui-state";function et(){return ap({stateId:dl,initialValues:ki})}import{useMemo as lp}from"react";import{useTheme as sp}from"@mui/material";function ln(e,o){let t=Math.max(0,Math.min(1,o));if(t<=0)return"transparent";let n=e.trim().replace("#",""),r=n.length===3?n.split("").map(u=>u+u).join(""):n;if(!/^[0-9a-fA-F]{6}$/.test(r))return e;let a=Number.parseInt(r.slice(0,2),16),i=Number.parseInt(r.slice(2,4),16),l=Number.parseInt(r.slice(4,6),16);return`rgba(${a}, ${i}, ${l}, ${t})`}function Ti(e,o){let t=Math.max(0,Math.min(1,o)),n=e.trim().replace("#",""),r=n.length===3?n.split("").map(c=>c+c).join(""):n;if(!/^[0-9a-fA-F]{6}$/.test(r))return e;let a=c=>Math.round(c+(255-c)*t),i=a(Number.parseInt(r.slice(0,2),16)),l=a(Number.parseInt(r.slice(2,4),16)),u=a(Number.parseInt(r.slice(4,6),16));return`#${[i,l,u].map(c=>c.toString(16).padStart(2,"0")).join("")}`}function yi(e,o,t){return t==="dark"?{accent:e,accentContrast:o,accentSoft:"#1d2b45",accentOnSurface:Ti(e,.45),danger:"#f87171",dangerSoft:"#3a1f22",success:"#4ade80",warning:"#fbbf24",textStrong:"#f8fafc",textPrimary:"#e2e8f0",textSecondary:"#a3adbb",textMuted:"#77808d",textInverse:"#0f1216",surface:"#161a1f",surfaceSubtle:"#1e232a",surfaceHover:"#272d36",border:"#2c333c",borderStrong:"#3b434e"}:{accent:e,accentContrast:o,accentSoft:"#eef4ff",accentOnSurface:e,danger:"#e5484d",dangerSoft:"#fdebec",success:"#16a34a",warning:"#e8a33d",textStrong:"#000000",textPrimary:"#37352f",textSecondary:"#787774",textMuted:"#9a9a97",textInverse:"#ffffff",surface:"#ffffff",surfaceSubtle:"#fafaf9",surfaceHover:"#f4f4f2",border:"#e6e6e3",borderStrong:"#dedddb"}}function cp(e,o){let t=o==="dark";return{bg:t?Ti(e.accent,.45):e.accent,color:t?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6}}function pl(e,o){return{...e,...o??{}}}function mr(e,o="light"){let t=cp(e,o),n=e.accentOnSurface;return{mode:o,colors:e,table:{bg:e.surface,borderColor:e.borderStrong,headerBg:e.surface,headerColor:e.textSecondary,headerActiveColor:e.textStrong,headerFilteredColor:n,headerFontSize:13,rowBg:e.surface,rowColor:e.textPrimary,rowSubColor:e.textSecondary,rowTitleColor:e.textStrong,rowTitleFontWeight:o==="dark"?400:500,rowHoverBg:e.surfaceHover,rowBorderColor:e.border,cellHoverBg:e.surfaceHover,emptyColor:e.textMuted,groupHeader:{bg:e.surfaceSubtle,hoverBg:e.surfaceHover,borderColor:e.border,labelColor:o==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:o==="dark"?400:700,minHeight:48,badge:{...t,borderRadius:4,width:34}}},board:{columnBg:e.surfaceSubtle,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...t,borderRadius:4,width:34}},summary:{gaugeTrackColor:o==="dark"?e.borderStrong:"#ececea",gaugeBarColor:n,gaugeCompleteColor:e.success,gaugeHeight:6,numberColor:n,overdueColor:e.danger,textColor:e.textStrong},actionButton:{bg:e.accent,color:e.accentContrast,hoverBg:e.accent},tabs:{bg:o==="dark"?e.surfaceSubtle:e.surface,color:o==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:o==="dark"?e.border:e.borderStrong,selectedBg:o==="dark"?e.surfaceHover:e.textStrong,selectedColor:o==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:e.surface,dateBandBg:e.surface,otherMonthBg:e.surfaceSubtle,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:o==="dark"?e.surfaceSubtle:e.surface,borderColor:e.border,hoverBg:e.surfaceHover,titleColor:e.textPrimary,subColor:e.textSecondary},timeline:{bg:e.surface,gridColor:e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,todayLineColor:e.accentOnSurface,barColor:e.accentOnSurface,overdueBarColor:e.danger},avatar:{ringColor:o==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:o==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function Si(e,o){if(!o)return e;let t=o.mode??e.mode,r={...t===e.mode?e.colors:yi(e.colors.accent,e.colors.accentContrast,t),...o.colors??{}},a=mr(r,t),{groupHeader:i,...l}=o.table??{},{badge:u,...c}=o.board??{},{badge:p,...d}=i??{};return{mode:t,colors:r,table:{...a.table,...l,groupHeader:{...a.table.groupHeader,...d,badge:pl(a.table.groupHeader.badge,p)}},board:{...a.board,...c,badge:pl(a.board.badge,u)},summary:{...a.summary,...o.summary??{}},chip:{...a.chip,...o.chip??{}},actionButton:{...a.actionButton,...o.actionButton??{}},tabs:{...a.tabs,...o.tabs??{}},avatar:{...a.avatar,...o.avatar??{}},calendar:{...a.calendar,...o.calendar??{}},card:{...a.card,...o.card??{}},timeline:{...a.timeline,...o.timeline??{}}}}function mp(e={}){let{mode:o="light",accent:t="#2563eb",accentContrast:n="#ffffff",input:r}=e;return Si(mr(yi(t,n,o),o),r)}function le(){let e=sp(),{theme:o}=yo(),t=e.palette.primary.main,n=e.palette.primary.contrastText,r=e.palette.mode==="dark"?"dark":"light";return lp(()=>Si(mr(yi(t,n,r),r),o),[t,n,r,o])}import{useCallback as rt,useEffect as Fl,useMemo as Hn,useRef as Nf,useState as it}from"react";import{Box as Po,Divider as Ff,ListItemIcon as Hf,Menu as Hl,MenuItem as wr}from"@mui/material";import Wf from"@mui/icons-material/Add";import $f from"@mui/icons-material/ArrowUpward";import Kf from"@mui/icons-material/ArrowDownward";import Uf from"@mui/icons-material/KeyboardArrowDown";import Vf from"@mui/icons-material/KeyboardArrowRight";import Yi from"@mui/icons-material/Check";import Gf from"@mui/icons-material/FilterList";import Yf from"@mui/icons-material/InboxOutlined";import{Virtuoso as Wl}from"react-virtuoso";import jf from"@ehfuse/overlay-scrollbar";import{DatePicker as Xf}from"@ehfuse/mui-datetime-picker";function up(e){let o=String(e??"").trim().replace("T"," "),t=o.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3]),Number(t[4]??0),Number(t[5]??0),Number(t[6]??0)):new Date(o)}function qe(e,o="YYYY-MM-DD"){let t=typeof e=="string"?up(e):e;if(!e||e===""||isNaN(t.getTime()))return"";let n=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),a=t.getDate().toString().padStart(2,"0"),i=n.toString().slice(-2);switch(o){case"YYYY-MM-DD":return`${n}-${r}-${a}`;case"YY.MM.DD":return`${i}.${r}.${a}`;case"MM/DD/YYYY":return`${r}/${a}/${n}`;case"DD.MM.YYYY":return`${a}.${r}.${n}`;case"YYYYMMDD":return`${n}${r}${a}`;default:return o.replace(/YYYY/g,n.toString()).replace(/YY/g,i).replace(/MM/g,r).replace(/DD/g,a)}}import{Box as fl}from"@mui/material";import{jsx as pp,jsxs as fp}from"react/jsx-runtime";var dp={high:{label:"\uB192\uC74C",dot:"#e5484d",bgcolor:"#fdebec",color:"#c4554d"},medium:{label:"\uC911\uAC04",dot:"#2f80ed",bgcolor:"#e3eefb",color:"#1d4f91"},low:{label:"\uB0AE\uC74C",dot:"#9a9a97",bgcolor:"#efefed",color:"#57564f"}};function Eo({priority:e,small:o=!1,plain:t=!1}){let n=dp[e],r=le(),a=r.mode==="dark",i=t||e==="low";return fp(fl,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:o?.5:.75,px:i?0:o?.9:1.25,py:i?0:o?.25:.5,borderRadius:.75,fontSize:o?11.5:13,fontWeight:500,bgcolor:i?"transparent":a?ln(n.dot,r.chip.darkBgAlpha):n.bgcolor,color:i?a?r.chip.plainColor:n.color:a?r.chip.darkTextSource==="fg"?n.color:n.dot:n.color,whiteSpace:"nowrap"},children:[pp(fl,{component:"span",sx:{width:o?6:8,height:o?6:8,borderRadius:"50%",bgcolor:n.dot}}),n.label]})}import{Menu as kp,MenuItem as Tp}from"@mui/material";import yp from"@mui/icons-material/Check";function Uo(){return{}}var Bi=[{key:"always",name:"\uD56D\uC0C1"},{key:"often",name:"\uC790\uC8FC"},{key:"sometimes",name:"\uAC00\uB054"},{key:"once",name:"1\uD68C"},{key:"unable",name:"\uC7AC\uD604\uBD88\uAC00"}],Ci=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],vi=[{key:"fixed",name:"\uC218\uC815\uC644\uB8CC"},{key:"duplicate",name:"\uC911\uBCF5"},{key:"cannot_reproduce",name:"\uC7AC\uD604\uBD88\uAC00"},{key:"by_design",name:"\uC0AC\uC591\uB300\uB85C"},{key:"wont_fix",name:"\uC548 \uACE0\uCE68"}];function xl(e){return Bi.find(o=>o.key===e)?.name??""}function gl(e){return Ci.find(o=>o.key===e)?.name??""}function ur(e){return vi.find(o=>o.key===e)?.name??""}function Ii(e,o=new Date){if(!e.is_event)return!1;let t=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return!1;let n=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(n)){let a=new Date(`${t}T${n}:00`);return!Number.isNaN(a.getTime())&&a.getTime()<=o.getTime()}let r=new Date(`${t}T00:00:00`);return Number.isNaN(r.getTime())?!1:(r.setDate(r.getDate()+1),r.getTime()<=o.getTime())}function dr(e,o=new Date){return e.is_event?Ii(e,o):!!e.completed}var zt=[{key:"not_started",name:"\uC2DC\uC791\uC804",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"},{key:"in_progress",name:"\uC9C4\uD589\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"hold",name:"\uBCF4\uB958",bg:"#fbeee0",fg:"#8a5a2b",dot:"#d9730d"},{key:Mn,name:"\uD655\uC778\uC911",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:sr,name:"\uD655\uC778\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"}],qn=zt.filter(e=>e.key!==Mn&&e.key!==sr);function pr(e){return zt.find(o=>o.key===e)??zt[0]}var _i={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function fo(e){if(e.is_notice)return bl(e.status);if(e.is_bug&&e.completed){let o=ur(e.resolution)||"\uC644\uB8CC";return{..._i,name:o}}return e.completed?_i:e.is_bug?gp(e.status):pr(e.status)}var xp={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function An(e){return Ii(e)?xp:null}var zn=[{key:"notice_scheduled",name:"\uAC8C\uC2DC\uC608\uC815",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:"notice_active",name:"\uAC8C\uC2DC\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"notice_closed",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"}];function bl(e){return zn.find(o=>o.key===e)??zn[1]}var wi="__closed__",qt=[{key:"bug_received",name:"\uC811\uC218",bg:"#fdeaea",fg:"#9b2c2c",dot:"#e53e3e"},{key:"bug_confirmed",name:"\uD655\uC778\uC911",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:"bug_in_progress",name:"\uC9C4\uD589\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"bug_hold",name:"\uBCF4\uB958",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"}],zC=[...qt.filter(e=>e.key!=="bug_hold"),{key:wi,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...qt.filter(e=>e.key==="bug_hold")];function gp(e){return qt.find(o=>o.key===e)??qt[0]}function hl(e){return e.is_notice?zn:e.is_bug?qt:qn}function Di(e){return e.status===Mn}var bp={in_progress:0,[Mn]:1,not_started:2,hold:3,[sr]:4};function qC(e){return e.completed?9:bp[String(e.status??"")]??2}function kt(e,o){let t=new Map(o.map(r=>[r.key,r])),n=(e.label_keys??[]).map(r=>t.get(r)).filter(r=>!!r);if(e.is_event){let r=An({is_event:!0,due_date:String(e.due_date??""),event_time:e.event_time});return r?[r,...n]:n}return e.is_notice?String(e.status??"")==="notice_active"?n:[bl(e.status),...n]:e.is_bug?[fo({...e,is_notice:!1}),...n]:e.completed?[_i,...n]:[pr(e.status),...n]}function kl(e){return{bg:`${e}1f`,fg:e,dot:e}}function fr(e,o){return e.includes(o)?e.filter(t=>t!==o):[...e,o]}import{Box as xr}from"@mui/material";import{jsx as Ln,jsxs as hp}from"react/jsx-runtime";function we({option:e,small:o=!1}){let t=le(),n=t.mode==="dark",r=e.key==="not_started";return hp(xr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:o?.5:.75,px:r?0:o?.9:1.25,py:r?0:o?.25:.5,borderRadius:1.25,fontSize:o?11.5:13,fontWeight:500,bgcolor:r?"transparent":n?ln(e.dot,t.chip.darkBgAlpha):e.bg,color:r?n?t.chip.plainColor:e.fg:n?t.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[Ln(xr,{component:"span",sx:{width:o?6:8,height:o?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function WC({task:e,statusOptions:o,small:t=!1}){let n=kt(e,o);return n.length===0?null:Ln(xr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:n.map(r=>Ln(we,{option:r,small:t},r.key))})}function Tt({labelKeys:e,labelOptions:o}){let t=new Map(o.map(r=>[r.key,r])),n=e.map(r=>t.get(r)).filter(r=>!!r);return n.length===0?null:Ln(xr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:n.map(r=>Ln(we,{option:r,small:!0},r.key))})}import{jsx as Oi,jsxs as Sp}from"react/jsx-runtime";function gr({anchorEl:e,value:o,options:t=zt,onSelect:n,onClose:r}){let a=Uo();return Oi(kp,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,...a,children:t.map(i=>Sp(Tp,{onClick:()=>{n(i.key),r()},sx:{fontSize:14,minWidth:150,gap:1},children:[Oi(we,{option:i}),o===i.key?Oi(yp,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},i.key))})}function br(e,o){if(o<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===o)return!0;let t=(e.target_account_seqs??[]).filter(n=>n>0);return t.length===0||t.includes(o)}return Mi(e)?!0:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o||(e.receiver_account_seqs??[]).includes(o)}function Mi(e){return e.is_notice||!e.is_open||e.completed||e.archived?!1:(e.manager_account_seq??0)===0}function hr(e,o){return o<=0?!1:Mi(e)}function kr(e,o){return o<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||Mi(e)?!1:(e.receiver_account_seqs??[]).includes(o)||(e.author_account_seq??0)===o}function Tl(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function ot(e,o){return o<=0?!1:e.is_notice?(e.author_account_seq??0)===o:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o||(e.receiver_account_seqs??[]).includes(o)}var JC=[119,121,141,143];var Ei=[{value:"due",label:"\uADF8\uB8F9 : \uB9C8\uAC10\uAE30\uD55C"},{value:"status",label:"\uADF8\uB8F9 : \uC0C1\uD0DC"},{value:"manager",label:"\uADF8\uB8F9 : \uCC45\uC784\uC790"},{value:"tab",label:"\uADF8\uB8F9 : \uD504\uB85C\uC81D\uD2B8"},{value:"none",label:"\uADF8\uB8F9 \uC5C6\uC74C"}];function Bp(e){let o=new Date(`${e}T00:00:00`);return o.setDate(o.getDate()+(6-o.getDay())),qe(o)}var Cp=[{key:"overdue",label:"\uC9C0\uB0A8"},{key:"today",label:"\uC624\uB298"},{key:"this_week",label:"\uC774\uBC88 \uC8FC"},{key:"later",label:"\uC774\uD6C4"},{key:"no_due",label:"\uB9C8\uAC10 \uC5C6\uC74C"}];function vp(e,o,t){let n=e.due_date.slice(0,10);return n?n<o?"overdue":n===o?"today":n<=t?"this_week":"later":"no_due"}function Pi(e,o,t,n=[],r=[],a="",i){let l=e.filter(s=>s.is_notice);if(l.length>0){let s=Pi(e.filter(m=>!m.is_notice),o,t,n,r,a,i);return[{key:"__notice__",label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:l},...s]}let u=new Map,c=(s,m)=>{let f=u.get(s);f?f.push(m):u.set(s,[m])},p;if(o==="due"){let s=Bp(t);for(let m of e)c(vp(m,t,s),m);p=Cp}else if(o==="status"){for(let s of e)c(pr(s.status).key,s);p=zt.map(s=>({key:s.key,label:s.name}))}else if(o==="tab"){for(let s of e)c(s.tab_key?.trim()||"__none__",s);p=[...n.filter(s=>!s.archived).map(s=>({key:s.key,label:s.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...n.filter(s=>s.archived).map(s=>({key:s.key,label:`${s.label} (\uBCF4\uAD00\uB428)`}))]}else if(i?.enabled){let s=Number(i.myAccountSeq??0),m=a.trim();for(let f of e){if(!(Number(f.manager_account_seq??0)>0||String(f.manager_name??"").trim()!=="")){c("__none__",f);continue}let b=s>0&&Number(f.manager_account_seq??0)===s||!!m&&String(f.manager_name??"").trim()===m;c(b?"__manager__":"__reference__",f)}p=[{key:"__manager__",label:"\uCC45\uC784\uC790"},{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__reference__",label:"\uCC38\uC870\uC790"}]}else{for(let b of e)c(String(b.manager_name??"").trim()||"__none__",b);let s=a.trim(),m=[...u.keys()].filter(b=>b!=="__none__").sort((b,h)=>{if(s){if(b===s)return-1;if(h===s)return 1}return b.localeCompare(h)}),f=!!s&&m.includes(s),B=m.filter(b=>b!==s);p=[...f?[{key:s,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},...B.map(b=>({key:b,label:b}))]}let d=[];for(let s of p){let m=u.get(s.key);!m||m.length===0||d.push({key:s.key,label:s.label,tasks:m})}return d}import Ip from"@mui/icons-material/NotesOutlined";import _p from"@mui/icons-material/AutorenewOutlined";import wp from"@mui/icons-material/CalendarTodayOutlined";import Dp from"@mui/icons-material/EventOutlined";import Op from"@mui/icons-material/PersonOutlineOutlined";import Sl from"@mui/icons-material/PeopleAltOutlined";import qi from"@mui/icons-material/CheckCircleOutlineOutlined";import Mp from"@mui/icons-material/FlagOutlined";import Ep from"@mui/icons-material/AccessTimeOutlined";import Pp from"@mui/icons-material/StickyNote2Outlined";import Rp from"@mui/icons-material/ViewKanbanOutlined";import zp from"@mui/icons-material/ConfirmationNumberOutlined";import{jsx as ao}from"react/jsx-runtime";var qp={role_mark:"11px",completed:"44px",ticket_no:"100px",title:"minmax(220px, 1.8fr)",status:"110px",start_date:"110px",due_date:"120px",manager_name:"110px",receiver_names:"170px",targets:"170px",priority:"84px",ack:"104px",confirm:"100px",project:"150px",request:"100px",completed_time:"150px",note:"minmax(200px, 1.2fr)"};function Tr(e){return Ai(e).map(o=>qp[o.id]).join(" ")}var Ap={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:ao(Ep,{sx:{fontSize:15}}),align:"center",sortable:!0},Lp={id:"ticket_no",label:"\uD2F0\uCF13",icon:ao(zp,{sx:{fontSize:15}}),align:"center"},Np={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:ao(Rp,{sx:{fontSize:15}}),projectFilter:!0},Fp={id:"targets",label:"\uB300\uC0C1\uC790",icon:ao(Sl,{sx:{fontSize:15}})},yl={id:"priority",label:"\uC911\uC694\uB3C4",icon:ao(Mp,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},Hp={id:"ack",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0},Wp={id:"confirm",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Ri(e){let o=e.findIndex(n=>n.id==="receiver_names"||n.id==="targets"),t=o>=0?o+1:e.findIndex(n=>n.id==="note");return t<0?[...e,yl]:[...e.slice(0,t),yl,...e.slice(t)]}function Ai(e){let{showProject:o=!1,showManager:t=!0,showActions:n=!0,showRequest:r=!0,notice:a=!1,bug:i=!1,confirmMode:l="none"}=e??{},u=d=>{if(!i)return d;let s=d.filter(B=>B.id!=="note"),m=s.findIndex(B=>B.id==="completed"),f=m>=0?m+1:0;return[...s.slice(0,f),Lp,...s.slice(f)]};if(a)return u(Ri(zi.filter(d=>!["manager_name","receiver_names","request"].includes(d.id)).flatMap(d=>d.id==="due_date"?[d,Fp]:d.id==="note"?[Hp,d]:[d])));let c=t?zi:zi.filter(d=>d.id!=="manager_name");if(n)r||(c=c.filter(d=>d.id!=="request"));else{c=c.filter(s=>s.id!=="request");let d=c.findIndex(s=>s.id==="note");c=[...c.slice(0,d),Ap,...c.slice(d)]}if(l==="action"){let d=c.findIndex(s=>s.id==="note");c=[...c.slice(0,d),Wp,...c.slice(d)]}if(!o)return u(Ri(c));let p=c.findIndex(d=>d.id==="receiver_names");return u(Ri([...c.slice(0,p+1),Np,...c.slice(p+1)]))}var zi=[{id:"role_mark",label:"",icon:null},{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:ao(Ip,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:ao(_p,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC790",icon:ao(wp,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uAE30\uD55C",icon:ao(Dp,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:ao(Op,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:ao(Sl,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:ao(Pp,{sx:{fontSize:15}})}];import{Button as Bl,ClickAwayListener as Up,Dialog as Vp,Paper as Gp,Popper as Yp,Typography as jp,Box as Xp}from"@mui/material";import{useMediaQuery as $p,useTheme as Kp}from"@mui/material";function He(){let{isMobile:e}=yo(),o=Kp(),t=$p(o.breakpoints.up("lg"));return e!==void 0?e:!t}import{Fragment as Jp,jsx as yt,jsxs as Cl}from"react/jsx-runtime";function Qp({title:e,content:o,confirmText:t,cancelText:n,titleFontSize:r,actionFontSize:a,actionMinHeight:i,onCancel:l,onConfirm:u}){return Cl(Jp,{children:[yt(jp,{component:"div",sx:{fontSize:r,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),o,Cl(Xp,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[yt(Bl,{size:"medium",variant:"outlined",color:"inherit",onClick:l,fullWidth:!0,sx:{fontSize:a,minHeight:i,fontWeight:700},children:n}),yt(Bl,{size:"medium",variant:"contained",color:"primary",onClick:u,fullWidth:!0,sx:{fontSize:a,minHeight:i,fontWeight:700},children:t})]})]})}function Ue({open:e,anchorEl:o,title:t="\uD655\uC778\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",content:n,confirmText:r="\uD655\uC778",cancelText:a="\uCDE8\uC18C",placement:i="top",minWidth:l=160,minHeight:u,titleFontSize:c=17,actionFontSize:p=16,actionMinHeight:d=44,zIndex:s=1300,onCancel:m,onConfirm:f}){let B=He(),b=yt(Qp,{title:t,content:n,confirmText:r,cancelText:a,titleFontSize:c,actionFontSize:p,actionMinHeight:d,onCancel:m,onConfirm:f});return B?yt(Vp,{open:e,onClose:m,sx:{zIndex:s},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:b}):yt(Yp,{open:e,anchorEl:o,placement:i,sx:{zIndex:s},children:yt(Up,{onClickAway:m,children:yt(Gp,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:l,minHeight:u,justifyContent:u?"space-between":"flex-start"},onClick:h=>h.stopPropagation(),onMouseDown:h=>h.stopPropagation(),children:b})})})}import{useEffect as uf,useRef as df,useState as El}from"react";import{Box as be,Button as pf,Checkbox as ff,Tooltip as Fi}from"@mui/material";import xf from"@mui/icons-material/AlarmOutlined";import gf from"@mui/icons-material/CheckCircle";import bf from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as Zp,useState as vl}from"react";import{Avatar as Il}from"@mui/material";import ef from"@mui/icons-material/PersonOutlineOutlined";import{jsx as Ni}from"react/jsx-runtime";var Li=new Set,_l=e=>e.startsWith("data:")||e.startsWith("blob:");function sn({src:e,avatarSx:o,iconFontSize:t=40}){let[n,r]=vl(()=>e?_l(e)||Li.has(e):!1),[a,i]=vl(!1),l={position:"relative",overflow:"hidden",borderRadius:"15px"},u=o?[l,...Array.isArray(o)?o:[o]]:l;return Zp(()=>{i(!1),r(e?_l(e)||Li.has(e):!1)},[e]),!e||a?Ni(Il,{sx:u,children:Ni(ef,{sx:{fontSize:t}})}):Ni(Il,{src:e,imgProps:{onLoad:()=>{Li.add(e),r(!0)},onError:()=>i(!0),style:n?void 0:{opacity:0}},sx:u})}var of=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),yr=(e,o)=>{if(!o||!o.trim())return[{text:e,highlight:!1}];try{let t=of(o.trim()),n=new RegExp(`(${t})`,"gi");return e.split(n).map(a=>a.toLowerCase()===o.trim().toLowerCase()?{text:a,highlight:!0}:{text:a,highlight:!1}).filter(a=>a.text)}catch{return[{text:e,highlight:!1}]}};var tf=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Vo(e){let o=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(o))return"";let t=new Date(`${o}T00:00:00`);return Number.isNaN(t.getTime())?"":`${o.slice(2).replaceAll("-",".")} (${tf[t.getDay()]})`}function tt(e){let o=String(e??"").trim(),[t,n=""]=o.split(" "),r=Vo(t);return r?n?`${r} ${n.slice(0,5)}`:r:""}import{Box as wl,Tooltip as nf}from"@mui/material";import{jsx as Sr}from"react/jsx-runtime";var cn=[{bgcolor:"#dbe7ff",color:"#24408e"},{bgcolor:"#ffe4d6",color:"#8a4b21"},{bgcolor:"#dcf2e3",color:"#1f6b3a"},{bgcolor:"#f3e3f7",color:"#6d2f80"},{bgcolor:"#fdf0cf",color:"#8a6d1d"},{bgcolor:"#e0f0f6",color:"#1d5f78"},{bgcolor:"#efe6dc",color:"#6b4a2b"}];function xo({names:e,size:o=22,ringFirst:t=!1,avatarSrcByName:n}){let r=le();return Sr(wl,{sx:{display:"flex",alignItems:"center"},children:e.map((a,i)=>{let l=t&&i===0;return Sr(nf,{title:l?`\uCC45\uC784\uC790 \xB7 ${a}`:a,arrow:!0,children:Sr(wl,{sx:{ml:i===0?0:"-7px",zIndex:i,borderRadius:"50%",border:`2px solid ${l?r.avatar.ringColor:r.avatar.separatorColor}`,display:"inline-flex",...r.avatar.sx},children:Sr(sn,{src:n?.get(a)??"",avatarSx:{width:o,height:o,fontSize:Math.round(o/2),borderRadius:"50%",...cn[i%cn.length]},iconFontSize:Math.round(o*.6)})})},`${a}-${i}`)})})}import{Box as Dl,Button as Ml}from"@mui/material";import rf from"@mui/icons-material/CheckCircle";import{Fragment as sf,jsx as Nn,jsxs as Ol}from"react/jsx-runtime";function af(e){let o=e.mode==="dark";return{minWidth:0,width:"100%",px:1,py:.25,fontSize:13,color:e.table.rowColor,borderColor:e.colors.borderStrong,background:o?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:o?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function lf(e){return{minWidth:0,px:1.25,py:.25,fontSize:13,whiteSpace:"nowrap",color:e.actionButton.color,backgroundColor:e.actionButton.bg,backgroundImage:"none",boxShadow:"none","&:hover":{backgroundColor:e.actionButton.hoverBg,boxShadow:"none",filter:"brightness(1.08)"},...e.actionButton.sx}}function mn({onClick:e,children:o,fullWidth:t=!1,sx:n}){let r=le();return Nn(Ml,{size:"small",variant:"contained",color:"inherit",fullWidth:t,sx:[lf(r),...Array.isArray(n)?n:n?[n]:[]],onClick:a=>{a.stopPropagation(),e(a)},children:o})}function un({canConfirm:e,count:o,total:t,myConfirmed:n=!1,onConfirm:r,onShowList:a}){let i=le(),l=af(i);return e?Nn(mn,{onClick:()=>r(),children:"\uD655\uC778"}):Ol(Ml,{size:"small",variant:"outlined",color:"inherit",sx:l,onClick:u=>{u.stopPropagation(),a(u.currentTarget)},children:[n?Nn(rf,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,Nn(Dl,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:t>0&&o>=t?"\uC644\uB8CC":Ol(sf,{children:[o,Nn(Dl,{component:"span",sx:{mx:.15},children:"/"}),t]})})]})}import{SvgIcon as cf}from"@mui/material";import{jsx as Br,jsxs as mf}from"react/jsx-runtime";function Cr({sx:e,...o}){return mf(cf,{viewBox:"0 0 48 48",...o,sx:{fill:"none",...e},children:[Br("path",{d:"M24,6C13.23,6,4.5,12.93,4.5,21.46c0,5.39,3.5,10.13,8.79,12.89l-1.76,7.06a.46.46,0,0,0,.68.51L21,36.7a24,24,0,0,0,3,.2c10.77,0,19.5-6.91,19.5-15.44S34.77,6,24,6Z",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Br("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Br("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Br("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as Wi,jsx as U,jsxs as dn}from"react/jsx-runtime";function Pl(e){let o=String(e??"").trim();return o?o.slice(2,10).replaceAll("-","."):"-"}function Hi(e,o){let t=String(e??"").trim()||"-";return yr(t,o).map((n,r)=>U("span",{className:n.highlight?"font-semibold text-blue-600":void 0,children:n.text},`${n.text}-${r}`))}function vr({names:e,searchText:o,avatarSrcByName:t,emphasize:n=!1}){let r=e.filter(a=>a.trim());if(r.length===0)return null;if(r.length===1){let a=r[0]??"";return dn(Wi,{children:[U(sn,{src:t?.get(a)??"",avatarSx:{width:24,height:24,borderRadius:"50%",...cn[0]},iconFontSize:15}),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...n?{fontWeight:500,color:"#2f80ed"}:{}},children:Hi(a,o)})]})}return U(xo,{names:r,size:22,avatarSrcByName:t})}function Rl({display:e,summary:o,searchText:t,avatarSrcByName:n}){if(!e||e.kind==="everyone")return U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:r,individualNames:a}=e;if(r.length===0)return U(vr,{names:a,searchText:t,avatarSrcByName:n});let i=[...r,...a],l=i.join(", ");return i.length>2?U(Fi,{title:l,arrow:!0,children:U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${i[0]}, ${i[1]} \uC678 ${i.length-2}\uBA85`})}):U(Fi,{title:l,arrow:!0,children:dn(be,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[U(be,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.join(", ")+(a.length>0?",":"")}),a.length>0?U(vr,{names:a,searchText:t,avatarSrcByName:n}):null]})})}function zl({task:e,statusOptions:o,avatarSrcByName:t,searchText:n,myAccountSeq:r=0,todayStr:a,showProject:i=!1,showManager:l=!0,showActions:u=!0,showRequest:c=!0,confirmMode:p="none",bugMode:d=!1,confirmInfo:s,onConfirmTask:m,projectLabel:f="",projectIcon:B="",onProjectClick:b,onRequestToggleCompleted:h,onDateClick:x,onChangeNote:T,onMemberClick:g,onClaimClick:v,onVolunteerClick:C,onStatusClick:I,onOpenDetail:M,onTaskContextMenu:J,hideBottomBorder:E=!1,completeLocked:X=!1,unread:w=!1,notice:y=!1,noticeReadOnly:H=!1,noteLocked:N=!1,targetSummary:$="",targetDisplay:P,onArchiveTask:te,ackInfo:de,onAckConfirm:A,onAckListClick:W,onPriorityClick:K}){let[F,O]=El(!1),[L,Q]=El(""),Z=df(null);uf(()=>{if(!F)return;let V=Ee=>{let Xe=Z.current;Xe&&(Ee.target instanceof Node&&Xe.contains(Ee.target)||Xe.blur())};return document.addEventListener("mousedown",V,!0),document.addEventListener("touchstart",V,!0),()=>{document.removeEventListener("mousedown",V,!0),document.removeEventListener("touchstart",V,!0)}},[F]);let ue=[e.manager_account_seq??0,...e.receiver_account_seqs??[]].some(V=>V>0&&V!==(e.author_account_seq??0)),ee=H,ye=r>0&&!e.is_notice&&!e.is_event&&(e.manager_account_seq??0)===r,R=ee||!!e.is_notice,k=le(),ne=!!v&&hr(e,r),re=!!C&&kr(e,r),ve=R&&!Tl(e),$e=e.is_notice?U(un,{canConfirm:!!de?.canAck,count:de?.count??0,total:de?.total??0,myConfirmed:!!de?.acked,onConfirm:()=>A?.(e),onShowList:V=>W?.(e,V)}):null,Ie=!e.is_notice&&!!e.due_date&&e.due_date.slice(0,10)<=a?"#e5484d":"#2f80ed";return dn(be,{onContextMenu:V=>J(e,V),sx:{display:"grid",gridTemplateColumns:Tr({showProject:i,showManager:l,showActions:u,showRequest:c,notice:y,confirmMode:p,bug:d}),minHeight:48,fontSize:15,bgcolor:k.table.rowBg,color:k.table.rowColor,borderBottom:E?"none":`1px solid ${k.table.rowBorderColor}`,"&:hover":{bgcolor:k.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${k.table.rowBorderColor}`},"& > .cell:first-of-type":{px:0,borderRight:"none"},"& > .cell:nth-of-type(2)":{pl:1.5,pr:2},"& > .cell:last-child":{borderRight:"none",pr:2}},children:[U(be,{className:"cell",children:ye?U(be,{sx:{width:3,alignSelf:"stretch",my:.5,ml:.5,bgcolor:"#2f80ed",borderRadius:1.5}}):null}),U(be,{className:"cell",sx:{justifyContent:"center"},children:!ee&&!X?U(Fi,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${tt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:U(ff,{checked:e.completed,icon:U(bf,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:U(gf,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:V=>V.stopPropagation(),onChange:(V,Ee)=>h({anchorEl:V.currentTarget,task:e,nextCompleted:Ee}),sx:{p:.5}})}):null}),d?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:e.ticket_no||"-"}):null,dn(be,{className:"cell",onClick:()=>M(e),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}},children:[(()=>{let V=Oe(e.icon||(e.is_notice?Mo:_e));if(!V)return null;let Ee=e.icon_color||(e.is_notice?"#e5484d":"#1e3a8a");return U(V,{sx:{fontSize:18,flexShrink:0,color:Ee}})})(),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:e.completed?400:k.table.rowTitleFontWeight,color:e.completed?k.colors.textMuted:k.table.rowTitleColor,textDecoration:e.completed?"line-through":"none"},children:Hi(e.title,n)}),(e.comment_count??e.comments?.length??0)>0?U(Cr,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,U(be,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:U(Tt,{labelKeys:e.label_keys??[],labelOptions:o})}),w?U(be,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,dr(e)&&!e.archived&&!ee&&te?U(pf,{size:"small",variant:"outlined",color:"inherit",sx:{ml:"auto",flexShrink:0,minWidth:0,px:1.25,py:.25,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},onClick:V=>{V.stopPropagation(),te(e)},children:"\uBCF4\uAD00"}):null]}),(()=>{let V=ee||!!e.is_event||!!e.completed;return U(be,{className:"cell",onClick:V?void 0:Ee=>I(e,Ee.currentTarget),sx:{py:.5,justifyContent:"center",...V?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:e.is_event?(()=>{let Ee=An(e);return Ee?U(we,{option:Ee}):null})():U(we,{option:fo(e)})})})(),U(be,{className:"cell",onClick:ee?void 0:V=>x(e,"start_date",V.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:Pl(e.start_date)}),U(be,{className:"cell",onClick:ee?void 0:V=>x(e,"due_date",V.currentTarget),sx:{justifyContent:"center",gap:.5,color:Ie,fontWeight:500,whiteSpace:"nowrap",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:e.due_date?dn(Wi,{children:[Pl(e.due_date),U(xf,{sx:{fontSize:15}})]}):null}),y?U(be,{className:"cell",onClick:ee?void 0:()=>g(e,"targets"),sx:{gap:.75,...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Rl,{display:P,summary:$,searchText:n,avatarSrcByName:t})}):null,!y&&e.is_notice?U(be,{className:"cell",onClick:ee?void 0:()=>g(e,"targets"),sx:{gridColumn:l?"span 2":"auto",gap:.75,...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Rl,{display:P,summary:$,searchText:n,avatarSrcByName:t})}):null,!y&&!e.is_notice&&!e.is_event&&l?U(be,{className:"cell",onClick:ve?void 0:()=>g(e,"manager"),sx:{gap:.75,...ne||re?{justifyContent:"center"}:{},...ve?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:ne?U(mn,{onClick:V=>v?.(e,V.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):re?U(mn,{onClick:V=>C?.(e,V.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):U(vr,{names:e.manager_name?[e.manager_name]:[],searchText:n,avatarSrcByName:t,emphasize:ye})}):null,!y&&!e.is_notice?U(be,{className:"cell",onClick:R?void 0:()=>g(e,"receivers"),sx:{gridColumn:e.is_event&&l?"span 2":"auto",gap:.75,...R?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(vr,{names:e.receiver_names,searchText:n,avatarSrcByName:t})}):null,U(be,{className:"cell",onClick:ee?void 0:V=>K?.(e,V.currentTarget),sx:{py:.5,justifyContent:"center",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Eo,{priority:e.priority,plain:!0})}),i?U(be,{className:"cell",onClick:ee?void 0:V=>b?.(e,V.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:f?dn(Wi,{children:[(()=>{let V=Oe(B);return V?U(V,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f})]}):null}):null,y?U(be,{className:"cell",sx:{justifyContent:"center"},children:$e}):null,!y&&u&&c?U(be,{className:"cell",sx:{justifyContent:"center"},children:e.is_notice?$e:ue?U(un,{canConfirm:!!s?.canConfirm,count:s?.count??0,total:s?.total??0,myConfirmed:!!s?.myTime,onConfirm:()=>m?.(e),onShowList:V=>W?.(e,V)}):null}):null,!y&&p==="action"?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:k.table.rowSubColor},children:e.is_notice?$e:s&&s.total>0?U(un,{canConfirm:!!s.canConfirm,count:s.count,total:s.total,myConfirmed:!!s.myTime,onConfirm:()=>m?.(e),onShowList:V=>W?.(e,V)}):"-"}):null,!y&&!u?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:k.table.rowSubColor},children:e.completed_time||"-"}):null,d?null:U(be,{className:"cell",onClick:()=>{!N&&!F&&(Q(e.note),O(!0))},sx:{color:"#6f6f6c",cursor:N?"default":"text"},children:F?U(be,{component:"input",ref:Z,autoFocus:!0,spellCheck:!1,value:L,onChange:V=>Q(V.target.value),onBlur:()=>{O(!1),L.trim()!==e.note&&T(e.seq,L)},onKeyDown:V=>{V.key==="Enter"&&V.target.blur(),V.key==="Escape"&&(Q(e.note),O(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:k.table.rowTitleColor,caretColor:k.table.rowTitleColor,p:0,m:0}}):U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.note?Hi(e.note,n):""})})]})}import{useState as hf}from"react";import{Box as Fn,Button as ql,ButtonBase as kf,Dialog as Tf,Divider as Al,Menu as yf,MenuItem as Sf,Popover as Bf}from"@mui/material";import Cf from"@mui/icons-material/ChevronRight";import vf from"@mui/icons-material/Check";import If from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as _f}from"@ehfuse/mui-datetime-picker";import{Fragment as Of,jsx as Co,jsxs as At}from"react/jsx-runtime";var wf=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],Ll=[{value:"day_before",label:"1\uC77C \uC804"},{value:"two_days_before",label:"2\uC77C \uC804"},{value:"three_days_before",label:"3\uC77C \uC804"},{value:"week_before",label:"1\uC8FC\uC77C \uC804"}],Nl=[{value:"none",label:"\uC5C6\uC74C"},...wf,...Ll];function $i(e){return e?Nl:[{value:"none",label:"\uC5C6\uC74C"},...Ll]}function Ki(e){return e==="same_day"?"\uB2F9\uC77C":Nl.find(o=>o.value===e)?.label??"\uC5C6\uC74C"}function Df(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function St({anchorEl:e,open:o,date:t,reminder:n,hideReminder:r=!1,centered:a=!1,onClose:i,onDateChange:l,onReminderChange:u}){let[c,p]=hf(null),d=Uo(),s=At(Fn,{sx:{width:300,maxWidth:"100%"},children:[Co(Fn,{sx:{height:320},children:Co(_f,{selectedDate:Df(t),onSelect:m=>{l(qe(m)),i()},onClose:i,showFooter:!1,autoApply:!0})}),r?null:At(Of,{children:[Co(Al,{sx:{borderColor:"#e6e6e3"}}),At(kf,{onClick:m=>p(m.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[At(Fn,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Co(If,{sx:{fontSize:17,color:"#9a9a97"}}),"\uB9AC\uB9C8\uC778\uB354"]}),At(Fn,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[Ki(n),Co(Cf,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Co(yf,{transitionDuration:0,anchorEl:c,open:!!c,onClose:()=>p(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...d,children:$i(!1).map(m=>At(Sf,{selected:m.value===n,onClick:()=>{u(m.value),p(null)},sx:{fontSize:14,minWidth:120,justifyContent:"space-between",gap:1},children:[m.label,m.value===n?Co(vf,{sx:{fontSize:16,color:"#2f80ed"}}):null]},m.value))})]}),Co(Al,{sx:{borderColor:"#e6e6e3"}}),At(Fn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[Co(ql,{size:"small",onClick:()=>{l(qe(new Date)),i()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),Co(ql,{size:"small",onClick:i,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return a?Co(Tf,{open:o,onClose:i,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:s}):Co(Bf,{transitionDuration:0,open:o,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{borderRadius:2,boxShadow:"0 8px 24px rgba(0,0,0,0.14)"}}},children:s})}import{useEffect as Pf,useState as Vi}from"react";import{Box as Lt,Button as Rf,Switch as zf}from"@mui/material";import{FormDialog as qf}from"@ehfuse/mui-form-dialog";import{ClearTextField as Af}from"@ehfuse/mui-form-controls";import{ErrorAlert as Lf}from"@ehfuse/alerts";import{Box as Mf,ButtonBase as Ef}from"@mui/material";import{jsx as Ui}from"react/jsx-runtime";function Ir({value:e,onChange:o}){return Ui(Mf,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:bi.map(({key:t,Icon:n})=>{let r=t===e;return Ui(Ef,{onClick:()=>o(t),sx:{display:"flex",alignItems:"center",justifyContent:"center",height:40,minWidth:40,borderRadius:1,border:r?"2px solid #2563eb":"1px solid #dedddb",bgcolor:r?"#eef4ff":"#fff",color:r?"#1e3a8a":"#787774","&:hover":{bgcolor:r?"#eef4ff":"#f4f4f2"}},children:Ui(n,{sx:{fontSize:20}})},t)})})}import{jsx as nt,jsxs as Gi}from"react/jsx-runtime";function _r({open:e,title:o="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:t="",initialIcon:n=gi,confirmText:r="\uCD94\uAC00",initialUseSprints:a=!1,onClose:i,onSubmit:l}){let[u,c]=Vi(""),[p,d]=Vi(gi),[s,m]=Vi(!1);Pf(()=>{e&&(c(t),d(n),m(a))},[e]);let f=()=>{let b=u.trim();if(!b){Lf("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}l(b,p,s),i()};return nt(qf,{open:e,onClose:i,maxWidth:"xs",title:o,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:Gi(Lt,{children:[nt(Af,{label:"\uD504\uB85C\uC81D\uD2B8 \uC774\uB984",value:u,onChange:b=>c(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),f())},fullWidth:!0,autoFocus:!0,sx:{mt:.5}}),nt(Lt,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),nt(Lt,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:nt(Ir,{value:p,onChange:d})}),Gi(Lt,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[Gi(Lt,{children:[nt(Lt,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),nt(Lt,{sx:{fontSize:12.5,color:"#9a9a97"},children:"\uBAA9\uD45C \uBC30\uC815\uC73C\uB85C \uBC18\uBCF5 \uC8FC\uAE30\uB97C \uAD00\uB9AC\uD569\uB2C8\uB2E4(\uAC1C\uBC1C\uD300\uC6A9)"})]}),nt(zf,{checked:s,onChange:(b,h)=>m(h)})]})]})}],actions:{showCancelButton:!0,right:nt(Rf,{variant:"contained",onClick:f,children:r})}})}import{jsx as he,jsxs as Go}from"react/jsx-runtime";function Qf(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function $l({tasks:e,statusOptions:o,avatarSrcByName:t,searchText:n,todayStr:r,sortBy:a,sortDirection:i,onSort:l,onRequestReply:u,onToggleCompleted:c,onChangeTaskDate:p,onChangeTaskReminder:d,groupBy:s,collapsedGroupKeys:m,customTabs:f,onToggleGroup:B,renderGroupSummary:b,renderGroupTitleSummary:h,onChangeTaskProject:x,onAddProject:T,onChangeNote:g,onMemberClick:v,onClaimTask:C,onChangeTaskStatus:I,onOpenDetail:M,onTaskContextMenu:J,onMemberFilterClick:E,activeMemberFilters:X=[],onStatusFilterClick:w,statusFilterActive:y=!1,onAckFilterClick:H,ackFilterActive:N=!1,onProjectFilterClick:$,projectFilterActive:P=!1,onPriorityFilterClick:te,priorityFilterActive:de=!1,columns:A,getConfirmInfo:W,onConfirmTask:K,myAccountSeq:F=0,currentUserName:O="",groupManagerByMyRole:L=!1,allowManagerVolunteer:Q=!0,noticeAdmin:Z=!1,getTargetSummary:ue,getTargetDisplay:ee,onArchiveTask:ye,isTaskUnread:R,getAckInfo:k,onAckConfirm:ne,onAckListClick:re,onChangeTaskPriority:ve,onEndReached:$e}){let se=le(),Ie=Hn(()=>({showManager:!0,showActions:!0,showRequest:!0,...A}),[A]),V=Ie.showManager??!0,Ee=Ie.showActions??!0,Xe=Ie.showRequest??!0,bt=Ie.confirmMode??"none",Wo=Ie.notice??!1,Zo=Ie.bug??!1,$o=s!=="none",Pt=Hn(()=>$o?Pi(e,s,r,f,o,O,{enabled:L,myAccountSeq:F}):[],[$o,e,s,r,f,o,O,L,F]),rn=Hn(()=>new Set(m),[m]),Oo=Ie.showProject??(!Wo&&s!=="tab"),no=Hn(()=>Ai({...Ie,showProject:Oo}),[Ie,Oo]),mo=Tr({...Ie,showProject:Oo}),uo=Hn(()=>{let S=new Map;for(let G of f)S.set(G.key,{label:G.archived?`${G.label} (\uBCF4\uAD00\uB428)`:G.label,icon:G.icon});return S},[f]),Rt=Nf(null),[pe,D]=it(null),z=e.length>0;Fl(()=>{if(!z){D(null);return}let S=window.requestAnimationFrame(()=>{D(Rt.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(S)},[z]);let[ie,ce]=it(!1);Fl(()=>{if(!pe)return;let S=()=>ce(pe.scrollHeight>pe.clientHeight);S();let G=new ResizeObserver(S);return G.observe(pe),pe.firstElementChild&&G.observe(pe.firstElementChild),()=>G.disconnect()},[pe]);let[ae,fe]=it(null),[_,ro]=it(null),[Qe,io]=it(null),[Pe,ht]=it(null),[_n,wn]=it(!1),[an,nr]=it(null),Dn=an?e.find(S=>S.seq===an.taskSeq)??null:null,[rr,pi]=it(null),ir=rr?e.find(S=>S.seq===rr.taskSeq)??null:null,Qa=rt((S,G)=>{pi({anchorEl:G,taskSeq:S.seq})},[]),Ja=rt((S,G)=>{nr({anchorEl:G,taskSeq:S.seq})},[]),pm=rt((S,G)=>{if(!G)return;l(S,a===S&&i==="asc"?"desc":"asc")},[l,a,i]),Za=rt((S,G,Fe)=>{fe({anchorEl:Fe,taskSeq:S.seq,field:G,date:S[G],reminder:S.reminder,completed:S.completed})},[]),el=rt((S,G)=>{ht({anchorEl:G,task:S})},[]),fm=rt(S=>{ae&&(p(ae.taskSeq,ae.field,qe(S)),fe(null))},[ae,p]),xm=rt(S=>{ae&&(p(ae.taskSeq,ae.field,S),fe(G=>G&&{...G,date:S}))},[ae,p]),gm=rt(S=>{ae&&(d(ae.taskSeq,S),fe(G=>G&&{...G,reminder:S}))},[ae,d]),ol=rt((S,G=!1)=>he(zl,{hideBottomBorder:G,task:S,statusOptions:o,avatarSrcByName:t,searchText:n,myAccountSeq:F,todayStr:r,showProject:Oo,showManager:V,showActions:Ee,showRequest:Xe,confirmMode:bt,confirmInfo:S.is_notice?void 0:W?.(S),onConfirmTask:K,projectLabel:uo.get(S.tab_key??"")?.label??"",projectIcon:uo.get(S.tab_key??"")?.icon??"",onProjectClick:el,onRequestReply:u,onRequestToggleCompleted:ro,onDateClick:Za,onChangeNote:g,onMemberClick:v,onClaimClick:C?(Fe,Ko)=>io({anchorEl:Ko,taskSeq:Fe.seq,title:Fe.title,kind:"claim"}):void 0,onVolunteerClick:Q?(Fe,Ko)=>io({anchorEl:Ko,taskSeq:Fe.seq,title:Fe.title,kind:"volunteer"}):void 0,onStatusClick:Ja,onOpenDetail:M,onTaskContextMenu:J,notice:Wo,bugMode:Zo,noticeReadOnly:!ot(S,F),noteLocked:S.is_notice?!br(S,F):!ot(S,F),completeLocked:S.is_event?!0:S.is_notice?(S.author_account_seq??0)!==F:(S.author_account_seq??0)!==F&&(S.manager_account_seq??0)!==F,targetSummary:S.is_notice?ue?.(S):void 0,targetDisplay:S.is_notice?ee?.(S):void 0,onArchiveTask:ye,unread:R?.(S)??!1,ackInfo:S.is_notice?k?.(S):void 0,onAckConfirm:ne,onAckListClick:re,onPriorityClick:Qa},S.seq),[n,o,t,r,Oo,V,Ee,Xe,bt,W,K,Wo,Zo,F,Z,ue,ee,ye,R,k,ne,re,Qa,uo,el,u,Za,g,v,C,Ja,M,J]);return Go(Po,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${se.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:se.table.bg,color:se.table.rowColor,...se.table.sx},children:[he(Po,{sx:{display:"grid",gridTemplateColumns:mo,borderBottom:`1px solid ${se.table.borderColor}`,flexShrink:0,bgcolor:se.table.headerBg,"& > *":{borderRight:`1px solid ${se.table.rowBorderColor}`},"& > *:first-of-type":{px:0,borderRight:"none"},"& > *:nth-of-type(2)":{pl:1.5,pr:2},"& > *:last-child":{borderRight:"none",pr:2},...se.table.headerSx},children:no.map(S=>{let G=a===S.id,Fe=!!S.memberFilter,Ko=Fe&&X.includes(S.memberFilter),ar=Fe||!!S.statusFilter||!!S.ackFilter||!!S.projectFilter||!!S.priorityFilter,lr=Ko||!!S.statusFilter&&y||!!S.ackFilter&&N||!!S.projectFilter&&P||!!S.priorityFilter&&de;return Go(Po,{onClick:On=>{S.memberFilter?E(S.memberFilter,On.currentTarget):S.statusFilter?w(On.currentTarget):S.ackFilter?H?.(On.currentTarget):S.projectFilter?$?.(On.currentTarget):S.priorityFilter?te?.(On.currentTarget):pm(S.id,S.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:S.align==="center"?"center":"flex-start",gap:.5,px:1,py:1,minWidth:0,fontSize:se.table.headerFontSize,color:S.sortable||ar?se.table.headerActiveColor:se.table.headerColor,whiteSpace:"nowrap",cursor:S.sortable||ar?"pointer":"default",userSelect:"none",...G?{color:se.table.headerFilteredColor}:{},...lr?{color:se.table.headerFilteredColor,fontWeight:600}:{}},children:[S.icon,S.label,lr?he(Gf,{sx:{fontSize:14}}):null,G?i==="asc"?he($f,{sx:{fontSize:13}}):he(Kf,{sx:{fontSize:13}}):null]},S.id)})}),e.length===0?he(Po,{sx:{py:8,textAlign:"center",color:se.table.emptyColor,fontSize:14},children:Zo?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Wo?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):he(Po,{sx:{flex:1,minHeight:0},children:he(jf,{ref:Rt,style:{height:"100%"},thumb:{width:8},children:pe?$o?he(Wl,{customScrollParent:pe,data:Pt,computeItemKey:(S,G)=>G.key,itemContent:(S,G)=>{let Fe=rn.has(G.key),Ko=S===Pt.length-1;return Go(Po,{children:[Go(Po,{onClick:()=>B(G.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:se.table.groupHeader.minHeight,bgcolor:se.table.groupHeader.bg,borderBottom:`1px solid ${se.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:se.table.groupHeader.hoverBg},...se.table.groupHeader.sx},children:[Fe?he(Vf,{sx:{fontSize:20,color:se.colors.textMuted}}):he(Uf,{sx:{fontSize:20,color:se.colors.textMuted}}),he(Po,{component:"span",sx:{fontSize:se.table.groupHeader.labelFontSize,fontWeight:se.table.groupHeader.labelFontWeight,color:se.table.groupHeader.labelColor},children:G.label}),h?he(Po,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:h(G.key,G.tasks)}):null,Go(Po,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[b?b(G.key,G.tasks):null,he(Po,{component:"span",sx:{flexShrink:0,width:se.table.groupHeader.badge.width,py:.1,borderRadius:`${se.table.groupHeader.badge.borderRadius}px`,bgcolor:se.table.groupHeader.badge.bg,border:se.table.groupHeader.badge.border,color:se.table.groupHeader.badge.color,fontSize:se.table.groupHeader.badge.fontSize,fontWeight:se.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:G.tasks.length})]})]}),Fe?null:G.tasks.map((ar,lr)=>ol(ar,Ko&&lr===G.tasks.length-1&&ie))]})}}):he(Wl,{customScrollParent:pe,data:e,computeItemKey:(S,G)=>G.seq,endReached:$e,itemContent:(S,G)=>ol(G,S===e.length-1&&ie)}):null})}),he(gr,{anchorEl:an?.anchorEl??null,value:Dn?.status??"",options:Dn?hl(Dn):qn,onSelect:S=>{Dn&&I(Dn.seq,S)},onClose:()=>nr(null)}),he(Hl,{transitionDuration:0,anchorEl:rr?.anchorEl??null,open:!!rr,onClose:()=>pi(null),children:["high","medium","low"].map(S=>Go(wr,{selected:ir?.priority===S,onClick:()=>{ir&&ve?.(ir.seq,S),pi(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[he(Eo,{priority:S,small:!0}),ir?.priority===S?he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},S))}),Go(Hl,{anchorEl:Pe?.anchorEl??null,open:!!Pe,onClose:()=>ht(null),transitionDuration:0,children:[Go(wr,{selected:!Pe?.task.tab_key,onClick:()=>{Pe&&x(Pe.task.seq,""),ht(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[he(Yf,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",Pe?.task.tab_key?null:he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),f.filter(S=>!S.archived).map(S=>{let G=Oe(S.icon),Fe=Pe?.task.tab_key===S.key;return Go(wr,{selected:Fe,onClick:()=>{Pe&&x(Pe.task.seq,S.key),ht(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[G?he(G,{sx:{fontSize:17,color:"#1e3a8a"}}):null,S.label,Fe?he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},S.key)}),T?[he(Ff,{},"add-project-divider"),Go(wr,{onClick:()=>wn(!0),sx:{fontSize:14,color:"#787774"},children:[he(Hf,{children:he(Wf,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),T?he(_r,{open:_n,onClose:()=>wn(!1),onSubmit:(S,G)=>{let Fe=Pe?.task.seq??0;(async()=>{let Ko=await T(S,G);Ko&&Fe&&x(Fe,Ko)})(),ht(null)}}):null,he(Xf,{anchorEl:ae?.anchorEl??null,open:!!ae&&ae?.field==="start_date",onClose:()=>fe(null),selectedDate:Qf(ae?.date??""),onDateChange:fm}),he(St,{anchorEl:ae?.anchorEl??null,open:!!ae&&ae?.field==="due_date",date:ae?.date??"",reminder:ae?.reminder??"none",hideReminder:!!ae?.completed,onClose:()=>fe(null),onDateChange:xm,onReminderChange:gm}),he(Ue,{open:!!Qe,anchorEl:Qe?.anchorEl??null,title:Qe?.kind==="claim"?"\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:()=>io(null),onConfirm:()=>{Qe&&C?.(Qe.taskSeq),io(null)}}),he(Ue,{open:!!_,anchorEl:_?.anchorEl??null,title:_?.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:_?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ro(null),onConfirm:()=>{_&&c(_.task,_.nextCompleted),ro(null)}})]})}import{useCallback as lt,useMemo as st,useRef as bx,useState as ct}from"react";import{Box as Se,ButtonBase as ns,Divider as Gl,IconButton as Yl,Menu as jl,MenuItem as Ct}from"@mui/material";import Ji from"@mui/icons-material/Add";import Xl from"@mui/icons-material/MoreVert";import Ql from"@mui/icons-material/EditOutlined";import Jl from"@mui/icons-material/ArchiveOutlined";import Zl from"@mui/icons-material/UnarchiveOutlined";import hx from"@mui/icons-material/NotificationsOutlined";import kx from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as Jf}from"@mui/material";import{jsx as Kl}from"react/jsx-runtime";function at({sx:e,...o}){return Kl(Jf,{viewBox:"0 0 24 24",...o,sx:{fill:"none",...e},children:Kl("path",{d:"M4 6H20M16 6L15.7294 5.18807C15.4671 4.40125 15.3359 4.00784 15.0927 3.71698C14.8779 3.46013 14.6021 3.26132 14.2905 3.13878C13.9376 3 13.523 3 12.6936 3H11.3064C10.477 3 10.0624 3 9.70951 3.13878C9.39792 3.26132 9.12208 3.46013 8.90729 3.71698C8.66405 4.00784 8.53292 4.40125 8.27064 5.18807L8 6M18 6V16.2C18 17.8802 18 18.7202 17.673 19.362C17.3854 19.9265 16.9265 20.3854 16.362 20.673C15.7202 21 14.8802 21 13.2 21H10.8C9.11984 21 8.27976 21 7.63803 20.673C7.07354 20.3854 6.6146 19.9265 6.32698 19.362C6 18.7202 6 17.8802 6 16.2V6M14 10V17M10 10V17",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}import{DndContext as Tx,DragOverlay as yx,PointerSensor as Sx,pointerWithin as Bx,rectIntersection as Cx,useDroppable as vx,useSensor as Ix,useSensors as _x}from"@dnd-kit/core";import{SortableContext as rs,arrayMove as es,horizontalListSortingStrategy as wx,useSortable as Dx,verticalListSortingStrategy as Ox}from"@dnd-kit/sortable";import{CSS as Mx}from"@dnd-kit/utilities";import Zi from"@ehfuse/overlay-scrollbar";import{useState as nx}from"react";import{Box as Bt,ButtonBase as rx,Checkbox as ix,Tooltip as ax}from"@mui/material";import lx from"@mui/icons-material/AlarmOutlined";import sx from"@mui/icons-material/TimerOutlined";import{Box as Nt,Button as Zf,Popover as ex}from"@mui/material";import ox from"@mui/icons-material/CheckCircle";import{jsx as Ft,jsxs as Dr}from"react/jsx-runtime";function Or({anchorEl:e,open:o,acks:t,total:n,avatarSrcByName:r,onRequestConfirm:a,onClose:i}){let l=He();return Ft(ex,{open:o&&(l||!!e),anchorEl:e,onClose:i,transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...l?{anchorReference:"none",slotProps:{paper:{sx:{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxWidth:"calc(100vw - 48px)",maxHeight:"70vh",borderRadius:3}}}}:{},children:Dr(Nt,{sx:{minWidth:240,maxWidth:320,py:1},children:[Dr(Nt,{sx:{px:2,pb:.75,fontSize:po(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",t.length,"/",n]}),t.length===0?Ft(Nt,{sx:{px:2,py:1.5,fontSize:po(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>Dr(Nt,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Ft(xo,{names:[u.name],size:22,avatarSrcByName:r}),Ft(Nt,{component:"span",sx:{fontSize:po(14),color:"#37352f",whiteSpace:"nowrap"},children:u.name}),Ft(Nt,{component:"span",sx:{ml:"auto",fontSize:po(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:tt(u.time)}),Ft(ox,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},u.account_seq)),a?Ft(Nt,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:Dr(Zf,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{a(),i()},sx:{fontSize:po(13)},children:["\uD655\uC778 \uC694\uCCAD (",n-t.length,"\uBA85 \uBBF8\uD655\uC778)"]})}):null]})})}function tx(e){let o=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(t=>t>0&&t!==o))]}function Ul(e,o){let t=tx(e),n=e.acks??[],r=o>0?n.find(a=>a.account_seq===o):void 0;return{myTime:r?.time??"",canConfirm:o>0&&t.includes(o)&&!r,count:n.filter(a=>t.includes(a.account_seq)).length,total:t.length}}function T1(e){let o=String(e??"").trim();return o?o.slice(5,16).replaceAll("-","."):""}import{Fragment as ux,jsx as go,jsxs as Ht}from"react/jsx-runtime";function pn(e){return{border:`1px solid ${e.borderColor}`,borderRadius:1,p:1,bgcolor:e.bg,display:"flex",flexDirection:"column",gap:.75,boxShadow:"0 1px 2px rgba(0,0,0,0.04)",...e.sx}}function cx(e){let o=e.trim();return o?o.slice(2,10).replaceAll("-","."):"-"}function mx(){let e=new Date,o=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${o}-${t}`}function Wt({task:e,statusOptions:o,showDueDate:t=!1,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:a,titleFontSize:i=13}){let l=le(),c=!!e.due_date&&e.due_date.slice(0,10)<=mx()?l.colors.danger:l.colors.accentOnSurface,p=Ul(e,0),[d,s]=nx(null),m=kt(e,o),f=new Set(e.label_keys??[]),B=m.filter(h=>!f.has(h.key)),b=m.filter(h=>f.has(h.key));return Ht(ux,{children:[Ht(Bt,{sx:{display:"flex",alignItems:"center",gap:.5},children:[go(ix,{size:"small",checked:e.completed,onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),onChange:(h,x)=>n?.({anchorEl:h.currentTarget,taskSeq:e.seq,nextCompleted:x}),sx:{p:0}}),go(ax,{title:e.title,arrow:!0,enterDelay:300,children:Ht(Bt,{sx:{flex:1,minWidth:0,pr:3.5,fontSize:i,fontWeight:l.mode==="dark"||e.completed?400:500,color:l.mode==="dark"?l.colors.textStrong:l.colors.textPrimary,lineHeight:1.35,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})}),(e.comment_count??e.comments?.length??0)>0?go(Cr,{sx:{fontSize:15,flexShrink:0,color:l.colors.textMuted}}):null]}),e.is_bug&&e.ticket_no?go(Bt,{sx:{pl:3,mt:-.5,fontSize:12.5,color:l.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,Ht(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[Ht(Bt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[B.map(h=>go(we,{option:h,small:!0},h.key)),go(Eo,{priority:e.priority,small:!0}),b.map(h=>go(we,{option:h,small:!0},h.key))]}),t&&String(e.due_date??"").trim()?Ht(rx,{disabled:!a,onPointerDown:h=>h.stopPropagation(),onClick:h=>{h.stopPropagation(),a?.(e,h.currentTarget)},sx:{display:"inline-flex",alignItems:"center",gap:.25,px:.5,py:.1,borderRadius:.75,fontSize:13,fontWeight:500,color:c,whiteSpace:"nowrap","&:hover":a?{bgcolor:l.colors.border}:void 0},children:[cx(e.due_date),go(lx,{sx:{fontSize:15}})]}):null]}),t&&e.estimated_time?Ht(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:l.colors.textSecondary},children:[go(sx,{sx:{fontSize:14}}),e.estimated_time]}):null,go(xo,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),p.total>0?go(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:go(Bt,{sx:{flexShrink:0,width:64},onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),children:go(un,{canConfirm:!1,count:p.count,total:p.total,onConfirm:()=>{},onShowList:h=>s(h)})})}):null,go(Or,{anchorEl:d,open:!!d,acks:e.acks??[],total:p.total,onRequestConfirm:r&&p.count<p.total?()=>{r(e),s(null)}:void 0,onClose:()=>s(null)})]})}import{Box as dx}from"@mui/material";import{useSortable as px}from"@dnd-kit/sortable";import{CSS as fx}from"@dnd-kit/utilities";import{jsx as Vl}from"react/jsx-runtime";function xx(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function Mr({task:e,statusOptions:o,variant:t="card",showDueDate:n=!1,onRequestArchiveToggle:r,onRequestReply:a,onDueDateClick:i,onCardClick:l,onCardContextMenu:u,titleFontSize:c}){let p=le(),{attributes:d,listeners:s,setNodeRef:m,transform:f,transition:B,isDragging:b}=px({id:String(e.seq)}),h=t==="list";return Vl(dx,{ref:m,...d,...s,onClick:l?()=>l(e):void 0,onContextMenu:u?x=>u(e,x):void 0,sx:{...h?xx(p.card):pn(p.card),opacity:b?.35:e.completed?.55:1,transform:fx.Translate.toString(f),transition:B,position:"relative",cursor:"default",touchAction:"none","&:hover":h?{bgcolor:p.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:Vl(Wt,{task:e,statusOptions:o,showDueDate:n,onRequestArchiveToggle:r,onRequestReply:a,onDueDateClick:i,titleFontSize:c})})}function gx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function vo(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let o=gx(e.end_date);return o?`${e.name} (~${o})`:e.name}import{jsx as j,jsxs as Me}from"react/jsx-runtime";var os=2,Er="group-",Io="colmove-",ji="__default__",Xi=wi,Qi="__other__",Pr="sprint-",ts=`${Pr}0`,Ex={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function is(e){return{flexShrink:0,width:e.width,py:.1,borderRadius:`${e.borderRadius}px`,bgcolor:e.bg,border:e.border,color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums",...e.sx}}function Px({column:e,tasks:o,statusOptions:t,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:a,onAddTask:i,canAdd:l,onOpenMenu:u,onCardClick:c,onCardContextMenu:p,grow:d,summary:s,onOpenSprintMenu:m}){let f=le(),{setNodeRef:B,isOver:b}=vx({id:`${Er}${e.key}`}),{attributes:h,listeners:x,setNodeRef:T,transform:g,transition:v,isDragging:C}=Dx({id:`${Io}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Me(Se,{ref:I=>{B(I),T(I)},sx:{flex:d?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:I=>I.shadows[1],bgcolor:b?f.colors.accentSoft:f.board.columnBg,transition:"background-color 0.15s",overflow:"hidden",transform:Mx.Translate.toString(g),...v?{transition:`${v}, background-color 0.15s`}:{},opacity:C?.6:1},children:[Me(Se,{...h,...x,sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${f.card.borderColor}`,flexShrink:0,touchAction:"none",cursor:e.isDefault||e.isArchived||e.locked?"default":"grab",opacity:e.isArchived?.65:1},children:[e.dot?j(Se,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let I=Oe(e.icon);return I?j(I,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),j(Se,{component:"span",sx:{fontSize:f.board.columnHeaderFontSize,fontWeight:700,color:f.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),j(Se,{component:"span",sx:{...is(f.board.badge),ml:"auto"},children:o.length}),e.sprint&&m?j(Yl,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:I=>I.stopPropagation(),onClick:I=>m(I.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:j(Xl,{sx:{fontSize:18}})}):e.locked?null:j(Yl,{size:"small","aria-label":"\uD504\uB85C\uC81D\uD2B8 \uBA54\uB274",onPointerDown:I=>I.stopPropagation(),onClick:I=>u({anchorEl:I.currentTarget,column:e}),sx:{color:"#9a9a97"},children:j(Xl,{sx:{fontSize:18}})})]}),s?j(Se,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${f.card.borderColor}`,flexShrink:0},children:s}):null,j(Se,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:j(Zi,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},children:Me(Se,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[j(rs,{items:o.map(I=>String(I.seq)),strategy:Ox,children:o.map(I=>j(Mr,{task:I,statusOptions:t,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:a,onCardClick:c,onCardContextMenu:p},I.seq))}),o.length===0&&!l?j(Se,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,o.length===0&&l?j(Se,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Me(ns,{className:"taskbox-board-add",onClick:()=>i(e.isDefault?"":e.key),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${f.card.borderColor}`,bgcolor:f.card.bg,color:f.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.card.hoverBg}},children:[j(Ji,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function ea({tasks:e,statusOptions:o,customTabs:t,mode:n="active",onToggleCompleted:r,onRequestReply:a,onChangeDueDate:i,onChangeReminder:l,onMoveTask:u,columnAxis:c="project",statusColumns:p=[],onMoveTaskStatus:d,sprintColumns:s=[],onMoveTaskSprint:m,onAddGroup:f,onAddTask:B,canAdd:b=!0,onRequestRename:h,onArchiveProject:x,onDeleteProject:T,onReorderProjects:g,onOpenDetail:v,onTaskContextMenu:C,renderColumnSummary:I,onEditSprint:M,onChangeSprintStatus:J,onRemoveSprint:E}){let X=le(),[w,y]=ct(null),[H,N]=ct(null),[$,P]=ct(null),[te,de]=ct(null),[A,W]=ct(null),[K,F]=ct(null),[O,L]=ct(null),[Q,Z]=ct(null),[ue,ee]=ct(null),ye=bx(!1),R=st(()=>new Map(e.map(D=>[D.seq,D])),[e]),k=st(()=>{let D=e.filter(z=>z.is_notice);return D.sort((z,ie)=>z.completed!==ie.completed?z.completed?1:-1:ie.seq-z.seq),D},[e]),ne=st(()=>t.filter(D=>!D.archived),[t]),re=st(()=>t.filter(D=>D.archived),[t]),ve=D=>({key:D.key,label:D.label,icon:D.icon,isDefault:!1,isArchived:D.archived}),$e=st(()=>new Set(p.map(D=>D.key)),[p]),se=st(()=>new Set(s.map(D=>D.seq)),[s]),Ie=st(()=>{if(c==="sprint")return[{key:ts,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...s.map(D=>({key:`${Pr}${D.seq}`,label:vo(D),icon:"",isDefault:!1,isArchived:!1,dot:Ex[D.status],locked:!0,sprint:D}))];if(c==="status"){let D=p.map(z=>({key:z.key,label:z.name,icon:"",isDefault:!1,isArchived:!1,dot:z.dot,locked:!0}));return D.some(z=>z.key===Xi)?D:[...D,{key:Xi,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return n==="archived"?re.map(ve):[{key:ji,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...ne.map(ve)]},[c,p,s,n,ne,re]),V=_x(Ix(Sx,{activationConstraint:{distance:5}})),Ee=lt(D=>{let z=String(D.active.id).startsWith(Io),ie=Bx(D),ce=ie.length>0?ie:Cx(D);if(z)return ce.filter(_=>String(_.id).startsWith(Io));let ae=ce.filter(_=>!String(_.id).startsWith(Io)),fe=ae.filter(_=>!String(_.id).startsWith(Er));return fe.length>0?fe:ae},[]),Xe=st(()=>{let D=new Map;for(let z of e){if(z.is_notice)continue;let ie;if(c==="sprint"){let ae=z.sprint_seq??0;ie=se.has(ae)?`${Pr}${ae}`:ts}else ie=c==="status"?z.completed?Xi:$e.has(String(z.status??""))?String(z.status??""):Qi:z.tab_key?.trim()||ji;let ce=D.get(ie);ce?ce.push(z):D.set(ie,[z])}for(let z of D.values())z.sort((ie,ce)=>{if(ie.completed!==ce.completed)return ie.completed?1:-1;let ae=(ie.group_sort_no??0)>0,fe=(ce.group_sort_no??0)>0;return ae&&fe?(ie.group_sort_no??0)-(ce.group_sort_no??0):ae!==fe?ae?-1:1:ie.due_date!==ce.due_date?ie.due_date<ce.due_date?-1:1:ie.seq-ce.seq});return D},[e,c,$e,se]),bt=st(()=>c!=="status"||(Xe.get(Qi)??[]).length===0?Ie:[...Ie,{key:Qi,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Ie,Xe]),Wo=lt(D=>O?(O.get(D)??[]).map(z=>R.get(z)).filter(z=>!!z):Xe.get(D)??[],[O,R,Xe]),Zo=lt(D=>{let z=String(D.active.id);if(z.startsWith(Io)){ee(z.slice(Io.length));return}Z(Number(z)),L(new Map(Ie.map(ie=>[ie.key,(Xe.get(ie.key)??[]).map(ce=>ce.seq)])))},[Ie,Xe]),$o=lt((D,z)=>{if(D.startsWith(Er))return{key:D.slice(Er.length),overSeq:null};let ie=Number(D);for(let[ce,ae]of z)if(ae.includes(ie))return{key:ce,overSeq:ie};return null},[]),Pt=lt(D=>{let{active:z,over:ie}=D;!ie||String(z.id).startsWith(Io)||L(ce=>{if(!ce)return ce;let ae=Number(z.id),fe=$o(String(ie.id),ce);if(!fe)return ce;let _=[...ce.entries()].find(([,Pe])=>Pe.includes(ae))?.[0];if(!_||_===fe.key)return ce;let ro=new Map(ce);ro.set(_,(ro.get(_)??[]).filter(Pe=>Pe!==ae));let Qe=[...ro.get(fe.key)??[]],io=Qe.length;if(fe.overSeq!==null){let Pe=Qe.indexOf(fe.overSeq);Pe!==-1&&(io=Pe)}return Qe.splice(io,0,ae),ro.set(fe.key,Qe),ro})},[$o]),rn=lt(D=>{let z=String(D.active.id);if(z.startsWith(Io)){ee(null);let io=String(D.over?.id??"");if(!io.startsWith(Io))return;let Pe=z.slice(Io.length),ht=io.slice(Io.length);if(Pe===ht)return;let _n=t.map(nr=>nr.key),wn=_n.indexOf(Pe),an=_n.indexOf(ht);if(wn===-1||an===-1)return;g(es(_n,wn,an));return}let ie=O;if(L(null),Z(null),ye.current=!0,!ie||!D.over)return;let ce=Number(z),ae=[...ie.entries()].find(([,io])=>io.includes(ce));if(!ae)return;let[fe,_]=ae,ro=[..._],Qe=$o(String(D.over.id),ie);if(Qe&&Qe.key===fe&&Qe.overSeq!==null&&Qe.overSeq!==ce){let io=ro.indexOf(ce),Pe=ro.indexOf(Qe.overSeq);io!==-1&&Pe!==-1&&(ro=es(ro,io,Pe))}if(c==="status"){d?.(ce,fe);return}if(c==="sprint"){m?.(ce,Number(fe.slice(Pr.length))||0);return}u(ce,fe===ji?"":fe,ro)},[t,O,$o,u,g,c,d,m]),Oo=lt(()=>{L(null),Z(null),ee(null),ye.current=!0},[]),no=lt(D=>{if(ye.current){ye.current=!1;return}v(D)},[v]),mo=Q!==null?R.get(Q)??null:null,uo=ue!==null?Ie.find(D=>D.key===ue)??null:null,Rt=lt((D,z)=>{F({anchorEl:z,taskSeq:D.seq,date:D.due_date,reminder:D.reminder})},[]),pe=H?.column??null;return Me(Se,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:`1px solid ${X.card.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",p:os,bgcolor:X.colors.surfaceSubtle},children:[Me(Tx,{sensors:V,collisionDetection:Ee,onDragStart:Zo,onDragOver:Pt,onDragEnd:rn,onDragCancel:Oo,children:[j(Se,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:n==="archived"&&Ie.length===0?j(Se,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):j(Zi,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,children:Me(Se,{sx:{display:"flex",alignItems:"flex-start",gap:os,height:"100%",minWidth:"min-content",pb:.5},children:[n==="active"&&k.length>0?Me(Se,{sx:{flex:c!=="project"?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:D=>D.shadows[1],bgcolor:X.card.bg,overflow:"hidden"},children:[Me(Se,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${X.card.borderColor}`,flexShrink:0,minHeight:48},children:[j(hx,{sx:{fontSize:17,color:"#e8763a"}}),j(Se,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:X.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Me(Se,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",k.length,")"]})]}),j(Se,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:j(Zi,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},children:j(Se,{sx:{display:"flex",flexDirection:"column"},children:k.map(D=>Me(Se,{onClick:()=>no(D),onContextMenu:z=>C(D,z),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${X.card.borderColor}`,bgcolor:X.card.bg,cursor:"pointer","&:hover":{bgcolor:X.card.hoverBg}},children:[j(Wt,{task:D,statusOptions:o,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:y}),(()=>{let z=(D.target_names??[]).filter(ce=>ce.trim());if(z.length===0)return null;let ie=z.length>2?`${z[0]}, ${z[1]} \uC678 ${z.length-2}`:z.join(", ");return Me(Se,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[j(kx,{sx:{fontSize:14,flexShrink:0}}),j(Se,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:ie})]})})()]},D.seq))})})})]}):null,j(rs,{items:ne.map(D=>`${Io}${D.key}`),strategy:wx,children:bt.map(D=>j(Px,{column:D,tasks:Wo(D.key),summary:I?.(D.key,Wo(D.key)),onOpenSprintMenu:M||J||E?(z,ie)=>P({anchorEl:z,sprint:ie}):void 0,statusOptions:o,onRequestArchiveToggle:y,onRequestReply:a,onDueDateClick:Rt,onAddTask:B,canAdd:b&&c==="project",onOpenMenu:N,onCardClick:no,onCardContextMenu:C,grow:c!=="project"},D.key))}),n==="active"&&c==="project"?Me(ns,{onClick:f,sx:{flex:"0 0 270px",minWidth:270,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,py:2,border:"1.5px dashed #cfcfcc",borderRadius:1.5,color:"#787774",fontSize:14,"&:hover":{bgcolor:"#eef2f6",borderColor:"#9a9a97"}},children:[j(Ji,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,n==="active"&&bt.length===0&&k.length===0?j(Se,{sx:{flex:1,minWidth:240,display:"flex",alignItems:"center",justifyContent:"center",color:"#9a9a97",fontSize:14,py:6},children:c==="project"?"\uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0C8 \uD504\uB85C\uC81D\uD2B8\uB97C \uCD94\uAC00\uD574 \uC5C5\uBB34\uB97C \uC815\uB9AC\uD558\uC138\uC694.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})}),j(yx,{children:mo?j(Se,{sx:{...pn,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:j(Wt,{task:mo,statusOptions:o,showDueDate:!0,titleFontSize:15})}):uo?Me(Se,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:X.card.bg,border:`1px solid ${X.card.borderColor}`,borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let D=Oe(uo.icon);return D?j(D,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),j(Se,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:X.board.columnHeaderColor},children:uo.label}),j(Se,{component:"span",sx:is(X.board.badge),children:(Xe.get(uo.key)??[]).length})]}):null})]}),Me(jl,{transitionDuration:0,anchorEl:H?.anchorEl??null,open:!!H,onClose:()=>N(null),children:[pe&&!pe.isArchived&&b?Me(Ct,{onClick:()=>{pe&&B(pe.isDefault?"":pe.key),N(null)},sx:{fontSize:14,gap:1},children:[j(Ji,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,pe&&!pe.isDefault&&!pe.isArchived?Me(Ct,{onClick:()=>{h(pe.key,pe.label,pe.icon),N(null)},sx:{fontSize:14,gap:1},children:[j(Ql,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,pe&&!pe.isDefault&&!pe.isArchived?Me(Ct,{onClick:()=>{x(pe.key,!0),N(null)},sx:{fontSize:14,gap:1},children:[j(Jl,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,pe&&pe.isArchived?Me(Ct,{onClick:()=>{x(pe.key,!1),N(null)},sx:{fontSize:14,gap:1},children:[j(Zl,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,pe&&!pe.isDefault?j(Gl,{}):null,pe&&!pe.isDefault?Me(Ct,{onClick:()=>{H&&W(H),N(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[j(at,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Me(jl,{transitionDuration:0,anchorEl:$?.anchorEl??null,open:!!$,onClose:()=>P(null),children:[M?Me(Ct,{onClick:()=>{$&&M($.sprint.seq),P(null)},sx:{fontSize:14,gap:1},children:[j(Ql,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,J?Me(Ct,{onClick:()=>{$&&J($.sprint.seq,$.sprint.status==="closed"?"active":"closed"),P(null)},sx:{fontSize:14,gap:1},children:[$?.sprint.status==="closed"?j(Zl,{sx:{fontSize:18,color:"#787774"}}):j(Jl,{sx:{fontSize:18,color:"#787774"}}),$?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,E?j(Gl,{}):null,E?Me(Ct,{onClick:()=>{$&&de($),P(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[j(at,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),j(Ue,{open:!!te,anchorEl:te?.anchorEl??null,title:`"${te?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>de(null),onConfirm:()=>{te&&E?.(te.sprint.seq),de(null)}}),j(St,{anchorEl:K?.anchorEl??null,open:!!K,date:K?.date??"",reminder:K?.reminder??"none",onClose:()=>F(null),onDateChange:D=>{K&&(i(K.taskSeq,D),F(z=>z&&{...z,date:D}))},onReminderChange:D=>{K&&(l(K.taskSeq,D),F(z=>z&&{...z,reminder:D}))}}),j(Ue,{open:!!A,anchorEl:A?.anchorEl??null,title:`"${A?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
2
|
+
\uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>W(null),onConfirm:()=>{A&&T(A.column.key),W(null)}}),j(Ue,{open:!!w,anchorEl:w?.anchorEl??null,title:w?.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:w?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>y(null),onConfirm:()=>{w&&r(w.taskSeq,w.nextCompleted),y(null)}})]})}import{useCallback as It,useMemo as Wn,useRef as Nx,useState as $n}from"react";import{Box as Ve,Button as Fx,ButtonBase as ls,IconButton as as}from"@mui/material";import Hx from"@mui/icons-material/Add";import Wx from"@mui/icons-material/ChevronLeft";import $x from"@mui/icons-material/ChevronRight";import Kx from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Ux}from"@ehfuse/mui-datetime-picker";import{DndContext as Vx,DragOverlay as Gx,PointerSensor as Yx,pointerWithin as jx,rectIntersection as Xx,useDroppable as Qx,useSensor as Jx,useSensors as Zx}from"@dnd-kit/core";import{SortableContext as eg,arrayMove as og,verticalListSortingStrategy as tg}from"@dnd-kit/sortable";import ng from"@ehfuse/overlay-scrollbar";import{useEffect as Rx,useState as zx}from"react";function vt(e){let{loadHolidays:o}=yo(),[t,n]=zx(()=>new Map),r=e.join(",");return Rx(()=>{if(!o||!r){n(new Map);return}let a=!1;return o(r.split(",").map(Number)).then(i=>{if(a)return;let l=new Map;for(let u of i)l.has(u.date)||l.set(u.date,u.name);n(l)}).catch(()=>{}),()=>{a=!0}},[o,r]),t}function qx(e){let[o,t,n]=e.split("-").map(Number),r=new Date(Date.UTC(o,t-1,n+1)),a=i=>String(i).padStart(2,"0");return`${r.getUTCFullYear()}-${a(r.getUTCMonth()+1)}-${a(r.getUTCDate())}`}function fn(e){let o=new Map;for(let t of e){let n=t.start_date;for(let r=0;r<62&&n<=t.end_date;r+=1){let a=o.get(n);a?a.push(t):o.set(n,[t]),n=qx(n)}}for(let t of o.values())t.sort((n,r)=>(n.time||"99:99").localeCompare(r.time||"99:99")||n.title.localeCompare(r.title));return o}import{Box as oa,Tooltip as Ax}from"@mui/material";import{jsx as ta,jsxs as Lx}from"react/jsx-runtime";function xn({event:e,small:o=!1}){let t=e.time?`${e.time} ${e.title}`:e.title,n=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",r=a=>{a.stopPropagation();let[i,l,u]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${i}/${l}/${u}`,"_blank")};return ta(Ax,{title:`(${n}) ${t}`,arrow:!0,enterDelay:300,children:Lx(oa,{onClick:r,onPointerDown:a=>a.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:o?.6:.8,borderRadius:.75,bgcolor:"#f1f1ef",color:"#37352f",fontSize:15,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,minWidth:0,maxWidth:"100%",cursor:"pointer","&:hover":{bgcolor:"#ececea"}},children:[ta(oa,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),ta(oa,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:t})]})})}import{jsx as Be,jsxs as mt}from"react/jsx-runtime";var ss=36,rg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],Rr="day-";function na(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(o.getDate()-o.getDay()),o}function ra(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function ig(e){let o=e[0],t=e[e.length-1];return o.getMonth()===t.getMonth()?`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4`:o.getFullYear()===t.getFullYear()?`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4 - ${t.getMonth()+1}\uC6D4`:`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4 - ${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4`}function ag(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function lg({dayKey:e,isToday:o,dayLabel:t,holidayName:n,tasks:r,googleEvents:a,statusOptions:i,onRequestArchiveToggle:l,onRequestReply:u,onAddSchedule:c,canAdd:p,onCardClick:d,onCardContextMenu:s,summary:m}){let f=le(),{setNodeRef:B}=Qx({id:`${Rr}${e}`});return mt(Ve,{ref:B,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:o?f.calendar.todayBg:f.calendar.cellBg},children:[mt(Ve,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:ss,bgcolor:o?f.calendar.todayBg:f.calendar.dateBandBg,borderBottom:r.length>0?`1px solid ${f.calendar.borderColor}`:"none",flexShrink:0},children:[n?Be(Ve,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:f.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}):null,o?Be(Ve,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:f.colors.danger,color:f.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Be(Ve,{component:"span",sx:{fontSize:13.5,fontWeight:o?700:400,color:n?f.colors.danger:f.colors.textPrimary,flexShrink:0},children:t})]}),m?Be(Ve,{sx:{px:1,py:1,borderBottom:`1px solid ${f.calendar.borderColor}`,flexShrink:0},children:m}):null,Be(Ve,{sx:{flex:1,minHeight:0,bgcolor:o?f.calendar.todayBg:f.colors.surfaceSubtle},children:Be(ng,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:mt(Ve,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[a.length>0?Be(Ve,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:a.map(b=>Be(xn,{event:b},b.uid))}):null,Be(eg,{items:r.map(b=>String(b.seq)),strategy:tg,children:r.map(b=>Be(Mr,{titleFontSize:15,task:b,statusOptions:i,variant:"list",onRequestArchiveToggle:l,onRequestReply:u,onCardClick:d,onCardContextMenu:s},b.seq))}),Be(Ve,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...p?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:mt(ls,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${f.calendar.borderColor}`,bgcolor:f.calendar.cellBg,color:f.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.calendar.hoverBg}},children:[Be(Hx,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function cs({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onToggleCompleted:r,onMoveTask:a,onRequestReply:i,onAddSchedule:l,canAdd:u=!0,onOpenDetail:c,onTaskContextMenu:p,renderColumnSummary:d}){let s=le(),[m,f]=$n(()=>na(new Date)),[B,b]=$n(null),[h,x]=$n(null),[T,g]=$n(null),[v,C]=$n(null),I=Nx(!1),M=Wn(()=>Array.from({length:7},(O,L)=>ra(m,L)),[m]),J=Wn(()=>new Map(e.map(O=>[O.seq,O])),[e]),E=Wn(()=>[...new Set(M.map(O=>O.getFullYear()))],[M]),X=vt(E),w=Zx(Jx(Yx,{activationConstraint:{distance:5}})),y=It(O=>{let L=jx(O),Q=L.length>0?L:Xx(O),Z=Q.filter(ue=>!String(ue.id).startsWith(Rr));return Z.length>0?Z:Q},[]),H=Wn(()=>fn(o),[o]),N=Wn(()=>{let O=new Map;for(let L of e){let Q=L.due_date.slice(0,10);if(!Q)continue;let Z=O.get(Q);Z?Z.push(L):O.set(Q,[L])}for(let L of O.values())L.sort((Q,Z)=>{let ue=Q.sort_no>0,ee=Z.sort_no>0;if(ue&&ee)return Q.sort_no-Z.sort_no;if(ue!==ee)return ue?-1:1;if(Q.completed!==Z.completed)return Q.completed?1:-1;let ye=Di(Q),R=Di(Z);return ye!==R?ye?-1:1:Q.seq-Z.seq});return O},[e]),$=It(O=>T?(T.get(O)??[]).map(L=>J.get(L)).filter(L=>!!L):N.get(O)??[],[T,J,N]),P=It(O=>{C(Number(O.active.id)),g(new Map(M.map(L=>{let Q=qe(L);return[Q,(N.get(Q)??[]).map(Z=>Z.seq)]})))},[M,N]),te=It((O,L)=>{if(O.startsWith(Rr))return{day:O.slice(Rr.length),overSeq:null};let Q=Number(O);for(let[Z,ue]of L)if(ue.includes(Q))return{day:Z,overSeq:Q};return null},[]),de=It(O=>{let{active:L,over:Q}=O;Q&&g(Z=>{if(!Z)return Z;let ue=Number(L.id),ee=te(String(Q.id),Z);if(!ee)return Z;let ye=[...Z.entries()].find(([,re])=>re.includes(ue))?.[0];if(!ye||ye===ee.day)return Z;let R=new Map(Z);R.set(ye,(R.get(ye)??[]).filter(re=>re!==ue));let k=[...R.get(ee.day)??[]],ne=k.length;if(ee.overSeq!==null){let re=k.indexOf(ee.overSeq);re!==-1&&(ne=re)}return k.splice(ne,0,ue),R.set(ee.day,k),R})},[te]),A=It(O=>{let{active:L,over:Q}=O,Z=T;if(g(null),C(null),I.current=!0,!Z||!Q)return;let ue=Number(L.id),ee=[...Z.entries()].find(([,re])=>re.includes(ue));if(!ee)return;let[ye,R]=ee,k=[...R],ne=te(String(Q.id),Z);if(ne&&ne.day===ye&&ne.overSeq!==null&&ne.overSeq!==ue){let re=k.indexOf(ue),ve=k.indexOf(ne.overSeq);re!==-1&&ve!==-1&&(k=og(k,re,ve))}a(ue,ye,k)},[T,a,te]),W=It(()=>{g(null),C(null),I.current=!0},[]),K=It(O=>{if(I.current){I.current=!1;return}c(O)},[c]),F=v!==null?J.get(v)??null:null;return mt(Ve,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${s.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[mt(Ve,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:s.calendar.headerBg,borderBottom:`1px solid ${s.calendar.borderColor}`,flexShrink:0},children:[mt(Ve,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Be(as,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>f(ra(m,-7)),children:Be(Wx,{sx:{fontSize:20,color:s.colors.textSecondary}})}),Be(Fx,{size:"small",color:"inherit",onClick:()=>f(na(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:13,fontWeight:s.mode==="dark"?400:500,color:s.mode==="dark"?s.colors.textStrong:s.colors.textPrimary},children:"\uC624\uB298"}),Be(as,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>f(ra(m,7)),children:Be($x,{sx:{fontSize:20,color:s.colors.textSecondary}})})]}),mt(ls,{onClick:O=>x(O.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:s.mode==="dark"?400:700,color:s.mode==="dark"?s.colors.textStrong:s.colors.textPrimary,"&:hover":{bgcolor:s.colors.surfaceHover}},children:[ig(M),Be(Kx,{sx:{fontSize:18,color:s.colors.textMuted}})]})]}),Be(Ve,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:s.calendar.headerBg,borderBottom:`1px solid ${s.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${s.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:M.map(O=>{let L=O.getDay(),Q=X.has(qe(O));return Be(Ve,{sx:{height:ss,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:L===0||Q?s.colors.danger:L===6?s.colors.accentOnSurface:s.colors.textSecondary},children:rg[L]},qe(O))})}),Be(Ve,{sx:{flex:1,minHeight:0},children:mt(Vx,{sensors:w,collisionDetection:y,onDragStart:P,onDragOver:de,onDragEnd:A,onDragCancel:W,children:[Be(Ve,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${s.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:M.map(O=>{let L=qe(O);return Be(lg,{dayKey:L,isToday:L===n,dayLabel:ag(O),holidayName:X.get(L)??"",summary:d?.(L,$(L)),tasks:$(L),googleEvents:H.get(L)??[],statusOptions:t,onRequestArchiveToggle:b,onRequestReply:i,onAddSchedule:l,canAdd:u,onCardClick:K,onCardContextMenu:p},L)})}),Be(Gx,{children:F?Be(Ve,{sx:{...pn,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:Be(Wt,{task:F,statusOptions:t})}):null})]})}),Be(Ux,{anchorEl:h,open:!!h,onClose:()=>x(null),selectedDate:m,onDateChange:O=>{f(na(O)),x(null)}}),Be(Ue,{open:!!B,anchorEl:B?.anchorEl??null,title:B?.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:B?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>b(null),onConfirm:()=>{B&&r(B.taskSeq,B.nextCompleted),b(null)}})]})}import{useCallback as Kn,useMemo as $t,useState as zr}from"react";import{Box as Ge,Button as sg,ButtonBase as ds,IconButton as ms,Tooltip as cg}from"@mui/material";import mg from"@mui/icons-material/Add";import ug from"@mui/icons-material/ChevronLeft";import dg from"@mui/icons-material/ChevronRight";import pg from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as fg}from"@ehfuse/mui-datetime-picker";import{DndContext as xg,DragOverlay as gg,PointerSensor as bg,pointerWithin as hg,rectIntersection as kg,useDraggable as Tg,useDroppable as ps,useSensor as yg,useSensors as Sg}from"@dnd-kit/core";import Bg from"@ehfuse/overlay-scrollbar";import{jsx as De,jsxs as Ro}from"react/jsx-runtime";var Cg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],qr="mday-",Ar="mchip-",fs=36,xs=15,gs={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"};function vg(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(o.getDate()-o.getDay()),o}function Lr(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(1),o}function Ig(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function us(e,o){let t=Lr(e);return t.setMonth(t.getMonth()+o),t}function _g({task:e,statusOptions:o,isPreview:t=!1,onOpenDetail:n,onContextMenu:r}){let a=le(),i=a.mode==="dark",{attributes:l,listeners:u,setNodeRef:c,isDragging:p}=Tg({id:String(e.seq),disabled:t}),{setNodeRef:d}=ps({id:`${Ar}${e.seq}`,disabled:t}),s=Oe(e.icon||_e),[m]=kt(e,o);return De(cg,{title:e.title,arrow:!0,enterDelay:400,children:Ro(Ge,{ref:f=>{c(f),d(f)},...l,...u,onClick:()=>n(e),onContextMenu:f=>r(e,f),sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,flexShrink:0,borderRadius:.75,bgcolor:m?i?ln(m.dot,a.chip.darkBgAlpha):m.bg:i?a.card.bg:a.colors.surfaceHover,color:m?i?a.chip.darkTextSource==="fg"?m.fg:m.dot:m.fg:a.colors.textPrimary,fontSize:xs,fontWeight:i||e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:t?.5:p?.35:e.completed?.6:1,border:t?`1px dashed ${a.colors.accent}`:"1px solid transparent",pointerEvents:t?"none":"auto",cursor:"pointer",touchAction:"none",overflow:"hidden","&:hover":{filter:"brightness(0.96)"}},children:[De(Ge,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,bgcolor:gs[e.priority]}}),s?De(s,{sx:{fontSize:14,flexShrink:0,opacity:.75}}):null,Ro(Ge,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:i?a.colors.textStrong:a.colors.textPrimary},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})]})})}function wg({dayKey:e,dayNumber:o,isToday:t,isOtherMonth:n,weekday:r,holidayName:a,tasks:i,googleEvents:l,statusOptions:u,previewSeq:c,onOpenDetail:p,onTaskContextMenu:d,onAddSchedule:s,canAdd:m}){let f=le(),B=f.mode==="dark",{setNodeRef:b,isOver:h}=ps({id:`${qr}${e}`}),x=i,T=!!a||r===0;return Ro(Ge,{ref:b,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.25,p:.5,bgcolor:h?f.colors.accentSoft:t?f.calendar.todayBg:n?f.colors.surfaceSubtle:f.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...m?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:fs,flexShrink:0,mx:-.5,mt:-.5,mb:.25,px:1,bgcolor:t?f.calendar.todayBg:f.calendar.dateBandBg,borderBottom:`1px solid ${f.calendar.borderColor}`},children:[a?De(Ge,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:f.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a}):null,t?De(Ge,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:f.colors.danger,color:f.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,De(Ge,{component:"span",sx:{fontSize:13.5,fontWeight:t?700:400,color:n?f.colors.textMuted:T?f.colors.danger:r===6?f.colors.accentOnSurface:f.colors.textPrimary,flexShrink:0},children:o})]}),l.map(g=>De(xn,{event:g,small:!0},g.uid)),x.map(g=>De(_g,{task:g,statusOptions:u,isPreview:g.seq===c,onOpenDetail:p,onContextMenu:d},g.seq)),De(Ge,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:Ro(ds,{className:"taskbox-month-add",onClick:()=>s(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:.75,borderBottom:`1px dashed ${f.calendar.borderColor}`,bgcolor:f.calendar.cellBg,color:f.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.calendar.hoverBg}},children:[De(mg,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function bs({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onMoveTask:r,onAddSchedule:a,canAdd:i=!0,onOpenDetail:l,onTaskContextMenu:u}){let c=le(),p=c.mode==="dark",[d,s]=zr(()=>Lr(new Date)),[m,f]=zr(null),[B,b]=zr(null),[h,x]=zr(null),T=$t(()=>{let A=vg(d);return Array.from({length:42},(W,K)=>Ig(A,K))},[d]),g=$t(()=>new Map(e.map(A=>[A.seq,A])),[e]),v=$t(()=>fn(o),[o]),C=$t(()=>[...new Set(T.map(A=>A.getFullYear()))],[T]),I=vt(C),M=$t(()=>{let A=new Map;for(let W of e){let K=W.due_date.slice(0,10);if(!K)continue;let F=A.get(K);F?F.push(W):A.set(K,[W])}for(let W of A.values())W.sort((K,F)=>{let O=K.sort_no>0,L=F.sort_no>0;return O&&L?K.sort_no-F.sort_no:O!==L?O?-1:1:K.completed!==F.completed?K.completed?1:-1:K.seq-F.seq});return A},[e]),J=Sg(yg(bg,{activationConstraint:{distance:5}})),E=Kn(A=>{let W=hg(A),K=W.length>0?W:kg(A),F=K.filter(O=>String(O.id).startsWith(Ar));return F.length>0?F:K.filter(O=>String(O.id).startsWith(qr))},[]),X=Kn(A=>{b(Number(A.active.id))},[]),w=Kn(A=>{x(A.over?String(A.over.id):null)},[]),y=$t(()=>{let A=new Map;for(let[W,K]of M)for(let F of K)A.set(F.seq,W);return A},[M]),H=B!==null?g.get(B)?.due_date.slice(0,10)??"":"",N=$t(()=>{if(B===null||!h)return null;if(h.startsWith(Ar)){let A=Number(h.slice(Ar.length)),W=y.get(A);if(!W)return null;let K=(M.get(W)??[]).filter(O=>O.seq!==B),F=K.findIndex(O=>O.seq===A);return{day:W,index:F===-1?K.length:F}}if(h.startsWith(qr)){let A=h.slice(qr.length),W=(M.get(A)??[]).filter(K=>K.seq!==B);return{day:A,index:W.length}}return null},[B,y,h,M]),$=Kn(A=>{let W=M.get(A)??[];if(B===null||!N)return W;let K=g.get(B);if(!K)return W;let F=W.filter(O=>O.seq!==B);return A===N.day?[...F.slice(0,N.index),K,...F.slice(N.index)]:A===H?F:W},[B,H,N,g,M]),P=Kn(A=>{let W=B,K=N;if(b(null),x(null),W===null||!K)return;let F=(M.get(K.day)??[]).filter(L=>L.seq!==W),O=[...F.slice(0,K.index).map(L=>L.seq),W,...F.slice(K.index).map(L=>L.seq)];r(W,K.day,O)},[B,N,r,M]),te=B!==null?g.get(B)??null:null,de=`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4`;return Ro(Ge,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${c.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:c.calendar.headerBg,borderBottom:`1px solid ${c.calendar.borderColor}`,flexShrink:0},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:.25},children:[De(ms,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>s(us(d,-1)),children:De(ug,{sx:{fontSize:20,color:c.colors.textSecondary}})}),De(sg,{size:"small",color:"inherit",onClick:()=>s(Lr(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:13,fontWeight:c.mode==="dark"?400:500,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),De(ms,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>s(us(d,1)),children:De(dg,{sx:{fontSize:20,color:c.colors.textSecondary}})})]}),Ro(ds,{onClick:A=>f(A.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:c.mode==="dark"?400:700,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary,"&:hover":{bgcolor:c.colors.surfaceHover}},children:[de,De(pg,{sx:{fontSize:18,color:c.colors.textMuted}})]})]}),De(Ge,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:c.calendar.headerBg,borderBottom:`1px solid ${c.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${c.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:Cg.map((A,W)=>De(Ge,{sx:{height:fs,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:W===0?c.colors.danger:W===6?c.colors.accentOnSurface:c.colors.textSecondary},children:A},A))}),De(Ge,{sx:{flex:1,minHeight:0},children:Ro(xg,{sensors:J,collisionDetection:E,onDragStart:X,onDragOver:w,onDragEnd:P,onDragCancel:()=>{b(null),x(null)},children:[De(Bg,{style:{height:"100%"},thumb:{width:8},children:De(Ge,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${c.calendar.borderColor}`,borderBottom:`1px solid ${c.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:T.map(A=>{let W=qe(A);return De(wg,{dayKey:W,dayNumber:A.getDate(),isToday:W===n,isOtherMonth:A.getMonth()!==d.getMonth(),weekday:A.getDay(),holidayName:I.get(W)??"",tasks:$(W),googleEvents:v.get(W)??[],statusOptions:t,previewSeq:N?.day===W?B:null,onOpenDetail:l,onTaskContextMenu:u,onAddSchedule:a,canAdd:i},W)})})}),De(gg,{children:te?Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:c.calendar.cellBg,border:`1px solid ${c.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:xs,fontWeight:500,color:c.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[De(Ge,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:gs[te.priority]}}),te.title]}):null})]})}),De(fg,{anchorEl:m,open:!!m,onClose:()=>f(null),selectedDate:d,onDateChange:A=>{s(Lr(A)),f(null)}})]})}import{useEffect as Dg,useMemo as Nr,useRef as Og,useState as hs}from"react";import{Box as So,Button as Mg,IconButton as ks}from"@mui/material";import Eg from"@mui/icons-material/ChevronLeft";import Pg from"@mui/icons-material/ChevronRight";import Rg from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as zg}from"@ehfuse/mui-datetime-picker";import{jsx as lo,jsxs as _t}from"react/jsx-runtime";var qg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],Ag={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"};function ia(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(1),o}function Ts(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Lg({task:e,statusOptions:o,onOpenDetail:t}){let n=le(),[r]=kt(e,o),a=Oe(e.icon||(e.is_notice?Mo:_e));return _t(So,{onClick:i=>{i.stopPropagation(),t(e)},sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:1,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:r?.bg??n.colors.surfaceHover,color:r?.fg??n.colors.textPrimary,fontSize:15,fontWeight:e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:e.completed?.6:1,cursor:"pointer",overflow:"hidden"},children:[lo(So,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,bgcolor:Ag[e.priority]??n.colors.accentOnSurface}}),a?lo(a,{sx:{fontSize:16,flexShrink:0,opacity:.75}}):null,_t(So,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:n.colors.textPrimary},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})]})}function ys({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onOpenDetail:r,onAddSchedule:a}){let i=le(),[l,u]=hs(()=>ia(new Date)),[c,p]=hs(!1),d=Nr(()=>{let x=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();return Array.from({length:x},(T,g)=>{let v=new Date(l.getFullYear(),l.getMonth(),g+1);return{ymd:Ts(v),dayNumber:g+1,weekday:v.getDay()}})},[l]),s=Nr(()=>{let x=new Map;for(let T of e){let g=T.due_date.slice(0,10);if(!g)continue;let v=x.get(g);v?v.push(T):x.set(g,[T])}for(let T of x.values())T.sort((g,v)=>g.completed!==v.completed?g.completed?1:-1:g.seq-v.seq);return x},[e]),m=Nr(()=>fn(o),[o]),f=Nr(()=>[l.getFullYear()],[l]),B=vt(f),b=Og(null),h=n.slice(0,7)===Ts(l).slice(0,7);return Dg(()=>{if(!h)return;let x=C=>{let I=C?.parentElement??null;for(;I;){let M=window.getComputedStyle(I);if(/(auto|scroll)/.test(M.overflowY)&&I.scrollHeight>I.clientHeight)return I;I=I.parentElement}return null},T=()=>{let C=b.current,I=x(C);if(!I||!C)return;let M=C.getBoundingClientRect().top-I.getBoundingClientRect().top+I.scrollTop;I.scrollTop=Math.max(0,M-I.clientHeight/2+C.clientHeight/2)},g=setTimeout(T,100),v=setTimeout(T,400);return()=>{clearTimeout(g),clearTimeout(v)}},[h,l]),_t(So,{sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:i.colors.surface},children:[_t(So,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[lo(ks,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>u(x=>new Date(x.getFullYear(),x.getMonth()-1,1)),children:lo(Eg,{sx:{fontSize:20,color:i.colors.textSecondary}})}),lo(Mg,{size:"small",color:"inherit",onClick:()=>u(ia(new Date)),sx:{minWidth:0,px:1,fontSize:13.5,color:i.mode==="dark"?i.colors.textStrong:i.colors.textPrimary},children:"\uC624\uB298"}),lo(ks,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>u(x=>new Date(x.getFullYear(),x.getMonth()+1,1)),children:lo(Pg,{sx:{fontSize:20,color:i.colors.textSecondary}})}),_t(So,{onClick:()=>p(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:i.mode==="dark"?400:700,color:i.mode==="dark"?i.colors.textStrong:i.colors.textPrimary,cursor:"pointer"},children:[l.getFullYear(),"\uB144 ",l.getMonth()+1,"\uC6D4",lo(Rg,{sx:{fontSize:20,color:i.colors.textMuted}})]})]}),lo(So,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${i.calendar.borderColor}`},children:d.map(({ymd:x,dayNumber:T,weekday:g})=>{let v=B.get(x)??"",C=x===n,I=!!v||g===0,M=s.get(x)??[],J=m.get(x)??[],E=M.length>0||J.length>0;return _t(So,{ref:C?b:void 0,onClick:a?()=>a(x):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:E?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${i.calendar.borderColor}`,...a?{cursor:"pointer"}:{}},children:[lo(So,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:_t(So,{sx:{display:"flex",alignItems:"center",gap:.5},children:[lo(So,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:26,height:26,borderRadius:"50%",fontSize:15.5,fontWeight:C?700:500,color:C?i.colors.surface:I?i.colors.danger:g===6?i.colors.accentOnSurface:i.colors.textPrimary,bgcolor:C?i.colors.accentOnSurface:"transparent"},children:T}),lo(So,{component:"span",sx:{fontSize:12.5,color:I?i.colors.danger:g===6?i.colors.accentOnSurface:i.colors.textSecondary},children:qg[g]})]})}),_t(So,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[J.map(X=>lo(xn,{event:X},X.uid)),M.map(X=>lo(Lg,{task:X,statusOptions:t,onOpenDetail:r},X.seq))]})]},x)})}),lo(zg,{open:c,centered:!0,monthOnly:!0,onClose:()=>p(!1),selectedDate:l,onDateChange:x=>{u(ia(x)),p(!1)}})]})}import{useCallback as Ss,useEffect as Bs,useMemo as aa,useRef as Hr,useState as Wr}from"react";import{Box as Ae,Tooltip as Is}from"@mui/material";import Ng from"@ehfuse/overlay-scrollbar";import Fg from"@mui/icons-material/CheckCircle";import Hg from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as Wg,PointerSensor as $g,closestCenter as Kg,useSensor as Ug,useSensors as Vg}from"@dnd-kit/core";import{SortableContext as Gg,arrayMove as Yg,useSortable as jg,verticalListSortingStrategy as Xg}from"@dnd-kit/sortable";import Qg from"@mui/icons-material/DragIndicator";import{jsx as Re,jsxs as wt}from"react/jsx-runtime";var la=36,Jg=48,Cs=40,Zg=24,eb=4,ob=14,vs=36,tb=12.5,gn=220,nb={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function Kt(e){let o=String(e??"").trim();if(!o)return null;let t=new Date(`${o}T00:00:00`);return Number.isNaN(t.getTime())?null:t}function Fr(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function sa(e,o){return Math.round((o.getTime()-e.getTime())/864e5)}function rb({task:e,dragHandle:o,onPointerDown:t,onClick:n}){let r=le(),a=Hr(null),[i,l]=Wr("");return Re(Is,{title:i,arrow:!0,enterDelay:300,children:wt(Ae,{onPointerDown:t,onClick:u=>n(e,u),onMouseEnter:()=>{let u=a.current;l(u&&u.scrollWidth>u.clientWidth?e.title:"")},sx:{width:gn,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:r.timeline.bg,borderRight:`1px solid ${r.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:r.mode==="dark"||e.completed?400:500,color:e.completed?r.colors.textMuted:r.mode==="dark"?r.colors.textStrong:r.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:r.colors.surfaceHover}},children:[o,Re(Ae,{ref:a,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function ib({id:e,showIndicator:o,children:t}){let n=le(),{attributes:r,listeners:a,setNodeRef:i}=jg({id:e});return wt(Ae,{ref:i,sx:{position:"relative"},children:[o?Re(Ae,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:n.colors.accentOnSurface,zIndex:5}}):null,t({...r,...a})]})}function _s({tasks:e,todayStr:o,onOpenDetail:t,onToggleChecklist:n,onReorderTasks:r,onTaskContextMenu:a}){let i=le(),l=aa(()=>[...e].sort((y,H)=>{let N=(y.timeline_sort_no??0)>0,$=(H.timeline_sort_no??0)>0;if(N&&$)return(y.timeline_sort_no??0)-(H.timeline_sort_no??0);if(N!==$)return N?-1:1;let P=y.due_date||y.start_date,te=H.due_date||H.start_date;return P!==te?P<te?-1:1:y.seq-H.seq}),[e]),[u,c]=Wr(null),[p,d]=Wr(null),s=Vg(Ug($g,{activationConstraint:{distance:4}})),m=Ss(y=>{c(y.over?Number(y.over.id):null)},[]),f=Ss(y=>{c(null),d(null);let{active:H,over:N}=y;if(!N||H.id===N.id)return;let $=l.map(de=>de.seq),P=$.indexOf(Number(H.id)),te=$.indexOf(Number(N.id));P===-1||te===-1||r(Yg($,P,te))},[l,r]),B=aa(()=>{let y=Kt(o)??new Date,H=y,N=Fr(y,21);for(let te of l){let de=Kt(te.start_date)??Kt(te.due_date),A=Kt(te.due_date)??de;de&&de<H&&(H=de),A&&A>N&&(N=A)}let $=Fr(H,-3),P=sa($,Fr(N,3))+1;return Array.from({length:P},(te,de)=>Fr($,de))},[l,o]),b=B[0],h=B.findIndex(y=>qe(y)===o),{dayWidths:x,dayOffsets:T,gridWidth:g}=aa(()=>{let y=B.map(($,P)=>$.getDate()===1||P===0?Jg:la),H=[],N=0;for(let $ of y)H.push(N),N+=$;return{dayWidths:y,dayOffsets:H,gridWidth:N}},[B]),v=gn+g,C=Hr(null),I=y=>{C.current={x:y.clientX,y:y.clientY}},M=(y,H)=>{let N=C.current;C.current=null,!(N&&(Math.abs(H.clientX-N.x)>5||Math.abs(H.clientY-N.y)>5))&&t(y)},J=Hr(null),[E,X]=Wr(!1);Bs(()=>{let y=J.current?.getScrollContainer();if(!y)return;let H=()=>X(y.scrollHeight>y.clientHeight);H();let N=new ResizeObserver(H);return N.observe(y),()=>N.disconnect()},[l.length]);let w=Hr(!1);return Bs(()=>{if(l.length===0||w.current)return;w.current=!0;let y=window.requestAnimationFrame(()=>{let H=J.current?.getScrollContainer();!H||h<0||(H.scrollLeft=Math.max(0,T[h]-la*3))});return()=>window.cancelAnimationFrame(y)},[l.length]),Re(Ae,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${i.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:i.timeline.headerBg},children:Re(Ae,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:Re(Ng,{ref:J,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:wt(Ae,{sx:{width:v,position:"relative",bgcolor:i.timeline.bg},children:[wt(Ae,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:i.timeline.headerBg,borderBottom:`1px solid ${i.timeline.gridColor}`},children:[Re(Ae,{sx:{width:gn,height:vs,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:i.timeline.headerBg,borderRight:`1px solid ${i.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:i.colors.textSecondary},children:"\uC81C\uBAA9"}),B.map((y,H)=>{let N=y.getDay(),$=H===h,P=y.getDate()===1||H===0;return Re(Ae,{sx:{width:x[H],height:vs,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:tb,fontWeight:$&&i.mode!=="dark"?700:400,color:$?i.timeline.bg:N===0?i.colors.danger:N===6?i.colors.accentOnSurface:i.colors.textSecondary,bgcolor:$?i.colors.danger:"transparent",borderRight:`1px solid ${i.timeline.gridColor}`,whiteSpace:"nowrap"},children:P?`${y.getMonth()+1}/${y.getDate()}`:y.getDate()},qe(y))})]}),Re(Wg,{sensors:s,collisionDetection:Kg,onDragStart:y=>d(Number(y.active.id)),onDragOver:m,onDragEnd:f,onDragCancel:()=>{c(null),d(null)},children:Re(Gg,{items:l.map(y=>String(y.seq)),strategy:Xg,children:wt(Ae,{sx:{position:"relative"},children:[B.map((y,H)=>{let N=y.getDay(),$=H===h;return!$&&N!==0&&N!==6?null:Re(Ae,{sx:{position:"absolute",top:0,bottom:0,left:gn+T[H],width:x[H],bgcolor:$?"rgba(229,72,77,0.07)":i.colors.surfaceSubtle,zIndex:0}},`stripe-${qe(y)}`)}),l.map((y,H)=>{let N=Kt(y.start_date)??Kt(y.due_date),$=Kt(y.due_date)??N,P=N?Math.min(B.length-1,Math.max(0,sa(b,N))):0,te=$?Math.min(B.length-1,Math.max(P,sa(b,$))):P,de=nb[y.priority],A=gn+T[P]+2,W=T[te]+x[te]-T[P]-4,K=y.checklist??[];return Re(ib,{id:String(y.seq),showIndicator:u===y.seq&&p!==y.seq,children:F=>wt(Ae,{sx:{borderBottom:H===l.length-1&&E?"none":`1px solid ${i.timeline.gridColor}`,position:"relative",zIndex:1,opacity:p===y.seq?.45:1},children:[wt(Ae,{onContextMenu:O=>a(y,O),sx:{display:"flex",height:Cs,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[Re(rb,{task:y,dragHandle:Re(Ae,{component:"span",className:"taskbox-timeline-handle",...F,onClick:O=>O.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:i.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:i.colors.accentOnSurface}},children:(()=>{let O=Oe(y.icon||_e)??Qg;return Re(O,{sx:{fontSize:17}})})()}),onPointerDown:I,onClick:M}),Re(Is,{title:`${y.title} (${y.start_date||"?"} ~ ${y.due_date||"?"})`,arrow:!0,enterDelay:300,children:Re(Ae,{onPointerDown:I,onClick:O=>M(y,O),sx:{position:"absolute",top:(Cs-20)/2,left:A,width:Math.max(la-4,W),height:20,borderRadius:1,bgcolor:de.bg,border:`1px solid ${de.border}`,opacity:y.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),K.map((O,L)=>Re(Ae,{sx:{display:"flex",height:Zg,position:"relative",mt:L===0?`${eb}px`:0,mb:L===K.length-1?`${ob}px`:0},children:Re(Ae,{sx:{width:gn,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:i.timeline.bg,borderRight:`1px solid ${i.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:O.checked?i.colors.textMuted:i.colors.textPrimary},children:wt(Ae,{onClick:()=>n(y.seq,L,!O.checked),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[O.checked?Re(Fg,{sx:{fontSize:17,color:i.colors.accentOnSurface,flexShrink:0}}):Re(Hg,{sx:{fontSize:17,color:i.colors.textMuted,flexShrink:0}}),Re(Ae,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:O.checked?"line-through":"none"},children:O.label})]})})},`${y.seq}-check-${L}`))]})},y.seq)}),l.length===0?Re(Ae,{sx:{py:8,textAlign:"center",color:i.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})})})}import{jsx as Ut}from"react/jsx-runtime";function Hw(e){switch(e.view){case"card":case"kanban":{let{view:o,...t}=e;return Ut(ea,{...t,columnAxis:o==="kanban"?"status":"project"})}case"sprint":{let{view:o,...t}=e;return Ut(ea,{...t,columnAxis:"sprint"})}case"calendar":{let{view:o,...t}=e;return Ut(cs,{...t})}case"month":{let{view:o,...t}=e;return Ut(bs,{...t})}case"agenda":{let{view:o,...t}=e;return Ut(ys,{...t})}case"timeline":{let{view:o,...t}=e;return Ut(_s,{...t})}default:{let{view:o,...t}=e;return Ut($l,{...t})}}}var Ww=["list","card","kanban","calendar","month","timeline"];import{Box as bo}from"@mui/material";function ab(e){let o=String(e??"").trim();if(!o)return 0;let t=0,n=!1;for(let r of o.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let a=parseFloat(r[1]),i=r[2].toLowerCase();n=!0,i==="m"||i==="\uBD84"?t+=a/60:i==="d"||i==="\uC77C"?t+=a*8:t+=a}if(!n){let r=parseFloat(o);Number.isFinite(r)&&(t+=r)}return t}function ws(e){let o=Math.round(e*10)/10;return`${o%1===0?o.toFixed(0):o.toFixed(1)}\uC2DC\uAC04`}function Ds(e,o,t){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(o))return 0;let n=new Date(`${e}T00:00:00`),r=new Date(`${o}T00:00:00`);if(r<n||r.getTime()-n.getTime()>3660*864e5)return 0;let a=0;for(let i=new Date(n);i<=r;i.setDate(i.getDate()+1)){let l=i.getDay();if(l===0||l===6)continue;let u=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")}`;t.has(u)||(a+=1)}return a}function Os(e){return e.reduce((o,t)=>t.completed?o:o+ab(t.estimated_time),0)}import{Fragment as lb,jsx as Dt,jsxs as zo}from"react/jsx-runtime";function Ms(e,o){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(o))return null;let t=new Date(`${e}T00:00:00`),n=new Date(`${o}T00:00:00`);return Math.round((t.getTime()-n.getTime())/864e5)}function Es({tasks:e,todayStr:o,showProgress:t=!0,dday:n=null,workdaysLeft:r=null,showPoints:a=!0,showHours:i=!0,showOverdue:l=!0,showInfo:u=!0,inline:c=!1}){let p=le(),d=e.filter(M=>!M.archived),s=d.filter(M=>M.completed).length,m=d.length>0?Math.round(s/d.length*100):0,f=d.filter(M=>!M.completed&&!M.is_event&&!!M.due_date&&M.due_date.slice(0,10)<o).length,B=d.reduce((M,J)=>J.completed?M:M+(J.story_points??0),0),b=Os(d),h=t?Dt(bo,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:p.summary.gaugeHeight,borderRadius:3,bgcolor:p.summary.gaugeTrackColor},children:Dt(bo,{sx:{height:"100%",borderRadius:3,width:`${m}%`,bgcolor:m>=100?p.summary.gaugeCompleteColor:p.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,x=t?zo(bo,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:p.summary.textColor},children:[m,"%"]}):null,T={color:p.summary.numberColor,fontWeight:700,fontSize:c?15:14},g=d.length-s,v=zo(lb,{children:[c?null:zo("span",{children:["\uB0A8\uC740 ",Dt(bo,{component:"span",sx:T,children:g}),"\uAC74"]}),l&&f>0?zo(bo,{component:"span",sx:{color:p.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",Dt(bo,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:f}),"\uAC74"]}):null,a&&B>0?zo("span",{children:[Dt(bo,{component:"span",sx:T,children:B}),"SP"]}):null,i&&b>0?zo("span",{children:["\uC57D ",Dt(bo,{component:"span",sx:T,children:ws(b).replace("\uC2DC\uAC04","")}),"\uC2DC\uAC04"]}):null]}),C=typeof r=="number"&&Number.isFinite(r)?zo("span",{children:["\uADFC\uBB34\uC77C ",Dt(bo,{component:"span",sx:T,children:r}),"\uC77C"]}):null,I=typeof n=="number"&&Number.isFinite(n)?Dt(bo,{component:"span",sx:{ml:c?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:p.summary.overdueColor,color:p.colors.textInverse,lineHeight:1.6},children:n===0?"D-day":n>0?`D-${n}`:`D+${-n}`}):null;return c?zo(bo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:p.summary.textColor,whiteSpace:"nowrap",...p.summary.sx},children:[u?v:null,u?C:null,u?I:null,h,x]}):zo(bo,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[t?zo(bo,{sx:{display:"flex",alignItems:"center",gap:1},children:[h,x]}):null,zo(bo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:p.summary.textColor},children:[v,C,I]})]})}import{useMemo as sb}from"react";import{jsx as cb}from"react/jsx-runtime";function oD({sprint:e,tasks:o,todayStr:t,...n}){let r=e.status==="closed"?null:Ms(e.end_date,t),a=r!==null&&r>=0,i=sb(()=>{if(!a)return[];let c=Number(t.slice(0,4)),p=Number(e.end_date.slice(0,4))||c,d=[];for(let s=c;s<=Math.max(c,p);s+=1)d.push(s);return d},[a,t,e.end_date]),l=vt(i),u=a?Ds(t,e.end_date,new Set(l.keys())):null;return cb(Es,{tasks:o,todayStr:t,dday:r,workdaysLeft:u,...n})}import{useEffect as kb,useRef as Tb,useState as yb}from"react";import{Box as ma}from"@mui/material";import{Children as mb}from"react";import{Box as ca,CircularProgress as ub}from"@mui/material";import{jsx as $r}from"react/jsx-runtime";var Ps={xs:2,md:3};function Rs(){return $r(ca,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:$r(ub,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function zs({children:e}){return $r(ca,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:Ps,pb:Ps},children:mb.map(e,o=>o==null||o===!1?null:$r(ca,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:o}))})}import{Box as dt,Button as xb,Checkbox as gb,Typography as Ot}from"@mui/material";import As from"@mui/icons-material/CheckCircle";import bb from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as fb,jsx as qs}from"react/jsx-runtime";var db="taskbox-search-highlight";function pb(e,o){let t=o?.keyPrefix??"hl";return e.map((n,r)=>qs("span",{className:n.highlight?o?.highlightClassName??db:o?.className,style:n.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:n.text},`${t}-${n.text}-${r}`))}function Kr({text:e,keyword:o,fallback:t="-",className:n,highlightClassName:r,keyPrefix:a}){let i=String(e??"").trim()||t,l=yr(i,o);return qs(fb,{children:pb(l,{className:n,highlightClassName:r,keyPrefix:a})})}import{jsx as ge,jsxs as bn}from"react/jsx-runtime";var hb={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:po(12.5),fontWeight:500,lineHeight:1.4},ut={fontSize:po(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function Yo({label:e,children:o}){return bn(dt,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[ge(dt,{sx:hb,children:e}),ge(dt,{sx:{...ut,flex:1,pt:.2},children:o})]})}function Ls({task:e,statusOptions:o,projectLabel:t,searchText:n,todayStr:r,onRequestToggleCompleted:a,onOpenDetail:i,onTaskContextMenu:l,targetSummary:u="",ackInfo:c,completeLocked:p=!1,unread:d=!1,noticeReadOnly:s=!1,onAckConfirm:m,onAckListClick:f,myManaged:B=!1}){let b=e.is_event?An(e):fo(e),h=Vo(e.start_date),x=Vo(e.due_date),T=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<r,g=(e.receiver_names??[]).filter(Boolean);return bn(dt,{role:"button",tabIndex:0,onClick:()=>i(e),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),i(e))},onContextMenu:v=>l(e,v),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",position:"relative"},children:[B?ge(dt,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,bn(dt,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[!s&&!p?ge(gb,{checked:e.completed,icon:ge(bb,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:ge(As,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:v=>v.stopPropagation(),onChange:(v,C)=>a({anchorEl:v.currentTarget,taskSeq:e.seq,nextCompleted:C}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{let v=Oe(e.icon||(e.is_notice?Mo:_e));if(!v)return null;let C=e.icon_color||(e.is_notice?"#e5484d":"#1e3a8a");return ge(v,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:C}})})(),ge(Ot,{sx:{fontSize:po(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed?"#9a9a97":"#111827",textDecoration:e.completed?"line-through":"none"},children:ge(Kr,{text:e.title,keyword:n})}),d?ge(dt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:po(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),bn(dt,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[ge(Yo,{label:b?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:bn(dt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:[b?ge(we,{option:b,small:!0}):null,ge(Eo,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?ge(Yo,{label:"\uB77C\uBCA8",children:ge(Tt,{labelKeys:e.label_keys,labelOptions:o})}):null,t?ge(Yo,{label:"\uD504\uB85C\uC81D\uD2B8",children:ge(Ot,{sx:ut,children:t})}):null,h?ge(Yo,{label:"\uC2DC\uC791",children:ge(Ot,{sx:ut,children:h})}):null,x?ge(Yo,{label:"\uB9C8\uAC10",children:bn(Ot,{sx:{...ut,color:T?"#e5484d":ut.color,fontWeight:T?600:400},children:[x,T?" \xB7 \uC9C0\uC5F0":""]})}):null,e.is_notice?ge(Yo,{label:"\uB300\uC0C1\uC790",children:ge(Ot,{sx:ut,children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,e.is_notice&&c?ge(Yo,{label:"\uD655\uC778",children:ge(xb,{size:"small",variant:c.canAck?"contained":"outlined",color:"inherit",startIcon:c.acked?ge(As,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:v=>{v.stopPropagation(),c.canAck?m?.(e):f?.(e,v.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:po(13),...c.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:c.canAck?"\uD655\uC778":`${c.count}/${c.total}`})}):null,!e.is_notice&&e.manager_name?ge(Yo,{label:"\uCC45\uC784\uC790",children:ge(Ot,{sx:ut,children:ge(Kr,{text:e.manager_name,keyword:n})})}):null,!e.is_notice&&g.length>0?ge(Yo,{label:"\uCC38\uC870\uC790",children:ge(Ot,{sx:ut,children:g.join(", ")})}):null,e.note?ge(Yo,{label:"\uBE44\uACE0",children:ge(Ot,{sx:ut,children:ge(Kr,{text:e.note,keyword:n})})}):null]})]})}import{jsx as hn,jsxs as Sb}from"react/jsx-runtime";function wD({tasks:e,statusOptions:o,customTabs:t,loading:n,searchText:r,todayStr:a,onToggleCompleted:i,onOpenDetail:l,onTaskContextMenu:u,getTargetSummary:c,getAckInfo:p,getNoticeReadOnly:d,isTaskUnread:s,getCompleteLocked:m,onAckConfirm:f,onAckListClick:B,onEndReached:b,myAccountSeq:h=0}){let x=new Map(t.map(C=>[C.key,C.label])),[T,g]=yb(null),v=Tb(null);return kb(()=>{let C=v.current;if(!b||!C)return;let I=new IntersectionObserver(M=>{M[0]?.isIntersecting&&b()});return I.observe(C),()=>I.disconnect()},[b,e.length]),e.length===0?n?hn(Rs,{}):hn(ma,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Sb(ma,{sx:{minWidth:0},children:[hn(zs,{children:e.map(C=>hn(Ls,{myManaged:h>0&&!C.is_notice&&!C.is_event&&(C.manager_account_seq??0)===h,task:C,statusOptions:o,projectLabel:C.tab_key?x.get(C.tab_key)??"":"",searchText:r,todayStr:a,onRequestToggleCompleted:g,onOpenDetail:l,onTaskContextMenu:u,targetSummary:C.is_notice?c?.(C):void 0,ackInfo:C.is_notice?p?.(C):void 0,noticeReadOnly:C.is_notice?d?.(C):!1,unread:s?.(C)??!1,completeLocked:m?.(C)??!1,onAckConfirm:f,onAckListClick:B},C.seq))}),b?hn(ma,{ref:v,sx:{height:"1px"}}):null,hn(Ue,{open:!!T,anchorEl:T?.anchorEl??null,title:T?.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:T?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>g(null),onConfirm:()=>{T&&i(T.taskSeq,T.nextCompleted),g(null)}})]})}import{useEffect as pk,useRef as fk,useState as xc}from"react";import{Box as Qn,Button as gc,Divider as xk,Drawer as gk,IconButton as Ca,Tooltip as bk}from"@mui/material";import hk from"@mui/icons-material/Close";import kk from"@mui/icons-material/ArrowBack";import Tk from"@ehfuse/overlay-scrollbar";import{Box as ua,ButtonBase as Bb,Divider as Cb,Popover as vb}from"@mui/material";import Ib from"@mui/icons-material/Check";import _b from"@ehfuse/overlay-scrollbar";import{jsx as Vt,jsxs as Fs}from"react/jsx-runtime";var Ns=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Ur({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:a}){return Vt(vb,{transitionDuration:0,open:!!e,anchorEl:e,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:Fs(ua,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[Vt(_b,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:Vt(Ir,{value:o||_e,onChange:i=>{n(i),a()}})}),r?Fs(ua,{sx:{px:1.25,pb:1.25},children:[Vt(Cb,{sx:{mb:1,borderColor:"#efefed"}}),Vt(ua,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:Ns.map(i=>{let l=(t||Ns[0])===i;return Vt(Bb,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${i}`,onClick:()=>r(i),sx:{width:26,height:26,borderRadius:"50%",bgcolor:i,display:"flex",alignItems:"center",justifyContent:"center"},children:l?Vt(Ib,{sx:{fontSize:15,color:"#ffffff"}}):null},i)})})]}):null]})})}import{useState as dc}from"react";import{Box as Yn,ButtonBase as nk,Divider as jn,Menu as rk,MenuItem as ik}from"@mui/material";import ak from"@mui/icons-material/SubjectOutlined";import lk from"@mui/icons-material/StickyNote2Outlined";import sk from"@mui/icons-material/LabelOutlined";import ck from"@mui/icons-material/DirectionsRunOutlined";import mk from"@mui/icons-material/SpeedOutlined";import{TextField as uk}from"@ehfuse/mui-form-controls";import{InfoAlert as dk}from"@ehfuse/alerts";import{useState as Mt}from"react";import{Box as js,Divider as Vb,ListItemIcon as Gb,Menu as fa,MenuItem as Un}from"@mui/material";import Yb from"@mui/icons-material/Add";import Gr from"@mui/icons-material/Check";import jb from"@mui/icons-material/ViewKanbanOutlined";import Xb from"@mui/icons-material/CalendarTodayOutlined";import Qb from"@mui/icons-material/EventOutlined";import Jb from"@mui/icons-material/PersonOutlineOutlined";import Us from"@mui/icons-material/PeopleAltOutlined";import Zb from"@mui/icons-material/FlagOutlined";import Vs from"@mui/icons-material/TimerOutlined";import eh from"@mui/icons-material/NotificationsNoneOutlined";import oh from"@mui/icons-material/InboxOutlined";import th from"@mui/icons-material/PlaceOutlined";import nh from"@mui/icons-material/MapOutlined";import{DatePicker as rh,TimePicker as Gs}from"@ehfuse/mui-datetime-picker";var jo="@media (max-width: 719.95px)";function so(e){return{[jo]:{order:e}}}import{useEffect as wb,useState as Db}from"react";import{Box as Ob}from"@mui/material";import{jsx as Mb}from"react/jsx-runtime";function pt({value:e,placeholder:o,readOnly:t,onCommit:n}){let r=le(),[a,i]=Db(e);return wb(()=>i(e),[e]),Mb(Ob,{component:"input",spellCheck:!1,value:a,readOnly:t,placeholder:o,onChange:l=>i(l.target.value),onBlur:()=>{a.trim()!==e&&n(a.trim())},onKeyDown:l=>{l.key==="Enter"&&l.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:r.colors.textPrimary,caretColor:r.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as da}from"@mui/material";import{jsx as Eb,jsxs as Hs}from"react/jsx-runtime";function xe({icon:e,label:o,onClick:t,sx:n,children:r}){return Hs(da,{sx:[{display:"flex",alignItems:"center",minHeight:26,[jo]:{minHeight:25}},...Array.isArray(n)?n:[n]],children:[Hs(da,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,o]}),Eb(da,{onClick:t?a=>t(a.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:t?"pointer":"default","&:hover":t?{bgcolor:"#f2f2f0"}:void 0,[jo]:{py:.25}},children:r})]})}import{Suspense as Pb,lazy as Rb,useEffect as zb,useState as Ws}from"react";import{Box as pa,Dialog as qb,DialogContent as Ab,DialogTitle as Lb,IconButton as $s,Tooltip as Nb}from"@mui/material";import Fb from"@mui/icons-material/Close";import Hb from"@mui/icons-material/Search";import{Fragment as Ub,jsx as qo,jsxs as Vr}from"react/jsx-runtime";function Wb(e){return qo(pa,{sx:{p:3,fontSize:14,color:"#9a9a97"},children:"\uC8FC\uC18C \uAC80\uC0C9 \uBAA8\uB4C8(react-daum-postcode)\uC744 \uBD88\uB7EC\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC785\uB825\uD574 \uC8FC\uC138\uC694."})}var $b=Rb(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:Wb})));function Kb(e){if(e.addressType!=="R")return e.address;let o="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(o+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(o+=o!==""?`, ${e.buildingName}`:e.buildingName),o!==""?`${e.address} (${o})`:e.address}function Ks({value:e,placeholder:o="\uC8FC\uC18C \uC785\uB825",readOnly:t,onCommit:n}){let[r,a]=Ws(e),[i,l]=Ws(!1),u=yo().slots?.addressSearch;zb(()=>a(e),[e]);let c=d=>{a(d),l(!1),d!==e&&n(d)};return Vr(Ub,{children:[Vr(pa,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[qo(pa,{component:"input",spellCheck:!1,value:r,readOnly:t,placeholder:o,onChange:d=>a(d.target.value),onBlur:()=>{i||r.trim()!==e&&n(r.trim())},onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),!t&&l(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),t?null:qo(Nb,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:qo($s,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>l(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:qo(Hb,{sx:{fontSize:17}})})})]}),u?qo(u,{open:i,onComplete:c,onClose:()=>l(!1)}):Vr(qb,{open:i,onClose:()=>l(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[Vr(Lb,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",qo($s,{onClick:()=>l(!1),size:"small",children:qo(Fb,{})})]}),qo(Ab,{style:{padding:0},dividers:!0,children:i?qo(Pb,{fallback:null,children:qo($b,{onComplete:d=>{c(Kb(d))},onClose:()=>l(!1),defaultQuery:r,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Yr,jsx as Y,jsxs as Ao}from"react/jsx-runtime";function ih(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function Ys(e){let[o="00",t="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(o)?o:"00",minute:/^\d{2}$/.test(t)?t:"00"}}function Gt({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Y(js,{component:"span",sx:{color:"#9a9a97"},children:e})}function jr({values:e,customTabs:o,avatarSrcByName:t,showEstimatedTime:n=!1,managerLocked:r=!1,notice:a=!1,event:i=!1,readOnly:l=!1,targetSummary:u="",narrowCollapsedSx:c,reminderLocked:p=!1,managerAction:d,hideProject:s=!1,leading:m,trailing:f,onChangeProject:B,onChangeStartDate:b,onChangeDueDate:h,onChangeReminder:x,onChangePriority:T,onChangeEstimatedTime:g,onChangeEventTime:v,onChangeEventPlace:C,onChangeEventAddress:I,onMemberEdit:M,onAddProject:J}){let[E,X]=Mt(null),[w,y]=Mt(!1),[H,N]=Mt(null),[$,P]=Mt(null),[te,de]=Mt(null),[A,W]=Mt(null),[K,F]=Mt(null),[O,L]=Mt(null),Q=He(),Z=Uo(),ue=R=>[so(R),...c?Array.isArray(c)?c:[c]:[]],ee=o.find(R=>R.key===e.tabKey),ye=o.filter(R=>!R.archived);return Ao(Yr,{children:[Ao(js,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",columnGap:3,rowGap:.25,px:2,[jo]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[m,s?null:Y(xe,{icon:Y(jb,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:l?void 0:R=>X(R),sx:ue(1),children:ee?(()=>{let R=Oe(ee.icon);return Ao(Yr,{children:[R?Y(R,{sx:{fontSize:16,color:"#1e3a8a"}}):null,ee.label]})})():"\uAE30\uBCF8"}),a?Y(xe,{icon:Y(Us,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:l?void 0:()=>M("targets"),sx:so(7),children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!a&&!i?Y(xe,{icon:Y(Jb,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:r||l||!e.managerName&&d?void 0:()=>M("manager"),sx:so(7),children:e.managerName?Ao(Yr,{children:[Y(xo,{names:[e.managerName],size:20,avatarSrcByName:t}),e.managerName]}):d??Y(Gt,{})}):null,i?null:Y(xe,{icon:Y(Xb,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC790",onClick:l?void 0:R=>de(R),sx:so(2),children:e.startDate?Vo(e.startDate):Y(Gt,{})}),a?null:Y(xe,{icon:Y(Us,{sx:{fontSize:17}}),label:i?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:l?void 0:()=>M("receivers"),sx:so(i?7:8),children:e.receiverNames.length>0?Ao(Yr,{children:[Y(xo,{names:e.receiverNames,size:20,avatarSrcByName:t}),e.receiverNames.length===1?e.receiverNames[0]:null]}):Y(Gt,{})}),Y(xe,{icon:Y(Qb,{sx:{fontSize:17}}),label:i?"\uB0A0\uC9DC":"\uB9C8\uAC10\uAE30\uD55C",onClick:l?void 0:R=>W(R),sx:so(3),children:e.dueDate?Vo(e.dueDate):Y(Gt,{})}),i?Y(xe,{icon:Y(Vs,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:l?void 0:R=>L(R),sx:so(4),children:e.eventTime?e.eventTime:Y(Gt,{label:"\uC885\uC77C"})}):null,i?Y(xe,{icon:Y(th,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:so(5),children:Y(pt,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:l,onCommit:R=>C?.(R)})}):null,n?Y(xe,{icon:Y(Vs,{sx:{fontSize:17}}),label:"\uC608\uC0C1\uC2DC\uAC04",onClick:l?void 0:R=>F(R),sx:ue(4),children:e.estimatedTime?e.estimatedTime:Y(Gt,{})}):null,Y(xe,{icon:Y(eh,{sx:{fontSize:17}}),label:"\uB9AC\uB9C8\uC778\uB354",onClick:l||p?void 0:R=>P(R),sx:ue(i?8:5),children:e.reminder==="none"?Y(Gt,{label:"\uC5C6\uC74C"}):Ki(e.reminder)}),i?Y(xe,{icon:Y(nh,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},so(6)],children:Y(Ks,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:l,onCommit:R=>I?.(R)})}):null,i?null:Y(xe,{icon:Y(Zb,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:l?void 0:R=>N(R),sx:ue(6),children:Y(Eo,{priority:e.priority,small:!0})}),f]}),Ao(fa,{transitionDuration:0,anchorEl:E,open:!!E,onClose:()=>X(null),...Z,children:[Ao(Un,{selected:!e.tabKey,onClick:()=>{B(""),X(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Y(oh,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),ye.map(R=>{let k=Oe(R.icon),ne=e.tabKey===R.key;return Ao(Un,{selected:ne,onClick:()=>{B(R.key),X(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[k?Y(k,{sx:{fontSize:17,color:"#1e3a8a"}}):null,R.label,ne?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R.key)}),J?[Y(Vb,{},"add-project-divider"),Ao(Un,{onClick:()=>y(!0),sx:{fontSize:14,color:"#787774"},children:[Y(Gb,{children:Y(Yb,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),J?Y(_r,{open:w,onClose:()=>y(!1),onSubmit:(R,k,ne)=>{(async()=>{let re=await J(R,k,ne);re&&B(re)})(),X(null)}}):null,Y(fa,{transitionDuration:0,anchorEl:H,open:!!H,onClose:()=>N(null),...Z,children:["high","medium","low"].map(R=>Ao(Un,{selected:e.priority===R,onClick:()=>{T(R),N(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[Y(Eo,{priority:R,small:!0}),e.priority===R?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R))}),Y(fa,{transitionDuration:0,anchorEl:$,open:!!$,onClose:()=>P(null),...Z,children:$i(i&&!!e.eventTime).map(R=>Ao(Un,{selected:e.reminder===R.value,onClick:()=>{x(R.value),P(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[R.label,e.reminder===R.value?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R.value))}),n?Y(Gs,{anchorEl:K,open:!!K,onClose:()=>F(null),value:Ys(e.estimatedTime),format:"HH:mm",minuteStep:5,autoApply:!0,centered:Q,locale:"ko",onChange:(R,k)=>{g?.(`${R}:${k}`),F(null)}}):null,i?Y(Gs,{anchorEl:O,open:!!O,onClose:()=>L(null),value:Ys(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:Q,locale:"ko",onChange:(R,k)=>{v?.(`${R}:${k}`),L(null)}}):null,Y(rh,{anchorEl:te,open:!!te,onClose:()=>de(null),selectedDate:ih(e.startDate),centered:Q,onDateChange:R=>{b(qe(R)),de(null)}}),Y(St,{anchorEl:A,open:!!A,date:e.dueDate,reminder:e.reminder,hideReminder:p,centered:Q,onClose:()=>W(null),onDateChange:h,onReminderChange:x})]})}import{useState as ah}from"react";import{Box as lh,Menu as sh,MenuItem as ch}from"@mui/material";import mh from"@mui/icons-material/RepeatOutlined";import uh from"@mui/icons-material/DevicesOutlined";import dh from"@mui/icons-material/ScreenSearchDesktopOutlined";import ph from"@mui/icons-material/SellOutlined";import fh from"@mui/icons-material/TaskAltOutlined";import{Fragment as Xs,jsx as Ye,jsxs as Qs}from"react/jsx-runtime";function xa({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Ye(lh,{component:"span",sx:{color:"#9a9a97"},children:e})}function Xr({values:e,readOnly:o=!1,showResolution:t=!1,onChangeRepro:n,onChangeDevice:r,onChangeWhere:a,onChangeVersion:i,onChangeResolution:l}){let[u,c]=ah(null),p=u?.field==="repro"?Bi:u?.field==="device"?Ci:vi,d=s=>{u?.field==="repro"?n(s):u?.field==="device"?r(s):u?.field==="resolution"&&l?.(s),c(null)};return Qs(Xs,{children:[Qs(Xs,{children:[Ye(xe,{icon:Ye(mh,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:o?void 0:s=>c({field:"repro",el:s}),children:xl(e.repro)||Ye(xa,{label:"\uC120\uD0DD"})}),Ye(xe,{icon:Ye(uh,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:o?void 0:s=>c({field:"device",el:s}),children:gl(e.device)||Ye(xa,{label:"\uC120\uD0DD"})}),Ye(xe,{icon:Ye(dh,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Ye(pt,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:o,onCommit:a})}),Ye(xe,{icon:Ye(ph,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Ye(pt,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:o,onCommit:i})}),t?Ye(xe,{icon:Ye(fh,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:o?void 0:s=>c({field:"resolution",el:s}),children:ur(e.resolution)||Ye(xa,{label:"\uC120\uD0DD"})}):null]}),Ye(sh,{open:!!u,anchorEl:u?.el??null,onClose:()=>c(null),transitionDuration:0,children:p.map(s=>Ye(ch,{onClick:()=>d(s.key),sx:{fontSize:14},children:s.name},s.key))})]})}import{Box as Js}from"@mui/material";import{jsxs as Zs}from"react/jsx-runtime";function _o({icon:e,title:o,titleExtra:t,children:n}){return Zs(Js,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[Zs(Js,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:14.5,fontWeight:500,color:"#37352f"},children:[e,o,t]}),n]})}import{useEffect as xh,useRef as ga,useState as gh}from"react";import{Box as ba,IconButton as bh,Tooltip as hh}from"@mui/material";import kh from"@mui/icons-material/ContentCopyOutlined";import Th from"@mui/icons-material/Check";import{EhfuseEditor as yh,minimalToolbarOptions as Sh}from"@ehfuse/editor";import{jsx as Yt,jsxs as Ch}from"react/jsx-runtime";function ha(e){let o=e.trim();return o?o.startsWith("<")?e:`<p>${o}</p>`:"<p></p>"}function Bh(e){let o=e.replace(/<br\s*\/?>/gi,`
|
|
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 Qr({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180}){let a=ga(null),i=ga(null),l=ga(Date.now()+800),[u,c]=fh(!1),p=He();return ph(()=>{if(n)return;let d=ha(o);i.current===d||i.current===o||(i.current=d,l.current=Date.now()+800,a.current?.setHtml(d))},[e,o,n]),n?Sh(ba,{sx:{position:"relative",mt:1},children:[Yt(ba,{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:ha(o)}}),Yt(gh,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Yt(xh,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(yh(o)).then(()=>{c(!0),window.setTimeout(()=>c(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:u?Yt(hh,{sx:{fontSize:17,color:"#2f9e5b"}}):Yt(bh,{sx:{fontSize:17}})})})]}):Yt(ba,{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:Yt(kh,{ref:a,defaultValue:ha(o),showToolbar:!p,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Th,locale:"ko",minHeight:r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:d=>{let s=Date.now()<l.current,m=d===i.current;i.current=d,!(s||m)&&t(d)}})})}import{useState as ka}from"react";import{Box as Lo,IconButton as Ta,Tooltip as Bh}from"@mui/material";import Ch from"@mui/icons-material/Close";import vh from"@mui/icons-material/AddCircle";import Ih from"@mui/icons-material/AddTask";import _h from"@mui/icons-material/Checklist";import wh from"@mui/icons-material/CheckCircle";import Dh from"@mui/icons-material/Launch";import Oh from"@mui/icons-material/RadioButtonUnchecked";import{Fragment as Mh,jsx as Ke,jsxs as kn}from"react/jsx-runtime";function Jr({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:a,removeLocked:i=!1,onConvertToTask:l,onOpenLinkedTask:u,resolveLinkedTask:c}){let[p,d]=ka(""),[s,m]=ka(null),[f,B]=ka(null),b=T=>{let g=T.task_seq?c?.(T.task_seq):void 0;return g?g.completed:T.checked},h=o.filter(b).length,x=()=>{p.trim()&&(t(e,p),d(""))};return kn(_o,{icon:Ke(_h,{sx:{fontSize:19,display:"block"}}),title:kn(Mh,{children:["\uD560\uC77C",o.length>0?kn(Lo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[h," / ",o.length]}):null]}),titleExtra:o.length>0?Ke(Lo,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:Ke(Lo,{sx:{height:"100%",borderRadius:3,width:`${Math.round(h/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[Ke(Lo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((T,g)=>{let v=T.task_seq?c?.(T.task_seq):void 0,C=b(T),I=!!T.task_seq;return kn(Lo,{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:[Ke(Lo,{component:"span",onClick:()=>n(e,g,!C),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:C?Ke(wh,{sx:{fontSize:18,color:"#2f80ed"}}):Ke(Oh,{sx:{fontSize:18,color:"#9a9a97"}})}),s?.index===g?Ke(Lo,{component:"input",autoFocus:!0,spellCheck:!1,value:s.label,enterKeyHint:"done",onChange:M=>m({index:g,label:M.target.value}),onBlur:()=>{s.label.trim()&&s.label.trim()!==T.label&&a?.(e,g,s.label),m(null)},onKeyDown:M=>{M.key==="Enter"&&M.target.blur(),M.key==="Escape"&&m(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):Ke(Lo,{component:"span",onClick:I?T.task_seq&&u?()=>u(T.task_seq):void 0:i||!a?void 0:()=>m({index:g,label:T.label}),sx:{flex:1,minWidth:0,fontSize:14,color:C?"#9a9a97":"#37352f",textDecoration:C?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...I?u?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:i||!a?{}:{cursor:"text"}},children:T.label}),I?kn(Lo,{component:"span",onClick:T.task_seq&&u?()=>u(T.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",...u?{cursor:"pointer"}:{}},children:[Ke(Dh,{sx:{fontSize:12}}),v?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!i&&!I&&l?Ke(Bh,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:Ke(Ta,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:M=>B({anchorEl:M.currentTarget,index:g,label:T.label}),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(Ih,{sx:{fontSize:16}})})}):null,i?null:Ke(Ta,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,g),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(Ch,{sx:{fontSize:15}})})]},`${T.label}-${g}`)})}),kn(Lo,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[Ke(Lo,{component:"input",spellCheck:!1,value:p,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:T=>d(T.target.value),onKeyDown:T=>{T.key==="Enter"&&x()},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"}}}),Ke(Ta,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!p.trim(),onMouseDown:T=>T.preventDefault(),onClick:x,sx:{flexShrink:0,color:p.trim()?"#2f80ed":"#c9c8c5"},children:Ke(vh,{sx:{fontSize:20}})})]}),Ke(Ue,{open:!!f,anchorEl:f?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>B(null),onConfirm:()=>{f&&l?.(e,f.index,f.label),B(null)}})]})}import{useRef as Ah,useState as Lh}from"react";import{Box as Xo,IconButton as Nh}from"@mui/material";import Fh from"@mui/icons-material/Close";import oc from"@mui/icons-material/AttachFileOutlined";var Eh=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"]),Js=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Eh.has(o)};import{LinearProgress as Ph}from"@mui/material";import{Fragment as Rh,jsx as qh,jsxs as zh}from"react/jsx-runtime";function Zs(e){let o=et(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),a=o.useValue("attachmentUpload.queue"),i=n??0;return!i||e>0&&(t??0)!==e?null:{index:i,total:r??0,queue:a??[]}}function ya(){let o=et().useValue("attachmentUpload.progress");return zh(Rh,{children:[o??0,"%"]})}function ec(){let o=et().useValue("attachmentUpload.progress");return qh(Ph,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as Hh,jsx as ho,jsxs as Vn}from"react/jsx-runtime";function Zr(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:a,onDownload:i}){let[l,u]=Lh(!1),c=Ah(null),p=He(),d=En(),s=xi(),m=Zs(e),f=e===0,B=g=>{if(a){a(g);return}window.open(s(g.uuid??""),"_blank","noopener,noreferrer")},b=g=>{if(i){i(g);return}window.open(s(g.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=g=>m?g+1<m.index?"done":g+1===m.index?"uploading":"waiting":"waiting",x=(g,v,C,I={})=>Vn(Xo,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:I.uploading?"#d5e6fb":"#e6e6e3",bgcolor:I.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Vn(Xo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[ho(oc,{sx:{fontSize:16,color:"#9a9a97"}}),v,ho(Xo,{component:"span",sx:{fontSize:12,color:I.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:C}),I.removeIndex!==void 0?ho(Nh,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,I.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ho(Fh,{sx:{fontSize:15}})}):null]}),I.uploading?ho(ec,{}):null]},g),T=g=>{let v=Js(g.name);return ho(Xo,{component:"button",type:"button",onClick:()=>v?B(g):b(g),title:`${g.name} ${v?"\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:g.name})};return Vn(_o,{icon:ho(oc,{sx:{fontSize:18,display:"block"}}),title:Vn(Hh,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Vn(Xo,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((g,v)=>{let C=`${g.uuid||g.name}-${v}`;if(f){let I=h(v),M=I==="uploading";return x(C,ho(Xo,{component:"span",sx:{...ei,color:I==="done"?"#37352f":"#9a9a97"},children:g.name}),M?ho(ya,{}):Zr(g.size),{uploading:M,removeIndex:!r&&!m?v:void 0})}return g.uuid?x(C,T(g),Zr(g.size),{removeIndex:r?void 0:v}):x(C,ho(Xo,{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:g.name}),Zr(g.size),{removeIndex:r?void 0:v})}),!f&&m?m.queue.slice(m.index-1).map((g,v)=>{let C=v===0;return x(`uploading-${m.index+v}-${g.name}`,ho(Xo,{component:"span",sx:{...ei,color:"#9a9a97"},children:g.name}),C?ho(ya,{}):Zr(g.size),{uploading:C})}):null]}),ho(Xo,{onClick:()=>c.current?.click(),onDragOver:g=>{g.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:g=>{g.preventDefault(),u(!1);let v=Array.from(g.dataTransfer.files);v.length>0&&t(e,v)},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:p?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${d}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${d}MB)`}),ho(Xo,{component:"input",ref:c,type:"file",multiple:!0,onChange:g=>{let v=Array.from(g.target.files??[]);v.length>0&&t(e,v),g.target.value=""},sx:{display:"none"}})]})}import{useState as Yh}from"react";import{Checkbox as jh,Divider as Xh,ListItemIcon as Qh,Menu as Jh,MenuItem as ic}from"@mui/material";import Zh from"@mui/icons-material/Add";import{useEffect as Wh,useState as tc}from"react";import{Box as Sa,Button as $h}from"@mui/material";import{FormDialog as Kh}from"@ehfuse/mui-form-dialog";import{ClearTextField as Uh}from"@ehfuse/mui-form-controls";import{ColorPicker as Vh}from"@ehfuse/mui-color-picker";import{ErrorAlert as Gh}from"@ehfuse/alerts";import{jsx as Gn,jsxs as Ba}from"react/jsx-runtime";var nc="#2f80ed";function rc({open:e,onClose:o,onSubmit:t}){let[n,r]=tc(""),[a,i]=tc(nc);Wh(()=>{e&&(r(""),i(nc))},[e]);let l=()=>{let p=n.trim();if(!p){Gh("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(p,a),o()},u=kl(a),c=Ba(Sa,{children:[Ba(Sa,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Gn(Uh,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:p=>r(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Gn(Vh,{value:a,onChange:p=>i(p),shape:"circle",colorSize:28})]}),Ba(Sa,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Gn(we,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...u}})]})]});return Gn(Kh,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:c}],actions:{showCancelButton:!0,right:Gn($h,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as ek,jsx as Tn,jsxs as ti}from"react/jsx-runtime";function ni({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:a}){let[i,l]=Yh(!1),u=Uo();return ti(ek,{children:[ti(Jh,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,...u,children:[t.map(c=>{let p=o.includes(c.key);return ti(ic,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Tn(jh,{size:"small",checked:p,sx:{p:0}}),Tn(we,{option:c})]},c.key)}),Tn(Xh,{}),ti(ic,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Tn(Qh,{children:Tn(Zh,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Tn(rc,{open:i,onClose:()=>l(!1),onSubmit:r})]})}function ac(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 lc(e,o){let t=(e.target_account_seqs??[]).filter(d=>d>0);if(t.length===0)return null;let n=new Set(t),r=ac(e,o),a=new Map;for(let d of r){let s=String(d.department??"").trim();if(!s)continue;let m=a.get(s)??[];m.push(d),a.set(s,m)}let i=[],l=new Set;for(let[d,s]of a)if(s.every(f=>n.has(Number(f.account_seq??0)))){i.push(d);for(let f of s)l.add(Number(f.account_seq??0))}let u=new Map(r.map(d=>[Number(d.account_seq??0),d.name])),c=e.target_names??[],p=[];return t.forEach((d,s)=>{l.has(d)||p.push(u.get(d)??c[s]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:i,individualNames:p}}function ri(e,o){let t=lc(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function VM(e,o){let t=lc(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function sc(e,o,t){let n=(e.target_account_seqs??[]).filter(p=>p>0),r=ac(e,o),a=n.length>0?n.length:r.length,i=e.acks??[],l=t>0&&i.some(p=>p.account_seq===t),u=t>0&&Number(e.author_account_seq??0)===t,c=n.length===0||n.includes(t);return{count:i.length,total:a,acked:l,canAck:t>0&&!u&&c&&!l&&!e.completed}}function cc(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(l=>l.size>n),a=e.filter(l=>l.size<=n),i=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
7
|
-
\uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:a,rejected:r,message:i}}import{Fragment as ii,jsx as ke,jsxs as Xn}from"react/jsx-runtime";var uc="#0f9d58";function dc({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:a=!1,hideProject:i=!1,employees:l=[],myAccountSeq:u=0,onMemberEdit:c,onAddProject:p,onAddLabelOption:d,contentSyncKey:s="create"}){let m=et(),f=En(),B=e.useFormValue("manager_name"),b=e.useFormValue("receiver_names"),h=e.useFormValue("start_date"),x=!!e.useFormValue("is_event"),T=!!e.useFormValue("is_bug"),g=e.useFormValue("bug_repro")??"",v=e.useFormValue("bug_device")??"",C=e.useFormValue("bug_where")??"",I=e.useFormValue("bug_version")??"",M=e.useFormValue("event_time")??"",J=e.useFormValue("event_place")??"",E=e.useFormValue("event_address")??"",X=e.useFormValue("due_date"),w=e.useFormValue("reminder"),y=e.useFormValue("priority"),H=e.useFormValue("content"),$=e.useFormValue("checklist")??[],P=e.useFormValue("tab_key"),te=e.useFormValue("sprint_seq")??0,de=e.useFormValue("story_points")??0,A=t.find(k=>k.key===P&&k.useSprints),W=A?n.filter(k=>`custom-${k.group_seq}`===P):[],[K,F]=mc(null),O=e.useFormValue("label_keys"),[L,Q]=mc(null),Z=e.useFormValue("target_names"),ue=e.useFormValue("target_account_seqs"),ye=m.useValue("createAttachmentFiles")??[],R=a?ri({author_account_seq:u,target_names:Z,target_account_seqs:ue},l):"";return Xn(ii,{children:[a?null:ke(Yn,{sx:{display:"flex",gap:1.25,px:2,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},{value:"bug",label:"\uC624\uB958"}].map(k=>{let ne=T?"bug":x?"event":"task",re=ne===k.value;return ke(ok,{onClick:()=>{if(ne===k.value)return;e.setFormValue("is_event",k.value==="event"),e.setFormValue("is_bug",k.value==="bug"),e.setFormValue("is_open",k.value==="bug");let ve=e.getFormValue("icon"),$e=e.getFormValue("icon_color"),se=[_e,"event",Pn].includes(ve),Ie=!$e||$e===uc||$e===Rn;se&&e.setFormValue("icon",k.value==="event"?"event":k.value==="bug"?Pn:_e),Ie&&e.setFormValue("icon_color",k.value==="event"?uc:k.value==="bug"?Rn:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:re?600:400,color:re?"#ffffff":"#787774",bgcolor:re?"#2563eb":"#f4f4f2"},children:k.label},k.label)})}),ke(jn,{sx:{borderColor:"#e6e6e3"}}),Xn(Yn,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ke(jr,{hideProject:i,values:{tabKey:P,managerName:B,receiverNames:b,startDate:h,dueDate:X,reminder:w,priority:y,eventTime:M,eventPlace:J,eventAddress:E},customTabs:t,avatarSrcByName:r,notice:a,event:x,onChangeEventTime:k=>e.setFormValue("event_time",k),onChangeEventPlace:k=>e.setFormValue("event_place",k),onChangeEventAddress:k=>e.setFormValue("event_address",k),targetSummary:R,onChangeProject:k=>e.setFormValue("tab_key",k),onAddProject:p,onChangeStartDate:k=>e.setFormValue("start_date",k),onChangeDueDate:k=>e.setFormValue("due_date",k),onChangeReminder:k=>e.setFormValue("reminder",k),onChangePriority:k=>e.setFormValue("priority",k),onMemberEdit:c,trailing:Xn(ii,{children:[A&&!x&&!a?Xn(ii,{children:[ke(xe,{icon:ke(lk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:k=>F(k),children:te>0?W.find(k=>k.seq===te)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ke(Yn,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ke(xe,{icon:ke(sk,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:ke(pt,{value:de>0?String(de):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:k=>e.setFormValue("story_points",Number(k.replace(/[^0-9.]/g,""))||0)})})]}):null,T?ke(Xr,{values:{repro:g,device:v,where:C,version:I},onChangeRepro:k=>e.setFormValue("bug_repro",k),onChangeDevice:k=>e.setFormValue("bug_device",k),onChangeWhere:k=>e.setFormValue("bug_where",k),onChangeVersion:k=>e.setFormValue("bug_version",k)}):null]}),leading:x?null:ke(Yn,{sx:{gridColumn:"1 / -1"},children:ke(xe,{icon:ke(ak,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:k=>Q(k),children:(O??[]).length>0?ke(Tt,{labelKeys:O??[],labelOptions:o}):ke(Yn,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(_o,{icon:ke(rk,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:ke(Qr,{syncKey:s,value:H,onChange:k=>e.setFormValue("content",k)})}),x?null:ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),x?null:ke(Jr,{taskSeq:0,checklist:$,onAdd:(k,ne)=>e.setFormValue("checklist",[...$,{label:ne,checked:!1}]),onToggle:(k,ne,re)=>e.setFormValue("checklist",$.map((ve,$e)=>$e===ne?{...ve,checked:re}:ve)),onRemove:(k,ne)=>e.setFormValue("checklist",$.filter((re,ve)=>ve!==ne)),onUpdate:(k,ne,re)=>e.setFormValue("checklist",$.map((ve,$e)=>$e===ne?{...ve,label:re}:ve))}),ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(oi,{taskSeq:0,attachments:ye.map(k=>({name:k.name,size:k.size})),onAdd:(k,ne)=>{let re=cc(ne,f);re.message&&mk(re.message),re.accepted.length!==0&&m.setValue("createAttachmentFiles",[...m.getValue("createAttachmentFiles")??[],...re.accepted])},onRemove:(k,ne)=>m.setValue("createAttachmentFiles",ye.filter((re,ve)=>ve!==ne))}),T?null:Xn(ii,{children:[ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(_o,{icon:ke(ik,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ke(ck,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ke(tk,{transitionDuration:0,anchorEl:K,open:!!K,onClose:()=>F(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...W.map(k=>({seq:k.seq,label:vo(k)}))].map(k=>ke(nk,{onClick:()=>{e.setFormValue("sprint_seq",k.seq),F(null)},sx:{fontSize:14,minWidth:170},children:k.label},k.seq))}),ke(ni,{anchorEl:L,selectedKeys:O??[],labelOptions:o,onToggle:k=>e.setFormValue("label_keys",fr(O??[],k)),onAddLabel:(k,ne)=>d?.(k,ne),onClose:()=>Q(null)})]})}import{Fragment as kk,jsx as Je,jsxs as ai}from"react/jsx-runtime";function RE({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:a="",presetManager:i=null,isNotice:l=!1,defaultBug:u=!1}=t,c=et(),p=dk(!1),[d,s]=pc(0),[m,f]=pc(null),B=n.useFormValue("title"),b=n.useFormValue("icon"),h=n.useFormValue("icon_color"),x=!!n.useFormValue("is_event"),T=!!n.useFormValue("is_bug"),g=He(),C=c.useValue("createSubmitting")??!1,I=cr(b||_e);return uk(()=>{let M=p.current;p.current=e,!(!e||M)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?Mo:u?Pn:_e,icon_color:l?"#e5484d":u?Rn:"",manager_name:i?.name??"",manager_account_seq:i?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:u,is_open:u,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:qe(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:a}),c.setValue("createAttachmentFiles",[]),s(J=>J+1))},[e]),ai(kk,{children:[Je(fk,{anchor:"right",open:e,onClose:o,sx:{zIndex:M=>M.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ai(Qn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[ai(Qn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[g?Je(Ca,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(bk,{})}):null,Je(xk,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Je(Ca,{size:"small",onClick:M=>f(M.currentTarget),sx:{color:h||"#1e3a8a"},children:Je(I,{sx:{fontSize:20}})})}),Je(Qn,{component:"input",autoFocus:!0,spellCheck:!1,value:B,placeholder:l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":x?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":T?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",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}}}),g?null:Je(Ca,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(gk,{})})]}),Je(Qn,{sx:{flex:1,minHeight:0},children:Je(hk,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Je(dc,{...t,contentSyncKey:`create-${d}`})})}),Je(pk,{sx:{borderColor:"#e6e6e3"}}),ai(Qn,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Je(fc,{onClick:o,color:"inherit",disabled:C,children:"\uCDE8\uC18C"}),Je(fc,{onClick:n.submit,variant:"contained",disabled:C,children:C?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),Je(Ur,{anchorEl:m,value:b,color:h||"#1e3a8a",onSelect:M=>n.setFormValue("icon",M),onSelectColor:M=>n.setFormValue("icon_color",M),onClose:()=>f(null)})]})}import{useRef as TT}from"react";import{Box as za,Divider as Nc,Drawer as yT}from"@mui/material";import ST from"@ehfuse/overlay-scrollbar";import{useRef as xc,useState as Ia}from"react";import{Box as Te,Button as gc,Chip as Tc,IconButton as jt,Tooltip as Tk}from"@mui/material";import bc from"@mui/icons-material/Send";import{TextField as yk}from"@ehfuse/mui-form-controls";import Sk from"@mui/icons-material/Close";import Bk from"@mui/icons-material/EditOutlined";import Ck from"@mui/icons-material/Favorite";import vk from"@mui/icons-material/FavoriteBorderOutlined";import Ik from"@mui/icons-material/CheckCircle";import _k from"@mui/icons-material/CheckCircleOutlineOutlined";import _a from"@mui/icons-material/AttachFileOutlined";import wk from"@mui/icons-material/ImageOutlined";var va=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 kc,jsx as oe,jsxs as Ze}from"react/jsx-runtime";function hc({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],a=t>0&&r.some(c=>c.account_seq===t),i=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?i:oe(Te,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(c=>`${c.name} \xB7 ${c.time}`).join(`
|
|
8
|
-
`)}),u=e==="like"?"#e5484d":"#2f80ed";return oe(
|
|
6
|
+
`).trim()}function Qr({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180}){let a=ga(null),i=ga(null),l=ga(Date.now()+800),[u,c]=gh(!1),p=He();return xh(()=>{if(n)return;let d=ha(o);i.current===d||i.current===o||(i.current=d,l.current=Date.now()+800,a.current?.setHtml(d))},[e,o,n]),n?Ch(ba,{sx:{position:"relative",mt:1},children:[Yt(ba,{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:ha(o)}}),Yt(hh,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Yt(bh,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(Bh(o)).then(()=>{c(!0),window.setTimeout(()=>c(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:u?Yt(Th,{sx:{fontSize:17,color:"#2f9e5b"}}):Yt(kh,{sx:{fontSize:17}})})})]}):Yt(ba,{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:Yt(yh,{ref:a,defaultValue:ha(o),showToolbar:!p,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Sh,locale:"ko",minHeight:r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:d=>{let s=Date.now()<l.current,m=d===i.current;i.current=d,!(s||m)&&t(d)}})})}import{useState as ka}from"react";import{Box as Lo,IconButton as Ta,Tooltip as vh}from"@mui/material";import Ih from"@mui/icons-material/Close";import _h from"@mui/icons-material/AddCircle";import wh from"@mui/icons-material/AddTask";import Dh from"@mui/icons-material/Checklist";import Oh from"@mui/icons-material/CheckCircle";import Mh from"@mui/icons-material/Launch";import Eh from"@mui/icons-material/RadioButtonUnchecked";import{Fragment as Ph,jsx as Ke,jsxs as kn}from"react/jsx-runtime";function Jr({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:a,removeLocked:i=!1,onConvertToTask:l,onOpenLinkedTask:u,resolveLinkedTask:c}){let[p,d]=ka(""),[s,m]=ka(null),[f,B]=ka(null),b=T=>{let g=T.task_seq?c?.(T.task_seq):void 0;return g?g.completed:T.checked},h=o.filter(b).length,x=()=>{p.trim()&&(t(e,p),d(""))};return kn(_o,{icon:Ke(Dh,{sx:{fontSize:19,display:"block"}}),title:kn(Ph,{children:["\uD560\uC77C",o.length>0?kn(Lo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[h," / ",o.length]}):null]}),titleExtra:o.length>0?Ke(Lo,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:Ke(Lo,{sx:{height:"100%",borderRadius:3,width:`${Math.round(h/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[Ke(Lo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((T,g)=>{let v=T.task_seq?c?.(T.task_seq):void 0,C=b(T),I=!!T.task_seq;return kn(Lo,{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:[Ke(Lo,{component:"span",onClick:()=>n(e,g,!C),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:C?Ke(Oh,{sx:{fontSize:18,color:"#2f80ed"}}):Ke(Eh,{sx:{fontSize:18,color:"#9a9a97"}})}),s?.index===g?Ke(Lo,{component:"input",autoFocus:!0,spellCheck:!1,value:s.label,enterKeyHint:"done",onChange:M=>m({index:g,label:M.target.value}),onBlur:()=>{s.label.trim()&&s.label.trim()!==T.label&&a?.(e,g,s.label),m(null)},onKeyDown:M=>{M.key==="Enter"&&M.target.blur(),M.key==="Escape"&&m(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):Ke(Lo,{component:"span",onClick:I?T.task_seq&&u?()=>u(T.task_seq):void 0:i||!a?void 0:()=>m({index:g,label:T.label}),sx:{flex:1,minWidth:0,fontSize:14,color:C?"#9a9a97":"#37352f",textDecoration:C?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...I?u?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:i||!a?{}:{cursor:"text"}},children:T.label}),I?kn(Lo,{component:"span",onClick:T.task_seq&&u?()=>u(T.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",...u?{cursor:"pointer"}:{}},children:[Ke(Mh,{sx:{fontSize:12}}),v?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!i&&!I&&l?Ke(vh,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:Ke(Ta,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:M=>B({anchorEl:M.currentTarget,index:g,label:T.label}),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(wh,{sx:{fontSize:16}})})}):null,i?null:Ke(Ta,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,g),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(Ih,{sx:{fontSize:15}})})]},`${T.label}-${g}`)})}),kn(Lo,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[Ke(Lo,{component:"input",spellCheck:!1,value:p,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:T=>d(T.target.value),onKeyDown:T=>{T.key==="Enter"&&x()},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"}}}),Ke(Ta,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!p.trim(),onMouseDown:T=>T.preventDefault(),onClick:x,sx:{flexShrink:0,color:p.trim()?"#2f80ed":"#c9c8c5"},children:Ke(_h,{sx:{fontSize:20}})})]}),Ke(Ue,{open:!!f,anchorEl:f?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>B(null),onConfirm:()=>{f&&l?.(e,f.index,f.label),B(null)}})]})}import{useRef as Nh,useState as Fh}from"react";import{Box as Xo,IconButton as Hh}from"@mui/material";import Wh from"@mui/icons-material/Close";import nc from"@mui/icons-material/AttachFileOutlined";var Rh=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"]),ec=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Rh.has(o)};import{LinearProgress as zh}from"@mui/material";import{Fragment as qh,jsx as Lh,jsxs as Ah}from"react/jsx-runtime";function oc(e){let o=et(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),a=o.useValue("attachmentUpload.queue"),i=n??0;return!i||e>0&&(t??0)!==e?null:{index:i,total:r??0,queue:a??[]}}function ya(){let o=et().useValue("attachmentUpload.progress");return Ah(qh,{children:[o??0,"%"]})}function tc(){let o=et().useValue("attachmentUpload.progress");return Lh(zh,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as $h,jsx as ho,jsxs as Vn}from"react/jsx-runtime";function Zr(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:a,onDownload:i}){let[l,u]=Fh(!1),c=Nh(null),p=He(),d=En(),s=xi(),m=oc(e),f=e===0,B=g=>{if(a){a(g);return}window.open(s(g.uuid??""),"_blank","noopener,noreferrer")},b=g=>{if(i){i(g);return}window.open(s(g.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=g=>m?g+1<m.index?"done":g+1===m.index?"uploading":"waiting":"waiting",x=(g,v,C,I={})=>Vn(Xo,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:I.uploading?"#d5e6fb":"#e6e6e3",bgcolor:I.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Vn(Xo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[ho(nc,{sx:{fontSize:16,color:"#9a9a97"}}),v,ho(Xo,{component:"span",sx:{fontSize:12,color:I.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:C}),I.removeIndex!==void 0?ho(Hh,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,I.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ho(Wh,{sx:{fontSize:15}})}):null]}),I.uploading?ho(tc,{}):null]},g),T=g=>{let v=ec(g.name);return ho(Xo,{component:"button",type:"button",onClick:()=>v?B(g):b(g),title:`${g.name} ${v?"\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:g.name})};return Vn(_o,{icon:ho(nc,{sx:{fontSize:18,display:"block"}}),title:Vn($h,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Vn(Xo,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((g,v)=>{let C=`${g.uuid||g.name}-${v}`;if(f){let I=h(v),M=I==="uploading";return x(C,ho(Xo,{component:"span",sx:{...ei,color:I==="done"?"#37352f":"#9a9a97"},children:g.name}),M?ho(ya,{}):Zr(g.size),{uploading:M,removeIndex:!r&&!m?v:void 0})}return g.uuid?x(C,T(g),Zr(g.size),{removeIndex:r?void 0:v}):x(C,ho(Xo,{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:g.name}),Zr(g.size),{removeIndex:r?void 0:v})}),!f&&m?m.queue.slice(m.index-1).map((g,v)=>{let C=v===0;return x(`uploading-${m.index+v}-${g.name}`,ho(Xo,{component:"span",sx:{...ei,color:"#9a9a97"},children:g.name}),C?ho(ya,{}):Zr(g.size),{uploading:C})}):null]}),ho(Xo,{onClick:()=>c.current?.click(),onDragOver:g=>{g.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:g=>{g.preventDefault(),u(!1);let v=Array.from(g.dataTransfer.files);v.length>0&&t(e,v)},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:p?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${d}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${d}MB)`}),ho(Xo,{component:"input",ref:c,type:"file",multiple:!0,onChange:g=>{let v=Array.from(g.target.files??[]);v.length>0&&t(e,v),g.target.value=""},sx:{display:"none"}})]})}import{useState as Xh}from"react";import{Checkbox as Qh,Divider as Jh,ListItemIcon as Zh,Menu as ek,MenuItem as lc}from"@mui/material";import ok from"@mui/icons-material/Add";import{useEffect as Kh,useState as rc}from"react";import{Box as Sa,Button as Uh}from"@mui/material";import{FormDialog as Vh}from"@ehfuse/mui-form-dialog";import{ClearTextField as Gh}from"@ehfuse/mui-form-controls";import{ColorPicker as Yh}from"@ehfuse/mui-color-picker";import{ErrorAlert as jh}from"@ehfuse/alerts";import{jsx as Gn,jsxs as Ba}from"react/jsx-runtime";var ic="#2f80ed";function ac({open:e,onClose:o,onSubmit:t}){let[n,r]=rc(""),[a,i]=rc(ic);Kh(()=>{e&&(r(""),i(ic))},[e]);let l=()=>{let p=n.trim();if(!p){jh("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(p,a),o()},u=kl(a),c=Ba(Sa,{children:[Ba(Sa,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Gn(Gh,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:p=>r(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Gn(Yh,{value:a,onChange:p=>i(p),shape:"circle",colorSize:28})]}),Ba(Sa,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Gn(we,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...u}})]})]});return Gn(Vh,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:c}],actions:{showCancelButton:!0,right:Gn(Uh,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as tk,jsx as Tn,jsxs as ti}from"react/jsx-runtime";function ni({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:a}){let[i,l]=Xh(!1),u=Uo();return ti(tk,{children:[ti(ek,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,...u,children:[t.map(c=>{let p=o.includes(c.key);return ti(lc,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Tn(Qh,{size:"small",checked:p,sx:{p:0}}),Tn(we,{option:c})]},c.key)}),Tn(Jh,{}),ti(lc,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Tn(Zh,{children:Tn(ok,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Tn(ac,{open:i,onClose:()=>l(!1),onSubmit:r})]})}function sc(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 cc(e,o){let t=(e.target_account_seqs??[]).filter(d=>d>0);if(t.length===0)return null;let n=new Set(t),r=sc(e,o),a=new Map;for(let d of r){let s=String(d.department??"").trim();if(!s)continue;let m=a.get(s)??[];m.push(d),a.set(s,m)}let i=[],l=new Set;for(let[d,s]of a)if(s.every(f=>n.has(Number(f.account_seq??0)))){i.push(d);for(let f of s)l.add(Number(f.account_seq??0))}let u=new Map(r.map(d=>[Number(d.account_seq??0),d.name])),c=e.target_names??[],p=[];return t.forEach((d,s)=>{l.has(d)||p.push(u.get(d)??c[s]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:i,individualNames:p}}function ri(e,o){let t=cc(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function YM(e,o){let t=cc(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function mc(e,o,t){let n=(e.target_account_seqs??[]).filter(p=>p>0),r=sc(e,o),a=n.length>0?n.length:r.length,i=e.acks??[],l=t>0&&i.some(p=>p.account_seq===t),u=t>0&&Number(e.author_account_seq??0)===t,c=n.length===0||n.includes(t);return{count:i.length,total:a,acked:l,canAck:t>0&&!u&&c&&!l&&!e.completed}}function uc(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(l=>l.size>n),a=e.filter(l=>l.size<=n),i=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
7
|
+
\uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:a,rejected:r,message:i}}import{Fragment as ii,jsx as ke,jsxs as Xn}from"react/jsx-runtime";var pc="#0f9d58";function fc({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:a=!1,hideProject:i=!1,employees:l=[],myAccountSeq:u=0,onMemberEdit:c,onAddProject:p,onAddLabelOption:d,contentSyncKey:s="create"}){let m=et(),f=En(),B=e.useFormValue("manager_name"),b=e.useFormValue("receiver_names"),h=e.useFormValue("start_date"),x=!!e.useFormValue("is_event"),T=!!e.useFormValue("is_bug"),g=e.useFormValue("bug_repro")??"",v=e.useFormValue("bug_device")??"",C=e.useFormValue("bug_where")??"",I=e.useFormValue("bug_version")??"",M=e.useFormValue("event_time")??"",J=e.useFormValue("event_place")??"",E=e.useFormValue("event_address")??"",X=e.useFormValue("due_date"),w=e.useFormValue("reminder"),y=e.useFormValue("priority"),H=e.useFormValue("content"),$=e.useFormValue("checklist")??[],P=e.useFormValue("tab_key"),te=e.useFormValue("sprint_seq")??0,de=e.useFormValue("story_points")??0,A=t.find(k=>k.key===P&&k.useSprints),W=A?n.filter(k=>`custom-${k.group_seq}`===P):[],[K,F]=dc(null),O=e.useFormValue("label_keys"),[L,Q]=dc(null),Z=e.useFormValue("target_names"),ue=e.useFormValue("target_account_seqs"),ye=m.useValue("createAttachmentFiles")??[],R=a?ri({author_account_seq:u,target_names:Z,target_account_seqs:ue},l):"";return Xn(ii,{children:[a?null:ke(Yn,{sx:{display:"flex",gap:1.25,px:2,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},{value:"bug",label:"\uC624\uB958"}].map(k=>{let ne=T?"bug":x?"event":"task",re=ne===k.value;return ke(nk,{onClick:()=>{if(ne===k.value)return;e.setFormValue("is_event",k.value==="event"),e.setFormValue("is_bug",k.value==="bug"),e.setFormValue("is_open",k.value==="bug");let ve=e.getFormValue("icon"),$e=e.getFormValue("icon_color"),se=[_e,"event",Pn].includes(ve),Ie=!$e||$e===pc||$e===Rn;se&&e.setFormValue("icon",k.value==="event"?"event":k.value==="bug"?Pn:_e),Ie&&e.setFormValue("icon_color",k.value==="event"?pc:k.value==="bug"?Rn:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:re?600:400,color:re?"#ffffff":"#787774",bgcolor:re?"#2563eb":"#f4f4f2"},children:k.label},k.label)})}),ke(jn,{sx:{borderColor:"#e6e6e3"}}),Xn(Yn,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ke(jr,{hideProject:i,values:{tabKey:P,managerName:B,receiverNames:b,startDate:h,dueDate:X,reminder:w,priority:y,eventTime:M,eventPlace:J,eventAddress:E},customTabs:t,avatarSrcByName:r,notice:a,event:x,onChangeEventTime:k=>e.setFormValue("event_time",k),onChangeEventPlace:k=>e.setFormValue("event_place",k),onChangeEventAddress:k=>e.setFormValue("event_address",k),targetSummary:R,onChangeProject:k=>e.setFormValue("tab_key",k),onAddProject:p,onChangeStartDate:k=>e.setFormValue("start_date",k),onChangeDueDate:k=>e.setFormValue("due_date",k),onChangeReminder:k=>e.setFormValue("reminder",k),onChangePriority:k=>e.setFormValue("priority",k),onMemberEdit:c,trailing:Xn(ii,{children:[A&&!x&&!a?Xn(ii,{children:[ke(xe,{icon:ke(ck,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:k=>F(k),children:te>0?W.find(k=>k.seq===te)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ke(Yn,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ke(xe,{icon:ke(mk,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:ke(pt,{value:de>0?String(de):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:k=>e.setFormValue("story_points",Number(k.replace(/[^0-9.]/g,""))||0)})})]}):null,T?ke(Xr,{values:{repro:g,device:v,where:C,version:I},onChangeRepro:k=>e.setFormValue("bug_repro",k),onChangeDevice:k=>e.setFormValue("bug_device",k),onChangeWhere:k=>e.setFormValue("bug_where",k),onChangeVersion:k=>e.setFormValue("bug_version",k)}):null]}),leading:x?null:ke(Yn,{sx:{gridColumn:"1 / -1"},children:ke(xe,{icon:ke(sk,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:k=>Q(k),children:(O??[]).length>0?ke(Tt,{labelKeys:O??[],labelOptions:o}):ke(Yn,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(_o,{icon:ke(ak,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:ke(Qr,{syncKey:s,value:H,onChange:k=>e.setFormValue("content",k)})}),x?null:ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),x?null:ke(Jr,{taskSeq:0,checklist:$,onAdd:(k,ne)=>e.setFormValue("checklist",[...$,{label:ne,checked:!1}]),onToggle:(k,ne,re)=>e.setFormValue("checklist",$.map((ve,$e)=>$e===ne?{...ve,checked:re}:ve)),onRemove:(k,ne)=>e.setFormValue("checklist",$.filter((re,ve)=>ve!==ne)),onUpdate:(k,ne,re)=>e.setFormValue("checklist",$.map((ve,$e)=>$e===ne?{...ve,label:re}:ve))}),ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(oi,{taskSeq:0,attachments:ye.map(k=>({name:k.name,size:k.size})),onAdd:(k,ne)=>{let re=uc(ne,f);re.message&&dk(re.message),re.accepted.length!==0&&m.setValue("createAttachmentFiles",[...m.getValue("createAttachmentFiles")??[],...re.accepted])},onRemove:(k,ne)=>m.setValue("createAttachmentFiles",ye.filter((re,ve)=>ve!==ne))}),T?null:Xn(ii,{children:[ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(_o,{icon:ke(lk,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ke(uk,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ke(rk,{transitionDuration:0,anchorEl:K,open:!!K,onClose:()=>F(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...W.map(k=>({seq:k.seq,label:vo(k)}))].map(k=>ke(ik,{onClick:()=>{e.setFormValue("sprint_seq",k.seq),F(null)},sx:{fontSize:14,minWidth:170},children:k.label},k.seq))}),ke(ni,{anchorEl:L,selectedKeys:O??[],labelOptions:o,onToggle:k=>e.setFormValue("label_keys",fr(O??[],k)),onAddLabel:(k,ne)=>d?.(k,ne),onClose:()=>Q(null)})]})}import{Fragment as yk,jsx as Je,jsxs as ai}from"react/jsx-runtime";function qE({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:a="",presetManager:i=null,isNotice:l=!1,defaultBug:u=!1}=t,c=et(),p=fk(!1),[d,s]=xc(0),[m,f]=xc(null),B=n.useFormValue("title"),b=n.useFormValue("icon"),h=n.useFormValue("icon_color"),x=!!n.useFormValue("is_event"),T=!!n.useFormValue("is_bug"),g=He(),C=c.useValue("createSubmitting")??!1,I=cr(b||_e);return pk(()=>{let M=p.current;p.current=e,!(!e||M)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?Mo:u?Pn:_e,icon_color:l?"#e5484d":u?Rn:"",manager_name:i?.name??"",manager_account_seq:i?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:u,is_open:u,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:qe(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:a}),c.setValue("createAttachmentFiles",[]),s(J=>J+1))},[e]),ai(yk,{children:[Je(gk,{anchor:"right",open:e,onClose:o,sx:{zIndex:M=>M.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ai(Qn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[ai(Qn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[g?Je(Ca,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(kk,{})}):null,Je(bk,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Je(Ca,{size:"small",onClick:M=>f(M.currentTarget),sx:{color:h||"#1e3a8a"},children:Je(I,{sx:{fontSize:20}})})}),Je(Qn,{component:"input",autoFocus:!0,spellCheck:!1,value:B,placeholder:l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":x?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":T?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",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}}}),g?null:Je(Ca,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(hk,{})})]}),Je(Qn,{sx:{flex:1,minHeight:0},children:Je(Tk,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Je(fc,{...t,contentSyncKey:`create-${d}`})})}),Je(xk,{sx:{borderColor:"#e6e6e3"}}),ai(Qn,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Je(gc,{onClick:o,color:"inherit",disabled:C,children:"\uCDE8\uC18C"}),Je(gc,{onClick:n.submit,variant:"contained",disabled:C,children:C?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),Je(Ur,{anchorEl:m,value:b,color:h||"#1e3a8a",onSelect:M=>n.setFormValue("icon",M),onSelectColor:M=>n.setFormValue("icon_color",M),onClose:()=>f(null)})]})}import{useRef as ST}from"react";import{Box as za,Divider as Hc,Drawer as BT}from"@mui/material";import CT from"@ehfuse/overlay-scrollbar";import{useRef as bc,useState as Ia}from"react";import{Box as Te,Button as hc,Chip as Sc,IconButton as jt,Tooltip as Sk}from"@mui/material";import kc from"@mui/icons-material/Send";import{TextField as Bk}from"@ehfuse/mui-form-controls";import Ck from"@mui/icons-material/Close";import vk from"@mui/icons-material/EditOutlined";import Ik from"@mui/icons-material/Favorite";import _k from"@mui/icons-material/FavoriteBorderOutlined";import wk from"@mui/icons-material/CheckCircle";import Dk from"@mui/icons-material/CheckCircleOutlineOutlined";import _a from"@mui/icons-material/AttachFileOutlined";import Ok from"@mui/icons-material/ImageOutlined";var va=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 yc,jsx as oe,jsxs as Ze}from"react/jsx-runtime";function Tc({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],a=t>0&&r.some(c=>c.account_seq===t),i=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?i:oe(Te,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(c=>`${c.name} \xB7 ${c.time}`).join(`
|
|
8
|
+
`)}),u=e==="like"?"#e5484d":"#2f80ed";return oe(Sk,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Ze(Te,{sx:{display:"inline-flex",alignItems:"center"},children:[oe(jt,{size:"small","aria-label":`\uB313\uAE00 ${i}`,onClick:n,sx:{color:a?u:"#c9c8c5",p:.5},children:e==="like"?a?oe(Ik,{sx:{fontSize:16}}):oe(_k,{sx:{fontSize:16}}):a?oe(wk,{sx:{fontSize:16}}):oe(Dk,{sx:{fontSize:16}})}),r.length>0?oe(Te,{component:"span",sx:{fontSize:12,color:a?u:"#9a9a97",ml:-.25},children:r.length}):null]})})}function Bc({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:a,onRemove:i,onToggleReaction:l}){let[u,c]=Ia(null),p=yo().slots?.avatar;return Ze(Te,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[Ze(Te,{sx:{fontSize:14.5,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),o.length===0?oe(Te,{sx:{mt:1,fontSize:13.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,oe(Te,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:o.map((d,s)=>Ze(Te,{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(d.author)??"";return p?oe(Te,{sx:{display:"inline-flex",flexShrink:0},children:oe(p,{name:d.author,src:m||void 0,size:44})}):oe(Te,{sx:{display:"inline-flex",flexShrink:0},children:oe(sn,{src:m,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...cn[0]},iconFontSize:24})})})(),Ze(Te,{sx:{flex:1,minWidth:0},children:[Ze(Te,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[oe(Te,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.author}),oe(Te,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:d.time}),Ze(Te,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[oe(Tc,{kind:"like",reactions:d.likes,myAccountSeq:n,onToggle:()=>l?.(e,s,"like")}),oe(Tc,{kind:"ack",reactions:d.acks,myAccountSeq:n,onToggle:()=>l?.(e,s,"ack")})]}),t&&d.author===t?Ze(Te,{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:[oe(jt,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>c({index:s,text:d.text}),sx:{color:"#9a9a97"},children:oe(vk,{sx:{fontSize:15}})}),oe(jt,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:()=>{i(e,s),c(null)},sx:{color:"#9a9a97"},children:oe(Ck,{sx:{fontSize:15}})})]}):null]}),u?.index===s?Ze(Te,{sx:{mt:.5},children:[oe(Te,{component:"textarea",autoFocus:!0,spellCheck:!1,value:u.text,onChange:m=>c({index:s,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"}}),Ze(Te,{sx:{display:"flex",justifyContent:"flex-end",gap:.75,mt:.5},children:[oe(hc,{size:"small",color:"inherit",onClick:()=>c(null),children:"\uCDE8\uC18C"}),oe(hc,{size:"small",variant:"contained",disabled:!u.text.trim(),onClick:()=>{a(e,s,u.text),c(null)},children:"\uC800\uC7A5"})]})]}):Ze(Te,{children:[d.text?oe(Te,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:d.text}):null,(d.attachments??[]).length>0?oe(Te,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:.5},children:(d.attachments??[]).map((m,f)=>oe(Sc,{size:"small",icon:oe(_a,{sx:{fontSize:14}}),label:`${m.name} (${va(m.size)})`,sx:{fontSize:12,bgcolor:"#f1f5f9"}},`${m.name}-${f}`))}):null]})]})]},`${d.time}-${s}`))})]})}function Cc({onSubmit:e}){let[o,t]=Ia(""),[n,r]=Ia([]),a=bc(null),i=bc(null),l=He(),u=d=>{let s=Array.from(d??[]).map(m=>({name:m.name,size:m.size}));s.length!==0&&r(m=>[...m,...s].slice(0,10))},c=()=>{let d=o.trim();!d&&n.length===0||(e(d,n.length>0?n:void 0),t(""),r([]))},p=Ze(yc,{children:[oe(jt,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>a.current?.click(),sx:{color:"#9a9a97"},children:oe(_a,{sx:{fontSize:20}})}),oe(jt,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>i.current?.click(),sx:{color:"#9a9a97"},children:oe(Ok,{sx:{fontSize:20}})})]});return Ze(Te,{children:[n.length>0?oe(Te,{sx:{display:"flex",flexWrap:"wrap",gap:.5,px:2,pt:1},children:n.map((d,s)=>oe(Sc,{size:"small",icon:oe(_a,{sx:{fontSize:14}}),label:`${d.name} (${va(d.size)})`,onDelete:()=>r(m=>m.filter((f,B)=>B!==s)),sx:{fontSize:12,bgcolor:"#f1f5f9"}},`${d.name}-${s}`))}):null,Ze(Te,{sx:{position:"relative",display:"flex"},children:[oe(Bk,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:d=>t(d.target.value),fullWidth:!0,multiline:!0,minRows:l?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:l?15:6.5,pb:l?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),l?Ze(Te,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,oe(jt,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:c,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:oe(kc,{sx:{fontSize:22}})})]}):Ze(yc,{children:[oe(Te,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),oe(jt,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:c,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:oe(kc,{sx:{fontSize:22}})})]})]}),oe(Te,{component:"input",ref:a,type:"file",multiple:!0,onChange:d=>{u(d.target.files),d.target.value=""},sx:{display:"none"}}),oe(Te,{component:"input",ref:i,type:"file",accept:"image/*",multiple:!0,onChange:d=>{u(d.target.files),d.target.value=""},sx:{display:"none"}})]})}import{useState as _c}from"react";import{Box as wa,Checkbox as Rk,IconButton as Da,Tooltip as Oa}from"@mui/material";import zk from"@mui/icons-material/Close";import qk from"@mui/icons-material/ShareOutlined";import Ak from"@mui/icons-material/ContentPasteOutlined";import Lk from"@mui/icons-material/CheckCircle";import Nk from"@mui/icons-material/CheckCircleOutlineOutlined";import{InfoAlert as Mk,SuccessAlert as Ek}from"@ehfuse/alerts";var vc=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
|
-
`).trim():"";function
|
|
13
|
-
`)}function Cc(e){navigator.clipboard.writeText(e).then(()=>Ok("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Dk("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function li(e,o){let t=Mk(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Cc(t)});return}Cc(t)}import{Fragment as Lk,jsx as eo,jsxs as Ic}from"react/jsx-runtime";function _c({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:a,onClose:i}){let l=He(),[u,c]=vc(null),[p,d]=vc(null),s=cr(e.icon||(e.is_notice?Mo:e.is_event?"event":_e)),m=!!e.is_notice,f=!!e.is_event,B=m&&o>0&&(e.author_account_seq??0)===o,b=!ot(e,o),h=!f&&(m?B:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return Ic(Lk,{children:[Ic(wa,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[h?eo(Oa,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${tt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:eo(Ek,{checked:e.completed,icon:eo(Ak,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:eo(qk,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(x,T)=>t(e.seq,T),sx:{p:0}})}):null,eo(Oa,{title:b?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:eo(Da,{size:"small",onClick:b?void 0:x=>d(x.currentTarget),sx:{color:e.icon_color||(m?"#e5484d":"#1e3a8a")},children:eo(s,{sx:{fontSize:20}})})}),u!==null?eo(wa,{component:"input",autoFocus:!0,spellCheck:!1,value:u,onChange:x=>c(x.target.value),onBlur:()=>{u.trim()&&u.trim()!==e.title&&n(e.seq,u.trim()),c(null)},onKeyDown:x=>{x.key==="Enter"&&x.target.blur(),x.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}}):eo(wa,{onClick:b?void 0:()=>c(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:b?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),eo(Oa,{title:l?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:eo(Da,{"aria-label":l?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>li(e,l),sx:{color:"#6b7280"},children:l?eo(Rk,{sx:{fontSize:20}}):eo(zk,{sx:{fontSize:20}})})}),i?eo(Da,{"aria-label":"\uB2EB\uAE30",onClick:i,sx:{color:"#6b7280"},children:eo(Pk,{})}):null]}),eo(Ur,{anchorEl:p,value:e.icon||(m?Mo:""),color:e.icon_color||(m?"#e5484d":"#1e3a8a"),onSelect:x=>r(e.seq,x),onSelectColor:x=>a?.(e.seq,x),onClose:()=>d(null)})]})}import{useState as Sn}from"react";import{Box as Bo,Button as si,ButtonBase as rT,Divider as Qt,Menu as iT,MenuItem as aT}from"@mui/material";import lT from"@mui/icons-material/ExpandLess";import sT from"@mui/icons-material/ExpandMore";import cT from"@mui/icons-material/ConfirmationNumberOutlined";import mT from"@mui/icons-material/Check";import uT from"@mui/icons-material/DirectionsRunOutlined";import dT from"@mui/icons-material/SpeedOutlined";import pT from"@mui/icons-material/CheckCircle";import qc from"@mui/icons-material/CheckCircleOutlined";import Ac from"@mui/icons-material/AccessTimeOutlined";import fT from"@mui/icons-material/AutorenewOutlined";import xT from"@mui/icons-material/LabelOutlined";import gT from"@mui/icons-material/PersonOutlineOutlined";import bT from"@mui/icons-material/SubjectOutlined";import hT from"@mui/icons-material/StickyNote2Outlined";import kT from"@mui/icons-material/PanToolAltOutlined";import{useState as Nk}from"react";import{TextField as Fk}from"@ehfuse/mui-form-controls";import{jsx as Hk}from"react/jsx-runtime";function wc({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,a]=Nk(null);return Hk(Fk,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:i=>{a(i.target.value),t?.(i.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),a(null)},onKeyDown:i=>{i.key==="Enter"&&i.target.blur(),i.key==="Escape"&&a(null)},sx:{mt:1}})}import{useMemo as Pc,useState as Pa}from"react";import{Box as oo,Button as Rc,IconButton as Jk}from"@mui/material";import Zk from"@mui/icons-material/AccountTreeOutlined";import eT from"@mui/icons-material/Add";import oT from"@mui/icons-material/Close";import tT from"@mui/icons-material/NextPlanOutlined";function Xt(e){return e.relations??[]}function wP(e,o,t){return Xt(e).some(n=>n.type===t&&n.task_seq===o.seq)||Xt(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Dc(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Oc(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,f)=>{n.has(m)||n.set(m,new Set),n.has(f)||n.set(f,new Set),n.get(m).add(f),n.get(f).add(m)};for(let m of t.values())for(let f of Xt(m))f.type==="follow_up"&&t.has(f.task_seq)&&r(m.seq,f.task_seq);let a=new Set([e.seq]),i=[e.seq];for(;i.length>0;){let m=i.shift();for(let f of n.get(m)??[])a.has(f)||(a.add(f),i.push(f))}let l=[...a].map(m=>t.get(m)).filter(m=>!!m).sort((m,f)=>Dc(m).localeCompare(Dc(f))),u=new Set;for(let m of Xt(e))m.type==="related"&&u.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Xt(m).some(f=>f.type==="related"&&f.task_seq===e.seq)&&u.add(m.seq);let c=[...u].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),p=[...t.values()].filter(m=>m.seq!==e.seq&&Xt(m).some(f=>f.type==="duplicate_of"&&f.task_seq===e.seq)),d=Xt(e).find(m=>m.type==="duplicate_of")?.task_seq,s=d?t.get(d)??null:null;return{lineage:l,related:c,duplicates:p,duplicateOf:s}}import{useEffect as Wk,useMemo as $k,useState as Ma}from"react";import{Box as yn,Button as Kk,Tab as Uk,Tabs as Vk}from"@mui/material";import Gk from"@mui/icons-material/Check";import{FormDialog as Yk}from"@ehfuse/mui-form-dialog";import{ClearTextField as jk}from"@ehfuse/mui-form-controls";import{ErrorAlert as Xk}from"@ehfuse/alerts";import{OverlayScrollbar as Qk}from"@ehfuse/overlay-scrollbar";import{jsx as wo,jsxs as Ea}from"react/jsx-runtime";var Mc=[{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 Ec({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:a}){let[i,l]=Ma("related"),[u,c]=Ma(""),[p,d]=Ma(0);Wk(()=>{e&&(l("related"),c(""),d(0))},[e]);let s=$k(()=>{let b=new Set([o.seq,...n]),h=u.trim().toLowerCase();return t.filter(x=>b.has(x.seq)||x.is_event||x.is_notice?!1:h?x.title.toLowerCase().includes(h)||(x.ticket_no??"").toLowerCase().includes(h):!0)},[t,o.seq,n,u]),m=()=>{if(!p){Xk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}a(p,i),r()},f=Mc.find(b=>b.type===i)?.hint??"",B=Ea(yn,{children:[wo(Vk,{value:i,onChange:(b,h)=>l(h),sx:{minHeight:38,mb:.75,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Mc.map(b=>wo(Uk,{value:b.type,label:b.label},b.type))}),wo(yn,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:f}),wo(jk,{label:"\uC5C5\uBB34 \uAC80\uC0C9",placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:u,onChange:b=>c(b.target.value),fullWidth:!0,autoFocus:!0}),wo(yn,{sx:{mt:1.5,height:300,border:"1px solid #e6e6e3",borderRadius:1},children:wo(Qk,{style:{height:"100%"},children:s.length===0?wo(yn,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):s.map(b=>{let h=Oe(b.icon||_e),x=b.seq===p;return Ea(yn,{onClick:()=>d(x?0:b.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.75,cursor:"pointer",bgcolor:x?"#e3eefb":"transparent","&:hover":{bgcolor:x?"#e3eefb":"#f7f7f5"}},children:[h?wo(h,{sx:{fontSize:17,flexShrink:0,color:b.icon_color||"#1e3a8a"}}):null,Ea(yn,{component:"span",sx:{flex:1,minWidth:0,fontSize:14,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),wo(we,{option:fo(b),small:!0}),x?wo(Gk,{sx:{fontSize:17,flexShrink:0,color:"#2f80ed"}}):null]},b.seq)})})})]});return wo(Yk,{open:e,onClose:r,maxWidth:"sm",title:"\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:B}],actions:{showCancelButton:!0,right:wo(Kk,{variant:"contained",disabled:!p,onClick:m,children:"\uC5F0\uACB0"})}})}import{Fragment as nT,jsx as ze,jsxs as No}from"react/jsx-runtime";function Ra({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Oe(e.icon||_e);return No(oo,{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?ze(oo,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?ze(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,No(oo,{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]}),ze(we,{option:fo(e),small:!0}),n?ze(Jk,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ze(oT,{sx:{fontSize:15}})}):null]})}function zc({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:a,onCreateFollowUp:i}){let[l,u]=Pa(!1),[c,p]=Pa(null),[d,s]=Pa(null),m=Pc(()=>Oc(e,o),[e,o]),f=m.lineage.length>=2,B=(f?m.lineage.length-1:0)+m.related.length+m.duplicates.length+(m.duplicateOf?1:0),b=Pc(()=>{let x=new Set;for(let T of m.lineage)x.add(T.seq);for(let T of m.related)x.add(T.seq);for(let T of m.duplicates)x.add(T.seq);return m.duplicateOf&&x.add(m.duplicateOf.seq),[...x]},[m]),h=(x,T,g)=>{s({anchorEl:x,targetSeq:T,type:g})};return No(_o,{icon:ze(Zk,{sx:{fontSize:19,display:"block"}}),title:No(nT,{children:["\uAD00\uB828 \uC5C5\uBB34",B>0?ze(oo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:B}):null]}),titleExtra:t?null:No(oo,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[i?ze(Rc,{size:"small",color:"inherit",startIcon:ze(tT,{sx:{fontSize:16}}),onClick:x=>p(x.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?ze(Rc,{size:"small",color:"inherit",startIcon:ze(eT,{sx:{fontSize:16}}),onClick:()=>u(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[No(oo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[f?ze(oo,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((x,T)=>{let g=x.seq===e.seq,v=T===m.lineage.length-1;return No(oo,{sx:{display:"flex",gap:1},children:[No(oo,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[ze(oo,{sx:{width:g?9:7,height:g?9:7,borderRadius:"50%",bgcolor:g?"#2f80ed":x.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),v?null:ze(oo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),No(oo,{sx:{flex:1,minWidth:0,pb:v?0:.5},children:[No(oo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[No(oo,{component:"span",onClick:!g&&n?()=>n(x.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:g?600:400,color:g?"#2f80ed":x.completed?"#9a9a97":"#37352f",textDecoration:x.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!g&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[x.ticket_no?`${x.ticket_no} `:"",x.title]}),ze(we,{option:fo(x),small:!0})]}),ze(oo,{sx:{fontSize:12,color:"#9a9a97"},children:x.completed&&x.completed_time?`${x.completed_time} \uC644\uB8CC`:x.created_time??""})]})]},x.seq)})}):null,m.duplicateOf?ze(Ra,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&a?x=>h(x.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(x=>ze(Ra,{item:x,caption:"\uC911\uBCF5",onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&a?T=>h(T.currentTarget,x.seq,"duplicate_of"):void 0},`dup-${x.seq}`)),m.related.map(x=>ze(Ra,{item:x,onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&a?T=>h(T.currentTarget,x.seq,"related"):void 0},`rel-${x.seq}`)),B===0?ze(oo,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?ze(Ec,{open:l,task:e,tasks:o,excludeSeqs:b,onClose:()=>u(!1),onSubmit:(x,T)=>r(e.seq,x,T)}):null,ze(Ue,{open:!!c,anchorEl:c,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>p(null),onConfirm:()=>{i?.(e.seq),p(null)}}),ze(Ue,{open:!!d,anchorEl:d?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>s(null),onConfirm:()=>{d&&a?.(e.seq,d.targetSeq,d.type),s(null)}})]})}import{Fragment as ko,jsx as q,jsxs as We}from"react/jsx-runtime";function Bn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return q(Bo,{component:"span",sx:{color:"#9a9a97"},children:e})}function Lc({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:a,onAddLabelOption:i,onChangeProject:l,onAddProject:u,onChangeDate:c,onChangeReminder:p,onMemberEdit:d,onChangePriority:s,onChangeEstimatedTime:m,onChangeEventTime:f,onChangeEventPlace:B,onChangeEventAddress:b,onChangeNote:h,onChangeContent:x,onAddChecklistItem:T,onToggleChecklistItem:g,onRemoveChecklistItem:v,onUpdateChecklistItem:C,onConvertChecklistToTask:I,onOpenChecklistTask:M,resolveChecklistTask:J,relatedTasksPool:E,onOpenRelatedTask:X,onLinkRelatedTask:w,onUnlinkRelatedTask:y,onCreateFollowUpTask:H,onAddAttachments:N,onRemoveAttachment:$,onPreview:P,onDownload:te,onUpdateComment:de,onRemoveComment:A,onToggleCommentReaction:W,currentUserName:K="",myAccountSeq:F=0,noticeAdmin:O=!1,hideProject:L=!1,employees:Q=[],onAckConfirm:Z,onChangeBugField:ue,sprints:ee=[],sprintProject:ye=!1,onChangeSprint:R,onChangeStoryPoints:k,onChangeResolution:ne,onClaimTask:re,onVerifyBug:ve}){let[$e,se]=Sn(null),[Ie,V]=Sn(!1),Ee={[jo]:Ie?{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"}},[Xe,bt]=Sn(null),[Wo,Zo]=Sn(null),[$o,Pt]=Sn(null),[rn,Oo]=Sn(null),no=!!e.is_notice,mo=!!e.is_event,uo=!!e.is_bug,Rt=!!re&&hr(e,F),pe=!!re&&kr(e,F),D=!!ve&&uo&&!!e.completed&&F>0&&(e.author_account_seq??0)===F&&!(e.acks??[]).some(_=>_.account_seq===F),z=!ot(e,F),ie=no?!br(e,F):z,ce=Rt||pe?We(mn,{onClick:_=>Oo(_.currentTarget),children:[q(kT,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ae=no?ri(e,Q):"",fe=no?sc(e,Q,F):null;return We(ko,{children:[We(Bo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[q(jr,{hideProject:L,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:!mo,notice:no,event:mo,readOnly:z,targetSummary:ae,onChangeProject:_=>l(e.seq,_),onAddProject:u,onChangeStartDate:_=>c(e.seq,"start_date",_),onChangeDueDate:_=>c(e.seq,"due_date",_),onChangeReminder:_=>p(e.seq,_),onChangePriority:_=>s(e.seq,_),onChangeEstimatedTime:_=>m(e.seq,_),onChangeEventTime:_=>f?.(e.seq,_),onChangeEventPlace:_=>B?.(e.seq,_),onChangeEventAddress:_=>b?.(e.seq,_),onMemberEdit:_=>d(e,_),narrowCollapsedSx:Ee,reminderLocked:e.completed,managerAction:ce,leading:We(ko,{children:[D||ce&&(no||mo)?We(Bo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"center",gap:1,px:2,py:.75},children:[no||mo?ce:null,D?We(ko,{children:[q(si,{variant:"contained",size:"small",onClick:()=>ve?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uC218\uC815 \uD655\uC778(\uAC80\uC99D \uC644\uB8CC)"}),q(si,{variant:"outlined",size:"small",color:"error",onClick:()=>ve?.(e.seq,!1),children:"\uC544\uC9C1 \uC7AC\uD604\uB428(\uC7AC\uC624\uD508)"})]}):null]}):null,uo&&e.ticket_no?q(xe,{icon:q(cT,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:q(Bo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,mo?null:q(Bo,{sx:uo&&e.ticket_no?void 0:{gridColumn:"1 / -1"},children:q(xe,{icon:q(fT,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:z||e.completed?void 0:_=>bt(_),children:q(we,{option:fo(e)})})}),ye&&!mo&&!no?We(ko,{children:[q(xe,{icon:q(uT,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:z?void 0:_=>Zo(_),children:(e.sprint_seq??0)>0?ee.find(_=>_.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":q(Bn,{label:"\uBBF8\uBC30\uC815"})}),q(xe,{icon:q(dT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:q(pt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:z,onCommit:_=>k?.(e.seq,Number(_.replace(/[^0-9.]/g,""))||0)})})]}):null,mo?null:q(Bo,{sx:[{gridColumn:"1 / -1"},Ee??null],children:q(xe,{icon:q(xT,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:z?void 0:_=>Pt(_),children:(e.label_keys??[]).length>0?q(Tt,{labelKeys:e.label_keys??[],labelOptions:t}):q(Bn,{})})}),no&&fe?q(Bo,{sx:{gridColumn:"1 / -1"},children:q(xe,{icon:q(qc,{sx:{fontSize:17}}),label:"\uD655\uC778",children:q(Bo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:fe.canAck?q(si,{size:"small",variant:"contained",onClick:()=>Z?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):q(si,{size:"small",variant:"outlined",color:"inherit",startIcon:fe.acked?q(pT,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:_=>se({anchorEl:_.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:fe.total>0&&fe.count>=fe.total?"\uC644\uB8CC":We(ko,{children:[fe.count,q(Bo,{component:"span",sx:{mx:.4},children:"/"}),fe.total]})})})})}):null]}),trailing:We(ko,{children:[uo?q(Xr,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:z,showResolution:!!e.completed,onChangeRepro:_=>ue?.(e.seq,"bug_repro",_),onChangeDevice:_=>ue?.(e.seq,"bug_device",_),onChangeWhere:_=>ue?.(e.seq,"bug_where",_),onChangeVersion:_=>ue?.(e.seq,"bug_version",_),onChangeResolution:_=>ne?.(e.seq,_)}):null,q(xe,{icon:q(gT,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[so(9),Ee??null],children:e.created_by?We(ko,{children:[q(xo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):q(Bn,{})}),q(xe,{icon:q(Ac,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[so(11),Ee??null],children:e.created_time?tt(e.created_time):q(Bn,{})}),e.completed?We(ko,{children:[q(xe,{icon:q(qc,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[so(10),Ee??null],children:e.completed_by?We(ko,{children:[q(xo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):q(Bn,{})}),q(xe,{icon:q(Ac,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[so(12),Ee??null],children:e.completed_time?tt(e.completed_time):q(Bn,{})})]}):null]})}),We(Bo,{sx:{display:"none",[jo]:{display:"block",mt:1.5}},children:[q(Qt,{sx:{borderColor:"#e6e6e3"}}),q(rT,{onClick:()=>V(_=>!_),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.5,pb:1.25,fontSize:13,color:"#787774","&:active":{opacity:.6}},children:Ie?We(ko,{children:["\uC811\uAE30 ",q(lT,{sx:{fontSize:18}})]}):We(ko,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",q(sT,{sx:{fontSize:18}})]})})]}),We(Bo,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3",[jo]:{mt:0}}}),q(_o,{icon:q(bT,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:q(Bo,{sx:{userSelect:"text"},children:q(Qr,{syncKey:e.seq,value:e.content??"",readOnly:z,onChange:_=>x(e.seq,_)})})}),e.is_bug?null:We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(_o,{icon:q(hT,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:q(Bo,{sx:{userSelect:"text"},children:q(wc,{value:e.note,readOnly:ie,onCommit:_=>h(e.seq,_)})})})]}),mo?null:We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(Jr,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:ie,onAdd:T,onToggle:g,onRemove:v,onUpdate:C,onConvertToTask:I,onOpenLinkedTask:M,resolveLinkedTask:J})]}),E&&!mo&&!no?We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(zc,{task:e,tasks:E,readOnly:z,onOpenTask:X,onLink:w,onUnlink:y,onCreateFollowUp:H})]}):null,q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(oi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:ie,onAdd:N,onRemove:$,onPreview:P?_=>P({..._,taskSeq:e.seq}):void 0,onDownload:te?_=>te({..._,taskSeq:e.seq}):void 0})]}),q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(yc,{taskSeq:e.seq,comments:e.comments??[],currentUserName:K,myAccountSeq:F,avatarSrcByName:n,onUpdate:de,onRemove:A,onToggleReaction:W})]}),q(gr,{anchorEl:Xe,value:e.status,options:no?zn:uo?qt:qn,onSelect:_=>r(e.seq,_),onClose:()=>bt(null)}),q(iT,{transitionDuration:0,anchorEl:Wo,open:!!Wo,onClose:()=>Zo(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ee.filter(_=>`custom-${_.group_seq}`===String(e.tab_key??"")).map(_=>({seq:_.seq,label:vo(_)}))].map(_=>We(aT,{onClick:()=>{R?.(e.seq,_.seq),Zo(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[_.label,(e.sprint_seq??0)===_.seq?q(mT,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},_.seq))}),q(Or,{anchorEl:$e?.anchorEl??null,open:!!$e?.open,acks:e.acks??[],total:fe?.total??0,avatarSrcByName:n,onClose:()=>se(_=>_?{..._,open:!1}:null)}),q(ni,{anchorEl:$o,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:_=>a(e.seq,fr(e.label_keys??[],_)),onAddLabel:i,onClose:()=>Pt(null)}),q(Ue,{open:!!rn,anchorEl:rn,title:Rt?"\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:()=>Oo(null),onConfirm:()=>{re?.(e.seq),Oo(null)}})]})}import{jsx as ft,jsxs as BT}from"react/jsx-runtime";function J5(){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 Z5({open:e,task:o,onClose:t,onAddComment:n,myAccountSeq:r=0,onToggleCompleted:a,onChangeTitle:i,onChangeIcon:l,onChangeIconColor:u,...c}){let p=TT(null);o&&(p.current=o);let d=o??p.current;return d?ft(yT,{anchor:"right",open:e,onClose:t,sx:{zIndex:s=>s.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:BT(za,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[ft(_c,{task:d,myAccountSeq:r,onToggleCompleted:a,onChangeTitle:i,onChangeIcon:l,onChangeIconColor:u,onClose:t}),ft(Nc,{sx:{borderColor:"#e6e6e3"}}),ft(za,{sx:{flex:1,minHeight:0},children:ft(ST,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:ft(Lc,{...c,task:d,myAccountSeq:r})})}),ft(Nc,{sx:{borderColor:"#37352f"}}),ft(za,{sx:{flexShrink:0},children:ft(Sc,{onSubmit:(s,m)=>n(d.seq,s,m)},d.seq)})]})}):null}import{useEffect as vT,useState as Jt}from"react";import{Box as To,Button as La,IconButton as Fc}from"@mui/material";import{FormDialog as IT}from"@ehfuse/mui-form-dialog";import _T from"@mui/icons-material/EditOutlined";import{ErrorAlert as Hc}from"@ehfuse/alerts";import{ClearTextField as Wc,DateTextField as $c,LabelSelect as Kc}from"@ehfuse/mui-form-controls";var qa="custom-";function CT(e){return e.startsWith(qa)}function tR(e){return e>0?`${qa}${e}`:""}function Aa(e){if(!CT(e))return 0;let o=Number(e.slice(qa.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as DT,jsx as Le,jsxs as Et}from"react/jsx-runtime";var wT=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Uc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function dR({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:a,onChangeStatus:i,onRemove:l}){let u=o.filter(w=>w.useSprints&&!w.archived),[c,p]=Jt(""),[d,s]=Jt(""),[m,f]=Jt(""),[B,b]=Jt(""),[h,x]=Jt(""),[T,g]=Jt(!1),[v,C]=Jt(0);vT(()=>{e&&(p(u.length===1?u[0].key:""),s(""),f(""),b(""),x(""),C(0))},[e]);let I=()=>{s(""),f(""),b(""),x(""),C(0)},M=w=>{C(w.seq),p(`custom-${w.group_seq}`),s(w.name),f(w.goal),b(w.start_date),x(w.end_date)},J=async()=>{let w=Aa(c);if(!w){Hc("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!d.trim()){Hc("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(!0);try{if(v>0){a(v,{name:d.trim(),goal:m.trim(),start_date:B,end_date:h}),I();return}await r({group_seq:w,name:d.trim(),goal:m.trim(),start_date:B,end_date:h})&&I()}finally{g(!1)}},E=new Map(o.map(w=>[Aa(w.key),w.label])),X=Le(To,{children:u.length===0?Le(To,{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.'}):Et(DT,{children:[Et(To,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Le(Kc,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:u.map(w=>({value:w.key,label:w.label})),onChange:w=>p(String(w.target.value)),disabled:v>0}),Le(Wc,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:d,onChange:w=>s(w.target.value)}),Le($c,{size:"medium",label:"\uC2DC\uC791\uC77C",value:B,onChange:w=>b(w.target.value)}),Le($c,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:w=>x(w.target.value)}),Le(Wc,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:w=>f(w.target.value),sx:{gridColumn:"1 / -1"}})]}),Et(To,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[v>0?Le(La,{color:"inherit",onClick:I,disabled:T,children:"\uCDE8\uC18C"}):null,Le(La,{variant:"contained",onClick:()=>{J()},disabled:T,children:v>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Le(To,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Le(To,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(w=>Et(To,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[Et(To,{sx:{minWidth:0},children:[Et(To,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Le(To,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:w.name}),Le(To,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:E.get(w.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),Et(To,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Uc(w.start_date)," ~ ",Uc(w.end_date)]})]}),w.goal?Le(To,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:w.goal}):null]}),Et(To,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Le(Kc,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:w.status,options:wT.map(y=>({value:y.value,label:y.label})),onChange:y=>i(w.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),Le(Fc,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>M(w),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Le(_T,{sx:{fontSize:18}})}),Le(Fc,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(w.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Le(at,{style:{width:16,height:16}})})]})]},w.seq))})]})});return Le(IT,{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:X}],actions:{showCancelButton:!1,right:Le(La,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Vc}from"react";import{Box as je,Button as Na,Divider as OT,IconButton as MT,TextField as ET}from"@mui/material";import{FormDialog as PT}from"@ehfuse/mui-form-dialog";import RT from"@mui/icons-material/OpenInNewOutlined";import zT from"@mui/icons-material/EventOutlined";import{ConfirmDialog as qT}from"@ehfuse/alerts";import{jsx as Ce,jsxs as Zt}from"react/jsx-runtime";function SR({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[a,i]=Vc(""),[l,u]=Vc(!1),c=async()=>{let s=a.trim();if(s){u(!0);try{await t(s)&&i("")}finally{u(!1)}}},p=async s=>{await qT({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${s.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(s.seq)},d=Zt(je,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Zt(je,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Ce("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Ce("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Ce("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Ce(je,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Ce(je,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((s,m)=>Zt(je,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[Ce(zT,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Ce(je,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Ce(MT,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{p(s)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ce(at,{sx:{fontSize:18}})})]},s.seq))}):Ce(je,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Ce(OT,{sx:{my:1,borderColor:"#e6e6e3"}}),Ce(je,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Zt(je,{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:[Ce(je,{children:Zt(je,{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 > ",Ce("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Ce(je,{children:Zt(je,{component:"span",children:[Ce("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Ce("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ce(je,{children:Ce(je,{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."})}),Ce(je,{children:Ce(je,{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."})})]}),Zt(je,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Ce(ET,{value:a,onChange:s=>i(s.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Ce(Na,{variant:"contained",disabled:!a.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Ce(PT,{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:d}],actions:{showCancelButton:!1,left:Ce(Na,{variant:"outlined",startIcon:Ce(RT,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ce(Na,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as xt,Button as Jn,TextField as AT}from"@mui/material";import{FormDialog as LT}from"@ehfuse/mui-form-dialog";import NT from"@mui/icons-material/ContentCopyOutlined";import Gc from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Yc}from"@ehfuse/alerts";import{Fragment as HT,jsx as Ne,jsxs as en}from"react/jsx-runtime";function FT(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function OR({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:a}){let i=n??FT,l=o.subscribed?i(o.token):"",u=()=>{navigator.clipboard.writeText(l).then(()=>Yc("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Yc("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let d=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(d)}`,"_blank")},p=en(xt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[en(xt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Ne("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?en(xt,{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.",Ne("br",{}),Ne("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?en(HT,{children:[Ne(AT,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),en(xt,{sx:{display:"flex",gap:2},children:[Ne(Jn,{variant:"outlined",startIcon:Ne(NT,{}),onClick:u,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Ne(Jn,{variant:"contained",startIcon:Ne(Gc,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),en(xt,{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:[Ne(xt,{children:en("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Ne("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ne(xt,{children:Ne("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."})}),Ne(xt,{children:Ne("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."})}),Ne(xt,{children:Ne("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."})})]})]}):Ne(Jn,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Ne(LT,{open:e,onClose:a,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:p}],actions:{showCancelButton:!1,left:Ne(Jn,{variant:"outlined",startIcon:Ne(Gc,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ne(Jn,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}})}import{useEffect as WT,useMemo as Fa,useState as Ha}from"react";import{Box as Zn,Button as $T,Typography as KT}from"@mui/material";import{FormDialog as UT}from"@ehfuse/mui-form-dialog";import{SearchTextField as VT}from"@ehfuse/mui-form-controls";import{TreeView as GT}from"@ehfuse/tree-view";import{Fragment as ZT,jsx as Fo,jsxs as ey}from"react/jsx-runtime";function jc(e){return`${e.name}#${e.seq}`}function YT(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function jT(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 XT(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 QT(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:jc(e),renderLabel:Fo(Zn,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Fo(Zn,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Xc(e,o){let t=(e.groups??[]).map(r=>Xc(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>XT(r,o)).map(QT);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function JT({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:a}){let[i,l]=Ha(""),u=Fa(()=>e.map(p=>Xc(p,i.trim().toLowerCase())).filter(p=>p!==null),[e,i]),c=Fa(()=>o.filter(p=>t.includes(p.seq)).map(jc),[]);return ey(ZT,{children:[Fo(Zn,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Fo(VT,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Fo(Zn,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Fo(GT,{items:u,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:p=>a(p.map(YT).filter(d=>d>0)),styles:{border:"none",borderRadius:"0"}})})]})}function NR({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:a,confirmText:i="\uD655\uC778",onConfirm:l,onClose:u}){let c=He(),[p,d]=Ha([]),[s,m]=Ha(0),f=Fa(()=>jT(n),[n]),B=a??[];WT(()=>{e&&(d(B),m(h=>h+1))},[e]);let b=()=>{let h=f.filter(x=>p.includes(x.seq));l(r?h:h.slice(0,1)),u()};return Fo(UT,{open:e,onClose:u,title:`${o}${r&&p.length>0?` (${p.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:Fo(Zn,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:Fo(JT,{groups:n,allEmployees:f,initialSelectedSeqs:B,multiple:r,isMobile:c,onSelectionChange:d},s)})}],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?Fo(KT,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:Fo($T,{variant:"contained",onClick:b,children:i})}})}import{useEffect as ry,useMemo as iy,useState as ay}from"react";import{Box as In,Button as ly,Divider as sy}from"@mui/material";import{FormDialog as cy}from"@ehfuse/mui-form-dialog";import{LabelSelect as my}from"@ehfuse/mui-form-controls";import{Box as Qo}from"@mui/material";import{jsx as Cn,jsxs as vn}from"react/jsx-runtime";function oy(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 Qc({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((p,d)=>`${p.start_date}|${p.seq}`.localeCompare(`${d.start_date}|${d.seq}`)).map(p=>({sprint:p,...oy(p,o)})),a=r.some(p=>p.points>0),i=r.map(p=>a?p.points:p.count),l=Math.max(1,...i),u=r.filter(p=>p.sprint.status==="closed").map(p=>a?p.points:p.count),c=u.length>0?Math.round(u.reduce((p,d)=>p+d,0)/u.length*10)/10:null;return r.length===0?Cn(Qo,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):vn(Qo,{children:[vn(Qo,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[vn("span",{children:["\uC644\uB8CC ",a?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?vn("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Cn(Qo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),a?"SP":"\uAC74"]}):null]}),Cn(Qo,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(p=>{let d=a?p.points:p.count,s=Math.round((t-24)*d/l),m=p.sprint.status==="closed";return vn(Qo,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[Cn(Qo,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:d}),Cn(Qo,{sx:{width:"60%",maxWidth:56,height:Math.max(2,s),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},p.sprint.seq)})}),Cn(Qo,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(p=>vn(Qo,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[p.sprint.name,p.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},p.sprint.seq))})]})}import{useMemo as ty}from"react";import{Box as on}from"@mui/material";import{jsx as Jo,jsxs as tn}from"react/jsx-runtime";function Jc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function ny(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Wa(e){return e.slice(5).replace("-",".")}function Zc({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=ty(()=>{let h=Jc(e.start_date),x=Jc(e.end_date);if(!h||!x||x<h||Math.round((x.getTime()-h.getTime())/864e5)+1>366)return null;let g=o.filter(w=>w.sprint_seq===e.seq&&!w.archived);if(g.length===0)return{empty:!0};let v=g.some(w=>(w.story_points??0)>0),C=w=>v?w.story_points??0:1,I=g.reduce((w,y)=>w+C(y),0),M=new Map;for(let w of g){if(!w.completed)continue;let y=(w.completed_time??"").slice(0,10),H=/^\d{4}-\d{2}-\d{2}$/.test(y)?y:e.start_date;M.set(H,(M.get(H)??0)+C(w))}let J=[];for(let w=new Date(h);w<=x;w.setDate(w.getDate()+1))J.push(ny(w));let E=I,X=[];for(let w of J){if(w>t)break;E-=M.get(w)??0,X.push({day:w,value:Math.max(0,E)})}return{empty:!1,days:J,total:I,usePoints:v,actual:X}},[e,o,t]);if(!r)return Jo(on,{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 Jo(on,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:a,total:i,usePoints:l,actual:u}=r,c=600,p=200,d=8,s=h=>a.length===1?0:h/(a.length-1)*c,m=h=>d+(p-d*2)*(1-h/Math.max(1,i)),f=`${s(0)},${m(i)} ${s(a.length-1)},${m(0)}`,B=u.map(h=>`${s(a.indexOf(h.day))},${m(h.value)}`).join(" "),b=u[u.length-1];return tn(on,{children:[tn(on,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[tn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",i]}),b?tn("span",{children:["\uD604\uC7AC"," ",Jo(on,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:b.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),Jo(on,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:tn("svg",{viewBox:`0 0 ${c} ${p}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[Jo("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),Jo("polyline",{points:f,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),u.length>1?Jo("polyline",{points:B,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,b?Jo("circle",{cx:s(a.indexOf(b.day)),cy:m(b.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),tn(on,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[Jo("span",{children:Wa(e.start_date)}),t>e.start_date&&t<e.end_date?tn("span",{children:["\uC624\uB298 ",Wa(t)]}):null,Jo("span",{children:Wa(e.end_date)})]})]})}import{jsx as gt,jsxs as $a}from"react/jsx-runtime";function t2({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:a}){let[i,l]=ay(0);ry(()=>{if(!e)return;let p=o.find(s=>s.status==="active")??o[0],d=o.find(s=>s.seq===r)??p;l(d?.seq??0)},[e]);let u=iy(()=>o.find(p=>p.seq===i)??null,[o,i]),c=$a(In,{sx:{display:"flex",flexDirection:"column"},children:[$a(In,{sx:{px:3,py:2.5},children:[gt(In,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),gt(Qc,{sprints:o,tasks:t})]}),gt(sy,{sx:{borderColor:"#e6e6e3"}}),$a(In,{sx:{px:3,py:2.5},children:[gt(In,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),gt(my,{label:"\uBAA9\uD45C",showLabel:!1,value:i?String(i):"",options:o.map(p=>({value:String(p.seq),label:vo(p)})),onChange:p=>l(Number(p.target.value)||0),sx:{width:280,mb:2}}),u?gt(Zc,{sprint:u,tasks:t,todayStr:n}):gt(In,{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 gt(cy,{open:e,onClose:a,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:c}],actions:{showCancelButton:!1,right:gt(ly,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}})}import{Checkbox as uy,Divider as dy,Menu as py,MenuItem as Ka}from"@mui/material";import{jsx as er,jsxs as em}from"react/jsx-runtime";function l2({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:a,onClose:i}){return em(py,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,children:[o.length===0?er(Ka,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let u=t.includes(l.name);return em(Ka,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[er(uy,{size:"small",checked:u,sx:{p:0}}),er(xo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),er(dy,{}),er(Ka,{disabled:t.length===0,onClick:a,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as fy}from"react";import{ButtonBase as xy,Menu as gy,MenuItem as by}from"@mui/material";import hy from"@mui/icons-material/KeyboardArrowDown";import ky from"@mui/icons-material/Check";import{Fragment as Ty,jsx as Ua,jsxs as Va}from"react/jsx-runtime";function x2({value:e,onChange:o,options:t}){let[n,r]=fy(null),a=t??Ei,i=Ei.find(l=>l.value===e)?.label??"";return Va(Ty,{children:[Va(xy,{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:[i,Ua(hy,{sx:{fontSize:17,color:"#9a9a97"}})]}),Ua(gy,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:a.map(l=>Va(by,{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?Ua(ky,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as mi,ButtonBase as yy}from"@mui/material";import{DateTextField as om}from"@ehfuse/mui-form-controls";function nn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function ci(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function h2(e=new Date){return{fromDate:nn(ci(1,e)),toDate:nn(e)}}import{jsx as or,jsxs as tm}from"react/jsx-runtime";var Sy=[{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 nm({fromDate:e,toDate:o,onChange:t}){let n=a=>{if(a<=0){t("","");return}t(nn(ci(a)),nn(new Date))},r=a=>a<=0?!e&&!o:!e||!o?!1:e===nn(ci(a))&&o===nn(new Date);return tm(mi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[or(mi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:Sy.map(a=>{let i=r(a.months);return or(yy,{onClick:()=>n(a.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:i?500:400,border:"1px solid",borderColor:i?"#2f80ed":"#dedddb",color:i?"#2f80ed":"#37352f",bgcolor:i?"#eef6ff":"transparent","&:hover":{bgcolor:i?"#eef6ff":"#f7f7f5"}},children:a.label},a.label)})}),tm(mi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[or(om,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:a=>t(a.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),or(mi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),or(om,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:a=>t(e,a.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as By}from"@mui/material";import{jsx as rm}from"react/jsx-runtime";function _2({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return rm(By,{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:rm(nm,{fromDate:o,toDate:t,onChange:n})})}import{Box as Cy,ButtonBase as vy,Tab as Iy,Tabs as _y}from"@mui/material";import wy from"@mui/icons-material/Checklist";import Dy from"@mui/icons-material/Face";import Oy from"@mui/icons-material/Publish";import My from"@mui/icons-material/NotificationsOutlined";import Ey from"@mui/icons-material/BugReportOutlined";import Py from"@mui/icons-material/DescriptionOutlined";import Ry from"@mui/icons-material/Inventory2Outlined";import{jsx as Ho}from"react/jsx-runtime";function im(e,o){return o>0?`${e} (${o})`:e}var F2=[{id:"my",label:"\uC804\uCCB4",icon:Ho(wy,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Ho(My,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Ho(Dy,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Ho(Oy,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Ho(Ey,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Ho(Ry,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Ho(Py,{sx:{fontSize:18}}),hideCount:!0}];function zy(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 H2({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let a=le(),i=zy(a.tabs),l=e;return r?Ho(Cy,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(u=>{let c=o===u.id;return Ho(vy,{onClick:()=>n(u.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:po(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?a.tabs.selectedBg:a.tabs.bg,color:c?a.tabs.selectedColor:a.tabs.color,borderColor:c?a.tabs.selectedBg:a.tabs.borderColor},children:im(u.label,u.hideCount?0:t[u.id]??0)},u.id)})}):Ho(_y,{value:o,onChange:(u,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(u=>Ho(Iy,{value:u.id,label:im(u.label,u.hideCount?0:t[u.id]??0),icon:u.icon,iconPosition:"start",sx:i},u.id))})}import{useEffect as qy,useMemo as Ay,useState as Ga}from"react";import{Divider as Ya,ListItemIcon as Do,Menu as ja,MenuItem as co}from"@mui/material";import Ly from"@mui/icons-material/OpenInNewOutlined";import Ny from"@mui/icons-material/Check";import Fy from"@mui/icons-material/CheckCircleOutlined";import Hy from"@mui/icons-material/RadioButtonUnchecked";import Wy from"@mui/icons-material/SendOutlined";import $y from"@mui/icons-material/EventOutlined";import Ky from"@mui/icons-material/PersonOutlineOutlined";import Uy from"@mui/icons-material/ViewKanbanOutlined";import Vy from"@mui/icons-material/ContentCopyOutlined";import Gy from"@mui/icons-material/NextPlanOutlined";import Yy from"@mui/icons-material/ContentPasteOutlined";import jy from"@mui/icons-material/ShareOutlined";import Xy from"@mui/icons-material/DirectionsRunOutlined";import am from"@mui/icons-material/ChevronRight";import Qy from"@mui/icons-material/ArchiveOutlined";import Jy from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as Zy}from"@ehfuse/alerts";import{Fragment as eS,jsx as me,jsxs as to}from"react/jsx-runtime";function bz({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:a,onToggleCompleted:i,onRequestConfirm:l,onChangeDueDate:u,onChangeReminder:c,onMemberEdit:p,onMoveProject:d,onDuplicate:s,onCreateFollowUp:m,onShare:f,onAssignSprint:B,onArchiveToggle:b,onDelete:h}){let x=He(),T=Uo(),[g,v]=Ga(null),[C,I]=Ga(null),[M,J]=Ga(null);qy(()=>{e||(v(null),I(null),J(null))},[e]);let E=e?.task??null,X=!!E?.is_notice,w=!!E?.is_event,y=E?!ot(E,r):!1,H=Ay(()=>new Set(t.filter(P=>P.useSprints).map(P=>P.key)),[t]),N=async()=>{let P=E;if(o(),!P)return;await Zy({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${P.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(P.seq)},$=()=>{E&&b(E.seq,!E.archived),o()};return to(eS,{children:[to(ja,{open:!!e,onClose:o,transitionDuration:0,anchorReference:x?"none":"anchorPosition",anchorPosition:!x&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...x?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:x?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[to(co,{onClick:()=>{E&&a(E),o()},sx:{fontSize:14},children:[me(Do,{children:me(Ly,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),to(co,{disabled:X?(E?.author_account_seq??0)!==r:(E?.author_account_seq??0)!==r&&(E?.manager_account_seq??0)!==r,onClick:()=>{E&&i(E.seq,!E.completed),o()},sx:{fontSize:14},children:[me(Do,{children:E?.completed?me(Hy,{sx:{fontSize:19}}):me(Fy,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!X&&l?to(co,{disabled:!(E?.manager_account_seq??0)&&(E?.receiver_account_seqs??[]).length===0,onClick:()=>{E&&l(E),o()},sx:{fontSize:14},children:[me(Do,{children:me(Wy,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,w?null:me(Ya,{}),w?null:to(co,{disabled:y,onClick:P=>{E&&v({anchorEl:P.currentTarget,task:E})},sx:{fontSize:14},children:[me(Do,{children:me($y,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!X&&!w&&p?to(co,{onClick:()=>{E&&p(E,"manager"),o()},sx:{fontSize:14},children:[me(Do,{children:me(Ky,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,w?null:to(co,{disabled:y,onClick:P=>{E&&I({anchorEl:P.currentTarget,task:E})},sx:{fontSize:14},children:[me(Do,{children:me(Uy,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",me(am,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),me(Ya,{}),s?to(co,{disabled:y,onClick:()=>{E&&s(E.seq),o()},sx:{fontSize:14},children:[me(Do,{children:me(Vy,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?to(co,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[me(Do,{children:me(Gy,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,to(co,{onClick:()=>{E&&(f?f(E):li(E,x)),o()},sx:{fontSize:14},children:[me(Do,{children:x?me(jy,{sx:{fontSize:19}}):me(Yy,{sx:{fontSize:19}})}),x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),E&&!E.is_notice&&!E.is_event&&H.has(String(E.tab_key??""))&&B?to(co,{onClick:P=>J(P.currentTarget),sx:{fontSize:14},children:[me(Do,{children:me(Xy,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",me(am,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,to(co,{onClick:$,disabled:y||!E?.archived&&!(E&&dr(E)),sx:{fontSize:14},children:[me(Do,{children:E?.archived?me(Jy,{sx:{fontSize:19}}):me(Qy,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),me(Ya,{}),to(co,{disabled:y,onClick:N,sx:{fontSize:14,color:"#e5484d"},children:[me(Do,{children:me(at,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),me(St,{anchorEl:g?.anchorEl??null,open:!!g,date:g?.task.due_date??"",reminder:g?.task.reminder??"none",hideReminder:!!g?.task.completed,centered:x,onClose:()=>{v(null),o()},onDateChange:P=>{g&&u(g.task.seq,P)},onReminderChange:P=>{g&&c?.(g.task.seq,P)}}),to(ja,{transitionDuration:0,anchorEl:C?.anchorEl??null,open:!!C,onClose:()=>{I(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...T,children:[me(co,{selected:!C?.task.tab_key,onClick:()=>{C&&d(C.task.seq,""),I(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(P=>!P.archived).map(P=>me(co,{selected:C?.task.tab_key===P.key,onClick:()=>{C&&d(C.task.seq,P.key),I(null),o()},sx:{fontSize:14,minWidth:170},children:P.label},P.key))]}),me(ja,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>J(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(P=>`custom-${P.group_seq}`===String(E?.tab_key??"")).map(P=>({seq:P.seq,label:vo(P)}))].map(P=>to(co,{onClick:()=>{E&&B?.(E.seq,P.seq),J(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[P.label,(E?.sprint_seq??0)===P.seq?me(Ny,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},P.seq))})]})}import{Checkbox as oS,Divider as tS,Menu as nS,MenuItem as lm}from"@mui/material";import{jsx as ui,jsxs as sm}from"react/jsx-runtime";function Sz({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:a}){return sm(nS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:a,children:[o.map(i=>{let l=t.includes(i.key);return sm(lm,{onClick:()=>n(i.key),sx:{fontSize:14,minWidth:190,gap:1},children:[ui(oS,{size:"small",checked:l,sx:{p:0}}),ui(we,{option:i})]},i.key)}),ui(tS,{}),ui(lm,{disabled:t.length===0,onClick:()=>{r(),a()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as cm,Menu as rS,MenuItem as Xa}from"@mui/material";import iS from"@mui/icons-material/Check";import aS from"@mui/icons-material/BarChartOutlined";import lS from"@mui/icons-material/SettingsOutlined";import{jsx as tr,jsxs as di}from"react/jsx-runtime";function Oz(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:a,onCharts:i,onClose:l}=e;return di(rS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(u=>({seq:u.seq,label:vo(u)}))].map(u=>di(Xa,{onClick:()=>{r(u.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[u.label,n===u.seq?tr(iS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},u.seq)),tr(cm,{}),i?di(Xa,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[tr(aS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,i?tr(cm,{}):null,di(Xa,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[tr(lS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var sS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function cS(e){return sS[e]??"tasks"}var Pz={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"},mm=["list","calendar","month","card","kanban","sprint","timeline"],mS=["list","card"];function Rz(e){let o=cS(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:mm,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:mS,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:mm,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{XC as ALL_TASK_VIEWER_ACCOUNT_SEQS,rc as AddLabelDialog,_r as AddTabDialog,ec as AttachmentUploadGauge,ya as AttachmentUploadPercent,Ci as BUG_DEVICE_OPTIONS,Rn as BUG_ICON_COLOR,PC as BUG_KANBAN_COLUMNS,Bi as BUG_REPRO_OPTIONS,vi as BUG_RESOLUTION_OPTIONS,qt as BUG_STATUS_OPTIONS,Pn as BUG_TASK_ICON,Xr as BugPropertiesGrid,Rp as COLUMN_WIDTHS,_i as COMPLETED_STATUS_OPTION,qa as CUSTOM_TAB_KEY_PREFIX,SR as CalendarImportDialog,OR as CalendarSubscribeDialog,Cr as CommentBubbleIcon,un as ConfirmCountButton,Ll as DATE_REMINDER_OPTIONS,gi as DEFAULT_PROJECT_ICON,F2 as DEFAULT_TASKBOX_TAB_ITEMS,_e as DEFAULT_TASK_ICON,_2 as DateRangeFilterPopover,_o as DrawerSection,St as DueDatePickerPopover,pp as ENDED_EVENT_STATUS_OPTION,uc as EVENT_ICON_COLOR,NR as EmployeeSelectDialog,Ei as GROUP_BY_OPTIONS,xn as GoogleEventChip,x2 as GroupByMenuButton,Ir as IconPickerGrid,Ws as InlineAddressInput,pt as InlineTextValue,wi as KANBAN_CLOSED_COLUMN_KEY,Sz as LabelFilterMenu,ni as LabelSelectMenu,qn as MANUAL_TASK_STATUS_OPTIONS,l2 as MemberFilterMenu,zn as NOTICE_STATUS_OPTIONS,Mo as NOTICE_TASK_ICON,ul as NO_TASK_ICON,bi as PROJECT_ICON_OPTIONS,xe as PropertyRow,cn as RECEIVER_AVATAR_COLORS,Nl as REMINDER_OPTIONS,xo as ReceiverAvatarStack,zc as RelatedTasksSection,sr as STATUS_KEY_REPLIED,Mn as STATUS_KEY_WAITING,Mr as SortableTaskCard,Zc as SprintBurndownChart,t2 as SprintChartsDialog,Oz as SprintFilterMenu,dR as SprintManageDialog,Qc as SprintVelocityChart,gr as StatusSelectMenu,zi as TASKBOX_COLUMNS,jo as TASKBOX_DRAWER_NARROW_MQ,dl as TASKBOX_UI_STATE_ID,Pz as TASKBOX_VIEW_LABELS,Fw as TASKBOX_VIEW_MODES,zt as TASK_STATUS_OPTIONS,If as TIME_REMINDER_OPTIONS,Or as TaskAckListPopover,mn as TaskActionButton,oi as TaskAttachmentsSection,Os as TaskBoxColumnSummary,ea as TaskBoxGroupBoard,ID as TaskBoxMobileList,ks as TaskBoxMonthAgenda,xs as TaskBoxMonthCalendar,Zw as TaskBoxSprintColumnSummary,$l as TaskBoxTable,H2 as TaskBoxTabs,vs as TaskBoxTimeline,Nw as TaskBoxView,ss as TaskBoxWeekCalendar,Wt as TaskCardContent,Jr as TaskChecklistSection,Sc as TaskCommentInput,yc as TaskCommentsSection,Qr as TaskContentEditor,bz as TaskContextMenu,jr as TaskCorePropertiesGrid,dc as TaskCreateBody,RE as TaskCreateDrawer,nm as TaskDateRangeFilter,Lc as TaskDetailBody,Z5 as TaskDetailDrawer,_c as TaskDetailHeader,Ur as TaskIconPickerPopover,Tt as TaskLabelChips,Ec as TaskLinkDialog,wc as TaskNoteField,Eo as TaskPriorityChip,we as TaskStatusChip,FC as TaskStatusChips,hm as TaskboxProvider,FT as buildCalendarFeedUrl,pn as buildCardBaseSx,kl as buildStatusOptionColors,Pi as buildTaskGroupSections,Oc as buildTaskRelationsModel,Mk as buildTaskShareText,mr as buildTaskboxTheme,Tl as canAssignBugManager,hr as canClaimTaskItem,ot as canEditTaskItem,br as canViewTaskItem,kr as canVolunteerTaskItem,_s as countWorkdays,sp as createTaskboxTheme,Ds as daysLeftUntil,hi as defaultTaskBoxFormValues,ki as defaultTaskboxUiStateValues,cc as filterFilesWithinLimit,h1 as formatConfirmTime,Is as formatHours,Vo as formatKoreanDate,tt as formatKoreanDateTime,vo as formatSprintOptionLabel,gl as getBugDeviceName,xl as getBugReproName,ur as getBugResolutionName,fp as getBugStatusOption,h2 as getDefaultDateRange,An as getEventDisplayStatusOption,RC as getNoDueStatusRank,sc as getNoticeAckInfo,bl as getNoticeStatusOption,VM as getNoticeTargetDisplay,cr as getProjectIconAnchorComponent,Oe as getProjectIconComponent,Ki as getReminderLabel,$i as getReminderOptions,hl as getStatusOptionsForTask,Rz as getTabHeaderConfig,Ai as getTaskBoxColumnDefs,Tr as getTaskBoxGridTemplate,cS as getTaskBoxTabKind,Ul as getTaskConfirmInfo,fo as getTaskDisplayStatusOption,pr as getTaskStatusOption,fn as groupGoogleEventsByDate,Aa as groupSeqFromTabKey,wP as hasRelation,yh as htmlToPlainText,CT as isCustomTabKey,Mi as isOpenPoolTaskItem,Ii as isPastEvent,dr as isTaskDone,Di as isWaitingTask,ci as monthsAgoDate,so as narrowOrderSx,J5 as nowDateTimeString,rb as parseEstimatedHours,Xt as relationsOf,kt as resolveTaskStatusOptions,Si as resolveTaskboxTheme,li as shareTaskText,ws as sumRemainingHours,ri as summarizeNoticeTargets,tR as tabKeyFromGroupSeq,nn as toYmd,fr as toggleLabelKey,xi as useBuildFileUrl,Zs as useTaskAttachmentUploadMeta,yo as useTaskboxConfig,np as useTaskboxForm,le as useTaskboxTheme,et as useTaskboxUiState,En as useUploadMaxMb};
|
|
12
|
+
`).trim():"";function Pk(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Vo(e.start_date),n=Vo(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=fo(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let a=vc(e.content);a&&o.push("",a);let i=String(e.note??"").trim();return i&&o.push("",`\uBE44\uACE0: ${i}`),o.join(`
|
|
13
|
+
`)}function Ic(e){navigator.clipboard.writeText(e).then(()=>Ek("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Mk("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function li(e,o){let t=Pk(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Ic(t)});return}Ic(t)}import{Fragment as Fk,jsx as eo,jsxs as wc}from"react/jsx-runtime";function Dc({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:a,onClose:i}){let l=He(),[u,c]=_c(null),[p,d]=_c(null),s=cr(e.icon||(e.is_notice?Mo:e.is_event?"event":_e)),m=!!e.is_notice,f=!!e.is_event,B=m&&o>0&&(e.author_account_seq??0)===o,b=!ot(e,o),h=!f&&(m?B:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return wc(Fk,{children:[wc(wa,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[h?eo(Oa,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${tt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:eo(Rk,{checked:e.completed,icon:eo(Nk,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:eo(Lk,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(x,T)=>t(e.seq,T),sx:{p:0}})}):null,eo(Oa,{title:b?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:eo(Da,{size:"small",onClick:b?void 0:x=>d(x.currentTarget),sx:{color:e.icon_color||(m?"#e5484d":"#1e3a8a")},children:eo(s,{sx:{fontSize:20}})})}),u!==null?eo(wa,{component:"input",autoFocus:!0,spellCheck:!1,value:u,onChange:x=>c(x.target.value),onBlur:()=>{u.trim()&&u.trim()!==e.title&&n(e.seq,u.trim()),c(null)},onKeyDown:x=>{x.key==="Enter"&&x.target.blur(),x.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}}):eo(wa,{onClick:b?void 0:()=>c(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:b?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),eo(Oa,{title:l?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:eo(Da,{"aria-label":l?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>li(e,l),sx:{color:"#6b7280"},children:l?eo(qk,{sx:{fontSize:20}}):eo(Ak,{sx:{fontSize:20}})})}),i?eo(Da,{"aria-label":"\uB2EB\uAE30",onClick:i,sx:{color:"#6b7280"},children:eo(zk,{})}):null]}),eo(Ur,{anchorEl:p,value:e.icon||(m?Mo:""),color:e.icon_color||(m?"#e5484d":"#1e3a8a"),onSelect:x=>r(e.seq,x),onSelectColor:x=>a?.(e.seq,x),onClose:()=>d(null)})]})}import{useState as Sn}from"react";import{Box as Bo,Button as si,ButtonBase as aT,Divider as Qt,Menu as lT,MenuItem as sT}from"@mui/material";import cT from"@mui/icons-material/ExpandLess";import mT from"@mui/icons-material/ExpandMore";import uT from"@mui/icons-material/ConfirmationNumberOutlined";import dT from"@mui/icons-material/Check";import pT from"@mui/icons-material/DirectionsRunOutlined";import fT from"@mui/icons-material/SpeedOutlined";import xT from"@mui/icons-material/CheckCircle";import Lc from"@mui/icons-material/CheckCircleOutlined";import Nc from"@mui/icons-material/AccessTimeOutlined";import gT from"@mui/icons-material/AutorenewOutlined";import bT from"@mui/icons-material/LabelOutlined";import hT from"@mui/icons-material/PersonOutlineOutlined";import kT from"@mui/icons-material/SubjectOutlined";import TT from"@mui/icons-material/StickyNote2Outlined";import yT from"@mui/icons-material/PanToolAltOutlined";import{useState as Hk}from"react";import{TextField as Wk}from"@ehfuse/mui-form-controls";import{jsx as $k}from"react/jsx-runtime";function Oc({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,a]=Hk(null);return $k(Wk,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:i=>{a(i.target.value),t?.(i.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),a(null)},onKeyDown:i=>{i.key==="Enter"&&i.target.blur(),i.key==="Escape"&&a(null)},sx:{mt:1}})}import{useMemo as zc,useState as Pa}from"react";import{Box as oo,Button as qc,IconButton as eT}from"@mui/material";import oT from"@mui/icons-material/AccountTreeOutlined";import tT from"@mui/icons-material/Add";import nT from"@mui/icons-material/Close";import rT from"@mui/icons-material/NextPlanOutlined";function Xt(e){return e.relations??[]}function OP(e,o,t){return Xt(e).some(n=>n.type===t&&n.task_seq===o.seq)||Xt(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Mc(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Ec(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,f)=>{n.has(m)||n.set(m,new Set),n.has(f)||n.set(f,new Set),n.get(m).add(f),n.get(f).add(m)};for(let m of t.values())for(let f of Xt(m))f.type==="follow_up"&&t.has(f.task_seq)&&r(m.seq,f.task_seq);let a=new Set([e.seq]),i=[e.seq];for(;i.length>0;){let m=i.shift();for(let f of n.get(m)??[])a.has(f)||(a.add(f),i.push(f))}let l=[...a].map(m=>t.get(m)).filter(m=>!!m).sort((m,f)=>Mc(m).localeCompare(Mc(f))),u=new Set;for(let m of Xt(e))m.type==="related"&&u.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Xt(m).some(f=>f.type==="related"&&f.task_seq===e.seq)&&u.add(m.seq);let c=[...u].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),p=[...t.values()].filter(m=>m.seq!==e.seq&&Xt(m).some(f=>f.type==="duplicate_of"&&f.task_seq===e.seq)),d=Xt(e).find(m=>m.type==="duplicate_of")?.task_seq,s=d?t.get(d)??null:null;return{lineage:l,related:c,duplicates:p,duplicateOf:s}}import{useEffect as Kk,useMemo as Uk,useState as Ma}from"react";import{Box as yn,Button as Vk,Tab as Gk,Tabs as Yk}from"@mui/material";import jk from"@mui/icons-material/Check";import{FormDialog as Xk}from"@ehfuse/mui-form-dialog";import{ClearTextField as Qk}from"@ehfuse/mui-form-controls";import{ErrorAlert as Jk}from"@ehfuse/alerts";import{OverlayScrollbar as Zk}from"@ehfuse/overlay-scrollbar";import{jsx as wo,jsxs as Ea}from"react/jsx-runtime";var Pc=[{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 Rc({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:a}){let[i,l]=Ma("related"),[u,c]=Ma(""),[p,d]=Ma(0);Kk(()=>{e&&(l("related"),c(""),d(0))},[e]);let s=Uk(()=>{let b=new Set([o.seq,...n]),h=u.trim().toLowerCase();return t.filter(x=>b.has(x.seq)||x.is_event||x.is_notice?!1:h?x.title.toLowerCase().includes(h)||(x.ticket_no??"").toLowerCase().includes(h):!0)},[t,o.seq,n,u]),m=()=>{if(!p){Jk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}a(p,i),r()},f=Pc.find(b=>b.type===i)?.hint??"",B=Ea(yn,{children:[wo(Yk,{value:i,onChange:(b,h)=>l(h),sx:{minHeight:38,mb:.75,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Pc.map(b=>wo(Gk,{value:b.type,label:b.label},b.type))}),wo(yn,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:f}),wo(Qk,{label:"\uC5C5\uBB34 \uAC80\uC0C9",placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:u,onChange:b=>c(b.target.value),fullWidth:!0,autoFocus:!0}),wo(yn,{sx:{mt:1.5,height:300,border:"1px solid #e6e6e3",borderRadius:1},children:wo(Zk,{style:{height:"100%"},children:s.length===0?wo(yn,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):s.map(b=>{let h=Oe(b.icon||_e),x=b.seq===p;return Ea(yn,{onClick:()=>d(x?0:b.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.75,cursor:"pointer",bgcolor:x?"#e3eefb":"transparent","&:hover":{bgcolor:x?"#e3eefb":"#f7f7f5"}},children:[h?wo(h,{sx:{fontSize:17,flexShrink:0,color:b.icon_color||"#1e3a8a"}}):null,Ea(yn,{component:"span",sx:{flex:1,minWidth:0,fontSize:14,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),wo(we,{option:fo(b),small:!0}),x?wo(jk,{sx:{fontSize:17,flexShrink:0,color:"#2f80ed"}}):null]},b.seq)})})})]});return wo(Xk,{open:e,onClose:r,maxWidth:"sm",title:"\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:B}],actions:{showCancelButton:!0,right:wo(Vk,{variant:"contained",disabled:!p,onClick:m,children:"\uC5F0\uACB0"})}})}import{Fragment as iT,jsx as ze,jsxs as No}from"react/jsx-runtime";function Ra({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Oe(e.icon||_e);return No(oo,{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?ze(oo,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?ze(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,No(oo,{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]}),ze(we,{option:fo(e),small:!0}),n?ze(eT,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ze(nT,{sx:{fontSize:15}})}):null]})}function Ac({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:a,onCreateFollowUp:i}){let[l,u]=Pa(!1),[c,p]=Pa(null),[d,s]=Pa(null),m=zc(()=>Ec(e,o),[e,o]),f=m.lineage.length>=2,B=(f?m.lineage.length-1:0)+m.related.length+m.duplicates.length+(m.duplicateOf?1:0),b=zc(()=>{let x=new Set;for(let T of m.lineage)x.add(T.seq);for(let T of m.related)x.add(T.seq);for(let T of m.duplicates)x.add(T.seq);return m.duplicateOf&&x.add(m.duplicateOf.seq),[...x]},[m]),h=(x,T,g)=>{s({anchorEl:x,targetSeq:T,type:g})};return No(_o,{icon:ze(oT,{sx:{fontSize:19,display:"block"}}),title:No(iT,{children:["\uAD00\uB828 \uC5C5\uBB34",B>0?ze(oo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:B}):null]}),titleExtra:t?null:No(oo,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[i?ze(qc,{size:"small",color:"inherit",startIcon:ze(rT,{sx:{fontSize:16}}),onClick:x=>p(x.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?ze(qc,{size:"small",color:"inherit",startIcon:ze(tT,{sx:{fontSize:16}}),onClick:()=>u(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[No(oo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[f?ze(oo,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((x,T)=>{let g=x.seq===e.seq,v=T===m.lineage.length-1;return No(oo,{sx:{display:"flex",gap:1},children:[No(oo,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[ze(oo,{sx:{width:g?9:7,height:g?9:7,borderRadius:"50%",bgcolor:g?"#2f80ed":x.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),v?null:ze(oo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),No(oo,{sx:{flex:1,minWidth:0,pb:v?0:.5},children:[No(oo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[No(oo,{component:"span",onClick:!g&&n?()=>n(x.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:g?600:400,color:g?"#2f80ed":x.completed?"#9a9a97":"#37352f",textDecoration:x.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!g&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[x.ticket_no?`${x.ticket_no} `:"",x.title]}),ze(we,{option:fo(x),small:!0})]}),ze(oo,{sx:{fontSize:12,color:"#9a9a97"},children:x.completed&&x.completed_time?`${x.completed_time} \uC644\uB8CC`:x.created_time??""})]})]},x.seq)})}):null,m.duplicateOf?ze(Ra,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&a?x=>h(x.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(x=>ze(Ra,{item:x,caption:"\uC911\uBCF5",onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&a?T=>h(T.currentTarget,x.seq,"duplicate_of"):void 0},`dup-${x.seq}`)),m.related.map(x=>ze(Ra,{item:x,onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&a?T=>h(T.currentTarget,x.seq,"related"):void 0},`rel-${x.seq}`)),B===0?ze(oo,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?ze(Rc,{open:l,task:e,tasks:o,excludeSeqs:b,onClose:()=>u(!1),onSubmit:(x,T)=>r(e.seq,x,T)}):null,ze(Ue,{open:!!c,anchorEl:c,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>p(null),onConfirm:()=>{i?.(e.seq),p(null)}}),ze(Ue,{open:!!d,anchorEl:d?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>s(null),onConfirm:()=>{d&&a?.(e.seq,d.targetSeq,d.type),s(null)}})]})}import{Fragment as ko,jsx as q,jsxs as We}from"react/jsx-runtime";function Bn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return q(Bo,{component:"span",sx:{color:"#9a9a97"},children:e})}function Fc({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:a,onAddLabelOption:i,onChangeProject:l,onAddProject:u,onChangeDate:c,onChangeReminder:p,onMemberEdit:d,onChangePriority:s,onChangeEstimatedTime:m,onChangeEventTime:f,onChangeEventPlace:B,onChangeEventAddress:b,onChangeNote:h,onChangeContent:x,onAddChecklistItem:T,onToggleChecklistItem:g,onRemoveChecklistItem:v,onUpdateChecklistItem:C,onConvertChecklistToTask:I,onOpenChecklistTask:M,resolveChecklistTask:J,relatedTasksPool:E,onOpenRelatedTask:X,onLinkRelatedTask:w,onUnlinkRelatedTask:y,onCreateFollowUpTask:H,onAddAttachments:N,onRemoveAttachment:$,onPreview:P,onDownload:te,onUpdateComment:de,onRemoveComment:A,onToggleCommentReaction:W,currentUserName:K="",myAccountSeq:F=0,noticeAdmin:O=!1,hideProject:L=!1,employees:Q=[],onAckConfirm:Z,onChangeBugField:ue,sprints:ee=[],sprintProject:ye=!1,onChangeSprint:R,onChangeStoryPoints:k,onChangeResolution:ne,onClaimTask:re,onVerifyBug:ve}){let[$e,se]=Sn(null),[Ie,V]=Sn(!1),Ee={[jo]:Ie?{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"}},[Xe,bt]=Sn(null),[Wo,Zo]=Sn(null),[$o,Pt]=Sn(null),[rn,Oo]=Sn(null),no=!!e.is_notice,mo=!!e.is_event,uo=!!e.is_bug,Rt=!!re&&hr(e,F),pe=!!re&&kr(e,F),D=!!ve&&uo&&!!e.completed&&F>0&&(e.author_account_seq??0)===F&&!(e.acks??[]).some(_=>_.account_seq===F),z=!ot(e,F),ie=no?!br(e,F):z,ce=Rt||pe?We(mn,{onClick:_=>Oo(_.currentTarget),children:[q(yT,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ae=no?ri(e,Q):"",fe=no?mc(e,Q,F):null;return We(ko,{children:[We(Bo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[q(jr,{hideProject:L,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:!mo,notice:no,event:mo,readOnly:z,targetSummary:ae,onChangeProject:_=>l(e.seq,_),onAddProject:u,onChangeStartDate:_=>c(e.seq,"start_date",_),onChangeDueDate:_=>c(e.seq,"due_date",_),onChangeReminder:_=>p(e.seq,_),onChangePriority:_=>s(e.seq,_),onChangeEstimatedTime:_=>m(e.seq,_),onChangeEventTime:_=>f?.(e.seq,_),onChangeEventPlace:_=>B?.(e.seq,_),onChangeEventAddress:_=>b?.(e.seq,_),onMemberEdit:_=>d(e,_),narrowCollapsedSx:Ee,reminderLocked:e.completed,managerAction:ce,leading:We(ko,{children:[D||ce&&(no||mo)?We(Bo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"center",gap:1,px:2,py:.75},children:[no||mo?ce:null,D?We(ko,{children:[q(si,{variant:"contained",size:"small",onClick:()=>ve?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uC218\uC815 \uD655\uC778(\uAC80\uC99D \uC644\uB8CC)"}),q(si,{variant:"outlined",size:"small",color:"error",onClick:()=>ve?.(e.seq,!1),children:"\uC544\uC9C1 \uC7AC\uD604\uB428(\uC7AC\uC624\uD508)"})]}):null]}):null,uo&&e.ticket_no?q(xe,{icon:q(uT,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:q(Bo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,mo?null:q(Bo,{sx:uo&&e.ticket_no?void 0:{gridColumn:"1 / -1"},children:q(xe,{icon:q(gT,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:z||e.completed?void 0:_=>bt(_),children:q(we,{option:fo(e)})})}),ye&&!mo&&!no?We(ko,{children:[q(xe,{icon:q(pT,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:z?void 0:_=>Zo(_),children:(e.sprint_seq??0)>0?ee.find(_=>_.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":q(Bn,{label:"\uBBF8\uBC30\uC815"})}),q(xe,{icon:q(fT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:q(pt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:z,onCommit:_=>k?.(e.seq,Number(_.replace(/[^0-9.]/g,""))||0)})})]}):null,mo?null:q(Bo,{sx:[{gridColumn:"1 / -1"},Ee??null],children:q(xe,{icon:q(bT,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:z?void 0:_=>Pt(_),children:(e.label_keys??[]).length>0?q(Tt,{labelKeys:e.label_keys??[],labelOptions:t}):q(Bn,{})})}),no&&fe?q(Bo,{sx:{gridColumn:"1 / -1"},children:q(xe,{icon:q(Lc,{sx:{fontSize:17}}),label:"\uD655\uC778",children:q(Bo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:fe.canAck?q(si,{size:"small",variant:"contained",onClick:()=>Z?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):q(si,{size:"small",variant:"outlined",color:"inherit",startIcon:fe.acked?q(xT,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:_=>se({anchorEl:_.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:fe.total>0&&fe.count>=fe.total?"\uC644\uB8CC":We(ko,{children:[fe.count,q(Bo,{component:"span",sx:{mx:.4},children:"/"}),fe.total]})})})})}):null]}),trailing:We(ko,{children:[uo?q(Xr,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:z,showResolution:!!e.completed,onChangeRepro:_=>ue?.(e.seq,"bug_repro",_),onChangeDevice:_=>ue?.(e.seq,"bug_device",_),onChangeWhere:_=>ue?.(e.seq,"bug_where",_),onChangeVersion:_=>ue?.(e.seq,"bug_version",_),onChangeResolution:_=>ne?.(e.seq,_)}):null,q(xe,{icon:q(hT,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[so(9),Ee??null],children:e.created_by?We(ko,{children:[q(xo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):q(Bn,{})}),q(xe,{icon:q(Nc,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[so(11),Ee??null],children:e.created_time?tt(e.created_time):q(Bn,{})}),e.completed?We(ko,{children:[q(xe,{icon:q(Lc,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[so(10),Ee??null],children:e.completed_by?We(ko,{children:[q(xo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):q(Bn,{})}),q(xe,{icon:q(Nc,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[so(12),Ee??null],children:e.completed_time?tt(e.completed_time):q(Bn,{})})]}):null]})}),We(Bo,{sx:{display:"none",[jo]:{display:"block",mt:1.5}},children:[q(Qt,{sx:{borderColor:"#e6e6e3"}}),q(aT,{onClick:()=>V(_=>!_),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.5,pb:1.25,fontSize:13,color:"#787774","&:active":{opacity:.6}},children:Ie?We(ko,{children:["\uC811\uAE30 ",q(cT,{sx:{fontSize:18}})]}):We(ko,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",q(mT,{sx:{fontSize:18}})]})})]}),We(Bo,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3",[jo]:{mt:0}}}),q(_o,{icon:q(kT,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:q(Bo,{sx:{userSelect:"text"},children:q(Qr,{syncKey:e.seq,value:e.content??"",readOnly:z,onChange:_=>x(e.seq,_)})})}),e.is_bug?null:We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(_o,{icon:q(TT,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:q(Bo,{sx:{userSelect:"text"},children:q(Oc,{value:e.note,readOnly:ie,onCommit:_=>h(e.seq,_)})})})]}),mo?null:We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(Jr,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:ie,onAdd:T,onToggle:g,onRemove:v,onUpdate:C,onConvertToTask:I,onOpenLinkedTask:M,resolveLinkedTask:J})]}),E&&!mo&&!no?We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(Ac,{task:e,tasks:E,readOnly:z,onOpenTask:X,onLink:w,onUnlink:y,onCreateFollowUp:H})]}):null,q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(oi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:ie,onAdd:N,onRemove:$,onPreview:P?_=>P({..._,taskSeq:e.seq}):void 0,onDownload:te?_=>te({..._,taskSeq:e.seq}):void 0})]}),q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(Bc,{taskSeq:e.seq,comments:e.comments??[],currentUserName:K,myAccountSeq:F,avatarSrcByName:n,onUpdate:de,onRemove:A,onToggleReaction:W})]}),q(gr,{anchorEl:Xe,value:e.status,options:no?zn:uo?qt:qn,onSelect:_=>r(e.seq,_),onClose:()=>bt(null)}),q(lT,{transitionDuration:0,anchorEl:Wo,open:!!Wo,onClose:()=>Zo(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ee.filter(_=>`custom-${_.group_seq}`===String(e.tab_key??"")).map(_=>({seq:_.seq,label:vo(_)}))].map(_=>We(sT,{onClick:()=>{R?.(e.seq,_.seq),Zo(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[_.label,(e.sprint_seq??0)===_.seq?q(dT,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},_.seq))}),q(Or,{anchorEl:$e?.anchorEl??null,open:!!$e?.open,acks:e.acks??[],total:fe?.total??0,avatarSrcByName:n,onClose:()=>se(_=>_?{..._,open:!1}:null)}),q(ni,{anchorEl:$o,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:_=>a(e.seq,fr(e.label_keys??[],_)),onAddLabel:i,onClose:()=>Pt(null)}),q(Ue,{open:!!rn,anchorEl:rn,title:Rt?"\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:()=>Oo(null),onConfirm:()=>{re?.(e.seq),Oo(null)}})]})}import{jsx as ft,jsxs as vT}from"react/jsx-runtime";function eR(){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 oR({open:e,task:o,onClose:t,onAddComment:n,myAccountSeq:r=0,onToggleCompleted:a,onChangeTitle:i,onChangeIcon:l,onChangeIconColor:u,...c}){let p=ST(null);o&&(p.current=o);let d=o??p.current;return d?ft(BT,{anchor:"right",open:e,onClose:t,sx:{zIndex:s=>s.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:vT(za,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[ft(Dc,{task:d,myAccountSeq:r,onToggleCompleted:a,onChangeTitle:i,onChangeIcon:l,onChangeIconColor:u,onClose:t}),ft(Hc,{sx:{borderColor:"#e6e6e3"}}),ft(za,{sx:{flex:1,minHeight:0},children:ft(CT,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:ft(Fc,{...c,task:d,myAccountSeq:r})})}),ft(Hc,{sx:{borderColor:"#37352f"}}),ft(za,{sx:{flexShrink:0},children:ft(Cc,{onSubmit:(s,m)=>n(d.seq,s,m)},d.seq)})]})}):null}import{useEffect as _T,useState as Jt}from"react";import{Box as To,Button as La,IconButton as Wc}from"@mui/material";import{FormDialog as wT}from"@ehfuse/mui-form-dialog";import DT from"@mui/icons-material/EditOutlined";import{ErrorAlert as $c}from"@ehfuse/alerts";import{ClearTextField as Kc,DateTextField as Uc,LabelSelect as Vc}from"@ehfuse/mui-form-controls";var qa="custom-";function IT(e){return e.startsWith(qa)}function rR(e){return e>0?`${qa}${e}`:""}function Aa(e){if(!IT(e))return 0;let o=Number(e.slice(qa.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as MT,jsx as Le,jsxs as Et}from"react/jsx-runtime";var OT=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Gc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function fR({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:a,onChangeStatus:i,onRemove:l}){let u=o.filter(w=>w.useSprints&&!w.archived),[c,p]=Jt(""),[d,s]=Jt(""),[m,f]=Jt(""),[B,b]=Jt(""),[h,x]=Jt(""),[T,g]=Jt(!1),[v,C]=Jt(0);_T(()=>{e&&(p(u.length===1?u[0].key:""),s(""),f(""),b(""),x(""),C(0))},[e]);let I=()=>{s(""),f(""),b(""),x(""),C(0)},M=w=>{C(w.seq),p(`custom-${w.group_seq}`),s(w.name),f(w.goal),b(w.start_date),x(w.end_date)},J=async()=>{let w=Aa(c);if(!w){$c("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!d.trim()){$c("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(!0);try{if(v>0){a(v,{name:d.trim(),goal:m.trim(),start_date:B,end_date:h}),I();return}await r({group_seq:w,name:d.trim(),goal:m.trim(),start_date:B,end_date:h})&&I()}finally{g(!1)}},E=new Map(o.map(w=>[Aa(w.key),w.label])),X=Le(To,{children:u.length===0?Le(To,{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.'}):Et(MT,{children:[Et(To,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Le(Vc,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:u.map(w=>({value:w.key,label:w.label})),onChange:w=>p(String(w.target.value)),disabled:v>0}),Le(Kc,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:d,onChange:w=>s(w.target.value)}),Le(Uc,{size:"medium",label:"\uC2DC\uC791\uC77C",value:B,onChange:w=>b(w.target.value)}),Le(Uc,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:w=>x(w.target.value)}),Le(Kc,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:w=>f(w.target.value),sx:{gridColumn:"1 / -1"}})]}),Et(To,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[v>0?Le(La,{color:"inherit",onClick:I,disabled:T,children:"\uCDE8\uC18C"}):null,Le(La,{variant:"contained",onClick:()=>{J()},disabled:T,children:v>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Le(To,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Le(To,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(w=>Et(To,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[Et(To,{sx:{minWidth:0},children:[Et(To,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Le(To,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:w.name}),Le(To,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:E.get(w.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),Et(To,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Gc(w.start_date)," ~ ",Gc(w.end_date)]})]}),w.goal?Le(To,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:w.goal}):null]}),Et(To,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Le(Vc,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:w.status,options:OT.map(y=>({value:y.value,label:y.label})),onChange:y=>i(w.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),Le(Wc,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>M(w),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Le(DT,{sx:{fontSize:18}})}),Le(Wc,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(w.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Le(at,{style:{width:16,height:16}})})]})]},w.seq))})]})});return Le(wT,{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:X}],actions:{showCancelButton:!1,right:Le(La,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Yc}from"react";import{Box as je,Button as Na,Divider as ET,IconButton as PT,TextField as RT}from"@mui/material";import{FormDialog as zT}from"@ehfuse/mui-form-dialog";import qT from"@mui/icons-material/OpenInNewOutlined";import AT from"@mui/icons-material/EventOutlined";import{ConfirmDialog as LT}from"@ehfuse/alerts";import{jsx as Ce,jsxs as Zt}from"react/jsx-runtime";function CR({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[a,i]=Yc(""),[l,u]=Yc(!1),c=async()=>{let s=a.trim();if(s){u(!0);try{await t(s)&&i("")}finally{u(!1)}}},p=async s=>{await LT({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${s.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(s.seq)},d=Zt(je,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Zt(je,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Ce("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Ce("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Ce("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Ce(je,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Ce(je,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((s,m)=>Zt(je,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[Ce(AT,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Ce(je,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Ce(PT,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{p(s)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ce(at,{sx:{fontSize:18}})})]},s.seq))}):Ce(je,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Ce(ET,{sx:{my:1,borderColor:"#e6e6e3"}}),Ce(je,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Zt(je,{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:[Ce(je,{children:Zt(je,{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 > ",Ce("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Ce(je,{children:Zt(je,{component:"span",children:[Ce("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Ce("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ce(je,{children:Ce(je,{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."})}),Ce(je,{children:Ce(je,{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."})})]}),Zt(je,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Ce(RT,{value:a,onChange:s=>i(s.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Ce(Na,{variant:"contained",disabled:!a.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Ce(zT,{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:d}],actions:{showCancelButton:!1,left:Ce(Na,{variant:"outlined",startIcon:Ce(qT,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ce(Na,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as xt,Button as Jn,TextField as NT}from"@mui/material";import{FormDialog as FT}from"@ehfuse/mui-form-dialog";import HT from"@mui/icons-material/ContentCopyOutlined";import jc from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Xc}from"@ehfuse/alerts";import{Fragment as $T,jsx as Ne,jsxs as en}from"react/jsx-runtime";function WT(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function ER({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:a}){let i=n??WT,l=o.subscribed?i(o.token):"",u=()=>{navigator.clipboard.writeText(l).then(()=>Xc("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Xc("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let d=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(d)}`,"_blank")},p=en(xt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[en(xt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Ne("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?en(xt,{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.",Ne("br",{}),Ne("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?en($T,{children:[Ne(NT,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),en(xt,{sx:{display:"flex",gap:2},children:[Ne(Jn,{variant:"outlined",startIcon:Ne(HT,{}),onClick:u,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Ne(Jn,{variant:"contained",startIcon:Ne(jc,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),en(xt,{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:[Ne(xt,{children:en("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Ne("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ne(xt,{children:Ne("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."})}),Ne(xt,{children:Ne("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."})}),Ne(xt,{children:Ne("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."})})]})]}):Ne(Jn,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Ne(FT,{open:e,onClose:a,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:p}],actions:{showCancelButton:!1,left:Ne(Jn,{variant:"outlined",startIcon:Ne(jc,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ne(Jn,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}})}import{useEffect as KT,useMemo as Fa,useState as Ha}from"react";import{Box as Zn,Button as UT,Typography as VT}from"@mui/material";import{FormDialog as GT}from"@ehfuse/mui-form-dialog";import{SearchTextField as YT}from"@ehfuse/mui-form-controls";import{TreeView as jT}from"@ehfuse/tree-view";import{Fragment as oy,jsx as Fo,jsxs as ty}from"react/jsx-runtime";function Qc(e){return`${e.name}#${e.seq}`}function XT(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function QT(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 JT(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 ZT(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Qc(e),renderLabel:Fo(Zn,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Fo(Zn,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Jc(e,o){let t=(e.groups??[]).map(r=>Jc(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>JT(r,o)).map(ZT);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function ey({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:a}){let[i,l]=Ha(""),u=Fa(()=>e.map(p=>Jc(p,i.trim().toLowerCase())).filter(p=>p!==null),[e,i]),c=Fa(()=>o.filter(p=>t.includes(p.seq)).map(Qc),[]);return ty(oy,{children:[Fo(Zn,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Fo(YT,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Fo(Zn,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Fo(jT,{items:u,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:p=>a(p.map(XT).filter(d=>d>0)),styles:{border:"none",borderRadius:"0"}})})]})}function HR({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:a,confirmText:i="\uD655\uC778",onConfirm:l,onClose:u}){let c=He(),[p,d]=Ha([]),[s,m]=Ha(0),f=Fa(()=>QT(n),[n]),B=a??[];KT(()=>{e&&(d(B),m(h=>h+1))},[e]);let b=()=>{let h=f.filter(x=>p.includes(x.seq));l(r?h:h.slice(0,1)),u()};return Fo(GT,{open:e,onClose:u,title:`${o}${r&&p.length>0?` (${p.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:Fo(Zn,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:Fo(ey,{groups:n,allEmployees:f,initialSelectedSeqs:B,multiple:r,isMobile:c,onSelectionChange:d},s)})}],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?Fo(VT,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:Fo(UT,{variant:"contained",onClick:b,children:i})}})}import{useEffect as ay,useMemo as ly,useState as sy}from"react";import{Box as In,Button as cy,Divider as my}from"@mui/material";import{FormDialog as uy}from"@ehfuse/mui-form-dialog";import{LabelSelect as dy}from"@ehfuse/mui-form-controls";import{Box as Qo}from"@mui/material";import{jsx as Cn,jsxs as vn}from"react/jsx-runtime";function ny(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 Zc({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((p,d)=>`${p.start_date}|${p.seq}`.localeCompare(`${d.start_date}|${d.seq}`)).map(p=>({sprint:p,...ny(p,o)})),a=r.some(p=>p.points>0),i=r.map(p=>a?p.points:p.count),l=Math.max(1,...i),u=r.filter(p=>p.sprint.status==="closed").map(p=>a?p.points:p.count),c=u.length>0?Math.round(u.reduce((p,d)=>p+d,0)/u.length*10)/10:null;return r.length===0?Cn(Qo,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):vn(Qo,{children:[vn(Qo,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[vn("span",{children:["\uC644\uB8CC ",a?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?vn("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Cn(Qo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),a?"SP":"\uAC74"]}):null]}),Cn(Qo,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(p=>{let d=a?p.points:p.count,s=Math.round((t-24)*d/l),m=p.sprint.status==="closed";return vn(Qo,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[Cn(Qo,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:d}),Cn(Qo,{sx:{width:"60%",maxWidth:56,height:Math.max(2,s),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},p.sprint.seq)})}),Cn(Qo,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(p=>vn(Qo,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[p.sprint.name,p.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},p.sprint.seq))})]})}import{useMemo as ry}from"react";import{Box as on}from"@mui/material";import{jsx as Jo,jsxs as tn}from"react/jsx-runtime";function em(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function iy(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Wa(e){return e.slice(5).replace("-",".")}function om({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=ry(()=>{let h=em(e.start_date),x=em(e.end_date);if(!h||!x||x<h||Math.round((x.getTime()-h.getTime())/864e5)+1>366)return null;let g=o.filter(w=>w.sprint_seq===e.seq&&!w.archived);if(g.length===0)return{empty:!0};let v=g.some(w=>(w.story_points??0)>0),C=w=>v?w.story_points??0:1,I=g.reduce((w,y)=>w+C(y),0),M=new Map;for(let w of g){if(!w.completed)continue;let y=(w.completed_time??"").slice(0,10),H=/^\d{4}-\d{2}-\d{2}$/.test(y)?y:e.start_date;M.set(H,(M.get(H)??0)+C(w))}let J=[];for(let w=new Date(h);w<=x;w.setDate(w.getDate()+1))J.push(iy(w));let E=I,X=[];for(let w of J){if(w>t)break;E-=M.get(w)??0,X.push({day:w,value:Math.max(0,E)})}return{empty:!1,days:J,total:I,usePoints:v,actual:X}},[e,o,t]);if(!r)return Jo(on,{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 Jo(on,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:a,total:i,usePoints:l,actual:u}=r,c=600,p=200,d=8,s=h=>a.length===1?0:h/(a.length-1)*c,m=h=>d+(p-d*2)*(1-h/Math.max(1,i)),f=`${s(0)},${m(i)} ${s(a.length-1)},${m(0)}`,B=u.map(h=>`${s(a.indexOf(h.day))},${m(h.value)}`).join(" "),b=u[u.length-1];return tn(on,{children:[tn(on,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[tn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",i]}),b?tn("span",{children:["\uD604\uC7AC"," ",Jo(on,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:b.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),Jo(on,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:tn("svg",{viewBox:`0 0 ${c} ${p}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[Jo("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),Jo("polyline",{points:f,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),u.length>1?Jo("polyline",{points:B,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,b?Jo("circle",{cx:s(a.indexOf(b.day)),cy:m(b.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),tn(on,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[Jo("span",{children:Wa(e.start_date)}),t>e.start_date&&t<e.end_date?tn("span",{children:["\uC624\uB298 ",Wa(t)]}):null,Jo("span",{children:Wa(e.end_date)})]})]})}import{jsx as gt,jsxs as $a}from"react/jsx-runtime";function r2({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:a}){let[i,l]=sy(0);ay(()=>{if(!e)return;let p=o.find(s=>s.status==="active")??o[0],d=o.find(s=>s.seq===r)??p;l(d?.seq??0)},[e]);let u=ly(()=>o.find(p=>p.seq===i)??null,[o,i]),c=$a(In,{sx:{display:"flex",flexDirection:"column"},children:[$a(In,{sx:{px:3,py:2.5},children:[gt(In,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),gt(Zc,{sprints:o,tasks:t})]}),gt(my,{sx:{borderColor:"#e6e6e3"}}),$a(In,{sx:{px:3,py:2.5},children:[gt(In,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),gt(dy,{label:"\uBAA9\uD45C",showLabel:!1,value:i?String(i):"",options:o.map(p=>({value:String(p.seq),label:vo(p)})),onChange:p=>l(Number(p.target.value)||0),sx:{width:280,mb:2}}),u?gt(om,{sprint:u,tasks:t,todayStr:n}):gt(In,{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 gt(uy,{open:e,onClose:a,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:c}],actions:{showCancelButton:!1,right:gt(cy,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}})}import{Checkbox as py,Divider as fy,Menu as xy,MenuItem as Ka}from"@mui/material";import{jsx as er,jsxs as tm}from"react/jsx-runtime";function c2({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:a,onClose:i}){return tm(xy,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,children:[o.length===0?er(Ka,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let u=t.includes(l.name);return tm(Ka,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[er(py,{size:"small",checked:u,sx:{p:0}}),er(xo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),er(fy,{}),er(Ka,{disabled:t.length===0,onClick:a,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as gy}from"react";import{ButtonBase as by,Menu as hy,MenuItem as ky}from"@mui/material";import Ty from"@mui/icons-material/KeyboardArrowDown";import yy from"@mui/icons-material/Check";import{Fragment as Sy,jsx as Ua,jsxs as Va}from"react/jsx-runtime";function b2({value:e,onChange:o,options:t}){let[n,r]=gy(null),a=t??Ei,i=Ei.find(l=>l.value===e)?.label??"";return Va(Sy,{children:[Va(by,{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:[i,Ua(Ty,{sx:{fontSize:17,color:"#9a9a97"}})]}),Ua(hy,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:a.map(l=>Va(ky,{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?Ua(yy,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as mi,ButtonBase as By}from"@mui/material";import{DateTextField as nm}from"@ehfuse/mui-form-controls";function nn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function ci(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function T2(e=new Date){return{fromDate:nn(ci(1,e)),toDate:nn(e)}}import{jsx as or,jsxs as rm}from"react/jsx-runtime";var Cy=[{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 im({fromDate:e,toDate:o,onChange:t}){let n=a=>{if(a<=0){t("","");return}t(nn(ci(a)),nn(new Date))},r=a=>a<=0?!e&&!o:!e||!o?!1:e===nn(ci(a))&&o===nn(new Date);return rm(mi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[or(mi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:Cy.map(a=>{let i=r(a.months);return or(By,{onClick:()=>n(a.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:i?500:400,border:"1px solid",borderColor:i?"#2f80ed":"#dedddb",color:i?"#2f80ed":"#37352f",bgcolor:i?"#eef6ff":"transparent","&:hover":{bgcolor:i?"#eef6ff":"#f7f7f5"}},children:a.label},a.label)})}),rm(mi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[or(nm,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:a=>t(a.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),or(mi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),or(nm,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:a=>t(e,a.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as vy}from"@mui/material";import{jsx as am}from"react/jsx-runtime";function D2({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return am(vy,{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:am(im,{fromDate:o,toDate:t,onChange:n})})}import{Box as Iy,ButtonBase as _y,Tab as wy,Tabs as Dy}from"@mui/material";import Oy from"@mui/icons-material/Checklist";import My from"@mui/icons-material/Face";import Ey from"@mui/icons-material/Publish";import Py from"@mui/icons-material/NotificationsOutlined";import Ry from"@mui/icons-material/BugReportOutlined";import zy from"@mui/icons-material/DescriptionOutlined";import qy from"@mui/icons-material/Inventory2Outlined";import{jsx as Ho}from"react/jsx-runtime";function lm(e,o){return o>0?`${e} (${o})`:e}var W2=[{id:"my",label:"\uC804\uCCB4",icon:Ho(Oy,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Ho(Py,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Ho(My,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Ho(Ey,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Ho(Ry,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Ho(qy,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Ho(zy,{sx:{fontSize:18}}),hideCount:!0}];function Ay(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 $2({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let a=le(),i=Ay(a.tabs),l=e;return r?Ho(Iy,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(u=>{let c=o===u.id;return Ho(_y,{onClick:()=>n(u.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:po(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?a.tabs.selectedBg:a.tabs.bg,color:c?a.tabs.selectedColor:a.tabs.color,borderColor:c?a.tabs.selectedBg:a.tabs.borderColor},children:lm(u.label,u.hideCount?0:t[u.id]??0)},u.id)})}):Ho(Dy,{value:o,onChange:(u,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(u=>Ho(wy,{value:u.id,label:lm(u.label,u.hideCount?0:t[u.id]??0),icon:u.icon,iconPosition:"start",sx:i},u.id))})}import{useEffect as Ly,useMemo as Ny,useState as Ga}from"react";import{Divider as Ya,ListItemIcon as Do,Menu as ja,MenuItem as co}from"@mui/material";import Fy from"@mui/icons-material/OpenInNewOutlined";import Hy from"@mui/icons-material/Check";import Wy from"@mui/icons-material/CheckCircleOutlined";import $y from"@mui/icons-material/RadioButtonUnchecked";import Ky from"@mui/icons-material/SendOutlined";import Uy from"@mui/icons-material/EventOutlined";import Vy from"@mui/icons-material/PersonOutlineOutlined";import Gy from"@mui/icons-material/ViewKanbanOutlined";import Yy from"@mui/icons-material/ContentCopyOutlined";import jy from"@mui/icons-material/NextPlanOutlined";import Xy from"@mui/icons-material/ContentPasteOutlined";import Qy from"@mui/icons-material/ShareOutlined";import Jy from"@mui/icons-material/DirectionsRunOutlined";import sm from"@mui/icons-material/ChevronRight";import Zy from"@mui/icons-material/ArchiveOutlined";import eS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as oS}from"@ehfuse/alerts";import{Fragment as tS,jsx as me,jsxs as to}from"react/jsx-runtime";function kz({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:a,onToggleCompleted:i,onRequestConfirm:l,onChangeDueDate:u,onChangeReminder:c,onMemberEdit:p,onMoveProject:d,onDuplicate:s,onCreateFollowUp:m,onShare:f,onAssignSprint:B,onArchiveToggle:b,onDelete:h}){let x=He(),T=Uo(),[g,v]=Ga(null),[C,I]=Ga(null),[M,J]=Ga(null);Ly(()=>{e||(v(null),I(null),J(null))},[e]);let E=e?.task??null,X=!!E?.is_notice,w=!!E?.is_event,y=E?!ot(E,r):!1,H=Ny(()=>new Set(t.filter(P=>P.useSprints).map(P=>P.key)),[t]),N=async()=>{let P=E;if(o(),!P)return;await oS({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${P.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(P.seq)},$=()=>{E&&b(E.seq,!E.archived),o()};return to(tS,{children:[to(ja,{open:!!e,onClose:o,transitionDuration:0,anchorReference:x?"none":"anchorPosition",anchorPosition:!x&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...x?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:x?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[to(co,{onClick:()=>{E&&a(E),o()},sx:{fontSize:14},children:[me(Do,{children:me(Fy,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),to(co,{disabled:X?(E?.author_account_seq??0)!==r:(E?.author_account_seq??0)!==r&&(E?.manager_account_seq??0)!==r,onClick:()=>{E&&i(E.seq,!E.completed),o()},sx:{fontSize:14},children:[me(Do,{children:E?.completed?me($y,{sx:{fontSize:19}}):me(Wy,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!X&&l?to(co,{disabled:!(E?.manager_account_seq??0)&&(E?.receiver_account_seqs??[]).length===0,onClick:()=>{E&&l(E),o()},sx:{fontSize:14},children:[me(Do,{children:me(Ky,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,w?null:me(Ya,{}),w?null:to(co,{disabled:y,onClick:P=>{E&&v({anchorEl:P.currentTarget,task:E})},sx:{fontSize:14},children:[me(Do,{children:me(Uy,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!X&&!w&&p?to(co,{onClick:()=>{E&&p(E,"manager"),o()},sx:{fontSize:14},children:[me(Do,{children:me(Vy,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,w?null:to(co,{disabled:y,onClick:P=>{E&&I({anchorEl:P.currentTarget,task:E})},sx:{fontSize:14},children:[me(Do,{children:me(Gy,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",me(sm,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),me(Ya,{}),s?to(co,{disabled:y,onClick:()=>{E&&s(E.seq),o()},sx:{fontSize:14},children:[me(Do,{children:me(Yy,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?to(co,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[me(Do,{children:me(jy,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,to(co,{onClick:()=>{E&&(f?f(E):li(E,x)),o()},sx:{fontSize:14},children:[me(Do,{children:x?me(Qy,{sx:{fontSize:19}}):me(Xy,{sx:{fontSize:19}})}),x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),E&&!E.is_notice&&!E.is_event&&H.has(String(E.tab_key??""))&&B?to(co,{onClick:P=>J(P.currentTarget),sx:{fontSize:14},children:[me(Do,{children:me(Jy,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",me(sm,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,to(co,{onClick:$,disabled:y||!E?.archived&&!(E&&dr(E)),sx:{fontSize:14},children:[me(Do,{children:E?.archived?me(eS,{sx:{fontSize:19}}):me(Zy,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),me(Ya,{}),to(co,{disabled:y,onClick:N,sx:{fontSize:14,color:"#e5484d"},children:[me(Do,{children:me(at,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),me(St,{anchorEl:g?.anchorEl??null,open:!!g,date:g?.task.due_date??"",reminder:g?.task.reminder??"none",hideReminder:!!g?.task.completed,centered:x,onClose:()=>{v(null),o()},onDateChange:P=>{g&&u(g.task.seq,P)},onReminderChange:P=>{g&&c?.(g.task.seq,P)}}),to(ja,{transitionDuration:0,anchorEl:C?.anchorEl??null,open:!!C,onClose:()=>{I(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...T,children:[me(co,{selected:!C?.task.tab_key,onClick:()=>{C&&d(C.task.seq,""),I(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(P=>!P.archived).map(P=>me(co,{selected:C?.task.tab_key===P.key,onClick:()=>{C&&d(C.task.seq,P.key),I(null),o()},sx:{fontSize:14,minWidth:170},children:P.label},P.key))]}),me(ja,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>J(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(P=>`custom-${P.group_seq}`===String(E?.tab_key??"")).map(P=>({seq:P.seq,label:vo(P)}))].map(P=>to(co,{onClick:()=>{E&&B?.(E.seq,P.seq),J(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[P.label,(E?.sprint_seq??0)===P.seq?me(Hy,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},P.seq))})]})}import{Checkbox as nS,Divider as rS,Menu as iS,MenuItem as cm}from"@mui/material";import{jsx as ui,jsxs as mm}from"react/jsx-runtime";function Cz({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:a}){return mm(iS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:a,children:[o.map(i=>{let l=t.includes(i.key);return mm(cm,{onClick:()=>n(i.key),sx:{fontSize:14,minWidth:190,gap:1},children:[ui(nS,{size:"small",checked:l,sx:{p:0}}),ui(we,{option:i})]},i.key)}),ui(rS,{}),ui(cm,{disabled:t.length===0,onClick:()=>{r(),a()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as um,Menu as aS,MenuItem as Xa}from"@mui/material";import lS from"@mui/icons-material/Check";import sS from"@mui/icons-material/BarChartOutlined";import cS from"@mui/icons-material/SettingsOutlined";import{jsx as tr,jsxs as di}from"react/jsx-runtime";function Ez(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:a,onCharts:i,onClose:l}=e;return di(aS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(u=>({seq:u.seq,label:vo(u)}))].map(u=>di(Xa,{onClick:()=>{r(u.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[u.label,n===u.seq?tr(lS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},u.seq)),tr(um,{}),i?di(Xa,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[tr(sS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,i?tr(um,{}):null,di(Xa,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[tr(cS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var mS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function uS(e){return mS[e]??"tasks"}var zz={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"},dm=["list","calendar","month","card","kanban","sprint","timeline"],dS=["list","card"];function qz(e){let o=uS(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:dm,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:dS,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:dm,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{JC as ALL_TASK_VIEWER_ACCOUNT_SEQS,ac as AddLabelDialog,_r as AddTabDialog,tc as AttachmentUploadGauge,ya as AttachmentUploadPercent,Ci as BUG_DEVICE_OPTIONS,Rn as BUG_ICON_COLOR,zC as BUG_KANBAN_COLUMNS,Bi as BUG_REPRO_OPTIONS,vi as BUG_RESOLUTION_OPTIONS,qt as BUG_STATUS_OPTIONS,Pn as BUG_TASK_ICON,Xr as BugPropertiesGrid,qp as COLUMN_WIDTHS,_i as COMPLETED_STATUS_OPTION,qa as CUSTOM_TAB_KEY_PREFIX,CR as CalendarImportDialog,ER as CalendarSubscribeDialog,Cr as CommentBubbleIcon,un as ConfirmCountButton,Ll as DATE_REMINDER_OPTIONS,gi as DEFAULT_PROJECT_ICON,W2 as DEFAULT_TASKBOX_TAB_ITEMS,_e as DEFAULT_TASK_ICON,D2 as DateRangeFilterPopover,_o as DrawerSection,St as DueDatePickerPopover,xp as ENDED_EVENT_STATUS_OPTION,pc as EVENT_ICON_COLOR,HR as EmployeeSelectDialog,Ei as GROUP_BY_OPTIONS,xn as GoogleEventChip,b2 as GroupByMenuButton,Ir as IconPickerGrid,Ks as InlineAddressInput,pt as InlineTextValue,wi as KANBAN_CLOSED_COLUMN_KEY,Cz as LabelFilterMenu,ni as LabelSelectMenu,qn as MANUAL_TASK_STATUS_OPTIONS,c2 as MemberFilterMenu,zn as NOTICE_STATUS_OPTIONS,Mo as NOTICE_TASK_ICON,ul as NO_TASK_ICON,bi as PROJECT_ICON_OPTIONS,xe as PropertyRow,cn as RECEIVER_AVATAR_COLORS,Nl as REMINDER_OPTIONS,xo as ReceiverAvatarStack,Ac as RelatedTasksSection,sr as STATUS_KEY_REPLIED,Mn as STATUS_KEY_WAITING,Mr as SortableTaskCard,om as SprintBurndownChart,r2 as SprintChartsDialog,Ez as SprintFilterMenu,fR as SprintManageDialog,Zc as SprintVelocityChart,gr as StatusSelectMenu,zi as TASKBOX_COLUMNS,jo as TASKBOX_DRAWER_NARROW_MQ,dl as TASKBOX_UI_STATE_ID,zz as TASKBOX_VIEW_LABELS,Ww as TASKBOX_VIEW_MODES,zt as TASK_STATUS_OPTIONS,wf as TIME_REMINDER_OPTIONS,Or as TaskAckListPopover,mn as TaskActionButton,oi as TaskAttachmentsSection,Es as TaskBoxColumnSummary,ea as TaskBoxGroupBoard,wD as TaskBoxMobileList,ys as TaskBoxMonthAgenda,bs as TaskBoxMonthCalendar,oD as TaskBoxSprintColumnSummary,$l as TaskBoxTable,$2 as TaskBoxTabs,_s as TaskBoxTimeline,Hw as TaskBoxView,cs as TaskBoxWeekCalendar,Wt as TaskCardContent,Jr as TaskChecklistSection,Cc as TaskCommentInput,Bc as TaskCommentsSection,Qr as TaskContentEditor,kz as TaskContextMenu,jr as TaskCorePropertiesGrid,fc as TaskCreateBody,qE as TaskCreateDrawer,im as TaskDateRangeFilter,Fc as TaskDetailBody,oR as TaskDetailDrawer,Dc as TaskDetailHeader,Ur as TaskIconPickerPopover,Tt as TaskLabelChips,Rc as TaskLinkDialog,Oc as TaskNoteField,Eo as TaskPriorityChip,we as TaskStatusChip,WC as TaskStatusChips,Tm as TaskboxProvider,WT as buildCalendarFeedUrl,pn as buildCardBaseSx,kl as buildStatusOptionColors,Pi as buildTaskGroupSections,Ec as buildTaskRelationsModel,Pk as buildTaskShareText,mr as buildTaskboxTheme,Tl as canAssignBugManager,hr as canClaimTaskItem,ot as canEditTaskItem,br as canViewTaskItem,kr as canVolunteerTaskItem,Ds as countWorkdays,mp as createTaskboxTheme,Ms as daysLeftUntil,hi as defaultTaskBoxFormValues,ki as defaultTaskboxUiStateValues,uc as filterFilesWithinLimit,T1 as formatConfirmTime,ws as formatHours,Vo as formatKoreanDate,tt as formatKoreanDateTime,vo as formatSprintOptionLabel,gl as getBugDeviceName,xl as getBugReproName,ur as getBugResolutionName,gp as getBugStatusOption,T2 as getDefaultDateRange,An as getEventDisplayStatusOption,qC as getNoDueStatusRank,mc as getNoticeAckInfo,bl as getNoticeStatusOption,YM as getNoticeTargetDisplay,cr as getProjectIconAnchorComponent,Oe as getProjectIconComponent,Ki as getReminderLabel,$i as getReminderOptions,hl as getStatusOptionsForTask,qz as getTabHeaderConfig,Ai as getTaskBoxColumnDefs,Tr as getTaskBoxGridTemplate,uS as getTaskBoxTabKind,Ul as getTaskConfirmInfo,fo as getTaskDisplayStatusOption,pr as getTaskStatusOption,fn as groupGoogleEventsByDate,Aa as groupSeqFromTabKey,OP as hasRelation,Bh as htmlToPlainText,IT as isCustomTabKey,Mi as isOpenPoolTaskItem,Ii as isPastEvent,dr as isTaskDone,Di as isWaitingTask,ci as monthsAgoDate,so as narrowOrderSx,eR as nowDateTimeString,ab as parseEstimatedHours,Xt as relationsOf,kt as resolveTaskStatusOptions,Si as resolveTaskboxTheme,li as shareTaskText,Os as sumRemainingHours,ri as summarizeNoticeTargets,rR as tabKeyFromGroupSeq,nn as toYmd,fr as toggleLabelKey,xi as useBuildFileUrl,oc as useTaskAttachmentUploadMeta,yo as useTaskboxConfig,ip as useTaskboxForm,le as useTaskboxTheme,et as useTaskboxUiState,En as useUploadMaxMb};
|
|
14
14
|
//# sourceMappingURL=index.esm.js.map
|