@ehfuse/taskbox 0.5.349 → 0.5.350
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 +3 -3
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/dist/types/item.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -26,7 +26,7 @@ use chrome, FireFox or Internet Explorer 11`)}var r=e("safe-buffer"),t=e("random
|
|
|
26
26
|
`)):z=p.stylize("[Circular]","special")),B(O)){if(C&&_.match(/^\d+$/))return z;(O=JSON.stringify(""+_)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(O=O.substr(1,O.length-2),O=p.stylize(O,"name")):(O=O.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),O=p.stylize(O,"string"))}return O+": "+z}function u(p){return Array.isArray(p)}function g(p){return typeof p=="boolean"}function m(p){return p===null}function x(p){return typeof p=="number"}function k(p){return typeof p=="string"}function B(p){return p===void 0}function R(p){return L(p)&&q(p)==="[object RegExp]"}function L(p){return typeof p=="object"&&p!==null}function A(p){return L(p)&&q(p)==="[object Date]"}function D(p){return L(p)&&(q(p)==="[object Error]"||p instanceof Error)}function N(p){return typeof p=="function"}function q(p){return Object.prototype.toString.call(p)}function j(p){return p<10?"0"+p.toString(10):p.toString(10)}b.debuglog=function(p){if(B(r)&&(r=l.env.NODE_DEBUG||""),p=p.toUpperCase(),!t[p])if(new RegExp("\\b"+p+"\\b","i").test(r)){var y=l.pid;t[p]=function(){var v=b.format.apply(b,arguments);console.error("%s %d: %s",p,y,v)}}else t[p]=function(){};return t[p]},b.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},b.isArray=u,b.isBoolean=g,b.isNull=m,b.isNullOrUndefined=function(p){return p==null},b.isNumber=x,b.isString=k,b.isSymbol=function(p){return typeof p=="symbol"},b.isUndefined=B,b.isRegExp=R,b.isObject=L,b.isDate=A,b.isError=D,b.isFunction=N,b.isPrimitive=function(p){return p===null||typeof p=="boolean"||typeof p=="number"||typeof p=="string"||typeof p=="symbol"||p===void 0},b.isBuffer=e("./support/isBuffer");var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var p=new Date,y=[j(p.getHours()),j(p.getMinutes()),j(p.getSeconds())].join(":");return[p.getDate(),S[p.getMonth()],y].join(" ")}function P(p,y){return Object.prototype.hasOwnProperty.call(p,y)}b.log=function(){console.log("%s - %s",T(),b.format.apply(b,arguments))},b.inherits=e("inherits"),b._extend=function(p,y){if(!y||!L(y))return p;for(var v=Object.keys(y),w=v.length;w--;)p[v[w]]=y[v[w]];return p}}).call(this)}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"v1",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(b,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(b,"v4",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(b,"v5",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(b,"NIL",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(b,"version",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(b,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(b,"stringify",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(b,"parse",{enumerable:!0,get:function(){return a.default}});var l=h(e("./v1.js")),o=h(e("./v3.js")),s=h(e("./v4.js")),r=h(e("./v5.js")),t=h(e("./nil.js")),n=h(e("./version.js")),c=h(e("./validate.js")),i=h(e("./stringify.js")),a=h(e("./parse.js"));function h(f){return f&&f.__esModule?f:{default:f}}},{"./nil.js":530,"./parse.js":531,"./stringify.js":535,"./v1.js":536,"./v3.js":537,"./v4.js":539,"./v5.js":540,"./validate.js":541,"./version.js":542}],529:[function(e,d,b){"use strict";function l(a){return 14+(a+64>>>9<<4)+1}function o(a,h){let f=(65535&a)+(65535&h);return(a>>16)+(h>>16)+(f>>16)<<16|65535&f}function s(a,h,f,u,g,m){return o((x=o(o(h,a),o(u,m)))<<(k=g)|x>>>32-k,f);var x,k}function r(a,h,f,u,g,m,x){return s(h&f|~h&u,a,h,g,m,x)}function t(a,h,f,u,g,m,x){return s(h&u|f&~u,a,h,g,m,x)}function n(a,h,f,u,g,m,x){return s(h^f^u,a,h,g,m,x)}function c(a,h,f,u,g,m,x){return s(f^(h|~u),a,h,g,m,x)}Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var i=function(a){if(typeof a=="string"){let h=unescape(encodeURIComponent(a));a=new Uint8Array(h.length);for(let f=0;f<h.length;++f)a[f]=h.charCodeAt(f)}return(function(h){let f=[],u=32*h.length;for(let g=0;g<u;g+=8){let m=h[g>>5]>>>g%32&255,x=parseInt("0123456789abcdef".charAt(m>>>4&15)+"0123456789abcdef".charAt(15&m),16);f.push(x)}return f})((function(h,f){h[f>>5]|=128<<f%32,h[l(f)-1]=f;let u=1732584193,g=-271733879,m=-1732584194,x=271733878;for(let k=0;k<h.length;k+=16){let B=u,R=g,L=m,A=x;u=r(u,g,m,x,h[k],7,-680876936),x=r(x,u,g,m,h[k+1],12,-389564586),m=r(m,x,u,g,h[k+2],17,606105819),g=r(g,m,x,u,h[k+3],22,-1044525330),u=r(u,g,m,x,h[k+4],7,-176418897),x=r(x,u,g,m,h[k+5],12,1200080426),m=r(m,x,u,g,h[k+6],17,-1473231341),g=r(g,m,x,u,h[k+7],22,-45705983),u=r(u,g,m,x,h[k+8],7,1770035416),x=r(x,u,g,m,h[k+9],12,-1958414417),m=r(m,x,u,g,h[k+10],17,-42063),g=r(g,m,x,u,h[k+11],22,-1990404162),u=r(u,g,m,x,h[k+12],7,1804603682),x=r(x,u,g,m,h[k+13],12,-40341101),m=r(m,x,u,g,h[k+14],17,-1502002290),g=r(g,m,x,u,h[k+15],22,1236535329),u=t(u,g,m,x,h[k+1],5,-165796510),x=t(x,u,g,m,h[k+6],9,-1069501632),m=t(m,x,u,g,h[k+11],14,643717713),g=t(g,m,x,u,h[k],20,-373897302),u=t(u,g,m,x,h[k+5],5,-701558691),x=t(x,u,g,m,h[k+10],9,38016083),m=t(m,x,u,g,h[k+15],14,-660478335),g=t(g,m,x,u,h[k+4],20,-405537848),u=t(u,g,m,x,h[k+9],5,568446438),x=t(x,u,g,m,h[k+14],9,-1019803690),m=t(m,x,u,g,h[k+3],14,-187363961),g=t(g,m,x,u,h[k+8],20,1163531501),u=t(u,g,m,x,h[k+13],5,-1444681467),x=t(x,u,g,m,h[k+2],9,-51403784),m=t(m,x,u,g,h[k+7],14,1735328473),g=t(g,m,x,u,h[k+12],20,-1926607734),u=n(u,g,m,x,h[k+5],4,-378558),x=n(x,u,g,m,h[k+8],11,-2022574463),m=n(m,x,u,g,h[k+11],16,1839030562),g=n(g,m,x,u,h[k+14],23,-35309556),u=n(u,g,m,x,h[k+1],4,-1530992060),x=n(x,u,g,m,h[k+4],11,1272893353),m=n(m,x,u,g,h[k+7],16,-155497632),g=n(g,m,x,u,h[k+10],23,-1094730640),u=n(u,g,m,x,h[k+13],4,681279174),x=n(x,u,g,m,h[k],11,-358537222),m=n(m,x,u,g,h[k+3],16,-722521979),g=n(g,m,x,u,h[k+6],23,76029189),u=n(u,g,m,x,h[k+9],4,-640364487),x=n(x,u,g,m,h[k+12],11,-421815835),m=n(m,x,u,g,h[k+15],16,530742520),g=n(g,m,x,u,h[k+2],23,-995338651),u=c(u,g,m,x,h[k],6,-198630844),x=c(x,u,g,m,h[k+7],10,1126891415),m=c(m,x,u,g,h[k+14],15,-1416354905),g=c(g,m,x,u,h[k+5],21,-57434055),u=c(u,g,m,x,h[k+12],6,1700485571),x=c(x,u,g,m,h[k+3],10,-1894986606),m=c(m,x,u,g,h[k+10],15,-1051523),g=c(g,m,x,u,h[k+1],21,-2054922799),u=c(u,g,m,x,h[k+8],6,1873313359),x=c(x,u,g,m,h[k+15],10,-30611744),m=c(m,x,u,g,h[k+6],15,-1560198380),g=c(g,m,x,u,h[k+13],21,1309151649),u=c(u,g,m,x,h[k+4],6,-145523070),x=c(x,u,g,m,h[k+11],10,-1120210379),m=c(m,x,u,g,h[k+2],15,718787259),g=c(g,m,x,u,h[k+9],21,-343485551),u=o(u,B),g=o(g,R),m=o(m,L),x=o(x,A)}return[u,g,m,x]})((function(h){if(h.length===0)return[];let f=8*h.length,u=new Uint32Array(l(f));for(let g=0;g<f;g+=8)u[g>>5]|=(255&h[g/8])<<g%32;return u})(a),8*a.length))};b.default=i},{}],530:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0,b.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l,o=(l=e("./validate.js"))&&l.__esModule?l:{default:l},s=function(r){if(!(0,o.default)(r))throw TypeError("Invalid UUID");let t,n=new Uint8Array(16);return n[0]=(t=parseInt(r.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(r.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(r.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(r.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};b.default=s},{"./validate.js":541}],532:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0,b.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],533:[function(e,d,b){"use strict";let l;Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(){if(!l&&(l=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!l))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(o)};let o=new Uint8Array(16)},{}],534:[function(e,d,b){"use strict";function l(r,t,n,c){switch(r){case 0:return t&n^~t&c;case 1:return t^n^c;case 2:return t&n^t&c^n&c;case 3:return t^n^c}}function o(r,t){return r<<t|r>>>32-t}Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var s=function(r){let t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof r=="string"){let h=unescape(encodeURIComponent(r));r=[];for(let f=0;f<h.length;++f)r.push(h.charCodeAt(f))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);let c=r.length/4+2,i=Math.ceil(c/16),a=new Array(i);for(let h=0;h<i;++h){let f=new Uint32Array(16);for(let u=0;u<16;++u)f[u]=r[64*h+4*u]<<24|r[64*h+4*u+1]<<16|r[64*h+4*u+2]<<8|r[64*h+4*u+3];a[h]=f}a[i-1][14]=8*(r.length-1)/Math.pow(2,32),a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=8*(r.length-1)&4294967295;for(let h=0;h<i;++h){let f=new Uint32Array(80);for(let B=0;B<16;++B)f[B]=a[h][B];for(let B=16;B<80;++B)f[B]=o(f[B-3]^f[B-8]^f[B-14]^f[B-16],1);let u=n[0],g=n[1],m=n[2],x=n[3],k=n[4];for(let B=0;B<80;++B){let R=Math.floor(B/20),L=o(u,5)+l(R,g,m,x)+k+t[R]+f[B]>>>0;k=x,x=m,m=o(g,30)>>>0,g=u,u=L}n[0]=n[0]+u>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+x>>>0,n[4]=n[4]+k>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};b.default=s},{}],535:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l,o=(l=e("./validate.js"))&&l.__esModule?l:{default:l};let s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).substr(1));var r=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,c=(s[t[n+0]]+s[t[n+1]]+s[t[n+2]]+s[t[n+3]]+"-"+s[t[n+4]]+s[t[n+5]]+"-"+s[t[n+6]]+s[t[n+7]]+"-"+s[t[n+8]]+s[t[n+9]]+"-"+s[t[n+10]]+s[t[n+11]]+s[t[n+12]]+s[t[n+13]]+s[t[n+14]]+s[t[n+15]]).toLowerCase();if(!(0,o.default)(c))throw TypeError("Stringified UUID is invalid");return c};b.default=r},{"./validate.js":541}],536:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l=s(e("./rng.js")),o=s(e("./stringify.js"));function s(a){return a&&a.__esModule?a:{default:a}}let r,t,n=0,c=0;var i=function(a,h,f){let u=h&&f||0,g=h||new Array(16),m=(a=a||{}).node||r,x=a.clockseq!==void 0?a.clockseq:t;if(m==null||x==null){let D=a.random||(a.rng||l.default)();m==null&&(m=r=[1|D[0],D[1],D[2],D[3],D[4],D[5]]),x==null&&(x=t=16383&(D[6]<<8|D[7]))}let k=a.msecs!==void 0?a.msecs:Date.now(),B=a.nsecs!==void 0?a.nsecs:c+1,R=k-n+(B-c)/1e4;if(R<0&&a.clockseq===void 0&&(x=x+1&16383),(R<0||k>n)&&a.nsecs===void 0&&(B=0),B>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");n=k,c=B,t=x,k+=122192928e5;let L=(1e4*(268435455&k)+B)%4294967296;g[u++]=L>>>24&255,g[u++]=L>>>16&255,g[u++]=L>>>8&255,g[u++]=255&L;let A=k/4294967296*1e4&268435455;g[u++]=A>>>8&255,g[u++]=255&A,g[u++]=A>>>24&15|16,g[u++]=A>>>16&255,g[u++]=x>>>8|128,g[u++]=255&x;for(let D=0;D<6;++D)g[u+D]=m[D];return h||(0,o.default)(g)};b.default=i},{"./rng.js":533,"./stringify.js":535}],537:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l=s(e("./v35.js")),o=s(e("./md5.js"));function s(t){return t&&t.__esModule?t:{default:t}}var r=(0,l.default)("v3",48,o.default);b.default=r},{"./md5.js":529,"./v35.js":538}],538:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(n,c,i){function a(h,f,u,g){if(typeof h=="string"&&(h=(function(x){x=unescape(encodeURIComponent(x));let k=[];for(let B=0;B<x.length;++B)k.push(x.charCodeAt(B));return k})(h)),typeof f=="string"&&(f=(0,o.default)(f)),f.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let m=new Uint8Array(16+h.length);if(m.set(f),m.set(h,f.length),m=i(m),m[6]=15&m[6]|c,m[8]=63&m[8]|128,u){g=g||0;for(let x=0;x<16;++x)u[g+x]=m[x];return u}return(0,l.default)(m)}try{a.name=n}catch{}return a.DNS=r,a.URL=t,a},b.URL=b.DNS=void 0;var l=s(e("./stringify.js")),o=s(e("./parse.js"));function s(n){return n&&n.__esModule?n:{default:n}}let r="6ba7b810-9dad-11d1-80b4-00c04fd430c8";b.DNS=r;let t="6ba7b811-9dad-11d1-80b4-00c04fd430c8";b.URL=t},{"./parse.js":531,"./stringify.js":535}],539:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l=s(e("./rng.js")),o=s(e("./stringify.js"));function s(t){return t&&t.__esModule?t:{default:t}}var r=function(t,n,c){let i=(t=t||{}).random||(t.rng||l.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){c=c||0;for(let a=0;a<16;++a)n[c+a]=i[a];return n}return(0,o.default)(i)};b.default=r},{"./rng.js":533,"./stringify.js":535}],540:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l=s(e("./v35.js")),o=s(e("./sha1.js"));function s(t){return t&&t.__esModule?t:{default:t}}var r=(0,l.default)("v5",80,o.default);b.default=r},{"./sha1.js":534,"./v35.js":538}],541:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l,o=(l=e("./regex.js"))&&l.__esModule?l:{default:l},s=function(r){return typeof r=="string"&&o.default.test(r)};b.default=s},{"./regex.js":532}],542:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l,o=(l=e("./validate.js"))&&l.__esModule?l:{default:l},s=function(r){if(!(0,o.default)(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)};b.default=s},{"./validate.js":541}],543:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CHAR=`
|
|
27
27
|
\r -\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}`,b.S=` \r
|
|
28
28
|
`,b.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NAME_CHAR="-"+b.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.CHAR_RE=new RegExp("^["+b.CHAR+"]$","u"),b.S_RE=new RegExp("^["+b.S+"]+$","u"),b.NAME_START_CHAR_RE=new RegExp("^["+b.NAME_START_CHAR+"]$","u"),b.NAME_CHAR_RE=new RegExp("^["+b.NAME_CHAR+"]$","u"),b.NAME_RE=new RegExp("^["+b.NAME_START_CHAR+"]["+b.NAME_CHAR+"]*$","u"),b.NMTOKEN_RE=new RegExp("^["+b.NAME_CHAR+"]+$","u");function l(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}b.S_LIST=[32,10,13,9],b.isChar=function(o){return o>=32&&o<=55295||o===10||o===13||o===9||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isS=function(o){return o===32||o===10||o===13||o===9},b.isNameStartChar=l,b.isNameChar=function(o){return l(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],544:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CHAR="-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}",b.RESTRICTED_CHAR="-\b\v\f-\x7F-\x84\x86-\x9F",b.S=` \r
|
|
29
|
-
`,b.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NAME_CHAR="-"+b.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.CHAR_RE=new RegExp("^["+b.CHAR+"]$","u"),b.RESTRICTED_CHAR_RE=new RegExp("^["+b.RESTRICTED_CHAR+"]$","u"),b.S_RE=new RegExp("^["+b.S+"]+$","u"),b.NAME_START_CHAR_RE=new RegExp("^["+b.NAME_START_CHAR+"]$","u"),b.NAME_CHAR_RE=new RegExp("^["+b.NAME_CHAR+"]$","u"),b.NAME_RE=new RegExp("^["+b.NAME_START_CHAR+"]["+b.NAME_CHAR+"]*$","u"),b.NMTOKEN_RE=new RegExp("^["+b.NAME_CHAR+"]+$","u");function l(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}b.S_LIST=[32,10,13,9],b.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},b.isCharAndNotRestricted=function(o){return o===9||o===10||o===13||o>31&&o<127||o===133||o>159&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isS=function(o){return o===32||o===10||o===13||o===9},b.isNameStartChar=l,b.isNameChar=function(o){return l(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],545:[function(e,d,b){"use strict";function l(o){return o>=65&&o<=90||o===95||o>=97&&o<=122||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8204&&o<=8205||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}Object.defineProperty(b,"__esModule",{value:!0}),b.NC_NAME_START_CHAR="A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NC_NAME_CHAR="-"+b.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.NC_NAME_START_CHAR_RE=new RegExp("^["+b.NC_NAME_START_CHAR+"]$","u"),b.NC_NAME_CHAR_RE=new RegExp("^["+b.NC_NAME_CHAR+"]$","u"),b.NC_NAME_RE=new RegExp("^["+b.NC_NAME_START_CHAR+"]["+b.NC_NAME_CHAR+"]*$","u"),b.isNCNameStartChar=l,b.isNCNameChar=function(o){return l(o)||o===45||o===46||o>=48&&o<=57||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}]},{},[15])(15)}))});var td="waiting",T7="replied";var mo={basis:"count",default_capacity:0,by_account:{}};function B7(e){let d=e&&typeof e=="object"&&!Array.isArray(e)?e:{},b=d.basis==="points"?"points":"count",l=Math.max(0,Math.floor(Number(d.default_capacity)||0)),o={},s=d.by_account&&typeof d.by_account=="object"?d.by_account:{};for(let[r,t]of Object.entries(s)){let n=Number(r)||0,c=Math.max(0,Math.floor(Number(t)||0));n>0&&c>0&&(o[n]=c)}return{basis:b,default_capacity:l,by_account:o}}import{createContext as Dg,useContext as Pg,useMemo as nd}from"react";import{Box as Ng}from"@mui/material";var vc="--app-mobile-font-offset";function Mr(e,d=0){return`calc(${e}px + max(0px, var(${vc}, 0px) - ${d}px))`}import{jsx as rd}from"react/jsx-runtime";var od=Dg({});function Lg({config:e,children:d}){let b=nd(()=>e??{},[e]),l=b.mobileFontOffsetPx;return rd(od.Provider,{value:b,children:l===void 0?d:rd(Ng,{sx:{display:"contents",[vc]:`${l}px`},children:d})})}function yt(){return Pg(od)}function Ts(){let{buildFileUrl:e}=yt();return nd(()=>e||((d,b)=>{let l=[];return b?.thumb&&l.push(`thumb=${b.thumb}`),b?.download&&l.push("download=1"),`/api/v1/files/${d}${l.length?`?${l.join("&")}`:""}`}),[e])}function Cs(){let{uploadMaxMb:e}=yt();return e??50}import{useGlobalForm as wy}from"@ehfuse/forma";import id from"@mui/icons-material/DoNotDisturbAltOutlined";import sd from"@mui/icons-material/BookmarkBorderOutlined";import zg from"@mui/icons-material/LabelOutlined";import jg from"@mui/icons-material/FlagOutlined";import Fg from"@mui/icons-material/StarBorderOutlined";import qg from"@mui/icons-material/FolderOutlined";import $g from"@mui/icons-material/EventOutlined";import Hg from"@mui/icons-material/BuildOutlined";import Wg from"@mui/icons-material/LocalShippingOutlined";import Ug from"@mui/icons-material/StorefrontOutlined";import Vg from"@mui/icons-material/GroupsOutlined";import Kg from"@mui/icons-material/LightbulbOutlined";import Gg from"@mui/icons-material/FavoriteBorderOutlined";import Yg from"@mui/icons-material/AssignmentOutlined";import Xg from"@mui/icons-material/HomeOutlined";import Zg from"@mui/icons-material/WorkOutline";import Jg from"@mui/icons-material/SchoolOutlined";import Qg from"@mui/icons-material/LocalHospitalOutlined";import eb from"@mui/icons-material/RestaurantOutlined";import tb from"@mui/icons-material/LocalFloristOutlined";import rb from"@mui/icons-material/DirectionsCarOutlined";import nb from"@mui/icons-material/CampaignOutlined";import ob from"@mui/icons-material/SavingsOutlined";import ib from"@mui/icons-material/Inventory2Outlined";import sb from"@mui/icons-material/CleaningServicesOutlined";import ad from"@mui/icons-material/HandymanOutlined";import ab from"@mui/icons-material/LocalPhoneOutlined";import lb from"@mui/icons-material/EmailOutlined";import cb from"@mui/icons-material/ShoppingCartOutlined";import ub from"@mui/icons-material/BarChartOutlined";import fb from"@mui/icons-material/PrintOutlined";import db from"@mui/icons-material/SecurityOutlined";import hb from"@mui/icons-material/AlarmOutlined";import pb from"@mui/icons-material/AttachFileOutlined";import mb from"@mui/icons-material/PhotoCameraOutlined";import gb from"@mui/icons-material/ImageOutlined";import bb from"@mui/icons-material/MenuBookOutlined";import yb from"@mui/icons-material/EditOutlined";import xb from"@mui/icons-material/KeyOutlined";import vb from"@mui/icons-material/LockOutlined";import wb from"@mui/icons-material/LockOpenOutlined";import _b from"@mui/icons-material/SettingsOutlined";import kb from"@mui/icons-material/CloudOutlined";import Sb from"@mui/icons-material/WifiOutlined";import Tb from"@mui/icons-material/ComputerOutlined";import Cb from"@mui/icons-material/SmartphoneOutlined";import Bb from"@mui/icons-material/TvOutlined";import Ib from"@mui/icons-material/AccessTimeOutlined";import Mb from"@mui/icons-material/TimerOutlined";import Eb from"@mui/icons-material/MapOutlined";import Rb from"@mui/icons-material/PlaceOutlined";import Ob from"@mui/icons-material/NavigationOutlined";import Ab from"@mui/icons-material/FlightOutlined";import Db from"@mui/icons-material/TrainOutlined";import Pb from"@mui/icons-material/DirectionsBusOutlined";import Nb from"@mui/icons-material/DirectionsBikeOutlined";import Lb from"@mui/icons-material/DirectionsWalkOutlined";import zb from"@mui/icons-material/DirectionsRunOutlined";import jb from"@mui/icons-material/FitnessCenterOutlined";import Fb from"@mui/icons-material/SportsSoccerOutlined";import qb from"@mui/icons-material/EmojiEventsOutlined";import $b from"@mui/icons-material/CardGiftcardOutlined";import Hb from"@mui/icons-material/CakeOutlined";import ld from"@mui/icons-material/CoffeeOutlined";import Wb from"@mui/icons-material/LocalPizzaOutlined";import Ub from"@mui/icons-material/ShoppingBagOutlined";import cd from"@mui/icons-material/CreditCardOutlined";import Vb from"@mui/icons-material/AccountBalanceOutlined";import Kb from"@mui/icons-material/AccountBalanceWalletOutlined";import Gb from"@mui/icons-material/AttachMoneyOutlined";import Yb from"@mui/icons-material/ReceiptLongOutlined";import Xb from"@mui/icons-material/CalculateOutlined";import Zb from"@mui/icons-material/TrendingUpOutlined";import Jb from"@mui/icons-material/ListAltOutlined";import Qb from"@mui/icons-material/TaskAltOutlined";import e1 from"@mui/icons-material/DoneAllOutlined";import t1 from"@mui/icons-material/WarningAmberOutlined";import r1 from"@mui/icons-material/InfoOutlined";import n1 from"@mui/icons-material/HelpOutlined";import o1 from"@mui/icons-material/SupportAgentOutlined";import i1 from"@mui/icons-material/PersonOutlined";import s1 from"@mui/icons-material/PersonAddOutlined";import a1 from"@mui/icons-material/BadgeOutlined";import l1 from"@mui/icons-material/WbSunnyOutlined";import c1 from"@mui/icons-material/DarkModeOutlined";import u1 from"@mui/icons-material/LocalFireDepartmentOutlined";import f1 from"@mui/icons-material/WaterDropOutlined";import d1 from"@mui/icons-material/BoltOutlined";import h1 from"@mui/icons-material/AutorenewOutlined";import p1 from"@mui/icons-material/ScienceOutlined";import m1 from"@mui/icons-material/MedicalServicesOutlined";import g1 from"@mui/icons-material/NotificationsOutlined";import b1 from"@mui/icons-material/SendOutlined";import y1 from"@mui/icons-material/LinkOutlined";import x1 from"@mui/icons-material/PublicOutlined";import ud from"@mui/icons-material/ApartmentOutlined";import v1 from"@mui/icons-material/PlumbingOutlined";import w1 from"@mui/icons-material/ElectricalServicesOutlined";import _1 from"@mui/icons-material/ChatOutlined";import k1 from"@mui/icons-material/DescriptionOutlined";import S1 from"@mui/icons-material/FactCheckOutlined";import T1 from"@mui/icons-material/RocketLaunchOutlined";import C1 from"@mui/icons-material/PaletteOutlined";import B1 from"@mui/icons-material/MusicNoteOutlined";import I1 from"@mui/icons-material/VideocamOutlined";import M1 from"@mui/icons-material/ThumbUpOutlined";import E1 from"@mui/icons-material/PushPinOutlined";import R1 from"@mui/icons-material/SearchOutlined";import O1 from"@mui/icons-material/VisibilityOutlined";import A1 from"@mui/icons-material/VerifiedOutlined";import D1 from"@mui/icons-material/TrackChangesOutlined";import P1 from"@mui/icons-material/ExtensionOutlined";import N1 from"@mui/icons-material/CodeOutlined";import L1 from"@mui/icons-material/BugReportOutlined";import z1 from"@mui/icons-material/SmartToyOutlined";import j1 from"@mui/icons-material/StorageOutlined";import F1 from"@mui/icons-material/QrCode2Outlined";import q1 from"@mui/icons-material/FileDownloadOutlined";import $1 from"@mui/icons-material/FileUploadOutlined";import H1 from"@mui/icons-material/MicOutlined";import W1 from"@mui/icons-material/HeadphonesOutlined";import U1 from"@mui/icons-material/MovieOutlined";import V1 from"@mui/icons-material/SportsEsportsOutlined";import K1 from"@mui/icons-material/BrushOutlined";import G1 from"@mui/icons-material/ArchitectureOutlined";import Y1 from"@mui/icons-material/EngineeringOutlined";import X1 from"@mui/icons-material/FactoryOutlined";import Z1 from"@mui/icons-material/AgricultureOutlined";import J1 from"@mui/icons-material/DirectionsBoatOutlined";import Q1 from"@mui/icons-material/TwoWheelerOutlined";import ey from"@mui/icons-material/HandshakeOutlined";import ty from"@mui/icons-material/GavelOutlined";import ry from"@mui/icons-material/BalanceOutlined";import ny from"@mui/icons-material/TranslateOutlined";import oy from"@mui/icons-material/PsychologyOutlined";import iy from"@mui/icons-material/PetsOutlined";import sy from"@mui/icons-material/CelebrationOutlined";import ay from"@mui/icons-material/BeachAccessOutlined";import ly from"@mui/icons-material/AcUnitOutlined";import cy from"@mui/icons-material/ForestOutlined";import uy from"@mui/icons-material/LandscapeOutlined";import fy from"@mui/icons-material/HotelOutlined";import dy from"@mui/icons-material/LocalLaundryServiceOutlined";import hy from"@mui/icons-material/ChairOutlined";import py from"@mui/icons-material/LocalBarOutlined";import my from"@mui/icons-material/LunchDiningOutlined";import gy from"@mui/icons-material/IcecreamOutlined";import by from"@mui/icons-material/WorkspacePremiumOutlined";import yy from"@mui/icons-material/DiamondOutlined";import xy from"@mui/icons-material/VaccinesOutlined";var wc="bookmark",go="label",sr="notifications",cr="event",Bs="warning",Is="#e53e3e",fd="none",_c=[{key:fd,Icon:id},{key:"label",Icon:zg},{key:"bookmark",Icon:sd},{key:"flag",Icon:jg},{key:"star",Icon:Fg},{key:"folder",Icon:qg},{key:"event",Icon:$g},{key:"build",Icon:Hg},{key:"shipping",Icon:Wg},{key:"store",Icon:Ug},{key:"groups",Icon:Vg},{key:"idea",Icon:Kg},{key:"heart",Icon:Gg},{key:"assignment",Icon:Yg},{key:"home",Icon:Xg},{key:"work",Icon:Zg},{key:"school",Icon:Jg},{key:"hospital",Icon:Qg},{key:"restaurant",Icon:eb},{key:"flower",Icon:tb},{key:"car",Icon:rb},{key:"campaign",Icon:nb},{key:"savings",Icon:ob},{key:"inventory",Icon:ib},{key:"cleaning",Icon:sb},{key:"handyman",Icon:ad},{key:"phone",Icon:ab},{key:"email",Icon:lb},{key:"cart",Icon:cb},{key:"chart",Icon:ub},{key:"print",Icon:fb},{key:"security",Icon:db},{key:"alarm",Icon:hb},{key:"attach",Icon:pb},{key:"camera",Icon:mb},{key:"image",Icon:gb},{key:"book",Icon:bb},{key:"edit",Icon:yb},{key:"key",Icon:xb},{key:"lock",Icon:vb},{key:"unlock",Icon:wb},{key:"settings",Icon:_b},{key:"cloud",Icon:kb},{key:"wifi",Icon:Sb},{key:"computer",Icon:Tb},{key:"smartphone",Icon:Cb},{key:"tv",Icon:Bb},{key:"clock",Icon:Ib},{key:"timer",Icon:Mb},{key:"map",Icon:Eb},{key:"place",Icon:Rb},{key:"navigation",Icon:Ob},{key:"flight",Icon:Ab},{key:"train",Icon:Db},{key:"bus",Icon:Pb},{key:"bike",Icon:Nb},{key:"walk",Icon:Lb},{key:"run",Icon:zb},{key:"fitness",Icon:jb},{key:"soccer",Icon:Fb},{key:"trophy",Icon:qb},{key:"gift",Icon:$b},{key:"cake",Icon:Hb},{key:"coffee",Icon:ld},{key:"pizza",Icon:Wb},{key:"bag",Icon:Ub},{key:"card",Icon:cd},{key:"bank",Icon:Vb},{key:"wallet",Icon:Kb},{key:"money",Icon:Gb},{key:"receipt",Icon:Yb},{key:"calculate",Icon:Xb},{key:"trending",Icon:Zb},{key:"listalt",Icon:Jb},{key:"task",Icon:Qb},{key:"doneall",Icon:e1},{key:"warning",Icon:t1},{key:"info",Icon:r1},{key:"help",Icon:n1},{key:"support",Icon:o1},{key:"person",Icon:i1},{key:"personadd",Icon:s1},{key:"badge",Icon:a1},{key:"sun",Icon:l1},{key:"moon",Icon:c1},{key:"fire",Icon:u1},{key:"water",Icon:f1},{key:"bolt",Icon:d1},{key:"renew",Icon:h1},{key:"science",Icon:p1},{key:"medical",Icon:m1},{key:"notifications",Icon:g1},{key:"send",Icon:b1},{key:"link",Icon:y1},{key:"public",Icon:x1},{key:"apartment",Icon:ud},{key:"plumbing",Icon:v1},{key:"electrical",Icon:w1},{key:"chat",Icon:_1},{key:"description",Icon:k1},{key:"factcheck",Icon:S1},{key:"rocket",Icon:T1},{key:"palette",Icon:C1},{key:"music",Icon:B1},{key:"video",Icon:I1},{key:"thumbup",Icon:M1},{key:"pin",Icon:E1},{key:"search",Icon:R1},{key:"eye",Icon:O1},{key:"verified",Icon:A1},{key:"target",Icon:D1},{key:"extension",Icon:P1},{key:"code",Icon:N1},{key:"bug",Icon:L1},{key:"robot",Icon:z1},{key:"storage",Icon:j1},{key:"qrcode",Icon:F1},{key:"download",Icon:q1},{key:"upload",Icon:$1},{key:"mic",Icon:H1},{key:"headphones",Icon:W1},{key:"movie",Icon:U1},{key:"game",Icon:V1},{key:"brush",Icon:K1},{key:"architecture",Icon:G1},{key:"engineering",Icon:Y1},{key:"factory",Icon:X1},{key:"agriculture",Icon:Z1},{key:"boat",Icon:J1},{key:"motorcycle",Icon:Q1},{key:"handshake",Icon:ey},{key:"gavel",Icon:ty},{key:"balance",Icon:ry},{key:"translate",Icon:ny},{key:"psychology",Icon:oy},{key:"pets",Icon:iy},{key:"celebration",Icon:sy},{key:"beach",Icon:ay},{key:"snow",Icon:ly},{key:"forest",Icon:cy},{key:"mountain",Icon:uy},{key:"hotel",Icon:fy},{key:"laundry",Icon:dy},{key:"chair",Icon:hy},{key:"bar",Icon:py},{key:"burger",Icon:my},{key:"icecream",Icon:gy},{key:"medal",Icon:by},{key:"diamond",Icon:yy},{key:"vaccine",Icon:xy}],vy={cafe:ld,payment:cd,business:ud,construction:ad};function Tt(e){return e===fd?null:_c.find(d=>d.key===e)?.Icon??vy[String(e??"")]??sd}function kB(e){return Tt(e)??id}var kc={title:"",icon:go,icon_color:"",manager_name:"",manager_account_seq:0,receiver_names:[],receiver_account_seqs:[],is_notice:!1,is_event:!1,is_bug:!1,visibility:"involved",visibility_group_seq:0,repeat_rule:"",repeat_until:"",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:"",reminders:[],priority:"medium",label_keys:[],note:"",content:"",checklist:[],tab_key:""},Sc={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function _y(e){let{formId:d="taskbox-create-form",initialValues:b,onValidate:l,onSubmit:o}=e;return wy({formId:d,initialValues:{...kc,...b},onValidate:l,onSubmit:o})}import{useGlobalFormaState as ky}from"@ehfuse/forma";var dd="taskbox-ui-state";function bo(){return ky({stateId:dd,initialValues:Sc})}import{useMemo as Sy}from"react";import{useTheme as Ty}from"@mui/material";function Di(e,d){let b=Math.max(0,Math.min(1,d));if(b<=0)return"transparent";let l=e.trim().replace("#",""),o=l.length===3?l.split("").map(n=>n+n).join(""):l;if(!/^[0-9a-fA-F]{6}$/.test(o))return e;let s=Number.parseInt(o.slice(0,2),16),r=Number.parseInt(o.slice(2,4),16),t=Number.parseInt(o.slice(4,6),16);return`rgba(${s}, ${r}, ${t}, ${b})`}function hd(e,d){let b=Math.max(0,Math.min(1,d)),l=e.trim().replace("#",""),o=l.length===3?l.split("").map(c=>c+c).join(""):l;if(!/^[0-9a-fA-F]{6}$/.test(o))return e;let s=c=>Math.round(c+(255-c)*b),r=s(Number.parseInt(o.slice(0,2),16)),t=s(Number.parseInt(o.slice(2,4),16)),n=s(Number.parseInt(o.slice(4,6),16));return`#${[r,t,n].map(c=>c.toString(16).padStart(2,"0")).join("")}`}function Tc(e,d,b){return b==="dark"?{accent:e,accentContrast:d,accentSoft:"#1d2b45",accentOnSurface:"#b3d1ff",danger:"#f87171",dangerSoft:"#3a1f22",success:"#4ade80",warning:"#fbbf24",textStrong:"#ffffff",textPrimary:"#e2e8f0",textSecondary:"#a3adbb",textMuted:"#77808d",textInverse:"#0f1216",surface:"#161a1f",surfaceSubtle:"#1e232a",surfaceHover:"#272d36",surfaceHoverStrong:"#323a45",border:"#2c333c",borderStrong:"#3b434e"}:{accent:e,accentContrast:d,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:"#f8f8f7",surfaceHoverStrong:"#efefed",border:"#e6e6e3",borderStrong:"#dedddb"}}function Cy(e,d){let b=d==="dark";return{bg:b?hd(e.accent,.45):e.accent,color:b?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6,paddingY:.4}}function pd(e,d){return{...e,...d??{}}}function za(e,d="light"){let b=d==="dark",l=Cy(e,d),o=e.accentOnSurface;return{mode:d,colors:e,table:{bg:e.surface,borderColor:e.borderStrong,headerBg:e.surface,headerColor:e.textSecondary,headerActiveColor:e.textStrong,headerFilteredColor:o,headerFontSize:13,rowBg:e.surface,rowColor:e.textPrimary,rowSubColor:e.textSecondary,rowTitleColor:e.textStrong,rowTitleFontWeight:d==="dark"?400:500,rowHoverBg:e.surfaceHover,rowBorderColor:e.border,cellHoverBg:e.surfaceHoverStrong,emptyColor:e.textMuted,groupHeader:{bg:e.surfaceSubtle,hoverBg:e.surfaceHover,borderColor:e.border,labelColor:d==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:d==="dark"?400:700,minHeight:48,badge:{...l,borderRadius:4,width:34}}},board:{columnBg:d==="dark"?e.surfaceSubtle:e.surface,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...l,borderRadius:4,width:34}},summary:{gaugeTrackColor:d==="dark"?e.borderStrong:"#ececea",gaugeBarColor:o,gaugeCompleteColor:e.success,gaugeHeight:6,numberColor:o,overdueColor:e.danger,textColor:e.textStrong},actionButton:{bg:"#2f80ed",color:"#ffffff",hoverBg:"#2470dd",bgImage:"linear-gradient(180deg, #5ba1f5 0%, #2f80ed 100%)",hoverBgImage:"linear-gradient(180deg, #4d95ee 0%, #2470dd 100%)"},tabs:{bg:d==="dark"?e.surfaceSubtle:e.surface,color:d==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:d==="dark"?e.border:e.borderStrong,selectedBg:d==="dark"?e.surfaceHover:e.textStrong,selectedColor:d==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:b?"#3a434f":e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:b?"#1a1e24":e.surface,dateBandBg:e.surface,otherMonthBg:b?"#1a1e24":e.surface,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:b?"#232a33":e.surface,borderColor:b?"#333c47":e.border,hoverBg:b?"#2b3441":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:d==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:d==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function Cc(e,d){if(!d)return e;let b=d.mode??e.mode,o={...b===e.mode?e.colors:Tc(e.colors.accent,e.colors.accentContrast,b),...d.colors??{}},s=za(o,b),{groupHeader:r,...t}=d.table??{},{badge:n,...c}=d.board??{},{badge:i,...a}=r??{};return{mode:b,colors:o,table:{...s.table,...t,groupHeader:{...s.table.groupHeader,...a,badge:pd(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:pd(s.board.badge,n)},summary:{...s.summary,...d.summary??{}},chip:{...s.chip,...d.chip??{}},actionButton:{...s.actionButton,...d.actionButton??{}},tabs:{...s.tabs,...d.tabs??{}},avatar:{...s.avatar,...d.avatar??{}},calendar:{...s.calendar,...d.calendar??{}},card:{...s.card,...d.card??{}},timeline:{...s.timeline,...d.timeline??{}}}}function By(e={}){let{mode:d="light",accent:b="#2563eb",accentContrast:l="#ffffff",input:o}=e;return Cc(za(Tc(b,l,d),d),o)}function lt(){let e=Ty(),{theme:d}=yt(),b=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return Sy(()=>Cc(za(Tc(b,l,o),o),d),[b,l,o,d])}import{useCallback as Yn,useEffect as Ls,useMemo as Xn,useRef as eu,useState as Zn}from"react";import{Box as _r,Divider as B2,IconButton as I2,ListItemIcon as M2,Menu as th,MenuItem as al}from"@mui/material";import rh from"@mui/icons-material/Add";import E2 from"@mui/icons-material/ArrowUpward";import R2 from"@mui/icons-material/ArrowDownward";import O2 from"@mui/icons-material/KeyboardArrowDown";import A2 from"@mui/icons-material/KeyboardArrowRight";import tu from"@mui/icons-material/Check";import D2 from"@mui/icons-material/FilterList";import P2 from"@mui/icons-material/InboxOutlined";import{Virtuoso as N2}from"react-virtuoso";import L2 from"@ehfuse/overlay-scrollbar";import{Box as md}from"@mui/material";import{jsx as My,jsxs as Ey}from"react/jsx-runtime";var Iy={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 qr({priority:e,small:d=!1,plain:b=!1}){let l=Iy[e],o=lt(),s=o.mode==="dark",r=b||e==="low";return Ey(md,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:d?.5:.75,px:r?0:d?.9:1.25,py:r?0:d?.25:.5,borderRadius:.75,fontSize:d?11.5:13,fontWeight:500,bgcolor:r?"transparent":s?Di(l.dot,o.chip.darkBgAlpha):l.bgcolor,color:r?s?o.chip.plainColor:l.color:s?o.chip.darkTextSource==="fg"?l.color:l.dot:l.color,whiteSpace:"nowrap"},children:[My(md,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}import{Divider as Py,Menu as Ny,MenuItem as vd}from"@mui/material";import Ly from"@mui/icons-material/Check";function Un(){return{}}var Bc=[{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"}],Ic=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],Mc=[{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 gd(e){return Bc.find(d=>d.key===e)?.name??""}function bd(e){return Ic.find(d=>d.key===e)?.name??""}function ja(e){return Mc.find(d=>d.key===e)?.name??""}function Ec(e,d=new Date){if(!e.is_event)return!1;let b=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(b))return!1;let l=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(l)){let s=new Date(`${b}T${l}:00`);return!Number.isNaN(s.getTime())&&s.getTime()<=d.getTime()}let o=new Date(`${b}T00:00:00`);return Number.isNaN(o.getTime())?!1:(o.setDate(o.getDate()+1),o.getTime()<=d.getTime())}function Fa(e,d=new Date){return e.is_event?Ec(e,d):!!e.completed}var un=[{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:"review_waiting",name:"\uAC80\uD1A0\uB300\uAE30",bg:"#ede9fe",fg:"#5b3fa8",dot:"#8b5cf6"},{key:"hold",name:"\uBCF4\uB958",bg:"#fbeee0",fg:"#8a5a2b",dot:"#d9730d"}],Rs=un;function qa(e){return un.find(d=>d.key===e)??un[0]}var Ms={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function ur(e){if(e.is_notice)return yd(e.status);if(e.is_bug&&e.completed){let d=ja(e.resolution)||"\uC644\uB8CC";return{...Ms,name:d}}return e.completed&&e.status!=="hold"?Ms:e.is_bug?Oy(e.status):qa(e.status)}var Ry={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function Os(e){return Ec(e)?Ry:null}var Es=[{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 yd(e){return Es.find(d=>d.key===e)??Es[1]}var Rc="__closed__",ui=[{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"}],ZB=[...ui.filter(e=>e.key!=="bug_hold"),{key:Rc,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...ui.filter(e=>e.key==="bug_hold")];function Oy(e){return ui.find(d=>d.key===e)??ui[0]}function $a(e){return e.is_notice?Es:e.is_bug?ui:Rs}function JB(e){return e.status===td}var Ay={in_progress:0,not_started:2,hold:3};function QB(e){return e.completed?9:Ay[String(e.status??"")]??2}function Pi(e,d){let b=new Map(d.map(o=>[o.key,o])),l=(e.label_keys??[]).map(o=>b.get(o)).filter(o=>!!o);if(e.is_event){let o=Os({is_event:!0,due_date:String(e.due_date??""),event_time:e.event_time});return o?[o,...l]:l}return e.is_notice?String(e.status??"")==="notice_active"?l:[yd(e.status),...l]:e.is_bug?[ur({...e,is_notice:!1}),...l]:e.completed?[Ms,...l]:[qa(e.status),...l]}function xd(e){return{bg:`${e}1f`,fg:e,dot:e}}function Ha(e,d){return e.includes(d)?e.filter(b=>b!==d):[...e,d]}import{Box as Wa}from"@mui/material";import{jsx as As,jsxs as Dy}from"react/jsx-runtime";function Pt({option:e,small:d=!1}){let b=lt(),l=b.mode==="dark",o=e.key==="not_started";return Dy(Wa,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:d?.5:.75,...o?{pr:d?.5:.75}:{px:d?.9:1.25},py:o?0:d?.25:.5,borderRadius:1.25,fontSize:d?11.5:13,fontWeight:500,bgcolor:o?"transparent":l?Di(e.dot,b.chip.darkBgAlpha):e.bg,color:o?l?b.chip.plainColor:e.fg:l?b.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[As(Wa,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function iI({task:e,statusOptions:d,small:b=!1}){let l=Pi(e,d);return l.length===0?null:As(Wa,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>As(Pt,{option:o,small:b},o.key))})}function Wo({labelKeys:e,labelOptions:d}){let b=new Map(d.map(o=>[o.key,o])),l=e.map(o=>b.get(o)).filter(o=>!!o);return l.length===0?null:As(Wa,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>As(Pt,{option:o,small:!0},o.key))})}import{jsx as Ds,jsxs as wd}from"react/jsx-runtime";function Ni({anchorEl:e,value:d,options:b=un,onSelect:l,onComplete:o,onClose:s}){let r=Un();return wd(Ny,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[b.map(t=>wd(vd,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[Ds(Pt,{option:t}),d===t.key?Ds(Ly,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[Ds(Py,{sx:{my:.5}},"complete-divider"),Ds(vd,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:Ds(Pt,{option:Ms})},"complete")]:null]})}function Oc(e){let d=String(e??"").trim().replace("T"," "),b=d.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return b?new Date(Number(b[1]),Number(b[2])-1,Number(b[3]),Number(b[4]??0),Number(b[5]??0),Number(b[6]??0)):new Date(d)}function wr(e,d="YYYY-MM-DD"){let b=typeof e=="string"?Oc(e):e;if(!e||e===""||isNaN(b.getTime()))return"";let l=b.getFullYear(),o=(b.getMonth()+1).toString().padStart(2,"0"),s=b.getDate().toString().padStart(2,"0"),r=l.toString().slice(-2);switch(d){case"YYYY-MM-DD":return`${l}-${o}-${s}`;case"YY.MM.DD":return`${r}.${o}.${s}`;case"MM/DD/YYYY":return`${o}/${s}/${l}`;case"DD.MM.YYYY":return`${s}.${o}.${l}`;case"YYYYMMDD":return`${l}${o}${s}`;default:return d.replace(/YYYY/g,l.toString()).replace(/YY/g,r).replace(/MM/g,o).replace(/DD/g,s)}}function _d(){return wr(new Date)}var Ac=[{value:"due",label:"\uADF8\uB8F9 : \uB9C8\uAC10\uC608\uC815"},{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"}],zy="__notice__",jy="__bug__",Fy="__support__";function qy(e){let d=new Date(`${e}T00:00:00`);return d.setDate(d.getDate()+(6-d.getDay())),wr(d)}var $y=[{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 Hy(e,d,b){let l=e.due_date.slice(0,10);return l?l<d?"overdue":l===d?"today":l<=b?"this_week":"later":"no_due"}function Ua(e,d,b,l=[],o=[],s="",r,t=!1){let n=e.filter(f=>f.is_notice);if(n.length>0){let f=Ua(e.filter(u=>!u.is_notice),d,b,l,o,s,r,t);return[{key:zy,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...f]}if(t){let f=e.filter(g=>g.is_bug),u=e.filter(g=>!g.is_bug&&g.is_support);if(f.length>0||u.length>0){let g=Ua(e.filter(m=>!m.is_bug&&!m.is_support),d,b,l,o,s,r,!1);return[...f.length>0?[{key:jy,label:"\uC624\uB958",tasks:f}]:[],...u.length>0?[{key:Fy,label:"\uACE0\uAC1D\uC13C\uD130",tasks:u}]:[],...g]}}let c=new Map,i=(f,u)=>{let g=c.get(f);g?g.push(u):c.set(f,[u])},a;if(d==="due"){let f=qy(b);for(let u of e)i(Hy(u,b,f),u);a=$y}else if(d==="status"){for(let f of e)i(qa(f.status).key,f);a=un.map(f=>({key:f.key,label:f.name}))}else if(d==="tab"){for(let f of e)i(f.tab_key?.trim()||"__none__",f);a=[...l.filter(f=>!f.archived).map(f=>({key:f.key,label:f.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...l.filter(f=>f.archived).map(f=>({key:f.key,label:`${f.label} (\uBCF4\uAD00\uB428)`}))]}else if(r?.enabled){let f=Number(r.myAccountSeq??0),u=s.trim();for(let g of e){if(g.is_event){i("__event__",g);continue}if(!(Number(g.manager_account_seq??0)>0||String(g.manager_name??"").trim()!=="")){i("__none__",g);continue}let x=f>0&&Number(g.manager_account_seq??0)===f||!!u&&String(g.manager_name??"").trim()===u;i(x?"__manager__":"__reference__",g)}a=[{key:"__manager__",label:"\uCC45\uC784\uC790"},{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},{key:"__reference__",label:"\uCC38\uC870\uC790"}]}else{for(let x of e)i(x.is_event?"__event__":String(x.manager_name??"").trim()||"__none__",x);let f=s.trim(),u=[...c.keys()].filter(x=>x!=="__none__"&&x!=="__event__").sort((x,k)=>{if(f){if(x===f)return-1;if(k===f)return 1}return x.localeCompare(k)}),g=!!f&&u.includes(f),m=u.filter(x=>x!==f);a=[...g?[{key:f,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},...m.map(x=>({key:x,label:x}))]}let h=[];for(let f of a){let u=c.get(f.key);!u||u.length===0||h.push({key:f.key,label:f.label,tasks:u})}return h}import Wy from"@mui/icons-material/LabelOutlined";import Uy from"@mui/icons-material/NotesOutlined";import Vy from"@mui/icons-material/AutorenewOutlined";import Ky from"@mui/icons-material/CalendarTodayOutlined";import Gy from"@mui/icons-material/EventOutlined";import kd from"@mui/icons-material/PersonOutlineOutlined";import Sd from"@mui/icons-material/PeopleAltOutlined";import Nc from"@mui/icons-material/CheckCircleOutlineOutlined";import Yy from"@mui/icons-material/FlagOutlined";import Lc from"@mui/icons-material/AccessTimeOutlined";import Xy from"@mui/icons-material/StickyNote2Outlined";import Zy from"@mui/icons-material/ViewKanbanOutlined";import Jy from"@mui/icons-material/ConfirmationNumberOutlined";import Qy from"@mui/icons-material/QuestionAnswerOutlined";import{jsx as fr}from"react/jsx-runtime";var Td={completed:"50px",ticket_no:"100px",title:"minmax(220px, 1.8fr)",status:"110px",start_date:"132px",due_date:"132px",manager_name:"110px",receiver_names:"170px",answerer_names:"110px",targets:"170px",priority:"84px",ack:"104px",confirm:"100px",project:"150px",request:"100px",deleted_time:"150px",completed_time:"150px",created_time:"132px",note:"minmax(140px, 0.7fr)",origin_license_name:"150px",support_type:"90px",author_name:"110px"};function Cd(e){return Ka(e).map(d=>Td[d.id]).join(" ")}function Bd(e){return Ka(e).reduce((d,b)=>{let l=Td[b.id]??"",o=/^(\d+)px$/.exec(l);if(o)return d+Number(o[1]);let s=/^minmax\((\d+)px/.exec(l);return s?d+Number(s[1]):d},0)}var ex={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:fr(Lc,{sx:{fontSize:15}}),align:"center",sortable:!0},tx={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:fr(Lc,{sx:{fontSize:15}}),align:"center",sortable:!0},rx={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:fr(Lc,{sx:{fontSize:15}}),align:"center",sortable:!0},nx={id:"ticket_no",label:"\uD2F0\uCF13",icon:fr(Jy,{sx:{fontSize:15}}),align:"center"},ox={id:"support_type",label:"\uC885\uB958",icon:fr(Wy,{sx:{fontSize:15}}),align:"center"},ix={id:"author_name",label:"\uC791\uC131\uC790",icon:fr(kd,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},sx={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:fr(Qy,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},ax={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:fr(Zy,{sx:{fontSize:15}}),projectFilter:!0},lx={id:"targets",label:"\uB300\uC0C1\uC790",icon:fr(Sd,{sx:{fontSize:15}})},Pc={id:"priority",label:"\uC911\uC694\uB3C4",icon:fr(Yy,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},cx={id:"ack",label:"\uD655\uC778",icon:fr(Nc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},ux={id:"confirm",label:"\uD655\uC778",icon:fr(Nc,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Dc(e){let d=e.findIndex(l=>l.id==="receiver_names"||l.id==="targets"),b=d>=0?d+1:e.findIndex(l=>l.id==="note");return b<0?[...e,Pc]:[...e.slice(0,b),Pc,...e.slice(b)]}function Ka(e){let{showProject:d=!1,showManager:b=!0,showActions:l=!0,showRequest:o=!0,notice:s=!1,bug:r=!1,support:t=!1,centerManager:n=!1,trash:c=!1,confirmMode:i="none"}=e??{};if(t){let u=g=>Va.find(m=>m.id===g);return[u("completed"),ox,u("title"),u("status"),rx,u("start_date"),u("due_date"),ix,sx,{...u("manager_name"),align:"center"},u("receiver_names"),Pc]}let a=u=>{if(!r)return u;let g=u.filter(k=>k.id!=="note"),m=g.findIndex(k=>k.id==="completed"),x=m>=0?m+1:0;return[...g.slice(0,x),nx,...g.slice(x)]};if(s)return a(Dc(Va.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,lx]:u.id==="note"?[cx,u]:[u])));let h=b?Va:Va.filter(u=>u.id!=="manager_name");if(n&&(h=h.map(u=>u.id==="manager_name"?{...u,align:"center"}:u)),l)o||(h=h.filter(u=>u.id!=="request"));else{h=h.filter(g=>g.id!=="request");let u=h.findIndex(g=>g.id==="note");h=[...h.slice(0,u),c?ex:tx,...h.slice(u)]}if(i==="action"){let u=h.findIndex(g=>g.id==="note");h=[...h.slice(0,u),ux,...h.slice(u)]}if(!d)return a(Dc(h));let f=h.findIndex(u=>u.id==="receiver_names");return a(Dc([...h.slice(0,f+1),ax,...h.slice(f+1)]))}var Va=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:fr(Uy,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:fr(Vy,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:fr(Ky,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:fr(Gy,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:fr(kd,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:fr(Sd,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:fr(Nc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:fr(Xy,{sx:{fontSize:15}})}];import{Button as Id,ClickAwayListener as hx,Dialog as px,Paper as mx,Popper as gx,Typography as bx,Box as yx}from"@mui/material";import{useMediaQuery as fx,useTheme as dx}from"@mui/material";function zt(){let{isMobile:e}=yt(),d=dx(),b=fx(d.breakpoints.up("lg"));return e!==void 0?e:!b}import{Fragment as vx,jsx as Uo,jsxs as Ed}from"react/jsx-runtime";function Md(){if(typeof document>"u")return;let e=0,d=l=>{l.stopPropagation(),l.preventDefault(),b()},b=()=>{window.clearTimeout(e),document.removeEventListener("click",d,!0)};document.addEventListener("click",d,!0),e=window.setTimeout(b,350)}function xx({title:e,content:d,confirmText:b,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return Ed(vx,{children:[Uo(bx,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),d,Ed(yx,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[Uo(Id,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{Md(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),Uo(Id,{size:"medium",variant:"contained",color:"primary",onClick:()=>{Md(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:b})]})]})}function jt({open:e,anchorEl:d,title:b="\uD655\uC778\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",content:l,confirmText:o="\uD655\uC778",cancelText:s="\uCDE8\uC18C",placement:r="top",minWidth:t=160,minHeight:n,titleFontSize:c=17,actionFontSize:i=16,actionMinHeight:a=44,zIndex:h=1300,onCancel:f,onConfirm:u}){let g=zt(),m=Uo(xx,{title:b,content:l,confirmText:o,cancelText:s,titleFontSize:c,actionFontSize:i,actionMinHeight:a,onCancel:f,onConfirm:u});return g?Uo(px,{open:e,onClose:f,sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:m}):Uo(gx,{open:e,anchorEl:d,placement:r,sx:{zIndex:h},children:Uo(hx,{onClickAway:f,children:Uo(mx,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:t,minHeight:n,justifyContent:n?"space-between":"flex-start"},onClick:x=>x.stopPropagation(),onMouseDown:x=>x.stopPropagation(),children:m})})})}import{useEffect as wx,useState as _x}from"react";import{Box as kx,TextField as Sx}from"@mui/material";import{jsx as zc}from"react/jsx-runtime";function en(e,d){if(!e.completed||d<=0||(e.author_account_seq??0)!==d)return!1;let b=e.completed_by_account_seq??0;return b>0&&b!==d}function tn({open:e,anchorEl:d,nextCompleted:b,returnMode:l=!1,onCancel:o,onConfirm:s}){let[r,t]=_x("");wx(()=>{e&&t("")},[e]);let n=!b&&l;return zc(jt,{open:e,anchorEl:d,title:n?`\uC644\uB8CC\uB97C \uB418\uB3CC\uB9AC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
29
|
+
`,b.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NAME_CHAR="-"+b.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.CHAR_RE=new RegExp("^["+b.CHAR+"]$","u"),b.RESTRICTED_CHAR_RE=new RegExp("^["+b.RESTRICTED_CHAR+"]$","u"),b.S_RE=new RegExp("^["+b.S+"]+$","u"),b.NAME_START_CHAR_RE=new RegExp("^["+b.NAME_START_CHAR+"]$","u"),b.NAME_CHAR_RE=new RegExp("^["+b.NAME_CHAR+"]$","u"),b.NAME_RE=new RegExp("^["+b.NAME_START_CHAR+"]["+b.NAME_CHAR+"]*$","u"),b.NMTOKEN_RE=new RegExp("^["+b.NAME_CHAR+"]+$","u");function l(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}b.S_LIST=[32,10,13,9],b.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},b.isCharAndNotRestricted=function(o){return o===9||o===10||o===13||o>31&&o<127||o===133||o>159&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isS=function(o){return o===32||o===10||o===13||o===9},b.isNameStartChar=l,b.isNameChar=function(o){return l(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],545:[function(e,d,b){"use strict";function l(o){return o>=65&&o<=90||o===95||o>=97&&o<=122||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8204&&o<=8205||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}Object.defineProperty(b,"__esModule",{value:!0}),b.NC_NAME_START_CHAR="A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NC_NAME_CHAR="-"+b.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.NC_NAME_START_CHAR_RE=new RegExp("^["+b.NC_NAME_START_CHAR+"]$","u"),b.NC_NAME_CHAR_RE=new RegExp("^["+b.NC_NAME_CHAR+"]$","u"),b.NC_NAME_RE=new RegExp("^["+b.NC_NAME_START_CHAR+"]["+b.NC_NAME_CHAR+"]*$","u"),b.isNCNameStartChar=l,b.isNCNameChar=function(o){return l(o)||o===45||o===46||o>=48&&o<=57||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}]},{},[15])(15)}))});var td="waiting",T7="replied";var mo={basis:"count",default_capacity:0,by_account:{}};function B7(e){let d=e&&typeof e=="object"&&!Array.isArray(e)?e:{},b=d.basis==="points"?"points":"count",l=Math.max(0,Math.floor(Number(d.default_capacity)||0)),o={},s=d.by_account&&typeof d.by_account=="object"?d.by_account:{};for(let[r,t]of Object.entries(s)){let n=Number(r)||0,c=Math.max(0,Math.floor(Number(t)||0));n>0&&c>0&&(o[n]=c)}return{basis:b,default_capacity:l,by_account:o}}import{createContext as Dg,useContext as Pg,useMemo as nd}from"react";import{Box as Ng}from"@mui/material";var vc="--app-mobile-font-offset";function Mr(e,d=0){return`calc(${e}px + max(0px, var(${vc}, 0px) - ${d}px))`}import{jsx as rd}from"react/jsx-runtime";var od=Dg({});function Lg({config:e,children:d}){let b=nd(()=>e??{},[e]),l=b.mobileFontOffsetPx;return rd(od.Provider,{value:b,children:l===void 0?d:rd(Ng,{sx:{display:"contents",[vc]:`${l}px`},children:d})})}function yt(){return Pg(od)}function Ts(){let{buildFileUrl:e}=yt();return nd(()=>e||((d,b)=>{let l=[];return b?.thumb&&l.push(`thumb=${b.thumb}`),b?.download&&l.push("download=1"),`/api/v1/files/${d}${l.length?`?${l.join("&")}`:""}`}),[e])}function Cs(){let{uploadMaxMb:e}=yt();return e??50}import{useGlobalForm as wy}from"@ehfuse/forma";import id from"@mui/icons-material/DoNotDisturbAltOutlined";import sd from"@mui/icons-material/BookmarkBorderOutlined";import zg from"@mui/icons-material/LabelOutlined";import jg from"@mui/icons-material/FlagOutlined";import Fg from"@mui/icons-material/StarBorderOutlined";import qg from"@mui/icons-material/FolderOutlined";import $g from"@mui/icons-material/EventOutlined";import Hg from"@mui/icons-material/BuildOutlined";import Wg from"@mui/icons-material/LocalShippingOutlined";import Ug from"@mui/icons-material/StorefrontOutlined";import Vg from"@mui/icons-material/GroupsOutlined";import Kg from"@mui/icons-material/LightbulbOutlined";import Gg from"@mui/icons-material/FavoriteBorderOutlined";import Yg from"@mui/icons-material/AssignmentOutlined";import Xg from"@mui/icons-material/HomeOutlined";import Zg from"@mui/icons-material/WorkOutline";import Jg from"@mui/icons-material/SchoolOutlined";import Qg from"@mui/icons-material/LocalHospitalOutlined";import eb from"@mui/icons-material/RestaurantOutlined";import tb from"@mui/icons-material/LocalFloristOutlined";import rb from"@mui/icons-material/DirectionsCarOutlined";import nb from"@mui/icons-material/CampaignOutlined";import ob from"@mui/icons-material/SavingsOutlined";import ib from"@mui/icons-material/Inventory2Outlined";import sb from"@mui/icons-material/CleaningServicesOutlined";import ad from"@mui/icons-material/HandymanOutlined";import ab from"@mui/icons-material/LocalPhoneOutlined";import lb from"@mui/icons-material/EmailOutlined";import cb from"@mui/icons-material/ShoppingCartOutlined";import ub from"@mui/icons-material/BarChartOutlined";import fb from"@mui/icons-material/PrintOutlined";import db from"@mui/icons-material/SecurityOutlined";import hb from"@mui/icons-material/AlarmOutlined";import pb from"@mui/icons-material/AttachFileOutlined";import mb from"@mui/icons-material/PhotoCameraOutlined";import gb from"@mui/icons-material/ImageOutlined";import bb from"@mui/icons-material/MenuBookOutlined";import yb from"@mui/icons-material/EditOutlined";import xb from"@mui/icons-material/KeyOutlined";import vb from"@mui/icons-material/LockOutlined";import wb from"@mui/icons-material/LockOpenOutlined";import _b from"@mui/icons-material/SettingsOutlined";import kb from"@mui/icons-material/CloudOutlined";import Sb from"@mui/icons-material/WifiOutlined";import Tb from"@mui/icons-material/ComputerOutlined";import Cb from"@mui/icons-material/SmartphoneOutlined";import Bb from"@mui/icons-material/TvOutlined";import Ib from"@mui/icons-material/AccessTimeOutlined";import Mb from"@mui/icons-material/TimerOutlined";import Eb from"@mui/icons-material/MapOutlined";import Rb from"@mui/icons-material/PlaceOutlined";import Ob from"@mui/icons-material/NavigationOutlined";import Ab from"@mui/icons-material/FlightOutlined";import Db from"@mui/icons-material/TrainOutlined";import Pb from"@mui/icons-material/DirectionsBusOutlined";import Nb from"@mui/icons-material/DirectionsBikeOutlined";import Lb from"@mui/icons-material/DirectionsWalkOutlined";import zb from"@mui/icons-material/DirectionsRunOutlined";import jb from"@mui/icons-material/FitnessCenterOutlined";import Fb from"@mui/icons-material/SportsSoccerOutlined";import qb from"@mui/icons-material/EmojiEventsOutlined";import $b from"@mui/icons-material/CardGiftcardOutlined";import Hb from"@mui/icons-material/CakeOutlined";import ld from"@mui/icons-material/CoffeeOutlined";import Wb from"@mui/icons-material/LocalPizzaOutlined";import Ub from"@mui/icons-material/ShoppingBagOutlined";import cd from"@mui/icons-material/CreditCardOutlined";import Vb from"@mui/icons-material/AccountBalanceOutlined";import Kb from"@mui/icons-material/AccountBalanceWalletOutlined";import Gb from"@mui/icons-material/AttachMoneyOutlined";import Yb from"@mui/icons-material/ReceiptLongOutlined";import Xb from"@mui/icons-material/CalculateOutlined";import Zb from"@mui/icons-material/TrendingUpOutlined";import Jb from"@mui/icons-material/ListAltOutlined";import Qb from"@mui/icons-material/TaskAltOutlined";import e1 from"@mui/icons-material/DoneAllOutlined";import t1 from"@mui/icons-material/WarningAmberOutlined";import r1 from"@mui/icons-material/InfoOutlined";import n1 from"@mui/icons-material/HelpOutlined";import o1 from"@mui/icons-material/SupportAgentOutlined";import i1 from"@mui/icons-material/PersonOutlined";import s1 from"@mui/icons-material/PersonAddOutlined";import a1 from"@mui/icons-material/BadgeOutlined";import l1 from"@mui/icons-material/WbSunnyOutlined";import c1 from"@mui/icons-material/DarkModeOutlined";import u1 from"@mui/icons-material/LocalFireDepartmentOutlined";import f1 from"@mui/icons-material/WaterDropOutlined";import d1 from"@mui/icons-material/BoltOutlined";import h1 from"@mui/icons-material/AutorenewOutlined";import p1 from"@mui/icons-material/ScienceOutlined";import m1 from"@mui/icons-material/MedicalServicesOutlined";import g1 from"@mui/icons-material/NotificationsOutlined";import b1 from"@mui/icons-material/SendOutlined";import y1 from"@mui/icons-material/LinkOutlined";import x1 from"@mui/icons-material/PublicOutlined";import ud from"@mui/icons-material/ApartmentOutlined";import v1 from"@mui/icons-material/PlumbingOutlined";import w1 from"@mui/icons-material/ElectricalServicesOutlined";import _1 from"@mui/icons-material/ChatOutlined";import k1 from"@mui/icons-material/DescriptionOutlined";import S1 from"@mui/icons-material/FactCheckOutlined";import T1 from"@mui/icons-material/RocketLaunchOutlined";import C1 from"@mui/icons-material/PaletteOutlined";import B1 from"@mui/icons-material/MusicNoteOutlined";import I1 from"@mui/icons-material/VideocamOutlined";import M1 from"@mui/icons-material/ThumbUpOutlined";import E1 from"@mui/icons-material/PushPinOutlined";import R1 from"@mui/icons-material/SearchOutlined";import O1 from"@mui/icons-material/VisibilityOutlined";import A1 from"@mui/icons-material/VerifiedOutlined";import D1 from"@mui/icons-material/TrackChangesOutlined";import P1 from"@mui/icons-material/ExtensionOutlined";import N1 from"@mui/icons-material/CodeOutlined";import L1 from"@mui/icons-material/BugReportOutlined";import z1 from"@mui/icons-material/SmartToyOutlined";import j1 from"@mui/icons-material/StorageOutlined";import F1 from"@mui/icons-material/QrCode2Outlined";import q1 from"@mui/icons-material/FileDownloadOutlined";import $1 from"@mui/icons-material/FileUploadOutlined";import H1 from"@mui/icons-material/MicOutlined";import W1 from"@mui/icons-material/HeadphonesOutlined";import U1 from"@mui/icons-material/MovieOutlined";import V1 from"@mui/icons-material/SportsEsportsOutlined";import K1 from"@mui/icons-material/BrushOutlined";import G1 from"@mui/icons-material/ArchitectureOutlined";import Y1 from"@mui/icons-material/EngineeringOutlined";import X1 from"@mui/icons-material/FactoryOutlined";import Z1 from"@mui/icons-material/AgricultureOutlined";import J1 from"@mui/icons-material/DirectionsBoatOutlined";import Q1 from"@mui/icons-material/TwoWheelerOutlined";import ey from"@mui/icons-material/HandshakeOutlined";import ty from"@mui/icons-material/GavelOutlined";import ry from"@mui/icons-material/BalanceOutlined";import ny from"@mui/icons-material/TranslateOutlined";import oy from"@mui/icons-material/PsychologyOutlined";import iy from"@mui/icons-material/PetsOutlined";import sy from"@mui/icons-material/CelebrationOutlined";import ay from"@mui/icons-material/BeachAccessOutlined";import ly from"@mui/icons-material/AcUnitOutlined";import cy from"@mui/icons-material/ForestOutlined";import uy from"@mui/icons-material/LandscapeOutlined";import fy from"@mui/icons-material/HotelOutlined";import dy from"@mui/icons-material/LocalLaundryServiceOutlined";import hy from"@mui/icons-material/ChairOutlined";import py from"@mui/icons-material/LocalBarOutlined";import my from"@mui/icons-material/LunchDiningOutlined";import gy from"@mui/icons-material/IcecreamOutlined";import by from"@mui/icons-material/WorkspacePremiumOutlined";import yy from"@mui/icons-material/DiamondOutlined";import xy from"@mui/icons-material/VaccinesOutlined";var wc="bookmark",go="label",sr="notifications",cr="event",Bs="warning",Is="#e53e3e",fd="none",_c=[{key:fd,Icon:id},{key:"label",Icon:zg},{key:"bookmark",Icon:sd},{key:"flag",Icon:jg},{key:"star",Icon:Fg},{key:"folder",Icon:qg},{key:"event",Icon:$g},{key:"build",Icon:Hg},{key:"shipping",Icon:Wg},{key:"store",Icon:Ug},{key:"groups",Icon:Vg},{key:"idea",Icon:Kg},{key:"heart",Icon:Gg},{key:"assignment",Icon:Yg},{key:"home",Icon:Xg},{key:"work",Icon:Zg},{key:"school",Icon:Jg},{key:"hospital",Icon:Qg},{key:"restaurant",Icon:eb},{key:"flower",Icon:tb},{key:"car",Icon:rb},{key:"campaign",Icon:nb},{key:"savings",Icon:ob},{key:"inventory",Icon:ib},{key:"cleaning",Icon:sb},{key:"handyman",Icon:ad},{key:"phone",Icon:ab},{key:"email",Icon:lb},{key:"cart",Icon:cb},{key:"chart",Icon:ub},{key:"print",Icon:fb},{key:"security",Icon:db},{key:"alarm",Icon:hb},{key:"attach",Icon:pb},{key:"camera",Icon:mb},{key:"image",Icon:gb},{key:"book",Icon:bb},{key:"edit",Icon:yb},{key:"key",Icon:xb},{key:"lock",Icon:vb},{key:"unlock",Icon:wb},{key:"settings",Icon:_b},{key:"cloud",Icon:kb},{key:"wifi",Icon:Sb},{key:"computer",Icon:Tb},{key:"smartphone",Icon:Cb},{key:"tv",Icon:Bb},{key:"clock",Icon:Ib},{key:"timer",Icon:Mb},{key:"map",Icon:Eb},{key:"place",Icon:Rb},{key:"navigation",Icon:Ob},{key:"flight",Icon:Ab},{key:"train",Icon:Db},{key:"bus",Icon:Pb},{key:"bike",Icon:Nb},{key:"walk",Icon:Lb},{key:"run",Icon:zb},{key:"fitness",Icon:jb},{key:"soccer",Icon:Fb},{key:"trophy",Icon:qb},{key:"gift",Icon:$b},{key:"cake",Icon:Hb},{key:"coffee",Icon:ld},{key:"pizza",Icon:Wb},{key:"bag",Icon:Ub},{key:"card",Icon:cd},{key:"bank",Icon:Vb},{key:"wallet",Icon:Kb},{key:"money",Icon:Gb},{key:"receipt",Icon:Yb},{key:"calculate",Icon:Xb},{key:"trending",Icon:Zb},{key:"listalt",Icon:Jb},{key:"task",Icon:Qb},{key:"doneall",Icon:e1},{key:"warning",Icon:t1},{key:"info",Icon:r1},{key:"help",Icon:n1},{key:"support",Icon:o1},{key:"person",Icon:i1},{key:"personadd",Icon:s1},{key:"badge",Icon:a1},{key:"sun",Icon:l1},{key:"moon",Icon:c1},{key:"fire",Icon:u1},{key:"water",Icon:f1},{key:"bolt",Icon:d1},{key:"renew",Icon:h1},{key:"science",Icon:p1},{key:"medical",Icon:m1},{key:"notifications",Icon:g1},{key:"send",Icon:b1},{key:"link",Icon:y1},{key:"public",Icon:x1},{key:"apartment",Icon:ud},{key:"plumbing",Icon:v1},{key:"electrical",Icon:w1},{key:"chat",Icon:_1},{key:"description",Icon:k1},{key:"factcheck",Icon:S1},{key:"rocket",Icon:T1},{key:"palette",Icon:C1},{key:"music",Icon:B1},{key:"video",Icon:I1},{key:"thumbup",Icon:M1},{key:"pin",Icon:E1},{key:"search",Icon:R1},{key:"eye",Icon:O1},{key:"verified",Icon:A1},{key:"target",Icon:D1},{key:"extension",Icon:P1},{key:"code",Icon:N1},{key:"bug",Icon:L1},{key:"robot",Icon:z1},{key:"storage",Icon:j1},{key:"qrcode",Icon:F1},{key:"download",Icon:q1},{key:"upload",Icon:$1},{key:"mic",Icon:H1},{key:"headphones",Icon:W1},{key:"movie",Icon:U1},{key:"game",Icon:V1},{key:"brush",Icon:K1},{key:"architecture",Icon:G1},{key:"engineering",Icon:Y1},{key:"factory",Icon:X1},{key:"agriculture",Icon:Z1},{key:"boat",Icon:J1},{key:"motorcycle",Icon:Q1},{key:"handshake",Icon:ey},{key:"gavel",Icon:ty},{key:"balance",Icon:ry},{key:"translate",Icon:ny},{key:"psychology",Icon:oy},{key:"pets",Icon:iy},{key:"celebration",Icon:sy},{key:"beach",Icon:ay},{key:"snow",Icon:ly},{key:"forest",Icon:cy},{key:"mountain",Icon:uy},{key:"hotel",Icon:fy},{key:"laundry",Icon:dy},{key:"chair",Icon:hy},{key:"bar",Icon:py},{key:"burger",Icon:my},{key:"icecream",Icon:gy},{key:"medal",Icon:by},{key:"diamond",Icon:yy},{key:"vaccine",Icon:xy}],vy={cafe:ld,payment:cd,business:ud,construction:ad};function Tt(e){return e===fd?null:_c.find(d=>d.key===e)?.Icon??vy[String(e??"")]??sd}function kB(e){return Tt(e)??id}var kc={title:"",icon:go,icon_color:"",manager_name:"",manager_account_seq:0,receiver_names:[],receiver_account_seqs:[],is_notice:!1,is_event:!1,is_bug:!1,visibility:"involved",visibility_group_seq:0,repeat_rule:"",repeat_until:"",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:"",reminders:[],priority:"medium",label_keys:[],note:"",content:"",checklist:[],tab_key:""},Sc={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function _y(e){let{formId:d="taskbox-create-form",initialValues:b,onValidate:l,onSubmit:o}=e;return wy({formId:d,initialValues:{...kc,...b},onValidate:l,onSubmit:o})}import{useGlobalFormaState as ky}from"@ehfuse/forma";var dd="taskbox-ui-state";function bo(){return ky({stateId:dd,initialValues:Sc})}import{useMemo as Sy}from"react";import{useTheme as Ty}from"@mui/material";function Di(e,d){let b=Math.max(0,Math.min(1,d));if(b<=0)return"transparent";let l=e.trim().replace("#",""),o=l.length===3?l.split("").map(n=>n+n).join(""):l;if(!/^[0-9a-fA-F]{6}$/.test(o))return e;let s=Number.parseInt(o.slice(0,2),16),r=Number.parseInt(o.slice(2,4),16),t=Number.parseInt(o.slice(4,6),16);return`rgba(${s}, ${r}, ${t}, ${b})`}function hd(e,d){let b=Math.max(0,Math.min(1,d)),l=e.trim().replace("#",""),o=l.length===3?l.split("").map(c=>c+c).join(""):l;if(!/^[0-9a-fA-F]{6}$/.test(o))return e;let s=c=>Math.round(c+(255-c)*b),r=s(Number.parseInt(o.slice(0,2),16)),t=s(Number.parseInt(o.slice(2,4),16)),n=s(Number.parseInt(o.slice(4,6),16));return`#${[r,t,n].map(c=>c.toString(16).padStart(2,"0")).join("")}`}function Tc(e,d,b){return b==="dark"?{accent:e,accentContrast:d,accentSoft:"#1d2b45",accentOnSurface:"#b3d1ff",danger:"#f87171",dangerSoft:"#3a1f22",success:"#4ade80",warning:"#fbbf24",textStrong:"#ffffff",textPrimary:"#e2e8f0",textSecondary:"#a3adbb",textMuted:"#77808d",textInverse:"#0f1216",surface:"#161a1f",surfaceSubtle:"#1e232a",surfaceHover:"#272d36",surfaceHoverStrong:"#323a45",border:"#2c333c",borderStrong:"#3b434e"}:{accent:e,accentContrast:d,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:"#f8f8f7",surfaceHoverStrong:"#efefed",border:"#e6e6e3",borderStrong:"#dedddb"}}function Cy(e,d){let b=d==="dark";return{bg:b?hd(e.accent,.45):e.accent,color:b?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6,paddingY:.4}}function pd(e,d){return{...e,...d??{}}}function za(e,d="light"){let b=d==="dark",l=Cy(e,d),o=e.accentOnSurface;return{mode:d,colors:e,table:{bg:e.surface,borderColor:e.borderStrong,headerBg:e.surface,headerColor:e.textSecondary,headerActiveColor:e.textStrong,headerFilteredColor:o,headerFontSize:13,rowBg:e.surface,rowColor:e.textPrimary,rowSubColor:e.textSecondary,rowTitleColor:e.textStrong,rowTitleFontWeight:d==="dark"?400:500,rowHoverBg:e.surfaceHover,rowBorderColor:e.border,cellHoverBg:e.surfaceHoverStrong,emptyColor:e.textMuted,groupHeader:{bg:e.surfaceSubtle,hoverBg:e.surfaceHover,borderColor:e.border,labelColor:d==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:d==="dark"?400:700,minHeight:48,badge:{...l,borderRadius:4,width:34}}},board:{columnBg:d==="dark"?e.surfaceSubtle:e.surface,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...l,borderRadius:4,width:34}},summary:{gaugeTrackColor:d==="dark"?e.borderStrong:"#ececea",gaugeBarColor:o,gaugeCompleteColor:e.success,gaugeHeight:6,numberColor:o,overdueColor:e.danger,textColor:e.textStrong},actionButton:{bg:"#2f80ed",color:"#ffffff",hoverBg:"#2470dd",bgImage:"linear-gradient(180deg, #5ba1f5 0%, #2f80ed 100%)",hoverBgImage:"linear-gradient(180deg, #4d95ee 0%, #2470dd 100%)"},tabs:{bg:d==="dark"?e.surfaceSubtle:e.surface,color:d==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:d==="dark"?e.border:e.borderStrong,selectedBg:d==="dark"?e.surfaceHover:e.textStrong,selectedColor:d==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:b?"#3a434f":e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:b?"#1a1e24":e.surface,dateBandBg:e.surface,otherMonthBg:b?"#1a1e24":e.surface,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:b?"#232a33":e.surface,borderColor:b?"#333c47":e.border,hoverBg:b?"#2b3441":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:d==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:d==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function Cc(e,d){if(!d)return e;let b=d.mode??e.mode,o={...b===e.mode?e.colors:Tc(e.colors.accent,e.colors.accentContrast,b),...d.colors??{}},s=za(o,b),{groupHeader:r,...t}=d.table??{},{badge:n,...c}=d.board??{},{badge:i,...a}=r??{};return{mode:b,colors:o,table:{...s.table,...t,groupHeader:{...s.table.groupHeader,...a,badge:pd(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:pd(s.board.badge,n)},summary:{...s.summary,...d.summary??{}},chip:{...s.chip,...d.chip??{}},actionButton:{...s.actionButton,...d.actionButton??{}},tabs:{...s.tabs,...d.tabs??{}},avatar:{...s.avatar,...d.avatar??{}},calendar:{...s.calendar,...d.calendar??{}},card:{...s.card,...d.card??{}},timeline:{...s.timeline,...d.timeline??{}}}}function By(e={}){let{mode:d="light",accent:b="#2563eb",accentContrast:l="#ffffff",input:o}=e;return Cc(za(Tc(b,l,d),d),o)}function lt(){let e=Ty(),{theme:d}=yt(),b=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return Sy(()=>Cc(za(Tc(b,l,o),o),d),[b,l,o,d])}import{useCallback as Yn,useEffect as Ls,useMemo as Xn,useRef as eu,useState as Zn}from"react";import{Box as _r,Divider as B2,IconButton as I2,ListItemIcon as M2,Menu as th,MenuItem as al}from"@mui/material";import rh from"@mui/icons-material/Add";import E2 from"@mui/icons-material/ArrowUpward";import R2 from"@mui/icons-material/ArrowDownward";import O2 from"@mui/icons-material/KeyboardArrowDown";import A2 from"@mui/icons-material/KeyboardArrowRight";import tu from"@mui/icons-material/Check";import D2 from"@mui/icons-material/FilterList";import P2 from"@mui/icons-material/InboxOutlined";import{Virtuoso as N2}from"react-virtuoso";import L2 from"@ehfuse/overlay-scrollbar";import{Box as md}from"@mui/material";import{jsx as My,jsxs as Ey}from"react/jsx-runtime";var Iy={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 qr({priority:e,small:d=!1,plain:b=!1}){let l=Iy[e],o=lt(),s=o.mode==="dark",r=b||e==="low";return Ey(md,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:d?.5:.75,px:r?0:d?.9:1.25,py:r?0:d?.25:.5,borderRadius:.75,fontSize:d?11.5:13,fontWeight:500,bgcolor:r?"transparent":s?Di(l.dot,o.chip.darkBgAlpha):l.bgcolor,color:r?s?o.chip.plainColor:l.color:s?o.chip.darkTextSource==="fg"?l.color:l.dot:l.color,whiteSpace:"nowrap"},children:[My(md,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}import{Divider as Py,Menu as Ny,MenuItem as vd}from"@mui/material";import Ly from"@mui/icons-material/Check";function Un(){return{}}var Bc=[{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"}],Ic=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],Mc=[{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 gd(e){return Bc.find(d=>d.key===e)?.name??""}function bd(e){return Ic.find(d=>d.key===e)?.name??""}function ja(e){return Mc.find(d=>d.key===e)?.name??""}function Ec(e,d=new Date){if(!e.is_event)return!1;let b=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(b))return!1;let l=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(l)){let s=new Date(`${b}T${l}:00`);return!Number.isNaN(s.getTime())&&s.getTime()<=d.getTime()}let o=new Date(`${b}T00:00:00`);return Number.isNaN(o.getTime())?!1:(o.setDate(o.getDate()+1),o.getTime()<=d.getTime())}function Fa(e,d=new Date){return e.is_event?Ec(e,d):!!e.completed}var un=[{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:"review_waiting",name:"\uAC80\uD1A0\uB300\uAE30",bg:"#ede9fe",fg:"#5b3fa8",dot:"#8b5cf6"},{key:"hold",name:"\uBCF4\uB958",bg:"#fbeee0",fg:"#8a5a2b",dot:"#d9730d"}],Rs=un;function qa(e){return un.find(d=>d.key===e)??un[0]}var Ms={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function ur(e){if(e.is_notice)return yd(e.status);if(e.is_bug&&e.completed){let d=ja(e.resolution)||"\uC644\uB8CC";return{...Ms,name:d}}return e.completed&&e.status!=="hold"?Ms:e.is_bug?Oy(e.status):qa(e.status)}var Ry={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function Os(e){return Ec(e)?Ry:null}var Es=[{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 yd(e){return Es.find(d=>d.key===e)??Es[1]}var Rc="__closed__",ui=[{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"}],ZB=[...ui.filter(e=>e.key!=="bug_hold"),{key:Rc,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...ui.filter(e=>e.key==="bug_hold")];function Oy(e){return ui.find(d=>d.key===e)??ui[0]}function $a(e){return e.is_notice?Es:e.is_bug?ui:Rs}function JB(e){return e.status===td}var Ay={in_progress:0,not_started:2,hold:3};function QB(e){return e.completed?9:Ay[String(e.status??"")]??2}function Pi(e,d){let b=new Map(d.map(o=>[o.key,o])),l=(e.label_keys??[]).map(o=>b.get(o)).filter(o=>!!o);if(e.is_event){let o=Os({is_event:!0,due_date:String(e.due_date??""),event_time:e.event_time});return o?[o,...l]:l}return e.is_notice?String(e.status??"")==="notice_active"?l:[yd(e.status),...l]:e.is_bug?[ur({...e,is_notice:!1}),...l]:e.completed?[Ms,...l]:[qa(e.status),...l]}function xd(e){return{bg:`${e}1f`,fg:e,dot:e}}function Ha(e,d){return e.includes(d)?e.filter(b=>b!==d):[...e,d]}import{Box as Wa}from"@mui/material";import{jsx as As,jsxs as Dy}from"react/jsx-runtime";function Pt({option:e,small:d=!1}){let b=lt(),l=b.mode==="dark",o=e.key==="not_started";return Dy(Wa,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:d?.5:.75,...o?{pr:d?.5:.75}:{px:d?.9:1.25},py:o?0:d?.25:.5,borderRadius:1.25,fontSize:d?11.5:13,fontWeight:500,bgcolor:o?"transparent":l?Di(e.dot,b.chip.darkBgAlpha):e.bg,color:o?l?b.chip.plainColor:e.fg:l?b.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[As(Wa,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function iI({task:e,statusOptions:d,small:b=!1}){let l=Pi(e,d);return l.length===0?null:As(Wa,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>As(Pt,{option:o,small:b},o.key))})}function Wo({labelKeys:e,labelOptions:d}){let b=new Map(d.map(o=>[o.key,o])),l=e.map(o=>b.get(o)).filter(o=>!!o);return l.length===0?null:As(Wa,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>As(Pt,{option:o,small:!0},o.key))})}import{jsx as Ds,jsxs as wd}from"react/jsx-runtime";function Ni({anchorEl:e,value:d,options:b=un,onSelect:l,onComplete:o,onClose:s}){let r=Un();return wd(Ny,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[b.map(t=>wd(vd,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[Ds(Pt,{option:t}),d===t.key?Ds(Ly,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[Ds(Py,{sx:{my:.5}},"complete-divider"),Ds(vd,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:Ds(Pt,{option:Ms})},"complete")]:null]})}function Oc(e){let d=String(e??"").trim().replace("T"," "),b=d.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return b?new Date(Number(b[1]),Number(b[2])-1,Number(b[3]),Number(b[4]??0),Number(b[5]??0),Number(b[6]??0)):new Date(d)}function wr(e,d="YYYY-MM-DD"){let b=typeof e=="string"?Oc(e):e;if(!e||e===""||isNaN(b.getTime()))return"";let l=b.getFullYear(),o=(b.getMonth()+1).toString().padStart(2,"0"),s=b.getDate().toString().padStart(2,"0"),r=l.toString().slice(-2);switch(d){case"YYYY-MM-DD":return`${l}-${o}-${s}`;case"YY.MM.DD":return`${r}.${o}.${s}`;case"MM/DD/YYYY":return`${o}/${s}/${l}`;case"DD.MM.YYYY":return`${s}.${o}.${l}`;case"YYYYMMDD":return`${l}${o}${s}`;default:return d.replace(/YYYY/g,l.toString()).replace(/YY/g,r).replace(/MM/g,o).replace(/DD/g,s)}}function _d(){return wr(new Date)}var Ac=[{value:"due",label:"\uADF8\uB8F9 : \uB9C8\uAC10\uC608\uC815"},{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"}],zy="__notice__",jy="__bug__",Fy="__support__";function qy(e){let d=new Date(`${e}T00:00:00`);return d.setDate(d.getDate()+(6-d.getDay())),wr(d)}var $y=[{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 Hy(e,d,b){let l=e.due_date.slice(0,10);return l?l<d?"overdue":l===d?"today":l<=b?"this_week":"later":"no_due"}function Ua(e,d,b,l=[],o=[],s="",r,t=!1){let n=e.filter(f=>f.is_notice);if(n.length>0){let f=Ua(e.filter(u=>!u.is_notice),d,b,l,o,s,r,t);return[{key:zy,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...f]}if(t){let f=e.filter(g=>g.is_bug),u=e.filter(g=>!g.is_bug&&g.is_support);if(f.length>0||u.length>0){let g=Ua(e.filter(m=>!m.is_bug&&!m.is_support),d,b,l,o,s,r,!1);return[...f.length>0?[{key:jy,label:"\uC624\uB958",tasks:f}]:[],...u.length>0?[{key:Fy,label:"\uACE0\uAC1D\uC13C\uD130",tasks:u}]:[],...g]}}let c=new Map,i=(f,u)=>{let g=c.get(f);g?g.push(u):c.set(f,[u])},a;if(d==="due"){let f=qy(b);for(let u of e)i(Hy(u,b,f),u);a=$y}else if(d==="status"){for(let f of e)i(qa(f.status).key,f);a=un.map(f=>({key:f.key,label:f.name}))}else if(d==="tab"){for(let f of e)i(f.tab_key?.trim()||"__none__",f);a=[...l.filter(f=>!f.archived).map(f=>({key:f.key,label:f.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...l.filter(f=>f.archived).map(f=>({key:f.key,label:`${f.label} (\uBCF4\uAD00\uB428)`}))]}else if(r?.enabled){let f=Number(r.myAccountSeq??0),u=s.trim();for(let g of e){if(g.is_event){i("__event__",g);continue}if(!(Number(g.manager_account_seq??0)>0||String(g.manager_name??"").trim()!=="")){i("__none__",g);continue}let x=f>0&&Number(g.manager_account_seq??0)===f||!!u&&String(g.manager_name??"").trim()===u;i(x?"__manager__":"__reference__",g)}a=[{key:"__manager__",label:"\uCC45\uC784\uC790"},{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},{key:"__reference__",label:"\uCC38\uC870\uC790"}]}else{for(let x of e)i(x.is_event?"__event__":String(x.manager_name??"").trim()||"__none__",x);let f=s.trim(),u=[...c.keys()].filter(x=>x!=="__none__"&&x!=="__event__").sort((x,k)=>{if(f){if(x===f)return-1;if(k===f)return 1}return x.localeCompare(k)}),g=!!f&&u.includes(f),m=u.filter(x=>x!==f);a=[...g?[{key:f,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},...m.map(x=>({key:x,label:x}))]}let h=[];for(let f of a){let u=c.get(f.key);!u||u.length===0||h.push({key:f.key,label:f.label,tasks:u})}return h}import Wy from"@mui/icons-material/LabelOutlined";import Uy from"@mui/icons-material/NotesOutlined";import Vy from"@mui/icons-material/AutorenewOutlined";import Ky from"@mui/icons-material/CalendarTodayOutlined";import Gy from"@mui/icons-material/EventOutlined";import kd from"@mui/icons-material/PersonOutlineOutlined";import Sd from"@mui/icons-material/PeopleAltOutlined";import Nc from"@mui/icons-material/CheckCircleOutlineOutlined";import Yy from"@mui/icons-material/FlagOutlined";import Lc from"@mui/icons-material/AccessTimeOutlined";import Xy from"@mui/icons-material/StickyNote2Outlined";import Zy from"@mui/icons-material/ViewKanbanOutlined";import Jy from"@mui/icons-material/ConfirmationNumberOutlined";import Qy from"@mui/icons-material/QuestionAnswerOutlined";import{jsx as fr}from"react/jsx-runtime";var Td={completed:"50px",ticket_no:"100px",title:"minmax(220px, 1.8fr)",status:"110px",start_date:"132px",due_date:"132px",manager_name:"110px",receiver_names:"170px",answerer_names:"110px",targets:"170px",priority:"84px",ack:"104px",confirm:"100px",project:"150px",request:"100px",deleted_time:"150px",completed_time:"150px",created_time:"132px",note:"minmax(140px, 0.7fr)",origin_license_name:"150px",support_type:"90px",author_name:"110px"};function Cd(e){return Ka(e).map(d=>Td[d.id]).join(" ")}function Bd(e){return Ka(e).reduce((d,b)=>{let l=Td[b.id]??"",o=/^(\d+)px$/.exec(l);if(o)return d+Number(o[1]);let s=/^minmax\((\d+)px/.exec(l);return s?d+Number(s[1]):d},0)}var ex={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:fr(Lc,{sx:{fontSize:15}}),align:"center",sortable:!0},tx={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:fr(Lc,{sx:{fontSize:15}}),align:"center",sortable:!0},rx={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:fr(Lc,{sx:{fontSize:15}}),align:"center",sortable:!0},nx={id:"ticket_no",label:"\uD2F0\uCF13",icon:fr(Jy,{sx:{fontSize:15}}),align:"center"},ox={id:"support_type",label:"\uC885\uB958",icon:fr(Wy,{sx:{fontSize:15}}),align:"center"},ix={id:"author_name",label:"\uC791\uC131\uC790",icon:fr(kd,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},sx={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:fr(Qy,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},ax={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:fr(Zy,{sx:{fontSize:15}}),projectFilter:!0},lx={id:"targets",label:"\uB300\uC0C1\uC790",icon:fr(Sd,{sx:{fontSize:15}})},Pc={id:"priority",label:"\uC911\uC694\uB3C4",icon:fr(Yy,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},cx={id:"ack",label:"\uD655\uC778",icon:fr(Nc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},ux={id:"confirm",label:"\uD655\uC778",icon:fr(Nc,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Dc(e){let d=e.findIndex(l=>l.id==="receiver_names"||l.id==="targets"),b=d>=0?d+1:e.findIndex(l=>l.id==="note");return b<0?[...e,Pc]:[...e.slice(0,b),Pc,...e.slice(b)]}function Ka(e){let{showProject:d=!1,showManager:b=!0,showActions:l=!0,showRequest:o=!0,notice:s=!1,bug:r=!1,support:t=!1,centerManager:n=!1,trash:c=!1,confirmMode:i="none"}=e??{};if(t){let u=g=>Va.find(m=>m.id===g);return[u("completed"),ox,u("title"),u("status"),rx,u("start_date"),u("due_date"),ix,sx,{...u("manager_name"),align:"center"},u("receiver_names"),Pc]}let a=u=>{if(!r)return u;let g=u.filter(k=>k.id!=="note"),m=g.findIndex(k=>k.id==="completed"),x=m>=0?m+1:0;return[...g.slice(0,x),nx,...g.slice(x)]};if(s)return a(Dc(Va.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,lx]:u.id==="note"?[cx,u]:[u])));let h=b?Va:Va.filter(u=>u.id!=="manager_name");if(n&&(h=h.map(u=>u.id==="manager_name"?{...u,align:"center"}:u)),l)o||(h=h.filter(u=>u.id!=="request"));else{h=h.filter(g=>g.id!=="request");let u=h.findIndex(g=>g.id==="note");h=[...h.slice(0,u),c?ex:tx,...h.slice(u)]}if(i==="action"){let u=h.findIndex(g=>g.id==="note");h=[...h.slice(0,u),ux,...h.slice(u)]}if(!d)return a(Dc(h));let f=h.findIndex(u=>u.id==="receiver_names");return a(Dc([...h.slice(0,f+1),ax,...h.slice(f+1)]))}var Va=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:fr(Uy,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:fr(Vy,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:fr(Ky,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:fr(Gy,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:fr(kd,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:fr(Sd,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:fr(Nc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:fr(Xy,{sx:{fontSize:15}})}];import{Button as Id,ClickAwayListener as hx,Dialog as px,Paper as mx,Popper as gx,Typography as bx,Box as yx}from"@mui/material";import{useMediaQuery as fx,useTheme as dx}from"@mui/material";function zt(){let{isMobile:e}=yt(),d=dx(),b=fx(d.breakpoints.up("lg"));return e!==void 0?e:!b}import{Fragment as vx,jsx as Uo,jsxs as Ed}from"react/jsx-runtime";function Md(){if(typeof document>"u")return;let e=0,d=l=>{l.stopPropagation(),l.preventDefault(),b()},b=()=>{window.clearTimeout(e),document.removeEventListener("click",d,!0)};document.addEventListener("click",d,!0),e=window.setTimeout(b,350)}function xx({title:e,content:d,confirmText:b,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return Ed(vx,{children:[Uo(bx,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),d,Ed(yx,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[Uo(Id,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{Md(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),Uo(Id,{size:"medium",variant:"contained",color:"primary",onClick:()=>{Md(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:b})]})]})}function jt({open:e,anchorEl:d,title:b="\uD655\uC778\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",content:l,confirmText:o="\uD655\uC778",cancelText:s="\uCDE8\uC18C",placement:r="top",minWidth:t=160,minHeight:n,titleFontSize:c=17,actionFontSize:i=16,actionMinHeight:a=44,zIndex:h=1300,onCancel:f,onConfirm:u}){let g=zt(),m=Uo(xx,{title:b,content:l,confirmText:o,cancelText:s,titleFontSize:c,actionFontSize:i,actionMinHeight:a,onCancel:f,onConfirm:u});return g?Uo(px,{open:e,onClose:f,sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:m}):Uo(gx,{open:e,anchorEl:d,placement:r,sx:{zIndex:h},children:Uo(hx,{onClickAway:f,children:Uo(mx,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:t,minHeight:n,justifyContent:n?"space-between":"flex-start"},onClick:x=>x.stopPropagation(),onMouseDown:x=>x.stopPropagation(),children:m})})})}import{useEffect as wx,useState as _x}from"react";import{Box as kx,TextField as Sx}from"@mui/material";import{jsx as zc}from"react/jsx-runtime";function en(e,d){if(!e.completed||d<=0||(e.author_account_seq??0)!==d)return!1;let b=e.completed_by_account??0;return b>0&&b!==d}function tn({open:e,anchorEl:d,nextCompleted:b,returnMode:l=!1,onCancel:o,onConfirm:s}){let[r,t]=_x("");wx(()=>{e&&t("")},[e]);let n=!b&&l;return zc(jt,{open:e,anchorEl:d,title:n?`\uC644\uB8CC\uB97C \uB418\uB3CC\uB9AC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
30
30
|
\uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC \uCC98\uB9AC\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.`:b?"\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:n?"\uB418\uB3CC\uB9AC\uAE30":b?"\uC644\uB8CC":"\uD574\uC81C",content:n?zc(kx,{sx:{mt:1},children:zc(Sx,{autoFocus:!0,fullWidth:!0,multiline:!0,minRows:2,size:"small",placeholder:"\uB418\uB3CC\uB9AC\uB294 \uC0AC\uC720\uB97C \uC785\uB825\uD558\uC138\uC694 (\uD544\uC218)",value:r,onChange:c=>t(c.target.value),onClick:c=>c.stopPropagation(),onKeyDown:c=>c.stopPropagation(),sx:{"& .MuiInputBase-input":{fontSize:13.5}}})}):void 0,onCancel:o,onConfirm:()=>{n&&!r.trim()||s(n?r.trim():"")}})}import{memo as Yx}from"react";function On(e){let d=e.visibility;return d==="involved"||d==="group"||d==="all"?d:e.is_open?"all":"involved"}function Ga(e,d,b=0){if(d<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===d)return!0;let s=(e.target_account_seqs??[]).filter(r=>r>0);return s.length===0||s.includes(d)}if((e.author_account_seq??0)===d||(e.manager_account_seq??0)===d||(e.receiver_account_seqs??[]).includes(d))return!0;let o=On(e);if(o==="all")return!0;if(o==="group"){let s=e.visibility_group_seq??0;return s>0&&b===s}return!1}function Rd(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:On(e)!=="involved"}function Ya(e,d){return d<=0||(e.author_account_seq??0)===d?!1:Rd(e)}function Xa(e,d){return d<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||(e.author_account_seq??0)===d||Rd(e)?!1:(e.receiver_account_seqs??[]).includes(d)}function Od(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function Ad(e){return(e.origin_license_seq??0)>0}function Dd(e,d){if(d<=0)return!1;let b=(e.author_account_seq??0)===d;return e.is_notice?b:b||(e.manager_account_seq??0)===d}function yo(e,d){return d<=0?!1:Ad(e)?!0:e.is_notice?(e.author_account_seq??0)===d:(e.author_account_seq??0)===d||(e.manager_account_seq??0)===d||(e.receiver_account_seqs??[]).includes(d)}var KI=[119,121,141,143];function Za(e,d){let b=String(e.origin_author_avatar??"").trim(),l=String(e.author_name||e.origin_author_name||e.created_by||"").trim();if(!b||!l||!Ad(e)||d?.get(l)===b)return d;let o=new Map(d??[]);return o.set(l,b),o}import{memo as zx,useEffect as jx,useRef as Fx,useState as $d}from"react";import{Box as wt,Button as qx,ButtonBase as $x,Checkbox as Hx,Tooltip as Fi}from"@mui/material";import Wx from"@mui/icons-material/PublicOutlined";import Ux from"@mui/icons-material/Group";import Vx from"@mui/icons-material/CheckCircle";import Kx from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as Tx,useState as Pd}from"react";import{Avatar as Nd,Box as Cx}from"@mui/material";import Bx from"@mui/icons-material/PersonOutlineOutlined";import{jsx as Ja}from"react/jsx-runtime";var jc=new Set,Ld=e=>e.startsWith("data:")||e.startsWith("blob:");function Ix(e){let d=e.trim();return d?([...d][0]??"").toUpperCase():""}function vn({src:e,name:d="",avatarSx:b,iconFontSize:l=40}){let[o,s]=Pd(()=>e?Ld(e)||jc.has(e):!1),[r,t]=Pd(!1),n={position:"relative",overflow:"hidden",borderRadius:"15px"},c=b?[n,...Array.isArray(b)?b:[b]]:n;if(Tx(()=>{t(!1),s(e?Ld(e)||jc.has(e):!1)},[e]),!e||r){let i=Ix(d);return Ja(Nd,{sx:c,children:i?Ja(Cx,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:i}):Ja(Bx,{sx:{fontSize:l}})})}return Ja(Nd,{src:e,imgProps:{onLoad:()=>{jc.add(e),s(!0)},onError:()=>t(!0),style:o?void 0:{opacity:0}},sx:c})}var Mx=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Qa=(e,d)=>{if(!d||!d.trim())return[{text:e,highlight:!1}];try{let b=Mx(d.trim()),l=new RegExp(`(${b})`,"gi");return e.split(l).map(s=>s.toLowerCase()===d.trim().toLowerCase()?{text:s,highlight:!0}:{text:s,highlight:!1}).filter(s=>s.text)}catch{return[{text:e,highlight:!1}]}};var Ex=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function wn(e){let d=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(d))return"";let b=new Date(`${d}T00:00:00`);return Number.isNaN(b.getTime())?"":`${d.slice(2).replaceAll("-",".")} (${Ex[b.getDay()]})`}function Fc(e){let d=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(d))return"";let b=Number(d.slice(5,7)),l=Number(d.slice(8,10));return!b||!l?"":`${b}\uC6D4 ${l}\uC77C`}function fn(e){let d=String(e??"").trim(),[b,l=""]=d.split(" "),o=wn(b);return o?l?`${o} ${l.slice(0,5)}`:o:""}function Li(e,d){let b=(e.checklist??[]).filter(o=>!(d&&o.task_seq&&!d(Number(o.task_seq))));return b.length===0?"":`${b.filter(o=>o.checked).length}/${b.length}`}import{Box as zd,Tooltip as Rx}from"@mui/material";import{jsx as el}from"react/jsx-runtime";var zi=[{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 $r({names:e,size:d=22,ringFirst:b=!1,avatarSrcByName:l}){let o=lt(),s=yt().avatarSrcByName,r=l??s;return el(zd,{sx:{display:"flex",alignItems:"center"},children:e.map((t,n)=>el(Rx,{title:b&&n===0?`\uCC45\uC784\uC790 \xB7 ${t}`:t,arrow:!0,children:el(zd,{sx:{ml:n===0?0:"-7px",zIndex:n,borderRadius:"50%",border:`2px solid ${o.avatar.separatorColor}`,display:"inline-flex",...o.avatar.sx},children:el(vn,{src:r?.get(t)??"",name:t,avatarSx:{width:d,height:d,fontSize:Math.round(d/2),borderRadius:"50%",...zi[n%zi.length]},iconFontSize:Math.round(d*.6)})})},`${t}-${n}`))})}import{Box as jd,Button as qd}from"@mui/material";import Ox from"@mui/icons-material/CheckCircle";import{Fragment as Px,jsx as Ps,jsxs as Fd}from"react/jsx-runtime";function Ax(e){let d=e.mode==="dark";return{minWidth:0,width:"100%",px:1,py:.25,gap:.5,fontSize:13,color:e.table.rowColor,borderColor:e.colors.borderStrong,background:d?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:d?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function Dx(e){return{minWidth:0,px:1.25,py:.25,fontSize:13,whiteSpace:"nowrap",color:e.actionButton.color,backgroundColor:e.actionButton.bg,backgroundImage:e.actionButton.bgImage,boxShadow:"none","&:hover":{backgroundColor:e.actionButton.hoverBg,backgroundImage:e.actionButton.hoverBgImage,boxShadow:"none"},...e.actionButton.sx}}function Vn({onClick:e,children:d,fullWidth:b=!1,sx:l}){let o=lt();return Ps(qd,{size:"small",variant:"contained",color:"inherit",fullWidth:b,sx:[Dx(o),...Array.isArray(l)?l:l?[l]:[]],onClick:s=>{s.stopPropagation(),e(s)},children:d})}function ji({canConfirm:e,count:d,total:b,myConfirmed:l=!1,onConfirm:o,onShowList:s}){let r=lt(),t=Ax(r);return e?Ps(Vn,{onClick:()=>o(),children:"\uD655\uC778"}):Fd(qd,{size:"small",variant:"outlined",color:"inherit",sx:t,onClick:n=>{n.stopPropagation(),s(n.currentTarget)},children:[l?Ps(Ox,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,Ps(jd,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:b>0&&d>=b?"\uD655\uC778\uC644\uB8CC":Fd(Px,{children:[d,Ps(jd,{component:"span",sx:{mx:.15},children:"/"}),b]})})]})}import{SvgIcon as Nx}from"@mui/material";import{jsx as tl,jsxs as Lx}from"react/jsx-runtime";function Vo({sx:e,...d}){return Lx(Nx,{viewBox:"0 0 48 48",...d,sx:{fill:"none",...e},children:[tl("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"}),tl("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),tl("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),tl("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as Hc,jsx as je,jsxs as $i}from"react/jsx-runtime";function Ns(e){let d=String(e??"").trim();if(!d)return"-";let b=d.slice(2,10).replaceAll("-","."),l=d.slice(11,16);return/^\d{2}:\d{2}$/.test(l)?`${b} ${l}`:b}function Gx(e){let d=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(d)?Ns(`${String(e.due_date??"").slice(0,10)} ${d}`):Ns(e.due_date)}function $c(e,d){let b=String(e??"").trim()||"-";return Qa(b,d).map((l,o)=>je("span",{className:l.highlight?"font-semibold text-blue-600":void 0,children:l.text},`${l.text}-${o}`))}function qi({names:e,searchText:d,avatarSrcByName:b,emphasize:l=!1}){let o=e.filter(s=>s.trim());if(o.length===0)return null;if(o.length===1){let s=o[0]??"";return $i(Hc,{children:[je(vn,{src:b?.get(s)??"",name:s,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...zi[0]},iconFontSize:15}),je(wt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l?{fontWeight:500,color:"#2f80ed"}:{}},children:$c(s,d)})]})}return je($r,{names:o,size:22,avatarSrcByName:b})}function Hd({display:e,summary:d,searchText:b,avatarSrcByName:l}){if(!e||e.kind==="everyone")return je(wt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:o,individualNames:s}=e;if(o.length===0)return je(qi,{names:s,searchText:b,avatarSrcByName:l});let r=[...o,...s],t=r.join(", ");return r.length>2?je(Fi,{title:t,arrow:!0,children:je(wt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${r[0]}, ${r[1]} \uC678 ${r.length-2}\uBA85`})}):je(Fi,{title:t,arrow:!0,children:$i(wt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[je(wt,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.join(", ")+(s.length>0?",":"")}),s.length>0?je(qi,{names:s,searchText:b,avatarSrcByName:l}):null]})})}function rl(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function Wd(e){return e==="\uBB38\uC758"?{bg:"#e8f1fd",fg:"#2f80ed"}:e==="\uAC74\uC758\uC0AC\uD56D"?{bg:"#f1ecfe",fg:"#8b5cf6"}:e==="\uC624\uB958\uC81C\uBCF4"?{bg:"#fdecec",fg:"#e5484d"}:e==="\uC0C1\uB2F4\uC2E0\uCCAD"?{bg:"#e6f7ec",fg:"#1f8a4c"}:{bg:"#f1f1ef",fg:"#6f6f6c"}}function qc({label:e,bg:d,fg:b}){return je(wt,{component:"span",sx:{flexShrink:0,px:.75,fontSize:12,fontWeight:500,lineHeight:"20px",color:b,bgcolor:d,borderRadius:"4px",whiteSpace:"nowrap",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:e})}var Ud=zx(function({task:d,gridTemplate:b,statusOptions:l,avatarSrcByName:o,searchText:s,myAccountSeq:r=0,todayStr:t,showProject:n=!1,showManager:c=!0,showActions:i=!0,showRequest:a=!0,confirmMode:h="none",bugMode:f=!1,supportMode:u=!1,managerCentered:g=!1,trashMode:m=!1,dimCompleted:x=!0,confirmInfo:k,onConfirmTask:B,projectLabel:R="",projectIcon:L="",onProjectClick:A,onRequestToggleCompleted:D,onDateClick:N,onChangeNote:q,onMemberClick:j,onClaimClick:S,onVolunteerClick:T,onStatusClick:P,onOpenDetail:p,onTaskContextMenu:y,hideBottomBorder:v=!1,completeLocked:w=!1,unread:_=!1,notice:C=!1,noticeReadOnly:O=!1,readOnly:z=!1,onIconClick:$,lastColumnCentered:V=!1,noteLocked:E=!1,targetSummary:H="",targetDisplay:I,onArchiveTask:M,ackInfo:F,onAckConfirm:U,onAckListClick:Y,onPriorityClick:G}){let[W,X]=$d(!1),[Z,K]=$d(""),ee=Fx(null);jx(()=>{if(!W)return;let te=Se=>{let ge=ee.current;ge&&(Se.target instanceof Node&&ge.contains(Se.target)||ge.blur())};return document.addEventListener("mousedown",te,!0),document.addEventListener("touchstart",te,!0),()=>{document.removeEventListener("mousedown",te,!0),document.removeEventListener("touchstart",te,!0)}},[W]);let J=[d.manager_account_seq??0,...d.receiver_account_seqs??[]].some(te=>te>0&&te!==(d.author_account_seq??0)),re=O||z,ie=r>0&&!d.is_notice&&!d.is_event&&(d.manager_account_seq??0)===r,ae=re||!!d.is_notice,oe=lt(),he=!!S&&Ya(d,r),pe=!!T&&Xa(d,r),_e=ae&&!Od(d),De=d.is_notice?je(ji,{canConfirm:!!F?.canAck,count:F?.count??0,total:F?.total??0,myConfirmed:!!F?.acked,onConfirm:()=>U?.(d),onShowList:te=>Y?.(d,te)}):null,Ce=!d.is_notice&&!d.completed&&!!d.due_date&&d.due_date.slice(0,10)<=t,Ee=Li(d,yt().resolveTask),ot=Ce?"#e5484d":oe.colors.textPrimary,ye=je(wt,{className:"cell",onClick:re?void 0:te=>N(d,"due_date",te.currentTarget),sx:{justifyContent:"center",color:ot,fontWeight:500,whiteSpace:"nowrap",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:d.due_date?Gx(d):null});return $i(wt,{onContextMenu:te=>y(d,te),sx:{display:"grid",gridTemplateColumns:b,minHeight:48,position:"relative",fontSize:15,bgcolor:oe.table.rowBg,color:oe.table.rowColor,borderBottom:v?"none":`1px solid ${oe.table.rowBorderColor}`,"&:hover":{bgcolor:oe.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${oe.table.rowBorderColor}`},"& > .cell:first-of-type":{px:1.5},"& > .cell:last-of-type":{borderRight:"none",pr:2,...V?{pl:2}:{}}},children:[je(wt,{className:"cell",sx:{justifyContent:"center"},children:d.is_event?(()=>{let te=Tt(d.icon||cr);if(!te)return null;let Se=je(te,{sx:{fontSize:19,color:d.icon_color||"#1e3a8a"}});return re||!$?Se:je(Fi,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:je($x,{onClick:ge=>{ge.stopPropagation(),$(d,ge.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:oe.table.cellHoverBg}},children:Se})})})():!O&&!w&&!m?je(Fi,{title:d.completed&&d.completed_by?`${d.completed_by} \xB7 ${fn(d.completed_time)} \uC644\uB8CC`:d.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(Hx,{checked:d.completed,inputProps:{"aria-label":d.completed?`${d.title} \uC644\uB8CC \uD574\uC81C`:`${d.title} \uC644\uB8CC \uCC98\uB9AC`},icon:je(Kx,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:je(Vx,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:te=>te.stopPropagation(),onChange:(te,Se)=>D({anchorEl:te.currentTarget,task:d,nextCompleted:Se}),sx:{p:.5}})}):null}),f?je(wt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:d.ticket_no||"-"}):null,u?je(wt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:d.support_type?(()=>{let te=Wd(d.support_type);return je(qc,{label:rl(d.support_type),bg:te.bg,fg:te.fg})})():"-"}):null,$i(wt,{className:"cell",onClick:()=>p(d),sx:{gap:1,pl:2,cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}},children:[(()=>{if(!d.is_notice)return null;let te=Tt(d.icon||sr);return te?je(te,{sx:{fontSize:18,flexShrink:0,color:d.icon_color||"#e5484d"}}):null})(),!u&&d.is_support&&d.support_type?(()=>{let te=Wd(d.support_type);return je(qc,{label:rl(d.support_type),bg:te.bg,fg:te.fg})})():null,f&&(d.origin_license_seq??0)>0&&d.origin_license_name?je(qc,{label:d.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(d.is_notice||u||d.is_support)return null;let te=On(d);return te==="involved"?null:je(Fi,{title:te==="all"?"\uC804\uCCB4\uACF5\uAC1C \u2014 \uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4":"\uBD80\uC11C\uACF5\uAC1C \u2014 \uC9C0\uC815\uD55C \uBD80\uC11C\uC758 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",arrow:!0,disableInteractive:!0,children:te==="all"?je(Wx,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):je(Ux,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),je(wt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:d.completed&&x?400:oe.table.rowTitleFontWeight,color:d.completed&&x?oe.colors.textMuted:oe.table.rowTitleColor,textDecoration:d.completed&&x?"line-through":"none"},children:$c(d.title,s)}),Ee?je(wt,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:oe.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:Ee}):null,(d.comment_count??d.comments?.length??0)>0?je(Vo,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,je(wt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:je(Wo,{labelKeys:d.label_keys??[],labelOptions:l})}),_&&!d.completed?je(wt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,Fa(d)&&!d.archived&&!re&&M?je(qx,{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:te=>{te.stopPropagation(),M(d)},children:"\uBCF4\uAD00"}):null]}),(()=>{let te=re||!!d.is_event||!!d.completed;return je(wt,{className:"cell",onClick:te?void 0:Se=>P(d,Se.currentTarget),sx:{py:.5,justifyContent:"center",...te?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:d.is_event?(()=>{let Se=Os(d);return Se?je(Pt,{option:Se}):null})():je(Pt,{option:ur(d)})})})(),u?je(wt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Ns(d.created_time)}):null,je(wt,{className:"cell",onClick:re?void 0:te=>N(d,"start_date",te.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Ns(d.start_date)}),ye,u?$i(Hc,{children:[je(Fi,{title:d.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(wt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(qi,{names:[d.author_name||d.origin_author_name||d.created_by||""],searchText:s,avatarSrcByName:Za(d,o)})})}),je(wt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(qi,{names:(d.answerer_names??[]).slice(0,1),searchText:s,avatarSrcByName:o})})]}):null,C?je(wt,{className:"cell",onClick:re?void 0:()=>j(d,"targets"),sx:{gap:.75,...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:je(Hd,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&d.is_notice?je(wt,{className:"cell",onClick:re?void 0:()=>j(d,"targets"),sx:{gridColumn:c?"span 2":"auto",gap:.75,...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:je(Hd,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&!d.is_notice&&!d.is_event&&c?je(wt,{className:"cell",onClick:_e?void 0:()=>j(d,"manager"),sx:{gap:.75,...he||pe||g?{justifyContent:"center"}:{},..._e?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:he?je(Vn,{onClick:te=>S?.(d,te.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):pe?je(Vn,{onClick:te=>T?.(d,te.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):je(qi,{names:d.manager_name?[d.manager_name]:[],searchText:s,avatarSrcByName:o,emphasize:ie})}):null,!C&&!d.is_notice?je(wt,{className:"cell",onClick:ae?void 0:()=>j(d,"receivers"),sx:{gridColumn:d.is_event&&c?"span 2":"auto",gap:.75,...ae?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:je(qi,{names:d.receiver_names,searchText:s,avatarSrcByName:o})}):null,je(wt,{className:"cell",onClick:re?void 0:te=>G?.(d,te.currentTarget),sx:{py:.5,justifyContent:"center",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:je(qr,{priority:d.priority,plain:!0})}),n?je(wt,{className:"cell",onClick:re?void 0:te=>A?.(d,te.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:R?$i(Hc,{children:[(()=>{let te=Tt(L);return te?je(te,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),je(wt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R})]}):null}):null,C?je(wt,{className:"cell",sx:{justifyContent:"center"},children:De}):null,!C&&i&&a&&!u?je(wt,{className:"cell",sx:{justifyContent:"center"},children:d.is_notice?De:J?je(ji,{canConfirm:!!k?.canConfirm,count:k?.count??0,total:k?.total??0,myConfirmed:!!k?.myTime,onConfirm:()=>B?.(d),onShowList:te=>Y?.(d,te)}):null}):null,!C&&h==="action"?je(wt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:oe.table.rowSubColor},children:d.is_notice?De:k&&k.total>0?je(ji,{canConfirm:!!k.canConfirm,count:k.count,total:k.total,myConfirmed:!!k.myTime,onConfirm:()=>B?.(d),onShowList:te=>Y?.(d,te)}):"-"}):null,!C&&!i?je(wt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:m?oe.colors.danger:x?oe.table.rowSubColor:oe.table.rowTitleColor},children:m?Ns(d.deleted_time):d.completed_time||"-"}):null,f||u?null:je(wt,{className:"cell",onClick:()=>{!E&&!W&&(K(d.note),X(!0))},sx:{color:"#6f6f6c",cursor:E?"default":"text"},children:W?je(wt,{component:"input",ref:ee,autoFocus:!0,spellCheck:!1,value:Z,onChange:te=>K(te.target.value),onBlur:()=>{X(!1),Z.trim()!==d.note&&q(d.seq,Z)},onKeyDown:te=>{te.key==="Enter"&&te.target.blur(),te.key==="Escape"&&(K(d.note),X(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:oe.table.rowTitleColor,caretColor:oe.table.rowTitleColor,p:0,m:0}}):je(wt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.note?$c(d.note,s):""})}),ie?je(wt,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});import{jsx as Xx}from"react/jsx-runtime";var Vd=Yx(function(d){let l=(d.useTaskItem?d.useTaskItem(d.task.seq):void 0)??d.task,{myAccountSeq:o}=d,s=d.projectByKey.get(l.tab_key??"");return Xx(Ud,{hideBottomBorder:d.hideBottomBorder,gridTemplate:d.gridTemplate,task:l,statusOptions:d.statusOptions,avatarSrcByName:d.avatarSrcByName,searchText:d.searchText,myAccountSeq:o,todayStr:d.todayStr,showProject:d.showProject,showManager:d.showManager,showActions:d.showActions,showRequest:d.showRequest,confirmMode:d.confirmMode,confirmInfo:l.is_notice?void 0:d.getConfirmInfo?.(l),onConfirmTask:d.onConfirmTask,projectLabel:s?.label??"",projectIcon:s?.icon??"",onProjectClick:d.onProjectClick,onRequestReply:d.onRequestReply,onRequestToggleCompleted:d.onRequestToggleCompleted,onDateClick:d.onDateClick,onChangeNote:d.onChangeNote,onMemberClick:d.onMemberClick,onClaimClick:d.onClaimClick,onVolunteerClick:d.onVolunteerClick,onStatusClick:d.onStatusClick,onOpenDetail:d.onOpenDetail,onTaskContextMenu:d.onTaskContextMenu,notice:d.notice,bugMode:d.bugMode,supportMode:d.supportMode,managerCentered:d.managerCentered,trashMode:d.trashMode,dimCompleted:d.dimCompleted,noticeReadOnly:!yo(l,o),readOnly:d.readOnly,noteLocked:d.readOnly||(l.is_notice?!Ga(l,o):!yo(l,o)),completeLocked:l.is_event?!0:l.is_notice?(l.author_account_seq??0)!==o:(l.author_account_seq??0)!==o&&(l.manager_account_seq??0)!==o,targetSummary:l.is_notice?d.getTargetSummary?.(l):void 0,targetDisplay:l.is_notice?d.getTargetDisplay?.(l):void 0,onArchiveTask:d.onArchiveTask,unread:d.isTaskUnread?.(l)??!1,ackInfo:l.is_notice?d.getAckInfo?.(l):void 0,onAckConfirm:d.onAckConfirm,onAckListClick:d.onAckListClick,onPriorityClick:d.onPriorityClick,onIconClick:d.onIconClick,lastColumnCentered:d.lastColumnCentered})});import{useMemo as Kd,useState as Uc}from"react";import{Box as fi,Button as Gd,ButtonBase as Yd,Dialog as Qx,Divider as Vc,Menu as e2,MenuItem as t2,Popover as r2}from"@mui/material";import Xd from"@mui/icons-material/ChevronRight";import n2 from"@mui/icons-material/Check";import o2 from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as i2,TimePicker as s2}from"@ehfuse/mui-datetime-picker";import a2 from"@mui/icons-material/TimerOutlined";import{useEffect as Zx,useState as Jx}from"react";function Kn(e){let{loadHolidays:d}=yt(),[b,l]=Jx(()=>new Map),o=e.join(",");return Zx(()=>{if(!d||!o){l(new Map);return}let s=!1;return d(o.split(",").map(Number)).then(r=>{if(s)return;let t=new Map;for(let n of r)t.has(n.date)||t.set(n.date,n.name);l(t)}).catch(()=>{}),()=>{s=!0}},[d,o]),b}var Wc=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function Gn(e){let d=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],b=new Set;for(let l of d){let o=String(l??"").trim();Wc.includes(o)&&b.add(o)}return Wc.filter(l=>b.has(l))}function nl(e,d){if(d==="none")return[];let b=e.includes(d)?e.filter(l=>l!==d):[...e,d];return Wc.filter(l=>b.includes(l))}import{Fragment as Zd,jsx as Ar,jsxs as An}from"react/jsx-runtime";var l2=9,c2=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],Jd=[{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"}],Qd=[{value:"none",label:"\uC5C6\uC74C"},...c2,...Jd];function Kc(e){return e?Qd:[{value:"none",label:"\uC5C6\uC74C"},...Jd]}function u2(e){return e==="same_day"?"\uB2F9\uC77C":Qd.find(d=>d.value===e)?.label??"\uC5C6\uC74C"}function Gc(e){if(e.length===0)return"\uC5C6\uC74C";let d=e.map(b=>u2(b));return d.length<=3?d.join(", "):`${d.slice(0,3).join(", ")} \uC678 ${d.length-3}`}function f2(e){let d=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(d.getTime())?new Date:d}function _n({anchorEl:e,open:d,date:b,reminders:l,hideReminder:o=!1,showTime:s=!1,centered:r=!1,onClose:t,onDateChange:n,onReminderChange:c}){let[i,a]=Uc(null),[h,f]=Uc(null),u=Un(),g=String(b??"").trim().slice(0,10),m=String(b??"").trim().slice(11,16),x=/^\d{2}:\d{2}$/.test(m)?m:"",k=(S,T)=>n(T?`${S} ${T}`:S),{defaultDueHour:B}=yt(),R=`${String(Number.isInteger(B)&&B>=0&&B<=23?B:l2).padStart(2,"0")}:00`,[L,A]=Uc(()=>{let S=Number(g.slice(0,4));return Number.isFinite(S)&&S>1900?S:new Date().getFullYear()}),D=Kd(()=>[L-1,L,L+1],[L]),N=Kn(D),q=Kd(()=>{let S=[];for(let T of N.keys()){let P=new Date(`${T}T00:00:00`);Number.isNaN(P.getTime())||S.push(P)}return S},[N]),j=An(fi,{sx:{width:300,maxWidth:"100%"},children:[Ar(fi,{sx:{height:320},children:Ar(i2,{selectedDate:f2(g),onSelect:S=>{k(wr(S),s?x||R:x),s||t()},onClose:t,showFooter:!1,autoApply:!0,holidays:q,onYearChange:S=>A(S),onMonthChange:(S,T)=>{typeof T=="number"&&A(T)}})}),s?An(Zd,{children:[Ar(Vc,{sx:{borderColor:"#e6e6e3"}}),An(Yd,{onClick:S=>f(S.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[An(fi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Ar(a2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),An(fi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[x||"\uC5C6\uC74C",Ar(Xd,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Ar(s2,{anchorEl:h,open:!!h,onClose:()=>f(null),centered:r,value:{hour:x.slice(0,2)||R.slice(0,2),minute:x.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(S,T)=>{k(g||wr(new Date),`${S}:${T}`),f(null)}})]}):null,o?null:An(Zd,{children:[Ar(Vc,{sx:{borderColor:"#e6e6e3"}}),An(Yd,{onClick:S=>a(S.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[An(fi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Ar(o2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),An(fi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[Gc(l),Ar(Xd,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Ar(e2,{transitionDuration:0,anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...u,children:Kc(!!x).map(S=>{let T=S.value==="none"?l.length===0:l.includes(S.value);return An(t2,{selected:T,onClick:()=>{c(nl(l,S.value)),S.value==="none"&&a(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[S.label,T?Ar(n2,{sx:{fontSize:16,color:"#2f80ed"}}):null]},S.value)})})]}),Ar(Vc,{sx:{borderColor:"#e6e6e3"}}),An(fi,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[Ar(Gd,{size:"small",onClick:()=>{k(wr(new Date),x),t()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),Ar(Gd,{size:"small",onClick:t,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return r?Ar(Qx,{open:d,onClose:t,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:j}):Ar(r2,{transitionDuration:0,open:d,anchorEl:e,onClose:t,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:j})}import{useEffect as p2,useState as Xc}from"react";import{Box as di,Button as m2,Switch as g2}from"@mui/material";import{FormDialog as b2}from"@ehfuse/mui-form-dialog";import{ClearTextField as y2}from"@ehfuse/mui-form-controls";import{ErrorAlert as x2}from"@ehfuse/alerts";import{Box as d2,ButtonBase as h2}from"@mui/material";import{jsx as Yc}from"react/jsx-runtime";function ol({value:e,onChange:d}){return Yc(d2,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:_c.map(({key:b,Icon:l})=>{let o=b===e;return Yc(h2,{onClick:()=>d(b),sx:{display:"flex",alignItems:"center",justifyContent:"center",height:40,minWidth:40,borderRadius:1,border:o?"2px solid #2563eb":"1px solid #dedddb",bgcolor:o?"#eef4ff":"#fff",color:o?"#1e3a8a":"#787774","&:hover":{bgcolor:o?"#eef4ff":"#f4f4f2"}},children:Yc(l,{sx:{fontSize:20}})},b)})})}import{jsx as xo,jsxs as Zc}from"react/jsx-runtime";function il({open:e,title:d="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:b="",initialIcon:l=wc,confirmText:o="\uCD94\uAC00",initialUseSprints:s=!1,onClose:r,onSubmit:t}){let[n,c]=Xc(""),[i,a]=Xc(wc),[h,f]=Xc(!1);p2(()=>{e&&(c(b),a(l),f(s))},[e]);let u=()=>{let m=n.trim();if(!m){x2("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i,h),r()};return xo(b2,{open:e,onClose:r,maxWidth:"xs",title:d,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:Zc(di,{children:[xo(y2,{label:"\uD504\uB85C\uC81D\uD2B8 \uC774\uB984",value:n,onChange:m=>c(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),u())},fullWidth:!0,autoFocus:!0,sx:{mt:.5}}),xo(di,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),xo(di,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:xo(ol,{value:i,onChange:a})}),Zc(di,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[Zc(di,{children:[xo(di,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),xo(di,{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)"})]}),xo(g2,{checked:h,onChange:(m,x)=>f(x)})]})]})}],actions:{showCancelButton:!0,right:xo(m2,{variant:"contained",onClick:u,children:o})}})}import{Box as v2}from"@mui/material";import{jsx as w2}from"react/jsx-runtime";function sl({size:e=40}){return w2(v2,{sx:{boxSizing:"border-box",width:e,height:e,borderRadius:"50%",border:"4px solid rgba(28, 64, 125, 0.14)",borderTopColor:"#1c407d",animation:"taskbox-content-loading-spin 0.75s linear infinite","@keyframes taskbox-content-loading-spin":{to:{transform:"rotate(360deg)"}}}})}import{Box as Jc,ButtonBase as _2,Divider as k2,Popover as S2}from"@mui/material";import T2 from"@mui/icons-material/Check";import C2 from"@ehfuse/overlay-scrollbar";import{jsx as hi,jsxs as eh}from"react/jsx-runtime";var Qc=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Ko({anchorEl:e,value:d,color:b="",onSelect:l,onSelectColor:o,onClose:s}){return hi(S2,{transitionDuration:0,open:!!e,anchorEl:e,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:eh(Jc,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[hi(C2,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:hi(ol,{value:d||go,onChange:r=>{l(r),s()}})}),o?eh(Jc,{sx:{px:1.25,pb:1.25},children:[hi(k2,{sx:{mb:1,borderColor:"#efefed"}}),hi(Jc,{sx:{display:"grid",gridTemplateColumns:`repeat(${Qc.length}, 1fr)`,justifyItems:"center"},children:Qc.map(r=>{let t=(b||Qc[0])===r;return hi(_2,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${r}`,onClick:()=>o(r),sx:{width:"100%",maxWidth:26,aspectRatio:"1 / 1",borderRadius:"50%",bgcolor:r,display:"flex",alignItems:"center",justifyContent:"center"},children:t?hi(T2,{sx:{fontSize:15,color:"#ffffff"}}):null},r)})})]}):null]})})}import{jsx as gt,jsxs as Dn}from"react/jsx-runtime";var nh=48,z2=5;function oh({tasks:e,statusOptions:d,avatarSrcByName:b,searchText:l,todayStr:o,sortBy:s,sortDirection:r,onSort:t,onRequestReply:n,onToggleCompleted:c,onChangeTaskDate:i,onChangeTaskReminder:a,groupBy:h,collapsedGroupKeys:f,customTabs:u,onToggleGroup:g,hideCompleted:m=!1,loading:x=!1,dimCompleted:k=!0,readOnly:B=!1,onChangeTaskIcon:R,onChangeTaskIconColor:L,onAddInGroup:A,canAddInGroup:D,renderGroupSummary:N,renderGroupTitleSummary:q,onChangeTaskProject:j,onAddProject:S,onChangeNote:T,onMemberClick:P,onClaimTask:p,onChangeTaskStatus:y,onOpenDetail:v,onTaskContextMenu:w,onMemberFilterClick:_,activeMemberFilters:C=[],onStatusFilterClick:O,statusFilterActive:z=!1,onAckFilterClick:$,ackFilterActive:V=!1,onProjectFilterClick:E,projectFilterActive:H=!1,onPriorityFilterClick:I,priorityFilterActive:M=!1,onValueFilterClick:F,activeValueFilters:U=[],columns:Y,getConfirmInfo:G,onConfirmTask:W,myAccountSeq:X=0,currentUserName:Z="",groupManagerByMyRole:K=!1,pinKindGroups:ee=!1,allowManagerVolunteer:J=!0,noticeAdmin:re=!1,getTargetSummary:ie,getTargetDisplay:ae,onArchiveTask:oe,isTaskUnread:he,getAckInfo:pe,onAckConfirm:_e,onAckListClick:De,onChangeTaskPriority:Ce,onEndReached:Ee,useTaskItem:ot}){let ye=lt(),te=Xn(()=>({showManager:!0,showActions:!0,showRequest:!0,...Y}),[Y]),Se=te.showManager??!0,ge=te.showActions??!0,ve=te.showRequest??!0,Ge=te.confirmMode??"none",Le=te.notice??!1,He=te.bug??!1,yr=te.support??!1,We=yr||(te.centerManager??!1),Ue=te.trash??!1,_t=h!=="none",et=Xn(()=>_t?Ua(e,h,o,u,d,Z,{enabled:K,myAccountSeq:X},ee):[],[_t,e,h,o,u,d,Z,K,X,ee]),Re=Xn(()=>m?e.filter(de=>!de.completed):e,[e,m]),be=Xn(()=>Re.filter(de=>de.completed||de.archived?!1:de.is_notice?!!pe?.(de).canAck:!!G?.(de).canConfirm),[Re,pe,G]),me=Xn(()=>new Set(be.map(de=>de.seq)),[be]),Be=Xn(()=>et.map(de=>({section:de,visibleTasks:de.tasks.filter(Ne=>!me.has(Ne.seq)&&(!m||!Ne.completed))})).filter(de=>de.visibleTasks.length>0),[et,m,me]),Je=Xn(()=>new Set(f),[f]),Fe=Xn(()=>{let de=[];if(_t)for(let{section:Ne,visibleTasks:bt}of Be){let Xt=Je.has(Ne.key);if(de.push({kind:"header",section:Ne,visibleTasks:bt,collapsed:Xt}),!Xt)for(let Or of bt)de.push({kind:"task",task:Or,last:!1})}else for(let Ne of Re)me.has(Ne.seq)||de.push({kind:"task",task:Ne,last:!1});for(let Ne=de.length-1;Ne>=0;Ne-=1){let bt=de[Ne];if(bt.kind==="task"){bt.last=!0;break}}return de},[_t,Be,Re,Je,me]),Oe=te.showProject??(!Le&&h!=="tab"),Mt=Xn(()=>Ka({...te,showProject:Oe}),[te,Oe]),Ve=Cd({...te,showProject:Oe}),ne=Bd({...te,showProject:Oe}),{onReturnTask:ce}=yt(),ue=eu(null),ke=eu(null),ct=Mt[Mt.length-1]?.align==="center",Me=Xn(()=>{let de=new Map;for(let Ne of u)de.set(Ne.key,{label:Ne.archived?`${Ne.label} (\uBCF4\uAD00\uB428)`:Ne.label,icon:Ne.icon});return de},[u]),Pe=eu(null),[Xe,Ke]=Zn(null);Ls(()=>{if(!Xe)return;let de=()=>{ue.current&&(ue.current.scrollLeft=Xe.scrollLeft),ke.current&&(ke.current.scrollLeft=Xe.scrollLeft)};return de(),Xe.addEventListener("scroll",de,{passive:!0}),()=>Xe.removeEventListener("scroll",de)},[Xe]);let Ie=Re.length>0;Ls(()=>{if(!Ie){Ke(null);return}let de=window.requestAnimationFrame(()=>{Ke(Pe.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(de)},[Ie]);let Qe=`${h}|${s}|${r}|${l}|${m?1:0}`;Ls(()=>{Xe&&(Xe.scrollTop=0)},[Qe,Xe]);let[it,dt]=Zn(!1);Ls(()=>{if(!Xe)return;let de=()=>dt(Xe.scrollHeight-Xe.clientHeight>4),Ne=window.requestAnimationFrame(de),bt=new ResizeObserver(de);return bt.observe(Xe),Xe.firstElementChild&&bt.observe(Xe.firstElementChild),()=>{window.cancelAnimationFrame(Ne),bt.disconnect()}},[Xe,Fe.length,f.length]),Ls(()=>{if(!Xe)return;let de=Xe.clientHeight,Ne=new ResizeObserver(()=>{let bt=Xe.clientHeight;bt!==de&&(de=bt,Xe.dispatchEvent(new Event("scroll")))});return Ne.observe(Xe),()=>Ne.disconnect()},[Xe]);let[nt,At]=Zn(null),[Ot,Bt]=Zn(null),[$t,Vt]=Zn(null),[Q,le]=Zn(null),[xe,fe]=Zn(!1),[Te,qe]=Zn(null),Ae=Te?e.find(de=>de.seq===Te.taskSeq)??null:null,[ut,rt]=Zn(null),se=ut?e.find(de=>de.seq===ut.taskSeq)??null:null,[ze,vt]=Zn(null),It=ze?e.find(de=>de.seq===ze.taskSeq)??null:null,kt=Yn((de,Ne)=>{vt({anchorEl:Ne,taskSeq:de.seq})},[]),Dt=Yn((de,Ne)=>{rt({anchorEl:Ne,taskSeq:de.seq})},[]),vr=Yn((de,Ne)=>{qe({anchorEl:Ne,taskSeq:de.seq})},[]),Jr=Yn((de,Ne)=>{if(!Ne)return;t(de,s===de&&r==="asc"?"desc":"asc")},[t,s,r]),Qr=Yn((de,Ne,bt)=>{At({anchorEl:bt,taskSeq:de.seq,field:Ne,date:de[Ne],isEvent:!!de.is_event,reminders:Gn(de),completed:de.completed})},[]),yn=Yn((de,Ne)=>{le({anchorEl:Ne,task:de})},[]),Wn=Yn(de=>{nt&&(i(nt.taskSeq,nt.field,de),At(Ne=>Ne&&{...Ne,date:de}))},[nt,i]),Oi=Yn(de=>{nt&&(a(nt.taskSeq,de),At(Ne=>Ne&&{...Ne,reminders:de}))},[nt,a]),$o=Yn((de,Ne)=>{Vt({anchorEl:Ne,taskSeq:de.seq,title:de.title,kind:"claim"})},[]),St=Yn((de,Ne)=>{Vt({anchorEl:Ne,taskSeq:de.seq,title:de.title,kind:"volunteer"})},[]),Et=(de,Ne)=>gt(Vd,{task:de,hideBottomBorder:Ne,gridTemplate:Ve,useTaskItem:ot,statusOptions:d,avatarSrcByName:b,searchText:l,myAccountSeq:X,todayStr:o,showProject:Oe,showManager:Se,showActions:ge,showRequest:ve,confirmMode:Ge,notice:Le,bugMode:He,supportMode:yr,managerCentered:We,trashMode:Ue,dimCompleted:k,readOnly:B,projectByKey:Me,getConfirmInfo:G,onConfirmTask:W,onProjectClick:yn,onRequestReply:n,onRequestToggleCompleted:Bt,onDateClick:Qr,onChangeNote:T,onMemberClick:P,onClaimClick:p?$o:void 0,onVolunteerClick:J?St:void 0,onStatusClick:vr,onOpenDetail:v,onTaskContextMenu:w,onPriorityClick:Dt,onIconClick:R?kt:void 0,lastColumnCentered:ct,getTargetSummary:ie,getTargetDisplay:ae,getAckInfo:pe,isTaskUnread:he,onArchiveTask:oe,onAckConfirm:_e,onAckListClick:De},de.seq);return Dn(_r,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${ye.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:ye.table.bg,color:ye.table.rowColor,...ye.table.sx},children:[gt(_r,{ref:ue,sx:{overflow:"hidden",flexShrink:0},children:gt(_r,{sx:{display:"grid",gridTemplateColumns:Ve,minWidth:ne,borderBottom:`1px solid ${ye.table.borderColor}`,flexShrink:0,bgcolor:ye.table.headerBg,"& > *":{borderRight:`1px solid ${ye.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,...ct?{pl:2}:{}},...ye.table.headerSx},children:Mt.map(de=>{let Ne=s===de.id,bt=!!de.memberFilter,Xt=bt&&C.includes(de.memberFilter),Or=bt||!!de.statusFilter||!!de.ackFilter||!!de.projectFilter||!!de.priorityFilter||!!de.valueFilter,cn=Xt||!!de.valueFilter&&U.includes(de.valueFilter)||!!de.statusFilter&&z||!!de.ackFilter&&V||!!de.projectFilter&&H||!!de.priorityFilter&&M;return Dn(_r,{onClick:xn=>{de.memberFilter?_(de.memberFilter,xn.currentTarget):de.statusFilter?O(xn.currentTarget):de.ackFilter?$?.(xn.currentTarget):de.projectFilter?E?.(xn.currentTarget):de.priorityFilter?I?.(xn.currentTarget):de.valueFilter?F?.(de.valueFilter,xn.currentTarget):Jr(de.id,de.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:de.align==="center"?"center":"flex-start",gap:.5,px:1,...de.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:ye.table.headerFontSize,color:de.sortable||Or?ye.table.headerActiveColor:ye.table.headerColor,whiteSpace:"nowrap",cursor:de.sortable||Or?"pointer":"default",userSelect:"none",...Ne?{color:ye.table.headerFilteredColor}:{},...cn?{color:ye.table.headerFilteredColor,fontWeight:600}:{}},children:[de.icon,de.label,cn?gt(D2,{sx:{fontSize:14}}):null,Ne?r==="asc"?gt(E2,{sx:{fontSize:13}}):gt(R2,{sx:{fontSize:13}}):null]},de.id)})})}),be.length>0?gt(_r,{sx:{flexShrink:0,maxHeight:`${ye.table.groupHeader.minHeight+1+nh*z2}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:ke,children:Dn(_r,{sx:{minWidth:ne},children:[Dn(_r,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:ye.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[gt(_r,{component:"span",sx:{fontSize:ye.table.groupHeader.labelFontSize,fontWeight:ye.table.groupHeader.labelFontWeight,color:ye.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),gt(_r,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:gt(_r,{component:"span",sx:{flexShrink:0,width:ye.table.groupHeader.badge.width,py:ye.table.groupHeader.badge.paddingY,borderRadius:`${ye.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:ye.table.groupHeader.badge.fontSize,fontWeight:ye.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:be.length})})]}),be.map((de,Ne)=>Et(de,Ne===be.length-1))]})}):null,Re.length===0&&x?gt(_r,{role:"status","aria-live":"polite","aria-label":"\uC5C5\uBB34 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uB294 \uC911\uC785\uB2C8\uB2E4.",sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",py:8},children:gt(sl,{})}):Re.length===0?gt(_r,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:ye.table.emptyColor,fontSize:14},children:e.length>0?`\uC644\uB8CC\uB41C \uC5C5\uBB34 ${e.length}\uAC74\uC774 "\uC644\uB8CC \uC228\uAE30\uAE30"\uB85C \uAC10\uCDB0\uC838 \uC788\uC2B5\uB2C8\uB2E4.`:He?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":yr?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Le?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):gt(_r,{sx:{flex:1,minHeight:0},children:gt(L2,{ref:Pe,style:{height:"100%"},contentStyle:{minWidth:ne},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Xe?gt(N2,{customScrollParent:Xe,data:Fe,computeItemKey:(de,Ne)=>Ne.kind==="header"?`group:${Ne.section.key}`:Ne.task.seq,endReached:_t?void 0:Ee,defaultItemHeight:nh,increaseViewportBy:{top:600,bottom:600},itemContent:(de,Ne)=>{if(Ne.kind==="task")return Et(Ne.task,Ne.last&&it);let{section:bt,visibleTasks:Xt,collapsed:Or}=Ne;return Dn(_r,{onClick:()=>g(bt.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:ye.table.groupHeader.minHeight,bgcolor:ye.table.groupHeader.bg,borderBottom:`1px solid ${ye.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:ye.table.groupHeader.hoverBg},...ye.table.groupHeader.sx},children:[Or?gt(A2,{sx:{fontSize:20,color:ye.colors.textMuted}}):gt(O2,{sx:{fontSize:20,color:ye.colors.textMuted}}),gt(_r,{component:"span",sx:{fontSize:ye.table.groupHeader.labelFontSize,fontWeight:ye.table.groupHeader.labelFontWeight,color:ye.table.groupHeader.labelColor},children:bt.label}),q?gt(_r,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:q(bt.key,bt.tasks)}):null,A&&(!D||D(bt.key))?gt(I2,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:cn=>{cn.stopPropagation(),A(bt.key,bt.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:ye.colors.textSecondary,"&:hover":{bgcolor:ye.colors.surfaceHover,color:ye.colors.accentOnSurface}},children:gt(rh,{sx:{fontSize:21}})}):null,Dn(_r,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[N?N(bt.key,bt.tasks):null,gt(_r,{component:"span",sx:{flexShrink:0,width:ye.table.groupHeader.badge.width,py:ye.table.groupHeader.badge.paddingY,borderRadius:`${ye.table.groupHeader.badge.borderRadius}px`,bgcolor:ye.table.groupHeader.badge.bg,border:ye.table.groupHeader.badge.border,color:ye.table.groupHeader.badge.color,fontSize:ye.table.groupHeader.badge.fontSize,fontWeight:ye.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:Xt.length})]})]})}},Qe):null})}),gt(Ni,{anchorEl:Te?.anchorEl??null,value:Ae?.status??"",options:Ae?$a(Ae):Rs,onSelect:de=>{Ae&&y(Ae.seq,de)},onComplete:Ae&&!Ae.completed&&!Ae.is_notice&&!Ae.is_event&&!Ae.is_bug&&!Ue&&((Ae.author_account_seq??0)===X||(Ae.manager_account_seq??0)===X)?()=>c(Ae,!0):void 0,onClose:()=>qe(null)}),gt(th,{transitionDuration:0,anchorEl:ut?.anchorEl??null,open:!!ut,onClose:()=>rt(null),children:["high","medium","low"].map(de=>Dn(al,{selected:se?.priority===de,onClick:()=>{se&&Ce?.(se.seq,de),rt(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[gt(qr,{priority:de,small:!0}),se?.priority===de?gt(tu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},de))}),Dn(th,{anchorEl:Q?.anchorEl??null,open:!!Q,onClose:()=>le(null),transitionDuration:0,children:[Dn(al,{selected:!Q?.task.tab_key,onClick:()=>{Q&&j(Q.task.seq,""),le(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[gt(P2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",Q?.task.tab_key?null:gt(tu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),u.filter(de=>!de.archived).map(de=>{let Ne=Tt(de.icon),bt=Q?.task.tab_key===de.key;return Dn(al,{selected:bt,onClick:()=>{Q&&j(Q.task.seq,de.key),le(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Ne?gt(Ne,{sx:{fontSize:17,color:"#1e3a8a"}}):null,de.label,bt?gt(tu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},de.key)}),S?[gt(B2,{},"add-project-divider"),Dn(al,{onClick:()=>fe(!0),sx:{fontSize:14,color:"#787774"},children:[gt(M2,{children:gt(rh,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),S?gt(il,{open:xe,onClose:()=>fe(!1),onSubmit:(de,Ne)=>{let bt=Q?.task.seq??0;(async()=>{let Xt=await S(de,Ne);Xt&&bt&&j(bt,Xt)})(),le(null)}}):null,gt(Ko,{anchorEl:ze?.anchorEl??null,value:It?.icon??"",color:It?.icon_color??"",onSelect:de=>{ze&&R?.(ze.taskSeq,de),vt(null)},onSelectColor:L?de=>{ze&&L(ze.taskSeq,de)}:void 0,onClose:()=>vt(null)}),gt(_n,{anchorEl:nt?.anchorEl??null,open:!!nt&&nt?.field==="start_date",date:nt?.date??"",reminders:[],hideReminder:!0,showTime:!nt?.isEvent,onClose:()=>At(null),onDateChange:Wn,onReminderChange:()=>{}}),gt(_n,{anchorEl:nt?.anchorEl??null,open:!!nt&&nt?.field==="due_date",date:nt?.date??"",showTime:!nt?.isEvent,reminders:nt?.reminders??[],hideReminder:!!nt?.completed,onClose:()=>At(null),onDateChange:Wn,onReminderChange:Oi}),gt(jt,{open:!!$t,anchorEl:$t?.anchorEl??null,title:$t?.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:()=>Vt(null),onConfirm:()=>{$t&&p?.($t.taskSeq),Vt(null)}}),gt(tn,{open:!!Ot,anchorEl:Ot?.anchorEl??null,nextCompleted:Ot?.nextCompleted??!1,returnMode:!!ce&&!!(Ot&&en(Ot.task,X)),onCancel:()=>Bt(null),onConfirm:de=>{Ot&&(de&&ce?ce(Ot.task,de):c(Ot.task,Ot.nextCompleted)),Bt(null)}})]})}import{useCallback as eo,useMemo as vo,useRef as cv,useState as Nn}from"react";import{Box as Ft,ButtonBase as xh,Divider as ch,IconButton as uh,Menu as fh,MenuItem as Go}from"@mui/material";import su from"@mui/icons-material/Add";import dh from"@mui/icons-material/MoreVert";import hh from"@mui/icons-material/EditOutlined";import ph from"@mui/icons-material/ArchiveOutlined";import mh from"@mui/icons-material/UnarchiveOutlined";import uv from"@mui/icons-material/NotificationsOutlined";import fv from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as j2}from"@mui/material";import{jsx as ih}from"react/jsx-runtime";function dr({sx:e,...d}){return ih(j2,{viewBox:"0 0 24 24",...d,sx:{fill:"none",...e},children:ih("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 dv,DragOverlay as hv,PointerSensor as pv,pointerWithin as mv,rectIntersection as gv,useDroppable as bv,useSensor as yv,useSensors as xv}from"@dnd-kit/core";import{SortableContext as vh,arrayMove as gh,horizontalListSortingStrategy as vv,useSortable as wv,verticalListSortingStrategy as _v}from"@dnd-kit/sortable";import{CSS as kv}from"@dnd-kit/utilities";import au from"@ehfuse/overlay-scrollbar";import{useState as V2}from"react";import{Box as Qn,ButtonBase as K2,Checkbox as G2,Tooltip as sh}from"@mui/material";import Y2 from"@mui/icons-material/AlarmOutlined";import X2 from"@mui/icons-material/DragIndicator";import Z2 from"@mui/icons-material/RadioButtonUnchecked";import J2 from"@mui/icons-material/CheckCircle";import Q2 from"@mui/icons-material/TimerOutlined";import{Box as Pn,Button as F2,Popover as q2}from"@mui/material";import $2 from"@mui/icons-material/CheckCircle";import{Fragment as H2,jsx as Jn,jsxs as pi}from"react/jsx-runtime";function ll({anchorEl:e,open:d,acks:b,total:l,avatarSrcByName:o,pendingNames:s=[],onRequestConfirm:r,onClose:t}){let n=zt();return Jn(q2,{open:d&&(n||!!e),anchorEl:e,onClose:t,transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...n?{anchorReference:"none",slotProps:{paper:{sx:{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxWidth:"calc(100vw - 48px)",maxHeight:"70vh",borderRadius:3}}}}:{},children:pi(Pn,{sx:{minWidth:240,maxWidth:320,py:1},children:[pi(Pn,{sx:{px:2,pb:.75,fontSize:Mr(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",b.length,"/",l]}),s.length>0&&b.length>0?pi(Pn,{sx:{px:2,pt:1,pb:.5,fontSize:Mr(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",b.length]}):null,b.length===0?s.length>0?null:Jn(Pn,{sx:{px:2,py:1.5,fontSize:Mr(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):b.map(c=>pi(Pn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Jn($r,{names:[c.name],size:22,avatarSrcByName:o}),Jn(Pn,{component:"span",sx:{fontSize:Mr(14),color:"#37352f",whiteSpace:"nowrap"},children:c.name}),Jn(Pn,{component:"span",sx:{ml:"auto",fontSize:Mr(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:fn(c.time)}),Jn($2,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},c.account_seq)),s.length>0?pi(H2,{children:[pi(Pn,{sx:{mt:b.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:b.length>0?"1px solid #efefed":"none",fontSize:Mr(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",s.length]}),s.map(c=>pi(Pn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Jn($r,{names:[c],size:22,avatarSrcByName:o}),Jn(Pn,{component:"span",sx:{fontSize:Mr(14),color:"#37352f",whiteSpace:"nowrap"},children:c})]},c))]}):null,r?Jn(Pn,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:Jn(F2,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{r(),t()},sx:{fontSize:Mr(13)},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function W2(e){let d=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(b=>b>0&&b!==d))]}function U2(e){let d=new Map,b=Number(e.manager_account_seq??0);b>0&&d.set(b,String(e.manager_name??"").trim());let l=e.receiver_account_seqs??[],o=e.receiver_names??[];return l.forEach((s,r)=>{s>0&&!d.has(s)&&d.set(s,String(o[r]??"").trim())}),d}function Hi(e,d){let b=W2(e),l=e.acks??[],o=d>0?l.find(t=>t.account_seq===d):void 0,s=new Set(l.map(t=>t.account_seq)),r=U2(e);return{myTime:o?.time??"",canConfirm:d>0&&b.includes(d)&&!o,count:l.filter(t=>b.includes(t.account_seq)).length,total:b.length,pendingNames:b.filter(t=>!s.has(t)).map(t=>r.get(t)??"").filter(t=>t.length>0)}}function xR(e){let d=String(e??"").trim();return d?d.slice(5,16).replaceAll("-","."):""}import{Fragment as nv,jsx as ar,jsxs as Wi}from"react/jsx-runtime";function cl(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}}var ev=3;function tv(e){let d=e.trim();return d?d.slice(2,10).replaceAll("-","."):"-"}function rv(){let e=new Date,d=String(e.getMonth()+1).padStart(2,"0"),b=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${d}-${b}`}var ru="taskbox-card-drag-handle";function zs({task:e,statusOptions:d,showDueDate:b=!1,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,titleFontSize:r=13,dragHandleProps:t}){let n=lt(),c=Li(e,yt().resolveTask),a=!!e.due_date&&e.due_date.slice(0,10)<=rv()?n.colors.danger:n.colors.textPrimary,h=Hi(e,0),[f,u]=V2(null),g=Pi(e,d),m=new Set(e.label_keys??[]),x=g.filter(B=>!m.has(B.key)),k=g.filter(B=>m.has(B.key));return Wi(nv,{children:[Wi(Qn,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[t?ar(Qn,{className:ru,...t,onClick:B=>B.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,ml:-.5,mr:-.25,color:n.colors.textMuted,cursor:"grab",touchAction:"none","&:active":{cursor:"grabbing"}},children:ar(X2,{sx:{fontSize:18}})}):null,ar(G2,{size:"small",icon:ar(Z2,{sx:{fontSize:20}}),checkedIcon:ar(J2,{sx:{fontSize:20}}),checked:e.completed,inputProps:{"aria-label":e.completed?`${e.title} \uC644\uB8CC \uD574\uC81C`:`${e.title} \uC644\uB8CC \uCC98\uB9AC`},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),onChange:(B,R)=>l?.({anchorEl:B.currentTarget,taskSeq:e.seq,nextCompleted:R}),sx:{p:0}}),ar(sh,{title:e.title,arrow:!0,enterDelay:300,children:Wi(Qn,{sx:{flex:1,minWidth:0,pr:1,fontSize:r,fontWeight:n.mode==="dark"||e.completed?400:500,color:n.mode==="dark"?n.colors.textStrong:n.colors.textPrimary,lineHeight:1.35,overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ev,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,c?ar(Qn,{component:"span",sx:{ml:.75,fontSize:12.5,fontWeight:400,color:n.colors.textMuted,fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap",textDecoration:"none"},children:c}):null,(e.comment_count??e.comments?.length??0)>0?ar(Vo,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:n.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?ar(Qn,{sx:{pl:3,mt:-.5,fontSize:12.5,color:n.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,Wi(Qn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[Wi(Qn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[x.map(B=>ar(Pt,{option:B,small:!0},B.key)),ar(qr,{priority:e.priority,small:!0}),k.map(B=>ar(Pt,{option:B,small:!0},B.key))]}),b?ar(sh,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:ar(K2,{disabled:!s,onPointerDown:B=>B.stopPropagation(),onClick:B=>{B.stopPropagation(),s?.(e,B.currentTarget)},sx:{display:"inline-flex",alignItems:"center",px:.5,py:.1,borderRadius:.75,fontSize:13,fontWeight:500,color:a,whiteSpace:"nowrap","&:hover":s?{bgcolor:n.colors.border}:void 0},children:String(e.due_date??"").trim()?tv(e.due_date):ar(Y2,{sx:{fontSize:15,color:n.colors.textMuted}})})}):null]}),b&&(e.due_date.slice(11,16)||e.estimated_time)?Wi(Qn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:n.colors.textSecondary},children:[ar(Q2,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,ar($r,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),h.total>0?ar(Qn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:ar(Qn,{sx:{flexShrink:0,width:64},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:ar(ji,{canConfirm:!1,count:h.count,total:h.total,onConfirm:()=>{},onShowList:B=>u(B)})})}):null,ar(ll,{anchorEl:f,open:!!f,acks:e.acks??[],total:h.total,pendingNames:h.pendingNames,onRequestConfirm:o&&h.count<h.total?()=>{o(e),u(null)}:void 0,onClose:()=>u(null)})]})}import{Box as ov}from"@mui/material";import{useSortable as iv}from"@dnd-kit/sortable";import{CSS as sv}from"@dnd-kit/utilities";import{jsx as ah}from"react/jsx-runtime";function av(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function lh({task:e,statusOptions:d,variant:b="card",showDueDate:l=!1,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,onCardClick:t,onCardContextMenu:n,titleFontSize:c}){let i=lt(),{attributes:a,listeners:h,setNodeRef:f,transform:u,transition:g,isDragging:m}=iv({id:String(e.seq)}),x=b==="list";return ah(ov,{ref:f,onClick:t?()=>t(e):void 0,onContextMenu:n?k=>n(e,k):void 0,sx:{...x?av(i.card):cl(i.card),opacity:m?.35:e.completed?.55:1,transform:sv.Translate.toString(u),transition:g,position:"relative",cursor:"default","&:hover":x?{bgcolor:i.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:ah(zs,{task:e,statusOptions:d,showDueDate:l,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,titleFontSize:c,dragHandleProps:{...a,...h}})})}function lv(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function kn(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let d=lv(e.end_date);return d?`${e.name} (~${d})`:e.name}import{jsx as tt,jsxs as Kt}from"react/jsx-runtime";var bh=2,wh="taskbox-column-drag-handle",lu=[ru,wh],ul="group-",Sn="colmove-",nu="__default__",ou=Rc,iu="__other__",fl="sprint-",yh=`${fl}0`,Sv={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function _h(e){return{flexShrink:0,width:e.width,py:e.paddingY,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 Tv({column:e,tasks:d,statusOptions:b,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onAddTask:r,canAdd:t,onOpenMenu:n,onCardClick:c,onCardContextMenu:i,grow:a,summary:h,onOpenSprintMenu:f}){let u=lt(),{setNodeRef:g,isOver:m}=bv({id:`${ul}${e.key}`}),{attributes:x,listeners:k,setNodeRef:B,transform:R,transition:L,isDragging:A}=wv({id:`${Sn}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Kt(Ft,{ref:D=>{g(D),B(D)},sx:{flex:a?"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:m?u.colors.accentSoft:u.board.columnBg,transition:"background-color 0.15s",overflow:"hidden",transform:kv.Translate.toString(R),...L?{transition:`${L}, background-color 0.15s`}:{},opacity:A?.6:1},children:[Kt(Ft,{className:wh,...x,...k,sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0,touchAction:"none",cursor:e.isDefault||e.isArchived||e.locked?"default":"grab",opacity:e.isArchived?.65:1},children:[e.dot?tt(Ft,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let D=Tt(e.icon);return D?tt(D,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),tt(Ft,{component:"span",sx:{fontSize:u.board.columnHeaderFontSize,fontWeight:700,color:u.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),tt(Ft,{component:"span",sx:{..._h(u.board.badge),ml:"auto"},children:d.length}),e.sprint&&f?tt(uh,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:D=>D.stopPropagation(),onClick:D=>f(D.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:tt(dh,{sx:{fontSize:18}})}):e.locked?null:tt(uh,{size:"small","aria-label":"\uD504\uB85C\uC81D\uD2B8 \uBA54\uB274",onPointerDown:D=>D.stopPropagation(),onClick:D=>n({anchorEl:D.currentTarget,column:e}),sx:{color:"#9a9a97"},children:tt(dh,{sx:{fontSize:18}})})]}),h?tt(Ft,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0},children:h}):null,tt(Ft,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:tt(au,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:lu},children:Kt(Ft,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[tt(vh,{items:d.map(D=>String(D.seq)),strategy:_v,children:d.map(D=>tt(lh,{task:D,statusOptions:b,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onCardClick:c,onCardContextMenu:i},D.seq))}),d.length===0&&!t?tt(Ft,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,d.length===0&&t?tt(Ft,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Kt(xh,{className:"taskbox-board-add",onClick:()=>r(e.isDefault?"":e.key),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${u.card.borderColor}`,bgcolor:u.card.bg,color:u.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:u.card.hoverBg}},children:[tt(su,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function cu({tasks:e,statusOptions:d,customTabs:b,mode:l="active",onToggleCompleted:o,onRequestReply:s,onChangeDueDate:r,onChangeReminder:t,onMoveTask:n,columnAxis:c="project",statusColumns:i=[],onMoveTaskStatus:a,sprintColumns:h=[],onMoveTaskSprint:f,onAddGroup:u,onAddTask:g,canAdd:m=!0,onRequestRename:x,onArchiveProject:k,onDeleteProject:B,onReorderProjects:R,onOpenDetail:L,onTaskContextMenu:A,hideCompleted:D=!1,renderColumnSummary:N,onEditSprint:q,onChangeSprintStatus:j,onRemoveSprint:S}){let T=lt(),{onReturnTask:P,myAccountSeq:p=0}=yt(),[y,v]=Nn(null),w=y?e.find(be=>be.seq===y.taskSeq):void 0,[_,C]=Nn(null),[O,z]=Nn(null),[$,V]=Nn(null),[E,H]=Nn(null),[I,M]=Nn(null),[F,U]=Nn(null),[Y,G]=Nn(null),[W,X]=Nn(null),[Z,K]=Nn(null),[ee,J]=Nn(null),re=cv(!1),ie=vo(()=>new Map(e.map(be=>[be.seq,be])),[e]),ae=vo(()=>{let be=e.filter(me=>me.is_notice);return be.sort((me,Be)=>me.completed!==Be.completed?me.completed?1:-1:Be.seq-me.seq),be},[e]),oe=vo(()=>b.filter(be=>!be.archived),[b]),he=vo(()=>b.filter(be=>be.archived),[b]),pe=be=>({key:be.key,label:be.label,icon:be.icon,isDefault:!1,isArchived:be.archived}),_e=vo(()=>new Set(i.map(be=>be.key)),[i]),De=vo(()=>new Set(h.map(be=>be.seq)),[h]),Ce=vo(()=>{if(c==="sprint")return[{key:yh,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...h.map(be=>({key:`${fl}${be.seq}`,label:kn(be),icon:"",isDefault:!1,isArchived:!1,dot:Sv[be.status],locked:!0,sprint:be}))];if(c==="status"){let be=i.map(me=>({key:me.key,label:me.name,icon:"",isDefault:!1,isArchived:!1,dot:me.dot,locked:!0}));return be.some(me=>me.key===ou)?be:[...be,{key:ou,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return l==="archived"?he.map(pe):[{key:nu,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...oe.map(pe)]},[c,i,h,l,oe,he]),Ee=xv(yv(pv,{activationConstraint:{distance:5}})),ot=eo(be=>{let me=String(be.active.id).startsWith(Sn),Be=mv(be),Je=Be.length>0?Be:gv(be);if(me)return Je.filter(Mt=>String(Mt.id).startsWith(Sn));let Fe=Je.filter(Mt=>!String(Mt.id).startsWith(Sn)),Oe=Fe.filter(Mt=>!String(Mt.id).startsWith(ul));return Oe.length>0?Oe:Fe},[]),ye=vo(()=>{let be=new Map;for(let me of e){if(me.is_notice)continue;let Be;if(c==="sprint"){let Fe=me.sprint_seq??0;Be=De.has(Fe)?`${fl}${Fe}`:yh}else Be=c==="status"?me.completed?ou:_e.has(String(me.status??""))?String(me.status??""):iu:me.tab_key?.trim()||nu;let Je=be.get(Be);Je?Je.push(me):be.set(Be,[me])}for(let me of be.values())me.sort((Be,Je)=>{if(Be.completed!==Je.completed)return Be.completed?1:-1;let Fe=(Be.group_sort_no??0)>0,Oe=(Je.group_sort_no??0)>0;return Fe&&Oe?(Be.group_sort_no??0)-(Je.group_sort_no??0):Fe!==Oe?Fe?-1:1:Be.due_date!==Je.due_date?Be.due_date<Je.due_date?-1:1:Be.seq-Je.seq});return be},[e,c,_e,De]),te=vo(()=>c!=="status"||(ye.get(iu)??[]).length===0?Ce:[...Ce,{key:iu,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Ce,ye]),Se=eo(be=>W?(W.get(be)??[]).map(me=>ie.get(me)).filter(me=>!!me):ye.get(be)??[],[W,ie,ye]),ge=eo(be=>{let me=Se(be);return D?me.filter(Be=>!Be.completed):me},[Se,D]),ve=eo(be=>{let me=String(be.active.id);if(me.startsWith(Sn)){J(me.slice(Sn.length));return}K(Number(me)),X(new Map(Ce.map(Be=>[Be.key,(ye.get(Be.key)??[]).map(Je=>Je.seq)])))},[Ce,ye]),Ge=eo((be,me)=>{if(be.startsWith(ul))return{key:be.slice(ul.length),overSeq:null};let Be=Number(be);for(let[Je,Fe]of me)if(Fe.includes(Be))return{key:Je,overSeq:Be};return null},[]),Le=eo(be=>{let{active:me,over:Be}=be;!Be||String(me.id).startsWith(Sn)||X(Je=>{if(!Je)return Je;let Fe=Number(me.id),Oe=Ge(String(Be.id),Je);if(!Oe)return Je;let Mt=[...Je.entries()].find(([,ue])=>ue.includes(Fe))?.[0];if(!Mt||Mt===Oe.key)return Je;let Ve=new Map(Je);Ve.set(Mt,(Ve.get(Mt)??[]).filter(ue=>ue!==Fe));let ne=[...Ve.get(Oe.key)??[]],ce=ne.length;if(Oe.overSeq!==null){let ue=ne.indexOf(Oe.overSeq);ue!==-1&&(ce=ue)}return ne.splice(ce,0,Fe),Ve.set(Oe.key,ne),Ve})},[Ge]),He=eo(be=>{let me=String(be.active.id);if(me.startsWith(Sn)){J(null);let ce=String(be.over?.id??"");if(!ce.startsWith(Sn))return;let ue=me.slice(Sn.length),ke=ce.slice(Sn.length);if(ue===ke)return;let ct=b.map(Xe=>Xe.key),Me=ct.indexOf(ue),Pe=ct.indexOf(ke);if(Me===-1||Pe===-1)return;R(gh(ct,Me,Pe));return}let Be=W;if(X(null),K(null),re.current=!0,!Be||!be.over)return;let Je=Number(me),Fe=[...Be.entries()].find(([,ce])=>ce.includes(Je));if(!Fe)return;let[Oe,Mt]=Fe,Ve=[...Mt],ne=Ge(String(be.over.id),Be);if(ne&&ne.key===Oe&&ne.overSeq!==null&&ne.overSeq!==Je){let ce=Ve.indexOf(Je),ue=Ve.indexOf(ne.overSeq);ce!==-1&&ue!==-1&&(Ve=gh(Ve,ce,ue))}if(c==="status"){a?.(Je,Oe);return}if(c==="sprint"){f?.(Je,Number(Oe.slice(fl.length))||0);return}n(Je,Oe===nu?"":Oe,Ve)},[b,W,Ge,n,R,c,a,f]),yr=eo(()=>{X(null),K(null),J(null),re.current=!0},[]),We=eo(be=>{if(re.current){re.current=!1;return}L(be)},[L]),Ue=Z!==null?ie.get(Z)??null:null,_t=ee!==null?Ce.find(be=>be.key===ee)??null:null,et=eo((be,me)=>{G({anchorEl:me,taskSeq:be.seq,date:be.due_date,reminders:Gn(be)})},[]),Re=_?.column??null;return Kt(Ft,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:`1px solid ${T.card.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:T.colors.surfaceSubtle},children:[Kt(dv,{sensors:Ee,collisionDetection:ot,onDragStart:ve,onDragOver:Le,onDragEnd:He,onDragCancel:yr,children:[tt(Ft,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:l==="archived"&&Ce.length===0?tt(Ft,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):tt(au,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:lu},children:Kt(Ft,{sx:{display:"flex",alignItems:"flex-start",gap:bh,height:"100%",minWidth:"min-content",p:bh,boxSizing:"border-box"},children:[l==="active"&&ae.length>0?Kt(Ft,{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:be=>be.shadows[1],bgcolor:T.card.bg,overflow:"hidden"},children:[Kt(Ft,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${T.card.borderColor}`,flexShrink:0,minHeight:48},children:[tt(uv,{sx:{fontSize:17,color:"#e8763a"}}),tt(Ft,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:T.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Kt(Ft,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",ae.length,")"]})]}),tt(Ft,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:tt(au,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:lu},thumb:{width:6},children:tt(Ft,{sx:{display:"flex",flexDirection:"column"},children:ae.map(be=>Kt(Ft,{onClick:()=>We(be),onContextMenu:me=>A(be,me),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${T.card.borderColor}`,bgcolor:T.card.bg,cursor:"pointer","&:hover":{bgcolor:T.card.hoverBg}},children:[tt(zs,{task:be,statusOptions:d,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:v}),(()=>{let me=(be.target_names??[]).filter(Je=>Je.trim());if(me.length===0)return null;let Be=me.length>2?`${me[0]}, ${me[1]} \uC678 ${me.length-2}`:me.join(", ");return Kt(Ft,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[tt(fv,{sx:{fontSize:14,flexShrink:0}}),tt(Ft,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:Be})]})})()]},be.seq))})})})]}):null,tt(vh,{items:oe.map(be=>`${Sn}${be.key}`),strategy:vv,children:te.map(be=>tt(Tv,{column:be,tasks:ge(be.key),summary:N?.(be.key,Se(be.key)),onOpenSprintMenu:q||j||S?(me,Be)=>z({anchorEl:me,sprint:Be}):void 0,statusOptions:d,onRequestArchiveToggle:v,onRequestReply:s,onDueDateClick:et,onAddTask:g,canAdd:m&&c==="project",onOpenMenu:C,onCardClick:We,onCardContextMenu:A,grow:c!=="project"},be.key))}),l==="active"&&c==="project"?Kt(xh,{onClick:u,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:[tt(su,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,l==="active"&&te.length===0&&ae.length===0?tt(Ft,{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]})})}),tt(hv,{children:Ue?tt(Ft,{sx:{...cl,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:tt(zs,{task:Ue,statusOptions:d,showDueDate:!0,titleFontSize:15})}):_t?Kt(Ft,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:T.card.bg,border:`1px solid ${T.card.borderColor}`,borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let be=Tt(_t.icon);return be?tt(be,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),tt(Ft,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:T.board.columnHeaderColor},children:_t.label}),tt(Ft,{component:"span",sx:_h(T.board.badge),children:(ye.get(_t.key)??[]).length})]}):null})]}),Kt(fh,{transitionDuration:0,anchorEl:_?.anchorEl??null,open:!!_,onClose:()=>C(null),children:[Re&&!Re.isArchived&&m?Kt(Go,{onClick:()=>{Re&&g(Re.isDefault?"":Re.key),C(null)},sx:{fontSize:14,gap:1},children:[tt(su,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,Re&&!Re.isDefault&&!Re.isArchived?Kt(Go,{onClick:()=>{x(Re.key,Re.label,Re.icon),C(null)},sx:{fontSize:14,gap:1},children:[tt(hh,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,Re&&!Re.isDefault&&!Re.isArchived?Kt(Go,{onClick:()=>{if(_){let be=(ye.get(_.column.key)??[]).filter(me=>!me.completed&&!me.archived).length;be>0?M({anchorEl:_.anchorEl,count:be}):H(_)}C(null)},sx:{fontSize:14,gap:1},children:[tt(ph,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,Re&&Re.isArchived?Kt(Go,{onClick:()=>{k(Re.key,!1),C(null)},sx:{fontSize:14,gap:1},children:[tt(mh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,Re&&!Re.isDefault?tt(ch,{}):null,Re&&!Re.isDefault?Kt(Go,{onClick:()=>{_&&U(_),C(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[tt(dr,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Kt(fh,{transitionDuration:0,anchorEl:O?.anchorEl??null,open:!!O,onClose:()=>z(null),children:[q?Kt(Go,{onClick:()=>{O&&q(O.sprint.seq),z(null)},sx:{fontSize:14,gap:1},children:[tt(hh,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,j?Kt(Go,{onClick:()=>{O&&j(O.sprint.seq,O.sprint.status==="closed"?"active":"closed"),z(null)},sx:{fontSize:14,gap:1},children:[O?.sprint.status==="closed"?tt(mh,{sx:{fontSize:18,color:"#787774"}}):tt(ph,{sx:{fontSize:18,color:"#787774"}}),O?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,S?tt(ch,{}):null,S?Kt(Go,{onClick:()=>{O&&V(O),z(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[tt(dr,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),tt(jt,{open:!!$,anchorEl:$?.anchorEl??null,title:`"${$?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>V(null),onConfirm:()=>{$&&S?.($.sprint.seq),V(null)}}),tt(_n,{anchorEl:Y?.anchorEl??null,open:!!Y,date:Y?.date??"",reminders:Y?.reminders??[],onClose:()=>G(null),onDateChange:be=>{Y&&(r(Y.taskSeq,be),G(me=>me&&{...me,date:be}))},onReminderChange:be=>{Y&&(t(Y.taskSeq,be),G(me=>me&&{...me,reminders:be}))}}),tt(jt,{open:!!I,anchorEl:I?.anchorEl??null,title:`\uBBF8\uC644\uB8CC \uC5C5\uBB34 ${I?.count??0}\uAC74\uC774 \uC788\uC5B4 \uBCF4\uAD00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
|
|
31
31
|
\uC644\uB8CC\uD558\uAC70\uB098 \uB2E4\uB978 \uD504\uB85C\uC81D\uD2B8\uB85C \uC62E\uAE34 \uB4A4 \uBCF4\uAD00\uD558\uC138\uC694.`,confirmText:"\uD655\uC778",onCancel:()=>M(null),onConfirm:()=>M(null)}),tt(jt,{open:!!E,anchorEl:E?.anchorEl??null,title:`"${E?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uBCF4\uAD00\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
32
32
|
\uBCF4\uAD00\uD568 \uD0ED\uC5D0\uC11C \uBCF5\uC6D0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,confirmText:"\uBCF4\uAD00",onCancel:()=>H(null),onConfirm:()=>{E&&k(E.column.key,!0),H(null)}}),tt(jt,{open:!!F,anchorEl:F?.anchorEl??null,title:`"${F?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
@@ -36,12 +36,12 @@ use chrome, FireFox or Internet Explorer 11`)}var r=e("safe-buffer"),t=e("random
|
|
|
36
36
|
|
|
37
37
|
`).trim()}function El({syncKey:e,value:d,onChange:b,readOnly:l=!1,minHeight:o=180,height:s=0,onChangeHeight:r}){let{uploadContentImage:t}=yt(),n=ei(null),c=ei(new G3),i=ei(null),a=s>0?s:0,h=ei(a),f=ei(r);f.current=r;let u=ei(null),g=ei(Date.now()+800),[m,x]=$3(!1),k=zt();Nu(()=>{if(l)return;let R=zu(d);u.current===R||u.current===d||(u.current=R,g.current=Date.now()+800,n.current?.setHtml(R))},[e,d,l]);let B=ei(-1);return Nu(()=>{if(l||k||s<=0||B.current===s||(B.current=s,Math.abs(s-h.current)<1))return;let R=i.current?.querySelector(".ehfuse-editor-container");R&&(Math.abs(R.getBoundingClientRect().height-s)<1||(R.style.height=`${s}px`,h.current=s))},[l,k,s]),Nu(()=>{if(l||k)return;let R=i.current?.querySelector(".ehfuse-editor-container");if(!R||typeof ResizeObserver>"u")return;let L,A=new ResizeObserver(D=>{let N=Math.round(D[0]?.contentRect.height??0);N<=0||(window.clearTimeout(L),L=window.setTimeout(()=>{Math.abs(N-h.current)<1||(h.current=N,f.current?.(N))},300))});return A.observe(R),()=>{window.clearTimeout(L),A.disconnect()}},[l,k]),l?Z3(Lu,{sx:{position:"relative",mt:1},children:[vi(Lu,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:o,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:zu(d)}}),vi(W3,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:vi(H3,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(X3(d)).then(()=>{x(!0),window.setTimeout(()=>x(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:m?vi(V3,{sx:{fontSize:17,color:"#2f9e5b"}}):vi(U3,{sx:{fontSize:17}})})})]}):vi(Lu,{ref:i,onDragOver:R=>R.stopPropagation(),onDrop:R=>R.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:vi(K3,{ref:n,defaultValue:zu(d),autoHeight:k,resizable:!k,showToolbar:!k,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Y3,plugins:[c.current],locale:"ko",minHeight:a||o,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",onImageUpload:t,contentStyle:{padding:"12px"},onChange:R=>{let L=Date.now()<g.current,A=R===u.current;u.current=R,!(L||A)&&b(R)}})})}import{useState as Qi}from"react";import{Box as hr,Button as yp,Dialog as c5,IconButton as es,Switch as u5,TextField as f5,Tooltip as Fu}from"@mui/material";import{DndContext as d5,PointerSensor as h5,closestCenter as p5,useSensor as m5,useSensors as g5}from"@dnd-kit/core";import{restrictToParentElement as b5,restrictToVerticalAxis as y5}from"@dnd-kit/modifiers";import{SortableContext as x5,arrayMove as v5,useSortable as w5,verticalListSortingStrategy as _5}from"@dnd-kit/sortable";import{CSS as k5}from"@dnd-kit/utilities";import xp from"@mui/icons-material/Close";import S5 from"@mui/icons-material/AddCircle";import vp from"@mui/icons-material/AddTask";import T5 from"@mui/icons-material/Checklist";import C5 from"@mui/icons-material/CheckCircle";import B5 from"@mui/icons-material/DragIndicator";import I5 from"@mui/icons-material/Launch";import M5 from"@mui/icons-material/LinkOutlined";import E5 from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as J3,useMemo as Q3,useState as ju}from"react";import{Box as io,Button as e5,Tab as t5,Tabs as r5}from"@mui/material";import{FormDialog as n5}from"@ehfuse/mui-form-dialog";import{ClearTextField as o5}from"@ehfuse/mui-form-controls";import{ErrorAlert as i5}from"@ehfuse/alerts";import s5 from"@mui/icons-material/CheckCircle";import a5 from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as l5}from"@ehfuse/overlay-scrollbar";import{jsx as Pr,jsxs as Rl}from"react/jsx-runtime";var bp=[{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 Ol({open:e,task:d,tasks:b,excludeSeqs:l=[],onClose:o,onSubmit:s,hideRelationType:r=!1,title:t="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:n="\uC5F0\uACB0",multiSelect:c=!1}){let i=zt(),[a,h]=ju("related"),[f,u]=ju(""),[g,m]=ju([]);J3(()=>{e&&(h("related"),u(""),m([]))},[e]);let x=Q3(()=>{let A=new Set([d.seq,...l]),D=f.trim().toLowerCase();return b.filter(N=>A.has(N.seq)||N.is_event||N.is_notice||N.linked_only?!1:D?N.title.toLowerCase().includes(D)||(N.ticket_no??"").toLowerCase().includes(D):!0).sort((N,q)=>!!N.completed!=!!q.completed?N.completed?1:-1:q.seq-N.seq)},[b,d.seq,l,f]),k=()=>{if(g.length===0){i5("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let A of g)s(A,a);o()},B=A=>{m(D=>D.includes(A)?D.filter(N=>N!==A):c?[...D,A]:[A])},R=bp.find(A=>A.type===a)?.hint??"",L=Rl(io,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i?"100%":"auto"},children:[r?null:Pr(r5,{value:a,onChange:(A,D)=>h(D),sx:{minHeight:38,flexShrink:0,borderBottom:"1px solid #ededeb","& .MuiTab-root":{minHeight:38,py:.5,fontSize:16,color:"#333333"}},children:bp.map(A=>Pr(t5,{value:A.type,label:A.label},A.type))}),r?null:Pr(io,{sx:{mt:1,mb:1.5,fontSize:14,flexShrink:0},children:R}),Rl(io,{sx:{...i?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...i?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[Pr(io,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Pr(o5,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:f,onChange:A=>u(A.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Pr(io,{sx:{flex:1,minHeight:0},children:Pr(l5,{style:{height:"100%"},contentStyle:{paddingTop:0},children:Pr(io,{sx:{display:"flex",flexDirection:"column"},children:x.length===0?Pr(io,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):x.map(A=>{let D=A.is_notice||A.is_event?Tt(A.icon||(A.is_notice?sr:cr)):null,N=g.includes(A.seq);return Rl(io,{onClick:()=>B(A.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:N?"#e3eefb":"transparent","&:hover":{bgcolor:N?"#e3eefb":"#f7f7f5"}},children:[N?Pr(s5,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):Pr(a5,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),D?Pr(D,{sx:{fontSize:17,flexShrink:0,color:A.icon_color||"#1e3a8a"}}):null,Rl(io,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[A.ticket_no?`${A.ticket_no} `:"",A.title]}),Pr(io,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:Pr(Pt,{option:ur(A)})})]},A.seq)})})})})]})]});return Pr(n5,{open:e,onClose:o,maxWidth:"sm",fullScreen:i,mobilePresentation:i?"slide":"dialog",...i?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:i?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:t,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:L}],scrollPastLastSection:!1,sectionContentPaddingTop:0,contentTopPadding:12,actions:{showCancelButton:!0,right:Pr(e5,{variant:"contained",disabled:g.length===0,onClick:k,children:n})}})}import{Fragment as A5,jsx as ht,jsxs as so}from"react/jsx-runtime";var wp="taskbox.checklist.hideCompleted";function R5({id:e,children:d}){let{attributes:b,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=w5({id:e});return ht(hr,{ref:o,sx:{transform:k5.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...b,...l},dragging:t})})}function O5({sortable:e,sensors:d,rowIds:b,onDragEnd:l,children:o}){let s=ht(hr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o});return e?ht(d5,{sensors:d,collisionDetection:p5,modifiers:[y5,b5],onDragEnd:l,children:ht(x5,{items:b,strategy:_5,children:s})}):s}function Al({taskSeq:e,checklist:d,onAdd:b,onToggle:l,onRemove:o,onUpdate:s,onReorder:r,removeLocked:t=!1,onConvertToTask:n,onOpenLinkedTask:c,linkCandidates:i,linkBaseTask:a,onLinkExistingTask:h,resolveLinkedTask:f,myAccountSeq:u=0}){let[g,m]=Qi(""),[x,k]=Qi(!1),[B,R]=Qi(null),L=zt(),[A,D]=Qi(null),[N,q]=Qi(null),j=H=>{let I=H.task_seq?f?.(H.task_seq):void 0;return I?I.completed:H.checked},S=H=>{if(!H.task_seq||u<=0)return!1;let I=f?.(H.task_seq);return I?!Dd(I,u):!1},T=H=>!!H.task_seq&&!!f&&!f?.(H.task_seq),P=d.filter(H=>!T(H)),p=P.filter(j).length,[y,v]=Qi(()=>{try{return localStorage.getItem(wp)==="1"}catch{return!1}}),w=H=>{v(H);try{localStorage.setItem(wp,H?"1":"0")}catch{}},_=!!r&&!L&&!t,C=g5(m5(h5,{activationConstraint:{distance:5}})),O=(H,I)=>H.task_seq?`linked-${H.task_seq}`:`row-${I}`,z=d.map(O),$=z.filter((H,I)=>{let M=d[I];return T(M)?!1:!(y&&j(M))}),V=H=>{let{active:I,over:M}=H;if(!M||I.id===M.id)return;let F=z.indexOf(String(I.id)),U=z.indexOf(String(M.id));F<0||U<0||r?.(e,v5(d,F,U))},E=()=>{g.trim()&&(b(e,g),m(""))};return so(Tn,{icon:ht(T5,{sx:{fontSize:19,display:"block"}}),title:so(A5,{children:["\uD560\uC77C",d.length>0?so(hr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[p," / ",d.length]}):null]}),titleExtra:P.length>0?so(hr,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[ht(hr,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:ht(hr,{sx:{height:"100%",borderRadius:3,width:`${Math.round(p/P.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),p>0?so(hr,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[ht(u5,{size:"small",checked:y,onChange:(H,I)=>w(I)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[ht(O5,{sortable:_,sensors:C,rowIds:$,onDragEnd:V,children:d.map((H,I)=>{let M=H.task_seq?f?.(H.task_seq):void 0,F=j(H);if(y&&F||T(H))return null;let U=!!H.task_seq,Y=S(H),G=W=>so(hr,{sx:{display:"flex",alignItems:L?"flex-start":"center",gap:1,px:1.25,..._?{ml:-3,pl:.5}:{},py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1},"&:hover .taskbox-checklist-handle":{opacity:1}},children:[W?ht(hr,{className:"taskbox-checklist-handle",...W,sx:{display:"inline-flex",flexShrink:0,alignItems:"center",color:"#c9c8c5",opacity:0,transition:"opacity 0.15s",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:ht(B5,{sx:{fontSize:16}})}):null,ht(Fu,{title:Y?"\uC5F0\uACB0 \uC5C5\uBB34\uC758 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uC644\uB8CC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4":"",arrow:!0,disableInteractive:!0,children:ht(hr,{component:"span",onClick:Y?void 0:()=>l(e,I,!F),sx:{display:"inline-flex",flexShrink:0,cursor:Y?"default":"pointer",...L?{mt:"1px"}:{}},children:F?ht(C5,{sx:{fontSize:18,color:Y?"#a9c6ec":"#2f80ed"}}):ht(E5,{sx:{fontSize:18,color:Y?"#d6d5d1":"#9a9a97"}})})}),B?.index===I?ht(hr,{component:"input",autoFocus:!0,spellCheck:!1,value:B.label,enterKeyHint:"done",onChange:X=>R({index:I,label:X.target.value}),onBlur:()=>{B.label.trim()&&B.label.trim()!==H.label&&s?.(e,I,B.label),R(null)},onKeyDown:X=>{X.key==="Enter"&&X.target.blur(),X.key==="Escape"&&R(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ht(hr,{component:"span",onClick:U?H.task_seq&&c?()=>c(H.task_seq):void 0:t||!s?void 0:L?()=>D({index:I,label:H.label}):()=>R({index:I,label:H.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:F?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",...L?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,lineHeight:1.4,wordBreak:"break-word"}:{whiteSpace:"nowrap"},...U?c?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:t||!s?{}:{cursor:"text"}},children:H.label}),U?so(hr,{component:"span",onClick:H.task_seq&&c?()=>c(H.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,...L?{mt:"1px"}:{},px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...c?{cursor:"pointer"}:{}},children:[ht(I5,{sx:{fontSize:12}}),M?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!t&&!U&&n?ht(Fu,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ht(es,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:X=>q({anchorEl:X.currentTarget,index:I,label:H.label}),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ht(vp,{sx:{fontSize:16}})})}):null,t?null:ht(es,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>o(e,I),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ht(xp,{sx:{fontSize:15}})})]});return _?ht(R5,{id:z[I],children:({handleProps:W})=>G(W)},z[I]):ht(hr,{children:G(null)},z[I])})}),so(hr,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ht(hr,{component:"input",spellCheck:!1,value:g,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:H=>m(H.target.value),onKeyDown:H=>{H.key==="Enter"&&E()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),i&&a&&h?ht(Fu,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:ht(es,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:H=>H.preventDefault(),onClick:()=>k(!0),sx:{flexShrink:0,color:"#9a9a97"},children:ht(M5,{sx:{fontSize:20}})})}):null,ht(es,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!g.trim(),onMouseDown:H=>H.preventDefault(),onClick:E,sx:{flexShrink:0,color:g.trim()?"#2f80ed":"#c9c8c5"},children:ht(S5,{sx:{fontSize:20}})})]}),i&&a&&h?ht(Ol,{open:x,task:a,tasks:i,excludeSeqs:d.map(H=>Number(H.task_seq??0)).filter(H=>H>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>k(!1),onSubmit:H=>{let I=i.find(M=>M.seq===H);h(e,H,String(I?.title??"").trim())}}):null,ht(jt,{open:!!N,anchorEl:N?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>q(null),onConfirm:()=>{N&&n?.(e,N.index,N.label),q(null)}}),ht(c5,{open:!!A,onClose:()=>D(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:so(hr,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ht(hr,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ht(f5,{autoFocus:!0,fullWidth:!0,size:"medium",value:A?.label??"",onChange:H=>D(I=>I&&{...I,label:H.target.value}),onKeyDown:H=>{if(H.key!=="Enter")return;let I=A;I&&I.label.trim()&&s?.(e,I.index,I.label.trim()),D(null)}}),so(hr,{sx:{display:"flex",alignItems:"center",gap:1},children:[!t&&n&&A&&!d[A.index]?.task_seq?ht(es,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{n(e,A.index,d[A.index]?.label??""),D(null)},sx:{color:"#57564f"},children:ht(vp,{sx:{fontSize:20}})}):null,!t&&A?ht(es,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{o(e,A.index),D(null)},sx:{color:"#e5484d"},children:ht(xp,{sx:{fontSize:19}})}):null,ht(hr,{sx:{flex:1}}),ht(yp,{color:"inherit",onClick:()=>D(null),children:"\uCDE8\uC18C"}),ht(yp,{variant:"contained",disabled:!A?.label.trim(),onClick:()=>{A&&A.label.trim()&&s?.(e,A.index,A.label.trim()),D(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as j5,useState as F5}from"react";import{Box as ao,IconButton as q5}from"@mui/material";import $5 from"@mui/icons-material/Close";import Sp from"@mui/icons-material/AttachFileOutlined";var D5=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"]),Dl=e=>{let d=e?.split(".").pop()?.toLowerCase()??"";return D5.has(d)};import{LinearProgress as P5}from"@mui/material";import{Fragment as N5,jsx as z5,jsxs as L5}from"react/jsx-runtime";function _p(e){let d=bo(),b=d.useValue("attachmentUpload.taskSeq"),l=d.useValue("attachmentUpload.index"),o=d.useValue("attachmentUpload.total"),s=d.useValue("attachmentUpload.queue"),r=l??0;return!r||e>0&&(b??0)!==e?null:{index:r,total:o??0,queue:s??[]}}function qu(){let d=bo().useValue("attachmentUpload.progress");return L5(N5,{children:[d??0,"%"]})}function kp(){let d=bo().useValue("attachmentUpload.progress");return z5(P5,{variant:"determinate",value:d??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as H5,jsx as rn,jsxs as Ys}from"react/jsx-runtime";function Pl(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Nl={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Ll({taskSeq:e,attachments:d,onAdd:b,onRemove:l,removeLocked:o=!1,onPreview:s,onDownload:r}){let[t,n]=F5(!1),c=j5(null),i=zt(),a=Cs(),h=Ts(),f=_p(e),u=e===0,g=R=>{if(s){s(R);return}window.open(h(R.uuid??""),"_blank","noopener,noreferrer")},m=R=>{if(r){r(R);return}window.open(h(R.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},x=R=>f?R+1<f.index?"done":R+1===f.index?"uploading":"waiting":"waiting",k=(R,L,A,D={})=>Ys(ao,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:D.uploading?"#d5e6fb":"#e6e6e3",bgcolor:D.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Ys(ao,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[rn(Sp,{sx:{fontSize:16,color:"#9a9a97"}}),L,rn(ao,{component:"span",sx:{fontSize:12,color:D.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:A}),D.removeIndex!==void 0?rn(q5,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>l(e,D.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:rn($5,{sx:{fontSize:15}})}):null]}),D.uploading?rn(kp,{}):null]},R),B=R=>{let L=Dl(R.name);return rn(ao,{component:"button",type:"button",onClick:()=>L?g(R):m(R),title:`${R.name} ${L?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Nl,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:R.name})};return Ys(Tn,{icon:rn(Sp,{sx:{fontSize:18,display:"block"}}),title:Ys(H5,{children:["\uD30C\uC77C ",d.length>0?d.length:""]}),children:[Ys(ao,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[d.map((R,L)=>{let A=`${R.uuid||R.name}-${L}`;if(u){let D=x(L),N=D==="uploading";return k(A,rn(ao,{component:"span",sx:{...Nl,color:D==="done"?"#37352f":"#9a9a97"},children:R.name}),N?rn(qu,{}):Pl(R.size),{uploading:N,removeIndex:!o&&!f?L:void 0})}return R.uuid?k(A,B(R),Pl(R.size),{removeIndex:o?void 0:L}):k(A,rn(ao,{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:{...Nl,color:"#9a9a97"},children:R.name}),Pl(R.size),{removeIndex:o?void 0:L})}),!u&&f?f.queue.slice(f.index-1).map((R,L)=>{let A=L===0;return k(`uploading-${f.index+L}-${R.name}`,rn(ao,{component:"span",sx:{...Nl,color:"#9a9a97"},children:R.name}),A?rn(qu,{}):Pl(R.size),{uploading:A})}):null]}),rn(ao,{onClick:()=>c.current?.click(),onDragOver:R=>{R.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:R=>{R.preventDefault(),n(!1);let L=Array.from(R.dataTransfer.files);L.length>0&&b(e,L)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:t?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:t?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:i?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${a}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${a}MB)`}),rn(ao,{component:"input",ref:c,type:"file",multiple:!0,onChange:R=>{let L=Array.from(R.target.files??[]);L.length>0&&b(e,L),R.target.value=""},sx:{display:"none"}})]})}import{useState as X5}from"react";import{Checkbox as Z5,Divider as J5,ListItemIcon as Q5,Menu as e4,MenuItem as Ip}from"@mui/material";import t4 from"@mui/icons-material/Add";import{useEffect as W5,useState as Tp}from"react";import{Box as $u,Button as U5}from"@mui/material";import{FormDialog as V5}from"@ehfuse/mui-form-dialog";import{ClearTextField as K5}from"@ehfuse/mui-form-controls";import{ColorPicker as G5}from"@ehfuse/mui-color-picker";import{ErrorAlert as Y5}from"@ehfuse/alerts";import{jsx as Xs,jsxs as Hu}from"react/jsx-runtime";var Cp="#2f80ed";function Bp({open:e,onClose:d,onSubmit:b}){let[l,o]=Tp(""),[s,r]=Tp(Cp);W5(()=>{e&&(o(""),r(Cp))},[e]);let t=()=>{let i=l.trim();if(!i){Y5("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}b(i,s),d()},n=xd(s),c=Hu($u,{children:[Hu($u,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Xs(K5,{label:"\uB77C\uBCA8 \uC774\uB984",value:l,onChange:i=>o(i.target.value),onKeyDown:i=>{i.key==="Enter"&&(i.preventDefault(),t())},fullWidth:!0,autoFocus:!0}),Xs(G5,{value:s,onChange:i=>r(i),shape:"circle",colorSize:28})]}),Hu($u,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Xs(Pt,{option:{key:"__preview__",name:l.trim()||"\uB77C\uBCA8",...n}})]})]});return Xs(V5,{open:e,onClose:d,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:Xs(U5,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}import{Fragment as r4,jsx as ts,jsxs as zl}from"react/jsx-runtime";function jl({anchorEl:e,selectedKeys:d,labelOptions:b,onToggle:l,onAddLabel:o,onClose:s}){let[r,t]=X5(!1),n=Un();return zl(r4,{children:[zl(e4,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...n,children:[b.map(c=>{let i=d.includes(c.key);return zl(Ip,{onClick:()=>l(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[ts(Z5,{size:"small",checked:i,sx:{p:0}}),ts(Pt,{option:c})]},c.key)}),ts(J5,{}),zl(Ip,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[ts(Q5,{children:ts(t4,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),ts(Bp,{open:r,onClose:()=>t(!1),onSubmit:o})]})}function Mp(e,d){let b=Number(e.author_account_seq??0);return d.filter(l=>{let o=Number(l.account_seq??0);return o>0&&o!==b})}function Ep(e,d){let b=(e.target_account_seqs??[]).filter(a=>a>0);if(b.length===0)return null;let l=new Set(b),o=Mp(e,d),s=new Map;for(let a of o){let h=String(a.department??"").trim();if(!h)continue;let f=s.get(h)??[];f.push(a),s.set(h,f)}let r=[],t=new Set;for(let[a,h]of s)if(h.every(u=>l.has(Number(u.account_seq??0)))){r.push(a);for(let u of h)t.add(Number(u.account_seq??0))}let n=new Map(o.map(a=>[Number(a.account_seq??0),a.name])),c=e.target_names??[],i=[];return b.forEach((a,h)=>{t.has(a)||i.push(n.get(a)??c[h]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:r,individualNames:i}}function Fl(e,d){let b=Ep(e,d);return b?[...b.teamNames,...b.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function zz(e,d){let b=Ep(e,d);return b?{kind:"members",teamNames:b.teamNames,individualNames:b.individualNames}:{kind:"everyone"}}function Rp(e,d,b){let l=(e.target_account_seqs??[]).filter(f=>f>0),o=Mp(e,d),s=l.length>0?l.length:o.length,r=e.acks??[],t=b>0&&r.some(f=>f.account_seq===b),n=b>0&&Number(e.author_account_seq??0)===b,c=l.length===0||l.includes(b),i=new Set(r.map(f=>f.account_seq)),h=(l.length>0?o.filter(f=>l.includes(Number(f.account_seq??0))):o).filter(f=>!i.has(Number(f.account_seq??0))).map(f=>String(f.name??"").trim()).filter(f=>f.length>0);return{count:r.length,total:s,acked:t,pendingNames:h,canAck:b>0&&!n&&c&&!t&&!e.completed}}function Op(e,d){let b=Number(d)||50,l=b*1024*1024,o=e.filter(t=>t.size>l),s=e.filter(t=>t.size<=l),r=o.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${b}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
38
38
|
\uC81C\uC678\uB41C \uD30C\uC77C: ${o.map(t=>t.name).join(", ")}`:null;return{accepted:s,rejected:o,message:r}}import{DatePicker as h4}from"@ehfuse/mui-datetime-picker";import{Fragment as Qs,jsx as st,jsxs as _i}from"react/jsx-runtime";var Lp="#0f9d58";function Vu({form:e,statusOptions:d,customTabs:b,sprints:l=[],avatarSrcByName:o,isNotice:s=!1,hideProject:r=!1,hideBug:t=!1,leadingRow:n,hideLabel:c=!1,employees:i=[],myAccountSeq:a=0,departments:h=[],myGroupSeq:f=0,onMemberEdit:u,onAddProject:g,onAddLabelOption:m,contentSyncKey:x="create",contentTemplates:k,onSaveContentTemplate:B,onRemoveContentTemplate:R}){let L=bo(),A=Cs(),D=e.useFormValue("manager_name"),N=e.useFormValue("receiver_names"),q=e.useFormValue("start_date"),j=!!e.useFormValue("is_event"),S=!!e.useFormValue("is_bug"),T=e.useFormValue("bug_repro")??"",P=e.useFormValue("bug_device")??"",p=e.useFormValue("bug_where")??"",y=e.useFormValue("bug_version")??"",v=e.useFormValue("event_time")??"",w=e.useFormValue("event_place")??"",_=e.useFormValue("event_address")??"",C=e.useFormValue("due_date"),O=e.useFormValue("reminders")??[],z=e.useFormValue("priority"),$=e.useFormValue("content"),E=e.useFormValue("checklist")??[],H=e.useFormValue("tab_key"),I=e.useFormValue("sprint_seq")??0,M=e.useFormValue("story_points")??0,F=b.find(te=>te.key===H&&te.useSprints),U=F?l.filter(te=>`custom-${te.group_seq}`===H):[],[Y,G]=Zs(null),W=e.useFormValue("label_keys"),[X,Z]=Zs(null),K=e.useFormValue("visibility")||"involved",ee=Number(e.useFormValue("visibility_group_seq")??0),[J,re]=Zs(null),ie=e.useFormValue("repeat_rule")||"",ae=e.useFormValue("repeat_until")||"",[oe,he]=Zs(null),[pe,_e]=Zs(null),De=e.useFormValue("target_names"),Ce=e.useFormValue("target_account_seqs"),ot=L.useValue("createAttachmentFiles")??[],ye=s?Fl({author_account_seq:a,target_names:De,target_account_seqs:Ce},i):"";return _i(Qs,{children:[n,s?null:st(wi,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...t?[]:[{value:"bug",label:"\uC624\uB958"}]].map(te=>{let Se=S?"bug":j?"event":"task",ge=Se===te.value;return st(n4,{onClick:()=>{if(Se===te.value)return;e.setFormValue("is_event",te.value==="event"),e.setFormValue("is_bug",te.value==="bug"),e.setFormValue("visibility",te.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),te.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let ve=e.getFormValue("icon"),Ge=e.getFormValue("icon_color"),Le=[go,"event",Bs].includes(ve),He=!Ge||Ge===Lp||Ge===Is;Le&&e.setFormValue("icon",te.value==="event"?"event":te.value==="bug"?Bs:go),He&&e.setFormValue("icon_color",te.value==="event"?Lp:te.value==="bug"?Is:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:ge?600:400,color:ge?"#ffffff":"#787774",bgcolor:ge?"#2563eb":"#f4f4f2"},children:te.label},te.label)})}),st(Js,{sx:{borderColor:"#e6e6e3"}}),_i(wi,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[st(Cl,{hideProject:r,hideDueDate:!j&&!!ie,hideReminder:!!ie,values:{tabKey:H,managerName:D,receiverNames:N,startDate:q,dueDate:C,reminders:O,priority:z,eventTime:v,eventPlace:w,eventAddress:_},customTabs:b,avatarSrcByName:o,notice:s,event:j,onChangeEventTime:te=>e.setFormValue("event_time",te),onChangeEventPlace:te=>e.setFormValue("event_place",te),onChangeEventAddress:te=>e.setFormValue("event_address",te),targetSummary:ye,onChangeProject:te=>e.setFormValue("tab_key",te),onAddProject:g,onChangeStartDate:te=>e.setFormValue("start_date",te),onChangeDueDate:te=>e.setFormValue("due_date",te),onChangeReminder:te=>e.setFormValue("reminders",te),onChangePriority:te=>e.setFormValue("priority",te),onMemberEdit:u,pinColumns:!0,beforeStart:_i(Qs,{children:[!s&&!S?st(mt,{icon:st(c4,{sx:{fontSize:17,...ie?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:te=>he(te),sx:j?void 0:nr(2),children:ie?wl(ie):st(wi,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!s&&!S&&ie?st(mt,{icon:st(u4,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:te=>_e(te),sx:j?void 0:nr(2),children:ae?wn(ae):st(wi,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:_i(Qs,{children:[s?null:st(mt,{icon:K==="all"?st(Dp,{sx:{fontSize:17,color:"#2f80ed"}}):K==="group"?st(Pp,{sx:{fontSize:17,color:"#d9730d"}}):st(Ap,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:te=>re(te),sx:j?void 0:nr(1),children:K==="all"?"\uC804\uCCB4\uACF5\uAC1C":K==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${h.find(te=>te.seq===ee)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),F&&!j&&!s?_i(Qs,{children:[st(mt,{icon:st(l4,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:te=>G(te),sx:nr(1),children:I>0?U.find(te=>te.seq===I)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":st(wi,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),st(mt,{icon:st(f4,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:nr(1),children:st(Eo,{value:M>0?String(M):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:te=>e.setFormValue("story_points",Number(te.replace(/[^0-9.]/g,""))||0)})})]}):null,S?st(Bl,{values:{repro:T,device:P,where:p,version:y},onChangeRepro:te=>e.setFormValue("bug_repro",te),onChangeDevice:te=>e.setFormValue("bug_device",te),onChangeWhere:te=>e.setFormValue("bug_where",te),onChangeVersion:te=>e.setFormValue("bug_version",te)}):null]}),leading:j||c?null:st(wi,{sx:{gridColumn:"1 / -1"},children:st(mt,{icon:st(a4,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:te=>Z(te),children:(W??[]).length>0?st(Wo,{labelKeys:W??[],labelOptions:d}):st(wi,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),st(Js,{sx:{my:1.5,borderColor:"#e6e6e3"}}),st(Tn,{icon:st(i4,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:k?st(Ml,{content:$,templates:k,onApply:te=>e.setFormValue("content",te),onSave:B,onRemove:R}):void 0,children:st(El,{syncKey:x,value:$,onChange:te=>e.setFormValue("content",te)})}),j?null:st(Js,{sx:{my:1.5,borderColor:"#e6e6e3"}}),j?null:st(Al,{taskSeq:0,checklist:E,onAdd:(te,Se)=>e.setFormValue("checklist",[...E,{label:Se,checked:!1}]),onToggle:(te,Se,ge)=>e.setFormValue("checklist",E.map((ve,Ge)=>Ge===Se?{...ve,checked:ge}:ve)),onRemove:(te,Se)=>e.setFormValue("checklist",E.filter((ge,ve)=>ve!==Se)),onUpdate:(te,Se,ge)=>e.setFormValue("checklist",E.map((ve,Ge)=>Ge===Se?{...ve,label:ge}:ve))}),st(Js,{sx:{my:1.5,borderColor:"#e6e6e3"}}),st(Ll,{taskSeq:0,attachments:ot.map(te=>({name:te.name,size:te.size})),onAdd:(te,Se)=>{let ge=Op(Se,A);ge.message&&Np(ge.message),ge.accepted.length!==0&&L.setValue("createAttachmentFiles",[...L.getValue("createAttachmentFiles")??[],...ge.accepted])},onRemove:(te,Se)=>L.setValue("createAttachmentFiles",ot.filter((ge,ve)=>ve!==Se))}),S?null:_i(Qs,{children:[st(Js,{sx:{my:1.5,borderColor:"#e6e6e3"}}),st(Tn,{icon:st(s4,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:st(d4,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),st(Wu,{transitionDuration:0,anchorEl:Y,open:!!Y,onClose:()=>G(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...U.map(te=>({seq:te.seq,label:kn(te)}))].map(te=>st(Uu,{onClick:()=>{e.setFormValue("sprint_seq",te.seq),G(null)},sx:{fontSize:14,minWidth:170},children:te.label},te.seq))}),st(Wu,{transitionDuration:0,anchorEl:oe,open:!!oe,onClose:()=>he(null),children:[{value:"",label:"\uC5C6\uC74C"},...Vs].map(te=>st(Uu,{selected:ie===te.value,onClick:()=>{if(he(null),te.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Se;if(j){if(Se=String(e.getFormValue("due_date")??"").slice(0,10),!Se){Np("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Se=String(e.getFormValue("start_date")??"").slice(0,10),!Se){let ge=new Date,ve=Ge=>String(Ge).padStart(2,"0");Se=`${ge.getFullYear()}-${ve(ge.getMonth()+1)}-${ve(ge.getDate())}`}e.setFormValue("due_date",""),e.setFormValue("reminders",[])}e.setFormValue("repeat_rule",te.value),e.setFormValue("repeat_until",_l(Se,te.value))},sx:{fontSize:14,minWidth:140},children:te.label},te.value||"none"))}),st(h4,{anchorEl:pe,open:!!pe,onClose:()=>_e(null),selectedDate:ae?new Date(`${ae}T00:00:00`):new Date,onDateChange:te=>{let Se=ge=>String(ge).padStart(2,"0");e.setFormValue("repeat_until",`${te.getFullYear()}-${Se(te.getMonth()+1)}-${Se(te.getDate())}`),_e(null)}}),st(Wu,{transitionDuration:0,anchorEl:J,open:!!J,onClose:()=>re(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",tip:"\uC791\uC131\uC790\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB9CC \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:st(Ap,{sx:{fontSize:17,color:"#57564f"}}),selected:K==="involved",onPick:()=>{e.setFormValue("visibility","involved"),e.setFormValue("visibility_group_seq",0)}},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",tip:"\uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:st(Dp,{sx:{fontSize:17,color:"#2f80ed"}}),selected:K==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...h].sort((te,Se)=>te.seq===f?-1:Se.seq===f?1:0).map(te=>({key:`group-${te.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${te.name}`,tip:`${te.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:st(Pp,{sx:{fontSize:17,color:"#d9730d"}}),selected:K==="group"&&ee===te.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",te.seq)}}))].map(te=>st(o4,{title:te.tip,arrow:!0,disableInteractive:!0,placement:"right",children:_i(Uu,{selected:te.selected,onClick:()=>{te.onPick(),re(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[te.icon,te.label]})},te.key))}),st(jl,{anchorEl:X,selectedKeys:W??[],labelOptions:d,onToggle:te=>e.setFormValue("label_keys",Ha(W??[],te)),onAddLabel:(te,Se)=>m?.(te,Se),onClose:()=>Z(null)})]})}import{Fragment as Fp,jsx as Jt,jsxs as ea}from"react/jsx-runtime";function Dj({open:e,onClose:d,...b}){let{form:l,presetTitle:o="",presetContent:s="",presetVisibility:r,presetVisibilityGroupSeq:t=0,presetDueDate:n="",presetTabKey:c="",presetManager:i=null,isNotice:a=!1,defaultBug:h=!1}=b,f=bo(),u=m4(!1),[g,m]=zp(0),x=l.useFormValue("title"),k=l.useFormValue("icon"),B=l.useFormValue("icon_color"),R=!!l.useFormValue("is_event"),L=!!l.useFormValue("is_bug"),A=zt(),N=f.useValue("createSubmitting")??!1,q=a||R?Tt(k||(a?sr:cr)):null,j=a?"\uACF5\uC9C0 \uB4F1\uB85D":R?"\uC77C\uC815 \uB4F1\uB85D":L?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",S=a?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":R?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":L?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";p4(()=>{let v=u.current;u.current=e,!(!e||v)&&(l.setFormValues({...l.getFormValues(),title:o,icon:a?sr:h?Bs:go,icon_color:a?"#e5484d":h?Is:"",manager_name:i?.name??"",manager_account_seq:i?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:a,is_event:!1,is_bug:h,visibility:r??(h?"all":"involved"),visibility_group_seq:r==="group"?t:0,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:"",due_date:n,reminders:[],priority:"medium",note:"",content:s,checklist:[],tab_key:c}),f.setValue("createAttachmentFiles",[]),m(w=>w+1))},[e]);let[T,P]=zp(null),p=v=>q?R?Jt(x4,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Jt(g4,{onClick:w=>P(w.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:B||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Jt(q,{sx:{fontSize:20}})})}):Jt(Ro,{sx:[{display:"flex",color:B||"#1e3a8a"},v],children:Jt(q,{sx:{fontSize:20}})}):null,y=ea(Ro,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[p({p:0}),Jt(Ro,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:S,onChange:v=>l.setFormValue("title",v.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]});return A?Jt(Fp,{children:Jt(_4,{open:e,onClose:d,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:j,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fullScreen:!0,mobilePresentation:"slide",actions:{showCancelButton:!0,right:Jt(Ku,{variant:"contained",disableElevation:!0,disabled:N,onClick:N?void 0:l.submit,children:N?"\uC800\uC7A5 \uC911\u2026":"\uC800\uC7A5\uD558\uAE30"})},tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},sections:[{id:"task-create",title:"",showTitle:!1,children:Jt(Ro,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Jt(Vu,{...b,contentSyncKey:`create-${g}`,leadingRow:y})})}]})}):ea(Fp,{children:[Jt(b4,{anchor:"right",open:e,onClose:d,"aria-label":"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D",sx:{zIndex:v=>v.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ea(Ro,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[ea(Ro,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[p({px:.5}),Jt(Ro,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:S,onChange:v=>l.setFormValue("title",v.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}}}),Jt(y4,{"aria-label":"\uB2EB\uAE30",onClick:d,sx:{color:"#6b7280"},children:Jt(v4,{})})]}),Jt(jp,{sx:{borderColor:"#e6e6e3"}}),Jt(Ro,{sx:{flex:1,minHeight:0},children:Jt(w4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Jt(Vu,{...b,contentSyncKey:`create-${g}`})})}),Jt(jp,{sx:{borderColor:"#e6e6e3"}}),ea(Ro,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Jt(Ku,{onClick:d,color:"inherit",disabled:N,children:"\uCDE8\uC18C"}),Jt(Ku,{onClick:l.submit,variant:"contained",disabled:N,children:N?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),Jt(Ko,{anchorEl:T,value:k,color:B,onSelect:v=>{l.setFormValue("icon",v),P(null)},onSelectColor:v=>l.setFormValue("icon_color",v),onClose:()=>P(null)})]})}import{useEffect as dm,useRef as hm,useState as Kl}from"react";import{Box as Gl,Button as kk,Divider as pm,Drawer as Sk,IconButton as Tk,ListItemIcon as of,ListItemText as sf,Menu as Ck,MenuItem as af}from"@mui/material";import Bk from"@mui/icons-material/MoreVert";import Ik from"@mui/icons-material/DeleteOutline";import Mk from"@mui/icons-material/ShareOutlined";import Ek from"@mui/icons-material/HistoryOutlined";import Rk from"@ehfuse/overlay-scrollbar";import{FormDialog as Ok}from"@ehfuse/mui-form-dialog";import{SuccessAlert as mm}from"@ehfuse/alerts";import{useRef as Yu,useState as rs}from"react";import{Box as pt,Button as qp,Chip as ql,IconButton as jn,Tooltip as Up}from"@mui/material";import $p from"@mui/icons-material/Send";import{TextField as k4}from"@ehfuse/mui-form-controls";import $l from"@mui/icons-material/Close";import S4 from"@mui/icons-material/EditOutlined";import T4 from"@mui/icons-material/Favorite";import C4 from"@mui/icons-material/FavoriteBorderOutlined";import B4 from"@mui/icons-material/CheckCircle";import I4 from"@mui/icons-material/CheckCircleOutlineOutlined";import ns from"@mui/icons-material/AttachFileOutlined";import M4 from"@mui/icons-material/AddCircleOutline";import E4 from"@mui/icons-material/ImageOutlined";var Gu=e=>{if(e===0)return"0 Bytes";let d=1024,b=["Bytes","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(d));return parseFloat((e/Math.pow(d,l)).toFixed(2))+" "+b[l]};import{Fragment as Wp,jsx as $e,jsxs as or}from"react/jsx-runtime";var R4=5;function Hp({kind:e,reactions:d,myAccountSeq:b,onToggle:l}){let o=d??[],s=b>0&&o.some(c=>c.account_seq===b),r=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",t=o.length===0?r:$e(pt,{sx:{whiteSpace:"pre-line",fontSize:12},children:o.map(c=>`${c.name} \xB7 ${c.time}`).join(`
|
|
39
|
-
`)}),n=e==="like"?"#e5484d":"#2f80ed";return $e(Up,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:or(pt,{sx:{display:"inline-flex",alignItems:"center"},children:[$e(jn,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?$e(T4,{sx:{fontSize:16}}):$e(C4,{sx:{fontSize:16}}):s?$e(B4,{sx:{fontSize:16}}):$e(I4,{sx:{fontSize:16}})}),o.length>0?$e(pt,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function Vp({taskSeq:e,comments:d,currentUserName:b="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=rs(null),h=Yu(null),[f,u]=rs(null),[g,m]=rs(!1),x=Math.max(0,d.length-R4),k=x>0&&!g,B=i?Math.min(i.index,x):x,R=d.map((q,j)=>({comment:q,index:j})).slice(k?B:0),L=Ts(),A=q=>{if(n){n(q);return}window.open(L(q.uuid??""),"_blank","noopener,noreferrer")},D=q=>{if(c){c(q);return}window.open(L(q.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},N=yt().slots?.avatar;return or(pt,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[or(pt,{sx:{display:"flex",alignItems:"center",gap:1},children:[$e(Vo,{sx:{fontSize:18,display:"block",color:"#37352f"}}),or(pt,{sx:{fontSize:Ou,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",d.length>0?` (${d.length})`:""]}),x>0&&(!k||B>0)?$e(pt,{role:"button",tabIndex:0,onClick:()=>m(q=>!q),onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),m(j=>!j))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:k?`\uC774\uC804 \uB313\uAE00 ${B}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),d.length===0?$e(pt,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,$e(pt,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:R.map(({comment:q,index:j})=>{let S=!!b&&q.author===b;return or(pt,{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 T=o?.get(q.author)??"";return N?$e(pt,{sx:{display:"inline-flex",flexShrink:0},children:$e(N,{name:q.author,src:T||void 0,size:44})}):$e(pt,{sx:{display:"inline-flex",flexShrink:0},children:$e(vn,{src:T,name:q.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...zi[0]},iconFontSize:24})})})(),or(pt,{sx:{flex:1,minWidth:0},children:[or(pt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[$e(pt,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q.author}),q.external?$e(pt,{component:"span",sx:{flexShrink:0,px:.6,fontSize:11.5,fontWeight:500,lineHeight:"18px",color:"#d9730d",bgcolor:"#fdf0e6",borderRadius:"4px",whiteSpace:"nowrap"},children:"\uAC00\uB9F9\uC810"}):null,$e(pt,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:q.time}),S?$e(pt,{sx:{ml:"auto"}}):or(pt,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[$e(Hp,{kind:"like",reactions:q.likes,myAccountSeq:l,onToggle:()=>t?.(e,j,"like")}),$e(Hp,{kind:"ack",reactions:q.acks,myAccountSeq:l,onToggle:()=>t?.(e,j,"ack")})]}),S?or(pt,{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:[$e(jn,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:j,text:q.text,attachments:[...q.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:$e(S4,{sx:{fontSize:15}})}),$e(jn,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:T=>u({anchorEl:T.currentTarget,index:j}),sx:{color:"#9a9a97"},children:$e($l,{sx:{fontSize:15}})})]}):null]}),i?.index===j?or(pt,{sx:{mt:.5},children:[$e(pt,{component:"textarea",autoFocus:!0,spellCheck:!1,value:i.text,onChange:T=>a({...i,text:T.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),or(pt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[i.attachments.map((T,P)=>{let p=()=>a({...i,attachments:i.attachments.filter((y,v)=>v!==P)});return Hl(T.name)&&T.uuid?or(pt,{sx:{position:"relative"},children:[$e(pt,{component:"img",src:L(T.uuid,{thumb:"md"}),alt:T.name,title:T.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),$e(jn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:p,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:$e($l,{sx:{fontSize:14}})})]},`kept-${T.uuid}-${P}`):$e(ql,{size:"small",icon:$e(ns,{sx:{fontSize:14}}),label:T.name,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${T.uuid??T.name}-${P}`)}),i.files.map((T,P)=>{let p=()=>a({...i,files:i.files.filter((y,v)=>v!==P)});return Hl(T.name)?or(pt,{sx:{position:"relative"},children:[$e(pt,{component:"img",src:URL.createObjectURL(T),alt:T.name,title:`${T.name} (\uC0C8 \uD30C\uC77C)`,onLoad:y=>URL.revokeObjectURL(y.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),$e(jn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:p,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:$e($l,{sx:{fontSize:14}})})]},`new-${T.name}-${P}`):$e(ql,{size:"small",icon:$e(ns,{sx:{fontSize:14}}),label:`${T.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${T.name}-${P}`)}),$e(Up,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:$e(jn,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:$e(M4,{sx:{fontSize:20}})})})]}),or(pt,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[$e(qp,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),$e(qp,{size:"small",variant:"contained",disabled:!i.text.trim()&&i.attachments.length===0&&i.files.length===0,onClick:()=>{s(e,j,i.text,{attachments:i.attachments,files:i.files}),a(null)},children:"\uC800\uC7A5"})]}),$e(pt,{component:"input",type:"file",multiple:!0,ref:h,sx:{display:"none"},onChange:T=>{let P=Array.from(T.target.files??[]);P.length>0&&a({...i,files:[...i.files,...P].slice(0,10)}),T.target.value=""}})]}):or(pt,{children:[q.text?$e(pt,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:q.text}):null,(q.attachments??[]).length>0?$e(pt,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(q.attachments??[]).map((T,P)=>{let p=!!T.uuid;if(Hl(T.name)&&p)return $e(pt,{component:"img",src:L(T.uuid??"",{thumb:"md"}),alt:T.name,title:`${T.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>A(T),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${T.name}-${P}`);let v=Dl(T.name);return $e(ql,{size:"small",icon:$e(ns,{sx:{fontSize:14}}),label:`${T.name} (${Gu(T.size)})`,clickable:p,onClick:p?()=>v?A(T):D(T):void 0,title:p?`${T.name} ${v?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:T.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${T.name}-${P}`)})}):null]})]})]},`${q.time}-${j}`)})}),$e(jt,{open:!!f,anchorEl:f?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>u(null),onConfirm:()=>{f&&(r(e,f.index),a(null)),u(null)}})]})}function Hl(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function Kp({onSubmit:e}){let[d,b]=rs(""),[l,o]=rs([]),[s,r]=rs(!1),t=Yu(null),n=Yu(null),c=zt(),i=f=>{let u=Array.from(f??[]);u.length!==0&&o(g=>[...g,...u].slice(0,10))},a=()=>{let f=d.trim();!f&&l.length===0||(e(f,l.length>0?l:void 0),b(""),o([]))},h=or(Wp,{children:[$e(jn,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:$e(ns,{sx:{fontSize:20}})}),$e(jn,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:$e(E4,{sx:{fontSize:20}})})]});return or(pt,{children:[l.length>0?$e(pt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((f,u)=>Hl(f.name)?or(pt,{sx:{position:"relative"},children:[$e(pt,{component:"img",src:URL.createObjectURL(f),alt:f.name,title:f.name,onLoad:g=>URL.revokeObjectURL(g.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),$e(jn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>o(g=>g.filter((m,x)=>x!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:$e($l,{sx:{fontSize:14}})})]},`${f.name}-${u}`):$e(ql,{size:"small",icon:$e(ns,{sx:{fontSize:14}}),label:`${f.name} (${Gu(f.size)})`,onDelete:()=>o(g=>g.filter((m,x)=>x!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${f.name}-${u}`))}):null,or(pt,{sx:{position:"relative",display:"flex"},onDragOver:f=>{Array.from(f.dataTransfer?.types??[]).includes("Files")&&(f.preventDefault(),r(!0))},onDragLeave:f=>{f.currentTarget.contains(f.relatedTarget)||r(!1)},onDrop:f=>{Array.from(f.dataTransfer?.types??[]).includes("Files")&&(f.preventDefault(),r(!1),i(f.dataTransfer?.files??null))},children:[s?or(pt,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[$e(ns,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,$e(k4,{value:d,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:f=>b(f.target.value),onPaste:f=>{Array.from(f.clipboardData?.files??[]).length!==0&&(f.preventDefault(),i(f.clipboardData.files))},fullWidth:!0,multiline:!0,minRows:c?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:c?15:6.5,pb:c?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),c?or(pt,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,$e(jn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:$e($p,{sx:{fontSize:22}})})]}):or(Wp,{children:[$e(pt,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),$e(jn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:$e($p,{sx:{fontSize:22}})})]})]}),$e(pt,{component:"input",ref:t,type:"file",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}}),$e(pt,{component:"input",ref:n,type:"file",accept:"image/*",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}})]})}import{useState as ta}from"react";import{Box as is,ButtonBase as $4,IconButton as ss,Tooltip as as}from"@mui/material";import H4 from"@mui/icons-material/Close";import W4 from"@mui/icons-material/ArrowBack";import U4 from"@mui/icons-material/ShareOutlined";import V4 from"@mui/icons-material/ContentCopyOutlined";import K4 from"@mui/icons-material/HistoryOutlined";import G4 from"@mui/icons-material/Print";import{useEffect as O4}from"react";import{Box as Oo,Button as A4,CircularProgress as D4}from"@mui/material";import{FormDialog as P4}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as N4}from"@ehfuse/overlay-scrollbar";import{jsx as Ao,jsxs as Wl}from"react/jsx-runtime";var L4={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function Gp(e){return String(e??"").trim()||"\uC5C6\uC74C"}function z4(e){if(e.kind!=="field")return L4[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let d=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",b=String(e.old_value??"").trim(),l=String(e.new_value??"").trim();return!b&&l?`${d}\uC744(\uB97C) "${l}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:b&&!l?`${d}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${d}\uC744(\uB97C) "${Gp(b)}" \u2192 "${Gp(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Ul({open:e,taskSeq:d,items:b,loading:l,onLoad:o,onClose:s}){let r=zt();O4(()=>{e&&d>0&&!b&&o?.(d)},[e,d,b,o]);let t=Ao(Oo,{sx:{height:r?"100%":420,minHeight:0},children:Ao(N4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Wl(Oo,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!b?Wl(Oo,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[Ao(D4,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,b&&b.length===0?Ao(Oo,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(b??[]).map(n=>Wl(Oo,{sx:{display:"flex",flexDirection:r?"column":"row",gap:r?.25:1,alignItems:r?"stretch":"baseline",minWidth:0,flexShrink:0,...r?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[Ao(Oo,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:fn(n.acted_time)}),Wl(Oo,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[Ao(Oo,{component:"span",sx:{fontWeight:500},children:String(n.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),Ao(Oo,{component:"span",sx:{ml:.5},children:z4(n)})]})]},n.seq))]})})});return Ao(P4,{open:e,onClose:s,maxWidth:"sm",fullScreen:r,mobilePresentation:r?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:r?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${b&&b.length>0?` (${b.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:t}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:Ao(A4,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{InfoAlert as j4,SuccessAlert as F4}from"@ehfuse/alerts";var Yp=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
39
|
+
`)}),n=e==="like"?"#e5484d":"#2f80ed";return $e(Up,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:or(pt,{sx:{display:"inline-flex",alignItems:"center"},children:[$e(jn,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?$e(T4,{sx:{fontSize:16}}):$e(C4,{sx:{fontSize:16}}):s?$e(B4,{sx:{fontSize:16}}):$e(I4,{sx:{fontSize:16}})}),o.length>0?$e(pt,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function Vp({taskSeq:e,comments:d,currentUserName:b="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=rs(null),h=Yu(null),[f,u]=rs(null),[g,m]=rs(!1),x=Math.max(0,d.length-R4),k=x>0&&!g,B=i?Math.min(i.index,x):x,R=d.map((q,j)=>({comment:q,index:j})).slice(k?B:0),L=Ts(),A=q=>{if(n){n(q);return}window.open(L(q.uuid??""),"_blank","noopener,noreferrer")},D=q=>{if(c){c(q);return}window.open(L(q.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},N=yt().slots?.avatar;return or(pt,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[or(pt,{sx:{display:"flex",alignItems:"center",gap:1},children:[$e(Vo,{sx:{fontSize:18,display:"block",color:"#37352f"}}),or(pt,{sx:{fontSize:Ou,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",d.length>0?` (${d.length})`:""]}),x>0&&(!k||B>0)?$e(pt,{role:"button",tabIndex:0,onClick:()=>m(q=>!q),onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),m(j=>!j))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:k?`\uC774\uC804 \uB313\uAE00 ${B}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),d.length===0?$e(pt,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,$e(pt,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:R.map(({comment:q,index:j})=>{let S=!!b&&q.author===b;return or(pt,{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 T=o?.get(q.author)??"";return N?$e(pt,{sx:{display:"inline-flex",flexShrink:0},children:$e(N,{name:q.author,src:T||void 0,size:44})}):$e(pt,{sx:{display:"inline-flex",flexShrink:0},children:$e(vn,{src:T,name:q.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...zi[0]},iconFontSize:24})})})(),or(pt,{sx:{flex:1,minWidth:0},children:[or(pt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[$e(pt,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q.author}),q.external?$e(pt,{component:"span",sx:{flexShrink:0,px:.6,fontSize:11.5,fontWeight:500,lineHeight:"18px",color:"#d9730d",bgcolor:"#fdf0e6",borderRadius:"4px",whiteSpace:"nowrap"},children:"\uAC00\uB9F9\uC810"}):null,$e(pt,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:q.time}),S?$e(pt,{sx:{ml:"auto"}}):or(pt,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[$e(Hp,{kind:"like",reactions:q.likes,myAccountSeq:l,onToggle:()=>t?.(e,j,"like")}),$e(Hp,{kind:"ack",reactions:q.acks,myAccountSeq:l,onToggle:()=>t?.(e,j,"ack")})]}),S?or(pt,{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:[$e(jn,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:j,text:q.text,attachments:[...q.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:$e(S4,{sx:{fontSize:15}})}),$e(jn,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:T=>u({anchorEl:T.currentTarget,index:j}),sx:{color:"#9a9a97"},children:$e($l,{sx:{fontSize:15}})})]}):null]}),i?.index===j?or(pt,{sx:{mt:.5},children:[$e(pt,{component:"textarea",autoFocus:!0,spellCheck:!1,value:i.text,onChange:T=>a({...i,text:T.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),or(pt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[i.attachments.map((T,P)=>{let p=()=>a({...i,attachments:i.attachments.filter((y,v)=>v!==P)});return Hl(T.name)&&T.uuid?or(pt,{sx:{position:"relative"},children:[$e(pt,{component:"img",src:L(T.uuid,{thumb:"md"}),alt:T.name,title:T.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),$e(jn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:p,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:$e($l,{sx:{fontSize:14}})})]},`kept-${T.uuid}-${P}`):$e(ql,{size:"small",icon:$e(ns,{sx:{fontSize:14}}),label:T.name,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${T.uuid??T.name}-${P}`)}),i.files.map((T,P)=>{let p=()=>a({...i,files:i.files.filter((y,v)=>v!==P)});return Hl(T.name)?or(pt,{sx:{position:"relative"},children:[$e(pt,{component:"img",src:URL.createObjectURL(T),alt:T.name,title:`${T.name} (\uC0C8 \uD30C\uC77C)`,onLoad:y=>URL.revokeObjectURL(y.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),$e(jn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:p,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:$e($l,{sx:{fontSize:14}})})]},`new-${T.name}-${P}`):$e(ql,{size:"small",icon:$e(ns,{sx:{fontSize:14}}),label:`${T.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${T.name}-${P}`)}),$e(Up,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:$e(jn,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:$e(M4,{sx:{fontSize:20}})})})]}),or(pt,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[$e(qp,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),$e(qp,{size:"small",variant:"contained",disabled:!i.text.trim()&&i.attachments.length===0&&i.files.length===0,onClick:()=>{s(e,j,i.text,{attachments:i.attachments,files:i.files}),a(null)},children:"\uC800\uC7A5"})]}),$e(pt,{component:"input",type:"file",multiple:!0,ref:h,sx:{display:"none"},onChange:T=>{let P=Array.from(T.target.files??[]);P.length>0&&a({...i,files:[...i.files,...P].slice(0,10)}),T.target.value=""}})]}):or(pt,{children:[q.text?$e(pt,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:q.text}):null,(q.attachments??[]).length>0?$e(pt,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(q.attachments??[]).map((T,P)=>{let p=!!T.uuid;if(Hl(T.name)&&p)return $e(pt,{component:"img",src:L(T.uuid??"",{thumb:"md"}),alt:T.name,title:`${T.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>A(T),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${T.name}-${P}`);let v=Dl(T.name);return $e(ql,{size:"small",icon:$e(ns,{sx:{fontSize:14}}),label:`${T.name} (${Gu(T.size)})`,clickable:p,onClick:p?()=>v?A(T):D(T):void 0,title:p?`${T.name} ${v?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:T.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${T.name}-${P}`)})}):null]})]})]},`${q.time}-${j}`)})}),$e(jt,{open:!!f,anchorEl:f?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>u(null),onConfirm:()=>{f&&(r(e,f.index),a(null)),u(null)}})]})}function Hl(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function Kp({onSubmit:e}){let[d,b]=rs(""),[l,o]=rs([]),[s,r]=rs(!1),t=Yu(null),n=Yu(null),c=zt(),i=f=>{let u=Array.from(f??[]);u.length!==0&&o(g=>[...g,...u].slice(0,10))},a=()=>{let f=d.trim();!f&&l.length===0||(e(f,l.length>0?l:void 0),b(""),o([]))},h=or(Wp,{children:[$e(jn,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:$e(ns,{sx:{fontSize:20}})}),$e(jn,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:$e(E4,{sx:{fontSize:20}})})]});return or(pt,{children:[l.length>0?$e(pt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((f,u)=>Hl(f.name)?or(pt,{sx:{position:"relative"},children:[$e(pt,{component:"img",src:URL.createObjectURL(f),alt:f.name,title:f.name,onLoad:g=>URL.revokeObjectURL(g.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),$e(jn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>o(g=>g.filter((m,x)=>x!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:$e($l,{sx:{fontSize:14}})})]},`${f.name}-${u}`):$e(ql,{size:"small",icon:$e(ns,{sx:{fontSize:14}}),label:`${f.name} (${Gu(f.size)})`,onDelete:()=>o(g=>g.filter((m,x)=>x!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${f.name}-${u}`))}):null,or(pt,{sx:{position:"relative",display:"flex"},onDragOver:f=>{Array.from(f.dataTransfer?.types??[]).includes("Files")&&(f.preventDefault(),r(!0))},onDragLeave:f=>{f.currentTarget.contains(f.relatedTarget)||r(!1)},onDrop:f=>{Array.from(f.dataTransfer?.types??[]).includes("Files")&&(f.preventDefault(),r(!1),i(f.dataTransfer?.files??null))},children:[s?or(pt,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[$e(ns,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,$e(k4,{value:d,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:f=>b(f.target.value),onPaste:f=>{Array.from(f.clipboardData?.files??[]).length!==0&&(f.preventDefault(),i(f.clipboardData.files))},fullWidth:!0,multiline:!0,minRows:c?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:c?15:6.5,pb:c?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),c?or(pt,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,$e(jn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:$e($p,{sx:{fontSize:22}})})]}):or(Wp,{children:[$e(pt,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),$e(jn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:$e($p,{sx:{fontSize:22}})})]})]}),$e(pt,{component:"input",ref:t,type:"file",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}}),$e(pt,{component:"input",ref:n,type:"file",accept:"image/*",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}})]})}import{useState as ta}from"react";import{Box as is,ButtonBase as $4,IconButton as ss,Tooltip as as}from"@mui/material";import H4 from"@mui/icons-material/Close";import W4 from"@mui/icons-material/ArrowBack";import U4 from"@mui/icons-material/ShareOutlined";import V4 from"@mui/icons-material/ContentCopyOutlined";import K4 from"@mui/icons-material/HistoryOutlined";import G4 from"@mui/icons-material/Print";import{useEffect as O4}from"react";import{Box as Oo,Button as A4,CircularProgress as D4}from"@mui/material";import{FormDialog as P4}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as N4}from"@ehfuse/overlay-scrollbar";import{jsx as Ao,jsxs as Wl}from"react/jsx-runtime";var L4={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",returned:"\uC644\uB8CC\uB97C \uB418\uB3CC\uB838\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function Gp(e){return String(e??"").trim()||"\uC5C6\uC74C"}function z4(e){if(e.kind!=="field")return L4[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let d=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",b=String(e.old_value??"").trim(),l=String(e.new_value??"").trim();return!b&&l?`${d}\uC744(\uB97C) "${l}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:b&&!l?`${d}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${d}\uC744(\uB97C) "${Gp(b)}" \u2192 "${Gp(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Ul({open:e,taskSeq:d,items:b,loading:l,onLoad:o,onClose:s}){let r=zt();O4(()=>{e&&d>0&&!b&&o?.(d)},[e,d,b,o]);let t=Ao(Oo,{sx:{height:r?"100%":420,minHeight:0},children:Ao(N4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Wl(Oo,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!b?Wl(Oo,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[Ao(D4,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,b&&b.length===0?Ao(Oo,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(b??[]).map(n=>Wl(Oo,{sx:{display:"flex",flexDirection:r?"column":"row",gap:r?.25:1,alignItems:r?"stretch":"baseline",minWidth:0,flexShrink:0,...r?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[Ao(Oo,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:fn(n.acted_time)}),Wl(Oo,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[Ao(Oo,{component:"span",sx:{fontWeight:500},children:String(n.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),Ao(Oo,{component:"span",sx:{ml:.5},children:z4(n)})]})]},n.seq))]})})});return Ao(P4,{open:e,onClose:s,maxWidth:"sm",fullScreen:r,mobilePresentation:r?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:r?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${b&&b.length>0?` (${b.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:t}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:Ao(A4,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{InfoAlert as j4,SuccessAlert as F4}from"@ehfuse/alerts";var Yp=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
40
40
|
`).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
|
|
41
41
|
`).replace(/<[^>]+>/g,"").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&").replace(/\n{3,}/g,`
|
|
42
42
|
|
|
43
43
|
`).trim():"";function q4(e){let d=[`[\uC5C5\uBB34] ${e.title}`],b=wn(e.start_date),l=wn(e.due_date);(b||l)&&d.push(`\uAE30\uAC04: ${b&&l?`${b} ~ ${l}`:b||l}`),e.manager_name&&d.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let o=ur(e).name;o&&d.push(`\uC0C1\uD0DC: ${o}`);let s=Yp(e.content);s&&d.push("",s);let r=String(e.note??"").trim();return r&&d.push("",`\uBE44\uACE0: ${r}`),d.join(`
|
|
44
|
-
`)}function Xp(e){navigator.clipboard.writeText(e).then(()=>F4("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>j4("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function os(e,d){let b=q4(e);if(d&&typeof navigator.share=="function"){navigator.share({text:b}).catch(l=>{l?.name!=="AbortError"&&Xp(b)});return}Xp(b)}import{Fragment as Y4,jsx as Rt,jsxs as Zp}from"react/jsx-runtime";function Jp({task:e,myAccountSeq:d=0,onToggleCompleted:b,onChangeTitle:l,onChangeIcon:o,onChangeIconColor:s,onClose:r,appBarMode:t=!1,activityItems:n,activityLoading:c,onLoadActivity:i,onPrint:a,onDelete:h,canDelete:f}){let u=zt(),[g,m]=ta(!1),[x,k]=ta(null),[B,R]=ta(null),[L,A]=ta(null),[D,N]=ta(null),q=!!e.is_notice,j=!!e.is_event,S=q?Tt(e.icon||sr):j?Tt(e.icon||cr):null,T=q&&d>0&&(e.author_account_seq??0)===d,{onReturnTask:P}=yt(),p=!!P&&en(e,d),y=!yo(e,d),v=!!h&&(f??(d>0&&(e.author_account_seq??0)===d)),w=!j&&(q?T:(e.author_account_seq??0)===d||(e.manager_account_seq??0)===d);return Zp(Y4,{children:[Zp(is,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?Rt(ss,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:Rt(W4,{})}):null,w&&!t?Rt(as,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${fn(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Rt(is,{sx:{display:"flex",flexShrink:0,mr:1},children:Rt(Vn,{onClick:_=>N({anchorEl:_.currentTarget,nextCompleted:!e.completed}),children:e.completed?p?"\uB418\uB3CC\uB9AC\uAE30":"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"})})}):null,t||!S?null:j&&!y?Rt(as,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Rt($4,{onClick:_=>R(_.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Rt(S,{sx:{fontSize:20}})})}):Rt(is,{sx:{display:"flex",px:.5,color:e.icon_color||(q?"#e5484d":"#1e3a8a")},children:Rt(S,{sx:{fontSize:20}})}),x!==null?Rt(is,{component:"input",autoFocus:!0,spellCheck:!1,value:x,onChange:_=>k(_.target.value),onBlur:()=>{x.trim()&&x.trim()!==e.title&&l(e.seq,x.trim()),k(null)},onKeyDown:_=>{_.key==="Enter"&&_.target.blur(),_.key==="Escape"&&k(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):t?Rt(is,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q?"\uACF5\uC9C0":j?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Rt(is,{onClick:y?void 0:()=>k(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:y?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),i?Rt(as,{title:"\uD65C\uB3D9",arrow:!0,children:Rt(ss,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:Rt(K4,{sx:{fontSize:20}})})}):null,Rt(as,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Rt(ss,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>os(e,u),sx:{color:"#6b7280"},children:u?Rt(U4,{sx:{fontSize:20}}):Rt(V4,{sx:{fontSize:20}})})}),a?Rt(as,{title:"\uC778\uC1C4",arrow:!0,children:Rt(ss,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:Rt(G4,{sx:{fontSize:20}})})}):null,v?Rt(as,{title:"\uC0AD\uC81C",arrow:!0,children:Rt(ss,{"aria-label":"\uC0AD\uC81C",onClick:_=>A(_.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:Rt(dr,{sx:{fontSize:20}})})}):null,r&&!t?Rt(ss,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:Rt(H4,{})}):null]}),Rt(tn,{open:!!D,anchorEl:D?.anchorEl??null,nextCompleted:D?.nextCompleted??!1,returnMode:p,onCancel:()=>N(null),onConfirm:_=>{D&&(_&&P?P(e,_):b(e.seq,D.nextCompleted)),N(null)}}),Rt(Ko,{anchorEl:B,value:e.icon??"",color:e.icon_color??"",onSelect:_=>{o(e.seq,_),R(null)},onSelectColor:s?_=>s(e.seq,_):void 0,onClose:()=>R(null)}),Rt(jt,{open:!!L,anchorEl:L,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>A(null),onConfirm:()=>{A(null),h?.(e)}}),Rt(Ul,{open:g,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}import{useRef as ik,useState as Cn}from"react";import{Box as Qt,Button as ls,ButtonBase as om,Checkbox as sk,Divider as Si,Menu as ef,MenuItem as tf}from"@mui/material";import ak from"@mui/icons-material/ExpandLess";import lk from"@mui/icons-material/ExpandMore";import ck from"@mui/icons-material/ConfirmationNumberOutlined";import im from"@mui/icons-material/Check";import uk from"@mui/icons-material/DirectionsRunOutlined";import fk from"@mui/icons-material/SpeedOutlined";import rf from"@mui/icons-material/CheckCircle";import dk from"@mui/icons-material/CheckCircleOutlineOutlined";import nf from"@mui/icons-material/CheckCircleOutlined";import sm from"@mui/icons-material/AccessTimeOutlined";import hk from"@mui/icons-material/AutorenewOutlined";import pk from"@mui/icons-material/LabelOutlined";import mk from"@mui/icons-material/PersonOutlineOutlined";import gk from"@mui/icons-material/SubjectOutlined";import bk from"@mui/icons-material/StickyNote2Outlined";import yk from"@mui/icons-material/PanToolAltOutlined";import am from"@mui/icons-material/LockOutlined";import lm from"@mui/icons-material/PublicOutlined";import cm from"@mui/icons-material/Group";import xk from"@mui/icons-material/Repeat";import vk from"@mui/icons-material/EventOutlined";import{ConfirmDialog as um,InfoAlert as wk}from"@ehfuse/alerts";import{DatePicker as _k}from"@ehfuse/mui-datetime-picker";import{useState as X4}from"react";import{TextField as Z4}from"@ehfuse/mui-form-controls";import{jsx as J4}from"react/jsx-runtime";function Qp({value:e,onCommit:d,onDraftChange:b,readOnly:l=!1}){let[o,s]=X4(null);return J4(Z4,{value:o??e,placeholder:l?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:l}},onChange:r=>{s(r.target.value),b?.(r.target.value)},onBlur:()=>{o!==null&&o.trim()!==e&&d(o),s(null)},onKeyDown:r=>{r.key==="Enter"&&r.target.blur(),r.key==="Escape"&&s(null)},sx:{mt:1}})}import{useMemo as Ju,useState as Qu}from"react";import{Box as Nr,Button as rm,IconButton as Q4}from"@mui/material";import ek from"@mui/icons-material/AccountTreeOutlined";import tk from"@mui/icons-material/LinkOutlined";import rk from"@mui/icons-material/Close";import nk from"@mui/icons-material/RedoOutlined";function ki(e){return e.relations??[]}function GF(e,d,b){return ki(e).some(l=>l.type===b&&l.task_seq===d.seq)||ki(d).some(l=>l.type===b&&l.task_seq===e.seq)}function em(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Xu(e,d){let b=new Map(d.map(u=>[u.seq,u]));b.set(e.seq,e);let l=new Map,o=(u,g)=>{l.has(u)||l.set(u,new Set),l.has(g)||l.set(g,new Set),l.get(u).add(g),l.get(g).add(u)};for(let u of b.values())for(let g of ki(u))g.type==="follow_up"&&b.has(g.task_seq)&&o(u.seq,g.task_seq);let s=new Set([e.seq]),r=[e.seq];for(;r.length>0;){let u=r.shift();for(let g of l.get(u)??[])s.has(g)||(s.add(g),r.push(g))}let t=[...s].map(u=>b.get(u)).filter(u=>!!u).sort((u,g)=>em(u).localeCompare(em(g))),n=new Set;for(let u of ki(e))u.type==="related"&&n.add(u.task_seq);for(let u of b.values())u.seq!==e.seq&&ki(u).some(g=>g.type==="related"&&g.task_seq===e.seq)&&n.add(u.seq);let c=[...n].map(u=>b.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),i=[...b.values()].filter(u=>u.seq!==e.seq&&ki(u).some(g=>g.type==="duplicate_of"&&g.task_seq===e.seq)),a=ki(e).find(u=>u.type==="duplicate_of")?.task_seq,h=a?b.get(a)??null:null,f=[...b.values()].filter(u=>u.seq!==e.seq&&(u.checklist??[]).some(g=>Number(g.task_seq??0)===e.seq));return{lineage:t,related:c,duplicates:i,duplicateOf:h,parents:f}}function Zu(e,d){let b=Xu(e,d);return(b.lineage.length>=2?b.lineage.length-1:0)+b.related.length+b.duplicates.length+(b.duplicateOf?1:0)+b.parents.length}function tm(e,d){return Zu(e,d)>0}import{Fragment as ok,jsx as Gt,jsxs as Fn}from"react/jsx-runtime";function Vl({item:e,caption:d,onOpen:b,onUnlink:l}){let o=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?sr:cr)):null;return Fn(Nr,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[d?Gt(Nr,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:d}):null,o?Gt(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Fn(Nr,{component:"span",onClick:b,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...b?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),Gt(Pt,{option:ur(e),small:!0}),l?Gt(Q4,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:l,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Gt(rk,{sx:{fontSize:15}})}):null]})}function nm({task:e,tasks:d,readOnly:b=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=Qu(!1),[c,i]=Qu(null),[a,h]=Qu(null),f=Ju(()=>Xu(e,d),[e,d]),u=f.lineage.length>=2,g=Ju(()=>Zu(e,d),[e,d]),m=Ju(()=>{let k=new Set;for(let B of f.lineage)k.add(B.seq);for(let B of f.related)k.add(B.seq);for(let B of f.duplicates)k.add(B.seq);for(let B of f.parents)k.add(B.seq);return f.duplicateOf&&k.add(f.duplicateOf.seq),[...k]},[f]),x=(k,B,R)=>{h({anchorEl:k,targetSeq:B,type:R})};return Fn(Tn,{icon:Gt(ek,{sx:{fontSize:19,display:"block"}}),title:Fn(ok,{children:["\uAD00\uB828 \uC5C5\uBB34",g>0?Gt(Nr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:g}):null]}),titleExtra:b?null:Fn(Nr,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?Gt(rm,{size:"small",color:"inherit",startIcon:Gt(nk,{sx:{fontSize:16}}),onClick:k=>i(k.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,o?Gt(rm,{size:"small",color:"inherit",startIcon:Gt(tk,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Fn(Nr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?Gt(Nr,{sx:{mb:f.related.length||f.duplicates.length||f.duplicateOf?1:0},children:f.lineage.map((k,B)=>{let R=k.seq===e.seq,L=B===f.lineage.length-1;return Fn(Nr,{sx:{display:"flex",gap:1},children:[Fn(Nr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Gt(Nr,{sx:{width:R?9:7,height:R?9:7,borderRadius:"50%",bgcolor:R?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),L?null:Gt(Nr,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Fn(Nr,{sx:{flex:1,minWidth:0,pb:L?0:.5},children:[Fn(Nr,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Fn(Nr,{component:"span",onClick:!R&&l?()=>l(k.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:R?600:400,color:R?"#2f80ed":k.completed?"#9a9a97":"#37352f",textDecoration:k.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!R&&l?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[k.ticket_no?`${k.ticket_no} `:"",k.title]}),Gt(Pt,{option:ur(k),small:!0})]}),Gt(Nr,{sx:{fontSize:12,color:"#9a9a97"},children:k.completed&&k.completed_time?`${k.completed_time} \uC644\uB8CC`:k.created_time??""})]})]},k.seq)})}):null,f.parents.map(k=>Gt(Vl,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),f.duplicateOf?Gt(Vl,{item:f.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:l?()=>l(f.duplicateOf.seq):void 0,onUnlink:!b&&s?k=>x(k.currentTarget,f.duplicateOf.seq,"duplicate_of"):void 0}):null,f.duplicates.map(k=>Gt(Vl,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!b&&s?B=>x(B.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),f.related.map(k=>Gt(Vl,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!b&&s?B=>x(B.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),g===0?Gt(Nr,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?Gt(Ol,{open:t,task:e,tasks:d,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,B)=>o(e.seq,k,B)}):null,Gt(jt,{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:()=>i(null),onConfirm:()=>{r?.(e.seq),i(null)}}),Gt(jt,{open:!!a,anchorEl:a?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>h(null),onConfirm:()=>{a&&s?.(e.seq,a.targetSeq,a.type),h(null)}})]})}import{Fragment as Wr,jsx as we,jsxs as Yt}from"react/jsx-runtime";function ti({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return we(Qt,{component:"span",sx:{color:"#9a9a97"},children:e})}function fm({task:e,customTabs:d,statusOptions:b,avatarSrcByName:l,onChangeStatus:o,onChangeLabels:s,onAddLabelOption:r,onChangeProject:t,onAddProject:n,onChangeDate:c,onChangeReminder:i,onMemberEdit:a,onChangePriority:h,onChangeVisibility:f,onChangeRepeat:u,departments:g=[],onChangeEventTime:m,onChangeEventPlace:x,onChangeEventAddress:k,onChangeNote:B,onChangeNoteDraft:R,onChangeContent:L,contentTemplates:A,onSaveContentTemplate:D,onRemoveContentTemplate:N,contentLoading:q=!1,onChangeContentHeight:j,onAddChecklistItem:S,onToggleChecklistItem:T,onRemoveChecklistItem:P,onUpdateChecklistItem:p,onReorderChecklist:y,onConvertChecklistToTask:v,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:C,relatedTasksPool:O,onOpenRelatedTask:z,onLinkRelatedTask:$,onUnlinkRelatedTask:V,onCreateFollowUpTask:E,onAddAttachments:H,onRemoveAttachment:I,onPreview:M,onDownload:F,onUpdateComment:U,onRemoveComment:Y,onToggleCommentReaction:G,currentUserName:W="",myAccountSeq:X=0,noticeAdmin:Z=!1,hideProject:K=!1,hideLabel:ee=!1,showTitle:J=!1,onChangeTitle:re,onToggleCompleted:ie,onChangeIcon:ae,onChangeIconColor:oe,employees:he=[],onAckConfirm:pe,onRequestConfirm:_e,onChangeBugField:De,sprints:Ce=[],sprintProject:Ee=!1,hideSprint:ot=!1,onChangeSprint:ye,onChangeStoryPoints:te,onChangeResolution:Se,onClaimTask:ge,onVerifyBug:ve}){let[Ge,Le]=Cn(null),He=ik(!1),[yr,We]=Cn(null),[Ue,_t]=Cn(null),[et,Re]=Cn(null),[be,me]=Cn(!1),Be={[Ln]:be?{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"}},[Je,Fe]=Cn(null),[Oe,Mt]=Cn(null),[Ve,ne]=Cn(null),[ce,ue]=Cn(null),[ke,ct]=Cn(null),[Me,Pe]=Cn(null),[Xe,Ke]=Cn(null),Ie=!!e.is_notice,Qe=!!e.is_event,it=!!e.is_bug,dt=!!ge&&Ya(e,X),{onReturnTask:nt}=yt(),At=!!ge&&Xa(e,X),Ot=!!ve&&it&&!!e.completed&&X>0&&(e.author_account_seq??0)===X&&!(e.acks??[]).some(se=>se.account_seq===X),Bt=!yo(e,X),$t=!e.is_event&&(e.is_notice?X>0&&(e.author_account_seq??0)===X:(e.author_account_seq??0)===X||(e.manager_account_seq??0)===X),Vt=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?sr:cr)):null,Q=Ie?!Ga(e,X):Bt,le=dt||At?Yt(Vn,{onClick:se=>Ke(se.currentTarget),children:[we(yk,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,xe=Ie?Fl(e,he):"",fe=Ie?Rp(e,he,X):null,Te=Ie?null:Hi(e,X),qe=!!(Te&&Te.total>0||Ie&&fe),Ae=(e.origin_license_seq??0)>0,ut=!Ie&&!Ae,rt=Yt(Wr,{children:[we(mt,{icon:we(mk,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[oo(9),Be??null,...Qe?[]:[nr(1)]],children:e.created_by?Yt(Wr,{children:[we($r,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):we(ti,{})}),we(mt,{icon:we(sm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[oo(11),Be??null,...Qe?[]:[nr(2)]],children:e.created_time?fn(e.created_time):we(ti,{})})]});return Yt(Wr,{children:[J?Yt(Qt,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[$t?we(sk,{checked:e.completed,icon:we(dk,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:we(rf,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(se,ze)=>{Ue||_t({anchorEl:se.currentTarget,nextCompleted:ze})},sx:{p:0,mt:.25}}):null,Vt?Qe&&!Bt?we(om,{onClick:se=>We(se.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:we(Vt,{sx:{fontSize:20}})}):we(Qt,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Ie?"#e5484d":"#1e3a8a")},children:we(Vt,{sx:{fontSize:20}})}):null,we(Qt,{sx:{flex:1,minWidth:0},children:Ge!==null?we(Qt,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:se=>{if(!se||se.dataset.focused)return;se.dataset.focused="1",se.focus();let ze=document.createRange();ze.selectNodeContents(se),ze.collapse(!1);let vt=window.getSelection();vt?.removeAllRanges(),vt?.addRange(ze)},onBlur:se=>{let ze=(se.currentTarget.textContent??"").replace(/\n/g," ").trim();!He.current&&ze&&ze!==e.title&&re(e.seq,ze),He.current=!1,Le(null)},onKeyDown:se=>{se.key==="Enter"&&(se.preventDefault(),se.target.blur()),se.key==="Escape"&&(He.current=!0,se.target.blur())},onPaste:se=>{se.preventDefault();let ze=se.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,ze)},sx:{outline:"none",fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:Ge}):we(Qt,{onClick:()=>Le(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),we(tn,{open:!!Ue,anchorEl:Ue?.anchorEl??null,nextCompleted:Ue?.nextCompleted??!1,returnMode:!!nt&&en(e,X),onCancel:()=>_t(null),onConfirm:se=>{Ue&&(se&&nt?nt(e,se):ie(e.seq,Ue.nextCompleted)),_t(null)}})]}):null,Yt(Qt,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Ln]:{pb:0,"& > :last-child":{mb:0}}},children:[we(Cl,{hideProject:K,pinColumns:!0,projectColumn:!Qe&&!ee?2:"full",values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminders:Gn(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:d,avatarSrcByName:Za(e,l),hideDueDate:!Qe&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Ie,event:Qe,readOnly:Bt,targetSummary:xe,onChangeProject:se=>t(e.seq,se),onAddProject:n,onChangeStartDate:se=>c(e.seq,"start_date",se),onChangeDueDate:se=>c(e.seq,"due_date",se),onChangeReminder:se=>i(e.seq,se),onChangePriority:se=>h(e.seq,se),onChangeEventTime:se=>m?.(e.seq,se),onChangeEventPlace:se=>x?.(e.seq,se),onChangeEventAddress:se=>k?.(e.seq,se),onMemberEdit:se=>a(e,se,null),narrowCollapsedSx:Be,reminderLocked:e.completed,managerAction:le,supportOrigin:(e.origin_license_seq??0)>0?{licenseName:e.origin_license_name??"",authorName:e.origin_author_name||e.author_name||e.created_by||"",contactPhone:e.origin_contact_phone??"",contactEmail:e.origin_contact_email??"",supportType:rl(e.support_type??"")}:void 0,leading:Yt(Wr,{children:[Ot||le&&(Ie||Qe)?Yt(Qt,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ie||Qe?le:null,Ot?Yt(Wr,{children:[we(ls,{variant:"contained",size:"large",onClick:()=>ve?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),we(ls,{variant:"outlined",size:"large",color:"error",onClick:()=>ve?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,it&&e.ticket_no?we(mt,{icon:we(ck,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:nr(1),children:we(Qt,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Qe?null:we(Qt,{sx:it&&e.ticket_no||ut||qe?nr(it&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:we(mt,{icon:we(hk,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Bt||e.completed?void 0:se=>Fe(se),children:we(Pt,{option:ur(e)})})}),ut?(()=>{let se=On(e),ze=se==="all"?we(lm,{sx:{fontSize:17,color:"#2f80ed"}}):se==="group"?we(cm,{sx:{fontSize:17,color:"#d9730d"}}):we(am,{sx:{fontSize:17}}),vt=se==="all"?"\uC804\uCCB4\uACF5\uAC1C":se==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${g.find(It=>It.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return we(Qt,{sx:Qe?void 0:nr(it?1:2),children:we(mt,{icon:ze,label:"\uACF5\uAC1C",onClick:Bt||!f?void 0:It=>Mt(It),children:vt})})})():null,!Ie&&!it&&!Ae?we(Qt,{sx:Qe?void 0:nr(1),children:we(mt,{icon:we(xk,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:Bt||!u?void 0:se=>ne(se),children:e.repeat_rule?wl(e.repeat_rule):we(ti,{label:"\uC5C6\uC74C"})})}):null,!Ie&&!it&&e.repeat_rule?we(Qt,{sx:Qe?void 0:nr(2),children:we(mt,{icon:we(vk,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:Bt||!u?void 0:se=>ue(se),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:we(ti,{})})}):null,Te&&Te.total>0?we(Qt,{sx:Qe?void 0:nr(2),children:we(mt,{icon:we(nf,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Te.canConfirm?we(ls,{size:"small",variant:"contained",onClick:()=>pe?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Yt(ls,{size:"small",variant:"outlined",color:"inherit",startIcon:Te.myTime?we(rf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:se=>Re({anchorEl:se.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Te.count," / ",Te.total]})})}):null,Ie&&fe?we(Qt,{sx:nr(2),children:we(mt,{icon:we(nf,{sx:{fontSize:17}}),label:"\uD655\uC778",children:we(Qt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:fe.canAck?we(ls,{size:"small",variant:"contained",onClick:()=>pe?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):we(ls,{size:"small",variant:"outlined",color:"inherit",startIcon:fe.acked?we(rf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:se=>Re({anchorEl:se.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":Yt(Wr,{children:[fe.count,we(Qt,{component:"span",sx:{mx:.4},children:"/"}),fe.total]})})})})}):null,Ee&&!ot&&!Qe&&!Ie?Yt(Wr,{children:[we(mt,{icon:we(uk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Bt?void 0:se=>ct(se),sx:nr(1),children:(e.sprint_seq??0)>0?Ce.find(se=>se.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":we(ti,{label:"\uBBF8\uBC30\uC815"})}),we(mt,{icon:we(fk,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:nr(2),children:we(Eo,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Bt,onCommit:se=>te?.(e.seq,Number(se.replace(/[^0-9.]/g,""))||0)})})]}):null,Qe||ee?null:we(Qt,{sx:[K?{gridColumn:"1 / -1"}:nr(1),Be??null],children:we(mt,{icon:we(pk,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Bt?void 0:se=>Pe(se),children:(e.label_keys??[]).length>0?we(Wo,{labelKeys:e.label_keys??[],labelOptions:b}):we(ti,{})})})]}),afterProject:Qe?null:rt,trailing:Yt(Wr,{children:[it?we(Bl,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Bt,showResolution:!!e.completed,onChangeRepro:se=>De?.(e.seq,"bug_repro",se),onChangeDevice:se=>De?.(e.seq,"bug_device",se),onChangeWhere:se=>De?.(e.seq,"bug_where",se),onChangeVersion:se=>De?.(e.seq,"bug_version",se),onChangeResolution:se=>Se?.(e.seq,se)}):null,Qe?rt:null,e.completed?Yt(Wr,{children:[we(mt,{icon:we(nf,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[oo(10),Be??null,...Qe?[]:[nr(1)]],children:e.completed_by?Yt(Wr,{children:[we($r,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):we(ti,{})}),we(mt,{icon:we(sm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[oo(12),Be??null,...Qe?[]:[nr(2)]],children:e.completed_time?fn(e.completed_time):we(ti,{})})]}):null]})}),Yt(Qt,{sx:{display:"none",[Ln]:{display:"block",mt:1.5,mb:0}},children:[we(Si,{sx:{borderColor:"#e6e6e3"}}),we(om,{onClick:()=>me(se=>!se),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:be?Yt(Wr,{children:["\uC811\uAE30 ",we(ak,{sx:{fontSize:18}})]}):Yt(Wr,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",we(lk,{sx:{fontSize:18}})]})})]}),Yt(Qt,{children:[we(Si,{sx:{my:1.5,borderColor:"#e6e6e3",[Ln]:{mt:0,mb:1.25}}}),we(Tn,{icon:we(gk,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:A&&!Bt?we(Ml,{content:e.content??"",templates:A,onApply:se=>L?.(e.seq,se),onSave:D,onRemove:N}):void 0,children:we(Qt,{sx:{userSelect:"text"},children:q?we(Qt,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:we(sl,{})}):we(El,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:j?se=>j(e.seq,se):void 0,readOnly:Bt,onChange:se=>L(e.seq,se)})})}),e.is_bug?null:Yt(Wr,{children:[we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(Tn,{icon:we(bk,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:we(Qt,{sx:{userSelect:"text"},children:we(Qp,{value:e.note,readOnly:Q,onCommit:se=>B(e.seq,se),onDraftChange:R?se=>R(e.seq,se):void 0})})})]}),Qe?null:Yt(Wr,{children:[we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(Al,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Q,onAdd:S,onToggle:T,onRemove:P,onUpdate:p,onReorder:y,onConvertToTask:v,onOpenLinkedTask:w,resolveLinkedTask:C,myAccountSeq:X,linkCandidates:O,linkBaseTask:e,onLinkExistingTask:_})]}),O&&!Qe&&!Ie&&tm(e,O)?Yt(Wr,{children:[we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(nm,{task:e,tasks:O,readOnly:Bt,onOpenTask:z,onLink:$,onUnlink:V,onCreateFollowUp:E})]}):null,we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(Ll,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Q,onAdd:H,onRemove:I,onPreview:M?se=>M({...se,taskSeq:e.seq}):void 0,onDownload:F?se=>F({...se,taskSeq:e.seq}):void 0})]}),we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(Vp,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:X,avatarSrcByName:l,onUpdate:U,onRemove:Y,onToggleReaction:G,onPreview:M?se=>M({...se,taskSeq:e.seq}):void 0,onDownload:F?se=>F({...se,taskSeq:e.seq}):void 0})]}),we(Ni,{anchorEl:Je,value:e.status,options:Ie?Es:it?ui:Rs,onSelect:se=>o(e.seq,se),onClose:()=>Fe(null)}),we(ef,{transitionDuration:0,anchorEl:Ve,open:!!Ve,onClose:()=>ne(null),children:[{value:"",label:"\uC5C6\uC74C"},...Vs].map(se=>we(tf,{selected:(e.repeat_rule??"")===se.value,onClick:()=>{ne(null),(async()=>{let ze=e.repeat_rule??"";if(se.value===ze)return;if(se.value===""){await um({title:"\uBC18\uBCF5 \uD574\uC81C",message:"\uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uACE0 \uBC18\uBCF5\uC744 \uD574\uC81C\uD560\uAE4C\uC694? (\uC9C0\uB09C \uD68C\uCC28\uB294 \uB0A8\uC2B5\uB2C8\uB2E4)"})&&u?.(e.seq,"","");return}let vt=String(e.due_date??"").slice(0,10);if(!vt){wk(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uC608\uC815\uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}ze&&!await um({title:"\uBC18\uBCF5 \uBCC0\uACBD",message:"\uC774\uD6C4 \uD68C\uCC28\uB97C \uC0C8 \uADDC\uCE59\uC73C\uB85C \uB2E4\uC2DC \uC0DD\uC131\uD560\uAE4C\uC694? \uC774\uD6C4 \uD68C\uCC28\uC758 \uB313\uAE00\xB7\uCCA8\uBD80\uB294 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."})||u?.(e.seq,se.value,_l(vt,se.value))})()},sx:{fontSize:14,minWidth:140},children:se.label},se.value||"none"))}),we(_k,{anchorEl:ce,open:!!ce,onClose:()=>ue(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:se=>{ue(null);let ze=kt=>String(kt).padStart(2,"0"),vt=`${se.getFullYear()}-${ze(se.getMonth()+1)}-${ze(se.getDate())}`,It=e.repeat_rule??"";It&&u?.(e.seq,It,vt)}}),we(ef,{transitionDuration:0,anchorEl:Oe,open:!!Oe,onClose:()=>Mt(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:we(am,{sx:{fontSize:17,color:"#57564f"}}),selected:On(e)==="involved",onPick:()=>f?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:we(lm,{sx:{fontSize:17,color:"#2f80ed"}}),selected:On(e)==="all",onPick:()=>f?.(e.seq,"all",0)},...g.map(se=>({key:`group-${se.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${se.name}`,icon:we(cm,{sx:{fontSize:17,color:"#d9730d"}}),selected:On(e)==="group"&&(e.visibility_group_seq??0)===se.seq,onPick:()=>f?.(e.seq,"group",se.seq)}))].map(se=>Yt(tf,{selected:se.selected,onClick:()=>{se.onPick(),Mt(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.icon,se.label,se.selected?we(im,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},se.key))}),we(ef,{transitionDuration:0,anchorEl:ke,open:!!ke,onClose:()=>ct(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ce.filter(se=>`custom-${se.group_seq}`===String(e.tab_key??"")).map(se=>({seq:se.seq,label:kn(se)}))].map(se=>Yt(tf,{onClick:()=>{ye?.(e.seq,se.seq),ct(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.label,(e.sprint_seq??0)===se.seq?we(im,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},se.seq))}),we(ll,{anchorEl:et?.anchorEl??null,open:!!et?.open,acks:e.acks??[],total:fe?.total??Te?.total??0,pendingNames:fe?.pendingNames??Te?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:_e&&(fe?fe.count<fe.total:Te&&Te.count<Te.total)?()=>{_e(e.seq),Re(se=>se?{...se,open:!1}:null)}:void 0,onClose:()=>Re(se=>se?{...se,open:!1}:null)}),we(jl,{anchorEl:Me,selectedKeys:e.label_keys??[],labelOptions:b,onToggle:se=>s(e.seq,Ha(e.label_keys??[],se)),onAddLabel:r,onClose:()=>Pe(null)}),we(Ko,{anchorEl:yr,value:e.icon??"",color:e.icon_color??"",onSelect:se=>{ae(e.seq,se),We(null)},onSelectColor:oe?se=>oe(e.seq,se):void 0,onClose:()=>We(null)}),we(jt,{open:!!Xe,anchorEl:Xe,title:dt?"\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:()=>Ke(null),onConfirm:()=>{ge?.(e.seq),Ke(null)}})]})}import{Fragment as Ak,jsx as Ut,jsxs as cs}from"react/jsx-runtime";function L$(){let e=new Date,d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function z$({open:e,task:d,onClose:b,onAddComment:l,onSaveFields:o,presentation:s="auto",myAccountSeq:r=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:g,canDelete:m,...x}){let k=zt(),B=hm(null);d&&(B.current=d);let R=d??B.current,[L,A]=Kl(!1),[D,N]=Kl(null),[q,j]=Kl(null),S=!!g&&(m??(r>0&&(R?.author_account_seq??0)===r)),[T,P]=Kl({}),p=Object.keys(T).length>0;dm(()=>{P({})},[d?.seq,e]);let y=hm(null);if(dm(()=>{y.current?.scrollTo({top:0})},[d?.seq]),!R)return null;let v=k&&p?{...R,...T}:R,w=v.checklist??[],_=(E,H)=>{k?P(I=>({...I,...E})):H()},C=()=>{let E=T;P({});let H=R.seq,I=E.title===void 0?void 0:String(E.title).trim();if(o){let M={...E};I!==void 0&&(I?M.title=I:delete M.title),Object.keys(M).length>0&&o(H,M),mm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}I&&n(H,I),E.icon!==void 0&&c(H,String(E.icon)),E.icon_color!==void 0&&i?.(H,String(E.icon_color)),E.status!==void 0&&x.onChangeStatus(H,E.status),E.label_keys!==void 0&&x.onChangeLabels(H,E.label_keys??[]),E.tab_key!==void 0&&x.onChangeProject(H,String(E.tab_key??"")),E.start_date!==void 0&&x.onChangeDate(H,"start_date",String(E.start_date??"")),E.due_date!==void 0&&x.onChangeDate(H,"due_date",String(E.due_date??"")),E.reminders!==void 0&&x.onChangeReminder(H,E.reminders),E.priority!==void 0&&x.onChangePriority(H,E.priority),E.event_time!==void 0&&x.onChangeEventTime?.(H,String(E.event_time??"")),E.event_place!==void 0&&x.onChangeEventPlace?.(H,String(E.event_place??"")),E.event_address!==void 0&&x.onChangeEventAddress?.(H,String(E.event_address??"")),E.content!==void 0&&x.onChangeContent(H,String(E.content??"")),E.note!==void 0&&x.onChangeNote(H,String(E.note??"")),E.visibility!==void 0&&x.onChangeVisibility?.(H,E.visibility,Number(E.visibility_group_seq??0)),mm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},O={...x,onChangeStatus:(E,H)=>_({status:H},()=>x.onChangeStatus(E,H)),onChangeLabels:(E,H)=>_({label_keys:H},()=>x.onChangeLabels(E,H)),onChangeProject:(E,H)=>_({tab_key:H},()=>x.onChangeProject(E,H)),onChangeDate:(E,H,I)=>_({[H]:I},()=>x.onChangeDate(E,H,I)),onChangeReminder:(E,H)=>_({reminders:H},()=>x.onChangeReminder(E,H)),onChangePriority:(E,H)=>_({priority:H},()=>x.onChangePriority(E,H)),onChangeEventTime:(E,H)=>_({event_time:H},()=>x.onChangeEventTime?.(E,H)),onChangeEventPlace:(E,H)=>_({event_place:H},()=>x.onChangeEventPlace?.(E,H)),onChangeEventAddress:(E,H)=>_({event_address:H},()=>x.onChangeEventAddress?.(E,H)),onChangeContent:(E,H)=>_({content:H},()=>x.onChangeContent(E,H)),onChangeNote:(E,H)=>_({note:H},()=>x.onChangeNote(E,H)),onMemberEdit:(E,H)=>x.onMemberEdit(E,H,k?I=>P(M=>({...M,...I})):null),onChangeNoteDraft:k?(E,H)=>_({note:H},()=>{}):void 0,onChangeVisibility:x.onChangeVisibility?(E,H,I)=>_({visibility:H,visibility_group_seq:I},()=>x.onChangeVisibility?.(E,H,I)):void 0,onAddChecklistItem:(E,H)=>_({checklist:[...w,{label:H,checked:!1}]},()=>x.onAddChecklistItem(E,H)),onToggleChecklistItem:(E,H,I)=>_({checklist:w.map((M,F)=>F===H?{...M,checked:I}:M)},()=>x.onToggleChecklistItem(E,H,I)),onRemoveChecklistItem:(E,H)=>_({checklist:w.filter((I,M)=>M!==H)},()=>x.onRemoveChecklistItem(E,H)),onUpdateChecklistItem:x.onUpdateChecklistItem?(E,H,I)=>_({checklist:w.map((M,F)=>F===H?{...M,label:I}:M)},()=>x.onUpdateChecklistItem?.(E,H,I)):void 0,onReorderChecklist:x.onReorderChecklist?(E,H)=>_({checklist:H},()=>x.onReorderChecklist?.(E,H)):void 0,onLinkChecklistTask:x.onLinkChecklistTask?(E,H,I)=>_({checklist:[...w,{label:I,checked:!1,task_seq:H}]},()=>x.onLinkChecklistTask?.(E,H,I)):void 0},z=Ut(fm,{...O,task:v,myAccountSeq:r,onChangeTitle:(E,H)=>_({title:H},()=>n(E,H)),onToggleCompleted:t,onChangeIcon:(E,H)=>_({icon:H},()=>c(E,H)),onChangeIconColor:(E,H)=>_({icon_color:H},()=>i?.(E,H)),showTitle:k||s==="dialog"}),$=Ut(Kp,{onSubmit:(E,H)=>l(v.seq,E,H)},v.seq);return k||s==="dialog"?cs(Ak,{children:[Ut(Ok,{open:e,onClose:b,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:v.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":v.is_event?"\uC77C\uC815":v.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{raw:!0,icon:Ut(Tk,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:E=>N(E.currentTarget),children:Ut(Bk,{sx:{color:"#6b7280"}})})},...k?[{raw:!0,icon:Ut(kk,{variant:"contained",size:"small",disableElevation:!0,disabled:!p,onClick:p?C:void 0,sx:{ml:1.5,height:32,minWidth:64,px:1.75,py:0,borderRadius:1,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#f2f2f0",color:"#c9c8c5"}},children:"\uC800\uC7A5\uD558\uAE30"})}]:[]]},fullScreen:k,maxWidth:k?void 0:"md",width:k?void 0:720,mobilePresentation:k?"slide":void 0,tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:$},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:Ut(Gl,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:z})}]},R.seq),cs(Ck,{open:!!D,anchorEl:D,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[f?cs(af,{onClick:()=>{N(null),A(!0)},children:[Ut(of,{children:Ut(Ek,{fontSize:"small"})}),Ut(sf,{children:"\uD65C\uB3D9"})]}):null,cs(af,{onClick:()=>{N(null),os(v,!0)},children:[Ut(of,{children:Ut(Mk,{fontSize:"small"})}),Ut(sf,{children:"\uACF5\uC720\uD558\uAE30"})]}),S?cs(af,{onClick:E=>{let H=D??E.currentTarget;N(null),j(H)},sx:{color:"#e5484d"},children:[Ut(of,{children:Ut(Ik,{fontSize:"small",sx:{color:"#e5484d"}})}),Ut(sf,{children:"\uC0AD\uC81C"})]}):null]}),Ut(jt,{open:!!q,anchorEl:q,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>j(null),onConfirm:()=>{j(null),g?.(v)}}),Ut(Ul,{open:L,taskSeq:v.seq,items:a,loading:h,onLoad:f,onClose:()=>A(!1)})]}):Ut(Sk,{anchor:"right",open:e,onClose:b,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:E=>E.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:cs(Gl,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Ut(Jp,{task:v,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:b,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:g,canDelete:m}),Ut(pm,{sx:{borderColor:"#e6e6e3"}}),Ut(Gl,{sx:{flex:1,minHeight:0},children:Ut(Rk,{ref:y,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:z})}),Ut(pm,{sx:{borderColor:"#37352f"}}),Ut(Gl,{sx:{flexShrink:0},children:$})]})})}import{useEffect as $k,useState as Po}from"react";import{Box as Ur,Button as ff,IconButton as ym}from"@mui/material";import{FormDialog as xm}from"@ehfuse/mui-form-dialog";import Hk from"@mui/icons-material/Add";import Wk from"@mui/icons-material/DirectionsRunOutlined";import Uk from"@mui/icons-material/EditOutlined";import{ErrorAlert as vm}from"@ehfuse/alerts";import{ClearTextField as wm,DateTextField as _m,LabelSelect as km}from"@ehfuse/mui-form-controls";import{useEffect as Dk,useState as gm}from"react";import{Box as Do,Button as Pk,FormControlLabel as lf,Radio as cf,RadioGroup as Nk}from"@mui/material";import{FormDialog as Lk}from"@ehfuse/mui-form-dialog";import{LabelSelect as zk}from"@ehfuse/mui-form-controls";import jk from"@ehfuse/overlay-scrollbar";import{Fragment as Fk,jsx as Lr,jsxs as us}from"react/jsx-runtime";function bm({open:e,sprint:d,remainingTasks:b,sprints:l,onClose:o,onConfirm:s}){let r=l.filter(h=>h.seq!==d?.seq&&h.group_seq===(d?.group_seq??0)&&h.status!=="closed"),[t,n]=gm("backlog"),[c,i]=gm(0);Dk(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=b.length>0;return Lr(Lk,{open:e,onClose:o,maxWidth:"sm",title:"\uBAA9\uD45C \uB9C8\uAC10",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-close",tabs:{visible:!1},actions:{showCancelButton:!0,right:Lr(Pk,{variant:"contained",onClick:()=>s({mode:a?t:"keep",moveToSprintSeq:t==="move"?c:0,taskSeqs:b.map(h=>h.seq)}),disabled:a&&t==="move"&&!(c>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:us(Do,{sx:{display:"flex",flexDirection:"column",gap:2},children:[us(Do,{sx:{fontSize:18,color:"#37352f"},children:[Lr(Do,{component:"span",sx:{fontWeight:600},children:d?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?us(Fk,{children:[us(Do,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",b.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),Lr(Do,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Lr(jk,{style:{maxHeight:220},thumb:{width:6},children:b.map(h=>us(Do,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[Lr(Do,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Lr(Pt,{option:ur(h)})]},h.seq))})}),us(Nk,{value:t,onChange:(h,f)=>n(f),children:[r.length>0?Lr(lf,{value:"move",control:Lr(cf,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?Lr(Do,{sx:{pl:4,pb:1},children:Lr(zk,{size:"small",label:"",fullWidth:!0,value:String(c),options:r.map(h=>({value:String(h.seq),label:h.name})),onChange:h=>i(Number(h.target.value)||0)})}):null,Lr(lf,{value:"backlog",control:Lr(cf,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),Lr(lf,{value:"keep",control:Lr(cf,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):Lr(Do,{sx:{fontSize:15,color:"#6f6f6c"},children:"\uB0A8\uC740 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774\uB300\uB85C \uB9C8\uAC10\uD558\uBA74 \uBAA9\uD45C\uAC00 \uC885\uB8CC\uB429\uB2C8\uB2E4."})]})}]})}var uf="custom-";function qk(e){return e.startsWith(uf)}function X$(e){return e>0?`${uf}${e}`:""}function ri(e){if(!qk(e))return 0;let d=Number(e.slice(uf.length));return Number.isInteger(d)&&d>0?d:0}import{Fragment as Tm,jsx as Ht,jsxs as ni}from"react/jsx-runtime";var Vk=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Sm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function cH({open:e,customTabs:d,sprints:b,onClose:l,onCreate:o,onUpdate:s,onChangeStatus:r,tasks:t=[],onCloseSprint:n,onRemove:c}){let i=d.filter(O=>O.useSprints&&!O.archived),[a,h]=Po(""),[f,u]=Po(""),[g,m]=Po(""),[x,k]=Po(""),[B,R]=Po(""),[L,A]=Po(!1),[D,N]=Po(!1),[q,j]=Po(null),S=q?t.filter(O=>(O.sprint_seq??0)===q.seq&&!O.completed):[],[T,P]=Po(0);$k(()=>{e&&(h(i.length===1?i[0].key:""),u(""),m(""),k(""),R(""),P(0))},[e]);let p=()=>{u(""),m(""),k(""),R(""),P(0),N(!1)},y=O=>{P(O.seq),h(`custom-${O.group_seq}`),u(O.name),m(O.goal),k(O.start_date),R(O.end_date)},v=T>0||D,w=async()=>{let O=ri(a);if(!O){vm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!f.trim()){vm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}A(!0);try{if(T>0){s(T,{name:f.trim(),goal:g.trim(),start_date:x,end_date:B}),p();return}await o({group_seq:O,name:f.trim(),goal:g.trim(),start_date:x,end_date:B})&&p()}finally{A(!1)}},_=new Map(d.map(O=>[ri(O.key),O.label])),C=Ht(Ur,{children:i.length===0?Ht(Ur,{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.'}):Ht(Tm,{children:Ht(Ur,{children:b.length===0?ni(Ur,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ht(Wk,{sx:{fontSize:48,color:"#d9d9d6"}}),Ht(Ur,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):b.map(O=>ni(Ur,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[ni(Ur,{sx:{minWidth:0},children:[ni(Ur,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Ht(Ur,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:O.name}),Ht(Ur,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:_.get(O.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),ni(Ur,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Sm(O.start_date)," ~"," ",Sm(O.end_date)]})]}),O.goal?Ht(Ur,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:O.goal}):null]}),ni(Ur,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ht(km,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:O.status,options:Vk.map(z=>({value:z.value,label:z.label})),onChange:z=>{let $=String(z.target.value);if($==="closed"&&n){j(O);return}r(O.seq,$)},sx:{width:104,flexShrink:0}}),Ht(ym,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(O),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Ht(Uk,{sx:{fontSize:18}})}),Ht(ym,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(O.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ht(dr,{style:{width:16,height:16}})})]})]},O.seq))})})});return ni(Tm,{children:[Ht(xm,{open:e,onClose:l,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:C}],sectionContentPaddingTop:0,actions:{showCancelButton:!0,left:i.length>0?Ht(ff,{startIcon:Ht(Hk,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Ht(ff,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),Ht(bm,{open:q!==null,sprint:q,remainingTasks:S,sprints:b,onClose:()=>j(null),onConfirm:O=>{q&&n?.(q.seq,O),j(null)}}),Ht(xm,{open:v,onClose:()=>{N(!1),p()},maxWidth:"sm",title:T>0?"\uBAA9\uD45C \uC218\uC815":"\uC0C8 \uBAA9\uD45C",locale:"ko",backdropClick:!1,tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-form",sections:[{id:"sprint-form",title:"",showTitle:!1,children:Ht(Ur,{sx:{pt:1},children:ni(Ur,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Ht(km,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:a,options:i.map(O=>({value:O.key,label:O.label})),onChange:O=>h(String(O.target.value)),disabled:T>0}),Ht(wm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:f,onChange:O=>u(O.target.value)}),Ht(_m,{size:"medium",label:"\uC2DC\uC791\uC77C",value:x,onChange:O=>k(O.target.value)}),Ht(_m,{size:"medium",label:"\uC885\uB8CC\uC77C",value:B,onChange:O=>R(O.target.value)}),Ht(wm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:g,onChange:O=>m(O.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Ht(ff,{variant:"contained",onClick:()=>{w()},disabled:L,children:T>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as nn,Button as Mm,Tooltip as Kk}from"@mui/material";import{FormDialog as Gk}from"@ehfuse/mui-form-dialog";import Yk from"@mui/icons-material/CalendarMonthOutlined";import Xk from"@mui/icons-material/FileUploadOutlined";import Zk from"@mui/icons-material/FileDownloadOutlined";var df={google:{key:"google",name:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",homeUrl:"https://calendar.google.com/calendar",defaultCalendarName:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > **URL\uB85C \uCD94\uAC00**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\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.","\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."],importSteps:["\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 > **\uC124\uC815 \uBC0F \uACF5\uC720**\uB97C \uC5FD\uB2C8\uB2E4.","**\uCE98\uB9B0\uB354 \uD1B5\uD569** \uC139\uC158\uC758 **iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C**\uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."],importPlaceholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",buildSubscribeUrl:e=>`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(e.replace(/^https?:\/\//,"webcal://"))}`},apple:{key:"apple",name:"\uC560\uD50C \uCE98\uB9B0\uB354",homeUrl:"https://www.icloud.com/calendar",defaultCalendarName:"\uC560\uD50C \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uC544\uC774\uD3F0\xB7\uC544\uC774\uD328\uB4DC: **\uC124\uC815 > \uCE98\uB9B0\uB354 > \uACC4\uC815 > \uACC4\uC815 \uCD94\uAC00 > \uAE30\uD0C0 > \uAD6C\uB3C5 \uCE98\uB9B0\uB354 \uCD94\uAC00**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\uB9E5: \uCE98\uB9B0\uB354 \uC571 > **\uD30C\uC77C > \uC0C8\uB85C\uC6B4 \uCE98\uB9B0\uB354 \uAD6C\uB3C5**\uC5D0 \uBD99\uC5EC\uB123\uC2B5\uB2C8\uB2E4.","iCloud.com(\uC6F9)\uC5D0\uC11C\uB294 \uAD6C\uB3C5\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uAE30\uAE30\uC5D0\uC11C \uCD94\uAC00\uD558\uBA74 iCloud \uB85C \uB3D9\uAE30\uD654\uB429\uB2C8\uB2E4."],importSteps:["iCloud.com > \uCE98\uB9B0\uB354\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354 \uC606 **\uACF5\uC720 \uC544\uC774\uCF58**\uC744 \uB204\uB985\uB2C8\uB2E4.","**\uACF5\uC6A9 \uCE98\uB9B0\uB354**\uB97C \uCF1C\uACE0 \uB098\uC624\uB294 **\uB9C1\uD06C\uB97C \uBCF5\uC0AC**\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694(webcal:// \uC8FC\uC18C\uB3C4 \uADF8\uB300\uB85C \uB429\uB2C8\uB2E4)."],importPlaceholder:"webcal://p00-calendars.icloud.com/published/\u2026",importWarning:"\uC560\uD50C\uC740 **\uACF5\uC6A9 \uCE98\uB9B0\uB354**\uB85C \uBC14\uAFD4\uC57C \uC8FC\uC18C\uAC00 \uB098\uC635\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC544\uB294 \uC0AC\uB78C\uC740 \uADF8 \uCE98\uB9B0\uB354\uB97C \uBCFC \uC218 \uC788\uC73C\uB2C8, \uAC1C\uC778 \uC77C\uC815\uC774 \uB2F4\uAE34 \uCE98\uB9B0\uB354\uB294 \uACF5\uAC1C\uD558\uC9C0 \uB9C8\uC138\uC694."},naver:{key:"naver",name:"\uB124\uC774\uBC84 \uCE98\uB9B0\uB354",homeUrl:"https://calendar.naver.com",defaultCalendarName:"\uB124\uC774\uBC84 \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 > \uC67C\uCABD **\uB0B4 \uCE98\uB9B0\uB354** \uC606 **+** > **URL\uB85C \uAD6C\uB3C5\uD558\uAE30**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\uB124\uC774\uBC84\uAC00 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uB124\uC774\uBC84 \uCE98\uB9B0\uB354\uC5D0\uC11C \uAD6C\uB3C5\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."],importSteps:["\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 > \uC67C\uCABD **\uCE98\uB9B0\uB354 \uC124\uC815**(\uD1B1\uB2C8)\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uB97C \uACE0\uB985\uB2C8\uB2E4.","**\uC678\uBD80 \uACF5\uAC1C** \uD56D\uBAA9\uC5D0\uC11C **\uCE98\uB9B0\uB354 \uACF5\uAC1C**\uB97C \uCCB4\uD06C\uD558\uBA74 \uB098\uC624\uB294 **iCal \uC8FC\uC18C**\uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."],importPlaceholder:"https://calendar.naver.com/\u2026(iCal \uC8FC\uC18C)",importWarning:"\uB124\uC774\uBC84\uB294 **\uCE98\uB9B0\uB354\uB97C \uACF5\uAC1C**\uD574\uC57C iCal \uC8FC\uC18C\uAC00 \uB098\uC635\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC544\uB294 \uC0AC\uB78C\uC740 \uADF8 \uCE98\uB9B0\uB354\uB97C \uBCFC \uC218 \uC788\uC73C\uB2C8, \uAC1C\uC778 \uC77C\uC815\uC774 \uB2F4\uAE34 \uCE98\uB9B0\uB354\uB294 \uACF5\uAC1C\uD558\uC9C0 \uB9C8\uC138\uC694."}},Cm=Object.values(df);function Yl(e){return df[e??"google"]??df.google}import{jsx as pr,jsxs as fs}from"react/jsx-runtime";function xH({open:e,imports:d=[],onOpenExport:b,onOpenImport:l,onClose:o}){let s=fs(nn,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[fs(nn,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,color:"#37352f",display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[pr(nn,{children:fs(nn,{component:"span",children:[pr("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uB2E4\uB978 \uCE98\uB9B0\uB354\uC5D0\uC11C"," ",pr("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uBCF4\uAC8C \uD569\uB2C8\uB2E4."]})}),pr(nn,{children:fs(nn,{component:"span",children:[pr("b",{children:"\uAC00\uC838\uC624\uAE30"}),"\uB294 \uADF8 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uACB9\uCCD0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."]})}),pr(nn,{children:pr(nn,{component:"span",children:"\uB450 \uBC29\uD5A5 \uBAA8\uB450 \uC6D0\uBCF8\uC744 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})})]}),pr(nn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Cm.map((r,t)=>fs(nn,{sx:{display:"flex",alignItems:"center",gap:2,px:2,py:1.75,borderTop:t>0?"1px solid #f2f2f0":"none"},children:[pr(Yk,{sx:{fontSize:22,color:"#787774",flexShrink:0}}),fs(nn,{sx:{flex:1,minWidth:0},children:[pr(nn,{sx:{fontSize:16,color:"#37352f"},children:r.name}),r.exportBlockedReason??r.importBlockedReason?pr(nn,{sx:{fontSize:13.5,color:"#8a6d1d",mt:.25,lineHeight:1.6},children:r.exportBlockedReason??r.importBlockedReason}):null]}),pr(Im,{label:"\uB0B4\uBCF4\uB0B4\uAE30",icon:pr(Xk,{sx:{fontSize:18}}),supported:r.exportSupported,reason:r.exportBlockedReason,onClick:()=>b(r.key)}),pr(Im,{label:Bm(d,r.key)>0?`\uAC00\uC838\uC624\uAE30 (${Bm(d,r.key)})`:"\uAC00\uC838\uC624\uAE30",icon:pr(Zk,{sx:{fontSize:18}}),supported:r.importSupported,reason:r.importBlockedReason,onClick:()=>l(r.key)})]},r.key))})]});return pr(Gk,{open:e,onClose:o,width:680,title:"\uCE98\uB9B0\uB354 \uC5F0\uB3D9",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-link",sectionContentPaddingTop:0,sections:[{id:"calendar-link",showTitle:!1,children:s}],actions:{showCancelButton:!1,right:pr(Mm,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})}})}function Bm(e,d){return e.filter(b=>b.provider===d).length}function Im({label:e,icon:d,supported:b,reason:l,onClick:o}){let s=pr(nn,{component:"span",sx:{flexShrink:0},children:pr(Mm,{size:"medium",variant:"outlined",startIcon:d,disabled:!b,onClick:o,sx:{minWidth:132,whiteSpace:"nowrap"},children:e})});return b?s:pr(Kk,{title:l??"\uC774 \uC11C\uBE44\uC2A4\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",arrow:!0,children:s})}import{useState as Em}from"react";import{Box as Tr,Button as pf,Divider as e6,IconButton as t6,TextField as r6}from"@mui/material";import{FormDialog as n6}from"@ehfuse/mui-form-dialog";import o6 from"@mui/icons-material/OpenInNewOutlined";import i6 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as s6}from"@ehfuse/alerts";import{Fragment as Jk}from"react";import{Fragment as Qk,jsx as hf}from"react/jsx-runtime";function ra({text:e}){let d=String(e??"").split("**");return hf(Qk,{children:d.map((b,l)=>l%2===1?hf("b",{children:b},l):hf(Jk,{children:b},l))})}import{jsx as qt,jsxs as na}from"react/jsx-runtime";function DH({open:e,imports:d,provider:b,onRegister:l,onRemove:o,onClose:s}){let r=Yl(b),[t,n]=Em(""),[c,i]=Em(!1),a=async()=>{let u=t.trim();if(u){i(!0);try{await l(u)&&n("")}finally{i(!1)}}},h=async u=>{await s6({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${u.name||r.defaultCalendarName}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&o(u.seq)},f=na(Tr,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[na(Tr,{sx:{color:"#37352f",lineHeight:1.7},children:[r.name,"\uC758 \uC77C\uC815\uC744 ",qt("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",qt("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",qt("b",{children:"\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),qt(Tr,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),d.length>0?qt(Tr,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:d.map((u,g)=>na(Tr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:g>0?"1px solid #efefed":"none"},children:[qt(i6,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),qt(Tr,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.name||r.defaultCalendarName}),qt(t6,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{h(u)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:qt(dr,{sx:{fontSize:18}})})]},u.seq))}):qt(Tr,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),qt(e6,{sx:{my:1,borderColor:"#e6e6e3"}}),qt(Tr,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),na(Tr,{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:[r.importSteps.map(u=>qt(Tr,{children:qt(Tr,{component:"span",children:qt(ra,{text:u})})},u)),qt(Tr,{children:qt(Tr,{component:"span",children:"\uB4F1\uB85D\uD55C \uC8FC\uC18C\uB294 \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),qt(Tr,{children:qt(Tr,{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."})}),r.importWarning?qt(Tr,{children:qt(Tr,{component:"span",children:qt(ra,{text:r.importWarning})})}):null]}),na(Tr,{sx:{display:"flex",gap:2,alignItems:"center"},children:[qt(r6,{value:t,onChange:u=>n(u.target.value),fullWidth:!0,label:"iCal \uC8FC\uC18C",placeholder:r.importPlaceholder,slotProps:{input:{spellCheck:!1}}}),qt(pf,{variant:"contained",disabled:!t.trim()||c,onClick:()=>{a()},sx:{flexShrink:0},children:c?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return qt(n6,{open:e,onClose:s,width:680,title:`${r.name} \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:f}],actions:{showCancelButton:!1,left:qt(pf,{variant:"outlined",startIcon:qt(o6,{sx:{fontSize:16}}),onClick:()=>window.open(r.homeUrl,"_blank"),children:r.name}),right:qt(pf,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{Box as Ti,Button as oa,TextField as a6}from"@mui/material";import{FormDialog as l6}from"@ehfuse/mui-form-dialog";import c6 from"@mui/icons-material/ContentCopyOutlined";import Rm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Om}from"@ehfuse/alerts";import{Fragment as f6,jsx as Er,jsxs as Ci}from"react/jsx-runtime";function u6(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function WH({open:e,feed:d,feedTaskCount:b,provider:l,buildFeedUrl:o,onSubscribe:s,onClose:r}){let t=Yl(l),n=o??u6,c=d.subscribed?n(d.token):"",i=()=>{navigator.clipboard.writeText(c).then(()=>Om("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Om("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},a=()=>{let f=t.buildSubscribeUrl?.(c);f&&window.open(f,"_blank")},h=Ci(Ti,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ci(Ti,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Er("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C ",t.name,"\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),b===0?Ci(Ti,{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.",Er("br",{}),Er("b",{children:"\uB9C8\uAC10\uC608\uC815\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",d.subscribed?`${t.name}\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.`:"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):d.subscribed&&d.enabled?Ci(f6,{children:[Er(a6,{value:c,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Ci(Ti,{sx:{display:"flex",gap:2},children:[Er(oa,{variant:"outlined",startIcon:Er(c6,{}),onClick:i,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),t.buildSubscribeUrl?Ci(oa,{variant:"contained",startIcon:Er(Rm,{}),onClick:a,children:[t.name,"\uC5D0 \uCD94\uAC00"]}):null]}),Ci(Ti,{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:[t.subscribeSteps.map(f=>Er(Ti,{children:Er("span",{children:Er(ra,{text:f})})},f)),Er(Ti,{children:Er("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."})})]})]}):Er(oa,{variant:"contained",onClick:s,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Er(l6,{open:e,onClose:r,width:680,title:`${t.name}\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:h}],actions:{showCancelButton:!1,left:Er(oa,{variant:"outlined",startIcon:Er(Rm,{sx:{fontSize:16}}),onClick:()=>window.open(t.homeUrl,"_blank"),children:t.name}),right:Er(oa,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{useEffect as d6,useMemo as mf,useState as gf}from"react";import{Box as ia,Button as h6,Typography as p6}from"@mui/material";import{FormDialog as m6}from"@ehfuse/mui-form-dialog";import{SearchTextField as g6}from"@ehfuse/mui-form-controls";import{TreeView as b6}from"@ehfuse/tree-view";import{Fragment as k6,jsx as qn,jsxs as S6}from"react/jsx-runtime";function Am(e){return`${e.name}#${e.seq}`}function y6(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function x6(e){let d=[],b=l=>{for(let o of l.employees??[])d.push(o);for(let o of l.groups??[])b(o)};for(let l of e)b(l);return d}function v6(e,d){return d?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(b=>String(b).toLowerCase().includes(d)):!0}function w6(e){let d=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Am(e),renderLabel:qn(ia,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:qn(ia,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:d})})}}function Dm(e,d){let b=(e.groups??[]).map(o=>Dm(o,d)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>v6(o,d)).map(w6);return b.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...b,...l]}}function _6({groups:e,allEmployees:d,initialSelectedSeqs:b,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=gf(""),n=mf(()=>e.map(i=>Dm(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=mf(()=>d.filter(i=>b.includes(i.seq)).map(Am),[]);return S6(k6,{children:[qn(ia,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:qn(g6,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),qn(ia,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:qn(b6,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(y6).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function QH({open:e,title:d="\uC9C1\uC6D0 \uC120\uD0DD",hint:b="",groups:l,multiple:o=!1,selectedSeqs:s,confirmText:r="\uD655\uC778",onConfirm:t,onClose:n}){let c=zt(),[i,a]=gf([]),[h,f]=gf(0),u=mf(()=>x6(l),[l]),g=s??[];d6(()=>{e&&(a(g),f(x=>x+1))},[e]);let m=()=>{let x=u.filter(k=>i.includes(k.seq));t(o?x:x.slice(0,1)),n()};return qn(m6,{open:e,onClose:n,title:`${d}${o&&i.length>0?` (${i.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:qn(ia,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:qn(_6,{groups:l,allEmployees:u,initialSelectedSeqs:g,multiple:o,isMobile:c,onSelectionChange:a},h)})}],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:b?qn(p6,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:b}):void 0,right:qn(h6,{variant:"contained",onClick:m,children:r})}})}import{useEffect as G8,useMemo as m0,useState as da}from"react";import{Box as zo,Button as g0}from"@mui/material";import{FormDialog as Y8}from"@ehfuse/mui-form-dialog";import{LabelSelect as Cf}from"@ehfuse/mui-form-controls";import X8 from"@mui/icons-material/SpeedOutlined";import{useEffect as T6,useState as C6}from"react";import{Box as on,Button as B6}from"@mui/material";import{FormDialog as I6}from"@ehfuse/mui-form-dialog";import{LabelSelect as M6,NumberField as Pm}from"@ehfuse/mui-form-controls";import E6 from"@ehfuse/overlay-scrollbar";import{jsx as Vr,jsxs as sa}from"react/jsx-runtime";var R6=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function Nm({open:e,capacity:d,employees:b,onClose:l,onSave:o}){let[s,r]=C6(d??mo);T6(()=>{e&&r(d??mo)},[e,d]);let t=s.basis==="points"?"SP":"\uAC74",n=(c,i)=>{let a=Math.max(0,Math.floor(Number(i)||0));r(h=>{let f={...h.by_account};return a>0?f[c]=a:delete f[c],{...h,by_account:f}})};return Vr(I6,{open:e,onClose:l,maxWidth:"sm",title:"\uC778\uC6D0 \uC6A9\uB7C9",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-capacity",tabs:{visible:!1},actions:{showCancelButton:!0,right:Vr(B6,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:sa(on,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Vr(on,{sx:{fontSize:15,color:"#37352f"},children:"\uD55C \uC0AC\uB78C\uC774 \uB3D9\uC2DC\uC5D0 \uC548\uC744 \uC218 \uC788\uB294 \uC591\uC744 \uC815\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC744 \uB118\uAE30\uBA74 \uC6CC\uD06C\uB85C\uB4DC \uCC28\uD2B8\uC5D0\uC11C \uBD89\uAC8C \uD45C\uC2DC\uB429\uB2C8\uB2E4. 0 \uC73C\uB85C \uB450\uBA74 \uC6A9\uB7C9\uC744 \uC4F0\uC9C0 \uC54A\uACE0 \uD300 \uD3C9\uADE0\uC744 \uAE30\uC900\uC73C\uB85C \uBD05\uB2C8\uB2E4."}),sa(on,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Vr(on,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),Vr(M6,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:R6,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),sa(on,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Vr(on,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),Vr(Pm,{size:"medium",fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:t,value:s.default_capacity,onValueChange:c=>r(i=>({...i,default_capacity:Math.max(0,Math.floor(Number(c)||0))}))})]}),Vr(on,{sx:{pl:"119px",mt:-1.25,fontSize:13.5,color:"#37352f"},children:`\uC804\uC6D0 \uACF5\uD1B5 \uAE30\uC900(${t}) \xB7 0 = \uC6A9\uB7C9 \uC548 \uC500`}),Vr(on,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),b.length===0?Vr(on,{sx:{fontSize:15,color:"#787774"},children:"\uC9C1\uC6D0 \uBAA9\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uAE30\uBCF8 \uC6A9\uB7C9\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}):Vr(on,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Vr(E6,{style:{maxHeight:260},thumb:{width:6},children:b.filter(c=>Number(c.account_seq)>0).map(c=>sa(on,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[sa(on,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?Vr(on,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),Vr(on,{sx:{width:132,flexShrink:0},children:Vr(Pm,{size:"small",fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:t,clearWhenZero:!0,value:s.by_account[Number(c.account_seq)]??0,onValueChange:i=>n(Number(c.account_seq),String(i??""))})})]},c.account_seq))})})]})}]})}import{Box as Zl}from"@mui/material";import{Bar as P6,BarChart as N6,CartesianGrid as L6,Cell as z6,ReferenceLine as j6,ResponsiveContainer as F6,Tooltip as q6,XAxis as $6,YAxis as H6}from"recharts";import{Box as O6}from"@mui/material";import{jsx as A6}from"react/jsx-runtime";function Kr({text:e,height:d}){return A6(O6,{sx:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:14.5,color:"#9a9a97",...typeof d=="number"?{height:d,minHeight:120}:{position:"absolute",inset:0,pointerEvents:"none"}},children:e})}import{createElement as D6}from"react";var Xl="#2f80ed",Lm="#a9c9f5",Bi="#9a9a97",bf="#2e9e6b",lo="#3d7eff",yf="#c3c8ce",aa="#f2a30f",la={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},ds={...la,cursor:!1},hs={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>D6("span",{style:{paddingRight:14,color:"#37352f"}},e)};function mr(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var zr={flexShrink:0,mb:1.5,display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"};function co(e){return{"& *":{outline:"none"},userSelect:"none",...typeof e=="number"?{height:e,flexShrink:0}:{flex:1,minHeight:0}}}import{jsx as $n,jsxs as ca}from"react/jsx-runtime";function W6(e,d){let b=d.filter(l=>l.sprint_seq===e.seq&&!l.archived&&l.completed);return{points:b.reduce((l,o)=>l+(o.story_points??0),0),count:b.length}}function zm({sprints:e,tasks:d,height:b=200}){let o=[...e].sort((i,a)=>`${i.start_date}|${i.seq}`.localeCompare(`${a.start_date}|${a.seq}`)).map(i=>({sprint:i,...W6(i,d)})),s=o.some(i=>i.points>0),r=s?"SP":"\uAC74",t=o.filter(i=>i.sprint.status==="closed").map(i=>s?i.points:i.count),n=t.length>0?Math.round(t.reduce((i,a)=>i+a,0)/t.length*10)/10:null,c=o.map(i=>({\uBAA9\uD45C:`${i.sprint.name}${i.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""}`,\uC644\uB8CC:s?i.points:i.count,closed:i.sprint.status==="closed"}));return o.length===0?$n(Kr,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:b}):ca(Zl,{sx:mr(b),children:[ca(Zl,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ca("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?ca("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",$n(Zl,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),$n(Zl,{sx:co(b),children:$n(F6,{width:"100%",height:"100%",children:ca(N6,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[$n(L6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),$n($6,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),$n(H6,{tick:{fontSize:13},width:40,allowDecimals:!1}),$n(q6,{...ds,formatter:i=>`${Number(i??0)}${r}`}),n!==null?$n(j6,{y:n,stroke:Bi,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,$n(P6,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>$n(z6,{fill:i.closed?Xl:Lm},i.\uBAA9\uD45C))})]})})})]})}import{useMemo as U6}from"react";import{Box as uo}from"@mui/material";import{CartesianGrid as V6,Line as jm,LineChart as K6,ResponsiveContainer as G6,Tooltip as Y6,XAxis as X6,YAxis as Z6}from"recharts";import{jsx as sn,jsxs as oi}from"react/jsx-runtime";function Fm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function J6(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Q6(e){return e.slice(5).replace("-",".")}function qm({sprint:e,tasks:d,todayStr:b,height:l=200,headerLeft:o}){let s=U6(()=>{let a=Fm(e.start_date),h=Fm(e.end_date);if(!a||!h||h<a||Math.round((h.getTime()-a.getTime())/864e5)+1>366)return null;let u=d.filter(D=>D.sprint_seq===e.seq&&!D.archived);if(u.length===0)return{empty:!0};let g=u.some(D=>(D.story_points??0)>0),m=D=>g?D.story_points??0:1,x=u.reduce((D,N)=>D+m(N),0),k=new Map;for(let D of u){if(!D.completed)continue;let N=(D.completed_time??"").slice(0,10),q=/^\d{4}-\d{2}-\d{2}$/.test(N)?N:e.start_date;k.set(q,(k.get(q)??0)+m(D))}let B=[];for(let D=new Date(a);D<=h;D.setDate(D.getDate()+1))B.push(J6(D));let R=x,L=x;return{empty:!1,data:B.map((D,N)=>{let q=B.length===1?0:x*(1-N/(B.length-1));return D<=b&&(R-=k.get(D)??0,L=Math.max(0,R)),{\uB0A0\uC9DC:Q6(D),\uC774\uC0C1:Math.round(q*10)/10,\uB0A8\uC740\uB7C9:D<=b?Math.max(0,R):null}}),total:x,usePoints:g,last:L}},[e,d,b]);if(!s)return oi(uo,{sx:mr(l),children:[o?sn(uo,{sx:zr,children:o}):null,sn(Kr,{text:"\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.",height:l})]});if(s.empty)return oi(uo,{sx:mr(l),children:[o?sn(uo,{sx:zr,children:o}):null,sn(Kr,{text:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]});let{data:r,total:t,usePoints:n,last:c}=s,i=n?"SP":"\uAC74";return oi(uo,{sx:mr(l),children:[oi(uo,{sx:zr,children:[o?sn(uo,{sx:{flexShrink:0},children:o}):null,oi(uo,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[oi("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),oi("span",{children:["\uD604\uC7AC"," ",sn(uo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),sn(uo,{sx:co(l),children:sn(G6,{width:"100%",height:"100%",children:oi(K6,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[sn(V6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),sn(X6,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),sn(Z6,{tick:{fontSize:13},width:40,allowDecimals:!1}),sn(Y6,{...la,formatter:a=>`${Number(a??0)}${i}`}),sn(jm,{type:"linear",dataKey:"\uC774\uC0C1",stroke:Bi,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),sn(jm,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:Xl,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}import{useMemo as Gm}from"react";import{Box as fo}from"@mui/material";import{Area as wf,AreaChart as n8,CartesianGrid as o8,Legend as i8,ResponsiveContainer as s8,Tooltip as a8,XAxis as l8,YAxis as c8}from"recharts";function No(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function Jl(e,d=new Date){let b=new Date(d);return b.setMonth(b.getMonth()-e),b}function IW(e=new Date){return{fromDate:No(Jl(1,e)),toDate:No(e)}}var vf=864e5,ua=[0,1,2,3,5,8,13,21];function Wm(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function xf(e){let d=String(e??"").trim(),b=/^(\d{4}-\d{2}-\d{2})(?:[ T](\d{2}:\d{2}))?/.exec(d);if(!b)return null;let l=new Date(`${b[1]}T${b[2]??"00:00"}:00`).getTime();return Number.isNaN(l)?null:l}function ps(e){let d=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(d)?d.slice(0,10):""}function e8(e){let d=ps(e.created_time)||ps(e.start_date)||ps(e.completed_time);if(!d)return null;let b=ps(e.start_date),l=b&&b>d?b:d,o=e.completed?ps(e.completed_time)||d:"";return{created:d,started:l,done:o}}function Um(e,d){let b=/^\d{4}-\d{2}-\d{2}$/.test(d)?new Date(`${d}T00:00:00`):new Date,l=Math.max(2,Math.min(366,Math.round(e))),o=[];for(let s=l-1;s>=0;s-=1)o.push(No(new Date(b.getTime()-s*vf)));return o}function Vm(e,d,b){let l=Um(d,b),o=e.filter(Wm).map(e8).filter(n=>n!==null),s=l.map(n=>{let c=0,i=0,a=0;for(let h of o)h.created>n||(h.done&&h.done<=n?c+=1:h.started<=n?i+=1:a+=1);return{day:n,done:c,inProgress:i,waiting:a}}),r=s[s.length-1],t=s.reduce((n,c)=>Math.max(n,c.done+c.inProgress+c.waiting),0);return{points:s,max:t,currentWip:r?.inProgress??0,currentTotal:r?r.done+r.inProgress+r.waiting:0,currentDone:r?.done??0}}function t8(e,d){if(e.length===0)return 0;let b=Math.min(e.length-1,Math.max(0,Math.ceil(e.length*d)-1));return e[b]}function $m(e){if(e.length===0)return null;let d=[...e].sort((s,r)=>s-r),b=s=>Math.round(s*10)/10,l=Math.floor(d.length/2),o=d.length%2===1?d[l]:(d[l-1]+d[l])/2;return{count:d.length,median:b(o),average:b(d.reduce((s,r)=>s+r,0)/d.length),p85:b(t8(d,.85))}}function Hm(e){for(let d=ua.length-1;d>=0;d-=1)if(e>=ua[d])return d;return 0}function r8(){return ua.map((e,d)=>d===ua.length-1?`${e}\uC77C+`:`${e}~${ua[d+1]}\uC77C`)}function Km(e,d,b){let l=Um(d,b),o=l[0],s=l[l.length-1],r=r8(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!Wm(a)||!a.completed)continue;let h=ps(a.completed_time);if(!h||h<o||h>s)continue;let f=xf(a.completed_time),u=xf(a.created_time);if(f===null||u===null)continue;let g=Math.max(0,(f-u)/vf);c.push(g),t[Hm(g)]+=1;let m=xf(a.start_date);if(m===null||m>f)continue;let x=Math.max(0,(f-Math.max(m,u))/vf);i.push(x),n[Hm(x)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:$m(c),cycle:$m(i)}}import{jsx as Gr,jsxs as ii}from"react/jsx-runtime";function u8(e){return e.slice(5).replace("-",".")}function Ym({tasks:e,todayStr:d,days:b=30,height:l=220,headerLeft:o}){let s=Gm(()=>Vm(e,b,d),[e,b,d]),r=Gm(()=>s.points.map(n=>({\uB0A0\uC9DC:u8(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=ii(fo,{sx:zr,children:[o?Gr(fo,{sx:{flexShrink:0},children:o}):null,ii(fo,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[ii(fo,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ii("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),ii("span",{children:["\uC9C4\uD589 \uC911"," ",Gr(fo,{component:"span",sx:{color:lo,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),Gr(fo,{sx:{fontSize:13.5,color:"#37352f"},children:"\uB760\uAC00 \uB450\uAEBC\uC6CC\uC9C0\uBA74 \uC77C\uC774 \uC313\uC774\uB294 \uC911, \uC587\uC544\uC9C0\uBA74 \uCC98\uB9AC\uB418\uB294 \uC911\uC785\uB2C8\uB2E4."})]})]});return r.length===0||s.max===0?ii(fo,{sx:mr(l),children:[o?Gr(fo,{sx:zr,children:o}):null,Gr(Kr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):ii(fo,{sx:mr(l),children:[t,Gr(fo,{sx:co(l),children:Gr(s8,{width:"100%",height:"100%",children:ii(n8,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[Gr(o8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Gr(l8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),Gr(c8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Gr(a8,{...la,formatter:n=>`${Number(n??0)}\uAC74`}),Gr(i8,{...hs}),Gr(wf,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:bf,fill:bf,fillOpacity:.9}),Gr(wf,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:lo,fill:lo,fillOpacity:.85}),Gr(wf,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:yf,fill:yf,fillOpacity:.9})]})})})]})}import{useMemo as Xm}from"react";import{Box as an}from"@mui/material";import{Bar as Zm,BarChart as f8,CartesianGrid as d8,Legend as h8,ResponsiveContainer as p8,Tooltip as m8,XAxis as g8,YAxis as b8}from"recharts";import{jsx as Cr,jsxs as Bn}from"react/jsx-runtime";function Jm({label:e,color:d,summary:b}){let l=Bn(an,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Cr(an,{sx:{width:10,height:10,borderRadius:.5,bgcolor:d,flexShrink:0}}),Cr(an,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return b?Bn(an,{sx:{display:"contents"},children:[l,Bn("span",{children:[b.count,"\uAC74"]}),Bn("span",{children:["\uC911\uC559\uAC12"," ",Cr(an,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:b.median}),"\uC77C"]}),Bn("span",{children:["\uD3C9\uADE0 ",b.average,"\uC77C"]}),Bn("span",{children:["85% ",b.p85,"\uC77C \uC774\uB0B4"]})]}):Bn(an,{sx:{display:"contents"},children:[l,Cr(an,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function Qm({tasks:e,todayStr:d,days:b=30,height:l=200,headerLeft:o}){let s=Xm(()=>Km(e,b,d),[e,b,d]),r=Xm(()=>s.labels.map((t,n)=>({\uAD6C\uAC04:t,\uB9AC\uB4DC\uD0C0\uC784:s.leadCounts[n],\uC0AC\uC774\uD074\uD0C0\uC784:s.cycleCounts[n]})),[s]);return s.lead?Bn(an,{sx:mr(l),children:[Bn(an,{sx:zr,children:[o?Cr(an,{sx:{flexShrink:0},children:o}):null,Bn(an,{sx:{flex:1,minWidth:260,display:"grid",gridTemplateColumns:"max-content max-content max-content max-content max-content",justifyContent:"start",alignItems:"center",columnGap:3,rowGap:.5,fontSize:14,color:"#000"},children:[Cr(Jm,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:lo,summary:s.lead}),Cr(Jm,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:aa,summary:s.cycle})]})]}),Cr(an,{sx:co(l),children:Cr(p8,{width:"100%",height:"100%",children:Bn(f8,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[Cr(d8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Cr(g8,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),Cr(b8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Cr(m8,{...ds,formatter:t=>`${Number(t??0)}\uAC74`}),Cr(h8,{...hs}),Cr(Zm,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:lo,radius:[3,3,0,0]}),Cr(Zm,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:aa,radius:[3,3,0,0]})]})})})]}):Bn(an,{sx:mr(l),children:[o?Cr(an,{sx:zr,children:o}):null,Cr(Kr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}import{useMemo as n0}from"react";import{Box as Ii}from"@mui/material";import{Bar as kf,BarChart as _8,CartesianGrid as k8,Cell as S8,Legend as T8,ReferenceLine as o0,ResponsiveContainer as C8,Tooltip as B8,XAxis as I8,YAxis as M8}from"recharts";function y8(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let b=new Date(`${e}T00:00:00`).getTime(),l=new Date(`${d}T00:00:00`).getTime();return Number.isNaN(b)||Number.isNaN(l)?null:Math.round((l-b)/864e5)}function x8(e,d,b){let l=String(e.due_date??"").slice(0,10),o=y8(d,l);return o===null?"later":o<0?"overdue":o<=b?"soon":"later"}function Ql(e,d){let{todayStr:b,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=d,t=r??mo,n=new Map;for(let i of e){if(i.completed||i.archived||i.is_notice||i.is_event||i.linked_only)continue;let a=Number(i.manager_account_seq??0);if(!a&&!o)continue;let h=a?String(i.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",f=n.get(a)??{accountSeq:a,name:h,overdue:0,soon:0,later:0,total:0,points:0,capacity:0,load:0,ratio:0};f[x8(i,b,l)]+=1,f.total+=1,f.points+=Number(i.story_points??0)||0,n.set(a,f)}for(let i of n.values())i.capacity=v8(i.accountSeq,t),i.load=t.basis==="points"?i.points:i.total,i.ratio=i.capacity>0?i.load/i.capacity:0;let c=[...n.values()].sort((i,a)=>i.accountSeq===0!=(a.accountSeq===0)?i.accountSeq===0?1:-1:i.overdue!==a.overdue?a.overdue-i.overdue:i.total!==a.total?a.total-i.total:i.name.localeCompare(a.name));return typeof s=="number"&&s>0?c.slice(0,s):c}function ec(e,d){return e.filter(b=>b.completed||b.archived||b.is_notice||b.is_event||b.linked_only?!1:Number(b.manager_account_seq??0)===d).sort((b,l)=>{let o=String(b.due_date??"").slice(0,10),s=String(l.due_date??"").slice(0,10);return!o!=!s?o?-1:1:o!==s?o.localeCompare(s):String(b.title??"").localeCompare(String(l.title??""))})}function v8(e,d){if(!(e>0))return 0;let b=Math.max(0,Math.floor(Number(d.by_account?.[e])||0));return b>0?b:Math.max(0,Math.floor(Number(d.default_capacity)||0))}function tc(e){return e.capacity>0&&e.load>e.capacity}function e0(e,d){return d>0&&e.total>=d}function t0(e){let d=e.filter(b=>b.accountSeq>0);return d.length===0?0:d.reduce((b,l)=>b+l.total,0)/d.length}function _f(e,d){let b=new Date(`${e}T00:00:00`);b.setDate(b.getDate()+d);let l=o=>String(o).padStart(2,"0");return`${b.getFullYear()}-${l(b.getMonth()+1)}-${l(b.getDate())}`}function w8(e){let d=new Date(`${e}T00:00:00`);if(Number.isNaN(d.getTime()))return e;let b=(d.getDay()+6)%7;return _f(e,-b)}function r0(e,d){let{todayStr:b,includeUnassigned:l=!0,weeks:o=6,limit:s}=d,r=w8(b),t=Array.from({length:Math.max(1,o)},(f,u)=>{let g=_f(r,u*7),m=_f(g,6),[,x,k]=g.split("-");return{start:g,end:m,label:`${Number(x)}/${Number(k)}`,isCurrent:u===0}}),n=t[t.length-1].end,c=new Map;for(let f of e){if(f.completed||f.archived||f.is_notice||f.is_event||f.linked_only)continue;let u=Number(f.manager_account_seq??0);if(!u&&!l)continue;let g=u?String(f.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",m=c.get(u)??{accountSeq:u,name:g,overdue:0,byWeek:new Array(t.length).fill(0),noDue:0,total:0,beyond:0},x=String(f.due_date??"").slice(0,10);if(m.total+=1,!/^\d{4}-\d{2}-\d{2}$/.test(x))m.noDue+=1;else if(x<b)m.overdue+=1;else if(x>n)m.beyond+=1;else{let k=t.findIndex(B=>x>=B.start&&x<=B.end);k>=0?m.byWeek[k]+=1:m.beyond+=1}c.set(u,m)}let i=[...c.values()].sort((f,u)=>f.accountSeq===0!=(u.accountSeq===0)?f.accountSeq===0?1:-1:f.overdue!==u.overdue?u.overdue-f.overdue:f.total!==u.total?u.total-f.total:f.name.localeCompare(u.name)),a=typeof s=="number"&&s>0?i.slice(0,s):i,h=a.reduce((f,u)=>Math.max(f,u.overdue,u.noDue,...u.byWeek),0);return{weeks:t,rows:a,maxCell:h}}import{Fragment as i0,jsx as Br,jsxs as si}from"react/jsx-runtime";var fa="#e5484d";function s0({tasks:e,todayStr:d,soonDays:b=7,overloadThreshold:l=0,capacity:o=mo,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=n0(()=>Ql(e,{todayStr:d,soonDays:b,capacity:o}),[e,d,b,o]),i=n0(()=>t0(c),[c]),a=l>0?l:Math.max(3,Math.ceil(i*1.5)),h=o.default_capacity>0||Object.keys(o.by_account).length>0,f=o.basis==="points"?"SP":"\uAC74",u=c.filter(g=>g.accountSeq>0&&(h?tc(g):e0(g,a))).length;return c.length===0?si(Ii,{sx:mr(s),children:[r?Br(Ii,{sx:zr,children:r}):null,Br(Kr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):si(Ii,{sx:mr(s),children:[si(Ii,{sx:zr,children:[r,si(Ii,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",Br("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?si(i0,{children:["\uC6A9\uB7C9 ",Br("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?f:""]}):si(i0,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",Br("b",{children:a}),"\uAC74"]}),u>0?si(Ii,{component:"span",sx:{ml:1,color:fa,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),Br(Ii,{sx:co(s),children:Br(C8,{width:"100%",height:"100%",children:si(_8,{data:c,layout:"vertical",onClick:n?g=>{let m=c.find(x=>x.name===String(g?.activeLabel??""));m&&n(m.accountSeq===t?0:m.accountSeq)}:void 0,style:n?{cursor:"pointer"}:void 0,margin:{top:4,right:16,bottom:4,left:8},barCategoryGap:c.length>8?4:10,children:[Br(k8,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),Br(I8,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),Br(M8,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),Br(B8,{...ds,formatter:(g,m)=>[`${Number(g)||0}\uAC74`,String(m)],labelFormatter:g=>{let m=c.find(x=>x.name===g);return!m||!(m.capacity>0)?String(g):`${g} \u2014 \uC6A9\uB7C9 ${m.capacity}${f} \uC911 ${m.load} (${Math.round(m.ratio*100)}%)`}}),Br(T8,{...hs}),i>0?Br(o0,{x:i,stroke:Bi,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:Bi}}):null,o.default_capacity>0?Br(o0,{x:o.default_capacity,stroke:fa,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:fa}}):null,Br(kf,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:fa}),Br(kf,{dataKey:"soon",name:`\uC784\uBC15(${b}\uC77C)`,stackId:"load",fill:aa}),Br(kf,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:lo,radius:[0,3,3,0],children:c.map(g=>Br(S8,{fill:h&&tc(g)?fa:lo,fillOpacity:h&&tc(g)?.45:1,stroke:g.accountSeq===t?"#37352f":void 0,strokeWidth:g.accountSeq===t?1.5:0},g.accountSeq))})]})})})]})}import{useEffect as L8,useState as z8}from"react";import{Box as j8,Button as F8}from"@mui/material";import{FormDialog as q8}from"@ehfuse/mui-form-dialog";import{useState as E8}from"react";import{Box as gr,Button as R8,Menu as O8,MenuItem as A8}from"@mui/material";import D8 from"@mui/icons-material/PersonOutlineOutlined";import P8 from"@ehfuse/overlay-scrollbar";import{jsx as Rr,jsxs as Lo}from"react/jsx-runtime";var a0=56,l0=68,c0=96;function N8(e){let d=String(e.due_date??"").slice(0,10);return d?d.slice(5).replace("-","/"):"-"}function u0(e,d){let b=String(e.due_date??"").slice(0,10);return!!b&&b<d}function f0({tasks:e,row:d,todayStr:b,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=E8(null),a=ec(e,d.accountSeq),h=f=>o.find(u=>u.accountSeq===f)?.total??0;return Lo(gr,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:Lo(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[Rr(gr,{component:"span",sx:{fontWeight:700},children:d.name}),Lo(gr,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),d.capacity>0?Lo(gr,{component:"span",sx:{color:d.load>d.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",d.capacity," \uC911 ",d.load]}):null]}),Lo(gr,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Lo(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,flexShrink:0,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[Rr(gr,{sx:{width:a0,flexShrink:0},children:"\uB9C8\uAC10"}),Rr(gr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Rr(gr,{sx:{width:l0,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?Rr(gr,{sx:{width:c0,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),Rr(gr,{sx:{flex:1,minHeight:0},children:Rr(P8,{style:{height:"100%"},thumb:{width:6},children:a.length===0?Rr(gr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(f=>Lo(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[Rr(gr,{sx:{width:a0,flexShrink:0,fontSize:13.5,color:u0(f,b)?"#e5484d":"#787774",fontWeight:u0(f,b)?700:400},children:N8(f)}),Rr(gr,{onClick:n?()=>n(f.seq):void 0,sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...n?{cursor:"pointer","&:hover":{textDecoration:"underline"}}:{}},children:f.title}),Rr(gr,{sx:{width:l0,flexShrink:0,display:"flex",justifyContent:"center"},children:Rr(qr,{priority:f.priority})}),t?Rr(gr,{sx:{width:c0,flexShrink:0,display:"flex",justifyContent:"center"},children:Rr(R8,{size:"small",variant:"outlined",startIcon:Rr(D8,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:f.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},f.seq))})})]}),Rr(O8,{anchorEl:c?.el??null,open:!!c,onClose:()=>i(null),transitionDuration:0,children:l.filter(f=>Number(f.account_seq)>0&&Number(f.account_seq)!==d.accountSeq).map(f=>Lo(A8,{onClick:()=>{c&&t&&t(c.taskSeq,Number(f.account_seq),f.name),i(null)},sx:{fontSize:14,minWidth:200},children:[Rr(gr,{sx:{flex:1},children:f.name}),Lo(gr,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(f.account_seq)),"\uAC74"]})]},f.account_seq))})]})}import{jsx as rc}from"react/jsx-runtime";function d0({open:e,row:d,rows:b,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=z8(d);L8(()=>{d&&i(d)},[d]);let a=d??c,h=a?ec(l,a.accountSeq).length:0;return rc(q8,{open:e,onClose:r,maxWidth:"sm",title:a?`${a.name} \uC5C5\uBB34 (${h})`:"\uC5C5\uBB34",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-person",tabs:{visible:!1},actions:{showCancelButton:!1,right:rc(F8,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:rc(j8,{sx:{minHeight:0},children:a?rc(f0,{tasks:l,row:a,rows:b,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}import{useMemo as $8}from"react";import{Box as mn,Tooltip as H8}from"@mui/material";import{OverlayScrollbar as W8}from"@ehfuse/overlay-scrollbar";import{jsx as Yr,jsxs as oc}from"react/jsx-runtime";var h0="#e5484d",U8="#2f80ed",V8="#9a9a97",Sf=30,K8=96,nc=56;function Tf({count:e,max:d,color:b,title:l}){let o=e>0&&d>0?.18+e/d*.72:0;return Yr(H8,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:Yr(mn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:o>0?`${b}${Math.round(o*255).toString(16).padStart(2,"0")}`:"transparent",color:o>.55?"#fff":"#37352f",fontSize:12.5,fontWeight:e>0?700:400,fontVariantNumeric:"tabular-nums"},children:e>0?e:""})})}function p0({tasks:e,todayStr:d,weeks:b=6,height:l=200}){let o=$8(()=>r0(e,{todayStr:d,weeks:b}),[e,d,b]);if(o.rows.length===0)return Yr(mn,{sx:mr(l),children:Yr(Kr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${K8}px ${nc}px repeat(${o.weeks.length}, minmax(${nc}px, 1fr)) ${nc}px ${nc}px`,r={height:Sf,display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #dcdad6",fontSize:12,fontWeight:700,color:"#37352f",bgcolor:"#f8f8f7",whiteSpace:"nowrap"};return Yr(mn,{sx:mr(l),children:Yr(W8,{style:{height:"100%"},thumb:{width:8},children:oc(mn,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${Sf}px repeat(${o.rows.length}, minmax(${Sf}px, 1fr))`},children:[Yr(mn,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),Yr(mn,{sx:{...r,color:h0},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>Yr(mn,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),Yr(mn,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),Yr(mn,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>oc(mn,{sx:{display:"contents"},children:[Yr(mn,{sx:{display:"flex",alignItems:"center",pl:1,borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",fontSize:13,color:t.accountSeq>0?"#37352f":"#9a9a97",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.name}),Yr(Tf,{count:t.overdue,max:o.maxCell,color:h0,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>Yr(Tf,{count:n,max:o.maxCell,color:U8,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),Yr(Tf,{count:t.noDue,max:o.maxCell,color:V8,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),oc(mn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid #ececea",fontSize:12.5,fontWeight:700,color:"#37352f",fontVariantNumeric:"tabular-nums"},children:[t.total,t.beyond>0?oc(mn,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}import{Fragment as b0,jsx as er,jsxs as ic}from"react/jsx-runtime";var y0="min(560px, 62vh)",Z8=`calc(${y0} - 4px)`,J8=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function VU({open:e,sprints:d,tasks:b,todayStr:l,showSprintCharts:o,capacity:s=mo,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,f]=da(0),[u,g]=da(30);G8(()=>{if(!e)return;let y=d.find(w=>w.status==="active")??d[0],v=d.find(w=>w.seq===i)??y;f(v?.seq??0)},[e]);let m=m0(()=>d.find(y=>y.seq===h)??null,[d,h]),x={height:Z8,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=er(Cf,{label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,value:h?String(h):"",options:d.map(y=>({value:String(y.seq),label:kn(y)})),onChange:y=>f(Number(y.target.value)||0),sx:{width:280,flexShrink:0}}),[B,R]=da("distribution"),L=er(Cf,{label:"\uBCF4\uAE30",showLabel:!1,showEmptyOption:!1,value:B,options:[{value:"distribution",label:"\uC9C0\uAE08 \uBD80\uD558(\uC9C0\uC5F0\xB7\uC784\uBC15\xB7\uC5EC\uC720)"},{value:"timeline",label:"\uC8FC\uBCC4 \uB9C8\uAC10 \uBC00\uC9D1"}],onChange:y=>R(y.target.value==="timeline"?"timeline":"distribution"),sx:{width:280,flexShrink:0}}),[A,D]=da(!1),[N,q]=da(0),j=m0(()=>Ql(b,{todayStr:l,capacity:s}),[b,l,s]),S=j.find(y=>y.accountSeq===N)??null,T=ic(b0,{children:[L,t?er(g0,{size:"small",variant:"outlined",startIcon:er(X8,{sx:{fontSize:18}}),onClick:()=>D(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),P=o??d.length>0,p=er(Cf,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:J8,onChange:y=>g(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return ic(b0,{children:[er(Y8,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:y0,contentBottomPadding:0,scrollPastLastSection:!1,tabs:{visible:!0,switchContent:!0,fullWidth:!0},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[...P?[{id:"velocity",tabTitle:"\uBCA8\uB85C\uC2DC\uD2F0",showTitle:!1,children:er(zo,{sx:x,children:er(zm,{sprints:d,tasks:b,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:er(zo,{sx:x,children:m?er(qm,{sprint:m,tasks:b,todayStr:l,height:"100%",headerLeft:k}):ic(zo,{sx:mr("100%"),children:[er(zo,{sx:zr,children:k}),er(Kr,{text:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694.",height:"100%"})]})})},{id:"cumulative-flow",tabTitle:"\uB204\uC801\uD750\uB984\uB3C4",showTitle:!1,children:er(zo,{sx:x,children:er(Ym,{tasks:b,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:er(zo,{sx:x,children:B==="timeline"?ic(zo,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[er(zo,{sx:zr,children:T}),er(p0,{tasks:b,todayStr:l,height:"100%"})]}):er(s0,{tasks:b,todayStr:l,height:"100%",capacity:s,headerLeft:T,selectedAccountSeq:N,onSelectPerson:n?q:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:er(zo,{sx:x,children:er(Qm,{tasks:b,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:er(g0,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),er(d0,{open:N>0,row:S,rows:j,tasks:b,todayStr:l,employees:r,onClose:()=>q(0),onChangeManager:n,onOpenTask:c}),t?er(Nm,{open:A,capacity:s,employees:r,onClose:()=>D(!1),onSave:async y=>{await t(y),D(!1)}}):null]})}import{Checkbox as Q8,Divider as eS,Menu as tS,MenuItem as Bf}from"@mui/material";import{jsx as ha,jsxs as x0}from"react/jsx-runtime";function ZU({anchorEl:e,candidates:d,selectedNames:b,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return x0(tS,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[d.length===0?ha(Bf,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):d.map(t=>{let n=b.includes(t.name);return x0(Bf,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[ha(Q8,{size:"small",checked:n,sx:{p:0}}),ha($r,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),ha(eS,{}),ha(Bf,{disabled:b.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as rS}from"react";import{ButtonBase as nS,Menu as oS,MenuItem as iS}from"@mui/material";import sS from"@mui/icons-material/KeyboardArrowDown";import aS from"@mui/icons-material/Check";import{Fragment as lS,jsx as If,jsxs as Mf}from"react/jsx-runtime";function iV({value:e,onChange:d,options:b}){let[l,o]=rS(null),s=b??Ac,r=Ac.find(t=>t.value===e)?.label??"";return Mf(lS,{children:[Mf(nS,{onClick:t=>o(t.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[r,If(sS,{sx:{fontSize:17,color:"#9a9a97"}})]}),If(oS,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>Mf(iS,{selected:t.value===e,onClick:()=>{d(t.value),o(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[t.label,t.value===e?If(aS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}import{Box as sc,ButtonBase as cS}from"@mui/material";import{DateTextField as v0}from"@ehfuse/mui-form-controls";import{jsx as pa,jsxs as w0}from"react/jsx-runtime";var uS=[{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 _0({fromDate:e,toDate:d,onChange:b}){let l=s=>{if(s<=0){b("","");return}b(No(Jl(s)),No(new Date))},o=s=>s<=0?!e&&!d:!e||!d?!1:e===No(Jl(s))&&d===No(new Date);return w0(sc,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[pa(sc,{sx:{display:"flex",alignItems:"center",gap:1.5},children:uS.map(s=>{let r=o(s.months);return pa(cS,{onClick:()=>l(s.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:r?500:400,border:"1px solid",borderColor:r?"#2f80ed":"#dedddb",color:r?"#2f80ed":"#37352f",bgcolor:r?"#eef6ff":"transparent","&:hover":{bgcolor:r?"#eef6ff":"#f7f7f5"}},children:s.label},s.label)})}),w0(sc,{sx:{display:"flex",alignItems:"center",gap:.5},children:[pa(v0,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>b(s.target.value,d),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),pa(sc,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),pa(v0,{value:d,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>b(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as fS}from"@mui/material";import{jsx as k0}from"react/jsx-runtime";function mV({anchorEl:e,fromDate:d,toDate:b,onChange:l,onClose:o}){return k0(fS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:k0(_0,{fromDate:d,toDate:b,onChange:l})})}import{Box as dS,ButtonBase as hS,Tab as pS,Tabs as mS}from"@mui/material";import gS from"@mui/icons-material/Checklist";import bS from"@mui/icons-material/Face";import yS from"@mui/icons-material/Publish";import xS from"@mui/icons-material/NotificationsOutlined";import vS from"@mui/icons-material/BugReportOutlined";import wS from"@mui/icons-material/SupportAgentOutlined";import _S from"@mui/icons-material/DescriptionOutlined";import kS from"@mui/icons-material/Inventory2Outlined";import{jsx as In}from"react/jsx-runtime";function S0(e,d){return d>0?`${e} (${d})`:e}var MV=[{id:"my",label:"\uC804\uCCB4",icon:In(gS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:In(bS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:In(yS,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:In(wS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:In(vS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:In(xS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:In(kS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:In(_S,{sx:{fontSize:18}}),hideCount:!0}];function SS(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 EV({items:e,activeTab:d,counts:b,onChange:l,compact:o=!1}){let s=lt(),r=SS(s.tabs),t=e;return o?In(dS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=d===n.id;return In(hS,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Mr(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?s.tabs.selectedBg:s.tabs.bg,color:c?s.tabs.selectedColor:s.tabs.color,borderColor:c?s.tabs.selectedBg:s.tabs.borderColor},children:S0(n.label,n.hideCount?0:b[n.id]??0)},n.id)})}):In(mS,{value:d,onChange:(n,c)=>l(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:t.map(n=>In(pS,{value:n.id,label:S0(n.label,n.hideCount?0:b[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}import{useEffect as TS,useMemo as CS,useState as Ef}from"react";import{Divider as ac,ListItemIcon as Xr,Menu as Rf,MenuItem as Ir}from"@mui/material";import BS from"@mui/icons-material/OpenInNewOutlined";import IS from"@mui/icons-material/RestoreFromTrashOutlined";import MS from"@mui/icons-material/Check";import ES from"@mui/icons-material/CheckCircleOutlined";import RS from"@mui/icons-material/RadioButtonUnchecked";import OS from"@mui/icons-material/SendOutlined";import AS from"@mui/icons-material/EventOutlined";import DS from"@mui/icons-material/PersonOutlineOutlined";import PS from"@mui/icons-material/ViewKanbanOutlined";import NS from"@mui/icons-material/ContentCopyOutlined";import LS from"@mui/icons-material/NextPlanOutlined";import zS from"@mui/icons-material/ContentPasteOutlined";import jS from"@mui/icons-material/ShareOutlined";import FS from"@mui/icons-material/DirectionsRunOutlined";import T0 from"@mui/icons-material/ChevronRight";import qS from"@mui/icons-material/ArchiveOutlined";import $S from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as C0}from"@ehfuse/alerts";import{Fragment as B0,jsx as ft,jsxs as br}from"react/jsx-runtime";function lK({target:e,onClose:d,customTabs:b,sprints:l=[],myAccountSeq:o=0,onOpenDetail:s,onToggleCompleted:r,onRequestConfirm:t,onChangeDueDate:n,onChangeReminder:c,onMemberEdit:i,onMoveProject:a,onDuplicate:h,onCreateFollowUp:f,onShare:u,onAssignSprint:g,onArchiveToggle:m,onDelete:x,onRestore:k,onPurge:B}){let R=zt(),L=Un(),[A,D]=Ef(null),[N,q]=Ef(null),[j,S]=Ef(null);TS(()=>{e||(D(null),q(null),S(null))},[e]);let T=e?.task??null,P=!!T?.is_notice,p=!!T?.is_event,y=T?!yo(T,o):!1,v=!!T?.deleted,w=CS(()=>new Set(b.filter(z=>z.useSprints).map(z=>z.key)),[b]),_=async(z="one")=>{let $=T;if(d(),!$)return;await C0({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:z==="series"?`"${$.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${$.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&x($.seq,z)},C=async()=>{let z=T;if(d(),!z)return;await C0({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${z.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&B?.(z.seq)},O=()=>{T&&m(T.seq,!T.archived),d()};return br(B0,{children:[br(Rf,{open:!!e,onClose:d,transitionDuration:0,anchorReference:R?"none":"anchorPosition",anchorPosition:!R&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...R?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:R?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[br(Ir,{onClick:()=>{T&&s(T),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(BS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),v?ft(ac,{}):null,v&&k?br(Ir,{onClick:()=>{T&&k(T.seq),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(IS,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,v&&B?br(Ir,{onClick:()=>{C()},sx:{fontSize:14,color:"#e5484d"},children:[ft(Xr,{children:ft(dr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,v?null:br(B0,{children:[br(Ir,{disabled:P?(T?.author_account_seq??0)!==o:(T?.author_account_seq??0)!==o&&(T?.manager_account_seq??0)!==o,onClick:()=>{T&&r(T.seq,!T.completed),d()},sx:{fontSize:14},children:[ft(Xr,{children:T?.completed?ft(RS,{sx:{fontSize:19}}):ft(ES,{sx:{fontSize:19}})}),T?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!P&&t?br(Ir,{disabled:!(T?.manager_account_seq??0)&&(T?.receiver_account_seqs??[]).length===0,onClick:()=>{T&&t(T),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(OS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:ft(ac,{}),p?null:br(Ir,{disabled:y,onClick:z=>{T&&D({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[ft(Xr,{children:ft(AS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!P&&!p&&i?br(Ir,{onClick:()=>{T&&i(T,"manager"),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(DS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:br(Ir,{disabled:y,onClick:z=>{T&&q({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[ft(Xr,{children:ft(PS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",ft(T0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),ft(ac,{}),h?br(Ir,{disabled:y,onClick:()=>{T&&h(T.seq),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(NS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,f&&T&&!T.is_event&&!T.is_notice?br(Ir,{onClick:()=>{T&&f(T.seq),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(LS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,br(Ir,{onClick:()=>{T&&(u?u(T):os(T,R)),d()},sx:{fontSize:14},children:[ft(Xr,{children:R?ft(jS,{sx:{fontSize:19}}):ft(zS,{sx:{fontSize:19}})}),R?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),T&&!T.is_notice&&!T.is_event&&w.has(String(T.tab_key??""))&&g?br(Ir,{onClick:z=>S(z.currentTarget),sx:{fontSize:14},children:[ft(Xr,{children:ft(FS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",ft(T0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,br(Ir,{onClick:O,disabled:y||!T?.archived&&!(T&&Fa(T)),sx:{fontSize:14},children:[ft(Xr,{children:T?.archived?ft($S,{sx:{fontSize:19}}):ft(qS,{sx:{fontSize:19}})}),T?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),ft(ac,{}),br(Ir,{disabled:y,onClick:()=>{_("one")},sx:{fontSize:14,color:"#e5484d"},children:[ft(Xr,{children:ft(dr,{sx:{fontSize:19,color:"#e5484d"}})}),(T?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(T?.repeat_group_key??0)>0?br(Ir,{disabled:y,onClick:()=>{_("series")},sx:{fontSize:14,color:"#e5484d"},children:[ft(Xr,{children:ft(dr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),ft(_n,{anchorEl:A?.anchorEl??null,open:!!A,date:A?.task.due_date??"",reminders:Gn(A?.task),hideReminder:!!A?.task.completed,centered:R,onClose:()=>{D(null),d()},onDateChange:z=>{A&&n(A.task.seq,z)},onReminderChange:z=>{A&&c?.(A.task.seq,z)}}),br(Rf,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{q(null),d()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...L,children:[ft(Ir,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),q(null),d()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),b.filter(z=>!z.archived).map(z=>ft(Ir,{selected:N?.task.tab_key===z.key,onClick:()=>{N&&a(N.task.seq,z.key),q(null),d()},sx:{fontSize:14,minWidth:170},children:z.label},z.key))]}),ft(Rf,{transitionDuration:0,anchorEl:j,open:!!j,onClose:()=>S(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...l.filter(z=>`custom-${z.group_seq}`===String(T?.tab_key??"")).map(z=>({seq:z.seq,label:kn(z)}))].map(z=>br(Ir,{onClick:()=>{T&&g?.(T.seq,z.seq),S(null),d()},sx:{fontSize:14,minWidth:160,gap:1},children:[z.label,(T?.sprint_seq??0)===z.seq?ft(MS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},z.seq))})]})}import{Checkbox as HS,Divider as WS,Menu as US,MenuItem as I0}from"@mui/material";import{jsx as lc,jsxs as M0}from"react/jsx-runtime";function hK({anchorEl:e,labelOptions:d,selectedKeys:b,onToggle:l,onClear:o,onClose:s}){return M0(US,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[d.map(r=>{let t=b.includes(r.key);return M0(I0,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[lc(HS,{size:"small",checked:t,sx:{p:0}}),lc(Pt,{option:r})]},r.key)}),lc(WS,{}),lc(I0,{disabled:b.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as VS,Menu as KS,MenuItem as E0}from"@mui/material";import GS from"@mui/icons-material/Check";import YS from"@mui/icons-material/SettingsOutlined";import{jsx as Of,jsxs as Af}from"react/jsx-runtime";function vK(e){let{anchorEl:d,sprints:b,value:l,onSelect:o,onManage:s,onClose:r}=e;return Af(KS,{transitionDuration:0,anchorEl:d,open:!!d,onClose:r,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...b.map(t=>({seq:t.seq,label:kn(t)}))].map(t=>Af(E0,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?Of(GS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),Of(VS,{}),Af(E0,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[Of(YS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var XS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function ZS(e){return XS[e]??"tasks"}var O0={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"},R0=["list","calendar","month","card","kanban","sprint","timeline"],JS=["list","kanban"],QS=["list","card"];function kK(e){let d=ZS(e);switch(d){case"notice":return{kind:d,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:d,viewOptions:R0,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"support":return{kind:d,viewOptions:JS,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:d,viewOptions:QS,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:d,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:d,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:d,viewOptions:R0,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"}:{}}}}import{useMemo as eT}from"react";import{useKeyboardState as tT}from"@ehfuse/keyboard-state";var A0=[{key:"g l",view:"list"},{key:"g b",view:"card"},{key:"g k",view:"kanban"},{key:"g s",view:"sprint"},{key:"g c",view:"calendar"},{key:"g m",view:"month"},{key:"g t",view:"timeline"}];function IK(e,d={}){let{enabled:b=!0,views:l}=d,{onCreateTask:o,onFocusSearch:s,onToggleHelp:r,onChangeView:t,onRefresh:n,onEscape:c}=e,i=l?l.join(","):"",a=eT(()=>{let h=[];if(o&&h.push({key:"n",callback:o,options:{preventDefault:!0}}),s&&h.push({key:"/",callback:s,options:{preventDefault:!0}}),n&&h.push({key:"r",callback:n,options:{preventDefault:!0}}),r&&h.push({key:"shift+?",callback:r,options:{preventDefault:!0}}),c&&h.push({key:"escape",callback:c,options:{allowInEditable:!0}}),t)for(let f of D0(i?i.split(","):void 0))h.push({key:f.key,callback:()=>t(f.view),options:{preventDefault:!0}});return h},[o,s,r,t,n,c,i]);tT(b?a:[])}function D0(e){if(!e)return A0;let d=new Set(e);return A0.filter(b=>d.has(b.view))}function ma(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...D0(e).map(d=>({keys:d.key.split(" ").map(b=>b.toUpperCase()).join(" \u2192 "),description:`${O0[d.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var MK=ma();import{Box as ga,Button as rT}from"@mui/material";import nT from"@mui/icons-material/ArrowRightAlt";import{FormDialog as oT}from"@ehfuse/mui-form-dialog";import{jsx as ai,jsxs as P0}from"react/jsx-runtime";function iT({keys:e}){return ai(ga,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((d,b)=>P0(ga,{sx:{display:"flex",alignItems:"center",gap:.5},children:[b>0?ai(nT,{sx:{fontSize:18,color:"#9a9a97"}}):null,ai(ga,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:"#37352f",bgcolor:"#f4f4f2",border:"1px solid #e0dfdb",borderRadius:1,fontVariantNumeric:"tabular-nums"},children:d})]},`${d}-${b}`))})}function PK({open:e,onClose:d,views:b}){let l=ma(b);return ai(oT,{open:e,onClose:d,maxWidth:"xs",title:"\uB2E8\uCD95\uD0A4",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"shortcuts",showTitle:!1,children:ai(ga,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>P0(ga,{sx:{display:"contents"},children:[ai(iT,{keys:o.keys}),ai("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:ai(rT,{variant:"contained",onClick:d,children:"\uB2EB\uAE30"})}})}import{Fragment as sT,useEffect as aT,useState as lT}from"react";import{Box as ho,Button as cT}from"@mui/material";import uT from"@mui/icons-material/ArrowRightAlt";import{FormDialog as fT}from"@ehfuse/mui-form-dialog";var N0={id:"basics",tabTitle:"\uAE30\uBCF8",topics:[{title:"\uD0ED \uAD6C\uC131",lines:["**\uC804\uCCB4** \u2014 \uB0B4\uAC00 \uBCFC \uC218 \uC788\uB294 \uBAA8\uB4E0 \uC5C5\uBB34. \uB0B4 \uC5C5\uBB34\xB7\uCC45\uC784\uC790\uBCC4\xB7\uC77C\uC815 \uADF8\uB8F9\uC73C\uB85C \uB098\uB258\uC5B4 \uBCF4\uC785\uB2C8\uB2E4.","**\uB0B4 \uC5C5\uBB34** \u2014 \uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uB85C \uC9C0\uC815\uB41C \uC5C5\uBB34\uB9CC \uBAA8\uC74D\uB2C8\uB2E4.","**\uBCF4\uB0B8 \uC5C5\uBB34** \u2014 \uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4.","**\uACF5\uC9C0\uC0AC\uD56D** \u2014 \uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815 \uB300\uC0C1\uC790\uC5D0\uAC8C \uC54C\uB9AC\uB294 \uAE00. \uB300\uC0C1\uC790\uB294 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4.",'**\uBCF4\uAD00\uD568** \u2014 \uC644\uB8CC \uD6C4 \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815, \uACE0\uAC1D\uC13C\uD130 \uAE00, \uD734\uC9C0\uD1B5\uC744 "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.']},{title:"\uC624\uB958 \uD0ED",feature:"bug",lines:["\uD504\uB85C\uADF8\uB7A8 \uC624\uB958 \uC811\uC218 \uC804\uC6A9 \uD0ED\uC785\uB2C8\uB2E4. \uD2F0\uCF13\uBC88\uD638\uAC00 \uBD99\uACE0 \uC811\uC218 \u2192 \uCC98\uB9AC \u2192 \uC885\uB8CC\uC758 \uC0DD\uC560\uC8FC\uAE30\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uC624\uB958 \uD0ED\uC740 \uAC1C\uBC1C\uC0AC(\uCF54\uB4DC\uC0F5) \uC804\uC6A9\uC774\uBA70, \uAC00\uB9F9\uC810\uC5D0\uC11C \uC811\uC218\uD55C \uC624\uB958 \uC81C\uBCF4\uB294 \uACE0\uAC1D\uC13C\uD130 \uD0ED\uC5D0 "\uC624\uB958" \uC885\uB958\uB85C \uC313\uC785\uB2C8\uB2E4.']},{title:"\uACE0\uAC1D\uC13C\uD130 \uD0ED",feature:"support",lines:["\uAC00\uB9F9\uC810\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\uC0AC\uD56D\xB7\uC624\uB958 \uC81C\uBCF4\uC640 \uD648\uD398\uC774\uC9C0 \uC0C1\uB2F4\uC2E0\uCCAD\uC774 \uC5C5\uBB34\uB85C \uC313\uC785\uB2C8\uB2E4.","**\uAC00\uC838\uAC00\uAE30**\uB85C \uCC45\uC784\uC790\uAC00 \uB418\uACE0, \uB313\uAE00\uB85C \uB2F5\uBCC0\uD558\uBA74 \uC791\uC131\uC790(\uAC00\uB9F9\uC810)\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4. \uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0 \uC218\uC815\xB7\uBC30\uC815 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC791\uC131\uC790\xB7\uB2F5\uBCC0\uC790 \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC774\uB984\uC73C\uB85C \uAC70\uB97C \uC218 \uC788\uACE0, \uC791\uC131\uC790 \uC774\uB984\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB9AC\uBA74 \uAC00\uB9F9\uC810\uBA85\uC774 \uBCF4\uC785\uB2C8\uB2E4."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** \u2014 \uB05D\uB09C \uC5C5\uBB34\uB97C \uBAA9\uB85D\xB7\uBCF4\uB4DC\xB7\uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778(\uD560\uC77C \uD3EC\uD568)\uC5D0\uC11C \uAC10\uCDA5\uB2C8\uB2E4.","**\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** \u2014 \uAD6C\uAE00 \uB4F1\uC5D0\uC11C \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354 \uBCF4\uAE30\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4(\u22EE \u203A \uCE98\uB9B0\uB354 \uC5F0\uB3D9\uC5D0\uC11C \uC124\uC815).","**\uBAA8\uB4E0 \uC9C1\uC6D0** \u2014 (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4.","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uC2A4\uC704\uCE58\uB4E4\uC740 \uC624\uB978\uCABD **\u22EE \uBA54\uB274** \uC548\uC73C\uB85C \uB4E4\uC5B4\uAC11\uB2C8\uB2E4."]},{title:"\uC0AD\uC81C\xB7\uBCF4\uAD00 \uADDC\uCE59",lines:["**\uC644\uB8CC \u2192 \uBCF4\uAD00** \u2014 \uC644\uB8CC(\uACF5\uC9C0\uB294 \uAC8C\uC2DC\uC885\uB8CC)\uD55C \uC5C5\uBB34\uB294 \uC5C5\uBB34\uD568 \uC124\uC815\uC758 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C)\uC774 \uC9C0\uB098\uBA74 \uB9E4\uC77C \uC0C8\uBCBD \uC790\uB3D9\uC73C\uB85C \uBCF4\uAD00\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4. \uC6B0\uD074\uB9AD \u203A **\uBCF4\uAD00**\uC73C\uB85C \uBC14\uB85C \uBCF4\uB0BC \uC218\uB3C4 \uC788\uACE0, \uBCF4\uAD00\uD568\uC5D0\uC11C **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","**\uC0AD\uC81C \u2192 \uD734\uC9C0\uD1B5** \u2014 \uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uACE0(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58), \uC9C0\uC6B4 \uC5C5\uBB34\uB294 \uD734\uC9C0\uD1B5\uC5D0 \uB4E4\uC5B4\uAC00 **\uB418\uC0B4\uB9AC\uAE30**\uB85C \uBCF5\uAD6C\uB429\uB2C8\uB2E4. \uD734\uC9C0\uD1B5\uC740 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB97C \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C\uB294 "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.',"**\uD504\uB85C\uC81D\uD2B8** \u2014 \uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4(\uBBF8\uC644\uB8CC\uAC00 \uB0A8\uC544 \uC788\uC73C\uBA74 \uC548\uB0B4). \uC0AD\uC81C\uD558\uBA74 \uD504\uB85C\uC81D\uD2B8\uB9CC \uC5C6\uC5B4\uC9C0\uACE0 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4.",'\uACE0\uAC1D\uC13C\uD130 \uAE00\uB3C4 \uAC19\uC740 \uADDC\uCE59\uC73C\uB85C \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uB418\uBA70, \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC5D0\uC11C \uBD05\uB2C8\uB2E4.']}]};var L0={id:"roles",tabTitle:"\uC5ED\uD560\xB7\uC54C\uB9BC",topics:[{title:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790",lines:["**\uC791\uC131\uC790** \u2014 \uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC73C\uB85C \uB0B4\uC6A9\uC744 \uACE0\uCE58\uACE0, \uC644\uB8CC \uCCB4\uD06C\xB7\uC0AD\uC81C(\uD734\uC9C0\uD1B5)\uB97C \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uCC45\uC784\uC790** \u2014 \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(1\uBA85). \uD655\uC778\xB7\uC644\uB8CC \uCCB4\uD06C\uB97C \uD558\uACE0, \uD560\uC77C\uC744 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uC5C5\uBB34\uB97C \uB098\uB20C \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uCC38\uC870\uC790** \u2014 \uD568\uAED8 \uC54C\uACE0 \uC788\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85). \uC77D\uACE0 \uB313\uAE00\uC744 \uB2EC\uBA70 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4.",'\uC138 \uC5ED\uD560\uC740 \uBAA8\uB450 \uAD00\uC5EC\uC790\uC785\uB2C8\uB2E4. \uACF5\uAC1C \uBC94\uC704\uAC00 "\uAD00\uC5EC\uC790\uB9CC"\uC774\uC5B4\uB3C4 \uC11C\uB85C \uBCF4\uC774\uACE0, \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uBC14\uB85C \uBC14\uAFC0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.']},{title:"\uB204\uAC00 \uC5B8\uC81C \uC54C\uB9BC\uC744 \uBC1B\uB098",lines:['**\uCC45\uC784\uC790** \u2014 \uC9C0\uC815\uB420 \uB54C(\uBC30\uC815), \uB0B4\uC6A9\uC774 \uACE0\uCCD0\uC9C8 \uB54C, \uC791\uC131\uC790\uAC00 \uB313\uAE00\uC744 \uB2EC \uB54C, \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uBBF8\uB798\uBA74 \uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC \uC624\uACE0, \uC2DC\uC791\uC77C\uC2DC\uC5D0 "\uC0C8 \uC5C5\uBB34\uAC00 \uBC30\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4" \uD478\uC2DC\uAC00 1\uD68C \uC635\uB2C8\uB2E4.',"**\uC791\uC131\uC790** \u2014 \uCC45\uC784\uC790\uAC00 \uBC14\uB014 \uB54C, \uB204\uAD70\uAC00 \uAC00\uC838\uAC00\uAE30 \uD560 \uB54C, \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD588\uC744 \uB54C, \uC644\uB8CC\uB410\uC744 \uB54C, \uB2E4\uB978 \uC0AC\uB78C\uC774 \uB313\uAE00\uC744 \uB2EC \uB54C, \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0.","**\uCC38\uC870\uC790** \u2014 \uC0C8\uB85C \uCC38\uC870\uB85C \uC9C0\uC815\uB420 \uB54C, \uC644\uB8CC\uB410\uC744 \uB54C. \uCC45\uC784\uC790\uAC00 \uC544\uC9C1 \uC5C6\uB294 \uC5C5\uBB34\uB77C\uBA74 \uB313\uAE00\uB3C4 \uBC1B\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10 \uC54C\uB9BC\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uB313\uAE00 \uB300\uD654** \u2014 \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uAC00\uBBC0\uB85C, \uB2F5\uAE00\uC744 \uC8FC\uACE0\uBC1B\uB294 \uB450 \uC0AC\uB78C\uC5D0\uAC8C \uC774\uC5B4\uC9D1\uB2C8\uB2E4. \uB313\uAE00 \uBC18\uC751(\uC88B\uC544\uC694\xB7\uD655\uC778)\uC740 \uADF8 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uAC11\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uD55C \uD589\uB3D9\uC740 \uBCF8\uC778\uC5D0\uAC8C \uC54C\uB9AC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC885\uB958\uBCC4 \uC218\uC2E0 \uC5EC\uBD80\uB294 **\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uBC14\uAFC9\uB2C8\uB2E4."]},{title:"\uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815",lines:["**\uC2DC\uC791\uC77C\uC2DC** \u2014 \uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uD478\uC2DC \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4(\uBBF8\uB798\uB85C \uC7A1\uC73C\uBA74 \uADF8 \uC804\uAE4C\uC9C0\uB294 \uBCA8\uC5D0\uB9CC \uC313\uC784). \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4.","**\uB9C8\uAC10\uC608\uC815** \u2014 \uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\uC54C\uB9BC(\uC5C5\uBB34\uD568 \uC124\uC815 \uC2DC\uAC01)\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0 \uC54C\uB9BC\uC758 \uAE30\uC900\uC774\uACE0, \uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778\uC5D0 \uB193\uC774\uB294 \uB0A0\uC9DC\uC785\uB2C8\uB2E4. \uC9C0\uB09C \uB9C8\uAC10\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uB9C8\uAC10\uC608\uC815 \uC5C6\uC774 \uC644\uB8CC\uD558\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC774 \uB9C8\uAC10\uC608\uC815\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uB294 \uCC44\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC77C\uC815(\uC2DC\uAC01 \uC788\uB294 \uD589\uC0AC)\uC740 \uB9C8\uAC10\uC608\uC815 \uB300\uC2E0 **\uC77C\uC2DC**\uAC00 \uAE30\uC900\uC774\uACE0, \uCC38\uC11D\uC790 \uC804\uC6D0\uACFC \uC791\uC131\uC790\uAC00 \uC54C\uB9BC\uC744 \uBC1B\uC2B5\uB2C8\uB2E4."]}]};var z0={id:"tasks",tabTitle:"\uC5C5\uBB34",topics:[{title:"\uC5C5\uBB34 \uB4F1\uB85D",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC \uB610\uB294 \uB2E8\uCD95\uD0A4 **N**. \uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uB9C8\uAC10\uC608\uC815\xB7\uC911\uC694\uB3C4\uB97C \uC815\uD569\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** \u2014 \uAD00\uC5EC\uC790\uB9CC / \uBD80\uC11C / \uC804\uCCB4 \uC9C1\uC6D0. \uCC45\uC784\uC790\uAC00 \uC5C6\uB294 \uACF5\uAC1C \uC5C5\uBB34\uB294 \uC5F4\uB78C\uC790\uAC00 **\uAC00\uC838\uAC00\uAE30**\uB85C \uB9E1\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",'**\uBC18\uBCF5** \u2014 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uB4F1\uC73C\uB85C \uD68C\uCC28\uB97C \uB9CC\uB4E4\uACE0, \uC644\uB8CC\xB7\uC0AD\uC81C \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.','**\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\xB7\uAD50\uC721 \uB4F1\uC785\uB2C8\uB2E4. \uC644\uB8CC \uAC1C\uB150\uC774 \uC5C6\uACE0 \uCE98\uB9B0\uB354\uC640 \uC804\uCCB4 \uD0ED "\uC77C\uC815" \uADF8\uB8F9\uC5D0 \uB098\uC635\uB2C8\uB2E4.']},{title:"\uC5C5\uBB34 \uC0C1\uC138",lines:["\uC81C\uBAA9\xB7\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD \uC0C1\uC138 \uD328\uB110(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74)\uC774 \uC5F4\uB9BD\uB2C8\uB2E4. \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uBC14\uB85C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","**\uB0B4\uC6A9**\uC740 \uBCF8\uBB38 \uC591\uC2DD(\u22EE \u203A \uBCF8\uBB38 \uC591\uC2DD)\uC73C\uB85C \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC62C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",'**\uC5C5\uBB34 \uB300\uD654\uB294 \uB313\uAE00\uB85C** \uD569\uB2C8\uB2E4. \uB313\uAE00\uC5D0\uB294 \uD30C\uC77C\xB7\uC774\uBBF8\uC9C0\uB97C \uBD99\uC774\uACE0, \uB313\uAE00\uC5D0 **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC744 \uB0A8\uACA8 "\uC77D\uC5C8\uB2E4/\uB3D9\uC758\uD55C\uB2E4"\uB97C \uD45C\uC2DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uBC18\uC751\uC740 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC).',"\uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uBBC0\uB85C \uB2F5\uAE00\uC774 \uC624\uAC00\uB294 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uACE0\uAC1D\uC13C\uD130 \uAE00\uC740 \uCF54\uB4DC\uC0F5 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC73C\uB85C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58\uC740 \uC791\uC131\uC790\uB9CC \uBCF4\uC785\uB2C8\uB2E4.","\uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 \uC624\uB978\uCABD \uC704 **\u22EE** \uC5D0 \uD65C\uB3D9\xB7\uACF5\uC720\xB7\uC0AD\uC81C\uAC00 \uC788\uACE0, \uACE0\uCE5C \uB0B4\uC6A9\uC740 **\uC800\uC7A5\uD558\uAE30**\uB85C \uD55C \uBC88\uC5D0 \uBCF4\uB0C5\uB2C8\uB2E4."]},{title:"\uC0C1\uD0DC\uC640 \uC644\uB8CC",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4. \uBA54\uB274\uC758 **\uC644\uB8CC**\uB294 \uD655\uC778 \uC5C6\uC774 \uBC14\uB85C \uC644\uB8CC \uCC98\uB9AC\uB429\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uACE0, \uD655\uC778 \uD31D\uC5C5\uC744 \uAC70\uCCD0 \uC801\uC6A9\uB429\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4.",'\uB9C8\uAC10\uC608\uC815\uC740 \uC9C0\uB09C \uAC83\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB418\uBA70, \uC9C0\uC5F0 \uAC74\uC218\uB294 \uADF8\uB8F9 \uBA38\uB9AC\uC904\uC5D0 "\uC9C0\uC5F0 n\uAC74"\uC73C\uB85C \uBCF4\uC785\uB2C8\uB2E4.']},{title:"\uAD00\uB828 \uC5C5\uBB34",lines:["\uC0C1\uC138\uC758 **\uAD00\uB828 \uC5C5\uBB34**\uC5D0\uC11C \uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30, \uAD00\uB828\xB7\uC911\uBCF5 \uC5C5\uBB34 \uC5F0\uACB0\uC744 \uD569\uB2C8\uB2E4.","\uC6B0\uD074\uB9AD \uBA54\uB274\uC5D0\uC11C \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9, \uBAA9\uD45C\uC5D0 \uB123\uAE30, \uBCF4\uAD00, \uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]}]};var j0={id:"checklist",tabTitle:"\uD560\uC77C",topics:[{title:"\uD560\uC77C \uBAA9\uB85D",lines:['\uC0C1\uC138\uC758 **\uD560\uC77C**\uC5D0 \uD56D\uBAA9\uC744 \uC801\uACE0 \uCCB4\uD06C\uD569\uB2C8\uB2E4. \uC9C4\uD589\uC740 \uBAA9\uB85D\xB7\uCE74\uB4DC\uC5D0 "1/3"\uCC98\uB7FC \uD45C\uC2DC\uB429\uB2C8\uB2E4.',"\uD0C0\uC784\uB77C\uC778 \uBCF4\uAE30\uC5D0\uC11C\uB294 \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uBA70, \uCCB4\uD06C\uD558\uBA74 \uD655\uC778 \uD31D\uC5C5 \uB4A4 \uC644\uB8CC\uB429\uB2C8\uB2E4."]},{title:"\uD560\uC77C\uC744 \uC5C5\uBB34\uB85C \u2014 \uC5C5\uBB34 \uB098\uB204\uAE30(\uBD84\uC7A5)",lines:["\u2460 \uC791\uC131\uC790\uAC00 \uD070 \uC5C5\uBB34\uB97C \uB4F1\uB85D\uD558\uACE0 \uCC45\uC784\uC790\uB97C \uC815\uD55C \uB4A4, \uD560\uC77C\uC5D0 \uD574\uC57C \uD560 \uC77C\uC744 \uD56D\uBAA9\uC73C\uB85C \uC801\uC2B5\uB2C8\uB2E4.","\u2461 \uCC45\uC784\uC790\uB294 \uD560\uC77C \uD56D\uBAA9\uC758 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB85C \uAC01 \uD56D\uBAA9\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD558\uACE0, \uADF8 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\xB7\uB9C8\uAC10\uC608\uC815\uC744 \uC815\uD574 \uD300\uC6D0\uC5D0\uAC8C \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4.",'\u2462 \uC2B9\uACA9\uB41C \uC5C5\uBB34\uB294 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uC5D0 \uC5F0\uACB0\uB41C \uCC44\uB85C \uB0A8\uC544, \uD300\uC6D0\uC774 \uC644\uB8CC\uD558\uBA74 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uB3C4 \uC644\uB8CC\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4("3/4" \uC9C4\uD589 \uD45C\uC2DC).',"\u2463 \uB098\uB220 \uC900 \uC5C5\uBB34\uB07C\uB9AC \uB313\uAE00\uB85C \uB300\uD654\uD558\uACE0, \uBAA8\uB450 \uB05D\uB098\uBA74 \uCC45\uC784\uC790\uAC00 \uC6D0\uB798 \uC5C5\uBB34\uB97C \uC644\uB8CC\uD569\uB2C8\uB2E4.","\uC774\uBBF8 \uC788\uB294 \uC5C5\uBB34\uB97C \uD560\uC77C\uC5D0 \uBD99\uC77C \uC218\uB3C4 \uC788\uACE0, \uC5F0\uACB0 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC5D0 \uBCF4\uB0B4\uBA74 \uD560\uC77C\uC5D0\uC11C\uB3C4 \uBE60\uC9D1\uB2C8\uB2E4(\uAC74\uC218\uB3C4 \uD568\uAED8 \uB9DE\uCDB0\uC9D1\uB2C8\uB2E4)."]}]};var F0={id:"confirm",tabTitle:"\uD655\uC778\xB7\uC54C\uB9BC",topics:[{title:"\uD655\uC778 \uC694\uCCAD\uACFC \uD655\uC778 \uC644\uB8CC",lines:['\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB294 \uBC30\uC815\uB41C \uC5C5\uBB34\uB97C **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C \uCC98\uB9AC\uD569\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uD45C \uB9E8 \uC704 "\uBBF8\uD655\uC778" \uC601\uC5ED\uACFC \uBAA8\uBC14\uC77C "\uBBF8\uD655\uC778" \uADF8\uB8F9\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.',"\uD655\uC778 \uC5F4\uC758 **n/m** \uC744 \uB204\uB974\uBA74 \uB204\uAC00 \uD655\uC778\uD588\uB294\uC9C0 \uBCF4\uC774\uACE0, \uC791\uC131\uC790\uB294 \uBBF8\uD655\uC778\uC790\uC5D0\uAC8C **\uD655\uC778 \uC694\uCCAD**\uC744 \uB2E4\uC2DC \uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uACF5\uC9C0\uC0AC\uD56D\uC740 \uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD558\uBA70, \uD655\uC778 \uC5F4 \uD544\uD130(\uC804\uCCB4/\uBBF8\uD655\uC778/\uD655\uC778\uD568)\uB85C \uAC70\uB985\uB2C8\uB2E4."]},{title:"\uC54C\uB9BC",lines:["\uBC30\uC815\xB7\uB2F4\uB2F9\uC790 \uBCC0\uACBD\xB7\uCC38\uC870 \uC9C0\uC815\xB7\uB313\uAE00\xB7\uB313\uAE00 \uBC18\uC751\xB7\uD655\uC778 \uC694\uCCAD\xB7\uD655\uC778 \uC644\uB8CC\xB7\uC5C5\uBB34 \uC644\uB8CC\xB7\uC218\uC815\xB7\uB9C8\uAC10 \uC54C\uB9BC\uC774 \uBCA8\uACFC \uC571 \uD478\uC2DC\uB85C \uC635\uB2C8\uB2E4.","**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uB044\uACE0 \uCF24 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC \uC2DC\uAC01\uC740 \uC5C5\uBB34\uD568 \uC124\uC815(\uAD00\uB9AC\uC790)\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4.",'\uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uAC11\uB2C8\uB2E4(\uC2DC\uC791\uC77C\uC2DC\uAC00 \uBBF8\uB798\uBA74 \uADF8\uB54C "\uC2DC\uC791" \uC54C\uB9BC\uC73C\uB85C \uC804\uB2EC).']}]};var q0={id:"views",tabTitle:"\uBCF4\uAE30",topics:[{title:"\uBCF4\uAE30 \uC804\uD658",lines:["\uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC(\uBAA9\uB85D\xB7\uC8FC\uAC04\xB7\uC6D4\uAC04\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C\xB7\uD0C0\uC784\uB77C\uC778)\uC73C\uB85C \uBC14\uAFB8\uBA70 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4. \uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uD604\uC7AC \uBCF4\uAE30 \uD558\uB098\uB9CC \uBCF4\uC774\uACE0 \uB204\uB974\uBA74 \uBA54\uB274\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.","\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4\uB85C\uB3C4 \uC804\uD658\uD569\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 \uD0ED \uCC38\uACE0)."]},{title:"\uBAA9\uB85D(\uD45C)",lines:["\uC5F4 \uC81C\uBAA9 \u2014 \uC81C\uBAA9\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uB9C8\uAC10\uC608\uC815\xB7\uC644\uB8CC\uC77C\uC2DC\uB294 **\uC815\uB82C**, \uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4\uB294 **\uD544\uD130**\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.","**\uADF8\uB8F9** \uBA54\uB274\uB85C \uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC \uB4F1 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904\uC758 \u25B8 \uB85C \uC811\uC2B5\uB2C8\uB2E4. \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uD45C\uAC00 \uAC00\uB85C\uB85C \uC2A4\uD06C\uB864\uB418\uACE0 \uC5F4 \uC81C\uBAA9\uC774 \uD568\uAED8 \uB530\uB77C\uC635\uB2C8\uB2E4."]},{title:"\uBCF4\uB4DC(\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C)",lines:["\uCE74\uB4DC\uB97C \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC(\uD504\uB85C\uC81D\uD2B8/\uC0C1\uD0DC/\uBAA9\uD45C)\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4. \uCEEC\uB7FC \uBA38\uB9AC\uB97C \uB04C\uBA74 \uD504\uB85C\uC81D\uD2B8 \uC21C\uC11C\uAC00 \uBC14\uB01D\uB2C8\uB2E4.","\uCEEC\uB7FC **\u22EE** \uBA54\uB274 \u2014 \uC0C8 \uC5C5\uBB34 \uB4F1\uB85D \xB7 \uC218\uC815 \xB7 \uBCF4\uAD00 \xB7 \uC0AD\uC81C(\uC0AD\uC81C\uD558\uBA74 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9).","\uCE74\uB4DC\uC758 \uC6D0\uD615 \uCCB4\uD06C\uB294 \uC644\uB8CC, \uB9C8\uAC10 \uB0A0\uC9DC\uB97C \uB204\uB974\uBA74 \uB2EC\uB825\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uB9C8\uAC10\uC774 \uC5C6\uC73C\uBA74 \uC54C\uB78C \uC544\uC774\uCF58\uB9CC \uBCF4\uC785\uB2C8\uB2E4."]},{title:"\uC8FC\uAC04\xB7\uC6D4\uAC04 \uCE98\uB9B0\uB354",lines:["\uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uCE78\uC5D0 \uB193\uC785\uB2C8\uB2E4. \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4.","\uBE48 \uCE78\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB9AC\uBA74 **\uC5C5\uBB34 \uB4F1\uB85D** \uC904\uC774 \uB098\uD0C0\uB098 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \uC5F0/\uC6D4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uB2EC\uB825\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.","\u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC5D0\uC11C \uAD6C\uAE00\xB7\uC560\uD50C\xB7\uB124\uC774\uBC84 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30/\uAC00\uC838\uC624\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4."]},{title:"\uD0C0\uC784\uB77C\uC778",feature:"timeline",lines:["\uC2DC\uC791\uC77C\uC2DC~\uB9C8\uAC10\uC608\uC815\uC744 \uB9C9\uB300\uB85C \uBCF4\uC5EC \uAE30\uAC04 \uACB9\uCE68\uC744 \uD655\uC778\uD569\uB2C8\uB2E4. \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4.","\uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uBA70, \uC644\uB8CC \uC228\uAE30\uAE30\uAC00 \uCF1C\uC838 \uC788\uC73C\uBA74 \uC644\uB8CC\uB41C \uD560\uC77C\uB3C4 \uAC10\uCDA5\uB2C8\uB2E4."]},{title:"\uCC28\uD2B8",feature:"charts",lines:["**\uCC28\uD2B8** \uBC84\uD2BC\uC5D0\uC11C \uC6CC\uD06C\uB85C\uB4DC(\uC778\uC6D0\uBCC4 \uBD80\uD558)\xB7\uB204\uC801\uD750\uB984\uB3C4\xB7\uB9AC\uB4DC\uD0C0\uC784, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4.","\uC6CC\uD06C\uB85C\uB4DC\uC758 \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC73C\uB85C \uC815\uD569\uB2C8\uB2E4."]}]};var $0={id:"filters",tabTitle:"\uAC80\uC0C9\xB7\uD544\uD130",topics:[{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **/**). \uBAA8\uBC14\uC77C\uC740 \uAC80\uC0C9 \uD654\uBA74\uC5D0\uC11C \uC0C1\uD0DC\xB7\uB77C\uBCA8 \uCE69\uC73C\uB85C \uD568\uAED8 \uAC70\uB985\uB2C8\uB2E4.","**\uD544\uD130**(\uBAA9\uB85D \uC678 \uBCF4\uAE30) \xB7 **\uCC45\uC784\uC790** \xB7 **\uD504\uB85C\uC81D\uD2B8** \xB7 **\uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uAC01\uAC01 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0, \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","**\uBAA9\uD45C** \uBC84\uD2BC\uC740 \uC804\uCCB4/\uBBF8\uBC30\uC815/\uBAA9\uD45C\uBCC4\uB85C \uAC70\uB985\uB2C8\uB2E4(\uBAA9\uD45C \uBCF4\uB4DC\uC5D0\uC11C\uB294 \uCEEC\uB7FC\uC774 \uACE7 \uBAA9\uD45C\uB77C \uC801\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4).","\uC644\uB8CC\xB7\uBCF4\uAD00\uD568 \uD0ED\uC740 **\uAE30\uAC04** \uBC84\uD2BC\uC73C\uB85C \uC644\uB8CC\uC77C \uBC94\uC704\uB97C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uB77C\uBCA8",feature:"label",lines:["**\uB77C\uBCA8** \uBC84\uD2BC\uC73C\uB85C \uB77C\uBCA8\uBCC4\uB85C \uAC70\uB974\uACE0, \uC5C5\uBB34 \uC0C1\uC138\uC758 \uB77C\uBCA8 \uD589\uC5D0\uC11C \uBD99\uC785\uB2C8\uB2E4. \uB77C\uBCA8 \uC0AC\uC804\uC740 \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uAD00\uB9AC\uD569\uB2C8\uB2E4."]}]};var H0={id:"projects",tabTitle:"\uD504\uB85C\uC81D\uD2B8\xB7\uBAA9\uD45C",feature:"project",topics:[{title:"\uD504\uB85C\uC81D\uD2B8",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uBCF4\uB4DC \uB9E8 \uB05D \uC810\uC120 \uCE78 \uB610\uB294 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD569\uB2C8\uB2E4.","\uC5C5\uBB34\uC758 \uD504\uB85C\uC81D\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC740 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uB294 \uC5C5\uBB34\uC785\uB2C8\uB2E4."]},{title:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8)",feature:"sprint",lines:["\uD504\uB85C\uC81D\uD2B8 \uC124\uC815\uC5D0\uC11C **\uBAA9\uD45C \uC0AC\uC6A9**\uC744 \uCF1C\uBA74 \uAE30\uAC04\uC774 \uC788\uB294 \uBAA9\uD45C\uB97C \uB9CC\uB4E4\uACE0 \uC5C5\uBB34\uB97C \uBC30\uC815\uD569\uB2C8\uB2E4(\uBAA9\uD45C \uBCF4\uB4DC\uC5D0\uC11C \uCE74\uB4DC \uB04C\uAE30, \uC6B0\uD074\uB9AD \u203A \uBAA9\uD45C\uC5D0 \uB123\uAE30).","\uBAA9\uD45C \uC885\uB8CC \uC2DC \uB0A8\uC740 \uC5C5\uBB34\uB97C \uB2E4\uC74C \uBAA9\uD45C\uB85C \uB118\uAE38\uC9C0, \uBBF8\uBC30\uC815\uC73C\uB85C \uBE84\uC9C0 \uACE0\uB985\uB2C8\uB2E4. \uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uC801\uC2B5\uB2C8\uB2E4."]},{title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF\xB7\uC790\uB3D9\uD654 \uADDC\uCE59",lines:["\u22EE \u203A **\uC5C5\uBB34 \uD15C\uD50C\uB9BF**\uC73C\uB85C \uC815\uD615 \uC808\uCC28(\uD560\uC77C \uD3EC\uD568)\uB97C \uD55C \uBC88\uC5D0 \uB9CC\uB4E4\uACE0, **\uC790\uB3D9\uD654 \uADDC\uCE59**\uC73C\uB85C \uB4F1\uB85D \uC2DC \uC870\uAC74\uBD80 \uBC30\uC815 \uB4F1\uC744 \uB9E1\uAE41\uB2C8\uB2E4."]},{title:"\uBCF4\uACE0\uC11C",feature:"report",lines:["**\uBCF4\uACE0\uC11C** \uD0ED\uC5D0\uC11C \uC5C5\uBB34 \uBCF4\uACE0\uC11C\uB97C \uC791\uC131\uD574 \uC804\uC790\uACB0\uC7AC\uB85C \uC0C1\uC2E0\uD569\uB2C8\uB2E4."]}]};var W0={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var Df=[N0,L0,z0,j0,F0,q0,$0,H0,W0];import{jsx as ln,jsxs as Pf}from"react/jsx-runtime";function dT(e){return e.split(/(\*\*[^*]+\*\*)/g).filter(b=>b.length>0).map((b,l)=>b.startsWith("**")&&b.endsWith("**")?ln(ho,{component:"strong",sx:{fontWeight:700},children:b.slice(2,-2)},l):ln(sT,{children:b},l))}function hT({keys:e}){let d=lt();return ln(ho,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((b,l)=>Pf(ho,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?ln(uT,{sx:{fontSize:18,color:d.colors.textMuted}}):null,ln(ho,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:d.colors.textPrimary,bgcolor:d.colors.surfaceSubtle,border:`1px solid ${d.colors.border}`,borderRadius:1,fontVariantNumeric:"tabular-nums"},children:b})]},`${b}-${l}`))})}function uG({open:e,onClose:d,views:b,features:l={},initialTab:o}){let s=lt(),[r,t]=lT(0);aT(()=>{if(!e)return;let h=Df.filter(f=>!f.feature||l[f.feature]!==!1).findIndex(f=>f.id===o);t(Math.max(0,h))},[e,o]);let n=a=>!a||l[a]!==!1,c=ma(b),i=Df.filter(a=>n(a.feature)).map(a=>({id:a.id,tabTitle:a.tabTitle,showTitle:!1,children:a.id==="shortcuts"?ln(ho,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:15,color:s.colors.textPrimary,px:.5},children:c.map(h=>Pf(ho,{sx:{display:"contents"},children:[ln(hT,{keys:h.keys}),ln("span",{children:h.description})]},h.keys))}):ln(ho,{sx:{display:"flex",flexDirection:"column",gap:2.5,px:.5},children:a.topics.filter(h=>n(h.feature)).map(h=>Pf(ho,{children:[ln(ho,{sx:{fontSize:18,fontWeight:700,color:s.colors.textStrong,mb:.75},children:h.title}),ln(ho,{component:"ul",sx:{m:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:15,lineHeight:1.6,color:s.colors.textPrimary},children:h.lines.map((f,u)=>ln("li",{children:dT(f)},u))})]},h.title))})}));return ln(fT,{open:e,onClose:d,maxWidth:"md",title:"\uC5C5\uBB34\uD568 \uC124\uBA85\uC11C",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!0,switchContent:!0},activeTabValue:r,onTabChange:t,fixedHeight:"70vh",maxContentHeight:"70vh",sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:i,actions:{showCancelButton:!1,right:ln(cT,{variant:"contained",onClick:d,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as U0,useRef as pT,useState as ms}from"react";import{Box as ir,Button as Hn,IconButton as Nf,Menu as V0,MenuItem as K0,Switch as mT,Tooltip as G0}from"@mui/material";import{FormDialog as Y0}from"@ehfuse/mui-form-dialog";import Lf from"@mui/icons-material/Add";import gT from"@mui/icons-material/ArrowRightAlt";import bT from"@mui/icons-material/BoltOutlined";import yT from"@mui/icons-material/Close";import xT from"@mui/icons-material/EditOutlined";import{ErrorAlert as X0}from"@ehfuse/alerts";import{ClearTextField as ba,LabelSelect as gn}from"@ehfuse/mui-form-controls";import{Fragment as J0,jsx as Ye,jsxs as Mn}from"react/jsx-runtime";var zf=[{value:"created",label:"\uC5C5\uBB34 \uB4F1\uB85D \uC2DC",hint:"\uC0C8 \uC5C5\uBB34\uAC00 \uB9CC\uB4E4\uC5B4\uC9C4 \uC9C1\uD6C4 \uD55C \uBC88 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"status_changed",label:"\uC0C1\uD0DC \uBCC0\uACBD \uC2DC",hint:"\uC0C1\uD0DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"commented",label:"\uB313\uAE00\uC774 \uB2EC\uB838\uC744 \uB54C",hint:"\uB313\uAE00\uC774 \uC0C8\uB85C \uB2EC\uB9AC\uAC70\uB098 \uC218\uC815\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD68C\uC2E0\uC744 \uBC1B\uC740 \uC790\uB9AC)."},{value:"manager_assigned",label:"\uCC45\uC784\uC790\uAC00 \uC9C0\uC815\uB410\uC744 \uB54C",hint:"\uCC45\uC784\uC790\uAC00 \uC0C8\uB85C \uC9C0\uC815\uB418\uAC70\uB098 \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"attachment_added",label:"\uCCA8\uBD80\uAC00 \uC62C\uB77C\uC654\uC744 \uB54C",hint:"\uC5C5\uBB34\uC5D0 \uD30C\uC77C\uC774 \uCCA8\uBD80\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uC99D\uBE59 \uC811\uC218 \uC790\uB9AC)."},{value:"field_changed",label:"\uD544\uB4DC\uAC00 \uBC14\uB00C\uC5C8\uC744 \uB54C",hint:"\uC9C0\uC815\uD55C \uD544\uB4DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD544\uB4DC\uB97C \uC548 \uACE0\uB974\uBA74 \uC544\uBB34 \uC218\uC815\uC5D0\uB098 \uC2E4\uD589)."},{value:"overdue",label:"\uB9C8\uAC10 \uACBD\uACFC \uC2DC",hint:"\uB9C8\uAC10\uC774 \uC9C0\uB09C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uB97C \uB9E4\uC77C \uC810\uAC80\uD574 \uC2E4\uD589\uD569\uB2C8\uB2E4."}],ya=[{value:"due_date",label:"\uB9C8\uAC10\uC608\uC815"},{value:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC"},{value:"priority",label:"\uC911\uC694\uB3C4"},{value:"manager_account_seq",label:"\uCC45\uC784\uC790"},{value:"receiver_account_seqs",label:"\uCC38\uC870\uC790"},{value:"label_keys",label:"\uB77C\uBCA8"},{value:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8"},{value:"sprint_seq",label:"\uBAA9\uD45C"},{value:"content",label:"\uB0B4\uC6A9"},{value:"note",label:"\uBE44\uACE0"}],fc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function cc(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function uc(e){return un.find(d=>d.key===e)?.name??e}function vT(e,d,b){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=d.find(c=>ri(c.key)===l.group_seq);s.push(`\uD504\uB85C\uC81D\uD2B8=${n?.label??`#${l.group_seq}`}`)}l.is_bug===!0&&s.push("\uC624\uB958\uB9CC"),l.is_event===!0&&s.push("\uC77C\uC815\uB9CC"),l.priority&&s.push(`\uC911\uC694\uB3C4=${fc.find(n=>n.value===l.priority)?.label}`),l.label_key&&s.push(`\uB77C\uBCA8=${b.find(n=>n.key===l.label_key)?.name??l.label_key}`),l.title_contains&&s.push(`\uC81C\uBAA9\uC5D0 "${l.title_contains}" \uD3EC\uD568`),l.status&&s.push(`\uC0C1\uD0DC=${uc(l.status)}`),l.from_status&&s.push(`${uc(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${uc(l.to_status)}\uB85C`),l.manager_empty===!0&&s.push("\uCC45\uC784\uC790 \uC5C6\uC74C"),l.manager_empty===!1&&s.push("\uCC45\uC784\uC790 \uC788\uC74C"),l.manager_account_seq&&s.push(`\uCC45\uC784\uC790=${l.manager_name||`\uACC4\uC815 #${l.manager_account_seq}`}`),l.receiver_account_seq&&s.push(`\uCC38\uC870\uC790\uC5D0 ${l.receiver_name||`\uACC4\uC815 #${l.receiver_account_seq}`}`),l.changed_field&&s.push(`${ya.find(n=>n.value===l.changed_field)?.label??l.changed_field} \uBCC0\uACBD`),l.comment_contains&&s.push(`\uB313\uAE00\uC5D0 "${l.comment_contains}" \uD3EC\uD568`),l.comment_by_others===!0&&s.push("\uB0A8\uC774 \uC4F4 \uB313\uAE00"),typeof l.overdue_days=="number"&&s.push(`${l.overdue_days}\uC77C \uACBD\uACFC`);let r=[];o.set_status&&r.push(`\uC0C1\uD0DC=${uc(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${fc.find(n=>n.value===o.set_priority)?.label}`),o.assign_manager_account_seq&&r.push(`\uCC45\uC784\uC790=${o.assign_manager_name||"\uC9C0\uC815"}`),o.add_receiver_account_seq&&r.push(`\uCC38\uC870\uC790 + ${o.add_receiver_name||"\uC9C0\uC815"}`),o.add_label_key&&r.push(`\uB77C\uBCA8 + ${b.find(n=>n.key===o.add_label_key)?.name??o.add_label_key}`),o.apply_content_template_seq&&r.push(`\uBCF8\uBB38 \uC591\uC2DD=${o.apply_content_template_name||"\uC9C0\uC815"}`),o.notify_account_seq&&r.push("\uC54C\uB9BC \uBC1C\uC1A1");let t=zf.find(n=>n.value===e.trigger)?.label??e.trigger;return{left:s.length>0?`${t} \xB7 ${s.join(", ")}`:t,right:r.join(", ")||"\uB3D9\uC791 \uC5C6\uC74C"}}var Z0={fontSize:16,fontWeight:700,color:"#37352f"},wT={display:"flex",alignItems:"center",gap:1},_T={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function CG({open:e,rules:d,customTabs:b,statusOptions:l,contentTemplates:o=[],onPickAccount:s,onClose:r,onCreate:t,onUpdate:n,onToggle:c,onRemove:i}){let[a,h]=ms(!1),[f,u]=ms(0),[g,m]=ms(cc()),[x,k]=ms(!1),B=pT(null),[R,L]=ms(null),[A,D]=ms(null);U0(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(cc())},500);return()=>window.clearTimeout(W)},[e]),U0(()=>{if(!a)return;let W=window.setTimeout(()=>B.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=f>0,q=g.trigger,j=()=>{h(!1),u(0),m(cc())},S=(W,X)=>{m(Z=>{let K={...Z.condition};return X===""||X===void 0||X===null?delete K[W]:K[W]=X,{...Z,condition:K}})},T=(W,X)=>{m(Z=>{let K={...Z.action};return X===""||X===void 0||X===null?delete K[W]:K[W]=X,{...Z,action:K}})},P=W=>{m(X=>{let Z={...X.condition};return W!=="status_changed"&&(delete Z.from_status,delete Z.to_status),W!=="overdue"&&delete Z.overdue_days,W!=="field_changed"&&delete Z.changed_field,W!=="commented"&&(delete Z.comment_contains,delete Z.comment_by_others),W==="field_changed"&&Z.changed_field===void 0&&(Z.changed_field=ya[0]?.value??""),{...X,trigger:W,condition:Z}})},p=b.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),v=un.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(ri(W.key)),label:W.label})),{condition:_,action:C}=g,O=_.is_bug!==void 0||_.is_event!==void 0,z=[..._.group_seq===void 0&&w.length>0?[{key:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...O?[]:[{key:"kind",label:"\uC885\uB958\uAC00 \uC624\uB958/\uC77C\uC815\uC778 \uACBD\uC6B0"}],..._.priority===void 0?[{key:"priority",label:"\uC911\uC694\uB3C4\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],..._.label_key===void 0&&y.length>0?[{key:"label_key",label:"\uB77C\uBCA8\uC774 \uBD99\uC5B4 \uC788\uB294 \uACBD\uC6B0"}]:[],..._.title_contains===void 0?[{key:"title_contains",label:"\uC81C\uBAA9\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],..._.manager_empty===void 0?[{key:"manager_empty",label:"\uCC45\uC784\uC790\uAC00 \uC5C6\uB294/\uC788\uB294 \uACBD\uC6B0"}]:[],...s&&_.manager_account_seq===void 0?[{key:"manager_account",label:"\uCC45\uC784\uC790\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...s&&_.receiver_account_seq===void 0?[{key:"receiver_account",label:"\uCC38\uC870\uC790\uC5D0 ~\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...q==="status_changed"&&_.from_status===void 0?[{key:"from_status",label:"\uC774 \uC0C1\uD0DC\uC5D0\uC11C \uBC14\uB010 \uACBD\uC6B0"}]:[],...q==="status_changed"&&_.to_status===void 0?[{key:"to_status",label:"\uC774 \uC0C1\uD0DC\uB85C \uBC14\uB010 \uACBD\uC6B0"}]:[],...q==="field_changed"&&_.changed_field===void 0?[{key:"changed_field",label:"~ \uD544\uB4DC\uAC00 \uBCC0\uACBD\uB41C \uACBD\uC6B0"}]:[],...q==="commented"&&_.comment_contains===void 0?[{key:"comment_contains",label:"\uB313\uAE00\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...q==="commented"&&_.comment_by_others===void 0?[{key:"comment_by_others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C\uC774 \uC4F4 \uACBD\uC6B0"}]:[],...q==="overdue"&&_.overdue_days===void 0?[{key:"overdue_days",label:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB09C \uACBD\uC6B0"}]:[]],$=async W=>{if(!s)return;let X=W==="manager_account"?_.manager_account_seq??0:_.receiver_account_seq??0,Z=await s(X,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");Z&&m(K=>{let ee={...K.condition};return W==="manager_account"?(ee.manager_account_seq=Z.accountSeq,ee.manager_name=Z.name):(ee.receiver_account_seq=Z.accountSeq,ee.receiver_name=Z.name),{...K,condition:ee}})},V=W=>{L(null),W==="group_seq"?S("group_seq",Number(w[0]?.value)||0):W==="kind"?S("is_bug",!0):W==="priority"?S("priority","high"):W==="label_key"?S("label_key",y[0]?.value??""):W==="title_contains"?m(X=>({...X,condition:{...X.condition,title_contains:""}})):W==="manager_empty"?S("manager_empty",!0):W==="manager_account"||W==="receiver_account"?$(W):W==="from_status"?S("from_status",un[0]?.key??""):W==="to_status"?S("to_status",un[0]?.key??""):W==="changed_field"?S("changed_field",ya[0]?.value??""):W==="comment_contains"?m(X=>({...X,condition:{...X.condition,comment_contains:""}})):W==="comment_by_others"?S("comment_by_others",!0):W==="overdue_days"&&S("overdue_days",1)},E=W=>{if(W==="kind"){S("is_bug",""),S("is_event","");return}if(W==="manager_account"){S("manager_account_seq",""),S("manager_name","");return}if(W==="receiver_account"){S("receiver_account_seq",""),S("receiver_name","");return}S(W==="group_seq"?"group_seq":W,"")},H=[...C.set_status===void 0?[{key:"set_status",label:"\uC0C1\uD0DC \uBC14\uAFB8\uAE30"}]:[],...C.set_priority===void 0?[{key:"set_priority",label:"\uC911\uC694\uB3C4 \uBC14\uAFB8\uAE30"}]:[],...C.add_label_key===void 0&&y.length>0?[{key:"add_label_key",label:"\uB77C\uBCA8 \uBD99\uC774\uAE30"}]:[],...s&&C.assign_manager_account_seq===void 0?[{key:"assign_manager",label:"\uCC45\uC784\uC790 \uC9C0\uC815\uD558\uAE30"}]:[],...s&&C.add_receiver_account_seq===void 0?[{key:"add_receiver",label:"\uCC38\uC870\uC790 \uCD94\uAC00\uD558\uAE30"}]:[],...o.length>0&&C.apply_content_template_seq===void 0?[{key:"apply_content_template",label:"\uBCF8\uBB38 \uC591\uC2DD \uCC44\uC6B0\uAE30"}]:[],...s&&C.notify_account_seq===void 0?[{key:"notify",label:"\uC54C\uB9BC \uBCF4\uB0B4\uAE30"}]:[]],I=async W=>{if(!s)return;let X=W==="assign_manager"?C.assign_manager_account_seq??0:W==="add_receiver"?C.add_receiver_account_seq??0:C.notify_account_seq??0,Z=await s(X,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");Z&&m(K=>{let ee={...K.action};return W==="assign_manager"?(ee.assign_manager_account_seq=Z.accountSeq,ee.assign_manager_name=Z.name):W==="add_receiver"?(ee.add_receiver_account_seq=Z.accountSeq,ee.add_receiver_name=Z.name):(ee.notify_account_seq=Z.accountSeq,ee.notify_name=Z.name),{...K,action:ee}})},M=W=>{if(D(null),W==="set_status")T("set_status",un[0]?.key??"");else if(W==="set_priority")T("set_priority","high");else if(W==="add_label_key")T("add_label_key",y[0]?.value??"");else if(W==="apply_content_template"){let X=o[0];m(Z=>({...Z,action:{...Z.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}else I(W)},F=W=>{W==="assign_manager"?(T("assign_manager_account_seq",""),T("assign_manager_name","")):W==="add_receiver"?(T("add_receiver_account_seq",""),T("add_receiver_name","")):W==="apply_content_template"?(T("apply_content_template_seq",""),T("apply_content_template_name","")):W==="notify"?(T("notify_account_seq",""),T("notify_name",""),T("notify_message","")):T(W,"")},U=async()=>{if(!g.name.trim()){X0({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(g.action).length===0){X0({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?g.sort_no:d.reduce((Z,K)=>Math.max(Z,K.sort_no),0)+1;k(!0);let X=N?await n(f,{...g,sort_no:W}):await t({...g,sort_no:W});k(!1),X&&j()},Y=(W,X,Z,K)=>Mn(ir,{sx:wT,children:[Ye(ir,{sx:_T,children:W}),Mn(ir,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:K?"column":"row",alignItems:K?"stretch":"center",gap:K?.5:1},children:[X,K?Ye(ir,{sx:{fontSize:13.5,color:"#37352f"},children:K}):null]}),Ye(G0,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:Ye(Nf,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:Z,children:Ye(yT,{sx:{fontSize:16}})})})]}),G=()=>Mn(ir,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ye(ba,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:B,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:g.name,onChange:W=>m(X=>({...X,name:W.target.value}))}),Ye(ir,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:zf.map(W=>{let X=q===W.value;return Ye(Hn,{disableElevation:!0,variant:X?"contained":"outlined",color:X?"primary":"inherit",onClick:()=>P(W.value),sx:{borderRadius:99,px:1.75,...X?{}:{color:"#57564f",borderColor:"#d9d9d6"}},children:W.label},W.value)})}),Ye(ir,{sx:{fontSize:13,color:"#787774",mt:-.5},children:zf.find(W=>W.value===q)?.hint}),Mn(ir,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ye(ir,{sx:Z0,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),z.length>0?Ye(Hn,{size:"small",startIcon:Ye(Lf,{sx:{fontSize:16}}),onClick:W=>L(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?Y("\uD504\uB85C\uC81D\uD2B8",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>S("group_seq",Number(W.target.value)||"")}),()=>E("group_seq")):null,O?Y("\uC885\uB958",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.is_bug?"bug":"event",options:[{value:"bug",label:"\uC624\uB958\uB9CC"},{value:"event",label:"\uC77C\uC815\uB9CC"}],onChange:W=>{let X=W.target.value==="bug";S("is_bug",X?!0:""),S("is_event",X?"":!0)}}),()=>E("kind")):null,_.priority!==void 0?Y("\uC911\uC694\uB3C4",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:fc,onChange:W=>S("priority",W.target.value)}),()=>E("priority")):null,_.label_key!==void 0?Y("\uB77C\uBCA8",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>S("label_key",W.target.value)}),()=>E("label_key")):null,_.title_contains!==void 0?Y("\uC81C\uBAA9",Ye(ba,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uAE34\uAE09)",value:_.title_contains,onChange:W=>m(X=>({...X,condition:{...X.condition,title_contains:W.target.value}}))}),()=>E("title_contains")):null,_.manager_empty!==void 0?Y("\uCC45\uC784\uC790",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:W=>S("manager_empty",W.target.value==="empty")}),()=>E("manager_empty")):null,_.manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>E("manager_account")):null,_.receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>E("receiver_account")):null,_.from_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:v,onChange:W=>S("from_status",W.target.value)}),()=>E("from_status")):null,_.to_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uB85C",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:v,onChange:W=>S("to_status",W.target.value)}),()=>E("to_status")):null,_.changed_field!==void 0?Y("\uBCC0\uACBD \uD544\uB4DC",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:ya,onChange:W=>S("changed_field",W.target.value)}),()=>E("changed_field")):null,_.comment_contains!==void 0?Y("\uB313\uAE00 \uB0B1\uB9D0",Ye(ba,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uD68C\uC2E0)",value:_.comment_contains,onChange:W=>m(X=>({...X,condition:{...X.condition,comment_contains:W.target.value}}))}),()=>E("comment_contains")):null,_.comment_by_others!==void 0?Y("\uB313\uAE00 \uC791\uC131\uC790",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.comment_by_others?"others":"any",options:[{value:"others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C"},{value:"any",label:"\uB204\uAD6C\uB4E0"}],onChange:W=>S("comment_by_others",W.target.value==="others")}),()=>E("comment_by_others")):null,_.overdue_days!==void 0?Y("\uACBD\uACFC\uC77C",Ye(ba,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:W=>S("overdue_days",Math.max(0,Number(W.target.value)||0)),helperText:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB0AC\uC744 \uB54C\uBD80\uD130 \uC2E4\uD589\uD560\uC9C0"}),()=>E("overdue_days")):null,Object.keys(_).length===0?Ye(ir,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,Mn(ir,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ye(ir,{sx:Z0,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),H.length>0?Ye(Hn,{size:"small",startIcon:Ye(Lf,{sx:{fontSize:16}}),onClick:W=>D(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),C.set_status!==void 0?Y("\uC0C1\uD0DC",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:C.set_status,options:v,onChange:W=>T("set_status",W.target.value)}),()=>F("set_status")):null,C.set_priority!==void 0?Y("\uC911\uC694\uB3C4",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:C.set_priority,options:fc,onChange:W=>T("set_priority",W.target.value)}),()=>F("set_priority")):null,C.apply_content_template_seq!==void 0?Y("\uBCF8\uBB38 \uC591\uC2DD",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:String(C.apply_content_template_seq),options:o.map(W=>({value:String(W.seq),label:W.name})),onChange:W=>{let X=o.find(Z=>String(Z.seq)===String(W.target.value));m(Z=>({...Z,action:{...Z.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}}),()=>F("apply_content_template"),"\uBCF8\uBB38\uC774 \uBE44\uC5B4 \uC788\uC744 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4(\uC4F4 \uB0B4\uC6A9\uC744 \uB36E\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)"):null,C.add_label_key!==void 0?Y("\uB77C\uBCA8",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:C.add_label_key,options:y,onChange:W=>T("add_label_key",W.target.value)}),()=>F("add_label_key")):null,C.assign_manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("assign_manager")},children:C.assign_manager_name||`\uACC4\uC815 #${C.assign_manager_account_seq}`}),()=>F("assign_manager")):null,C.add_receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("add_receiver")},children:C.add_receiver_name||`\uACC4\uC815 #${C.add_receiver_account_seq}`}),()=>F("add_receiver")):null,C.notify_account_seq!==void 0?Y("\uC54C\uB9BC",Mn(J0,{children:[Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("notify")},sx:{flexShrink:0},children:C.notify_name||`\uACC4\uC815 #${C.notify_account_seq}`}),Ye(ba,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:C.notify_message??"",onChange:W=>T("notify_message",W.target.value)})]}),()=>F("notify")):null,Object.keys(C).length===0?Ye(ir,{sx:{fontSize:13.5,color:"#9a9a97"},children:'"+ \uB3D9\uC791 \uCD94\uAC00" \uB85C \uD560 \uC77C\uC744 \uD558\uB098 \uC774\uC0C1 \uACE8\uB77C \uC8FC\uC138\uC694.'}):null,Ye(V0,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>L(null),children:z.map(W=>Ye(K0,{dense:!0,onClick:()=>V(W.key),sx:{fontSize:14},children:W.label},W.key))}),Ye(V0,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>D(null),children:H.map(W=>Ye(K0,{dense:!0,onClick:()=>M(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return Mn(J0,{children:[Ye(Y0,{open:e,onClose:r,maxWidth:"sm",title:"\uC790\uB3D9\uD654 \uADDC\uCE59",locale:"ko",titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-manage",tabs:{visible:!1},contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionContentPaddingTop:0,sections:[{id:"rules",title:"",showTitle:!1,children:Mn(ir,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[d.length===0?Mn(ir,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ye(bT,{sx:{fontSize:48,color:"#d9d9d6"}}),Ye(ir,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,d.map(W=>Mn(ir,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[Ye(G0,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:Ye(mT,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(X,Z)=>c(W.seq,Z)})}),Mn(ir,{sx:{flex:1,minWidth:0},children:[Ye(ir,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let X=vT(W,b,l);return Mn(ir,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[Ye(ir,{component:"span",children:X.left}),Ye(gT,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),Ye(ir,{component:"span",children:X.right})]})})()]}),Ye(Nf,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC218\uC815`,onClick:()=>{u(W.seq),m({name:W.name,trigger:W.trigger,enabled:W.enabled,sort_no:W.sort_no,condition:{...W.condition,...W.trigger==="field_changed"&&W.condition.changed_field===void 0?{changed_field:ya[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:Ye(xT,{sx:{fontSize:18}})}),Ye(Nf,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:Ye(dr,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:Ye(Hn,{startIcon:Ye(Lf,{}),onClick:()=>{u(0),m(cc()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:Ye(Hn,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),Ye(Y0,{open:a,onClose:j,maxWidth:"sm",title:N?"\uADDC\uCE59 \uC218\uC815":"\uC0C8 \uADDC\uCE59",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-form",tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"rule-form",title:"",showTitle:!1,children:G()}],actions:{showCancelButton:!0,right:Ye(Hn,{variant:"contained",onClick:()=>{U()},disabled:x,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as Q0,useRef as jf,useState as gs}from"react";import{Box as tr,Button as bs,IconButton as xa,Tooltip as va}from"@mui/material";import eg from"@mui/icons-material/Add";import kT from"@mui/icons-material/EditOutlined";import ST from"@mui/icons-material/ContentCopyOutlined";import TT from"@mui/icons-material/DragIndicator";import CT from"@mui/icons-material/Close";import BT from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as IT,PointerSensor as MT,closestCenter as ET,useSensor as RT,useSensors as OT}from"@dnd-kit/core";import{restrictToParentElement as AT,restrictToVerticalAxis as DT}from"@dnd-kit/modifiers";import{SortableContext as PT,arrayMove as tg,useSortable as NT,verticalListSortingStrategy as LT}from"@dnd-kit/sortable";import{CSS as zT}from"@dnd-kit/utilities";import{FormDialog as rg}from"@ehfuse/mui-form-dialog";import{ClearTextField as Ff,LabelSelect as ng,NumberField as og}from"@ehfuse/mui-form-controls";import jT from"@ehfuse/overlay-scrollbar";import{ConfirmDialog as FT,ErrorAlert as ig}from"@ehfuse/alerts";import{Fragment as UT,jsx as at,jsxs as En}from"react/jsx-runtime";var qT=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],sg="\uC5C5\uBB34 \uC81C\uBAA9",qf=2,dc={flex:1,minWidth:0},ag=56,lg=20,$T=`${lg+qf*8}px`;function hc(){return{name:"",description:"",group_seq:0,items:[]}}function HT(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function WT({id:e,children:d}){let{attributes:b,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=NT({id:e});return at(tr,{ref:o,sx:{transform:zT.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...b,...l},dragging:t})})}function KG({open:e,templates:d,customTabs:b,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=gs(!1),[a,h]=gs(0),[f,u]=gs(hc()),[g,m]=gs(!1),[x,k]=gs([]),B=jf(0),[R,L]=gs(0),A=jf(null),D=jf(null);Q0(()=>{if(e)return;let z=window.setTimeout(()=>{i(!1),h(0),u(hc()),k([])},500);return()=>window.clearTimeout(z)},[e]);let N=()=>(B.current+=1,`template-item-${B.current}`),q=(z,$)=>{h(z),u($),k($.items.map(()=>N())),i(!0)},j=f.items.map((z,$)=>x[$]??`template-item-fallback-${$}`),S=()=>{let z=D.current?.getScrollContainer()??null;if(z){z.scrollTop=z.scrollHeight;return}let $=A.current?.querySelectorAll("*")??[];for(let V of Array.from($))if(V.scrollHeight>V.clientHeight+1){V.scrollTop=V.scrollHeight;return}},T=()=>{let z=A.current;if(!z)return null;let $=z.querySelectorAll("input[data-template-title]"),V=$.length?$:z.querySelectorAll(`input[placeholder="${sg}"]`);return V.length?V[V.length-1]:null};Q0(()=>{if(R===0)return;let z=0,$=0,V=()=>{S();let H=T();H&&document.activeElement!==H&&H.focus(),z+=1,!(H&&document.activeElement===H)&&z<8&&($=window.setTimeout(V,50))},E=window.requestAnimationFrame(V);return()=>{window.cancelAnimationFrame(E),window.clearTimeout($)}},[R]);let P=b.filter(z=>!z.archived).map(z=>({value:String(ri(z.key)),label:z.label})),p=(z,$)=>{u(V=>({...V,items:V.items.map((E,H)=>H===z?{...E,...$}:E)}))},y=OT(RT(MT,{activationConstraint:{distance:5}})),v=z=>{let $=String(z.active?.id??""),V=String(z.over?.id??"");if(!$||!V||$===V)return;let E=j.indexOf($),H=j.indexOf(V);E<0||H<0||(u(I=>({...I,items:tg(I.items,E,H)})),k(I=>tg(I,E,H)))},w=async z=>{if(!l)return;let $=await l(f.items[z]?.manager_account_seq??0,"\uCC45\uC784\uC790");$&&p(z,{manager_account_seq:$.accountSeq,manager_name:$.name})},_=async()=>{let z=f.name.trim();if(!z){ig({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}let $=f.items.filter(H=>H.title.trim().length>0);if($.length===0){ig({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let V={...f,name:z,items:$},E=a>0?await r(a,V):await s(V);m(!1),E&&(i(!1),h(0),u(hc()))},C=at(tr,{children:d.length===0?En(tr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[at(BT,{sx:{fontSize:48,color:"#d9d9d6"}}),at(tr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):d.map(z=>En(tr,{sx:{display:"flex",alignItems:"center",gap:2.5,py:1.75,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[En(tr,{sx:{flex:1,minWidth:0},children:[at(tr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:z.name}),En(tr,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",z.items.length,"\uAC74",z.description?` \xB7 ${z.description}`:""]})]}),n?at(bs,{size:"medium",variant:"outlined",onClick:()=>n(z),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,at(va,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:at(xa,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>q(z.seq,{name:z.name,description:z.description??"",group_seq:z.group_seq??0,items:z.items.map($=>({...$}))}),children:at(kT,{sx:{fontSize:19}})})}),at(va,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:at(xa,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>q(0,{name:`${z.name} \uC0AC\uBCF8`,description:z.description??"",group_seq:z.group_seq??0,items:z.items.map($=>({...$}))}),children:at(ST,{sx:{fontSize:18}})})}),at(va,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:at(xa,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await FT({title:"\uD15C\uD50C\uB9BF \uC0AD\uC81C",message:`"${z.name}" \uD15C\uD50C\uB9BF\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&t(z.seq))()},children:at(dr,{sx:{fontSize:18}})})})]},z.seq))}),O=En(tr,{sx:{display:"flex",flexDirection:"column",gap:3},children:[at(Ff,{size:"medium",label:"\uD15C\uD50C\uB9BF \uC774\uB984",placeholder:"\uC608: \uC2E0\uADDC \uC785\uC0AC\uC790 \uC628\uBCF4\uB529",fullWidth:!0,value:f.name,onChange:z=>u($=>({...$,name:z.target.value}))}),En(tr,{sx:{display:"grid",gridTemplateColumns:P.length>0?"1fr 1fr":"1fr",gap:2},children:[at(Ff,{size:"medium",label:"\uC124\uBA85",placeholder:"\uBAA9\uB85D\uC5D0\uC11C \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC544\uBCFC \uD55C \uC904(\uC120\uD0DD)",fullWidth:!0,value:f.description??"",onChange:z=>u($=>({...$,description:z.target.value}))}),P.length>0?at(ng,{size:"medium",fullWidth:!0,label:"\uB9CC\uB4E4 \uACF3(\uD504\uB85C\uC81D\uD2B8)",value:String(f.group_seq??0),options:[{value:"0",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...P],onChange:z=>u($=>({...$,group_seq:Number(z.target.value)||0}))}):null]}),En(tr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[at(tr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),at(tr,{sx:{fontSize:14,color:"#37352f"},children:"\uB0A0\uC9DC\uB294 \uC2E4\uD589\uD560 \uB54C \uACE0\uB974\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB429\uB2C8\uB2E4."})]}),f.items.length===0?at(tr,{sx:{fontSize:14,color:"#9a9a97",py:2},children:'\uC544\uC9C1 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. "\uD56D\uBAA9 \uCD94\uAC00" \uB85C \uC808\uCC28\uB97C \uC21C\uC11C\uB300\uB85C \uC801\uC73C\uC138\uC694.'}):at(tr,{ref:A,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:at(jT,{ref:D,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:at(IT,{sensors:y,collisionDetection:ET,modifiers:[DT,AT],onDragEnd:v,children:at(PT,{items:j,strategy:LT,children:f.items.map((z,$)=>at(WT,{id:j[$],children:({handleProps:V})=>En(tr,{sx:{borderBottom:$===f.items.length-1?"none":"1px solid #f2f2f0",px:qf,py:2,gap:2,display:"flex",flexDirection:"column"},children:[En(tr,{sx:{display:"flex",alignItems:"center",gap:qf},children:[at(tr,{...V,"aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC21C\uC11C \uC774\uB3D9`,sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:"#c9c8c5",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:at(TT,{sx:{fontSize:lg}})}),at(Ff,{size:"medium",fullWidth:!0,placeholder:sg,slotProps:{htmlInput:{"data-template-title":$}},value:z.title,onChange:E=>p($,{title:E.target.value})})]}),En(tr,{sx:{display:"flex",alignItems:"center",gap:2,pl:$T},children:[at(tr,{sx:dc,children:at(og,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.start_offset_days??null,onValueChange:E=>p($,{start_offset_days:E===null?void 0:Math.trunc(Number(E))})})}),at(tr,{sx:dc,children:at(og,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.due_offset_days??null,onValueChange:E=>p($,{due_offset_days:E===null?void 0:Math.trunc(Number(E))})})}),at(tr,{sx:dc,children:at(ng,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:z.priority??"medium",options:qT,onChange:E=>p($,{priority:E.target.value})})}),l?En(tr,{sx:{...dc,position:"relative"},children:[at(bs,{variant:"outlined",fullWidth:!0,onClick:()=>{w($)},sx:{height:ag,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${ag-2}px`,py:0,px:1.75,pr:z.manager_account_seq?4.5:1.75,borderColor:"#c4c4c4",color:z.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&:hover":{borderColor:"#37352f",bgcolor:"transparent"}},children:z.manager_name||"\uCC45\uC784\uC790"}),z.manager_account_seq?at(va,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:at(xa,{size:"small","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:E=>{E.stopPropagation(),p($,{manager_account_seq:0,manager_name:""})},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:at(CT,{sx:{fontSize:18}})})}):null]}):null,at(va,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:at(xa,{size:"medium","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(E=>({...E,items:E.items.filter((H,I)=>I!==$)})),k(E=>E.filter((H,I)=>I!==$))},children:at(dr,{sx:{fontSize:18}})})})]})]})},j[$]))})})})})]});return En(UT,{children:[at(rg,{open:e,onClose:o,maxWidth:"md",title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template",tabs:{visible:!1},actions:{showCancelButton:!1,left:at(bs,{startIcon:at(eg,{sx:{fontSize:18}}),onClick:()=>q(0,hc()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:at(bs,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),at(rg,{open:c,onClose:()=>i(!1),maxWidth:"md",title:a>0?"\uD15C\uD50C\uB9BF \uC218\uC815":"\uC0C8 \uD15C\uD50C\uB9BF",locale:"ko",backdropClick:!1,fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template-form",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,left:at(bs,{startIcon:at(eg,{sx:{fontSize:18}}),onClick:()=>{u(z=>({...z,items:[...z.items,HT()]})),k(z=>[...z,N()]),L(z=>z+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:at(bs,{variant:"contained",disabled:g,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:O}]})]})}import{useEffect as cg,useState as ug}from"react";import{Box as jr,Button as VT}from"@mui/material";import{FormDialog as KT}from"@ehfuse/mui-form-dialog";import{DateTextField as GT}from"@ehfuse/mui-form-controls";import YT from"@ehfuse/overlay-scrollbar";import{jsx as Zr,jsxs as wa}from"react/jsx-runtime";function nY({open:e,template:d,todayStr:b,running:l=!1,onClose:o,onRun:s}){let[r,t]=ug(b),[n,c]=ug(d);cg(()=>{d&&c(d)},[d]),cg(()=>{e&&t(b)},[e]);let i=d??n,a=i?op(i,r):[];return Zr(KT,{open:e,onClose:o,maxWidth:"md",title:i?`${i.name} \uC2E4\uD589`:"\uD15C\uD50C\uB9BF \uC2E4\uD589",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-template-run",tabs:{visible:!1},sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:Zr(VT,{variant:"contained",disabled:l||a.length===0,onClick:()=>s(a,r),children:l?"\uB9CC\uB4DC\uB294 \uC911\u2026":`\uC5C5\uBB34 ${a.length}\uAC74 \uB9CC\uB4E4\uAE30`})},sections:[{id:"template-run",title:"",showTitle:!1,children:wa(jr,{sx:{display:"flex",flexDirection:"column",gap:2},children:[wa(jr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Zr(jr,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),Zr(GT,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),Zr(jr,{sx:{fontSize:14.5,color:"#37352f"},children:"\uC544\uB798 \uC5C5\uBB34\uAC00 \uD55C\uAEBC\uBC88\uC5D0 \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4. \uB0A0\uC9DC\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB41C \uAC12\uC785\uB2C8\uB2E4."}),wa(jr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[wa(jr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[Zr(jr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Zr(jr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),Zr(jr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),Zr(jr,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),Zr(YT,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?Zr(jr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,f)=>wa(jr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.25,borderBottom:f===a.length-1?"none":"1px solid #f2f2f0",fontSize:16,fontWeight:500,color:"#111111"},children:[Zr(jr,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Zr(jr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:Fc(h.start_date)||"-"}),Zr(jr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:Fc(h.due_date)||"-"}),Zr(jr,{sx:{width:96,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.manager_name||"-"})]},f))})]})]})}]})}var XT={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function ZT(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function $f(e){let d=String(e??"").trim().slice(0,10);return/^\d{4}-\d{2}-\d{2}$/.test(d)?`${d.slice(2,4)}.${d.slice(5,7)}.${d.slice(8,10)}`:"-"}function ys(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function Hf(e,d){let l=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),o=$f(e.due_date),s=String(e.start_date??"").slice(11,16).trim(),r=$f(e.start_date),t=(e.receiver_names??[]).filter(Boolean).map(c=>String(c).trim()),n=(e.checklist??[]).length?`${(e.checklist??[]).filter(c=>c.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:ur(e).name,projectLabel:e.tab_key?d.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:ZT(t),receiverNamesFull:t.join(", "),startDate:r!=="-"&&s?`${r} ${s}`:r,dueDate:o!=="-"&&l?`${o} ${l}`:o,priorityName:XT[String(e.priority??"")]??"",checklist:n,note:String(e.note??"").trim(),completed:!!e.completed}}function Lt(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function JT(e,d){if(e===" ")return d*.3;let b=e.codePointAt(0)??0,l=b>=4352&&b<=4607||b>=12288&&b<=40959||b>=44032&&b<=55203||b>=63744&&b<=64255||b>=65280&&b<=65519;return d*(l?1:.55)}function pc(e,d){let b=0;for(let l of String(e??""))b+=JT(l,d);return b}function xs(e,d){let b=String(e??"").trim();if(!b)return["-"];let l=[],o="";for(let s of b){if(s===`
|
|
44
|
+
`)}function Xp(e){navigator.clipboard.writeText(e).then(()=>F4("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>j4("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function os(e,d){let b=q4(e);if(d&&typeof navigator.share=="function"){navigator.share({text:b}).catch(l=>{l?.name!=="AbortError"&&Xp(b)});return}Xp(b)}import{Fragment as Y4,jsx as Rt,jsxs as Zp}from"react/jsx-runtime";function Jp({task:e,myAccountSeq:d=0,onToggleCompleted:b,onChangeTitle:l,onChangeIcon:o,onChangeIconColor:s,onClose:r,appBarMode:t=!1,activityItems:n,activityLoading:c,onLoadActivity:i,onPrint:a,onDelete:h,canDelete:f}){let u=zt(),[g,m]=ta(!1),[x,k]=ta(null),[B,R]=ta(null),[L,A]=ta(null),[D,N]=ta(null),q=!!e.is_notice,j=!!e.is_event,S=q?Tt(e.icon||sr):j?Tt(e.icon||cr):null,T=q&&d>0&&(e.author_account_seq??0)===d,{onReturnTask:P}=yt(),p=!!P&&en(e,d),y=!yo(e,d),v=!!h&&(f??(d>0&&(e.author_account_seq??0)===d)),w=!j&&(q?T:(e.author_account_seq??0)===d||(e.manager_account_seq??0)===d);return Zp(Y4,{children:[Zp(is,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?Rt(ss,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:Rt(W4,{})}):null,w&&!t?Rt(as,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${fn(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Rt(is,{sx:{display:"flex",flexShrink:0,mr:1},children:Rt(Vn,{onClick:_=>N({anchorEl:_.currentTarget,nextCompleted:!e.completed}),children:e.completed?p?"\uB418\uB3CC\uB9AC\uAE30":"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"})})}):null,t||!S?null:j&&!y?Rt(as,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Rt($4,{onClick:_=>R(_.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Rt(S,{sx:{fontSize:20}})})}):Rt(is,{sx:{display:"flex",px:.5,color:e.icon_color||(q?"#e5484d":"#1e3a8a")},children:Rt(S,{sx:{fontSize:20}})}),x!==null?Rt(is,{component:"input",autoFocus:!0,spellCheck:!1,value:x,onChange:_=>k(_.target.value),onBlur:()=>{x.trim()&&x.trim()!==e.title&&l(e.seq,x.trim()),k(null)},onKeyDown:_=>{_.key==="Enter"&&_.target.blur(),_.key==="Escape"&&k(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):t?Rt(is,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q?"\uACF5\uC9C0":j?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Rt(is,{onClick:y?void 0:()=>k(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:y?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),i?Rt(as,{title:"\uD65C\uB3D9",arrow:!0,children:Rt(ss,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:Rt(K4,{sx:{fontSize:20}})})}):null,Rt(as,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Rt(ss,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>os(e,u),sx:{color:"#6b7280"},children:u?Rt(U4,{sx:{fontSize:20}}):Rt(V4,{sx:{fontSize:20}})})}),a?Rt(as,{title:"\uC778\uC1C4",arrow:!0,children:Rt(ss,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:Rt(G4,{sx:{fontSize:20}})})}):null,v?Rt(as,{title:"\uC0AD\uC81C",arrow:!0,children:Rt(ss,{"aria-label":"\uC0AD\uC81C",onClick:_=>A(_.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:Rt(dr,{sx:{fontSize:20}})})}):null,r&&!t?Rt(ss,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:Rt(H4,{})}):null]}),Rt(tn,{open:!!D,anchorEl:D?.anchorEl??null,nextCompleted:D?.nextCompleted??!1,returnMode:p,onCancel:()=>N(null),onConfirm:_=>{D&&(_&&P?P(e,_):b(e.seq,D.nextCompleted)),N(null)}}),Rt(Ko,{anchorEl:B,value:e.icon??"",color:e.icon_color??"",onSelect:_=>{o(e.seq,_),R(null)},onSelectColor:s?_=>s(e.seq,_):void 0,onClose:()=>R(null)}),Rt(jt,{open:!!L,anchorEl:L,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>A(null),onConfirm:()=>{A(null),h?.(e)}}),Rt(Ul,{open:g,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}import{useRef as ik,useState as Cn}from"react";import{Box as Qt,Button as ls,ButtonBase as om,Checkbox as sk,Divider as Si,Menu as ef,MenuItem as tf}from"@mui/material";import ak from"@mui/icons-material/ExpandLess";import lk from"@mui/icons-material/ExpandMore";import ck from"@mui/icons-material/ConfirmationNumberOutlined";import im from"@mui/icons-material/Check";import uk from"@mui/icons-material/DirectionsRunOutlined";import fk from"@mui/icons-material/SpeedOutlined";import rf from"@mui/icons-material/CheckCircle";import dk from"@mui/icons-material/CheckCircleOutlineOutlined";import nf from"@mui/icons-material/CheckCircleOutlined";import sm from"@mui/icons-material/AccessTimeOutlined";import hk from"@mui/icons-material/AutorenewOutlined";import pk from"@mui/icons-material/LabelOutlined";import mk from"@mui/icons-material/PersonOutlineOutlined";import gk from"@mui/icons-material/SubjectOutlined";import bk from"@mui/icons-material/StickyNote2Outlined";import yk from"@mui/icons-material/PanToolAltOutlined";import am from"@mui/icons-material/LockOutlined";import lm from"@mui/icons-material/PublicOutlined";import cm from"@mui/icons-material/Group";import xk from"@mui/icons-material/Repeat";import vk from"@mui/icons-material/EventOutlined";import{ConfirmDialog as um,InfoAlert as wk}from"@ehfuse/alerts";import{DatePicker as _k}from"@ehfuse/mui-datetime-picker";import{useState as X4}from"react";import{TextField as Z4}from"@ehfuse/mui-form-controls";import{jsx as J4}from"react/jsx-runtime";function Qp({value:e,onCommit:d,onDraftChange:b,readOnly:l=!1}){let[o,s]=X4(null);return J4(Z4,{value:o??e,placeholder:l?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:l}},onChange:r=>{s(r.target.value),b?.(r.target.value)},onBlur:()=>{o!==null&&o.trim()!==e&&d(o),s(null)},onKeyDown:r=>{r.key==="Enter"&&r.target.blur(),r.key==="Escape"&&s(null)},sx:{mt:1}})}import{useMemo as Ju,useState as Qu}from"react";import{Box as Nr,Button as rm,IconButton as Q4}from"@mui/material";import ek from"@mui/icons-material/AccountTreeOutlined";import tk from"@mui/icons-material/LinkOutlined";import rk from"@mui/icons-material/Close";import nk from"@mui/icons-material/RedoOutlined";function ki(e){return e.relations??[]}function GF(e,d,b){return ki(e).some(l=>l.type===b&&l.task_seq===d.seq)||ki(d).some(l=>l.type===b&&l.task_seq===e.seq)}function em(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Xu(e,d){let b=new Map(d.map(u=>[u.seq,u]));b.set(e.seq,e);let l=new Map,o=(u,g)=>{l.has(u)||l.set(u,new Set),l.has(g)||l.set(g,new Set),l.get(u).add(g),l.get(g).add(u)};for(let u of b.values())for(let g of ki(u))g.type==="follow_up"&&b.has(g.task_seq)&&o(u.seq,g.task_seq);let s=new Set([e.seq]),r=[e.seq];for(;r.length>0;){let u=r.shift();for(let g of l.get(u)??[])s.has(g)||(s.add(g),r.push(g))}let t=[...s].map(u=>b.get(u)).filter(u=>!!u).sort((u,g)=>em(u).localeCompare(em(g))),n=new Set;for(let u of ki(e))u.type==="related"&&n.add(u.task_seq);for(let u of b.values())u.seq!==e.seq&&ki(u).some(g=>g.type==="related"&&g.task_seq===e.seq)&&n.add(u.seq);let c=[...n].map(u=>b.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),i=[...b.values()].filter(u=>u.seq!==e.seq&&ki(u).some(g=>g.type==="duplicate_of"&&g.task_seq===e.seq)),a=ki(e).find(u=>u.type==="duplicate_of")?.task_seq,h=a?b.get(a)??null:null,f=[...b.values()].filter(u=>u.seq!==e.seq&&(u.checklist??[]).some(g=>Number(g.task_seq??0)===e.seq));return{lineage:t,related:c,duplicates:i,duplicateOf:h,parents:f}}function Zu(e,d){let b=Xu(e,d);return(b.lineage.length>=2?b.lineage.length-1:0)+b.related.length+b.duplicates.length+(b.duplicateOf?1:0)+b.parents.length}function tm(e,d){return Zu(e,d)>0}import{Fragment as ok,jsx as Gt,jsxs as Fn}from"react/jsx-runtime";function Vl({item:e,caption:d,onOpen:b,onUnlink:l}){let o=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?sr:cr)):null;return Fn(Nr,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[d?Gt(Nr,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:d}):null,o?Gt(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Fn(Nr,{component:"span",onClick:b,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...b?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),Gt(Pt,{option:ur(e),small:!0}),l?Gt(Q4,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:l,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Gt(rk,{sx:{fontSize:15}})}):null]})}function nm({task:e,tasks:d,readOnly:b=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=Qu(!1),[c,i]=Qu(null),[a,h]=Qu(null),f=Ju(()=>Xu(e,d),[e,d]),u=f.lineage.length>=2,g=Ju(()=>Zu(e,d),[e,d]),m=Ju(()=>{let k=new Set;for(let B of f.lineage)k.add(B.seq);for(let B of f.related)k.add(B.seq);for(let B of f.duplicates)k.add(B.seq);for(let B of f.parents)k.add(B.seq);return f.duplicateOf&&k.add(f.duplicateOf.seq),[...k]},[f]),x=(k,B,R)=>{h({anchorEl:k,targetSeq:B,type:R})};return Fn(Tn,{icon:Gt(ek,{sx:{fontSize:19,display:"block"}}),title:Fn(ok,{children:["\uAD00\uB828 \uC5C5\uBB34",g>0?Gt(Nr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:g}):null]}),titleExtra:b?null:Fn(Nr,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?Gt(rm,{size:"small",color:"inherit",startIcon:Gt(nk,{sx:{fontSize:16}}),onClick:k=>i(k.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,o?Gt(rm,{size:"small",color:"inherit",startIcon:Gt(tk,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Fn(Nr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?Gt(Nr,{sx:{mb:f.related.length||f.duplicates.length||f.duplicateOf?1:0},children:f.lineage.map((k,B)=>{let R=k.seq===e.seq,L=B===f.lineage.length-1;return Fn(Nr,{sx:{display:"flex",gap:1},children:[Fn(Nr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Gt(Nr,{sx:{width:R?9:7,height:R?9:7,borderRadius:"50%",bgcolor:R?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),L?null:Gt(Nr,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Fn(Nr,{sx:{flex:1,minWidth:0,pb:L?0:.5},children:[Fn(Nr,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Fn(Nr,{component:"span",onClick:!R&&l?()=>l(k.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:R?600:400,color:R?"#2f80ed":k.completed?"#9a9a97":"#37352f",textDecoration:k.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!R&&l?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[k.ticket_no?`${k.ticket_no} `:"",k.title]}),Gt(Pt,{option:ur(k),small:!0})]}),Gt(Nr,{sx:{fontSize:12,color:"#9a9a97"},children:k.completed&&k.completed_time?`${k.completed_time} \uC644\uB8CC`:k.created_time??""})]})]},k.seq)})}):null,f.parents.map(k=>Gt(Vl,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),f.duplicateOf?Gt(Vl,{item:f.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:l?()=>l(f.duplicateOf.seq):void 0,onUnlink:!b&&s?k=>x(k.currentTarget,f.duplicateOf.seq,"duplicate_of"):void 0}):null,f.duplicates.map(k=>Gt(Vl,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!b&&s?B=>x(B.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),f.related.map(k=>Gt(Vl,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!b&&s?B=>x(B.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),g===0?Gt(Nr,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?Gt(Ol,{open:t,task:e,tasks:d,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,B)=>o(e.seq,k,B)}):null,Gt(jt,{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:()=>i(null),onConfirm:()=>{r?.(e.seq),i(null)}}),Gt(jt,{open:!!a,anchorEl:a?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>h(null),onConfirm:()=>{a&&s?.(e.seq,a.targetSeq,a.type),h(null)}})]})}import{Fragment as Wr,jsx as we,jsxs as Yt}from"react/jsx-runtime";function ti({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return we(Qt,{component:"span",sx:{color:"#9a9a97"},children:e})}function fm({task:e,customTabs:d,statusOptions:b,avatarSrcByName:l,onChangeStatus:o,onChangeLabels:s,onAddLabelOption:r,onChangeProject:t,onAddProject:n,onChangeDate:c,onChangeReminder:i,onMemberEdit:a,onChangePriority:h,onChangeVisibility:f,onChangeRepeat:u,departments:g=[],onChangeEventTime:m,onChangeEventPlace:x,onChangeEventAddress:k,onChangeNote:B,onChangeNoteDraft:R,onChangeContent:L,contentTemplates:A,onSaveContentTemplate:D,onRemoveContentTemplate:N,contentLoading:q=!1,onChangeContentHeight:j,onAddChecklistItem:S,onToggleChecklistItem:T,onRemoveChecklistItem:P,onUpdateChecklistItem:p,onReorderChecklist:y,onConvertChecklistToTask:v,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:C,relatedTasksPool:O,onOpenRelatedTask:z,onLinkRelatedTask:$,onUnlinkRelatedTask:V,onCreateFollowUpTask:E,onAddAttachments:H,onRemoveAttachment:I,onPreview:M,onDownload:F,onUpdateComment:U,onRemoveComment:Y,onToggleCommentReaction:G,currentUserName:W="",myAccountSeq:X=0,noticeAdmin:Z=!1,hideProject:K=!1,hideLabel:ee=!1,showTitle:J=!1,onChangeTitle:re,onToggleCompleted:ie,onChangeIcon:ae,onChangeIconColor:oe,employees:he=[],onAckConfirm:pe,onRequestConfirm:_e,onChangeBugField:De,sprints:Ce=[],sprintProject:Ee=!1,hideSprint:ot=!1,onChangeSprint:ye,onChangeStoryPoints:te,onChangeResolution:Se,onClaimTask:ge,onVerifyBug:ve}){let[Ge,Le]=Cn(null),He=ik(!1),[yr,We]=Cn(null),[Ue,_t]=Cn(null),[et,Re]=Cn(null),[be,me]=Cn(!1),Be={[Ln]:be?{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"}},[Je,Fe]=Cn(null),[Oe,Mt]=Cn(null),[Ve,ne]=Cn(null),[ce,ue]=Cn(null),[ke,ct]=Cn(null),[Me,Pe]=Cn(null),[Xe,Ke]=Cn(null),Ie=!!e.is_notice,Qe=!!e.is_event,it=!!e.is_bug,dt=!!ge&&Ya(e,X),{onReturnTask:nt}=yt(),At=!!ge&&Xa(e,X),Ot=!!ve&&it&&!!e.completed&&X>0&&(e.author_account_seq??0)===X&&!(e.acks??[]).some(se=>se.account_seq===X),Bt=!yo(e,X),$t=!e.is_event&&(e.is_notice?X>0&&(e.author_account_seq??0)===X:(e.author_account_seq??0)===X||(e.manager_account_seq??0)===X),Vt=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?sr:cr)):null,Q=Ie?!Ga(e,X):Bt,le=dt||At?Yt(Vn,{onClick:se=>Ke(se.currentTarget),children:[we(yk,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,xe=Ie?Fl(e,he):"",fe=Ie?Rp(e,he,X):null,Te=Ie?null:Hi(e,X),qe=!!(Te&&Te.total>0||Ie&&fe),Ae=(e.origin_license_seq??0)>0,ut=!Ie&&!Ae,rt=Yt(Wr,{children:[we(mt,{icon:we(mk,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[oo(9),Be??null,...Qe?[]:[nr(1)]],children:e.created_by?Yt(Wr,{children:[we($r,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):we(ti,{})}),we(mt,{icon:we(sm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[oo(11),Be??null,...Qe?[]:[nr(2)]],children:e.created_time?fn(e.created_time):we(ti,{})})]});return Yt(Wr,{children:[J?Yt(Qt,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[$t?we(sk,{checked:e.completed,icon:we(dk,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:we(rf,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(se,ze)=>{Ue||_t({anchorEl:se.currentTarget,nextCompleted:ze})},sx:{p:0,mt:.25}}):null,Vt?Qe&&!Bt?we(om,{onClick:se=>We(se.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:we(Vt,{sx:{fontSize:20}})}):we(Qt,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Ie?"#e5484d":"#1e3a8a")},children:we(Vt,{sx:{fontSize:20}})}):null,we(Qt,{sx:{flex:1,minWidth:0},children:Ge!==null?we(Qt,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:se=>{if(!se||se.dataset.focused)return;se.dataset.focused="1",se.focus();let ze=document.createRange();ze.selectNodeContents(se),ze.collapse(!1);let vt=window.getSelection();vt?.removeAllRanges(),vt?.addRange(ze)},onBlur:se=>{let ze=(se.currentTarget.textContent??"").replace(/\n/g," ").trim();!He.current&&ze&&ze!==e.title&&re(e.seq,ze),He.current=!1,Le(null)},onKeyDown:se=>{se.key==="Enter"&&(se.preventDefault(),se.target.blur()),se.key==="Escape"&&(He.current=!0,se.target.blur())},onPaste:se=>{se.preventDefault();let ze=se.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,ze)},sx:{outline:"none",fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:Ge}):we(Qt,{onClick:()=>Le(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),we(tn,{open:!!Ue,anchorEl:Ue?.anchorEl??null,nextCompleted:Ue?.nextCompleted??!1,returnMode:!!nt&&en(e,X),onCancel:()=>_t(null),onConfirm:se=>{Ue&&(se&&nt?nt(e,se):ie(e.seq,Ue.nextCompleted)),_t(null)}})]}):null,Yt(Qt,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Ln]:{pb:0,"& > :last-child":{mb:0}}},children:[we(Cl,{hideProject:K,pinColumns:!0,projectColumn:!Qe&&!ee?2:"full",values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminders:Gn(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:d,avatarSrcByName:Za(e,l),hideDueDate:!Qe&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Ie,event:Qe,readOnly:Bt,targetSummary:xe,onChangeProject:se=>t(e.seq,se),onAddProject:n,onChangeStartDate:se=>c(e.seq,"start_date",se),onChangeDueDate:se=>c(e.seq,"due_date",se),onChangeReminder:se=>i(e.seq,se),onChangePriority:se=>h(e.seq,se),onChangeEventTime:se=>m?.(e.seq,se),onChangeEventPlace:se=>x?.(e.seq,se),onChangeEventAddress:se=>k?.(e.seq,se),onMemberEdit:se=>a(e,se,null),narrowCollapsedSx:Be,reminderLocked:e.completed,managerAction:le,supportOrigin:(e.origin_license_seq??0)>0?{licenseName:e.origin_license_name??"",authorName:e.origin_author_name||e.author_name||e.created_by||"",contactPhone:e.origin_contact_phone??"",contactEmail:e.origin_contact_email??"",supportType:rl(e.support_type??"")}:void 0,leading:Yt(Wr,{children:[Ot||le&&(Ie||Qe)?Yt(Qt,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ie||Qe?le:null,Ot?Yt(Wr,{children:[we(ls,{variant:"contained",size:"large",onClick:()=>ve?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),we(ls,{variant:"outlined",size:"large",color:"error",onClick:()=>ve?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,it&&e.ticket_no?we(mt,{icon:we(ck,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:nr(1),children:we(Qt,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Qe?null:we(Qt,{sx:it&&e.ticket_no||ut||qe?nr(it&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:we(mt,{icon:we(hk,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Bt||e.completed?void 0:se=>Fe(se),children:we(Pt,{option:ur(e)})})}),ut?(()=>{let se=On(e),ze=se==="all"?we(lm,{sx:{fontSize:17,color:"#2f80ed"}}):se==="group"?we(cm,{sx:{fontSize:17,color:"#d9730d"}}):we(am,{sx:{fontSize:17}}),vt=se==="all"?"\uC804\uCCB4\uACF5\uAC1C":se==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${g.find(It=>It.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return we(Qt,{sx:Qe?void 0:nr(it?1:2),children:we(mt,{icon:ze,label:"\uACF5\uAC1C",onClick:Bt||!f?void 0:It=>Mt(It),children:vt})})})():null,!Ie&&!it&&!Ae?we(Qt,{sx:Qe?void 0:nr(1),children:we(mt,{icon:we(xk,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:Bt||!u?void 0:se=>ne(se),children:e.repeat_rule?wl(e.repeat_rule):we(ti,{label:"\uC5C6\uC74C"})})}):null,!Ie&&!it&&e.repeat_rule?we(Qt,{sx:Qe?void 0:nr(2),children:we(mt,{icon:we(vk,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:Bt||!u?void 0:se=>ue(se),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:we(ti,{})})}):null,Te&&Te.total>0?we(Qt,{sx:Qe?void 0:nr(2),children:we(mt,{icon:we(nf,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Te.canConfirm?we(ls,{size:"small",variant:"contained",onClick:()=>pe?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Yt(ls,{size:"small",variant:"outlined",color:"inherit",startIcon:Te.myTime?we(rf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:se=>Re({anchorEl:se.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Te.count," / ",Te.total]})})}):null,Ie&&fe?we(Qt,{sx:nr(2),children:we(mt,{icon:we(nf,{sx:{fontSize:17}}),label:"\uD655\uC778",children:we(Qt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:fe.canAck?we(ls,{size:"small",variant:"contained",onClick:()=>pe?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):we(ls,{size:"small",variant:"outlined",color:"inherit",startIcon:fe.acked?we(rf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:se=>Re({anchorEl:se.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":Yt(Wr,{children:[fe.count,we(Qt,{component:"span",sx:{mx:.4},children:"/"}),fe.total]})})})})}):null,Ee&&!ot&&!Qe&&!Ie?Yt(Wr,{children:[we(mt,{icon:we(uk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Bt?void 0:se=>ct(se),sx:nr(1),children:(e.sprint_seq??0)>0?Ce.find(se=>se.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":we(ti,{label:"\uBBF8\uBC30\uC815"})}),we(mt,{icon:we(fk,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:nr(2),children:we(Eo,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Bt,onCommit:se=>te?.(e.seq,Number(se.replace(/[^0-9.]/g,""))||0)})})]}):null,Qe||ee?null:we(Qt,{sx:[K?{gridColumn:"1 / -1"}:nr(1),Be??null],children:we(mt,{icon:we(pk,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Bt?void 0:se=>Pe(se),children:(e.label_keys??[]).length>0?we(Wo,{labelKeys:e.label_keys??[],labelOptions:b}):we(ti,{})})})]}),afterProject:Qe?null:rt,trailing:Yt(Wr,{children:[it?we(Bl,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Bt,showResolution:!!e.completed,onChangeRepro:se=>De?.(e.seq,"bug_repro",se),onChangeDevice:se=>De?.(e.seq,"bug_device",se),onChangeWhere:se=>De?.(e.seq,"bug_where",se),onChangeVersion:se=>De?.(e.seq,"bug_version",se),onChangeResolution:se=>Se?.(e.seq,se)}):null,Qe?rt:null,e.completed?Yt(Wr,{children:[we(mt,{icon:we(nf,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[oo(10),Be??null,...Qe?[]:[nr(1)]],children:e.completed_by?Yt(Wr,{children:[we($r,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):we(ti,{})}),we(mt,{icon:we(sm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[oo(12),Be??null,...Qe?[]:[nr(2)]],children:e.completed_time?fn(e.completed_time):we(ti,{})})]}):null]})}),Yt(Qt,{sx:{display:"none",[Ln]:{display:"block",mt:1.5,mb:0}},children:[we(Si,{sx:{borderColor:"#e6e6e3"}}),we(om,{onClick:()=>me(se=>!se),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:be?Yt(Wr,{children:["\uC811\uAE30 ",we(ak,{sx:{fontSize:18}})]}):Yt(Wr,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",we(lk,{sx:{fontSize:18}})]})})]}),Yt(Qt,{children:[we(Si,{sx:{my:1.5,borderColor:"#e6e6e3",[Ln]:{mt:0,mb:1.25}}}),we(Tn,{icon:we(gk,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:A&&!Bt?we(Ml,{content:e.content??"",templates:A,onApply:se=>L?.(e.seq,se),onSave:D,onRemove:N}):void 0,children:we(Qt,{sx:{userSelect:"text"},children:q?we(Qt,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:we(sl,{})}):we(El,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:j?se=>j(e.seq,se):void 0,readOnly:Bt,onChange:se=>L(e.seq,se)})})}),e.is_bug?null:Yt(Wr,{children:[we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(Tn,{icon:we(bk,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:we(Qt,{sx:{userSelect:"text"},children:we(Qp,{value:e.note,readOnly:Q,onCommit:se=>B(e.seq,se),onDraftChange:R?se=>R(e.seq,se):void 0})})})]}),Qe?null:Yt(Wr,{children:[we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(Al,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Q,onAdd:S,onToggle:T,onRemove:P,onUpdate:p,onReorder:y,onConvertToTask:v,onOpenLinkedTask:w,resolveLinkedTask:C,myAccountSeq:X,linkCandidates:O,linkBaseTask:e,onLinkExistingTask:_})]}),O&&!Qe&&!Ie&&tm(e,O)?Yt(Wr,{children:[we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(nm,{task:e,tasks:O,readOnly:Bt,onOpenTask:z,onLink:$,onUnlink:V,onCreateFollowUp:E})]}):null,we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(Ll,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Q,onAdd:H,onRemove:I,onPreview:M?se=>M({...se,taskSeq:e.seq}):void 0,onDownload:F?se=>F({...se,taskSeq:e.seq}):void 0})]}),we(Si,{sx:{my:1.5,borderColor:"#e6e6e3"}}),we(Vp,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:X,avatarSrcByName:l,onUpdate:U,onRemove:Y,onToggleReaction:G,onPreview:M?se=>M({...se,taskSeq:e.seq}):void 0,onDownload:F?se=>F({...se,taskSeq:e.seq}):void 0})]}),we(Ni,{anchorEl:Je,value:e.status,options:Ie?Es:it?ui:Rs,onSelect:se=>o(e.seq,se),onClose:()=>Fe(null)}),we(ef,{transitionDuration:0,anchorEl:Ve,open:!!Ve,onClose:()=>ne(null),children:[{value:"",label:"\uC5C6\uC74C"},...Vs].map(se=>we(tf,{selected:(e.repeat_rule??"")===se.value,onClick:()=>{ne(null),(async()=>{let ze=e.repeat_rule??"";if(se.value===ze)return;if(se.value===""){await um({title:"\uBC18\uBCF5 \uD574\uC81C",message:"\uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uACE0 \uBC18\uBCF5\uC744 \uD574\uC81C\uD560\uAE4C\uC694? (\uC9C0\uB09C \uD68C\uCC28\uB294 \uB0A8\uC2B5\uB2C8\uB2E4)"})&&u?.(e.seq,"","");return}let vt=String(e.due_date??"").slice(0,10);if(!vt){wk(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uC608\uC815\uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}ze&&!await um({title:"\uBC18\uBCF5 \uBCC0\uACBD",message:"\uC774\uD6C4 \uD68C\uCC28\uB97C \uC0C8 \uADDC\uCE59\uC73C\uB85C \uB2E4\uC2DC \uC0DD\uC131\uD560\uAE4C\uC694? \uC774\uD6C4 \uD68C\uCC28\uC758 \uB313\uAE00\xB7\uCCA8\uBD80\uB294 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."})||u?.(e.seq,se.value,_l(vt,se.value))})()},sx:{fontSize:14,minWidth:140},children:se.label},se.value||"none"))}),we(_k,{anchorEl:ce,open:!!ce,onClose:()=>ue(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:se=>{ue(null);let ze=kt=>String(kt).padStart(2,"0"),vt=`${se.getFullYear()}-${ze(se.getMonth()+1)}-${ze(se.getDate())}`,It=e.repeat_rule??"";It&&u?.(e.seq,It,vt)}}),we(ef,{transitionDuration:0,anchorEl:Oe,open:!!Oe,onClose:()=>Mt(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:we(am,{sx:{fontSize:17,color:"#57564f"}}),selected:On(e)==="involved",onPick:()=>f?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:we(lm,{sx:{fontSize:17,color:"#2f80ed"}}),selected:On(e)==="all",onPick:()=>f?.(e.seq,"all",0)},...g.map(se=>({key:`group-${se.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${se.name}`,icon:we(cm,{sx:{fontSize:17,color:"#d9730d"}}),selected:On(e)==="group"&&(e.visibility_group_seq??0)===se.seq,onPick:()=>f?.(e.seq,"group",se.seq)}))].map(se=>Yt(tf,{selected:se.selected,onClick:()=>{se.onPick(),Mt(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.icon,se.label,se.selected?we(im,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},se.key))}),we(ef,{transitionDuration:0,anchorEl:ke,open:!!ke,onClose:()=>ct(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ce.filter(se=>`custom-${se.group_seq}`===String(e.tab_key??"")).map(se=>({seq:se.seq,label:kn(se)}))].map(se=>Yt(tf,{onClick:()=>{ye?.(e.seq,se.seq),ct(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.label,(e.sprint_seq??0)===se.seq?we(im,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},se.seq))}),we(ll,{anchorEl:et?.anchorEl??null,open:!!et?.open,acks:e.acks??[],total:fe?.total??Te?.total??0,pendingNames:fe?.pendingNames??Te?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:_e&&(fe?fe.count<fe.total:Te&&Te.count<Te.total)?()=>{_e(e.seq),Re(se=>se?{...se,open:!1}:null)}:void 0,onClose:()=>Re(se=>se?{...se,open:!1}:null)}),we(jl,{anchorEl:Me,selectedKeys:e.label_keys??[],labelOptions:b,onToggle:se=>s(e.seq,Ha(e.label_keys??[],se)),onAddLabel:r,onClose:()=>Pe(null)}),we(Ko,{anchorEl:yr,value:e.icon??"",color:e.icon_color??"",onSelect:se=>{ae(e.seq,se),We(null)},onSelectColor:oe?se=>oe(e.seq,se):void 0,onClose:()=>We(null)}),we(jt,{open:!!Xe,anchorEl:Xe,title:dt?"\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:()=>Ke(null),onConfirm:()=>{ge?.(e.seq),Ke(null)}})]})}import{Fragment as Ak,jsx as Ut,jsxs as cs}from"react/jsx-runtime";function L$(){let e=new Date,d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function z$({open:e,task:d,onClose:b,onAddComment:l,onSaveFields:o,presentation:s="auto",myAccountSeq:r=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:g,canDelete:m,...x}){let k=zt(),B=hm(null);d&&(B.current=d);let R=d??B.current,[L,A]=Kl(!1),[D,N]=Kl(null),[q,j]=Kl(null),S=!!g&&(m??(r>0&&(R?.author_account_seq??0)===r)),[T,P]=Kl({}),p=Object.keys(T).length>0;dm(()=>{P({})},[d?.seq,e]);let y=hm(null);if(dm(()=>{y.current?.scrollTo({top:0})},[d?.seq]),!R)return null;let v=k&&p?{...R,...T}:R,w=v.checklist??[],_=(E,H)=>{k?P(I=>({...I,...E})):H()},C=()=>{let E=T;P({});let H=R.seq,I=E.title===void 0?void 0:String(E.title).trim();if(o){let M={...E};I!==void 0&&(I?M.title=I:delete M.title),Object.keys(M).length>0&&o(H,M),mm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}I&&n(H,I),E.icon!==void 0&&c(H,String(E.icon)),E.icon_color!==void 0&&i?.(H,String(E.icon_color)),E.status!==void 0&&x.onChangeStatus(H,E.status),E.label_keys!==void 0&&x.onChangeLabels(H,E.label_keys??[]),E.tab_key!==void 0&&x.onChangeProject(H,String(E.tab_key??"")),E.start_date!==void 0&&x.onChangeDate(H,"start_date",String(E.start_date??"")),E.due_date!==void 0&&x.onChangeDate(H,"due_date",String(E.due_date??"")),E.reminders!==void 0&&x.onChangeReminder(H,E.reminders),E.priority!==void 0&&x.onChangePriority(H,E.priority),E.event_time!==void 0&&x.onChangeEventTime?.(H,String(E.event_time??"")),E.event_place!==void 0&&x.onChangeEventPlace?.(H,String(E.event_place??"")),E.event_address!==void 0&&x.onChangeEventAddress?.(H,String(E.event_address??"")),E.content!==void 0&&x.onChangeContent(H,String(E.content??"")),E.note!==void 0&&x.onChangeNote(H,String(E.note??"")),E.visibility!==void 0&&x.onChangeVisibility?.(H,E.visibility,Number(E.visibility_group_seq??0)),mm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},O={...x,onChangeStatus:(E,H)=>_({status:H},()=>x.onChangeStatus(E,H)),onChangeLabels:(E,H)=>_({label_keys:H},()=>x.onChangeLabels(E,H)),onChangeProject:(E,H)=>_({tab_key:H},()=>x.onChangeProject(E,H)),onChangeDate:(E,H,I)=>_({[H]:I},()=>x.onChangeDate(E,H,I)),onChangeReminder:(E,H)=>_({reminders:H},()=>x.onChangeReminder(E,H)),onChangePriority:(E,H)=>_({priority:H},()=>x.onChangePriority(E,H)),onChangeEventTime:(E,H)=>_({event_time:H},()=>x.onChangeEventTime?.(E,H)),onChangeEventPlace:(E,H)=>_({event_place:H},()=>x.onChangeEventPlace?.(E,H)),onChangeEventAddress:(E,H)=>_({event_address:H},()=>x.onChangeEventAddress?.(E,H)),onChangeContent:(E,H)=>_({content:H},()=>x.onChangeContent(E,H)),onChangeNote:(E,H)=>_({note:H},()=>x.onChangeNote(E,H)),onMemberEdit:(E,H)=>x.onMemberEdit(E,H,k?I=>P(M=>({...M,...I})):null),onChangeNoteDraft:k?(E,H)=>_({note:H},()=>{}):void 0,onChangeVisibility:x.onChangeVisibility?(E,H,I)=>_({visibility:H,visibility_group_seq:I},()=>x.onChangeVisibility?.(E,H,I)):void 0,onAddChecklistItem:(E,H)=>_({checklist:[...w,{label:H,checked:!1}]},()=>x.onAddChecklistItem(E,H)),onToggleChecklistItem:(E,H,I)=>_({checklist:w.map((M,F)=>F===H?{...M,checked:I}:M)},()=>x.onToggleChecklistItem(E,H,I)),onRemoveChecklistItem:(E,H)=>_({checklist:w.filter((I,M)=>M!==H)},()=>x.onRemoveChecklistItem(E,H)),onUpdateChecklistItem:x.onUpdateChecklistItem?(E,H,I)=>_({checklist:w.map((M,F)=>F===H?{...M,label:I}:M)},()=>x.onUpdateChecklistItem?.(E,H,I)):void 0,onReorderChecklist:x.onReorderChecklist?(E,H)=>_({checklist:H},()=>x.onReorderChecklist?.(E,H)):void 0,onLinkChecklistTask:x.onLinkChecklistTask?(E,H,I)=>_({checklist:[...w,{label:I,checked:!1,task_seq:H}]},()=>x.onLinkChecklistTask?.(E,H,I)):void 0},z=Ut(fm,{...O,task:v,myAccountSeq:r,onChangeTitle:(E,H)=>_({title:H},()=>n(E,H)),onToggleCompleted:t,onChangeIcon:(E,H)=>_({icon:H},()=>c(E,H)),onChangeIconColor:(E,H)=>_({icon_color:H},()=>i?.(E,H)),showTitle:k||s==="dialog"}),$=Ut(Kp,{onSubmit:(E,H)=>l(v.seq,E,H)},v.seq);return k||s==="dialog"?cs(Ak,{children:[Ut(Ok,{open:e,onClose:b,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:v.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":v.is_event?"\uC77C\uC815":v.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{raw:!0,icon:Ut(Tk,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:E=>N(E.currentTarget),children:Ut(Bk,{sx:{color:"#6b7280"}})})},...k?[{raw:!0,icon:Ut(kk,{variant:"contained",size:"small",disableElevation:!0,disabled:!p,onClick:p?C:void 0,sx:{ml:1.5,height:32,minWidth:64,px:1.75,py:0,borderRadius:1,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#f2f2f0",color:"#c9c8c5"}},children:"\uC800\uC7A5\uD558\uAE30"})}]:[]]},fullScreen:k,maxWidth:k?void 0:"md",width:k?void 0:720,mobilePresentation:k?"slide":void 0,tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:$},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:Ut(Gl,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:z})}]},R.seq),cs(Ck,{open:!!D,anchorEl:D,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[f?cs(af,{onClick:()=>{N(null),A(!0)},children:[Ut(of,{children:Ut(Ek,{fontSize:"small"})}),Ut(sf,{children:"\uD65C\uB3D9"})]}):null,cs(af,{onClick:()=>{N(null),os(v,!0)},children:[Ut(of,{children:Ut(Mk,{fontSize:"small"})}),Ut(sf,{children:"\uACF5\uC720\uD558\uAE30"})]}),S?cs(af,{onClick:E=>{let H=D??E.currentTarget;N(null),j(H)},sx:{color:"#e5484d"},children:[Ut(of,{children:Ut(Ik,{fontSize:"small",sx:{color:"#e5484d"}})}),Ut(sf,{children:"\uC0AD\uC81C"})]}):null]}),Ut(jt,{open:!!q,anchorEl:q,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>j(null),onConfirm:()=>{j(null),g?.(v)}}),Ut(Ul,{open:L,taskSeq:v.seq,items:a,loading:h,onLoad:f,onClose:()=>A(!1)})]}):Ut(Sk,{anchor:"right",open:e,onClose:b,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:E=>E.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:cs(Gl,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Ut(Jp,{task:v,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:b,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:g,canDelete:m}),Ut(pm,{sx:{borderColor:"#e6e6e3"}}),Ut(Gl,{sx:{flex:1,minHeight:0},children:Ut(Rk,{ref:y,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:z})}),Ut(pm,{sx:{borderColor:"#37352f"}}),Ut(Gl,{sx:{flexShrink:0},children:$})]})})}import{useEffect as $k,useState as Po}from"react";import{Box as Ur,Button as ff,IconButton as ym}from"@mui/material";import{FormDialog as xm}from"@ehfuse/mui-form-dialog";import Hk from"@mui/icons-material/Add";import Wk from"@mui/icons-material/DirectionsRunOutlined";import Uk from"@mui/icons-material/EditOutlined";import{ErrorAlert as vm}from"@ehfuse/alerts";import{ClearTextField as wm,DateTextField as _m,LabelSelect as km}from"@ehfuse/mui-form-controls";import{useEffect as Dk,useState as gm}from"react";import{Box as Do,Button as Pk,FormControlLabel as lf,Radio as cf,RadioGroup as Nk}from"@mui/material";import{FormDialog as Lk}from"@ehfuse/mui-form-dialog";import{LabelSelect as zk}from"@ehfuse/mui-form-controls";import jk from"@ehfuse/overlay-scrollbar";import{Fragment as Fk,jsx as Lr,jsxs as us}from"react/jsx-runtime";function bm({open:e,sprint:d,remainingTasks:b,sprints:l,onClose:o,onConfirm:s}){let r=l.filter(h=>h.seq!==d?.seq&&h.group_seq===(d?.group_seq??0)&&h.status!=="closed"),[t,n]=gm("backlog"),[c,i]=gm(0);Dk(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=b.length>0;return Lr(Lk,{open:e,onClose:o,maxWidth:"sm",title:"\uBAA9\uD45C \uB9C8\uAC10",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-close",tabs:{visible:!1},actions:{showCancelButton:!0,right:Lr(Pk,{variant:"contained",onClick:()=>s({mode:a?t:"keep",moveToSprintSeq:t==="move"?c:0,taskSeqs:b.map(h=>h.seq)}),disabled:a&&t==="move"&&!(c>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:us(Do,{sx:{display:"flex",flexDirection:"column",gap:2},children:[us(Do,{sx:{fontSize:18,color:"#37352f"},children:[Lr(Do,{component:"span",sx:{fontWeight:600},children:d?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?us(Fk,{children:[us(Do,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",b.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),Lr(Do,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Lr(jk,{style:{maxHeight:220},thumb:{width:6},children:b.map(h=>us(Do,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[Lr(Do,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Lr(Pt,{option:ur(h)})]},h.seq))})}),us(Nk,{value:t,onChange:(h,f)=>n(f),children:[r.length>0?Lr(lf,{value:"move",control:Lr(cf,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?Lr(Do,{sx:{pl:4,pb:1},children:Lr(zk,{size:"small",label:"",fullWidth:!0,value:String(c),options:r.map(h=>({value:String(h.seq),label:h.name})),onChange:h=>i(Number(h.target.value)||0)})}):null,Lr(lf,{value:"backlog",control:Lr(cf,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),Lr(lf,{value:"keep",control:Lr(cf,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):Lr(Do,{sx:{fontSize:15,color:"#6f6f6c"},children:"\uB0A8\uC740 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774\uB300\uB85C \uB9C8\uAC10\uD558\uBA74 \uBAA9\uD45C\uAC00 \uC885\uB8CC\uB429\uB2C8\uB2E4."})]})}]})}var uf="custom-";function qk(e){return e.startsWith(uf)}function X$(e){return e>0?`${uf}${e}`:""}function ri(e){if(!qk(e))return 0;let d=Number(e.slice(uf.length));return Number.isInteger(d)&&d>0?d:0}import{Fragment as Tm,jsx as Ht,jsxs as ni}from"react/jsx-runtime";var Vk=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Sm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function cH({open:e,customTabs:d,sprints:b,onClose:l,onCreate:o,onUpdate:s,onChangeStatus:r,tasks:t=[],onCloseSprint:n,onRemove:c}){let i=d.filter(O=>O.useSprints&&!O.archived),[a,h]=Po(""),[f,u]=Po(""),[g,m]=Po(""),[x,k]=Po(""),[B,R]=Po(""),[L,A]=Po(!1),[D,N]=Po(!1),[q,j]=Po(null),S=q?t.filter(O=>(O.sprint_seq??0)===q.seq&&!O.completed):[],[T,P]=Po(0);$k(()=>{e&&(h(i.length===1?i[0].key:""),u(""),m(""),k(""),R(""),P(0))},[e]);let p=()=>{u(""),m(""),k(""),R(""),P(0),N(!1)},y=O=>{P(O.seq),h(`custom-${O.group_seq}`),u(O.name),m(O.goal),k(O.start_date),R(O.end_date)},v=T>0||D,w=async()=>{let O=ri(a);if(!O){vm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!f.trim()){vm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}A(!0);try{if(T>0){s(T,{name:f.trim(),goal:g.trim(),start_date:x,end_date:B}),p();return}await o({group_seq:O,name:f.trim(),goal:g.trim(),start_date:x,end_date:B})&&p()}finally{A(!1)}},_=new Map(d.map(O=>[ri(O.key),O.label])),C=Ht(Ur,{children:i.length===0?Ht(Ur,{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.'}):Ht(Tm,{children:Ht(Ur,{children:b.length===0?ni(Ur,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ht(Wk,{sx:{fontSize:48,color:"#d9d9d6"}}),Ht(Ur,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):b.map(O=>ni(Ur,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[ni(Ur,{sx:{minWidth:0},children:[ni(Ur,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Ht(Ur,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:O.name}),Ht(Ur,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:_.get(O.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),ni(Ur,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Sm(O.start_date)," ~"," ",Sm(O.end_date)]})]}),O.goal?Ht(Ur,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:O.goal}):null]}),ni(Ur,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ht(km,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:O.status,options:Vk.map(z=>({value:z.value,label:z.label})),onChange:z=>{let $=String(z.target.value);if($==="closed"&&n){j(O);return}r(O.seq,$)},sx:{width:104,flexShrink:0}}),Ht(ym,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(O),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Ht(Uk,{sx:{fontSize:18}})}),Ht(ym,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(O.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ht(dr,{style:{width:16,height:16}})})]})]},O.seq))})})});return ni(Tm,{children:[Ht(xm,{open:e,onClose:l,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:C}],sectionContentPaddingTop:0,actions:{showCancelButton:!0,left:i.length>0?Ht(ff,{startIcon:Ht(Hk,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Ht(ff,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),Ht(bm,{open:q!==null,sprint:q,remainingTasks:S,sprints:b,onClose:()=>j(null),onConfirm:O=>{q&&n?.(q.seq,O),j(null)}}),Ht(xm,{open:v,onClose:()=>{N(!1),p()},maxWidth:"sm",title:T>0?"\uBAA9\uD45C \uC218\uC815":"\uC0C8 \uBAA9\uD45C",locale:"ko",backdropClick:!1,tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-form",sections:[{id:"sprint-form",title:"",showTitle:!1,children:Ht(Ur,{sx:{pt:1},children:ni(Ur,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Ht(km,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:a,options:i.map(O=>({value:O.key,label:O.label})),onChange:O=>h(String(O.target.value)),disabled:T>0}),Ht(wm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:f,onChange:O=>u(O.target.value)}),Ht(_m,{size:"medium",label:"\uC2DC\uC791\uC77C",value:x,onChange:O=>k(O.target.value)}),Ht(_m,{size:"medium",label:"\uC885\uB8CC\uC77C",value:B,onChange:O=>R(O.target.value)}),Ht(wm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:g,onChange:O=>m(O.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Ht(ff,{variant:"contained",onClick:()=>{w()},disabled:L,children:T>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as nn,Button as Mm,Tooltip as Kk}from"@mui/material";import{FormDialog as Gk}from"@ehfuse/mui-form-dialog";import Yk from"@mui/icons-material/CalendarMonthOutlined";import Xk from"@mui/icons-material/FileUploadOutlined";import Zk from"@mui/icons-material/FileDownloadOutlined";var df={google:{key:"google",name:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",homeUrl:"https://calendar.google.com/calendar",defaultCalendarName:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > **URL\uB85C \uCD94\uAC00**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\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.","\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."],importSteps:["\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 > **\uC124\uC815 \uBC0F \uACF5\uC720**\uB97C \uC5FD\uB2C8\uB2E4.","**\uCE98\uB9B0\uB354 \uD1B5\uD569** \uC139\uC158\uC758 **iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C**\uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."],importPlaceholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",buildSubscribeUrl:e=>`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(e.replace(/^https?:\/\//,"webcal://"))}`},apple:{key:"apple",name:"\uC560\uD50C \uCE98\uB9B0\uB354",homeUrl:"https://www.icloud.com/calendar",defaultCalendarName:"\uC560\uD50C \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uC544\uC774\uD3F0\xB7\uC544\uC774\uD328\uB4DC: **\uC124\uC815 > \uCE98\uB9B0\uB354 > \uACC4\uC815 > \uACC4\uC815 \uCD94\uAC00 > \uAE30\uD0C0 > \uAD6C\uB3C5 \uCE98\uB9B0\uB354 \uCD94\uAC00**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\uB9E5: \uCE98\uB9B0\uB354 \uC571 > **\uD30C\uC77C > \uC0C8\uB85C\uC6B4 \uCE98\uB9B0\uB354 \uAD6C\uB3C5**\uC5D0 \uBD99\uC5EC\uB123\uC2B5\uB2C8\uB2E4.","iCloud.com(\uC6F9)\uC5D0\uC11C\uB294 \uAD6C\uB3C5\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uAE30\uAE30\uC5D0\uC11C \uCD94\uAC00\uD558\uBA74 iCloud \uB85C \uB3D9\uAE30\uD654\uB429\uB2C8\uB2E4."],importSteps:["iCloud.com > \uCE98\uB9B0\uB354\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354 \uC606 **\uACF5\uC720 \uC544\uC774\uCF58**\uC744 \uB204\uB985\uB2C8\uB2E4.","**\uACF5\uC6A9 \uCE98\uB9B0\uB354**\uB97C \uCF1C\uACE0 \uB098\uC624\uB294 **\uB9C1\uD06C\uB97C \uBCF5\uC0AC**\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694(webcal:// \uC8FC\uC18C\uB3C4 \uADF8\uB300\uB85C \uB429\uB2C8\uB2E4)."],importPlaceholder:"webcal://p00-calendars.icloud.com/published/\u2026",importWarning:"\uC560\uD50C\uC740 **\uACF5\uC6A9 \uCE98\uB9B0\uB354**\uB85C \uBC14\uAFD4\uC57C \uC8FC\uC18C\uAC00 \uB098\uC635\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC544\uB294 \uC0AC\uB78C\uC740 \uADF8 \uCE98\uB9B0\uB354\uB97C \uBCFC \uC218 \uC788\uC73C\uB2C8, \uAC1C\uC778 \uC77C\uC815\uC774 \uB2F4\uAE34 \uCE98\uB9B0\uB354\uB294 \uACF5\uAC1C\uD558\uC9C0 \uB9C8\uC138\uC694."},naver:{key:"naver",name:"\uB124\uC774\uBC84 \uCE98\uB9B0\uB354",homeUrl:"https://calendar.naver.com",defaultCalendarName:"\uB124\uC774\uBC84 \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 > \uC67C\uCABD **\uB0B4 \uCE98\uB9B0\uB354** \uC606 **+** > **URL\uB85C \uAD6C\uB3C5\uD558\uAE30**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\uB124\uC774\uBC84\uAC00 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uB124\uC774\uBC84 \uCE98\uB9B0\uB354\uC5D0\uC11C \uAD6C\uB3C5\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."],importSteps:["\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 > \uC67C\uCABD **\uCE98\uB9B0\uB354 \uC124\uC815**(\uD1B1\uB2C8)\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uB97C \uACE0\uB985\uB2C8\uB2E4.","**\uC678\uBD80 \uACF5\uAC1C** \uD56D\uBAA9\uC5D0\uC11C **\uCE98\uB9B0\uB354 \uACF5\uAC1C**\uB97C \uCCB4\uD06C\uD558\uBA74 \uB098\uC624\uB294 **iCal \uC8FC\uC18C**\uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."],importPlaceholder:"https://calendar.naver.com/\u2026(iCal \uC8FC\uC18C)",importWarning:"\uB124\uC774\uBC84\uB294 **\uCE98\uB9B0\uB354\uB97C \uACF5\uAC1C**\uD574\uC57C iCal \uC8FC\uC18C\uAC00 \uB098\uC635\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC544\uB294 \uC0AC\uB78C\uC740 \uADF8 \uCE98\uB9B0\uB354\uB97C \uBCFC \uC218 \uC788\uC73C\uB2C8, \uAC1C\uC778 \uC77C\uC815\uC774 \uB2F4\uAE34 \uCE98\uB9B0\uB354\uB294 \uACF5\uAC1C\uD558\uC9C0 \uB9C8\uC138\uC694."}},Cm=Object.values(df);function Yl(e){return df[e??"google"]??df.google}import{jsx as pr,jsxs as fs}from"react/jsx-runtime";function xH({open:e,imports:d=[],onOpenExport:b,onOpenImport:l,onClose:o}){let s=fs(nn,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[fs(nn,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,color:"#37352f",display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[pr(nn,{children:fs(nn,{component:"span",children:[pr("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uB2E4\uB978 \uCE98\uB9B0\uB354\uC5D0\uC11C"," ",pr("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uBCF4\uAC8C \uD569\uB2C8\uB2E4."]})}),pr(nn,{children:fs(nn,{component:"span",children:[pr("b",{children:"\uAC00\uC838\uC624\uAE30"}),"\uB294 \uADF8 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uACB9\uCCD0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."]})}),pr(nn,{children:pr(nn,{component:"span",children:"\uB450 \uBC29\uD5A5 \uBAA8\uB450 \uC6D0\uBCF8\uC744 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})})]}),pr(nn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Cm.map((r,t)=>fs(nn,{sx:{display:"flex",alignItems:"center",gap:2,px:2,py:1.75,borderTop:t>0?"1px solid #f2f2f0":"none"},children:[pr(Yk,{sx:{fontSize:22,color:"#787774",flexShrink:0}}),fs(nn,{sx:{flex:1,minWidth:0},children:[pr(nn,{sx:{fontSize:16,color:"#37352f"},children:r.name}),r.exportBlockedReason??r.importBlockedReason?pr(nn,{sx:{fontSize:13.5,color:"#8a6d1d",mt:.25,lineHeight:1.6},children:r.exportBlockedReason??r.importBlockedReason}):null]}),pr(Im,{label:"\uB0B4\uBCF4\uB0B4\uAE30",icon:pr(Xk,{sx:{fontSize:18}}),supported:r.exportSupported,reason:r.exportBlockedReason,onClick:()=>b(r.key)}),pr(Im,{label:Bm(d,r.key)>0?`\uAC00\uC838\uC624\uAE30 (${Bm(d,r.key)})`:"\uAC00\uC838\uC624\uAE30",icon:pr(Zk,{sx:{fontSize:18}}),supported:r.importSupported,reason:r.importBlockedReason,onClick:()=>l(r.key)})]},r.key))})]});return pr(Gk,{open:e,onClose:o,width:680,title:"\uCE98\uB9B0\uB354 \uC5F0\uB3D9",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-link",sectionContentPaddingTop:0,sections:[{id:"calendar-link",showTitle:!1,children:s}],actions:{showCancelButton:!1,right:pr(Mm,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})}})}function Bm(e,d){return e.filter(b=>b.provider===d).length}function Im({label:e,icon:d,supported:b,reason:l,onClick:o}){let s=pr(nn,{component:"span",sx:{flexShrink:0},children:pr(Mm,{size:"medium",variant:"outlined",startIcon:d,disabled:!b,onClick:o,sx:{minWidth:132,whiteSpace:"nowrap"},children:e})});return b?s:pr(Kk,{title:l??"\uC774 \uC11C\uBE44\uC2A4\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",arrow:!0,children:s})}import{useState as Em}from"react";import{Box as Tr,Button as pf,Divider as e6,IconButton as t6,TextField as r6}from"@mui/material";import{FormDialog as n6}from"@ehfuse/mui-form-dialog";import o6 from"@mui/icons-material/OpenInNewOutlined";import i6 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as s6}from"@ehfuse/alerts";import{Fragment as Jk}from"react";import{Fragment as Qk,jsx as hf}from"react/jsx-runtime";function ra({text:e}){let d=String(e??"").split("**");return hf(Qk,{children:d.map((b,l)=>l%2===1?hf("b",{children:b},l):hf(Jk,{children:b},l))})}import{jsx as qt,jsxs as na}from"react/jsx-runtime";function DH({open:e,imports:d,provider:b,onRegister:l,onRemove:o,onClose:s}){let r=Yl(b),[t,n]=Em(""),[c,i]=Em(!1),a=async()=>{let u=t.trim();if(u){i(!0);try{await l(u)&&n("")}finally{i(!1)}}},h=async u=>{await s6({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${u.name||r.defaultCalendarName}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&o(u.seq)},f=na(Tr,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[na(Tr,{sx:{color:"#37352f",lineHeight:1.7},children:[r.name,"\uC758 \uC77C\uC815\uC744 ",qt("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",qt("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",qt("b",{children:"\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),qt(Tr,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),d.length>0?qt(Tr,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:d.map((u,g)=>na(Tr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:g>0?"1px solid #efefed":"none"},children:[qt(i6,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),qt(Tr,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.name||r.defaultCalendarName}),qt(t6,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{h(u)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:qt(dr,{sx:{fontSize:18}})})]},u.seq))}):qt(Tr,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),qt(e6,{sx:{my:1,borderColor:"#e6e6e3"}}),qt(Tr,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),na(Tr,{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:[r.importSteps.map(u=>qt(Tr,{children:qt(Tr,{component:"span",children:qt(ra,{text:u})})},u)),qt(Tr,{children:qt(Tr,{component:"span",children:"\uB4F1\uB85D\uD55C \uC8FC\uC18C\uB294 \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),qt(Tr,{children:qt(Tr,{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."})}),r.importWarning?qt(Tr,{children:qt(Tr,{component:"span",children:qt(ra,{text:r.importWarning})})}):null]}),na(Tr,{sx:{display:"flex",gap:2,alignItems:"center"},children:[qt(r6,{value:t,onChange:u=>n(u.target.value),fullWidth:!0,label:"iCal \uC8FC\uC18C",placeholder:r.importPlaceholder,slotProps:{input:{spellCheck:!1}}}),qt(pf,{variant:"contained",disabled:!t.trim()||c,onClick:()=>{a()},sx:{flexShrink:0},children:c?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return qt(n6,{open:e,onClose:s,width:680,title:`${r.name} \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:f}],actions:{showCancelButton:!1,left:qt(pf,{variant:"outlined",startIcon:qt(o6,{sx:{fontSize:16}}),onClick:()=>window.open(r.homeUrl,"_blank"),children:r.name}),right:qt(pf,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{Box as Ti,Button as oa,TextField as a6}from"@mui/material";import{FormDialog as l6}from"@ehfuse/mui-form-dialog";import c6 from"@mui/icons-material/ContentCopyOutlined";import Rm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Om}from"@ehfuse/alerts";import{Fragment as f6,jsx as Er,jsxs as Ci}from"react/jsx-runtime";function u6(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function WH({open:e,feed:d,feedTaskCount:b,provider:l,buildFeedUrl:o,onSubscribe:s,onClose:r}){let t=Yl(l),n=o??u6,c=d.subscribed?n(d.token):"",i=()=>{navigator.clipboard.writeText(c).then(()=>Om("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Om("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},a=()=>{let f=t.buildSubscribeUrl?.(c);f&&window.open(f,"_blank")},h=Ci(Ti,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ci(Ti,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Er("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C ",t.name,"\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),b===0?Ci(Ti,{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.",Er("br",{}),Er("b",{children:"\uB9C8\uAC10\uC608\uC815\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",d.subscribed?`${t.name}\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.`:"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):d.subscribed&&d.enabled?Ci(f6,{children:[Er(a6,{value:c,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Ci(Ti,{sx:{display:"flex",gap:2},children:[Er(oa,{variant:"outlined",startIcon:Er(c6,{}),onClick:i,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),t.buildSubscribeUrl?Ci(oa,{variant:"contained",startIcon:Er(Rm,{}),onClick:a,children:[t.name,"\uC5D0 \uCD94\uAC00"]}):null]}),Ci(Ti,{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:[t.subscribeSteps.map(f=>Er(Ti,{children:Er("span",{children:Er(ra,{text:f})})},f)),Er(Ti,{children:Er("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."})})]})]}):Er(oa,{variant:"contained",onClick:s,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Er(l6,{open:e,onClose:r,width:680,title:`${t.name}\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:h}],actions:{showCancelButton:!1,left:Er(oa,{variant:"outlined",startIcon:Er(Rm,{sx:{fontSize:16}}),onClick:()=>window.open(t.homeUrl,"_blank"),children:t.name}),right:Er(oa,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{useEffect as d6,useMemo as mf,useState as gf}from"react";import{Box as ia,Button as h6,Typography as p6}from"@mui/material";import{FormDialog as m6}from"@ehfuse/mui-form-dialog";import{SearchTextField as g6}from"@ehfuse/mui-form-controls";import{TreeView as b6}from"@ehfuse/tree-view";import{Fragment as k6,jsx as qn,jsxs as S6}from"react/jsx-runtime";function Am(e){return`${e.name}#${e.seq}`}function y6(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function x6(e){let d=[],b=l=>{for(let o of l.employees??[])d.push(o);for(let o of l.groups??[])b(o)};for(let l of e)b(l);return d}function v6(e,d){return d?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(b=>String(b).toLowerCase().includes(d)):!0}function w6(e){let d=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Am(e),renderLabel:qn(ia,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:qn(ia,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:d})})}}function Dm(e,d){let b=(e.groups??[]).map(o=>Dm(o,d)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>v6(o,d)).map(w6);return b.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...b,...l]}}function _6({groups:e,allEmployees:d,initialSelectedSeqs:b,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=gf(""),n=mf(()=>e.map(i=>Dm(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=mf(()=>d.filter(i=>b.includes(i.seq)).map(Am),[]);return S6(k6,{children:[qn(ia,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:qn(g6,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),qn(ia,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:qn(b6,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(y6).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function QH({open:e,title:d="\uC9C1\uC6D0 \uC120\uD0DD",hint:b="",groups:l,multiple:o=!1,selectedSeqs:s,confirmText:r="\uD655\uC778",onConfirm:t,onClose:n}){let c=zt(),[i,a]=gf([]),[h,f]=gf(0),u=mf(()=>x6(l),[l]),g=s??[];d6(()=>{e&&(a(g),f(x=>x+1))},[e]);let m=()=>{let x=u.filter(k=>i.includes(k.seq));t(o?x:x.slice(0,1)),n()};return qn(m6,{open:e,onClose:n,title:`${d}${o&&i.length>0?` (${i.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:qn(ia,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:qn(_6,{groups:l,allEmployees:u,initialSelectedSeqs:g,multiple:o,isMobile:c,onSelectionChange:a},h)})}],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:b?qn(p6,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:b}):void 0,right:qn(h6,{variant:"contained",onClick:m,children:r})}})}import{useEffect as G8,useMemo as m0,useState as da}from"react";import{Box as zo,Button as g0}from"@mui/material";import{FormDialog as Y8}from"@ehfuse/mui-form-dialog";import{LabelSelect as Cf}from"@ehfuse/mui-form-controls";import X8 from"@mui/icons-material/SpeedOutlined";import{useEffect as T6,useState as C6}from"react";import{Box as on,Button as B6}from"@mui/material";import{FormDialog as I6}from"@ehfuse/mui-form-dialog";import{LabelSelect as M6,NumberField as Pm}from"@ehfuse/mui-form-controls";import E6 from"@ehfuse/overlay-scrollbar";import{jsx as Vr,jsxs as sa}from"react/jsx-runtime";var R6=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function Nm({open:e,capacity:d,employees:b,onClose:l,onSave:o}){let[s,r]=C6(d??mo);T6(()=>{e&&r(d??mo)},[e,d]);let t=s.basis==="points"?"SP":"\uAC74",n=(c,i)=>{let a=Math.max(0,Math.floor(Number(i)||0));r(h=>{let f={...h.by_account};return a>0?f[c]=a:delete f[c],{...h,by_account:f}})};return Vr(I6,{open:e,onClose:l,maxWidth:"sm",title:"\uC778\uC6D0 \uC6A9\uB7C9",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-capacity",tabs:{visible:!1},actions:{showCancelButton:!0,right:Vr(B6,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:sa(on,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Vr(on,{sx:{fontSize:15,color:"#37352f"},children:"\uD55C \uC0AC\uB78C\uC774 \uB3D9\uC2DC\uC5D0 \uC548\uC744 \uC218 \uC788\uB294 \uC591\uC744 \uC815\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC744 \uB118\uAE30\uBA74 \uC6CC\uD06C\uB85C\uB4DC \uCC28\uD2B8\uC5D0\uC11C \uBD89\uAC8C \uD45C\uC2DC\uB429\uB2C8\uB2E4. 0 \uC73C\uB85C \uB450\uBA74 \uC6A9\uB7C9\uC744 \uC4F0\uC9C0 \uC54A\uACE0 \uD300 \uD3C9\uADE0\uC744 \uAE30\uC900\uC73C\uB85C \uBD05\uB2C8\uB2E4."}),sa(on,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Vr(on,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),Vr(M6,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:R6,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),sa(on,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Vr(on,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),Vr(Pm,{size:"medium",fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:t,value:s.default_capacity,onValueChange:c=>r(i=>({...i,default_capacity:Math.max(0,Math.floor(Number(c)||0))}))})]}),Vr(on,{sx:{pl:"119px",mt:-1.25,fontSize:13.5,color:"#37352f"},children:`\uC804\uC6D0 \uACF5\uD1B5 \uAE30\uC900(${t}) \xB7 0 = \uC6A9\uB7C9 \uC548 \uC500`}),Vr(on,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),b.length===0?Vr(on,{sx:{fontSize:15,color:"#787774"},children:"\uC9C1\uC6D0 \uBAA9\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uAE30\uBCF8 \uC6A9\uB7C9\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}):Vr(on,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Vr(E6,{style:{maxHeight:260},thumb:{width:6},children:b.filter(c=>Number(c.account_seq)>0).map(c=>sa(on,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[sa(on,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?Vr(on,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),Vr(on,{sx:{width:132,flexShrink:0},children:Vr(Pm,{size:"small",fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:t,clearWhenZero:!0,value:s.by_account[Number(c.account_seq)]??0,onValueChange:i=>n(Number(c.account_seq),String(i??""))})})]},c.account_seq))})})]})}]})}import{Box as Zl}from"@mui/material";import{Bar as P6,BarChart as N6,CartesianGrid as L6,Cell as z6,ReferenceLine as j6,ResponsiveContainer as F6,Tooltip as q6,XAxis as $6,YAxis as H6}from"recharts";import{Box as O6}from"@mui/material";import{jsx as A6}from"react/jsx-runtime";function Kr({text:e,height:d}){return A6(O6,{sx:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:14.5,color:"#9a9a97",...typeof d=="number"?{height:d,minHeight:120}:{position:"absolute",inset:0,pointerEvents:"none"}},children:e})}import{createElement as D6}from"react";var Xl="#2f80ed",Lm="#a9c9f5",Bi="#9a9a97",bf="#2e9e6b",lo="#3d7eff",yf="#c3c8ce",aa="#f2a30f",la={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},ds={...la,cursor:!1},hs={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>D6("span",{style:{paddingRight:14,color:"#37352f"}},e)};function mr(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var zr={flexShrink:0,mb:1.5,display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"};function co(e){return{"& *":{outline:"none"},userSelect:"none",...typeof e=="number"?{height:e,flexShrink:0}:{flex:1,minHeight:0}}}import{jsx as $n,jsxs as ca}from"react/jsx-runtime";function W6(e,d){let b=d.filter(l=>l.sprint_seq===e.seq&&!l.archived&&l.completed);return{points:b.reduce((l,o)=>l+(o.story_points??0),0),count:b.length}}function zm({sprints:e,tasks:d,height:b=200}){let o=[...e].sort((i,a)=>`${i.start_date}|${i.seq}`.localeCompare(`${a.start_date}|${a.seq}`)).map(i=>({sprint:i,...W6(i,d)})),s=o.some(i=>i.points>0),r=s?"SP":"\uAC74",t=o.filter(i=>i.sprint.status==="closed").map(i=>s?i.points:i.count),n=t.length>0?Math.round(t.reduce((i,a)=>i+a,0)/t.length*10)/10:null,c=o.map(i=>({\uBAA9\uD45C:`${i.sprint.name}${i.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""}`,\uC644\uB8CC:s?i.points:i.count,closed:i.sprint.status==="closed"}));return o.length===0?$n(Kr,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:b}):ca(Zl,{sx:mr(b),children:[ca(Zl,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ca("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?ca("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",$n(Zl,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),$n(Zl,{sx:co(b),children:$n(F6,{width:"100%",height:"100%",children:ca(N6,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[$n(L6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),$n($6,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),$n(H6,{tick:{fontSize:13},width:40,allowDecimals:!1}),$n(q6,{...ds,formatter:i=>`${Number(i??0)}${r}`}),n!==null?$n(j6,{y:n,stroke:Bi,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,$n(P6,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>$n(z6,{fill:i.closed?Xl:Lm},i.\uBAA9\uD45C))})]})})})]})}import{useMemo as U6}from"react";import{Box as uo}from"@mui/material";import{CartesianGrid as V6,Line as jm,LineChart as K6,ResponsiveContainer as G6,Tooltip as Y6,XAxis as X6,YAxis as Z6}from"recharts";import{jsx as sn,jsxs as oi}from"react/jsx-runtime";function Fm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function J6(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Q6(e){return e.slice(5).replace("-",".")}function qm({sprint:e,tasks:d,todayStr:b,height:l=200,headerLeft:o}){let s=U6(()=>{let a=Fm(e.start_date),h=Fm(e.end_date);if(!a||!h||h<a||Math.round((h.getTime()-a.getTime())/864e5)+1>366)return null;let u=d.filter(D=>D.sprint_seq===e.seq&&!D.archived);if(u.length===0)return{empty:!0};let g=u.some(D=>(D.story_points??0)>0),m=D=>g?D.story_points??0:1,x=u.reduce((D,N)=>D+m(N),0),k=new Map;for(let D of u){if(!D.completed)continue;let N=(D.completed_time??"").slice(0,10),q=/^\d{4}-\d{2}-\d{2}$/.test(N)?N:e.start_date;k.set(q,(k.get(q)??0)+m(D))}let B=[];for(let D=new Date(a);D<=h;D.setDate(D.getDate()+1))B.push(J6(D));let R=x,L=x;return{empty:!1,data:B.map((D,N)=>{let q=B.length===1?0:x*(1-N/(B.length-1));return D<=b&&(R-=k.get(D)??0,L=Math.max(0,R)),{\uB0A0\uC9DC:Q6(D),\uC774\uC0C1:Math.round(q*10)/10,\uB0A8\uC740\uB7C9:D<=b?Math.max(0,R):null}}),total:x,usePoints:g,last:L}},[e,d,b]);if(!s)return oi(uo,{sx:mr(l),children:[o?sn(uo,{sx:zr,children:o}):null,sn(Kr,{text:"\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.",height:l})]});if(s.empty)return oi(uo,{sx:mr(l),children:[o?sn(uo,{sx:zr,children:o}):null,sn(Kr,{text:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]});let{data:r,total:t,usePoints:n,last:c}=s,i=n?"SP":"\uAC74";return oi(uo,{sx:mr(l),children:[oi(uo,{sx:zr,children:[o?sn(uo,{sx:{flexShrink:0},children:o}):null,oi(uo,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[oi("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),oi("span",{children:["\uD604\uC7AC"," ",sn(uo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),sn(uo,{sx:co(l),children:sn(G6,{width:"100%",height:"100%",children:oi(K6,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[sn(V6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),sn(X6,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),sn(Z6,{tick:{fontSize:13},width:40,allowDecimals:!1}),sn(Y6,{...la,formatter:a=>`${Number(a??0)}${i}`}),sn(jm,{type:"linear",dataKey:"\uC774\uC0C1",stroke:Bi,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),sn(jm,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:Xl,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}import{useMemo as Gm}from"react";import{Box as fo}from"@mui/material";import{Area as wf,AreaChart as n8,CartesianGrid as o8,Legend as i8,ResponsiveContainer as s8,Tooltip as a8,XAxis as l8,YAxis as c8}from"recharts";function No(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function Jl(e,d=new Date){let b=new Date(d);return b.setMonth(b.getMonth()-e),b}function IW(e=new Date){return{fromDate:No(Jl(1,e)),toDate:No(e)}}var vf=864e5,ua=[0,1,2,3,5,8,13,21];function Wm(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function xf(e){let d=String(e??"").trim(),b=/^(\d{4}-\d{2}-\d{2})(?:[ T](\d{2}:\d{2}))?/.exec(d);if(!b)return null;let l=new Date(`${b[1]}T${b[2]??"00:00"}:00`).getTime();return Number.isNaN(l)?null:l}function ps(e){let d=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(d)?d.slice(0,10):""}function e8(e){let d=ps(e.created_time)||ps(e.start_date)||ps(e.completed_time);if(!d)return null;let b=ps(e.start_date),l=b&&b>d?b:d,o=e.completed?ps(e.completed_time)||d:"";return{created:d,started:l,done:o}}function Um(e,d){let b=/^\d{4}-\d{2}-\d{2}$/.test(d)?new Date(`${d}T00:00:00`):new Date,l=Math.max(2,Math.min(366,Math.round(e))),o=[];for(let s=l-1;s>=0;s-=1)o.push(No(new Date(b.getTime()-s*vf)));return o}function Vm(e,d,b){let l=Um(d,b),o=e.filter(Wm).map(e8).filter(n=>n!==null),s=l.map(n=>{let c=0,i=0,a=0;for(let h of o)h.created>n||(h.done&&h.done<=n?c+=1:h.started<=n?i+=1:a+=1);return{day:n,done:c,inProgress:i,waiting:a}}),r=s[s.length-1],t=s.reduce((n,c)=>Math.max(n,c.done+c.inProgress+c.waiting),0);return{points:s,max:t,currentWip:r?.inProgress??0,currentTotal:r?r.done+r.inProgress+r.waiting:0,currentDone:r?.done??0}}function t8(e,d){if(e.length===0)return 0;let b=Math.min(e.length-1,Math.max(0,Math.ceil(e.length*d)-1));return e[b]}function $m(e){if(e.length===0)return null;let d=[...e].sort((s,r)=>s-r),b=s=>Math.round(s*10)/10,l=Math.floor(d.length/2),o=d.length%2===1?d[l]:(d[l-1]+d[l])/2;return{count:d.length,median:b(o),average:b(d.reduce((s,r)=>s+r,0)/d.length),p85:b(t8(d,.85))}}function Hm(e){for(let d=ua.length-1;d>=0;d-=1)if(e>=ua[d])return d;return 0}function r8(){return ua.map((e,d)=>d===ua.length-1?`${e}\uC77C+`:`${e}~${ua[d+1]}\uC77C`)}function Km(e,d,b){let l=Um(d,b),o=l[0],s=l[l.length-1],r=r8(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!Wm(a)||!a.completed)continue;let h=ps(a.completed_time);if(!h||h<o||h>s)continue;let f=xf(a.completed_time),u=xf(a.created_time);if(f===null||u===null)continue;let g=Math.max(0,(f-u)/vf);c.push(g),t[Hm(g)]+=1;let m=xf(a.start_date);if(m===null||m>f)continue;let x=Math.max(0,(f-Math.max(m,u))/vf);i.push(x),n[Hm(x)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:$m(c),cycle:$m(i)}}import{jsx as Gr,jsxs as ii}from"react/jsx-runtime";function u8(e){return e.slice(5).replace("-",".")}function Ym({tasks:e,todayStr:d,days:b=30,height:l=220,headerLeft:o}){let s=Gm(()=>Vm(e,b,d),[e,b,d]),r=Gm(()=>s.points.map(n=>({\uB0A0\uC9DC:u8(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=ii(fo,{sx:zr,children:[o?Gr(fo,{sx:{flexShrink:0},children:o}):null,ii(fo,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[ii(fo,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ii("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),ii("span",{children:["\uC9C4\uD589 \uC911"," ",Gr(fo,{component:"span",sx:{color:lo,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),Gr(fo,{sx:{fontSize:13.5,color:"#37352f"},children:"\uB760\uAC00 \uB450\uAEBC\uC6CC\uC9C0\uBA74 \uC77C\uC774 \uC313\uC774\uB294 \uC911, \uC587\uC544\uC9C0\uBA74 \uCC98\uB9AC\uB418\uB294 \uC911\uC785\uB2C8\uB2E4."})]})]});return r.length===0||s.max===0?ii(fo,{sx:mr(l),children:[o?Gr(fo,{sx:zr,children:o}):null,Gr(Kr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):ii(fo,{sx:mr(l),children:[t,Gr(fo,{sx:co(l),children:Gr(s8,{width:"100%",height:"100%",children:ii(n8,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[Gr(o8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Gr(l8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),Gr(c8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Gr(a8,{...la,formatter:n=>`${Number(n??0)}\uAC74`}),Gr(i8,{...hs}),Gr(wf,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:bf,fill:bf,fillOpacity:.9}),Gr(wf,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:lo,fill:lo,fillOpacity:.85}),Gr(wf,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:yf,fill:yf,fillOpacity:.9})]})})})]})}import{useMemo as Xm}from"react";import{Box as an}from"@mui/material";import{Bar as Zm,BarChart as f8,CartesianGrid as d8,Legend as h8,ResponsiveContainer as p8,Tooltip as m8,XAxis as g8,YAxis as b8}from"recharts";import{jsx as Cr,jsxs as Bn}from"react/jsx-runtime";function Jm({label:e,color:d,summary:b}){let l=Bn(an,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Cr(an,{sx:{width:10,height:10,borderRadius:.5,bgcolor:d,flexShrink:0}}),Cr(an,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return b?Bn(an,{sx:{display:"contents"},children:[l,Bn("span",{children:[b.count,"\uAC74"]}),Bn("span",{children:["\uC911\uC559\uAC12"," ",Cr(an,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:b.median}),"\uC77C"]}),Bn("span",{children:["\uD3C9\uADE0 ",b.average,"\uC77C"]}),Bn("span",{children:["85% ",b.p85,"\uC77C \uC774\uB0B4"]})]}):Bn(an,{sx:{display:"contents"},children:[l,Cr(an,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function Qm({tasks:e,todayStr:d,days:b=30,height:l=200,headerLeft:o}){let s=Xm(()=>Km(e,b,d),[e,b,d]),r=Xm(()=>s.labels.map((t,n)=>({\uAD6C\uAC04:t,\uB9AC\uB4DC\uD0C0\uC784:s.leadCounts[n],\uC0AC\uC774\uD074\uD0C0\uC784:s.cycleCounts[n]})),[s]);return s.lead?Bn(an,{sx:mr(l),children:[Bn(an,{sx:zr,children:[o?Cr(an,{sx:{flexShrink:0},children:o}):null,Bn(an,{sx:{flex:1,minWidth:260,display:"grid",gridTemplateColumns:"max-content max-content max-content max-content max-content",justifyContent:"start",alignItems:"center",columnGap:3,rowGap:.5,fontSize:14,color:"#000"},children:[Cr(Jm,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:lo,summary:s.lead}),Cr(Jm,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:aa,summary:s.cycle})]})]}),Cr(an,{sx:co(l),children:Cr(p8,{width:"100%",height:"100%",children:Bn(f8,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[Cr(d8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Cr(g8,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),Cr(b8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Cr(m8,{...ds,formatter:t=>`${Number(t??0)}\uAC74`}),Cr(h8,{...hs}),Cr(Zm,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:lo,radius:[3,3,0,0]}),Cr(Zm,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:aa,radius:[3,3,0,0]})]})})})]}):Bn(an,{sx:mr(l),children:[o?Cr(an,{sx:zr,children:o}):null,Cr(Kr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}import{useMemo as n0}from"react";import{Box as Ii}from"@mui/material";import{Bar as kf,BarChart as _8,CartesianGrid as k8,Cell as S8,Legend as T8,ReferenceLine as o0,ResponsiveContainer as C8,Tooltip as B8,XAxis as I8,YAxis as M8}from"recharts";function y8(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let b=new Date(`${e}T00:00:00`).getTime(),l=new Date(`${d}T00:00:00`).getTime();return Number.isNaN(b)||Number.isNaN(l)?null:Math.round((l-b)/864e5)}function x8(e,d,b){let l=String(e.due_date??"").slice(0,10),o=y8(d,l);return o===null?"later":o<0?"overdue":o<=b?"soon":"later"}function Ql(e,d){let{todayStr:b,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=d,t=r??mo,n=new Map;for(let i of e){if(i.completed||i.archived||i.is_notice||i.is_event||i.linked_only)continue;let a=Number(i.manager_account_seq??0);if(!a&&!o)continue;let h=a?String(i.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",f=n.get(a)??{accountSeq:a,name:h,overdue:0,soon:0,later:0,total:0,points:0,capacity:0,load:0,ratio:0};f[x8(i,b,l)]+=1,f.total+=1,f.points+=Number(i.story_points??0)||0,n.set(a,f)}for(let i of n.values())i.capacity=v8(i.accountSeq,t),i.load=t.basis==="points"?i.points:i.total,i.ratio=i.capacity>0?i.load/i.capacity:0;let c=[...n.values()].sort((i,a)=>i.accountSeq===0!=(a.accountSeq===0)?i.accountSeq===0?1:-1:i.overdue!==a.overdue?a.overdue-i.overdue:i.total!==a.total?a.total-i.total:i.name.localeCompare(a.name));return typeof s=="number"&&s>0?c.slice(0,s):c}function ec(e,d){return e.filter(b=>b.completed||b.archived||b.is_notice||b.is_event||b.linked_only?!1:Number(b.manager_account_seq??0)===d).sort((b,l)=>{let o=String(b.due_date??"").slice(0,10),s=String(l.due_date??"").slice(0,10);return!o!=!s?o?-1:1:o!==s?o.localeCompare(s):String(b.title??"").localeCompare(String(l.title??""))})}function v8(e,d){if(!(e>0))return 0;let b=Math.max(0,Math.floor(Number(d.by_account?.[e])||0));return b>0?b:Math.max(0,Math.floor(Number(d.default_capacity)||0))}function tc(e){return e.capacity>0&&e.load>e.capacity}function e0(e,d){return d>0&&e.total>=d}function t0(e){let d=e.filter(b=>b.accountSeq>0);return d.length===0?0:d.reduce((b,l)=>b+l.total,0)/d.length}function _f(e,d){let b=new Date(`${e}T00:00:00`);b.setDate(b.getDate()+d);let l=o=>String(o).padStart(2,"0");return`${b.getFullYear()}-${l(b.getMonth()+1)}-${l(b.getDate())}`}function w8(e){let d=new Date(`${e}T00:00:00`);if(Number.isNaN(d.getTime()))return e;let b=(d.getDay()+6)%7;return _f(e,-b)}function r0(e,d){let{todayStr:b,includeUnassigned:l=!0,weeks:o=6,limit:s}=d,r=w8(b),t=Array.from({length:Math.max(1,o)},(f,u)=>{let g=_f(r,u*7),m=_f(g,6),[,x,k]=g.split("-");return{start:g,end:m,label:`${Number(x)}/${Number(k)}`,isCurrent:u===0}}),n=t[t.length-1].end,c=new Map;for(let f of e){if(f.completed||f.archived||f.is_notice||f.is_event||f.linked_only)continue;let u=Number(f.manager_account_seq??0);if(!u&&!l)continue;let g=u?String(f.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",m=c.get(u)??{accountSeq:u,name:g,overdue:0,byWeek:new Array(t.length).fill(0),noDue:0,total:0,beyond:0},x=String(f.due_date??"").slice(0,10);if(m.total+=1,!/^\d{4}-\d{2}-\d{2}$/.test(x))m.noDue+=1;else if(x<b)m.overdue+=1;else if(x>n)m.beyond+=1;else{let k=t.findIndex(B=>x>=B.start&&x<=B.end);k>=0?m.byWeek[k]+=1:m.beyond+=1}c.set(u,m)}let i=[...c.values()].sort((f,u)=>f.accountSeq===0!=(u.accountSeq===0)?f.accountSeq===0?1:-1:f.overdue!==u.overdue?u.overdue-f.overdue:f.total!==u.total?u.total-f.total:f.name.localeCompare(u.name)),a=typeof s=="number"&&s>0?i.slice(0,s):i,h=a.reduce((f,u)=>Math.max(f,u.overdue,u.noDue,...u.byWeek),0);return{weeks:t,rows:a,maxCell:h}}import{Fragment as i0,jsx as Br,jsxs as si}from"react/jsx-runtime";var fa="#e5484d";function s0({tasks:e,todayStr:d,soonDays:b=7,overloadThreshold:l=0,capacity:o=mo,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=n0(()=>Ql(e,{todayStr:d,soonDays:b,capacity:o}),[e,d,b,o]),i=n0(()=>t0(c),[c]),a=l>0?l:Math.max(3,Math.ceil(i*1.5)),h=o.default_capacity>0||Object.keys(o.by_account).length>0,f=o.basis==="points"?"SP":"\uAC74",u=c.filter(g=>g.accountSeq>0&&(h?tc(g):e0(g,a))).length;return c.length===0?si(Ii,{sx:mr(s),children:[r?Br(Ii,{sx:zr,children:r}):null,Br(Kr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):si(Ii,{sx:mr(s),children:[si(Ii,{sx:zr,children:[r,si(Ii,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",Br("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?si(i0,{children:["\uC6A9\uB7C9 ",Br("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?f:""]}):si(i0,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",Br("b",{children:a}),"\uAC74"]}),u>0?si(Ii,{component:"span",sx:{ml:1,color:fa,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),Br(Ii,{sx:co(s),children:Br(C8,{width:"100%",height:"100%",children:si(_8,{data:c,layout:"vertical",onClick:n?g=>{let m=c.find(x=>x.name===String(g?.activeLabel??""));m&&n(m.accountSeq===t?0:m.accountSeq)}:void 0,style:n?{cursor:"pointer"}:void 0,margin:{top:4,right:16,bottom:4,left:8},barCategoryGap:c.length>8?4:10,children:[Br(k8,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),Br(I8,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),Br(M8,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),Br(B8,{...ds,formatter:(g,m)=>[`${Number(g)||0}\uAC74`,String(m)],labelFormatter:g=>{let m=c.find(x=>x.name===g);return!m||!(m.capacity>0)?String(g):`${g} \u2014 \uC6A9\uB7C9 ${m.capacity}${f} \uC911 ${m.load} (${Math.round(m.ratio*100)}%)`}}),Br(T8,{...hs}),i>0?Br(o0,{x:i,stroke:Bi,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:Bi}}):null,o.default_capacity>0?Br(o0,{x:o.default_capacity,stroke:fa,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:fa}}):null,Br(kf,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:fa}),Br(kf,{dataKey:"soon",name:`\uC784\uBC15(${b}\uC77C)`,stackId:"load",fill:aa}),Br(kf,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:lo,radius:[0,3,3,0],children:c.map(g=>Br(S8,{fill:h&&tc(g)?fa:lo,fillOpacity:h&&tc(g)?.45:1,stroke:g.accountSeq===t?"#37352f":void 0,strokeWidth:g.accountSeq===t?1.5:0},g.accountSeq))})]})})})]})}import{useEffect as L8,useState as z8}from"react";import{Box as j8,Button as F8}from"@mui/material";import{FormDialog as q8}from"@ehfuse/mui-form-dialog";import{useState as E8}from"react";import{Box as gr,Button as R8,Menu as O8,MenuItem as A8}from"@mui/material";import D8 from"@mui/icons-material/PersonOutlineOutlined";import P8 from"@ehfuse/overlay-scrollbar";import{jsx as Rr,jsxs as Lo}from"react/jsx-runtime";var a0=56,l0=68,c0=96;function N8(e){let d=String(e.due_date??"").slice(0,10);return d?d.slice(5).replace("-","/"):"-"}function u0(e,d){let b=String(e.due_date??"").slice(0,10);return!!b&&b<d}function f0({tasks:e,row:d,todayStr:b,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=E8(null),a=ec(e,d.accountSeq),h=f=>o.find(u=>u.accountSeq===f)?.total??0;return Lo(gr,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:Lo(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[Rr(gr,{component:"span",sx:{fontWeight:700},children:d.name}),Lo(gr,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),d.capacity>0?Lo(gr,{component:"span",sx:{color:d.load>d.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",d.capacity," \uC911 ",d.load]}):null]}),Lo(gr,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Lo(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,flexShrink:0,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[Rr(gr,{sx:{width:a0,flexShrink:0},children:"\uB9C8\uAC10"}),Rr(gr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Rr(gr,{sx:{width:l0,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?Rr(gr,{sx:{width:c0,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),Rr(gr,{sx:{flex:1,minHeight:0},children:Rr(P8,{style:{height:"100%"},thumb:{width:6},children:a.length===0?Rr(gr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(f=>Lo(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[Rr(gr,{sx:{width:a0,flexShrink:0,fontSize:13.5,color:u0(f,b)?"#e5484d":"#787774",fontWeight:u0(f,b)?700:400},children:N8(f)}),Rr(gr,{onClick:n?()=>n(f.seq):void 0,sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...n?{cursor:"pointer","&:hover":{textDecoration:"underline"}}:{}},children:f.title}),Rr(gr,{sx:{width:l0,flexShrink:0,display:"flex",justifyContent:"center"},children:Rr(qr,{priority:f.priority})}),t?Rr(gr,{sx:{width:c0,flexShrink:0,display:"flex",justifyContent:"center"},children:Rr(R8,{size:"small",variant:"outlined",startIcon:Rr(D8,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:f.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},f.seq))})})]}),Rr(O8,{anchorEl:c?.el??null,open:!!c,onClose:()=>i(null),transitionDuration:0,children:l.filter(f=>Number(f.account_seq)>0&&Number(f.account_seq)!==d.accountSeq).map(f=>Lo(A8,{onClick:()=>{c&&t&&t(c.taskSeq,Number(f.account_seq),f.name),i(null)},sx:{fontSize:14,minWidth:200},children:[Rr(gr,{sx:{flex:1},children:f.name}),Lo(gr,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(f.account_seq)),"\uAC74"]})]},f.account_seq))})]})}import{jsx as rc}from"react/jsx-runtime";function d0({open:e,row:d,rows:b,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=z8(d);L8(()=>{d&&i(d)},[d]);let a=d??c,h=a?ec(l,a.accountSeq).length:0;return rc(q8,{open:e,onClose:r,maxWidth:"sm",title:a?`${a.name} \uC5C5\uBB34 (${h})`:"\uC5C5\uBB34",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-person",tabs:{visible:!1},actions:{showCancelButton:!1,right:rc(F8,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:rc(j8,{sx:{minHeight:0},children:a?rc(f0,{tasks:l,row:a,rows:b,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}import{useMemo as $8}from"react";import{Box as mn,Tooltip as H8}from"@mui/material";import{OverlayScrollbar as W8}from"@ehfuse/overlay-scrollbar";import{jsx as Yr,jsxs as oc}from"react/jsx-runtime";var h0="#e5484d",U8="#2f80ed",V8="#9a9a97",Sf=30,K8=96,nc=56;function Tf({count:e,max:d,color:b,title:l}){let o=e>0&&d>0?.18+e/d*.72:0;return Yr(H8,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:Yr(mn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:o>0?`${b}${Math.round(o*255).toString(16).padStart(2,"0")}`:"transparent",color:o>.55?"#fff":"#37352f",fontSize:12.5,fontWeight:e>0?700:400,fontVariantNumeric:"tabular-nums"},children:e>0?e:""})})}function p0({tasks:e,todayStr:d,weeks:b=6,height:l=200}){let o=$8(()=>r0(e,{todayStr:d,weeks:b}),[e,d,b]);if(o.rows.length===0)return Yr(mn,{sx:mr(l),children:Yr(Kr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${K8}px ${nc}px repeat(${o.weeks.length}, minmax(${nc}px, 1fr)) ${nc}px ${nc}px`,r={height:Sf,display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #dcdad6",fontSize:12,fontWeight:700,color:"#37352f",bgcolor:"#f8f8f7",whiteSpace:"nowrap"};return Yr(mn,{sx:mr(l),children:Yr(W8,{style:{height:"100%"},thumb:{width:8},children:oc(mn,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${Sf}px repeat(${o.rows.length}, minmax(${Sf}px, 1fr))`},children:[Yr(mn,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),Yr(mn,{sx:{...r,color:h0},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>Yr(mn,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),Yr(mn,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),Yr(mn,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>oc(mn,{sx:{display:"contents"},children:[Yr(mn,{sx:{display:"flex",alignItems:"center",pl:1,borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",fontSize:13,color:t.accountSeq>0?"#37352f":"#9a9a97",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.name}),Yr(Tf,{count:t.overdue,max:o.maxCell,color:h0,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>Yr(Tf,{count:n,max:o.maxCell,color:U8,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),Yr(Tf,{count:t.noDue,max:o.maxCell,color:V8,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),oc(mn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid #ececea",fontSize:12.5,fontWeight:700,color:"#37352f",fontVariantNumeric:"tabular-nums"},children:[t.total,t.beyond>0?oc(mn,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}import{Fragment as b0,jsx as er,jsxs as ic}from"react/jsx-runtime";var y0="min(560px, 62vh)",Z8=`calc(${y0} - 4px)`,J8=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function VU({open:e,sprints:d,tasks:b,todayStr:l,showSprintCharts:o,capacity:s=mo,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,f]=da(0),[u,g]=da(30);G8(()=>{if(!e)return;let y=d.find(w=>w.status==="active")??d[0],v=d.find(w=>w.seq===i)??y;f(v?.seq??0)},[e]);let m=m0(()=>d.find(y=>y.seq===h)??null,[d,h]),x={height:Z8,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=er(Cf,{label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,value:h?String(h):"",options:d.map(y=>({value:String(y.seq),label:kn(y)})),onChange:y=>f(Number(y.target.value)||0),sx:{width:280,flexShrink:0}}),[B,R]=da("distribution"),L=er(Cf,{label:"\uBCF4\uAE30",showLabel:!1,showEmptyOption:!1,value:B,options:[{value:"distribution",label:"\uC9C0\uAE08 \uBD80\uD558(\uC9C0\uC5F0\xB7\uC784\uBC15\xB7\uC5EC\uC720)"},{value:"timeline",label:"\uC8FC\uBCC4 \uB9C8\uAC10 \uBC00\uC9D1"}],onChange:y=>R(y.target.value==="timeline"?"timeline":"distribution"),sx:{width:280,flexShrink:0}}),[A,D]=da(!1),[N,q]=da(0),j=m0(()=>Ql(b,{todayStr:l,capacity:s}),[b,l,s]),S=j.find(y=>y.accountSeq===N)??null,T=ic(b0,{children:[L,t?er(g0,{size:"small",variant:"outlined",startIcon:er(X8,{sx:{fontSize:18}}),onClick:()=>D(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),P=o??d.length>0,p=er(Cf,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:J8,onChange:y=>g(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return ic(b0,{children:[er(Y8,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:y0,contentBottomPadding:0,scrollPastLastSection:!1,tabs:{visible:!0,switchContent:!0,fullWidth:!0},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[...P?[{id:"velocity",tabTitle:"\uBCA8\uB85C\uC2DC\uD2F0",showTitle:!1,children:er(zo,{sx:x,children:er(zm,{sprints:d,tasks:b,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:er(zo,{sx:x,children:m?er(qm,{sprint:m,tasks:b,todayStr:l,height:"100%",headerLeft:k}):ic(zo,{sx:mr("100%"),children:[er(zo,{sx:zr,children:k}),er(Kr,{text:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694.",height:"100%"})]})})},{id:"cumulative-flow",tabTitle:"\uB204\uC801\uD750\uB984\uB3C4",showTitle:!1,children:er(zo,{sx:x,children:er(Ym,{tasks:b,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:er(zo,{sx:x,children:B==="timeline"?ic(zo,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[er(zo,{sx:zr,children:T}),er(p0,{tasks:b,todayStr:l,height:"100%"})]}):er(s0,{tasks:b,todayStr:l,height:"100%",capacity:s,headerLeft:T,selectedAccountSeq:N,onSelectPerson:n?q:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:er(zo,{sx:x,children:er(Qm,{tasks:b,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:er(g0,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),er(d0,{open:N>0,row:S,rows:j,tasks:b,todayStr:l,employees:r,onClose:()=>q(0),onChangeManager:n,onOpenTask:c}),t?er(Nm,{open:A,capacity:s,employees:r,onClose:()=>D(!1),onSave:async y=>{await t(y),D(!1)}}):null]})}import{Checkbox as Q8,Divider as eS,Menu as tS,MenuItem as Bf}from"@mui/material";import{jsx as ha,jsxs as x0}from"react/jsx-runtime";function ZU({anchorEl:e,candidates:d,selectedNames:b,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return x0(tS,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[d.length===0?ha(Bf,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):d.map(t=>{let n=b.includes(t.name);return x0(Bf,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[ha(Q8,{size:"small",checked:n,sx:{p:0}}),ha($r,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),ha(eS,{}),ha(Bf,{disabled:b.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as rS}from"react";import{ButtonBase as nS,Menu as oS,MenuItem as iS}from"@mui/material";import sS from"@mui/icons-material/KeyboardArrowDown";import aS from"@mui/icons-material/Check";import{Fragment as lS,jsx as If,jsxs as Mf}from"react/jsx-runtime";function iV({value:e,onChange:d,options:b}){let[l,o]=rS(null),s=b??Ac,r=Ac.find(t=>t.value===e)?.label??"";return Mf(lS,{children:[Mf(nS,{onClick:t=>o(t.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[r,If(sS,{sx:{fontSize:17,color:"#9a9a97"}})]}),If(oS,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>Mf(iS,{selected:t.value===e,onClick:()=>{d(t.value),o(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[t.label,t.value===e?If(aS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}import{Box as sc,ButtonBase as cS}from"@mui/material";import{DateTextField as v0}from"@ehfuse/mui-form-controls";import{jsx as pa,jsxs as w0}from"react/jsx-runtime";var uS=[{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 _0({fromDate:e,toDate:d,onChange:b}){let l=s=>{if(s<=0){b("","");return}b(No(Jl(s)),No(new Date))},o=s=>s<=0?!e&&!d:!e||!d?!1:e===No(Jl(s))&&d===No(new Date);return w0(sc,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[pa(sc,{sx:{display:"flex",alignItems:"center",gap:1.5},children:uS.map(s=>{let r=o(s.months);return pa(cS,{onClick:()=>l(s.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:r?500:400,border:"1px solid",borderColor:r?"#2f80ed":"#dedddb",color:r?"#2f80ed":"#37352f",bgcolor:r?"#eef6ff":"transparent","&:hover":{bgcolor:r?"#eef6ff":"#f7f7f5"}},children:s.label},s.label)})}),w0(sc,{sx:{display:"flex",alignItems:"center",gap:.5},children:[pa(v0,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>b(s.target.value,d),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),pa(sc,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),pa(v0,{value:d,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>b(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as fS}from"@mui/material";import{jsx as k0}from"react/jsx-runtime";function mV({anchorEl:e,fromDate:d,toDate:b,onChange:l,onClose:o}){return k0(fS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:k0(_0,{fromDate:d,toDate:b,onChange:l})})}import{Box as dS,ButtonBase as hS,Tab as pS,Tabs as mS}from"@mui/material";import gS from"@mui/icons-material/Checklist";import bS from"@mui/icons-material/Face";import yS from"@mui/icons-material/Publish";import xS from"@mui/icons-material/NotificationsOutlined";import vS from"@mui/icons-material/BugReportOutlined";import wS from"@mui/icons-material/SupportAgentOutlined";import _S from"@mui/icons-material/DescriptionOutlined";import kS from"@mui/icons-material/Inventory2Outlined";import{jsx as In}from"react/jsx-runtime";function S0(e,d){return d>0?`${e} (${d})`:e}var MV=[{id:"my",label:"\uC804\uCCB4",icon:In(gS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:In(bS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:In(yS,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:In(wS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:In(vS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:In(xS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:In(kS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:In(_S,{sx:{fontSize:18}}),hideCount:!0}];function SS(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 EV({items:e,activeTab:d,counts:b,onChange:l,compact:o=!1}){let s=lt(),r=SS(s.tabs),t=e;return o?In(dS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=d===n.id;return In(hS,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Mr(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?s.tabs.selectedBg:s.tabs.bg,color:c?s.tabs.selectedColor:s.tabs.color,borderColor:c?s.tabs.selectedBg:s.tabs.borderColor},children:S0(n.label,n.hideCount?0:b[n.id]??0)},n.id)})}):In(mS,{value:d,onChange:(n,c)=>l(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:t.map(n=>In(pS,{value:n.id,label:S0(n.label,n.hideCount?0:b[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}import{useEffect as TS,useMemo as CS,useState as Ef}from"react";import{Divider as ac,ListItemIcon as Xr,Menu as Rf,MenuItem as Ir}from"@mui/material";import BS from"@mui/icons-material/OpenInNewOutlined";import IS from"@mui/icons-material/RestoreFromTrashOutlined";import MS from"@mui/icons-material/Check";import ES from"@mui/icons-material/CheckCircleOutlined";import RS from"@mui/icons-material/RadioButtonUnchecked";import OS from"@mui/icons-material/SendOutlined";import AS from"@mui/icons-material/EventOutlined";import DS from"@mui/icons-material/PersonOutlineOutlined";import PS from"@mui/icons-material/ViewKanbanOutlined";import NS from"@mui/icons-material/ContentCopyOutlined";import LS from"@mui/icons-material/NextPlanOutlined";import zS from"@mui/icons-material/ContentPasteOutlined";import jS from"@mui/icons-material/ShareOutlined";import FS from"@mui/icons-material/DirectionsRunOutlined";import T0 from"@mui/icons-material/ChevronRight";import qS from"@mui/icons-material/ArchiveOutlined";import $S from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as C0}from"@ehfuse/alerts";import{Fragment as B0,jsx as ft,jsxs as br}from"react/jsx-runtime";function lK({target:e,onClose:d,customTabs:b,sprints:l=[],myAccountSeq:o=0,onOpenDetail:s,onToggleCompleted:r,onRequestConfirm:t,onChangeDueDate:n,onChangeReminder:c,onMemberEdit:i,onMoveProject:a,onDuplicate:h,onCreateFollowUp:f,onShare:u,onAssignSprint:g,onArchiveToggle:m,onDelete:x,onRestore:k,onPurge:B}){let R=zt(),L=Un(),[A,D]=Ef(null),[N,q]=Ef(null),[j,S]=Ef(null);TS(()=>{e||(D(null),q(null),S(null))},[e]);let T=e?.task??null,P=!!T?.is_notice,p=!!T?.is_event,y=T?!yo(T,o):!1,v=!!T?.deleted,w=CS(()=>new Set(b.filter(z=>z.useSprints).map(z=>z.key)),[b]),_=async(z="one")=>{let $=T;if(d(),!$)return;await C0({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:z==="series"?`"${$.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${$.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&x($.seq,z)},C=async()=>{let z=T;if(d(),!z)return;await C0({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${z.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&B?.(z.seq)},O=()=>{T&&m(T.seq,!T.archived),d()};return br(B0,{children:[br(Rf,{open:!!e,onClose:d,transitionDuration:0,anchorReference:R?"none":"anchorPosition",anchorPosition:!R&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...R?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:R?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[br(Ir,{onClick:()=>{T&&s(T),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(BS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),v?ft(ac,{}):null,v&&k?br(Ir,{onClick:()=>{T&&k(T.seq),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(IS,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,v&&B?br(Ir,{onClick:()=>{C()},sx:{fontSize:14,color:"#e5484d"},children:[ft(Xr,{children:ft(dr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,v?null:br(B0,{children:[br(Ir,{disabled:P?(T?.author_account_seq??0)!==o:(T?.author_account_seq??0)!==o&&(T?.manager_account_seq??0)!==o,onClick:()=>{T&&r(T.seq,!T.completed),d()},sx:{fontSize:14},children:[ft(Xr,{children:T?.completed?ft(RS,{sx:{fontSize:19}}):ft(ES,{sx:{fontSize:19}})}),T?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!P&&t?br(Ir,{disabled:!(T?.manager_account_seq??0)&&(T?.receiver_account_seqs??[]).length===0,onClick:()=>{T&&t(T),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(OS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:ft(ac,{}),p?null:br(Ir,{disabled:y,onClick:z=>{T&&D({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[ft(Xr,{children:ft(AS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!P&&!p&&i?br(Ir,{onClick:()=>{T&&i(T,"manager"),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(DS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:br(Ir,{disabled:y,onClick:z=>{T&&q({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[ft(Xr,{children:ft(PS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",ft(T0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),ft(ac,{}),h?br(Ir,{disabled:y,onClick:()=>{T&&h(T.seq),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(NS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,f&&T&&!T.is_event&&!T.is_notice?br(Ir,{onClick:()=>{T&&f(T.seq),d()},sx:{fontSize:14},children:[ft(Xr,{children:ft(LS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,br(Ir,{onClick:()=>{T&&(u?u(T):os(T,R)),d()},sx:{fontSize:14},children:[ft(Xr,{children:R?ft(jS,{sx:{fontSize:19}}):ft(zS,{sx:{fontSize:19}})}),R?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),T&&!T.is_notice&&!T.is_event&&w.has(String(T.tab_key??""))&&g?br(Ir,{onClick:z=>S(z.currentTarget),sx:{fontSize:14},children:[ft(Xr,{children:ft(FS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",ft(T0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,br(Ir,{onClick:O,disabled:y||!T?.archived&&!(T&&Fa(T)),sx:{fontSize:14},children:[ft(Xr,{children:T?.archived?ft($S,{sx:{fontSize:19}}):ft(qS,{sx:{fontSize:19}})}),T?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),ft(ac,{}),br(Ir,{disabled:y,onClick:()=>{_("one")},sx:{fontSize:14,color:"#e5484d"},children:[ft(Xr,{children:ft(dr,{sx:{fontSize:19,color:"#e5484d"}})}),(T?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(T?.repeat_group_key??0)>0?br(Ir,{disabled:y,onClick:()=>{_("series")},sx:{fontSize:14,color:"#e5484d"},children:[ft(Xr,{children:ft(dr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),ft(_n,{anchorEl:A?.anchorEl??null,open:!!A,date:A?.task.due_date??"",reminders:Gn(A?.task),hideReminder:!!A?.task.completed,centered:R,onClose:()=>{D(null),d()},onDateChange:z=>{A&&n(A.task.seq,z)},onReminderChange:z=>{A&&c?.(A.task.seq,z)}}),br(Rf,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{q(null),d()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...L,children:[ft(Ir,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),q(null),d()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),b.filter(z=>!z.archived).map(z=>ft(Ir,{selected:N?.task.tab_key===z.key,onClick:()=>{N&&a(N.task.seq,z.key),q(null),d()},sx:{fontSize:14,minWidth:170},children:z.label},z.key))]}),ft(Rf,{transitionDuration:0,anchorEl:j,open:!!j,onClose:()=>S(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...l.filter(z=>`custom-${z.group_seq}`===String(T?.tab_key??"")).map(z=>({seq:z.seq,label:kn(z)}))].map(z=>br(Ir,{onClick:()=>{T&&g?.(T.seq,z.seq),S(null),d()},sx:{fontSize:14,minWidth:160,gap:1},children:[z.label,(T?.sprint_seq??0)===z.seq?ft(MS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},z.seq))})]})}import{Checkbox as HS,Divider as WS,Menu as US,MenuItem as I0}from"@mui/material";import{jsx as lc,jsxs as M0}from"react/jsx-runtime";function hK({anchorEl:e,labelOptions:d,selectedKeys:b,onToggle:l,onClear:o,onClose:s}){return M0(US,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[d.map(r=>{let t=b.includes(r.key);return M0(I0,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[lc(HS,{size:"small",checked:t,sx:{p:0}}),lc(Pt,{option:r})]},r.key)}),lc(WS,{}),lc(I0,{disabled:b.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as VS,Menu as KS,MenuItem as E0}from"@mui/material";import GS from"@mui/icons-material/Check";import YS from"@mui/icons-material/SettingsOutlined";import{jsx as Of,jsxs as Af}from"react/jsx-runtime";function vK(e){let{anchorEl:d,sprints:b,value:l,onSelect:o,onManage:s,onClose:r}=e;return Af(KS,{transitionDuration:0,anchorEl:d,open:!!d,onClose:r,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...b.map(t=>({seq:t.seq,label:kn(t)}))].map(t=>Af(E0,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?Of(GS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),Of(VS,{}),Af(E0,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[Of(YS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var XS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function ZS(e){return XS[e]??"tasks"}var O0={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"},R0=["list","calendar","month","card","kanban","sprint","timeline"],JS=["list","kanban"],QS=["list","card"];function kK(e){let d=ZS(e);switch(d){case"notice":return{kind:d,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:d,viewOptions:R0,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"support":return{kind:d,viewOptions:JS,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:d,viewOptions:QS,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:d,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:d,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:d,viewOptions:R0,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"}:{}}}}import{useMemo as eT}from"react";import{useKeyboardState as tT}from"@ehfuse/keyboard-state";var A0=[{key:"g l",view:"list"},{key:"g b",view:"card"},{key:"g k",view:"kanban"},{key:"g s",view:"sprint"},{key:"g c",view:"calendar"},{key:"g m",view:"month"},{key:"g t",view:"timeline"}];function IK(e,d={}){let{enabled:b=!0,views:l}=d,{onCreateTask:o,onFocusSearch:s,onToggleHelp:r,onChangeView:t,onRefresh:n,onEscape:c}=e,i=l?l.join(","):"",a=eT(()=>{let h=[];if(o&&h.push({key:"n",callback:o,options:{preventDefault:!0}}),s&&h.push({key:"/",callback:s,options:{preventDefault:!0}}),n&&h.push({key:"r",callback:n,options:{preventDefault:!0}}),r&&h.push({key:"shift+?",callback:r,options:{preventDefault:!0}}),c&&h.push({key:"escape",callback:c,options:{allowInEditable:!0}}),t)for(let f of D0(i?i.split(","):void 0))h.push({key:f.key,callback:()=>t(f.view),options:{preventDefault:!0}});return h},[o,s,r,t,n,c,i]);tT(b?a:[])}function D0(e){if(!e)return A0;let d=new Set(e);return A0.filter(b=>d.has(b.view))}function ma(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...D0(e).map(d=>({keys:d.key.split(" ").map(b=>b.toUpperCase()).join(" \u2192 "),description:`${O0[d.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var MK=ma();import{Box as ga,Button as rT}from"@mui/material";import nT from"@mui/icons-material/ArrowRightAlt";import{FormDialog as oT}from"@ehfuse/mui-form-dialog";import{jsx as ai,jsxs as P0}from"react/jsx-runtime";function iT({keys:e}){return ai(ga,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((d,b)=>P0(ga,{sx:{display:"flex",alignItems:"center",gap:.5},children:[b>0?ai(nT,{sx:{fontSize:18,color:"#9a9a97"}}):null,ai(ga,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:"#37352f",bgcolor:"#f4f4f2",border:"1px solid #e0dfdb",borderRadius:1,fontVariantNumeric:"tabular-nums"},children:d})]},`${d}-${b}`))})}function PK({open:e,onClose:d,views:b}){let l=ma(b);return ai(oT,{open:e,onClose:d,maxWidth:"xs",title:"\uB2E8\uCD95\uD0A4",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"shortcuts",showTitle:!1,children:ai(ga,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>P0(ga,{sx:{display:"contents"},children:[ai(iT,{keys:o.keys}),ai("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:ai(rT,{variant:"contained",onClick:d,children:"\uB2EB\uAE30"})}})}import{Fragment as sT,useEffect as aT,useState as lT}from"react";import{Box as ho,Button as cT}from"@mui/material";import uT from"@mui/icons-material/ArrowRightAlt";import{FormDialog as fT}from"@ehfuse/mui-form-dialog";var N0={id:"basics",tabTitle:"\uAE30\uBCF8",topics:[{title:"\uD0ED \uAD6C\uC131",lines:["**\uC804\uCCB4** \u2014 \uB0B4\uAC00 \uBCFC \uC218 \uC788\uB294 \uBAA8\uB4E0 \uC5C5\uBB34. \uB0B4 \uC5C5\uBB34\xB7\uCC45\uC784\uC790\uBCC4\xB7\uC77C\uC815 \uADF8\uB8F9\uC73C\uB85C \uB098\uB258\uC5B4 \uBCF4\uC785\uB2C8\uB2E4.","**\uB0B4 \uC5C5\uBB34** \u2014 \uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uB85C \uC9C0\uC815\uB41C \uC5C5\uBB34\uB9CC \uBAA8\uC74D\uB2C8\uB2E4.","**\uBCF4\uB0B8 \uC5C5\uBB34** \u2014 \uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4.","**\uACF5\uC9C0\uC0AC\uD56D** \u2014 \uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815 \uB300\uC0C1\uC790\uC5D0\uAC8C \uC54C\uB9AC\uB294 \uAE00. \uB300\uC0C1\uC790\uB294 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4.",'**\uBCF4\uAD00\uD568** \u2014 \uC644\uB8CC \uD6C4 \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815, \uACE0\uAC1D\uC13C\uD130 \uAE00, \uD734\uC9C0\uD1B5\uC744 "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.']},{title:"\uC624\uB958 \uD0ED",feature:"bug",lines:["\uD504\uB85C\uADF8\uB7A8 \uC624\uB958 \uC811\uC218 \uC804\uC6A9 \uD0ED\uC785\uB2C8\uB2E4. \uD2F0\uCF13\uBC88\uD638\uAC00 \uBD99\uACE0 \uC811\uC218 \u2192 \uCC98\uB9AC \u2192 \uC885\uB8CC\uC758 \uC0DD\uC560\uC8FC\uAE30\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uC624\uB958 \uD0ED\uC740 \uAC1C\uBC1C\uC0AC(\uCF54\uB4DC\uC0F5) \uC804\uC6A9\uC774\uBA70, \uAC00\uB9F9\uC810\uC5D0\uC11C \uC811\uC218\uD55C \uC624\uB958 \uC81C\uBCF4\uB294 \uACE0\uAC1D\uC13C\uD130 \uD0ED\uC5D0 "\uC624\uB958" \uC885\uB958\uB85C \uC313\uC785\uB2C8\uB2E4.']},{title:"\uACE0\uAC1D\uC13C\uD130 \uD0ED",feature:"support",lines:["\uAC00\uB9F9\uC810\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\uC0AC\uD56D\xB7\uC624\uB958 \uC81C\uBCF4\uC640 \uD648\uD398\uC774\uC9C0 \uC0C1\uB2F4\uC2E0\uCCAD\uC774 \uC5C5\uBB34\uB85C \uC313\uC785\uB2C8\uB2E4.","**\uAC00\uC838\uAC00\uAE30**\uB85C \uCC45\uC784\uC790\uAC00 \uB418\uACE0, \uB313\uAE00\uB85C \uB2F5\uBCC0\uD558\uBA74 \uC791\uC131\uC790(\uAC00\uB9F9\uC810)\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4. \uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0 \uC218\uC815\xB7\uBC30\uC815 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC791\uC131\uC790\xB7\uB2F5\uBCC0\uC790 \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC774\uB984\uC73C\uB85C \uAC70\uB97C \uC218 \uC788\uACE0, \uC791\uC131\uC790 \uC774\uB984\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB9AC\uBA74 \uAC00\uB9F9\uC810\uBA85\uC774 \uBCF4\uC785\uB2C8\uB2E4."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** \u2014 \uB05D\uB09C \uC5C5\uBB34\uB97C \uBAA9\uB85D\xB7\uBCF4\uB4DC\xB7\uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778(\uD560\uC77C \uD3EC\uD568)\uC5D0\uC11C \uAC10\uCDA5\uB2C8\uB2E4.","**\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** \u2014 \uAD6C\uAE00 \uB4F1\uC5D0\uC11C \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354 \uBCF4\uAE30\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4(\u22EE \u203A \uCE98\uB9B0\uB354 \uC5F0\uB3D9\uC5D0\uC11C \uC124\uC815).","**\uBAA8\uB4E0 \uC9C1\uC6D0** \u2014 (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4.","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uC2A4\uC704\uCE58\uB4E4\uC740 \uC624\uB978\uCABD **\u22EE \uBA54\uB274** \uC548\uC73C\uB85C \uB4E4\uC5B4\uAC11\uB2C8\uB2E4."]},{title:"\uC0AD\uC81C\xB7\uBCF4\uAD00 \uADDC\uCE59",lines:["**\uC644\uB8CC \u2192 \uBCF4\uAD00** \u2014 \uC644\uB8CC(\uACF5\uC9C0\uB294 \uAC8C\uC2DC\uC885\uB8CC)\uD55C \uC5C5\uBB34\uB294 \uC5C5\uBB34\uD568 \uC124\uC815\uC758 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C)\uC774 \uC9C0\uB098\uBA74 \uB9E4\uC77C \uC0C8\uBCBD \uC790\uB3D9\uC73C\uB85C \uBCF4\uAD00\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4. \uC6B0\uD074\uB9AD \u203A **\uBCF4\uAD00**\uC73C\uB85C \uBC14\uB85C \uBCF4\uB0BC \uC218\uB3C4 \uC788\uACE0, \uBCF4\uAD00\uD568\uC5D0\uC11C **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","**\uC0AD\uC81C \u2192 \uD734\uC9C0\uD1B5** \u2014 \uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uACE0(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58), \uC9C0\uC6B4 \uC5C5\uBB34\uB294 \uD734\uC9C0\uD1B5\uC5D0 \uB4E4\uC5B4\uAC00 **\uB418\uC0B4\uB9AC\uAE30**\uB85C \uBCF5\uAD6C\uB429\uB2C8\uB2E4. \uD734\uC9C0\uD1B5\uC740 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB97C \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C\uB294 "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.',"**\uD504\uB85C\uC81D\uD2B8** \u2014 \uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4(\uBBF8\uC644\uB8CC\uAC00 \uB0A8\uC544 \uC788\uC73C\uBA74 \uC548\uB0B4). \uC0AD\uC81C\uD558\uBA74 \uD504\uB85C\uC81D\uD2B8\uB9CC \uC5C6\uC5B4\uC9C0\uACE0 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4.",'\uACE0\uAC1D\uC13C\uD130 \uAE00\uB3C4 \uAC19\uC740 \uADDC\uCE59\uC73C\uB85C \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uB418\uBA70, \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC5D0\uC11C \uBD05\uB2C8\uB2E4.']}]};var L0={id:"roles",tabTitle:"\uC5ED\uD560\xB7\uC54C\uB9BC",topics:[{title:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790",lines:["**\uC791\uC131\uC790** \u2014 \uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC73C\uB85C \uB0B4\uC6A9\uC744 \uACE0\uCE58\uACE0, \uC644\uB8CC \uCCB4\uD06C\xB7\uC0AD\uC81C(\uD734\uC9C0\uD1B5)\uB97C \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uCC45\uC784\uC790** \u2014 \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(1\uBA85). \uD655\uC778\xB7\uC644\uB8CC \uCCB4\uD06C\uB97C \uD558\uACE0, \uD560\uC77C\uC744 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uC5C5\uBB34\uB97C \uB098\uB20C \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uCC38\uC870\uC790** \u2014 \uD568\uAED8 \uC54C\uACE0 \uC788\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85). \uC77D\uACE0 \uB313\uAE00\uC744 \uB2EC\uBA70 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4.",'\uC138 \uC5ED\uD560\uC740 \uBAA8\uB450 \uAD00\uC5EC\uC790\uC785\uB2C8\uB2E4. \uACF5\uAC1C \uBC94\uC704\uAC00 "\uAD00\uC5EC\uC790\uB9CC"\uC774\uC5B4\uB3C4 \uC11C\uB85C \uBCF4\uC774\uACE0, \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uBC14\uB85C \uBC14\uAFC0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.']},{title:"\uB204\uAC00 \uC5B8\uC81C \uC54C\uB9BC\uC744 \uBC1B\uB098",lines:['**\uCC45\uC784\uC790** \u2014 \uC9C0\uC815\uB420 \uB54C(\uBC30\uC815), \uB0B4\uC6A9\uC774 \uACE0\uCCD0\uC9C8 \uB54C, \uC791\uC131\uC790\uAC00 \uB313\uAE00\uC744 \uB2EC \uB54C, \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uBBF8\uB798\uBA74 \uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC \uC624\uACE0, \uC2DC\uC791\uC77C\uC2DC\uC5D0 "\uC0C8 \uC5C5\uBB34\uAC00 \uBC30\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4" \uD478\uC2DC\uAC00 1\uD68C \uC635\uB2C8\uB2E4.',"**\uC791\uC131\uC790** \u2014 \uCC45\uC784\uC790\uAC00 \uBC14\uB014 \uB54C, \uB204\uAD70\uAC00 \uAC00\uC838\uAC00\uAE30 \uD560 \uB54C, \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD588\uC744 \uB54C, \uC644\uB8CC\uB410\uC744 \uB54C, \uB2E4\uB978 \uC0AC\uB78C\uC774 \uB313\uAE00\uC744 \uB2EC \uB54C, \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0.","**\uCC38\uC870\uC790** \u2014 \uC0C8\uB85C \uCC38\uC870\uB85C \uC9C0\uC815\uB420 \uB54C, \uC644\uB8CC\uB410\uC744 \uB54C. \uCC45\uC784\uC790\uAC00 \uC544\uC9C1 \uC5C6\uB294 \uC5C5\uBB34\uB77C\uBA74 \uB313\uAE00\uB3C4 \uBC1B\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10 \uC54C\uB9BC\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uB313\uAE00 \uB300\uD654** \u2014 \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uAC00\uBBC0\uB85C, \uB2F5\uAE00\uC744 \uC8FC\uACE0\uBC1B\uB294 \uB450 \uC0AC\uB78C\uC5D0\uAC8C \uC774\uC5B4\uC9D1\uB2C8\uB2E4. \uB313\uAE00 \uBC18\uC751(\uC88B\uC544\uC694\xB7\uD655\uC778)\uC740 \uADF8 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uAC11\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uD55C \uD589\uB3D9\uC740 \uBCF8\uC778\uC5D0\uAC8C \uC54C\uB9AC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC885\uB958\uBCC4 \uC218\uC2E0 \uC5EC\uBD80\uB294 **\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uBC14\uAFC9\uB2C8\uB2E4."]},{title:"\uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815",lines:["**\uC2DC\uC791\uC77C\uC2DC** \u2014 \uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uD478\uC2DC \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4(\uBBF8\uB798\uB85C \uC7A1\uC73C\uBA74 \uADF8 \uC804\uAE4C\uC9C0\uB294 \uBCA8\uC5D0\uB9CC \uC313\uC784). \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4.","**\uB9C8\uAC10\uC608\uC815** \u2014 \uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\uC54C\uB9BC(\uC5C5\uBB34\uD568 \uC124\uC815 \uC2DC\uAC01)\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0 \uC54C\uB9BC\uC758 \uAE30\uC900\uC774\uACE0, \uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778\uC5D0 \uB193\uC774\uB294 \uB0A0\uC9DC\uC785\uB2C8\uB2E4. \uC9C0\uB09C \uB9C8\uAC10\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uB9C8\uAC10\uC608\uC815 \uC5C6\uC774 \uC644\uB8CC\uD558\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC774 \uB9C8\uAC10\uC608\uC815\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uB294 \uCC44\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC77C\uC815(\uC2DC\uAC01 \uC788\uB294 \uD589\uC0AC)\uC740 \uB9C8\uAC10\uC608\uC815 \uB300\uC2E0 **\uC77C\uC2DC**\uAC00 \uAE30\uC900\uC774\uACE0, \uCC38\uC11D\uC790 \uC804\uC6D0\uACFC \uC791\uC131\uC790\uAC00 \uC54C\uB9BC\uC744 \uBC1B\uC2B5\uB2C8\uB2E4."]}]};var z0={id:"tasks",tabTitle:"\uC5C5\uBB34",topics:[{title:"\uC5C5\uBB34 \uB4F1\uB85D",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC \uB610\uB294 \uB2E8\uCD95\uD0A4 **N**. \uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uB9C8\uAC10\uC608\uC815\xB7\uC911\uC694\uB3C4\uB97C \uC815\uD569\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** \u2014 \uAD00\uC5EC\uC790\uB9CC / \uBD80\uC11C / \uC804\uCCB4 \uC9C1\uC6D0. \uCC45\uC784\uC790\uAC00 \uC5C6\uB294 \uACF5\uAC1C \uC5C5\uBB34\uB294 \uC5F4\uB78C\uC790\uAC00 **\uAC00\uC838\uAC00\uAE30**\uB85C \uB9E1\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",'**\uBC18\uBCF5** \u2014 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uB4F1\uC73C\uB85C \uD68C\uCC28\uB97C \uB9CC\uB4E4\uACE0, \uC644\uB8CC\xB7\uC0AD\uC81C \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.','**\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\xB7\uAD50\uC721 \uB4F1\uC785\uB2C8\uB2E4. \uC644\uB8CC \uAC1C\uB150\uC774 \uC5C6\uACE0 \uCE98\uB9B0\uB354\uC640 \uC804\uCCB4 \uD0ED "\uC77C\uC815" \uADF8\uB8F9\uC5D0 \uB098\uC635\uB2C8\uB2E4.']},{title:"\uC5C5\uBB34 \uC0C1\uC138",lines:["\uC81C\uBAA9\xB7\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD \uC0C1\uC138 \uD328\uB110(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74)\uC774 \uC5F4\uB9BD\uB2C8\uB2E4. \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uBC14\uB85C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","**\uB0B4\uC6A9**\uC740 \uBCF8\uBB38 \uC591\uC2DD(\u22EE \u203A \uBCF8\uBB38 \uC591\uC2DD)\uC73C\uB85C \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC62C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",'**\uC5C5\uBB34 \uB300\uD654\uB294 \uB313\uAE00\uB85C** \uD569\uB2C8\uB2E4. \uB313\uAE00\uC5D0\uB294 \uD30C\uC77C\xB7\uC774\uBBF8\uC9C0\uB97C \uBD99\uC774\uACE0, \uB313\uAE00\uC5D0 **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC744 \uB0A8\uACA8 "\uC77D\uC5C8\uB2E4/\uB3D9\uC758\uD55C\uB2E4"\uB97C \uD45C\uC2DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uBC18\uC751\uC740 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC).',"\uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uBBC0\uB85C \uB2F5\uAE00\uC774 \uC624\uAC00\uB294 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uACE0\uAC1D\uC13C\uD130 \uAE00\uC740 \uCF54\uB4DC\uC0F5 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC73C\uB85C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58\uC740 \uC791\uC131\uC790\uB9CC \uBCF4\uC785\uB2C8\uB2E4.","\uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 \uC624\uB978\uCABD \uC704 **\u22EE** \uC5D0 \uD65C\uB3D9\xB7\uACF5\uC720\xB7\uC0AD\uC81C\uAC00 \uC788\uACE0, \uACE0\uCE5C \uB0B4\uC6A9\uC740 **\uC800\uC7A5\uD558\uAE30**\uB85C \uD55C \uBC88\uC5D0 \uBCF4\uB0C5\uB2C8\uB2E4."]},{title:"\uC0C1\uD0DC\uC640 \uC644\uB8CC",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4. \uBA54\uB274\uC758 **\uC644\uB8CC**\uB294 \uD655\uC778 \uC5C6\uC774 \uBC14\uB85C \uC644\uB8CC \uCC98\uB9AC\uB429\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uACE0, \uD655\uC778 \uD31D\uC5C5\uC744 \uAC70\uCCD0 \uC801\uC6A9\uB429\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4.",'\uB9C8\uAC10\uC608\uC815\uC740 \uC9C0\uB09C \uAC83\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB418\uBA70, \uC9C0\uC5F0 \uAC74\uC218\uB294 \uADF8\uB8F9 \uBA38\uB9AC\uC904\uC5D0 "\uC9C0\uC5F0 n\uAC74"\uC73C\uB85C \uBCF4\uC785\uB2C8\uB2E4.','**\uC644\uB8CC \uB418\uB3CC\uB9AC\uAE30** \u2014 \uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uC758 \uACB0\uACFC\uAC00 \uBBF8\uD761\uD558\uBA74 \uC791\uC131\uC790\uB294 \uC644\uB8CC \uCCB4\uD06C \uD574\uC81C(\uC0C1\uC138\uC5D0\uC11C\uB294 "\uB418\uB3CC\uB9AC\uAE30" \uBC84\uD2BC) \uB54C \uC0AC\uC720\uB97C \uC801\uC5B4 \uB418\uB3CC\uB9BD\uB2C8\uB2E4. \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC0C1\uD0DC\uB294 \uC9C4\uD589\uC911\uC73C\uB85C \uB3CC\uC544\uAC00\uBA70 \uC644\uB8CC \uCC98\uB9AC\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.']},{title:"\uAD00\uB828 \uC5C5\uBB34",lines:["\uC0C1\uC138\uC758 **\uAD00\uB828 \uC5C5\uBB34**\uC5D0\uC11C \uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30, \uAD00\uB828\xB7\uC911\uBCF5 \uC5C5\uBB34 \uC5F0\uACB0\uC744 \uD569\uB2C8\uB2E4.","\uC6B0\uD074\uB9AD \uBA54\uB274\uC5D0\uC11C \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9, \uBAA9\uD45C\uC5D0 \uB123\uAE30, \uBCF4\uAD00, \uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]}]};var j0={id:"checklist",tabTitle:"\uD560\uC77C",topics:[{title:"\uD560\uC77C \uBAA9\uB85D",lines:['\uC0C1\uC138\uC758 **\uD560\uC77C**\uC5D0 \uD56D\uBAA9\uC744 \uC801\uACE0 \uCCB4\uD06C\uD569\uB2C8\uB2E4. \uC9C4\uD589\uC740 \uBAA9\uB85D\xB7\uCE74\uB4DC\uC5D0 "1/3"\uCC98\uB7FC \uD45C\uC2DC\uB429\uB2C8\uB2E4.',"\uD0C0\uC784\uB77C\uC778 \uBCF4\uAE30\uC5D0\uC11C\uB294 \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uBA70, \uCCB4\uD06C\uD558\uBA74 \uD655\uC778 \uD31D\uC5C5 \uB4A4 \uC644\uB8CC\uB429\uB2C8\uB2E4."]},{title:"\uD560\uC77C\uC744 \uC5C5\uBB34\uB85C \u2014 \uC5C5\uBB34 \uB098\uB204\uAE30(\uBD84\uC7A5)",lines:["\u2460 \uC791\uC131\uC790\uAC00 \uD070 \uC5C5\uBB34\uB97C \uB4F1\uB85D\uD558\uACE0 \uCC45\uC784\uC790\uB97C \uC815\uD55C \uB4A4, \uD560\uC77C\uC5D0 \uD574\uC57C \uD560 \uC77C\uC744 \uD56D\uBAA9\uC73C\uB85C \uC801\uC2B5\uB2C8\uB2E4.","\u2461 \uCC45\uC784\uC790\uB294 \uD560\uC77C \uD56D\uBAA9\uC758 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB85C \uAC01 \uD56D\uBAA9\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD558\uACE0, \uADF8 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\xB7\uB9C8\uAC10\uC608\uC815\uC744 \uC815\uD574 \uD300\uC6D0\uC5D0\uAC8C \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4.",'\u2462 \uC2B9\uACA9\uB41C \uC5C5\uBB34\uB294 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uC5D0 \uC5F0\uACB0\uB41C \uCC44\uB85C \uB0A8\uC544, \uD300\uC6D0\uC774 \uC644\uB8CC\uD558\uBA74 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uB3C4 \uC644\uB8CC\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4("3/4" \uC9C4\uD589 \uD45C\uC2DC).',"\u2463 \uB098\uB220 \uC900 \uC5C5\uBB34\uB07C\uB9AC \uB313\uAE00\uB85C \uB300\uD654\uD558\uACE0, \uBAA8\uB450 \uB05D\uB098\uBA74 \uCC45\uC784\uC790\uAC00 \uC6D0\uB798 \uC5C5\uBB34\uB97C \uC644\uB8CC\uD569\uB2C8\uB2E4.","\uC774\uBBF8 \uC788\uB294 \uC5C5\uBB34\uB97C \uD560\uC77C\uC5D0 \uBD99\uC77C \uC218\uB3C4 \uC788\uACE0, \uC5F0\uACB0 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC5D0 \uBCF4\uB0B4\uBA74 \uD560\uC77C\uC5D0\uC11C\uB3C4 \uBE60\uC9D1\uB2C8\uB2E4(\uAC74\uC218\uB3C4 \uD568\uAED8 \uB9DE\uCDB0\uC9D1\uB2C8\uB2E4)."]}]};var F0={id:"confirm",tabTitle:"\uD655\uC778\xB7\uC54C\uB9BC",topics:[{title:"\uD655\uC778 \uC694\uCCAD\uACFC \uD655\uC778 \uC644\uB8CC",lines:['\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB294 \uBC30\uC815\uB41C \uC5C5\uBB34\uB97C **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C \uCC98\uB9AC\uD569\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uD45C \uB9E8 \uC704 "\uBBF8\uD655\uC778" \uC601\uC5ED\uACFC \uBAA8\uBC14\uC77C "\uBBF8\uD655\uC778" \uADF8\uB8F9\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.',"\uD655\uC778 \uC5F4\uC758 **n/m** \uC744 \uB204\uB974\uBA74 \uB204\uAC00 \uD655\uC778\uD588\uB294\uC9C0 \uBCF4\uC774\uACE0, \uC791\uC131\uC790\uB294 \uBBF8\uD655\uC778\uC790\uC5D0\uAC8C **\uD655\uC778 \uC694\uCCAD**\uC744 \uB2E4\uC2DC \uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uACF5\uC9C0\uC0AC\uD56D\uC740 \uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD558\uBA70, \uD655\uC778 \uC5F4 \uD544\uD130(\uC804\uCCB4/\uBBF8\uD655\uC778/\uD655\uC778\uD568)\uB85C \uAC70\uB985\uB2C8\uB2E4."]},{title:"\uC54C\uB9BC",lines:["\uBC30\uC815\xB7\uB2F4\uB2F9\uC790 \uBCC0\uACBD\xB7\uCC38\uC870 \uC9C0\uC815\xB7\uB313\uAE00\xB7\uB313\uAE00 \uBC18\uC751\xB7\uD655\uC778 \uC694\uCCAD\xB7\uD655\uC778 \uC644\uB8CC\xB7\uC5C5\uBB34 \uC644\uB8CC\xB7\uC218\uC815\xB7\uB9C8\uAC10 \uC54C\uB9BC\uC774 \uBCA8\uACFC \uC571 \uD478\uC2DC\uB85C \uC635\uB2C8\uB2E4.","**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uB044\uACE0 \uCF24 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC \uC2DC\uAC01\uC740 \uC5C5\uBB34\uD568 \uC124\uC815(\uAD00\uB9AC\uC790)\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4.",'\uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uAC11\uB2C8\uB2E4(\uC2DC\uC791\uC77C\uC2DC\uAC00 \uBBF8\uB798\uBA74 \uADF8\uB54C "\uC2DC\uC791" \uC54C\uB9BC\uC73C\uB85C \uC804\uB2EC).']}]};var q0={id:"views",tabTitle:"\uBCF4\uAE30",topics:[{title:"\uBCF4\uAE30 \uC804\uD658",lines:["\uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC(\uBAA9\uB85D\xB7\uC8FC\uAC04\xB7\uC6D4\uAC04\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C\xB7\uD0C0\uC784\uB77C\uC778)\uC73C\uB85C \uBC14\uAFB8\uBA70 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4. \uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uD604\uC7AC \uBCF4\uAE30 \uD558\uB098\uB9CC \uBCF4\uC774\uACE0 \uB204\uB974\uBA74 \uBA54\uB274\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.","\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4\uB85C\uB3C4 \uC804\uD658\uD569\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 \uD0ED \uCC38\uACE0)."]},{title:"\uBAA9\uB85D(\uD45C)",lines:["\uC5F4 \uC81C\uBAA9 \u2014 \uC81C\uBAA9\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uB9C8\uAC10\uC608\uC815\xB7\uC644\uB8CC\uC77C\uC2DC\uB294 **\uC815\uB82C**, \uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4\uB294 **\uD544\uD130**\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.","**\uADF8\uB8F9** \uBA54\uB274\uB85C \uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC \uB4F1 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904\uC758 \u25B8 \uB85C \uC811\uC2B5\uB2C8\uB2E4. \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uD45C\uAC00 \uAC00\uB85C\uB85C \uC2A4\uD06C\uB864\uB418\uACE0 \uC5F4 \uC81C\uBAA9\uC774 \uD568\uAED8 \uB530\uB77C\uC635\uB2C8\uB2E4."]},{title:"\uBCF4\uB4DC(\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C)",lines:["\uCE74\uB4DC\uB97C \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC(\uD504\uB85C\uC81D\uD2B8/\uC0C1\uD0DC/\uBAA9\uD45C)\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4. \uCEEC\uB7FC \uBA38\uB9AC\uB97C \uB04C\uBA74 \uD504\uB85C\uC81D\uD2B8 \uC21C\uC11C\uAC00 \uBC14\uB01D\uB2C8\uB2E4.","\uCEEC\uB7FC **\u22EE** \uBA54\uB274 \u2014 \uC0C8 \uC5C5\uBB34 \uB4F1\uB85D \xB7 \uC218\uC815 \xB7 \uBCF4\uAD00 \xB7 \uC0AD\uC81C(\uC0AD\uC81C\uD558\uBA74 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9).","\uCE74\uB4DC\uC758 \uC6D0\uD615 \uCCB4\uD06C\uB294 \uC644\uB8CC, \uB9C8\uAC10 \uB0A0\uC9DC\uB97C \uB204\uB974\uBA74 \uB2EC\uB825\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uB9C8\uAC10\uC774 \uC5C6\uC73C\uBA74 \uC54C\uB78C \uC544\uC774\uCF58\uB9CC \uBCF4\uC785\uB2C8\uB2E4."]},{title:"\uC8FC\uAC04\xB7\uC6D4\uAC04 \uCE98\uB9B0\uB354",lines:["\uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uCE78\uC5D0 \uB193\uC785\uB2C8\uB2E4. \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4.","\uBE48 \uCE78\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB9AC\uBA74 **\uC5C5\uBB34 \uB4F1\uB85D** \uC904\uC774 \uB098\uD0C0\uB098 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \uC5F0/\uC6D4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uB2EC\uB825\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.","\u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC5D0\uC11C \uAD6C\uAE00\xB7\uC560\uD50C\xB7\uB124\uC774\uBC84 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30/\uAC00\uC838\uC624\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4."]},{title:"\uD0C0\uC784\uB77C\uC778",feature:"timeline",lines:["\uC2DC\uC791\uC77C\uC2DC~\uB9C8\uAC10\uC608\uC815\uC744 \uB9C9\uB300\uB85C \uBCF4\uC5EC \uAE30\uAC04 \uACB9\uCE68\uC744 \uD655\uC778\uD569\uB2C8\uB2E4. \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4.","\uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uBA70, \uC644\uB8CC \uC228\uAE30\uAE30\uAC00 \uCF1C\uC838 \uC788\uC73C\uBA74 \uC644\uB8CC\uB41C \uD560\uC77C\uB3C4 \uAC10\uCDA5\uB2C8\uB2E4."]},{title:"\uCC28\uD2B8",feature:"charts",lines:["**\uCC28\uD2B8** \uBC84\uD2BC\uC5D0\uC11C \uC6CC\uD06C\uB85C\uB4DC(\uC778\uC6D0\uBCC4 \uBD80\uD558)\xB7\uB204\uC801\uD750\uB984\uB3C4\xB7\uB9AC\uB4DC\uD0C0\uC784, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4.","\uC6CC\uD06C\uB85C\uB4DC\uC758 \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC73C\uB85C \uC815\uD569\uB2C8\uB2E4."]}]};var $0={id:"filters",tabTitle:"\uAC80\uC0C9\xB7\uD544\uD130",topics:[{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **/**). \uBAA8\uBC14\uC77C\uC740 \uAC80\uC0C9 \uD654\uBA74\uC5D0\uC11C \uC0C1\uD0DC\xB7\uB77C\uBCA8 \uCE69\uC73C\uB85C \uD568\uAED8 \uAC70\uB985\uB2C8\uB2E4.","**\uD544\uD130**(\uBAA9\uB85D \uC678 \uBCF4\uAE30) \xB7 **\uCC45\uC784\uC790** \xB7 **\uD504\uB85C\uC81D\uD2B8** \xB7 **\uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uAC01\uAC01 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0, \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","**\uBAA9\uD45C** \uBC84\uD2BC\uC740 \uC804\uCCB4/\uBBF8\uBC30\uC815/\uBAA9\uD45C\uBCC4\uB85C \uAC70\uB985\uB2C8\uB2E4(\uBAA9\uD45C \uBCF4\uB4DC\uC5D0\uC11C\uB294 \uCEEC\uB7FC\uC774 \uACE7 \uBAA9\uD45C\uB77C \uC801\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4).","\uC644\uB8CC\xB7\uBCF4\uAD00\uD568 \uD0ED\uC740 **\uAE30\uAC04** \uBC84\uD2BC\uC73C\uB85C \uC644\uB8CC\uC77C \uBC94\uC704\uB97C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uB77C\uBCA8",feature:"label",lines:["**\uB77C\uBCA8** \uBC84\uD2BC\uC73C\uB85C \uB77C\uBCA8\uBCC4\uB85C \uAC70\uB974\uACE0, \uC5C5\uBB34 \uC0C1\uC138\uC758 \uB77C\uBCA8 \uD589\uC5D0\uC11C \uBD99\uC785\uB2C8\uB2E4. \uB77C\uBCA8 \uC0AC\uC804\uC740 \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uAD00\uB9AC\uD569\uB2C8\uB2E4."]}]};var H0={id:"projects",tabTitle:"\uD504\uB85C\uC81D\uD2B8\xB7\uBAA9\uD45C",feature:"project",topics:[{title:"\uD504\uB85C\uC81D\uD2B8",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uBCF4\uB4DC \uB9E8 \uB05D \uC810\uC120 \uCE78 \uB610\uB294 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD569\uB2C8\uB2E4.","\uC5C5\uBB34\uC758 \uD504\uB85C\uC81D\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC740 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uB294 \uC5C5\uBB34\uC785\uB2C8\uB2E4."]},{title:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8)",feature:"sprint",lines:["\uD504\uB85C\uC81D\uD2B8 \uC124\uC815\uC5D0\uC11C **\uBAA9\uD45C \uC0AC\uC6A9**\uC744 \uCF1C\uBA74 \uAE30\uAC04\uC774 \uC788\uB294 \uBAA9\uD45C\uB97C \uB9CC\uB4E4\uACE0 \uC5C5\uBB34\uB97C \uBC30\uC815\uD569\uB2C8\uB2E4(\uBAA9\uD45C \uBCF4\uB4DC\uC5D0\uC11C \uCE74\uB4DC \uB04C\uAE30, \uC6B0\uD074\uB9AD \u203A \uBAA9\uD45C\uC5D0 \uB123\uAE30).","\uBAA9\uD45C \uC885\uB8CC \uC2DC \uB0A8\uC740 \uC5C5\uBB34\uB97C \uB2E4\uC74C \uBAA9\uD45C\uB85C \uB118\uAE38\uC9C0, \uBBF8\uBC30\uC815\uC73C\uB85C \uBE84\uC9C0 \uACE0\uB985\uB2C8\uB2E4. \uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uC801\uC2B5\uB2C8\uB2E4."]},{title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF\xB7\uC790\uB3D9\uD654 \uADDC\uCE59",lines:["\u22EE \u203A **\uC5C5\uBB34 \uD15C\uD50C\uB9BF**\uC73C\uB85C \uC815\uD615 \uC808\uCC28(\uD560\uC77C \uD3EC\uD568)\uB97C \uD55C \uBC88\uC5D0 \uB9CC\uB4E4\uACE0, **\uC790\uB3D9\uD654 \uADDC\uCE59**\uC73C\uB85C \uB4F1\uB85D \uC2DC \uC870\uAC74\uBD80 \uBC30\uC815 \uB4F1\uC744 \uB9E1\uAE41\uB2C8\uB2E4."]},{title:"\uBCF4\uACE0\uC11C",feature:"report",lines:["**\uBCF4\uACE0\uC11C** \uD0ED\uC5D0\uC11C \uC5C5\uBB34 \uBCF4\uACE0\uC11C\uB97C \uC791\uC131\uD574 \uC804\uC790\uACB0\uC7AC\uB85C \uC0C1\uC2E0\uD569\uB2C8\uB2E4."]}]};var W0={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var Df=[N0,L0,z0,j0,F0,q0,$0,H0,W0];import{jsx as ln,jsxs as Pf}from"react/jsx-runtime";function dT(e){return e.split(/(\*\*[^*]+\*\*)/g).filter(b=>b.length>0).map((b,l)=>b.startsWith("**")&&b.endsWith("**")?ln(ho,{component:"strong",sx:{fontWeight:700},children:b.slice(2,-2)},l):ln(sT,{children:b},l))}function hT({keys:e}){let d=lt();return ln(ho,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((b,l)=>Pf(ho,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?ln(uT,{sx:{fontSize:18,color:d.colors.textMuted}}):null,ln(ho,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:d.colors.textPrimary,bgcolor:d.colors.surfaceSubtle,border:`1px solid ${d.colors.border}`,borderRadius:1,fontVariantNumeric:"tabular-nums"},children:b})]},`${b}-${l}`))})}function uG({open:e,onClose:d,views:b,features:l={},initialTab:o}){let s=lt(),[r,t]=lT(0);aT(()=>{if(!e)return;let h=Df.filter(f=>!f.feature||l[f.feature]!==!1).findIndex(f=>f.id===o);t(Math.max(0,h))},[e,o]);let n=a=>!a||l[a]!==!1,c=ma(b),i=Df.filter(a=>n(a.feature)).map(a=>({id:a.id,tabTitle:a.tabTitle,showTitle:!1,children:a.id==="shortcuts"?ln(ho,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:15,color:s.colors.textPrimary,px:.5},children:c.map(h=>Pf(ho,{sx:{display:"contents"},children:[ln(hT,{keys:h.keys}),ln("span",{children:h.description})]},h.keys))}):ln(ho,{sx:{display:"flex",flexDirection:"column",gap:2.5,px:.5},children:a.topics.filter(h=>n(h.feature)).map(h=>Pf(ho,{children:[ln(ho,{sx:{fontSize:18,fontWeight:700,color:s.colors.textStrong,mb:.75},children:h.title}),ln(ho,{component:"ul",sx:{m:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:15,lineHeight:1.6,color:s.colors.textPrimary},children:h.lines.map((f,u)=>ln("li",{children:dT(f)},u))})]},h.title))})}));return ln(fT,{open:e,onClose:d,maxWidth:"md",title:"\uC5C5\uBB34\uD568 \uC124\uBA85\uC11C",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!0,switchContent:!0},activeTabValue:r,onTabChange:t,fixedHeight:"70vh",maxContentHeight:"70vh",sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:i,actions:{showCancelButton:!1,right:ln(cT,{variant:"contained",onClick:d,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as U0,useRef as pT,useState as ms}from"react";import{Box as ir,Button as Hn,IconButton as Nf,Menu as V0,MenuItem as K0,Switch as mT,Tooltip as G0}from"@mui/material";import{FormDialog as Y0}from"@ehfuse/mui-form-dialog";import Lf from"@mui/icons-material/Add";import gT from"@mui/icons-material/ArrowRightAlt";import bT from"@mui/icons-material/BoltOutlined";import yT from"@mui/icons-material/Close";import xT from"@mui/icons-material/EditOutlined";import{ErrorAlert as X0}from"@ehfuse/alerts";import{ClearTextField as ba,LabelSelect as gn}from"@ehfuse/mui-form-controls";import{Fragment as J0,jsx as Ye,jsxs as Mn}from"react/jsx-runtime";var zf=[{value:"created",label:"\uC5C5\uBB34 \uB4F1\uB85D \uC2DC",hint:"\uC0C8 \uC5C5\uBB34\uAC00 \uB9CC\uB4E4\uC5B4\uC9C4 \uC9C1\uD6C4 \uD55C \uBC88 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"status_changed",label:"\uC0C1\uD0DC \uBCC0\uACBD \uC2DC",hint:"\uC0C1\uD0DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"commented",label:"\uB313\uAE00\uC774 \uB2EC\uB838\uC744 \uB54C",hint:"\uB313\uAE00\uC774 \uC0C8\uB85C \uB2EC\uB9AC\uAC70\uB098 \uC218\uC815\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD68C\uC2E0\uC744 \uBC1B\uC740 \uC790\uB9AC)."},{value:"manager_assigned",label:"\uCC45\uC784\uC790\uAC00 \uC9C0\uC815\uB410\uC744 \uB54C",hint:"\uCC45\uC784\uC790\uAC00 \uC0C8\uB85C \uC9C0\uC815\uB418\uAC70\uB098 \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"attachment_added",label:"\uCCA8\uBD80\uAC00 \uC62C\uB77C\uC654\uC744 \uB54C",hint:"\uC5C5\uBB34\uC5D0 \uD30C\uC77C\uC774 \uCCA8\uBD80\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uC99D\uBE59 \uC811\uC218 \uC790\uB9AC)."},{value:"field_changed",label:"\uD544\uB4DC\uAC00 \uBC14\uB00C\uC5C8\uC744 \uB54C",hint:"\uC9C0\uC815\uD55C \uD544\uB4DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD544\uB4DC\uB97C \uC548 \uACE0\uB974\uBA74 \uC544\uBB34 \uC218\uC815\uC5D0\uB098 \uC2E4\uD589)."},{value:"overdue",label:"\uB9C8\uAC10 \uACBD\uACFC \uC2DC",hint:"\uB9C8\uAC10\uC774 \uC9C0\uB09C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uB97C \uB9E4\uC77C \uC810\uAC80\uD574 \uC2E4\uD589\uD569\uB2C8\uB2E4."}],ya=[{value:"due_date",label:"\uB9C8\uAC10\uC608\uC815"},{value:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC"},{value:"priority",label:"\uC911\uC694\uB3C4"},{value:"manager_account_seq",label:"\uCC45\uC784\uC790"},{value:"receiver_account_seqs",label:"\uCC38\uC870\uC790"},{value:"label_keys",label:"\uB77C\uBCA8"},{value:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8"},{value:"sprint_seq",label:"\uBAA9\uD45C"},{value:"content",label:"\uB0B4\uC6A9"},{value:"note",label:"\uBE44\uACE0"}],fc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function cc(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function uc(e){return un.find(d=>d.key===e)?.name??e}function vT(e,d,b){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=d.find(c=>ri(c.key)===l.group_seq);s.push(`\uD504\uB85C\uC81D\uD2B8=${n?.label??`#${l.group_seq}`}`)}l.is_bug===!0&&s.push("\uC624\uB958\uB9CC"),l.is_event===!0&&s.push("\uC77C\uC815\uB9CC"),l.priority&&s.push(`\uC911\uC694\uB3C4=${fc.find(n=>n.value===l.priority)?.label}`),l.label_key&&s.push(`\uB77C\uBCA8=${b.find(n=>n.key===l.label_key)?.name??l.label_key}`),l.title_contains&&s.push(`\uC81C\uBAA9\uC5D0 "${l.title_contains}" \uD3EC\uD568`),l.status&&s.push(`\uC0C1\uD0DC=${uc(l.status)}`),l.from_status&&s.push(`${uc(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${uc(l.to_status)}\uB85C`),l.manager_empty===!0&&s.push("\uCC45\uC784\uC790 \uC5C6\uC74C"),l.manager_empty===!1&&s.push("\uCC45\uC784\uC790 \uC788\uC74C"),l.manager_account_seq&&s.push(`\uCC45\uC784\uC790=${l.manager_name||`\uACC4\uC815 #${l.manager_account_seq}`}`),l.receiver_account_seq&&s.push(`\uCC38\uC870\uC790\uC5D0 ${l.receiver_name||`\uACC4\uC815 #${l.receiver_account_seq}`}`),l.changed_field&&s.push(`${ya.find(n=>n.value===l.changed_field)?.label??l.changed_field} \uBCC0\uACBD`),l.comment_contains&&s.push(`\uB313\uAE00\uC5D0 "${l.comment_contains}" \uD3EC\uD568`),l.comment_by_others===!0&&s.push("\uB0A8\uC774 \uC4F4 \uB313\uAE00"),typeof l.overdue_days=="number"&&s.push(`${l.overdue_days}\uC77C \uACBD\uACFC`);let r=[];o.set_status&&r.push(`\uC0C1\uD0DC=${uc(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${fc.find(n=>n.value===o.set_priority)?.label}`),o.assign_manager_account_seq&&r.push(`\uCC45\uC784\uC790=${o.assign_manager_name||"\uC9C0\uC815"}`),o.add_receiver_account_seq&&r.push(`\uCC38\uC870\uC790 + ${o.add_receiver_name||"\uC9C0\uC815"}`),o.add_label_key&&r.push(`\uB77C\uBCA8 + ${b.find(n=>n.key===o.add_label_key)?.name??o.add_label_key}`),o.apply_content_template_seq&&r.push(`\uBCF8\uBB38 \uC591\uC2DD=${o.apply_content_template_name||"\uC9C0\uC815"}`),o.notify_account_seq&&r.push("\uC54C\uB9BC \uBC1C\uC1A1");let t=zf.find(n=>n.value===e.trigger)?.label??e.trigger;return{left:s.length>0?`${t} \xB7 ${s.join(", ")}`:t,right:r.join(", ")||"\uB3D9\uC791 \uC5C6\uC74C"}}var Z0={fontSize:16,fontWeight:700,color:"#37352f"},wT={display:"flex",alignItems:"center",gap:1},_T={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function CG({open:e,rules:d,customTabs:b,statusOptions:l,contentTemplates:o=[],onPickAccount:s,onClose:r,onCreate:t,onUpdate:n,onToggle:c,onRemove:i}){let[a,h]=ms(!1),[f,u]=ms(0),[g,m]=ms(cc()),[x,k]=ms(!1),B=pT(null),[R,L]=ms(null),[A,D]=ms(null);U0(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(cc())},500);return()=>window.clearTimeout(W)},[e]),U0(()=>{if(!a)return;let W=window.setTimeout(()=>B.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=f>0,q=g.trigger,j=()=>{h(!1),u(0),m(cc())},S=(W,X)=>{m(Z=>{let K={...Z.condition};return X===""||X===void 0||X===null?delete K[W]:K[W]=X,{...Z,condition:K}})},T=(W,X)=>{m(Z=>{let K={...Z.action};return X===""||X===void 0||X===null?delete K[W]:K[W]=X,{...Z,action:K}})},P=W=>{m(X=>{let Z={...X.condition};return W!=="status_changed"&&(delete Z.from_status,delete Z.to_status),W!=="overdue"&&delete Z.overdue_days,W!=="field_changed"&&delete Z.changed_field,W!=="commented"&&(delete Z.comment_contains,delete Z.comment_by_others),W==="field_changed"&&Z.changed_field===void 0&&(Z.changed_field=ya[0]?.value??""),{...X,trigger:W,condition:Z}})},p=b.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),v=un.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(ri(W.key)),label:W.label})),{condition:_,action:C}=g,O=_.is_bug!==void 0||_.is_event!==void 0,z=[..._.group_seq===void 0&&w.length>0?[{key:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...O?[]:[{key:"kind",label:"\uC885\uB958\uAC00 \uC624\uB958/\uC77C\uC815\uC778 \uACBD\uC6B0"}],..._.priority===void 0?[{key:"priority",label:"\uC911\uC694\uB3C4\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],..._.label_key===void 0&&y.length>0?[{key:"label_key",label:"\uB77C\uBCA8\uC774 \uBD99\uC5B4 \uC788\uB294 \uACBD\uC6B0"}]:[],..._.title_contains===void 0?[{key:"title_contains",label:"\uC81C\uBAA9\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],..._.manager_empty===void 0?[{key:"manager_empty",label:"\uCC45\uC784\uC790\uAC00 \uC5C6\uB294/\uC788\uB294 \uACBD\uC6B0"}]:[],...s&&_.manager_account_seq===void 0?[{key:"manager_account",label:"\uCC45\uC784\uC790\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...s&&_.receiver_account_seq===void 0?[{key:"receiver_account",label:"\uCC38\uC870\uC790\uC5D0 ~\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...q==="status_changed"&&_.from_status===void 0?[{key:"from_status",label:"\uC774 \uC0C1\uD0DC\uC5D0\uC11C \uBC14\uB010 \uACBD\uC6B0"}]:[],...q==="status_changed"&&_.to_status===void 0?[{key:"to_status",label:"\uC774 \uC0C1\uD0DC\uB85C \uBC14\uB010 \uACBD\uC6B0"}]:[],...q==="field_changed"&&_.changed_field===void 0?[{key:"changed_field",label:"~ \uD544\uB4DC\uAC00 \uBCC0\uACBD\uB41C \uACBD\uC6B0"}]:[],...q==="commented"&&_.comment_contains===void 0?[{key:"comment_contains",label:"\uB313\uAE00\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...q==="commented"&&_.comment_by_others===void 0?[{key:"comment_by_others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C\uC774 \uC4F4 \uACBD\uC6B0"}]:[],...q==="overdue"&&_.overdue_days===void 0?[{key:"overdue_days",label:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB09C \uACBD\uC6B0"}]:[]],$=async W=>{if(!s)return;let X=W==="manager_account"?_.manager_account_seq??0:_.receiver_account_seq??0,Z=await s(X,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");Z&&m(K=>{let ee={...K.condition};return W==="manager_account"?(ee.manager_account_seq=Z.accountSeq,ee.manager_name=Z.name):(ee.receiver_account_seq=Z.accountSeq,ee.receiver_name=Z.name),{...K,condition:ee}})},V=W=>{L(null),W==="group_seq"?S("group_seq",Number(w[0]?.value)||0):W==="kind"?S("is_bug",!0):W==="priority"?S("priority","high"):W==="label_key"?S("label_key",y[0]?.value??""):W==="title_contains"?m(X=>({...X,condition:{...X.condition,title_contains:""}})):W==="manager_empty"?S("manager_empty",!0):W==="manager_account"||W==="receiver_account"?$(W):W==="from_status"?S("from_status",un[0]?.key??""):W==="to_status"?S("to_status",un[0]?.key??""):W==="changed_field"?S("changed_field",ya[0]?.value??""):W==="comment_contains"?m(X=>({...X,condition:{...X.condition,comment_contains:""}})):W==="comment_by_others"?S("comment_by_others",!0):W==="overdue_days"&&S("overdue_days",1)},E=W=>{if(W==="kind"){S("is_bug",""),S("is_event","");return}if(W==="manager_account"){S("manager_account_seq",""),S("manager_name","");return}if(W==="receiver_account"){S("receiver_account_seq",""),S("receiver_name","");return}S(W==="group_seq"?"group_seq":W,"")},H=[...C.set_status===void 0?[{key:"set_status",label:"\uC0C1\uD0DC \uBC14\uAFB8\uAE30"}]:[],...C.set_priority===void 0?[{key:"set_priority",label:"\uC911\uC694\uB3C4 \uBC14\uAFB8\uAE30"}]:[],...C.add_label_key===void 0&&y.length>0?[{key:"add_label_key",label:"\uB77C\uBCA8 \uBD99\uC774\uAE30"}]:[],...s&&C.assign_manager_account_seq===void 0?[{key:"assign_manager",label:"\uCC45\uC784\uC790 \uC9C0\uC815\uD558\uAE30"}]:[],...s&&C.add_receiver_account_seq===void 0?[{key:"add_receiver",label:"\uCC38\uC870\uC790 \uCD94\uAC00\uD558\uAE30"}]:[],...o.length>0&&C.apply_content_template_seq===void 0?[{key:"apply_content_template",label:"\uBCF8\uBB38 \uC591\uC2DD \uCC44\uC6B0\uAE30"}]:[],...s&&C.notify_account_seq===void 0?[{key:"notify",label:"\uC54C\uB9BC \uBCF4\uB0B4\uAE30"}]:[]],I=async W=>{if(!s)return;let X=W==="assign_manager"?C.assign_manager_account_seq??0:W==="add_receiver"?C.add_receiver_account_seq??0:C.notify_account_seq??0,Z=await s(X,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");Z&&m(K=>{let ee={...K.action};return W==="assign_manager"?(ee.assign_manager_account_seq=Z.accountSeq,ee.assign_manager_name=Z.name):W==="add_receiver"?(ee.add_receiver_account_seq=Z.accountSeq,ee.add_receiver_name=Z.name):(ee.notify_account_seq=Z.accountSeq,ee.notify_name=Z.name),{...K,action:ee}})},M=W=>{if(D(null),W==="set_status")T("set_status",un[0]?.key??"");else if(W==="set_priority")T("set_priority","high");else if(W==="add_label_key")T("add_label_key",y[0]?.value??"");else if(W==="apply_content_template"){let X=o[0];m(Z=>({...Z,action:{...Z.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}else I(W)},F=W=>{W==="assign_manager"?(T("assign_manager_account_seq",""),T("assign_manager_name","")):W==="add_receiver"?(T("add_receiver_account_seq",""),T("add_receiver_name","")):W==="apply_content_template"?(T("apply_content_template_seq",""),T("apply_content_template_name","")):W==="notify"?(T("notify_account_seq",""),T("notify_name",""),T("notify_message","")):T(W,"")},U=async()=>{if(!g.name.trim()){X0({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(g.action).length===0){X0({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?g.sort_no:d.reduce((Z,K)=>Math.max(Z,K.sort_no),0)+1;k(!0);let X=N?await n(f,{...g,sort_no:W}):await t({...g,sort_no:W});k(!1),X&&j()},Y=(W,X,Z,K)=>Mn(ir,{sx:wT,children:[Ye(ir,{sx:_T,children:W}),Mn(ir,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:K?"column":"row",alignItems:K?"stretch":"center",gap:K?.5:1},children:[X,K?Ye(ir,{sx:{fontSize:13.5,color:"#37352f"},children:K}):null]}),Ye(G0,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:Ye(Nf,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:Z,children:Ye(yT,{sx:{fontSize:16}})})})]}),G=()=>Mn(ir,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ye(ba,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:B,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:g.name,onChange:W=>m(X=>({...X,name:W.target.value}))}),Ye(ir,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:zf.map(W=>{let X=q===W.value;return Ye(Hn,{disableElevation:!0,variant:X?"contained":"outlined",color:X?"primary":"inherit",onClick:()=>P(W.value),sx:{borderRadius:99,px:1.75,...X?{}:{color:"#57564f",borderColor:"#d9d9d6"}},children:W.label},W.value)})}),Ye(ir,{sx:{fontSize:13,color:"#787774",mt:-.5},children:zf.find(W=>W.value===q)?.hint}),Mn(ir,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ye(ir,{sx:Z0,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),z.length>0?Ye(Hn,{size:"small",startIcon:Ye(Lf,{sx:{fontSize:16}}),onClick:W=>L(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?Y("\uD504\uB85C\uC81D\uD2B8",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>S("group_seq",Number(W.target.value)||"")}),()=>E("group_seq")):null,O?Y("\uC885\uB958",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.is_bug?"bug":"event",options:[{value:"bug",label:"\uC624\uB958\uB9CC"},{value:"event",label:"\uC77C\uC815\uB9CC"}],onChange:W=>{let X=W.target.value==="bug";S("is_bug",X?!0:""),S("is_event",X?"":!0)}}),()=>E("kind")):null,_.priority!==void 0?Y("\uC911\uC694\uB3C4",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:fc,onChange:W=>S("priority",W.target.value)}),()=>E("priority")):null,_.label_key!==void 0?Y("\uB77C\uBCA8",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>S("label_key",W.target.value)}),()=>E("label_key")):null,_.title_contains!==void 0?Y("\uC81C\uBAA9",Ye(ba,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uAE34\uAE09)",value:_.title_contains,onChange:W=>m(X=>({...X,condition:{...X.condition,title_contains:W.target.value}}))}),()=>E("title_contains")):null,_.manager_empty!==void 0?Y("\uCC45\uC784\uC790",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:W=>S("manager_empty",W.target.value==="empty")}),()=>E("manager_empty")):null,_.manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>E("manager_account")):null,_.receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>E("receiver_account")):null,_.from_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:v,onChange:W=>S("from_status",W.target.value)}),()=>E("from_status")):null,_.to_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uB85C",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:v,onChange:W=>S("to_status",W.target.value)}),()=>E("to_status")):null,_.changed_field!==void 0?Y("\uBCC0\uACBD \uD544\uB4DC",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:ya,onChange:W=>S("changed_field",W.target.value)}),()=>E("changed_field")):null,_.comment_contains!==void 0?Y("\uB313\uAE00 \uB0B1\uB9D0",Ye(ba,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uD68C\uC2E0)",value:_.comment_contains,onChange:W=>m(X=>({...X,condition:{...X.condition,comment_contains:W.target.value}}))}),()=>E("comment_contains")):null,_.comment_by_others!==void 0?Y("\uB313\uAE00 \uC791\uC131\uC790",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:_.comment_by_others?"others":"any",options:[{value:"others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C"},{value:"any",label:"\uB204\uAD6C\uB4E0"}],onChange:W=>S("comment_by_others",W.target.value==="others")}),()=>E("comment_by_others")):null,_.overdue_days!==void 0?Y("\uACBD\uACFC\uC77C",Ye(ba,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:W=>S("overdue_days",Math.max(0,Number(W.target.value)||0)),helperText:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB0AC\uC744 \uB54C\uBD80\uD130 \uC2E4\uD589\uD560\uC9C0"}),()=>E("overdue_days")):null,Object.keys(_).length===0?Ye(ir,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,Mn(ir,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ye(ir,{sx:Z0,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),H.length>0?Ye(Hn,{size:"small",startIcon:Ye(Lf,{sx:{fontSize:16}}),onClick:W=>D(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),C.set_status!==void 0?Y("\uC0C1\uD0DC",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:C.set_status,options:v,onChange:W=>T("set_status",W.target.value)}),()=>F("set_status")):null,C.set_priority!==void 0?Y("\uC911\uC694\uB3C4",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:C.set_priority,options:fc,onChange:W=>T("set_priority",W.target.value)}),()=>F("set_priority")):null,C.apply_content_template_seq!==void 0?Y("\uBCF8\uBB38 \uC591\uC2DD",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:String(C.apply_content_template_seq),options:o.map(W=>({value:String(W.seq),label:W.name})),onChange:W=>{let X=o.find(Z=>String(Z.seq)===String(W.target.value));m(Z=>({...Z,action:{...Z.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}}),()=>F("apply_content_template"),"\uBCF8\uBB38\uC774 \uBE44\uC5B4 \uC788\uC744 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4(\uC4F4 \uB0B4\uC6A9\uC744 \uB36E\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)"):null,C.add_label_key!==void 0?Y("\uB77C\uBCA8",Ye(gn,{size:"medium",fullWidth:!0,label:"",value:C.add_label_key,options:y,onChange:W=>T("add_label_key",W.target.value)}),()=>F("add_label_key")):null,C.assign_manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("assign_manager")},children:C.assign_manager_name||`\uACC4\uC815 #${C.assign_manager_account_seq}`}),()=>F("assign_manager")):null,C.add_receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("add_receiver")},children:C.add_receiver_name||`\uACC4\uC815 #${C.add_receiver_account_seq}`}),()=>F("add_receiver")):null,C.notify_account_seq!==void 0?Y("\uC54C\uB9BC",Mn(J0,{children:[Ye(Hn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("notify")},sx:{flexShrink:0},children:C.notify_name||`\uACC4\uC815 #${C.notify_account_seq}`}),Ye(ba,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:C.notify_message??"",onChange:W=>T("notify_message",W.target.value)})]}),()=>F("notify")):null,Object.keys(C).length===0?Ye(ir,{sx:{fontSize:13.5,color:"#9a9a97"},children:'"+ \uB3D9\uC791 \uCD94\uAC00" \uB85C \uD560 \uC77C\uC744 \uD558\uB098 \uC774\uC0C1 \uACE8\uB77C \uC8FC\uC138\uC694.'}):null,Ye(V0,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>L(null),children:z.map(W=>Ye(K0,{dense:!0,onClick:()=>V(W.key),sx:{fontSize:14},children:W.label},W.key))}),Ye(V0,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>D(null),children:H.map(W=>Ye(K0,{dense:!0,onClick:()=>M(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return Mn(J0,{children:[Ye(Y0,{open:e,onClose:r,maxWidth:"sm",title:"\uC790\uB3D9\uD654 \uADDC\uCE59",locale:"ko",titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-manage",tabs:{visible:!1},contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionContentPaddingTop:0,sections:[{id:"rules",title:"",showTitle:!1,children:Mn(ir,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[d.length===0?Mn(ir,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ye(bT,{sx:{fontSize:48,color:"#d9d9d6"}}),Ye(ir,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,d.map(W=>Mn(ir,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[Ye(G0,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:Ye(mT,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(X,Z)=>c(W.seq,Z)})}),Mn(ir,{sx:{flex:1,minWidth:0},children:[Ye(ir,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let X=vT(W,b,l);return Mn(ir,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[Ye(ir,{component:"span",children:X.left}),Ye(gT,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),Ye(ir,{component:"span",children:X.right})]})})()]}),Ye(Nf,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC218\uC815`,onClick:()=>{u(W.seq),m({name:W.name,trigger:W.trigger,enabled:W.enabled,sort_no:W.sort_no,condition:{...W.condition,...W.trigger==="field_changed"&&W.condition.changed_field===void 0?{changed_field:ya[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:Ye(xT,{sx:{fontSize:18}})}),Ye(Nf,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:Ye(dr,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:Ye(Hn,{startIcon:Ye(Lf,{}),onClick:()=>{u(0),m(cc()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:Ye(Hn,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),Ye(Y0,{open:a,onClose:j,maxWidth:"sm",title:N?"\uADDC\uCE59 \uC218\uC815":"\uC0C8 \uADDC\uCE59",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-form",tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"rule-form",title:"",showTitle:!1,children:G()}],actions:{showCancelButton:!0,right:Ye(Hn,{variant:"contained",onClick:()=>{U()},disabled:x,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as Q0,useRef as jf,useState as gs}from"react";import{Box as tr,Button as bs,IconButton as xa,Tooltip as va}from"@mui/material";import eg from"@mui/icons-material/Add";import kT from"@mui/icons-material/EditOutlined";import ST from"@mui/icons-material/ContentCopyOutlined";import TT from"@mui/icons-material/DragIndicator";import CT from"@mui/icons-material/Close";import BT from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as IT,PointerSensor as MT,closestCenter as ET,useSensor as RT,useSensors as OT}from"@dnd-kit/core";import{restrictToParentElement as AT,restrictToVerticalAxis as DT}from"@dnd-kit/modifiers";import{SortableContext as PT,arrayMove as tg,useSortable as NT,verticalListSortingStrategy as LT}from"@dnd-kit/sortable";import{CSS as zT}from"@dnd-kit/utilities";import{FormDialog as rg}from"@ehfuse/mui-form-dialog";import{ClearTextField as Ff,LabelSelect as ng,NumberField as og}from"@ehfuse/mui-form-controls";import jT from"@ehfuse/overlay-scrollbar";import{ConfirmDialog as FT,ErrorAlert as ig}from"@ehfuse/alerts";import{Fragment as UT,jsx as at,jsxs as En}from"react/jsx-runtime";var qT=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],sg="\uC5C5\uBB34 \uC81C\uBAA9",qf=2,dc={flex:1,minWidth:0},ag=56,lg=20,$T=`${lg+qf*8}px`;function hc(){return{name:"",description:"",group_seq:0,items:[]}}function HT(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function WT({id:e,children:d}){let{attributes:b,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=NT({id:e});return at(tr,{ref:o,sx:{transform:zT.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...b,...l},dragging:t})})}function KG({open:e,templates:d,customTabs:b,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=gs(!1),[a,h]=gs(0),[f,u]=gs(hc()),[g,m]=gs(!1),[x,k]=gs([]),B=jf(0),[R,L]=gs(0),A=jf(null),D=jf(null);Q0(()=>{if(e)return;let z=window.setTimeout(()=>{i(!1),h(0),u(hc()),k([])},500);return()=>window.clearTimeout(z)},[e]);let N=()=>(B.current+=1,`template-item-${B.current}`),q=(z,$)=>{h(z),u($),k($.items.map(()=>N())),i(!0)},j=f.items.map((z,$)=>x[$]??`template-item-fallback-${$}`),S=()=>{let z=D.current?.getScrollContainer()??null;if(z){z.scrollTop=z.scrollHeight;return}let $=A.current?.querySelectorAll("*")??[];for(let V of Array.from($))if(V.scrollHeight>V.clientHeight+1){V.scrollTop=V.scrollHeight;return}},T=()=>{let z=A.current;if(!z)return null;let $=z.querySelectorAll("input[data-template-title]"),V=$.length?$:z.querySelectorAll(`input[placeholder="${sg}"]`);return V.length?V[V.length-1]:null};Q0(()=>{if(R===0)return;let z=0,$=0,V=()=>{S();let H=T();H&&document.activeElement!==H&&H.focus(),z+=1,!(H&&document.activeElement===H)&&z<8&&($=window.setTimeout(V,50))},E=window.requestAnimationFrame(V);return()=>{window.cancelAnimationFrame(E),window.clearTimeout($)}},[R]);let P=b.filter(z=>!z.archived).map(z=>({value:String(ri(z.key)),label:z.label})),p=(z,$)=>{u(V=>({...V,items:V.items.map((E,H)=>H===z?{...E,...$}:E)}))},y=OT(RT(MT,{activationConstraint:{distance:5}})),v=z=>{let $=String(z.active?.id??""),V=String(z.over?.id??"");if(!$||!V||$===V)return;let E=j.indexOf($),H=j.indexOf(V);E<0||H<0||(u(I=>({...I,items:tg(I.items,E,H)})),k(I=>tg(I,E,H)))},w=async z=>{if(!l)return;let $=await l(f.items[z]?.manager_account_seq??0,"\uCC45\uC784\uC790");$&&p(z,{manager_account_seq:$.accountSeq,manager_name:$.name})},_=async()=>{let z=f.name.trim();if(!z){ig({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}let $=f.items.filter(H=>H.title.trim().length>0);if($.length===0){ig({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let V={...f,name:z,items:$},E=a>0?await r(a,V):await s(V);m(!1),E&&(i(!1),h(0),u(hc()))},C=at(tr,{children:d.length===0?En(tr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[at(BT,{sx:{fontSize:48,color:"#d9d9d6"}}),at(tr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):d.map(z=>En(tr,{sx:{display:"flex",alignItems:"center",gap:2.5,py:1.75,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[En(tr,{sx:{flex:1,minWidth:0},children:[at(tr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:z.name}),En(tr,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",z.items.length,"\uAC74",z.description?` \xB7 ${z.description}`:""]})]}),n?at(bs,{size:"medium",variant:"outlined",onClick:()=>n(z),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,at(va,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:at(xa,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>q(z.seq,{name:z.name,description:z.description??"",group_seq:z.group_seq??0,items:z.items.map($=>({...$}))}),children:at(kT,{sx:{fontSize:19}})})}),at(va,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:at(xa,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>q(0,{name:`${z.name} \uC0AC\uBCF8`,description:z.description??"",group_seq:z.group_seq??0,items:z.items.map($=>({...$}))}),children:at(ST,{sx:{fontSize:18}})})}),at(va,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:at(xa,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await FT({title:"\uD15C\uD50C\uB9BF \uC0AD\uC81C",message:`"${z.name}" \uD15C\uD50C\uB9BF\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&t(z.seq))()},children:at(dr,{sx:{fontSize:18}})})})]},z.seq))}),O=En(tr,{sx:{display:"flex",flexDirection:"column",gap:3},children:[at(Ff,{size:"medium",label:"\uD15C\uD50C\uB9BF \uC774\uB984",placeholder:"\uC608: \uC2E0\uADDC \uC785\uC0AC\uC790 \uC628\uBCF4\uB529",fullWidth:!0,value:f.name,onChange:z=>u($=>({...$,name:z.target.value}))}),En(tr,{sx:{display:"grid",gridTemplateColumns:P.length>0?"1fr 1fr":"1fr",gap:2},children:[at(Ff,{size:"medium",label:"\uC124\uBA85",placeholder:"\uBAA9\uB85D\uC5D0\uC11C \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC544\uBCFC \uD55C \uC904(\uC120\uD0DD)",fullWidth:!0,value:f.description??"",onChange:z=>u($=>({...$,description:z.target.value}))}),P.length>0?at(ng,{size:"medium",fullWidth:!0,label:"\uB9CC\uB4E4 \uACF3(\uD504\uB85C\uC81D\uD2B8)",value:String(f.group_seq??0),options:[{value:"0",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...P],onChange:z=>u($=>({...$,group_seq:Number(z.target.value)||0}))}):null]}),En(tr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[at(tr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),at(tr,{sx:{fontSize:14,color:"#37352f"},children:"\uB0A0\uC9DC\uB294 \uC2E4\uD589\uD560 \uB54C \uACE0\uB974\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB429\uB2C8\uB2E4."})]}),f.items.length===0?at(tr,{sx:{fontSize:14,color:"#9a9a97",py:2},children:'\uC544\uC9C1 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. "\uD56D\uBAA9 \uCD94\uAC00" \uB85C \uC808\uCC28\uB97C \uC21C\uC11C\uB300\uB85C \uC801\uC73C\uC138\uC694.'}):at(tr,{ref:A,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:at(jT,{ref:D,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:at(IT,{sensors:y,collisionDetection:ET,modifiers:[DT,AT],onDragEnd:v,children:at(PT,{items:j,strategy:LT,children:f.items.map((z,$)=>at(WT,{id:j[$],children:({handleProps:V})=>En(tr,{sx:{borderBottom:$===f.items.length-1?"none":"1px solid #f2f2f0",px:qf,py:2,gap:2,display:"flex",flexDirection:"column"},children:[En(tr,{sx:{display:"flex",alignItems:"center",gap:qf},children:[at(tr,{...V,"aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC21C\uC11C \uC774\uB3D9`,sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:"#c9c8c5",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:at(TT,{sx:{fontSize:lg}})}),at(Ff,{size:"medium",fullWidth:!0,placeholder:sg,slotProps:{htmlInput:{"data-template-title":$}},value:z.title,onChange:E=>p($,{title:E.target.value})})]}),En(tr,{sx:{display:"flex",alignItems:"center",gap:2,pl:$T},children:[at(tr,{sx:dc,children:at(og,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.start_offset_days??null,onValueChange:E=>p($,{start_offset_days:E===null?void 0:Math.trunc(Number(E))})})}),at(tr,{sx:dc,children:at(og,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.due_offset_days??null,onValueChange:E=>p($,{due_offset_days:E===null?void 0:Math.trunc(Number(E))})})}),at(tr,{sx:dc,children:at(ng,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:z.priority??"medium",options:qT,onChange:E=>p($,{priority:E.target.value})})}),l?En(tr,{sx:{...dc,position:"relative"},children:[at(bs,{variant:"outlined",fullWidth:!0,onClick:()=>{w($)},sx:{height:ag,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${ag-2}px`,py:0,px:1.75,pr:z.manager_account_seq?4.5:1.75,borderColor:"#c4c4c4",color:z.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&:hover":{borderColor:"#37352f",bgcolor:"transparent"}},children:z.manager_name||"\uCC45\uC784\uC790"}),z.manager_account_seq?at(va,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:at(xa,{size:"small","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:E=>{E.stopPropagation(),p($,{manager_account_seq:0,manager_name:""})},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:at(CT,{sx:{fontSize:18}})})}):null]}):null,at(va,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:at(xa,{size:"medium","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(E=>({...E,items:E.items.filter((H,I)=>I!==$)})),k(E=>E.filter((H,I)=>I!==$))},children:at(dr,{sx:{fontSize:18}})})})]})]})},j[$]))})})})})]});return En(UT,{children:[at(rg,{open:e,onClose:o,maxWidth:"md",title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template",tabs:{visible:!1},actions:{showCancelButton:!1,left:at(bs,{startIcon:at(eg,{sx:{fontSize:18}}),onClick:()=>q(0,hc()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:at(bs,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),at(rg,{open:c,onClose:()=>i(!1),maxWidth:"md",title:a>0?"\uD15C\uD50C\uB9BF \uC218\uC815":"\uC0C8 \uD15C\uD50C\uB9BF",locale:"ko",backdropClick:!1,fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template-form",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,left:at(bs,{startIcon:at(eg,{sx:{fontSize:18}}),onClick:()=>{u(z=>({...z,items:[...z.items,HT()]})),k(z=>[...z,N()]),L(z=>z+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:at(bs,{variant:"contained",disabled:g,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:O}]})]})}import{useEffect as cg,useState as ug}from"react";import{Box as jr,Button as VT}from"@mui/material";import{FormDialog as KT}from"@ehfuse/mui-form-dialog";import{DateTextField as GT}from"@ehfuse/mui-form-controls";import YT from"@ehfuse/overlay-scrollbar";import{jsx as Zr,jsxs as wa}from"react/jsx-runtime";function nY({open:e,template:d,todayStr:b,running:l=!1,onClose:o,onRun:s}){let[r,t]=ug(b),[n,c]=ug(d);cg(()=>{d&&c(d)},[d]),cg(()=>{e&&t(b)},[e]);let i=d??n,a=i?op(i,r):[];return Zr(KT,{open:e,onClose:o,maxWidth:"md",title:i?`${i.name} \uC2E4\uD589`:"\uD15C\uD50C\uB9BF \uC2E4\uD589",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-template-run",tabs:{visible:!1},sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:Zr(VT,{variant:"contained",disabled:l||a.length===0,onClick:()=>s(a,r),children:l?"\uB9CC\uB4DC\uB294 \uC911\u2026":`\uC5C5\uBB34 ${a.length}\uAC74 \uB9CC\uB4E4\uAE30`})},sections:[{id:"template-run",title:"",showTitle:!1,children:wa(jr,{sx:{display:"flex",flexDirection:"column",gap:2},children:[wa(jr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Zr(jr,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),Zr(GT,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),Zr(jr,{sx:{fontSize:14.5,color:"#37352f"},children:"\uC544\uB798 \uC5C5\uBB34\uAC00 \uD55C\uAEBC\uBC88\uC5D0 \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4. \uB0A0\uC9DC\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB41C \uAC12\uC785\uB2C8\uB2E4."}),wa(jr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[wa(jr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[Zr(jr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Zr(jr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),Zr(jr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),Zr(jr,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),Zr(YT,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?Zr(jr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,f)=>wa(jr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.25,borderBottom:f===a.length-1?"none":"1px solid #f2f2f0",fontSize:16,fontWeight:500,color:"#111111"},children:[Zr(jr,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Zr(jr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:Fc(h.start_date)||"-"}),Zr(jr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:Fc(h.due_date)||"-"}),Zr(jr,{sx:{width:96,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.manager_name||"-"})]},f))})]})]})}]})}var XT={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function ZT(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function $f(e){let d=String(e??"").trim().slice(0,10);return/^\d{4}-\d{2}-\d{2}$/.test(d)?`${d.slice(2,4)}.${d.slice(5,7)}.${d.slice(8,10)}`:"-"}function ys(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function Hf(e,d){let l=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),o=$f(e.due_date),s=String(e.start_date??"").slice(11,16).trim(),r=$f(e.start_date),t=(e.receiver_names??[]).filter(Boolean).map(c=>String(c).trim()),n=(e.checklist??[]).length?`${(e.checklist??[]).filter(c=>c.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:ur(e).name,projectLabel:e.tab_key?d.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:ZT(t),receiverNamesFull:t.join(", "),startDate:r!=="-"&&s?`${r} ${s}`:r,dueDate:o!=="-"&&l?`${o} ${l}`:o,priorityName:XT[String(e.priority??"")]??"",checklist:n,note:String(e.note??"").trim(),completed:!!e.completed}}function Lt(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function JT(e,d){if(e===" ")return d*.3;let b=e.codePointAt(0)??0,l=b>=4352&&b<=4607||b>=12288&&b<=40959||b>=44032&&b<=55203||b>=63744&&b<=64255||b>=65280&&b<=65519;return d*(l?1:.55)}function pc(e,d){let b=0;for(let l of String(e??""))b+=JT(l,d);return b}function xs(e,d){let b=String(e??"").trim();if(!b)return["-"];let l=[],o="";for(let s of b){if(s===`
|
|
45
45
|
`){o&&l.push(o),o="";continue}let r=`${o}${s}`;if(r.length>d&&o){l.push(o),o=s;continue}o=r}return o&&l.push(o),l.length>0?l:["-"]}function Mi(e,d,b){let l=String(e??"").replace(/\s+/g," ").trim();if(!l)return"";if(pc(l,b)<=d)return l;let o=pc("\u2026",b),s="",r=0;for(let t of l){let n=pc(t,b);if(r+n+o>d)break;s+=t,r+=n}return`${s}\u2026`}var ka=595.28,Sa=841.89,Ta=841.89,Ca=595.28,Fr=28,Rn=96,bn=44,QT="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",e7="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",_a="#cbd5e1",t7=[`text { font-family: ${QT}; fill: #000000; }`,`.doc-title { font-family: ${e7}; font-size: 20px; font-weight: 700; }`,".doc-sub { font-size: 10.5px; fill: #333333; }",".doc-meta { font-size: 9.5px; fill: #333333; }",".th { font-size: 9.5px; font-weight: 700; fill: #000000; }",".td { font-size: 9px; }",".td.done { fill: #555555; }",".gt { font-size: 10px; font-weight: 700; fill: #000000; }",".label { font-size: 9px; fill: #333333; }",".value { font-size: 10px; }",".section { font-size: 11.5px; font-weight: 700; fill: #000000; }",".pageno { font-size: 9px; fill: #333333; }",`.head { fill: #eef2f7; stroke: ${_a}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${_a}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${_a}; stroke-width: 0.5; }`,`.hline { stroke: ${_a}; stroke-width: 0.5; }`,`.vline { stroke: ${_a}; stroke-width: 0.5; }`,".bar { fill: #bfdbfe; stroke: #60a5fa; stroke-width: 0.6; }",".bar.done { fill: #e5e7eb; stroke: #cbd5e1; }",".bar.overdue { fill: #fecaca; stroke: #f87171; }"].join("");function jo(e,d,b){let l=b-Fr;return[`<text x="${Fr}" y="46" class="doc-title">${Lt(e.documentTitle)}</text>`,`<text x="${Fr}" y="66" class="doc-sub">${Lt(e.subtitle)}</text>`,`<text x="${l}" y="42" class="doc-meta" text-anchor="end">${Lt(e.facilityName)}</text>`,`<text x="${l}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${Lt(ys(e.printedAt))}${e.printedBy?` \xB7 ${Lt(e.printedBy)}`:""}</text>`,d?`<text x="${l}" y="74" class="doc-meta" text-anchor="end">${Lt(d)}</text>`:""].join("")}function Fo(e){let{width:d,height:b,body:l,pageIndex:o,pageCount:s}=e;return[`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${b}" viewBox="0 0 ${d} ${b}">`,`<style>${t7}</style>`,`<rect x="0" y="0" width="${d}" height="${b}" fill="#ffffff" />`,l,`<text x="${d/2}" y="${b-22}" class="pageno" text-anchor="middle">${o+1} / ${s}</text>`,"</svg>"].join("")}var Uf=Ta,dg=Ca,qo=Fr,Ba=Uf-Fr,Ma=22,Ei=20,Ri=22,Ia=5,hg=Rn,pg=bn,fg=dg-46,Ea=[{key:"title",label:"\uC81C\uBAA9",width:250,align:"start"},{key:"status",label:"\uC0C1\uD0DC",width:56,align:"middle"},{key:"start",label:"\uC2DC\uC791",width:86,align:"middle"},{key:"due",label:"\uB9C8\uAC10",width:86,align:"middle"},{key:"manager",label:"\uCC45\uC784\uC790",width:62,align:"middle"},{key:"receivers",label:"\uCC38\uC870\uC790",width:122,align:"start"},{key:"priority",label:"\uC911\uC694\uB3C4",width:52,align:"middle"},{key:"project",label:"\uD504\uB85C\uC81D\uD2B8",width:72,align:"middle"}],Wf=Ea.reduce((e,d,b)=>(e.push(b===0?qo:e[b-1]+Ea[b-1].width),e),[]);function r7(e){let d=[],b=[],l=hg+Ma,o=(s,r)=>{d.push(b),b=[],l=pg+Ma,s&&(b.push({kind:"group",label:s,count:r,continued:!0}),l+=Ri)};for(let s of e){s.label&&(l+Ri+Ei>fg&&o("",0),b.push({kind:"group",label:s.label,count:s.rows.length,continued:!1}),l+=Ri);for(let r of s.rows)l+Ei>fg&&o(s.label,s.rows.length),b.push({kind:"row",completed:r.completed,values:Ea.map(t=>{switch(t.key){case"title":return r.title;case"status":return r.statusName;case"project":return r.projectLabel||"\uAE30\uBCF8";case"manager":return r.managerName||"-";case"receivers":return r.receiverNames||"-";case"start":return r.startDate;case"due":return r.dueDate;default:return r.priorityName||"-"}})}),l+=Ei}return d.push(b),d.filter((s,r)=>r===0||s.length>0)}function n7(e,d){let b=[];b.push(`<rect x="${qo}" y="${d}" width="${Ba-qo}" height="${Ma}" class="head" />`),Ea.forEach((o,s)=>{let r=Wf[s],t=o.align==="middle"?r+o.width/2:r+Ia;b.push(`<text x="${t}" y="${d+Ma-7}" class="th" text-anchor="${o.align}">${Lt(o.label)}</text>`)});let l=d+Ma;for(let o of e){if(o.kind==="group"){b.push(`<rect x="${qo}" y="${l}" width="${Ba-qo}" height="${Ri}" class="group" />`,`<text x="${qo+Ia}" y="${l+Ri-7}" class="gt">${Lt(o.continued?`${o.label} (\uC774\uC5B4\uC11C)`:o.label)}</text>`,`<text x="${Ba-Ia}" y="${l+Ri-7}" class="gt" text-anchor="end">${o.count}\uAC74</text>`),l+=Ri;continue}Ea.forEach((s,r)=>{let t=Wf[r],n=s.align==="middle"?t+s.width/2:t+Ia;b.push(`<text x="${n}" y="${l+Ei-6}" class="${o.completed?"td done":"td"}" text-anchor="${s.align}">${Lt(Mi(o.values[r]??"",s.width-Ia*2,9))}</text>`)}),b.push(`<line x1="${qo}" y1="${l+Ei}" x2="${Ba}" y2="${l+Ei}" class="hline" />`),l+=Ei}return Wf.slice(1).forEach(o=>{b.push(`<line x1="${o}" y1="${d}" x2="${o}" y2="${l}" class="vline" />`)}),b.push(`<rect x="${qo}" y="${d}" width="${Ba-qo}" height="${l-d}" class="frame" />`),b.join("")}async function o7(e,d){let b=r7(d),l=d.reduce((o,s)=>o+s.rows.length,0);return b.map((o,s)=>{let r=s===0?hg:pg,t=[s===0?jo(e,`\uC804\uCCB4 ${l}\uAC74`,Uf):"",n7(o,r)].join("");return Fo({width:Uf,height:dg,body:t,pageIndex:s,pageCount:b.length})})}var Kf=ka,mg=Sa,po=Fr,mc=Kf-Fr,i7=mg-46,gg=22,s7=68,a7=(mc-po)/2,l7=14,Vf=58;function vs(e){switch(e.kind){case"title":return 34;case"props":return Math.ceil(e.pairs.length/2)*gg+10;case"section":return 26;default:return l7}}function c7(e){let d=[{kind:"title",text:e.title,ticket:e.ticketNo}];return d.push({kind:"props",pairs:e.properties}),d.push({kind:"section",text:"\uB0B4\uC6A9"}),(e.content.trim()?e.content.split(`
|
|
46
46
|
`).flatMap(l=>l.trim()?xs(l,Vf):[""]):["(\uB0B4\uC6A9 \uC5C6\uC74C)"]).forEach(l=>d.push({kind:"line",text:l,muted:!e.content.trim()})),e.checklist.length>0&&(d.push({kind:"section",text:`\uD560\uC77C (${e.checklist.filter(l=>l.checked).length}/${e.checklist.length})`}),e.checklist.forEach(l=>{xs(l.label,Vf-3).forEach((o,s)=>d.push({kind:s===0?"check":"line",text:o,checked:l.checked}))})),e.includeComments&&e.comments.length>0&&(d.push({kind:"section",text:`\uB313\uAE00 (${e.comments.length})`}),e.comments.forEach(l=>{d.push({kind:"line",text:`${l.author} \xB7 ${l.time}`,muted:!0}),xs(l.text,Vf).forEach(o=>d.push({kind:"line",text:o}))})),d}function u7(e){let d=[],b=[],l=Rn;for(let o of e){let s=vs(o);l+s>i7&&(d.push(b),b=[],l=bn),b.push(o),l+=s}return d.push(b),d}function f7(e,d){switch(e.kind){case"title":{let b=e.ticket?`<text x="${mc}" y="${d+16}" class="doc-meta" text-anchor="end">${Lt(e.ticket)}</text>`:"";return{markup:`<text x="${po}" y="${d+16}" class="section" style="font-size:14px">${Lt(e.text)}</text>${b}<line x1="${po}" y1="${d+24}" x2="${mc}" y2="${d+24}" class="hline" />`,nextY:d+vs(e)}}case"props":{let b=[];return e.pairs.forEach((l,o)=>{let s=o%2,r=Math.floor(o/2),t=po+s*a7,n=d+r*gg;b.push(`<text x="${t}" y="${n+14}" class="label">${Lt(l.label)}</text>`,`<text x="${t+s7}" y="${n+14}" class="value">${Lt(xs(l.value||"-",26)[0]??"-")}</text>`)}),{markup:b.join(""),nextY:d+vs(e)}}case"section":return{markup:`<text x="${po}" y="${d+16}" class="section">${Lt(e.text)}</text><line x1="${po}" y1="${d+21}" x2="${mc}" y2="${d+21}" class="hline" />`,nextY:d+vs(e)};case"check":return{markup:`<text x="${po}" y="${d+10}" class="td">${e.checked?"\u2611":"\u2610"}</text><text x="${po+14}" y="${d+10}" class="${e.checked?"td done":"td"}">${Lt(e.text)}</text>`,nextY:d+vs(e)};default:return{markup:`<text x="${po}" y="${d+10}" class="${e.muted?"td done":"td"}">${Lt(e.text)}</text>`,nextY:d+vs(e)}}}async function d7(e,d){let b=u7(c7(d));return b.map((l,o)=>{let s=o===0?Rn:bn,r=[o===0?jo(e,"",Kf):`<text x="${po}" y="${bn-12}" class="doc-meta">${Lt(`${d.title} (\uC774\uC5B4\uC11C)`)}</text>`];for(let t of l){let n=f7(t,s);r.push(n.markup),s=n.nextY}return Fo({width:Kf,height:mg,body:r.join(""),pageIndex:o,pageCount:b.length})})}var Yf=Ta,xg=Ca,gc=Fr,Ra=Yf-Fr,bg=xg-46,yg=210,li=20,Gf=24;function ci(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let d=new Date(`${e}T00:00:00`);return Number.isNaN(d.getTime())?null:d}function vg(e,d){return Math.round((d.getTime()-e.getTime())/864e5)}function h7(e,d){let b=[];e.forEach(r=>{let t=ci(r.startDate),n=ci(r.dueDate);t&&b.push(t),n&&b.push(n)});let l=ci(d)??new Date;if(b.length===0)return{start:l,days:30};let o=new Date(Math.min(...b.map(r=>r.getTime()))),s=new Date(Math.max(...b.map(r=>r.getTime())));return o.setDate(o.getDate()-1),s.setDate(s.getDate()+1),{start:o,days:Math.max(7,vg(o,s)+1)}}async function p7(e,d,b){let l=h7(d,b),o=gc+yg,r=(Ra-o)/l.days,t=ci(b),n=f=>o+vg(l.start,f)*r,c=Math.max(1,Math.floor((bg-Rn-Gf)/li)),i=Math.max(1,Math.floor((bg-bn-Gf)/li)),a=[],h=0;for(;h<d.length||a.length===0;){let f=a.length===0?c:i;if(a.push(d.slice(h,h+f)),h+=f,h>=d.length)break}return a.map((f,u)=>{let g=u===0?Rn:bn,m=[u===0?jo(e,`\uC804\uCCB4 ${d.length}\uAC74`,Yf):""],x=g+Gf;m.push(`<line x1="${gc}" y1="${x}" x2="${Ra}" y2="${x}" class="vline" />`);for(let k=0;k<l.days;k+=1){let B=new Date(l.start);if(B.setDate(B.getDate()+k),B.getDay()!==0&&k!==0)continue;let R=o+k*r;m.push(`<line x1="${R}" y1="${x}" x2="${R}" y2="${x+f.length*li}" class="hline" />`,`<text x="${R+2}" y="${x-6}" class="label">${B.getMonth()+1}.${B.getDate()}</text>`)}if(t&&t>=l.start){let k=n(t);k>=o&&k<=Ra&&m.push(`<line x1="${k}" y1="${x}" x2="${k}" y2="${x+f.length*li}" stroke="#f87171" stroke-width="0.8" />`)}return f.forEach((k,B)=>{let R=x+B*li,L=Mi(k.title,yg-64,9);m.push(`<text x="${gc}" y="${R+14}" class="${k.completed?"td done":"td"}">${Lt(L)}</text>`,`<text x="${o-6}" y="${R+14}" class="label" text-anchor="end">${Lt(k.managerName)}</text>`,`<line x1="${gc}" y1="${R+li}" x2="${Ra}" y2="${R+li}" class="hline" />`);let A=ci(k.startDate)??ci(k.dueDate),D=ci(k.dueDate)??ci(k.startDate);if(!A||!D)return;let N=n(A),q=Math.max(N+r*.8,n(D)+r*.8),j=k.completed?"bar done":k.overdue?"bar overdue":"bar";m.push(`<rect x="${N}" y="${R+5}" width="${Math.max(3,Math.min(q,Ra)-N)}" height="${li-10}" rx="2" class="${j}" />`)}),Fo({width:Yf,height:xg,body:m.join(""),pageIndex:u,pageCount:a.length})})}function m7(e,d,b,l){return{title:e.title,managerName:e.managerName,startDate:String(d??"").slice(0,10),dueDate:String(b??"").slice(0,10),completed:e.completed,overdue:!e.completed&&!!b&&String(b).slice(0,10)<l}}var Xf=ka,_g=Sa,ws=Fr,bc=Xf-Fr,wg=_g-46,_s=30,ks=18,kg=12;function g7(e){let d=[],b=[],l=Rn,o=(s,r)=>{d.push(b),b=[],l=bn,s&&(b.push({kind:"column",label:s,summary:r,continued:!0,gapBefore:!1}),l+=_s)};for(let s of e){let r=b.length>0,t=r?kg:0;if(l+t+_s+ks>wg?(o("",""),b.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:!1}),l+=_s):(b.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:r}),l+=t+_s),s.items.length===0){b.push({kind:"empty"}),l+=ks;continue}for(let n of s.items)l+ks>wg&&o(s.label,s.summary),b.push({kind:"item",title:n.title,meta:n.meta,completed:n.completed}),l+=ks}return d.push(b),d}async function b7(e,d,b){let l=g7(d);return l.map((o,s)=>{let r=s===0?Rn:bn,t=[s===0?jo(e,b,Xf):""];for(let n of o){if(n.kind==="column"){n.gapBefore&&(r+=kg),t.push(`<rect x="${ws}" y="${r}" width="${bc-ws}" height="${_s-6}" class="group" />`,`<text x="${ws+6}" y="${r+16}" class="gt">${Lt(n.continued?`${n.label} (\uC774\uC5B4\uC11C)`:n.label)}</text>`,`<text x="${bc-6}" y="${r+16}" class="label" text-anchor="end">${Lt(n.summary)}</text>`),r+=_s;continue}if(n.kind==="empty"){t.push(`<text x="${ws+12}" y="${r+12}" class="td done">(\uC5C5\uBB34 \uC5C6\uC74C)</text>`),r+=ks;continue}t.push(`<text x="${ws+12}" y="${r+12}" class="${n.completed?"td done":"td"}">${Lt(Mi(n.title,bc-ws-12-120,9))}</text>`,`<text x="${bc-6}" y="${r+12}" class="label" text-anchor="end">${Lt(n.meta)}</text>`),r+=ks}return Fo({width:Xf,height:_g,body:t.join(""),pageIndex:s,pageCount:l.length})})}var y7=[{header:"\uADF8\uB8F9",width:16},{header:"\uC81C\uBAA9",width:44},{header:"\uC0C1\uD0DC",width:10},{header:"\uD504\uB85C\uC81D\uD2B8",width:14},{header:"\uCC45\uC784\uC790",width:10},{header:"\uCC38\uC870\uC790",width:22},{header:"\uC2DC\uC791",width:12},{header:"\uB9C8\uAC10",width:14},{header:"\uC911\uC694\uB3C4",width:8},{header:"\uD560\uC77C",width:8},{header:"\uBE44\uACE0",width:30}],x7="FFEEF2F7",yc="FFCBD5E1";function v7(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()||"\uC5C5\uBB34\uBAA9\uB85D"}async function w7(e,d){let b=await Promise.resolve().then(()=>Ag(Tg(),1)),l=new b.Workbook,o=l.addWorksheet("\uC5C5\uBB34\uBAA9\uB85D",{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0,fitToWidth:1,fitToHeight:0}});o.columns=y7.map(i=>({header:i.header,width:i.width})),o.spliceRows(1,0,[`${e.documentTitle}`],[`${e.subtitle} \xB7 ${e.facilityName} \xB7 \uCD9C\uB825 ${ys(e.printedAt)}${e.printedBy?` \xB7 ${e.printedBy}`:""}`]),o.getRow(1).font={bold:!0,size:14},o.getRow(2).font={size:10,color:{argb:"FF6B7280"}};let s=o.getRow(3);s.font={bold:!0,size:10},s.eachCell(i=>{i.fill={type:"pattern",pattern:"solid",fgColor:{argb:x7}},i.alignment={vertical:"middle",horizontal:"center"}}),d.forEach(i=>{i.rows.forEach(a=>{let h=o.addRow([i.label,a.title,a.statusName,a.projectLabel||"\uAE30\uBCF8",a.managerName,a.receiverNamesFull,a.startDate==="-"?"":a.startDate,a.dueDate==="-"?"":a.dueDate,a.priorityName,a.checklist,a.note]);h.font={size:10,color:{argb:a.completed?"FF9CA3AF":"FF111827"}},h.alignment={vertical:"middle",wrapText:!1}})});let r=o.rowCount;for(let i=3;i<=r;i+=1)o.getRow(i).eachCell({includeEmpty:!0},a=>{a.border={top:{style:"thin",color:{argb:yc}},left:{style:"thin",color:{argb:yc}},bottom:{style:"thin",color:{argb:yc}},right:{style:"thin",color:{argb:yc}}}});o.views=[{state:"frozen",ySplit:3}];let t=await l.xlsx.writeBuffer(),n=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),c=ys(e.printedAt).replace(/[: ]/g,"").slice(0,13);return{blob:n,fileName:`${v7(e.documentTitle)}_${c}.xlsx`}}function _7(e){return String(e??"").replace(/<br\s*\/?>(?=.)/gi,`
|
|
47
47
|
`).replace(/<\/(p|div|li|h[1-6])>/gi,`
|