@ehfuse/taskbox 0.5.368 → 0.5.369

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 CHANGED
@@ -1,4 +1,4 @@
1
- var Mg=Object.create;var sf=Object.defineProperty;var Rg=Object.getOwnPropertyDescriptor;var Og=Object.getOwnPropertyNames;var Ag=Object.getPrototypeOf,Dg=Object.prototype.hasOwnProperty;var Es=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(d,g)=>(typeof require<"u"?require:d)[g]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Pg=(e,d)=>()=>(d||e((d={exports:{}}).exports,d),d.exports);var Ng=(e,d,g,l)=>{if(d&&typeof d=="object"||typeof d=="function")for(let o of Og(d))!Dg.call(e,o)&&o!==g&&sf(e,o,{get:()=>d[o],enumerable:!(l=Rg(d,o))||l.enumerable});return e};var Lg=(e,d,g)=>(g=e!=null?Mg(Ag(e)):{},Ng(d||!e||!e.__esModule?sf(g,"default",{value:e,enumerable:!0}):g,e));var Eg=Pg((Ig,rf)=>{(function(e){typeof Ig=="object"&&typeof rf<"u"?rf.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).ExcelJS=e()})((function(){return(function e(d,g,l){function o(t,n){if(!g[t]){if(!d[t]){var c=typeof Es=="function"&&Es;if(!n&&c)return c(t,!0);if(s)return s(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var a=g[t]={exports:{}};d[t][0].call(a.exports,(function(h){return o(d[t][1][h]||h)}),a,a.exports,e,d,g,l)}return g[t].exports}for(var s=typeof Es=="function"&&Es,r=0;r<l.length;r++)o(l[r]);return o})({1:[function(e,d,g){"use strict";let l=e("fs"),o=e("fast-csv"),s=e("dayjs/plugin/customParseFormat"),r=e("dayjs/plugin/utc"),t=e("dayjs").extend(s).extend(r),n=e("../utils/stream-buf"),{fs:{exists:c}}=e("../utils/utils"),i={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};d.exports=class{constructor(a){this.workbook=a,this.worksheet=null}async readFile(a,h){if(h=h||{},!await c(a))throw new Error("File not found: "+a);let f=l.createReadStream(a),u=await this.read(f,h);return f.close(),u}read(a,h){return h=h||{},new Promise((f,u)=>{let b=this.workbook.addWorksheet(h.sheetName),m=h.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],v=h.map||function(B){if(B==="")return null;let R=Number(B);if(!Number.isNaN(R)&&R!==1/0)return R;let L=m.reduce((D,N)=>{if(D)return D;let q=t(B,N,!0);return q.isValid()?q:null},null);if(L)return new Date(L.valueOf());let A=i[B];return A!==void 0?A:B},k=o.parse(h.parserOptions).on("data",B=>{b.addRow(B.map(v))}).on("end",()=>{k.emit("worksheet",b)});k.on("worksheet",f).on("error",u),a.pipe(k)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(a,h){return new Promise((f,u)=>{h=h||{};let b=this.workbook.getWorksheet(h.sheetName||h.sheetId),m=o.format(h.formatterOptions);a.on("finish",()=>{f()}),m.on("error",u),m.pipe(a);let{dateFormat:v,dateUTC:k}=h,B=h.map||(A=>{if(A){if(A.text||A.hyperlink)return A.hyperlink||A.text||"";if(A.formula||A.result)return A.result||"";if(A instanceof Date)return v?k?t.utc(A).format(v):t(A).format(v):k?t.utc(A).format():t(A).format();if(A.error)return A.error;if(typeof A=="object")return JSON.stringify(A)}return A}),R=h.includeEmptyRows===void 0||h.includeEmptyRows,L=1;b&&b.eachRow((A,D)=>{if(R)for(;L++<D-1;)m.write([]);let{values:N}=A;N.shift(),m.write(N.map(B)),L=D}),m.end()})}writeFile(a,h){let f={encoding:(h=h||{}).encoding||"utf8"},u=l.createWriteStream(a,f);return this.write(u,h)}async writeBuffer(a){let h=new n;return await this.write(h,a),h.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(e,d,g){"use strict";let l=e("../utils/col-cache");class o{constructor(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=r,t)if(typeof t=="string"){let c=l.decodeAddress(t);this.nativeCol=c.col+n,this.nativeColOff=0,this.nativeRow=c.row+n,this.nativeRowOff=0}else t.nativeCol!==void 0?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):t.col!==void 0?(this.col=t.col+n,this.row=t.row+n):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(r){return r instanceof o||r==null?r:new o(r)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(r){this.nativeCol=Math.floor(r),this.nativeColOff=Math.floor((r-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(r){this.nativeRow=Math.floor(r),this.nativeRowOff=Math.floor((r-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(r){this.nativeCol=r.nativeCol,this.nativeColOff=r.nativeColOff,this.nativeRow=r.nativeRow,this.nativeRowOff=r.nativeRowOff}}d.exports=o},{"../utils/col-cache":19}],3:[function(e,d,g){"use strict";let l=e("../utils/col-cache"),o=e("../utils/under-dash"),s=e("./enums"),{slideFormula:r}=e("../utils/shared-formula"),t=e("./note");class n{constructor(a,h,f){if(!a||!h)throw new Error("A Cell needs a Row");this._row=a,this._column=h,l.validateAddress(f),this._address=f,this._value=c.create(n.Types.Null,this),this.style=this._mergeStyle(a.style,h.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(a){this.style.numFmt=a}get font(){return this.style.font}set font(a){this.style.font=a}get alignment(){return this.style.alignment}set alignment(a){this.style.alignment=a}get border(){return this.style.border}set border(a){this.style.border=a}get fill(){return this.style.fill}set fill(a){this.style.fill=a}get protection(){return this.style.protection}set protection(a){this.style.protection=a}_mergeStyle(a,h,f){let u=a&&a.numFmt||h&&h.numFmt;u&&(f.numFmt=u);let b=a&&a.font||h&&h.font;b&&(f.font=b);let m=a&&a.alignment||h&&h.alignment;m&&(f.alignment=m);let v=a&&a.border||h&&h.border;v&&(f.border=v);let k=a&&a.fill||h&&h.fill;k&&(f.fill=k);let B=a&&a.protection||h&&h.protection;return B&&(f.protection=B),f}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===n.Types.Merge}merge(a,h){this._value.release(),this._value=c.create(n.Types.Merge,this,a),h||(this.style=a.style)}unmerge(){this.type===n.Types.Merge&&(this._value.release(),this._value=c.create(n.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(a){return this._value.type===n.Types.Merge&&this._value.isMergedTo(a)}get master(){return this.type===n.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===n.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(a){this.type!==n.Types.Merge?(this._value.release(),this._value=c.create(c.getType(a),this,a)):this._value.master.value=a}get note(){return this._comment&&this._comment.note}set note(a){this._comment=new t(a)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(a){this.type===n.Types.String&&(this._value=c.create(n.Types.Hyperlink,this,{text:this._value.value,hyperlink:a}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:a}=this._row;return{sheetName:a.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(a){this.names=[a]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(a){let{definedNames:h}=this.workbook;h.removeAllNames(this.fullAddress),a.forEach(f=>{h.addEx(this.fullAddress,f)})}addName(a){this.workbook.definedNames.addEx(this.fullAddress,a)}removeName(a){this.workbook.definedNames.removeEx(this.fullAddress,a)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(a){this._dataValidations.add(this.address,a)}get model(){let{model:a}=this._value;return a.style=this.style,this._comment&&(a.comment=this._comment.model),a}set model(a){this._value.release(),this._value=c.create(a.type,this),this._value.model=a,a.comment&&a.comment.type==="note"&&(this._comment=t.fromModel(a.comment)),a.style?this.style=a.style:this.style={}}}n.Types=s.ValueType;let c={getType:i=>i==null?n.Types.Null:i instanceof String||typeof i=="string"?n.Types.String:typeof i=="number"?n.Types.Number:typeof i=="boolean"?n.Types.Boolean:i instanceof Date?n.Types.Date:i.text&&i.hyperlink?n.Types.Hyperlink:i.formula||i.sharedFormula?n.Types.Formula:i.richText?n.Types.RichText:i.sharedString?n.Types.SharedString:i.error?n.Types.Error:n.Types.JSON,types:[{t:n.Types.Null,f:class{constructor(i){this.model={address:i.address,type:n.Types.Null}}get value(){return null}set value(i){}get type(){return n.Types.Null}get effectiveType(){return n.Types.Null}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){}toString(){return""}}},{t:n.Types.Number,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Number,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Number}get effectiveType(){return n.Types.Number}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.String,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:n.Types.Date,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Date,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Date}get effectiveType(){return n.Types.Date}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Hyperlink,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Hyperlink,text:a?a.text:void 0,hyperlink:a?a.hyperlink:void 0},a&&a.tooltip&&(this.model.tooltip=a.tooltip)}get value(){let i={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(i.tooltip=this.model.tooltip),i}set value(i){this.model={text:i.text,hyperlink:i.hyperlink},i.tooltip&&(this.model.tooltip=i.tooltip)}get text(){return this.model.text}set text(i){this.model.text=i}get hyperlink(){return this.model.hyperlink}set hyperlink(i){this.model.hyperlink=i}get type(){return n.Types.Hyperlink}get effectiveType(){return n.Types.Hyperlink}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:n.Types.Formula,f:class{constructor(i,a){this.cell=i,this.model={address:i.address,type:n.Types.Formula,shareType:a?a.shareType:void 0,ref:a?a.ref:void 0,formula:a?a.formula:void 0,sharedFormula:a?a.sharedFormula:void 0,result:a?a.result:void 0}}_copyModel(i){let a={},h=f=>{let u=i[f];u&&(a[f]=u)};return h("formula"),h("result"),h("ref"),h("shareType"),h("sharedFormula"),a}get value(){return this._copyModel(this.model)}set value(i){this.model=this._copyModel(i)}validate(i){switch(c.getType(i)){case n.Types.Null:case n.Types.String:case n.Types.Number:case n.Types.Date:break;case n.Types.Hyperlink:case n.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(i){this.model.formula=i}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(i){this.model.result=i}get type(){return n.Types.Formula}get effectiveType(){let i=this.model.result;return i==null?s.ValueType.Null:i instanceof String||typeof i=="string"?s.ValueType.String:typeof i=="number"?s.ValueType.Number:i instanceof Date?s.ValueType.Date:i.text&&i.hyperlink?s.ValueType.Hyperlink:i.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(i){this.model.address=i}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:i}=this.cell,a=i.findCell(this.model.sharedFormula);this._translatedFormula=a&&r(a.formula,a.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:n.Types.Merge,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Merge,master:a?a.address:void 0},this._master=a,a&&a.addMergeRef()}get value(){return this._master.value}set value(i){i instanceof n?(this._master&&this._master.releaseMergeRef(),i.addMergeRef(),this._master=i):this._master.value=i}isMergedTo(i){return i===this._master}get master(){return this._master}get type(){return n.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:n.Types.JSON,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:JSON.stringify(a),rawValue:a}}get value(){return this.model.rawValue}set value(i){this.model.rawValue=i,this.model.value=JSON.stringify(i)}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:n.Types.SharedString,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.SharedString,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.SharedString}get effectiveType(){return n.Types.SharedString}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.RichText,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}toString(){return this.model.value.richText.map(i=>i.text).join("")}get type(){return n.Types.RichText}get effectiveType(){return n.Types.RichText}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:n.Types.Boolean,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Boolean,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Boolean}get effectiveType(){return n.Types.Boolean}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Error,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Error,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Error}get effectiveType(){return n.Types.Error}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((i,a)=>(i[a.t]=a.f,i),[]),create(i,a,h){let f=this.types[i];if(!f)throw new Error("Could not create Value of type "+i);return new f(a,h)}};d.exports=n},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,d,g){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache");class r{constructor(n,c,i){this._worksheet=n,this._number=c,i!==!1&&(this.defn=i)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(n){n?(this.key=n.key,this.width=n.width!==void 0?n.width:9,this.outlineLevel=n.outlineLevel,n.style?this.style=n.style:this.style={},this.header=n.header,this._hidden=!!n.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(n){n!==void 0?(this._header=n,this.headers.forEach((c,i)=>{this._worksheet.getCell(i+1,this.number).value=c})):this._header=void 0}get key(){return this._key}set key(n){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=n,n&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(n){this._hidden=n}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(n){this._outlineLevel=n}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(n){return this.width===n.width&&this.hidden===n.hidden&&this.outlineLevel===n.outlineLevel&&l.isEqual(this.style,n.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;let n=this.style;return!n||!(n.font||n.numFmt||n.alignment||n.border||n.fill||n.protection)}get headerCount(){return this.headers.length}eachCell(n,c){let i=this.number;c||(c=n,n=null),this._worksheet.eachRow(n,(a,h)=>{c(a.getCell(i),h)})}get values(){let n=[];return this.eachCell((c,i)=>{c&&c.type!==o.ValueType.Null&&(n[i]=c.value)}),n}set values(n){if(!n)return;let c=this.number,i=0;n.hasOwnProperty("0")&&(i=1),n.forEach((a,h)=>{this._worksheet.getCell(h+i,c).value=a})}_applyStyle(n,c){return this.style[n]=c,this.eachCell(i=>{i[n]=c}),c}get numFmt(){return this.style.numFmt}set numFmt(n){this._applyStyle("numFmt",n)}get font(){return this.style.font}set font(n){this._applyStyle("font",n)}get alignment(){return this.style.alignment}set alignment(n){this._applyStyle("alignment",n)}get protection(){return this.style.protection}set protection(n){this._applyStyle("protection",n)}get border(){return this.style.border}set border(n){this._applyStyle("border",n)}get fill(){return this.style.fill}set fill(n){this._applyStyle("fill",n)}static toModel(n){let c=[],i=null;return n&&n.forEach((a,h)=>{a.isDefault?i&&(i=null):i&&a.equivalentTo(i)?i.max=h+1:(i={min:h+1,max:h+1,width:a.width!==void 0?a.width:9,style:a.style,isCustomWidth:a.isCustomWidth,hidden:a.hidden,outlineLevel:a.outlineLevel,collapsed:a.collapsed},c.push(i))}),c.length?c:void 0}static fromModel(n,c){let i=[],a=1,h=0;for(c=(c=c||[]).sort((function(f,u){return f.min-u.min}));h<c.length;){let f=c[h++];for(;a<f.min;)i.push(new r(n,a++));for(;a<=f.max;)i.push(new r(n,a++,f))}return i.length?i:null}}d.exports=r},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,d,g){"use strict";d.exports=class{constructor(l){this.model=l||{}}add(l,o){return this.model[l]=o}find(l){return this.model[l]}remove(l){this.model[l]=void 0}}},{}],6:[function(e,d,g){"use strict";let l=e("../utils/under-dash"),o=e("../utils/col-cache"),s=e("../utils/cell-matrix"),r=e("./range"),t=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;d.exports=class{constructor(){this.matrixMap={}}getMatrix(n){return this.matrixMap[n]||(this.matrixMap[n]=new s)}add(n,c){let i=o.decodeEx(n);this.addEx(i,c)}addEx(n,c){let i=this.getMatrix(c);if(n.top)for(let a=n.left;a<=n.right;a++)for(let h=n.top;h<=n.bottom;h++){let f={sheetName:n.sheetName,address:o.n2l(a)+h,row:h,col:a};i.addCellEx(f)}else i.addCellEx(n)}remove(n,c){let i=o.decodeEx(n);this.removeEx(i,c)}removeEx(n,c){this.getMatrix(c).removeCellEx(n)}removeAllNames(n){l.each(this.matrixMap,c=>{c.removeCellEx(n)})}forEach(n){l.each(this.matrixMap,(c,i)=>{c.forEach(a=>{n(i,a)})})}getNames(n){return this.getNamesEx(o.decodeEx(n))}getNamesEx(n){return l.map(this.matrixMap,(c,i)=>c.findCellEx(n)&&i).filter(Boolean)}_explore(n,c){c.mark=!1;let{sheetName:i}=c,a=new r(c.row,c.col,c.row,c.col,i),h,f;function u(m,v){let k=n.findCellAt(i,m,c.col);return!(!k||!k.mark)&&(a[v]=m,k.mark=!1,!0)}for(f=c.row-1;u(f,"top");f--);for(f=c.row+1;u(f,"bottom");f++);function b(m,v){let k=[];for(f=a.top;f<=a.bottom;f++){let B=n.findCellAt(i,f,m);if(!B||!B.mark)return!1;k.push(B)}a[v]=m;for(let B=0;B<k.length;B++)k[B].mark=!1;return!0}for(h=c.col-1;b(h,"left");h--);for(h=c.col+1;b(h,"right");h++);return a}getRanges(n,c){return(c=c||this.matrixMap[n])?(c.forEach(i=>{i.mark=!0}),{name:n,ranges:c.map(i=>i.mark&&this._explore(c,i)).filter(Boolean).map(i=>i.$shortRange)}):{name:n,ranges:[]}}normaliseMatrix(n,c){n.forEachInSheet(c,(i,a,h)=>{i&&(i.row===a&&i.col===h||(i.row=a,i.col=h,i.address=o.n2l(h)+a))})}spliceRows(n,c,i,a){l.each(this.matrixMap,h=>{h.spliceRows(n,c,i,a),this.normaliseMatrix(h,n)})}spliceColumns(n,c,i,a){l.each(this.matrixMap,h=>{h.spliceColumns(n,c,i,a),this.normaliseMatrix(h,n)})}get model(){return l.map(this.matrixMap,(n,c)=>this.getRanges(c,n)).filter(n=>n.ranges.length)}set model(n){let c=this.matrixMap={};n.forEach(i=>{let a=c[i.name]=new s;i.ranges.forEach(h=>{t.test(h.split("!").pop()||"")&&a.addCell(h)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,d,g){"use strict";d.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,d,g){"use strict";let l=e("../utils/col-cache"),o=e("./anchor");d.exports=class{constructor(s,r){this.worksheet=s,this.model=r}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(s){let{type:r,imageId:t,range:n,hyperlinks:c}=s;if(this.type=r,this.imageId=t,r==="image")if(typeof n=="string"){let i=l.decode(n);this.range={tl:new o(this.worksheet,{col:i.left,row:i.top},-1),br:new o(this.worksheet,{col:i.right,row:i.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,n.tl,0),br:n.br&&new o(this.worksheet,n.br,0),ext:n.ext,editAs:n.editAs,hyperlinks:c||n.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,d,g){"use strict";let l=e("../utils/under-dash");class o{constructor(r){this.note=r}get model(){let r=null;return typeof this.note==="string"?r={type:"note",note:{texts:[{text:this.note}]}}:r={type:"note",note:this.note},l.deepMerge({},o.DEFAULT_CONFIGS,r)}set model(r){let{note:t}=r,{texts:n}=t;n.length===1&&Object.keys(n[0]).length===1?this.note=n[0].text:this.note=t}static fromModel(r){let t=new o;return t.model=r,t}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},d.exports=o},{"../utils/under-dash":26}],10:[function(e,d,g){"use strict";let l=e("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(r,t,n,c,i){if(arguments.length<4){let a=l.decodeAddress(r),h=l.decodeAddress(t);this.model={top:Math.min(a.row,h.row),left:Math.min(a.col,h.col),bottom:Math.max(a.row,h.row),right:Math.max(a.col,h.col),sheetName:n},this.setTLBR(a.row,a.col,h.row,h.col,i)}else this.model={top:Math.min(r,n),left:Math.min(t,c),bottom:Math.max(r,n),right:Math.max(t,c),sheetName:i}}decode(r){switch(r.length){case 5:this.setTLBR(r[0],r[1],r[2],r[3],r[4]);break;case 4:this.setTLBR(r[0],r[1],r[2],r[3]);break;case 3:this.setTLBR(r[0],r[1],r[2]);break;case 2:this.setTLBR(r[0],r[1]);break;case 1:{let t=r[0];if(t instanceof o)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{let n=l.decodeEx(t);n.top?this.model={top:n.top,left:n.left,bottom:n.bottom,right:n.right,sheetName:n.sheetName}:this.model={top:n.row,left:n.col,bottom:n.row,right:n.col,sheetName:n.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+r.length)}}get top(){return this.model.top||1}set top(r){this.model.top=r}get left(){return this.model.left||1}set left(r){this.model.left=r}get bottom(){return this.model.bottom||1}set bottom(r){this.model.bottom=r}get right(){return this.model.right||1}set right(r){this.model.right=r}get sheetName(){return this.model.sheetName}set sheetName(r){this.model.sheetName=r}get _serialisedSheetName(){let{sheetName:r}=this.model;return r?/^[a-zA-Z0-9]*$/.test(r)?r+"!":`'${r}'!`:""}expand(r,t,n,c){(!this.model.top||r<this.top)&&(this.top=r),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||n>this.bottom)&&(this.bottom=n),(!this.model.right||c>this.right)&&(this.right=c)}expandRow(r){if(r){let{dimensions:t,number:n}=r;t&&this.expand(n,t.min,n,t.max)}}expandToAddress(r){let t=l.decodeEx(r);this.expand(t.row,t.col,t.row,t.col)}get tl(){return l.n2l(this.left)+this.top}get $t$l(){return`$${l.n2l(this.left)}$${this.top}`}get br(){return l.n2l(this.right)+this.bottom}get $b$r(){return`$${l.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&!(r.bottom<this.top)&&!(r.top>this.bottom)&&!(r.right<this.left)&&!(r.left>this.right)}contains(r){let t=l.decodeEx(r);return this.containsEx(t)}containsEx(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&r.row>=this.top&&r.row<=this.bottom&&r.col>=this.left&&r.col<=this.right}forEachAddress(r){for(let t=this.left;t<=this.right;t++)for(let n=this.top;n<=this.bottom;n++)r(l.encodeAddress(n,t),n,t)}}d.exports=o},{"../utils/col-cache":19}],11:[function(e,d,g){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache"),r=e("./cell");d.exports=class{constructor(t,n){this._worksheet=t,this._number=n,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(t){return this._cells[t-1]}getCellEx(t){let n=this._cells[t.col-1];if(!n){let c=this._worksheet.getColumn(t.col);n=new r(this,c,t.address),this._cells[t.col-1]=n}return n}getCell(t){if(typeof t=="string"){let n=this._worksheet.getColumnKey(t);t=n?n.number:s.l2n(t)}return this._cells[t-1]||this.getCellEx({address:s.encodeAddress(this._number,t),row:this._number,col:t})}splice(t,n){let c=t+n;for(var i=arguments.length,a=new Array(i>2?i-2:0),h=2;h<i;h++)a[h-2]=arguments[h];let f=a.length-n,u=this._cells.length,b,m,v;if(f<0)for(b=t+a.length;b<=u;b++)v=this._cells[b-1],m=this._cells[b-f-1],m?(v=this.getCell(b),v.value=m.value,v.style=m.style,v._comment=m._comment):v&&(v.value=null,v.style={},v._comment=void 0);else if(f>0)for(b=u;b>=c;b--)m=this._cells[b-1],m?(v=this.getCell(b+f),v.value=m.value,v.style=m.style,v._comment=m._comment):this._cells[b+f-1]=void 0;for(b=0;b<a.length;b++)v=this.getCell(t+b),v.value=a[b],v.style={},v._comment=void 0}eachCell(t,n){if(n||(n=t,t=null),t&&t.includeEmpty){let c=this._cells.length;for(let i=1;i<=c;i++)n(this.getCell(i),i)}else this._cells.forEach((c,i)=>{c&&c.type!==o.ValueType.Null&&n(c,i+1)})}addPageBreak(t,n){let c=this._worksheet,i=Math.max(0,t-1)||0,a=Math.max(0,n-1)||16838,h={id:this._number,max:a,man:1};i&&(h.min=i),c.rowBreaks.push(h)}get values(){let t=[];return this._cells.forEach(n=>{n&&n.type!==o.ValueType.Null&&(t[n.col]=n.value)}),t}set values(t){if(this._cells=[],t)if(t instanceof Array){let n=0;t.hasOwnProperty("0")&&(n=1),t.forEach((c,i)=>{c!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,i+n),row:this._number,col:i+n}).value=c)})}else this._worksheet.eachColumnKey((n,c)=>{t[c]!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,n.number),row:this._number,col:n.number}).value=t[c])})}get hasValues(){return l.some(this._cells,t=>t&&t.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let t=0;return this.eachCell(()=>{t++}),t}get dimensions(){let t=0,n=0;return this._cells.forEach(c=>{c&&c.type!==o.ValueType.Null&&((!t||t>c.col)&&(t=c.col),n<c.col&&(n=c.col))}),t>0?{min:t,max:n}:null}_applyStyle(t,n){return this.style[t]=n,this._cells.forEach(c=>{c&&(c[t]=n)}),n}get numFmt(){return this.style.numFmt}set numFmt(t){this._applyStyle("numFmt",t)}get font(){return this.style.font}set font(t){this._applyStyle("font",t)}get alignment(){return this.style.alignment}set alignment(t){this._applyStyle("alignment",t)}get protection(){return this.style.protection}set protection(t){this._applyStyle("protection",t)}get border(){return this.style.border}set border(t){this._applyStyle("border",t)}get fill(){return this.style.fill}set fill(t){this._applyStyle("fill",t)}get hidden(){return!!this._hidden}set hidden(t){this._hidden=t}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(t){this._outlineLevel=t}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let t=[],n=0,c=0;return this._cells.forEach(i=>{if(i){let a=i.model;a&&((!n||n>i.col)&&(n=i.col),c<i.col&&(c=i.col),t.push(a))}}),this.height||t.length?{cells:t,number:this.number,min:n,max:c,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(t){if(t.number!==this._number)throw new Error("Invalid row number in model");let n;this._cells=[],t.cells.forEach(c=>{switch(c.type){case r.Types.Merge:break;default:{let i;if(c.address)i=s.decodeAddress(c.address);else if(n){let{row:a}=n,h=n.col+1;i={row:a,col:h,address:s.encodeAddress(a,h),$col$row:`$${s.n2l(h)}$${a}`}}n=i,this.getCellEx(i).model=c;break}}}),t.height?this.height=t.height:delete this.height,this.hidden=t.hidden,this.outlineLevel=t.outlineLevel||0,this.style=t.style&&JSON.parse(JSON.stringify(t.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,d,g){"use strict";let l=e("../utils/col-cache");class o{constructor(r,t,n){this.table=r,this.column=t,this.index=n}_set(r,t){this.table.cacheState(),this.column[r]=t}get name(){return this.column.name}set name(r){this._set("name",r)}get filterButton(){return this.column.filterButton}set filterButton(r){this.column.filterButton=r}get style(){return this.column.style}set style(r){this.column.style=r}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(r){this._set("totalsRowLabel",r)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(r){this._set("totalsRowFunction",r)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(r){this._set("totalsRowResult",r)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(r){this._set("totalsRowFormula",r)}}d.exports=class{constructor(s,r){this.worksheet=s,r&&(this.table=r,this.validate(),this.store())}getFormula(s){switch(s.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${s.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${s.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${s.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${s.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${s.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${s.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${s.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${s.name}])`;case"custom":return s.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+s.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:s}=this,r=(f,u,b)=>{f[u]===void 0&&(f[u]=b)};r(s,"headerRow",!0),r(s,"totalsRow",!1),r(s,"style",{}),r(s.style,"theme","TableStyleMedium2"),r(s.style,"showFirstColumn",!1),r(s.style,"showLastColumn",!1),r(s.style,"showRowStripes",!1),r(s.style,"showColumnStripes",!1);let t=(f,u)=>{if(!f)throw new Error(u)};t(s.ref,"Table must have ref"),t(s.columns,"Table must have column definitions"),t(s.rows,"Table must have row definitions"),s.tl=l.decodeAddress(s.ref);let{row:n,col:c}=s.tl;t(n>0,"Table must be on valid row"),t(c>0,"Table must be on valid col");let{width:i,filterHeight:a,tableHeight:h}=this;s.autoFilterRef=l.encode(n,c,n+a-1,c+i-1),s.tableRef=l.encode(n,c,n+h-1,c+i-1),s.columns.forEach((f,u)=>{t(f.name,`Column ${u} must have a name`),u===0?r(f,"totalsRowLabel","Total"):(r(f,"totalsRowFunction","none"),f.totalsRowFormula=this.getFormula(f))})}store(){let s=(a,h)=>{h&&Object.keys(h).forEach(f=>{a[f]=h[f]})},{worksheet:r,table:t}=this,{row:n,col:c}=t.tl,i=0;if(t.headerRow){let a=r.getRow(n+i++);t.columns.forEach((h,f)=>{let{style:u,name:b}=h,m=a.getCell(c+f);m.value=b,s(m,u)})}if(t.rows.forEach(a=>{let h=r.getRow(n+i++);a.forEach((f,u)=>{let b=h.getCell(c+u);b.value=f,s(b,t.columns[u].style)})}),t.totalsRow){let a=r.getRow(n+i++);t.columns.forEach((h,f)=>{let u=a.getCell(c+f);if(f===0)u.value=h.totalsRowLabel;else{let b=this.getFormula(h);u.value=b?{formula:h.totalsRowFormula,result:h.totalsRowResult}:null}s(u,h.style)})}}load(s){let{table:r}=this,{row:t,col:n}=r.tl,c=0;if(r.headerRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{i.getCell(n+h).value=a.name})}if(r.rows.forEach(i=>{let a=s.getRow(t+c++);i.forEach((h,f)=>{a.getCell(n+f).value=h})}),r.totalsRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{let f=i.getCell(n+h);h===0?f.value=a.totalsRowLabel:this.getFormula(a)&&(f.value={formula:a.totalsRowFormula,result:a.totalsRowResult})})}}get model(){return this.table}set model(s){this.table=s}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();let s=l.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let r=0;r<this._cache.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=0;n<this._cache.width;n++)t.getCell(s.col+n).value=null}else{for(let r=this.tableHeight;r<this._cache.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=0;n<this._cache.width;n++)t.getCell(s.col+n).value=null}for(let r=0;r<this.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=this.width;n<this._cache.width;n++)t.getCell(s.col+n).value=null}}this.store()}addRow(s,r){this.cacheState(),r===void 0?this.table.rows.push(s):this.table.rows.splice(r,0,s)}removeRows(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,r)}getColumn(s){let r=this.table.columns[s];return new o(this,r,s)}addColumn(s,r,t){this.cacheState(),t===void 0?(this.table.columns.push(s),this.table.rows.forEach((n,c)=>{n.push(r[c])})):(this.table.columns.splice(t,0,s),this.table.rows.forEach((n,c)=>{n.splice(t,0,r[c])}))}removeColumns(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,r),this.table.rows.forEach(t=>{t.splice(s,r)})}_assign(s,r,t){this.cacheState(),s[r]=t}get ref(){return this.table.ref}set ref(s){this._assign(this.table,"ref",s)}get name(){return this.table.name}set name(s){this.table.name=s}get displayName(){return this.table.displyName||this.table.name}set displayNamename(s){this.table.displayName=s}get headerRow(){return this.table.headerRow}set headerRow(s){this._assign(this.table,"headerRow",s)}get totalsRow(){return this.table.totalsRow}set totalsRow(s){this._assign(this.table,"totalsRow",s)}get theme(){return this.table.style.name}set theme(s){this.table.style.name=s}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(s){this.table.style.showFirstColumn=s}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(s){this.table.style.showLastColumn=s}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(s){this.table.style.showRowStripes=s}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(s){this.table.style.showColumnStripes=s}}},{"../utils/col-cache":19}],13:[function(e,d,g){"use strict";let l=e("./worksheet"),o=e("./defined-names"),s=e("../xlsx/xlsx"),r=e("../csv/csv");d.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new r(this)),this._csv}get nextId(){for(let t=1;t<this._worksheets.length;t++)if(!this._worksheets[t])return t;return this._worksheets.length||1}addWorksheet(t,n){let c=this.nextId;n&&(typeof n=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),n={properties:{tabColor:{argb:n}}}):(n.argb||n.theme||n.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),n={properties:{tabColor:n}}));let i=this._worksheets.reduce((f,u)=>(u&&u.orderNo)>f?u.orderNo:f,0),a=Object.assign({},n,{id:c,name:t,orderNo:i+1,workbook:this}),h=new l(a);return this._worksheets[c]=h,h}removeWorksheetEx(t){delete this._worksheets[t.id]}removeWorksheet(t){let n=this.getWorksheet(t);n&&n.destroy()}getWorksheet(t){return t===void 0?this._worksheets.find(Boolean):typeof t=="number"?this._worksheets[t]:typeof t=="string"?this._worksheets.find(n=>n&&n.name===t):void 0}get worksheets(){return this._worksheets.slice(1).sort((t,n)=>t.orderNo-n.orderNo).filter(Boolean)}eachSheet(t){this.worksheets.forEach(n=>{t(n,n.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(t){let n=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),n}getImage(t){return this.media[t]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(t=>t.model),sheets:this.worksheets.map(t=>t.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(t){this.creator=t.creator,this.lastModifiedBy=t.lastModifiedBy,this.lastPrinted=t.lastPrinted,this.created=t.created,this.modified=t.modified,this.company=t.company,this.manager=t.manager,this.title=t.title,this.subject=t.subject,this.keywords=t.keywords,this.category=t.category,this.description=t.description,this.language=t.language,this.revision=t.revision,this.contentStatus=t.contentStatus,this.properties=t.properties,this.calcProperties=t.calcProperties,this._worksheets=[],t.worksheets.forEach(n=>{let{id:c,name:i,state:a}=n,h=t.sheets&&t.sheets.findIndex(f=>f.id===c);(this._worksheets[c]=new l({id:c,name:i,orderNo:h,state:a,workbook:this})).model=n}),this._definedNames.model=t.definedNames,this.views=t.views,this._themes=t.themes,this.media=t.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,d,g){"use strict";let l=e("../utils/under-dash"),o=e("../utils/col-cache"),s=e("./range"),r=e("./row"),t=e("./column"),n=e("./enums"),c=e("./image"),i=e("./table"),a=e("./data-validations"),h=e("../utils/encryptor"),{copyStyle:f}=e("../utils/copy-style");d.exports=class{constructor(u){u=u||{},this._workbook=u.workbook,this.id=u.id,this.orderNo=u.orderNo,this.name=u.name,this.state=u.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},u.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!u.pageSetup||!u.pageSetup.fitToWidth&&!u.pageSetup.fitToHeight||u.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},u.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},u.headerFooter),this.dataValidations=new a,this.views=u.views||[],this.autoFilter=u.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(u){if(u===void 0&&(u="sheet"+this.id),this._name!==u){if(typeof u!="string")throw new Error("The name has to be a string.");if(u==="")throw new Error("The name can't be empty.");if(u==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(u))throw new Error(`Worksheet name ${u} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(u))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+u);if(u&&u.length>31&&(console.warn(`Worksheet name ${u} exceeds 31 chars. This will be truncated`),u=u.substring(0,31)),this._workbook._worksheets.find(b=>b&&b.name.toLowerCase()===u.toLowerCase()))throw new Error("Worksheet name already exists: "+u);this._name=u}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let u=new s;return this._rows.forEach(b=>{if(b){let m=b.dimensions;m&&u.expand(b.number,m.min,b.number,m.max)}}),u}get columns(){return this._columns}set columns(u){this._headerRowCount=u.reduce((v,k)=>{let B=(k.header?1:k.headers&&k.headers.length)||0;return Math.max(v,B)},0);let b=1,m=this._columns=[];u.forEach(v=>{let k=new t(this,b++,!1);m.push(k),k.defn=v})}getColumnKey(u){return this._keys[u]}setColumnKey(u,b){this._keys[u]=b}deleteColumnKey(u){delete this._keys[u]}eachColumnKey(u){l.each(this._keys,u)}getColumn(u){if(typeof u=="string"){let b=this._keys[u];if(b)return b;u=o.l2n(u)}if(this._columns||(this._columns=[]),u>this._columns.length){let b=this._columns.length+1;for(;b<=u;)this._columns.push(new t(this,b++))}return this._columns[u-1]}spliceColumns(u,b){let m=this._rows.length;for(var v=arguments.length,k=new Array(v>2?v-2:0),B=2;B<v;B++)k[B-2]=arguments[B];if(k.length>0)for(let D=0;D<m;D++){let N=[u,b];k.forEach(j=>{N.push(j[D]||null)});let q=this.getRow(D+1);q.splice.apply(q,N)}else this._rows.forEach(D=>{D&&D.splice(u,b)});let R=k.length-b,L=u+b,A=this._columns.length;if(R<0)for(let D=u+k.length;D<=A;D++)this.getColumn(D).defn=this.getColumn(D-R).defn;else if(R>0)for(let D=A;D>=L;D--)this.getColumn(D+R).defn=this.getColumn(D).defn;for(let D=u;D<u+k.length;D++)this.getColumn(D).defn=null;this.workbook.definedNames.spliceColumns(this.name,u,b,k.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let u=0;return this.eachRow(b=>{u=Math.max(u,b.cellCount)}),u}get actualColumnCount(){let u=[],b=0;return this.eachRow(m=>{m.eachCell(v=>{let{col:k}=v;u[k]||(u[k]=!0,b++)})}),b}_commitRow(){}get _lastRowNumber(){let u=this._rows,b=u.length;for(;b>0&&u[b-1]===void 0;)b--;return b}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(u){return this._rows[u-1]}findRows(u,b){return this._rows.slice(u-1,u-1+b)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let u=0;return this.eachRow(()=>{u++}),u}getRow(u){let b=this._rows[u-1];return b||(b=this._rows[u-1]=new r(this,u)),b}getRows(u,b){if(b<1)return;let m=[];for(let v=u;v<u+b;v++)m.push(this.getRow(v));return m}addRow(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=this._nextRow,v=this.getRow(m);return v.values=u,this._setStyleOption(m,b[0]==="i"?b:"n"),v}addRows(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=[];return u.forEach(v=>{m.push(this.addRow(v,b))}),m}insertRow(u,b){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(u,0,b),this._setStyleOption(u,m),this.getRow(u)}insertRows(u,b){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(u,0,...b),m!=="n")for(let v=0;v<b.length;v++)m[0]==="o"&&this.findRow(b.length+u+v)!==void 0?this._copyStyle(b.length+u+v,u+v,m[1]==="+"):m[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u+v,m[1]==="+");return this.getRows(u,b.length)}_setStyleOption(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";b[0]==="o"&&this.findRow(u+1)!==void 0?this._copyStyle(u+1,u,b[1]==="+"):b[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u,b[1]==="+")}_copyStyle(u,b){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this.getRow(u),k=this.getRow(b);k.style=f(v.style),v.eachCell({includeEmpty:m},(B,R)=>{k.getCell(R).style=f(B.style)}),k.height=v.height}duplicateRow(u,b){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this._rows[u-1],k=new Array(b).fill(v.values);this.spliceRows(u+1,m?0:b,...k);for(let B=0;B<b;B++){let R=this._rows[u+B];R.style=v.style,R.height=v.height,v.eachCell({includeEmpty:!0},(L,A)=>{R.getCell(A).style=L.style})}}spliceRows(u,b){let m=u+b;for(var v=arguments.length,k=new Array(v>2?v-2:0),B=2;B<v;B++)k[B-2]=arguments[B];let R=k.length,L=R-b,A=this._rows.length,D,N;if(L<0)for(u===A&&(this._rows[A-1]=void 0),D=m;D<=A;D++)if(N=this._rows[D-1],N){let q=this.getRow(D+L);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(j,S)=>{q.getCell(S).style=j.style}),this._rows[D-1]=void 0}else this._rows[D+L-1]=void 0;else if(L>0)for(D=A;D>=m;D--)if(N=this._rows[D-1],N){let q=this.getRow(D+L);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(j,S)=>{if(q.getCell(S).style=j.style,j._value.constructor.name==="MergeValue"){let T=this.getRow(j._row._number+R).getCell(S),P=j._value._master,p=this.getRow(P._row._number+R).getCell(P._column._number);T.merge(p)}})}else this._rows[D+L-1]=void 0;for(D=0;D<R;D++){let q=this.getRow(u+D);q.style={},q.values=k[D]}this.workbook.definedNames.spliceRows(this.name,u,b,R)}eachRow(u,b){if(b||(b=u,u=void 0),u&&u.includeEmpty){let m=this._rows.length;for(let v=1;v<=m;v++)b(this.getRow(v),v)}else this._rows.forEach(m=>{m&&m.hasValues&&b(m,m.number)})}getSheetValues(){let u=[];return this._rows.forEach(b=>{b&&(u[b.number]=b.values)}),u}findCell(u,b){let m=o.getAddress(u,b),v=this._rows[m.row-1];return v?v.findCell(m.col):void 0}getCell(u,b){let m=o.getAddress(u,b);return this.getRow(m.row).getCellEx(m)}mergeCells(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let v=new s(b);this._mergeCellsInternal(v)}mergeCellsWithoutStyle(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let v=new s(b);this._mergeCellsInternal(v,!0)}_mergeCellsInternal(u,b){l.each(this._merges,v=>{if(v.intersects(u))throw new Error("Cannot merge already merged cells")});let m=this.getCell(u.top,u.left);for(let v=u.top;v<=u.bottom;v++)for(let k=u.left;k<=u.right;k++)(v>u.top||k>u.left)&&this.getCell(v,k).merge(m,b);this._merges[m.address]=u}_unMergeMaster(u){let b=this._merges[u.address];if(b){for(let m=b.top;m<=b.bottom;m++)for(let v=b.left;v<=b.right;v++)this.getCell(m,v).unmerge();delete this._merges[u.address]}}get hasMerges(){return l.some(this._merges,Boolean)}unMergeCells(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let v=new s(b);for(let k=v.top;k<=v.bottom;k++)for(let B=v.left;B<=v.right;B++){let R=this.findCell(k,B);R&&(R.type===n.ValueType.Merge?this._unMergeMaster(R.master):this._merges[R.address]&&this._unMergeMaster(R))}}fillFormula(u,b,m){let v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",k=o.decode(u),{top:B,left:R,bottom:L,right:A}=k,D=A-R+1,N=o.encodeAddress(B,R),q=v==="shared",j;j=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(T,P)=>m[T-B][P-R]:(T,P)=>m[(T-B)*D+(P-R)]:()=>{};let S=!0;for(let T=B;T<=L;T++)for(let P=R;P<=A;P++)S?(this.getCell(T,P).value={shareType:v,formula:b,ref:u,result:j(T,P)},S=!1):this.getCell(T,P).value=q?{sharedFormula:N,result:j(T,P)}:j(T,P)}addImage(u,b){let m={type:"image",imageId:u,range:b};this._media.push(new c(this,m))}getImages(){return this._media.filter(u=>u.type==="image")}addBackgroundImage(u){let b={type:"background",imageId:u};this._media.push(new c(this,b))}getBackgroundImageId(){let u=this._media.find(b=>b.type==="background");return u&&u.imageId}protect(u,b){return new Promise(m=>{this.sheetProtection={sheet:!0},b&&"spinCount"in b&&(b.spinCount=Number.isFinite(b.spinCount)?Math.round(Math.max(0,b.spinCount)):1e5),u&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=h.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=b&&"spinCount"in b?b.spinCount:1e5,this.sheetProtection.hashValue=h.convertPasswordToHash(u,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),b&&(this.sheetProtection=Object.assign(this.sheetProtection,b),!u&&"spinCount"in b&&delete this.sheetProtection.spinCount),m()})}unprotect(){this.sheetProtection=null}addTable(u){let b=new i(this,u);return this.tables[u.name]=b,b}getTable(u){return this.tables[u]}removeTable(u){delete this.tables[u]}getTables(){return Object.values(this.tables)}addConditionalFormatting(u){this.conditionalFormattings.push(u)}removeConditionalFormatting(u){typeof u=="number"?this.conditionalFormattings.splice(u,1):this.conditionalFormattings=u instanceof Function?this.conditionalFormattings.filter(u):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(u){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=u}get model(){let u={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(v=>v.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(v=>v.model),conditionalFormattings:this.conditionalFormattings};u.cols=t.toModel(this.columns);let b=u.rows=[],m=u.dimensions=new s;return this._rows.forEach(v=>{let k=v&&v.model;k&&(m.expand(k.number,k.min,k.number,k.max),b.push(k))}),u.merges=[],l.each(this._merges,v=>{u.merges.push(v.range)}),u}_parseRows(u){this._rows=[],u.rows.forEach(b=>{let m=new r(this,b.number);this._rows[m.number-1]=m,m.model=b})}_parseMergeCells(u){l.each(u.mergeCells,b=>{this.mergeCellsWithoutStyle(b)})}set model(u){this.name=u.name,this._columns=t.fromModel(this,u.cols),this._parseRows(u),this._parseMergeCells(u),this.dataValidations=new a(u.dataValidations),this.properties=u.properties,this.pageSetup=u.pageSetup,this.headerFooter=u.headerFooter,this.views=u.views,this.autoFilter=u.autoFilter,this._media=u.media.map(b=>new c(this,b)),this.sheetProtection=u.sheetProtection,this.tables=u.tables.reduce((b,m)=>{let v=new i;return v.model=m,b[m.name]=v,b},{}),this.conditionalFormattings=u.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,d,g){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");let l={Workbook:e("./doc/workbook")},o=e("./doc/enums");Object.keys(o).forEach(s=>{l[s]=o[s]}),d.exports=l},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,d,g){"use strict";let l=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");g.bufferToString=function(o){return typeof o=="string"?o:l?l.decode(o):o.toString()}},{}],17:[function(e,d,g){"use strict";let l=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=e("buffer");g.stringToBuffer=function(s){return typeof s!="string"?s:l?o.from(l.encode(s).buffer):o.from(s)}},{buffer:220}],18:[function(e,d,g){"use strict";let l=e("./under-dash"),o=e("./col-cache");d.exports=class{constructor(s){this.template=s,this.sheets={}}addCell(s){this.addCellEx(o.decodeEx(s))}getCell(s){return this.findCellEx(o.decodeEx(s),!0)}findCell(s){return this.findCellEx(o.decodeEx(s),!1)}findCellAt(s,r,t){let n=this.sheets[s],c=n&&n[r];return c&&c[t]}addCellEx(s){if(s.top)for(let r=s.top;r<=s.bottom;r++)for(let t=s.left;t<=s.right;t++)this.getCellAt(s.sheetName,r,t);else this.findCellEx(s,!0)}getCellEx(s){return this.findCellEx(s,!0)}findCellEx(s,r){let t=this.findSheet(s,r),n=this.findSheetRow(t,s,r);return this.findRowCell(n,s,r)}getCellAt(s,r,t){let n=this.sheets[s]||(this.sheets[s]=[]),c=n[r]||(n[r]=[]);return c[t]||(c[t]={sheetName:s,address:o.n2l(t)+r,row:r,col:t})}removeCellEx(s){let r=this.findSheet(s);if(!r)return;let t=this.findSheetRow(r,s);t&&delete t[s.col]}forEachInSheet(s,r){let t=this.sheets[s];t&&t.forEach((n,c)=>{n&&n.forEach((i,a)=>{i&&r(i,c,a)})})}forEach(s){l.each(this.sheets,(r,t)=>{this.forEachInSheet(t,s)})}map(s){let r=[];return this.forEach(t=>{r.push(s(t))}),r}findSheet(s,r){let t=s.sheetName;return this.sheets[t]?this.sheets[t]:r?this.sheets[t]=[]:void 0}findSheetRow(s,r,t){let{row:n}=r;return s&&s[n]?s[n]:t?s[n]=[]:void 0}findRowCell(s,r,t){let{col:n}=r;return s&&s[n]?s[n]:t?s[n]=this.template?Object.assign(r,JSON.parse(JSON.stringify(this.template))):r:void 0}spliceRows(s,r,t,n){let c=this.sheets[s];if(c){let i=[];for(let a=0;a<n;a++)i.push([]);c.splice(r,t,...i)}}spliceColumns(s,r,t,n){let c=this.sheets[s];if(c){let i=[];for(let a=0;a<n;a++)i.push(null);l.each(c,a=>{a.splice(r,t,...i)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,d,g){"use strict";let l=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:s=>s<=26?1:s<=676?2:3,_fill(s){let r,t,n,c,i,a=1;if(s>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&s>=1){for(;a<=26;)r=this._dictionary[a-1],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=1}if(this._l2nFill<2&&s>=2){for(a=27;a<=702;)t=a-27,n=t%26,c=Math.floor(t/26),r=this._dictionary[c]+this._dictionary[n],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=2}if(this._l2nFill<3&&s>=3){for(a=703;a<=16384;)t=a-703,n=t%26,c=Math.floor(t/26)%26,i=Math.floor(t/676),r=this._dictionary[i]+this._dictionary[c]+this._dictionary[n],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=3}},l2n(s){if(this._l2n[s]||this._fill(s.length),!this._l2n[s])throw new Error("Out of bounds. Invalid column letter: "+s);return this._l2n[s]},n2l(s){if(s<1||s>16384)throw new Error(s+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[s]||this._fill(this._level(s)),this._n2l[s]},_hash:{},validateAddress(s){if(!l.test(s))throw new Error("Invalid Address: "+s);return!0},decodeAddress(s){let r=s.length<5&&this._hash[s];if(r)return r;let t=!1,n="",c=0,i=!1,a="",h=0;for(let u,b=0;b<s.length;b++)if(u=s.charCodeAt(b),!i&&u>=65&&u<=90)t=!0,n+=s[b],c=26*c+u-64;else if(u>=48&&u<=57)i=!0,a+=s[b],h=10*h+u-48;else if(i&&t&&u!==36)break;if(t){if(c>16384)throw new Error("Out of bounds. Invalid column letter: "+n)}else c=void 0;i||(h=void 0);let f={address:s=n+a,col:c,row:h,$col$row:`$${n}$${a}`};return c<=100&&h<=100&&(this._hash[s]=f,this._hash[f.$col$row]=f),f},getAddress(s,r){if(r){let t=this.n2l(r)+s;return this.decodeAddress(t)}return this.decodeAddress(s)},decode(s){let r=s.split(":");if(r.length===2){let t=this.decodeAddress(r[0]),n=this.decodeAddress(r[1]),c={top:Math.min(t.row,n.row),left:Math.min(t.col,n.col),bottom:Math.max(t.row,n.row),right:Math.max(t.col,n.col)};return c.tl=this.n2l(c.left)+c.top,c.br=this.n2l(c.right)+c.bottom,c.dimensions=`${c.tl}:${c.br}`,c}return this.decodeAddress(s)},decodeEx(s){let r=s.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),t=r[1]||r[2],n=r[3],c=n.split(":");if(c.length>1){let a=this.decodeAddress(c[0]),h=this.decodeAddress(c[1]),f=Math.min(a.row,h.row),u=Math.min(a.col,h.col),b=Math.max(a.row,h.row),m=Math.max(a.col,h.col);return a=this.n2l(u)+f,h=this.n2l(m)+b,{top:f,left:u,bottom:b,right:m,sheetName:t,tl:{address:a,col:u,row:f,$col$row:`$${this.n2l(u)}$${f}`,sheetName:t},br:{address:h,col:m,row:b,$col$row:`$${this.n2l(m)}$${b}`,sheetName:t},dimensions:`${a}:${h}`}}if(n.startsWith("#"))return t?{sheetName:t,error:n}:{error:n};let i=this.decodeAddress(n);return t?{sheetName:t,...i}:i},encodeAddress:(s,r)=>o.n2l(r)+s,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(s,r){let[t,n,,c,i]=s,[a,h]=r;return a>=t&&a<=c&&h>=n&&h<=i}};d.exports=o},{}],20:[function(e,d,g){"use strict";let l=(s,r)=>({...s,...r.reduce((t,n)=>(s[n]&&(t[n]={...s[n]}),t),{})}),o=function(s,r,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];s[t]&&(r[t]=l(s[t],n))};g.copyStyle=s=>{if(!s)return s;if(r=s,Object.keys(r).length===0)return{};var r;let t={...s};return o(s,t,"font",["color"]),o(s,t,"alignment"),o(s,t,"protection"),s.border&&(o(s,t,"border"),o(s.border,t.border,"top",["color"]),o(s.border,t.border,"left",["color"]),o(s.border,t.border,"bottom",["color"]),o(s.border,t.border,"right",["color"]),o(s.border,t.border,"diagonal",["color"])),s.fill&&(o(s,t,"fill",["fgColor","bgColor","center"]),s.fill.stops&&(t.fill.stops=s.fill.stops.map(n=>l(n,["color"])))),t}},{}],21:[function(e,d,g){(function(l){(function(){"use strict";let o=e("crypto"),s={hash(r){let t=o.createHash(r);for(var n=arguments.length,c=new Array(n>1?n-1:0),i=1;i<n;i++)c[i-1]=arguments[i];return t.update(l.concat(c)),t.digest()},convertPasswordToHash(r,t,n,c){if(t=t.toLowerCase(),o.getHashes().indexOf(t)<0)throw new Error(`Hash algorithm '${t}' not supported!`);let i=l.from(r,"utf16le"),a=this.hash(t,l.from(n,"base64"),i);for(let h=0;h<c;h++){let f=l.alloc(4);f.writeUInt32LE(h,0),a=this.hash(t,a,f)}return a.toString("base64")},randomBytes:r=>o.randomBytes(r)};d.exports=s}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,d,g){"use strict";let{SaxesParser:l}=e("saxes"),{PassThrough:o}=e("readable-stream"),{bufferToString:s}=e("./browser-buffer-decode");d.exports=async function*(r){r.pipe&&!r[Symbol.asyncIterator]&&(r=r.pipe(new o));let t=new l,n;t.on("error",i=>{n=i});let c=[];t.on("opentag",i=>c.push({eventType:"opentag",value:i})),t.on("text",i=>c.push({eventType:"text",value:i})),t.on("closetag",i=>c.push({eventType:"closetag",value:i}));for await(let i of r){if(t.write(s(i)),n)throw n;yield c,c=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,d,g){"use strict";let l=e("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;d.exports={slideFormula:function(r,t,n){let c=l.decode(t),i=l.decode(n);return r.replace(o,(a,h,f,u,b)=>{if(b)return a;let m=s.exec(u);if(m){let v=m[1],k=m[2].toUpperCase(),B=m[3],R=m[4];if(k.length>3||k.length===3&&k>"XFD")return a;let L=l.l2n(k),A=parseInt(R,10);return v||(L+=i.col-c.col),B||(A+=i.row-c.row),(h||"")+(v||"")+l.n2l(L)+(B||"")+A}return a})}}},{"./col-cache":19}],24:[function(e,d,g){(function(l,o){(function(){"use strict";let s=e("readable-stream"),r=e("./utils"),t=e("./string-buf");class n{constructor(u,b){this._data=u,this._encoding=b}get length(){return this.toBuffer().length}copy(u,b,m,v){return this.toBuffer().copy(u,b,m,v)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class c{constructor(u){this._data=u}get length(){return this._data.length}copy(u,b,m,v){return this._data._buf.copy(u,b,m,v)}toBuffer(){return this._data.toBuffer()}}class i{constructor(u){this._data=u}get length(){return this._data.length}copy(u,b,m,v){this._data.copy(u,b,m,v)}toBuffer(){return this._data}}class a{constructor(u){this.size=u,this.buffer=o.alloc(u),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let u=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(u,0,this.iRead,this.iWrite),u}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(u){let b;return u===0?null:u===void 0||u>=this.length?(b=this.toBuffer(),this.iRead=this.iWrite,b):(b=o.alloc(u),this.buffer.copy(b,0,this.iRead,u),this.iRead+=u,b)}write(u,b,m){let v=Math.min(m,this.size-this.iWrite);return u.copy(this.buffer,this.iWrite,b,b+v),this.iWrite+=v,v}}let h=function(f){f=f||{},this.bufSize=f.bufSize||1048576,this.buffers=[],this.batch=f.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};r.inherits(h,s.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(f=>f.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let u=this.buffers[this.buffers.length-1];if(!u.full)return u}let f=new a(this.bufSize);return this.buffers.push(f),f},async _pipe(f){await Promise.all(this.pipes.map((function(u){return new Promise(b=>{u.write(f.toBuffer(),()=>{b()})})})))},_writeToBuffers(f){let u=0,b=f.length;for(;u<b;)u+=this._getWritableBuffer().write(f,u,b-u)},async write(f,u,b){let m;if(u instanceof Function&&(b=u,u="utf8"),b=b||r.nop,f instanceof t)m=new c(f);else if(f instanceof o)m=new i(f);else{if(!(typeof f=="string"||f instanceof String||f instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");m=new n(f,u)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(m);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(m),l.nextTick(b)):(await this._pipe(m),b());else this.paused||this.emit("data",m.toBuffer()),this._writeToBuffers(m),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(f,u,b){let m=v=>{v?b(v):(this._flush(),this.pipes.forEach(k=>{k.end()}),this.emit("finish"))};f?this.write(f,u,m):m()},read(f){let u;if(f){for(u=[];f&&this.buffers.length&&!this.buffers[0].eod;){let b=this.buffers[0],m=b.read(f);f-=m.length,u.push(m),b.eod&&b.full&&this.buffers.shift()}return o.concat(u)}return u=this.buffers.map(b=>b.toBuffer()).filter(Boolean),this.buffers=[],o.concat(u)},setEncoding(f){this.encoding=f},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(f){this.pipes.push(f),!this.paused&&this.buffers.length&&this.end()},unpipe(f){this.pipes=this.pipes.filter(u=>u!==f)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),d.exports=h}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,d,g){(function(l){(function(){"use strict";d.exports=class{constructor(o){this._buf=l.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=l.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let s=2*this._buf.length;for(;s<o;)s*=2;let r=l.alloc(s);this._buf.copy(r,0),this._buf=r}addText(o){this._buffer=void 0;let s=this._inPos+this._buf.write(o,this._inPos,this._encoding);for(;s>=this._buf.length-4;)this._grow(this._inPos+o.length),s=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=s}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,d,g){"use strict";let{toString:l}=Object.prototype,o=/["&<>]/,s={each:function(r,t){r&&(Array.isArray(r)?r.forEach(t):Object.keys(r).forEach(n=>{t(r[n],n)}))},some:function(r,t){return!!r&&(Array.isArray(r)?r.some(t):Object.keys(r).some(n=>t(r[n],n)))},every:function(r,t){return!r||(Array.isArray(r)?r.every(t):Object.keys(r).every(n=>t(r[n],n)))},map:function(r,t){return r?Array.isArray(r)?r.map(t):Object.keys(r).map(n=>t(r[n],n)):[]},keyBy:(r,t)=>r.reduce((n,c)=>(n[c[t]]=c,n),{}),isEqual:function(r,t){let n=typeof r,c=typeof t,i=Array.isArray(r),a=Array.isArray(t),h;if(n!==c)return!1;switch(typeof r){case"object":if(i||a)return!(!i||!a)&&r.length===t.length&&r.every((f,u)=>{let b=t[u];return s.isEqual(f,b)});if(r===null||t===null)return r===t;if(h=Object.keys(r),Object.keys(t).length!==h.length)return!1;for(let f of h)if(!t.hasOwnProperty(f))return!1;return s.every(r,(f,u)=>{let b=t[u];return s.isEqual(f,b)});default:return r===t}},escapeHtml(r){let t=o.exec(r);if(!t)return r;let n="",c="",i=0,a=t.index;for(;a<r.length;a++){switch(r.charAt(a)){case'"':c="&quot;";break;case"&":c="&amp;";break;case"'":c="&apos;";break;case"<":c="&lt;";break;case">":c="&gt;";break;default:continue}i!==a&&(n+=r.substring(i,a)),i=a+1,n+=c}return i!==a?n+r.substring(i,a):n},strcmp:(r,t)=>r<t?-1:r>t?1:0,isUndefined:r=>l.call(r)==="[object Undefined]",isObject:r=>l.call(r)==="[object Object]",deepMerge(){let r=arguments[0]||{},{length:t}=arguments,n,c,i;function a(h,f){n=r[f],i=Array.isArray(h),s.isObject(h)||i?(i?(i=!1,c=n&&Array.isArray(n)?n:[]):c=n&&s.isObject(n)?n:{},r[f]=s.deepMerge(c,h)):s.isUndefined(h)||(r[f]=h)}for(let h=0;h<t;h++)s.each(arguments[h],a);return r}};d.exports=s},{}],27:[function(e,d,g){(function(l,o){(function(){"use strict";let s=e("fs"),r=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,t={nop(){},promiseImmediate:n=>new Promise(c=>{l.setImmediate?o(()=>{c(n)}):setTimeout(()=>{c(n)},1)}),inherits:function(n,c,i,a){n.super_=c,a||(a=i,i=null),i&&Object.keys(i).forEach(f=>{Object.defineProperty(n,f,Object.getOwnPropertyDescriptor(i,f))});let h={constructor:{value:n,enumerable:!1,writable:!1,configurable:!0}};a&&Object.keys(a).forEach(f=>{h[f]=Object.getOwnPropertyDescriptor(a,f)}),n.prototype=Object.create(c.prototype,h)},dateToExcel:(n,c)=>25569+n.getTime()/864e5-(c?1462:0),excelToDate(n,c){let i=Math.round(24*(n-25569+(c?1462:0))*3600*1e3);return new Date(i)},parsePath(n){let c=n.lastIndexOf("/");return{path:n.substring(0,c),name:n.substring(c+1)}},getRelsPath(n){let c=t.parsePath(n);return`${c.path}/_rels/${c.name}.rels`},xmlEncode(n){let c=r.exec(n);if(!c)return n;let i="",a="",h=0,f=c.index;for(;f<n.length;f++){let u=n.charCodeAt(f);switch(u){case 34:a="&quot;";break;case 38:a="&amp;";break;case 39:a="&apos;";break;case 60:a="&lt;";break;case 62:a="&gt;";break;case 127:a="";break;default:if(u<=31&&(u<=8||u>=11&&u!==13)){a="";break}continue}h!==f&&(i+=n.substring(h,f)),h=f+1,a&&(i+=a)}return h!==f?i+n.substring(h,f):i},xmlDecode:n=>n.replace(/&([a-z]*);/g,c=>{switch(c){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return c}}),validInt(n){let c=parseInt(n,10);return Number.isNaN(c)?0:c},isDateFmt(n){return n?(n=(n=n.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:n=>new Promise(c=>{s.access(n,s.constants.F_OK,i=>{c(!i)})})},toIsoDateString:n=>n.toIsoString().subsstr(0,10),parseBoolean:n=>n===!0||n==="true"||n===1||n==="1"};d.exports=t}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,d,g){"use strict";let l=e("./under-dash"),o=e("./utils");function s(n,c,i){n.push(` ${c}="${o.xmlEncode(i.toString())}"`)}function r(n,c){if(c){let i=[];l.each(c,(a,h)=>{a!==void 0&&s(i,h,a)}),n.push(i.join(""))}}class t{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(c){let i=this._xml;i.push("<?xml"),r(i,c),i.push(`?>
1
+ var Rg=Object.create;var sf=Object.defineProperty;var Og=Object.getOwnPropertyDescriptor;var Ag=Object.getOwnPropertyNames;var Dg=Object.getPrototypeOf,Pg=Object.prototype.hasOwnProperty;var Es=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(d,g)=>(typeof require<"u"?require:d)[g]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ng=(e,d)=>()=>(d||e((d={exports:{}}).exports,d),d.exports);var Lg=(e,d,g,l)=>{if(d&&typeof d=="object"||typeof d=="function")for(let o of Ag(d))!Pg.call(e,o)&&o!==g&&sf(e,o,{get:()=>d[o],enumerable:!(l=Og(d,o))||l.enumerable});return e};var zg=(e,d,g)=>(g=e!=null?Rg(Dg(e)):{},Lg(d||!e||!e.__esModule?sf(g,"default",{value:e,enumerable:!0}):g,e));var Mg=Ng((Eg,rf)=>{(function(e){typeof Eg=="object"&&typeof rf<"u"?rf.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).ExcelJS=e()})((function(){return(function e(d,g,l){function o(t,n){if(!g[t]){if(!d[t]){var c=typeof Es=="function"&&Es;if(!n&&c)return c(t,!0);if(s)return s(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var a=g[t]={exports:{}};d[t][0].call(a.exports,(function(h){return o(d[t][1][h]||h)}),a,a.exports,e,d,g,l)}return g[t].exports}for(var s=typeof Es=="function"&&Es,r=0;r<l.length;r++)o(l[r]);return o})({1:[function(e,d,g){"use strict";let l=e("fs"),o=e("fast-csv"),s=e("dayjs/plugin/customParseFormat"),r=e("dayjs/plugin/utc"),t=e("dayjs").extend(s).extend(r),n=e("../utils/stream-buf"),{fs:{exists:c}}=e("../utils/utils"),i={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};d.exports=class{constructor(a){this.workbook=a,this.worksheet=null}async readFile(a,h){if(h=h||{},!await c(a))throw new Error("File not found: "+a);let f=l.createReadStream(a),u=await this.read(f,h);return f.close(),u}read(a,h){return h=h||{},new Promise((f,u)=>{let b=this.workbook.addWorksheet(h.sheetName),m=h.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],v=h.map||function(B){if(B==="")return null;let R=Number(B);if(!Number.isNaN(R)&&R!==1/0)return R;let L=m.reduce((D,N)=>{if(D)return D;let q=t(B,N,!0);return q.isValid()?q:null},null);if(L)return new Date(L.valueOf());let A=i[B];return A!==void 0?A:B},k=o.parse(h.parserOptions).on("data",B=>{b.addRow(B.map(v))}).on("end",()=>{k.emit("worksheet",b)});k.on("worksheet",f).on("error",u),a.pipe(k)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(a,h){return new Promise((f,u)=>{h=h||{};let b=this.workbook.getWorksheet(h.sheetName||h.sheetId),m=o.format(h.formatterOptions);a.on("finish",()=>{f()}),m.on("error",u),m.pipe(a);let{dateFormat:v,dateUTC:k}=h,B=h.map||(A=>{if(A){if(A.text||A.hyperlink)return A.hyperlink||A.text||"";if(A.formula||A.result)return A.result||"";if(A instanceof Date)return v?k?t.utc(A).format(v):t(A).format(v):k?t.utc(A).format():t(A).format();if(A.error)return A.error;if(typeof A=="object")return JSON.stringify(A)}return A}),R=h.includeEmptyRows===void 0||h.includeEmptyRows,L=1;b&&b.eachRow((A,D)=>{if(R)for(;L++<D-1;)m.write([]);let{values:N}=A;N.shift(),m.write(N.map(B)),L=D}),m.end()})}writeFile(a,h){let f={encoding:(h=h||{}).encoding||"utf8"},u=l.createWriteStream(a,f);return this.write(u,h)}async writeBuffer(a){let h=new n;return await this.write(h,a),h.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(e,d,g){"use strict";let l=e("../utils/col-cache");class o{constructor(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=r,t)if(typeof t=="string"){let c=l.decodeAddress(t);this.nativeCol=c.col+n,this.nativeColOff=0,this.nativeRow=c.row+n,this.nativeRowOff=0}else t.nativeCol!==void 0?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):t.col!==void 0?(this.col=t.col+n,this.row=t.row+n):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(r){return r instanceof o||r==null?r:new o(r)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(r){this.nativeCol=Math.floor(r),this.nativeColOff=Math.floor((r-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(r){this.nativeRow=Math.floor(r),this.nativeRowOff=Math.floor((r-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(r){this.nativeCol=r.nativeCol,this.nativeColOff=r.nativeColOff,this.nativeRow=r.nativeRow,this.nativeRowOff=r.nativeRowOff}}d.exports=o},{"../utils/col-cache":19}],3:[function(e,d,g){"use strict";let l=e("../utils/col-cache"),o=e("../utils/under-dash"),s=e("./enums"),{slideFormula:r}=e("../utils/shared-formula"),t=e("./note");class n{constructor(a,h,f){if(!a||!h)throw new Error("A Cell needs a Row");this._row=a,this._column=h,l.validateAddress(f),this._address=f,this._value=c.create(n.Types.Null,this),this.style=this._mergeStyle(a.style,h.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(a){this.style.numFmt=a}get font(){return this.style.font}set font(a){this.style.font=a}get alignment(){return this.style.alignment}set alignment(a){this.style.alignment=a}get border(){return this.style.border}set border(a){this.style.border=a}get fill(){return this.style.fill}set fill(a){this.style.fill=a}get protection(){return this.style.protection}set protection(a){this.style.protection=a}_mergeStyle(a,h,f){let u=a&&a.numFmt||h&&h.numFmt;u&&(f.numFmt=u);let b=a&&a.font||h&&h.font;b&&(f.font=b);let m=a&&a.alignment||h&&h.alignment;m&&(f.alignment=m);let v=a&&a.border||h&&h.border;v&&(f.border=v);let k=a&&a.fill||h&&h.fill;k&&(f.fill=k);let B=a&&a.protection||h&&h.protection;return B&&(f.protection=B),f}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===n.Types.Merge}merge(a,h){this._value.release(),this._value=c.create(n.Types.Merge,this,a),h||(this.style=a.style)}unmerge(){this.type===n.Types.Merge&&(this._value.release(),this._value=c.create(n.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(a){return this._value.type===n.Types.Merge&&this._value.isMergedTo(a)}get master(){return this.type===n.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===n.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(a){this.type!==n.Types.Merge?(this._value.release(),this._value=c.create(c.getType(a),this,a)):this._value.master.value=a}get note(){return this._comment&&this._comment.note}set note(a){this._comment=new t(a)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(a){this.type===n.Types.String&&(this._value=c.create(n.Types.Hyperlink,this,{text:this._value.value,hyperlink:a}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:a}=this._row;return{sheetName:a.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(a){this.names=[a]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(a){let{definedNames:h}=this.workbook;h.removeAllNames(this.fullAddress),a.forEach(f=>{h.addEx(this.fullAddress,f)})}addName(a){this.workbook.definedNames.addEx(this.fullAddress,a)}removeName(a){this.workbook.definedNames.removeEx(this.fullAddress,a)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(a){this._dataValidations.add(this.address,a)}get model(){let{model:a}=this._value;return a.style=this.style,this._comment&&(a.comment=this._comment.model),a}set model(a){this._value.release(),this._value=c.create(a.type,this),this._value.model=a,a.comment&&a.comment.type==="note"&&(this._comment=t.fromModel(a.comment)),a.style?this.style=a.style:this.style={}}}n.Types=s.ValueType;let c={getType:i=>i==null?n.Types.Null:i instanceof String||typeof i=="string"?n.Types.String:typeof i=="number"?n.Types.Number:typeof i=="boolean"?n.Types.Boolean:i instanceof Date?n.Types.Date:i.text&&i.hyperlink?n.Types.Hyperlink:i.formula||i.sharedFormula?n.Types.Formula:i.richText?n.Types.RichText:i.sharedString?n.Types.SharedString:i.error?n.Types.Error:n.Types.JSON,types:[{t:n.Types.Null,f:class{constructor(i){this.model={address:i.address,type:n.Types.Null}}get value(){return null}set value(i){}get type(){return n.Types.Null}get effectiveType(){return n.Types.Null}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){}toString(){return""}}},{t:n.Types.Number,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Number,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Number}get effectiveType(){return n.Types.Number}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.String,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:n.Types.Date,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Date,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Date}get effectiveType(){return n.Types.Date}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Hyperlink,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Hyperlink,text:a?a.text:void 0,hyperlink:a?a.hyperlink:void 0},a&&a.tooltip&&(this.model.tooltip=a.tooltip)}get value(){let i={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(i.tooltip=this.model.tooltip),i}set value(i){this.model={text:i.text,hyperlink:i.hyperlink},i.tooltip&&(this.model.tooltip=i.tooltip)}get text(){return this.model.text}set text(i){this.model.text=i}get hyperlink(){return this.model.hyperlink}set hyperlink(i){this.model.hyperlink=i}get type(){return n.Types.Hyperlink}get effectiveType(){return n.Types.Hyperlink}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:n.Types.Formula,f:class{constructor(i,a){this.cell=i,this.model={address:i.address,type:n.Types.Formula,shareType:a?a.shareType:void 0,ref:a?a.ref:void 0,formula:a?a.formula:void 0,sharedFormula:a?a.sharedFormula:void 0,result:a?a.result:void 0}}_copyModel(i){let a={},h=f=>{let u=i[f];u&&(a[f]=u)};return h("formula"),h("result"),h("ref"),h("shareType"),h("sharedFormula"),a}get value(){return this._copyModel(this.model)}set value(i){this.model=this._copyModel(i)}validate(i){switch(c.getType(i)){case n.Types.Null:case n.Types.String:case n.Types.Number:case n.Types.Date:break;case n.Types.Hyperlink:case n.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(i){this.model.formula=i}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(i){this.model.result=i}get type(){return n.Types.Formula}get effectiveType(){let i=this.model.result;return i==null?s.ValueType.Null:i instanceof String||typeof i=="string"?s.ValueType.String:typeof i=="number"?s.ValueType.Number:i instanceof Date?s.ValueType.Date:i.text&&i.hyperlink?s.ValueType.Hyperlink:i.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(i){this.model.address=i}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:i}=this.cell,a=i.findCell(this.model.sharedFormula);this._translatedFormula=a&&r(a.formula,a.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:n.Types.Merge,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Merge,master:a?a.address:void 0},this._master=a,a&&a.addMergeRef()}get value(){return this._master.value}set value(i){i instanceof n?(this._master&&this._master.releaseMergeRef(),i.addMergeRef(),this._master=i):this._master.value=i}isMergedTo(i){return i===this._master}get master(){return this._master}get type(){return n.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:n.Types.JSON,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:JSON.stringify(a),rawValue:a}}get value(){return this.model.rawValue}set value(i){this.model.rawValue=i,this.model.value=JSON.stringify(i)}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:n.Types.SharedString,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.SharedString,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.SharedString}get effectiveType(){return n.Types.SharedString}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.RichText,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}toString(){return this.model.value.richText.map(i=>i.text).join("")}get type(){return n.Types.RichText}get effectiveType(){return n.Types.RichText}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:n.Types.Boolean,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Boolean,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Boolean}get effectiveType(){return n.Types.Boolean}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Error,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Error,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Error}get effectiveType(){return n.Types.Error}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((i,a)=>(i[a.t]=a.f,i),[]),create(i,a,h){let f=this.types[i];if(!f)throw new Error("Could not create Value of type "+i);return new f(a,h)}};d.exports=n},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,d,g){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache");class r{constructor(n,c,i){this._worksheet=n,this._number=c,i!==!1&&(this.defn=i)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(n){n?(this.key=n.key,this.width=n.width!==void 0?n.width:9,this.outlineLevel=n.outlineLevel,n.style?this.style=n.style:this.style={},this.header=n.header,this._hidden=!!n.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(n){n!==void 0?(this._header=n,this.headers.forEach((c,i)=>{this._worksheet.getCell(i+1,this.number).value=c})):this._header=void 0}get key(){return this._key}set key(n){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=n,n&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(n){this._hidden=n}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(n){this._outlineLevel=n}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(n){return this.width===n.width&&this.hidden===n.hidden&&this.outlineLevel===n.outlineLevel&&l.isEqual(this.style,n.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;let n=this.style;return!n||!(n.font||n.numFmt||n.alignment||n.border||n.fill||n.protection)}get headerCount(){return this.headers.length}eachCell(n,c){let i=this.number;c||(c=n,n=null),this._worksheet.eachRow(n,(a,h)=>{c(a.getCell(i),h)})}get values(){let n=[];return this.eachCell((c,i)=>{c&&c.type!==o.ValueType.Null&&(n[i]=c.value)}),n}set values(n){if(!n)return;let c=this.number,i=0;n.hasOwnProperty("0")&&(i=1),n.forEach((a,h)=>{this._worksheet.getCell(h+i,c).value=a})}_applyStyle(n,c){return this.style[n]=c,this.eachCell(i=>{i[n]=c}),c}get numFmt(){return this.style.numFmt}set numFmt(n){this._applyStyle("numFmt",n)}get font(){return this.style.font}set font(n){this._applyStyle("font",n)}get alignment(){return this.style.alignment}set alignment(n){this._applyStyle("alignment",n)}get protection(){return this.style.protection}set protection(n){this._applyStyle("protection",n)}get border(){return this.style.border}set border(n){this._applyStyle("border",n)}get fill(){return this.style.fill}set fill(n){this._applyStyle("fill",n)}static toModel(n){let c=[],i=null;return n&&n.forEach((a,h)=>{a.isDefault?i&&(i=null):i&&a.equivalentTo(i)?i.max=h+1:(i={min:h+1,max:h+1,width:a.width!==void 0?a.width:9,style:a.style,isCustomWidth:a.isCustomWidth,hidden:a.hidden,outlineLevel:a.outlineLevel,collapsed:a.collapsed},c.push(i))}),c.length?c:void 0}static fromModel(n,c){let i=[],a=1,h=0;for(c=(c=c||[]).sort((function(f,u){return f.min-u.min}));h<c.length;){let f=c[h++];for(;a<f.min;)i.push(new r(n,a++));for(;a<=f.max;)i.push(new r(n,a++,f))}return i.length?i:null}}d.exports=r},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,d,g){"use strict";d.exports=class{constructor(l){this.model=l||{}}add(l,o){return this.model[l]=o}find(l){return this.model[l]}remove(l){this.model[l]=void 0}}},{}],6:[function(e,d,g){"use strict";let l=e("../utils/under-dash"),o=e("../utils/col-cache"),s=e("../utils/cell-matrix"),r=e("./range"),t=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;d.exports=class{constructor(){this.matrixMap={}}getMatrix(n){return this.matrixMap[n]||(this.matrixMap[n]=new s)}add(n,c){let i=o.decodeEx(n);this.addEx(i,c)}addEx(n,c){let i=this.getMatrix(c);if(n.top)for(let a=n.left;a<=n.right;a++)for(let h=n.top;h<=n.bottom;h++){let f={sheetName:n.sheetName,address:o.n2l(a)+h,row:h,col:a};i.addCellEx(f)}else i.addCellEx(n)}remove(n,c){let i=o.decodeEx(n);this.removeEx(i,c)}removeEx(n,c){this.getMatrix(c).removeCellEx(n)}removeAllNames(n){l.each(this.matrixMap,c=>{c.removeCellEx(n)})}forEach(n){l.each(this.matrixMap,(c,i)=>{c.forEach(a=>{n(i,a)})})}getNames(n){return this.getNamesEx(o.decodeEx(n))}getNamesEx(n){return l.map(this.matrixMap,(c,i)=>c.findCellEx(n)&&i).filter(Boolean)}_explore(n,c){c.mark=!1;let{sheetName:i}=c,a=new r(c.row,c.col,c.row,c.col,i),h,f;function u(m,v){let k=n.findCellAt(i,m,c.col);return!(!k||!k.mark)&&(a[v]=m,k.mark=!1,!0)}for(f=c.row-1;u(f,"top");f--);for(f=c.row+1;u(f,"bottom");f++);function b(m,v){let k=[];for(f=a.top;f<=a.bottom;f++){let B=n.findCellAt(i,f,m);if(!B||!B.mark)return!1;k.push(B)}a[v]=m;for(let B=0;B<k.length;B++)k[B].mark=!1;return!0}for(h=c.col-1;b(h,"left");h--);for(h=c.col+1;b(h,"right");h++);return a}getRanges(n,c){return(c=c||this.matrixMap[n])?(c.forEach(i=>{i.mark=!0}),{name:n,ranges:c.map(i=>i.mark&&this._explore(c,i)).filter(Boolean).map(i=>i.$shortRange)}):{name:n,ranges:[]}}normaliseMatrix(n,c){n.forEachInSheet(c,(i,a,h)=>{i&&(i.row===a&&i.col===h||(i.row=a,i.col=h,i.address=o.n2l(h)+a))})}spliceRows(n,c,i,a){l.each(this.matrixMap,h=>{h.spliceRows(n,c,i,a),this.normaliseMatrix(h,n)})}spliceColumns(n,c,i,a){l.each(this.matrixMap,h=>{h.spliceColumns(n,c,i,a),this.normaliseMatrix(h,n)})}get model(){return l.map(this.matrixMap,(n,c)=>this.getRanges(c,n)).filter(n=>n.ranges.length)}set model(n){let c=this.matrixMap={};n.forEach(i=>{let a=c[i.name]=new s;i.ranges.forEach(h=>{t.test(h.split("!").pop()||"")&&a.addCell(h)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,d,g){"use strict";d.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,d,g){"use strict";let l=e("../utils/col-cache"),o=e("./anchor");d.exports=class{constructor(s,r){this.worksheet=s,this.model=r}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(s){let{type:r,imageId:t,range:n,hyperlinks:c}=s;if(this.type=r,this.imageId=t,r==="image")if(typeof n=="string"){let i=l.decode(n);this.range={tl:new o(this.worksheet,{col:i.left,row:i.top},-1),br:new o(this.worksheet,{col:i.right,row:i.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,n.tl,0),br:n.br&&new o(this.worksheet,n.br,0),ext:n.ext,editAs:n.editAs,hyperlinks:c||n.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,d,g){"use strict";let l=e("../utils/under-dash");class o{constructor(r){this.note=r}get model(){let r=null;return typeof this.note==="string"?r={type:"note",note:{texts:[{text:this.note}]}}:r={type:"note",note:this.note},l.deepMerge({},o.DEFAULT_CONFIGS,r)}set model(r){let{note:t}=r,{texts:n}=t;n.length===1&&Object.keys(n[0]).length===1?this.note=n[0].text:this.note=t}static fromModel(r){let t=new o;return t.model=r,t}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},d.exports=o},{"../utils/under-dash":26}],10:[function(e,d,g){"use strict";let l=e("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(r,t,n,c,i){if(arguments.length<4){let a=l.decodeAddress(r),h=l.decodeAddress(t);this.model={top:Math.min(a.row,h.row),left:Math.min(a.col,h.col),bottom:Math.max(a.row,h.row),right:Math.max(a.col,h.col),sheetName:n},this.setTLBR(a.row,a.col,h.row,h.col,i)}else this.model={top:Math.min(r,n),left:Math.min(t,c),bottom:Math.max(r,n),right:Math.max(t,c),sheetName:i}}decode(r){switch(r.length){case 5:this.setTLBR(r[0],r[1],r[2],r[3],r[4]);break;case 4:this.setTLBR(r[0],r[1],r[2],r[3]);break;case 3:this.setTLBR(r[0],r[1],r[2]);break;case 2:this.setTLBR(r[0],r[1]);break;case 1:{let t=r[0];if(t instanceof o)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{let n=l.decodeEx(t);n.top?this.model={top:n.top,left:n.left,bottom:n.bottom,right:n.right,sheetName:n.sheetName}:this.model={top:n.row,left:n.col,bottom:n.row,right:n.col,sheetName:n.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+r.length)}}get top(){return this.model.top||1}set top(r){this.model.top=r}get left(){return this.model.left||1}set left(r){this.model.left=r}get bottom(){return this.model.bottom||1}set bottom(r){this.model.bottom=r}get right(){return this.model.right||1}set right(r){this.model.right=r}get sheetName(){return this.model.sheetName}set sheetName(r){this.model.sheetName=r}get _serialisedSheetName(){let{sheetName:r}=this.model;return r?/^[a-zA-Z0-9]*$/.test(r)?r+"!":`'${r}'!`:""}expand(r,t,n,c){(!this.model.top||r<this.top)&&(this.top=r),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||n>this.bottom)&&(this.bottom=n),(!this.model.right||c>this.right)&&(this.right=c)}expandRow(r){if(r){let{dimensions:t,number:n}=r;t&&this.expand(n,t.min,n,t.max)}}expandToAddress(r){let t=l.decodeEx(r);this.expand(t.row,t.col,t.row,t.col)}get tl(){return l.n2l(this.left)+this.top}get $t$l(){return`$${l.n2l(this.left)}$${this.top}`}get br(){return l.n2l(this.right)+this.bottom}get $b$r(){return`$${l.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&!(r.bottom<this.top)&&!(r.top>this.bottom)&&!(r.right<this.left)&&!(r.left>this.right)}contains(r){let t=l.decodeEx(r);return this.containsEx(t)}containsEx(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&r.row>=this.top&&r.row<=this.bottom&&r.col>=this.left&&r.col<=this.right}forEachAddress(r){for(let t=this.left;t<=this.right;t++)for(let n=this.top;n<=this.bottom;n++)r(l.encodeAddress(n,t),n,t)}}d.exports=o},{"../utils/col-cache":19}],11:[function(e,d,g){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache"),r=e("./cell");d.exports=class{constructor(t,n){this._worksheet=t,this._number=n,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(t){return this._cells[t-1]}getCellEx(t){let n=this._cells[t.col-1];if(!n){let c=this._worksheet.getColumn(t.col);n=new r(this,c,t.address),this._cells[t.col-1]=n}return n}getCell(t){if(typeof t=="string"){let n=this._worksheet.getColumnKey(t);t=n?n.number:s.l2n(t)}return this._cells[t-1]||this.getCellEx({address:s.encodeAddress(this._number,t),row:this._number,col:t})}splice(t,n){let c=t+n;for(var i=arguments.length,a=new Array(i>2?i-2:0),h=2;h<i;h++)a[h-2]=arguments[h];let f=a.length-n,u=this._cells.length,b,m,v;if(f<0)for(b=t+a.length;b<=u;b++)v=this._cells[b-1],m=this._cells[b-f-1],m?(v=this.getCell(b),v.value=m.value,v.style=m.style,v._comment=m._comment):v&&(v.value=null,v.style={},v._comment=void 0);else if(f>0)for(b=u;b>=c;b--)m=this._cells[b-1],m?(v=this.getCell(b+f),v.value=m.value,v.style=m.style,v._comment=m._comment):this._cells[b+f-1]=void 0;for(b=0;b<a.length;b++)v=this.getCell(t+b),v.value=a[b],v.style={},v._comment=void 0}eachCell(t,n){if(n||(n=t,t=null),t&&t.includeEmpty){let c=this._cells.length;for(let i=1;i<=c;i++)n(this.getCell(i),i)}else this._cells.forEach((c,i)=>{c&&c.type!==o.ValueType.Null&&n(c,i+1)})}addPageBreak(t,n){let c=this._worksheet,i=Math.max(0,t-1)||0,a=Math.max(0,n-1)||16838,h={id:this._number,max:a,man:1};i&&(h.min=i),c.rowBreaks.push(h)}get values(){let t=[];return this._cells.forEach(n=>{n&&n.type!==o.ValueType.Null&&(t[n.col]=n.value)}),t}set values(t){if(this._cells=[],t)if(t instanceof Array){let n=0;t.hasOwnProperty("0")&&(n=1),t.forEach((c,i)=>{c!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,i+n),row:this._number,col:i+n}).value=c)})}else this._worksheet.eachColumnKey((n,c)=>{t[c]!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,n.number),row:this._number,col:n.number}).value=t[c])})}get hasValues(){return l.some(this._cells,t=>t&&t.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let t=0;return this.eachCell(()=>{t++}),t}get dimensions(){let t=0,n=0;return this._cells.forEach(c=>{c&&c.type!==o.ValueType.Null&&((!t||t>c.col)&&(t=c.col),n<c.col&&(n=c.col))}),t>0?{min:t,max:n}:null}_applyStyle(t,n){return this.style[t]=n,this._cells.forEach(c=>{c&&(c[t]=n)}),n}get numFmt(){return this.style.numFmt}set numFmt(t){this._applyStyle("numFmt",t)}get font(){return this.style.font}set font(t){this._applyStyle("font",t)}get alignment(){return this.style.alignment}set alignment(t){this._applyStyle("alignment",t)}get protection(){return this.style.protection}set protection(t){this._applyStyle("protection",t)}get border(){return this.style.border}set border(t){this._applyStyle("border",t)}get fill(){return this.style.fill}set fill(t){this._applyStyle("fill",t)}get hidden(){return!!this._hidden}set hidden(t){this._hidden=t}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(t){this._outlineLevel=t}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let t=[],n=0,c=0;return this._cells.forEach(i=>{if(i){let a=i.model;a&&((!n||n>i.col)&&(n=i.col),c<i.col&&(c=i.col),t.push(a))}}),this.height||t.length?{cells:t,number:this.number,min:n,max:c,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(t){if(t.number!==this._number)throw new Error("Invalid row number in model");let n;this._cells=[],t.cells.forEach(c=>{switch(c.type){case r.Types.Merge:break;default:{let i;if(c.address)i=s.decodeAddress(c.address);else if(n){let{row:a}=n,h=n.col+1;i={row:a,col:h,address:s.encodeAddress(a,h),$col$row:`$${s.n2l(h)}$${a}`}}n=i,this.getCellEx(i).model=c;break}}}),t.height?this.height=t.height:delete this.height,this.hidden=t.hidden,this.outlineLevel=t.outlineLevel||0,this.style=t.style&&JSON.parse(JSON.stringify(t.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,d,g){"use strict";let l=e("../utils/col-cache");class o{constructor(r,t,n){this.table=r,this.column=t,this.index=n}_set(r,t){this.table.cacheState(),this.column[r]=t}get name(){return this.column.name}set name(r){this._set("name",r)}get filterButton(){return this.column.filterButton}set filterButton(r){this.column.filterButton=r}get style(){return this.column.style}set style(r){this.column.style=r}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(r){this._set("totalsRowLabel",r)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(r){this._set("totalsRowFunction",r)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(r){this._set("totalsRowResult",r)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(r){this._set("totalsRowFormula",r)}}d.exports=class{constructor(s,r){this.worksheet=s,r&&(this.table=r,this.validate(),this.store())}getFormula(s){switch(s.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${s.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${s.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${s.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${s.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${s.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${s.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${s.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${s.name}])`;case"custom":return s.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+s.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:s}=this,r=(f,u,b)=>{f[u]===void 0&&(f[u]=b)};r(s,"headerRow",!0),r(s,"totalsRow",!1),r(s,"style",{}),r(s.style,"theme","TableStyleMedium2"),r(s.style,"showFirstColumn",!1),r(s.style,"showLastColumn",!1),r(s.style,"showRowStripes",!1),r(s.style,"showColumnStripes",!1);let t=(f,u)=>{if(!f)throw new Error(u)};t(s.ref,"Table must have ref"),t(s.columns,"Table must have column definitions"),t(s.rows,"Table must have row definitions"),s.tl=l.decodeAddress(s.ref);let{row:n,col:c}=s.tl;t(n>0,"Table must be on valid row"),t(c>0,"Table must be on valid col");let{width:i,filterHeight:a,tableHeight:h}=this;s.autoFilterRef=l.encode(n,c,n+a-1,c+i-1),s.tableRef=l.encode(n,c,n+h-1,c+i-1),s.columns.forEach((f,u)=>{t(f.name,`Column ${u} must have a name`),u===0?r(f,"totalsRowLabel","Total"):(r(f,"totalsRowFunction","none"),f.totalsRowFormula=this.getFormula(f))})}store(){let s=(a,h)=>{h&&Object.keys(h).forEach(f=>{a[f]=h[f]})},{worksheet:r,table:t}=this,{row:n,col:c}=t.tl,i=0;if(t.headerRow){let a=r.getRow(n+i++);t.columns.forEach((h,f)=>{let{style:u,name:b}=h,m=a.getCell(c+f);m.value=b,s(m,u)})}if(t.rows.forEach(a=>{let h=r.getRow(n+i++);a.forEach((f,u)=>{let b=h.getCell(c+u);b.value=f,s(b,t.columns[u].style)})}),t.totalsRow){let a=r.getRow(n+i++);t.columns.forEach((h,f)=>{let u=a.getCell(c+f);if(f===0)u.value=h.totalsRowLabel;else{let b=this.getFormula(h);u.value=b?{formula:h.totalsRowFormula,result:h.totalsRowResult}:null}s(u,h.style)})}}load(s){let{table:r}=this,{row:t,col:n}=r.tl,c=0;if(r.headerRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{i.getCell(n+h).value=a.name})}if(r.rows.forEach(i=>{let a=s.getRow(t+c++);i.forEach((h,f)=>{a.getCell(n+f).value=h})}),r.totalsRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{let f=i.getCell(n+h);h===0?f.value=a.totalsRowLabel:this.getFormula(a)&&(f.value={formula:a.totalsRowFormula,result:a.totalsRowResult})})}}get model(){return this.table}set model(s){this.table=s}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();let s=l.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let r=0;r<this._cache.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=0;n<this._cache.width;n++)t.getCell(s.col+n).value=null}else{for(let r=this.tableHeight;r<this._cache.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=0;n<this._cache.width;n++)t.getCell(s.col+n).value=null}for(let r=0;r<this.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=this.width;n<this._cache.width;n++)t.getCell(s.col+n).value=null}}this.store()}addRow(s,r){this.cacheState(),r===void 0?this.table.rows.push(s):this.table.rows.splice(r,0,s)}removeRows(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,r)}getColumn(s){let r=this.table.columns[s];return new o(this,r,s)}addColumn(s,r,t){this.cacheState(),t===void 0?(this.table.columns.push(s),this.table.rows.forEach((n,c)=>{n.push(r[c])})):(this.table.columns.splice(t,0,s),this.table.rows.forEach((n,c)=>{n.splice(t,0,r[c])}))}removeColumns(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,r),this.table.rows.forEach(t=>{t.splice(s,r)})}_assign(s,r,t){this.cacheState(),s[r]=t}get ref(){return this.table.ref}set ref(s){this._assign(this.table,"ref",s)}get name(){return this.table.name}set name(s){this.table.name=s}get displayName(){return this.table.displyName||this.table.name}set displayNamename(s){this.table.displayName=s}get headerRow(){return this.table.headerRow}set headerRow(s){this._assign(this.table,"headerRow",s)}get totalsRow(){return this.table.totalsRow}set totalsRow(s){this._assign(this.table,"totalsRow",s)}get theme(){return this.table.style.name}set theme(s){this.table.style.name=s}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(s){this.table.style.showFirstColumn=s}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(s){this.table.style.showLastColumn=s}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(s){this.table.style.showRowStripes=s}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(s){this.table.style.showColumnStripes=s}}},{"../utils/col-cache":19}],13:[function(e,d,g){"use strict";let l=e("./worksheet"),o=e("./defined-names"),s=e("../xlsx/xlsx"),r=e("../csv/csv");d.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new r(this)),this._csv}get nextId(){for(let t=1;t<this._worksheets.length;t++)if(!this._worksheets[t])return t;return this._worksheets.length||1}addWorksheet(t,n){let c=this.nextId;n&&(typeof n=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),n={properties:{tabColor:{argb:n}}}):(n.argb||n.theme||n.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),n={properties:{tabColor:n}}));let i=this._worksheets.reduce((f,u)=>(u&&u.orderNo)>f?u.orderNo:f,0),a=Object.assign({},n,{id:c,name:t,orderNo:i+1,workbook:this}),h=new l(a);return this._worksheets[c]=h,h}removeWorksheetEx(t){delete this._worksheets[t.id]}removeWorksheet(t){let n=this.getWorksheet(t);n&&n.destroy()}getWorksheet(t){return t===void 0?this._worksheets.find(Boolean):typeof t=="number"?this._worksheets[t]:typeof t=="string"?this._worksheets.find(n=>n&&n.name===t):void 0}get worksheets(){return this._worksheets.slice(1).sort((t,n)=>t.orderNo-n.orderNo).filter(Boolean)}eachSheet(t){this.worksheets.forEach(n=>{t(n,n.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(t){let n=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),n}getImage(t){return this.media[t]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(t=>t.model),sheets:this.worksheets.map(t=>t.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(t){this.creator=t.creator,this.lastModifiedBy=t.lastModifiedBy,this.lastPrinted=t.lastPrinted,this.created=t.created,this.modified=t.modified,this.company=t.company,this.manager=t.manager,this.title=t.title,this.subject=t.subject,this.keywords=t.keywords,this.category=t.category,this.description=t.description,this.language=t.language,this.revision=t.revision,this.contentStatus=t.contentStatus,this.properties=t.properties,this.calcProperties=t.calcProperties,this._worksheets=[],t.worksheets.forEach(n=>{let{id:c,name:i,state:a}=n,h=t.sheets&&t.sheets.findIndex(f=>f.id===c);(this._worksheets[c]=new l({id:c,name:i,orderNo:h,state:a,workbook:this})).model=n}),this._definedNames.model=t.definedNames,this.views=t.views,this._themes=t.themes,this.media=t.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,d,g){"use strict";let l=e("../utils/under-dash"),o=e("../utils/col-cache"),s=e("./range"),r=e("./row"),t=e("./column"),n=e("./enums"),c=e("./image"),i=e("./table"),a=e("./data-validations"),h=e("../utils/encryptor"),{copyStyle:f}=e("../utils/copy-style");d.exports=class{constructor(u){u=u||{},this._workbook=u.workbook,this.id=u.id,this.orderNo=u.orderNo,this.name=u.name,this.state=u.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},u.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!u.pageSetup||!u.pageSetup.fitToWidth&&!u.pageSetup.fitToHeight||u.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},u.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},u.headerFooter),this.dataValidations=new a,this.views=u.views||[],this.autoFilter=u.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(u){if(u===void 0&&(u="sheet"+this.id),this._name!==u){if(typeof u!="string")throw new Error("The name has to be a string.");if(u==="")throw new Error("The name can't be empty.");if(u==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(u))throw new Error(`Worksheet name ${u} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(u))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+u);if(u&&u.length>31&&(console.warn(`Worksheet name ${u} exceeds 31 chars. This will be truncated`),u=u.substring(0,31)),this._workbook._worksheets.find(b=>b&&b.name.toLowerCase()===u.toLowerCase()))throw new Error("Worksheet name already exists: "+u);this._name=u}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let u=new s;return this._rows.forEach(b=>{if(b){let m=b.dimensions;m&&u.expand(b.number,m.min,b.number,m.max)}}),u}get columns(){return this._columns}set columns(u){this._headerRowCount=u.reduce((v,k)=>{let B=(k.header?1:k.headers&&k.headers.length)||0;return Math.max(v,B)},0);let b=1,m=this._columns=[];u.forEach(v=>{let k=new t(this,b++,!1);m.push(k),k.defn=v})}getColumnKey(u){return this._keys[u]}setColumnKey(u,b){this._keys[u]=b}deleteColumnKey(u){delete this._keys[u]}eachColumnKey(u){l.each(this._keys,u)}getColumn(u){if(typeof u=="string"){let b=this._keys[u];if(b)return b;u=o.l2n(u)}if(this._columns||(this._columns=[]),u>this._columns.length){let b=this._columns.length+1;for(;b<=u;)this._columns.push(new t(this,b++))}return this._columns[u-1]}spliceColumns(u,b){let m=this._rows.length;for(var v=arguments.length,k=new Array(v>2?v-2:0),B=2;B<v;B++)k[B-2]=arguments[B];if(k.length>0)for(let D=0;D<m;D++){let N=[u,b];k.forEach(j=>{N.push(j[D]||null)});let q=this.getRow(D+1);q.splice.apply(q,N)}else this._rows.forEach(D=>{D&&D.splice(u,b)});let R=k.length-b,L=u+b,A=this._columns.length;if(R<0)for(let D=u+k.length;D<=A;D++)this.getColumn(D).defn=this.getColumn(D-R).defn;else if(R>0)for(let D=A;D>=L;D--)this.getColumn(D+R).defn=this.getColumn(D).defn;for(let D=u;D<u+k.length;D++)this.getColumn(D).defn=null;this.workbook.definedNames.spliceColumns(this.name,u,b,k.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let u=0;return this.eachRow(b=>{u=Math.max(u,b.cellCount)}),u}get actualColumnCount(){let u=[],b=0;return this.eachRow(m=>{m.eachCell(v=>{let{col:k}=v;u[k]||(u[k]=!0,b++)})}),b}_commitRow(){}get _lastRowNumber(){let u=this._rows,b=u.length;for(;b>0&&u[b-1]===void 0;)b--;return b}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(u){return this._rows[u-1]}findRows(u,b){return this._rows.slice(u-1,u-1+b)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let u=0;return this.eachRow(()=>{u++}),u}getRow(u){let b=this._rows[u-1];return b||(b=this._rows[u-1]=new r(this,u)),b}getRows(u,b){if(b<1)return;let m=[];for(let v=u;v<u+b;v++)m.push(this.getRow(v));return m}addRow(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=this._nextRow,v=this.getRow(m);return v.values=u,this._setStyleOption(m,b[0]==="i"?b:"n"),v}addRows(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=[];return u.forEach(v=>{m.push(this.addRow(v,b))}),m}insertRow(u,b){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(u,0,b),this._setStyleOption(u,m),this.getRow(u)}insertRows(u,b){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(u,0,...b),m!=="n")for(let v=0;v<b.length;v++)m[0]==="o"&&this.findRow(b.length+u+v)!==void 0?this._copyStyle(b.length+u+v,u+v,m[1]==="+"):m[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u+v,m[1]==="+");return this.getRows(u,b.length)}_setStyleOption(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";b[0]==="o"&&this.findRow(u+1)!==void 0?this._copyStyle(u+1,u,b[1]==="+"):b[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u,b[1]==="+")}_copyStyle(u,b){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this.getRow(u),k=this.getRow(b);k.style=f(v.style),v.eachCell({includeEmpty:m},(B,R)=>{k.getCell(R).style=f(B.style)}),k.height=v.height}duplicateRow(u,b){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this._rows[u-1],k=new Array(b).fill(v.values);this.spliceRows(u+1,m?0:b,...k);for(let B=0;B<b;B++){let R=this._rows[u+B];R.style=v.style,R.height=v.height,v.eachCell({includeEmpty:!0},(L,A)=>{R.getCell(A).style=L.style})}}spliceRows(u,b){let m=u+b;for(var v=arguments.length,k=new Array(v>2?v-2:0),B=2;B<v;B++)k[B-2]=arguments[B];let R=k.length,L=R-b,A=this._rows.length,D,N;if(L<0)for(u===A&&(this._rows[A-1]=void 0),D=m;D<=A;D++)if(N=this._rows[D-1],N){let q=this.getRow(D+L);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(j,S)=>{q.getCell(S).style=j.style}),this._rows[D-1]=void 0}else this._rows[D+L-1]=void 0;else if(L>0)for(D=A;D>=m;D--)if(N=this._rows[D-1],N){let q=this.getRow(D+L);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(j,S)=>{if(q.getCell(S).style=j.style,j._value.constructor.name==="MergeValue"){let T=this.getRow(j._row._number+R).getCell(S),P=j._value._master,p=this.getRow(P._row._number+R).getCell(P._column._number);T.merge(p)}})}else this._rows[D+L-1]=void 0;for(D=0;D<R;D++){let q=this.getRow(u+D);q.style={},q.values=k[D]}this.workbook.definedNames.spliceRows(this.name,u,b,R)}eachRow(u,b){if(b||(b=u,u=void 0),u&&u.includeEmpty){let m=this._rows.length;for(let v=1;v<=m;v++)b(this.getRow(v),v)}else this._rows.forEach(m=>{m&&m.hasValues&&b(m,m.number)})}getSheetValues(){let u=[];return this._rows.forEach(b=>{b&&(u[b.number]=b.values)}),u}findCell(u,b){let m=o.getAddress(u,b),v=this._rows[m.row-1];return v?v.findCell(m.col):void 0}getCell(u,b){let m=o.getAddress(u,b);return this.getRow(m.row).getCellEx(m)}mergeCells(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let v=new s(b);this._mergeCellsInternal(v)}mergeCellsWithoutStyle(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let v=new s(b);this._mergeCellsInternal(v,!0)}_mergeCellsInternal(u,b){l.each(this._merges,v=>{if(v.intersects(u))throw new Error("Cannot merge already merged cells")});let m=this.getCell(u.top,u.left);for(let v=u.top;v<=u.bottom;v++)for(let k=u.left;k<=u.right;k++)(v>u.top||k>u.left)&&this.getCell(v,k).merge(m,b);this._merges[m.address]=u}_unMergeMaster(u){let b=this._merges[u.address];if(b){for(let m=b.top;m<=b.bottom;m++)for(let v=b.left;v<=b.right;v++)this.getCell(m,v).unmerge();delete this._merges[u.address]}}get hasMerges(){return l.some(this._merges,Boolean)}unMergeCells(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let v=new s(b);for(let k=v.top;k<=v.bottom;k++)for(let B=v.left;B<=v.right;B++){let R=this.findCell(k,B);R&&(R.type===n.ValueType.Merge?this._unMergeMaster(R.master):this._merges[R.address]&&this._unMergeMaster(R))}}fillFormula(u,b,m){let v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",k=o.decode(u),{top:B,left:R,bottom:L,right:A}=k,D=A-R+1,N=o.encodeAddress(B,R),q=v==="shared",j;j=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(T,P)=>m[T-B][P-R]:(T,P)=>m[(T-B)*D+(P-R)]:()=>{};let S=!0;for(let T=B;T<=L;T++)for(let P=R;P<=A;P++)S?(this.getCell(T,P).value={shareType:v,formula:b,ref:u,result:j(T,P)},S=!1):this.getCell(T,P).value=q?{sharedFormula:N,result:j(T,P)}:j(T,P)}addImage(u,b){let m={type:"image",imageId:u,range:b};this._media.push(new c(this,m))}getImages(){return this._media.filter(u=>u.type==="image")}addBackgroundImage(u){let b={type:"background",imageId:u};this._media.push(new c(this,b))}getBackgroundImageId(){let u=this._media.find(b=>b.type==="background");return u&&u.imageId}protect(u,b){return new Promise(m=>{this.sheetProtection={sheet:!0},b&&"spinCount"in b&&(b.spinCount=Number.isFinite(b.spinCount)?Math.round(Math.max(0,b.spinCount)):1e5),u&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=h.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=b&&"spinCount"in b?b.spinCount:1e5,this.sheetProtection.hashValue=h.convertPasswordToHash(u,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),b&&(this.sheetProtection=Object.assign(this.sheetProtection,b),!u&&"spinCount"in b&&delete this.sheetProtection.spinCount),m()})}unprotect(){this.sheetProtection=null}addTable(u){let b=new i(this,u);return this.tables[u.name]=b,b}getTable(u){return this.tables[u]}removeTable(u){delete this.tables[u]}getTables(){return Object.values(this.tables)}addConditionalFormatting(u){this.conditionalFormattings.push(u)}removeConditionalFormatting(u){typeof u=="number"?this.conditionalFormattings.splice(u,1):this.conditionalFormattings=u instanceof Function?this.conditionalFormattings.filter(u):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(u){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=u}get model(){let u={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(v=>v.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(v=>v.model),conditionalFormattings:this.conditionalFormattings};u.cols=t.toModel(this.columns);let b=u.rows=[],m=u.dimensions=new s;return this._rows.forEach(v=>{let k=v&&v.model;k&&(m.expand(k.number,k.min,k.number,k.max),b.push(k))}),u.merges=[],l.each(this._merges,v=>{u.merges.push(v.range)}),u}_parseRows(u){this._rows=[],u.rows.forEach(b=>{let m=new r(this,b.number);this._rows[m.number-1]=m,m.model=b})}_parseMergeCells(u){l.each(u.mergeCells,b=>{this.mergeCellsWithoutStyle(b)})}set model(u){this.name=u.name,this._columns=t.fromModel(this,u.cols),this._parseRows(u),this._parseMergeCells(u),this.dataValidations=new a(u.dataValidations),this.properties=u.properties,this.pageSetup=u.pageSetup,this.headerFooter=u.headerFooter,this.views=u.views,this.autoFilter=u.autoFilter,this._media=u.media.map(b=>new c(this,b)),this.sheetProtection=u.sheetProtection,this.tables=u.tables.reduce((b,m)=>{let v=new i;return v.model=m,b[m.name]=v,b},{}),this.conditionalFormattings=u.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,d,g){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");let l={Workbook:e("./doc/workbook")},o=e("./doc/enums");Object.keys(o).forEach(s=>{l[s]=o[s]}),d.exports=l},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,d,g){"use strict";let l=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");g.bufferToString=function(o){return typeof o=="string"?o:l?l.decode(o):o.toString()}},{}],17:[function(e,d,g){"use strict";let l=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=e("buffer");g.stringToBuffer=function(s){return typeof s!="string"?s:l?o.from(l.encode(s).buffer):o.from(s)}},{buffer:220}],18:[function(e,d,g){"use strict";let l=e("./under-dash"),o=e("./col-cache");d.exports=class{constructor(s){this.template=s,this.sheets={}}addCell(s){this.addCellEx(o.decodeEx(s))}getCell(s){return this.findCellEx(o.decodeEx(s),!0)}findCell(s){return this.findCellEx(o.decodeEx(s),!1)}findCellAt(s,r,t){let n=this.sheets[s],c=n&&n[r];return c&&c[t]}addCellEx(s){if(s.top)for(let r=s.top;r<=s.bottom;r++)for(let t=s.left;t<=s.right;t++)this.getCellAt(s.sheetName,r,t);else this.findCellEx(s,!0)}getCellEx(s){return this.findCellEx(s,!0)}findCellEx(s,r){let t=this.findSheet(s,r),n=this.findSheetRow(t,s,r);return this.findRowCell(n,s,r)}getCellAt(s,r,t){let n=this.sheets[s]||(this.sheets[s]=[]),c=n[r]||(n[r]=[]);return c[t]||(c[t]={sheetName:s,address:o.n2l(t)+r,row:r,col:t})}removeCellEx(s){let r=this.findSheet(s);if(!r)return;let t=this.findSheetRow(r,s);t&&delete t[s.col]}forEachInSheet(s,r){let t=this.sheets[s];t&&t.forEach((n,c)=>{n&&n.forEach((i,a)=>{i&&r(i,c,a)})})}forEach(s){l.each(this.sheets,(r,t)=>{this.forEachInSheet(t,s)})}map(s){let r=[];return this.forEach(t=>{r.push(s(t))}),r}findSheet(s,r){let t=s.sheetName;return this.sheets[t]?this.sheets[t]:r?this.sheets[t]=[]:void 0}findSheetRow(s,r,t){let{row:n}=r;return s&&s[n]?s[n]:t?s[n]=[]:void 0}findRowCell(s,r,t){let{col:n}=r;return s&&s[n]?s[n]:t?s[n]=this.template?Object.assign(r,JSON.parse(JSON.stringify(this.template))):r:void 0}spliceRows(s,r,t,n){let c=this.sheets[s];if(c){let i=[];for(let a=0;a<n;a++)i.push([]);c.splice(r,t,...i)}}spliceColumns(s,r,t,n){let c=this.sheets[s];if(c){let i=[];for(let a=0;a<n;a++)i.push(null);l.each(c,a=>{a.splice(r,t,...i)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,d,g){"use strict";let l=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:s=>s<=26?1:s<=676?2:3,_fill(s){let r,t,n,c,i,a=1;if(s>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&s>=1){for(;a<=26;)r=this._dictionary[a-1],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=1}if(this._l2nFill<2&&s>=2){for(a=27;a<=702;)t=a-27,n=t%26,c=Math.floor(t/26),r=this._dictionary[c]+this._dictionary[n],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=2}if(this._l2nFill<3&&s>=3){for(a=703;a<=16384;)t=a-703,n=t%26,c=Math.floor(t/26)%26,i=Math.floor(t/676),r=this._dictionary[i]+this._dictionary[c]+this._dictionary[n],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=3}},l2n(s){if(this._l2n[s]||this._fill(s.length),!this._l2n[s])throw new Error("Out of bounds. Invalid column letter: "+s);return this._l2n[s]},n2l(s){if(s<1||s>16384)throw new Error(s+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[s]||this._fill(this._level(s)),this._n2l[s]},_hash:{},validateAddress(s){if(!l.test(s))throw new Error("Invalid Address: "+s);return!0},decodeAddress(s){let r=s.length<5&&this._hash[s];if(r)return r;let t=!1,n="",c=0,i=!1,a="",h=0;for(let u,b=0;b<s.length;b++)if(u=s.charCodeAt(b),!i&&u>=65&&u<=90)t=!0,n+=s[b],c=26*c+u-64;else if(u>=48&&u<=57)i=!0,a+=s[b],h=10*h+u-48;else if(i&&t&&u!==36)break;if(t){if(c>16384)throw new Error("Out of bounds. Invalid column letter: "+n)}else c=void 0;i||(h=void 0);let f={address:s=n+a,col:c,row:h,$col$row:`$${n}$${a}`};return c<=100&&h<=100&&(this._hash[s]=f,this._hash[f.$col$row]=f),f},getAddress(s,r){if(r){let t=this.n2l(r)+s;return this.decodeAddress(t)}return this.decodeAddress(s)},decode(s){let r=s.split(":");if(r.length===2){let t=this.decodeAddress(r[0]),n=this.decodeAddress(r[1]),c={top:Math.min(t.row,n.row),left:Math.min(t.col,n.col),bottom:Math.max(t.row,n.row),right:Math.max(t.col,n.col)};return c.tl=this.n2l(c.left)+c.top,c.br=this.n2l(c.right)+c.bottom,c.dimensions=`${c.tl}:${c.br}`,c}return this.decodeAddress(s)},decodeEx(s){let r=s.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),t=r[1]||r[2],n=r[3],c=n.split(":");if(c.length>1){let a=this.decodeAddress(c[0]),h=this.decodeAddress(c[1]),f=Math.min(a.row,h.row),u=Math.min(a.col,h.col),b=Math.max(a.row,h.row),m=Math.max(a.col,h.col);return a=this.n2l(u)+f,h=this.n2l(m)+b,{top:f,left:u,bottom:b,right:m,sheetName:t,tl:{address:a,col:u,row:f,$col$row:`$${this.n2l(u)}$${f}`,sheetName:t},br:{address:h,col:m,row:b,$col$row:`$${this.n2l(m)}$${b}`,sheetName:t},dimensions:`${a}:${h}`}}if(n.startsWith("#"))return t?{sheetName:t,error:n}:{error:n};let i=this.decodeAddress(n);return t?{sheetName:t,...i}:i},encodeAddress:(s,r)=>o.n2l(r)+s,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(s,r){let[t,n,,c,i]=s,[a,h]=r;return a>=t&&a<=c&&h>=n&&h<=i}};d.exports=o},{}],20:[function(e,d,g){"use strict";let l=(s,r)=>({...s,...r.reduce((t,n)=>(s[n]&&(t[n]={...s[n]}),t),{})}),o=function(s,r,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];s[t]&&(r[t]=l(s[t],n))};g.copyStyle=s=>{if(!s)return s;if(r=s,Object.keys(r).length===0)return{};var r;let t={...s};return o(s,t,"font",["color"]),o(s,t,"alignment"),o(s,t,"protection"),s.border&&(o(s,t,"border"),o(s.border,t.border,"top",["color"]),o(s.border,t.border,"left",["color"]),o(s.border,t.border,"bottom",["color"]),o(s.border,t.border,"right",["color"]),o(s.border,t.border,"diagonal",["color"])),s.fill&&(o(s,t,"fill",["fgColor","bgColor","center"]),s.fill.stops&&(t.fill.stops=s.fill.stops.map(n=>l(n,["color"])))),t}},{}],21:[function(e,d,g){(function(l){(function(){"use strict";let o=e("crypto"),s={hash(r){let t=o.createHash(r);for(var n=arguments.length,c=new Array(n>1?n-1:0),i=1;i<n;i++)c[i-1]=arguments[i];return t.update(l.concat(c)),t.digest()},convertPasswordToHash(r,t,n,c){if(t=t.toLowerCase(),o.getHashes().indexOf(t)<0)throw new Error(`Hash algorithm '${t}' not supported!`);let i=l.from(r,"utf16le"),a=this.hash(t,l.from(n,"base64"),i);for(let h=0;h<c;h++){let f=l.alloc(4);f.writeUInt32LE(h,0),a=this.hash(t,a,f)}return a.toString("base64")},randomBytes:r=>o.randomBytes(r)};d.exports=s}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,d,g){"use strict";let{SaxesParser:l}=e("saxes"),{PassThrough:o}=e("readable-stream"),{bufferToString:s}=e("./browser-buffer-decode");d.exports=async function*(r){r.pipe&&!r[Symbol.asyncIterator]&&(r=r.pipe(new o));let t=new l,n;t.on("error",i=>{n=i});let c=[];t.on("opentag",i=>c.push({eventType:"opentag",value:i})),t.on("text",i=>c.push({eventType:"text",value:i})),t.on("closetag",i=>c.push({eventType:"closetag",value:i}));for await(let i of r){if(t.write(s(i)),n)throw n;yield c,c=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,d,g){"use strict";let l=e("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;d.exports={slideFormula:function(r,t,n){let c=l.decode(t),i=l.decode(n);return r.replace(o,(a,h,f,u,b)=>{if(b)return a;let m=s.exec(u);if(m){let v=m[1],k=m[2].toUpperCase(),B=m[3],R=m[4];if(k.length>3||k.length===3&&k>"XFD")return a;let L=l.l2n(k),A=parseInt(R,10);return v||(L+=i.col-c.col),B||(A+=i.row-c.row),(h||"")+(v||"")+l.n2l(L)+(B||"")+A}return a})}}},{"./col-cache":19}],24:[function(e,d,g){(function(l,o){(function(){"use strict";let s=e("readable-stream"),r=e("./utils"),t=e("./string-buf");class n{constructor(u,b){this._data=u,this._encoding=b}get length(){return this.toBuffer().length}copy(u,b,m,v){return this.toBuffer().copy(u,b,m,v)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class c{constructor(u){this._data=u}get length(){return this._data.length}copy(u,b,m,v){return this._data._buf.copy(u,b,m,v)}toBuffer(){return this._data.toBuffer()}}class i{constructor(u){this._data=u}get length(){return this._data.length}copy(u,b,m,v){this._data.copy(u,b,m,v)}toBuffer(){return this._data}}class a{constructor(u){this.size=u,this.buffer=o.alloc(u),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let u=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(u,0,this.iRead,this.iWrite),u}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(u){let b;return u===0?null:u===void 0||u>=this.length?(b=this.toBuffer(),this.iRead=this.iWrite,b):(b=o.alloc(u),this.buffer.copy(b,0,this.iRead,u),this.iRead+=u,b)}write(u,b,m){let v=Math.min(m,this.size-this.iWrite);return u.copy(this.buffer,this.iWrite,b,b+v),this.iWrite+=v,v}}let h=function(f){f=f||{},this.bufSize=f.bufSize||1048576,this.buffers=[],this.batch=f.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};r.inherits(h,s.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(f=>f.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let u=this.buffers[this.buffers.length-1];if(!u.full)return u}let f=new a(this.bufSize);return this.buffers.push(f),f},async _pipe(f){await Promise.all(this.pipes.map((function(u){return new Promise(b=>{u.write(f.toBuffer(),()=>{b()})})})))},_writeToBuffers(f){let u=0,b=f.length;for(;u<b;)u+=this._getWritableBuffer().write(f,u,b-u)},async write(f,u,b){let m;if(u instanceof Function&&(b=u,u="utf8"),b=b||r.nop,f instanceof t)m=new c(f);else if(f instanceof o)m=new i(f);else{if(!(typeof f=="string"||f instanceof String||f instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");m=new n(f,u)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(m);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(m),l.nextTick(b)):(await this._pipe(m),b());else this.paused||this.emit("data",m.toBuffer()),this._writeToBuffers(m),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(f,u,b){let m=v=>{v?b(v):(this._flush(),this.pipes.forEach(k=>{k.end()}),this.emit("finish"))};f?this.write(f,u,m):m()},read(f){let u;if(f){for(u=[];f&&this.buffers.length&&!this.buffers[0].eod;){let b=this.buffers[0],m=b.read(f);f-=m.length,u.push(m),b.eod&&b.full&&this.buffers.shift()}return o.concat(u)}return u=this.buffers.map(b=>b.toBuffer()).filter(Boolean),this.buffers=[],o.concat(u)},setEncoding(f){this.encoding=f},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(f){this.pipes.push(f),!this.paused&&this.buffers.length&&this.end()},unpipe(f){this.pipes=this.pipes.filter(u=>u!==f)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),d.exports=h}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,d,g){(function(l){(function(){"use strict";d.exports=class{constructor(o){this._buf=l.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=l.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let s=2*this._buf.length;for(;s<o;)s*=2;let r=l.alloc(s);this._buf.copy(r,0),this._buf=r}addText(o){this._buffer=void 0;let s=this._inPos+this._buf.write(o,this._inPos,this._encoding);for(;s>=this._buf.length-4;)this._grow(this._inPos+o.length),s=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=s}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,d,g){"use strict";let{toString:l}=Object.prototype,o=/["&<>]/,s={each:function(r,t){r&&(Array.isArray(r)?r.forEach(t):Object.keys(r).forEach(n=>{t(r[n],n)}))},some:function(r,t){return!!r&&(Array.isArray(r)?r.some(t):Object.keys(r).some(n=>t(r[n],n)))},every:function(r,t){return!r||(Array.isArray(r)?r.every(t):Object.keys(r).every(n=>t(r[n],n)))},map:function(r,t){return r?Array.isArray(r)?r.map(t):Object.keys(r).map(n=>t(r[n],n)):[]},keyBy:(r,t)=>r.reduce((n,c)=>(n[c[t]]=c,n),{}),isEqual:function(r,t){let n=typeof r,c=typeof t,i=Array.isArray(r),a=Array.isArray(t),h;if(n!==c)return!1;switch(typeof r){case"object":if(i||a)return!(!i||!a)&&r.length===t.length&&r.every((f,u)=>{let b=t[u];return s.isEqual(f,b)});if(r===null||t===null)return r===t;if(h=Object.keys(r),Object.keys(t).length!==h.length)return!1;for(let f of h)if(!t.hasOwnProperty(f))return!1;return s.every(r,(f,u)=>{let b=t[u];return s.isEqual(f,b)});default:return r===t}},escapeHtml(r){let t=o.exec(r);if(!t)return r;let n="",c="",i=0,a=t.index;for(;a<r.length;a++){switch(r.charAt(a)){case'"':c="&quot;";break;case"&":c="&amp;";break;case"'":c="&apos;";break;case"<":c="&lt;";break;case">":c="&gt;";break;default:continue}i!==a&&(n+=r.substring(i,a)),i=a+1,n+=c}return i!==a?n+r.substring(i,a):n},strcmp:(r,t)=>r<t?-1:r>t?1:0,isUndefined:r=>l.call(r)==="[object Undefined]",isObject:r=>l.call(r)==="[object Object]",deepMerge(){let r=arguments[0]||{},{length:t}=arguments,n,c,i;function a(h,f){n=r[f],i=Array.isArray(h),s.isObject(h)||i?(i?(i=!1,c=n&&Array.isArray(n)?n:[]):c=n&&s.isObject(n)?n:{},r[f]=s.deepMerge(c,h)):s.isUndefined(h)||(r[f]=h)}for(let h=0;h<t;h++)s.each(arguments[h],a);return r}};d.exports=s},{}],27:[function(e,d,g){(function(l,o){(function(){"use strict";let s=e("fs"),r=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,t={nop(){},promiseImmediate:n=>new Promise(c=>{l.setImmediate?o(()=>{c(n)}):setTimeout(()=>{c(n)},1)}),inherits:function(n,c,i,a){n.super_=c,a||(a=i,i=null),i&&Object.keys(i).forEach(f=>{Object.defineProperty(n,f,Object.getOwnPropertyDescriptor(i,f))});let h={constructor:{value:n,enumerable:!1,writable:!1,configurable:!0}};a&&Object.keys(a).forEach(f=>{h[f]=Object.getOwnPropertyDescriptor(a,f)}),n.prototype=Object.create(c.prototype,h)},dateToExcel:(n,c)=>25569+n.getTime()/864e5-(c?1462:0),excelToDate(n,c){let i=Math.round(24*(n-25569+(c?1462:0))*3600*1e3);return new Date(i)},parsePath(n){let c=n.lastIndexOf("/");return{path:n.substring(0,c),name:n.substring(c+1)}},getRelsPath(n){let c=t.parsePath(n);return`${c.path}/_rels/${c.name}.rels`},xmlEncode(n){let c=r.exec(n);if(!c)return n;let i="",a="",h=0,f=c.index;for(;f<n.length;f++){let u=n.charCodeAt(f);switch(u){case 34:a="&quot;";break;case 38:a="&amp;";break;case 39:a="&apos;";break;case 60:a="&lt;";break;case 62:a="&gt;";break;case 127:a="";break;default:if(u<=31&&(u<=8||u>=11&&u!==13)){a="";break}continue}h!==f&&(i+=n.substring(h,f)),h=f+1,a&&(i+=a)}return h!==f?i+n.substring(h,f):i},xmlDecode:n=>n.replace(/&([a-z]*);/g,c=>{switch(c){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return c}}),validInt(n){let c=parseInt(n,10);return Number.isNaN(c)?0:c},isDateFmt(n){return n?(n=(n=n.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:n=>new Promise(c=>{s.access(n,s.constants.F_OK,i=>{c(!i)})})},toIsoDateString:n=>n.toIsoString().subsstr(0,10),parseBoolean:n=>n===!0||n==="true"||n===1||n==="1"};d.exports=t}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,d,g){"use strict";let l=e("./under-dash"),o=e("./utils");function s(n,c,i){n.push(` ${c}="${o.xmlEncode(i.toString())}"`)}function r(n,c){if(c){let i=[];l.each(c,(a,h)=>{a!==void 0&&s(i,h,a)}),n.push(i.join(""))}}class t{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(c){let i=this._xml;i.push("<?xml"),r(i,c),i.push(`?>
2
2
  `)}openNode(c,i){let a=this.tos,h=this._xml;a&&this.open&&h.push(">"),this._stack.push(c),h.push("<"),h.push(c),r(h,i),this.leaf=!0,this.open=!0}addAttribute(c,i){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");i!==void 0&&s(this._xml,c,i)}addAttributes(c){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");r(this._xml,c)}writeText(c){let i=this._xml;this.open&&(i.push(">"),this.open=!1),this.leaf=!1,i.push(o.xmlEncode(c.toString()))}writeXml(c){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(c)}closeNode(){let c=this._stack.pop(),i=this._xml;this.leaf?i.push("/>"):(i.push("</"),i.push(c),i.push(">")),this.open=!1,this.leaf=!1}leafNode(c,i,a){this.openNode(c,i),a!==void 0&&this.writeText(a),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let c=this._rollbacks.pop();this._xml.length>c.xml&&this._xml.splice(c.xml,this._xml.length-c.xml),this._stack.length>c.stack&&this._stack.splice(c.stack,this._stack.length-c.stack),this.leaf=c.leaf,this.open=c.open}get xml(){return this.closeAll(),this._xml.join("")}}t.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},d.exports=t},{"./under-dash":26,"./utils":27}],29:[function(e,d,g){(function(l){(function(){"use strict";let o=e("events"),s=e("jszip"),r=e("./stream-buf"),{stringToBuffer:t}=e("./browser-buffer-encode");class n extends o.EventEmitter{constructor(i){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},i),this.zip=new s,this.stream=new r}append(i,a){a.hasOwnProperty("base64")&&a.base64?this.zip.file(a.name,i,{base64:!0}):(l.browser&&typeof i=="string"&&(i=t(i)),this.zip.file(a.name,i))}async finalize(){let i=await this.zip.generateAsync(this.options);this.stream.end(i),this.emit("finish")}read(i){return this.stream.read(i)}setEncoding(i){return this.stream.setEncoding(i)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(i,a){return this.stream.pipe(i,a)}unpipe(i){return this.stream.unpipe(i)}unshift(i){return this.stream.unshift(i)}wrap(i){return this.stream.wrap(i)}}d.exports={ZipWriter:n}}).call(this)}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(e,d,g){"use strict";d.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},28:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ja-jp":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":'yyyy"\uB144" mm"\uC6D4" dd"\uC77C"'},32:{"zh-tw":'hh"\u6642"mm"\u5206"',"zh-cn":'h"\u65F6"mm"\u5206"',"ja-jp":'h"\u6642"mm"\u5206"',"ko-kr":'h"\uC2DC" mm"\uBD84"'},33:{"zh-tw":'hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'h"\u6642"mm"\u5206"ss"\u79D2"',"ko-kr":'h"\uC2DC" mm"\uBD84" ss"\uCD08"'},34:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},51:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},52:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},55:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},58:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(e,d,g){"use strict";d.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(e,d,g){"use strict";let l=e("../../utils/parse-sax"),o=e("../../utils/xml-stream");class s{prepare(){}render(){}parseOpen(t){}parseText(t){}parseClose(t){}reconcile(t,n){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(t=>{t instanceof s?t.reset():t.xform&&t.xform.reset()})}mergeModel(t){this.model=Object.assign(this.model||{},t)}async parse(t){for await(let n of t)for(let{eventType:c,value:i}of n)if(c==="opentag")this.parseOpen(i);else if(c==="text")this.parseText(i);else if(c==="closetag"&&!this.parseClose(i.name))return this.model;return this.model}async parseStream(t){return this.parse(l(t))}get xml(){return this.toXml(this.model)}toXml(t){let n=new o;return this.render(n,t),n.xml}static toAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(c)return n}else if(c||t!==n)return t.toString()}static toStringAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(t,n,c)}static toStringValue(t,n){return t===void 0?n:t}static toBoolAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(c)return n}else if(c||t!==n)return t?"1":"0"}static toBoolValue(t,n){return t===void 0?n:t==="1"}static toIntAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(t,n,c)}static toIntValue(t,n){return t===void 0?n:parseInt(t,10)}static toFloatAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(t,n,c)}static toFloatValue(t,n){return t===void 0?n:parseFloat(t)}}d.exports=s},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("../../../utils/col-cache");function s(t){try{return o.decodeEx(t),!0}catch{return!1}}function r(t){let n=[],c=!1,i="";return t.split(",").forEach(a=>{if(!a)return;let h=(a.match(/'/g)||[]).length;if(!h)return void(c?i+=a+",":s(a)&&n.push(a));let f=h%2==0;!c&&f&&s(a)?n.push(a):c&&!f?(c=!1,s(i+a)&&n.push(i+a),i=""):(c=!0,i+=a+",")}),n}d.exports=class extends l{render(t,n){t.openNode("definedName",{name:n.name,localSheetId:n.localSheetId}),t.writeText(n.ranges.join(",")),t.closeNode()}parseOpen(t){return t.name==="definedName"?(this._parsedName=t.attributes.name,this._parsedLocalSheetId=t.attributes.localSheetId,this._parsedText=[],!0):!1}parseText(t){this._parsedText.push(t)}parseClose(){return this.model={name:this._parsedName,ranges:r(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(e,d,g){"use strict";let l=e("../../../utils/utils"),o=e("../base-xform");d.exports=class extends o{render(s,r){s.leafNode("sheet",{sheetId:r.id,name:r.name,state:r.state,"r:id":r.rId})}parseOpen(s){return s.name==="sheet"&&(this.model={name:l.xmlDecode(s.attributes.name),id:parseInt(s.attributes.sheetId,10),state:s.attributes.state,rId:s.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:s.fullCalcOnLoad?1:void 0})}parseOpen(o){return o.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.leafNode("workbookPr",{date1904:s.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(o){return o.name==="workbookPr"&&(this.model={date1904:o.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){let r={xWindow:s.x||0,yWindow:s.y||0,windowWidth:s.width||12e3,windowHeight:s.height||24e3,firstSheet:s.firstSheet,activeTab:s.activeTab};s.visibility&&s.visibility!=="visible"&&(r.visibility=s.visibility),o.leafNode("workbookView",r)}parseOpen(o){if(o.name==="workbookView"){let s=this.model={},r=function(n,c,i){let a=c!==void 0?s[n]=c:i;a!==void 0&&(s[n]=a)},t=function(n,c,i){let a=c!==void 0?s[n]=parseInt(c,10):i;a!==void 0&&(s[n]=a)};return t("x",o.attributes.xWindow,0),t("y",o.attributes.yWindow,0),t("width",o.attributes.windowWidth,25e3),t("height",o.attributes.windowHeight,1e4),r("visibility",o.attributes.visibility,"visible"),t("activeTab",o.attributes.activeTab,void 0),t("firstSheet",o.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),r=e("../base-xform"),t=e("../static-xform"),n=e("../list-xform"),c=e("./defined-name-xform"),i=e("./sheet-xform"),a=e("./workbook-view-xform"),h=e("./workbook-properties-xform"),f=e("./workbook-calc-properties-xform");class u extends r{constructor(){super(),this.map={fileVersion:u.STATIC_XFORMS.fileVersion,workbookPr:new h,bookViews:new n({tag:"bookViews",count:!1,childXform:new a}),sheets:new n({tag:"sheets",count:!1,childXform:new i}),definedNames:new n({tag:"definedNames",count:!1,childXform:new c}),calcPr:new f}}prepare(m){m.sheets=m.worksheets;let v=[],k=0;m.sheets.forEach(B=>{if(B.pageSetup&&B.pageSetup.printArea&&B.pageSetup.printArea.split("&&").forEach(R=>{let L=R.split(":"),A={name:"_xlnm.Print_Area",ranges:[`'${B.name}'!$${L[0]}:$${L[1]}`],localSheetId:k};v.push(A)}),B.pageSetup&&(B.pageSetup.printTitlesRow||B.pageSetup.printTitlesColumn)){let R=[];if(B.pageSetup.printTitlesColumn){let A=B.pageSetup.printTitlesColumn.split(":");R.push(`'${B.name}'!$${A[0]}:$${A[1]}`)}if(B.pageSetup.printTitlesRow){let A=B.pageSetup.printTitlesRow.split(":");R.push(`'${B.name}'!$${A[0]}:$${A[1]}`)}let L={name:"_xlnm.Print_Titles",ranges:R,localSheetId:k};v.push(L)}k++}),v.length&&(m.definedNames=m.definedNames.concat(v)),(m.media||[]).forEach((B,R)=>{B.name=B.type+(R+1)})}render(m,v){m.openXml(s.StdDocAttributes),m.openNode("workbook",u.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(m),this.map.workbookPr.render(m,v.properties),this.map.bookViews.render(m,v.views),this.map.sheets.render(m,v.sheets),this.map.definedNames.render(m,v.definedNames),this.map.calcPr.render(m,v.calcProperties),m.closeNode()}parseOpen(m){return this.parser?(this.parser.parseOpen(m),!0):(m.name==="workbook"||(this.parser=this.map[m.name],this.parser&&this.parser.parseOpen(m)),!0)}parseText(m){this.parser&&this.parser.parseText(m)}parseClose(m){return this.parser?(this.parser.parseClose(m)||(this.parser=void 0),!0):m==="workbook"?(this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1):!0}reconcile(m){let v=(m.workbookRels||[]).reduce((A,D)=>(A[D.Id]=D,A),{}),k=[],B,R=0;(m.sheets||[]).forEach(A=>{let D=v[A.rId];D&&(B=m.worksheetHash["xl/"+D.Target.replace(/^(\s|\/xl\/)+/,"")],B&&(B.name=A.name,B.id=A.id,B.state=A.state,k[R++]=B))});let L=[];l.each(m.definedNames,A=>{if(A.name==="_xlnm.Print_Area"){if(B=k[A.localSheetId],B){B.pageSetup||(B.pageSetup={});let D=o.decodeEx(A.ranges[0]);B.pageSetup.printArea=B.pageSetup.printArea?`${B.pageSetup.printArea}&&${D.dimensions}`:D.dimensions}}else if(A.name==="_xlnm.Print_Titles"){if(B=k[A.localSheetId],B){B.pageSetup||(B.pageSetup={});let D=A.ranges.join(","),N=/\$/g,q=/\$\d+:\$\d+/,j=D.match(q);if(j&&j.length){let P=j[0];B.pageSetup.printTitlesRow=P.replace(N,"")}let S=/\$[A-Z]+:\$[A-Z]+/,T=D.match(S);if(T&&T.length){let P=T[0];B.pageSetup.printTitlesColumn=P.replace(N,"")}}}else L.push(A)}),m.definedNames=L,m.media.forEach((A,D)=>{A.index=D})}}u.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},u.STATIC_XFORMS={fileVersion:new t({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},d.exports=u},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(e,d,g){"use strict";let l=e("../strings/rich-text-xform"),o=e("../../../utils/utils"),s=e("../base-xform"),r=d.exports=function(t){this.model=t};o.inherits(r,s,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new l),this._richTextXform},render(t,n){n=n||this.model,t.openNode("comment",{ref:n.ref,authorId:0}),t.openNode("text"),n&&n.note&&n.note.texts&&n.note.texts.forEach(c=>{this.richTextXform.render(t,c)}),t.closeNode(),t.closeNode()},parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;switch(t.name){case"comment":return this.model={type:"note",note:{texts:[]},...t.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(t),!0;default:return!1}},parseText(t){this.parser&&this.parser.parseText(t)},parseClose(t){switch(t){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(t),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(e,d,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../../../utils/utils"),s=e("../base-xform"),r=e("./comment-xform"),t=d.exports=function(){this.map={comment:new r}};o.inherits(t,s,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(n,c){c=c||this.model,n.openXml(l.StdDocAttributes),n.openNode("comments",t.COMMENTS_ATTRIBUTES),n.openNode("authors"),n.leafNode("author",null,"Author"),n.closeNode(),n.openNode("commentList"),c.comments.forEach(i=>{this.map.comment.render(n,i)}),n.closeNode(),n.closeNode()},parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(n),!0;default:return!1}},parseText(n){this.parser&&this.parser.parseText(n)},parseClose(n){switch(n){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(n),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,d,g){"use strict";let l=e("../../base-xform");d.exports=class extends l{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,s,r){(s===r[2]||this.tag==="x:SizeWithCells"&&s===r[1])&&o.leafNode(this.tag)}parseOpen(o){return o.name===this.tag?(this.model={},this.model[this.tag]=!0,!0):!1}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(e,d,g){"use strict";let l=e("../../base-xform");d.exports=class extends l{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,s){o.leafNode(this.tag,null,s)}parseOpen(o){return o.name===this.tag?(this.text="",!0):!1}parseText(o){this.text=o}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"x:Anchor"}getAnchorRect(o){let s=Math.floor(o.left),r=Math.floor(68*(o.left-s)),t=Math.floor(o.top),n=Math.floor(18*(o.top-t)),c=Math.floor(o.right),i=Math.floor(68*(o.right-c)),a=Math.floor(o.bottom);return[s,r,t,n,c,i,a,Math.floor(18*(o.bottom-a))]}getDefaultRect(o){let s=o.col,r=Math.max(o.row-2,0);return[s,6,r,14,s+2,2,r+4,16]}render(o,s){let r=s.anchor?this.getAnchorRect(s.anchor):this.getDefaultRect(s.refAddress);o.leafNode("x:Anchor",null,r.join(", "))}parseOpen(o){return o.name===this.tag?(this.text="",!0):!1}parseText(o){this.text=o}parseClose(){return!1}}},{"../base-xform":32}],44:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("./vml-anchor-xform"),s=e("./style/vml-protection-xform"),r=e("./style/vml-position-xform"),t=["twoCells","oneCells","absolute"];d.exports=class extends l{constructor(){super(),this.map={"x:Anchor":new o,"x:Locked":new s({tag:"x:Locked"}),"x:LockText":new s({tag:"x:LockText"}),"x:SizeWithCells":new r({tag:"x:SizeWithCells"}),"x:MoveWithCells":new r({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(n,c){let{protection:i,editAs:a}=c.note;n.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(n,a,t),this.map["x:SizeWithCells"].render(n,a,t),this.map["x:Anchor"].render(n,c),this.map["x:Locked"].render(n,i.locked),n.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(n,i.lockText),n.leafNode("x:Row",null,c.refAddress.row-1),n.leafNode("x:Column",null,c.refAddress.col-1),n.closeNode()}parseOpen(n){return n.name===this.tag?(this.reset(),this.model={anchor:[],protection:{},editAs:""}):(this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)),!0}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):n===this.tag?(this.normalizeModel(),!1):!0}normalizeModel(){let n=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),c=Object.keys(n).length;this.model.editAs=t[c],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(e,d,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("./vml-shape-xform");class r extends o{constructor(){super(),this.map={"v:shape":new s}}get tag(){return"xml"}render(n,c){n.openXml(l.StdDocAttributes),n.openNode(this.tag,r.DRAWING_ATTRIBUTES),n.openNode("o:shapelayout",{"v:ext":"edit"}),n.leafNode("o:idmap",{"v:ext":"edit",data:1}),n.closeNode(),n.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),n.leafNode("v:stroke",{joinstyle:"miter"}),n.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),n.closeNode(),c.comments.forEach((i,a)=>{this.map["v:shape"].render(n,i,a)}),n.closeNode()}parseOpen(n){return this.parser?(this.parser.parseOpen(n),!0):(n.name===this.tag?(this.reset(),this.model={comments:[]}):(this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)),!0)}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0):n!==this.tag}reconcile(n,c){n.anchors.forEach(i=>{i.br?this.map["xdr:twoCellAnchor"].reconcile(i,c):this.map["xdr:oneCellAnchor"].reconcile(i,c)})}}r.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},d.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("./vml-textbox-xform"),s=e("./vml-client-data-xform");class r extends l{constructor(){super(),this.map={"v:textbox":new o,"x:ClientData":new s}}get tag(){return"v:shape"}render(n,c,i){n.openNode("v:shape",r.V_SHAPE_ATTRIBUTES(c,i)),n.leafNode("v:fill",{color2:"infoBackground [80]"}),n.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),n.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(n,c),this.map["x:ClientData"].render(n,c),n.closeNode()}parseOpen(n){return this.parser?(this.parser.parseOpen(n),!0):(n.name===this.tag?(this.reset(),this.model={margins:{insetmode:n.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}}):(this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)),!0)}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):n===this.tag?(this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1):!0}}r.V_SHAPE_ATTRIBUTES=(t,n)=>({id:"_x0000_s"+(1025+n),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":t.note.margins&&t.note.margins.insetmode}),d.exports=r},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"v:textbox"}conversionUnit(o,s,r){return`${parseFloat(o)*s.toFixed(2)}${r}`}reverseConversionUnit(o){return(o||"").split(",").map(s=>Number(parseFloat(this.conversionUnit(parseFloat(s),.1,"")).toFixed(2)))}render(o,s){let r={style:"mso-direction-alt:auto"};if(s&&s.note){let{inset:t}=s.note&&s.note.margins;Array.isArray(t)&&(t=t.map(n=>this.conversionUnit(n,10,"mm")).join(",")),t&&(r.inset=t)}o.openNode("v:textbox",r),o.leafNode("div",{style:"text-align:left"}),o.closeNode()}parseOpen(o){return o.name===this.tag&&(this.model={inset:this.reverseConversionUnit(o.attributes.inset)}),!0}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],48:[function(e,d,g){"use strict";let l=e("./base-xform");d.exports=class extends l{createNewModel(o){return{}}parseOpen(o){return this.parser=this.parser||this.map[o.name],this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag&&(this.model=this.createNewModel(o),!0)}parseText(o){this.parser&&this.parser.parseText(o)}onParserClose(o,s){this.model[o]=s.model}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.onParserClose(o,this.parser),this.parser=void 0),!0):o!==this.tag}}},{"./base-xform":32}],49:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.openNode("HeadingPairs"),o.openNode("vt:vector",{size:2,baseType:"variant"}),o.openNode("vt:variant"),o.leafNode("vt:lpstr",void 0,"Worksheets"),o.closeNode(),o.openNode("vt:variant"),o.leafNode("vt:i4",void 0,s.length),o.closeNode(),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="HeadingPairs"}parseText(){}parseClose(o){return o!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.openNode("TitlesOfParts"),o.openNode("vt:vector",{size:s.length,baseType:"lpstr"}),s.forEach(r=>{o.leafNode("vt:lpstr",void 0,r.name)}),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="TitlesOfParts"}parseText(){}parseClose(o){return o!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(e,d,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("../simple/string-xform"),r=e("./app-heading-pairs-xform"),t=e("./app-titles-of-parts-xform");class n extends o{constructor(){super(),this.map={Company:new s({tag:"Company"}),Manager:new s({tag:"Manager"}),HeadingPairs:new r,TitleOfParts:new t}}render(i,a){i.openXml(l.StdDocAttributes),i.openNode("Properties",n.PROPERTY_ATTRIBUTES),i.leafNode("Application",void 0,"Microsoft Excel"),i.leafNode("DocSecurity",void 0,"0"),i.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(i,a.worksheets),this.map.TitleOfParts.render(i,a.worksheets),this.map.Company.render(i,a.company||""),this.map.Manager.render(i,a.manager),i.leafNode("LinksUpToDate",void 0,"false"),i.leafNode("SharedDoc",void 0,"false"),i.leafNode("HyperlinksChanged",void 0,"false"),i.leafNode("AppVersion",void 0,"16.0300"),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name==="Properties"?!0:(this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.parser=void 0),!0):i==="Properties"?(this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1):!0}}n.DateFormat=function(c){return c.toISOString().replace(/[.]\d{3,6}/,"")},n.DateAttrs={"xsi:type":"dcterms:W3CDTF"},n.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},d.exports=n},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(e,d,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform");class s extends o{render(t,n){t.openXml(l.StdDocAttributes),t.openNode("Types",s.PROPERTY_ATTRIBUTES);let c={};(n.media||[]).forEach(i=>{if(i.type==="image"){let a=i.extension;c[a]||(c[a]=!0,t.leafNode("Default",{Extension:a,ContentType:"image/"+a}))}}),t.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),t.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),t.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),n.worksheets.forEach(i=>{let a=`/xl/worksheets/sheet${i.id}.xml`;t.leafNode("Override",{PartName:a,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),t.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),t.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),n.sharedStrings&&n.sharedStrings.count&&t.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),n.tables&&n.tables.forEach(i=>{t.leafNode("Override",{PartName:"/xl/tables/"+i.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),n.drawings&&n.drawings.forEach(i=>{t.leafNode("Override",{PartName:`/xl/drawings/${i.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),n.commentRefs&&(t.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),n.commentRefs.forEach(i=>{let{commentName:a}=i;t.leafNode("Override",{PartName:`/xl/${a}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),t.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),t.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),t.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}s.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},d.exports=s},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,d,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("../simple/date-xform"),r=e("../simple/string-xform"),t=e("../simple/integer-xform");class n extends o{constructor(){super(),this.map={"dc:creator":new r({tag:"dc:creator"}),"dc:title":new r({tag:"dc:title"}),"dc:subject":new r({tag:"dc:subject"}),"dc:description":new r({tag:"dc:description"}),"dc:identifier":new r({tag:"dc:identifier"}),"dc:language":new r({tag:"dc:language"}),"cp:keywords":new r({tag:"cp:keywords"}),"cp:category":new r({tag:"cp:category"}),"cp:lastModifiedBy":new r({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new s({tag:"cp:lastPrinted",format:n.DateFormat}),"cp:revision":new t({tag:"cp:revision"}),"cp:version":new r({tag:"cp:version"}),"cp:contentStatus":new r({tag:"cp:contentStatus"}),"cp:contentType":new r({tag:"cp:contentType"}),"dcterms:created":new s({tag:"dcterms:created",attrs:n.DateAttrs,format:n.DateFormat}),"dcterms:modified":new s({tag:"dcterms:modified",attrs:n.DateAttrs,format:n.DateFormat})}}render(i,a){i.openXml(l.StdDocAttributes),i.openNode("cp:coreProperties",n.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(i,a.creator),this.map["dc:title"].render(i,a.title),this.map["dc:subject"].render(i,a.subject),this.map["dc:description"].render(i,a.description),this.map["dc:identifier"].render(i,a.identifier),this.map["dc:language"].render(i,a.language),this.map["cp:keywords"].render(i,a.keywords),this.map["cp:category"].render(i,a.category),this.map["cp:lastModifiedBy"].render(i,a.lastModifiedBy),this.map["cp:lastPrinted"].render(i,a.lastPrinted),this.map["cp:revision"].render(i,a.revision),this.map["cp:version"].render(i,a.version),this.map["cp:contentStatus"].render(i,a.contentStatus),this.map["cp:contentType"].render(i,a.contentType),this.map["dcterms:created"].render(i,a.created),this.map["dcterms:modified"].render(i,a.modified),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[i.name],this.parser)return this.parser.parseOpen(i),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(i))}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+i)}}}n.DateFormat=function(c){return c.toISOString().replace(/[.]\d{3}/,"")},n.DateAttrs={"xsi:type":"dcterms:W3CDTF"},n.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},d.exports=n},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.leafNode("Relationship",s)}parseOpen(o){return o.name==="Relationship"?(this.model=o.attributes,!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(e,d,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("./relationship-xform");class r extends o{constructor(){super(),this.map={Relationship:new s}}render(n,c){c=c||this._values,n.openXml(l.StdDocAttributes),n.openNode("Relationships",r.RELATIONSHIPS_ATTRIBUTES),c.forEach(i=>{this.map.Relationship.render(n,i)}),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[n.name],this.parser)return this.parser.parseOpen(n),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(n))}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.model.push(this.parser.model),this.parser=void 0),!0;if(n==="Relationships")return!1;throw new Error("Unexpected xml node in parseClose: "+n)}}r.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},d.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{parseOpen(o){return this.parser?(this.parser.parseOpen(o),!0):(o.name===this.tag?(this.reset(),this.model={range:{editAs:o.attributes.editAs||"oneCell"}}):(this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)),!0)}parseText(o){this.parser&&this.parser.parseText(o)}reconcilePicture(o,s){if(o&&o.rId){let r=s.rels[o.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(r){let t=r[1],n=s.mediaIndex[t];return s.media[n]}}}}},{"../base-xform":32}],57:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("./blip-xform");d.exports=class extends l{constructor(){super(),this.map={"a:blip":new o}}get tag(){return"xdr:blipFill"}render(s,r){s.openNode(this.tag),this.map["a:blip"].render(s,r),s.openNode("a:stretch"),s.leafNode("a:fillRect"),s.closeNode(),s.closeNode()}parseOpen(s){return this.parser?(this.parser.parseOpen(s),!0):(s.name===this.tag?this.reset():(this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)),!0)}parseText(){}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.parser=void 0),!0):s===this.tag?(this.model=this.map["a:blip"].model,!1):!0}}},{"../base-xform":32,"./blip-xform":58}],58:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"a:blip"}render(o,s){o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":s.rId,cstate:"print"})}parseOpen(o){return o.name===this.tag&&(this.model={rId:o.attributes["r:embed"]}),!0}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],59:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"xdr:cNvPicPr"}render(o){o.openNode(this.tag),o.leafNode("a:picLocks",{noChangeAspect:"1"}),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],60:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("./hlink-click-xform"),s=e("./ext-lst-xform");d.exports=class extends l{constructor(){super(),this.map={"a:hlinkClick":new o,"a:extLst":new s}}get tag(){return"xdr:cNvPr"}render(r,t){r.openNode(this.tag,{id:t.index,name:"Picture "+t.index}),this.map["a:hlinkClick"].render(r,t),this.map["a:extLst"].render(r,t),r.closeNode()}parseOpen(r){return this.parser?(this.parser.parseOpen(r),!0):(r.name===this.tag?this.reset():(this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)),!0)}parseText(){}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.parser=void 0),!0):r===this.tag?(this.model=this.map["a:hlinkClick"].model,!1):!0}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("../simple/integer-xform");d.exports=class extends l{constructor(s){super(),this.tag=s.tag,this.map={"xdr:col":new o({tag:"xdr:col",zero:!0}),"xdr:colOff":new o({tag:"xdr:colOff",zero:!0}),"xdr:row":new o({tag:"xdr:row",zero:!0}),"xdr:rowOff":new o({tag:"xdr:rowOff",zero:!0})}}render(s,r){s.openNode(this.tag),this.map["xdr:col"].render(s,r.nativeCol),this.map["xdr:colOff"].render(s,r.nativeColOff),this.map["xdr:row"].render(s,r.nativeRow),this.map["xdr:rowOff"].render(s,r.nativeRowOff),s.closeNode()}parseOpen(s){return this.parser?(this.parser.parseOpen(s),!0):(s.name===this.tag?this.reset():(this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)),!0)}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.parser=void 0),!0):s===this.tag?(this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1):!0}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(e,d,g){"use strict";let l=e("../../../utils/col-cache"),o=e("../../../utils/xml-stream"),s=e("../base-xform"),r=e("./two-cell-anchor-xform"),t=e("./one-cell-anchor-xform");class n extends s{constructor(){super(),this.map={"xdr:twoCellAnchor":new r,"xdr:oneCellAnchor":new t}}prepare(i){i.anchors.forEach((a,h)=>{a.anchorType=(function(f){return(typeof f.range=="string"?l.decode(f.range):f.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"})(a),this.map[a.anchorType].prepare(a,{index:h})})}get tag(){return"xdr:wsDr"}render(i,a){i.openXml(o.StdDocAttributes),i.openNode(this.tag,n.DRAWING_ATTRIBUTES),a.anchors.forEach(h=>{this.map[h.anchorType].render(i,h)}),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):(i.name===this.tag?(this.reset(),this.model={anchors:[]}):(this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)),!0)}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0):i!==this.tag}reconcile(i,a){i.anchors.forEach(h=>{h.br?this.map["xdr:twoCellAnchor"].reconcile(h,a):this.map["xdr:oneCellAnchor"].reconcile(h,a)})}}n.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},d.exports=n},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"a:extLst"}render(o){o.openNode(this.tag),o.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),o.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),o.closeNode(),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],64:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.map={}}render(o,s){o.openNode(this.tag);let r=Math.floor(9525*s.width),t=Math.floor(9525*s.height);o.addAttribute("cx",r),o.addAttribute("cy",t),o.closeNode()}parseOpen(o){return o.name===this.tag&&(this.model={width:parseInt(o.attributes.cx||"0",10)/9525,height:parseInt(o.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"a:hlinkClick"}render(o,s){s.hyperlinks&&s.hyperlinks.rId&&o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":s.hyperlinks.rId,tooltip:s.hyperlinks.tooltip})}parseOpen(o){return o.name===this.tag&&(this.model={hyperlinks:{rId:o.attributes["r:id"],tooltip:o.attributes.tooltip}}),!0}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("./c-nv-pr-xform"),s=e("./c-nv-pic-pr-xform");d.exports=class extends l{constructor(){super(),this.map={"xdr:cNvPr":new o,"xdr:cNvPicPr":new s}}get tag(){return"xdr:nvPicPr"}render(r,t){r.openNode(this.tag),this.map["xdr:cNvPr"].render(r,t),this.map["xdr:cNvPicPr"].render(r,t),r.closeNode()}parseOpen(r){return this.parser?(this.parser.parseOpen(r),!0):(r.name===this.tag?this.reset():(this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)),!0)}parseText(){}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.parser=void 0),!0):r===this.tag?(this.model=this.map["xdr:cNvPr"].model,!1):!0}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(e,d,g){"use strict";let l=e("./base-cell-anchor-xform"),o=e("../static-xform"),s=e("./cell-position-xform"),r=e("./ext-xform"),t=e("./pic-xform");d.exports=class extends l{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:ext":new r({tag:"xdr:ext"}),"xdr:pic":new t,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(n,c){this.map["xdr:pic"].prepare(n.picture,c)}render(n,c){n.openNode(this.tag,{editAs:c.range.editAs||"oneCell"}),this.map["xdr:from"].render(n,c.range.tl),this.map["xdr:ext"].render(n,c.range.ext),this.map["xdr:pic"].render(n,c.picture),this.map["xdr:clientData"].render(n,{}),n.closeNode()}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):n===this.tag?(this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1):!0}reconcile(n,c){n.medium=this.reconcilePicture(n.picture,c)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("../static-xform"),s=e("./blip-fill-xform"),r=e("./nv-pic-pr-xform"),t=e("./sp-pr");d.exports=class extends l{constructor(){super(),this.map={"xdr:nvPicPr":new r,"xdr:blipFill":new s,"xdr:spPr":new o(t)}}get tag(){return"xdr:pic"}prepare(n,c){n.index=c.index+1}render(n,c){n.openNode(this.tag),this.map["xdr:nvPicPr"].render(n,c),this.map["xdr:blipFill"].render(n,c),this.map["xdr:spPr"].render(n,c),n.closeNode()}parseOpen(n){return this.parser?(this.parser.parseOpen(n),!0):(n.name===this.tag?this.reset():(this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)),!0)}parseText(){}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.mergeModel(this.parser.model),this.parser=void 0),!0):n!==this.tag}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(e,d,g){"use strict";d.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(e,d,g){"use strict";let l=e("./base-cell-anchor-xform"),o=e("../static-xform"),s=e("./cell-position-xform"),r=e("./pic-xform");d.exports=class extends l{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:to":new s({tag:"xdr:to"}),"xdr:pic":new r,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(t,n){this.map["xdr:pic"].prepare(t.picture,n)}render(t,n){t.openNode(this.tag,{editAs:n.range.editAs||"oneCell"}),this.map["xdr:from"].render(t,n.range.tl),this.map["xdr:to"].render(t,n.range.br),this.map["xdr:pic"].render(t,n.picture),this.map["xdr:clientData"].render(t,{}),t.closeNode()}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):t===this.tag?(this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1):!0}reconcile(t,n){t.medium=this.reconcilePicture(t.picture,n)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,d,g){"use strict";let l=e("./base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.always=!!o.always,this.count=o.count,this.empty=o.empty,this.$count=o.$count||"count",this.$=o.$,this.childXform=o.childXform,this.maxItems=o.maxItems}prepare(o,s){let{childXform:r}=this;o&&o.forEach((t,n)=>{s.index=n,r.prepare(t,s)})}render(o,s){if(this.always||s&&s.length){o.openNode(this.tag,this.$),this.count&&o.addAttribute(this.$count,s&&s.length||0);let{childXform:r}=this;(s||[]).forEach((t,n)=>{r.render(o,t,n)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}parseOpen(o){return this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag?(this.model=[],!0):!!this.childXform.parseOpen(o)&&(this.parser=this.childXform,!0)}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser){if(!this.parser.parseClose(o)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(o,s){if(o){let{childXform:r}=this;o.forEach(t=>{r.reconcile(t,s)})}}}},{"./base-xform":32}],72:[function(e,d,g){"use strict";let l=e("../../../utils/col-cache"),o=e("../base-xform");d.exports=class extends o{get tag(){return"autoFilter"}render(s,r){if(r)if(typeof r=="string")s.leafNode("autoFilter",{ref:r});else{let t=function(i){return typeof i=="string"?i:l.getAddress(i.row,i.column).address},n=t(r.from),c=t(r.to);n&&c&&s.leafNode("autoFilter",{ref:`${n}:${c}`})}}parseOpen(s){s.name==="autoFilter"&&(this.model=s.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,d,g){"use strict";let l=e("../../../utils/utils"),o=e("../base-xform"),s=e("../../../doc/range"),r=e("../../../doc/enums"),t=e("../strings/rich-text-xform");function n(c){if(c==null)return r.ValueType.Null;if(c instanceof String||typeof c=="string")return r.ValueType.String;if(typeof c=="number")return r.ValueType.Number;if(typeof c=="boolean")return r.ValueType.Boolean;if(c instanceof Date)return r.ValueType.Date;if(c.text&&c.hyperlink)return r.ValueType.Hyperlink;if(c.formula)return r.ValueType.Formula;if(c.error)return r.ValueType.Error;throw new Error("I could not understand type of value")}d.exports=class extends o{constructor(){super(),this.richTextXForm=new t}get tag(){return"c"}prepare(c,i){let a=i.styles.addStyleModel(c.style||{},(function(h){return h.type===r.ValueType.Formula?n(h.result):h.type})(c));switch(a&&(c.styleId=a),c.comment&&i.comments.push({...c.comment,ref:c.address}),c.type){case r.ValueType.String:case r.ValueType.RichText:i.sharedStrings&&(c.ssId=i.sharedStrings.add(c.value));break;case r.ValueType.Date:i.date1904&&(c.date1904=!0);break;case r.ValueType.Hyperlink:i.sharedStrings&&c.text!==void 0&&c.text!==null&&(c.ssId=i.sharedStrings.add(c.text)),i.hyperlinks.push({address:c.address,target:c.hyperlink,tooltip:c.tooltip});break;case r.ValueType.Merge:i.merges.add(c);break;case r.ValueType.Formula:if(i.date1904&&(c.date1904=!0),c.shareType==="shared"&&(c.si=i.siFormulae++),c.formula)i.formulae[c.address]=c;else if(c.sharedFormula){let h=i.formulae[c.sharedFormula];if(!h)throw new Error("Shared Formula master must exist above and or left of clone for cell "+c.address);h.si===void 0?(h.shareType="shared",h.si=i.siFormulae++,h.range=new s(h.address,c.address)):h.range&&h.range.expandToAddress(c.address),c.si=h.si}}}renderFormula(c,i){let a=null;switch(i.shareType){case"shared":a={t:"shared",ref:i.ref||i.range.range,si:i.si};break;case"array":a={t:"array",ref:i.ref};break;default:i.si!==void 0&&(a={t:"shared",si:i.si})}switch(n(i.result)){case r.ValueType.Null:c.leafNode("f",a,i.formula);break;case r.ValueType.String:c.addAttribute("t","str"),c.leafNode("f",a,i.formula),c.leafNode("v",null,i.result);break;case r.ValueType.Number:c.leafNode("f",a,i.formula),c.leafNode("v",null,i.result);break;case r.ValueType.Boolean:c.addAttribute("t","b"),c.leafNode("f",a,i.formula),c.leafNode("v",null,i.result?1:0);break;case r.ValueType.Error:c.addAttribute("t","e"),c.leafNode("f",a,i.formula),c.leafNode("v",null,i.result.error);break;case r.ValueType.Date:c.leafNode("f",a,i.formula),c.leafNode("v",null,l.dateToExcel(i.result,i.date1904));break;default:throw new Error("I could not understand type of value")}}render(c,i){if(i.type!==r.ValueType.Null||i.styleId){switch(c.openNode("c"),c.addAttribute("r",i.address),i.styleId&&c.addAttribute("s",i.styleId),i.type){case r.ValueType.Null:break;case r.ValueType.Number:c.leafNode("v",null,i.value);break;case r.ValueType.Boolean:c.addAttribute("t","b"),c.leafNode("v",null,i.value?"1":"0");break;case r.ValueType.Error:c.addAttribute("t","e"),c.leafNode("v",null,i.value.error);break;case r.ValueType.String:case r.ValueType.RichText:i.ssId!==void 0?(c.addAttribute("t","s"),c.leafNode("v",null,i.ssId)):i.value&&i.value.richText?(c.addAttribute("t","inlineStr"),c.openNode("is"),i.value.richText.forEach(a=>{this.richTextXForm.render(c,a)}),c.closeNode("is")):(c.addAttribute("t","str"),c.leafNode("v",null,i.value));break;case r.ValueType.Date:c.leafNode("v",null,l.dateToExcel(i.value,i.date1904));break;case r.ValueType.Hyperlink:i.ssId!==void 0?(c.addAttribute("t","s"),c.leafNode("v",null,i.ssId)):(c.addAttribute("t","str"),c.leafNode("v",null,i.text));break;case r.ValueType.Formula:this.renderFormula(c,i);break;case r.ValueType.Merge:}c.closeNode()}}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"c":return this.model={address:c.attributes.r},this.t=c.attributes.t,c.attributes.s&&(this.model.styleId=parseInt(c.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=c.attributes.si,this.model.shareType=c.attributes.t,this.model.ref=c.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(c),!0;default:return!1}}parseText(c){if(this.parser)this.parser.parseText(c);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+c:c;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+c:c:this.model.value=this.model.value?this.model.value+c:c}}parseClose(c){switch(c){case"c":{let{model:i}=this;if(i.formula||i.shareType)i.type=r.ValueType.Formula,i.value&&(this.t==="str"?i.result=l.xmlDecode(i.value):this.t==="b"?i.result=parseInt(i.value,10)!==0:this.t==="e"?i.result={error:i.value}:i.result=parseFloat(i.value),i.value=void 0);else if(i.value!==void 0)switch(this.t){case"s":i.type=r.ValueType.String,i.value=parseInt(i.value,10);break;case"str":i.type=r.ValueType.String,i.value=l.xmlDecode(i.value);break;case"inlineStr":i.type=r.ValueType.String;break;case"b":i.type=r.ValueType.Boolean,i.value=parseInt(i.value,10)!==0;break;case"e":i.type=r.ValueType.Error,i.value={error:i.value};break;default:i.type=r.ValueType.Number,i.value=parseFloat(i.value)}else i.styleId?i.type=r.ValueType.Null:i.type=r.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(c),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(c),!0)}}reconcile(c,i){let a=c.styleId&&i.styles&&i.styles.getStyleModel(c.styleId);switch(a&&(c.style=a),c.styleId!==void 0&&(c.styleId=void 0),c.type){case r.ValueType.String:typeof c.value=="number"&&i.sharedStrings&&(c.value=i.sharedStrings.getString(c.value)),c.value.richText&&(c.type=r.ValueType.RichText);break;case r.ValueType.Number:a&&l.isDateFmt(a.numFmt)&&(c.type=r.ValueType.Date,c.value=l.excelToDate(c.value,i.date1904));break;case r.ValueType.Formula:c.result!==void 0&&a&&l.isDateFmt(a.numFmt)&&(c.result=l.excelToDate(c.result,i.date1904)),c.shareType==="shared"&&(c.ref?i.formulae[c.si]=c.address:(c.sharedFormula=i.formulae[c.si],delete c.shareType),delete c.si)}let h=i.hyperlinkMap[c.address];h&&(c.type===r.ValueType.Formula?(c.text=c.result,c.result=void 0):(c.text=c.value,c.value=void 0),c.type=r.ValueType.Hyperlink,c.hyperlink=h);let f=i.commentsMap&&i.commentsMap[c.address];f&&(c.comment=f)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,d,g){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"x14:cfIcon"}render(o,s){o.leafNode(this.tag,{iconSet:s.iconSet,iconId:s.iconId})}parseOpen(o){let{attributes:s}=o;this.model={iconSet:s.iconSet,iconId:l.toIntValue(s.iconId)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],75:[function(e,d,g){"use strict";let{v4:l}=e("uuid"),o=e("../../base-xform"),s=e("../../composite-xform"),r=e("./databar-ext-xform"),t=e("./icon-set-ext-xform"),n={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class c extends s{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new r,"x14:iconSet":this.iconSetXform=new t}}get tag(){return"x14:cfRule"}static isExt(a){return a.type==="dataBar"?r.isExt(a):!(a.type!=="iconSet"||!a.custom&&!n[a.iconSet])}prepare(a){c.isExt(a)&&(a.x14Id=`{${l()}}`.toUpperCase())}render(a,h){if(c.isExt(h))switch(h.type){case"dataBar":this.renderDataBar(a,h);break;case"iconSet":this.renderIconSet(a,h)}}renderDataBar(a,h){a.openNode(this.tag,{type:"dataBar",id:h.x14Id}),this.databarXform.render(a,h),a.closeNode()}renderIconSet(a,h){a.openNode(this.tag,{type:"iconSet",priority:h.priority,id:h.x14Id||`{${l()}}`}),this.iconSetXform.render(a,h),a.closeNode()}createNewModel(a){let{attributes:h}=a;return{type:h.type,x14Id:h.id,priority:o.toIntValue(h.priority)}}onParserClose(a,h){Object.assign(this.model,h.model)}}d.exports=c},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,d,g){"use strict";let l=e("../../composite-xform"),o=e("./f-ext-xform");d.exports=class extends l{constructor(){super(),this.map={"xm:f":this.fExtXform=new o}}get tag(){return"x14:cfvo"}render(s,r){s.openNode(this.tag,{type:r.type}),r.value!==void 0&&this.fExtXform.render(s,r.value),s.closeNode()}createNewModel(s){return{type:s.attributes.type}}onParserClose(s,r){s==="xm:f"&&(this.model.value=r.model?parseFloat(r.model):0)}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,d,g){"use strict";let l=e("../../composite-xform"),o=e("./sqref-ext-xform"),s=e("./cf-rule-ext-xform");d.exports=class extends l{constructor(){super(),this.map={"xm:sqref":this.sqRef=new o,"x14:cfRule":this.cfRule=new s}}get tag(){return"x14:conditionalFormatting"}prepare(r,t){r.rules.forEach(n=>{this.cfRule.prepare(n,t)})}render(r,t){t.rules.some(s.isExt)&&(r.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),t.rules.filter(s.isExt).forEach(n=>this.cfRule.render(r,n)),this.sqRef.render(r,t.ref),r.closeNode())}createNewModel(){return{rules:[]}}onParserClose(r,t){switch(r){case"xm:sqref":this.model.ref=t.model;break;case"x14:cfRule":this.model.rules.push(t.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,d,g){"use strict";let l=e("../../composite-xform"),o=e("./cf-rule-ext-xform"),s=e("./conditional-formatting-ext-xform");d.exports=class extends l{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new s}}get tag(){return"x14:conditionalFormattings"}hasContent(r){return r.hasExtContent===void 0&&(r.hasExtContent=r.some(t=>t.rules.some(o.isExt))),r.hasExtContent}prepare(r,t){r.forEach(n=>{this.cfXform.prepare(n,t)})}render(r,t){this.hasContent(t)&&(r.openNode(this.tag),t.forEach(n=>this.cfXform.render(r,n)),r.closeNode())}createNewModel(){return[]}onParserClose(r,t){this.model.push(t.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,d,g){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("../../style/color-xform"),r=e("./cfvo-ext-xform");d.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new r,"x14:borderColor":this.borderColorXform=new s("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new s("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new s("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new s("x14:axisColor")}}static isExt(t){return!t.gradient}get tag(){return"x14:dataBar"}render(t,n){t.openNode(this.tag,{minLength:l.toIntAttribute(n.minLength,0,!0),maxLength:l.toIntAttribute(n.maxLength,100,!0),border:l.toBoolAttribute(n.border,!1),gradient:l.toBoolAttribute(n.gradient,!0),negativeBarColorSameAsPositive:l.toBoolAttribute(n.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:l.toBoolAttribute(n.negativeBarBorderColorSameAsPositive,!0),axisPosition:l.toAttribute(n.axisPosition,"auto"),direction:l.toAttribute(n.direction,"leftToRight")}),n.cfvo.forEach(c=>{this.cfvoXform.render(t,c)}),this.borderColorXform.render(t,n.borderColor),this.negativeBorderColorXform.render(t,n.negativeBorderColor),this.negativeFillColorXform.render(t,n.negativeFillColor),this.axisColorXform.render(t,n.axisColor),t.closeNode()}createNewModel(t){let{attributes:n}=t;return{cfvo:[],minLength:l.toIntValue(n.minLength,0),maxLength:l.toIntValue(n.maxLength,100),border:l.toBoolValue(n.border,!1),gradient:l.toBoolValue(n.gradient,!0),negativeBarColorSameAsPositive:l.toBoolValue(n.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:l.toBoolValue(n.negativeBarBorderColorSameAsPositive,!0),axisPosition:l.toStringValue(n.axisPosition,"auto"),direction:l.toStringValue(n.direction,"leftToRight")}}onParserClose(t,n){let[,c]=t.split(":");c==="cfvo"?this.model.cfvo.push(n.model):this.model[c]=n.model}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,d,g){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"xm:f"}render(o,s){o.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],81:[function(e,d,g){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("./cfvo-ext-xform"),r=e("./cf-icon-ext-xform");d.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new s,"x14:cfIcon":this.cfIconXform=new r}}get tag(){return"x14:iconSet"}render(t,n){t.openNode(this.tag,{iconSet:l.toStringAttribute(n.iconSet),reverse:l.toBoolAttribute(n.reverse,!1),showValue:l.toBoolAttribute(n.showValue,!0),custom:l.toBoolAttribute(n.icons,!1)}),n.cfvo.forEach(c=>{this.cfvoXform.render(t,c)}),n.icons&&n.icons.forEach((c,i)=>{c.iconId=i,this.cfIconXform.render(t,c)}),t.closeNode()}createNewModel(t){let{attributes:n}=t;return{cfvo:[],iconSet:l.toStringValue(n.iconSet,"3TrafficLights"),reverse:l.toBoolValue(n.reverse,!1),showValue:l.toBoolValue(n.showValue,!0)}}onParserClose(t,n){let[,c]=t.split(":");switch(c){case"cfvo":this.model.cfvo.push(n.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(n.model);break;default:this.model[c]=n.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,d,g){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"xm:sqref"}render(o,s){o.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],83:[function(e,d,g){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("../../../../doc/range"),r=e("./databar-xform"),t=e("./ext-lst-ref-xform"),n=e("./formula-xform"),c=e("./color-scale-xform"),i=e("./icon-set-xform"),a={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},h=u=>{let{type:b,operator:m}=u;switch(b){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:b};default:return{type:b,operator:m}}};class f extends o{constructor(){super(),this.map={dataBar:this.databarXform=new r,extLst:this.extLstRefXform=new t,formula:this.formulaXform=new n,colorScale:this.colorScaleXform=new c,iconSet:this.iconSetXform=new i}}get tag(){return"cfRule"}static isPrimitive(b){return b.type!=="iconSet"||!b.custom&&!a[b.iconSet]}render(b,m){switch(m.type){case"expression":this.renderExpression(b,m);break;case"cellIs":this.renderCellIs(b,m);break;case"top10":this.renderTop10(b,m);break;case"aboveAverage":this.renderAboveAverage(b,m);break;case"dataBar":this.renderDataBar(b,m);break;case"colorScale":this.renderColorScale(b,m);break;case"iconSet":this.renderIconSet(b,m);break;case"containsText":this.renderText(b,m);break;case"timePeriod":this.renderTimePeriod(b,m)}}renderExpression(b,m){b.openNode(this.tag,{type:"expression",dxfId:m.dxfId,priority:m.priority}),this.formulaXform.render(b,m.formulae[0]),b.closeNode()}renderCellIs(b,m){b.openNode(this.tag,{type:"cellIs",dxfId:m.dxfId,priority:m.priority,operator:m.operator}),m.formulae.forEach(v=>{this.formulaXform.render(b,v)}),b.closeNode()}renderTop10(b,m){b.leafNode(this.tag,{type:"top10",dxfId:m.dxfId,priority:m.priority,percent:l.toBoolAttribute(m.percent,!1),bottom:l.toBoolAttribute(m.bottom,!1),rank:l.toIntValue(m.rank,10,!0)})}renderAboveAverage(b,m){b.leafNode(this.tag,{type:"aboveAverage",dxfId:m.dxfId,priority:m.priority,aboveAverage:l.toBoolAttribute(m.aboveAverage,!0)})}renderDataBar(b,m){b.openNode(this.tag,{type:"dataBar",priority:m.priority}),this.databarXform.render(b,m),this.extLstRefXform.render(b,m),b.closeNode()}renderColorScale(b,m){b.openNode(this.tag,{type:"colorScale",priority:m.priority}),this.colorScaleXform.render(b,m),b.closeNode()}renderIconSet(b,m){f.isPrimitive(m)&&(b.openNode(this.tag,{type:"iconSet",priority:m.priority}),this.iconSetXform.render(b,m),b.closeNode())}renderText(b,m){b.openNode(this.tag,{type:m.operator,dxfId:m.dxfId,priority:m.priority,operator:l.toStringAttribute(m.operator,"containsText")});let v=(k=>{if(k.formulae&&k.formulae[0])return k.formulae[0];let B=new s(k.ref),{tl:R}=B;switch(k.operator){case"containsText":return`NOT(ISERROR(SEARCH("${k.text}",${R})))`;case"containsBlanks":return`LEN(TRIM(${R}))=0`;case"notContainsBlanks":return`LEN(TRIM(${R}))>0`;case"containsErrors":return`ISERROR(${R})`;case"notContainsErrors":return`NOT(ISERROR(${R}))`;default:return}})(m);v&&this.formulaXform.render(b,v),b.closeNode()}renderTimePeriod(b,m){b.openNode(this.tag,{type:"timePeriod",dxfId:m.dxfId,priority:m.priority,timePeriod:m.timePeriod});let v=(k=>{if(k.formulae&&k.formulae[0])return k.formulae[0];let B=new s(k.ref),{tl:R}=B;switch(k.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${R},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${R},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${R},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${R},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${R},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${R},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${R},1)=TODAY()-1`;case"today":return`FLOOR(${R},1)=TODAY()`;case"tomorrow":return`FLOOR(${R},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${R},1)<=6,FLOOR(${R},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${R})=MONTH(EDATE(TODAY(),0-1)),YEAR(${R})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${R})=MONTH(TODAY()),YEAR(${R})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${R})=MONTH(EDATE(TODAY(),0+1)),YEAR(${R})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(m);v&&this.formulaXform.render(b,v),b.closeNode()}createNewModel(b){let{attributes:m}=b;return{...h(m),dxfId:l.toIntValue(m.dxfId),priority:l.toIntValue(m.priority),timePeriod:m.timePeriod,percent:l.toBoolValue(m.percent),bottom:l.toBoolValue(m.bottom),rank:l.toIntValue(m.rank),aboveAverage:l.toBoolValue(m.aboveAverage)}}onParserClose(b,m){switch(b){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,m.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(m.model)}}}d.exports=f},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(e,d,g){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"cfvo"}render(o,s){o.leafNode(this.tag,{type:s.type,val:s.value})}parseOpen(o){this.model={type:o.attributes.type,value:l.toFloatValue(o.attributes.val)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],85:[function(e,d,g){"use strict";let l=e("../../composite-xform"),o=e("../../style/color-xform"),s=e("./cfvo-xform");d.exports=class extends l{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new o}}get tag(){return"colorScale"}render(r,t){r.openNode(this.tag),t.cfvo.forEach(n=>{this.cfvoXform.render(r,n)}),t.color.forEach(n=>{this.colorXform.render(r,n)}),r.closeNode()}createNewModel(r){return{cfvo:[],color:[]}}onParserClose(r,t){this.model[r].push(t.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,d,g){"use strict";let l=e("../../composite-xform"),o=e("./cf-rule-xform");d.exports=class extends l{constructor(){super(),this.map={cfRule:new o}}get tag(){return"conditionalFormatting"}render(s,r){r.rules.some(o.isPrimitive)&&(s.openNode(this.tag,{sqref:r.ref}),r.rules.forEach(t=>{o.isPrimitive(t)&&(t.ref=r.ref,this.map.cfRule.render(s,t))}),s.closeNode())}createNewModel(s){let{attributes:r}=s;return{ref:r.sqref,rules:[]}}onParserClose(s,r){this.model.rules.push(r.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,d,g){"use strict";let l=e("../../base-xform"),o=e("./conditional-formatting-xform");d.exports=class extends l{constructor(){super(),this.cfXform=new o}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(s,r){let t=s.reduce((n,c)=>Math.max(n,...c.rules.map(i=>i.priority||0)),1);s.forEach(n=>{n.rules.forEach(c=>{c.priority||(c.priority=t++),c.style&&(c.dxfId=r.styles.addDxfStyle(c.style))})})}render(s,r){r.forEach(t=>{this.cfXform.render(s,t)})}parseOpen(s){return this.parser?(this.parser.parseOpen(s),!0):s.name==="conditionalFormatting"?(this.parser=this.cfXform,this.parser.parseOpen(s),!0):!1}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){return!!this.parser&&(!!this.parser.parseClose(s)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(s,r){s.forEach(t=>{t.rules.forEach(n=>{n.dxfId!==void 0&&(n.style=r.styles.getDxfStyle(n.dxfId),delete n.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,d,g){"use strict";let l=e("../../composite-xform"),o=e("../../style/color-xform"),s=e("./cfvo-xform");d.exports=class extends l{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new o}}get tag(){return"dataBar"}render(r,t){r.openNode(this.tag),t.cfvo.forEach(n=>{this.cfvoXform.render(r,n)}),this.colorXform.render(r,t.color),r.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(r,t){switch(r){case"cfvo":this.model.cfvo.push(t.model);break;case"color":this.model.color=t.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,d,g){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform");class s extends l{get tag(){return"x14:id"}render(n,c){n.leafNode(this.tag,null,c)}parseOpen(){this.model=""}parseText(n){this.model+=n}parseClose(n){return n!==this.tag}}class r extends o{constructor(){super(),this.map={"x14:id":this.idXform=new s}}get tag(){return"ext"}render(n,c){n.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(n,c.x14Id),n.closeNode()}createNewModel(){return{}}onParserClose(n,c){this.model.x14Id=c.model}}d.exports=class extends o{constructor(){super(),this.map={ext:new r}}get tag(){return"extLst"}render(t,n){t.openNode(this.tag),this.map.ext.render(t,n),t.closeNode()}createNewModel(){return{}}onParserClose(t,n){Object.assign(this.model,n.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,d,g){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"formula"}render(o,s){o.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],91:[function(e,d,g){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("./cfvo-xform");d.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new s}}get tag(){return"iconSet"}render(r,t){r.openNode(this.tag,{iconSet:l.toStringAttribute(t.iconSet,"3TrafficLights"),reverse:l.toBoolAttribute(t.reverse,!1),showValue:l.toBoolAttribute(t.showValue,!0)}),t.cfvo.forEach(n=>{this.cfvoXform.render(r,n)}),r.closeNode()}createNewModel(r){let{attributes:t}=r;return{iconSet:l.toStringValue(t.iconSet,"3TrafficLights"),reverse:l.toBoolValue(t.reverse),showValue:l.toBoolValue(t.showValue),cfvo:[]}}onParserClose(r,t){this.model[r].push(t.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,d,g){"use strict";let l=e("../../../utils/utils"),o=e("../base-xform");d.exports=class extends o{get tag(){return"col"}prepare(s,r){let t=r.styles.addStyleModel(s.style||{});t&&(s.styleId=t)}render(s,r){s.openNode("col"),s.addAttribute("min",r.min),s.addAttribute("max",r.max),r.width&&s.addAttribute("width",r.width),r.styleId&&s.addAttribute("style",r.styleId),r.hidden&&s.addAttribute("hidden","1"),r.bestFit&&s.addAttribute("bestFit","1"),r.outlineLevel&&s.addAttribute("outlineLevel",r.outlineLevel),r.collapsed&&s.addAttribute("collapsed","1"),s.addAttribute("customWidth","1"),s.closeNode()}parseOpen(s){if(s.name==="col"){let r=this.model={min:parseInt(s.attributes.min||"0",10),max:parseInt(s.attributes.max||"0",10),width:s.attributes.width===void 0?void 0:parseFloat(s.attributes.width||"0")};return s.attributes.style&&(r.styleId=parseInt(s.attributes.style,10)),l.parseBoolean(s.attributes.hidden)&&(r.hidden=!0),l.parseBoolean(s.attributes.bestFit)&&(r.bestFit=!0),s.attributes.outlineLevel&&(r.outlineLevel=parseInt(s.attributes.outlineLevel,10)),l.parseBoolean(s.attributes.collapsed)&&(r.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(s,r){s.styleId&&(s.style=r.styles.getStyleModel(s.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../../../utils/utils"),s=e("../../../utils/col-cache"),r=e("../base-xform"),t=e("../../../doc/range");function n(i,a,h,f){let u=a[h];u!==void 0?i[h]=u:f!==void 0&&(i[h]=f)}function c(i,a,h,f){let u=a[h];u!==void 0?i[h]=o.parseBoolean(u):f!==void 0&&(i[h]=f)}d.exports=class extends r{get tag(){return"dataValidations"}render(i,a){let h=(function(f){let u=l.map(f,(v,k)=>({address:k,dataValidation:v,marked:!1})).sort((v,k)=>l.strcmp(v.address,k.address)),b=l.keyBy(u,"address"),m=(v,k,B)=>{for(let R=0;R<k;R++){let L=s.encodeAddress(v.row+R,B);if(!f[L]||!l.isEqual(f[v.address],f[L]))return!1}return!0};return u.map(v=>{if(!v.marked){let k=s.decodeEx(v.address);if(k.dimensions)return b[k.dimensions].marked=!0,{...v.dataValidation,sqref:v.address};let B=1,R=s.encodeAddress(k.row+B,k.col);for(;f[R]&&l.isEqual(v.dataValidation,f[R]);)B++,R=s.encodeAddress(k.row+B,k.col);let L=1;for(;m(k,B,k.col+L);)L++;for(let A=0;A<B;A++)for(let D=0;D<L;D++)R=s.encodeAddress(k.row+A,k.col+D),b[R].marked=!0;if(B>1||L>1){let A=k.row+(B-1),D=k.col+(L-1);return{...v.dataValidation,sqref:`${v.address}:${s.encodeAddress(A,D)}`}}return{...v.dataValidation,sqref:v.address}}return null}).filter(Boolean)})(a);h.length&&(i.openNode("dataValidations",{count:h.length}),h.forEach(f=>{i.openNode("dataValidation"),f.type!=="any"&&(i.addAttribute("type",f.type),f.operator&&f.type!=="list"&&f.operator!=="between"&&i.addAttribute("operator",f.operator),f.allowBlank&&i.addAttribute("allowBlank","1")),f.showInputMessage&&i.addAttribute("showInputMessage","1"),f.promptTitle&&i.addAttribute("promptTitle",f.promptTitle),f.prompt&&i.addAttribute("prompt",f.prompt),f.showErrorMessage&&i.addAttribute("showErrorMessage","1"),f.errorStyle&&i.addAttribute("errorStyle",f.errorStyle),f.errorTitle&&i.addAttribute("errorTitle",f.errorTitle),f.error&&i.addAttribute("error",f.error),i.addAttribute("sqref",f.sqref),(f.formulae||[]).forEach((u,b)=>{i.openNode("formula"+(b+1)),f.type==="date"?i.writeText(o.dateToExcel(new Date(u))):i.writeText(u),i.closeNode()}),i.closeNode()}),i.closeNode())}parseOpen(i){switch(i.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=i.attributes.sqref;let a={type:i.attributes.type||"any",formulae:[]};switch(i.attributes.type&&c(a,i.attributes,"allowBlank"),c(a,i.attributes,"showInputMessage"),c(a,i.attributes,"showErrorMessage"),a.type){case"any":case"list":case"custom":break;default:n(a,i.attributes,"operator","between")}return n(a,i.attributes,"promptTitle"),n(a,i.attributes,"prompt"),n(a,i.attributes,"errorStyle"),n(a,i.attributes,"errorTitle"),n(a,i.attributes,"error"),this._dataValidation=a,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(i){this._formula&&this._formula.push(i)}parseClose(i){switch(i){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(a=>{a.includes(":")?new t(a).forEachAddress(h=>{this.model[h]=this._dataValidation}):this.model[a]=this._dataValidation}),!0;case"formula1":case"formula2":{let a=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":a=parseInt(a,10);break;case"decimal":a=parseFloat(a);break;case"date":a=o.excelToDate(parseFloat(a))}return this._dataValidation.formulae.push(a),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"dimension"}render(o,s){s&&o.leafNode("dimension",{ref:s})}parseOpen(o){return o.name==="dimension"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"drawing"}render(o,s){s&&o.leafNode(this.tag,{"r:id":s.rId})}parseOpen(o){return o.name===this.tag?(this.model={rId:o.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(e,d,g){"use strict";let l=e("../composite-xform"),o=e("./cf-ext/conditional-formattings-ext-xform");class s extends l{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new o}}get tag(){return"ext"}hasContent(t){return this.conditionalFormattings.hasContent(t.conditionalFormattings)}prepare(t,n){this.conditionalFormattings.prepare(t.conditionalFormattings,n)}render(t,n){t.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(t,n.conditionalFormattings),t.closeNode()}createNewModel(){return{}}onParserClose(t,n){this.model[t]=n.model}}d.exports=class extends l{constructor(){super(),this.map={ext:this.ext=new s}}get tag(){return"extLst"}prepare(r,t){this.ext.prepare(r,t)}hasContent(r){return this.ext.hasContent(r)}render(r,t){this.hasContent(t)&&(r.openNode("extLst"),this.ext.render(r,t),r.closeNode())}createNewModel(){return{}}onParserClose(r,t){Object.assign(this.model,t.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"headerFooter"}render(o,s){if(s){o.addRollback();let r=!1;o.openNode("headerFooter"),s.differentFirst&&(o.addAttribute("differentFirst","1"),r=!0),s.differentOddEven&&(o.addAttribute("differentOddEven","1"),r=!0),s.oddHeader&&typeof s.oddHeader=="string"&&(o.leafNode("oddHeader",null,s.oddHeader),r=!0),s.oddFooter&&typeof s.oddFooter=="string"&&(o.leafNode("oddFooter",null,s.oddFooter),r=!0),s.evenHeader&&typeof s.evenHeader=="string"&&(o.leafNode("evenHeader",null,s.evenHeader),r=!0),s.evenFooter&&typeof s.evenFooter=="string"&&(o.leafNode("evenFooter",null,s.evenFooter),r=!0),s.firstHeader&&typeof s.firstHeader=="string"&&(o.leafNode("firstHeader",null,s.firstHeader),r=!0),s.firstFooter&&typeof s.firstFooter=="string"&&(o.leafNode("firstFooter",null,s.firstFooter),r=!0),r?(o.closeNode(),o.commit()):o.rollback()}}parseOpen(o){switch(o.name){case"headerFooter":return this.model={},o.attributes.differentFirst&&(this.model.differentFirst=parseInt(o.attributes.differentFirst,0)===1),o.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(o.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(o){switch(this.currentNode){case"oddHeader":this.model.oddHeader=o;break;case"oddFooter":this.model.oddFooter=o;break;case"evenHeader":this.model.evenHeader=o;break;case"evenFooter":this.model.evenFooter=o;break;case"firstHeader":this.model.firstHeader=o;break;case"firstFooter":this.model.firstFooter=o}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"hyperlink"}render(o,s){this.isInternalLink(s)?o.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip,location:s.target}):o.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip})}parseOpen(o){return o.name==="hyperlink"&&(this.model={address:o.attributes.ref,rId:o.attributes["r:id"],tooltip:o.attributes.tooltip},o.attributes.location&&(this.model.target=o.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(o){return o.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(o.target)}}},{"../base-xform":32}],99:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"mergeCell"}render(o,s){o.leafNode("mergeCell",{ref:s})}parseOpen(o){return o.name==="mergeCell"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../../../doc/range"),s=e("../../../utils/col-cache"),r=e("../../../doc/enums");d.exports=class{constructor(){this.merges={}}add(t){if(this.merges[t.master])this.merges[t.master].expandToAddress(t.address);else{let n=`${t.master}:${t.address}`;this.merges[t.master]=new o(n)}}get mergeCells(){return l.map(this.merges,t=>t.range)}reconcile(t,n){l.each(t,c=>{let i=s.decode(c);for(let a=i.top;a<=i.bottom;a++){let h=n[a-1];for(let f=i.left;f<=i.right;f++){let u=h.cells[f-1];u?u.type===r.ValueType.Merge&&(u.master=i.tl):h.cells[f]={type:r.ValueType.Null,address:s.encodeAddress(a,f)}}}})}getMasterAddress(t){let n=this.hash[t];return n&&n.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,d,g){"use strict";let l=e("../base-xform"),o=s=>s!==void 0;d.exports=class extends l{get tag(){return"outlinePr"}render(s,r){return!(!r||!o(r.summaryBelow)&&!o(r.summaryRight))&&(s.leafNode(this.tag,{summaryBelow:o(r.summaryBelow)?Number(r.summaryBelow):void 0,summaryRight:o(r.summaryRight)?Number(r.summaryRight):void 0}),!0)}parseOpen(s){return s.name===this.tag&&(this.model={summaryBelow:o(s.attributes.summaryBelow)?!!Number(s.attributes.summaryBelow):void 0,summaryRight:o(s.attributes.summaryRight)?!!Number(s.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"brk"}render(o,s){o.leafNode("brk",s)}parseOpen(o){return o.name==="brk"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");d.exports=class extends o{get tag(){return"pageMargins"}render(s,r){if(r){let t={left:r.left,right:r.right,top:r.top,bottom:r.bottom,header:r.header,footer:r.footer};l.some(t,n=>n!==void 0)&&s.leafNode(this.tag,t)}}parseOpen(s){return s.name===this.tag?(this.model={left:parseFloat(s.attributes.left||.7),right:parseFloat(s.attributes.right||.7),top:parseFloat(s.attributes.top||.75),bottom:parseFloat(s.attributes.bottom||.75),header:parseFloat(s.attributes.header||.3),footer:parseFloat(s.attributes.footer||.3)},!0):!1}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"pageSetUpPr"}render(o,s){return!(!s||!s.fitToPage)&&(o.leafNode(this.tag,{fitToPage:s.fitToPage?"1":void 0}),!0)}parseOpen(o){return o.name===this.tag&&(this.model={fitToPage:o.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");function s(c){return c?"1":void 0}function r(c){if(c==="overThenDown")return c}function t(c){switch(c){case"atEnd":case"asDisplyed":return c;default:return}}function n(c){switch(c){case"dash":case"blank":case"NA":return c;default:return}}d.exports=class extends o{get tag(){return"pageSetup"}render(c,i){if(i){let a={paperSize:i.paperSize,orientation:i.orientation,horizontalDpi:i.horizontalDpi,verticalDpi:i.verticalDpi,pageOrder:r(i.pageOrder),blackAndWhite:s(i.blackAndWhite),draft:s(i.draft),cellComments:t(i.cellComments),errors:n(i.errors),scale:i.scale,fitToWidth:i.fitToWidth,fitToHeight:i.fitToHeight,firstPageNumber:i.firstPageNumber,useFirstPageNumber:s(i.firstPageNumber),usePrinterDefaults:s(i.usePrinterDefaults),copies:i.copies};l.some(a,h=>h!==void 0)&&c.leafNode(this.tag,a)}}parseOpen(c){if(c.name===this.tag)return this.model={paperSize:(i=c.attributes.paperSize,i!==void 0?parseInt(i,10):void 0),orientation:c.attributes.orientation||"portrait",horizontalDpi:parseInt(c.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(c.attributes.verticalDpi||"4294967295",10),pageOrder:c.attributes.pageOrder||"downThenOver",blackAndWhite:c.attributes.blackAndWhite==="1",draft:c.attributes.draft==="1",cellComments:c.attributes.cellComments||"None",errors:c.attributes.errors||"displayed",scale:parseInt(c.attributes.scale||"100",10),fitToWidth:parseInt(c.attributes.fitToWidth||"1",10),fitToHeight:parseInt(c.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(c.attributes.firstPageNumber||"1",10),useFirstPageNumber:c.attributes.useFirstPageNumber==="1",usePrinterDefaults:c.attributes.usePrinterDefaults==="1",copies:parseInt(c.attributes.copies||"1",10)},!0;return!1;var i}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"picture"}render(o,s){s&&o.leafNode(this.tag,{"r:id":s.rId})}parseOpen(o){return o.name===this.tag?(this.model={rId:o.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");function s(r){return r?"1":void 0}d.exports=class extends o{get tag(){return"printOptions"}render(r,t){if(t){let n={headings:s(t.showRowColHeaders),gridLines:s(t.showGridLines),horizontalCentered:s(t.horizontalCentered),verticalCentered:s(t.verticalCentered)};l.some(n,c=>c!==void 0)&&r.leafNode(this.tag,n)}}parseOpen(r){return r.name===this.tag?(this.model={showRowColHeaders:r.attributes.headings==="1",showGridLines:r.attributes.gridLines==="1",horizontalCentered:r.attributes.horizontalCentered==="1",verticalCentered:r.attributes.verticalCentered==="1"},!0):!1}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,d,g){"use strict";let l=e("./page-breaks-xform"),o=e("../list-xform");d.exports=class extends o{constructor(){super({tag:"rowBreaks",count:!0,childXform:new l})}render(s,r){if(r&&r.length){s.openNode(this.tag,this.$),this.count&&(s.addAttribute(this.$count,r.length),s.addAttribute("manualBreakCount",r.length));let{childXform:t}=this;r.forEach(n=>{t.render(s,n)}),s.closeNode()}else this.empty&&s.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("../../../utils/utils"),s=e("./cell-xform");d.exports=class extends l{constructor(r){super(),this.maxItems=r&&r.maxItems,this.map={c:new s}}get tag(){return"row"}prepare(r,t){let n=t.styles.addStyleModel(r.style);n&&(r.styleId=n);let c=this.map.c;r.cells.forEach(i=>{c.prepare(i,t)})}render(r,t,n){r.openNode("row"),r.addAttribute("r",t.number),t.height&&(r.addAttribute("ht",t.height),r.addAttribute("customHeight","1")),t.hidden&&r.addAttribute("hidden","1"),t.min>0&&t.max>0&&t.min<=t.max&&r.addAttribute("spans",`${t.min}:${t.max}`),t.styleId&&(r.addAttribute("s",t.styleId),r.addAttribute("customFormat","1")),r.addAttribute("x14ac:dyDescent","0.25"),t.outlineLevel&&r.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&r.addAttribute("collapsed","1");let c=this.map.c;t.cells.forEach(i=>{c.render(r,i,n)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;if(r.name==="row"){this.numRowsSeen+=1;let t=r.attributes.spans?r.attributes.spans.split(":").map(c=>parseInt(c,10)):[void 0,void 0],n=this.model={number:parseInt(r.attributes.r,10),min:t[0],max:t[1],cells:[]};return r.attributes.s&&(n.styleId=parseInt(r.attributes.s,10)),o.parseBoolean(r.attributes.hidden)&&(n.hidden=!0),o.parseBoolean(r.attributes.bestFit)&&(n.bestFit=!0),r.attributes.ht&&(n.height=parseFloat(r.attributes.ht)),r.attributes.outlineLevel&&(n.outlineLevel=parseInt(r.attributes.outlineLevel,10)),o.parseBoolean(r.attributes.collapsed)&&(n.collapsed=!0),!0}return this.parser=this.map[r.name],!!this.parser&&(this.parser.parseOpen(r),!0)}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(r,t){r.style=r.styleId?t.styles.getStyleModel(r.styleId):{},r.styleId!==void 0&&(r.styleId=void 0);let n=this.map.c;r.cells.forEach(c=>{n.reconcile(c,t)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");d.exports=class extends o{get tag(){return"sheetFormatPr"}render(s,r){if(r){let t={defaultRowHeight:r.defaultRowHeight,outlineLevelRow:r.outlineLevelRow,outlineLevelCol:r.outlineLevelCol,"x14ac:dyDescent":r.dyDescent};r.defaultColWidth&&(t.defaultColWidth=r.defaultColWidth),r.defaultRowHeight&&r.defaultRowHeight===15||(t.customHeight="1"),l.some(t,n=>n!==void 0)&&s.leafNode("sheetFormatPr",t)}}parseOpen(s){return s.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(s.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(s.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(s.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(s.attributes.outlineLevelCol||"0",10)},s.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(s.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("../style/color-xform"),s=e("./page-setup-properties-xform"),r=e("./outline-properties-xform");d.exports=class extends l{constructor(){super(),this.map={tabColor:new o("tabColor"),pageSetUpPr:new s,outlinePr:new r}}get tag(){return"sheetPr"}render(t,n){if(n){t.addRollback(),t.openNode("sheetPr");let c=!1;c=this.map.tabColor.render(t,n.tabColor)||c,c=this.map.pageSetUpPr.render(t,n.pageSetup)||c,c=this.map.outlinePr.render(t,n.outlineProperties)||c,c?(t.closeNode(),t.commit()):t.rollback()}}parseOpen(t){return this.parser?(this.parser.parseOpen(t),!0):t.name===this.tag?(this.reset(),!0):!!this.map[t.name]&&(this.parser=this.map[t.name],this.parser.parseOpen(t),!0)}parseText(t){return!!this.parser&&(this.parser.parseText(t),!0)}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");function s(t,n){return t?n:void 0}function r(t,n){return t===n||void 0}d.exports=class extends o{get tag(){return"sheetProtection"}render(t,n){if(n){let c={sheet:s(n.sheet,"1"),selectLockedCells:n.selectLockedCells===!1?"1":void 0,selectUnlockedCells:n.selectUnlockedCells===!1?"1":void 0,formatCells:s(n.formatCells,"0"),formatColumns:s(n.formatColumns,"0"),formatRows:s(n.formatRows,"0"),insertColumns:s(n.insertColumns,"0"),insertRows:s(n.insertRows,"0"),insertHyperlinks:s(n.insertHyperlinks,"0"),deleteColumns:s(n.deleteColumns,"0"),deleteRows:s(n.deleteRows,"0"),sort:s(n.sort,"0"),autoFilter:s(n.autoFilter,"0"),pivotTables:s(n.pivotTables,"0")};n.sheet&&(c.algorithmName=n.algorithmName,c.hashValue=n.hashValue,c.saltValue=n.saltValue,c.spinCount=n.spinCount,c.objects=s(n.objects===!1,"1"),c.scenarios=s(n.scenarios===!1,"1")),l.some(c,i=>i!==void 0)&&t.leafNode(this.tag,c)}}parseOpen(t){return t.name===this.tag?(this.model={sheet:r(t.attributes.sheet,"1"),objects:t.attributes.objects!=="1"&&void 0,scenarios:t.attributes.scenarios!=="1"&&void 0,selectLockedCells:t.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:t.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:r(t.attributes.formatCells,"0"),formatColumns:r(t.attributes.formatColumns,"0"),formatRows:r(t.attributes.formatRows,"0"),insertColumns:r(t.attributes.insertColumns,"0"),insertRows:r(t.attributes.insertRows,"0"),insertHyperlinks:r(t.attributes.insertHyperlinks,"0"),deleteColumns:r(t.attributes.deleteColumns,"0"),deleteRows:r(t.attributes.deleteRows,"0"),sort:r(t.attributes.sort,"0"),autoFilter:r(t.attributes.autoFilter,"0"),pivotTables:r(t.attributes.pivotTables,"0")},t.attributes.algorithmName&&(this.model.algorithmName=t.attributes.algorithmName,this.model.hashValue=t.attributes.hashValue,this.model.saltValue=t.attributes.saltValue,this.model.spinCount=parseInt(t.attributes.spinCount,10)),!0):!1}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,d,g){"use strict";let l=e("../../../utils/col-cache"),o=e("../base-xform"),s={frozen:"frozen",frozenSplit:"frozen",split:"split"};d.exports=class extends o{get tag(){return"sheetView"}prepare(r){switch(r.state){case"frozen":case"split":break;default:r.state="normal"}}render(r,t){r.openNode("sheetView",{workbookViewId:t.workbookViewId||0});let n=function(f,u,b){b&&r.addAttribute(f,u)},c,i,a,h;switch(n("rightToLeft","1",t.rightToLeft===!0),n("tabSelected","1",t.tabSelected),n("showRuler","0",t.showRuler===!1),n("showRowColHeaders","0",t.showRowColHeaders===!1),n("showGridLines","0",t.showGridLines===!1),n("zoomScale",t.zoomScale,t.zoomScale),n("zoomScaleNormal",t.zoomScaleNormal,t.zoomScaleNormal),n("view",t.style,t.style),t.state){case"frozen":i=t.xSplit||0,a=t.ySplit||0,c=t.topLeftCell||l.getAddress(a+1,i+1).address,h=(t.xSplit&&t.ySplit?"bottomRight":t.xSplit&&"topRight")||"bottomLeft",r.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:c,activePane:h,state:"frozen"}),r.leafNode("selection",{pane:h,activeCell:t.activeCell,sqref:t.activeCell});break;case"split":t.activePane==="topLeft"&&(t.activePane=void 0),r.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),r.leafNode("selection",{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case"normal":t.activeCell&&r.leafNode("selection",{activeCell:t.activeCell,sqref:t.activeCell})}r.closeNode()}parseOpen(r){switch(r.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(r.attributes.workbookViewId,10),rightToLeft:r.attributes.rightToLeft==="1",tabSelected:r.attributes.tabSelected==="1",showRuler:r.attributes.showRuler!=="0",showRowColHeaders:r.attributes.showRowColHeaders!=="0",showGridLines:r.attributes.showGridLines!=="0",zoomScale:parseInt(r.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(r.attributes.zoomScaleNormal||"100",10),style:r.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(r.attributes.xSplit||"0",10),ySplit:parseInt(r.attributes.ySplit||"0",10),topLeftCell:r.attributes.topLeftCell,activePane:r.attributes.activePane||"topLeft",state:r.attributes.state},!0;case"selection":{let t=r.attributes.pane||"topLeft";return this.selections[t]={pane:t,activeCell:r.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(r){let t,n;return r==="sheetView"?(this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:s[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(t.activePane=this.pane.activePane),n=this.selections[this.pane.activePane],n&&n.activeCell&&(t.activeCell=n.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)):(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},n=this.selections.topLeft,n&&n.activeCell&&(t.activeCell=n.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)),!1):!0}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"tablePart"}render(o,s){s&&o.leafNode(this.tag,{"r:id":s.rId})}parseOpen(o){return o.name===this.tag?(this.model={rId:o.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),r=e("../../rel-type"),t=e("./merges"),n=e("../base-xform"),c=e("../list-xform"),i=e("./row-xform"),a=e("./col-xform"),h=e("./dimension-xform"),f=e("./hyperlink-xform"),u=e("./merge-cell-xform"),b=e("./data-validations-xform"),m=e("./sheet-properties-xform"),v=e("./sheet-format-properties-xform"),k=e("./sheet-view-xform"),B=e("./sheet-protection-xform"),R=e("./page-margins-xform"),L=e("./page-setup-xform"),A=e("./print-options-xform"),D=e("./auto-filter-xform"),N=e("./picture-xform"),q=e("./drawing-xform"),j=e("./table-part-xform"),S=e("./row-breaks-xform"),T=e("./header-footer-xform"),P=e("./cf/conditional-formattings-xform"),p=e("./ext-lst-xform"),y=(w,_)=>{if(!_||!_.length)return w;if(!w||!w.length)return _;let C={},O={};return w.forEach(z=>{C[z.ref]=z,z.rules.forEach($=>{let{x14Id:V}=$;V&&(O[V]=$)})}),_.forEach(z=>{z.rules.forEach($=>{let V=O[$.x14Id];V?((M,H)=>{Object.keys(H).forEach(I=>{let E=M[I],F=H[I];E===void 0&&F!==void 0&&(M[I]=F)})})(V,$):C[z.ref]?C[z.ref].rules.push($):w.push({ref:z.ref,rules:[$]})})}),w};class x extends n{constructor(_){super();let{maxRows:C,maxCols:O,ignoreNodes:z}=_||{};this.ignoreNodes=z||[],this.map={sheetPr:new m,dimension:new h,sheetViews:new c({tag:"sheetViews",count:!1,childXform:new k}),sheetFormatPr:new v,cols:new c({tag:"cols",count:!1,childXform:new a}),sheetData:new c({tag:"sheetData",count:!1,empty:!0,childXform:new i({maxItems:O}),maxItems:C}),autoFilter:new D,mergeCells:new c({tag:"mergeCells",count:!0,childXform:new u}),rowBreaks:new S,hyperlinks:new c({tag:"hyperlinks",count:!1,childXform:new f}),pageMargins:new R,dataValidations:new b,pageSetup:new L,headerFooter:new T,printOptions:new A,picture:new N,drawing:new q,sheetProtection:new B,tableParts:new c({tag:"tableParts",count:!0,childXform:new j}),conditionalFormatting:new P,extLst:new p}}prepare(_,C){C.merges=new t,_.hyperlinks=C.hyperlinks=[],_.comments=C.comments=[],C.formulae={},C.siFormulae=0,this.map.cols.prepare(_.cols,C),this.map.sheetData.prepare(_.rows,C),this.map.conditionalFormatting.prepare(_.conditionalFormattings,C),_.mergeCells=C.merges.mergeCells;let O=_.rels=[];function z(M){return"rId"+(M.length+1)}if(_.hyperlinks.forEach(M=>{let H=z(O);M.rId=H,O.push({Id:H,Type:r.Hyperlink,Target:M.target,TargetMode:"External"})}),_.comments.length>0){let M={Id:z(O),Type:r.Comments,Target:`../comments${_.id}.xml`};O.push(M);let H={Id:z(O),Type:r.VmlDrawing,Target:`../drawings/vmlDrawing${_.id}.vml`};O.push(H),_.comments.forEach(I=>{I.refAddress=o.decodeAddress(I.ref)}),C.commentRefs.push({commentName:"comments"+_.id,vmlDrawing:"vmlDrawing"+_.id})}let $=[],V;_.media.forEach(M=>{if(M.type==="background"){let H=z(O);V=C.media[M.imageId],O.push({Id:H,Type:r.Image,Target:`../media/${V.name}.${V.extension}`}),_.background={rId:H},_.image=C.media[M.imageId]}else if(M.type==="image"){let{drawing:H}=_;V=C.media[M.imageId],H||(H=_.drawing={rId:z(O),name:"drawing"+ ++C.drawingsCount,anchors:[],rels:[]},C.drawings.push(H),O.push({Id:H.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${H.name}.xml`}));let I=this.preImageId===M.imageId?$[M.imageId]:$[H.rels.length];I||(I=z(H.rels),$[H.rels.length]=I,H.rels.push({Id:I,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${V.name}.${V.extension}`}));let E={picture:{rId:I},range:M.range};if(M.hyperlinks&&M.hyperlinks.hyperlink){let F=z(H.rels);$[H.rels.length]=F,E.picture.hyperlinks={tooltip:M.hyperlinks.tooltip,rId:F},H.rels.push({Id:F,Type:r.Hyperlink,Target:M.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=M.imageId,H.anchors.push(E)}}),_.tables.forEach(M=>{let H=z(O);M.rId=H,O.push({Id:H,Type:r.Table,Target:"../tables/"+M.target}),M.columns.forEach(I=>{let{style:E}=I;E&&(I.dxfId=C.styles.addDxfStyle(E))})}),this.map.extLst.prepare(_,C)}render(_,C){_.openXml(s.StdDocAttributes),_.openNode("worksheet",x.WORKSHEET_ATTRIBUTES);let O=C.properties?{defaultRowHeight:C.properties.defaultRowHeight,dyDescent:C.properties.dyDescent,outlineLevelCol:C.properties.outlineLevelCol,outlineLevelRow:C.properties.outlineLevelRow}:void 0;C.properties&&C.properties.defaultColWidth&&(O.defaultColWidth=C.properties.defaultColWidth);let z={outlineProperties:C.properties&&C.properties.outlineProperties,tabColor:C.properties&&C.properties.tabColor,pageSetup:C.pageSetup&&C.pageSetup.fitToPage?{fitToPage:C.pageSetup.fitToPage}:void 0},$=C.pageSetup&&C.pageSetup.margins,V={showRowColHeaders:C.pageSetup&&C.pageSetup.showRowColHeaders,showGridLines:C.pageSetup&&C.pageSetup.showGridLines,horizontalCentered:C.pageSetup&&C.pageSetup.horizontalCentered,verticalCentered:C.pageSetup&&C.pageSetup.verticalCentered},M=C.sheetProtection;this.map.sheetPr.render(_,z),this.map.dimension.render(_,C.dimensions),this.map.sheetViews.render(_,C.views),this.map.sheetFormatPr.render(_,O),this.map.cols.render(_,C.cols),this.map.sheetData.render(_,C.rows),this.map.sheetProtection.render(_,M),this.map.autoFilter.render(_,C.autoFilter),this.map.mergeCells.render(_,C.mergeCells),this.map.conditionalFormatting.render(_,C.conditionalFormattings),this.map.dataValidations.render(_,C.dataValidations),this.map.hyperlinks.render(_,C.hyperlinks),this.map.printOptions.render(_,V),this.map.pageMargins.render(_,$),this.map.pageSetup.render(_,C.pageSetup),this.map.headerFooter.render(_,C.headerFooter),this.map.rowBreaks.render(_,C.rowBreaks),this.map.drawing.render(_,C.drawing),this.map.picture.render(_,C.background),this.map.tableParts.render(_,C.tables),this.map.extLst.render(_,C),C.rels&&C.rels.forEach(H=>{H.Type===r.VmlDrawing&&_.leafNode("legacyDrawing",{"r:id":H.Id})}),_.closeNode()}parseOpen(_){return this.parser?(this.parser.parseOpen(_),!0):_.name==="worksheet"?(l.each(this.map,C=>{C.reset()}),!0):(this.map[_.name]&&!this.ignoreNodes.includes(_.name)&&(this.parser=this.map[_.name],this.parser.parseOpen(_)),!0)}parseText(_){this.parser&&this.parser.parseText(_)}parseClose(_){if(this.parser)return this.parser.parseClose(_)||(this.parser=void 0),!0;if(_==="worksheet"){let C=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(C.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(C.outlineProperties=this.map.sheetPr.model.outlineProperties);let O={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},z=Object.assign(O,this.map.pageSetup.model,this.map.printOptions.model),$=y(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:C,views:this.map.sheetViews.model,pageSetup:z,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:$},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}else return!0}reconcile(_,C){let O=(_.relationships||[]).reduce(($,V)=>{if($[V.Id]=V,V.Type===r.Comments&&(_.comments=C.comments[V.Target].comments),V.Type===r.VmlDrawing&&_.comments&&_.comments.length){let M=C.vmlDrawings[V.Target].comments;_.comments.forEach((H,I)=>{H.note=Object.assign({},H.note,M[I])})}return $},{});if(C.commentsMap=(_.comments||[]).reduce(($,V)=>(V.ref&&($[V.ref]=V),$),{}),C.hyperlinkMap=(_.hyperlinks||[]).reduce(($,V)=>(V.rId&&($[V.address]=O[V.rId].Target),$),{}),C.formulae={},_.rows=_.rows&&_.rows.filter(Boolean)||[],_.rows.forEach($=>{$.cells=$.cells&&$.cells.filter(Boolean)||[]}),this.map.cols.reconcile(_.cols,C),this.map.sheetData.reconcile(_.rows,C),this.map.conditionalFormatting.reconcile(_.conditionalFormattings,C),_.media=[],_.drawing){let $=O[_.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if($){let V=$[1];C.drawings[V].anchors.forEach(M=>{if(M.medium){let H={type:"image",imageId:M.medium.index,range:M.range,hyperlinks:M.picture.hyperlinks};_.media.push(H)}})}}let z=_.background&&O[_.background.rId];if(z){let $=z.Target.split("/media/")[1],V=C.mediaIndex&&C.mediaIndex[$];V!==void 0&&_.media.push({type:"background",imageId:V})}_.tables=(_.tables||[]).map($=>{let V=O[$.rId];return C.tables[V.Target]}),delete _.relationships,delete _.hyperlinks,delete _.comments}}x.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},d.exports=x},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.attr=o.attr}render(o,s){s&&(o.openNode(this.tag),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this._format=o.format||function(s){try{return Number.isNaN(s.getTime())?"":s.toISOString()}catch{return""}},this._parse=o.parse||function(s){return new Date(s)}}render(o,s){s&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,this._format(s)):o.writeText(this._format(s)),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=this._parse(o.attributes[this.attr]):this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this.zero=o.zero}render(o,s){(s||this.zero)&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,s):o.writeText(s),o.closeNode())}parseOpen(o){return o.name===this.tag&&(this.attr?this.model=parseInt(o.attributes[this.attr],10):this.text=[],!0)}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs}render(o,s){s!==void 0&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,s):o.writeText(s),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=o.attributes[this.attr]:this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(e,d,g){"use strict";let l=e("./base-xform"),o=e("../../utils/xml-stream");d.exports=class extends l{constructor(s){super(),this._model=s}render(s){if(!this._xml){let r=new o;(function t(n,c){n.openNode(c.tag,c.$),c.c&&c.c.forEach(i=>{t(n,i)}),c.t&&n.writeText(c.t),n.closeNode()})(r,this._model),this._xml=r.xml}s.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(s){return s!==this._model.tag}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,d,g){"use strict";let l=e("./text-xform"),o=e("./rich-text-xform"),s=e("../base-xform");d.exports=class extends s{constructor(){super(),this.map={r:new o,t:new l}}get tag(){return"rPh"}render(r,t){if(r.openNode(this.tag,{sb:t.sb||0,eb:t.eb||0}),t&&t.hasOwnProperty("richText")&&t.richText){let{r:n}=this.map;t.richText.forEach(c=>{n.render(r,c)})}else t&&this.map.t.render(r,t.text);r.closeNode()}parseOpen(r){let{name:t}=r;return this.parser?(this.parser.parseOpen(r),!0):t===this.tag?(this.model={sb:parseInt(r.attributes.sb,10),eb:parseInt(r.attributes.eb,10)},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(r),!0))}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){switch(r){case"r":{let t=this.model.richText;t||(t=this.model.richText=[]),t.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}return r!==this.tag}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,d,g){"use strict";let l=e("./text-xform"),o=e("../style/font-xform"),s=e("../base-xform");class r extends s{constructor(n){super(),this.model=n}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new l)}get fontXform(){return this._fontXform||(this._fontXform=new o(r.FONT_OPTIONS))}render(n,c){c=c||this.model,n.openNode("r"),c.font&&this.fontXform.render(n,c.font),this.textXform.render(n,c.text),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(n),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(n),!0;default:return!1}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){switch(n){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(n),!0}}}r.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},d.exports=r},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,d,g){"use strict";let l=e("./text-xform"),o=e("./rich-text-xform"),s=e("./phonetic-text-xform"),r=e("../base-xform");d.exports=class extends r{constructor(t){super(),this.model=t,this.map={r:new o,t:new l,rPh:new s}}get tag(){return"si"}render(t,n){t.openNode(this.tag),n&&n.hasOwnProperty("richText")&&n.richText?n.richText.length?n.richText.forEach(c=>{this.map.r.render(t,c)}):this.map.t.render(t,""):n!=null&&this.map.t.render(t,n),t.closeNode()}parseOpen(t){let{name:n}=t;return this.parser?(this.parser.parseOpen(t),!0):n===this.tag?(this.model={},!0):(this.parser=this.map[n],!!this.parser&&(this.parser.parseOpen(t),!0))}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser){if(!this.parser.parseClose(t)){switch(t){case"r":{let n=this.model.richText;n||(n=this.model.richText=[]),n.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}return t!==this.tag}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(e,d,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("./shared-string-xform");d.exports=class extends o{constructor(r){super(),this.model=r||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new s)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(r){return this.model.values[r]}add(r){return r.richText?this.addRichText(r):this.addText(r)}addText(r){let t=this.hash[r];return t===void 0&&(t=this.hash[r]=this.model.values.length,this.model.values.push(r)),this.model.count++,t}addRichText(r){let t=this.sharedStringXform.toXml(r),n=this.rich[t];return n===void 0&&(n=this.rich[t]=this.model.values.length,this.model.values.push(r)),this.model.count++,n}render(r,t){t=t||this._values,r.openXml(l.StdDocAttributes),r.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:t.count,uniqueCount:t.values.length});let n=this.sharedStringXform;t.values.forEach(c=>{n.render(r,c)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(r),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(r))}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;if(r==="sst")return!1;throw new Error("Unexpected xml node in parseClose: "+r)}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"t"}render(o,s){o.openNode("t"),/^\s|\n|\s$/.test(s)&&o.addAttribute("xml:space","preserve"),o.writeText(s),o.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(o,s)=>String.fromCharCode(parseInt(s,16)))}parseOpen(o){return o.name==="t"?(this._text=[],!0):!1}parseText(o){this._text.push(o)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(e,d,g){"use strict";let l=e("../../../doc/enums"),o=e("../../../utils/utils"),s=e("../base-xform"),r={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((n,c)=>(n[c]=!0,n),{}),horizontal(n){return this.horizontalValues[n]?n:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((n,c)=>(n[c]=!0,n),{}),vertical(n){return n==="middle"?"center":this.verticalValues[n]?n:void 0},wrapText:n=>!!n||void 0,shrinkToFit:n=>!!n||void 0,textRotation(n){return n==="vertical"||(n=o.validInt(n))>=-90&&n<=90?n:void 0},indent:n=>(n=o.validInt(n),Math.max(0,n)),readingOrder(n){switch(n){case"ltr":return l.ReadingOrder.LeftToRight;case"rtl":return l.ReadingOrder.RightToLeft;default:return}}},t={toXml(n){if(n=r.textRotation(n)){if(n==="vertical")return 255;let c=Math.round(n);if(c>=0&&c<=90)return c;if(c<0&&c>=-90)return 90-c}},toModel(n){let c=o.validInt(n);if(c!==void 0){if(c===255)return"vertical";if(c>=0&&c<=90)return c;if(c>90&&c<=180)return 90-c}}};d.exports=class extends s{get tag(){return"alignment"}render(n,c){n.addRollback(),n.openNode("alignment");let i=!1;function a(h,f){f&&(n.addAttribute(h,f),i=!0)}a("horizontal",r.horizontal(c.horizontal)),a("vertical",r.vertical(c.vertical)),a("wrapText",!!r.wrapText(c.wrapText)&&"1"),a("shrinkToFit",!!r.shrinkToFit(c.shrinkToFit)&&"1"),a("indent",r.indent(c.indent)),a("textRotation",t.toXml(c.textRotation)),a("readingOrder",r.readingOrder(c.readingOrder)),n.closeNode(),i?n.commit():n.rollback()}parseOpen(n){let c={},i=!1;function a(h,f,u){h&&(c[f]=u,i=!0)}a(n.attributes.horizontal,"horizontal",n.attributes.horizontal),a(n.attributes.vertical,"vertical",n.attributes.vertical==="center"?"middle":n.attributes.vertical),a(n.attributes.wrapText,"wrapText",o.parseBoolean(n.attributes.wrapText)),a(n.attributes.shrinkToFit,"shrinkToFit",o.parseBoolean(n.attributes.shrinkToFit)),a(n.attributes.indent,"indent",parseInt(n.attributes.indent,10)),a(n.attributes.textRotation,"textRotation",t.toModel(n.attributes.textRotation)),a(n.attributes.readingOrder,"readingOrder",n.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=i?c:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("../../../utils/utils"),s=e("./color-xform");class r extends l{constructor(n){super(),this.name=n,this.map={color:new s}}get tag(){return this.name}render(n,c,i){let a=c&&c.color||i||this.defaultColor;n.openNode(this.name),c&&c.style&&(n.addAttribute("style",c.style),a&&this.map.color.render(n,a)),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.name:{let{style:c}=n.attributes;return this.model=c?{style:c}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(n),!0;default:return!1}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):(n===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(n){return r.validStyleValues[n]}}r.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((t,n)=>(t[n]=!0,t),{}),d.exports=class extends l{constructor(){super(),this.map={top:new r("top"),left:new r("left"),bottom:new r("bottom"),right:new r("right"),diagonal:new r("diagonal")}}render(t,n){let{color:c}=n;function i(a,h){a&&!a.color&&n.color&&(a={...a,color:n.color}),h.render(t,a,c)}t.openNode("border"),n.diagonal&&n.diagonal.style&&(n.diagonal.up&&t.addAttribute("diagonalUp","1"),n.diagonal.down&&t.addAttribute("diagonalDown","1")),i(n.left,this.map.left),i(n.right,this.map.right),i(n.top,this.map.top),i(n.bottom,this.map.bottom),i(n.diagonal,this.map.diagonal),t.closeNode()}parseOpen(t){return this.parser?(this.parser.parseOpen(t),!0):t.name==="border"?(this.reset(),this.diagonalUp=o.parseBoolean(t.attributes.diagonalUp),this.diagonalDown=o.parseBoolean(t.attributes.diagonalDown),!0):(this.parser=this.map[t.name],!!this.parser&&(this.parser.parseOpen(t),!0))}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;if(t==="border"){let n=this.model={},c=function(i,a,h){a&&(h&&Object.assign(a,h),n[i]=a)};c("left",this.map.left.model),c("right",this.map.right.model),c("top",this.map.top.model),c("bottom",this.map.bottom.model),c("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.name=o||"color"}get tag(){return this.name}render(o,s){return!!s&&(o.openNode(this.name),s.argb?o.addAttribute("rgb",s.argb):s.theme!==void 0?(o.addAttribute("theme",s.theme),s.tint!==void 0&&o.addAttribute("tint",s.tint)):s.indexed!==void 0?o.addAttribute("indexed",s.indexed):o.addAttribute("auto","1"),o.closeNode(),!0)}parseOpen(o){return o.name===this.name&&(o.attributes.rgb?this.model={argb:o.attributes.rgb}:o.attributes.theme?(this.model={theme:parseInt(o.attributes.theme,10)},o.attributes.tint&&(this.model.tint=parseFloat(o.attributes.tint))):o.attributes.indexed?this.model={indexed:parseInt(o.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("./alignment-xform"),s=e("./border-xform"),r=e("./fill-xform"),t=e("./font-xform"),n=e("./numfmt-xform"),c=e("./protection-xform");d.exports=class extends l{constructor(){super(),this.map={alignment:new o,border:new s,fill:new r,font:new t,numFmt:new n,protection:new c}}get tag(){return"dxf"}render(i,a){if(i.openNode(this.tag),a.font&&this.map.font.render(i,a.font),a.numFmt&&a.numFmtId){let h={id:a.numFmtId,formatCode:a.numFmt};this.map.numFmt.render(i,h)}a.fill&&this.map.fill.render(i,a.fill),a.alignment&&this.map.alignment.render(i,a.alignment),a.border&&this.map.border.render(i,a.border),a.protection&&this.map.protection.render(i,a.protection),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name===this.tag?(this.reset(),!0):(this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i),!0)}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.parser=void 0),!0):i!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("./color-xform");class s extends l{constructor(){super(),this.map={color:new o}}get tag(){return"stop"}render(i,a){i.openNode("stop"),i.addAttribute("position",a.position),this.map.color.render(i,a.color),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"stop":return this.model={position:parseFloat(i.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(i),!0;default:return!1}}parseText(){}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class r extends l{constructor(){super(),this.map={fgColor:new o("fgColor"),bgColor:new o("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(i,a){i.openNode("patternFill"),i.addAttribute("patternType",a.pattern),a.fgColor&&this.map.fgColor.render(i,a.fgColor),a.bgColor&&this.map.bgColor.render(i,a.bgColor),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name==="patternFill"?(this.model={type:"pattern",pattern:i.attributes.patternType},!0):(this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.parser.model&&(this.model[i]=this.parser.model),this.parser=void 0),!0)}}class t extends l{constructor(){super(),this.map={stop:new s}}get name(){return"gradient"}get tag(){return"gradientFill"}render(i,a){switch(i.openNode("gradientFill"),a.gradient){case"angle":i.addAttribute("degree",a.degree);break;case"path":i.addAttribute("type","path"),a.center.left&&(i.addAttribute("left",a.center.left),a.center.right===void 0&&i.addAttribute("right",a.center.left)),a.center.right&&i.addAttribute("right",a.center.right),a.center.top&&(i.addAttribute("top",a.center.top),a.center.bottom===void 0&&i.addAttribute("bottom",a.center.top)),a.center.bottom&&i.addAttribute("bottom",a.center.bottom)}let h=this.map.stop;a.stops.forEach(f=>{h.render(i,f)}),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"gradientFill":{let a=this.model={stops:[]};return i.attributes.degree?(a.gradient="angle",a.degree=parseInt(i.attributes.degree,10)):i.attributes.type==="path"&&(a.gradient="path",a.center={left:i.attributes.left?parseFloat(i.attributes.left):0,top:i.attributes.top?parseFloat(i.attributes.top):0},i.attributes.right!==i.attributes.left&&(a.center.right=i.attributes.right?parseFloat(i.attributes.right):0),i.attributes.bottom!==i.attributes.top&&(a.center.bottom=i.attributes.bottom?parseFloat(i.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(i),!0;default:return!1}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class n extends l{constructor(){super(),this.map={patternFill:new r,gradientFill:new t}}get tag(){return"fill"}render(i,a){switch(i.addRollback(),i.openNode("fill"),a.type){case"pattern":this.map.patternFill.render(i,a);break;case"gradient":this.map.gradientFill.render(i,a);break;default:return void i.rollback()}i.closeNode(),i.commit()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name==="fill"?(this.model={},!0):(this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(i){return n.validPatternValues[i]}}n.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((c,i)=>(c[i]=!0,c),{}),n.StopXform=s,n.PatternFillXform=r,n.GradientFillXform=t,d.exports=n},{"../base-xform":32,"./color-xform":128}],131:[function(e,d,g){"use strict";let l=e("./color-xform"),o=e("../simple/boolean-xform"),s=e("../simple/integer-xform"),r=e("../simple/string-xform"),t=e("./underline-xform"),n=e("../../../utils/under-dash"),c=e("../base-xform");class i extends c{constructor(h){super(),this.options=h||i.OPTIONS,this.map={b:{prop:"bold",xform:new o({tag:"b",attr:"val"})},i:{prop:"italic",xform:new o({tag:"i",attr:"val"})},u:{prop:"underline",xform:new t},charset:{prop:"charset",xform:new s({tag:"charset",attr:"val"})},color:{prop:"color",xform:new l},condense:{prop:"condense",xform:new o({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new o({tag:"extend",attr:"val"})},family:{prop:"family",xform:new s({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new o({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new r({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new r({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new o({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new o({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new s({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new r({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(h,f){let{map:u}=this;h.openNode(this.options.tagName),n.each(this.map,(b,m)=>{u[m].xform.render(h,f[b.prop])}),h.closeNode()}parseOpen(h){return this.parser?(this.parser.parseOpen(h),!0):this.map[h.name]?(this.parser=this.map[h.name].xform,this.parser.parseOpen(h)):h.name===this.options.tagName?(this.model={},!0):!1}parseText(h){this.parser&&this.parser.parseText(h)}parseClose(h){if(this.parser&&!this.parser.parseClose(h)){let f=this.map[h];return this.parser.model&&(this.model[f.prop]=this.parser.model),this.parser=void 0,!0}return h!==this.options.tagName}}i.OPTIONS={tagName:"font",fontNameTag:"name"},d.exports=i},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(e,d,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../../defaultnumformats"),s=e("../base-xform"),r=(function(){let n={};return l.each(o,(c,i)=>{c.f&&(n[c.f]=parseInt(i,10))}),n})();class t extends s{constructor(c,i){super(),this.id=c,this.formatCode=i}get tag(){return"numFmt"}render(c,i){c.leafNode("numFmt",{numFmtId:i.id,formatCode:i.formatCode})}parseOpen(c){return c.name==="numFmt"?(this.model={id:parseInt(c.attributes.numFmtId,10),formatCode:c.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0):!1}parseText(){}parseClose(){return!1}}t.getDefaultFmtId=function(n){return r[n]},t.getDefaultFmtCode=function(n){return o[n]&&o[n].f},d.exports=t},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,d,g){"use strict";let l=e("../base-xform"),o={boolean:(s,r)=>s===void 0?r:s};d.exports=class extends l{get tag(){return"protection"}render(s,r){s.addRollback(),s.openNode("protection");let t=!1;function n(c,i){i!==void 0&&(s.addAttribute(c,i),t=!0)}n("locked",o.boolean(r.locked,!0)?void 0:"0"),n("hidden",o.boolean(r.hidden,!1)?"1":void 0),s.closeNode(),t?s.commit():s.rollback()}parseOpen(s){let r={locked:s.attributes.locked!=="0",hidden:s.attributes.hidden==="1"},t=!r.locked||r.hidden;this.model=t?r:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("./alignment-xform"),s=e("./protection-xform");d.exports=class extends l{constructor(r){super(),this.xfId=!(!r||!r.xfId),this.map={alignment:new o,protection:new s}}get tag(){return"xf"}render(r,t){r.openNode("xf",{numFmtId:t.numFmtId||0,fontId:t.fontId||0,fillId:t.fillId||0,borderId:t.borderId||0}),this.xfId&&r.addAttribute("xfId",t.xfId||0),t.numFmtId&&r.addAttribute("applyNumberFormat","1"),t.fontId&&r.addAttribute("applyFont","1"),t.fillId&&r.addAttribute("applyFill","1"),t.borderId&&r.addAttribute("applyBorder","1"),t.alignment&&r.addAttribute("applyAlignment","1"),t.protection&&r.addAttribute("applyProtection","1"),t.alignment&&this.map.alignment.render(r,t.alignment),t.protection&&this.map.protection.render(r,t.protection),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"xf":return this.model={numFmtId:parseInt(r.attributes.numFmtId,10),fontId:parseInt(r.attributes.fontId,10),fillId:parseInt(r.attributes.fillId,10),borderId:parseInt(r.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(r.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(r),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(r),!0;default:return!1}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):r!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,d,g){"use strict";let l=e("../../../doc/enums"),o=e("../../../utils/xml-stream"),s=e("../base-xform"),r=e("../static-xform"),t=e("../list-xform"),n=e("./font-xform"),c=e("./fill-xform"),i=e("./border-xform"),a=e("./numfmt-xform"),h=e("./style-xform"),f=e("./dxf-xform");class u extends s{constructor(m){super(),this.map={numFmts:new t({tag:"numFmts",count:!0,childXform:new a}),fonts:new t({tag:"fonts",count:!0,childXform:new n,$:{"x14ac:knownFonts":1}}),fills:new t({tag:"fills",count:!0,childXform:new c}),borders:new t({tag:"borders",count:!0,childXform:new i}),cellStyleXfs:new t({tag:"cellStyleXfs",count:!0,childXform:new h}),cellXfs:new t({tag:"cellXfs",count:!0,childXform:new h({xfId:!0})}),dxfs:new t({tag:"dxfs",always:!0,count:!0,childXform:new f}),numFmt:new a,font:new n,fill:new c,border:new i,style:new h({xfId:!0}),cellStyles:u.STATIC_XFORMS.cellStyles,tableStyles:u.STATIC_XFORMS.tableStyles,extLst:u.STATIC_XFORMS.extLst},m&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(m,v){v=v||this.model,m.openXml(o.StdDocAttributes),m.openNode("styleSheet",u.STYLESHEET_ATTRIBUTES),this.index?(v.numFmts&&v.numFmts.length&&(m.openNode("numFmts",{count:v.numFmts.length}),v.numFmts.forEach(k=>{m.writeXml(k)}),m.closeNode()),v.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),m.openNode("fonts",{count:v.fonts.length,"x14ac:knownFonts":1}),v.fonts.forEach(k=>{m.writeXml(k)}),m.closeNode(),m.openNode("fills",{count:v.fills.length}),v.fills.forEach(k=>{m.writeXml(k)}),m.closeNode(),m.openNode("borders",{count:v.borders.length}),v.borders.forEach(k=>{m.writeXml(k)}),m.closeNode(),this.map.cellStyleXfs.render(m,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),m.openNode("cellXfs",{count:v.styles.length}),v.styles.forEach(k=>{m.writeXml(k)}),m.closeNode()):(this.map.numFmts.render(m,v.numFmts),this.map.fonts.render(m,v.fonts),this.map.fills.render(m,v.fills),this.map.borders.render(m,v.borders),this.map.cellStyleXfs.render(m,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(m,v.styles)),u.STATIC_XFORMS.cellStyles.render(m),this.map.dxfs.render(m,v.dxfs),u.STATIC_XFORMS.tableStyles.render(m),u.STATIC_XFORMS.extLst.render(m),m.closeNode()}parseOpen(m){return this.parser?(this.parser.parseOpen(m),!0):m.name==="styleSheet"?(this.initIndex(),!0):(this.parser=this.map[m.name],this.parser&&this.parser.parseOpen(m),!0)}parseText(m){this.parser&&this.parser.parseText(m)}parseClose(m){if(this.parser)return this.parser.parseClose(m)||(this.parser=void 0),!0;switch(m){case"styleSheet":{this.model={};let v=(k,B)=>{B.model&&B.model.length&&(this.model[k]=B.model)};if(v("numFmts",this.map.numFmts),v("fonts",this.map.fonts),v("fills",this.map.fills),v("borders",this.map.borders),v("styles",this.map.cellXfs),v("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){let k=this.index.numFmt;this.model.numFmts.forEach(B=>{k[B.id]=B.formatCode})}return!1}default:return!0}}addStyleModel(m,v){if(!m)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(m))return this.weakMap.get(m);let k={};if(v=v||l.ValueType.Number,m.numFmt)k.numFmtId=this._addNumFmtStr(m.numFmt);else switch(v){case l.ValueType.Number:k.numFmtId=this._addNumFmtStr("General");break;case l.ValueType.Date:k.numFmtId=this._addNumFmtStr("mm-dd-yy")}m.font&&(k.fontId=this._addFont(m.font)),m.border&&(k.borderId=this._addBorder(m.border)),m.fill&&(k.fillId=this._addFill(m.fill)),m.alignment&&(k.alignment=m.alignment),m.protection&&(k.protection=m.protection);let B=this._addStyle(k);return this.weakMap&&this.weakMap.set(m,B),B}getStyleModel(m){let v=this.model.styles[m];if(!v)return null;let k=this.index.model[m];if(k)return k;if(k=this.index.model[m]={},v.numFmtId){let R=this.index.numFmt[v.numFmtId]||a.getDefaultFmtCode(v.numFmtId);R&&(k.numFmt=R)}function B(R,L,A){if(A||A===0){let D=L[A];D&&(k[R]=D)}}return B("font",this.model.fonts,v.fontId),B("border",this.model.borders,v.borderId),B("fill",this.model.fills,v.fillId),v.alignment&&(k.alignment=v.alignment),v.protection&&(k.protection=v.protection),k}addDxfStyle(m){return m.numFmt&&(m.numFmtId=this._addNumFmtStr(m.numFmt)),this.model.dxfs.push(m),this.model.dxfs.length-1}getDxfStyle(m){return this.model.dxfs[m]}_addStyle(m){let v=this.map.style.toXml(m),k=this.index.style[v];return k===void 0&&(k=this.index.style[v]=this.model.styles.length,this.model.styles.push(v)),k}_addNumFmtStr(m){let v=a.getDefaultFmtId(m);if(v!==void 0||(v=this.index.numFmt[m],v!==void 0))return v;v=this.index.numFmt[m]=164+this.model.numFmts.length;let k=this.map.numFmt.toXml({id:v,formatCode:m});return this.model.numFmts.push(k),v}_addFont(m){let v=this.map.font.toXml(m),k=this.index.font[v];return k===void 0&&(k=this.index.font[v]=this.model.fonts.length,this.model.fonts.push(v)),k}_addBorder(m){let v=this.map.border.toXml(m),k=this.index.border[v];return k===void 0&&(k=this.index.border[v]=this.model.borders.length,this.model.borders.push(v)),k}_addFill(m){let v=this.map.fill.toXml(m),k=this.index.fill[v];return k===void 0&&(k=this.index.fill[v]=this.model.fills.length,this.model.fills.push(v)),k}}u.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},u.STATIC_XFORMS={cellStyles:new r({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new r({tag:"dxfs",$:{count:0}}),tableStyles:new r({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new r({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},u.Mock=class extends u{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(b){return b.autodrain(),Promise.resolve()}addStyleModel(b,m){return m===l.ValueType.Date?this.dateStyleId:0}get dateStyleId(){if(!this._dateStyleId){let b={numFmtId:a.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(b)}return this._dateStyleId}getStyleModel(){return{}}},d.exports=u},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(e,d,g){"use strict";let l=e("../base-xform");class o extends l{constructor(r){super(),this.model=r}get tag(){return"u"}render(r,t){if((t=t||this.model)===!0)r.leafNode("u");else{let n=o.Attributes[t];n&&r.leafNode("u",n)}}parseOpen(r){r.name==="u"&&(this.model=r.attributes.val||!0)}parseText(){}parseClose(){return!1}}o.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},d.exports=o},{"../base-xform":32}],137:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("./filter-column-xform");d.exports=class extends l{constructor(){super(),this.map={filterColumn:new o}}get tag(){return"autoFilter"}prepare(s){s.columns.forEach((r,t)=>{this.map.filterColumn.prepare(r,{index:t})})}render(s,r){return s.openNode(this.tag,{ref:r.autoFilterRef}),r.columns.forEach(t=>{this.map.filterColumn.render(s,t)}),s.closeNode(),!0}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:return this.model={autoFilterRef:s.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[s.name],this.parser)return this.parseOpen(s),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(s))}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;if(s===this.tag)return!1;throw new Error("Unexpected xml node in parseClose: "+s)}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"customFilter"}render(o,s){o.leafNode(this.tag,{val:s.val,operator:s.operator})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val,operator:o.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(e,d,g){"use strict";let l=e("../base-xform"),o=e("../list-xform"),s=e("./custom-filter-xform"),r=e("./filter-xform");d.exports=class extends l{constructor(){super(),this.map={customFilters:new o({tag:"customFilters",count:!1,empty:!0,childXform:new s}),filters:new o({tag:"filters",count:!1,empty:!0,childXform:new r})}}get tag(){return"filterColumn"}prepare(t,n){t.colId=n.index.toString()}render(t,n){return n.customFilters?(t.openNode(this.tag,{colId:n.colId,hiddenButton:n.filterButton?"0":"1"}),this.map.customFilters.render(t,n.customFilters),t.closeNode(),!0):(t.leafNode(this.tag,{colId:n.colId,hiddenButton:n.filterButton?"0":"1"}),!0)}parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;let{attributes:n}=t;switch(t.name){case this.tag:return this.model={filterButton:n.hiddenButton==="0"},!0;default:if(this.parser=this.map[t.name],this.parser)return this.parseOpen(t),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(t))}}parseText(){}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):t===this.tag?(this.model.customFilters=this.map.customFilters.model,!1):!0}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"filter"}render(o,s){o.leafNode(this.tag,{val:s.val})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"tableColumn"}prepare(o,s){o.id=s.index+1}render(o,s){return o.leafNode(this.tag,{id:s.id.toString(),name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId}),!0}parseOpen(o){if(o.name===this.tag){let{attributes:s}=o;return this.model={name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(e,d,g){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"tableStyleInfo"}render(o,s){return o.leafNode(this.tag,{name:s.theme?s.theme:void 0,showFirstColumn:s.showFirstColumn?"1":"0",showLastColumn:s.showLastColumn?"1":"0",showRowStripes:s.showRowStripes?"1":"0",showColumnStripes:s.showColumnStripes?"1":"0"}),!0}parseOpen(o){if(o.name===this.tag){let{attributes:s}=o;return this.model={theme:s.name?s.name:null,showFirstColumn:s.showFirstColumn==="1",showLastColumn:s.showLastColumn==="1",showRowStripes:s.showRowStripes==="1",showColumnStripes:s.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(e,d,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("../list-xform"),r=e("./auto-filter-xform"),t=e("./table-column-xform"),n=e("./table-style-info-xform");class c extends o{constructor(){super(),this.map={autoFilter:new r,tableColumns:new s({tag:"tableColumns",count:!0,empty:!0,childXform:new t}),tableStyleInfo:new n}}prepare(a,h){this.map.autoFilter.prepare(a),this.map.tableColumns.prepare(a.columns,h)}get tag(){return"table"}render(a,h){a.openXml(l.StdDocAttributes),a.openNode(this.tag,{...c.TABLE_ATTRIBUTES,id:h.id,name:h.name,displayName:h.displayName||h.name,ref:h.tableRef,totalsRowCount:h.totalsRow?"1":void 0,totalsRowShown:h.totalsRow?void 0:"1",headerRowCount:h.headerRow?"1":"0"}),this.map.autoFilter.render(a,h),this.map.tableColumns.render(a,h.columns),this.map.tableStyleInfo.render(a,h.style),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;let{name:h,attributes:f}=a;return h===this.tag?(this.reset(),this.model={name:f.name,displayName:f.displayName||f.name,tableRef:f.ref,totalsRow:f.totalsRowCount==="1",headerRow:f.headerRowCount==="1"}):(this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)),!0}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.parser=void 0),!0):a===this.tag?(this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((h,f)=>{this.model.columns[f].filterButton=h.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1):!0}reconcile(a,h){a.columns.forEach(f=>{f.dxfId!==void 0&&(f.style=h.styles.getDxfStyle(f.dxfId))})}}c.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},d.exports=c},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(e,d,g){(function(l,o){(function(){"use strict";let s=e("fs"),r=e("jszip"),{PassThrough:t}=e("readable-stream"),n=e("../utils/zip-stream"),c=e("../utils/stream-buf"),i=e("../utils/utils"),a=e("../utils/xml-stream"),{bufferToString:h}=e("../utils/browser-buffer-decode"),f=e("./xform/style/styles-xform"),u=e("./xform/core/core-xform"),b=e("./xform/strings/shared-strings-xform"),m=e("./xform/core/relationships-xform"),v=e("./xform/core/content-types-xform"),k=e("./xform/core/app-xform"),B=e("./xform/book/workbook-xform"),R=e("./xform/sheet/worksheet-xform"),L=e("./xform/drawing/drawing-xform"),A=e("./xform/table/table-xform"),D=e("./xform/comment/comments-xform"),N=e("./xform/comment/vml-notes-xform"),q=e("./xml/theme1");class j{constructor(T){this.workbook=T}async readFile(T,P){if(!await i.fs.exists(T))throw new Error("File not found: "+T);let p=s.createReadStream(T);try{let y=await this.read(p,P);return p.close(),y}catch(y){throw p.close(),y}}parseRels(T){return new m().parseStream(T)}parseWorkbook(T){return new B().parseStream(T)}parseSharedStrings(T){return new b().parseStream(T)}reconcile(T,P){let p=new B,y=new R(P),x=new L,w=new A;p.reconcile(T);let _={media:T.media,mediaIndex:T.mediaIndex};Object.keys(T.drawings).forEach(z=>{let $=T.drawings[z],V=T.drawingRels[z];V&&(_.rels=V.reduce((M,H)=>(M[H.Id]=H,M),{}),($.anchors||[]).forEach(M=>{let H=M.picture&&M.picture.hyperlinks;H&&_.rels[H.rId]&&(H.hyperlink=_.rels[H.rId].Target,delete H.rId)}),x.reconcile($,_))});let C={styles:T.styles};Object.values(T.tables).forEach(z=>{w.reconcile(z,C)});let O={styles:T.styles,sharedStrings:T.sharedStrings,media:T.media,mediaIndex:T.mediaIndex,date1904:T.properties&&T.properties.date1904,drawings:T.drawings,comments:T.comments,tables:T.tables,vmlDrawings:T.vmlDrawings};T.worksheets.forEach(z=>{z.relationships=T.worksheetRels[z.sheetNo],y.reconcile(z,O)}),delete T.worksheetHash,delete T.worksheetRels,delete T.globalRels,delete T.sharedStrings,delete T.workbookRels,delete T.sheetDefs,delete T.styles,delete T.mediaIndex,delete T.drawings,delete T.drawingRels,delete T.vmlDrawings}async _processWorksheetEntry(T,P,p,y,x){let w=new R(y),_=await w.parseStream(T);_.sheetNo=p,P.worksheetHash[x]=_,P.worksheets.push(_)}async _processCommentEntry(T,P,p){let y=new D,x=await y.parseStream(T);P.comments[`../${p}.xml`]=x}async _processTableEntry(T,P,p){let y=new A,x=await y.parseStream(T);P.tables[`../tables/${p}.xml`]=x}async _processWorksheetRelsEntry(T,P,p){let y=new m,x=await y.parseStream(T);P.worksheetRels[p]=x}async _processMediaEntry(T,P,p){let y=p.lastIndexOf(".");if(y>=1){let x=p.substr(y+1),w=p.substr(0,y);await new Promise((_,C)=>{let O=new c;O.on("finish",()=>{P.mediaIndex[p]=P.media.length,P.mediaIndex[w]=P.media.length;let z={type:"image",name:w,extension:x,buffer:O.toBuffer()};P.media.push(z),_()}),T.on("error",z=>{C(z)}),T.pipe(O)})}}async _processDrawingEntry(T,P,p){let y=new L,x=await y.parseStream(T);P.drawings[p]=x}async _processDrawingRelsEntry(T,P,p){let y=new m,x=await y.parseStream(T);P.drawingRels[p]=x}async _processVmlDrawingEntry(T,P,p){let y=new N,x=await y.parseStream(T);P.vmlDrawings[`../drawings/${p}.vml`]=x}async _processThemeEntry(T,P,p){await new Promise((y,x)=>{let w=new c;T.on("error",x),w.on("error",x),w.on("finish",()=>{P.themes[p]=w.read().toString(),y()}),T.pipe(w)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(T,P){!T[Symbol.asyncIterator]&&T.pipe&&(T=T.pipe(new t));let p=[];for await(let y of T)p.push(y);return this.load(o.concat(p),P)}async load(T,P){let p;p=P&&P.base64?o.from(T.toString(),"base64"):T;let y={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},x=await r.loadAsync(p);for(let w of Object.values(x.files))if(!w.dir){let _,C=w.name;if(C[0]==="/"&&(C=C.substr(1)),C.match(/xl\/media\//)||C.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))_=new t,_.write(await w.async("nodebuffer"));else{let O;_=new t({writableObjectMode:!0,readableObjectMode:!0}),O=l.browser?h(await w.async("nodebuffer")):await w.async("string");let z=16384;for(let $=0;$<O.length;$+=z)_.write(O.substring($,$+z))}switch(_.end(),C){case"_rels/.rels":y.globalRels=await this.parseRels(_);break;case"xl/workbook.xml":{let O=await this.parseWorkbook(_);y.sheets=O.sheets,y.definedNames=O.definedNames,y.views=O.views,y.properties=O.properties,y.calcProperties=O.calcProperties;break}case"xl/_rels/workbook.xml.rels":y.workbookRels=await this.parseRels(_);break;case"xl/sharedStrings.xml":y.sharedStrings=new b,await y.sharedStrings.parseStream(_);break;case"xl/styles.xml":y.styles=new f,await y.styles.parseStream(_);break;case"docProps/app.xml":{let O=new k,z=await O.parseStream(_);y.company=z.company,y.manager=z.manager;break}case"docProps/core.xml":{let O=new u,z=await O.parseStream(_);Object.assign(y,z);break}default:{let O=C.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(O){await this._processWorksheetEntry(_,y,O[1],P,C);break}if(O=C.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),O){await this._processWorksheetRelsEntry(_,y,O[1]);break}if(O=C.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),O){await this._processThemeEntry(_,y,O[1]);break}if(O=C.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),O){await this._processMediaEntry(_,y,O[1]);break}if(O=C.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),O){await this._processDrawingEntry(_,y,O[1]);break}if(O=C.match(/xl\/(comments\d+)[.]xml/),O){await this._processCommentEntry(_,y,O[1]);break}if(O=C.match(/xl\/tables\/(table\d+)[.]xml/),O){await this._processTableEntry(_,y,O[1]);break}if(O=C.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),O){await this._processDrawingRelsEntry(_,y,O[1]);break}if(O=C.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),O){await this._processVmlDrawingEntry(_,y,O[1]);break}}}}return this.reconcile(y,P),this.workbook.model=y,this.workbook}async addMedia(T,P){await Promise.all(P.media.map(async p=>{if(p.type==="image"){let y=`xl/media/${p.name}.${p.extension}`;if(p.filename){let x=await(function(w,_){return new Promise((C,O)=>{s.readFile(w,_,(z,$)=>{z?O(z):C($)})})})(p.filename);return T.append(x,{name:y})}if(p.buffer)return T.append(p.buffer,{name:y});if(p.base64){let x=p.base64,w=x.substring(x.indexOf(",")+1);return T.append(w,{name:y,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(T,P){let p=new L,y=new m;P.worksheets.forEach(x=>{let{drawing:w}=x;if(w){p.prepare(w,{});let _=p.toXml(w);T.append(_,{name:`xl/drawings/${w.name}.xml`}),_=y.toXml(w.rels),T.append(_,{name:`xl/drawings/_rels/${w.name}.xml.rels`})}})}addTables(T,P){let p=new A;P.worksheets.forEach(y=>{let{tables:x}=y;x.forEach(w=>{p.prepare(w,{});let _=p.toXml(w);T.append(_,{name:"xl/tables/"+w.target})})})}async addContentTypes(T,P){let p=new v().toXml(P);T.append(p,{name:"[Content_Types].xml"})}async addApp(T,P){let p=new k().toXml(P);T.append(p,{name:"docProps/app.xml"})}async addCore(T,P){let p=new u;T.append(p.toXml(P),{name:"docProps/core.xml"})}async addThemes(T,P){let p=P.themes||{theme1:q};Object.keys(p).forEach(y=>{let x=p[y],w=`xl/theme/${y}.xml`;T.append(x,{name:w})})}async addOfficeRels(T){let P=new m().toXml([{Id:"rId1",Type:j.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:j.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:j.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);T.append(P,{name:"_rels/.rels"})}async addWorkbookRels(T,P){let p=1,y=[{Id:"rId"+p++,Type:j.RelType.Styles,Target:"styles.xml"},{Id:"rId"+p++,Type:j.RelType.Theme,Target:"theme/theme1.xml"}];P.sharedStrings.count&&y.push({Id:"rId"+p++,Type:j.RelType.SharedStrings,Target:"sharedStrings.xml"}),P.worksheets.forEach(w=>{w.rId="rId"+p++,y.push({Id:w.rId,Type:j.RelType.Worksheet,Target:`worksheets/sheet${w.id}.xml`})});let x=new m().toXml(y);T.append(x,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(T,P){P.sharedStrings&&P.sharedStrings.count&&T.append(P.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(T,P){let{xml:p}=P.styles;p&&T.append(p,{name:"xl/styles.xml"})}async addWorkbook(T,P){let p=new B;T.append(p.toXml(P),{name:"xl/workbook.xml"})}async addWorksheets(T,P){let p=new R,y=new m,x=new D,w=new N;P.worksheets.forEach(_=>{let C=new a;p.render(C,_),T.append(C.xml,{name:`xl/worksheets/sheet${_.id}.xml`}),_.rels&&_.rels.length&&(C=new a,y.render(C,_.rels),T.append(C.xml,{name:`xl/worksheets/_rels/sheet${_.id}.xml.rels`})),_.comments.length>0&&(C=new a,x.render(C,_),T.append(C.xml,{name:`xl/comments${_.id}.xml`}),C=new a,w.render(C,_),T.append(C.xml,{name:`xl/drawings/vmlDrawing${_.id}.vml`}))})}_finalize(T){return new Promise((P,p)=>{T.on("finish",()=>{P(this)}),T.on("error",p),T.finalize()})}prepareModel(T,P){T.creator=T.creator||"ExcelJS",T.lastModifiedBy=T.lastModifiedBy||"ExcelJS",T.created=T.created||new Date,T.modified=T.modified||new Date,T.useSharedStrings=P.useSharedStrings===void 0||P.useSharedStrings,T.useStyles=P.useStyles===void 0||P.useStyles,T.sharedStrings=new b,T.styles=T.useStyles?new f(!0):new f.Mock;let p=new B,y=new R;p.prepare(T);let x={sharedStrings:T.sharedStrings,styles:T.styles,date1904:T.properties.date1904,drawingsCount:0,media:T.media};x.drawings=T.drawings=[],x.commentRefs=T.commentRefs=[];let w=0;T.tables=[],T.worksheets.forEach(_=>{_.tables.forEach(C=>{w++,C.target=`table${w}.xml`,C.id=w,T.tables.push(C)}),y.prepare(_,x)})}async write(T,P){P=P||{};let{model:p}=this.workbook,y=new n.ZipWriter(P.zip);return y.pipe(T),this.prepareModel(p,P),await this.addContentTypes(y,p),await this.addOfficeRels(y,p),await this.addWorkbookRels(y,p),await this.addWorksheets(y,p),await this.addSharedStrings(y,p),await this.addDrawings(y,p),await this.addTables(y,p),await Promise.all([this.addThemes(y,p),this.addStyles(y,p)]),await this.addMedia(y,p),await Promise.all([this.addApp(y,p),this.addCore(y,p)]),await this.addWorkbook(y,p),this._finalize(y)}writeFile(T,P){let p=s.createWriteStream(T);return new Promise((y,x)=>{p.on("finish",()=>{y()}),p.on("error",w=>{x(w)}),this.write(p,P).then(()=>{p.end()}).catch(w=>{x(w)})})}async writeBuffer(T){let P=new c;return await this.write(P,T),P.read()}}j.RelType=e("./rel-type"),d.exports=j}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(e,d,g){"use strict";d.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3
3
  <a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/> <a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/> <a:font script="Hans" typeface="\u5B8B\u4F53"/> <a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/> <a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/> <a:font script="Hans" typeface="\u5B8B\u4F53"/> <a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`},{}],146:[function(e,d,g){(function(l){(function(){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.CsvFormatterStream=void 0;let o=e("stream"),s=e("./formatter");class r extends o.Transform{constructor(n){super({writableObjectMode:n.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=n,this.rowFormatter=new s.RowFormatter(n),this.hasWrittenBOM=!n.writeBOM}transform(n){return this.rowFormatter.rowTransform=n,this}_transform(n,c,i){let a=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(n,(h,f)=>h?(a=!0,i(h)):(f&&f.forEach(u=>{this.push(l.from(u,"utf8"))}),a=!0,i()))}catch(h){if(a)throw h;i(h)}}_flush(n){this.rowFormatter.finish((c,i)=>c?n(c):(i&&i.forEach(a=>{this.push(l.from(a,"utf8"))}),n()))}}g.CsvFormatterStream=r}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.FormatterOptions=void 0,g.FormatterOptions=class{constructor(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var o;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
4
4
  `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,l||{}),l?.quoteHeaders===void 0&&(this.quoteHeaders=this.quoteColumns),l?.quote===!0?this.quote='"':l?.quote===!1&&(this.quote=""),typeof l?.escape!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((o=l.writeHeaders)===null||o===void 0||o),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(e,d,g){"use strict";var l=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(g,"__esModule",{value:!0}),g.FieldFormatter=void 0;let o=l(e("lodash.isboolean")),s=l(e("lodash.isnil")),r=l(e("lodash.escaperegexp"));g.FieldFormatter=class{constructor(t){this._headers=null,this.formatterOptions=t,t.headers!==null&&(this.headers=t.headers),this.REPLACE_REGEXP=new RegExp(t.quote,"g");let n=`[${t.delimiter}${r.default(t.rowDelimiter)}|\r|
@@ -26,26 +26,26 @@ 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 b(p){return typeof p=="boolean"}function m(p){return p===null}function v(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)}g.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 x=g.format.apply(g,arguments);console.error("%s %d: %s",p,y,x)}}else t[p]=function(){};return t[p]},g.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"},g.isArray=u,g.isBoolean=b,g.isNull=m,g.isNullOrUndefined=function(p){return p==null},g.isNumber=v,g.isString=k,g.isSymbol=function(p){return typeof p=="symbol"},g.isUndefined=B,g.isRegExp=R,g.isObject=L,g.isDate=A,g.isError=D,g.isFunction=N,g.isPrimitive=function(p){return p===null||typeof p=="boolean"||typeof p=="number"||typeof p=="string"||typeof p=="symbol"||p===void 0},g.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)}g.log=function(){console.log("%s - %s",T(),g.format.apply(g,arguments))},g.inherits=e("inherits"),g._extend=function(p,y){if(!y||!L(y))return p;for(var x=Object.keys(y),w=x.length;w--;)p[x[w]]=y[x[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,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),Object.defineProperty(g,"v1",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(g,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(g,"v4",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(g,"v5",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(g,"NIL",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(g,"version",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(g,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(g,"stringify",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(g,"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,g){"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,b,m){return o((v=o(o(h,a),o(u,m)))<<(k=b)|v>>>32-k,f);var v,k}function r(a,h,f,u,b,m,v){return s(h&f|~h&u,a,h,b,m,v)}function t(a,h,f,u,b,m,v){return s(h&u|f&~u,a,h,b,m,v)}function n(a,h,f,u,b,m,v){return s(h^f^u,a,h,b,m,v)}function c(a,h,f,u,b,m,v){return s(f^(h|~u),a,h,b,m,v)}Object.defineProperty(g,"__esModule",{value:!0}),g.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 b=0;b<u;b+=8){let m=h[b>>5]>>>b%32&255,v=parseInt("0123456789abcdef".charAt(m>>>4&15)+"0123456789abcdef".charAt(15&m),16);f.push(v)}return f})((function(h,f){h[f>>5]|=128<<f%32,h[l(f)-1]=f;let u=1732584193,b=-271733879,m=-1732584194,v=271733878;for(let k=0;k<h.length;k+=16){let B=u,R=b,L=m,A=v;u=r(u,b,m,v,h[k],7,-680876936),v=r(v,u,b,m,h[k+1],12,-389564586),m=r(m,v,u,b,h[k+2],17,606105819),b=r(b,m,v,u,h[k+3],22,-1044525330),u=r(u,b,m,v,h[k+4],7,-176418897),v=r(v,u,b,m,h[k+5],12,1200080426),m=r(m,v,u,b,h[k+6],17,-1473231341),b=r(b,m,v,u,h[k+7],22,-45705983),u=r(u,b,m,v,h[k+8],7,1770035416),v=r(v,u,b,m,h[k+9],12,-1958414417),m=r(m,v,u,b,h[k+10],17,-42063),b=r(b,m,v,u,h[k+11],22,-1990404162),u=r(u,b,m,v,h[k+12],7,1804603682),v=r(v,u,b,m,h[k+13],12,-40341101),m=r(m,v,u,b,h[k+14],17,-1502002290),b=r(b,m,v,u,h[k+15],22,1236535329),u=t(u,b,m,v,h[k+1],5,-165796510),v=t(v,u,b,m,h[k+6],9,-1069501632),m=t(m,v,u,b,h[k+11],14,643717713),b=t(b,m,v,u,h[k],20,-373897302),u=t(u,b,m,v,h[k+5],5,-701558691),v=t(v,u,b,m,h[k+10],9,38016083),m=t(m,v,u,b,h[k+15],14,-660478335),b=t(b,m,v,u,h[k+4],20,-405537848),u=t(u,b,m,v,h[k+9],5,568446438),v=t(v,u,b,m,h[k+14],9,-1019803690),m=t(m,v,u,b,h[k+3],14,-187363961),b=t(b,m,v,u,h[k+8],20,1163531501),u=t(u,b,m,v,h[k+13],5,-1444681467),v=t(v,u,b,m,h[k+2],9,-51403784),m=t(m,v,u,b,h[k+7],14,1735328473),b=t(b,m,v,u,h[k+12],20,-1926607734),u=n(u,b,m,v,h[k+5],4,-378558),v=n(v,u,b,m,h[k+8],11,-2022574463),m=n(m,v,u,b,h[k+11],16,1839030562),b=n(b,m,v,u,h[k+14],23,-35309556),u=n(u,b,m,v,h[k+1],4,-1530992060),v=n(v,u,b,m,h[k+4],11,1272893353),m=n(m,v,u,b,h[k+7],16,-155497632),b=n(b,m,v,u,h[k+10],23,-1094730640),u=n(u,b,m,v,h[k+13],4,681279174),v=n(v,u,b,m,h[k],11,-358537222),m=n(m,v,u,b,h[k+3],16,-722521979),b=n(b,m,v,u,h[k+6],23,76029189),u=n(u,b,m,v,h[k+9],4,-640364487),v=n(v,u,b,m,h[k+12],11,-421815835),m=n(m,v,u,b,h[k+15],16,530742520),b=n(b,m,v,u,h[k+2],23,-995338651),u=c(u,b,m,v,h[k],6,-198630844),v=c(v,u,b,m,h[k+7],10,1126891415),m=c(m,v,u,b,h[k+14],15,-1416354905),b=c(b,m,v,u,h[k+5],21,-57434055),u=c(u,b,m,v,h[k+12],6,1700485571),v=c(v,u,b,m,h[k+3],10,-1894986606),m=c(m,v,u,b,h[k+10],15,-1051523),b=c(b,m,v,u,h[k+1],21,-2054922799),u=c(u,b,m,v,h[k+8],6,1873313359),v=c(v,u,b,m,h[k+15],10,-30611744),m=c(m,v,u,b,h[k+6],15,-1560198380),b=c(b,m,v,u,h[k+13],21,1309151649),u=c(u,b,m,v,h[k+4],6,-145523070),v=c(v,u,b,m,h[k+11],10,-1120210379),m=c(m,v,u,b,h[k+2],15,718787259),b=c(b,m,v,u,h[k+9],21,-343485551),u=o(u,B),b=o(b,R),m=o(m,L),v=o(v,A)}return[u,b,m,v]})((function(h){if(h.length===0)return[];let f=8*h.length,u=new Uint32Array(l(f));for(let b=0;b<f;b+=8)u[b>>5]|=(255&h[b/8])<<b%32;return u})(a),8*a.length))};g.default=i},{}],530:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,g.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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};g.default=s},{"./validate.js":541}],532:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,g.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,g){"use strict";let l;Object.defineProperty(g,"__esModule",{value:!0}),g.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,g){"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(g,"__esModule",{value:!0}),g.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],b=n[1],m=n[2],v=n[3],k=n[4];for(let B=0;B<80;++B){let R=Math.floor(B/20),L=o(u,5)+l(R,b,m,v)+k+t[R]+f[B]>>>0;k=v,v=m,m=o(b,30)>>>0,b=u,u=L}n[0]=n[0]+u>>>0,n[1]=n[1]+b>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+v>>>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]]};g.default=s},{}],535:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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};g.default=r},{"./validate.js":541}],536:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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,b=h||new Array(16),m=(a=a||{}).node||r,v=a.clockseq!==void 0?a.clockseq:t;if(m==null||v==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]]),v==null&&(v=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&&(v=v+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=v,k+=122192928e5;let L=(1e4*(268435455&k)+B)%4294967296;b[u++]=L>>>24&255,b[u++]=L>>>16&255,b[u++]=L>>>8&255,b[u++]=255&L;let A=k/4294967296*1e4&268435455;b[u++]=A>>>8&255,b[u++]=255&A,b[u++]=A>>>24&15|16,b[u++]=A>>>16&255,b[u++]=v>>>8|128,b[u++]=255&v;for(let D=0;D<6;++D)b[u+D]=m[D];return h||(0,o.default)(b)};g.default=i},{"./rng.js":533,"./stringify.js":535}],537:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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);g.default=r},{"./md5.js":529,"./v35.js":538}],538:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.default=function(n,c,i){function a(h,f,u,b){if(typeof h=="string"&&(h=(function(v){v=unescape(encodeURIComponent(v));let k=[];for(let B=0;B<v.length;++B)k.push(v.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){b=b||0;for(let v=0;v<16;++v)u[b+v]=m[v];return u}return(0,l.default)(m)}try{a.name=n}catch{}return a.DNS=r,a.URL=t,a},g.URL=g.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";g.DNS=r;let t="6ba7b811-9dad-11d1-80b4-00c04fd430c8";g.URL=t},{"./parse.js":531,"./stringify.js":535}],539:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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)};g.default=r},{"./rng.js":533,"./stringify.js":535}],540:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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);g.default=r},{"./sha1.js":534,"./v35.js":538}],541:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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)};g.default=s},{"./regex.js":532}],542:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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)};g.default=s},{"./validate.js":541}],543:[function(e,d,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.CHAR=`
27
27
  \r -\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}`,g.S=` \r
28
28
  `,g.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}",g.NAME_CHAR="-"+g.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.CHAR_RE=new RegExp("^["+g.CHAR+"]$","u"),g.S_RE=new RegExp("^["+g.S+"]+$","u"),g.NAME_START_CHAR_RE=new RegExp("^["+g.NAME_START_CHAR+"]$","u"),g.NAME_CHAR_RE=new RegExp("^["+g.NAME_CHAR+"]$","u"),g.NAME_RE=new RegExp("^["+g.NAME_START_CHAR+"]["+g.NAME_CHAR+"]*$","u"),g.NMTOKEN_RE=new RegExp("^["+g.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}g.S_LIST=[32,10,13,9],g.isChar=function(o){return o>=32&&o<=55295||o===10||o===13||o===9||o>=57344&&o<=65533||o>=65536&&o<=1114111},g.isS=function(o){return o===32||o===10||o===13||o===9},g.isNameStartChar=l,g.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,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.CHAR="-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}",g.RESTRICTED_CHAR="-\b\v\f-\x7F-\x84\x86-\x9F",g.S=` \r
29
- `,g.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}",g.NAME_CHAR="-"+g.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.CHAR_RE=new RegExp("^["+g.CHAR+"]$","u"),g.RESTRICTED_CHAR_RE=new RegExp("^["+g.RESTRICTED_CHAR+"]$","u"),g.S_RE=new RegExp("^["+g.S+"]+$","u"),g.NAME_START_CHAR_RE=new RegExp("^["+g.NAME_START_CHAR+"]$","u"),g.NAME_CHAR_RE=new RegExp("^["+g.NAME_CHAR+"]$","u"),g.NAME_RE=new RegExp("^["+g.NAME_START_CHAR+"]["+g.NAME_CHAR+"]*$","u"),g.NMTOKEN_RE=new RegExp("^["+g.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}g.S_LIST=[32,10,13,9],g.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},g.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},g.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},g.isS=function(o){return o===32||o===10||o===13||o===9},g.isNameStartChar=l,g.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,g){"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(g,"__esModule",{value:!0}),g.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}",g.NC_NAME_CHAR="-"+g.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.NC_NAME_START_CHAR_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]$","u"),g.NC_NAME_CHAR_RE=new RegExp("^["+g.NC_NAME_CHAR+"]$","u"),g.NC_NAME_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]["+g.NC_NAME_CHAR+"]*$","u"),g.isNCNameStartChar=l,g.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 af="waiting",P7="replied";var go={basis:"count",default_capacity:0,by_account:{}};function L7(e){let d=e&&typeof e=="object"&&!Array.isArray(e)?e:{},g=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:g,default_capacity:l,by_account:o}}import{createContext as zg,useContext as jg,useMemo as cf}from"react";import{Box as Fg}from"@mui/material";var Cc="--app-mobile-font-offset";function Sr(e,d=0){return`calc(${e}px + max(0px, var(${Cc}, 0px) - ${d}px))`}import{jsx as lf}from"react/jsx-runtime";var uf=zg({});function qg({config:e,children:d}){let g=cf(()=>e??{},[e]),l=g.mobileFontOffsetPx;return lf(uf.Provider,{value:g,children:l===void 0?d:lf(Fg,{sx:{display:"contents",[Cc]:`${l}px`},children:d})})}function bt(){return jg(uf)}function Ms(){let{buildFileUrl:e}=bt();return cf(()=>e||((d,g)=>{let l=[];return g?.thumb&&l.push(`thumb=${g.thumb}`),g?.download&&l.push("download=1"),`/api/v1/files/${d}${l.length?`?${l.join("&")}`:""}`}),[e])}function Rs(){let{uploadMaxMb:e}=bt();return e??50}import{useGlobalForm as Ty}from"@ehfuse/forma";import df from"@mui/icons-material/DoNotDisturbAltOutlined";import ff from"@mui/icons-material/BookmarkBorderOutlined";import $g from"@mui/icons-material/LabelOutlined";import Hg from"@mui/icons-material/FlagOutlined";import Wg from"@mui/icons-material/StarBorderOutlined";import Ug from"@mui/icons-material/FolderOutlined";import Vg from"@mui/icons-material/EventOutlined";import Kg from"@mui/icons-material/BuildOutlined";import Gg from"@mui/icons-material/LocalShippingOutlined";import Yg from"@mui/icons-material/StorefrontOutlined";import Xg from"@mui/icons-material/GroupsOutlined";import Zg from"@mui/icons-material/LightbulbOutlined";import Jg from"@mui/icons-material/FavoriteBorderOutlined";import Qg from"@mui/icons-material/AssignmentOutlined";import eb from"@mui/icons-material/HomeOutlined";import tb from"@mui/icons-material/WorkOutline";import rb from"@mui/icons-material/SchoolOutlined";import nb from"@mui/icons-material/LocalHospitalOutlined";import ob from"@mui/icons-material/RestaurantOutlined";import ib from"@mui/icons-material/LocalFloristOutlined";import sb from"@mui/icons-material/DirectionsCarOutlined";import ab from"@mui/icons-material/CampaignOutlined";import lb from"@mui/icons-material/SavingsOutlined";import cb from"@mui/icons-material/Inventory2Outlined";import ub from"@mui/icons-material/CleaningServicesOutlined";import hf from"@mui/icons-material/HandymanOutlined";import db from"@mui/icons-material/LocalPhoneOutlined";import fb from"@mui/icons-material/EmailOutlined";import hb from"@mui/icons-material/ShoppingCartOutlined";import pb from"@mui/icons-material/BarChartOutlined";import mb from"@mui/icons-material/PrintOutlined";import gb from"@mui/icons-material/SecurityOutlined";import bb from"@mui/icons-material/AlarmOutlined";import yb from"@mui/icons-material/AttachFileOutlined";import xb from"@mui/icons-material/PhotoCameraOutlined";import vb from"@mui/icons-material/ImageOutlined";import wb from"@mui/icons-material/MenuBookOutlined";import _b from"@mui/icons-material/EditOutlined";import kb from"@mui/icons-material/KeyOutlined";import Sb from"@mui/icons-material/LockOutlined";import Tb from"@mui/icons-material/LockOpenOutlined";import Cb from"@mui/icons-material/SettingsOutlined";import Bb from"@mui/icons-material/CloudOutlined";import Ib from"@mui/icons-material/WifiOutlined";import Eb from"@mui/icons-material/ComputerOutlined";import Mb from"@mui/icons-material/SmartphoneOutlined";import Rb from"@mui/icons-material/TvOutlined";import Ob from"@mui/icons-material/AccessTimeOutlined";import Ab from"@mui/icons-material/TimerOutlined";import Db from"@mui/icons-material/MapOutlined";import Pb from"@mui/icons-material/PlaceOutlined";import Nb from"@mui/icons-material/NavigationOutlined";import Lb from"@mui/icons-material/FlightOutlined";import zb from"@mui/icons-material/TrainOutlined";import jb from"@mui/icons-material/DirectionsBusOutlined";import Fb from"@mui/icons-material/DirectionsBikeOutlined";import qb from"@mui/icons-material/DirectionsWalkOutlined";import $b from"@mui/icons-material/DirectionsRunOutlined";import Hb from"@mui/icons-material/FitnessCenterOutlined";import Wb from"@mui/icons-material/SportsSoccerOutlined";import Ub from"@mui/icons-material/EmojiEventsOutlined";import Vb from"@mui/icons-material/CardGiftcardOutlined";import Kb from"@mui/icons-material/CakeOutlined";import pf from"@mui/icons-material/CoffeeOutlined";import Gb from"@mui/icons-material/LocalPizzaOutlined";import Yb from"@mui/icons-material/ShoppingBagOutlined";import mf from"@mui/icons-material/CreditCardOutlined";import Xb from"@mui/icons-material/AccountBalanceOutlined";import Zb from"@mui/icons-material/AccountBalanceWalletOutlined";import Jb from"@mui/icons-material/AttachMoneyOutlined";import Qb from"@mui/icons-material/ReceiptLongOutlined";import e1 from"@mui/icons-material/CalculateOutlined";import t1 from"@mui/icons-material/TrendingUpOutlined";import r1 from"@mui/icons-material/ListAltOutlined";import n1 from"@mui/icons-material/TaskAltOutlined";import o1 from"@mui/icons-material/DoneAllOutlined";import i1 from"@mui/icons-material/WarningAmberOutlined";import s1 from"@mui/icons-material/InfoOutlined";import a1 from"@mui/icons-material/HelpOutlined";import l1 from"@mui/icons-material/SupportAgentOutlined";import c1 from"@mui/icons-material/PersonOutlined";import u1 from"@mui/icons-material/PersonAddOutlined";import d1 from"@mui/icons-material/BadgeOutlined";import f1 from"@mui/icons-material/WbSunnyOutlined";import h1 from"@mui/icons-material/DarkModeOutlined";import p1 from"@mui/icons-material/LocalFireDepartmentOutlined";import m1 from"@mui/icons-material/WaterDropOutlined";import g1 from"@mui/icons-material/BoltOutlined";import b1 from"@mui/icons-material/AutorenewOutlined";import y1 from"@mui/icons-material/ScienceOutlined";import x1 from"@mui/icons-material/MedicalServicesOutlined";import v1 from"@mui/icons-material/NotificationsOutlined";import w1 from"@mui/icons-material/SendOutlined";import _1 from"@mui/icons-material/LinkOutlined";import k1 from"@mui/icons-material/PublicOutlined";import gf from"@mui/icons-material/ApartmentOutlined";import S1 from"@mui/icons-material/PlumbingOutlined";import T1 from"@mui/icons-material/ElectricalServicesOutlined";import C1 from"@mui/icons-material/ChatOutlined";import B1 from"@mui/icons-material/DescriptionOutlined";import I1 from"@mui/icons-material/FactCheckOutlined";import E1 from"@mui/icons-material/RocketLaunchOutlined";import M1 from"@mui/icons-material/PaletteOutlined";import R1 from"@mui/icons-material/MusicNoteOutlined";import O1 from"@mui/icons-material/VideocamOutlined";import A1 from"@mui/icons-material/ThumbUpOutlined";import D1 from"@mui/icons-material/PushPinOutlined";import P1 from"@mui/icons-material/SearchOutlined";import N1 from"@mui/icons-material/VisibilityOutlined";import L1 from"@mui/icons-material/VerifiedOutlined";import z1 from"@mui/icons-material/TrackChangesOutlined";import j1 from"@mui/icons-material/ExtensionOutlined";import F1 from"@mui/icons-material/CodeOutlined";import q1 from"@mui/icons-material/BugReportOutlined";import $1 from"@mui/icons-material/SmartToyOutlined";import H1 from"@mui/icons-material/StorageOutlined";import W1 from"@mui/icons-material/QrCode2Outlined";import U1 from"@mui/icons-material/FileDownloadOutlined";import V1 from"@mui/icons-material/FileUploadOutlined";import K1 from"@mui/icons-material/MicOutlined";import G1 from"@mui/icons-material/HeadphonesOutlined";import Y1 from"@mui/icons-material/MovieOutlined";import X1 from"@mui/icons-material/SportsEsportsOutlined";import Z1 from"@mui/icons-material/BrushOutlined";import J1 from"@mui/icons-material/ArchitectureOutlined";import Q1 from"@mui/icons-material/EngineeringOutlined";import ey from"@mui/icons-material/FactoryOutlined";import ty from"@mui/icons-material/AgricultureOutlined";import ry from"@mui/icons-material/DirectionsBoatOutlined";import ny from"@mui/icons-material/TwoWheelerOutlined";import oy from"@mui/icons-material/HandshakeOutlined";import iy from"@mui/icons-material/GavelOutlined";import sy from"@mui/icons-material/BalanceOutlined";import ay from"@mui/icons-material/TranslateOutlined";import ly from"@mui/icons-material/PsychologyOutlined";import cy from"@mui/icons-material/PetsOutlined";import uy from"@mui/icons-material/CelebrationOutlined";import dy from"@mui/icons-material/BeachAccessOutlined";import fy from"@mui/icons-material/AcUnitOutlined";import hy from"@mui/icons-material/ForestOutlined";import py from"@mui/icons-material/LandscapeOutlined";import my from"@mui/icons-material/HotelOutlined";import gy from"@mui/icons-material/LocalLaundryServiceOutlined";import by from"@mui/icons-material/ChairOutlined";import yy from"@mui/icons-material/LocalBarOutlined";import xy from"@mui/icons-material/LunchDiningOutlined";import vy from"@mui/icons-material/IcecreamOutlined";import wy from"@mui/icons-material/WorkspacePremiumOutlined";import _y from"@mui/icons-material/DiamondOutlined";import ky from"@mui/icons-material/VaccinesOutlined";var Bc="bookmark",bo="label",lr="notifications",dr="event",Os="warning",As="#e53e3e",bf="none",Ic=[{key:bf,Icon:df},{key:"label",Icon:$g},{key:"bookmark",Icon:ff},{key:"flag",Icon:Hg},{key:"star",Icon:Wg},{key:"folder",Icon:Ug},{key:"event",Icon:Vg},{key:"build",Icon:Kg},{key:"shipping",Icon:Gg},{key:"store",Icon:Yg},{key:"groups",Icon:Xg},{key:"idea",Icon:Zg},{key:"heart",Icon:Jg},{key:"assignment",Icon:Qg},{key:"home",Icon:eb},{key:"work",Icon:tb},{key:"school",Icon:rb},{key:"hospital",Icon:nb},{key:"restaurant",Icon:ob},{key:"flower",Icon:ib},{key:"car",Icon:sb},{key:"campaign",Icon:ab},{key:"savings",Icon:lb},{key:"inventory",Icon:cb},{key:"cleaning",Icon:ub},{key:"handyman",Icon:hf},{key:"phone",Icon:db},{key:"email",Icon:fb},{key:"cart",Icon:hb},{key:"chart",Icon:pb},{key:"print",Icon:mb},{key:"security",Icon:gb},{key:"alarm",Icon:bb},{key:"attach",Icon:yb},{key:"camera",Icon:xb},{key:"image",Icon:vb},{key:"book",Icon:wb},{key:"edit",Icon:_b},{key:"key",Icon:kb},{key:"lock",Icon:Sb},{key:"unlock",Icon:Tb},{key:"settings",Icon:Cb},{key:"cloud",Icon:Bb},{key:"wifi",Icon:Ib},{key:"computer",Icon:Eb},{key:"smartphone",Icon:Mb},{key:"tv",Icon:Rb},{key:"clock",Icon:Ob},{key:"timer",Icon:Ab},{key:"map",Icon:Db},{key:"place",Icon:Pb},{key:"navigation",Icon:Nb},{key:"flight",Icon:Lb},{key:"train",Icon:zb},{key:"bus",Icon:jb},{key:"bike",Icon:Fb},{key:"walk",Icon:qb},{key:"run",Icon:$b},{key:"fitness",Icon:Hb},{key:"soccer",Icon:Wb},{key:"trophy",Icon:Ub},{key:"gift",Icon:Vb},{key:"cake",Icon:Kb},{key:"coffee",Icon:pf},{key:"pizza",Icon:Gb},{key:"bag",Icon:Yb},{key:"card",Icon:mf},{key:"bank",Icon:Xb},{key:"wallet",Icon:Zb},{key:"money",Icon:Jb},{key:"receipt",Icon:Qb},{key:"calculate",Icon:e1},{key:"trending",Icon:t1},{key:"listalt",Icon:r1},{key:"task",Icon:n1},{key:"doneall",Icon:o1},{key:"warning",Icon:i1},{key:"info",Icon:s1},{key:"help",Icon:a1},{key:"support",Icon:l1},{key:"person",Icon:c1},{key:"personadd",Icon:u1},{key:"badge",Icon:d1},{key:"sun",Icon:f1},{key:"moon",Icon:h1},{key:"fire",Icon:p1},{key:"water",Icon:m1},{key:"bolt",Icon:g1},{key:"renew",Icon:b1},{key:"science",Icon:y1},{key:"medical",Icon:x1},{key:"notifications",Icon:v1},{key:"send",Icon:w1},{key:"link",Icon:_1},{key:"public",Icon:k1},{key:"apartment",Icon:gf},{key:"plumbing",Icon:S1},{key:"electrical",Icon:T1},{key:"chat",Icon:C1},{key:"description",Icon:B1},{key:"factcheck",Icon:I1},{key:"rocket",Icon:E1},{key:"palette",Icon:M1},{key:"music",Icon:R1},{key:"video",Icon:O1},{key:"thumbup",Icon:A1},{key:"pin",Icon:D1},{key:"search",Icon:P1},{key:"eye",Icon:N1},{key:"verified",Icon:L1},{key:"target",Icon:z1},{key:"extension",Icon:j1},{key:"code",Icon:F1},{key:"bug",Icon:q1},{key:"robot",Icon:$1},{key:"storage",Icon:H1},{key:"qrcode",Icon:W1},{key:"download",Icon:U1},{key:"upload",Icon:V1},{key:"mic",Icon:K1},{key:"headphones",Icon:G1},{key:"movie",Icon:Y1},{key:"game",Icon:X1},{key:"brush",Icon:Z1},{key:"architecture",Icon:J1},{key:"engineering",Icon:Q1},{key:"factory",Icon:ey},{key:"agriculture",Icon:ty},{key:"boat",Icon:ry},{key:"motorcycle",Icon:ny},{key:"handshake",Icon:oy},{key:"gavel",Icon:iy},{key:"balance",Icon:sy},{key:"translate",Icon:ay},{key:"psychology",Icon:ly},{key:"pets",Icon:cy},{key:"celebration",Icon:uy},{key:"beach",Icon:dy},{key:"snow",Icon:fy},{key:"forest",Icon:hy},{key:"mountain",Icon:py},{key:"hotel",Icon:my},{key:"laundry",Icon:gy},{key:"chair",Icon:by},{key:"bar",Icon:yy},{key:"burger",Icon:xy},{key:"icecream",Icon:vy},{key:"medal",Icon:wy},{key:"diamond",Icon:_y},{key:"vaccine",Icon:ky}],Sy={cafe:pf,payment:mf,business:gf,construction:hf};function Mt(e){return e===bf?null:Ic.find(d=>d.key===e)?.Icon??Sy[String(e??"")]??ff}function AB(e){return Mt(e)??df}var Ec={title:"",icon:bo,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:""},Mc={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function Cy(e){let{formId:d="taskbox-create-form",initialValues:g,onValidate:l,onSubmit:o}=e;return Ty({formId:d,initialValues:{...Ec,...g},onValidate:l,onSubmit:o})}import{useGlobalFormaState as By}from"@ehfuse/forma";var yf="taskbox-ui-state";function yo(){return By({stateId:yf,initialValues:Mc})}import{useMemo as Iy}from"react";import{useTheme as Ey}from"@mui/material";function zi(e,d){let g=Math.max(0,Math.min(1,d));if(g<=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}, ${g})`}function xf(e,d){let g=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)*g),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 Rc(e,d,g){return g==="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 My(e,d){let g=d==="dark";return{bg:g?xf(e.accent,.45):e.accent,color:g?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6,paddingY:.4}}function vf(e,d){return{...e,...d??{}}}function qa(e,d="light"){let g=d==="dark",l=My(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:g?"#3a434f":e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:g?"#1a1e24":e.surface,dateBandBg:e.surface,otherMonthBg:g?"#1a1e24":e.surface,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:g?"#232a33":e.surface,borderColor:g?"#333c47":e.border,hoverBg:g?"#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 Oc(e,d){if(!d)return e;let g=d.mode??e.mode,o={...g===e.mode?e.colors:Rc(e.colors.accent,e.colors.accentContrast,g),...d.colors??{}},s=qa(o,g),{groupHeader:r,...t}=d.table??{},{badge:n,...c}=d.board??{},{badge:i,...a}=r??{};return{mode:g,colors:o,table:{...s.table,...t,groupHeader:{...s.table.groupHeader,...a,badge:vf(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:vf(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 Ry(e={}){let{mode:d="light",accent:g="#2563eb",accentContrast:l="#ffffff",input:o}=e;return Oc(qa(Rc(g,l,d),d),o)}function it(){let e=Ey(),{theme:d}=bt(),g=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return Iy(()=>Oc(qa(Rc(g,l,o),o),d),[g,l,o,d])}import{useCallback as Zn,useEffect as $s,useMemo as Pn,useRef as su,useState as Jn}from"react";import{Box as nr,Divider as Rv,IconButton as Ov,ListItemIcon as Av,Menu as ah,MenuItem as dl}from"@mui/material";import lh from"@mui/icons-material/Add";import Dv from"@mui/icons-material/ArrowUpward";import Pv from"@mui/icons-material/ArrowDownward";import Nv from"@mui/icons-material/KeyboardArrowDown";import Lv from"@mui/icons-material/KeyboardArrowRight";import au from"@mui/icons-material/Check";import zv from"@mui/icons-material/FilterList";import jv from"@mui/icons-material/InboxOutlined";import{Virtuoso as Fv}from"react-virtuoso";import qv from"@ehfuse/overlay-scrollbar";import{Box as wf}from"@mui/material";import{jsx as Ay,jsxs as Dy}from"react/jsx-runtime";var Oy={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 Hr({priority:e,small:d=!1,plain:g=!1}){let l=Oy[e],o=it(),s=o.mode==="dark",r=g||e==="low";return Dy(wf,{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?zi(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:[Ay(wf,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}import{Divider as jy,Menu as Fy,MenuItem as Cf}from"@mui/material";import qy from"@mui/icons-material/Check";function Kn(){return{}}var Ac=[{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"}],Dc=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],Pc=[{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 _f(e){return Ac.find(d=>d.key===e)?.name??""}function kf(e){return Dc.find(d=>d.key===e)?.name??""}function $a(e){return Pc.find(d=>d.key===e)?.name??""}function Nc(e,d=new Date){if(!e.is_event)return!1;let g=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(g))return!1;let l=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(l)){let s=new Date(`${g}T${l}:00`);return!Number.isNaN(s.getTime())&&s.getTime()<=d.getTime()}let o=new Date(`${g}T00:00:00`);return Number.isNaN(o.getTime())?!1:(o.setDate(o.getDate()+1),o.getTime()<=d.getTime())}function Ha(e,d=new Date){return e.is_event?Nc(e,d):!!e.completed}var dn=[{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"}],Ns=dn;function Wa(e){return dn.find(d=>d.key===e)??dn[0]}var Ds={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function fr(e){if(e.is_notice)return Sf(e.status);if(e.is_bug&&e.completed){let d=$a(e.resolution)||"\uC644\uB8CC";return{...Ds,name:d}}return e.completed&&e.status!=="hold"?Ds:e.is_bug?Ny(e.status):Wa(e.status)}var Py={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function Ls(e){return Nc(e)?Py:null}var Ps=[{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 Sf(e){return Ps.find(d=>d.key===e)??Ps[1]}var Lc="__closed__",hi=[{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"}],aI=[...hi.filter(e=>e.key!=="bug_hold"),{key:Lc,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...hi.filter(e=>e.key==="bug_hold")];function Ny(e){return hi.find(d=>d.key===e)??hi[0]}function Ua(e){return e.is_notice?Ps:e.is_bug?hi:Ns}function lI(e){return e.status===af}var Ly={in_progress:0,not_started:2,hold:3};function cI(e){return e.completed?9:Ly[String(e.status??"")]??2}function ji(e,d){let g=new Map(d.map(o=>[o.key,o])),l=(e.label_keys??[]).map(o=>g.get(o)).filter(o=>!!o);if(e.is_event){let o=Ls({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:[Sf(e.status),...l]:e.is_bug?[fr({...e,is_notice:!1}),...l]:e.completed?[Ds,...l]:[Wa(e.status),...l]}function Tf(e){return{bg:`${e}1f`,fg:e,dot:e}}function Va(e,d){return e.includes(d)?e.filter(g=>g!==d):[...e,d]}import{Box as Ka}from"@mui/material";import{jsx as zs,jsxs as zy}from"react/jsx-runtime";function Dt({option:e,small:d=!1}){let g=it(),l=g.mode==="dark",o=e.key==="not_started";return zy(Ka,{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?zi(e.dot,g.chip.darkBgAlpha):e.bg,color:o?l?g.chip.plainColor:e.fg:l?g.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[zs(Ka,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function mI({task:e,statusOptions:d,small:g=!1}){let l=ji(e,d);return l.length===0?null:zs(Ka,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>zs(Dt,{option:o,small:g},o.key))})}function Uo({labelKeys:e,labelOptions:d}){let g=new Map(d.map(o=>[o.key,o])),l=e.map(o=>g.get(o)).filter(o=>!!o);return l.length===0?null:zs(Ka,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>zs(Dt,{option:o,small:!0},o.key))})}import{jsx as js,jsxs as Bf}from"react/jsx-runtime";function Fi({anchorEl:e,value:d,options:g=dn,onSelect:l,onComplete:o,onClose:s}){let r=Kn();return Bf(Fy,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[g.map(t=>Bf(Cf,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[js(Dt,{option:t}),d===t.key?js(qy,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[js(jy,{sx:{my:.5}},"complete-divider"),js(Cf,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:js(Dt,{option:Ds})},"complete")]:null]})}function zc(e){let d=String(e??"").trim().replace("T"," "),g=d.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return g?new Date(Number(g[1]),Number(g[2])-1,Number(g[3]),Number(g[4]??0),Number(g[5]??0),Number(g[6]??0)):new Date(d)}function Tr(e,d="YYYY-MM-DD"){let g=typeof e=="string"?zc(e):e;if(!e||e===""||isNaN(g.getTime()))return"";let l=g.getFullYear(),o=(g.getMonth()+1).toString().padStart(2,"0"),s=g.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 If(){return Tr(new Date)}var jc=[{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"}],$y="__notice__",Hy="__bug__",Wy="__support__";function Uy(e){let d=new Date(`${e}T00:00:00`);return d.setDate(d.getDate()+(6-d.getDay())),Tr(d)}var Vy=[{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 Ky(e,d,g){let l=e.due_date.slice(0,10);return l?l<d?"overdue":l===d?"today":l<=g?"this_week":"later":"no_due"}function Ga(e,d,g,l=[],o=[],s="",r,t=!1){let n=e.filter(f=>f.is_notice);if(n.length>0){let f=Ga(e.filter(u=>!u.is_notice),d,g,l,o,s,r,t);return[{key:$y,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...f]}if(t){let f=e.filter(b=>b.is_bug),u=e.filter(b=>!b.is_bug&&b.is_support);if(f.length>0||u.length>0){let b=Ga(e.filter(m=>!m.is_bug&&!m.is_support),d,g,l,o,s,r,!1);return[...f.length>0?[{key:Hy,label:"\uC624\uB958",tasks:f}]:[],...u.length>0?[{key:Wy,label:"\uACE0\uAC1D\uC13C\uD130",tasks:u}]:[],...b]}}let c=new Map,i=(f,u)=>{let b=c.get(f);b?b.push(u):c.set(f,[u])},a;if(d==="due"){let f=Uy(g);for(let u of e)i(Ky(u,g,f),u);a=Vy}else if(d==="status"){for(let f of e)i(Wa(f.status).key,f);a=dn.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 b of e){if(b.is_event){i("__event__",b);continue}if(!(Number(b.manager_account_seq??0)>0||String(b.manager_name??"").trim()!=="")){i("__none__",b);continue}let v=f>0&&Number(b.manager_account_seq??0)===f||!!u&&String(b.manager_name??"").trim()===u;i(v?"__manager__":"__reference__",b)}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 v of e)i(v.is_event?"__event__":String(v.manager_name??"").trim()||"__none__",v);let f=s.trim(),u=[...c.keys()].filter(v=>v!=="__none__"&&v!=="__event__").sort((v,k)=>{if(f){if(v===f)return-1;if(k===f)return 1}return v.localeCompare(k)}),b=!!f&&u.includes(f),m=u.filter(v=>v!==f);a=[...b?[{key:f,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},...m.map(v=>({key:v,label:v}))]}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 Gy from"@mui/icons-material/LabelOutlined";import Yy from"@mui/icons-material/NotesOutlined";import Xy from"@mui/icons-material/AutorenewOutlined";import Zy from"@mui/icons-material/CalendarTodayOutlined";import Jy from"@mui/icons-material/EventOutlined";import Ef from"@mui/icons-material/PersonOutlineOutlined";import Mf from"@mui/icons-material/PeopleAltOutlined";import $c from"@mui/icons-material/CheckCircleOutlineOutlined";import Qy from"@mui/icons-material/FlagOutlined";import Hc from"@mui/icons-material/AccessTimeOutlined";import ex from"@mui/icons-material/StickyNote2Outlined";import tx from"@mui/icons-material/ViewKanbanOutlined";import rx from"@mui/icons-material/ConfirmationNumberOutlined";import nx from"@mui/icons-material/QuestionAnswerOutlined";import{jsx as hr}from"react/jsx-runtime";var Rf={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 Of(e){return Xa(e).map(d=>Rf[d.id]).join(" ")}function Af(e){return Xa(e).reduce((d,g)=>{let l=Rf[g.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 ox={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:hr(Hc,{sx:{fontSize:15}}),align:"center",sortable:!0},ix={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:hr(Hc,{sx:{fontSize:15}}),align:"center",sortable:!0},sx={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:hr(Hc,{sx:{fontSize:15}}),align:"center",sortable:!0},ax={id:"ticket_no",label:"\uD2F0\uCF13",icon:hr(rx,{sx:{fontSize:15}}),align:"center"},lx={id:"support_type",label:"\uC885\uB958",icon:hr(Gy,{sx:{fontSize:15}}),align:"center"},cx={id:"author_name",label:"\uC791\uC131\uC790",icon:hr(Ef,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},ux={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:hr(nx,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},dx={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:hr(tx,{sx:{fontSize:15}}),projectFilter:!0},fx={id:"targets",label:"\uB300\uC0C1\uC790",icon:hr(Mf,{sx:{fontSize:15}})},qc={id:"priority",label:"\uC911\uC694\uB3C4",icon:hr(Qy,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},hx={id:"ack",label:"\uD655\uC778",icon:hr($c,{sx:{fontSize:15}}),align:"center",ackFilter:!0},px={id:"confirm",label:"\uD655\uC778",icon:hr($c,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Fc(e){let d=e.findIndex(l=>l.id==="receiver_names"||l.id==="targets"),g=d>=0?d+1:e.findIndex(l=>l.id==="note");return g<0?[...e,qc]:[...e.slice(0,g),qc,...e.slice(g)]}function Xa(e){let{showProject:d=!1,showManager:g=!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=b=>Ya.find(m=>m.id===b);return[u("completed"),lx,u("title"),u("status"),sx,u("start_date"),u("due_date"),cx,ux,{...u("manager_name"),align:"center"},u("receiver_names"),qc]}let a=u=>{if(!r)return u;let b=u.filter(k=>k.id!=="note"),m=b.findIndex(k=>k.id==="completed"),v=m>=0?m+1:0;return[...b.slice(0,v),ax,...b.slice(v)]};if(s)return a(Fc(Ya.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,fx]:u.id==="note"?[hx,u]:[u])));let h=g?Ya:Ya.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(b=>b.id!=="request");let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),c?ox:ix,...h.slice(u)]}if(i==="action"){let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),px,...h.slice(u)]}if(!d)return a(Fc(h));let f=h.findIndex(u=>u.id==="receiver_names");return a(Fc([...h.slice(0,f+1),dx,...h.slice(f+1)]))}var Ya=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:hr(Yy,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:hr(Xy,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:hr(Zy,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:hr(Jy,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:hr(Ef,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:hr(Mf,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:hr($c,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:hr(ex,{sx:{fontSize:15}})}];import{Button as Df,ClickAwayListener as bx,Dialog as yx,Paper as xx,Popper as vx,Typography as wx,Box as _x}from"@mui/material";import{useMediaQuery as mx,useTheme as gx}from"@mui/material";function jt(){let{isMobile:e}=bt(),d=gx(),g=mx(d.breakpoints.up("lg"));return e!==void 0?e:!g}import{Fragment as Sx,jsx as Vo,jsxs as Nf}from"react/jsx-runtime";function Pf(){if(typeof document>"u")return;let e=0,d=l=>{l.stopPropagation(),l.preventDefault(),g()},g=()=>{window.clearTimeout(e),document.removeEventListener("click",d,!0)};document.addEventListener("click",d,!0),e=window.setTimeout(g,350)}function kx({title:e,content:d,confirmText:g,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return Nf(Sx,{children:[Vo(wx,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),d,Nf(_x,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[Vo(Df,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{Pf(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),Vo(Df,{size:"medium",variant:"contained",color:"primary",onClick:()=>{Pf(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:g})]})]})}function Pt({open:e,anchorEl:d,title:g="\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 b=jt(),m=Vo(kx,{title:g,content:l,confirmText:o,cancelText:s,titleFontSize:c,actionFontSize:i,actionMinHeight:a,onCancel:f,onConfirm:u});return b?Vo(yx,{open:e,onClose:f,sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:m}):Vo(vx,{open:e,anchorEl:d,placement:r,sx:{zIndex:h},children:Vo(bx,{onClickAway:f,children:Vo(xx,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:t,minHeight:n,justifyContent:n?"space-between":"flex-start"},onClick:v=>v.stopPropagation(),onMouseDown:v=>v.stopPropagation(),children:m})})})}import{useEffect as Tx,useState as Cx}from"react";import{Box as Bx,TextField as Ix}from"@mui/material";import{jsx as Wc}from"react/jsx-runtime";function rn(e,d){if(!e.completed||d<=0||!e.review_pending||(e.author_account_seq??0)!==d)return!1;let g=e.completed_by_account??0;return g>0&&g!==d}function nn({open:e,anchorEl:d,nextCompleted:g,returnMode:l=!1,onCancel:o,onConfirm:s}){let[r,t]=Cx("");Tx(()=>{e&&t("")},[e]);let n=!g&&l;return Wc(Pt,{open:e,anchorEl:d,title:n?`\uC644\uB8CC\uB97C \uB418\uB3CC\uB9AC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
30
- \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC \uCC98\uB9AC\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.`:g?"\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":g?"\uC644\uB8CC":"\uD574\uC81C",content:n?Wc(Bx,{sx:{mt:1},children:Wc(Ix,{autoFocus:!0,fullWidth:!0,multiline:!0,minRows:4,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()})}):void 0,onCancel:o,onConfirm:()=>{n&&!r.trim()||s(n?r.trim():"")}})}import{memo as Qx}from"react";function An(e){let d=e.visibility;return d==="involved"||d==="group"||d==="all"?d:e.is_open?"all":"involved"}function Za(e,d,g=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=An(e);if(o==="all")return!0;if(o==="group"){let s=e.visibility_group_seq??0;return s>0&&g===s}return!1}function Lf(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:An(e)!=="involved"}function Ja(e,d){return d<=0||(e.author_account_seq??0)===d?!1:Lf(e)}function Qa(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||Lf(e)?!1:(e.receiver_account_seqs??[]).includes(d)}function zf(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function jf(e){return(e.origin_license_seq??0)>0}function Ff(e,d){if(d<=0)return!1;let g=(e.author_account_seq??0)===d;return e.is_notice?g:g||(e.manager_account_seq??0)===d}function xo(e,d){return d<=0?!1:jf(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 nE=[119,121,141,143];function el(e,d){let g=String(e.origin_author_avatar??"").trim(),l=String(e.author_name||e.origin_author_name||e.created_by||"").trim();if(!g||!l||!jf(e)||d?.get(l)===g)return d;let o=new Map(d??[]);return o.set(l,g),o}import{memo as Hx,useEffect as Wx,useRef as Ux,useState as Kc}from"react";import{Box as kt,Button as Gf,ButtonBase as Vx,Checkbox as Kx,Tooltip as Vi}from"@mui/material";import Gx from"@mui/icons-material/PublicOutlined";import Yx from"@mui/icons-material/Group";import Xx from"@mui/icons-material/CheckCircle";import Zx from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as Ex,useState as qf}from"react";import{Avatar as $f,Box as Mx}from"@mui/material";import Rx from"@mui/icons-material/PersonOutlineOutlined";import{jsx as tl}from"react/jsx-runtime";var Uc=new Set,Hf=e=>e.startsWith("data:")||e.startsWith("blob:");function Ox(e){let d=e.trim();return d?([...d][0]??"").toUpperCase():""}function vn({src:e,name:d="",avatarSx:g,iconFontSize:l=40}){let[o,s]=qf(()=>e?Hf(e)||Uc.has(e):!1),[r,t]=qf(!1),n={position:"relative",overflow:"hidden",borderRadius:"15px"},c=g?[n,...Array.isArray(g)?g:[g]]:n;if(Ex(()=>{t(!1),s(e?Hf(e)||Uc.has(e):!1)},[e]),!e||r){let i=Ox(d);return tl($f,{sx:c,children:i?tl(Mx,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:i}):tl(Rx,{sx:{fontSize:l}})})}return tl($f,{src:e,imgProps:{onLoad:()=>{Uc.add(e),s(!0)},onError:()=>t(!0),style:o?void 0:{opacity:0}},sx:c})}var Ax=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),rl=(e,d)=>{if(!d||!d.trim())return[{text:e,highlight:!1}];try{let g=Ax(d.trim()),l=new RegExp(`(${g})`,"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 Dx=["\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 g=new Date(`${d}T00:00:00`);return Number.isNaN(g.getTime())?"":`${d.slice(2).replaceAll("-",".")} (${Dx[g.getDay()]})`}function Vc(e){let d=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(d))return"";let g=Number(d.slice(5,7)),l=Number(d.slice(8,10));return!g||!l?"":`${g}\uC6D4 ${l}\uC77C`}function fn(e){let d=String(e??"").trim(),[g,l=""]=d.split(" "),o=wn(g);return o?l?`${o} ${l.slice(0,5)}`:o:""}function qi(e,d){let g=(e.checklist??[]).filter(o=>!(d&&o.task_seq&&!d(Number(o.task_seq))));return g.length===0?"":`${g.filter(o=>o.checked).length}/${g.length}`}import{Box as Wf,Tooltip as Px}from"@mui/material";import{jsx as nl}from"react/jsx-runtime";var $i=[{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 Wr({names:e,size:d=22,ringFirst:g=!1,avatarSrcByName:l}){let o=it(),s=bt().avatarSrcByName,r=l??s;return nl(Wf,{sx:{display:"flex",alignItems:"center"},children:e.map((t,n)=>nl(Px,{title:g&&n===0?`\uCC45\uC784\uC790 \xB7 ${t}`:t,arrow:!0,children:nl(Wf,{sx:{ml:n===0?0:"-7px",zIndex:n,borderRadius:"50%",border:`2px solid ${o.avatar.separatorColor}`,display:"inline-flex",...o.avatar.sx},children:nl(vn,{src:r?.get(t)??"",name:t,avatarSx:{width:d,height:d,fontSize:Math.round(d/2),borderRadius:"50%",...$i[n%$i.length]},iconFontSize:Math.round(d*.6)})})},`${t}-${n}`))})}import{Box as Uf,Button as Kf}from"@mui/material";import Nx from"@mui/icons-material/CheckCircle";import{Fragment as jx,jsx as Fs,jsxs as Vf}from"react/jsx-runtime";function Lx(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 zx(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}}var Hi={minWidth:0,px:1.25,py:.25,fontSize:13,fontWeight:600,whiteSpace:"nowrap",color:"#fff",backgroundColor:"#8b5cf6",backgroundImage:"linear-gradient(180deg, #a685f9 0%, #8b5cf6 100%)",boxShadow:"none","&:hover":{backgroundColor:"#7c4ee8",backgroundImage:"linear-gradient(180deg, #9873f2 0%, #7c4ee8 100%)",boxShadow:"none"}};function Gn({onClick:e,children:d,fullWidth:g=!1,sx:l}){let o=it();return Fs(Kf,{size:"small",variant:"contained",color:"inherit",fullWidth:g,sx:[zx(o),...Array.isArray(l)?l:l?[l]:[]],onClick:s=>{s.stopPropagation(),e(s)},children:d})}function Wi({canConfirm:e,count:d,total:g,myConfirmed:l=!1,onConfirm:o,onShowList:s}){let r=it(),t=Lx(r);return e?Fs(Gn,{onClick:()=>o(),children:"\uD655\uC778"}):Vf(Kf,{size:"small",variant:"outlined",color:"inherit",sx:t,onClick:n=>{n.stopPropagation(),s(n.currentTarget)},children:[l?Fs(Nx,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,Fs(Uf,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:g>0&&d>=g?"\uD655\uC778\uC644\uB8CC":Vf(jx,{children:[d,Fs(Uf,{component:"span",sx:{mx:.15},children:"/"}),g]})})]})}import{jsx as Fx}from"react/jsx-runtime";function Ui({anchorEl:e,onCancel:d,onConfirm:g}){return Fx(Pt,{open:!!e,anchorEl:e,title:"\uAC80\uC218\uB97C \uC644\uB8CC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",onCancel:d,onConfirm:g})}import{SvgIcon as qx}from"@mui/material";import{jsx as ol,jsxs as $x}from"react/jsx-runtime";function Ko({sx:e,...d}){return $x(qx,{viewBox:"0 0 48 48",...d,sx:{fill:"none",...e},children:[ol("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"}),ol("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),ol("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),ol("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as il,jsx as je,jsxs as pi}from"react/jsx-runtime";function qs(e){let d=String(e??"").trim();if(!d)return"-";let g=d.slice(2,10).replaceAll("-","."),l=d.slice(11,16);return/^\d{2}:\d{2}$/.test(l)?`${g} ${l}`:g}function Jx(e){let d=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(d)?qs(`${String(e.due_date??"").slice(0,10)} ${d}`):qs(e.due_date)}function Yc(e,d){let g=String(e??"").trim()||"-";return rl(g,d).map((l,o)=>je("span",{className:l.highlight?"font-semibold text-blue-600":void 0,children:l.text},`${l.text}-${o}`))}function Ki({names:e,searchText:d,avatarSrcByName:g,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 pi(il,{children:[je(vn,{src:g?.get(s)??"",name:s,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...$i[0]},iconFontSize:15}),je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l?{fontWeight:500,color:"#2f80ed"}:{}},children:Yc(s,d)})]})}return je(Wr,{names:o,size:22,avatarSrcByName:g})}function Yf({display:e,summary:d,searchText:g,avatarSrcByName:l}){if(!e||e.kind==="everyone")return je(kt,{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(Ki,{names:s,searchText:g,avatarSrcByName:l});let r=[...o,...s],t=r.join(", ");return r.length>2?je(Vi,{title:t,arrow:!0,children:je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${r[0]}, ${r[1]} \uC678 ${r.length-2}\uBA85`})}):je(Vi,{title:t,arrow:!0,children:pi(kt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[je(kt,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.join(", ")+(s.length>0?",":"")}),s.length>0?je(Ki,{names:s,searchText:g,avatarSrcByName:l}):null]})})}function sl(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function Xf(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 Gc({label:e,bg:d,fg:g}){return je(kt,{component:"span",sx:{flexShrink:0,px:.75,fontSize:12,fontWeight:500,lineHeight:"20px",color:g,bgcolor:d,borderRadius:"4px",whiteSpace:"nowrap",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:e})}var Zf=Hx(function({task:d,gridTemplate:g,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:b=!1,trashMode:m=!1,dimCompleted:v=!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:x=!1,completeLocked:w=!1,unread:_=!1,notice:C=!1,noticeReadOnly:O=!1,readOnly:z=!1,onIconClick:$,lastColumnCentered:V=!1,noteLocked:M=!1,targetSummary:H="",targetDisplay:I,onArchiveTask:E,ackInfo:F,onAckConfirm:U,onAckListClick:Y,onPriorityClick:G}){let[W,X]=Kc(!1),[J,K]=Kc(null),[ee,Z]=Kc(""),re=Ux(null);Wx(()=>{if(!W)return;let be=Me=>{let Fe=re.current;Fe&&(Me.target instanceof Node&&Fe.contains(Me.target)||Fe.blur())};return document.addEventListener("mousedown",be,!0),document.addEventListener("touchstart",be,!0),()=>{document.removeEventListener("mousedown",be,!0),document.removeEventListener("touchstart",be,!0)}},[W]);let ie=[d.manager_account_seq??0,...d.receiver_account_seqs??[]].some(be=>be>0&&be!==(d.author_account_seq??0)),ne=O||z,ae=r>0&&!d.is_notice&&!d.is_event&&(d.manager_account_seq??0)===r,pe=ne||!!d.is_notice,ue=it(),ke=!!S&&Ja(d,r),Ne=!!T&&Qa(d,r),Ce=pe&&!zf(d),Oe=d.is_notice?je(Wi,{canConfirm:!!F?.canAck,count:F?.count??0,total:F?.total??0,myConfirmed:!!F?.acked,onConfirm:()=>U?.(d),onShowList:be=>Y?.(d,be)}):null,nt=!d.is_notice&&!d.completed&&!!d.due_date&&d.due_date.slice(0,10)<=t,me=bt(),oe=qi(d,me.resolveTask),Ie=!d.is_notice&&d.completed&&d.review_pending&&me.onReviewDone&&(me.myAccountSeq??0)>0&&(d.author_account_seq??0)===(me.myAccountSeq??0)?pi(il,{children:[je(Gf,{variant:"contained",size:"small",disableElevation:!0,onClick:be=>{be.stopPropagation(),K(be.currentTarget)},sx:Hi,children:"\uAC80\uC218\uC644\uB8CC"}),je(Ui,{anchorEl:J,onCancel:()=>K(null),onConfirm:()=>{me.onReviewDone?.(d),K(null)}})]}):null,ve=nt?"#e5484d":ue.colors.textPrimary,we=je(kt,{className:"cell",onClick:ne?void 0:be=>N(d,"due_date",be.currentTarget),sx:{justifyContent:"center",color:ve,fontWeight:500,whiteSpace:"nowrap",...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:d.due_date?Jx(d):null});return pi(kt,{onContextMenu:be=>y(d,be),sx:{display:"grid",gridTemplateColumns:g,minHeight:48,position:"relative",fontSize:15,bgcolor:ue.table.rowBg,color:ue.table.rowColor,borderBottom:x?"none":`1px solid ${ue.table.rowBorderColor}`,"&:hover":{bgcolor:ue.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${ue.table.rowBorderColor}`},"& > .cell:first-of-type":{px:1.5},"& > .cell:last-of-type":{borderRight:"none",pr:2,...V?{pl:2}:{}}},children:[je(kt,{className:"cell",sx:{justifyContent:"center"},children:d.is_event?(()=>{let be=Mt(d.icon||dr);if(!be)return null;let Me=je(be,{sx:{fontSize:19,color:d.icon_color||"#1e3a8a"}});return ne||!$?Me:je(Vi,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:je(Vx,{onClick:Fe=>{Fe.stopPropagation(),$(d,Fe.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:ue.table.cellHoverBg}},children:Me})})})():!O&&!w&&!m?je(Vi,{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(Kx,{checked:d.completed,inputProps:{"aria-label":d.completed?`${d.title} \uC644\uB8CC \uD574\uC81C`:`${d.title} \uC644\uB8CC \uCC98\uB9AC`},icon:je(Zx,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:je(Xx,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:be=>be.stopPropagation(),onChange:(be,Me)=>D({anchorEl:be.currentTarget,task:d,nextCompleted:Me}),sx:{p:.5}})}):null}),f?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:d.ticket_no||"-"}):null,u?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:d.support_type?(()=>{let be=Xf(d.support_type);return je(Gc,{label:sl(d.support_type),bg:be.bg,fg:be.fg})})():"-"}):null,pi(kt,{className:"cell",onClick:()=>p(d),sx:{gap:1,pl:2,cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}},children:[(()=>{if(!d.is_notice)return null;let be=Mt(d.icon||lr);return be?je(be,{sx:{fontSize:18,flexShrink:0,color:d.icon_color||"#e5484d"}}):null})(),!u&&d.is_support&&d.support_type?(()=>{let be=Xf(d.support_type);return je(Gc,{label:sl(d.support_type),bg:be.bg,fg:be.fg})})():null,f&&(d.origin_license_seq??0)>0&&d.origin_license_name?je(Gc,{label:d.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(d.is_notice||u||d.is_support)return null;let be=An(d);return be==="involved"?null:je(Vi,{title:be==="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:be==="all"?je(Gx,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):je(Yx,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:d.completed&&v?400:ue.table.rowTitleFontWeight,color:d.completed&&v?ue.colors.textMuted:ue.table.rowTitleColor,textDecoration:d.completed&&v?"line-through":"none"},children:Yc(d.title,s)}),oe?je(kt,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:ue.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:oe}):null,(d.comment_count??d.comments?.length??0)>0?je(Ko,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,je(kt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:je(Uo,{labelKeys:d.label_keys??[],labelOptions:l})}),_&&!d.completed?je(kt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,Ha(d)&&!d.archived&&!ne&&E?je(Gf,{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:be=>{be.stopPropagation(),E(d)},children:"\uBCF4\uAD00"}):null]}),(()=>{let be=ne||!!d.is_event||!!d.completed;return je(kt,{className:"cell",onClick:be?void 0:Me=>P(d,Me.currentTarget),sx:{py:.5,justifyContent:"center",...be?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:d.is_event?(()=>{let Me=Ls(d);return Me?je(Dt,{option:Me}):null})():je(Dt,{option:fr(d)})})})(),u?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:qs(d.created_time)}):null,je(kt,{className:"cell",onClick:ne?void 0:be=>N(d,"start_date",be.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:qs(d.start_date)}),we,u?pi(il,{children:[je(Vi,{title:d.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(kt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(Ki,{names:[d.author_name||d.origin_author_name||d.created_by||""],searchText:s,avatarSrcByName:el(d,o)})})}),je(kt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(Ki,{names:(d.answerer_names??[]).slice(0,1),searchText:s,avatarSrcByName:o})})]}):null,C?je(kt,{className:"cell",onClick:ne?void 0:()=>j(d,"targets"),sx:{gap:.75,...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:je(Yf,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&d.is_notice?je(kt,{className:"cell",onClick:ne?void 0:()=>j(d,"targets"),sx:{gridColumn:c?"span 2":"auto",gap:.75,...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:je(Yf,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&!d.is_notice&&!d.is_event&&c?je(kt,{className:"cell",onClick:Ce?void 0:()=>j(d,"manager"),sx:{gap:.75,...ke||Ne||b?{justifyContent:"center"}:{},...Ce?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:ke?je(Gn,{onClick:be=>S?.(d,be.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):Ne?je(Gn,{onClick:be=>T?.(d,be.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):je(Ki,{names:d.manager_name?[d.manager_name]:[],searchText:s,avatarSrcByName:o,emphasize:ae})}):null,!C&&!d.is_notice?je(kt,{className:"cell",onClick:pe?void 0:()=>j(d,"receivers"),sx:{gridColumn:d.is_event&&c?"span 2":"auto",gap:.75,...pe?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:je(Ki,{names:d.receiver_names,searchText:s,avatarSrcByName:o})}):null,je(kt,{className:"cell",onClick:ne?void 0:be=>G?.(d,be.currentTarget),sx:{py:.5,justifyContent:"center",...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:je(Hr,{priority:d.priority,plain:!0})}),n?je(kt,{className:"cell",onClick:ne?void 0:be=>A?.(d,be.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:R?pi(il,{children:[(()=>{let be=Mt(L);return be?je(be,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R})]}):null}):null,C?je(kt,{className:"cell",sx:{justifyContent:"center"},children:Oe}):null,!C&&i&&a&&!u?je(kt,{className:"cell",sx:{justifyContent:"center"},children:d.is_notice?Oe:Ie||(ie?je(Wi,{canConfirm:!!k?.canConfirm,count:k?.count??0,total:k?.total??0,myConfirmed:!!k?.myTime,onConfirm:()=>B?.(d),onShowList:be=>Y?.(d,be)}):null)}):null,!C&&h==="action"?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:ue.table.rowSubColor},children:d.is_notice?Oe:Ie||(k&&k.total>0?je(Wi,{canConfirm:!!k.canConfirm,count:k.count,total:k.total,myConfirmed:!!k.myTime,onConfirm:()=>B?.(d),onShowList:be=>Y?.(d,be)}):"-")}):null,!C&&!i?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:m?ue.colors.danger:v?ue.table.rowSubColor:ue.table.rowTitleColor},children:m?qs(d.deleted_time):d.completed_time||"-"}):null,f||u?null:je(kt,{className:"cell",onClick:()=>{!M&&!W&&(Z(d.note),X(!0))},sx:{color:"#6f6f6c",cursor:M?"default":"text"},children:W?je(kt,{component:"input",ref:re,autoFocus:!0,spellCheck:!1,value:ee,onChange:be=>Z(be.target.value),onBlur:()=>{X(!1),ee.trim()!==d.note&&q(d.seq,ee)},onKeyDown:be=>{be.key==="Enter"&&be.target.blur(),be.key==="Escape"&&(Z(d.note),X(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:ue.table.rowTitleColor,caretColor:ue.table.rowTitleColor,p:0,m:0}}):je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.note?Yc(d.note,s):""})}),ae?je(kt,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});import{jsx as ev}from"react/jsx-runtime";var Jf=Qx(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 ev(Zf,{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:!xo(l,o),readOnly:d.readOnly,noteLocked:d.readOnly||(l.is_notice?!Za(l,o):!xo(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 Qf,useState as Zc}from"react";import{Box as mi,Button as eh,ButtonBase as th,Dialog as nv,Divider as Jc,Menu as ov,MenuItem as iv,Popover as sv}from"@mui/material";import rh from"@mui/icons-material/ChevronRight";import av from"@mui/icons-material/Check";import lv from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as cv,TimePicker as uv}from"@ehfuse/mui-datetime-picker";import dv from"@mui/icons-material/TimerOutlined";import{useEffect as tv,useState as rv}from"react";function Yn(e){let{loadHolidays:d}=bt(),[g,l]=rv(()=>new Map),o=e.join(",");return tv(()=>{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]),g}var Xc=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function Xn(e){let d=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],g=new Set;for(let l of d){let o=String(l??"").trim();Xc.includes(o)&&g.add(o)}return Xc.filter(l=>g.has(l))}function al(e,d){if(d==="none")return[];let g=e.includes(d)?e.filter(l=>l!==d):[...e,d];return Xc.filter(l=>g.includes(l))}import{Fragment as nh,jsx as Dr,jsxs as Dn}from"react/jsx-runtime";var fv=9,hv=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],oh=[{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"}],ih=[{value:"none",label:"\uC5C6\uC74C"},...hv,...oh];function Qc(e){return e?ih:[{value:"none",label:"\uC5C6\uC74C"},...oh]}function pv(e){return e==="same_day"?"\uB2F9\uC77C":ih.find(d=>d.value===e)?.label??"\uC5C6\uC74C"}function eu(e){if(e.length===0)return"\uC5C6\uC74C";let d=e.map(g=>pv(g));return d.length<=3?d.join(", "):`${d.slice(0,3).join(", ")} \uC678 ${d.length-3}`}function mv(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:g,reminders:l,hideReminder:o=!1,showTime:s=!1,centered:r=!1,onClose:t,onDateChange:n,onReminderChange:c}){let[i,a]=Zc(null),[h,f]=Zc(null),u=Kn(),b=String(g??"").trim().slice(0,10),m=String(g??"").trim().slice(11,16),v=/^\d{2}:\d{2}$/.test(m)?m:"",k=(S,T)=>n(T?`${S} ${T}`:S),{defaultDueHour:B}=bt(),R=`${String(Number.isInteger(B)&&B>=0&&B<=23?B:fv).padStart(2,"0")}:00`,[L,A]=Zc(()=>{let S=Number(b.slice(0,4));return Number.isFinite(S)&&S>1900?S:new Date().getFullYear()}),D=Qf(()=>[L-1,L,L+1],[L]),N=Yn(D),q=Qf(()=>{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=Dn(mi,{sx:{width:300,maxWidth:"100%"},children:[Dr(mi,{sx:{height:320},children:Dr(cv,{selectedDate:mv(b),onSelect:S=>{k(Tr(S),s?v||R:v),s||t()},onClose:t,showFooter:!1,autoApply:!0,holidays:q,onYearChange:S=>A(S),onMonthChange:(S,T)=>{typeof T=="number"&&A(T)}})}),s?Dn(nh,{children:[Dr(Jc,{sx:{borderColor:"#e6e6e3"}}),Dn(th,{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:[Dn(mi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Dr(dv,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),Dn(mi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[v||"\uC5C6\uC74C",Dr(rh,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Dr(uv,{anchorEl:h,open:!!h,onClose:()=>f(null),centered:r,value:{hour:v.slice(0,2)||R.slice(0,2),minute:v.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(S,T)=>{k(b||Tr(new Date),`${S}:${T}`),f(null)}})]}):null,o?null:Dn(nh,{children:[Dr(Jc,{sx:{borderColor:"#e6e6e3"}}),Dn(th,{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:[Dn(mi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Dr(lv,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),Dn(mi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[eu(l),Dr(rh,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Dr(ov,{transitionDuration:0,anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...u,children:Qc(!!v).map(S=>{let T=S.value==="none"?l.length===0:l.includes(S.value);return Dn(iv,{selected:T,onClick:()=>{c(al(l,S.value)),S.value==="none"&&a(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[S.label,T?Dr(av,{sx:{fontSize:16,color:"#2f80ed"}}):null]},S.value)})})]}),Dr(Jc,{sx:{borderColor:"#e6e6e3"}}),Dn(mi,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[Dr(eh,{size:"small",onClick:()=>{k(Tr(new Date),v),t()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),Dr(eh,{size:"small",onClick:t,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return r?Dr(nv,{open:d,onClose:t,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:j}):Dr(sv,{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 yv,useState as ru}from"react";import{Box as gi,Button as xv,Switch as vv}from"@mui/material";import{FormDialog as wv}from"@ehfuse/mui-form-dialog";import{ClearTextField as _v}from"@ehfuse/mui-form-controls";import{ErrorAlert as kv}from"@ehfuse/alerts";import{Box as gv,ButtonBase as bv}from"@mui/material";import{jsx as tu}from"react/jsx-runtime";function ll({value:e,onChange:d}){return tu(gv,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:Ic.map(({key:g,Icon:l})=>{let o=g===e;return tu(bv,{onClick:()=>d(g),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:tu(l,{sx:{fontSize:20}})},g)})})}import{jsx as vo,jsxs as nu}from"react/jsx-runtime";function cl({open:e,title:d="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:g="",initialIcon:l=Bc,confirmText:o="\uCD94\uAC00",initialUseSprints:s=!1,onClose:r,onSubmit:t}){let[n,c]=ru(""),[i,a]=ru(Bc),[h,f]=ru(!1);yv(()=>{e&&(c(g),a(l),f(s))},[e]);let u=()=>{let m=n.trim();if(!m){kv("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i,h),r()};return vo(wv,{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:nu(gi,{children:[vo(_v,{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}}),vo(gi,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),vo(gi,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:vo(ll,{value:i,onChange:a})}),nu(gi,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[nu(gi,{children:[vo(gi,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),vo(gi,{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)"})]}),vo(vv,{checked:h,onChange:(m,v)=>f(v)})]})]})}],actions:{showCancelButton:!0,right:vo(xv,{variant:"contained",onClick:u,children:o})}})}import{Box as Sv}from"@mui/material";import{jsx as Tv}from"react/jsx-runtime";function ul({size:e=40}){return Tv(Sv,{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 ou,ButtonBase as Cv,Divider as Bv,Popover as Iv}from"@mui/material";import Ev from"@mui/icons-material/Check";import Mv from"@ehfuse/overlay-scrollbar";import{jsx as bi,jsxs as sh}from"react/jsx-runtime";var iu=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Go({anchorEl:e,value:d,color:g="",onSelect:l,onSelectColor:o,onClose:s}){return bi(Iv,{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:sh(ou,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[bi(Mv,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:bi(ll,{value:d||bo,onChange:r=>{l(r),s()}})}),o?sh(ou,{sx:{px:1.25,pb:1.25},children:[bi(Bv,{sx:{mb:1,borderColor:"#efefed"}}),bi(ou,{sx:{display:"grid",gridTemplateColumns:`repeat(${iu.length}, 1fr)`,justifyItems:"center"},children:iu.map(r=>{let t=(g||iu[0])===r;return bi(Cv,{"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?bi(Ev,{sx:{fontSize:15,color:"#ffffff"}}):null},r)})})]}):null]})})}import{Fragment as uh,jsx as ht,jsxs as on}from"react/jsx-runtime";var ch=48,$v=5;function dh({tasks:e,statusOptions:d,avatarSrcByName:g,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:b,hideCompleted:m=!1,loading:v=!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:x,onTaskContextMenu:w,onMemberFilterClick:_,activeMemberFilters:C=[],onStatusFilterClick:O,statusFilterActive:z=!1,onAckFilterClick:$,ackFilterActive:V=!1,onProjectFilterClick:M,projectFilterActive:H=!1,onPriorityFilterClick:I,priorityFilterActive:E=!1,onValueFilterClick:F,activeValueFilters:U=[],columns:Y,getConfirmInfo:G,onConfirmTask:W,myAccountSeq:X=0,currentUserName:J="",groupManagerByMyRole:K=!1,pinKindGroups:ee=!1,allowManagerVolunteer:Z=!0,noticeAdmin:re=!1,getTargetSummary:ie,getTargetDisplay:ne,onArchiveTask:ae,isTaskUnread:pe,getAckInfo:ue,onAckConfirm:ke,onAckListClick:Ne,onChangeTaskPriority:Ce,onEndReached:Oe,useTaskItem:nt}){let me=it(),oe=Pn(()=>({showManager:!0,showActions:!0,showRequest:!0,...Y}),[Y]),Ie=oe.showManager??!0,ve=oe.showActions??!0,we=oe.showRequest??!0,be=oe.confirmMode??"none",Me=oe.notice??!1,Fe=oe.bug??!1,vr=oe.support??!1,Ve=vr||(oe.centerManager??!1),Ge=oe.trash??!1,Tt=h!=="none",Qe=Pn(()=>Tt?Ga(e,h,o,u,d,J,{enabled:K,myAccountSeq:X},ee):[],[Tt,e,h,o,u,d,J,K,X,ee]),De=Pn(()=>m?e.filter(fe=>!fe.completed):e,[e,m]),xe=Pn(()=>De.filter(fe=>fe.completed||fe.archived||fe.is_support?!1:fe.is_notice?!!ue?.(fe).canAck:!!G?.(fe).canConfirm),[De,ue,G]),ge=Pn(()=>X>0?e.filter(fe=>fe.completed&&!fe.archived&&!fe.is_support&&!!fe.review_pending&&(fe.author_account_seq??0)===X):[],[e,X]),Be=Pn(()=>new Set([...xe,...ge].map(fe=>fe.seq)),[xe,ge]),Ze=Pn(()=>Qe.map(fe=>({section:fe,visibleTasks:fe.tasks.filter(ze=>!Be.has(ze.seq)&&(!m||!ze.completed))})).filter(fe=>fe.visibleTasks.length>0),[Qe,m,Be]),qe=Pn(()=>new Set(f),[f]),Pe=Pn(()=>{let fe=[];if(Tt)for(let{section:ze,visibleTasks:lt}of Ze){let wr=qe.has(ze.key);if(fe.push({kind:"header",section:ze,visibleTasks:lt,collapsed:wr}),!wr)for(let $r of lt)fe.push({kind:"task",task:$r,last:!1})}else for(let ze of De)Be.has(ze.seq)||fe.push({kind:"task",task:ze,last:!1});for(let ze=fe.length-1;ze>=0;ze-=1){let lt=fe[ze];if(lt.kind==="task"){lt.last=!0;break}}return fe},[Tt,Ze,De,qe,Be]),Ct=oe.showProject??(!Me&&h!=="tab"),Ke=Pn(()=>Xa({...oe,showProject:Ct}),[oe,Ct]),te=Of({...oe,showProject:Ct}),ce=Af({...oe,showProject:Ct}),{onReturnTask:de}=bt(),Se=su(null),ct=su(null),Re=Ke[Ke.length-1]?.align==="center",Le=Pn(()=>{let fe=new Map;for(let ze of u)fe.set(ze.key,{label:ze.archived?`${ze.label} (\uBCF4\uAD00\uB428)`:ze.label,icon:ze.icon});return fe},[u]),wt=su(null),[Ae,Ee]=Jn(null);$s(()=>{if(!Ae)return;let fe=()=>{Se.current&&(Se.current.scrollLeft=Ae.scrollLeft),ct.current&&(ct.current.scrollLeft=Ae.scrollLeft)};return fe(),Ae.addEventListener("scroll",fe,{passive:!0}),()=>Ae.removeEventListener("scroll",fe)},[Ae]);let Je=De.length>0;$s(()=>{if(!Je){Ee(null);return}let fe=window.requestAnimationFrame(()=>{Ee(wt.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(fe)},[Je]);let ot=`${h}|${s}|${r}|${l}|${m?1:0}`;$s(()=>{Ae&&(Ae.scrollTop=0)},[ot,Ae]);let[ft,Bt]=Jn(!1);$s(()=>{if(!Ae)return;let fe=()=>Bt(Ae.scrollHeight-Ae.clientHeight>4),ze=window.requestAnimationFrame(fe),lt=new ResizeObserver(fe);return lt.observe(Ae),Ae.firstElementChild&&lt.observe(Ae.firstElementChild),()=>{window.cancelAnimationFrame(ze),lt.disconnect()}},[Ae,Pe.length,f.length]),$s(()=>{if(!Ae)return;let fe=Ae.clientHeight,ze=new ResizeObserver(()=>{let lt=Ae.clientHeight;lt!==fe&&(fe=lt,Ae.dispatchEvent(new Event("scroll")))});return ze.observe(Ae),()=>ze.disconnect()},[Ae]);let[ut,$t]=Jn(null),[xt,Wt]=Jn(null),[Ut,Q]=Jn(null),[le,ye]=Jn(null),[he,Te]=Jn(!1),[$e,We]=Jn(null),et=$e?e.find(fe=>fe.seq===$e.taskSeq)??null:null,[tt,se]=Jn(null),He=tt?e.find(fe=>fe.seq===tt.taskSeq)??null:null,[yt,It]=Jn(null),_t=yt?e.find(fe=>fe.seq===yt.taskSeq)??null:null,At=Zn((fe,ze)=>{It({anchorEl:ze,taskSeq:fe.seq})},[]),kr=Zn((fe,ze)=>{se({anchorEl:ze,taskSeq:fe.seq})},[]),en=Zn((fe,ze)=>{We({anchorEl:ze,taskSeq:fe.seq})},[]),tn=Zn((fe,ze)=>{if(!ze)return;t(fe,s===fe&&r==="asc"?"desc":"asc")},[t,s,r]),xn=Zn((fe,ze,lt)=>{$t({anchorEl:lt,taskSeq:fe.seq,field:ze,date:fe[ze],isEvent:!!fe.is_event,reminders:Xn(fe),completed:fe.completed})},[]),mo=Zn((fe,ze)=>{ye({anchorEl:ze,task:fe})},[]),di=Zn(fe=>{ut&&(i(ut.taskSeq,ut.field,fe),$t(ze=>ze&&{...ze,date:fe}))},[ut,i]),Ho=Zn(fe=>{ut&&(a(ut.taskSeq,fe),$t(ze=>ze&&{...ze,reminders:fe}))},[ut,a]),Et=Zn((fe,ze)=>{Q({anchorEl:ze,taskSeq:fe.seq,title:fe.title,kind:"claim"})},[]),Ot=Zn((fe,ze)=>{Q({anchorEl:ze,taskSeq:fe.seq,title:fe.title,kind:"volunteer"})},[]),fi=(fe,ze)=>ht(Jf,{task:fe,hideBottomBorder:ze,gridTemplate:te,useTaskItem:nt,statusOptions:d,avatarSrcByName:g,searchText:l,myAccountSeq:X,todayStr:o,showProject:Ct,showManager:Ie,showActions:ve,showRequest:we,confirmMode:be,notice:Me,bugMode:Fe,supportMode:vr,managerCentered:Ve,trashMode:Ge,dimCompleted:k,readOnly:B,projectByKey:Le,getConfirmInfo:G,onConfirmTask:W,onProjectClick:mo,onRequestReply:n,onRequestToggleCompleted:Wt,onDateClick:xn,onChangeNote:T,onMemberClick:P,onClaimClick:p?Et:void 0,onVolunteerClick:Z?Ot:void 0,onStatusClick:en,onOpenDetail:x,onTaskContextMenu:w,onPriorityClick:kr,onIconClick:R?At:void 0,lastColumnCentered:Re,getTargetSummary:ie,getTargetDisplay:ne,getAckInfo:ue,isTaskUnread:pe,onArchiveTask:ae,onAckConfirm:ke,onAckListClick:Ne},fe.seq);return on(nr,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${me.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:me.table.bg,color:me.table.rowColor,...me.table.sx},children:[ht(nr,{ref:Se,sx:{overflow:"hidden",flexShrink:0},children:ht(nr,{sx:{display:"grid",gridTemplateColumns:te,minWidth:ce,borderBottom:`1px solid ${me.table.borderColor}`,flexShrink:0,bgcolor:me.table.headerBg,"& > *":{borderRight:`1px solid ${me.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,...Re?{pl:2}:{}},...me.table.headerSx},children:Ke.map(fe=>{let ze=s===fe.id,lt=!!fe.memberFilter,wr=lt&&C.includes(fe.memberFilter),$r=lt||!!fe.statusFilter||!!fe.ackFilter||!!fe.projectFilter||!!fe.priorityFilter||!!fe.valueFilter,Vn=wr||!!fe.valueFilter&&U.includes(fe.valueFilter)||!!fe.statusFilter&&z||!!fe.ackFilter&&V||!!fe.projectFilter&&H||!!fe.priorityFilter&&E;return on(nr,{onClick:On=>{fe.memberFilter?_(fe.memberFilter,On.currentTarget):fe.statusFilter?O(On.currentTarget):fe.ackFilter?$?.(On.currentTarget):fe.projectFilter?M?.(On.currentTarget):fe.priorityFilter?I?.(On.currentTarget):fe.valueFilter?F?.(fe.valueFilter,On.currentTarget):tn(fe.id,fe.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:fe.align==="center"?"center":"flex-start",gap:.5,px:1,...fe.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:me.table.headerFontSize,color:fe.sortable||$r?me.table.headerActiveColor:me.table.headerColor,whiteSpace:"nowrap",cursor:fe.sortable||$r?"pointer":"default",userSelect:"none",...ze?{color:me.table.headerFilteredColor}:{},...Vn?{color:me.table.headerFilteredColor,fontWeight:600}:{}},children:[fe.icon,fe.label,Vn?ht(zv,{sx:{fontSize:14}}):null,ze?r==="asc"?ht(Dv,{sx:{fontSize:13}}):ht(Pv,{sx:{fontSize:13}}):null]},fe.id)})})}),xe.length>0||ge.length>0?ht(nr,{sx:{flexShrink:0,maxHeight:`${me.table.groupHeader.minHeight+1+ch*$v}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:ct,children:on(nr,{sx:{minWidth:ce},children:[xe.length>0?on(uh,{children:[on(nr,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:me.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[ht(nr,{component:"span",sx:{fontSize:me.table.groupHeader.labelFontSize,fontWeight:me.table.groupHeader.labelFontWeight,color:me.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),ht(nr,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:ht(nr,{component:"span",sx:{flexShrink:0,width:me.table.groupHeader.badge.width,py:me.table.groupHeader.badge.paddingY,borderRadius:`${me.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:me.table.groupHeader.badge.fontSize,fontWeight:me.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:xe.length})})]}),xe.map((fe,ze)=>fi(fe,ge.length===0&&ze===xe.length-1))]}):null,ge.length>0?on(uh,{children:[on(nr,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:me.table.groupHeader.minHeight,bgcolor:"#f4f0fe",borderBottom:"1px solid #e2dbf9"},children:[ht(nr,{component:"span",sx:{fontSize:me.table.groupHeader.labelFontSize,fontWeight:me.table.groupHeader.labelFontWeight,color:me.table.groupHeader.labelColor},children:"\uAC80\uC218 \uB300\uAE30"}),ht(nr,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:ht(nr,{component:"span",sx:{flexShrink:0,width:me.table.groupHeader.badge.width,py:me.table.groupHeader.badge.paddingY,borderRadius:`${me.table.groupHeader.badge.borderRadius}px`,bgcolor:"#8b5cf6",color:"#fff",fontSize:me.table.groupHeader.badge.fontSize,fontWeight:me.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:ge.length})})]}),ge.map((fe,ze)=>fi(fe,ze===ge.length-1))]}):null]})}):null,De.length===0&&v?ht(nr,{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:ht(ul,{})}):De.length===0?ht(nr,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:me.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.`:Fe?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":vr?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Me?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):ht(nr,{sx:{flex:1,minHeight:0},children:ht(qv,{ref:wt,style:{height:"100%"},contentStyle:{minWidth:ce},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Ae?ht(Fv,{customScrollParent:Ae,data:Pe,computeItemKey:(fe,ze)=>ze.kind==="header"?`group:${ze.section.key}`:ze.task.seq,endReached:Tt?void 0:Oe,defaultItemHeight:ch,increaseViewportBy:{top:600,bottom:600},itemContent:(fe,ze)=>{if(ze.kind==="task")return fi(ze.task,ze.last&&ft);let{section:lt,visibleTasks:wr,collapsed:$r}=ze;return on(nr,{onClick:()=>b(lt.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:me.table.groupHeader.minHeight,bgcolor:me.table.groupHeader.bg,borderBottom:`1px solid ${me.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:me.table.groupHeader.hoverBg},...me.table.groupHeader.sx},children:[$r?ht(Lv,{sx:{fontSize:20,color:me.colors.textMuted}}):ht(Nv,{sx:{fontSize:20,color:me.colors.textMuted}}),ht(nr,{component:"span",sx:{fontSize:me.table.groupHeader.labelFontSize,fontWeight:me.table.groupHeader.labelFontWeight,color:me.table.groupHeader.labelColor},children:lt.label}),q?ht(nr,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:q(lt.key,lt.tasks)}):null,A&&(!D||D(lt.key))?ht(Ov,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:Vn=>{Vn.stopPropagation(),A(lt.key,lt.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:me.colors.textSecondary,"&:hover":{bgcolor:me.colors.surfaceHover,color:me.colors.accentOnSurface}},children:ht(lh,{sx:{fontSize:21}})}):null,on(nr,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[N?N(lt.key,lt.tasks):null,ht(nr,{component:"span",sx:{flexShrink:0,width:me.table.groupHeader.badge.width,py:me.table.groupHeader.badge.paddingY,borderRadius:`${me.table.groupHeader.badge.borderRadius}px`,bgcolor:me.table.groupHeader.badge.bg,border:me.table.groupHeader.badge.border,color:me.table.groupHeader.badge.color,fontSize:me.table.groupHeader.badge.fontSize,fontWeight:me.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:wr.length})]})]})}},ot):null})}),ht(Fi,{anchorEl:$e?.anchorEl??null,value:et?.status??"",options:et?Ua(et):Ns,onSelect:fe=>{et&&y(et.seq,fe)},onComplete:et&&!et.completed&&!et.is_notice&&!et.is_event&&!et.is_bug&&!Ge&&((et.author_account_seq??0)===X||(et.manager_account_seq??0)===X)?()=>c(et,!0):void 0,onClose:()=>We(null)}),ht(ah,{transitionDuration:0,anchorEl:tt?.anchorEl??null,open:!!tt,onClose:()=>se(null),children:["high","medium","low"].map(fe=>on(dl,{selected:He?.priority===fe,onClick:()=>{He&&Ce?.(He.seq,fe),se(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[ht(Hr,{priority:fe,small:!0}),He?.priority===fe?ht(au,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},fe))}),on(ah,{anchorEl:le?.anchorEl??null,open:!!le,onClose:()=>ye(null),transitionDuration:0,children:[on(dl,{selected:!le?.task.tab_key,onClick:()=>{le&&j(le.task.seq,""),ye(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ht(jv,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",le?.task.tab_key?null:ht(au,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),u.filter(fe=>!fe.archived).map(fe=>{let ze=Mt(fe.icon),lt=le?.task.tab_key===fe.key;return on(dl,{selected:lt,onClick:()=>{le&&j(le.task.seq,fe.key),ye(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ze?ht(ze,{sx:{fontSize:17,color:"#1e3a8a"}}):null,fe.label,lt?ht(au,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},fe.key)}),S?[ht(Rv,{},"add-project-divider"),on(dl,{onClick:()=>Te(!0),sx:{fontSize:14,color:"#787774"},children:[ht(Av,{children:ht(lh,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),S?ht(cl,{open:he,onClose:()=>Te(!1),onSubmit:(fe,ze)=>{let lt=le?.task.seq??0;(async()=>{let wr=await S(fe,ze);wr&&lt&&j(lt,wr)})(),ye(null)}}):null,ht(Go,{anchorEl:yt?.anchorEl??null,value:_t?.icon??"",color:_t?.icon_color??"",onSelect:fe=>{yt&&R?.(yt.taskSeq,fe),It(null)},onSelectColor:L?fe=>{yt&&L(yt.taskSeq,fe)}:void 0,onClose:()=>It(null)}),ht(_n,{anchorEl:ut?.anchorEl??null,open:!!ut&&ut?.field==="start_date",date:ut?.date??"",reminders:[],hideReminder:!0,showTime:!ut?.isEvent,onClose:()=>$t(null),onDateChange:di,onReminderChange:()=>{}}),ht(_n,{anchorEl:ut?.anchorEl??null,open:!!ut&&ut?.field==="due_date",date:ut?.date??"",showTime:!ut?.isEvent,reminders:ut?.reminders??[],hideReminder:!!ut?.completed,onClose:()=>$t(null),onDateChange:di,onReminderChange:Ho}),ht(Pt,{open:!!Ut,anchorEl:Ut?.anchorEl??null,title:Ut?.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:()=>Q(null),onConfirm:()=>{Ut&&p?.(Ut.taskSeq),Q(null)}}),ht(nn,{open:!!xt,anchorEl:xt?.anchorEl??null,nextCompleted:xt?.nextCompleted??!1,returnMode:!!de&&!!(xt&&rn(xt.task,X)),onCancel:()=>Wt(null),onConfirm:fe=>{xt&&(fe&&de?de(xt.task,fe):c(xt.task,xt.nextCompleted)),Wt(null)}})]})}import{useCallback as to,useMemo as wo,useRef as h2,useState as Ln}from"react";import{Box as Ft,ButtonBase as Ch,Divider as gh,IconButton as bh,Menu as yh,MenuItem as Yo}from"@mui/material";import fu from"@mui/icons-material/Add";import xh from"@mui/icons-material/MoreVert";import vh from"@mui/icons-material/EditOutlined";import wh from"@mui/icons-material/ArchiveOutlined";import _h from"@mui/icons-material/UnarchiveOutlined";import p2 from"@mui/icons-material/NotificationsOutlined";import m2 from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as Hv}from"@mui/material";import{jsx as fh}from"react/jsx-runtime";function pr({sx:e,...d}){return fh(Hv,{viewBox:"0 0 24 24",...d,sx:{fill:"none",...e},children:fh("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 g2,DragOverlay as b2,PointerSensor as y2,pointerWithin as x2,rectIntersection as v2,useDroppable as w2,useSensor as _2,useSensors as k2}from"@dnd-kit/core";import{SortableContext as Bh,arrayMove as kh,horizontalListSortingStrategy as S2,useSortable as T2,verticalListSortingStrategy as C2}from"@dnd-kit/sortable";import{CSS as B2}from"@dnd-kit/utilities";import hu from"@ehfuse/overlay-scrollbar";import{useState as Xv}from"react";import{Box as eo,ButtonBase as Zv,Checkbox as Jv,Tooltip as hh}from"@mui/material";import Qv from"@mui/icons-material/AlarmOutlined";import e2 from"@mui/icons-material/DragIndicator";import t2 from"@mui/icons-material/RadioButtonUnchecked";import r2 from"@mui/icons-material/CheckCircle";import n2 from"@mui/icons-material/TimerOutlined";import{Box as Nn,Button as Wv,Popover as Uv}from"@mui/material";import Vv from"@mui/icons-material/CheckCircle";import{Fragment as Kv,jsx as Qn,jsxs as yi}from"react/jsx-runtime";function fl({anchorEl:e,open:d,acks:g,total:l,avatarSrcByName:o,pendingNames:s=[],onRequestConfirm:r,onClose:t}){let n=jt();return Qn(Uv,{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:yi(Nn,{sx:{minWidth:240,maxWidth:320,py:1},children:[yi(Nn,{sx:{px:2,pb:.75,fontSize:Sr(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",g.length,"/",l]}),s.length>0&&g.length>0?yi(Nn,{sx:{px:2,pt:1,pb:.5,fontSize:Sr(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",g.length]}):null,g.length===0?s.length>0?null:Qn(Nn,{sx:{px:2,py:1.5,fontSize:Sr(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):g.map(c=>yi(Nn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Qn(Wr,{names:[c.name],size:22,avatarSrcByName:o}),Qn(Nn,{component:"span",sx:{fontSize:Sr(14),color:"#37352f",whiteSpace:"nowrap"},children:c.name}),Qn(Nn,{component:"span",sx:{ml:"auto",fontSize:Sr(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:fn(c.time)}),Qn(Vv,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},c.account_seq)),s.length>0?yi(Kv,{children:[yi(Nn,{sx:{mt:g.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:g.length>0?"1px solid #efefed":"none",fontSize:Sr(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",s.length]}),s.map(c=>yi(Nn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Qn(Wr,{names:[c],size:22,avatarSrcByName:o}),Qn(Nn,{component:"span",sx:{fontSize:Sr(14),color:"#37352f",whiteSpace:"nowrap"},children:c})]},c))]}):null,r?Qn(Nn,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:Qn(Wv,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{r(),t()},sx:{fontSize:Sr(13)},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function Gv(e){let d=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(g=>g>0&&g!==d))]}function Yv(e){let d=new Map,g=Number(e.manager_account_seq??0);g>0&&d.set(g,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 Gi(e,d){let g=Gv(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=Yv(e);return{myTime:o?.time??"",canConfirm:d>0&&g.includes(d)&&!o,count:l.filter(t=>g.includes(t.account_seq)).length,total:g.length,pendingNames:g.filter(t=>!s.has(t)).map(t=>r.get(t)??"").filter(t=>t.length>0)}}function AR(e){let d=String(e??"").trim();return d?d.slice(5,16).replaceAll("-","."):""}import{Fragment as a2,jsx as cr,jsxs as Yi}from"react/jsx-runtime";function hl(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 o2=3;function i2(e){let d=e.trim();return d?d.slice(2,10).replaceAll("-","."):"-"}function s2(){let e=new Date,d=String(e.getMonth()+1).padStart(2,"0"),g=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${d}-${g}`}var lu="taskbox-card-drag-handle";function Hs({task:e,statusOptions:d,showDueDate:g=!1,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,titleFontSize:r=13,dragHandleProps:t}){let n=it(),c=qi(e,bt().resolveTask),a=!!e.due_date&&e.due_date.slice(0,10)<=s2()?n.colors.danger:n.colors.textPrimary,h=Gi(e,0),[f,u]=Xv(null),b=ji(e,d),m=new Set(e.label_keys??[]),v=b.filter(B=>!m.has(B.key)),k=b.filter(B=>m.has(B.key));return Yi(a2,{children:[Yi(eo,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[t?cr(eo,{className:lu,...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:cr(e2,{sx:{fontSize:18}})}):null,cr(Jv,{size:"small",icon:cr(t2,{sx:{fontSize:20}}),checkedIcon:cr(r2,{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}}),cr(hh,{title:e.title,arrow:!0,enterDelay:300,children:Yi(eo,{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:o2,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,c?cr(eo,{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?cr(Ko,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:n.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?cr(eo,{sx:{pl:3,mt:-.5,fontSize:12.5,color:n.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,Yi(eo,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[Yi(eo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[v.map(B=>cr(Dt,{option:B,small:!0},B.key)),cr(Hr,{priority:e.priority,small:!0}),k.map(B=>cr(Dt,{option:B,small:!0},B.key))]}),g?cr(hh,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:cr(Zv,{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()?i2(e.due_date):cr(Qv,{sx:{fontSize:15,color:n.colors.textMuted}})})}):null]}),g&&(e.due_date.slice(11,16)||e.estimated_time)?Yi(eo,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:n.colors.textSecondary},children:[cr(n2,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,cr(Wr,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),h.total>0?cr(eo,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:cr(eo,{sx:{flexShrink:0,width:64},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:cr(Wi,{canConfirm:!1,count:h.count,total:h.total,onConfirm:()=>{},onShowList:B=>u(B)})})}):null,cr(fl,{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 l2}from"@mui/material";import{useSortable as c2}from"@dnd-kit/sortable";import{CSS as u2}from"@dnd-kit/utilities";import{jsx as ph}from"react/jsx-runtime";function d2(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function mh({task:e,statusOptions:d,variant:g="card",showDueDate:l=!1,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,onCardClick:t,onCardContextMenu:n,titleFontSize:c}){let i=it(),{attributes:a,listeners:h,setNodeRef:f,transform:u,transition:b,isDragging:m}=c2({id:String(e.seq)}),v=g==="list";return ph(l2,{ref:f,onClick:t?()=>t(e):void 0,onContextMenu:n?k=>n(e,k):void 0,sx:{...v?d2(i.card):hl(i.card),opacity:m?.35:e.completed?.55:1,transform:u2.Translate.toString(u),transition:b,position:"relative",cursor:"default","&:hover":v?{bgcolor:i.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:ph(Hs,{task:e,statusOptions:d,showDueDate:l,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,titleFontSize:c,dragHandleProps:{...a,...h}})})}function f2(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=f2(e.end_date);return d?`${e.name} (~${d})`:e.name}import{jsx as rt,jsxs as Gt}from"react/jsx-runtime";var Sh=2,Ih="taskbox-column-drag-handle",pu=[lu,Ih],pl="group-",Sn="colmove-",cu="__default__",uu=Lc,du="__other__",ml="sprint-",Th=`${ml}0`,I2={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function Eh(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 E2({column:e,tasks:d,statusOptions:g,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onAddTask:r,canAdd:t,onOpenMenu:n,onCardClick:c,onCardContextMenu:i,grow:a,summary:h,onOpenSprintMenu:f}){let u=it(),{setNodeRef:b,isOver:m}=w2({id:`${pl}${e.key}`}),{attributes:v,listeners:k,setNodeRef:B,transform:R,transition:L,isDragging:A}=T2({id:`${Sn}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Gt(Ft,{ref:D=>{b(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:B2.Translate.toString(R),...L?{transition:`${L}, background-color 0.15s`}:{},opacity:A?.6:1},children:[Gt(Ft,{className:Ih,...v,...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?rt(Ft,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let D=Mt(e.icon);return D?rt(D,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),rt(Ft,{component:"span",sx:{fontSize:u.board.columnHeaderFontSize,fontWeight:700,color:u.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),rt(Ft,{component:"span",sx:{...Eh(u.board.badge),ml:"auto"},children:d.length}),e.sprint&&f?rt(bh,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:D=>D.stopPropagation(),onClick:D=>f(D.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:rt(xh,{sx:{fontSize:18}})}):e.locked?null:rt(bh,{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:rt(xh,{sx:{fontSize:18}})})]}),h?rt(Ft,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0},children:h}):null,rt(Ft,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:rt(hu,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:pu},children:Gt(Ft,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[rt(Bh,{items:d.map(D=>String(D.seq)),strategy:C2,children:d.map(D=>rt(mh,{task:D,statusOptions:g,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onCardClick:c,onCardContextMenu:i},D.seq))}),d.length===0&&!t?rt(Ft,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,d.length===0&&t?rt(Ft,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Gt(Ch,{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:[rt(fu,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function mu({tasks:e,statusOptions:d,customTabs:g,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:b,canAdd:m=!0,onRequestRename:v,onArchiveProject:k,onDeleteProject:B,onReorderProjects:R,onOpenDetail:L,onTaskContextMenu:A,hideCompleted:D=!1,renderColumnSummary:N,onEditSprint:q,onChangeSprintStatus:j,onRemoveSprint:S}){let T=it(),{onReturnTask:P,myAccountSeq:p=0}=bt(),[y,x]=Ln(null),w=y?e.find(xe=>xe.seq===y.taskSeq):void 0,[_,C]=Ln(null),[O,z]=Ln(null),[$,V]=Ln(null),[M,H]=Ln(null),[I,E]=Ln(null),[F,U]=Ln(null),[Y,G]=Ln(null),[W,X]=Ln(null),[J,K]=Ln(null),[ee,Z]=Ln(null),re=h2(!1),ie=wo(()=>new Map(e.map(xe=>[xe.seq,xe])),[e]),ne=wo(()=>{let xe=e.filter(ge=>ge.is_notice);return xe.sort((ge,Be)=>ge.completed!==Be.completed?ge.completed?1:-1:Be.seq-ge.seq),xe},[e]),ae=wo(()=>g.filter(xe=>!xe.archived),[g]),pe=wo(()=>g.filter(xe=>xe.archived),[g]),ue=xe=>({key:xe.key,label:xe.label,icon:xe.icon,isDefault:!1,isArchived:xe.archived}),ke=wo(()=>new Set(i.map(xe=>xe.key)),[i]),Ne=wo(()=>new Set(h.map(xe=>xe.seq)),[h]),Ce=wo(()=>{if(c==="sprint")return[{key:Th,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...h.map(xe=>({key:`${ml}${xe.seq}`,label:kn(xe),icon:"",isDefault:!1,isArchived:!1,dot:I2[xe.status],locked:!0,sprint:xe}))];if(c==="status"){let xe=i.map(ge=>({key:ge.key,label:ge.name,icon:"",isDefault:!1,isArchived:!1,dot:ge.dot,locked:!0}));return xe.some(ge=>ge.key===uu)?xe:[...xe,{key:uu,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return l==="archived"?pe.map(ue):[{key:cu,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...ae.map(ue)]},[c,i,h,l,ae,pe]),Oe=k2(_2(y2,{activationConstraint:{distance:5}})),nt=to(xe=>{let ge=String(xe.active.id).startsWith(Sn),Be=x2(xe),Ze=Be.length>0?Be:v2(xe);if(ge)return Ze.filter(Ct=>String(Ct.id).startsWith(Sn));let qe=Ze.filter(Ct=>!String(Ct.id).startsWith(Sn)),Pe=qe.filter(Ct=>!String(Ct.id).startsWith(pl));return Pe.length>0?Pe:qe},[]),me=wo(()=>{let xe=new Map;for(let ge of e){if(ge.is_notice)continue;let Be;if(c==="sprint"){let qe=ge.sprint_seq??0;Be=Ne.has(qe)?`${ml}${qe}`:Th}else Be=c==="status"?ge.completed?uu:ke.has(String(ge.status??""))?String(ge.status??""):du:ge.tab_key?.trim()||cu;let Ze=xe.get(Be);Ze?Ze.push(ge):xe.set(Be,[ge])}for(let ge of xe.values())ge.sort((Be,Ze)=>{if(Be.completed!==Ze.completed)return Be.completed?1:-1;let qe=(Be.group_sort_no??0)>0,Pe=(Ze.group_sort_no??0)>0;return qe&&Pe?(Be.group_sort_no??0)-(Ze.group_sort_no??0):qe!==Pe?qe?-1:1:Be.due_date!==Ze.due_date?Be.due_date<Ze.due_date?-1:1:Be.seq-Ze.seq});return xe},[e,c,ke,Ne]),oe=wo(()=>c!=="status"||(me.get(du)??[]).length===0?Ce:[...Ce,{key:du,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Ce,me]),Ie=to(xe=>W?(W.get(xe)??[]).map(ge=>ie.get(ge)).filter(ge=>!!ge):me.get(xe)??[],[W,ie,me]),ve=to(xe=>{let ge=Ie(xe);return D?ge.filter(Be=>!Be.completed):ge},[Ie,D]),we=to(xe=>{let ge=String(xe.active.id);if(ge.startsWith(Sn)){Z(ge.slice(Sn.length));return}K(Number(ge)),X(new Map(Ce.map(Be=>[Be.key,(me.get(Be.key)??[]).map(Ze=>Ze.seq)])))},[Ce,me]),be=to((xe,ge)=>{if(xe.startsWith(pl))return{key:xe.slice(pl.length),overSeq:null};let Be=Number(xe);for(let[Ze,qe]of ge)if(qe.includes(Be))return{key:Ze,overSeq:Be};return null},[]),Me=to(xe=>{let{active:ge,over:Be}=xe;!Be||String(ge.id).startsWith(Sn)||X(Ze=>{if(!Ze)return Ze;let qe=Number(ge.id),Pe=be(String(Be.id),Ze);if(!Pe)return Ze;let Ct=[...Ze.entries()].find(([,de])=>de.includes(qe))?.[0];if(!Ct||Ct===Pe.key)return Ze;let Ke=new Map(Ze);Ke.set(Ct,(Ke.get(Ct)??[]).filter(de=>de!==qe));let te=[...Ke.get(Pe.key)??[]],ce=te.length;if(Pe.overSeq!==null){let de=te.indexOf(Pe.overSeq);de!==-1&&(ce=de)}return te.splice(ce,0,qe),Ke.set(Pe.key,te),Ke})},[be]),Fe=to(xe=>{let ge=String(xe.active.id);if(ge.startsWith(Sn)){Z(null);let ce=String(xe.over?.id??"");if(!ce.startsWith(Sn))return;let de=ge.slice(Sn.length),Se=ce.slice(Sn.length);if(de===Se)return;let ct=g.map(wt=>wt.key),Re=ct.indexOf(de),Le=ct.indexOf(Se);if(Re===-1||Le===-1)return;R(kh(ct,Re,Le));return}let Be=W;if(X(null),K(null),re.current=!0,!Be||!xe.over)return;let Ze=Number(ge),qe=[...Be.entries()].find(([,ce])=>ce.includes(Ze));if(!qe)return;let[Pe,Ct]=qe,Ke=[...Ct],te=be(String(xe.over.id),Be);if(te&&te.key===Pe&&te.overSeq!==null&&te.overSeq!==Ze){let ce=Ke.indexOf(Ze),de=Ke.indexOf(te.overSeq);ce!==-1&&de!==-1&&(Ke=kh(Ke,ce,de))}if(c==="status"){a?.(Ze,Pe);return}if(c==="sprint"){f?.(Ze,Number(Pe.slice(ml.length))||0);return}n(Ze,Pe===cu?"":Pe,Ke)},[g,W,be,n,R,c,a,f]),vr=to(()=>{X(null),K(null),Z(null),re.current=!0},[]),Ve=to(xe=>{if(re.current){re.current=!1;return}L(xe)},[L]),Ge=J!==null?ie.get(J)??null:null,Tt=ee!==null?Ce.find(xe=>xe.key===ee)??null:null,Qe=to((xe,ge)=>{G({anchorEl:ge,taskSeq:xe.seq,date:xe.due_date,reminders:Xn(xe)})},[]),De=_?.column??null;return Gt(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:[Gt(g2,{sensors:Oe,collisionDetection:nt,onDragStart:we,onDragOver:Me,onDragEnd:Fe,onDragCancel:vr,children:[rt(Ft,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:l==="archived"&&Ce.length===0?rt(Ft,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):rt(hu,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:pu},children:Gt(Ft,{sx:{display:"flex",alignItems:"flex-start",gap:Sh,height:"100%",minWidth:"min-content",p:Sh,boxSizing:"border-box"},children:[l==="active"&&ne.length>0?Gt(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:xe=>xe.shadows[1],bgcolor:T.card.bg,overflow:"hidden"},children:[Gt(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:[rt(p2,{sx:{fontSize:17,color:"#e8763a"}}),rt(Ft,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:T.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Gt(Ft,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",ne.length,")"]})]}),rt(Ft,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:rt(hu,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:pu},thumb:{width:6},children:rt(Ft,{sx:{display:"flex",flexDirection:"column"},children:ne.map(xe=>Gt(Ft,{onClick:()=>Ve(xe),onContextMenu:ge=>A(xe,ge),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:[rt(Hs,{task:xe,statusOptions:d,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:x}),(()=>{let ge=(xe.target_names??[]).filter(Ze=>Ze.trim());if(ge.length===0)return null;let Be=ge.length>2?`${ge[0]}, ${ge[1]} \uC678 ${ge.length-2}`:ge.join(", ");return Gt(Ft,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[rt(m2,{sx:{fontSize:14,flexShrink:0}}),rt(Ft,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:Be})]})})()]},xe.seq))})})})]}):null,rt(Bh,{items:ae.map(xe=>`${Sn}${xe.key}`),strategy:S2,children:oe.map(xe=>rt(E2,{column:xe,tasks:ve(xe.key),summary:N?.(xe.key,Ie(xe.key)),onOpenSprintMenu:q||j||S?(ge,Be)=>z({anchorEl:ge,sprint:Be}):void 0,statusOptions:d,onRequestArchiveToggle:x,onRequestReply:s,onDueDateClick:Qe,onAddTask:b,canAdd:m&&c==="project",onOpenMenu:C,onCardClick:Ve,onCardContextMenu:A,grow:c!=="project"},xe.key))}),l==="active"&&c==="project"?Gt(Ch,{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:[rt(fu,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,l==="active"&&oe.length===0&&ne.length===0?rt(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]})})}),rt(b2,{children:Ge?rt(Ft,{sx:{...hl,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:rt(Hs,{task:Ge,statusOptions:d,showDueDate:!0,titleFontSize:15})}):Tt?Gt(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 xe=Mt(Tt.icon);return xe?rt(xe,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),rt(Ft,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:T.board.columnHeaderColor},children:Tt.label}),rt(Ft,{component:"span",sx:Eh(T.board.badge),children:(me.get(Tt.key)??[]).length})]}):null})]}),Gt(yh,{transitionDuration:0,anchorEl:_?.anchorEl??null,open:!!_,onClose:()=>C(null),children:[De&&!De.isArchived&&m?Gt(Yo,{onClick:()=>{De&&b(De.isDefault?"":De.key),C(null)},sx:{fontSize:14,gap:1},children:[rt(fu,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,De&&!De.isDefault&&!De.isArchived?Gt(Yo,{onClick:()=>{v(De.key,De.label,De.icon),C(null)},sx:{fontSize:14,gap:1},children:[rt(vh,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,De&&!De.isDefault&&!De.isArchived?Gt(Yo,{onClick:()=>{if(_){let xe=(me.get(_.column.key)??[]).filter(ge=>!ge.completed&&!ge.archived).length;xe>0?E({anchorEl:_.anchorEl,count:xe}):H(_)}C(null)},sx:{fontSize:14,gap:1},children:[rt(wh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,De&&De.isArchived?Gt(Yo,{onClick:()=>{k(De.key,!1),C(null)},sx:{fontSize:14,gap:1},children:[rt(_h,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,De&&!De.isDefault?rt(gh,{}):null,De&&!De.isDefault?Gt(Yo,{onClick:()=>{_&&U(_),C(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[rt(pr,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Gt(yh,{transitionDuration:0,anchorEl:O?.anchorEl??null,open:!!O,onClose:()=>z(null),children:[q?Gt(Yo,{onClick:()=>{O&&q(O.sprint.seq),z(null)},sx:{fontSize:14,gap:1},children:[rt(vh,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,j?Gt(Yo,{onClick:()=>{O&&j(O.sprint.seq,O.sprint.status==="closed"?"active":"closed"),z(null)},sx:{fontSize:14,gap:1},children:[O?.sprint.status==="closed"?rt(_h,{sx:{fontSize:18,color:"#787774"}}):rt(wh,{sx:{fontSize:18,color:"#787774"}}),O?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,S?rt(gh,{}):null,S?Gt(Yo,{onClick:()=>{O&&V(O),z(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[rt(pr,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),rt(Pt,{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)}}),rt(_n,{anchorEl:Y?.anchorEl??null,open:!!Y,date:Y?.date??"",reminders:Y?.reminders??[],onClose:()=>G(null),onDateChange:xe=>{Y&&(r(Y.taskSeq,xe),G(ge=>ge&&{...ge,date:xe}))},onReminderChange:xe=>{Y&&(t(Y.taskSeq,xe),G(ge=>ge&&{...ge,reminders:xe}))}}),rt(Pt,{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.
29
+ `,g.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}",g.NAME_CHAR="-"+g.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.CHAR_RE=new RegExp("^["+g.CHAR+"]$","u"),g.RESTRICTED_CHAR_RE=new RegExp("^["+g.RESTRICTED_CHAR+"]$","u"),g.S_RE=new RegExp("^["+g.S+"]+$","u"),g.NAME_START_CHAR_RE=new RegExp("^["+g.NAME_START_CHAR+"]$","u"),g.NAME_CHAR_RE=new RegExp("^["+g.NAME_CHAR+"]$","u"),g.NAME_RE=new RegExp("^["+g.NAME_START_CHAR+"]["+g.NAME_CHAR+"]*$","u"),g.NMTOKEN_RE=new RegExp("^["+g.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}g.S_LIST=[32,10,13,9],g.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},g.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},g.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},g.isS=function(o){return o===32||o===10||o===13||o===9},g.isNameStartChar=l,g.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,g){"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(g,"__esModule",{value:!0}),g.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}",g.NC_NAME_CHAR="-"+g.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.NC_NAME_START_CHAR_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]$","u"),g.NC_NAME_CHAR_RE=new RegExp("^["+g.NC_NAME_CHAR+"]$","u"),g.NC_NAME_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]["+g.NC_NAME_CHAR+"]*$","u"),g.isNCNameStartChar=l,g.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 af="waiting",N7="replied";var go={basis:"count",default_capacity:0,by_account:{}};function z7(e){let d=e&&typeof e=="object"&&!Array.isArray(e)?e:{},g=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:g,default_capacity:l,by_account:o}}import{createContext as jg,useContext as Fg,useMemo as cf}from"react";import{Box as qg}from"@mui/material";var Cc="--app-mobile-font-offset";function Sr(e,d=0){return`calc(${e}px + max(0px, var(${Cc}, 0px) - ${d}px))`}import{jsx as lf}from"react/jsx-runtime";var uf=jg({});function $g({config:e,children:d}){let g=cf(()=>e??{},[e]),l=g.mobileFontOffsetPx;return lf(uf.Provider,{value:g,children:l===void 0?d:lf(qg,{sx:{display:"contents",[Cc]:`${l}px`},children:d})})}function bt(){return Fg(uf)}function Ms(){let{buildFileUrl:e}=bt();return cf(()=>e||((d,g)=>{let l=[];return g?.thumb&&l.push(`thumb=${g.thumb}`),g?.download&&l.push("download=1"),`/api/v1/files/${d}${l.length?`?${l.join("&")}`:""}`}),[e])}function Rs(){let{uploadMaxMb:e}=bt();return e??50}import{useGlobalForm as Cy}from"@ehfuse/forma";import df from"@mui/icons-material/DoNotDisturbAltOutlined";import ff from"@mui/icons-material/BookmarkBorderOutlined";import Hg from"@mui/icons-material/LabelOutlined";import Wg from"@mui/icons-material/FlagOutlined";import Ug from"@mui/icons-material/StarBorderOutlined";import Vg from"@mui/icons-material/FolderOutlined";import Kg from"@mui/icons-material/EventOutlined";import Gg from"@mui/icons-material/BuildOutlined";import Yg from"@mui/icons-material/LocalShippingOutlined";import Xg from"@mui/icons-material/StorefrontOutlined";import Zg from"@mui/icons-material/GroupsOutlined";import Jg from"@mui/icons-material/LightbulbOutlined";import Qg from"@mui/icons-material/FavoriteBorderOutlined";import eb from"@mui/icons-material/AssignmentOutlined";import tb from"@mui/icons-material/HomeOutlined";import rb from"@mui/icons-material/WorkOutline";import nb from"@mui/icons-material/SchoolOutlined";import ob from"@mui/icons-material/LocalHospitalOutlined";import ib from"@mui/icons-material/RestaurantOutlined";import sb from"@mui/icons-material/LocalFloristOutlined";import ab from"@mui/icons-material/DirectionsCarOutlined";import lb from"@mui/icons-material/CampaignOutlined";import cb from"@mui/icons-material/SavingsOutlined";import ub from"@mui/icons-material/Inventory2Outlined";import db from"@mui/icons-material/CleaningServicesOutlined";import hf from"@mui/icons-material/HandymanOutlined";import fb from"@mui/icons-material/LocalPhoneOutlined";import hb from"@mui/icons-material/EmailOutlined";import pb from"@mui/icons-material/ShoppingCartOutlined";import mb from"@mui/icons-material/BarChartOutlined";import gb from"@mui/icons-material/PrintOutlined";import bb from"@mui/icons-material/SecurityOutlined";import yb from"@mui/icons-material/AlarmOutlined";import xb from"@mui/icons-material/AttachFileOutlined";import vb from"@mui/icons-material/PhotoCameraOutlined";import wb from"@mui/icons-material/ImageOutlined";import _b from"@mui/icons-material/MenuBookOutlined";import kb from"@mui/icons-material/EditOutlined";import Sb from"@mui/icons-material/KeyOutlined";import Tb from"@mui/icons-material/LockOutlined";import Cb from"@mui/icons-material/LockOpenOutlined";import Bb from"@mui/icons-material/SettingsOutlined";import Ib from"@mui/icons-material/CloudOutlined";import Eb from"@mui/icons-material/WifiOutlined";import Mb from"@mui/icons-material/ComputerOutlined";import Rb from"@mui/icons-material/SmartphoneOutlined";import Ob from"@mui/icons-material/TvOutlined";import Ab from"@mui/icons-material/AccessTimeOutlined";import Db from"@mui/icons-material/TimerOutlined";import Pb from"@mui/icons-material/MapOutlined";import Nb from"@mui/icons-material/PlaceOutlined";import Lb from"@mui/icons-material/NavigationOutlined";import zb from"@mui/icons-material/FlightOutlined";import jb from"@mui/icons-material/TrainOutlined";import Fb from"@mui/icons-material/DirectionsBusOutlined";import qb from"@mui/icons-material/DirectionsBikeOutlined";import $b from"@mui/icons-material/DirectionsWalkOutlined";import Hb from"@mui/icons-material/DirectionsRunOutlined";import Wb from"@mui/icons-material/FitnessCenterOutlined";import Ub from"@mui/icons-material/SportsSoccerOutlined";import Vb from"@mui/icons-material/EmojiEventsOutlined";import Kb from"@mui/icons-material/CardGiftcardOutlined";import Gb from"@mui/icons-material/CakeOutlined";import pf from"@mui/icons-material/CoffeeOutlined";import Yb from"@mui/icons-material/LocalPizzaOutlined";import Xb from"@mui/icons-material/ShoppingBagOutlined";import mf from"@mui/icons-material/CreditCardOutlined";import Zb from"@mui/icons-material/AccountBalanceOutlined";import Jb from"@mui/icons-material/AccountBalanceWalletOutlined";import Qb from"@mui/icons-material/AttachMoneyOutlined";import e1 from"@mui/icons-material/ReceiptLongOutlined";import t1 from"@mui/icons-material/CalculateOutlined";import r1 from"@mui/icons-material/TrendingUpOutlined";import n1 from"@mui/icons-material/ListAltOutlined";import o1 from"@mui/icons-material/TaskAltOutlined";import i1 from"@mui/icons-material/DoneAllOutlined";import s1 from"@mui/icons-material/WarningAmberOutlined";import a1 from"@mui/icons-material/InfoOutlined";import l1 from"@mui/icons-material/HelpOutlined";import c1 from"@mui/icons-material/SupportAgentOutlined";import u1 from"@mui/icons-material/PersonOutlined";import d1 from"@mui/icons-material/PersonAddOutlined";import f1 from"@mui/icons-material/BadgeOutlined";import h1 from"@mui/icons-material/WbSunnyOutlined";import p1 from"@mui/icons-material/DarkModeOutlined";import m1 from"@mui/icons-material/LocalFireDepartmentOutlined";import g1 from"@mui/icons-material/WaterDropOutlined";import b1 from"@mui/icons-material/BoltOutlined";import y1 from"@mui/icons-material/AutorenewOutlined";import x1 from"@mui/icons-material/ScienceOutlined";import v1 from"@mui/icons-material/MedicalServicesOutlined";import w1 from"@mui/icons-material/NotificationsOutlined";import _1 from"@mui/icons-material/SendOutlined";import k1 from"@mui/icons-material/LinkOutlined";import S1 from"@mui/icons-material/PublicOutlined";import gf from"@mui/icons-material/ApartmentOutlined";import T1 from"@mui/icons-material/PlumbingOutlined";import C1 from"@mui/icons-material/ElectricalServicesOutlined";import B1 from"@mui/icons-material/ChatOutlined";import I1 from"@mui/icons-material/DescriptionOutlined";import E1 from"@mui/icons-material/FactCheckOutlined";import M1 from"@mui/icons-material/RocketLaunchOutlined";import R1 from"@mui/icons-material/PaletteOutlined";import O1 from"@mui/icons-material/MusicNoteOutlined";import A1 from"@mui/icons-material/VideocamOutlined";import D1 from"@mui/icons-material/ThumbUpOutlined";import P1 from"@mui/icons-material/PushPinOutlined";import N1 from"@mui/icons-material/SearchOutlined";import L1 from"@mui/icons-material/VisibilityOutlined";import z1 from"@mui/icons-material/VerifiedOutlined";import j1 from"@mui/icons-material/TrackChangesOutlined";import F1 from"@mui/icons-material/ExtensionOutlined";import q1 from"@mui/icons-material/CodeOutlined";import $1 from"@mui/icons-material/BugReportOutlined";import H1 from"@mui/icons-material/SmartToyOutlined";import W1 from"@mui/icons-material/StorageOutlined";import U1 from"@mui/icons-material/QrCode2Outlined";import V1 from"@mui/icons-material/FileDownloadOutlined";import K1 from"@mui/icons-material/FileUploadOutlined";import G1 from"@mui/icons-material/MicOutlined";import Y1 from"@mui/icons-material/HeadphonesOutlined";import X1 from"@mui/icons-material/MovieOutlined";import Z1 from"@mui/icons-material/SportsEsportsOutlined";import J1 from"@mui/icons-material/BrushOutlined";import Q1 from"@mui/icons-material/ArchitectureOutlined";import ey from"@mui/icons-material/EngineeringOutlined";import ty from"@mui/icons-material/FactoryOutlined";import ry from"@mui/icons-material/AgricultureOutlined";import ny from"@mui/icons-material/DirectionsBoatOutlined";import oy from"@mui/icons-material/TwoWheelerOutlined";import iy from"@mui/icons-material/HandshakeOutlined";import sy from"@mui/icons-material/GavelOutlined";import ay from"@mui/icons-material/BalanceOutlined";import ly from"@mui/icons-material/TranslateOutlined";import cy from"@mui/icons-material/PsychologyOutlined";import uy from"@mui/icons-material/PetsOutlined";import dy from"@mui/icons-material/CelebrationOutlined";import fy from"@mui/icons-material/BeachAccessOutlined";import hy from"@mui/icons-material/AcUnitOutlined";import py from"@mui/icons-material/ForestOutlined";import my from"@mui/icons-material/LandscapeOutlined";import gy from"@mui/icons-material/HotelOutlined";import by from"@mui/icons-material/LocalLaundryServiceOutlined";import yy from"@mui/icons-material/ChairOutlined";import xy from"@mui/icons-material/LocalBarOutlined";import vy from"@mui/icons-material/LunchDiningOutlined";import wy from"@mui/icons-material/IcecreamOutlined";import _y from"@mui/icons-material/WorkspacePremiumOutlined";import ky from"@mui/icons-material/DiamondOutlined";import Sy from"@mui/icons-material/VaccinesOutlined";var Bc="bookmark",bo="label",lr="notifications",dr="event",Os="warning",As="#e53e3e",bf="none",Ic=[{key:bf,Icon:df},{key:"label",Icon:Hg},{key:"bookmark",Icon:ff},{key:"flag",Icon:Wg},{key:"star",Icon:Ug},{key:"folder",Icon:Vg},{key:"event",Icon:Kg},{key:"build",Icon:Gg},{key:"shipping",Icon:Yg},{key:"store",Icon:Xg},{key:"groups",Icon:Zg},{key:"idea",Icon:Jg},{key:"heart",Icon:Qg},{key:"assignment",Icon:eb},{key:"home",Icon:tb},{key:"work",Icon:rb},{key:"school",Icon:nb},{key:"hospital",Icon:ob},{key:"restaurant",Icon:ib},{key:"flower",Icon:sb},{key:"car",Icon:ab},{key:"campaign",Icon:lb},{key:"savings",Icon:cb},{key:"inventory",Icon:ub},{key:"cleaning",Icon:db},{key:"handyman",Icon:hf},{key:"phone",Icon:fb},{key:"email",Icon:hb},{key:"cart",Icon:pb},{key:"chart",Icon:mb},{key:"print",Icon:gb},{key:"security",Icon:bb},{key:"alarm",Icon:yb},{key:"attach",Icon:xb},{key:"camera",Icon:vb},{key:"image",Icon:wb},{key:"book",Icon:_b},{key:"edit",Icon:kb},{key:"key",Icon:Sb},{key:"lock",Icon:Tb},{key:"unlock",Icon:Cb},{key:"settings",Icon:Bb},{key:"cloud",Icon:Ib},{key:"wifi",Icon:Eb},{key:"computer",Icon:Mb},{key:"smartphone",Icon:Rb},{key:"tv",Icon:Ob},{key:"clock",Icon:Ab},{key:"timer",Icon:Db},{key:"map",Icon:Pb},{key:"place",Icon:Nb},{key:"navigation",Icon:Lb},{key:"flight",Icon:zb},{key:"train",Icon:jb},{key:"bus",Icon:Fb},{key:"bike",Icon:qb},{key:"walk",Icon:$b},{key:"run",Icon:Hb},{key:"fitness",Icon:Wb},{key:"soccer",Icon:Ub},{key:"trophy",Icon:Vb},{key:"gift",Icon:Kb},{key:"cake",Icon:Gb},{key:"coffee",Icon:pf},{key:"pizza",Icon:Yb},{key:"bag",Icon:Xb},{key:"card",Icon:mf},{key:"bank",Icon:Zb},{key:"wallet",Icon:Jb},{key:"money",Icon:Qb},{key:"receipt",Icon:e1},{key:"calculate",Icon:t1},{key:"trending",Icon:r1},{key:"listalt",Icon:n1},{key:"task",Icon:o1},{key:"doneall",Icon:i1},{key:"warning",Icon:s1},{key:"info",Icon:a1},{key:"help",Icon:l1},{key:"support",Icon:c1},{key:"person",Icon:u1},{key:"personadd",Icon:d1},{key:"badge",Icon:f1},{key:"sun",Icon:h1},{key:"moon",Icon:p1},{key:"fire",Icon:m1},{key:"water",Icon:g1},{key:"bolt",Icon:b1},{key:"renew",Icon:y1},{key:"science",Icon:x1},{key:"medical",Icon:v1},{key:"notifications",Icon:w1},{key:"send",Icon:_1},{key:"link",Icon:k1},{key:"public",Icon:S1},{key:"apartment",Icon:gf},{key:"plumbing",Icon:T1},{key:"electrical",Icon:C1},{key:"chat",Icon:B1},{key:"description",Icon:I1},{key:"factcheck",Icon:E1},{key:"rocket",Icon:M1},{key:"palette",Icon:R1},{key:"music",Icon:O1},{key:"video",Icon:A1},{key:"thumbup",Icon:D1},{key:"pin",Icon:P1},{key:"search",Icon:N1},{key:"eye",Icon:L1},{key:"verified",Icon:z1},{key:"target",Icon:j1},{key:"extension",Icon:F1},{key:"code",Icon:q1},{key:"bug",Icon:$1},{key:"robot",Icon:H1},{key:"storage",Icon:W1},{key:"qrcode",Icon:U1},{key:"download",Icon:V1},{key:"upload",Icon:K1},{key:"mic",Icon:G1},{key:"headphones",Icon:Y1},{key:"movie",Icon:X1},{key:"game",Icon:Z1},{key:"brush",Icon:J1},{key:"architecture",Icon:Q1},{key:"engineering",Icon:ey},{key:"factory",Icon:ty},{key:"agriculture",Icon:ry},{key:"boat",Icon:ny},{key:"motorcycle",Icon:oy},{key:"handshake",Icon:iy},{key:"gavel",Icon:sy},{key:"balance",Icon:ay},{key:"translate",Icon:ly},{key:"psychology",Icon:cy},{key:"pets",Icon:uy},{key:"celebration",Icon:dy},{key:"beach",Icon:fy},{key:"snow",Icon:hy},{key:"forest",Icon:py},{key:"mountain",Icon:my},{key:"hotel",Icon:gy},{key:"laundry",Icon:by},{key:"chair",Icon:yy},{key:"bar",Icon:xy},{key:"burger",Icon:vy},{key:"icecream",Icon:wy},{key:"medal",Icon:_y},{key:"diamond",Icon:ky},{key:"vaccine",Icon:Sy}],Ty={cafe:pf,payment:mf,business:gf,construction:hf};function Mt(e){return e===bf?null:Ic.find(d=>d.key===e)?.Icon??Ty[String(e??"")]??ff}function DB(e){return Mt(e)??df}var Ec={title:"",icon:bo,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:""},Mc={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function By(e){let{formId:d="taskbox-create-form",initialValues:g,onValidate:l,onSubmit:o}=e;return Cy({formId:d,initialValues:{...Ec,...g},onValidate:l,onSubmit:o})}import{useGlobalFormaState as Iy}from"@ehfuse/forma";var yf="taskbox-ui-state";function yo(){return Iy({stateId:yf,initialValues:Mc})}import{useMemo as Ey}from"react";import{useTheme as My}from"@mui/material";function zi(e,d){let g=Math.max(0,Math.min(1,d));if(g<=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}, ${g})`}function xf(e,d){let g=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)*g),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 Rc(e,d,g){return g==="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 Ry(e,d){let g=d==="dark";return{bg:g?xf(e.accent,.45):e.accent,color:g?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6,paddingY:.4}}function vf(e,d){return{...e,...d??{}}}function qa(e,d="light"){let g=d==="dark",l=Ry(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:g?"#3a434f":e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:g?"#1a1e24":e.surface,dateBandBg:e.surface,otherMonthBg:g?"#1a1e24":e.surface,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:g?"#232a33":e.surface,borderColor:g?"#333c47":e.border,hoverBg:g?"#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 Oc(e,d){if(!d)return e;let g=d.mode??e.mode,o={...g===e.mode?e.colors:Rc(e.colors.accent,e.colors.accentContrast,g),...d.colors??{}},s=qa(o,g),{groupHeader:r,...t}=d.table??{},{badge:n,...c}=d.board??{},{badge:i,...a}=r??{};return{mode:g,colors:o,table:{...s.table,...t,groupHeader:{...s.table.groupHeader,...a,badge:vf(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:vf(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 Oy(e={}){let{mode:d="light",accent:g="#2563eb",accentContrast:l="#ffffff",input:o}=e;return Oc(qa(Rc(g,l,d),d),o)}function it(){let e=My(),{theme:d}=bt(),g=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return Ey(()=>Oc(qa(Rc(g,l,o),o),d),[g,l,o,d])}import{useCallback as Zn,useEffect as $s,useMemo as Pn,useRef as su,useState as Jn}from"react";import{Box as nr,Divider as Ov,IconButton as Av,ListItemIcon as Dv,Menu as ah,MenuItem as dl}from"@mui/material";import lh from"@mui/icons-material/Add";import Pv from"@mui/icons-material/ArrowUpward";import Nv from"@mui/icons-material/ArrowDownward";import Lv from"@mui/icons-material/KeyboardArrowDown";import zv from"@mui/icons-material/KeyboardArrowRight";import au from"@mui/icons-material/Check";import jv from"@mui/icons-material/FilterList";import Fv from"@mui/icons-material/InboxOutlined";import{Virtuoso as qv}from"react-virtuoso";import $v from"@ehfuse/overlay-scrollbar";import{Box as wf}from"@mui/material";import{jsx as Dy,jsxs as Py}from"react/jsx-runtime";var Ay={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 Hr({priority:e,small:d=!1,plain:g=!1}){let l=Ay[e],o=it(),s=o.mode==="dark",r=g||e==="low";return Py(wf,{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?zi(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:[Dy(wf,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}import{Divider as Fy,Menu as qy,MenuItem as Cf}from"@mui/material";import $y from"@mui/icons-material/Check";function Kn(){return{}}var Ac=[{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"}],Dc=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],Pc=[{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 _f(e){return Ac.find(d=>d.key===e)?.name??""}function kf(e){return Dc.find(d=>d.key===e)?.name??""}function $a(e){return Pc.find(d=>d.key===e)?.name??""}function Nc(e,d=new Date){if(!e.is_event)return!1;let g=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(g))return!1;let l=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(l)){let s=new Date(`${g}T${l}:00`);return!Number.isNaN(s.getTime())&&s.getTime()<=d.getTime()}let o=new Date(`${g}T00:00:00`);return Number.isNaN(o.getTime())?!1:(o.setDate(o.getDate()+1),o.getTime()<=d.getTime())}function Ha(e,d=new Date){return e.is_event?Nc(e,d):!!e.completed}var dn=[{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"}],Ns=dn;function Wa(e){return dn.find(d=>d.key===e)??dn[0]}var Ds={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function fr(e){if(e.is_notice)return Sf(e.status);if(e.is_bug&&e.completed){let d=$a(e.resolution)||"\uC644\uB8CC";return{...Ds,name:d}}return e.completed&&e.status!=="hold"?Ds:e.is_bug?Ly(e.status):Wa(e.status)}var Ny={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function Ls(e){return Nc(e)?Ny:null}var Ps=[{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 Sf(e){return Ps.find(d=>d.key===e)??Ps[1]}var Lc="__closed__",hi=[{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"}],lI=[...hi.filter(e=>e.key!=="bug_hold"),{key:Lc,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...hi.filter(e=>e.key==="bug_hold")];function Ly(e){return hi.find(d=>d.key===e)??hi[0]}function Ua(e){return e.is_notice?Ps:e.is_bug?hi:Ns}function cI(e){return e.status===af}var zy={in_progress:0,not_started:2,hold:3};function uI(e){return e.completed?9:zy[String(e.status??"")]??2}function ji(e,d){let g=new Map(d.map(o=>[o.key,o])),l=(e.label_keys??[]).map(o=>g.get(o)).filter(o=>!!o);if(e.is_event){let o=Ls({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:[Sf(e.status),...l]:e.is_bug?[fr({...e,is_notice:!1}),...l]:e.completed?[Ds,...l]:[Wa(e.status),...l]}function Tf(e){return{bg:`${e}1f`,fg:e,dot:e}}function Va(e,d){return e.includes(d)?e.filter(g=>g!==d):[...e,d]}import{Box as Ka}from"@mui/material";import{jsx as zs,jsxs as jy}from"react/jsx-runtime";function Dt({option:e,small:d=!1}){let g=it(),l=g.mode==="dark",o=e.key==="not_started";return jy(Ka,{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?zi(e.dot,g.chip.darkBgAlpha):e.bg,color:o?l?g.chip.plainColor:e.fg:l?g.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[zs(Ka,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function gI({task:e,statusOptions:d,small:g=!1}){let l=ji(e,d);return l.length===0?null:zs(Ka,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>zs(Dt,{option:o,small:g},o.key))})}function Uo({labelKeys:e,labelOptions:d}){let g=new Map(d.map(o=>[o.key,o])),l=e.map(o=>g.get(o)).filter(o=>!!o);return l.length===0?null:zs(Ka,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>zs(Dt,{option:o,small:!0},o.key))})}import{jsx as js,jsxs as Bf}from"react/jsx-runtime";function Fi({anchorEl:e,value:d,options:g=dn,onSelect:l,onComplete:o,onClose:s}){let r=Kn();return Bf(qy,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[g.map(t=>Bf(Cf,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[js(Dt,{option:t}),d===t.key?js($y,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[js(Fy,{sx:{my:.5}},"complete-divider"),js(Cf,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:js(Dt,{option:Ds})},"complete")]:null]})}function zc(e){let d=String(e??"").trim().replace("T"," "),g=d.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return g?new Date(Number(g[1]),Number(g[2])-1,Number(g[3]),Number(g[4]??0),Number(g[5]??0),Number(g[6]??0)):new Date(d)}function Tr(e,d="YYYY-MM-DD"){let g=typeof e=="string"?zc(e):e;if(!e||e===""||isNaN(g.getTime()))return"";let l=g.getFullYear(),o=(g.getMonth()+1).toString().padStart(2,"0"),s=g.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 If(){return Tr(new Date)}var jc=[{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"}],Hy="__notice__",Wy="__bug__",Uy="__support__";function Vy(e){let d=new Date(`${e}T00:00:00`);return d.setDate(d.getDate()+(6-d.getDay())),Tr(d)}var Ky=[{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 Gy(e,d,g){let l=e.due_date.slice(0,10);return l?l<d?"overdue":l===d?"today":l<=g?"this_week":"later":"no_due"}function Ga(e,d,g,l=[],o=[],s="",r,t=!1){let n=e.filter(f=>f.is_notice);if(n.length>0){let f=Ga(e.filter(u=>!u.is_notice),d,g,l,o,s,r,t);return[{key:Hy,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...f]}if(t){let f=e.filter(b=>b.is_bug),u=e.filter(b=>!b.is_bug&&b.is_support);if(f.length>0||u.length>0){let b=Ga(e.filter(m=>!m.is_bug&&!m.is_support),d,g,l,o,s,r,!1);return[...f.length>0?[{key:Wy,label:"\uC624\uB958",tasks:f}]:[],...u.length>0?[{key:Uy,label:"\uACE0\uAC1D\uC13C\uD130",tasks:u}]:[],...b]}}let c=new Map,i=(f,u)=>{let b=c.get(f);b?b.push(u):c.set(f,[u])},a;if(d==="due"){let f=Vy(g);for(let u of e)i(Gy(u,g,f),u);a=Ky}else if(d==="status"){for(let f of e)i(Wa(f.status).key,f);a=dn.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 b of e){if(b.is_event){i("__event__",b);continue}if(!(Number(b.manager_account_seq??0)>0||String(b.manager_name??"").trim()!=="")){i("__none__",b);continue}let v=f>0&&Number(b.manager_account_seq??0)===f||!!u&&String(b.manager_name??"").trim()===u;i(v?"__manager__":"__reference__",b)}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 v of e)i(v.is_event?"__event__":String(v.manager_name??"").trim()||"__none__",v);let f=s.trim(),u=[...c.keys()].filter(v=>v!=="__none__"&&v!=="__event__").sort((v,k)=>{if(f){if(v===f)return-1;if(k===f)return 1}return v.localeCompare(k)}),b=!!f&&u.includes(f),m=u.filter(v=>v!==f);a=[...b?[{key:f,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},...m.map(v=>({key:v,label:v}))]}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 Yy from"@mui/icons-material/LabelOutlined";import Xy from"@mui/icons-material/NotesOutlined";import Zy from"@mui/icons-material/AutorenewOutlined";import Jy from"@mui/icons-material/CalendarTodayOutlined";import Qy from"@mui/icons-material/EventOutlined";import Ef from"@mui/icons-material/PersonOutlineOutlined";import Mf from"@mui/icons-material/PeopleAltOutlined";import $c from"@mui/icons-material/CheckCircleOutlineOutlined";import ex from"@mui/icons-material/FlagOutlined";import Hc from"@mui/icons-material/AccessTimeOutlined";import tx from"@mui/icons-material/StickyNote2Outlined";import rx from"@mui/icons-material/ViewKanbanOutlined";import nx from"@mui/icons-material/ConfirmationNumberOutlined";import ox from"@mui/icons-material/QuestionAnswerOutlined";import{jsx as hr}from"react/jsx-runtime";var Rf={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 Of(e){return Xa(e).map(d=>Rf[d.id]).join(" ")}function Af(e){return Xa(e).reduce((d,g)=>{let l=Rf[g.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 ix={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:hr(Hc,{sx:{fontSize:15}}),align:"center",sortable:!0},sx={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:hr(Hc,{sx:{fontSize:15}}),align:"center",sortable:!0},ax={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:hr(Hc,{sx:{fontSize:15}}),align:"center",sortable:!0},lx={id:"ticket_no",label:"\uD2F0\uCF13",icon:hr(nx,{sx:{fontSize:15}}),align:"center"},cx={id:"support_type",label:"\uC885\uB958",icon:hr(Yy,{sx:{fontSize:15}}),align:"center"},ux={id:"author_name",label:"\uC791\uC131\uC790",icon:hr(Ef,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},dx={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:hr(ox,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},fx={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:hr(rx,{sx:{fontSize:15}}),projectFilter:!0},hx={id:"targets",label:"\uB300\uC0C1\uC790",icon:hr(Mf,{sx:{fontSize:15}})},qc={id:"priority",label:"\uC911\uC694\uB3C4",icon:hr(ex,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},px={id:"ack",label:"\uD655\uC778",icon:hr($c,{sx:{fontSize:15}}),align:"center",ackFilter:!0},mx={id:"confirm",label:"\uD655\uC778",icon:hr($c,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Fc(e){let d=e.findIndex(l=>l.id==="receiver_names"||l.id==="targets"),g=d>=0?d+1:e.findIndex(l=>l.id==="note");return g<0?[...e,qc]:[...e.slice(0,g),qc,...e.slice(g)]}function Xa(e){let{showProject:d=!1,showManager:g=!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=b=>Ya.find(m=>m.id===b);return[u("completed"),cx,u("title"),u("status"),ax,u("start_date"),u("due_date"),ux,dx,{...u("manager_name"),align:"center"},u("receiver_names"),qc]}let a=u=>{if(!r)return u;let b=u.filter(k=>k.id!=="note"),m=b.findIndex(k=>k.id==="completed"),v=m>=0?m+1:0;return[...b.slice(0,v),lx,...b.slice(v)]};if(s)return a(Fc(Ya.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,hx]:u.id==="note"?[px,u]:[u])));let h=g?Ya:Ya.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(b=>b.id!=="request");let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),c?ix:sx,...h.slice(u)]}if(i==="action"){let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),mx,...h.slice(u)]}if(!d)return a(Fc(h));let f=h.findIndex(u=>u.id==="receiver_names");return a(Fc([...h.slice(0,f+1),fx,...h.slice(f+1)]))}var Ya=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:hr(Xy,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:hr(Zy,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:hr(Jy,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:hr(Qy,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:hr(Ef,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:hr(Mf,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:hr($c,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:hr(tx,{sx:{fontSize:15}})}];import{Button as Df,ClickAwayListener as yx,Dialog as xx,Paper as vx,Popper as wx,Typography as _x,Box as kx}from"@mui/material";import{useMediaQuery as gx,useTheme as bx}from"@mui/material";function jt(){let{isMobile:e}=bt(),d=bx(),g=gx(d.breakpoints.up("lg"));return e!==void 0?e:!g}import{Fragment as Tx,jsx as Vo,jsxs as Nf}from"react/jsx-runtime";function Pf(){if(typeof document>"u")return;let e=0,d=l=>{l.stopPropagation(),l.preventDefault(),g()},g=()=>{window.clearTimeout(e),document.removeEventListener("click",d,!0)};document.addEventListener("click",d,!0),e=window.setTimeout(g,350)}function Sx({title:e,content:d,confirmText:g,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return Nf(Tx,{children:[Vo(_x,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),d,Nf(kx,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[Vo(Df,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{Pf(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),Vo(Df,{size:"medium",variant:"contained",color:"primary",onClick:()=>{Pf(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:g})]})]})}function Pt({open:e,anchorEl:d,title:g="\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 b=jt(),m=Vo(Sx,{title:g,content:l,confirmText:o,cancelText:s,titleFontSize:c,actionFontSize:i,actionMinHeight:a,onCancel:f,onConfirm:u});return b?Vo(xx,{open:e,onClose:f,sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:m}):Vo(wx,{open:e,anchorEl:d,placement:r,sx:{zIndex:h},children:Vo(yx,{onClickAway:f,children:Vo(vx,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:t,minHeight:n,justifyContent:n?"space-between":"flex-start"},onClick:v=>v.stopPropagation(),onMouseDown:v=>v.stopPropagation(),children:m})})})}import{useEffect as Cx,useState as Bx}from"react";import{Box as Ix,TextField as Ex}from"@mui/material";import{jsx as Wc}from"react/jsx-runtime";function rn(e,d){if(!e.completed||d<=0||!e.review_pending||(e.author_account_seq??0)!==d)return!1;let g=e.completed_by_account??0;return g>0&&g!==d}function nn({open:e,anchorEl:d,nextCompleted:g,returnMode:l=!1,onCancel:o,onConfirm:s}){let[r,t]=Bx("");Cx(()=>{e&&t("")},[e]);let n=!g&&l;return Wc(Pt,{open:e,anchorEl:d,title:n?`\uC644\uB8CC\uB97C \uB418\uB3CC\uB9AC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
30
+ \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC \uCC98\uB9AC\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.`:g?"\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":g?"\uC644\uB8CC":"\uD574\uC81C",content:n?Wc(Ix,{sx:{mt:1},children:Wc(Ex,{autoFocus:!0,fullWidth:!0,multiline:!0,minRows:4,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()})}):void 0,onCancel:o,onConfirm:()=>{n&&!r.trim()||s(n?r.trim():"")}})}import{memo as ev}from"react";function An(e){let d=e.visibility;return d==="involved"||d==="group"||d==="all"?d:e.is_open?"all":"involved"}function Za(e,d,g=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=An(e);if(o==="all")return!0;if(o==="group"){let s=e.visibility_group_seq??0;return s>0&&g===s}return!1}function Lf(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:An(e)!=="involved"}function Ja(e,d){return d<=0||(e.author_account_seq??0)===d?!1:Lf(e)}function Qa(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||Lf(e)?!1:(e.receiver_account_seqs??[]).includes(d)}function zf(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function jf(e){return(e.origin_license_seq??0)>0}function Ff(e,d){if(d<=0)return!1;let g=(e.author_account_seq??0)===d;return e.is_notice?g:g||(e.manager_account_seq??0)===d}function xo(e,d){return d<=0?!1:jf(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 oE=[119,121,141,143];function el(e,d){let g=String(e.origin_author_avatar??"").trim(),l=String(e.author_name||e.origin_author_name||e.created_by||"").trim();if(!g||!l||!jf(e)||d?.get(l)===g)return d;let o=new Map(d??[]);return o.set(l,g),o}import{memo as Wx,useEffect as Ux,useRef as Vx,useState as Kc}from"react";import{Box as kt,Button as Gf,ButtonBase as Kx,Checkbox as Gx,Tooltip as Vi}from"@mui/material";import Yx from"@mui/icons-material/PublicOutlined";import Xx from"@mui/icons-material/Group";import Zx from"@mui/icons-material/CheckCircle";import Jx from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as Mx,useState as qf}from"react";import{Avatar as $f,Box as Rx}from"@mui/material";import Ox from"@mui/icons-material/PersonOutlineOutlined";import{jsx as tl}from"react/jsx-runtime";var Uc=new Set,Hf=e=>e.startsWith("data:")||e.startsWith("blob:");function Ax(e){let d=e.trim();return d?([...d][0]??"").toUpperCase():""}function vn({src:e,name:d="",avatarSx:g,iconFontSize:l=40}){let[o,s]=qf(()=>e?Hf(e)||Uc.has(e):!1),[r,t]=qf(!1),n={position:"relative",overflow:"hidden",borderRadius:"15px"},c=g?[n,...Array.isArray(g)?g:[g]]:n;if(Mx(()=>{t(!1),s(e?Hf(e)||Uc.has(e):!1)},[e]),!e||r){let i=Ax(d);return tl($f,{sx:c,children:i?tl(Rx,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:i}):tl(Ox,{sx:{fontSize:l}})})}return tl($f,{src:e,imgProps:{onLoad:()=>{Uc.add(e),s(!0)},onError:()=>t(!0),style:o?void 0:{opacity:0}},sx:c})}var Dx=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),rl=(e,d)=>{if(!d||!d.trim())return[{text:e,highlight:!1}];try{let g=Dx(d.trim()),l=new RegExp(`(${g})`,"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 Px=["\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 g=new Date(`${d}T00:00:00`);return Number.isNaN(g.getTime())?"":`${d.slice(2).replaceAll("-",".")} (${Px[g.getDay()]})`}function Vc(e){let d=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(d))return"";let g=Number(d.slice(5,7)),l=Number(d.slice(8,10));return!g||!l?"":`${g}\uC6D4 ${l}\uC77C`}function fn(e){let d=String(e??"").trim(),[g,l=""]=d.split(" "),o=wn(g);return o?l?`${o} ${l.slice(0,5)}`:o:""}function qi(e,d){let g=(e.checklist??[]).filter(o=>!(d&&o.task_seq&&!d(Number(o.task_seq))));return g.length===0?"":`${g.filter(o=>o.checked).length}/${g.length}`}import{Box as Wf,Tooltip as Nx}from"@mui/material";import{jsx as nl}from"react/jsx-runtime";var $i=[{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 Wr({names:e,size:d=22,ringFirst:g=!1,avatarSrcByName:l}){let o=it(),s=bt().avatarSrcByName,r=l??s;return nl(Wf,{sx:{display:"flex",alignItems:"center"},children:e.map((t,n)=>nl(Nx,{title:g&&n===0?`\uCC45\uC784\uC790 \xB7 ${t}`:t,arrow:!0,children:nl(Wf,{sx:{ml:n===0?0:"-7px",zIndex:n,borderRadius:"50%",border:`2px solid ${o.avatar.separatorColor}`,display:"inline-flex",...o.avatar.sx},children:nl(vn,{src:r?.get(t)??"",name:t,avatarSx:{width:d,height:d,fontSize:Math.round(d/2),borderRadius:"50%",...$i[n%$i.length]},iconFontSize:Math.round(d*.6)})})},`${t}-${n}`))})}import{Box as Uf,Button as Kf}from"@mui/material";import Lx from"@mui/icons-material/CheckCircle";import{Fragment as Fx,jsx as Fs,jsxs as Vf}from"react/jsx-runtime";function zx(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 jx(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}}var Hi={minWidth:0,px:1.25,py:.25,fontSize:13,fontWeight:600,whiteSpace:"nowrap",color:"#fff",backgroundColor:"#8b5cf6",backgroundImage:"linear-gradient(180deg, #a685f9 0%, #8b5cf6 100%)",boxShadow:"none","&:hover":{backgroundColor:"#7c4ee8",backgroundImage:"linear-gradient(180deg, #9873f2 0%, #7c4ee8 100%)",boxShadow:"none"}};function Gn({onClick:e,children:d,fullWidth:g=!1,sx:l}){let o=it();return Fs(Kf,{size:"small",variant:"contained",color:"inherit",fullWidth:g,sx:[jx(o),...Array.isArray(l)?l:l?[l]:[]],onClick:s=>{s.stopPropagation(),e(s)},children:d})}function Wi({canConfirm:e,count:d,total:g,myConfirmed:l=!1,onConfirm:o,onShowList:s}){let r=it(),t=zx(r);return e?Fs(Gn,{onClick:()=>o(),children:"\uD655\uC778"}):Vf(Kf,{size:"small",variant:"outlined",color:"inherit",sx:t,onClick:n=>{n.stopPropagation(),s(n.currentTarget)},children:[l?Fs(Lx,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,Fs(Uf,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:g>0&&d>=g?"\uD655\uC778\uC644\uB8CC":Vf(Fx,{children:[d,Fs(Uf,{component:"span",sx:{mx:.15},children:"/"}),g]})})]})}import{jsx as qx}from"react/jsx-runtime";function Ui({anchorEl:e,onCancel:d,onConfirm:g}){return qx(Pt,{open:!!e,anchorEl:e,title:"\uAC80\uC218\uB97C \uC644\uB8CC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",onCancel:d,onConfirm:g})}import{SvgIcon as $x}from"@mui/material";import{jsx as ol,jsxs as Hx}from"react/jsx-runtime";function Ko({sx:e,...d}){return Hx($x,{viewBox:"0 0 48 48",...d,sx:{fill:"none",...e},children:[ol("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"}),ol("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),ol("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),ol("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as il,jsx as je,jsxs as pi}from"react/jsx-runtime";function qs(e){let d=String(e??"").trim();if(!d)return"-";let g=d.slice(2,10).replaceAll("-","."),l=d.slice(11,16);return/^\d{2}:\d{2}$/.test(l)?`${g} ${l}`:g}function Qx(e){let d=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(d)?qs(`${String(e.due_date??"").slice(0,10)} ${d}`):qs(e.due_date)}function Yc(e,d){let g=String(e??"").trim()||"-";return rl(g,d).map((l,o)=>je("span",{className:l.highlight?"font-semibold text-blue-600":void 0,children:l.text},`${l.text}-${o}`))}function Ki({names:e,searchText:d,avatarSrcByName:g,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 pi(il,{children:[je(vn,{src:g?.get(s)??"",name:s,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...$i[0]},iconFontSize:15}),je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l?{fontWeight:500,color:"#2f80ed"}:{}},children:Yc(s,d)})]})}return je(Wr,{names:o,size:22,avatarSrcByName:g})}function Yf({display:e,summary:d,searchText:g,avatarSrcByName:l}){if(!e||e.kind==="everyone")return je(kt,{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(Ki,{names:s,searchText:g,avatarSrcByName:l});let r=[...o,...s],t=r.join(", ");return r.length>2?je(Vi,{title:t,arrow:!0,children:je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${r[0]}, ${r[1]} \uC678 ${r.length-2}\uBA85`})}):je(Vi,{title:t,arrow:!0,children:pi(kt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[je(kt,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.join(", ")+(s.length>0?",":"")}),s.length>0?je(Ki,{names:s,searchText:g,avatarSrcByName:l}):null]})})}function sl(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function Xf(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 Gc({label:e,bg:d,fg:g}){return je(kt,{component:"span",sx:{flexShrink:0,px:.75,fontSize:12,fontWeight:500,lineHeight:"20px",color:g,bgcolor:d,borderRadius:"4px",whiteSpace:"nowrap",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:e})}var Zf=Wx(function({task:d,gridTemplate:g,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:b=!1,trashMode:m=!1,dimCompleted:v=!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:x=!1,completeLocked:w=!1,unread:_=!1,notice:C=!1,noticeReadOnly:O=!1,readOnly:z=!1,onIconClick:$,lastColumnCentered:V=!1,noteLocked:M=!1,targetSummary:H="",targetDisplay:I,onArchiveTask:E,ackInfo:F,onAckConfirm:U,onAckListClick:Y,onPriorityClick:G}){let[W,X]=Kc(!1),[J,K]=Kc(null),[ee,Z]=Kc(""),re=Vx(null);Ux(()=>{if(!W)return;let be=Me=>{let Fe=re.current;Fe&&(Me.target instanceof Node&&Fe.contains(Me.target)||Fe.blur())};return document.addEventListener("mousedown",be,!0),document.addEventListener("touchstart",be,!0),()=>{document.removeEventListener("mousedown",be,!0),document.removeEventListener("touchstart",be,!0)}},[W]);let ie=[d.manager_account_seq??0,...d.receiver_account_seqs??[]].some(be=>be>0&&be!==(d.author_account_seq??0)),ne=O||z,ae=r>0&&!d.is_notice&&!d.is_event&&(d.manager_account_seq??0)===r,pe=ne||!!d.is_notice,ue=it(),ke=!!S&&Ja(d,r),Ne=!!T&&Qa(d,r),Ce=pe&&!zf(d),Oe=d.is_notice?je(Wi,{canConfirm:!!F?.canAck,count:F?.count??0,total:F?.total??0,myConfirmed:!!F?.acked,onConfirm:()=>U?.(d),onShowList:be=>Y?.(d,be)}):null,nt=!d.is_notice&&!d.completed&&!!d.due_date&&d.due_date.slice(0,10)<=t,me=bt(),oe=qi(d,me.resolveTask),Ie=!d.is_notice&&d.completed&&d.review_pending&&me.onReviewDone&&(me.myAccountSeq??0)>0&&(d.author_account_seq??0)===(me.myAccountSeq??0)?pi(il,{children:[je(Gf,{variant:"contained",size:"small",disableElevation:!0,onClick:be=>{be.stopPropagation(),K(be.currentTarget)},sx:Hi,children:"\uAC80\uC218\uC644\uB8CC"}),je(Ui,{anchorEl:J,onCancel:()=>K(null),onConfirm:()=>{me.onReviewDone?.(d),K(null)}})]}):null,ve=nt?"#e5484d":ue.colors.textPrimary,we=je(kt,{className:"cell",onClick:ne?void 0:be=>N(d,"due_date",be.currentTarget),sx:{justifyContent:"center",color:ve,fontWeight:500,whiteSpace:"nowrap",...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:d.due_date?Qx(d):null});return pi(kt,{onContextMenu:be=>y(d,be),sx:{display:"grid",gridTemplateColumns:g,minHeight:48,position:"relative",fontSize:15,bgcolor:ue.table.rowBg,color:ue.table.rowColor,borderBottom:x?"none":`1px solid ${ue.table.rowBorderColor}`,"&:hover":{bgcolor:ue.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${ue.table.rowBorderColor}`},"& > .cell:first-of-type":{px:1.5},"& > .cell:last-of-type":{borderRight:"none",pr:2,...V?{pl:2}:{}}},children:[je(kt,{className:"cell",sx:{justifyContent:"center"},children:d.is_event?(()=>{let be=Mt(d.icon||dr);if(!be)return null;let Me=je(be,{sx:{fontSize:19,color:d.icon_color||"#1e3a8a"}});return ne||!$?Me:je(Vi,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:je(Kx,{onClick:Fe=>{Fe.stopPropagation(),$(d,Fe.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:ue.table.cellHoverBg}},children:Me})})})():!O&&!w&&!m?je(Vi,{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(Gx,{checked:d.completed,inputProps:{"aria-label":d.completed?`${d.title} \uC644\uB8CC \uD574\uC81C`:`${d.title} \uC644\uB8CC \uCC98\uB9AC`},icon:je(Jx,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:je(Zx,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:be=>be.stopPropagation(),onChange:(be,Me)=>D({anchorEl:be.currentTarget,task:d,nextCompleted:Me}),sx:{p:.5}})}):null}),f?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:d.ticket_no||"-"}):null,u?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:d.support_type?(()=>{let be=Xf(d.support_type);return je(Gc,{label:sl(d.support_type),bg:be.bg,fg:be.fg})})():"-"}):null,pi(kt,{className:"cell",onClick:()=>p(d),sx:{gap:1,pl:2,cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}},children:[(()=>{if(!d.is_notice)return null;let be=Mt(d.icon||lr);return be?je(be,{sx:{fontSize:18,flexShrink:0,color:d.icon_color||"#e5484d"}}):null})(),!u&&d.is_support&&d.support_type?(()=>{let be=Xf(d.support_type);return je(Gc,{label:sl(d.support_type),bg:be.bg,fg:be.fg})})():null,f&&(d.origin_license_seq??0)>0&&d.origin_license_name?je(Gc,{label:d.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(d.is_notice||u||d.is_support)return null;let be=An(d);return be==="involved"?null:je(Vi,{title:be==="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:be==="all"?je(Yx,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):je(Xx,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:d.completed&&v?400:ue.table.rowTitleFontWeight,color:d.completed&&v?ue.colors.textMuted:ue.table.rowTitleColor,textDecoration:d.completed&&v?"line-through":"none"},children:Yc(d.title,s)}),oe?je(kt,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:ue.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:oe}):null,(d.comment_count??d.comments?.length??0)>0?je(Ko,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,je(kt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:je(Uo,{labelKeys:d.label_keys??[],labelOptions:l})}),_&&!d.completed?je(kt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,Ha(d)&&!d.archived&&!ne&&E?je(Gf,{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:be=>{be.stopPropagation(),E(d)},children:"\uBCF4\uAD00"}):null]}),(()=>{let be=ne||!!d.is_event||!!d.completed;return je(kt,{className:"cell",onClick:be?void 0:Me=>P(d,Me.currentTarget),sx:{py:.5,justifyContent:"center",...be?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:d.is_event?(()=>{let Me=Ls(d);return Me?je(Dt,{option:Me}):null})():je(Dt,{option:fr(d)})})})(),u?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:qs(d.created_time)}):null,je(kt,{className:"cell",onClick:ne?void 0:be=>N(d,"start_date",be.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:qs(d.start_date)}),we,u?pi(il,{children:[je(Vi,{title:d.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(kt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(Ki,{names:[d.author_name||d.origin_author_name||d.created_by||""],searchText:s,avatarSrcByName:el(d,o)})})}),je(kt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(Ki,{names:(d.answerer_names??[]).slice(0,1),searchText:s,avatarSrcByName:o})})]}):null,C?je(kt,{className:"cell",onClick:ne?void 0:()=>j(d,"targets"),sx:{gap:.75,...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:je(Yf,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&d.is_notice?je(kt,{className:"cell",onClick:ne?void 0:()=>j(d,"targets"),sx:{gridColumn:c?"span 2":"auto",gap:.75,...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:je(Yf,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&!d.is_notice&&!d.is_event&&c?je(kt,{className:"cell",onClick:Ce?void 0:()=>j(d,"manager"),sx:{gap:.75,...ke||Ne||b?{justifyContent:"center"}:{},...Ce?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:ke?je(Gn,{onClick:be=>S?.(d,be.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):Ne?je(Gn,{onClick:be=>T?.(d,be.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):je(Ki,{names:d.manager_name?[d.manager_name]:[],searchText:s,avatarSrcByName:o,emphasize:ae})}):null,!C&&!d.is_notice?je(kt,{className:"cell",onClick:pe?void 0:()=>j(d,"receivers"),sx:{gridColumn:d.is_event&&c?"span 2":"auto",gap:.75,...pe?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:je(Ki,{names:d.receiver_names,searchText:s,avatarSrcByName:o})}):null,je(kt,{className:"cell",onClick:ne?void 0:be=>G?.(d,be.currentTarget),sx:{py:.5,justifyContent:"center",...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:je(Hr,{priority:d.priority,plain:!0})}),n?je(kt,{className:"cell",onClick:ne?void 0:be=>A?.(d,be.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...ne?{}:{cursor:"pointer","&:hover":{bgcolor:ue.table.cellHoverBg}}},children:R?pi(il,{children:[(()=>{let be=Mt(L);return be?je(be,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R})]}):null}):null,C?je(kt,{className:"cell",sx:{justifyContent:"center"},children:Oe}):null,!C&&i&&a&&!u?je(kt,{className:"cell",sx:{justifyContent:"center"},children:d.is_notice?Oe:Ie||(ie?je(Wi,{canConfirm:!!k?.canConfirm,count:k?.count??0,total:k?.total??0,myConfirmed:!!k?.myTime,onConfirm:()=>B?.(d),onShowList:be=>Y?.(d,be)}):null)}):null,!C&&h==="action"?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:ue.table.rowSubColor},children:d.is_notice?Oe:Ie||(k&&k.total>0?je(Wi,{canConfirm:!!k.canConfirm,count:k.count,total:k.total,myConfirmed:!!k.myTime,onConfirm:()=>B?.(d),onShowList:be=>Y?.(d,be)}):"-")}):null,!C&&!i?je(kt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:m?ue.colors.danger:v?ue.table.rowSubColor:ue.table.rowTitleColor},children:m?qs(d.deleted_time):d.completed_time||"-"}):null,f||u?null:je(kt,{className:"cell",onClick:()=>{!M&&!W&&(Z(d.note),X(!0))},sx:{color:"#6f6f6c",cursor:M?"default":"text"},children:W?je(kt,{component:"input",ref:re,autoFocus:!0,spellCheck:!1,value:ee,onChange:be=>Z(be.target.value),onBlur:()=>{X(!1),ee.trim()!==d.note&&q(d.seq,ee)},onKeyDown:be=>{be.key==="Enter"&&be.target.blur(),be.key==="Escape"&&(Z(d.note),X(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:ue.table.rowTitleColor,caretColor:ue.table.rowTitleColor,p:0,m:0}}):je(kt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.note?Yc(d.note,s):""})}),ae?je(kt,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});import{jsx as tv}from"react/jsx-runtime";var Jf=ev(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 tv(Zf,{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:!xo(l,o),readOnly:d.readOnly,noteLocked:d.readOnly||(l.is_notice?!Za(l,o):!xo(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 Qf,useState as Zc}from"react";import{Box as mi,Button as eh,ButtonBase as th,Dialog as ov,Divider as Jc,Menu as iv,MenuItem as sv,Popover as av}from"@mui/material";import rh from"@mui/icons-material/ChevronRight";import lv from"@mui/icons-material/Check";import cv from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as uv,TimePicker as dv}from"@ehfuse/mui-datetime-picker";import fv from"@mui/icons-material/TimerOutlined";import{useEffect as rv,useState as nv}from"react";function Yn(e){let{loadHolidays:d}=bt(),[g,l]=nv(()=>new Map),o=e.join(",");return rv(()=>{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]),g}var Xc=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function Xn(e){let d=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],g=new Set;for(let l of d){let o=String(l??"").trim();Xc.includes(o)&&g.add(o)}return Xc.filter(l=>g.has(l))}function al(e,d){if(d==="none")return[];let g=e.includes(d)?e.filter(l=>l!==d):[...e,d];return Xc.filter(l=>g.includes(l))}import{Fragment as nh,jsx as Dr,jsxs as Dn}from"react/jsx-runtime";var hv=9,pv=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],oh=[{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"}],ih=[{value:"none",label:"\uC5C6\uC74C"},...pv,...oh];function Qc(e){return e?ih:[{value:"none",label:"\uC5C6\uC74C"},...oh]}function mv(e){return e==="same_day"?"\uB2F9\uC77C":ih.find(d=>d.value===e)?.label??"\uC5C6\uC74C"}function eu(e){if(e.length===0)return"\uC5C6\uC74C";let d=e.map(g=>mv(g));return d.length<=3?d.join(", "):`${d.slice(0,3).join(", ")} \uC678 ${d.length-3}`}function gv(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:g,reminders:l,hideReminder:o=!1,showTime:s=!1,centered:r=!1,onClose:t,onDateChange:n,onReminderChange:c}){let[i,a]=Zc(null),[h,f]=Zc(null),u=Kn(),b=String(g??"").trim().slice(0,10),m=String(g??"").trim().slice(11,16),v=/^\d{2}:\d{2}$/.test(m)?m:"",k=(S,T)=>n(T?`${S} ${T}`:S),{defaultDueHour:B}=bt(),R=`${String(Number.isInteger(B)&&B>=0&&B<=23?B:hv).padStart(2,"0")}:00`,[L,A]=Zc(()=>{let S=Number(b.slice(0,4));return Number.isFinite(S)&&S>1900?S:new Date().getFullYear()}),D=Qf(()=>[L-1,L,L+1],[L]),N=Yn(D),q=Qf(()=>{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=Dn(mi,{sx:{width:300,maxWidth:"100%"},children:[Dr(mi,{sx:{height:320},children:Dr(uv,{selectedDate:gv(b),onSelect:S=>{k(Tr(S),s?v||R:v),s||t()},onClose:t,showFooter:!1,autoApply:!0,holidays:q,onYearChange:S=>A(S),onMonthChange:(S,T)=>{typeof T=="number"&&A(T)}})}),s?Dn(nh,{children:[Dr(Jc,{sx:{borderColor:"#e6e6e3"}}),Dn(th,{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:[Dn(mi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Dr(fv,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),Dn(mi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[v||"\uC5C6\uC74C",Dr(rh,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Dr(dv,{anchorEl:h,open:!!h,onClose:()=>f(null),centered:r,value:{hour:v.slice(0,2)||R.slice(0,2),minute:v.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(S,T)=>{k(b||Tr(new Date),`${S}:${T}`),f(null)}})]}):null,o?null:Dn(nh,{children:[Dr(Jc,{sx:{borderColor:"#e6e6e3"}}),Dn(th,{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:[Dn(mi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Dr(cv,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),Dn(mi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[eu(l),Dr(rh,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Dr(iv,{transitionDuration:0,anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...u,children:Qc(!!v).map(S=>{let T=S.value==="none"?l.length===0:l.includes(S.value);return Dn(sv,{selected:T,onClick:()=>{c(al(l,S.value)),S.value==="none"&&a(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[S.label,T?Dr(lv,{sx:{fontSize:16,color:"#2f80ed"}}):null]},S.value)})})]}),Dr(Jc,{sx:{borderColor:"#e6e6e3"}}),Dn(mi,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[Dr(eh,{size:"small",onClick:()=>{k(Tr(new Date),v),t()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),Dr(eh,{size:"small",onClick:t,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return r?Dr(ov,{open:d,onClose:t,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:j}):Dr(av,{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 xv,useState as ru}from"react";import{Box as gi,Button as vv,Switch as wv}from"@mui/material";import{FormDialog as _v}from"@ehfuse/mui-form-dialog";import{ClearTextField as kv}from"@ehfuse/mui-form-controls";import{ErrorAlert as Sv}from"@ehfuse/alerts";import{Box as bv,ButtonBase as yv}from"@mui/material";import{jsx as tu}from"react/jsx-runtime";function ll({value:e,onChange:d}){return tu(bv,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:Ic.map(({key:g,Icon:l})=>{let o=g===e;return tu(yv,{onClick:()=>d(g),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:tu(l,{sx:{fontSize:20}})},g)})})}import{jsx as vo,jsxs as nu}from"react/jsx-runtime";function cl({open:e,title:d="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:g="",initialIcon:l=Bc,confirmText:o="\uCD94\uAC00",initialUseSprints:s=!1,onClose:r,onSubmit:t}){let[n,c]=ru(""),[i,a]=ru(Bc),[h,f]=ru(!1);xv(()=>{e&&(c(g),a(l),f(s))},[e]);let u=()=>{let m=n.trim();if(!m){Sv("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i,h),r()};return vo(_v,{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:nu(gi,{children:[vo(kv,{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}}),vo(gi,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),vo(gi,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:vo(ll,{value:i,onChange:a})}),nu(gi,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[nu(gi,{children:[vo(gi,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),vo(gi,{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)"})]}),vo(wv,{checked:h,onChange:(m,v)=>f(v)})]})]})}],actions:{showCancelButton:!0,right:vo(vv,{variant:"contained",onClick:u,children:o})}})}import{Box as Tv}from"@mui/material";import{jsx as Cv}from"react/jsx-runtime";function ul({size:e=40}){return Cv(Tv,{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 ou,ButtonBase as Bv,Divider as Iv,Popover as Ev}from"@mui/material";import Mv from"@mui/icons-material/Check";import Rv from"@ehfuse/overlay-scrollbar";import{jsx as bi,jsxs as sh}from"react/jsx-runtime";var iu=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Go({anchorEl:e,value:d,color:g="",onSelect:l,onSelectColor:o,onClose:s}){return bi(Ev,{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:sh(ou,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[bi(Rv,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:bi(ll,{value:d||bo,onChange:r=>{l(r),s()}})}),o?sh(ou,{sx:{px:1.25,pb:1.25},children:[bi(Iv,{sx:{mb:1,borderColor:"#efefed"}}),bi(ou,{sx:{display:"grid",gridTemplateColumns:`repeat(${iu.length}, 1fr)`,justifyItems:"center"},children:iu.map(r=>{let t=(g||iu[0])===r;return bi(Bv,{"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?bi(Mv,{sx:{fontSize:15,color:"#ffffff"}}):null},r)})})]}):null]})})}import{Fragment as uh,jsx as ht,jsxs as on}from"react/jsx-runtime";var ch=48,Hv=5;function dh({tasks:e,statusOptions:d,avatarSrcByName:g,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:b,hideCompleted:m=!1,loading:v=!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:x,onTaskContextMenu:w,onMemberFilterClick:_,activeMemberFilters:C=[],onStatusFilterClick:O,statusFilterActive:z=!1,onAckFilterClick:$,ackFilterActive:V=!1,onProjectFilterClick:M,projectFilterActive:H=!1,onPriorityFilterClick:I,priorityFilterActive:E=!1,onValueFilterClick:F,activeValueFilters:U=[],columns:Y,getConfirmInfo:G,onConfirmTask:W,myAccountSeq:X=0,currentUserName:J="",groupManagerByMyRole:K=!1,pinKindGroups:ee=!1,allowManagerVolunteer:Z=!0,noticeAdmin:re=!1,getTargetSummary:ie,getTargetDisplay:ne,onArchiveTask:ae,isTaskUnread:pe,getAckInfo:ue,onAckConfirm:ke,onAckListClick:Ne,onChangeTaskPriority:Ce,onEndReached:Oe,useTaskItem:nt}){let me=it(),oe=Pn(()=>({showManager:!0,showActions:!0,showRequest:!0,...Y}),[Y]),Ie=oe.showManager??!0,ve=oe.showActions??!0,we=oe.showRequest??!0,be=oe.confirmMode??"none",Me=oe.notice??!1,Fe=oe.bug??!1,vr=oe.support??!1,Ve=vr||(oe.centerManager??!1),Ge=oe.trash??!1,Tt=h!=="none",Qe=Pn(()=>Tt?Ga(e,h,o,u,d,J,{enabled:K,myAccountSeq:X},ee):[],[Tt,e,h,o,u,d,J,K,X,ee]),De=Pn(()=>m?e.filter(fe=>!fe.completed):e,[e,m]),xe=Pn(()=>De.filter(fe=>fe.completed||fe.archived||fe.is_support?!1:fe.is_notice?!!ue?.(fe).canAck:!!G?.(fe).canConfirm),[De,ue,G]),ge=Pn(()=>X>0?e.filter(fe=>fe.completed&&!fe.archived&&!fe.is_support&&!!fe.review_pending&&(fe.author_account_seq??0)===X):[],[e,X]),Be=Pn(()=>new Set([...xe,...ge].map(fe=>fe.seq)),[xe,ge]),Ze=Pn(()=>Qe.map(fe=>({section:fe,visibleTasks:fe.tasks.filter(ze=>!Be.has(ze.seq)&&(!m||!ze.completed))})).filter(fe=>fe.visibleTasks.length>0),[Qe,m,Be]),qe=Pn(()=>new Set(f),[f]),Pe=Pn(()=>{let fe=[];if(Tt)for(let{section:ze,visibleTasks:lt}of Ze){let wr=qe.has(ze.key);if(fe.push({kind:"header",section:ze,visibleTasks:lt,collapsed:wr}),!wr)for(let $r of lt)fe.push({kind:"task",task:$r,last:!1})}else for(let ze of De)Be.has(ze.seq)||fe.push({kind:"task",task:ze,last:!1});for(let ze=fe.length-1;ze>=0;ze-=1){let lt=fe[ze];if(lt.kind==="task"){lt.last=!0;break}}return fe},[Tt,Ze,De,qe,Be]),Ct=oe.showProject??(!Me&&h!=="tab"),Ke=Pn(()=>Xa({...oe,showProject:Ct}),[oe,Ct]),te=Of({...oe,showProject:Ct}),ce=Af({...oe,showProject:Ct}),{onReturnTask:de}=bt(),Se=su(null),ct=su(null),Re=Ke[Ke.length-1]?.align==="center",Le=Pn(()=>{let fe=new Map;for(let ze of u)fe.set(ze.key,{label:ze.archived?`${ze.label} (\uBCF4\uAD00\uB428)`:ze.label,icon:ze.icon});return fe},[u]),wt=su(null),[Ae,Ee]=Jn(null);$s(()=>{if(!Ae)return;let fe=()=>{Se.current&&(Se.current.scrollLeft=Ae.scrollLeft),ct.current&&(ct.current.scrollLeft=Ae.scrollLeft)};return fe(),Ae.addEventListener("scroll",fe,{passive:!0}),()=>Ae.removeEventListener("scroll",fe)},[Ae]);let Je=De.length>0;$s(()=>{if(!Je){Ee(null);return}let fe=window.requestAnimationFrame(()=>{Ee(wt.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(fe)},[Je]);let ot=`${h}|${s}|${r}|${l}|${m?1:0}`;$s(()=>{Ae&&(Ae.scrollTop=0)},[ot,Ae]);let[ft,Bt]=Jn(!1);$s(()=>{if(!Ae)return;let fe=()=>Bt(Ae.scrollHeight-Ae.clientHeight>4),ze=window.requestAnimationFrame(fe),lt=new ResizeObserver(fe);return lt.observe(Ae),Ae.firstElementChild&&lt.observe(Ae.firstElementChild),()=>{window.cancelAnimationFrame(ze),lt.disconnect()}},[Ae,Pe.length,f.length]),$s(()=>{if(!Ae)return;let fe=Ae.clientHeight,ze=new ResizeObserver(()=>{let lt=Ae.clientHeight;lt!==fe&&(fe=lt,Ae.dispatchEvent(new Event("scroll")))});return ze.observe(Ae),()=>ze.disconnect()},[Ae]);let[ut,$t]=Jn(null),[xt,Wt]=Jn(null),[Ut,Q]=Jn(null),[le,ye]=Jn(null),[he,Te]=Jn(!1),[$e,We]=Jn(null),et=$e?e.find(fe=>fe.seq===$e.taskSeq)??null:null,[tt,se]=Jn(null),He=tt?e.find(fe=>fe.seq===tt.taskSeq)??null:null,[yt,It]=Jn(null),_t=yt?e.find(fe=>fe.seq===yt.taskSeq)??null:null,At=Zn((fe,ze)=>{It({anchorEl:ze,taskSeq:fe.seq})},[]),kr=Zn((fe,ze)=>{se({anchorEl:ze,taskSeq:fe.seq})},[]),en=Zn((fe,ze)=>{We({anchorEl:ze,taskSeq:fe.seq})},[]),tn=Zn((fe,ze)=>{if(!ze)return;t(fe,s===fe&&r==="asc"?"desc":"asc")},[t,s,r]),xn=Zn((fe,ze,lt)=>{$t({anchorEl:lt,taskSeq:fe.seq,field:ze,date:fe[ze],isEvent:!!fe.is_event,reminders:Xn(fe),completed:fe.completed})},[]),mo=Zn((fe,ze)=>{ye({anchorEl:ze,task:fe})},[]),di=Zn(fe=>{ut&&(i(ut.taskSeq,ut.field,fe),$t(ze=>ze&&{...ze,date:fe}))},[ut,i]),Ho=Zn(fe=>{ut&&(a(ut.taskSeq,fe),$t(ze=>ze&&{...ze,reminders:fe}))},[ut,a]),Et=Zn((fe,ze)=>{Q({anchorEl:ze,taskSeq:fe.seq,title:fe.title,kind:"claim"})},[]),Ot=Zn((fe,ze)=>{Q({anchorEl:ze,taskSeq:fe.seq,title:fe.title,kind:"volunteer"})},[]),fi=(fe,ze)=>ht(Jf,{task:fe,hideBottomBorder:ze,gridTemplate:te,useTaskItem:nt,statusOptions:d,avatarSrcByName:g,searchText:l,myAccountSeq:X,todayStr:o,showProject:Ct,showManager:Ie,showActions:ve,showRequest:we,confirmMode:be,notice:Me,bugMode:Fe,supportMode:vr,managerCentered:Ve,trashMode:Ge,dimCompleted:k,readOnly:B,projectByKey:Le,getConfirmInfo:G,onConfirmTask:W,onProjectClick:mo,onRequestReply:n,onRequestToggleCompleted:Wt,onDateClick:xn,onChangeNote:T,onMemberClick:P,onClaimClick:p?Et:void 0,onVolunteerClick:Z?Ot:void 0,onStatusClick:en,onOpenDetail:x,onTaskContextMenu:w,onPriorityClick:kr,onIconClick:R?At:void 0,lastColumnCentered:Re,getTargetSummary:ie,getTargetDisplay:ne,getAckInfo:ue,isTaskUnread:pe,onArchiveTask:ae,onAckConfirm:ke,onAckListClick:Ne},fe.seq);return on(nr,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${me.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:me.table.bg,color:me.table.rowColor,...me.table.sx},children:[ht(nr,{ref:Se,sx:{overflow:"hidden",flexShrink:0},children:ht(nr,{sx:{display:"grid",gridTemplateColumns:te,minWidth:ce,borderBottom:`1px solid ${me.table.borderColor}`,flexShrink:0,bgcolor:me.table.headerBg,"& > *":{borderRight:`1px solid ${me.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,...Re?{pl:2}:{}},...me.table.headerSx},children:Ke.map(fe=>{let ze=s===fe.id,lt=!!fe.memberFilter,wr=lt&&C.includes(fe.memberFilter),$r=lt||!!fe.statusFilter||!!fe.ackFilter||!!fe.projectFilter||!!fe.priorityFilter||!!fe.valueFilter,Vn=wr||!!fe.valueFilter&&U.includes(fe.valueFilter)||!!fe.statusFilter&&z||!!fe.ackFilter&&V||!!fe.projectFilter&&H||!!fe.priorityFilter&&E;return on(nr,{onClick:On=>{fe.memberFilter?_(fe.memberFilter,On.currentTarget):fe.statusFilter?O(On.currentTarget):fe.ackFilter?$?.(On.currentTarget):fe.projectFilter?M?.(On.currentTarget):fe.priorityFilter?I?.(On.currentTarget):fe.valueFilter?F?.(fe.valueFilter,On.currentTarget):tn(fe.id,fe.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:fe.align==="center"?"center":"flex-start",gap:.5,px:1,...fe.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:me.table.headerFontSize,color:fe.sortable||$r?me.table.headerActiveColor:me.table.headerColor,whiteSpace:"nowrap",cursor:fe.sortable||$r?"pointer":"default",userSelect:"none",...ze?{color:me.table.headerFilteredColor}:{},...Vn?{color:me.table.headerFilteredColor,fontWeight:600}:{}},children:[fe.icon,fe.label,Vn?ht(jv,{sx:{fontSize:14}}):null,ze?r==="asc"?ht(Pv,{sx:{fontSize:13}}):ht(Nv,{sx:{fontSize:13}}):null]},fe.id)})})}),xe.length>0||ge.length>0?ht(nr,{sx:{flexShrink:0,maxHeight:`${me.table.groupHeader.minHeight+1+ch*Hv}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:ct,children:on(nr,{sx:{minWidth:ce},children:[xe.length>0?on(uh,{children:[on(nr,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:me.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[ht(nr,{component:"span",sx:{fontSize:me.table.groupHeader.labelFontSize,fontWeight:me.table.groupHeader.labelFontWeight,color:me.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),ht(nr,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:ht(nr,{component:"span",sx:{flexShrink:0,width:me.table.groupHeader.badge.width,py:me.table.groupHeader.badge.paddingY,borderRadius:`${me.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:me.table.groupHeader.badge.fontSize,fontWeight:me.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:xe.length})})]}),xe.map((fe,ze)=>fi(fe,ge.length===0&&ze===xe.length-1))]}):null,ge.length>0?on(uh,{children:[on(nr,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:me.table.groupHeader.minHeight,bgcolor:"#f4f0fe",borderBottom:"1px solid #e2dbf9"},children:[ht(nr,{component:"span",sx:{fontSize:me.table.groupHeader.labelFontSize,fontWeight:me.table.groupHeader.labelFontWeight,color:me.table.groupHeader.labelColor},children:"\uAC80\uC218 \uB300\uAE30"}),ht(nr,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:ht(nr,{component:"span",sx:{flexShrink:0,width:me.table.groupHeader.badge.width,py:me.table.groupHeader.badge.paddingY,borderRadius:`${me.table.groupHeader.badge.borderRadius}px`,bgcolor:"#8b5cf6",color:"#fff",fontSize:me.table.groupHeader.badge.fontSize,fontWeight:me.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:ge.length})})]}),ge.map((fe,ze)=>fi(fe,ze===ge.length-1))]}):null]})}):null,De.length===0&&v?ht(nr,{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:ht(ul,{})}):De.length===0?ht(nr,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:me.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.`:Fe?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":vr?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Me?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):ht(nr,{sx:{flex:1,minHeight:0},children:ht($v,{ref:wt,style:{height:"100%"},contentStyle:{minWidth:ce},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Ae?ht(qv,{customScrollParent:Ae,data:Pe,computeItemKey:(fe,ze)=>ze.kind==="header"?`group:${ze.section.key}`:ze.task.seq,endReached:Tt?void 0:Oe,defaultItemHeight:ch,increaseViewportBy:{top:600,bottom:600},itemContent:(fe,ze)=>{if(ze.kind==="task")return fi(ze.task,ze.last&&ft);let{section:lt,visibleTasks:wr,collapsed:$r}=ze;return on(nr,{onClick:()=>b(lt.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:me.table.groupHeader.minHeight,bgcolor:me.table.groupHeader.bg,borderBottom:`1px solid ${me.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:me.table.groupHeader.hoverBg},...me.table.groupHeader.sx},children:[$r?ht(zv,{sx:{fontSize:20,color:me.colors.textMuted}}):ht(Lv,{sx:{fontSize:20,color:me.colors.textMuted}}),ht(nr,{component:"span",sx:{fontSize:me.table.groupHeader.labelFontSize,fontWeight:me.table.groupHeader.labelFontWeight,color:me.table.groupHeader.labelColor},children:lt.label}),q?ht(nr,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:q(lt.key,lt.tasks)}):null,A&&(!D||D(lt.key))?ht(Av,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:Vn=>{Vn.stopPropagation(),A(lt.key,lt.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:me.colors.textSecondary,"&:hover":{bgcolor:me.colors.surfaceHover,color:me.colors.accentOnSurface}},children:ht(lh,{sx:{fontSize:21}})}):null,on(nr,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[N?N(lt.key,lt.tasks):null,ht(nr,{component:"span",sx:{flexShrink:0,width:me.table.groupHeader.badge.width,py:me.table.groupHeader.badge.paddingY,borderRadius:`${me.table.groupHeader.badge.borderRadius}px`,bgcolor:me.table.groupHeader.badge.bg,border:me.table.groupHeader.badge.border,color:me.table.groupHeader.badge.color,fontSize:me.table.groupHeader.badge.fontSize,fontWeight:me.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:wr.length})]})]})}},ot):null})}),ht(Fi,{anchorEl:$e?.anchorEl??null,value:et?.status??"",options:et?Ua(et):Ns,onSelect:fe=>{et&&y(et.seq,fe)},onComplete:et&&!et.completed&&!et.is_notice&&!et.is_event&&!et.is_bug&&!Ge&&((et.author_account_seq??0)===X||(et.manager_account_seq??0)===X)?()=>c(et,!0):void 0,onClose:()=>We(null)}),ht(ah,{transitionDuration:0,anchorEl:tt?.anchorEl??null,open:!!tt,onClose:()=>se(null),children:["high","medium","low"].map(fe=>on(dl,{selected:He?.priority===fe,onClick:()=>{He&&Ce?.(He.seq,fe),se(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[ht(Hr,{priority:fe,small:!0}),He?.priority===fe?ht(au,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},fe))}),on(ah,{anchorEl:le?.anchorEl??null,open:!!le,onClose:()=>ye(null),transitionDuration:0,children:[on(dl,{selected:!le?.task.tab_key,onClick:()=>{le&&j(le.task.seq,""),ye(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ht(Fv,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",le?.task.tab_key?null:ht(au,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),u.filter(fe=>!fe.archived).map(fe=>{let ze=Mt(fe.icon),lt=le?.task.tab_key===fe.key;return on(dl,{selected:lt,onClick:()=>{le&&j(le.task.seq,fe.key),ye(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ze?ht(ze,{sx:{fontSize:17,color:"#1e3a8a"}}):null,fe.label,lt?ht(au,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},fe.key)}),S?[ht(Ov,{},"add-project-divider"),on(dl,{onClick:()=>Te(!0),sx:{fontSize:14,color:"#787774"},children:[ht(Dv,{children:ht(lh,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),S?ht(cl,{open:he,onClose:()=>Te(!1),onSubmit:(fe,ze)=>{let lt=le?.task.seq??0;(async()=>{let wr=await S(fe,ze);wr&&lt&&j(lt,wr)})(),ye(null)}}):null,ht(Go,{anchorEl:yt?.anchorEl??null,value:_t?.icon??"",color:_t?.icon_color??"",onSelect:fe=>{yt&&R?.(yt.taskSeq,fe),It(null)},onSelectColor:L?fe=>{yt&&L(yt.taskSeq,fe)}:void 0,onClose:()=>It(null)}),ht(_n,{anchorEl:ut?.anchorEl??null,open:!!ut&&ut?.field==="start_date",date:ut?.date??"",reminders:[],hideReminder:!0,showTime:!ut?.isEvent,onClose:()=>$t(null),onDateChange:di,onReminderChange:()=>{}}),ht(_n,{anchorEl:ut?.anchorEl??null,open:!!ut&&ut?.field==="due_date",date:ut?.date??"",showTime:!ut?.isEvent,reminders:ut?.reminders??[],hideReminder:!!ut?.completed,onClose:()=>$t(null),onDateChange:di,onReminderChange:Ho}),ht(Pt,{open:!!Ut,anchorEl:Ut?.anchorEl??null,title:Ut?.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:()=>Q(null),onConfirm:()=>{Ut&&p?.(Ut.taskSeq),Q(null)}}),ht(nn,{open:!!xt,anchorEl:xt?.anchorEl??null,nextCompleted:xt?.nextCompleted??!1,returnMode:!!de&&!!(xt&&rn(xt.task,X)),onCancel:()=>Wt(null),onConfirm:fe=>{xt&&(fe&&de?de(xt.task,fe):c(xt.task,xt.nextCompleted)),Wt(null)}})]})}import{useCallback as to,useMemo as wo,useRef as p2,useState as Ln}from"react";import{Box as Ft,ButtonBase as Ch,Divider as gh,IconButton as bh,Menu as yh,MenuItem as Yo}from"@mui/material";import fu from"@mui/icons-material/Add";import xh from"@mui/icons-material/MoreVert";import vh from"@mui/icons-material/EditOutlined";import wh from"@mui/icons-material/ArchiveOutlined";import _h from"@mui/icons-material/UnarchiveOutlined";import m2 from"@mui/icons-material/NotificationsOutlined";import g2 from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as Wv}from"@mui/material";import{jsx as fh}from"react/jsx-runtime";function pr({sx:e,...d}){return fh(Wv,{viewBox:"0 0 24 24",...d,sx:{fill:"none",...e},children:fh("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 b2,DragOverlay as y2,PointerSensor as x2,pointerWithin as v2,rectIntersection as w2,useDroppable as _2,useSensor as k2,useSensors as S2}from"@dnd-kit/core";import{SortableContext as Bh,arrayMove as kh,horizontalListSortingStrategy as T2,useSortable as C2,verticalListSortingStrategy as B2}from"@dnd-kit/sortable";import{CSS as I2}from"@dnd-kit/utilities";import hu from"@ehfuse/overlay-scrollbar";import{useState as Zv}from"react";import{Box as eo,ButtonBase as Jv,Checkbox as Qv,Tooltip as hh}from"@mui/material";import e2 from"@mui/icons-material/AlarmOutlined";import t2 from"@mui/icons-material/DragIndicator";import r2 from"@mui/icons-material/RadioButtonUnchecked";import n2 from"@mui/icons-material/CheckCircle";import o2 from"@mui/icons-material/TimerOutlined";import{Box as Nn,Button as Uv,Popover as Vv}from"@mui/material";import Kv from"@mui/icons-material/CheckCircle";import{Fragment as Gv,jsx as Qn,jsxs as yi}from"react/jsx-runtime";function fl({anchorEl:e,open:d,acks:g,total:l,avatarSrcByName:o,pendingNames:s=[],onRequestConfirm:r,onClose:t}){let n=jt();return Qn(Vv,{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:yi(Nn,{sx:{minWidth:240,maxWidth:320,py:1},children:[yi(Nn,{sx:{px:2,pb:.75,fontSize:Sr(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",g.length,"/",l]}),s.length>0&&g.length>0?yi(Nn,{sx:{px:2,pt:1,pb:.5,fontSize:Sr(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",g.length]}):null,g.length===0?s.length>0?null:Qn(Nn,{sx:{px:2,py:1.5,fontSize:Sr(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):g.map(c=>yi(Nn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Qn(Wr,{names:[c.name],size:22,avatarSrcByName:o}),Qn(Nn,{component:"span",sx:{fontSize:Sr(14),color:"#37352f",whiteSpace:"nowrap"},children:c.name}),Qn(Nn,{component:"span",sx:{ml:"auto",fontSize:Sr(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:fn(c.time)}),Qn(Kv,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},c.account_seq)),s.length>0?yi(Gv,{children:[yi(Nn,{sx:{mt:g.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:g.length>0?"1px solid #efefed":"none",fontSize:Sr(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",s.length]}),s.map(c=>yi(Nn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Qn(Wr,{names:[c],size:22,avatarSrcByName:o}),Qn(Nn,{component:"span",sx:{fontSize:Sr(14),color:"#37352f",whiteSpace:"nowrap"},children:c})]},c))]}):null,r?Qn(Nn,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:Qn(Uv,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{r(),t()},sx:{fontSize:Sr(13)},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function Yv(e){let d=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(g=>g>0&&g!==d))]}function Xv(e){let d=new Map,g=Number(e.manager_account_seq??0);g>0&&d.set(g,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 Gi(e,d){let g=Yv(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=Xv(e);return{myTime:o?.time??"",canConfirm:d>0&&g.includes(d)&&!o,count:l.filter(t=>g.includes(t.account_seq)).length,total:g.length,pendingNames:g.filter(t=>!s.has(t)).map(t=>r.get(t)??"").filter(t=>t.length>0)}}function DR(e){let d=String(e??"").trim();return d?d.slice(5,16).replaceAll("-","."):""}import{Fragment as l2,jsx as cr,jsxs as Yi}from"react/jsx-runtime";function hl(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 i2=3;function s2(e){let d=e.trim();return d?d.slice(2,10).replaceAll("-","."):"-"}function a2(){let e=new Date,d=String(e.getMonth()+1).padStart(2,"0"),g=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${d}-${g}`}var lu="taskbox-card-drag-handle";function Hs({task:e,statusOptions:d,showDueDate:g=!1,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,titleFontSize:r=13,dragHandleProps:t}){let n=it(),c=qi(e,bt().resolveTask),a=!!e.due_date&&e.due_date.slice(0,10)<=a2()?n.colors.danger:n.colors.textPrimary,h=Gi(e,0),[f,u]=Zv(null),b=ji(e,d),m=new Set(e.label_keys??[]),v=b.filter(B=>!m.has(B.key)),k=b.filter(B=>m.has(B.key));return Yi(l2,{children:[Yi(eo,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[t?cr(eo,{className:lu,...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:cr(t2,{sx:{fontSize:18}})}):null,cr(Qv,{size:"small",icon:cr(r2,{sx:{fontSize:20}}),checkedIcon:cr(n2,{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}}),cr(hh,{title:e.title,arrow:!0,enterDelay:300,children:Yi(eo,{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:i2,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,c?cr(eo,{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?cr(Ko,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:n.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?cr(eo,{sx:{pl:3,mt:-.5,fontSize:12.5,color:n.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,Yi(eo,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[Yi(eo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[v.map(B=>cr(Dt,{option:B,small:!0},B.key)),cr(Hr,{priority:e.priority,small:!0}),k.map(B=>cr(Dt,{option:B,small:!0},B.key))]}),g?cr(hh,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:cr(Jv,{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()?s2(e.due_date):cr(e2,{sx:{fontSize:15,color:n.colors.textMuted}})})}):null]}),g&&(e.due_date.slice(11,16)||e.estimated_time)?Yi(eo,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:n.colors.textSecondary},children:[cr(o2,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,cr(Wr,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),h.total>0?cr(eo,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:cr(eo,{sx:{flexShrink:0,width:64},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:cr(Wi,{canConfirm:!1,count:h.count,total:h.total,onConfirm:()=>{},onShowList:B=>u(B)})})}):null,cr(fl,{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 c2}from"@mui/material";import{useSortable as u2}from"@dnd-kit/sortable";import{CSS as d2}from"@dnd-kit/utilities";import{jsx as ph}from"react/jsx-runtime";function f2(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function mh({task:e,statusOptions:d,variant:g="card",showDueDate:l=!1,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,onCardClick:t,onCardContextMenu:n,titleFontSize:c}){let i=it(),{attributes:a,listeners:h,setNodeRef:f,transform:u,transition:b,isDragging:m}=u2({id:String(e.seq)}),v=g==="list";return ph(c2,{ref:f,onClick:t?()=>t(e):void 0,onContextMenu:n?k=>n(e,k):void 0,sx:{...v?f2(i.card):hl(i.card),opacity:m?.35:e.completed?.55:1,transform:d2.Translate.toString(u),transition:b,position:"relative",cursor:"default","&:hover":v?{bgcolor:i.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:ph(Hs,{task:e,statusOptions:d,showDueDate:l,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,titleFontSize:c,dragHandleProps:{...a,...h}})})}function h2(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=h2(e.end_date);return d?`${e.name} (~${d})`:e.name}import{jsx as rt,jsxs as Gt}from"react/jsx-runtime";var Sh=2,Ih="taskbox-column-drag-handle",pu=[lu,Ih],pl="group-",Sn="colmove-",cu="__default__",uu=Lc,du="__other__",ml="sprint-",Th=`${ml}0`,E2={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function Eh(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 M2({column:e,tasks:d,statusOptions:g,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onAddTask:r,canAdd:t,onOpenMenu:n,onCardClick:c,onCardContextMenu:i,grow:a,summary:h,onOpenSprintMenu:f}){let u=it(),{setNodeRef:b,isOver:m}=_2({id:`${pl}${e.key}`}),{attributes:v,listeners:k,setNodeRef:B,transform:R,transition:L,isDragging:A}=C2({id:`${Sn}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Gt(Ft,{ref:D=>{b(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:I2.Translate.toString(R),...L?{transition:`${L}, background-color 0.15s`}:{},opacity:A?.6:1},children:[Gt(Ft,{className:Ih,...v,...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?rt(Ft,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let D=Mt(e.icon);return D?rt(D,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),rt(Ft,{component:"span",sx:{fontSize:u.board.columnHeaderFontSize,fontWeight:700,color:u.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),rt(Ft,{component:"span",sx:{...Eh(u.board.badge),ml:"auto"},children:d.length}),e.sprint&&f?rt(bh,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:D=>D.stopPropagation(),onClick:D=>f(D.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:rt(xh,{sx:{fontSize:18}})}):e.locked?null:rt(bh,{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:rt(xh,{sx:{fontSize:18}})})]}),h?rt(Ft,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0},children:h}):null,rt(Ft,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:rt(hu,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:pu},children:Gt(Ft,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[rt(Bh,{items:d.map(D=>String(D.seq)),strategy:B2,children:d.map(D=>rt(mh,{task:D,statusOptions:g,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onCardClick:c,onCardContextMenu:i},D.seq))}),d.length===0&&!t?rt(Ft,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,d.length===0&&t?rt(Ft,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Gt(Ch,{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:[rt(fu,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function mu({tasks:e,statusOptions:d,customTabs:g,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:b,canAdd:m=!0,onRequestRename:v,onArchiveProject:k,onDeleteProject:B,onReorderProjects:R,onOpenDetail:L,onTaskContextMenu:A,hideCompleted:D=!1,renderColumnSummary:N,onEditSprint:q,onChangeSprintStatus:j,onRemoveSprint:S}){let T=it(),{onReturnTask:P,myAccountSeq:p=0}=bt(),[y,x]=Ln(null),w=y?e.find(xe=>xe.seq===y.taskSeq):void 0,[_,C]=Ln(null),[O,z]=Ln(null),[$,V]=Ln(null),[M,H]=Ln(null),[I,E]=Ln(null),[F,U]=Ln(null),[Y,G]=Ln(null),[W,X]=Ln(null),[J,K]=Ln(null),[ee,Z]=Ln(null),re=p2(!1),ie=wo(()=>new Map(e.map(xe=>[xe.seq,xe])),[e]),ne=wo(()=>{let xe=e.filter(ge=>ge.is_notice);return xe.sort((ge,Be)=>ge.completed!==Be.completed?ge.completed?1:-1:Be.seq-ge.seq),xe},[e]),ae=wo(()=>g.filter(xe=>!xe.archived),[g]),pe=wo(()=>g.filter(xe=>xe.archived),[g]),ue=xe=>({key:xe.key,label:xe.label,icon:xe.icon,isDefault:!1,isArchived:xe.archived}),ke=wo(()=>new Set(i.map(xe=>xe.key)),[i]),Ne=wo(()=>new Set(h.map(xe=>xe.seq)),[h]),Ce=wo(()=>{if(c==="sprint")return[{key:Th,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...h.map(xe=>({key:`${ml}${xe.seq}`,label:kn(xe),icon:"",isDefault:!1,isArchived:!1,dot:E2[xe.status],locked:!0,sprint:xe}))];if(c==="status"){let xe=i.map(ge=>({key:ge.key,label:ge.name,icon:"",isDefault:!1,isArchived:!1,dot:ge.dot,locked:!0}));return xe.some(ge=>ge.key===uu)?xe:[...xe,{key:uu,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return l==="archived"?pe.map(ue):[{key:cu,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...ae.map(ue)]},[c,i,h,l,ae,pe]),Oe=S2(k2(x2,{activationConstraint:{distance:5}})),nt=to(xe=>{let ge=String(xe.active.id).startsWith(Sn),Be=v2(xe),Ze=Be.length>0?Be:w2(xe);if(ge)return Ze.filter(Ct=>String(Ct.id).startsWith(Sn));let qe=Ze.filter(Ct=>!String(Ct.id).startsWith(Sn)),Pe=qe.filter(Ct=>!String(Ct.id).startsWith(pl));return Pe.length>0?Pe:qe},[]),me=wo(()=>{let xe=new Map;for(let ge of e){if(ge.is_notice)continue;let Be;if(c==="sprint"){let qe=ge.sprint_seq??0;Be=Ne.has(qe)?`${ml}${qe}`:Th}else Be=c==="status"?ge.completed?uu:ke.has(String(ge.status??""))?String(ge.status??""):du:ge.tab_key?.trim()||cu;let Ze=xe.get(Be);Ze?Ze.push(ge):xe.set(Be,[ge])}for(let ge of xe.values())ge.sort((Be,Ze)=>{if(Be.completed!==Ze.completed)return Be.completed?1:-1;let qe=(Be.group_sort_no??0)>0,Pe=(Ze.group_sort_no??0)>0;return qe&&Pe?(Be.group_sort_no??0)-(Ze.group_sort_no??0):qe!==Pe?qe?-1:1:Be.due_date!==Ze.due_date?Be.due_date<Ze.due_date?-1:1:Be.seq-Ze.seq});return xe},[e,c,ke,Ne]),oe=wo(()=>c!=="status"||(me.get(du)??[]).length===0?Ce:[...Ce,{key:du,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Ce,me]),Ie=to(xe=>W?(W.get(xe)??[]).map(ge=>ie.get(ge)).filter(ge=>!!ge):me.get(xe)??[],[W,ie,me]),ve=to(xe=>{let ge=Ie(xe);return D?ge.filter(Be=>!Be.completed):ge},[Ie,D]),we=to(xe=>{let ge=String(xe.active.id);if(ge.startsWith(Sn)){Z(ge.slice(Sn.length));return}K(Number(ge)),X(new Map(Ce.map(Be=>[Be.key,(me.get(Be.key)??[]).map(Ze=>Ze.seq)])))},[Ce,me]),be=to((xe,ge)=>{if(xe.startsWith(pl))return{key:xe.slice(pl.length),overSeq:null};let Be=Number(xe);for(let[Ze,qe]of ge)if(qe.includes(Be))return{key:Ze,overSeq:Be};return null},[]),Me=to(xe=>{let{active:ge,over:Be}=xe;!Be||String(ge.id).startsWith(Sn)||X(Ze=>{if(!Ze)return Ze;let qe=Number(ge.id),Pe=be(String(Be.id),Ze);if(!Pe)return Ze;let Ct=[...Ze.entries()].find(([,de])=>de.includes(qe))?.[0];if(!Ct||Ct===Pe.key)return Ze;let Ke=new Map(Ze);Ke.set(Ct,(Ke.get(Ct)??[]).filter(de=>de!==qe));let te=[...Ke.get(Pe.key)??[]],ce=te.length;if(Pe.overSeq!==null){let de=te.indexOf(Pe.overSeq);de!==-1&&(ce=de)}return te.splice(ce,0,qe),Ke.set(Pe.key,te),Ke})},[be]),Fe=to(xe=>{let ge=String(xe.active.id);if(ge.startsWith(Sn)){Z(null);let ce=String(xe.over?.id??"");if(!ce.startsWith(Sn))return;let de=ge.slice(Sn.length),Se=ce.slice(Sn.length);if(de===Se)return;let ct=g.map(wt=>wt.key),Re=ct.indexOf(de),Le=ct.indexOf(Se);if(Re===-1||Le===-1)return;R(kh(ct,Re,Le));return}let Be=W;if(X(null),K(null),re.current=!0,!Be||!xe.over)return;let Ze=Number(ge),qe=[...Be.entries()].find(([,ce])=>ce.includes(Ze));if(!qe)return;let[Pe,Ct]=qe,Ke=[...Ct],te=be(String(xe.over.id),Be);if(te&&te.key===Pe&&te.overSeq!==null&&te.overSeq!==Ze){let ce=Ke.indexOf(Ze),de=Ke.indexOf(te.overSeq);ce!==-1&&de!==-1&&(Ke=kh(Ke,ce,de))}if(c==="status"){a?.(Ze,Pe);return}if(c==="sprint"){f?.(Ze,Number(Pe.slice(ml.length))||0);return}n(Ze,Pe===cu?"":Pe,Ke)},[g,W,be,n,R,c,a,f]),vr=to(()=>{X(null),K(null),Z(null),re.current=!0},[]),Ve=to(xe=>{if(re.current){re.current=!1;return}L(xe)},[L]),Ge=J!==null?ie.get(J)??null:null,Tt=ee!==null?Ce.find(xe=>xe.key===ee)??null:null,Qe=to((xe,ge)=>{G({anchorEl:ge,taskSeq:xe.seq,date:xe.due_date,reminders:Xn(xe)})},[]),De=_?.column??null;return Gt(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:[Gt(b2,{sensors:Oe,collisionDetection:nt,onDragStart:we,onDragOver:Me,onDragEnd:Fe,onDragCancel:vr,children:[rt(Ft,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:l==="archived"&&Ce.length===0?rt(Ft,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):rt(hu,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:pu},children:Gt(Ft,{sx:{display:"flex",alignItems:"flex-start",gap:Sh,height:"100%",minWidth:"min-content",p:Sh,boxSizing:"border-box"},children:[l==="active"&&ne.length>0?Gt(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:xe=>xe.shadows[1],bgcolor:T.card.bg,overflow:"hidden"},children:[Gt(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:[rt(m2,{sx:{fontSize:17,color:"#e8763a"}}),rt(Ft,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:T.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Gt(Ft,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",ne.length,")"]})]}),rt(Ft,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:rt(hu,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:pu},thumb:{width:6},children:rt(Ft,{sx:{display:"flex",flexDirection:"column"},children:ne.map(xe=>Gt(Ft,{onClick:()=>Ve(xe),onContextMenu:ge=>A(xe,ge),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:[rt(Hs,{task:xe,statusOptions:d,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:x}),(()=>{let ge=(xe.target_names??[]).filter(Ze=>Ze.trim());if(ge.length===0)return null;let Be=ge.length>2?`${ge[0]}, ${ge[1]} \uC678 ${ge.length-2}`:ge.join(", ");return Gt(Ft,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[rt(g2,{sx:{fontSize:14,flexShrink:0}}),rt(Ft,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:Be})]})})()]},xe.seq))})})})]}):null,rt(Bh,{items:ae.map(xe=>`${Sn}${xe.key}`),strategy:T2,children:oe.map(xe=>rt(M2,{column:xe,tasks:ve(xe.key),summary:N?.(xe.key,Ie(xe.key)),onOpenSprintMenu:q||j||S?(ge,Be)=>z({anchorEl:ge,sprint:Be}):void 0,statusOptions:d,onRequestArchiveToggle:x,onRequestReply:s,onDueDateClick:Qe,onAddTask:b,canAdd:m&&c==="project",onOpenMenu:C,onCardClick:Ve,onCardContextMenu:A,grow:c!=="project"},xe.key))}),l==="active"&&c==="project"?Gt(Ch,{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:[rt(fu,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,l==="active"&&oe.length===0&&ne.length===0?rt(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]})})}),rt(y2,{children:Ge?rt(Ft,{sx:{...hl,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:rt(Hs,{task:Ge,statusOptions:d,showDueDate:!0,titleFontSize:15})}):Tt?Gt(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 xe=Mt(Tt.icon);return xe?rt(xe,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),rt(Ft,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:T.board.columnHeaderColor},children:Tt.label}),rt(Ft,{component:"span",sx:Eh(T.board.badge),children:(me.get(Tt.key)??[]).length})]}):null})]}),Gt(yh,{transitionDuration:0,anchorEl:_?.anchorEl??null,open:!!_,onClose:()=>C(null),children:[De&&!De.isArchived&&m?Gt(Yo,{onClick:()=>{De&&b(De.isDefault?"":De.key),C(null)},sx:{fontSize:14,gap:1},children:[rt(fu,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,De&&!De.isDefault&&!De.isArchived?Gt(Yo,{onClick:()=>{v(De.key,De.label,De.icon),C(null)},sx:{fontSize:14,gap:1},children:[rt(vh,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,De&&!De.isDefault&&!De.isArchived?Gt(Yo,{onClick:()=>{if(_){let xe=(me.get(_.column.key)??[]).filter(ge=>!ge.completed&&!ge.archived).length;xe>0?E({anchorEl:_.anchorEl,count:xe}):H(_)}C(null)},sx:{fontSize:14,gap:1},children:[rt(wh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,De&&De.isArchived?Gt(Yo,{onClick:()=>{k(De.key,!1),C(null)},sx:{fontSize:14,gap:1},children:[rt(_h,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,De&&!De.isDefault?rt(gh,{}):null,De&&!De.isDefault?Gt(Yo,{onClick:()=>{_&&U(_),C(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[rt(pr,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Gt(yh,{transitionDuration:0,anchorEl:O?.anchorEl??null,open:!!O,onClose:()=>z(null),children:[q?Gt(Yo,{onClick:()=>{O&&q(O.sprint.seq),z(null)},sx:{fontSize:14,gap:1},children:[rt(vh,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,j?Gt(Yo,{onClick:()=>{O&&j(O.sprint.seq,O.sprint.status==="closed"?"active":"closed"),z(null)},sx:{fontSize:14,gap:1},children:[O?.sprint.status==="closed"?rt(_h,{sx:{fontSize:18,color:"#787774"}}):rt(wh,{sx:{fontSize:18,color:"#787774"}}),O?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,S?rt(gh,{}):null,S?Gt(Yo,{onClick:()=>{O&&V(O),z(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[rt(pr,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),rt(Pt,{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)}}),rt(_n,{anchorEl:Y?.anchorEl??null,open:!!Y,date:Y?.date??"",reminders:Y?.reminders??[],onClose:()=>G(null),onDateChange:xe=>{Y&&(r(Y.taskSeq,xe),G(ge=>ge&&{...ge,date:xe}))},onReminderChange:xe=>{Y&&(t(Y.taskSeq,xe),G(ge=>ge&&{...ge,reminders:xe}))}}),rt(Pt,{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:()=>E(null),onConfirm:()=>E(null)}),rt(Pt,{open:!!M,anchorEl:M?.anchorEl??null,title:`"${M?.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:()=>{M&&k(M.column.key,!0),H(null)}}),rt(Pt,{open:!!F,anchorEl:F?.anchorEl??null,title:`"${F?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
33
- \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>U(null),onConfirm:()=>{F&&B(F.column.key),U(null)}}),rt(nn,{open:!!y,anchorEl:y?.anchorEl??null,nextCompleted:y?.nextCompleted??!1,returnMode:!!P&&!!(w&&rn(w,p)),onCancel:()=>x(null),onConfirm:xe=>{y&&(xe&&P&&w?P(w,xe):o(y.taskSeq,y.nextCompleted)),x(null)}})]})}import{useCallback as ko,useMemo as Ws,useRef as Oh,useState as Us}from"react";import{Box as _r,Button as j2,ButtonBase as Dh,IconButton as Ah}from"@mui/material";import F2 from"@mui/icons-material/Add";import q2 from"@mui/icons-material/ChevronLeft";import $2 from"@mui/icons-material/ChevronRight";import H2 from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as W2}from"@ehfuse/mui-datetime-picker";import{DndContext as U2,DragOverlay as V2,PointerSensor as K2,pointerWithin as G2,rectIntersection as Y2,useDroppable as X2,useSensor as Z2,useSensors as J2}from"@dnd-kit/core";import{SortableContext as Q2,arrayMove as ew,useSortable as tw,verticalListSortingStrategy as rw}from"@dnd-kit/sortable";import{CSS as nw}from"@dnd-kit/utilities";import ow from"@ehfuse/overlay-scrollbar";function M2(e){let[d,g,l]=e.split("-").map(Number),o=new Date(Date.UTC(d,g-1,l+1)),s=r=>String(r).padStart(2,"0");return`${o.getUTCFullYear()}-${s(o.getUTCMonth()+1)}-${s(o.getUTCDate())}`}function Xi(e){let d=new Map;for(let g of e){let l=g.start_date;for(let o=0;o<62&&l<=g.end_date;o+=1){let s=d.get(l);s?s.push(g):d.set(l,[g]),l=M2(l)}}for(let g of d.values())g.sort((l,o)=>(l.time||"99:99").localeCompare(o.time||"99:99")||l.title.localeCompare(o.title));return d}function Zi(e){let d=String((e.is_event?e.event_time:e.due_date.slice(11,16)||e.estimated_time)??"").trim();return/^\d{1,2}:\d{2}$/.test(d)?d:""}function Ji(e,d){if(e.completed!==d.completed)return e.completed?1:-1;let g=Zi(e),l=Zi(d);if(!!g!=!!l)return g?-1:1;if(g&&l&&g!==l)return g<l?-1:1;let o=e.sort_no>0,s=d.sort_no>0;return o&&s?e.sort_no-d.sort_no:o!==s?o?-1:1:e.seq-d.seq}import{Box as gu,Tooltip as R2}from"@mui/material";import{jsx as bu,jsxs as O2}from"react/jsx-runtime";function Qi({event:e,small:d=!1}){let g=e.time?`${e.time} ${e.title}`:e.title,l=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",o=s=>{s.stopPropagation();let[r,t,n]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${r}/${t}/${n}`,"_blank")};return bu(R2,{title:`(${l}) ${g}`,arrow:!0,enterDelay:300,children:O2(gu,{onClick:o,onPointerDown:s=>s.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:d?.6:.8,borderRadius:.75,bgcolor:"#f1f1ef",color:"#37352f",fontSize:15,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,minWidth:0,maxWidth:"100%",cursor:"pointer","&:hover":{bgcolor:"#ececea"}},children:[bu(gu,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),bu(gu,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:g})]})})}import{useCallback as P2}from"react";import{Box as Xo,Checkbox as N2}from"@mui/material";import{useLayoutEffect as A2,useState as Mh}from"react";var xu=new WeakMap,yu=null;function D2(){return typeof ResizeObserver>"u"?null:(yu||(yu=new ResizeObserver(e=>{for(let d of e){let g=xu.get(d.target);if(!g)continue;let l=d.borderBoxSize?.[0]?.inlineSize??d.target.getBoundingClientRect().width;g(l)}})),yu)}function Rh(){let[e,d]=Mh(null),[g,l]=Mh(0);return A2(()=>{if(!e)return;l(e.getBoundingClientRect().width);let o=D2();if(o)return xu.set(e,s=>l(r=>Math.abs(r-s)<1?r:s)),o.observe(e),()=>{o.unobserve(e),xu.delete(e)}},[e]),{ref:d,width:g}}import{jsx as _o,jsxs as vu}from"react/jsx-runtime";var wu={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},es=15,L2=150,z2=3;function Zo({task:e,statusOptions:d,onOpenDetail:g,onContextMenu:l,isPreview:o=!1,isDragging:s=!1,isMine:r=!1,avatarSrcByName:t,showManagerAvatar:n=!1,onOpenMembers:c,setNodeRef:i,dragProps:a,trailing:h,showCheckbox:f=!1,onRequestToggleCompleted:u,showTime:b=!0,wrapTitle:m=!1}){let v=it(),k=v.mode==="dark",[B]=ji(e,d),R=String(e.manager_name??"").trim(),L=b?Zi(e):"",A=qi(e,bt().resolveTask),D=!e.completed&&!e.is_event&&!e.due_date.slice(0,10),N=e.is_notice||e.is_event?Mt(e.icon||(e.is_notice?lr:dr)):null,q=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<If(),{ref:j,width:S}=Rh(),T=S>0&&S<L2,P=T||m,p=P2(x=>{j(x),i?.(x)},[j,i]),y=n&&!r&&!T&&!!R;return vu(Xo,{ref:p,...a??{},onClick:x=>{x.stopPropagation(),g(e)},onContextMenu:l?x=>l(e,x):void 0,sx:{display:"flex",alignItems:P?"flex-start":"center",gap:.5,py:.6,px:1,flexShrink:0,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:B?k?zi(B.dot,v.chip.darkBgAlpha):B.bg:k?v.card.bg:v.colors.surfaceHover,color:B?k?v.chip.darkTextSource==="fg"?B.fg:B.dot:B.fg:v.colors.textPrimary,fontSize:es,fontWeight:k||e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:o?.5:s?.35:e.completed?.6:D?.75:1,border:o?`1px dashed ${v.colors.accent}`:"1px solid transparent",pointerEvents:o?"none":"auto",cursor:"pointer",touchAction:a?"none":"auto",overflow:"hidden","&:hover":{filter:"brightness(0.96)"},...q?{borderLeft:`3px solid ${v.colors.danger}`,pl:.75}:r?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[_o(Xo,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...P?{mt:"7px"}:{},bgcolor:wu[e.priority]??v.colors.accentOnSurface}}),f&&!T&&u?_o(N2,{size:"small",checked:e.completed,onPointerDown:x=>x.stopPropagation(),onClick:x=>x.stopPropagation(),onChange:(x,w)=>u({anchorEl:x.currentTarget,taskSeq:e.seq,nextCompleted:w}),sx:{p:0,flexShrink:0}}):null,N&&!T?_o(N,{sx:{fontSize:15,flexShrink:0,opacity:.75,...P?{mt:"3px"}:{}}}):null,vu(Xo,{sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",color:k?v.colors.textStrong:v.colors.textPrimary,...D&&!k?{color:v.colors.textSecondary}:{}},children:[T&&L?_o(Xo,{component:"span",sx:{lineHeight:1.35,fontSize:es-1,color:e.completed?v.colors.textPrimary:v.colors.danger},children:L}):null,vu(Xo,{component:"span",sx:{minWidth:0,overflow:"hidden",...P?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:z2,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!T&&L?_o(Xo,{component:"span",sx:{mr:.5,fontSize:es-1,color:e.completed?v.colors.textPrimary:v.colors.danger},children:L}):null,e.title,!T&&A?_o(Xo,{component:"span",sx:{ml:.5,fontSize:es-2,color:v.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:A}):null,!T&&(e.comment_count??e.comments?.length??0)>0?_o(Ko,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:v.colors.textMuted}}):null]})]}),h??null,!h&&y?_o(Xo,{component:"span",onClick:c?x=>{x.stopPropagation(),c(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:_o(vn,{src:t?.get(R)??"",name:R,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}import{jsx as Nt,jsxs as So}from"react/jsx-runtime";var Ph=36,iw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],bl="day-";function _u(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(d.getDate()-d.getDay()),d}function gl(e,d){let g=new Date(e);return g.setDate(g.getDate()+d),g}function sw(e){let d=e[0],g=e[e.length-1];return d.getMonth()===g.getMonth()?`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4`:d.getFullYear()===g.getFullYear()?`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4 - ${g.getMonth()+1}\uC6D4`:`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4 - ${g.getFullYear()}\uB144 ${g.getMonth()+1}\uC6D4`}function aw(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function lw({task:e,statusOptions:d,isMine:g,avatarSrcByName:l,onCardClick:o,onCardContextMenu:s,onRequestArchiveToggle:r,dragDisabled:t=!1}){let{attributes:n,listeners:c,setNodeRef:i,transform:a,transition:h,isDragging:f}=tw({id:String(e.seq),disabled:t});return Nt(Zo,{task:e,statusOptions:d,isMine:g,avatarSrcByName:l,showManagerAvatar:!0,wrapTitle:!0,onOpenDetail:u=>o?.(u),onContextMenu:s,showCheckbox:!0,onRequestToggleCompleted:r,isDragging:f,setNodeRef:i,dragProps:t?void 0:{...n,...c,style:{transform:nw.Translate.toString(a),transition:h}}})}function cw({dayKey:e,isToday:d,dayLabel:g,holidayName:l,tasks:o,googleEvents:s,statusOptions:r,onRequestArchiveToggle:t,onRequestReply:n,onAddSchedule:c,canAdd:i,onCardClick:a,onCardContextMenu:h,summary:f,myAccountSeq:u,avatarSrcByName:b,dragDisabled:m=!1}){let v=it(),{setNodeRef:k}=X2({id:`${bl}${e}`,disabled:m});return So(_r,{ref:k,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:d?v.calendar.todayBg:v.calendar.cellBg},children:[So(_r,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:Ph,bgcolor:d?v.calendar.todayBg:v.calendar.dateBandBg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:[l?Nt(_r,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:v.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}):null,d?Nt(_r,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:v.colors.danger,color:v.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Nt(_r,{component:"span",sx:{fontSize:13.5,fontWeight:d?700:400,color:l?v.colors.danger:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary,flexShrink:0},children:g})]}),f?Nt(_r,{sx:{px:1,py:1,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:f}):null,Nt(_r,{sx:{flex:1,minHeight:0,bgcolor:d?v.calendar.todayBg:v.colors.surfaceSubtle},children:Nt(ow,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:So(_r,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[s.length>0?Nt(_r,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:s.map(B=>Nt(Qi,{event:B},B.uid))}):null,Nt(Q2,{items:o.map(B=>String(B.seq)),strategy:rw,children:Nt(_r,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:o.length>0?.75:0},children:o.map(B=>Nt(lw,{task:B,statusOptions:r,isMine:u>0&&Number(B.manager_account_seq??0)===u,avatarSrcByName:b,onCardClick:a,onCardContextMenu:h,onRequestArchiveToggle:t,dragDisabled:m},B.seq))})}),Nt(_r,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...i?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:So(Dh,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${v.calendar.borderColor}`,bgcolor:v.calendar.cellBg,color:v.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:v.calendar.hoverBg}},children:[Nt(F2,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function Nh({tasks:e,googleEvents:d=[],statusOptions:g,fallbackToStartDate:l=!1,myAccountSeq:o=0,avatarSrcByName:s,todayStr:r,onToggleCompleted:t,onMoveTask:n,onRequestReply:c,onAddSchedule:i,canAdd:a=!0,disableDrag:h=!1,onOpenDetail:f,onTaskContextMenu:u,hideCompleted:b=!1,renderColumnSummary:m}){let v=it(),[k,B]=Us(()=>_u(new Date)),[R,L]=Us(null),{onReturnTask:A}=bt(),D=R?e.find(X=>X.seq===R.taskSeq):void 0,[N,q]=Us(null),[j,S]=Us(null),[T,P]=Us(null),p=Oh(!1),y=Ws(()=>Array.from({length:7},(X,J)=>gl(k,J)),[k]),x=Ws(()=>new Map(e.map(X=>[X.seq,X])),[e]),w=Ws(()=>[...new Set(y.map(X=>X.getFullYear()))],[y]),_=Yn(w),C=J2(Z2(K2,{activationConstraint:{distance:5}})),O=ko(X=>{let J=G2(X),K=J.length>0?J:Y2(X),ee=K.filter(Z=>!String(Z.id).startsWith(bl));return ee.length>0?ee:K},[]),z=Ws(()=>Xi(d),[d]),$=Ws(()=>{let X=new Map;for(let J of e){let K=J.due_date.slice(0,10)||(l?J.start_date.slice(0,10)||String(J.created_time??"").slice(0,10):"");if(!K)continue;let ee=X.get(K);ee?ee.push(J):X.set(K,[J])}for(let J of X.values())J.sort(Ji);return X},[e,l]),V=ko(X=>j?(j.get(X)??[]).map(J=>x.get(J)).filter(J=>!!J):$.get(X)??[],[j,x,$]),M=ko(X=>{let J=V(X);return b?J.filter(K=>!K.completed):J},[V,b]),H=ko(X=>{P(Number(X.active.id)),S(new Map(y.map(J=>{let K=Tr(J);return[K,($.get(K)??[]).map(ee=>ee.seq)]})))},[y,$]),I=ko((X,J)=>{if(X.startsWith(bl))return{day:X.slice(bl.length),overSeq:null};let K=Number(X);for(let[ee,Z]of J)if(Z.includes(K))return{day:ee,overSeq:K};return null},[]),E=ko(X=>{let{active:J,over:K}=X;K&&S(ee=>{if(!ee)return ee;let Z=Number(J.id),re=I(String(K.id),ee);if(!re)return ee;let ie=[...ee.entries()].find(([,ue])=>ue.includes(Z))?.[0];if(!ie||ie===re.day)return ee;let ne=new Map(ee);ne.set(ie,(ne.get(ie)??[]).filter(ue=>ue!==Z));let ae=[...ne.get(re.day)??[]],pe=ae.length;if(re.overSeq!==null){let ue=ae.indexOf(re.overSeq);ue!==-1&&(pe=ue)}return ae.splice(pe,0,Z),ne.set(re.day,ae),ne})},[I]),F=ko(X=>{let{active:J,over:K}=X,ee=j;if(S(null),P(null),p.current=!0,!ee||!K)return;let Z=Number(J.id),re=[...ee.entries()].find(([,ue])=>ue.includes(Z));if(!re)return;let[ie,ne]=re,ae=[...ne],pe=I(String(K.id),ee);if(pe&&pe.day===ie&&pe.overSeq!==null&&pe.overSeq!==Z){let ue=ae.indexOf(Z),ke=ae.indexOf(pe.overSeq);ue!==-1&&ke!==-1&&(ae=ew(ae,ue,ke))}n(Z,ie,ae)},[j,n,I]),U=ko(()=>{S(null),P(null),p.current=!0},[]),Y=ko(X=>{if(p.current){p.current=!1;return}f(X)},[f]),G=T!==null?x.get(T)??null:null,W=Oh(null);return So(_r,{onTouchStart:X=>{let J=X.touches[0];W.current=J?{x:J.clientX,y:J.clientY}:null},onTouchEnd:X=>{let J=W.current;W.current=null;let K=X.changedTouches[0];if(!J||!K||T!==null)return;let ee=K.clientX-J.x,Z=K.clientY-J.y;Math.abs(ee)<60||Math.abs(ee)<=Math.abs(Z)||B(gl(k,ee<0?7:-7))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${v.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[So(_r,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:v.calendar.bg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:[So(_r,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Nt(Ah,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>B(gl(k,-7)),children:Nt(q2,{sx:{fontSize:24,color:v.colors.textSecondary}})}),Nt(j2,{size:"small",color:"inherit",onClick:()=>B(_u(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:v.mode==="dark"?400:500,color:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary},children:"\uC624\uB298"}),Nt(Ah,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>B(gl(k,7)),children:Nt($2,{sx:{fontSize:24,color:v.colors.textSecondary}})})]}),So(Dh,{onClick:X=>q(X.currentTarget),sx:{ml:{xs:"auto",lg:0},display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:v.mode==="dark"?400:700,color:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary,"&:hover":{bgcolor:v.colors.surfaceHover}},children:[sw(y),Nt(H2,{sx:{fontSize:18,color:v.colors.textMuted}})]})]}),Nt(_r,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:v.calendar.headerBg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${v.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:y.map(X=>{let J=X.getDay(),K=_.has(Tr(X));return Nt(_r,{sx:{height:Ph,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:J===0||K?v.colors.danger:J===6?v.colors.accentOnSurface:v.colors.textSecondary},children:iw[J]},Tr(X))})}),Nt(_r,{sx:{flex:1,minHeight:0},children:So(U2,{sensors:C,collisionDetection:O,onDragStart:H,onDragOver:E,onDragEnd:F,onDragCancel:U,children:[Nt(_r,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${v.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:y.map(X=>{let J=Tr(X);return Nt(cw,{dayKey:J,isToday:J===r,dayLabel:aw(X),holidayName:_.get(J)??"",summary:m?.(J,V(J)),tasks:M(J),googleEvents:z.get(J)??[],statusOptions:g,onRequestArchiveToggle:L,onRequestReply:c,onAddSchedule:i,canAdd:a,onCardClick:Y,onCardContextMenu:u,myAccountSeq:o,avatarSrcByName:s,dragDisabled:h},J)})}),Nt(V2,{children:G?Nt(_r,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:Nt(Zo,{task:G,statusOptions:g,onOpenDetail:()=>{},isMine:o>0&&Number(G.manager_account_seq??0)===o})}):null})]})}),Nt(W2,{anchorEl:N,open:!!N,onClose:()=>q(null),selectedDate:k,onDateChange:X=>{B(_u(X)),q(null)}}),Nt(nn,{open:!!R,anchorEl:R?.anchorEl??null,nextCompleted:R?.nextCompleted??!1,returnMode:!!A&&!!(D&&rn(D,o)),onCancel:()=>L(null),onConfirm:X=>{R&&(X&&A&&D?A(D,X):t(R.taskSeq,R.nextCompleted)),L(null)}})]})}import{useCallback as Vs,useMemo as xi,useRef as uw,useState as Ks}from"react";import{Box as Ur,Button as dw,ButtonBase as zh,IconButton as Lh,Tooltip as fw}from"@mui/material";import hw from"@mui/icons-material/Add";import pw from"@mui/icons-material/ChevronLeft";import mw from"@mui/icons-material/ChevronRight";import gw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as bw}from"@ehfuse/mui-datetime-picker";import{DndContext as yw,DragOverlay as xw,PointerSensor as vw,pointerWithin as ww,rectIntersection as _w,useDraggable as kw,useDroppable as jh,useSensor as Sw,useSensors as Tw}from"@dnd-kit/core";import Cw from"@ehfuse/overlay-scrollbar";import{jsx as Vt,jsxs as To}from"react/jsx-runtime";var Bw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],yl="mday-",xl="mchip-",Fh=36;function Iw(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(d.getDate()-d.getDay()),d}function vl(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(1),d}function Ew(e,d){let g=new Date(e);return g.setDate(g.getDate()+d),g}function ku(e,d){let g=vl(e);return g.setMonth(g.getMonth()+d),g}function Mw({task:e,statusOptions:d,isPreview:g=!1,isMine:l=!1,avatarSrcByName:o,onOpenDetail:s,onContextMenu:r,onRequestToggleCompleted:t,dragDisabled:n=!1}){let{attributes:c,listeners:i,setNodeRef:a,isDragging:h}=kw({id:String(e.seq),disabled:g||n}),{setNodeRef:f}=jh({id:`${xl}${e.seq}`,disabled:g||n});return Vt(fw,{title:e.title,arrow:!0,enterDelay:400,children:Vt(Zo,{task:e,statusOptions:d,onOpenDetail:s,onContextMenu:r,showCheckbox:!!t,onRequestToggleCompleted:t,isPreview:g,isDragging:h,isMine:l,avatarSrcByName:o,showManagerAvatar:!0,wrapTitle:!0,setNodeRef:u=>{a(u),f(u)},dragProps:n?void 0:{...c,...i}})})}function Rw({dayKey:e,dayNumber:d,isToday:g,isOtherMonth:l,weekday:o,holidayName:s,tasks:r,googleEvents:t,statusOptions:n,previewSeq:c,myAccountSeq:i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:f,onTaskContextMenu:u,onAddSchedule:b,canAdd:m,dragDisabled:v=!1}){let k=it(),B=k.mode==="dark",{setNodeRef:R,isOver:L}=jh({id:`${yl}${e}`,disabled:v}),A=r,D=!!s||o===0;return To(Ur,{ref:R,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:L?k.colors.accentSoft:g?k.calendar.todayBg:l?k.calendar.otherMonthBg:k.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...m?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[To(Ur,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Fh,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:g?k.calendar.todayBg:k.calendar.dateBandBg,borderBottom:`1px solid ${k.calendar.borderColor}`},children:[s?Vt(Ur,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:k.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}):null,g?Vt(Ur,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:k.colors.danger,color:k.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Vt(Ur,{component:"span",sx:{fontSize:13.5,fontWeight:g?700:400,color:l?k.colors.textMuted:D?k.colors.danger:o===6?k.colors.accentOnSurface:B?k.colors.textStrong:k.colors.textPrimary,flexShrink:0},children:d})]}),t.map(N=>Vt(Qi,{event:N,small:!0},N.uid)),A.map(N=>Vt(Mw,{task:N,statusOptions:n,isPreview:N.seq===c,isMine:i>0&&Number(N.manager_account_seq??0)===i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:f,onContextMenu:u,dragDisabled:v},N.seq)),Vt(Ur,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:To(zh,{className:"taskbox-month-add",onClick:()=>b(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:.75,borderBottom:`1px dashed ${k.calendar.borderColor}`,bgcolor:k.calendar.cellBg,color:k.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:k.calendar.hoverBg}},children:[Vt(hw,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function qh({tasks:e,googleEvents:d=[],statusOptions:g,fallbackToStartDate:l=!1,myAccountSeq:o=0,avatarSrcByName:s,onToggleCompleted:r,todayStr:t,onMoveTask:n,onAddSchedule:c,canAdd:i=!0,disableDrag:a=!1,onOpenDetail:h,onTaskContextMenu:f}){let u=it(),b=u.mode==="dark",[m,v]=Ks(()=>vl(new Date)),[k,B]=Ks(null),[R,L]=Ks(null),[A,D]=Ks(null),[N,q]=Ks(null),j=xi(()=>{let F=Iw(m);return Array.from({length:42},(U,Y)=>Ew(F,Y))},[m]),S=xi(()=>new Map(e.map(F=>[F.seq,F])),[e]),T=xi(()=>Xi(d),[d]),P=xi(()=>[...new Set(j.map(F=>F.getFullYear()))],[j]),p=Yn(P),y=xi(()=>{let F=new Map;for(let U of e){let Y=U.due_date.slice(0,10)||(l?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!Y)continue;let G=F.get(Y);G?G.push(U):F.set(Y,[U])}for(let U of F.values())U.sort(Ji);return F},[e,l]),x=Tw(Sw(vw,{activationConstraint:{distance:5}})),w=Vs(F=>{let U=ww(F),Y=U.length>0?U:_w(F),G=Y.filter(W=>String(W.id).startsWith(xl));return G.length>0?G:Y.filter(W=>String(W.id).startsWith(yl))},[]),_=Vs(F=>{D(Number(F.active.id))},[]),C=Vs(F=>{q(F.over?String(F.over.id):null)},[]),O=xi(()=>{let F=new Map;for(let[U,Y]of y)for(let G of Y)F.set(G.seq,U);return F},[y]),z=A!==null?S.get(A)?.due_date.slice(0,10)??"":"",$=xi(()=>{if(A===null||!N)return null;if(N.startsWith(xl)){let F=Number(N.slice(xl.length)),U=O.get(F);if(!U)return null;let Y=(y.get(U)??[]).filter(W=>W.seq!==A),G=Y.findIndex(W=>W.seq===F);return{day:U,index:G===-1?Y.length:G}}if(N.startsWith(yl)){let F=N.slice(yl.length),U=(y.get(F)??[]).filter(Y=>Y.seq!==A);return{day:F,index:U.length}}return null},[A,O,N,y]),V=Vs(F=>{let U=y.get(F)??[];if(A===null||!$)return U;let Y=S.get(A);if(!Y)return U;let G=U.filter(W=>W.seq!==A);return F===$.day?[...G.slice(0,$.index),Y,...G.slice($.index)]:F===z?G:U},[A,z,$,S,y]),M=Vs(F=>{let U=A,Y=$;if(D(null),q(null),U===null||!Y)return;let G=(y.get(Y.day)??[]).filter(X=>X.seq!==U),W=[...G.slice(0,Y.index).map(X=>X.seq),U,...G.slice(Y.index).map(X=>X.seq)];n(U,Y.day,W)},[A,$,n,y]),H=A!==null?S.get(A)??null:null,I=`${m.getFullYear()}\uB144 ${m.getMonth()+1}\uC6D4`,E=uw(null);return To(Ur,{onTouchStart:F=>{let U=F.touches[0];E.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:F=>{let U=E.current;E.current=null;let Y=F.changedTouches[0];if(!U||!Y||A!==null)return;let G=Y.clientX-U.x,W=Y.clientY-U.y;Math.abs(G)<60||Math.abs(G)<=Math.abs(W)||v(ku(m,G<0?1:-1))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${u.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[To(Ur,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:u.calendar.bg,borderBottom:`1px solid ${u.calendar.borderColor}`,flexShrink:0},children:[To(Ur,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Vt(Lh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>v(ku(m,-1)),children:Vt(pw,{sx:{fontSize:24,color:u.colors.textSecondary}})}),Vt(dw,{size:"small",color:"inherit",onClick:()=>v(vl(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:u.mode==="dark"?400:500,color:u.mode==="dark"?u.colors.textStrong:u.colors.textPrimary},children:"\uC624\uB298"}),Vt(Lh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>v(ku(m,1)),children:Vt(mw,{sx:{fontSize:24,color:u.colors.textSecondary}})})]}),To(zh,{onClick:F=>B(F.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:u.mode==="dark"?400:700,color:u.mode==="dark"?u.colors.textStrong:u.colors.textPrimary,"&:hover":{bgcolor:u.colors.surfaceHover}},children:[I,Vt(gw,{sx:{fontSize:18,color:u.colors.textMuted}})]})]}),Vt(Ur,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:u.calendar.headerBg,borderBottom:`1px solid ${u.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${u.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:Bw.map((F,U)=>Vt(Ur,{sx:{height:Fh,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?u.colors.danger:U===6?u.colors.accentOnSurface:u.colors.textSecondary},children:F},F))}),Vt(Ur,{sx:{flex:1,minHeight:0},children:To(yw,{sensors:x,collisionDetection:w,onDragStart:_,onDragOver:C,onDragEnd:M,onDragCancel:()=>{D(null),q(null)},children:[Vt(Cw,{style:{height:"100%"},thumb:{width:8},children:Vt(Ur,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${u.calendar.borderColor}`,borderBottom:`1px solid ${u.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:j.map(F=>{let U=Tr(F);return Vt(Rw,{dayKey:U,dayNumber:F.getDate(),isToday:U===t,isOtherMonth:F.getMonth()!==m.getMonth(),weekday:F.getDay(),holidayName:p.get(U)??"",tasks:V(U),googleEvents:T.get(U)??[],statusOptions:g,previewSeq:$?.day===U?A:null,myAccountSeq:o,avatarSrcByName:s,onRequestToggleCompleted:r?L:void 0,onOpenDetail:h,onTaskContextMenu:f,onAddSchedule:c,canAdd:i,dragDisabled:a},U)})})}),Vt(xw,{children:H?To(Ur,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:u.calendar.cellBg,border:`1px solid ${u.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:es,fontWeight:500,color:u.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[Vt(Ur,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:wu[H.priority]}}),H.title]}):null})]})}),Vt(Pt,{open:!!R,anchorEl:R?.anchorEl??null,title:R?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:R?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>L(null),onConfirm:()=>{R&&r?.(R.taskSeq,R.nextCompleted),L(null)}}),Vt(bw,{anchorEl:k,open:!!k,onClose:()=>B(null),selectedDate:m,onDateChange:F=>{v(vl(F)),B(null)}})]})}import{useEffect as Dw,useMemo as Gs,useRef as Tu,useState as Cu}from"react";import{Box as Pr,Button as Pw,IconButton as Hh,useMediaQuery as Nw}from"@mui/material";import Lw from"@mui/icons-material/ChevronLeft";import zw from"@mui/icons-material/ChevronRight";import jw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Fw}from"@ehfuse/mui-datetime-picker";import{Box as Co,Button as Ow,Dialog as Aw}from"@mui/material";import{jsx as Bo,jsxs as Su}from"react/jsx-runtime";function $h({task:e,avatarSrcByName:d,onClose:g}){let l=it(),o=e?[{label:"\uCC45\uC784\uC790",names:[String(e.manager_name??"").trim()]},{label:"\uCC38\uC870\uC790",names:e.receiver_names??[]},{label:"\uC791\uC131\uC790",names:[String(e.created_by??"").trim()]}]:[];return Bo(Aw,{open:!!e,onClose:g,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:e?Su(Co,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:l.colors.surface},children:[Bo(Co,{sx:{fontSize:15.5,fontWeight:600,color:l.colors.textStrong,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title}),o.map(s=>{let r=s.names.filter(t=>!!t);return Su(Co,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[Bo(Co,{sx:{width:56,flexShrink:0,fontSize:13.5,color:l.colors.textSecondary,pt:.5},children:s.label}),Bo(Co,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:r.length===0?Bo(Co,{sx:{fontSize:14,color:l.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):r.map(t=>Su(Co,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Bo(vn,{src:d?.get(t)??"",name:t,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),Bo(Co,{sx:{fontSize:14.5,color:l.colors.textPrimary},children:t})]},`${s.label}-${t}`))})]},s.label)}),Bo(Co,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:Bo(Ow,{size:"small",color:"inherit",onClick:g,children:"\uB2EB\uAE30"})})]}):null})}import{jsx as Cr,jsxs as ro}from"react/jsx-runtime";var qw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Wh(e){let d=e?.parentElement??null;for(;d;){let g=window.getComputedStyle(d);if(/(auto|scroll)/.test(g.overflowY)&&d.scrollHeight>d.clientHeight)return d;d=d.parentElement}return null}var $w="(min-width:600px)";function Bu(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(1),d}function Uh(e){let d=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function Vh({tasks:e,googleEvents:d=[],statusOptions:g,todayStr:l,onOpenDetail:o,onAddSchedule:s,myAccountSeq:r=0,avatarSrcByName:t,fallbackToStartDate:n=!1}){let c=it(),i=Nw($w),[a,h]=Cu(()=>Bu(new Date)),[f,u]=Cu(!1),b=Gs(()=>{let T=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return Array.from({length:T},(P,p)=>{let y=new Date(a.getFullYear(),a.getMonth(),p+1);return{ymd:Uh(y),dayNumber:p+1,weekday:y.getDay()}})},[a]),m=Gs(()=>{let T=new Map;for(let P of e){let p=P.due_date.slice(0,10)||(n?P.start_date.slice(0,10)||String(P.created_time??"").slice(0,10):"");if(!p)continue;let y=T.get(p);y?y.push(P):T.set(p,[P])}for(let P of T.values())P.sort(Ji);return T},[e,n]),v=Gs(()=>n?e.filter(T=>!T.due_date.slice(0,10)&&!T.start_date.slice(0,10)&&!String(T.created_time??"").slice(0,10)).sort((T,P)=>T.completed!==P.completed?T.completed?1:-1:T.seq-P.seq):[],[e,n]),[k,B]=Cu(null),R=Gs(()=>Xi(d),[d]),L=Gs(()=>[a.getFullYear()],[a]),A=Yn(L),D=Tu(null),N=l.slice(0,7)===Uh(a).slice(0,7);Dw(()=>{if(!N)return;let T=()=>{let y=D.current,x=Wh(y);if(!x||!y)return;let w=y.getBoundingClientRect().top-x.getBoundingClientRect().top+x.scrollTop;x.scrollTop=Math.max(0,w-x.clientHeight/2+y.clientHeight/2)},P=setTimeout(T,100),p=setTimeout(T,400);return()=>{clearTimeout(P),clearTimeout(p)}},[N,a]);let q=Tu(null),j=Tu(null),S=T=>{h(p=>new Date(p.getFullYear(),p.getMonth()+T,1));let P=Wh(q.current);P&&P.scrollTo({top:0,behavior:"auto"})};return ro(Pr,{ref:q,onTouchStart:T=>{let P=T.touches[0];j.current=P?{x:P.clientX,y:P.clientY}:null},onTouchEnd:T=>{let P=j.current;j.current=null;let p=T.changedTouches[0];if(!P||!p)return;let y=p.clientX-P.x,x=p.clientY-P.y;Math.abs(y)<60||Math.abs(y)<=Math.abs(x)||S(y<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[ro(Pr,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[Cr(Hh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>S(-1),children:Cr(Lw,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Cr(Pw,{size:"small",color:"inherit",onClick:()=>h(Bu(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),Cr(Hh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>S(1),children:Cr(zw,{sx:{fontSize:24,color:c.colors.textSecondary}})}),ro(Pr,{onClick:()=>u(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:c.mode==="dark"?400:700,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary,cursor:"pointer"},children:[a.getFullYear(),"\uB144 ",a.getMonth()+1,"\uC6D4",Cr(jw,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),ro(Pr,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[v.length>0?ro(Pr,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[ro(Pr,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",Cr("br",{}),"\uC5C6\uC74C"]}),Cr(Pr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:v.map(T=>Cr(Zo,{task:T,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(T.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B},T.seq))})]}):null,b.map(({ymd:T,dayNumber:P,weekday:p})=>{let y=A.get(T)??"",x=T===l,w=!!y||p===0,_=m.get(T)??[],C=R.get(T)??[],O=_.length>0||C.length>0;return ro(Pr,{ref:x?D:void 0,onClick:s?()=>s(T):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:O?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`,...s?{cursor:"pointer"}:{}},children:[Cr(Pr,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:ro(Pr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[Cr(Pr,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:40,height:32,borderRadius:1,px:1.25,fontSize:22,fontWeight:500,color:x?c.colors.surface:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textPrimary,bgcolor:x?c.colors.accentOnSurface:"transparent"},children:P}),Cr(Pr,{component:"span",sx:{fontSize:13,color:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textSecondary},children:qw[p]})]})}),ro(Pr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[C.map(z=>Cr(Qi,{event:z},z.uid)),_.map(z=>{let $=Zi(z),V=Cr(Zo,{task:z,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(z.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B,showTime:!i,wrapTitle:!0},z.seq);return i?ro(Pr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Cr(Pr,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:$?z.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:$||"00:00"}),Cr(Pr,{sx:{flex:1,minWidth:0},children:V})]},z.seq):V})]})]},T)})]}),Cr($h,{task:k,avatarSrcByName:t,onClose:()=>B(null)}),Cr(Fw,{open:f,centered:!0,monthOnly:!0,onClose:()=>u(!1),selectedDate:a,onDateChange:T=>{h(Bu(T)),u(!1)}})]})}import{useCallback as Kh,useEffect as Gh,useMemo as Iu,useRef as _l,useState as Ys}from"react";import{Box as ur,Tooltip as Zh}from"@mui/material";import Hw from"@ehfuse/overlay-scrollbar";import Ww from"@mui/icons-material/CheckCircle";import Uw from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as Vw,PointerSensor as Kw,closestCenter as Gw,useSensor as Yw,useSensors as Xw}from"@dnd-kit/core";import{SortableContext as Zw,arrayMove as Jw,useSortable as Qw,verticalListSortingStrategy as e_}from"@dnd-kit/sortable";import t_ from"@mui/icons-material/DragIndicator";import{jsx as Zt,jsxs as Io}from"react/jsx-runtime";var Eu=36,r_=48,Yh=40,n_=24,o_=4,i_=14,Xh=36,s_=12.5,ts=220,a_={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function vi(e){let d=String(e??"").trim();if(!d)return null;let g=new Date(`${d}T00:00:00`);return Number.isNaN(g.getTime())?null:g}function wl(e,d){let g=new Date(e);return g.setDate(g.getDate()+d),g}function Mu(e,d){return Math.round((d.getTime()-e.getTime())/864e5)}function l_({task:e,dragHandle:d,onPointerDown:g,onClick:l}){let o=it(),s=_l(null),[r,t]=Ys("");return Zt(Zh,{title:r,arrow:!0,enterDelay:300,children:Io(ur,{onPointerDown:g,onClick:n=>l(e,n),onMouseEnter:()=>{let n=s.current;t(n&&n.scrollWidth>n.clientWidth?e.title:"")},sx:{width:ts,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:o.timeline.bg,borderRight:`1px solid ${o.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:o.mode==="dark"||e.completed?400:500,color:e.completed?o.colors.textMuted:o.mode==="dark"?o.colors.textStrong:o.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:o.colors.surfaceHover}},children:[d,Zt(ur,{ref:s,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function c_({id:e,showIndicator:d,children:g}){let l=it(),{attributes:o,listeners:s,setNodeRef:r}=Qw({id:e});return Io(ur,{ref:r,sx:{position:"relative"},children:[d?Zt(ur,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:l.colors.accentOnSurface,zIndex:5}}):null,g({...o,...s})]})}function Jh({tasks:e,hideCompletedChecklist:d=!1,todayStr:g,onOpenDetail:l,onToggleChecklist:o,onReorderTasks:s,onTaskContextMenu:r}){let t=it(),[n,c]=Ys(null),i=Iu(()=>[...e].sort((x,w)=>{let _=(x.timeline_sort_no??0)>0,C=(w.timeline_sort_no??0)>0;if(_&&C)return(x.timeline_sort_no??0)-(w.timeline_sort_no??0);if(_!==C)return _?-1:1;let O=x.due_date||x.start_date,z=w.due_date||w.start_date;return O!==z?O<z?-1:1:x.seq-w.seq}),[e]),[a,h]=Ys(null),[f,u]=Ys(null),b=Xw(Yw(Kw,{activationConstraint:{distance:4}})),m=Kh(x=>{h(x.over?Number(x.over.id):null)},[]),v=Kh(x=>{h(null),u(null);let{active:w,over:_}=x;if(!_||w.id===_.id)return;let C=i.map($=>$.seq),O=C.indexOf(Number(w.id)),z=C.indexOf(Number(_.id));O===-1||z===-1||s(Jw(C,O,z))},[i,s]),k=Iu(()=>{let x=vi(g)??new Date,w=x,_=wl(x,21);for(let z of i){let $=vi(z.start_date)??vi(z.due_date),V=vi(z.due_date)??$;$&&$<w&&(w=$),V&&V>_&&(_=V)}let C=wl(w,-3),O=Mu(C,wl(_,3))+1;return Array.from({length:O},(z,$)=>wl(C,$))},[i,g]),B=k[0],R=k.findIndex(x=>Tr(x)===g),{dayWidths:L,dayOffsets:A,gridWidth:D}=Iu(()=>{let x=k.map((C,O)=>C.getDate()===1||O===0?r_:Eu),w=[],_=0;for(let C of x)w.push(_),_+=C;return{dayWidths:x,dayOffsets:w,gridWidth:_}},[k]),N=ts+D,q=_l(null),j=x=>{q.current={x:x.clientX,y:x.clientY}},S=(x,w)=>{let _=q.current;q.current=null,!(_&&(Math.abs(w.clientX-_.x)>5||Math.abs(w.clientY-_.y)>5))&&l(x)},T=_l(null),[P,p]=Ys(!1);Gh(()=>{let x=T.current?.getScrollContainer();if(!x)return;let w=()=>p(x.scrollHeight>x.clientHeight);w();let _=new ResizeObserver(w);return _.observe(x),()=>_.disconnect()},[i.length]);let y=_l(!1);return Gh(()=>{if(i.length===0||y.current)return;y.current=!0;let x=window.requestAnimationFrame(()=>{let w=T.current?.getScrollContainer();!w||R<0||(w.scrollLeft=Math.max(0,A[R]-Eu*3))});return()=>window.cancelAnimationFrame(x)},[i.length]),Io(ur,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${t.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:t.timeline.headerBg},children:[Zt(ur,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:Zt(Hw,{ref:T,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:Io(ur,{sx:{width:N,position:"relative",bgcolor:t.timeline.bg},children:[Io(ur,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:t.timeline.headerBg,borderBottom:`1px solid ${t.timeline.gridColor}`},children:[Zt(ur,{sx:{width:ts,height:Xh,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:t.timeline.headerBg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:t.colors.textSecondary},children:"\uC81C\uBAA9"}),k.map((x,w)=>{let _=x.getDay(),C=w===R,O=x.getDate()===1||w===0;return Zt(ur,{sx:{width:L[w],height:Xh,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:s_,fontWeight:C&&t.mode!=="dark"?700:400,color:C?t.timeline.bg:_===0?t.colors.danger:_===6?t.colors.accentOnSurface:t.colors.textSecondary,bgcolor:C?t.colors.danger:"transparent",borderRight:`1px solid ${t.timeline.gridColor}`,whiteSpace:"nowrap"},children:O?`${x.getMonth()+1}/${x.getDate()}`:x.getDate()},Tr(x))})]}),Zt(Vw,{sensors:b,collisionDetection:Gw,onDragStart:x=>u(Number(x.active.id)),onDragOver:m,onDragEnd:v,onDragCancel:()=>{h(null),u(null)},children:Zt(Zw,{items:i.map(x=>String(x.seq)),strategy:e_,children:Io(ur,{sx:{position:"relative"},children:[k.map((x,w)=>{let _=x.getDay(),C=w===R;return!C&&_!==0&&_!==6?null:Zt(ur,{sx:{position:"absolute",top:0,bottom:0,left:ts+A[w],width:L[w],bgcolor:C?"rgba(229,72,77,0.07)":t.colors.surfaceSubtle,zIndex:0}},`stripe-${Tr(x)}`)}),i.map((x,w)=>{let _=vi(x.start_date)??vi(x.due_date),C=vi(x.due_date)??_,O=_?Math.min(k.length-1,Math.max(0,Mu(B,_))):0,z=C?Math.min(k.length-1,Math.max(O,Mu(B,C))):O,$=a_[x.priority],V=ts+A[O]+2,M=A[z]+L[z]-A[O]-4,H=(x.checklist??[]).map((I,E)=>({entry:I,index:E})).filter(({entry:I})=>!d||!I.checked);return Zt(c_,{id:String(x.seq),showIndicator:a===x.seq&&f!==x.seq,children:I=>Io(ur,{sx:{borderBottom:w===i.length-1&&P?"none":`1px solid ${t.timeline.gridColor}`,position:"relative",zIndex:1,opacity:f===x.seq?.45:1},children:[Io(ur,{onContextMenu:E=>r(x,E),sx:{display:"flex",height:Yh,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[Zt(l_,{task:x,dragHandle:Zt(ur,{component:"span",className:"taskbox-timeline-handle",...I,onClick:E=>E.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:t.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:t.colors.accentOnSurface}},children:(()=>{let E=(x.is_notice||x.is_event?Mt(x.icon||(x.is_notice?lr:dr)):null)??t_;return Zt(E,{sx:{fontSize:17}})})()}),onPointerDown:j,onClick:S}),Zt(Zh,{title:`${x.title} (${x.start_date||"?"} ~ ${x.due_date||"?"})`,arrow:!0,enterDelay:300,children:Zt(ur,{onPointerDown:j,onClick:E=>S(x,E),sx:{position:"absolute",top:(Yh-20)/2,left:V,width:Math.max(Eu-4,M),height:20,borderRadius:1,bgcolor:$.bg,border:`1px solid ${$.border}`,opacity:x.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),H.map(({entry:E,index:F},U)=>Zt(ur,{sx:{display:"flex",height:n_,position:"relative",mt:U===0?`${o_}px`:0,mb:U===H.length-1?`${i_}px`:0},children:Zt(ur,{sx:{width:ts,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:t.timeline.bg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:E.checked?t.colors.textMuted:t.colors.textPrimary},children:Io(ur,{onClick:Y=>c({anchorEl:Y.currentTarget,taskSeq:x.seq,index:F,checked:!E.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[E.checked?Zt(Ww,{sx:{fontSize:17,color:t.colors.accentOnSurface,flexShrink:0}}):Zt(Uw,{sx:{fontSize:17,color:t.colors.textMuted,flexShrink:0}}),Zt(ur,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:E.checked?"line-through":"none"},children:E.label})]})})},`${x.seq}-check-${F}`))]})},x.seq)}),i.length===0?Zt(ur,{sx:{py:8,textAlign:"center",color:t.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),Zt(Pt,{open:!!n,anchorEl:n?.anchorEl??null,title:n?.checked?"\uC774 \uD560\uC77C\uC744 \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:n?.checked?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>c(null),onConfirm:()=>{n&&o(n.taskSeq,n.index,n.checked),c(null)}})]})}import{jsx as wi}from"react/jsx-runtime";function AD(e){switch(e.view){case"card":case"kanban":{let{view:d,...g}=e;return wi(mu,{...g,columnAxis:d==="kanban"?"status":"project"})}case"sprint":{let{view:d,...g}=e;return wi(mu,{...g,columnAxis:"sprint"})}case"calendar":{let{view:d,...g}=e;return wi(Nh,{...g})}case"month":{let{view:d,...g}=e;return wi(qh,{...g})}case"agenda":{let{view:d,...g}=e;return wi(Vh,{...g})}case"timeline":{let{view:d,...g}=e;return wi(Jh,{...g})}default:{let{view:d,...g}=e;return wi(dh,{...g})}}}var DD=["list","card","kanban","calendar","month","timeline"];import{Box as hn}from"@mui/material";import{Fragment as u_,jsx as _i,jsxs as no}from"react/jsx-runtime";function Qh(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let g=new Date(`${e}T00:00:00`),l=new Date(`${d}T00:00:00`);return Math.round((g.getTime()-l.getTime())/864e5)}function ep({tasks:e,todayStr:d,showProgress:g=!0,dday:l=null,workdaysLeft:o=null,showPoints:s=!0,showHours:r=!0,showOverdue:t=!0,showInfo:n=!0,inline:c=!1}){let i=it(),a=e.filter(D=>!D.archived),h=a.filter(D=>D.completed).length,f=a.length>0?Math.round(h/a.length*100):0,u=a.filter(D=>!D.completed&&!D.is_event&&!!D.due_date&&D.due_date.slice(0,10)<d).length,b=a.reduce((D,N)=>N.completed?D:D+(N.story_points??0),0),m=g?_i(hn,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:i.summary.gaugeHeight,borderRadius:3,bgcolor:i.summary.gaugeTrackColor},children:_i(hn,{sx:{height:"100%",borderRadius:3,width:`${f}%`,bgcolor:f>=100?i.summary.gaugeCompleteColor:i.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,v=g?no(hn,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:i.summary.textColor},children:[f,"%"]}):null,k={color:i.summary.numberColor,fontWeight:700,fontSize:c?15:14},B=a.length-h,R=no(u_,{children:[c?null:no("span",{children:["\uB0A8\uC740 ",_i(hn,{component:"span",sx:k,children:B}),"\uAC74"]}),t&&u>0?no(hn,{component:"span",sx:{color:i.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",_i(hn,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:u}),"\uAC74"]}):null,s&&b>0?no("span",{children:[_i(hn,{component:"span",sx:k,children:b}),"SP"]}):null]}),L=typeof o=="number"&&Number.isFinite(o)?no("span",{children:["\uADFC\uBB34\uC77C ",_i(hn,{component:"span",sx:k,children:o}),"\uC77C"]}):null,A=typeof l=="number"&&Number.isFinite(l)?_i(hn,{component:"span",sx:{ml:c?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:i.summary.overdueColor,color:i.colors.textInverse,lineHeight:1.6},children:l===0?"D-day":l>0?`D-${l}`:`D+${-l}`}):null;return c?no(hn,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:i.summary.textColor,whiteSpace:"nowrap",...i.summary.sx},children:[n?R:null,n?L:null,n?A:null,m,v]}):no(hn,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[g?no(hn,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,v]}):null,no(hn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:i.summary.textColor},children:[R,L,A]})]})}import{useMemo as f_}from"react";function d_(e){let d=String(e??"").trim();if(!d)return 0;let g=0,l=!1;for(let o of d.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let s=parseFloat(o[1]),r=o[2].toLowerCase();l=!0,r==="m"||r==="\uBD84"?g+=s/60:r==="d"||r==="\uC77C"?g+=s*8:g+=s}if(!l){let o=parseFloat(d);Number.isFinite(o)&&(g+=o)}return g}function qD(e){let d=Math.round(e*10)/10;return`${d%1===0?d.toFixed(0):d.toFixed(1)}\uC2DC\uAC04`}function tp(e,d,g){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return 0;let l=new Date(`${e}T00:00:00`),o=new Date(`${d}T00:00:00`);if(o<l||o.getTime()-l.getTime()>3660*864e5)return 0;let s=0;for(let r=new Date(l);r<=o;r.setDate(r.getDate()+1)){let t=r.getDay();if(t===0||t===6)continue;let n=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`;g.has(n)||(s+=1)}return s}function $D(e){return e.reduce((d,g)=>g.completed?d:d+d_(g.estimated_time),0)}import{jsx as h_}from"react/jsx-runtime";function GD({sprint:e,tasks:d,todayStr:g,...l}){let o=e.status==="closed"?null:Qh(e.end_date,g),s=o!==null&&o>=0,r=f_(()=>{if(!s)return[];let c=Number(g.slice(0,4)),i=Number(e.end_date.slice(0,4))||c,a=[];for(let h=c;h<=Math.max(c,i);h+=1)a.push(h);return a},[s,g,e.end_date]),t=Yn(r),n=s?tp(g,e.end_date,new Set(t.keys())):null;return h_(ep,{tasks:d,todayStr:g,dday:o,workdaysLeft:n,...l})}import{useEffect as k_,useRef as S_,useState as T_}from"react";import{Box as Ou}from"@mui/material";import{Children as p_}from"react";import{Box as Ru,CircularProgress as m_}from"@mui/material";import{jsx as kl}from"react/jsx-runtime";var rp={xs:2,md:3};function np(){return kl(Ru,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:kl(m_,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function op({children:e}){return kl(Ru,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:rp,pb:rp},children:p_.map(e,d=>d==null||d===!1?null:kl(Ru,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:d}))})}import{useState as x_}from"react";import{Box as Mo,Button as sp,Checkbox as v_,Typography as Jo}from"@mui/material";import ap from"@mui/icons-material/CheckCircle";import w_ from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as y_,jsx as ip}from"react/jsx-runtime";var g_="taskbox-search-highlight";function b_(e,d){let g=d?.keyPrefix??"hl";return e.map((l,o)=>ip("span",{className:l.highlight?d?.highlightClassName??g_:d?.className,style:l.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:l.text},`${g}-${l.text}-${o}`))}function Sl({text:e,keyword:d,fallback:g="-",className:l,highlightClassName:o,keyPrefix:s}){let r=String(e??"").trim()||g,t=rl(r,d);return ip(y_,{children:b_(t,{className:l,highlightClassName:o,keyPrefix:s})})}import{jsx as St,jsxs as ki}from"react/jsx-runtime";var __={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:Sr(12.5),fontWeight:500,lineHeight:1.4},Eo={fontSize:Sr(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function zn({label:e,children:d}){return ki(Mo,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[St(Mo,{sx:__,children:e}),St(Mo,{sx:{...Eo,flex:1,pt:.2},children:d})]})}function lp({task:e,statusOptions:d,projectLabel:g,searchText:l,todayStr:o,dimCompleted:s=!0,onRequestToggleCompleted:r,onOpenDetail:t,onTaskContextMenu:n,targetSummary:c="",ackInfo:i,completeLocked:a=!1,unread:h=!1,noticeReadOnly:f=!1,onAckConfirm:u,onAckListClick:b,myManaged:m=!1}){let v=e.is_event?Ls(e):fr(e),k=String(e.due_date??"").slice(11,16),B=e.is_event?String(e.event_time??"").trim():/^\d{2}:\d{2}$/.test(k)?k:String(e.estimated_time??"").trim(),R=wn(e.start_date),L=wn(e.due_date),A=R&&B&&!L?`${R} ${B}`:R,D=L&&B?`${L} ${B}`:L,N=bt(),q=!e.is_notice&&e.completed&&!!e.review_pending&&!!N.onReviewDone&&(N.myAccountSeq??0)>0&&(e.author_account_seq??0)===(N.myAccountSeq??0),[j,S]=x_(null),T=!e.is_notice&&!e.is_event&&!String(e.due_date??"").trim(),P=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<o,p=(e.receiver_names??[]).filter(Boolean);return ki(Mo,{role:"button",tabIndex:0,onClick:()=>t(e),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),t(e))},onContextMenu:y=>n(e,y),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",opacity:T?.6:1,position:"relative"},children:[m?St(Mo,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,ki(Mo,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[e.is_event?(()=>{let y=Mt(e.icon||dr);return y?St(y,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!f&&!a?St(v_,{checked:e.completed,icon:St(w_,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:St(ap,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:y=>y.stopPropagation(),onChange:(y,x)=>r({anchorEl:y.currentTarget,taskSeq:e.seq,nextCompleted:x}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{if(!e.is_notice)return null;let y=Mt(e.icon||lr);return y?St(y,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),St(Jo,{sx:{fontSize:Sr(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed&&s?"#9a9a97":T?"#5f5e5b":"#111827",textDecoration:e.completed&&s?"line-through":"none"},children:St(Sl,{text:e.title,keyword:l})}),h&&!e.completed?St(Mo,{component:"span",sx:{flexShrink:0,px:.55,fontSize:Sr(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),ki(Mo,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[St(zn,{label:v?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:ki(Mo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[v?St(Dt,{option:v,small:!0}):null,St(Hr,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?St(zn,{label:"\uB77C\uBCA8",children:St(Uo,{labelKeys:e.label_keys,labelOptions:d})}):null,g?St(zn,{label:"\uD504\uB85C\uC81D\uD2B8",children:St(Jo,{sx:Eo,children:g})}):null,A?St(zn,{label:"\uC2DC\uC791",children:St(Jo,{sx:Eo,children:A})}):null,D?St(zn,{label:"\uB9C8\uAC10",children:ki(Jo,{sx:{...Eo,color:P?"#e5484d":Eo.color,fontWeight:P?600:400},children:[D,P?" \xB7 \uC9C0\uC5F0":""]})}):null,q?ki(zn,{label:"\uAC80\uC218",children:[St(sp,{size:"small",variant:"contained",disableElevation:!0,onClick:y=>{y.stopPropagation(),S(y.currentTarget)},sx:{...Hi,py:0,fontSize:Sr(13)},children:"\uAC80\uC218\uC644\uB8CC"}),St(Ui,{anchorEl:j,onCancel:()=>S(null),onConfirm:()=>{N.onReviewDone?.(e),S(null)}})]}):null,e.is_notice?St(zn,{label:"\uB300\uC0C1\uC790",children:St(Jo,{sx:Eo,children:c||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,i?St(zn,{label:"\uD655\uC778",children:St(sp,{size:"small",variant:i.canAck?"contained":"outlined",color:"inherit",startIcon:i.acked?St(ap,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:y=>{y.stopPropagation(),i.canAck?u?.(e):b?.(e,y.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:Sr(13),...i.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:i.canAck?"\uD655\uC778":`${i.count}/${i.total}`})}):null,!e.is_notice&&e.manager_name?St(zn,{label:"\uCC45\uC784\uC790",children:St(Jo,{sx:Eo,children:St(Sl,{text:e.manager_name,keyword:l})})}):null,!e.is_notice&&p.length>0?St(zn,{label:"\uCC38\uC870\uC790",children:St(Jo,{sx:Eo,children:p.join(", ")})}):null,e.note?St(zn,{label:"\uBE44\uACE0",children:St(Jo,{sx:Eo,children:St(Sl,{text:e.note,keyword:l})})}):null]})]})}import{jsx as rs,jsxs as B_}from"react/jsx-runtime";function C_(e,d){if(e.completed||e.archived||d<=0)return;let g=Gi(e,d);if(g.canConfirm)return{count:g.count,total:g.total,acked:!1,canAck:!0,pendingNames:g.pendingNames}}function BP({tasks:e,statusOptions:d,customTabs:g,loading:l,dimCompleted:o=!0,searchText:s,todayStr:r,onToggleCompleted:t,onOpenDetail:n,onTaskContextMenu:c,getTargetSummary:i,getAckInfo:a,getNoticeReadOnly:h,isTaskUnread:f,getCompleteLocked:u,onAckConfirm:b,onAckListClick:m,onEndReached:v,myAccountSeq:k=0}){let B=new Map(g.map(q=>[q.key,q.label])),[R,L]=T_(null),{onReturnTask:A}=bt(),D=R?e.find(q=>q.seq===R.taskSeq):void 0,N=S_(null);return k_(()=>{let q=N.current;if(!v||!q)return;let j=new IntersectionObserver(S=>{S[0]?.isIntersecting&&v()});return j.observe(q),()=>j.disconnect()},[v,e.length]),e.length===0?l?rs(np,{}):rs(Ou,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):B_(Ou,{sx:{minWidth:0},children:[rs(op,{children:e.map(q=>rs(lp,{dimCompleted:o,myManaged:k>0&&!q.is_notice&&!q.is_event&&(q.manager_account_seq??0)===k,task:q,statusOptions:d,projectLabel:q.tab_key?B.get(q.tab_key)??"":"",searchText:s,todayStr:r,onRequestToggleCompleted:L,onOpenDetail:n,onTaskContextMenu:c,targetSummary:q.is_notice?i?.(q):void 0,ackInfo:q.is_notice?a?.(q):C_(q,k),noticeReadOnly:q.is_notice?h?.(q):!1,unread:f?.(q)??!1,completeLocked:u?.(q)??!1,onAckConfirm:b,onAckListClick:m},q.seq))}),v?rs(Ou,{ref:N,sx:{height:"1px"}}):null,rs(nn,{open:!!R,anchorEl:R?.anchorEl??null,nextCompleted:R?.nextCompleted??!1,returnMode:!!A&&!!(D&&rn(D,k)),onCancel:()=>L(null),onConfirm:q=>{R&&(q&&A&&D?A(D,q):t(R.taskSeq,R.nextCompleted)),L(null)}})]})}import{useState as Xs}from"react";import{Box as or,Checkbox as I_,Menu as E_,MenuItem as cp,Tooltip as M_}from"@mui/material";import R_ from"@mui/icons-material/CheckCircle";import O_ from"@mui/icons-material/CheckCircleOutlineOutlined";import A_ from"@mui/icons-material/NotesOutlined";import D_ from"@mui/icons-material/AutorenewOutlined";import P_ from"@mui/icons-material/CalendarTodayOutlined";import N_ from"@mui/icons-material/EventOutlined";import L_ from"@mui/icons-material/PersonOutlineOutlined";import z_ from"@mui/icons-material/PeopleAltOutlined";import j_ from"@mui/icons-material/StickyNote2Outlined";import{Fragment as $_,jsx as vt,jsxs as Qo}from"react/jsx-runtime";var Au={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:vt(A_,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:vt(L_,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:vt(z_,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:vt(D_,{sx:{fontSize:15}})},priority:{label:"\uC911\uC694\uB3C4",width:"88px",align:"center",icon:null},start_date:{label:"\uC2DC\uC791\uC77C\uC2DC",width:"110px",align:"center",icon:vt(P_,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:vt(N_,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:vt(j_,{sx:{fontSize:15}})}},F_=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],q_=new Set(["manager_name","status","due_date"]);function up(e){let d=String(e??"").trim();return d?d.slice(2,10).replaceAll("-","."):""}function tN(e,d){return d>0?e.filter(g=>!g.is_notice&&!g.completed&&!g.archived&&An(g)==="group"&&Number(g.visibility_group_seq??0)===d).sort((g,l)=>{let o=String(g.due_date??"").trim(),s=String(l.due_date??"").trim();return o!==s?o?s?o.localeCompare(s):-1:1:Number(g.seq)-Number(l.seq)}):[]}function rN({tasks:e,columns:d=F_,loading:g=!1,emptyText:l="\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",myAccountSeq:o=0,avatarSrcByName:s,managerCandidates:r=[],canAssignManager:t,onOpenDetail:n,onToggleCompleted:c,onChangeStatus:i,onChangeDueDate:a,onChangeReminder:h,onChangeManager:f,onClaimTask:u}){let b=it(),[m,v]=Xs(null),[k,B]=Xs(null),[R,L]=Xs(null),[A,D]=Xs(null),{onReturnTask:N}=bt(),[q,j]=Xs(null),S=d.map(p=>p.width??Au[p.id].width).join(" "),T=(p,y)=>vt(vn,{src:s?.get(p)??"",name:p,avatarSx:{width:y,height:y,fontSize:Math.round(y/2),flexShrink:0,borderRadius:"50%"},iconFontSize:Math.round(y*.6)}),P=(p,y)=>{let w=Au[p.id].align==="center";switch(p.id){case"completed":if(y.is_event){let _=Mt(y.icon||dr);return vt(or,{className:"cell",sx:{justifyContent:"center"},children:_?vt(_,{sx:{fontSize:19,color:y.icon_color||"#1e3a8a"}}):null},p.id)}return vt(or,{className:"cell",sx:{justifyContent:"center",...c?{"&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:vt(M_,{title:y.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:vt(I_,{checked:!!y.completed,icon:vt(O_,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:vt(R_,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:_=>D({anchorEl:_.currentTarget,task:y}),sx:{p:.5}})})},p.id);case"title":{let _=y.is_notice?Mt(y.icon||lr):null,C=y.icon_color||"#e5484d";return Qo(or,{className:"cell",onClick:()=>n(y),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[_?vt(_,{sx:{fontSize:18,flexShrink:0,color:C}}):null,vt(or,{component:"span",sx:{fontSize:14.5,fontWeight:b.table.rowTitleFontWeight,color:b.table.rowTitleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.title||"(\uC81C\uBAA9 \uC5C6\uC74C)"})]},p.id)}case"manager_name":{let _=t?t(y):!1,C=o>0&&Number(y.manager_account_seq??0)===o;return _&&f?Qo(or,{className:"cell",onClick:O=>L({anchorEl:O.currentTarget,task:y}),sx:{gap:.75,justifyContent:"center",cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[y.manager_name?T(y.manager_name,22):null,vt(or,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name||""})]},p.id):vt(or,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:y.manager_name?Qo($_,{children:[T(y.manager_name,22),vt(or,{component:"span",sx:{fontSize:14,fontWeight:C?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name})]}):u?vt(Gn,{onClick:O=>j({anchorEl:O.currentTarget,taskSeq:Number(y.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},p.id)}case"receiver_names":return vt(or,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(y.receiver_names??[]).join(", ")},p.id);case"status":return vt(or,{className:"cell",onClick:i?_=>v({anchorEl:_.currentTarget,task:y}):void 0,sx:{py:.5,justifyContent:"center",...i?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:vt(Dt,{option:fr(y)})},p.id);case"priority":return vt(or,{className:"cell",sx:{justifyContent:"center"},children:vt(Hr,{priority:y.priority,plain:!0})},p.id);case"start_date":return vt(or,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:up(y.start_date)},p.id);case"due_date":return vt(or,{className:"cell",onClick:a?_=>B({anchorEl:_.currentTarget,taskSeq:Number(y.seq),date:String(y.due_date??"").slice(0,10),reminders:Xn(y)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...a?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:up(y.due_date)},p.id);case"note":return vt(or,{className:"cell",sx:{justifyContent:w?"center":"flex-start",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.note||""},p.id);default:return null}};return Qo(or,{sx:{border:`1px solid ${b.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:b.table.bg,color:b.table.rowColor},children:[vt(or,{sx:{display:"grid",gridTemplateColumns:S,borderBottom:`1px solid ${b.table.borderColor}`,bgcolor:b.table.headerBg,"& > *":{display:"flex",alignItems:"center",gap:.5,px:1,py:1,minWidth:0,fontSize:b.table.headerFontSize,whiteSpace:"nowrap",userSelect:"none",borderRight:`1px solid ${b.table.rowBorderColor}`},"& > *:first-of-type":{px:.5},"& > *:last-child":{borderRight:"none",pr:2}},children:d.map(p=>{let y=Au[p.id];return Qo(or,{sx:{justifyContent:y.align==="center"?"center":"flex-start",color:q_.has(p.id)?b.table.headerActiveColor:b.table.headerColor},children:[y.icon,p.label??y.label]},p.id)})}),g?vt(or,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?vt(or,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:l}):e.map((p,y)=>vt(or,{sx:{display:"grid",gridTemplateColumns:S,minHeight:44,fontSize:15,bgcolor:b.table.rowBg,borderTop:y===0?"none":`1px solid ${b.table.rowBorderColor}`,"&:hover":{bgcolor:b.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${b.table.rowBorderColor}`},"& > .cell:first-of-type":{px:.5},"& > .cell:last-child":{borderRight:"none",pr:2}},children:d.map(x=>P(x,p))},p.seq)),vt(Fi,{anchorEl:m?.anchorEl??null,value:String(m?.task.status??""),options:m?Ua(m.task):void 0,onSelect:p=>{m&&i?.(Number(m.task.seq),p),v(null)},onComplete:c&&m&&!m.task.completed&&!m.task.is_notice&&!m.task.is_event&&!m.task.is_bug?()=>c(m.task,!0):void 0,onClose:()=>v(null)}),Qo(E_,{anchorEl:R?.anchorEl??null,open:!!R,onClose:()=>L(null),transitionDuration:0,children:[Qo(cp,{onClick:()=>{R&&f?.(Number(R.task.seq),"",0),L(null)},sx:{fontSize:14,minWidth:170,gap:1,color:b.table.headerColor},children:[vt(or,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),r.map(p=>Qo(cp,{selected:Number(R?.task.manager_account_seq??0)===Number(p.account_seq??0),onClick:()=>{R&&f?.(Number(R.task.seq),p.name,Number(p.account_seq??0)),L(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[T(p.name,24),p.name,p.role_name?vt(or,{component:"span",sx:{color:b.table.headerColor,fontSize:13},children:p.role_name}):null]},p.seq))]}),vt(_n,{anchorEl:k?.anchorEl??null,open:!!k,date:k?.date??"",reminders:k?.reminders??[],hideReminder:!h,onClose:()=>B(null),onDateChange:p=>{k&&(a?.(k.taskSeq,p),B(y=>y?{...y,date:p}:null))},onReminderChange:p=>{k&&(h?.(k.taskSeq,p),B(y=>y?{...y,reminders:p}:null))}}),vt(nn,{open:!!A,anchorEl:A?.anchorEl??null,nextCompleted:!A?.task.completed,returnMode:!!N&&!!(A&&rn(A.task,o)),onCancel:()=>D(null),onConfirm:p=>{A&&(p&&N?N(A.task,p):c?.(A.task,!A.task.completed)),D(null)}}),vt(Pt,{open:!!q,anchorEl:q?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>j(null),onConfirm:()=>{q&&u?.(q.taskSeq),j(null)}})]})}var Zs=[{value:"daily",label:"\uB9E4\uC77C"},{value:"weekly",label:"\uB9E4\uC8FC"},{value:"monthly",label:"\uB9E4\uC6D4"},{value:"yearly",label:"\uB9E4\uB144"}];function Tl(e){return Zs.find(d=>d.value===e)?.label??"\uC5C6\uC74C"}function H_(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 Cl(e,d){let g=H_(e);if(!g)return"";let l=new Date(g);d==="daily"?l.setMonth(l.getMonth()+1):d==="weekly"?l.setMonth(l.getMonth()+3):d==="monthly"?l.setFullYear(l.getFullYear()+1):l.setFullYear(l.getFullYear()+3);let o=s=>String(s).padStart(2,"0");return`${l.getFullYear()}-${o(l.getMonth()+1)}-${o(l.getDate())}`}function W_(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function dp(e,d){let g=String(e??"").slice(0,10);if(!W_(g)||typeof d!="number"||!Number.isFinite(d))return"";let l=new Date(`${g}T12:00:00`);l.setDate(l.getDate()+Math.trunc(d));let o=l.getFullYear(),s=String(l.getMonth()+1).padStart(2,"0"),r=String(l.getDate()).padStart(2,"0");return`${o}-${s}-${r}`}function U_(e,d,g){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:dp(d,e.start_offset_days),due_date:dp(d,e.due_offset_days),priority:e.priority??"medium",label_keys:[...e.label_keys??[]],manager_account_seq:Number(e.manager_account_seq)||0,manager_name:String(e.manager_name??""),checklist:(e.checklist??[]).map(l=>String(l??"").trim()).filter(l=>l.length>0).map(l=>({label:l,checked:!1})),group_seq:g}}function fp(e,d){let g=Number(e.group_seq)||0;return(e.items??[]).map(l=>U_(l,d,g)).filter(l=>l.title.length>0)}function sN(e){return typeof e!="number"||!Number.isFinite(e)?"-":e===0?"\uAE30\uC900\uC77C":e>0?`\uAE30\uC900\uC77C +${Math.trunc(e)}\uC77C`:`\uAE30\uC900\uC77C ${Math.trunc(e)}\uC77C`}import{useEffect as y4,useRef as x4,useState as Vp}from"react";import{Box as Oo,Button as Qu,ButtonBase as v4,Divider as Kp,Drawer as w4,IconButton as _4,Tooltip as k4}from"@mui/material";import S4 from"@mui/icons-material/Close";import T4 from"@ehfuse/overlay-scrollbar";import{FormDialog as C4}from"@ehfuse/mui-form-dialog";import{useState as ra}from"react";import{Box as Ci,ButtonBase as a4,Divider as na,Menu as Xu,MenuItem as Zu,Tooltip as l4}from"@mui/material";import c4 from"@mui/icons-material/SubjectOutlined";import u4 from"@mui/icons-material/StickyNote2Outlined";import d4 from"@mui/icons-material/LabelOutlined";import f4 from"@mui/icons-material/DirectionsRunOutlined";import qp from"@mui/icons-material/LockOutlined";import $p from"@mui/icons-material/PublicOutlined";import Hp from"@mui/icons-material/Group";import h4 from"@mui/icons-material/Repeat";import p4 from"@mui/icons-material/EventOutlined";import m4 from"@mui/icons-material/SpeedOutlined";import{TextField as g4}from"@ehfuse/mui-form-controls";import{InfoAlert as Wp}from"@ehfuse/alerts";import{useState as Si}from"react";import{Box as El,Divider as u3,ListItemIcon as d3,Menu as Nu,MenuItem as Js}from"@mui/material";import f3 from"@mui/icons-material/Add";import Il from"@mui/icons-material/Check";import h3 from"@mui/icons-material/ViewKanbanOutlined";import p3 from"@mui/icons-material/CalendarTodayOutlined";import m3 from"@mui/icons-material/EventOutlined";import g3 from"@mui/icons-material/PersonOutlineOutlined";import bp from"@mui/icons-material/PeopleAltOutlined";import b3 from"@mui/icons-material/FlagOutlined";import y3 from"@mui/icons-material/TimerOutlined";import x3 from"@mui/icons-material/NotificationsNoneOutlined";import v3 from"@mui/icons-material/InboxOutlined";import w3 from"@mui/icons-material/PlaceOutlined";import _3 from"@mui/icons-material/MapOutlined";import{TimePicker as k3}from"@ehfuse/mui-datetime-picker";import{InfoAlert as S3}from"@ehfuse/alerts";var jn="@media (max-width: 719.95px)";function oo(e){return{[jn]:{order:e}}}import{useEffect as V_,useState as K_}from"react";import{Box as G_}from"@mui/material";import{jsx as Y_}from"react/jsx-runtime";function Ro({value:e,placeholder:d,readOnly:g,onCommit:l}){let o=it(),[s,r]=K_(e);return V_(()=>r(e),[e]),Y_(G_,{component:"input",spellCheck:!1,value:s,readOnly:g,placeholder:d,onChange:t=>r(t.target.value),onBlur:()=>{s.trim()!==e&&l(s.trim())},onKeyDown:t=>{t.key==="Enter"&&t.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:o.colors.textPrimary,caretColor:o.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as Du}from"@mui/material";import{jsx as X_,jsxs as hp}from"react/jsx-runtime";function gt({icon:e,label:d,onClick:g,sx:l,children:o}){return hp(Du,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(l)?l:[l]],children:[hp(Du,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,d]}),X_(Du,{onClick:g?s=>g(s.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:g?"pointer":"default","&:hover":g?{bgcolor:"#f2f2f0"}:void 0,[jn]:{py:.25}},children:o})]})}import T3 from"@mui/icons-material/StorefrontOutlined";import C3 from"@mui/icons-material/SupportAgentOutlined";import{Suspense as Z_,lazy as J_,useEffect as Q_,useState as pp}from"react";import{Box as Pu,Dialog as e3,DialogContent as t3,DialogTitle as r3,IconButton as mp,Tooltip as n3}from"@mui/material";import o3 from"@mui/icons-material/Close";import i3 from"@mui/icons-material/Search";import{Fragment as c3,jsx as Fn,jsxs as Bl}from"react/jsx-runtime";function s3(e){return Fn(Pu,{sx:{p:3,fontSize:14,color:"#9a9a97"},children:"\uC8FC\uC18C \uAC80\uC0C9 \uBAA8\uB4C8(react-daum-postcode)\uC744 \uBD88\uB7EC\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC785\uB825\uD574 \uC8FC\uC138\uC694."})}var a3=J_(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:s3})));function l3(e){if(e.addressType!=="R")return e.address;let d="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(d+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(d+=d!==""?`, ${e.buildingName}`:e.buildingName),d!==""?`${e.address} (${d})`:e.address}function gp({value:e,placeholder:d="\uC8FC\uC18C \uC785\uB825",readOnly:g,onCommit:l}){let[o,s]=pp(e),[r,t]=pp(!1),n=bt().slots?.addressSearch;Q_(()=>s(e),[e]);let c=a=>{s(a),t(!1),a!==e&&l(a)};return Bl(c3,{children:[Bl(Pu,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[Fn(Pu,{component:"input",spellCheck:!1,value:o,readOnly:g,placeholder:d,onChange:a=>s(a.target.value),onBlur:()=>{r||o.trim()!==e&&l(o.trim())},onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),!g&&t(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),g?null:Fn(n3,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:Fn(mp,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>t(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:Fn(i3,{sx:{fontSize:17}})})})]}),n?Fn(n,{open:r,onComplete:c,onClose:()=>t(!1)}):Bl(e3,{open:r,onClose:()=>t(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[Bl(r3,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",Fn(mp,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>t(!1),size:"small",children:Fn(o3,{})})]}),Fn(t3,{style:{padding:0},dividers:!0,children:r?Fn(Z_,{fallback:null,children:Fn(a3,{onComplete:a=>{c(l3(a))},onClose:()=>t(!1),defaultQuery:o,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Qs,jsx as Xe,jsxs as pn}from"react/jsx-runtime";function yp(e){return String(e??"").includes(" ")?fn(e):wn(e)}function B3(e){let[d="00",g="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(d)?d:"00",minute:/^\d{2}$/.test(g)?g:"00"}}function ei({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Xe(El,{component:"span",sx:{color:"#9a9a97"},children:e})}var ir=e=>({gridColumn:`${e}`,[jn]:{gridColumn:"auto"}});function Ml({values:e,customTabs:d,avatarSrcByName:g,managerLocked:l=!1,notice:o=!1,event:s=!1,hideDueDate:r=!1,hideReminder:t=!1,beforeStart:n,pinColumns:c=!1,projectColumn:i=1,afterProject:a,readOnly:h=!1,targetSummary:f="",narrowCollapsedSx:u,reminderLocked:b=!1,managerAction:m,hideProject:v=!1,leading:k,supportOrigin:B,trailing:R,onChangeProject:L,onChangeStartDate:A,onChangeDueDate:D,onChangeReminder:N,onChangePriority:q,onChangeEventTime:j,onChangeEventPlace:S,onChangeEventAddress:T,onMemberEdit:P,onAddProject:p}){let[y,x]=Si(null),[w,_]=Si(!1),[C,O]=Si(null),[z,$]=Si(null),[V,M]=Si(null),[H,I]=Si(null),[E,F]=Si(null),U=jt(),Y=Kn(),G=c&&!s,W=(Z,re,ie=!1)=>[oo(Z),...ie&&u?Array.isArray(u)?u:[u]:[],...G&&re?[ir(re)]:[]],X=d.find(Z=>Z.key===e.tabKey),J=d.filter(Z=>!Z.archived),K=Z=>{let re=!!String(e.startDate??"").trim();if(A(Z),re||o||s)return;let ie=zc(Z);Number.isNaN(ie.getTime())||ie.getTime()<=Date.now()||S3("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")},ee=Xe(gt,{icon:Xe(x3,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:h||b?void 0:Z=>$(Z),sx:W(s?8:5,2,!0),children:e.reminders.length===0?Xe(ei,{label:"\uC5C6\uC74C"}):eu(e.reminders)});return pn(Qs,{children:[pn(El,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[jn]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[k,B?pn(Qs,{children:[pn(gt,{icon:Xe(T3,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:W(0,1),children:[B.licenseName||Xe(ei,{}),B.contactPhone?Xe(El,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:B.contactPhone}):null,B.contactEmail?Xe(El,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:B.contactEmail}):null]}),Xe(gt,{icon:Xe(C3,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:W(0,2),children:B.supportType||Xe(ei,{})})]}):null,v?null:Xe(gt,{icon:Xe(h3,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:h?void 0:Z=>x(Z),sx:G&&i==="full"?[W(1,void 0,!0),{gridColumn:"1 / -1"}]:W(1,i==="full"?1:i,!0),children:X?(()=>{let Z=Mt(X.icon);return pn(Qs,{children:[Z?Xe(Z,{sx:{fontSize:16,color:"#1e3a8a"}}):null,X.label]})})():"\uAE30\uBCF8"}),a,o?Xe(gt,{icon:Xe(bp,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:h?void 0:()=>P("targets"),sx:W(7,1),children:f||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!o&&!s?Xe(gt,{icon:Xe(g3,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:l||h||!e.managerName&&m?void 0:()=>P("manager"),sx:W(7,1),children:e.managerName?pn(Qs,{children:[Xe(Wr,{names:[e.managerName],size:20,avatarSrcByName:g}),e.managerName]}):m??Xe(ei,{})}):null,n,s?null:Xe(gt,{icon:Xe(p3,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC2DC",onClick:h?void 0:Z=>M(Z),sx:W(2,2),children:e.startDate?yp(e.startDate):Xe(ei,{})}),o?null:Xe(gt,{icon:Xe(bp,{sx:{fontSize:17}}),label:s?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:h?void 0:()=>P("receivers"),sx:W(s?7:8,1),children:e.receiverNames.length>0?pn(Qs,{children:[Xe(Wr,{names:e.receiverNames,size:20,avatarSrcByName:g}),e.receiverNames.length===1?e.receiverNames[0]:null]}):Xe(ei,{})}),r?null:Xe(gt,{icon:Xe(m3,{sx:{fontSize:17}}),label:s?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:h?void 0:Z=>I(Z),sx:W(3,2),children:e.dueDate?s?wn(e.dueDate):yp(e.dueDate):Xe(ei,{})}),s?Xe(gt,{icon:Xe(y3,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:h?void 0:Z=>F(Z),sx:oo(4),children:e.eventTime?e.eventTime:Xe(ei,{label:"\uC885\uC77C"})}):null,s?Xe(gt,{icon:Xe(w3,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:oo(5),children:Xe(Ro,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:h,onCommit:Z=>S?.(Z)})}):null,!t&&s?ee:null,s?Xe(gt,{icon:Xe(_3,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},oo(6)],children:Xe(gp,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:h,onCommit:Z=>T?.(Z)})}):null,s?null:Xe(gt,{icon:Xe(b3,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:h?void 0:Z=>O(Z),sx:W(6,1,!0),children:Xe(Hr,{priority:e.priority,small:!0})}),!t&&!s?ee:null,R]}),pn(Nu,{transitionDuration:0,anchorEl:y,open:!!y,onClose:()=>x(null),...Y,children:[pn(Js,{selected:!e.tabKey,onClick:()=>{L(""),x(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Xe(v3,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:Xe(Il,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),J.map(Z=>{let re=Mt(Z.icon),ie=e.tabKey===Z.key;return pn(Js,{selected:ie,onClick:()=>{L(Z.key),x(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[re?Xe(re,{sx:{fontSize:17,color:"#1e3a8a"}}):null,Z.label,ie?Xe(Il,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z.key)}),p?[Xe(u3,{},"add-project-divider"),pn(Js,{onClick:()=>_(!0),sx:{fontSize:14,color:"#787774"},children:[Xe(d3,{children:Xe(f3,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),p?Xe(cl,{open:w,onClose:()=>_(!1),onSubmit:(Z,re,ie)=>{(async()=>{let ne=await p(Z,re,ie);ne&&L(ne)})(),x(null)}}):null,Xe(Nu,{transitionDuration:0,anchorEl:C,open:!!C,onClose:()=>O(null),...Y,children:["high","medium","low"].map(Z=>pn(Js,{selected:e.priority===Z,onClick:()=>{q(Z),O(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[Xe(Hr,{priority:Z,small:!0}),e.priority===Z?Xe(Il,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z))}),Xe(Nu,{transitionDuration:0,anchorEl:z,open:!!z,onClose:()=>$(null),...Y,children:Qc(s?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(Z=>{let re=Z.value==="none"?e.reminders.length===0:e.reminders.includes(Z.value);return pn(Js,{selected:re,onClick:()=>{N(al(e.reminders,Z.value)),Z.value==="none"&&$(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[Z.label,re?Xe(Il,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z.value)})}),s?Xe(k3,{anchorEl:E,open:!!E,onClose:()=>F(null),value:B3(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:U,locale:"ko",onChange:(Z,re)=>{j?.(`${Z}:${re}`),F(null)}}):null,Xe(_n,{anchorEl:V,open:!!V,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:U,onClose:()=>M(null),onDateChange:K,onReminderChange:()=>{}}),Xe(_n,{anchorEl:H,open:!!H,date:e.dueDate,reminders:e.reminders,hideReminder:b||t,showTime:!s,centered:U,onClose:()=>I(null),onDateChange:D,onReminderChange:N})]})}import{useState as I3}from"react";import{Box as E3,Menu as M3,MenuItem as R3}from"@mui/material";import O3 from"@mui/icons-material/RepeatOutlined";import A3 from"@mui/icons-material/DevicesOutlined";import D3 from"@mui/icons-material/ScreenSearchDesktopOutlined";import P3 from"@mui/icons-material/SellOutlined";import N3 from"@mui/icons-material/TaskAltOutlined";import{Fragment as xp,jsx as Br,jsxs as vp}from"react/jsx-runtime";function Lu({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Br(E3,{component:"span",sx:{color:"#9a9a97"},children:e})}function Rl({values:e,readOnly:d=!1,showResolution:g=!1,onChangeRepro:l,onChangeDevice:o,onChangeWhere:s,onChangeVersion:r,onChangeResolution:t}){let[n,c]=I3(null),i=n?.field==="repro"?Ac:n?.field==="device"?Dc:Pc,a=h=>{n?.field==="repro"?l(h):n?.field==="device"?o(h):n?.field==="resolution"&&t?.(h),c(null)};return vp(xp,{children:[vp(xp,{children:[Br(gt,{icon:Br(O3,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:d?void 0:h=>c({field:"repro",el:h}),children:_f(e.repro)||Br(Lu,{label:"\uC120\uD0DD"})}),Br(gt,{icon:Br(A3,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:d?void 0:h=>c({field:"device",el:h}),children:kf(e.device)||Br(Lu,{label:"\uC120\uD0DD"})}),Br(gt,{icon:Br(D3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Br(Ro,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:d,onCommit:s})}),Br(gt,{icon:Br(P3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Br(Ro,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:d,onCommit:r})}),g?Br(gt,{icon:Br(N3,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:d?void 0:h=>c({field:"resolution",el:h}),children:$a(e.resolution)||Br(Lu,{label:"\uC120\uD0DD"})}):null]}),Br(M3,{open:!!n,anchorEl:n?.el??null,onClose:()=>c(null),transitionDuration:0,children:i.map(h=>Br(R3,{onClick:()=>a(h.key),sx:{fontSize:14},children:h.name},h.key))})]})}import{Box as wp}from"@mui/material";import{jsxs as _p}from"react/jsx-runtime";var zu=16;function Tn({icon:e,title:d,titleExtra:g,children:l}){return _p(wp,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[_p(wp,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:zu,fontWeight:500,color:"#37352f"},children:[e,d,g]}),l]})}import{useState as ju}from"react";import{Box as Fu,Button as L3,Divider as z3,IconButton as kp,Menu as j3,MenuItem as qu,Tooltip as F3}from"@mui/material";import q3 from"@mui/icons-material/MoreVert";import{ConfirmDialog as $3}from"@ehfuse/alerts";import{FormDialog as H3}from"@ehfuse/mui-form-dialog";import{ClearTextField as W3}from"@ehfuse/mui-form-controls";import{Fragment as U3,jsx as mn,jsxs as Ol}from"react/jsx-runtime";function Sp(e){return String(e??"").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim().length>0}function Al({content:e,templates:d,onApply:g,onSave:l,onRemove:o}){let[s,r]=ju(null),[t,n]=ju(!1),[c,i]=ju(""),a=async h=>{r(null),!(Sp(e)&&!await $3({title:"\uC591\uC2DD \uBD88\uB7EC\uC624\uAE30",message:`\uC9C0\uAE08 \uC4F4 \uB0B4\uC6A9\uC744 "${h.name}" \uC591\uC2DD\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uACC4\uC18D\uD560\uAE4C\uC694?`}))&&g(h.content)};return Ol(U3,{children:[mn(F3,{title:"\uBCF8\uBB38 \uC591\uC2DD",arrow:!0,disableInteractive:!0,children:mn(kp,{size:"small","aria-label":"\uBCF8\uBB38 \uC591\uC2DD",onClick:h=>r(h.currentTarget),sx:{ml:"auto",color:"#9a9a97"},children:mn(q3,{sx:{fontSize:18}})})}),Ol(j3,{anchorEl:s,open:!!s,onClose:()=>r(null),transitionDuration:0,children:[l?mn(qu,{disabled:!Sp(e),onClick:()=>{r(null),i(""),n(!0)},sx:{fontSize:14,minWidth:220},children:"\uD604\uC7AC \uB0B4\uC6A9\uC744 \uC591\uC2DD\uC73C\uB85C \uC800\uC7A5"}):null,l?mn(z3,{sx:{my:.5}}):null,d.length===0?mn(qu,{disabled:!0,sx:{fontSize:14,minWidth:220},children:"\uC800\uC7A5\uB41C \uC591\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}):d.map(h=>Ol(qu,{onClick:()=>{a(h)},sx:{fontSize:14,minWidth:220,gap:1},children:[mn(Fu,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),o?mn(kp,{size:"small","aria-label":`${h.name} \uC591\uC2DD \uC0AD\uC81C`,onClick:f=>{f.stopPropagation(),o(h.seq)},sx:{color:"#9a9a97"},children:mn(pr,{sx:{fontSize:16}})}):null]},h.seq))]}),mn(H3,{open:t,onClose:()=>n(!1),maxWidth:"xs",title:"\uC591\uC2DD\uC73C\uB85C \uC800\uC7A5",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,right:mn(L3,{variant:"contained",disabled:!c.trim(),onClick:()=>{l?.(c.trim(),e),n(!1)},children:"\uC800\uC7A5"})},sections:[{id:"template-name",title:"",showTitle:!1,children:Ol(Fu,{sx:{display:"flex",flexDirection:"column",gap:1},children:[mn(Fu,{sx:{fontSize:15,color:"#37352f"},children:"\uC9C0\uAE08 \uB0B4\uC6A9\uC744 \uC591\uC2DD\uC73C\uB85C \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB2E4\uC74C\uBD80\uD130 \uC774 \uC774\uB984\uC73C\uB85C \uAEBC\uB0B4 \uC4F8 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}),mn(W3,{size:"medium",fullWidth:!0,autoFocus:!0,placeholder:"\uC591\uC2DD \uC774\uB984 (\uC608: \uC624\uB958 \uC2E0\uACE0 \uC11C\uC2DD)",value:c,onChange:h=>i(h.target.value)})]})}]})]})}import{useEffect as $u,useRef as ti,useState as V3}from"react";import{Box as Hu,IconButton as K3,Tooltip as G3}from"@mui/material";import Y3 from"@mui/icons-material/ContentCopyOutlined";import X3 from"@mui/icons-material/Check";import{EhfuseEditor as Z3,ImageResizePlugin as J3,minimalToolbarOptions as Q3}from"@ehfuse/editor";import{jsx as Ti,jsxs as t5}from"react/jsx-runtime";function Wu(e){let d=e.trim();return d?d.startsWith("<")?e:`<p>${d}</p>`:"<p></p>"}function e5(e){let d=e.replace(/<br\s*\/?>/gi,`
33
+ \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>U(null),onConfirm:()=>{F&&B(F.column.key),U(null)}}),rt(nn,{open:!!y,anchorEl:y?.anchorEl??null,nextCompleted:y?.nextCompleted??!1,returnMode:!!P&&!!(w&&rn(w,p)),onCancel:()=>x(null),onConfirm:xe=>{y&&(xe&&P&&w?P(w,xe):o(y.taskSeq,y.nextCompleted)),x(null)}})]})}import{useCallback as ko,useMemo as Ws,useRef as Oh,useState as Us}from"react";import{Box as _r,Button as F2,ButtonBase as Dh,IconButton as Ah}from"@mui/material";import q2 from"@mui/icons-material/Add";import $2 from"@mui/icons-material/ChevronLeft";import H2 from"@mui/icons-material/ChevronRight";import W2 from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as U2}from"@ehfuse/mui-datetime-picker";import{DndContext as V2,DragOverlay as K2,PointerSensor as G2,pointerWithin as Y2,rectIntersection as X2,useDroppable as Z2,useSensor as J2,useSensors as Q2}from"@dnd-kit/core";import{SortableContext as ew,arrayMove as tw,useSortable as rw,verticalListSortingStrategy as nw}from"@dnd-kit/sortable";import{CSS as ow}from"@dnd-kit/utilities";import iw from"@ehfuse/overlay-scrollbar";function R2(e){let[d,g,l]=e.split("-").map(Number),o=new Date(Date.UTC(d,g-1,l+1)),s=r=>String(r).padStart(2,"0");return`${o.getUTCFullYear()}-${s(o.getUTCMonth()+1)}-${s(o.getUTCDate())}`}function Xi(e){let d=new Map;for(let g of e){let l=g.start_date;for(let o=0;o<62&&l<=g.end_date;o+=1){let s=d.get(l);s?s.push(g):d.set(l,[g]),l=R2(l)}}for(let g of d.values())g.sort((l,o)=>(l.time||"99:99").localeCompare(o.time||"99:99")||l.title.localeCompare(o.title));return d}function Zi(e){let d=String((e.is_event?e.event_time:e.due_date.slice(11,16)||e.estimated_time)??"").trim();return/^\d{1,2}:\d{2}$/.test(d)?d:""}function Ji(e,d){if(e.completed!==d.completed)return e.completed?1:-1;let g=Zi(e),l=Zi(d);if(!!g!=!!l)return g?-1:1;if(g&&l&&g!==l)return g<l?-1:1;let o=e.sort_no>0,s=d.sort_no>0;return o&&s?e.sort_no-d.sort_no:o!==s?o?-1:1:e.seq-d.seq}import{Box as gu,Tooltip as O2}from"@mui/material";import{jsx as bu,jsxs as A2}from"react/jsx-runtime";function Qi({event:e,small:d=!1}){let g=e.time?`${e.time} ${e.title}`:e.title,l=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",o=s=>{s.stopPropagation();let[r,t,n]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${r}/${t}/${n}`,"_blank")};return bu(O2,{title:`(${l}) ${g}`,arrow:!0,enterDelay:300,children:A2(gu,{onClick:o,onPointerDown:s=>s.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:d?.6:.8,borderRadius:.75,bgcolor:"#f1f1ef",color:"#37352f",fontSize:15,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,minWidth:0,maxWidth:"100%",cursor:"pointer","&:hover":{bgcolor:"#ececea"}},children:[bu(gu,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),bu(gu,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:g})]})})}import{useCallback as N2}from"react";import{Box as Xo,Checkbox as L2}from"@mui/material";import{useLayoutEffect as D2,useState as Mh}from"react";var xu=new WeakMap,yu=null;function P2(){return typeof ResizeObserver>"u"?null:(yu||(yu=new ResizeObserver(e=>{for(let d of e){let g=xu.get(d.target);if(!g)continue;let l=d.borderBoxSize?.[0]?.inlineSize??d.target.getBoundingClientRect().width;g(l)}})),yu)}function Rh(){let[e,d]=Mh(null),[g,l]=Mh(0);return D2(()=>{if(!e)return;l(e.getBoundingClientRect().width);let o=P2();if(o)return xu.set(e,s=>l(r=>Math.abs(r-s)<1?r:s)),o.observe(e),()=>{o.unobserve(e),xu.delete(e)}},[e]),{ref:d,width:g}}import{jsx as _o,jsxs as vu}from"react/jsx-runtime";var wu={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},es=15,z2=150,j2=3;function Zo({task:e,statusOptions:d,onOpenDetail:g,onContextMenu:l,isPreview:o=!1,isDragging:s=!1,isMine:r=!1,avatarSrcByName:t,showManagerAvatar:n=!1,onOpenMembers:c,setNodeRef:i,dragProps:a,trailing:h,showCheckbox:f=!1,onRequestToggleCompleted:u,showTime:b=!0,wrapTitle:m=!1}){let v=it(),k=v.mode==="dark",[B]=ji(e,d),R=String(e.manager_name??"").trim(),L=b?Zi(e):"",A=qi(e,bt().resolveTask),D=!e.completed&&!e.is_event&&!e.due_date.slice(0,10),N=e.is_notice||e.is_event?Mt(e.icon||(e.is_notice?lr:dr)):null,q=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<If(),{ref:j,width:S}=Rh(),T=S>0&&S<z2,P=T||m,p=N2(x=>{j(x),i?.(x)},[j,i]),y=n&&!r&&!T&&!!R;return vu(Xo,{ref:p,...a??{},onClick:x=>{x.stopPropagation(),g(e)},onContextMenu:l?x=>l(e,x):void 0,sx:{display:"flex",alignItems:P?"flex-start":"center",gap:.5,py:.6,px:1,flexShrink:0,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:B?k?zi(B.dot,v.chip.darkBgAlpha):B.bg:k?v.card.bg:v.colors.surfaceHover,color:B?k?v.chip.darkTextSource==="fg"?B.fg:B.dot:B.fg:v.colors.textPrimary,fontSize:es,fontWeight:k||e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:o?.5:s?.35:e.completed?.6:D?.75:1,border:o?`1px dashed ${v.colors.accent}`:"1px solid transparent",pointerEvents:o?"none":"auto",cursor:"pointer",touchAction:a?"none":"auto",overflow:"hidden","&:hover":{filter:"brightness(0.96)"},...q?{borderLeft:`3px solid ${v.colors.danger}`,pl:.75}:r?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[_o(Xo,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...P?{mt:"7px"}:{},bgcolor:wu[e.priority]??v.colors.accentOnSurface}}),f&&!T&&u?_o(L2,{size:"small",checked:e.completed,onPointerDown:x=>x.stopPropagation(),onClick:x=>x.stopPropagation(),onChange:(x,w)=>u({anchorEl:x.currentTarget,taskSeq:e.seq,nextCompleted:w}),sx:{p:0,flexShrink:0}}):null,N&&!T?_o(N,{sx:{fontSize:15,flexShrink:0,opacity:.75,...P?{mt:"3px"}:{}}}):null,vu(Xo,{sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",color:k?v.colors.textStrong:v.colors.textPrimary,...D&&!k?{color:v.colors.textSecondary}:{}},children:[T&&L?_o(Xo,{component:"span",sx:{lineHeight:1.35,fontSize:es-1,color:e.completed?v.colors.textPrimary:v.colors.danger},children:L}):null,vu(Xo,{component:"span",sx:{minWidth:0,overflow:"hidden",...P?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:j2,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!T&&L?_o(Xo,{component:"span",sx:{mr:.5,fontSize:es-1,color:e.completed?v.colors.textPrimary:v.colors.danger},children:L}):null,e.title,!T&&A?_o(Xo,{component:"span",sx:{ml:.5,fontSize:es-2,color:v.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:A}):null,!T&&(e.comment_count??e.comments?.length??0)>0?_o(Ko,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:v.colors.textMuted}}):null]})]}),h??null,!h&&y?_o(Xo,{component:"span",onClick:c?x=>{x.stopPropagation(),c(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:_o(vn,{src:t?.get(R)??"",name:R,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}import{jsx as Nt,jsxs as So}from"react/jsx-runtime";var Ph=36,sw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],bl="day-";function _u(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(d.getDate()-d.getDay()),d}function gl(e,d){let g=new Date(e);return g.setDate(g.getDate()+d),g}function aw(e){let d=e[0],g=e[e.length-1];return d.getMonth()===g.getMonth()?`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4`:d.getFullYear()===g.getFullYear()?`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4 - ${g.getMonth()+1}\uC6D4`:`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4 - ${g.getFullYear()}\uB144 ${g.getMonth()+1}\uC6D4`}function lw(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function cw({task:e,statusOptions:d,isMine:g,avatarSrcByName:l,onCardClick:o,onCardContextMenu:s,onRequestArchiveToggle:r,dragDisabled:t=!1}){let{attributes:n,listeners:c,setNodeRef:i,transform:a,transition:h,isDragging:f}=rw({id:String(e.seq),disabled:t});return Nt(Zo,{task:e,statusOptions:d,isMine:g,avatarSrcByName:l,showManagerAvatar:!0,wrapTitle:!0,onOpenDetail:u=>o?.(u),onContextMenu:s,showCheckbox:!0,onRequestToggleCompleted:r,isDragging:f,setNodeRef:i,dragProps:t?void 0:{...n,...c,style:{transform:ow.Translate.toString(a),transition:h}}})}function uw({dayKey:e,isToday:d,dayLabel:g,holidayName:l,tasks:o,googleEvents:s,statusOptions:r,onRequestArchiveToggle:t,onRequestReply:n,onAddSchedule:c,canAdd:i,onCardClick:a,onCardContextMenu:h,summary:f,myAccountSeq:u,avatarSrcByName:b,dragDisabled:m=!1}){let v=it(),{setNodeRef:k}=Z2({id:`${bl}${e}`,disabled:m});return So(_r,{ref:k,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:d?v.calendar.todayBg:v.calendar.cellBg},children:[So(_r,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:Ph,bgcolor:d?v.calendar.todayBg:v.calendar.dateBandBg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:[l?Nt(_r,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:v.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}):null,d?Nt(_r,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:v.colors.danger,color:v.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Nt(_r,{component:"span",sx:{fontSize:13.5,fontWeight:d?700:400,color:l?v.colors.danger:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary,flexShrink:0},children:g})]}),f?Nt(_r,{sx:{px:1,py:1,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:f}):null,Nt(_r,{sx:{flex:1,minHeight:0,bgcolor:d?v.calendar.todayBg:v.colors.surfaceSubtle},children:Nt(iw,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:So(_r,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[s.length>0?Nt(_r,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:s.map(B=>Nt(Qi,{event:B},B.uid))}):null,Nt(ew,{items:o.map(B=>String(B.seq)),strategy:nw,children:Nt(_r,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:o.length>0?.75:0},children:o.map(B=>Nt(cw,{task:B,statusOptions:r,isMine:u>0&&Number(B.manager_account_seq??0)===u,avatarSrcByName:b,onCardClick:a,onCardContextMenu:h,onRequestArchiveToggle:t,dragDisabled:m},B.seq))})}),Nt(_r,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...i?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:So(Dh,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${v.calendar.borderColor}`,bgcolor:v.calendar.cellBg,color:v.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:v.calendar.hoverBg}},children:[Nt(q2,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function Nh({tasks:e,googleEvents:d=[],statusOptions:g,fallbackToStartDate:l=!1,myAccountSeq:o=0,avatarSrcByName:s,todayStr:r,onToggleCompleted:t,onMoveTask:n,onRequestReply:c,onAddSchedule:i,canAdd:a=!0,disableDrag:h=!1,onOpenDetail:f,onTaskContextMenu:u,hideCompleted:b=!1,renderColumnSummary:m}){let v=it(),[k,B]=Us(()=>_u(new Date)),[R,L]=Us(null),{onReturnTask:A}=bt(),D=R?e.find(X=>X.seq===R.taskSeq):void 0,[N,q]=Us(null),[j,S]=Us(null),[T,P]=Us(null),p=Oh(!1),y=Ws(()=>Array.from({length:7},(X,J)=>gl(k,J)),[k]),x=Ws(()=>new Map(e.map(X=>[X.seq,X])),[e]),w=Ws(()=>[...new Set(y.map(X=>X.getFullYear()))],[y]),_=Yn(w),C=Q2(J2(G2,{activationConstraint:{distance:5}})),O=ko(X=>{let J=Y2(X),K=J.length>0?J:X2(X),ee=K.filter(Z=>!String(Z.id).startsWith(bl));return ee.length>0?ee:K},[]),z=Ws(()=>Xi(d),[d]),$=Ws(()=>{let X=new Map;for(let J of e){let K=J.due_date.slice(0,10)||(l?J.start_date.slice(0,10)||String(J.created_time??"").slice(0,10):"");if(!K)continue;let ee=X.get(K);ee?ee.push(J):X.set(K,[J])}for(let J of X.values())J.sort(Ji);return X},[e,l]),V=ko(X=>j?(j.get(X)??[]).map(J=>x.get(J)).filter(J=>!!J):$.get(X)??[],[j,x,$]),M=ko(X=>{let J=V(X);return b?J.filter(K=>!K.completed):J},[V,b]),H=ko(X=>{P(Number(X.active.id)),S(new Map(y.map(J=>{let K=Tr(J);return[K,($.get(K)??[]).map(ee=>ee.seq)]})))},[y,$]),I=ko((X,J)=>{if(X.startsWith(bl))return{day:X.slice(bl.length),overSeq:null};let K=Number(X);for(let[ee,Z]of J)if(Z.includes(K))return{day:ee,overSeq:K};return null},[]),E=ko(X=>{let{active:J,over:K}=X;K&&S(ee=>{if(!ee)return ee;let Z=Number(J.id),re=I(String(K.id),ee);if(!re)return ee;let ie=[...ee.entries()].find(([,ue])=>ue.includes(Z))?.[0];if(!ie||ie===re.day)return ee;let ne=new Map(ee);ne.set(ie,(ne.get(ie)??[]).filter(ue=>ue!==Z));let ae=[...ne.get(re.day)??[]],pe=ae.length;if(re.overSeq!==null){let ue=ae.indexOf(re.overSeq);ue!==-1&&(pe=ue)}return ae.splice(pe,0,Z),ne.set(re.day,ae),ne})},[I]),F=ko(X=>{let{active:J,over:K}=X,ee=j;if(S(null),P(null),p.current=!0,!ee||!K)return;let Z=Number(J.id),re=[...ee.entries()].find(([,ue])=>ue.includes(Z));if(!re)return;let[ie,ne]=re,ae=[...ne],pe=I(String(K.id),ee);if(pe&&pe.day===ie&&pe.overSeq!==null&&pe.overSeq!==Z){let ue=ae.indexOf(Z),ke=ae.indexOf(pe.overSeq);ue!==-1&&ke!==-1&&(ae=tw(ae,ue,ke))}n(Z,ie,ae)},[j,n,I]),U=ko(()=>{S(null),P(null),p.current=!0},[]),Y=ko(X=>{if(p.current){p.current=!1;return}f(X)},[f]),G=T!==null?x.get(T)??null:null,W=Oh(null);return So(_r,{onTouchStart:X=>{let J=X.touches[0];W.current=J?{x:J.clientX,y:J.clientY}:null},onTouchEnd:X=>{let J=W.current;W.current=null;let K=X.changedTouches[0];if(!J||!K||T!==null)return;let ee=K.clientX-J.x,Z=K.clientY-J.y;Math.abs(ee)<60||Math.abs(ee)<=Math.abs(Z)||B(gl(k,ee<0?7:-7))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${v.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[So(_r,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:v.calendar.bg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:[So(_r,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Nt(Ah,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>B(gl(k,-7)),children:Nt($2,{sx:{fontSize:24,color:v.colors.textSecondary}})}),Nt(F2,{size:"small",color:"inherit",onClick:()=>B(_u(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:v.mode==="dark"?400:500,color:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary},children:"\uC624\uB298"}),Nt(Ah,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>B(gl(k,7)),children:Nt(H2,{sx:{fontSize:24,color:v.colors.textSecondary}})})]}),So(Dh,{onClick:X=>q(X.currentTarget),sx:{ml:{xs:"auto",lg:0},display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:v.mode==="dark"?400:700,color:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary,"&:hover":{bgcolor:v.colors.surfaceHover}},children:[aw(y),Nt(W2,{sx:{fontSize:18,color:v.colors.textMuted}})]})]}),Nt(_r,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:v.calendar.headerBg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${v.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:y.map(X=>{let J=X.getDay(),K=_.has(Tr(X));return Nt(_r,{sx:{height:Ph,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:J===0||K?v.colors.danger:J===6?v.colors.accentOnSurface:v.colors.textSecondary},children:sw[J]},Tr(X))})}),Nt(_r,{sx:{flex:1,minHeight:0},children:So(V2,{sensors:C,collisionDetection:O,onDragStart:H,onDragOver:E,onDragEnd:F,onDragCancel:U,children:[Nt(_r,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${v.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:y.map(X=>{let J=Tr(X);return Nt(uw,{dayKey:J,isToday:J===r,dayLabel:lw(X),holidayName:_.get(J)??"",summary:m?.(J,V(J)),tasks:M(J),googleEvents:z.get(J)??[],statusOptions:g,onRequestArchiveToggle:L,onRequestReply:c,onAddSchedule:i,canAdd:a,onCardClick:Y,onCardContextMenu:u,myAccountSeq:o,avatarSrcByName:s,dragDisabled:h},J)})}),Nt(K2,{children:G?Nt(_r,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:Nt(Zo,{task:G,statusOptions:g,onOpenDetail:()=>{},isMine:o>0&&Number(G.manager_account_seq??0)===o})}):null})]})}),Nt(U2,{anchorEl:N,open:!!N,onClose:()=>q(null),selectedDate:k,onDateChange:X=>{B(_u(X)),q(null)}}),Nt(nn,{open:!!R,anchorEl:R?.anchorEl??null,nextCompleted:R?.nextCompleted??!1,returnMode:!!A&&!!(D&&rn(D,o)),onCancel:()=>L(null),onConfirm:X=>{R&&(X&&A&&D?A(D,X):t(R.taskSeq,R.nextCompleted)),L(null)}})]})}import{useCallback as Vs,useMemo as xi,useRef as dw,useState as Ks}from"react";import{Box as Ur,Button as fw,ButtonBase as zh,IconButton as Lh,Tooltip as hw}from"@mui/material";import pw from"@mui/icons-material/Add";import mw from"@mui/icons-material/ChevronLeft";import gw from"@mui/icons-material/ChevronRight";import bw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as yw}from"@ehfuse/mui-datetime-picker";import{DndContext as xw,DragOverlay as vw,PointerSensor as ww,pointerWithin as _w,rectIntersection as kw,useDraggable as Sw,useDroppable as jh,useSensor as Tw,useSensors as Cw}from"@dnd-kit/core";import Bw from"@ehfuse/overlay-scrollbar";import{jsx as Vt,jsxs as To}from"react/jsx-runtime";var Iw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],yl="mday-",xl="mchip-",Fh=36;function Ew(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(d.getDate()-d.getDay()),d}function vl(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(1),d}function Mw(e,d){let g=new Date(e);return g.setDate(g.getDate()+d),g}function ku(e,d){let g=vl(e);return g.setMonth(g.getMonth()+d),g}function Rw({task:e,statusOptions:d,isPreview:g=!1,isMine:l=!1,avatarSrcByName:o,onOpenDetail:s,onContextMenu:r,onRequestToggleCompleted:t,dragDisabled:n=!1}){let{attributes:c,listeners:i,setNodeRef:a,isDragging:h}=Sw({id:String(e.seq),disabled:g||n}),{setNodeRef:f}=jh({id:`${xl}${e.seq}`,disabled:g||n});return Vt(hw,{title:e.title,arrow:!0,enterDelay:400,children:Vt(Zo,{task:e,statusOptions:d,onOpenDetail:s,onContextMenu:r,showCheckbox:!!t,onRequestToggleCompleted:t,isPreview:g,isDragging:h,isMine:l,avatarSrcByName:o,showManagerAvatar:!0,wrapTitle:!0,setNodeRef:u=>{a(u),f(u)},dragProps:n?void 0:{...c,...i}})})}function Ow({dayKey:e,dayNumber:d,isToday:g,isOtherMonth:l,weekday:o,holidayName:s,tasks:r,googleEvents:t,statusOptions:n,previewSeq:c,myAccountSeq:i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:f,onTaskContextMenu:u,onAddSchedule:b,canAdd:m,dragDisabled:v=!1}){let k=it(),B=k.mode==="dark",{setNodeRef:R,isOver:L}=jh({id:`${yl}${e}`,disabled:v}),A=r,D=!!s||o===0;return To(Ur,{ref:R,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:L?k.colors.accentSoft:g?k.calendar.todayBg:l?k.calendar.otherMonthBg:k.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...m?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[To(Ur,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Fh,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:g?k.calendar.todayBg:k.calendar.dateBandBg,borderBottom:`1px solid ${k.calendar.borderColor}`},children:[s?Vt(Ur,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:k.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}):null,g?Vt(Ur,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:k.colors.danger,color:k.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Vt(Ur,{component:"span",sx:{fontSize:13.5,fontWeight:g?700:400,color:l?k.colors.textMuted:D?k.colors.danger:o===6?k.colors.accentOnSurface:B?k.colors.textStrong:k.colors.textPrimary,flexShrink:0},children:d})]}),t.map(N=>Vt(Qi,{event:N,small:!0},N.uid)),A.map(N=>Vt(Rw,{task:N,statusOptions:n,isPreview:N.seq===c,isMine:i>0&&Number(N.manager_account_seq??0)===i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:f,onContextMenu:u,dragDisabled:v},N.seq)),Vt(Ur,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:To(zh,{className:"taskbox-month-add",onClick:()=>b(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:.75,borderBottom:`1px dashed ${k.calendar.borderColor}`,bgcolor:k.calendar.cellBg,color:k.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:k.calendar.hoverBg}},children:[Vt(pw,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function qh({tasks:e,googleEvents:d=[],statusOptions:g,fallbackToStartDate:l=!1,myAccountSeq:o=0,avatarSrcByName:s,onToggleCompleted:r,todayStr:t,onMoveTask:n,onAddSchedule:c,canAdd:i=!0,disableDrag:a=!1,onOpenDetail:h,onTaskContextMenu:f}){let u=it(),b=u.mode==="dark",[m,v]=Ks(()=>vl(new Date)),[k,B]=Ks(null),[R,L]=Ks(null),[A,D]=Ks(null),[N,q]=Ks(null),j=xi(()=>{let F=Ew(m);return Array.from({length:42},(U,Y)=>Mw(F,Y))},[m]),S=xi(()=>new Map(e.map(F=>[F.seq,F])),[e]),T=xi(()=>Xi(d),[d]),P=xi(()=>[...new Set(j.map(F=>F.getFullYear()))],[j]),p=Yn(P),y=xi(()=>{let F=new Map;for(let U of e){let Y=U.due_date.slice(0,10)||(l?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!Y)continue;let G=F.get(Y);G?G.push(U):F.set(Y,[U])}for(let U of F.values())U.sort(Ji);return F},[e,l]),x=Cw(Tw(ww,{activationConstraint:{distance:5}})),w=Vs(F=>{let U=_w(F),Y=U.length>0?U:kw(F),G=Y.filter(W=>String(W.id).startsWith(xl));return G.length>0?G:Y.filter(W=>String(W.id).startsWith(yl))},[]),_=Vs(F=>{D(Number(F.active.id))},[]),C=Vs(F=>{q(F.over?String(F.over.id):null)},[]),O=xi(()=>{let F=new Map;for(let[U,Y]of y)for(let G of Y)F.set(G.seq,U);return F},[y]),z=A!==null?S.get(A)?.due_date.slice(0,10)??"":"",$=xi(()=>{if(A===null||!N)return null;if(N.startsWith(xl)){let F=Number(N.slice(xl.length)),U=O.get(F);if(!U)return null;let Y=(y.get(U)??[]).filter(W=>W.seq!==A),G=Y.findIndex(W=>W.seq===F);return{day:U,index:G===-1?Y.length:G}}if(N.startsWith(yl)){let F=N.slice(yl.length),U=(y.get(F)??[]).filter(Y=>Y.seq!==A);return{day:F,index:U.length}}return null},[A,O,N,y]),V=Vs(F=>{let U=y.get(F)??[];if(A===null||!$)return U;let Y=S.get(A);if(!Y)return U;let G=U.filter(W=>W.seq!==A);return F===$.day?[...G.slice(0,$.index),Y,...G.slice($.index)]:F===z?G:U},[A,z,$,S,y]),M=Vs(F=>{let U=A,Y=$;if(D(null),q(null),U===null||!Y)return;let G=(y.get(Y.day)??[]).filter(X=>X.seq!==U),W=[...G.slice(0,Y.index).map(X=>X.seq),U,...G.slice(Y.index).map(X=>X.seq)];n(U,Y.day,W)},[A,$,n,y]),H=A!==null?S.get(A)??null:null,I=`${m.getFullYear()}\uB144 ${m.getMonth()+1}\uC6D4`,E=dw(null);return To(Ur,{onTouchStart:F=>{let U=F.touches[0];E.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:F=>{let U=E.current;E.current=null;let Y=F.changedTouches[0];if(!U||!Y||A!==null)return;let G=Y.clientX-U.x,W=Y.clientY-U.y;Math.abs(G)<60||Math.abs(G)<=Math.abs(W)||v(ku(m,G<0?1:-1))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${u.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[To(Ur,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:u.calendar.bg,borderBottom:`1px solid ${u.calendar.borderColor}`,flexShrink:0},children:[To(Ur,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Vt(Lh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>v(ku(m,-1)),children:Vt(mw,{sx:{fontSize:24,color:u.colors.textSecondary}})}),Vt(fw,{size:"small",color:"inherit",onClick:()=>v(vl(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:u.mode==="dark"?400:500,color:u.mode==="dark"?u.colors.textStrong:u.colors.textPrimary},children:"\uC624\uB298"}),Vt(Lh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>v(ku(m,1)),children:Vt(gw,{sx:{fontSize:24,color:u.colors.textSecondary}})})]}),To(zh,{onClick:F=>B(F.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:u.mode==="dark"?400:700,color:u.mode==="dark"?u.colors.textStrong:u.colors.textPrimary,"&:hover":{bgcolor:u.colors.surfaceHover}},children:[I,Vt(bw,{sx:{fontSize:18,color:u.colors.textMuted}})]})]}),Vt(Ur,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:u.calendar.headerBg,borderBottom:`1px solid ${u.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${u.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:Iw.map((F,U)=>Vt(Ur,{sx:{height:Fh,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?u.colors.danger:U===6?u.colors.accentOnSurface:u.colors.textSecondary},children:F},F))}),Vt(Ur,{sx:{flex:1,minHeight:0},children:To(xw,{sensors:x,collisionDetection:w,onDragStart:_,onDragOver:C,onDragEnd:M,onDragCancel:()=>{D(null),q(null)},children:[Vt(Bw,{style:{height:"100%"},thumb:{width:8},children:Vt(Ur,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${u.calendar.borderColor}`,borderBottom:`1px solid ${u.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:j.map(F=>{let U=Tr(F);return Vt(Ow,{dayKey:U,dayNumber:F.getDate(),isToday:U===t,isOtherMonth:F.getMonth()!==m.getMonth(),weekday:F.getDay(),holidayName:p.get(U)??"",tasks:V(U),googleEvents:T.get(U)??[],statusOptions:g,previewSeq:$?.day===U?A:null,myAccountSeq:o,avatarSrcByName:s,onRequestToggleCompleted:r?L:void 0,onOpenDetail:h,onTaskContextMenu:f,onAddSchedule:c,canAdd:i,dragDisabled:a},U)})})}),Vt(vw,{children:H?To(Ur,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:u.calendar.cellBg,border:`1px solid ${u.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:es,fontWeight:500,color:u.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[Vt(Ur,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:wu[H.priority]}}),H.title]}):null})]})}),Vt(Pt,{open:!!R,anchorEl:R?.anchorEl??null,title:R?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:R?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>L(null),onConfirm:()=>{R&&r?.(R.taskSeq,R.nextCompleted),L(null)}}),Vt(yw,{anchorEl:k,open:!!k,onClose:()=>B(null),selectedDate:m,onDateChange:F=>{v(vl(F)),B(null)}})]})}import{useEffect as Pw,useMemo as Gs,useRef as Tu,useState as Cu}from"react";import{Box as Pr,Button as Nw,IconButton as Hh,useMediaQuery as Lw}from"@mui/material";import zw from"@mui/icons-material/ChevronLeft";import jw from"@mui/icons-material/ChevronRight";import Fw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as qw}from"@ehfuse/mui-datetime-picker";import{Box as Co,Button as Aw,Dialog as Dw}from"@mui/material";import{jsx as Bo,jsxs as Su}from"react/jsx-runtime";function $h({task:e,avatarSrcByName:d,onClose:g}){let l=it(),o=e?[{label:"\uCC45\uC784\uC790",names:[String(e.manager_name??"").trim()]},{label:"\uCC38\uC870\uC790",names:e.receiver_names??[]},{label:"\uC791\uC131\uC790",names:[String(e.created_by??"").trim()]}]:[];return Bo(Dw,{open:!!e,onClose:g,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:e?Su(Co,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:l.colors.surface},children:[Bo(Co,{sx:{fontSize:15.5,fontWeight:600,color:l.colors.textStrong,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title}),o.map(s=>{let r=s.names.filter(t=>!!t);return Su(Co,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[Bo(Co,{sx:{width:56,flexShrink:0,fontSize:13.5,color:l.colors.textSecondary,pt:.5},children:s.label}),Bo(Co,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:r.length===0?Bo(Co,{sx:{fontSize:14,color:l.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):r.map(t=>Su(Co,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Bo(vn,{src:d?.get(t)??"",name:t,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),Bo(Co,{sx:{fontSize:14.5,color:l.colors.textPrimary},children:t})]},`${s.label}-${t}`))})]},s.label)}),Bo(Co,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:Bo(Aw,{size:"small",color:"inherit",onClick:g,children:"\uB2EB\uAE30"})})]}):null})}import{jsx as Cr,jsxs as ro}from"react/jsx-runtime";var $w=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Wh(e){let d=e?.parentElement??null;for(;d;){let g=window.getComputedStyle(d);if(/(auto|scroll)/.test(g.overflowY)&&d.scrollHeight>d.clientHeight)return d;d=d.parentElement}return null}var Hw="(min-width:600px)";function Bu(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(1),d}function Uh(e){let d=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function Vh({tasks:e,googleEvents:d=[],statusOptions:g,todayStr:l,onOpenDetail:o,onAddSchedule:s,myAccountSeq:r=0,avatarSrcByName:t,fallbackToStartDate:n=!1}){let c=it(),i=Lw(Hw),[a,h]=Cu(()=>Bu(new Date)),[f,u]=Cu(!1),b=Gs(()=>{let T=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return Array.from({length:T},(P,p)=>{let y=new Date(a.getFullYear(),a.getMonth(),p+1);return{ymd:Uh(y),dayNumber:p+1,weekday:y.getDay()}})},[a]),m=Gs(()=>{let T=new Map;for(let P of e){let p=P.due_date.slice(0,10)||(n?P.start_date.slice(0,10)||String(P.created_time??"").slice(0,10):"");if(!p)continue;let y=T.get(p);y?y.push(P):T.set(p,[P])}for(let P of T.values())P.sort(Ji);return T},[e,n]),v=Gs(()=>n?e.filter(T=>!T.due_date.slice(0,10)&&!T.start_date.slice(0,10)&&!String(T.created_time??"").slice(0,10)).sort((T,P)=>T.completed!==P.completed?T.completed?1:-1:T.seq-P.seq):[],[e,n]),[k,B]=Cu(null),R=Gs(()=>Xi(d),[d]),L=Gs(()=>[a.getFullYear()],[a]),A=Yn(L),D=Tu(null),N=l.slice(0,7)===Uh(a).slice(0,7);Pw(()=>{if(!N)return;let T=()=>{let y=D.current,x=Wh(y);if(!x||!y)return;let w=y.getBoundingClientRect().top-x.getBoundingClientRect().top+x.scrollTop;x.scrollTop=Math.max(0,w-x.clientHeight/2+y.clientHeight/2)},P=setTimeout(T,100),p=setTimeout(T,400);return()=>{clearTimeout(P),clearTimeout(p)}},[N,a]);let q=Tu(null),j=Tu(null),S=T=>{h(p=>new Date(p.getFullYear(),p.getMonth()+T,1));let P=Wh(q.current);P&&P.scrollTo({top:0,behavior:"auto"})};return ro(Pr,{ref:q,onTouchStart:T=>{let P=T.touches[0];j.current=P?{x:P.clientX,y:P.clientY}:null},onTouchEnd:T=>{let P=j.current;j.current=null;let p=T.changedTouches[0];if(!P||!p)return;let y=p.clientX-P.x,x=p.clientY-P.y;Math.abs(y)<60||Math.abs(y)<=Math.abs(x)||S(y<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[ro(Pr,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[Cr(Hh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>S(-1),children:Cr(zw,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Cr(Nw,{size:"small",color:"inherit",onClick:()=>h(Bu(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),Cr(Hh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>S(1),children:Cr(jw,{sx:{fontSize:24,color:c.colors.textSecondary}})}),ro(Pr,{onClick:()=>u(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:c.mode==="dark"?400:700,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary,cursor:"pointer"},children:[a.getFullYear(),"\uB144 ",a.getMonth()+1,"\uC6D4",Cr(Fw,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),ro(Pr,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[v.length>0?ro(Pr,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[ro(Pr,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",Cr("br",{}),"\uC5C6\uC74C"]}),Cr(Pr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:v.map(T=>Cr(Zo,{task:T,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(T.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B},T.seq))})]}):null,b.map(({ymd:T,dayNumber:P,weekday:p})=>{let y=A.get(T)??"",x=T===l,w=!!y||p===0,_=m.get(T)??[],C=R.get(T)??[],O=_.length>0||C.length>0;return ro(Pr,{ref:x?D:void 0,onClick:s?()=>s(T):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:O?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`,...s?{cursor:"pointer"}:{}},children:[Cr(Pr,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:ro(Pr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[Cr(Pr,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:40,height:32,borderRadius:1,px:1.25,fontSize:22,fontWeight:500,color:x?c.colors.surface:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textPrimary,bgcolor:x?c.colors.accentOnSurface:"transparent"},children:P}),Cr(Pr,{component:"span",sx:{fontSize:13,color:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textSecondary},children:$w[p]})]})}),ro(Pr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[C.map(z=>Cr(Qi,{event:z},z.uid)),_.map(z=>{let $=Zi(z),V=Cr(Zo,{task:z,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(z.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B,showTime:!i,wrapTitle:!0},z.seq);return i?ro(Pr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Cr(Pr,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:$?z.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:$||"00:00"}),Cr(Pr,{sx:{flex:1,minWidth:0},children:V})]},z.seq):V})]})]},T)})]}),Cr($h,{task:k,avatarSrcByName:t,onClose:()=>B(null)}),Cr(qw,{open:f,centered:!0,monthOnly:!0,onClose:()=>u(!1),selectedDate:a,onDateChange:T=>{h(Bu(T)),u(!1)}})]})}import{useCallback as Kh,useEffect as Gh,useMemo as Iu,useRef as _l,useState as Ys}from"react";import{Box as ur,Tooltip as Zh}from"@mui/material";import Ww from"@ehfuse/overlay-scrollbar";import Uw from"@mui/icons-material/CheckCircle";import Vw from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as Kw,PointerSensor as Gw,closestCenter as Yw,useSensor as Xw,useSensors as Zw}from"@dnd-kit/core";import{SortableContext as Jw,arrayMove as Qw,useSortable as e_,verticalListSortingStrategy as t_}from"@dnd-kit/sortable";import r_ from"@mui/icons-material/DragIndicator";import{jsx as Zt,jsxs as Io}from"react/jsx-runtime";var Eu=36,n_=48,Yh=40,o_=24,i_=4,s_=14,Xh=36,a_=12.5,ts=220,l_={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function vi(e){let d=String(e??"").trim();if(!d)return null;let g=new Date(`${d}T00:00:00`);return Number.isNaN(g.getTime())?null:g}function wl(e,d){let g=new Date(e);return g.setDate(g.getDate()+d),g}function Mu(e,d){return Math.round((d.getTime()-e.getTime())/864e5)}function c_({task:e,dragHandle:d,onPointerDown:g,onClick:l}){let o=it(),s=_l(null),[r,t]=Ys("");return Zt(Zh,{title:r,arrow:!0,enterDelay:300,children:Io(ur,{onPointerDown:g,onClick:n=>l(e,n),onMouseEnter:()=>{let n=s.current;t(n&&n.scrollWidth>n.clientWidth?e.title:"")},sx:{width:ts,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:o.timeline.bg,borderRight:`1px solid ${o.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:o.mode==="dark"||e.completed?400:500,color:e.completed?o.colors.textMuted:o.mode==="dark"?o.colors.textStrong:o.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:o.colors.surfaceHover}},children:[d,Zt(ur,{ref:s,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function u_({id:e,showIndicator:d,children:g}){let l=it(),{attributes:o,listeners:s,setNodeRef:r}=e_({id:e});return Io(ur,{ref:r,sx:{position:"relative"},children:[d?Zt(ur,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:l.colors.accentOnSurface,zIndex:5}}):null,g({...o,...s})]})}function Jh({tasks:e,hideCompletedChecklist:d=!1,todayStr:g,onOpenDetail:l,onToggleChecklist:o,onReorderTasks:s,onTaskContextMenu:r}){let t=it(),[n,c]=Ys(null),i=Iu(()=>[...e].sort((x,w)=>{let _=(x.timeline_sort_no??0)>0,C=(w.timeline_sort_no??0)>0;if(_&&C)return(x.timeline_sort_no??0)-(w.timeline_sort_no??0);if(_!==C)return _?-1:1;let O=x.due_date||x.start_date,z=w.due_date||w.start_date;return O!==z?O<z?-1:1:x.seq-w.seq}),[e]),[a,h]=Ys(null),[f,u]=Ys(null),b=Zw(Xw(Gw,{activationConstraint:{distance:4}})),m=Kh(x=>{h(x.over?Number(x.over.id):null)},[]),v=Kh(x=>{h(null),u(null);let{active:w,over:_}=x;if(!_||w.id===_.id)return;let C=i.map($=>$.seq),O=C.indexOf(Number(w.id)),z=C.indexOf(Number(_.id));O===-1||z===-1||s(Qw(C,O,z))},[i,s]),k=Iu(()=>{let x=vi(g)??new Date,w=x,_=wl(x,21);for(let z of i){let $=vi(z.start_date)??vi(z.due_date),V=vi(z.due_date)??$;$&&$<w&&(w=$),V&&V>_&&(_=V)}let C=wl(w,-3),O=Mu(C,wl(_,3))+1;return Array.from({length:O},(z,$)=>wl(C,$))},[i,g]),B=k[0],R=k.findIndex(x=>Tr(x)===g),{dayWidths:L,dayOffsets:A,gridWidth:D}=Iu(()=>{let x=k.map((C,O)=>C.getDate()===1||O===0?n_:Eu),w=[],_=0;for(let C of x)w.push(_),_+=C;return{dayWidths:x,dayOffsets:w,gridWidth:_}},[k]),N=ts+D,q=_l(null),j=x=>{q.current={x:x.clientX,y:x.clientY}},S=(x,w)=>{let _=q.current;q.current=null,!(_&&(Math.abs(w.clientX-_.x)>5||Math.abs(w.clientY-_.y)>5))&&l(x)},T=_l(null),[P,p]=Ys(!1);Gh(()=>{let x=T.current?.getScrollContainer();if(!x)return;let w=()=>p(x.scrollHeight>x.clientHeight);w();let _=new ResizeObserver(w);return _.observe(x),()=>_.disconnect()},[i.length]);let y=_l(!1);return Gh(()=>{if(i.length===0||y.current)return;y.current=!0;let x=window.requestAnimationFrame(()=>{let w=T.current?.getScrollContainer();!w||R<0||(w.scrollLeft=Math.max(0,A[R]-Eu*3))});return()=>window.cancelAnimationFrame(x)},[i.length]),Io(ur,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${t.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:t.timeline.headerBg},children:[Zt(ur,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:Zt(Ww,{ref:T,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:Io(ur,{sx:{width:N,position:"relative",bgcolor:t.timeline.bg},children:[Io(ur,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:t.timeline.headerBg,borderBottom:`1px solid ${t.timeline.gridColor}`},children:[Zt(ur,{sx:{width:ts,height:Xh,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:t.timeline.headerBg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:t.colors.textSecondary},children:"\uC81C\uBAA9"}),k.map((x,w)=>{let _=x.getDay(),C=w===R,O=x.getDate()===1||w===0;return Zt(ur,{sx:{width:L[w],height:Xh,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:a_,fontWeight:C&&t.mode!=="dark"?700:400,color:C?t.timeline.bg:_===0?t.colors.danger:_===6?t.colors.accentOnSurface:t.colors.textSecondary,bgcolor:C?t.colors.danger:"transparent",borderRight:`1px solid ${t.timeline.gridColor}`,whiteSpace:"nowrap"},children:O?`${x.getMonth()+1}/${x.getDate()}`:x.getDate()},Tr(x))})]}),Zt(Kw,{sensors:b,collisionDetection:Yw,onDragStart:x=>u(Number(x.active.id)),onDragOver:m,onDragEnd:v,onDragCancel:()=>{h(null),u(null)},children:Zt(Jw,{items:i.map(x=>String(x.seq)),strategy:t_,children:Io(ur,{sx:{position:"relative"},children:[k.map((x,w)=>{let _=x.getDay(),C=w===R;return!C&&_!==0&&_!==6?null:Zt(ur,{sx:{position:"absolute",top:0,bottom:0,left:ts+A[w],width:L[w],bgcolor:C?"rgba(229,72,77,0.07)":t.colors.surfaceSubtle,zIndex:0}},`stripe-${Tr(x)}`)}),i.map((x,w)=>{let _=vi(x.start_date)??vi(x.due_date),C=vi(x.due_date)??_,O=_?Math.min(k.length-1,Math.max(0,Mu(B,_))):0,z=C?Math.min(k.length-1,Math.max(O,Mu(B,C))):O,$=l_[x.priority],V=ts+A[O]+2,M=A[z]+L[z]-A[O]-4,H=(x.checklist??[]).map((I,E)=>({entry:I,index:E})).filter(({entry:I})=>!d||!I.checked);return Zt(u_,{id:String(x.seq),showIndicator:a===x.seq&&f!==x.seq,children:I=>Io(ur,{sx:{borderBottom:w===i.length-1&&P?"none":`1px solid ${t.timeline.gridColor}`,position:"relative",zIndex:1,opacity:f===x.seq?.45:1},children:[Io(ur,{onContextMenu:E=>r(x,E),sx:{display:"flex",height:Yh,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[Zt(c_,{task:x,dragHandle:Zt(ur,{component:"span",className:"taskbox-timeline-handle",...I,onClick:E=>E.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:t.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:t.colors.accentOnSurface}},children:(()=>{let E=(x.is_notice||x.is_event?Mt(x.icon||(x.is_notice?lr:dr)):null)??r_;return Zt(E,{sx:{fontSize:17}})})()}),onPointerDown:j,onClick:S}),Zt(Zh,{title:`${x.title} (${x.start_date||"?"} ~ ${x.due_date||"?"})`,arrow:!0,enterDelay:300,children:Zt(ur,{onPointerDown:j,onClick:E=>S(x,E),sx:{position:"absolute",top:(Yh-20)/2,left:V,width:Math.max(Eu-4,M),height:20,borderRadius:1,bgcolor:$.bg,border:`1px solid ${$.border}`,opacity:x.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),H.map(({entry:E,index:F},U)=>Zt(ur,{sx:{display:"flex",height:o_,position:"relative",mt:U===0?`${i_}px`:0,mb:U===H.length-1?`${s_}px`:0},children:Zt(ur,{sx:{width:ts,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:t.timeline.bg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:E.checked?t.colors.textMuted:t.colors.textPrimary},children:Io(ur,{onClick:Y=>c({anchorEl:Y.currentTarget,taskSeq:x.seq,index:F,checked:!E.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[E.checked?Zt(Uw,{sx:{fontSize:17,color:t.colors.accentOnSurface,flexShrink:0}}):Zt(Vw,{sx:{fontSize:17,color:t.colors.textMuted,flexShrink:0}}),Zt(ur,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:E.checked?"line-through":"none"},children:E.label})]})})},`${x.seq}-check-${F}`))]})},x.seq)}),i.length===0?Zt(ur,{sx:{py:8,textAlign:"center",color:t.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),Zt(Pt,{open:!!n,anchorEl:n?.anchorEl??null,title:n?.checked?"\uC774 \uD560\uC77C\uC744 \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:n?.checked?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>c(null),onConfirm:()=>{n&&o(n.taskSeq,n.index,n.checked),c(null)}})]})}import{jsx as wi}from"react/jsx-runtime";function DD(e){switch(e.view){case"card":case"kanban":{let{view:d,...g}=e;return wi(mu,{...g,columnAxis:d==="kanban"?"status":"project"})}case"sprint":{let{view:d,...g}=e;return wi(mu,{...g,columnAxis:"sprint"})}case"calendar":{let{view:d,...g}=e;return wi(Nh,{...g})}case"month":{let{view:d,...g}=e;return wi(qh,{...g})}case"agenda":{let{view:d,...g}=e;return wi(Vh,{...g})}case"timeline":{let{view:d,...g}=e;return wi(Jh,{...g})}default:{let{view:d,...g}=e;return wi(dh,{...g})}}}var PD=["list","card","kanban","calendar","month","timeline"];import{Box as hn}from"@mui/material";import{Fragment as d_,jsx as _i,jsxs as no}from"react/jsx-runtime";function Qh(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let g=new Date(`${e}T00:00:00`),l=new Date(`${d}T00:00:00`);return Math.round((g.getTime()-l.getTime())/864e5)}function ep({tasks:e,todayStr:d,showProgress:g=!0,dday:l=null,workdaysLeft:o=null,showPoints:s=!0,showHours:r=!0,showOverdue:t=!0,showInfo:n=!0,inline:c=!1}){let i=it(),a=e.filter(D=>!D.archived),h=a.filter(D=>D.completed).length,f=a.length>0?Math.round(h/a.length*100):0,u=a.filter(D=>!D.completed&&!D.is_event&&!!D.due_date&&D.due_date.slice(0,10)<d).length,b=a.reduce((D,N)=>N.completed?D:D+(N.story_points??0),0),m=g?_i(hn,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:i.summary.gaugeHeight,borderRadius:3,bgcolor:i.summary.gaugeTrackColor},children:_i(hn,{sx:{height:"100%",borderRadius:3,width:`${f}%`,bgcolor:f>=100?i.summary.gaugeCompleteColor:i.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,v=g?no(hn,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:i.summary.textColor},children:[f,"%"]}):null,k={color:i.summary.numberColor,fontWeight:700,fontSize:c?15:14},B=a.length-h,R=no(d_,{children:[c?null:no("span",{children:["\uB0A8\uC740 ",_i(hn,{component:"span",sx:k,children:B}),"\uAC74"]}),t&&u>0?no(hn,{component:"span",sx:{color:i.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",_i(hn,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:u}),"\uAC74"]}):null,s&&b>0?no("span",{children:[_i(hn,{component:"span",sx:k,children:b}),"SP"]}):null]}),L=typeof o=="number"&&Number.isFinite(o)?no("span",{children:["\uADFC\uBB34\uC77C ",_i(hn,{component:"span",sx:k,children:o}),"\uC77C"]}):null,A=typeof l=="number"&&Number.isFinite(l)?_i(hn,{component:"span",sx:{ml:c?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:i.summary.overdueColor,color:i.colors.textInverse,lineHeight:1.6},children:l===0?"D-day":l>0?`D-${l}`:`D+${-l}`}):null;return c?no(hn,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:i.summary.textColor,whiteSpace:"nowrap",...i.summary.sx},children:[n?R:null,n?L:null,n?A:null,m,v]}):no(hn,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[g?no(hn,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,v]}):null,no(hn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:i.summary.textColor},children:[R,L,A]})]})}import{useMemo as h_}from"react";function f_(e){let d=String(e??"").trim();if(!d)return 0;let g=0,l=!1;for(let o of d.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let s=parseFloat(o[1]),r=o[2].toLowerCase();l=!0,r==="m"||r==="\uBD84"?g+=s/60:r==="d"||r==="\uC77C"?g+=s*8:g+=s}if(!l){let o=parseFloat(d);Number.isFinite(o)&&(g+=o)}return g}function $D(e){let d=Math.round(e*10)/10;return`${d%1===0?d.toFixed(0):d.toFixed(1)}\uC2DC\uAC04`}function tp(e,d,g){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return 0;let l=new Date(`${e}T00:00:00`),o=new Date(`${d}T00:00:00`);if(o<l||o.getTime()-l.getTime()>3660*864e5)return 0;let s=0;for(let r=new Date(l);r<=o;r.setDate(r.getDate()+1)){let t=r.getDay();if(t===0||t===6)continue;let n=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`;g.has(n)||(s+=1)}return s}function HD(e){return e.reduce((d,g)=>g.completed?d:d+f_(g.estimated_time),0)}import{jsx as p_}from"react/jsx-runtime";function YD({sprint:e,tasks:d,todayStr:g,...l}){let o=e.status==="closed"?null:Qh(e.end_date,g),s=o!==null&&o>=0,r=h_(()=>{if(!s)return[];let c=Number(g.slice(0,4)),i=Number(e.end_date.slice(0,4))||c,a=[];for(let h=c;h<=Math.max(c,i);h+=1)a.push(h);return a},[s,g,e.end_date]),t=Yn(r),n=s?tp(g,e.end_date,new Set(t.keys())):null;return p_(ep,{tasks:d,todayStr:g,dday:o,workdaysLeft:n,...l})}import{useEffect as S_,useRef as T_,useState as C_}from"react";import{Box as Ou}from"@mui/material";import{Children as m_}from"react";import{Box as Ru,CircularProgress as g_}from"@mui/material";import{jsx as kl}from"react/jsx-runtime";var rp={xs:2,md:3};function np(){return kl(Ru,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:kl(g_,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function op({children:e}){return kl(Ru,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:rp,pb:rp},children:m_.map(e,d=>d==null||d===!1?null:kl(Ru,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:d}))})}import{useState as v_}from"react";import{Box as Mo,Button as sp,Checkbox as w_,Typography as Jo}from"@mui/material";import ap from"@mui/icons-material/CheckCircle";import __ from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as x_,jsx as ip}from"react/jsx-runtime";var b_="taskbox-search-highlight";function y_(e,d){let g=d?.keyPrefix??"hl";return e.map((l,o)=>ip("span",{className:l.highlight?d?.highlightClassName??b_:d?.className,style:l.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:l.text},`${g}-${l.text}-${o}`))}function Sl({text:e,keyword:d,fallback:g="-",className:l,highlightClassName:o,keyPrefix:s}){let r=String(e??"").trim()||g,t=rl(r,d);return ip(x_,{children:y_(t,{className:l,highlightClassName:o,keyPrefix:s})})}import{jsx as St,jsxs as ki}from"react/jsx-runtime";var k_={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:Sr(12.5),fontWeight:500,lineHeight:1.4},Eo={fontSize:Sr(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function zn({label:e,children:d}){return ki(Mo,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[St(Mo,{sx:k_,children:e}),St(Mo,{sx:{...Eo,flex:1,pt:.2},children:d})]})}function lp({task:e,statusOptions:d,projectLabel:g,searchText:l,todayStr:o,dimCompleted:s=!0,onRequestToggleCompleted:r,onOpenDetail:t,onTaskContextMenu:n,targetSummary:c="",ackInfo:i,completeLocked:a=!1,unread:h=!1,noticeReadOnly:f=!1,onAckConfirm:u,onAckListClick:b,myManaged:m=!1}){let v=e.is_event?Ls(e):fr(e),k=String(e.due_date??"").slice(11,16),B=e.is_event?String(e.event_time??"").trim():/^\d{2}:\d{2}$/.test(k)?k:String(e.estimated_time??"").trim(),R=wn(e.start_date),L=wn(e.due_date),A=R&&B&&!L?`${R} ${B}`:R,D=L&&B?`${L} ${B}`:L,N=bt(),q=!e.is_notice&&e.completed&&!!e.review_pending&&!!N.onReviewDone&&(N.myAccountSeq??0)>0&&(e.author_account_seq??0)===(N.myAccountSeq??0),[j,S]=v_(null),T=!e.is_notice&&!e.is_event&&!String(e.due_date??"").trim(),P=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<o,p=(e.receiver_names??[]).filter(Boolean);return ki(Mo,{role:"button",tabIndex:0,onClick:()=>t(e),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),t(e))},onContextMenu:y=>n(e,y),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",opacity:T?.6:1,position:"relative"},children:[m?St(Mo,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,ki(Mo,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[e.is_event?(()=>{let y=Mt(e.icon||dr);return y?St(y,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!f&&!a?St(w_,{checked:e.completed,icon:St(__,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:St(ap,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:y=>y.stopPropagation(),onChange:(y,x)=>r({anchorEl:y.currentTarget,taskSeq:e.seq,nextCompleted:x}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{if(!e.is_notice)return null;let y=Mt(e.icon||lr);return y?St(y,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),St(Jo,{sx:{fontSize:Sr(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed&&s?"#9a9a97":T?"#5f5e5b":"#111827",textDecoration:e.completed&&s?"line-through":"none"},children:St(Sl,{text:e.title,keyword:l})}),h&&!e.completed?St(Mo,{component:"span",sx:{flexShrink:0,px:.55,fontSize:Sr(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),ki(Mo,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[St(zn,{label:v?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:ki(Mo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[v?St(Dt,{option:v,small:!0}):null,St(Hr,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?St(zn,{label:"\uB77C\uBCA8",children:St(Uo,{labelKeys:e.label_keys,labelOptions:d})}):null,g?St(zn,{label:"\uD504\uB85C\uC81D\uD2B8",children:St(Jo,{sx:Eo,children:g})}):null,A?St(zn,{label:"\uC2DC\uC791",children:St(Jo,{sx:Eo,children:A})}):null,D?St(zn,{label:"\uB9C8\uAC10",children:ki(Jo,{sx:{...Eo,color:P?"#e5484d":Eo.color,fontWeight:P?600:400},children:[D,P?" \xB7 \uC9C0\uC5F0":""]})}):null,q?ki(zn,{label:"\uAC80\uC218",children:[St(sp,{size:"small",variant:"contained",disableElevation:!0,onClick:y=>{y.stopPropagation(),S(y.currentTarget)},sx:{...Hi,py:0,fontSize:Sr(13)},children:"\uAC80\uC218\uC644\uB8CC"}),St(Ui,{anchorEl:j,onCancel:()=>S(null),onConfirm:()=>{N.onReviewDone?.(e),S(null)}})]}):null,e.is_notice?St(zn,{label:"\uB300\uC0C1\uC790",children:St(Jo,{sx:Eo,children:c||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,i?St(zn,{label:"\uD655\uC778",children:St(sp,{size:"small",variant:i.canAck?"contained":"outlined",color:"inherit",startIcon:i.acked?St(ap,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:y=>{y.stopPropagation(),i.canAck?u?.(e):b?.(e,y.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:Sr(13),...i.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:i.canAck?"\uD655\uC778":`${i.count}/${i.total}`})}):null,!e.is_notice&&e.manager_name?St(zn,{label:"\uCC45\uC784\uC790",children:St(Jo,{sx:Eo,children:St(Sl,{text:e.manager_name,keyword:l})})}):null,!e.is_notice&&p.length>0?St(zn,{label:"\uCC38\uC870\uC790",children:St(Jo,{sx:Eo,children:p.join(", ")})}):null,e.note?St(zn,{label:"\uBE44\uACE0",children:St(Jo,{sx:Eo,children:St(Sl,{text:e.note,keyword:l})})}):null]})]})}import{jsx as rs,jsxs as I_}from"react/jsx-runtime";function B_(e,d){if(e.completed||e.archived||d<=0)return;let g=Gi(e,d);if(g.canConfirm)return{count:g.count,total:g.total,acked:!1,canAck:!0,pendingNames:g.pendingNames}}function IP({tasks:e,statusOptions:d,customTabs:g,loading:l,dimCompleted:o=!0,searchText:s,todayStr:r,onToggleCompleted:t,onOpenDetail:n,onTaskContextMenu:c,getTargetSummary:i,getAckInfo:a,getNoticeReadOnly:h,isTaskUnread:f,getCompleteLocked:u,onAckConfirm:b,onAckListClick:m,onEndReached:v,myAccountSeq:k=0}){let B=new Map(g.map(q=>[q.key,q.label])),[R,L]=C_(null),{onReturnTask:A}=bt(),D=R?e.find(q=>q.seq===R.taskSeq):void 0,N=T_(null);return S_(()=>{let q=N.current;if(!v||!q)return;let j=new IntersectionObserver(S=>{S[0]?.isIntersecting&&v()});return j.observe(q),()=>j.disconnect()},[v,e.length]),e.length===0?l?rs(np,{}):rs(Ou,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):I_(Ou,{sx:{minWidth:0},children:[rs(op,{children:e.map(q=>rs(lp,{dimCompleted:o,myManaged:k>0&&!q.is_notice&&!q.is_event&&(q.manager_account_seq??0)===k,task:q,statusOptions:d,projectLabel:q.tab_key?B.get(q.tab_key)??"":"",searchText:s,todayStr:r,onRequestToggleCompleted:L,onOpenDetail:n,onTaskContextMenu:c,targetSummary:q.is_notice?i?.(q):void 0,ackInfo:q.is_notice?a?.(q):B_(q,k),noticeReadOnly:q.is_notice?h?.(q):!1,unread:f?.(q)??!1,completeLocked:u?.(q)??!1,onAckConfirm:b,onAckListClick:m},q.seq))}),v?rs(Ou,{ref:N,sx:{height:"1px"}}):null,rs(nn,{open:!!R,anchorEl:R?.anchorEl??null,nextCompleted:R?.nextCompleted??!1,returnMode:!!A&&!!(D&&rn(D,k)),onCancel:()=>L(null),onConfirm:q=>{R&&(q&&A&&D?A(D,q):t(R.taskSeq,R.nextCompleted)),L(null)}})]})}import{useState as Xs}from"react";import{Box as or,Checkbox as E_,Menu as M_,MenuItem as cp,Tooltip as R_}from"@mui/material";import O_ from"@mui/icons-material/CheckCircle";import A_ from"@mui/icons-material/CheckCircleOutlineOutlined";import D_ from"@mui/icons-material/NotesOutlined";import P_ from"@mui/icons-material/AutorenewOutlined";import N_ from"@mui/icons-material/CalendarTodayOutlined";import L_ from"@mui/icons-material/EventOutlined";import z_ from"@mui/icons-material/PersonOutlineOutlined";import j_ from"@mui/icons-material/PeopleAltOutlined";import F_ from"@mui/icons-material/StickyNote2Outlined";import{Fragment as H_,jsx as vt,jsxs as Qo}from"react/jsx-runtime";var Au={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:vt(D_,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:vt(z_,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:vt(j_,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:vt(P_,{sx:{fontSize:15}})},priority:{label:"\uC911\uC694\uB3C4",width:"88px",align:"center",icon:null},start_date:{label:"\uC2DC\uC791\uC77C\uC2DC",width:"110px",align:"center",icon:vt(N_,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:vt(L_,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:vt(F_,{sx:{fontSize:15}})}},q_=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],$_=new Set(["manager_name","status","due_date"]);function up(e){let d=String(e??"").trim();return d?d.slice(2,10).replaceAll("-","."):""}function rN(e,d){return d>0?e.filter(g=>!g.is_notice&&!g.completed&&!g.archived&&An(g)==="group"&&Number(g.visibility_group_seq??0)===d).sort((g,l)=>{let o=String(g.due_date??"").trim(),s=String(l.due_date??"").trim();return o!==s?o?s?o.localeCompare(s):-1:1:Number(g.seq)-Number(l.seq)}):[]}function nN({tasks:e,columns:d=q_,loading:g=!1,emptyText:l="\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",myAccountSeq:o=0,avatarSrcByName:s,managerCandidates:r=[],canAssignManager:t,onOpenDetail:n,onToggleCompleted:c,onChangeStatus:i,onChangeDueDate:a,onChangeReminder:h,onChangeManager:f,onClaimTask:u}){let b=it(),[m,v]=Xs(null),[k,B]=Xs(null),[R,L]=Xs(null),[A,D]=Xs(null),{onReturnTask:N}=bt(),[q,j]=Xs(null),S=d.map(p=>p.width??Au[p.id].width).join(" "),T=(p,y)=>vt(vn,{src:s?.get(p)??"",name:p,avatarSx:{width:y,height:y,fontSize:Math.round(y/2),flexShrink:0,borderRadius:"50%"},iconFontSize:Math.round(y*.6)}),P=(p,y)=>{let w=Au[p.id].align==="center";switch(p.id){case"completed":if(y.is_event){let _=Mt(y.icon||dr);return vt(or,{className:"cell",sx:{justifyContent:"center"},children:_?vt(_,{sx:{fontSize:19,color:y.icon_color||"#1e3a8a"}}):null},p.id)}return vt(or,{className:"cell",sx:{justifyContent:"center",...c?{"&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:vt(R_,{title:y.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:vt(E_,{checked:!!y.completed,icon:vt(A_,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:vt(O_,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:_=>D({anchorEl:_.currentTarget,task:y}),sx:{p:.5}})})},p.id);case"title":{let _=y.is_notice?Mt(y.icon||lr):null,C=y.icon_color||"#e5484d";return Qo(or,{className:"cell",onClick:()=>n(y),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[_?vt(_,{sx:{fontSize:18,flexShrink:0,color:C}}):null,vt(or,{component:"span",sx:{fontSize:14.5,fontWeight:b.table.rowTitleFontWeight,color:b.table.rowTitleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.title||"(\uC81C\uBAA9 \uC5C6\uC74C)"})]},p.id)}case"manager_name":{let _=t?t(y):!1,C=o>0&&Number(y.manager_account_seq??0)===o;return _&&f?Qo(or,{className:"cell",onClick:O=>L({anchorEl:O.currentTarget,task:y}),sx:{gap:.75,justifyContent:"center",cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[y.manager_name?T(y.manager_name,22):null,vt(or,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name||""})]},p.id):vt(or,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:y.manager_name?Qo(H_,{children:[T(y.manager_name,22),vt(or,{component:"span",sx:{fontSize:14,fontWeight:C?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name})]}):u?vt(Gn,{onClick:O=>j({anchorEl:O.currentTarget,taskSeq:Number(y.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},p.id)}case"receiver_names":return vt(or,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(y.receiver_names??[]).join(", ")},p.id);case"status":return vt(or,{className:"cell",onClick:i?_=>v({anchorEl:_.currentTarget,task:y}):void 0,sx:{py:.5,justifyContent:"center",...i?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:vt(Dt,{option:fr(y)})},p.id);case"priority":return vt(or,{className:"cell",sx:{justifyContent:"center"},children:vt(Hr,{priority:y.priority,plain:!0})},p.id);case"start_date":return vt(or,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:up(y.start_date)},p.id);case"due_date":return vt(or,{className:"cell",onClick:a?_=>B({anchorEl:_.currentTarget,taskSeq:Number(y.seq),date:String(y.due_date??"").slice(0,10),reminders:Xn(y)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...a?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:up(y.due_date)},p.id);case"note":return vt(or,{className:"cell",sx:{justifyContent:w?"center":"flex-start",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.note||""},p.id);default:return null}};return Qo(or,{sx:{border:`1px solid ${b.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:b.table.bg,color:b.table.rowColor},children:[vt(or,{sx:{display:"grid",gridTemplateColumns:S,borderBottom:`1px solid ${b.table.borderColor}`,bgcolor:b.table.headerBg,"& > *":{display:"flex",alignItems:"center",gap:.5,px:1,py:1,minWidth:0,fontSize:b.table.headerFontSize,whiteSpace:"nowrap",userSelect:"none",borderRight:`1px solid ${b.table.rowBorderColor}`},"& > *:first-of-type":{px:.5},"& > *:last-child":{borderRight:"none",pr:2}},children:d.map(p=>{let y=Au[p.id];return Qo(or,{sx:{justifyContent:y.align==="center"?"center":"flex-start",color:$_.has(p.id)?b.table.headerActiveColor:b.table.headerColor},children:[y.icon,p.label??y.label]},p.id)})}),g?vt(or,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?vt(or,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:l}):e.map((p,y)=>vt(or,{sx:{display:"grid",gridTemplateColumns:S,minHeight:44,fontSize:15,bgcolor:b.table.rowBg,borderTop:y===0?"none":`1px solid ${b.table.rowBorderColor}`,"&:hover":{bgcolor:b.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${b.table.rowBorderColor}`},"& > .cell:first-of-type":{px:.5},"& > .cell:last-child":{borderRight:"none",pr:2}},children:d.map(x=>P(x,p))},p.seq)),vt(Fi,{anchorEl:m?.anchorEl??null,value:String(m?.task.status??""),options:m?Ua(m.task):void 0,onSelect:p=>{m&&i?.(Number(m.task.seq),p),v(null)},onComplete:c&&m&&!m.task.completed&&!m.task.is_notice&&!m.task.is_event&&!m.task.is_bug?()=>c(m.task,!0):void 0,onClose:()=>v(null)}),Qo(M_,{anchorEl:R?.anchorEl??null,open:!!R,onClose:()=>L(null),transitionDuration:0,children:[Qo(cp,{onClick:()=>{R&&f?.(Number(R.task.seq),"",0),L(null)},sx:{fontSize:14,minWidth:170,gap:1,color:b.table.headerColor},children:[vt(or,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),r.map(p=>Qo(cp,{selected:Number(R?.task.manager_account_seq??0)===Number(p.account_seq??0),onClick:()=>{R&&f?.(Number(R.task.seq),p.name,Number(p.account_seq??0)),L(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[T(p.name,24),p.name,p.role_name?vt(or,{component:"span",sx:{color:b.table.headerColor,fontSize:13},children:p.role_name}):null]},p.seq))]}),vt(_n,{anchorEl:k?.anchorEl??null,open:!!k,date:k?.date??"",reminders:k?.reminders??[],hideReminder:!h,onClose:()=>B(null),onDateChange:p=>{k&&(a?.(k.taskSeq,p),B(y=>y?{...y,date:p}:null))},onReminderChange:p=>{k&&(h?.(k.taskSeq,p),B(y=>y?{...y,reminders:p}:null))}}),vt(nn,{open:!!A,anchorEl:A?.anchorEl??null,nextCompleted:!A?.task.completed,returnMode:!!N&&!!(A&&rn(A.task,o)),onCancel:()=>D(null),onConfirm:p=>{A&&(p&&N?N(A.task,p):c?.(A.task,!A.task.completed)),D(null)}}),vt(Pt,{open:!!q,anchorEl:q?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>j(null),onConfirm:()=>{q&&u?.(q.taskSeq),j(null)}})]})}var Zs=[{value:"daily",label:"\uB9E4\uC77C"},{value:"weekly",label:"\uB9E4\uC8FC"},{value:"monthly",label:"\uB9E4\uC6D4"},{value:"yearly",label:"\uB9E4\uB144"}];function Tl(e){return Zs.find(d=>d.value===e)?.label??"\uC5C6\uC74C"}function W_(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 Cl(e,d){let g=W_(e);if(!g)return"";let l=new Date(g);d==="daily"?l.setMonth(l.getMonth()+1):d==="weekly"?l.setMonth(l.getMonth()+3):d==="monthly"?l.setFullYear(l.getFullYear()+1):l.setFullYear(l.getFullYear()+3);let o=s=>String(s).padStart(2,"0");return`${l.getFullYear()}-${o(l.getMonth()+1)}-${o(l.getDate())}`}function U_(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function dp(e,d){let g=String(e??"").slice(0,10);if(!U_(g)||typeof d!="number"||!Number.isFinite(d))return"";let l=new Date(`${g}T12:00:00`);l.setDate(l.getDate()+Math.trunc(d));let o=l.getFullYear(),s=String(l.getMonth()+1).padStart(2,"0"),r=String(l.getDate()).padStart(2,"0");return`${o}-${s}-${r}`}function V_(e,d,g){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:dp(d,e.start_offset_days),due_date:dp(d,e.due_offset_days),priority:e.priority??"medium",label_keys:[...e.label_keys??[]],manager_account_seq:Number(e.manager_account_seq)||0,manager_name:String(e.manager_name??""),checklist:(e.checklist??[]).map(l=>String(l??"").trim()).filter(l=>l.length>0).map(l=>({label:l,checked:!1})),group_seq:g}}function fp(e,d){let g=Number(e.group_seq)||0;return(e.items??[]).map(l=>V_(l,d,g)).filter(l=>l.title.length>0)}function aN(e){return typeof e!="number"||!Number.isFinite(e)?"-":e===0?"\uAE30\uC900\uC77C":e>0?`\uAE30\uC900\uC77C +${Math.trunc(e)}\uC77C`:`\uAE30\uC900\uC77C ${Math.trunc(e)}\uC77C`}import{useEffect as x4,useRef as v4,useState as Vp}from"react";import{Box as Oo,Button as Qu,ButtonBase as w4,Divider as Kp,Drawer as _4,IconButton as k4,Tooltip as S4}from"@mui/material";import T4 from"@mui/icons-material/Close";import C4 from"@ehfuse/overlay-scrollbar";import{FormDialog as B4}from"@ehfuse/mui-form-dialog";import{useState as ra}from"react";import{Box as Ci,ButtonBase as l4,Divider as na,Menu as Xu,MenuItem as Zu,Tooltip as c4}from"@mui/material";import u4 from"@mui/icons-material/SubjectOutlined";import d4 from"@mui/icons-material/StickyNote2Outlined";import f4 from"@mui/icons-material/LabelOutlined";import h4 from"@mui/icons-material/DirectionsRunOutlined";import qp from"@mui/icons-material/LockOutlined";import $p from"@mui/icons-material/PublicOutlined";import Hp from"@mui/icons-material/Group";import p4 from"@mui/icons-material/Repeat";import m4 from"@mui/icons-material/EventOutlined";import g4 from"@mui/icons-material/SpeedOutlined";import{TextField as b4}from"@ehfuse/mui-form-controls";import{InfoAlert as Wp}from"@ehfuse/alerts";import{useState as Si}from"react";import{Box as El,Divider as d3,ListItemIcon as f3,Menu as Nu,MenuItem as Js}from"@mui/material";import h3 from"@mui/icons-material/Add";import Il from"@mui/icons-material/Check";import p3 from"@mui/icons-material/ViewKanbanOutlined";import m3 from"@mui/icons-material/CalendarTodayOutlined";import g3 from"@mui/icons-material/EventOutlined";import b3 from"@mui/icons-material/PersonOutlineOutlined";import bp from"@mui/icons-material/PeopleAltOutlined";import y3 from"@mui/icons-material/FlagOutlined";import x3 from"@mui/icons-material/TimerOutlined";import v3 from"@mui/icons-material/NotificationsNoneOutlined";import w3 from"@mui/icons-material/InboxOutlined";import _3 from"@mui/icons-material/PlaceOutlined";import k3 from"@mui/icons-material/MapOutlined";import{TimePicker as S3}from"@ehfuse/mui-datetime-picker";import{InfoAlert as T3}from"@ehfuse/alerts";var jn="@media (max-width: 719.95px)";function oo(e){return{[jn]:{order:e}}}import{useEffect as K_,useState as G_}from"react";import{Box as Y_}from"@mui/material";import{jsx as X_}from"react/jsx-runtime";function Ro({value:e,placeholder:d,readOnly:g,onCommit:l}){let o=it(),[s,r]=G_(e);return K_(()=>r(e),[e]),X_(Y_,{component:"input",spellCheck:!1,value:s,readOnly:g,placeholder:d,onChange:t=>r(t.target.value),onBlur:()=>{s.trim()!==e&&l(s.trim())},onKeyDown:t=>{t.key==="Enter"&&t.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:o.colors.textPrimary,caretColor:o.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as Du}from"@mui/material";import{jsx as Z_,jsxs as hp}from"react/jsx-runtime";function gt({icon:e,label:d,onClick:g,sx:l,children:o}){return hp(Du,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(l)?l:[l]],children:[hp(Du,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,d]}),Z_(Du,{onClick:g?s=>g(s.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:g?"pointer":"default","&:hover":g?{bgcolor:"#f2f2f0"}:void 0,[jn]:{py:.25}},children:o})]})}import C3 from"@mui/icons-material/StorefrontOutlined";import B3 from"@mui/icons-material/SupportAgentOutlined";import{Suspense as J_,lazy as Q_,useEffect as e3,useState as pp}from"react";import{Box as Pu,Dialog as t3,DialogContent as r3,DialogTitle as n3,IconButton as mp,Tooltip as o3}from"@mui/material";import i3 from"@mui/icons-material/Close";import s3 from"@mui/icons-material/Search";import{Fragment as u3,jsx as Fn,jsxs as Bl}from"react/jsx-runtime";function a3(e){return Fn(Pu,{sx:{p:3,fontSize:14,color:"#9a9a97"},children:"\uC8FC\uC18C \uAC80\uC0C9 \uBAA8\uB4C8(react-daum-postcode)\uC744 \uBD88\uB7EC\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC785\uB825\uD574 \uC8FC\uC138\uC694."})}var l3=Q_(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:a3})));function c3(e){if(e.addressType!=="R")return e.address;let d="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(d+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(d+=d!==""?`, ${e.buildingName}`:e.buildingName),d!==""?`${e.address} (${d})`:e.address}function gp({value:e,placeholder:d="\uC8FC\uC18C \uC785\uB825",readOnly:g,onCommit:l}){let[o,s]=pp(e),[r,t]=pp(!1),n=bt().slots?.addressSearch;e3(()=>s(e),[e]);let c=a=>{s(a),t(!1),a!==e&&l(a)};return Bl(u3,{children:[Bl(Pu,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[Fn(Pu,{component:"input",spellCheck:!1,value:o,readOnly:g,placeholder:d,onChange:a=>s(a.target.value),onBlur:()=>{r||o.trim()!==e&&l(o.trim())},onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),!g&&t(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),g?null:Fn(o3,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:Fn(mp,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>t(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:Fn(s3,{sx:{fontSize:17}})})})]}),n?Fn(n,{open:r,onComplete:c,onClose:()=>t(!1)}):Bl(t3,{open:r,onClose:()=>t(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[Bl(n3,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",Fn(mp,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>t(!1),size:"small",children:Fn(i3,{})})]}),Fn(r3,{style:{padding:0},dividers:!0,children:r?Fn(J_,{fallback:null,children:Fn(l3,{onComplete:a=>{c(c3(a))},onClose:()=>t(!1),defaultQuery:o,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Qs,jsx as Xe,jsxs as pn}from"react/jsx-runtime";function yp(e){return String(e??"").includes(" ")?fn(e):wn(e)}function I3(e){let[d="00",g="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(d)?d:"00",minute:/^\d{2}$/.test(g)?g:"00"}}function ei({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Xe(El,{component:"span",sx:{color:"#9a9a97"},children:e})}var ir=e=>({gridColumn:`${e}`,[jn]:{gridColumn:"auto"}});function Ml({values:e,customTabs:d,avatarSrcByName:g,managerLocked:l=!1,notice:o=!1,event:s=!1,hideDueDate:r=!1,hideReminder:t=!1,beforeStart:n,pinColumns:c=!1,projectColumn:i=1,afterProject:a,readOnly:h=!1,targetSummary:f="",narrowCollapsedSx:u,reminderLocked:b=!1,managerAction:m,hideProject:v=!1,leading:k,supportOrigin:B,trailing:R,onChangeProject:L,onChangeStartDate:A,onChangeDueDate:D,onChangeReminder:N,onChangePriority:q,onChangeEventTime:j,onChangeEventPlace:S,onChangeEventAddress:T,onMemberEdit:P,onAddProject:p}){let[y,x]=Si(null),[w,_]=Si(!1),[C,O]=Si(null),[z,$]=Si(null),[V,M]=Si(null),[H,I]=Si(null),[E,F]=Si(null),U=jt(),Y=Kn(),G=c&&!s,W=(Z,re,ie=!1)=>[oo(Z),...ie&&u?Array.isArray(u)?u:[u]:[],...G&&re?[ir(re)]:[]],X=d.find(Z=>Z.key===e.tabKey),J=d.filter(Z=>!Z.archived),K=Z=>{let re=!!String(e.startDate??"").trim();if(A(Z),re||o||s)return;let ie=zc(Z);Number.isNaN(ie.getTime())||ie.getTime()<=Date.now()||T3("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")},ee=Xe(gt,{icon:Xe(v3,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:h||b?void 0:Z=>$(Z),sx:W(s?8:5,2,!0),children:e.reminders.length===0?Xe(ei,{label:"\uC5C6\uC74C"}):eu(e.reminders)});return pn(Qs,{children:[pn(El,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[jn]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[k,B?pn(Qs,{children:[pn(gt,{icon:Xe(C3,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:W(0,1),children:[B.licenseName||Xe(ei,{}),B.contactPhone?Xe(El,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:B.contactPhone}):null,B.contactEmail?Xe(El,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:B.contactEmail}):null]}),Xe(gt,{icon:Xe(B3,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:W(0,2),children:B.supportType||Xe(ei,{})})]}):null,v?null:Xe(gt,{icon:Xe(p3,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:h?void 0:Z=>x(Z),sx:G&&i==="full"?[W(1,void 0,!0),{gridColumn:"1 / -1"}]:W(1,i==="full"?1:i,!0),children:X?(()=>{let Z=Mt(X.icon);return pn(Qs,{children:[Z?Xe(Z,{sx:{fontSize:16,color:"#1e3a8a"}}):null,X.label]})})():"\uAE30\uBCF8"}),a,o?Xe(gt,{icon:Xe(bp,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:h?void 0:()=>P("targets"),sx:W(7,1),children:f||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!o&&!s?Xe(gt,{icon:Xe(b3,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:l||h||!e.managerName&&m?void 0:()=>P("manager"),sx:W(7,1),children:e.managerName?pn(Qs,{children:[Xe(Wr,{names:[e.managerName],size:20,avatarSrcByName:g}),e.managerName]}):m??Xe(ei,{})}):null,n,s?null:Xe(gt,{icon:Xe(m3,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC2DC",onClick:h?void 0:Z=>M(Z),sx:W(2,2),children:e.startDate?yp(e.startDate):Xe(ei,{})}),o?null:Xe(gt,{icon:Xe(bp,{sx:{fontSize:17}}),label:s?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:h?void 0:()=>P("receivers"),sx:W(s?7:8,1),children:e.receiverNames.length>0?pn(Qs,{children:[Xe(Wr,{names:e.receiverNames,size:20,avatarSrcByName:g}),e.receiverNames.length===1?e.receiverNames[0]:null]}):Xe(ei,{})}),r?null:Xe(gt,{icon:Xe(g3,{sx:{fontSize:17}}),label:s?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:h?void 0:Z=>I(Z),sx:W(3,2),children:e.dueDate?s?wn(e.dueDate):yp(e.dueDate):Xe(ei,{})}),s?Xe(gt,{icon:Xe(x3,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:h?void 0:Z=>F(Z),sx:oo(4),children:e.eventTime?e.eventTime:Xe(ei,{label:"\uC885\uC77C"})}):null,s?Xe(gt,{icon:Xe(_3,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:oo(5),children:Xe(Ro,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:h,onCommit:Z=>S?.(Z)})}):null,!t&&s?ee:null,s?Xe(gt,{icon:Xe(k3,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},oo(6)],children:Xe(gp,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:h,onCommit:Z=>T?.(Z)})}):null,s?null:Xe(gt,{icon:Xe(y3,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:h?void 0:Z=>O(Z),sx:W(6,1,!0),children:Xe(Hr,{priority:e.priority,small:!0})}),!t&&!s?ee:null,R]}),pn(Nu,{transitionDuration:0,anchorEl:y,open:!!y,onClose:()=>x(null),...Y,children:[pn(Js,{selected:!e.tabKey,onClick:()=>{L(""),x(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Xe(w3,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:Xe(Il,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),J.map(Z=>{let re=Mt(Z.icon),ie=e.tabKey===Z.key;return pn(Js,{selected:ie,onClick:()=>{L(Z.key),x(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[re?Xe(re,{sx:{fontSize:17,color:"#1e3a8a"}}):null,Z.label,ie?Xe(Il,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z.key)}),p?[Xe(d3,{},"add-project-divider"),pn(Js,{onClick:()=>_(!0),sx:{fontSize:14,color:"#787774"},children:[Xe(f3,{children:Xe(h3,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),p?Xe(cl,{open:w,onClose:()=>_(!1),onSubmit:(Z,re,ie)=>{(async()=>{let ne=await p(Z,re,ie);ne&&L(ne)})(),x(null)}}):null,Xe(Nu,{transitionDuration:0,anchorEl:C,open:!!C,onClose:()=>O(null),...Y,children:["high","medium","low"].map(Z=>pn(Js,{selected:e.priority===Z,onClick:()=>{q(Z),O(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[Xe(Hr,{priority:Z,small:!0}),e.priority===Z?Xe(Il,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z))}),Xe(Nu,{transitionDuration:0,anchorEl:z,open:!!z,onClose:()=>$(null),...Y,children:Qc(s?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(Z=>{let re=Z.value==="none"?e.reminders.length===0:e.reminders.includes(Z.value);return pn(Js,{selected:re,onClick:()=>{N(al(e.reminders,Z.value)),Z.value==="none"&&$(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[Z.label,re?Xe(Il,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z.value)})}),s?Xe(S3,{anchorEl:E,open:!!E,onClose:()=>F(null),value:I3(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:U,locale:"ko",onChange:(Z,re)=>{j?.(`${Z}:${re}`),F(null)}}):null,Xe(_n,{anchorEl:V,open:!!V,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:U,onClose:()=>M(null),onDateChange:K,onReminderChange:()=>{}}),Xe(_n,{anchorEl:H,open:!!H,date:e.dueDate,reminders:e.reminders,hideReminder:b||t,showTime:!s,centered:U,onClose:()=>I(null),onDateChange:D,onReminderChange:N})]})}import{useState as E3}from"react";import{Box as M3,Menu as R3,MenuItem as O3}from"@mui/material";import A3 from"@mui/icons-material/RepeatOutlined";import D3 from"@mui/icons-material/DevicesOutlined";import P3 from"@mui/icons-material/ScreenSearchDesktopOutlined";import N3 from"@mui/icons-material/SellOutlined";import L3 from"@mui/icons-material/TaskAltOutlined";import{Fragment as xp,jsx as Br,jsxs as vp}from"react/jsx-runtime";function Lu({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Br(M3,{component:"span",sx:{color:"#9a9a97"},children:e})}function Rl({values:e,readOnly:d=!1,showResolution:g=!1,onChangeRepro:l,onChangeDevice:o,onChangeWhere:s,onChangeVersion:r,onChangeResolution:t}){let[n,c]=E3(null),i=n?.field==="repro"?Ac:n?.field==="device"?Dc:Pc,a=h=>{n?.field==="repro"?l(h):n?.field==="device"?o(h):n?.field==="resolution"&&t?.(h),c(null)};return vp(xp,{children:[vp(xp,{children:[Br(gt,{icon:Br(A3,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:d?void 0:h=>c({field:"repro",el:h}),children:_f(e.repro)||Br(Lu,{label:"\uC120\uD0DD"})}),Br(gt,{icon:Br(D3,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:d?void 0:h=>c({field:"device",el:h}),children:kf(e.device)||Br(Lu,{label:"\uC120\uD0DD"})}),Br(gt,{icon:Br(P3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Br(Ro,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:d,onCommit:s})}),Br(gt,{icon:Br(N3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Br(Ro,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:d,onCommit:r})}),g?Br(gt,{icon:Br(L3,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:d?void 0:h=>c({field:"resolution",el:h}),children:$a(e.resolution)||Br(Lu,{label:"\uC120\uD0DD"})}):null]}),Br(R3,{open:!!n,anchorEl:n?.el??null,onClose:()=>c(null),transitionDuration:0,children:i.map(h=>Br(O3,{onClick:()=>a(h.key),sx:{fontSize:14},children:h.name},h.key))})]})}import{Box as wp}from"@mui/material";import{jsxs as _p}from"react/jsx-runtime";var zu=16;function Tn({icon:e,title:d,titleExtra:g,children:l}){return _p(wp,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[_p(wp,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:zu,fontWeight:500,color:"#37352f"},children:[e,d,g]}),l]})}import{useState as ju}from"react";import{Box as Fu,Button as z3,Divider as j3,IconButton as kp,Menu as F3,MenuItem as qu,Tooltip as q3}from"@mui/material";import $3 from"@mui/icons-material/MoreVert";import{ConfirmDialog as H3}from"@ehfuse/alerts";import{FormDialog as W3}from"@ehfuse/mui-form-dialog";import{ClearTextField as U3}from"@ehfuse/mui-form-controls";import{Fragment as V3,jsx as mn,jsxs as Ol}from"react/jsx-runtime";function Sp(e){return String(e??"").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim().length>0}function Al({content:e,templates:d,onApply:g,onSave:l,onRemove:o}){let[s,r]=ju(null),[t,n]=ju(!1),[c,i]=ju(""),a=async h=>{r(null),!(Sp(e)&&!await H3({title:"\uC591\uC2DD \uBD88\uB7EC\uC624\uAE30",message:`\uC9C0\uAE08 \uC4F4 \uB0B4\uC6A9\uC744 "${h.name}" \uC591\uC2DD\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uACC4\uC18D\uD560\uAE4C\uC694?`}))&&g(h.content)};return Ol(V3,{children:[mn(q3,{title:"\uBCF8\uBB38 \uC591\uC2DD",arrow:!0,disableInteractive:!0,children:mn(kp,{size:"small","aria-label":"\uBCF8\uBB38 \uC591\uC2DD",onClick:h=>r(h.currentTarget),sx:{ml:"auto",color:"#9a9a97"},children:mn($3,{sx:{fontSize:18}})})}),Ol(F3,{anchorEl:s,open:!!s,onClose:()=>r(null),transitionDuration:0,children:[l?mn(qu,{disabled:!Sp(e),onClick:()=>{r(null),i(""),n(!0)},sx:{fontSize:14,minWidth:220},children:"\uD604\uC7AC \uB0B4\uC6A9\uC744 \uC591\uC2DD\uC73C\uB85C \uC800\uC7A5"}):null,l?mn(j3,{sx:{my:.5}}):null,d.length===0?mn(qu,{disabled:!0,sx:{fontSize:14,minWidth:220},children:"\uC800\uC7A5\uB41C \uC591\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}):d.map(h=>Ol(qu,{onClick:()=>{a(h)},sx:{fontSize:14,minWidth:220,gap:1},children:[mn(Fu,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),o?mn(kp,{size:"small","aria-label":`${h.name} \uC591\uC2DD \uC0AD\uC81C`,onClick:f=>{f.stopPropagation(),o(h.seq)},sx:{color:"#9a9a97"},children:mn(pr,{sx:{fontSize:16}})}):null]},h.seq))]}),mn(W3,{open:t,onClose:()=>n(!1),maxWidth:"xs",title:"\uC591\uC2DD\uC73C\uB85C \uC800\uC7A5",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,right:mn(z3,{variant:"contained",disabled:!c.trim(),onClick:()=>{l?.(c.trim(),e),n(!1)},children:"\uC800\uC7A5"})},sections:[{id:"template-name",title:"",showTitle:!1,children:Ol(Fu,{sx:{display:"flex",flexDirection:"column",gap:1},children:[mn(Fu,{sx:{fontSize:15,color:"#37352f"},children:"\uC9C0\uAE08 \uB0B4\uC6A9\uC744 \uC591\uC2DD\uC73C\uB85C \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB2E4\uC74C\uBD80\uD130 \uC774 \uC774\uB984\uC73C\uB85C \uAEBC\uB0B4 \uC4F8 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}),mn(U3,{size:"medium",fullWidth:!0,autoFocus:!0,placeholder:"\uC591\uC2DD \uC774\uB984 (\uC608: \uC624\uB958 \uC2E0\uACE0 \uC11C\uC2DD)",value:c,onChange:h=>i(h.target.value)})]})}]})]})}import{useEffect as $u,useRef as ti,useState as K3}from"react";import{Box as Hu,IconButton as G3,Tooltip as Y3}from"@mui/material";import X3 from"@mui/icons-material/ContentCopyOutlined";import Z3 from"@mui/icons-material/Check";import{EhfuseEditor as J3,ImageResizePlugin as Q3,minimalToolbarOptions as e5}from"@ehfuse/editor";import{jsx as Ti,jsxs as r5}from"react/jsx-runtime";function Wu(e){let d=e.trim();return d?d.startsWith("<")?e:`<p>${d}</p>`:"<p></p>"}function t5(e){let d=e.replace(/<br\s*\/?>/gi,`
34
34
  `).replace(/<\/(p|div|li|h[1-6]|blockquote)>/gi,`
35
35
  `),g=document.createElement("div");return g.innerHTML=d,(g.textContent??"").replace(/\n{3,}/g,`
36
36
 
37
- `).trim()}function Dl({syncKey:e,value:d,onChange:g,readOnly:l=!1,minHeight:o=180,height:s=0,onChangeHeight:r}){let{uploadContentImage:t}=bt(),n=ti(null),c=ti(new J3),i=ti(null),a=s>0?s:0,h=ti(a),f=ti(r);f.current=r;let u=ti(null),b=ti(Date.now()+800),[m,v]=V3(!1),k=jt();$u(()=>{if(l)return;let R=Wu(d);u.current===R||u.current===d||(u.current=R,b.current=Date.now()+800,n.current?.setHtml(R))},[e,d,l]);let B=ti(-1);return $u(()=>{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]),$u(()=>{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?t5(Hu,{sx:{position:"relative",mt:1},children:[Ti(Hu,{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:Wu(d)}}),Ti(G3,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Ti(K3,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(e5(d)).then(()=>{v(!0),window.setTimeout(()=>v(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:m?Ti(X3,{sx:{fontSize:17,color:"#2f9e5b"}}):Ti(Y3,{sx:{fontSize:17}})})})]}):Ti(Hu,{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:Ti(Z3,{ref:n,defaultValue:Wu(d),autoHeight:k,resizable:!k,showToolbar:!k,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Q3,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()<b.current,A=R===u.current;u.current=R,!(L||A)&&g(R)}})})}import{useState as ns}from"react";import{Box as mr,Button as Cp,Dialog as h5,IconButton as os,Switch as p5,TextField as m5,Tooltip as Vu}from"@mui/material";import{DndContext as g5,PointerSensor as b5,closestCenter as y5,useSensor as x5,useSensors as v5}from"@dnd-kit/core";import{restrictToParentElement as w5,restrictToVerticalAxis as _5}from"@dnd-kit/modifiers";import{SortableContext as k5,arrayMove as S5,useSortable as T5,verticalListSortingStrategy as C5}from"@dnd-kit/sortable";import{CSS as B5}from"@dnd-kit/utilities";import Bp from"@mui/icons-material/Close";import I5 from"@mui/icons-material/AddCircle";import Ip from"@mui/icons-material/AddTask";import E5 from"@mui/icons-material/Checklist";import M5 from"@mui/icons-material/CheckCircle";import R5 from"@mui/icons-material/DragIndicator";import O5 from"@mui/icons-material/Launch";import A5 from"@mui/icons-material/LinkOutlined";import D5 from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as r5,useMemo as n5,useState as Uu}from"react";import{Box as io,Button as o5,Tab as i5,Tabs as s5}from"@mui/material";import{FormDialog as a5}from"@ehfuse/mui-form-dialog";import{ClearTextField as l5}from"@ehfuse/mui-form-controls";import{ErrorAlert as c5}from"@ehfuse/alerts";import u5 from"@mui/icons-material/CheckCircle";import d5 from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as f5}from"@ehfuse/overlay-scrollbar";import{jsx as Nr,jsxs as Pl}from"react/jsx-runtime";var Tp=[{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 Nl({open:e,task:d,tasks:g,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=jt(),[a,h]=Uu("related"),[f,u]=Uu(""),[b,m]=Uu([]);r5(()=>{e&&(h("related"),u(""),m([]))},[e]);let v=n5(()=>{let A=new Set([d.seq,...l]),D=f.trim().toLowerCase();return g.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)},[g,d.seq,l,f]),k=()=>{if(b.length===0){c5("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let A of b)s(A,a);o()},B=A=>{m(D=>D.includes(A)?D.filter(N=>N!==A):c?[...D,A]:[A])},R=Tp.find(A=>A.type===a)?.hint??"",L=Pl(io,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i?"100%":"auto"},children:[r?null:Nr(s5,{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:Tp.map(A=>Nr(i5,{value:A.type,label:A.label},A.type))}),r?null:Nr(io,{sx:{mt:1,mb:1.5,fontSize:14,flexShrink:0},children:R}),Pl(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:[Nr(io,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Nr(l5,{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}}})}),Nr(io,{sx:{flex:1,minHeight:0},children:Nr(f5,{style:{height:"100%"},contentStyle:{paddingTop:0},children:Nr(io,{sx:{display:"flex",flexDirection:"column"},children:v.length===0?Nr(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."}):v.map(A=>{let D=A.is_notice||A.is_event?Mt(A.icon||(A.is_notice?lr:dr)):null,N=b.includes(A.seq);return Pl(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?Nr(u5,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):Nr(d5,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),D?Nr(D,{sx:{fontSize:17,flexShrink:0,color:A.icon_color||"#1e3a8a"}}):null,Pl(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]}),Nr(io,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:Nr(Dt,{option:fr(A)})})]},A.seq)})})})})]})]});return Nr(a5,{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:Nr(o5,{variant:"contained",disabled:b.length===0,onClick:k,children:n})}})}import{Fragment as L5,jsx as pt,jsxs as so}from"react/jsx-runtime";var Ep="taskbox.checklist.hideCompleted";function P5({id:e,children:d}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=T5({id:e});return pt(mr,{ref:o,sx:{transform:B5.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...g,...l},dragging:t})})}function N5({sortable:e,sensors:d,rowIds:g,onDragEnd:l,children:o}){let s=pt(mr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o});return e?pt(g5,{sensors:d,collisionDetection:y5,modifiers:[_5,w5],onDragEnd:l,children:pt(k5,{items:g,strategy:C5,children:s})}):s}function Ll({taskSeq:e,checklist:d,onAdd:g,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[b,m]=ns(""),[v,k]=ns(!1),[B,R]=ns(null),L=jt(),[A,D]=ns(null),[N,q]=ns(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?!Ff(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,x]=ns(()=>{try{return localStorage.getItem(Ep)==="1"}catch{return!1}}),w=H=>{x(H);try{localStorage.setItem(Ep,H?"1":"0")}catch{}},_=!!r&&!L&&!t,C=v5(x5(b5,{activationConstraint:{distance:5}})),O=(H,I)=>H.task_seq?`linked-${H.task_seq}`:`row-${I}`,z=d.map(O),$=z.filter((H,I)=>{let E=d[I];return T(E)?!1:!(y&&j(E))}),V=H=>{let{active:I,over:E}=H;if(!E||I.id===E.id)return;let F=z.indexOf(String(I.id)),U=z.indexOf(String(E.id));F<0||U<0||r?.(e,S5(d,F,U))},M=()=>{b.trim()&&(g(e,b),m(""))};return so(Tn,{icon:pt(E5,{sx:{fontSize:19,display:"block"}}),title:so(L5,{children:["\uD560\uC77C",d.length>0?so(mr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[p," / ",d.length]}):null]}),titleExtra:P.length>0?so(mr,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[pt(mr,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:pt(mr,{sx:{height:"100%",borderRadius:3,width:`${Math.round(p/P.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),p>0?so(mr,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[pt(p5,{size:"small",checked:y,onChange:(H,I)=>w(I)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[pt(N5,{sortable:_,sensors:C,rowIds:$,onDragEnd:V,children:d.map((H,I)=>{let E=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(mr,{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?pt(mr,{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:pt(R5,{sx:{fontSize:16}})}):null,pt(Vu,{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:pt(mr,{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?pt(M5,{sx:{fontSize:18,color:Y?"#a9c6ec":"#2f80ed"}}):pt(D5,{sx:{fontSize:18,color:Y?"#d6d5d1":"#9a9a97"}})})}),B?.index===I?pt(mr,{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}}):pt(mr,{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(mr,{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:[pt(O5,{sx:{fontSize:12}}),E?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!t&&!U&&n?pt(Vu,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:pt(os,{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:pt(Ip,{sx:{fontSize:16}})})}):null,t?null:pt(os,{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:pt(Bp,{sx:{fontSize:15}})})]});return _?pt(P5,{id:z[I],children:({handleProps:W})=>G(W)},z[I]):pt(mr,{children:G(null)},z[I])})}),so(mr,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[pt(mr,{component:"input",spellCheck:!1,value:b,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:H=>m(H.target.value),onKeyDown:H=>{H.key==="Enter"&&M()},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?pt(Vu,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:pt(os,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:H=>H.preventDefault(),onClick:()=>k(!0),sx:{flexShrink:0,color:"#9a9a97"},children:pt(A5,{sx:{fontSize:20}})})}):null,pt(os,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!b.trim(),onMouseDown:H=>H.preventDefault(),onClick:M,sx:{flexShrink:0,color:b.trim()?"#2f80ed":"#c9c8c5"},children:pt(I5,{sx:{fontSize:20}})})]}),i&&a&&h?pt(Nl,{open:v,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(E=>E.seq===H);h(e,H,String(I?.title??"").trim())}}):null,pt(Pt,{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)}}),pt(h5,{open:!!A,onClose:()=>D(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:so(mr,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[pt(mr,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),pt(m5,{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(mr,{sx:{display:"flex",alignItems:"center",gap:1},children:[!t&&n&&A&&!d[A.index]?.task_seq?pt(os,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{n(e,A.index,d[A.index]?.label??""),D(null)},sx:{color:"#57564f"},children:pt(Ip,{sx:{fontSize:20}})}):null,!t&&A?pt(os,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{o(e,A.index),D(null)},sx:{color:"#e5484d"},children:pt(Bp,{sx:{fontSize:19}})}):null,pt(mr,{sx:{flex:1}}),pt(Cp,{color:"inherit",onClick:()=>D(null),children:"\uCDE8\uC18C"}),pt(Cp,{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 H5,useState as W5}from"react";import{Box as ao,IconButton as U5}from"@mui/material";import V5 from"@mui/icons-material/Close";import Op from"@mui/icons-material/AttachFileOutlined";var z5=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"]),zl=e=>{let d=e?.split(".").pop()?.toLowerCase()??"";return z5.has(d)};import{LinearProgress as j5}from"@mui/material";import{Fragment as F5,jsx as $5,jsxs as q5}from"react/jsx-runtime";function Mp(e){let d=yo(),g=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&&(g??0)!==e?null:{index:r,total:o??0,queue:s??[]}}function Ku(){let d=yo().useValue("attachmentUpload.progress");return q5(F5,{children:[d??0,"%"]})}function Rp(){let d=yo().useValue("attachmentUpload.progress");return $5(j5,{variant:"determinate",value:d??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as K5,jsx as sn,jsxs as ea}from"react/jsx-runtime";function jl(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Fl={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function ql({taskSeq:e,attachments:d,onAdd:g,onRemove:l,removeLocked:o=!1,onPreview:s,onDownload:r}){let[t,n]=W5(!1),c=H5(null),i=jt(),a=Rs(),h=Ms(),f=Mp(e),u=e===0,b=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")},v=R=>f?R+1<f.index?"done":R+1===f.index?"uploading":"waiting":"waiting",k=(R,L,A,D={})=>ea(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:[ea(ao,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[sn(Op,{sx:{fontSize:16,color:"#9a9a97"}}),L,sn(ao,{component:"span",sx:{fontSize:12,color:D.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:A}),D.removeIndex!==void 0?sn(U5,{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:sn(V5,{sx:{fontSize:15}})}):null]}),D.uploading?sn(Rp,{}):null]},R),B=R=>{let L=zl(R.name);return sn(ao,{component:"button",type:"button",onClick:()=>L?b(R):m(R),title:`${R.name} ${L?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Fl,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 ea(Tn,{icon:sn(Op,{sx:{fontSize:18,display:"block"}}),title:ea(K5,{children:["\uD30C\uC77C ",d.length>0?d.length:""]}),children:[ea(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=v(L),N=D==="uploading";return k(A,sn(ao,{component:"span",sx:{...Fl,color:D==="done"?"#37352f":"#9a9a97"},children:R.name}),N?sn(Ku,{}):jl(R.size),{uploading:N,removeIndex:!o&&!f?L:void 0})}return R.uuid?k(A,B(R),jl(R.size),{removeIndex:o?void 0:L}):k(A,sn(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:{...Fl,color:"#9a9a97"},children:R.name}),jl(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}`,sn(ao,{component:"span",sx:{...Fl,color:"#9a9a97"},children:R.name}),A?sn(Ku,{}):jl(R.size),{uploading:A})}):null]}),sn(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&&g(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)`}),sn(ao,{component:"input",ref:c,type:"file",multiple:!0,onChange:R=>{let L=Array.from(R.target.files??[]);L.length>0&&g(e,L),R.target.value=""},sx:{display:"none"}})]})}import{useState as e4}from"react";import{Checkbox as t4,Divider as r4,ListItemIcon as n4,Menu as o4,MenuItem as Np}from"@mui/material";import i4 from"@mui/icons-material/Add";import{useEffect as G5,useState as Ap}from"react";import{Box as Gu,Button as Y5}from"@mui/material";import{FormDialog as X5}from"@ehfuse/mui-form-dialog";import{ClearTextField as Z5}from"@ehfuse/mui-form-controls";import{ColorPicker as J5}from"@ehfuse/mui-color-picker";import{ErrorAlert as Q5}from"@ehfuse/alerts";import{jsx as ta,jsxs as Yu}from"react/jsx-runtime";var Dp="#2f80ed";function Pp({open:e,onClose:d,onSubmit:g}){let[l,o]=Ap(""),[s,r]=Ap(Dp);G5(()=>{e&&(o(""),r(Dp))},[e]);let t=()=>{let i=l.trim();if(!i){Q5("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(i,s),d()},n=Tf(s),c=Yu(Gu,{children:[Yu(Gu,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[ta(Z5,{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}),ta(J5,{value:s,onChange:i=>r(i),shape:"circle",colorSize:28})]}),Yu(Gu,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",ta(Dt,{option:{key:"__preview__",name:l.trim()||"\uB77C\uBCA8",...n}})]})]});return ta(X5,{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:ta(Y5,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}import{Fragment as s4,jsx as is,jsxs as $l}from"react/jsx-runtime";function Hl({anchorEl:e,selectedKeys:d,labelOptions:g,onToggle:l,onAddLabel:o,onClose:s}){let[r,t]=e4(!1),n=Kn();return $l(s4,{children:[$l(o4,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...n,children:[g.map(c=>{let i=d.includes(c.key);return $l(Np,{onClick:()=>l(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[is(t4,{size:"small",checked:i,sx:{p:0}}),is(Dt,{option:c})]},c.key)}),is(r4,{}),$l(Np,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[is(n4,{children:is(i4,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),is(Pp,{open:r,onClose:()=>t(!1),onSubmit:o})]})}function Lp(e,d){let g=Number(e.author_account_seq??0);return d.filter(l=>{let o=Number(l.account_seq??0);return o>0&&o!==g})}function zp(e,d){let g=(e.target_account_seqs??[]).filter(a=>a>0);if(g.length===0)return null;let l=new Set(g),o=Lp(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 g.forEach((a,h)=>{t.has(a)||i.push(n.get(a)??c[h]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:r,individualNames:i}}function Wl(e,d){let g=zp(e,d);return g?[...g.teamNames,...g.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function rj(e,d){let g=zp(e,d);return g?{kind:"members",teamNames:g.teamNames,individualNames:g.individualNames}:{kind:"everyone"}}function jp(e,d,g){let l=(e.target_account_seqs??[]).filter(f=>f>0),o=Lp(e,d),s=l.length>0?l.length:o.length,r=e.acks??[],t=g>0&&r.some(f=>f.account_seq===g),n=g>0&&Number(e.author_account_seq??0)===g,c=l.length===0||l.includes(g),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:g>0&&!n&&c&&!t&&!e.completed}}function Fp(e,d){let g=Number(d)||50,l=g*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 ${g}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
38
- \uC81C\uC678\uB41C \uD30C\uC77C: ${o.map(t=>t.name).join(", ")}`:null;return{accepted:s,rejected:o,message:r}}import{DatePicker as b4}from"@ehfuse/mui-datetime-picker";import{Fragment as oa,jsx as st,jsxs as Bi}from"react/jsx-runtime";var Up="#0f9d58";function Ju({form:e,statusOptions:d,customTabs:g,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:b,onAddLabelOption:m,contentSyncKey:v="create",contentTemplates:k,onSaveContentTemplate:B,onRemoveContentTemplate:R}){let L=yo(),A=Rs(),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")??"",x=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"),M=e.useFormValue("checklist")??[],H=e.useFormValue("tab_key"),I=e.useFormValue("sprint_seq")??0,E=e.useFormValue("story_points")??0,F=g.find(oe=>oe.key===H&&oe.useSprints),U=F?l.filter(oe=>`custom-${oe.group_seq}`===H):[],[Y,G]=ra(null),W=e.useFormValue("label_keys"),[X,J]=ra(null),K=e.useFormValue("visibility")||"involved",ee=Number(e.useFormValue("visibility_group_seq")??0),[Z,re]=ra(null),ie=e.useFormValue("repeat_rule")||"",ne=e.useFormValue("repeat_until")||"",[ae,pe]=ra(null),[ue,ke]=ra(null),Ne=e.useFormValue("target_names"),Ce=e.useFormValue("target_account_seqs"),nt=L.useValue("createAttachmentFiles")??[],me=s?Wl({author_account_seq:a,target_names:Ne,target_account_seqs:Ce},i):"";return Bi(oa,{children:[n,s?null:st(Ci,{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(oe=>{let Ie=S?"bug":j?"event":"task",ve=Ie===oe.value;return st(a4,{onClick:()=>{if(Ie===oe.value)return;e.setFormValue("is_event",oe.value==="event"),e.setFormValue("is_bug",oe.value==="bug"),e.setFormValue("visibility",oe.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),oe.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let we=e.getFormValue("icon"),be=e.getFormValue("icon_color"),Me=[bo,"event",Os].includes(we),Fe=!be||be===Up||be===As;Me&&e.setFormValue("icon",oe.value==="event"?"event":oe.value==="bug"?Os:bo),Fe&&e.setFormValue("icon_color",oe.value==="event"?Up:oe.value==="bug"?As:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:ve?600:400,color:ve?"#ffffff":"#787774",bgcolor:ve?"#2563eb":"#f4f4f2"},children:oe.label},oe.label)})}),st(na,{sx:{borderColor:"#e6e6e3"}}),Bi(Ci,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[st(Ml,{hideProject:r,hideDueDate:!j&&!!ie,hideReminder:!!ie,values:{tabKey:H,managerName:D,receiverNames:N,startDate:q,dueDate:C,reminders:O,priority:z,eventTime:x,eventPlace:w,eventAddress:_},customTabs:g,avatarSrcByName:o,notice:s,event:j,onChangeEventTime:oe=>e.setFormValue("event_time",oe),onChangeEventPlace:oe=>e.setFormValue("event_place",oe),onChangeEventAddress:oe=>e.setFormValue("event_address",oe),targetSummary:me,onChangeProject:oe=>e.setFormValue("tab_key",oe),onAddProject:b,onChangeStartDate:oe=>e.setFormValue("start_date",oe),onChangeDueDate:oe=>e.setFormValue("due_date",oe),onChangeReminder:oe=>e.setFormValue("reminders",oe),onChangePriority:oe=>e.setFormValue("priority",oe),onMemberEdit:u,pinColumns:!0,beforeStart:Bi(oa,{children:[!s&&!S?st(gt,{icon:st(h4,{sx:{fontSize:17,...ie?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:oe=>pe(oe),sx:j?void 0:ir(2),children:ie?Tl(ie):st(Ci,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!s&&!S&&ie?st(gt,{icon:st(p4,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:oe=>ke(oe),sx:j?void 0:ir(2),children:ne?wn(ne):st(Ci,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:Bi(oa,{children:[s?null:st(gt,{icon:K==="all"?st($p,{sx:{fontSize:17,color:"#2f80ed"}}):K==="group"?st(Hp,{sx:{fontSize:17,color:"#d9730d"}}):st(qp,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:oe=>re(oe),sx:j?void 0:ir(1),children:K==="all"?"\uC804\uCCB4\uACF5\uAC1C":K==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${h.find(oe=>oe.seq===ee)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),F&&!j&&!s?Bi(oa,{children:[st(gt,{icon:st(f4,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:oe=>G(oe),sx:ir(1),children:I>0?U.find(oe=>oe.seq===I)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":st(Ci,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),st(gt,{icon:st(m4,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:ir(1),children:st(Ro,{value:E>0?String(E):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:oe=>e.setFormValue("story_points",Number(oe.replace(/[^0-9.]/g,""))||0)})})]}):null,S?st(Rl,{values:{repro:T,device:P,where:p,version:y},onChangeRepro:oe=>e.setFormValue("bug_repro",oe),onChangeDevice:oe=>e.setFormValue("bug_device",oe),onChangeWhere:oe=>e.setFormValue("bug_where",oe),onChangeVersion:oe=>e.setFormValue("bug_version",oe)}):null]}),leading:j||c?null:st(Ci,{sx:{gridColumn:"1 / -1"},children:st(gt,{icon:st(d4,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:oe=>J(oe),children:(W??[]).length>0?st(Uo,{labelKeys:W??[],labelOptions:d}):st(Ci,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),st(na,{sx:{my:1.5,borderColor:"#e6e6e3"}}),st(Tn,{icon:st(c4,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:k?st(Al,{content:$,templates:k,onApply:oe=>e.setFormValue("content",oe),onSave:B,onRemove:R}):void 0,children:st(Dl,{syncKey:v,value:$,onChange:oe=>e.setFormValue("content",oe)})}),j?null:st(na,{sx:{my:1.5,borderColor:"#e6e6e3"}}),j?null:st(Ll,{taskSeq:0,checklist:M,onAdd:(oe,Ie)=>e.setFormValue("checklist",[...M,{label:Ie,checked:!1}]),onToggle:(oe,Ie,ve)=>e.setFormValue("checklist",M.map((we,be)=>be===Ie?{...we,checked:ve}:we)),onRemove:(oe,Ie)=>e.setFormValue("checklist",M.filter((ve,we)=>we!==Ie)),onUpdate:(oe,Ie,ve)=>e.setFormValue("checklist",M.map((we,be)=>be===Ie?{...we,label:ve}:we))}),st(na,{sx:{my:1.5,borderColor:"#e6e6e3"}}),st(ql,{taskSeq:0,attachments:nt.map(oe=>({name:oe.name,size:oe.size})),onAdd:(oe,Ie)=>{let ve=Fp(Ie,A);ve.message&&Wp(ve.message),ve.accepted.length!==0&&L.setValue("createAttachmentFiles",[...L.getValue("createAttachmentFiles")??[],...ve.accepted])},onRemove:(oe,Ie)=>L.setValue("createAttachmentFiles",nt.filter((ve,we)=>we!==Ie))}),S?null:Bi(oa,{children:[st(na,{sx:{my:1.5,borderColor:"#e6e6e3"}}),st(Tn,{icon:st(u4,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:st(g4,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),st(Xu,{transitionDuration:0,anchorEl:Y,open:!!Y,onClose:()=>G(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...U.map(oe=>({seq:oe.seq,label:kn(oe)}))].map(oe=>st(Zu,{onClick:()=>{e.setFormValue("sprint_seq",oe.seq),G(null)},sx:{fontSize:14,minWidth:170},children:oe.label},oe.seq))}),st(Xu,{transitionDuration:0,anchorEl:ae,open:!!ae,onClose:()=>pe(null),children:[{value:"",label:"\uC5C6\uC74C"},...Zs].map(oe=>st(Zu,{selected:ie===oe.value,onClick:()=>{if(pe(null),oe.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Ie;if(j){if(Ie=String(e.getFormValue("due_date")??"").slice(0,10),!Ie){Wp("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Ie=String(e.getFormValue("start_date")??"").slice(0,10),!Ie){let ve=new Date,we=be=>String(be).padStart(2,"0");Ie=`${ve.getFullYear()}-${we(ve.getMonth()+1)}-${we(ve.getDate())}`}e.setFormValue("due_date",""),e.setFormValue("reminders",[])}e.setFormValue("repeat_rule",oe.value),e.setFormValue("repeat_until",Cl(Ie,oe.value))},sx:{fontSize:14,minWidth:140},children:oe.label},oe.value||"none"))}),st(b4,{anchorEl:ue,open:!!ue,onClose:()=>ke(null),selectedDate:ne?new Date(`${ne}T00:00:00`):new Date,onDateChange:oe=>{let Ie=ve=>String(ve).padStart(2,"0");e.setFormValue("repeat_until",`${oe.getFullYear()}-${Ie(oe.getMonth()+1)}-${Ie(oe.getDate())}`),ke(null)}}),st(Xu,{transitionDuration:0,anchorEl:Z,open:!!Z,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(qp,{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($p,{sx:{fontSize:17,color:"#2f80ed"}}),selected:K==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...h].sort((oe,Ie)=>oe.seq===f?-1:Ie.seq===f?1:0).map(oe=>({key:`group-${oe.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${oe.name}`,tip:`${oe.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:st(Hp,{sx:{fontSize:17,color:"#d9730d"}}),selected:K==="group"&&ee===oe.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",oe.seq)}}))].map(oe=>st(l4,{title:oe.tip,arrow:!0,disableInteractive:!0,placement:"right",children:Bi(Zu,{selected:oe.selected,onClick:()=>{oe.onPick(),re(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[oe.icon,oe.label]})},oe.key))}),st(Hl,{anchorEl:X,selectedKeys:W??[],labelOptions:d,onToggle:oe=>e.setFormValue("label_keys",Va(W??[],oe)),onAddLabel:(oe,Ie)=>m?.(oe,Ie),onClose:()=>J(null)})]})}import{Fragment as Gp,jsx as Jt,jsxs as ia}from"react/jsx-runtime";function Jj({open:e,onClose:d,...g}){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}=g,f=yo(),u=x4(!1),[b,m]=Vp(0),v=l.useFormValue("title"),k=l.useFormValue("icon"),B=l.useFormValue("icon_color"),R=!!l.useFormValue("is_event"),L=!!l.useFormValue("is_bug"),A=jt(),N=f.useValue("createSubmitting")??!1,q=a||R?Mt(k||(a?lr:dr)):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";y4(()=>{let x=u.current;u.current=e,!(!e||x)&&(l.setFormValues({...l.getFormValues(),title:o,icon:a?lr:h?Os:bo,icon_color:a?"#e5484d":h?As:"",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]=Vp(null),p=x=>q?R?Jt(k4,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Jt(v4,{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(Oo,{sx:[{display:"flex",color:B||"#1e3a8a"},x],children:Jt(q,{sx:{fontSize:20}})}):null,y=ia(Oo,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[p({p:0}),Jt(Oo,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:x=>l.setFormValue("title",x.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]});return A?Jt(Gp,{children:Jt(C4,{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(Qu,{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(Oo,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Jt(Ju,{...g,contentSyncKey:`create-${b}`,leadingRow:y})})}]})}):ia(Gp,{children:[Jt(w4,{anchor:"right",open:e,onClose:d,"aria-label":"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D",sx:{zIndex:x=>x.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ia(Oo,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[ia(Oo,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[p({px:.5}),Jt(Oo,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:x=>l.setFormValue("title",x.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),Jt(_4,{"aria-label":"\uB2EB\uAE30",onClick:d,sx:{color:"#6b7280"},children:Jt(S4,{})})]}),Jt(Kp,{sx:{borderColor:"#e6e6e3"}}),Jt(Oo,{sx:{flex:1,minHeight:0},children:Jt(T4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Jt(Ju,{...g,contentSyncKey:`create-${b}`})})}),Jt(Kp,{sx:{borderColor:"#e6e6e3"}}),ia(Oo,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Jt(Qu,{onClick:d,color:"inherit",disabled:N,children:"\uCDE8\uC18C"}),Jt(Qu,{onClick:l.submit,variant:"contained",disabled:N,children:N?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),Jt(Go,{anchorEl:T,value:k,color:B,onSelect:x=>{l.setFormValue("icon",x),P(null)},onSelectColor:x=>l.setFormValue("icon_color",x),onClose:()=>P(null)})]})}import{useEffect as xm,useRef as vm,useState as Zl}from"react";import{Box as Jl,Button as Ik,Divider as wm,Drawer as Ek,IconButton as Mk,ListItemIcon as dd,ListItemText as fd,Menu as Rk,MenuItem as hd}from"@mui/material";import Ok from"@mui/icons-material/MoreVert";import Ak from"@mui/icons-material/DeleteOutline";import Dk from"@mui/icons-material/ShareOutlined";import Pk from"@mui/icons-material/HistoryOutlined";import Nk from"@ehfuse/overlay-scrollbar";import{FormDialog as Lk}from"@ehfuse/mui-form-dialog";import{SuccessAlert as _m}from"@ehfuse/alerts";import{useRef as td,useState as ss}from"react";import{Box as mt,Button as Yp,Chip as Ul,IconButton as qn,Tooltip as Qp}from"@mui/material";import Xp from"@mui/icons-material/Send";import{TextField as B4}from"@ehfuse/mui-form-controls";import Vl from"@mui/icons-material/Close";import I4 from"@mui/icons-material/EditOutlined";import E4 from"@mui/icons-material/Favorite";import M4 from"@mui/icons-material/FavoriteBorderOutlined";import R4 from"@mui/icons-material/CheckCircle";import O4 from"@mui/icons-material/CheckCircleOutlineOutlined";import as from"@mui/icons-material/AttachFileOutlined";import A4 from"@mui/icons-material/AddCircleOutline";import D4 from"@mui/icons-material/ImageOutlined";var ed=e=>{if(e===0)return"0 Bytes";let d=1024,g=["Bytes","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(d));return parseFloat((e/Math.pow(d,l)).toFixed(2))+" "+g[l]};import{Fragment as Jp,jsx as Ue,jsxs as sr}from"react/jsx-runtime";var P4=5;function Zp({kind:e,reactions:d,myAccountSeq:g,onToggle:l}){let o=d??[],s=g>0&&o.some(c=>c.account_seq===g),r=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",t=o.length===0?r:Ue(mt,{sx:{whiteSpace:"pre-line",fontSize:12},children:o.map(c=>`${c.name} \xB7 ${c.time}`).join(`
39
- `)}),n=e==="like"?"#e5484d":"#2f80ed";return Ue(Qp,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:sr(mt,{sx:{display:"inline-flex",alignItems:"center"},children:[Ue(qn,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?Ue(E4,{sx:{fontSize:16}}):Ue(M4,{sx:{fontSize:16}}):s?Ue(R4,{sx:{fontSize:16}}):Ue(O4,{sx:{fontSize:16}})}),o.length>0?Ue(mt,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function em({taskSeq:e,comments:d,currentUserName:g="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=ss(null),h=td(null),[f,u]=ss(null),[b,m]=ss(!1),v=Math.max(0,d.length-P4),k=v>0&&!b,B=i?Math.min(i.index,v):v,R=d.map((q,j)=>({comment:q,index:j})).slice(k?B:0),L=Ms(),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=bt().slots?.avatar;return sr(mt,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[sr(mt,{sx:{display:"flex",alignItems:"center",gap:1},children:[Ue(Ko,{sx:{fontSize:18,display:"block",color:"#37352f"}}),sr(mt,{sx:{fontSize:zu,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",d.length>0?` (${d.length})`:""]}),v>0&&(!k||B>0)?Ue(mt,{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?Ue(mt,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,Ue(mt,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:R.map(({comment:q,index:j})=>{let S=!!g&&q.author===g;return sr(mt,{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?Ue(mt,{sx:{display:"inline-flex",flexShrink:0},children:Ue(N,{name:q.author,src:T||void 0,size:44})}):Ue(mt,{sx:{display:"inline-flex",flexShrink:0},children:Ue(vn,{src:T,name:q.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...$i[0]},iconFontSize:24})})})(),sr(mt,{sx:{flex:1,minWidth:0},children:[sr(mt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[Ue(mt,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q.author}),q.external?Ue(mt,{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,Ue(mt,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:q.time}),S?Ue(mt,{sx:{ml:"auto"}}):sr(mt,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[Ue(Zp,{kind:"like",reactions:q.likes,myAccountSeq:l,onToggle:()=>t?.(e,j,"like")}),Ue(Zp,{kind:"ack",reactions:q.acks,myAccountSeq:l,onToggle:()=>t?.(e,j,"ack")})]}),S?sr(mt,{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:[Ue(qn,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:j,text:q.text,attachments:[...q.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:Ue(I4,{sx:{fontSize:15}})}),Ue(qn,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:T=>u({anchorEl:T.currentTarget,index:j}),sx:{color:"#9a9a97"},children:Ue(Vl,{sx:{fontSize:15}})})]}):null]}),i?.index===j?sr(mt,{sx:{mt:.5},children:[Ue(mt,{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"}}),sr(mt,{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,x)=>x!==P)});return Kl(T.name)&&T.uuid?sr(mt,{sx:{position:"relative"},children:[Ue(mt,{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"}}),Ue(qn,{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:Ue(Vl,{sx:{fontSize:14}})})]},`kept-${T.uuid}-${P}`):Ue(Ul,{size:"small",icon:Ue(as,{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,x)=>x!==P)});return Kl(T.name)?sr(mt,{sx:{position:"relative"},children:[Ue(mt,{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"}}),Ue(qn,{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:Ue(Vl,{sx:{fontSize:14}})})]},`new-${T.name}-${P}`):Ue(Ul,{size:"small",icon:Ue(as,{sx:{fontSize:14}}),label:`${T.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${T.name}-${P}`)}),Ue(Qp,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:Ue(qn,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:Ue(A4,{sx:{fontSize:20}})})})]}),sr(mt,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[Ue(Yp,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),Ue(Yp,{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"})]}),Ue(mt,{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=""}})]}):sr(mt,{children:[q.text?Ue(mt,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:q.text}):null,(q.attachments??[]).length>0?Ue(mt,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(q.attachments??[]).map((T,P)=>{let p=!!T.uuid;if(Kl(T.name)&&p)return Ue(mt,{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 x=zl(T.name);return Ue(Ul,{size:"small",icon:Ue(as,{sx:{fontSize:14}}),label:`${T.name} (${ed(T.size)})`,clickable:p,onClick:p?()=>x?A(T):D(T):void 0,title:p?`${T.name} ${x?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:T.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${T.name}-${P}`)})}):null]})]})]},`${q.time}-${j}`)})}),Ue(Pt,{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 Kl(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function tm({onSubmit:e}){let[d,g]=ss(""),[l,o]=ss([]),[s,r]=ss(!1),t=td(null),n=td(null),c=jt(),i=f=>{let u=Array.from(f??[]);u.length!==0&&o(b=>[...b,...u].slice(0,10))},a=()=>{let f=d.trim();!f&&l.length===0||(e(f,l.length>0?l:void 0),g(""),o([]))},h=sr(Jp,{children:[Ue(qn,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:Ue(as,{sx:{fontSize:20}})}),Ue(qn,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:Ue(D4,{sx:{fontSize:20}})})]});return sr(mt,{children:[l.length>0?Ue(mt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((f,u)=>Kl(f.name)?sr(mt,{sx:{position:"relative"},children:[Ue(mt,{component:"img",src:URL.createObjectURL(f),alt:f.name,title:f.name,onLoad:b=>URL.revokeObjectURL(b.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),Ue(qn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>o(b=>b.filter((m,v)=>v!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:Ue(Vl,{sx:{fontSize:14}})})]},`${f.name}-${u}`):Ue(Ul,{size:"small",icon:Ue(as,{sx:{fontSize:14}}),label:`${f.name} (${ed(f.size)})`,onDelete:()=>o(b=>b.filter((m,v)=>v!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${f.name}-${u}`))}):null,sr(mt,{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?sr(mt,{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:[Ue(as,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,Ue(B4,{value:d,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:f=>g(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?sr(mt,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,Ue(qn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:Ue(Xp,{sx:{fontSize:22}})})]}):sr(Jp,{children:[Ue(mt,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),Ue(qn,{"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:Ue(Xp,{sx:{fontSize:22}})})]})]}),Ue(mt,{component:"input",ref:t,type:"file",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}}),Ue(mt,{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 cs}from"react";import{Box as us,Button as V4,ButtonBase as K4,IconButton as ds,Tooltip as fs}from"@mui/material";import G4 from"@mui/icons-material/Close";import Y4 from"@mui/icons-material/ArrowBack";import X4 from"@mui/icons-material/ShareOutlined";import Z4 from"@mui/icons-material/ContentCopyOutlined";import J4 from"@mui/icons-material/HistoryOutlined";import Q4 from"@mui/icons-material/Print";import{useEffect as N4}from"react";import{Box as Ao,Button as L4,CircularProgress as z4}from"@mui/material";import{FormDialog as j4}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as F4}from"@ehfuse/overlay-scrollbar";import{jsx as Do,jsxs as Gl}from"react/jsx-runtime";var q4={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 rm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function $4(e){if(e.kind!=="field")return q4[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let d=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",g=String(e.old_value??"").trim(),l=String(e.new_value??"").trim();return!g&&l?`${d}\uC744(\uB97C) "${l}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:g&&!l?`${d}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${d}\uC744(\uB97C) "${rm(g)}" \u2192 "${rm(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Yl({open:e,taskSeq:d,items:g,loading:l,onLoad:o,onClose:s}){let r=jt();N4(()=>{e&&d>0&&!g&&o?.(d)},[e,d,g,o]);let t=Do(Ao,{sx:{height:r?"100%":420,minHeight:0},children:Do(F4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Gl(Ao,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!g?Gl(Ao,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[Do(z4,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,g&&g.length===0?Do(Ao,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(g??[]).map(n=>Gl(Ao,{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:[Do(Ao,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:fn(n.acted_time)}),Gl(Ao,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[Do(Ao,{component:"span",sx:{fontWeight:500},children:String(n.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),Do(Ao,{component:"span",sx:{ml:.5},children:$4(n)})]})]},n.seq))]})})});return Do(j4,{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${g&&g.length>0?` (${g.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:Do(L4,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{InfoAlert as H4,SuccessAlert as W4}from"@ehfuse/alerts";var nm=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
37
+ `).trim()}function Dl({syncKey:e,value:d,onChange:g,readOnly:l=!1,minHeight:o=180,height:s=0,onChangeHeight:r}){let{uploadContentImage:t}=bt(),n=ti(null),c=ti(new Q3),i=ti(null),a=s>0?s:0,h=ti(a),f=ti(r);f.current=r;let u=ti(null),b=ti(Date.now()+800),[m,v]=K3(!1),k=jt();$u(()=>{if(l)return;let R=Wu(d);u.current===R||u.current===d||(u.current=R,b.current=Date.now()+800,n.current?.setHtml(R))},[e,d,l]);let B=ti(-1);return $u(()=>{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]),$u(()=>{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?r5(Hu,{sx:{position:"relative",mt:1},children:[Ti(Hu,{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:Wu(d)}}),Ti(Y3,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Ti(G3,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(t5(d)).then(()=>{v(!0),window.setTimeout(()=>v(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:m?Ti(Z3,{sx:{fontSize:17,color:"#2f9e5b"}}):Ti(X3,{sx:{fontSize:17}})})})]}):Ti(Hu,{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:Ti(J3,{ref:n,defaultValue:Wu(d),autoHeight:k,resizable:!k,showToolbar:!k,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:e5,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()<b.current,A=R===u.current;u.current=R,!(L||A)&&g(R)}})})}import{useState as ns}from"react";import{Box as mr,Button as Cp,Dialog as p5,IconButton as os,Switch as m5,TextField as g5,Tooltip as Vu}from"@mui/material";import{DndContext as b5,PointerSensor as y5,closestCenter as x5,useSensor as v5,useSensors as w5}from"@dnd-kit/core";import{restrictToParentElement as _5,restrictToVerticalAxis as k5}from"@dnd-kit/modifiers";import{SortableContext as S5,arrayMove as T5,useSortable as C5,verticalListSortingStrategy as B5}from"@dnd-kit/sortable";import{CSS as I5}from"@dnd-kit/utilities";import Bp from"@mui/icons-material/Close";import E5 from"@mui/icons-material/AddCircle";import Ip from"@mui/icons-material/AddTask";import M5 from"@mui/icons-material/Checklist";import R5 from"@mui/icons-material/CheckCircle";import O5 from"@mui/icons-material/DragIndicator";import A5 from"@mui/icons-material/Launch";import D5 from"@mui/icons-material/LinkOutlined";import P5 from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as n5,useMemo as o5,useState as Uu}from"react";import{Box as io,Button as i5,Tab as s5,Tabs as a5}from"@mui/material";import{FormDialog as l5}from"@ehfuse/mui-form-dialog";import{ClearTextField as c5}from"@ehfuse/mui-form-controls";import{ErrorAlert as u5}from"@ehfuse/alerts";import d5 from"@mui/icons-material/CheckCircle";import f5 from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as h5}from"@ehfuse/overlay-scrollbar";import{jsx as Nr,jsxs as Pl}from"react/jsx-runtime";var Tp=[{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 Nl({open:e,task:d,tasks:g,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=jt(),[a,h]=Uu("related"),[f,u]=Uu(""),[b,m]=Uu([]);n5(()=>{e&&(h("related"),u(""),m([]))},[e]);let v=o5(()=>{let A=new Set([d.seq,...l]),D=f.trim().toLowerCase();return g.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)},[g,d.seq,l,f]),k=()=>{if(b.length===0){u5("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let A of b)s(A,a);o()},B=A=>{m(D=>D.includes(A)?D.filter(N=>N!==A):c?[...D,A]:[A])},R=Tp.find(A=>A.type===a)?.hint??"",L=Pl(io,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i?"100%":"auto"},children:[r?null:Nr(a5,{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:Tp.map(A=>Nr(s5,{value:A.type,label:A.label},A.type))}),r?null:Nr(io,{sx:{mt:1,mb:1.5,fontSize:14,flexShrink:0},children:R}),Pl(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:[Nr(io,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Nr(c5,{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}}})}),Nr(io,{sx:{flex:1,minHeight:0},children:Nr(h5,{style:{height:"100%"},contentStyle:{paddingTop:0},children:Nr(io,{sx:{display:"flex",flexDirection:"column"},children:v.length===0?Nr(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."}):v.map(A=>{let D=A.is_notice||A.is_event?Mt(A.icon||(A.is_notice?lr:dr)):null,N=b.includes(A.seq);return Pl(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?Nr(d5,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):Nr(f5,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),D?Nr(D,{sx:{fontSize:17,flexShrink:0,color:A.icon_color||"#1e3a8a"}}):null,Pl(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]}),Nr(io,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:Nr(Dt,{option:fr(A)})})]},A.seq)})})})})]})]});return Nr(l5,{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:Nr(i5,{variant:"contained",disabled:b.length===0,onClick:k,children:n})}})}import{Fragment as z5,jsx as pt,jsxs as so}from"react/jsx-runtime";var Ep="taskbox.checklist.hideCompleted";function N5({id:e,children:d}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=C5({id:e});return pt(mr,{ref:o,sx:{transform:I5.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...g,...l},dragging:t})})}function L5({sortable:e,sensors:d,rowIds:g,onDragEnd:l,children:o}){let s=pt(mr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o});return e?pt(b5,{sensors:d,collisionDetection:x5,modifiers:[k5,_5],onDragEnd:l,children:pt(S5,{items:g,strategy:B5,children:s})}):s}function Ll({taskSeq:e,checklist:d,onAdd:g,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[b,m]=ns(""),[v,k]=ns(!1),[B,R]=ns(null),L=jt(),[A,D]=ns(null),[N,q]=ns(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?!Ff(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,x]=ns(()=>{try{return localStorage.getItem(Ep)==="1"}catch{return!1}}),w=H=>{x(H);try{localStorage.setItem(Ep,H?"1":"0")}catch{}},_=!!r&&!L&&!t,C=w5(v5(y5,{activationConstraint:{distance:5}})),O=(H,I)=>H.task_seq?`linked-${H.task_seq}`:`row-${I}`,z=d.map(O),$=z.filter((H,I)=>{let E=d[I];return T(E)?!1:!(y&&j(E))}),V=H=>{let{active:I,over:E}=H;if(!E||I.id===E.id)return;let F=z.indexOf(String(I.id)),U=z.indexOf(String(E.id));F<0||U<0||r?.(e,T5(d,F,U))},M=()=>{b.trim()&&(g(e,b),m(""))};return so(Tn,{icon:pt(M5,{sx:{fontSize:19,display:"block"}}),title:so(z5,{children:["\uD560\uC77C",d.length>0?so(mr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[p," / ",d.length]}):null]}),titleExtra:P.length>0?so(mr,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[pt(mr,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:pt(mr,{sx:{height:"100%",borderRadius:3,width:`${Math.round(p/P.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),p>0?so(mr,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[pt(m5,{size:"small",checked:y,onChange:(H,I)=>w(I)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[pt(L5,{sortable:_,sensors:C,rowIds:$,onDragEnd:V,children:d.map((H,I)=>{let E=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(mr,{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?pt(mr,{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:pt(O5,{sx:{fontSize:16}})}):null,pt(Vu,{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:pt(mr,{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?pt(R5,{sx:{fontSize:18,color:Y?"#a9c6ec":"#2f80ed"}}):pt(P5,{sx:{fontSize:18,color:Y?"#d6d5d1":"#9a9a97"}})})}),B?.index===I?pt(mr,{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}}):pt(mr,{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(mr,{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:[pt(A5,{sx:{fontSize:12}}),E?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!t&&!U&&n?pt(Vu,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:pt(os,{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:pt(Ip,{sx:{fontSize:16}})})}):null,t?null:pt(os,{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:pt(Bp,{sx:{fontSize:15}})})]});return _?pt(N5,{id:z[I],children:({handleProps:W})=>G(W)},z[I]):pt(mr,{children:G(null)},z[I])})}),so(mr,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[pt(mr,{component:"input",spellCheck:!1,value:b,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:H=>m(H.target.value),onKeyDown:H=>{H.key==="Enter"&&M()},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?pt(Vu,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:pt(os,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:H=>H.preventDefault(),onClick:()=>k(!0),sx:{flexShrink:0,color:"#9a9a97"},children:pt(D5,{sx:{fontSize:20}})})}):null,pt(os,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!b.trim(),onMouseDown:H=>H.preventDefault(),onClick:M,sx:{flexShrink:0,color:b.trim()?"#2f80ed":"#c9c8c5"},children:pt(E5,{sx:{fontSize:20}})})]}),i&&a&&h?pt(Nl,{open:v,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(E=>E.seq===H);h(e,H,String(I?.title??"").trim())}}):null,pt(Pt,{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)}}),pt(p5,{open:!!A,onClose:()=>D(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:so(mr,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[pt(mr,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),pt(g5,{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(mr,{sx:{display:"flex",alignItems:"center",gap:1},children:[!t&&n&&A&&!d[A.index]?.task_seq?pt(os,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{n(e,A.index,d[A.index]?.label??""),D(null)},sx:{color:"#57564f"},children:pt(Ip,{sx:{fontSize:20}})}):null,!t&&A?pt(os,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{o(e,A.index),D(null)},sx:{color:"#e5484d"},children:pt(Bp,{sx:{fontSize:19}})}):null,pt(mr,{sx:{flex:1}}),pt(Cp,{color:"inherit",onClick:()=>D(null),children:"\uCDE8\uC18C"}),pt(Cp,{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 W5,useState as U5}from"react";import{Box as ao,IconButton as V5}from"@mui/material";import K5 from"@mui/icons-material/Close";import Op from"@mui/icons-material/AttachFileOutlined";var j5=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"]),zl=e=>{let d=e?.split(".").pop()?.toLowerCase()??"";return j5.has(d)};import{LinearProgress as F5}from"@mui/material";import{Fragment as q5,jsx as H5,jsxs as $5}from"react/jsx-runtime";function Mp(e){let d=yo(),g=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&&(g??0)!==e?null:{index:r,total:o??0,queue:s??[]}}function Ku(){let d=yo().useValue("attachmentUpload.progress");return $5(q5,{children:[d??0,"%"]})}function Rp(){let d=yo().useValue("attachmentUpload.progress");return H5(F5,{variant:"determinate",value:d??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as G5,jsx as sn,jsxs as ea}from"react/jsx-runtime";function jl(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Fl={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function ql({taskSeq:e,attachments:d,onAdd:g,onRemove:l,removeLocked:o=!1,onPreview:s,onDownload:r}){let[t,n]=U5(!1),c=W5(null),i=jt(),a=Rs(),h=Ms(),f=Mp(e),u=e===0,b=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")},v=R=>f?R+1<f.index?"done":R+1===f.index?"uploading":"waiting":"waiting",k=(R,L,A,D={})=>ea(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:[ea(ao,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[sn(Op,{sx:{fontSize:16,color:"#9a9a97"}}),L,sn(ao,{component:"span",sx:{fontSize:12,color:D.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:A}),D.removeIndex!==void 0?sn(V5,{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:sn(K5,{sx:{fontSize:15}})}):null]}),D.uploading?sn(Rp,{}):null]},R),B=R=>{let L=zl(R.name);return sn(ao,{component:"button",type:"button",onClick:()=>L?b(R):m(R),title:`${R.name} ${L?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Fl,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 ea(Tn,{icon:sn(Op,{sx:{fontSize:18,display:"block"}}),title:ea(G5,{children:["\uD30C\uC77C ",d.length>0?d.length:""]}),children:[ea(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=v(L),N=D==="uploading";return k(A,sn(ao,{component:"span",sx:{...Fl,color:D==="done"?"#37352f":"#9a9a97"},children:R.name}),N?sn(Ku,{}):jl(R.size),{uploading:N,removeIndex:!o&&!f?L:void 0})}return R.uuid?k(A,B(R),jl(R.size),{removeIndex:o?void 0:L}):k(A,sn(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:{...Fl,color:"#9a9a97"},children:R.name}),jl(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}`,sn(ao,{component:"span",sx:{...Fl,color:"#9a9a97"},children:R.name}),A?sn(Ku,{}):jl(R.size),{uploading:A})}):null]}),sn(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&&g(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)`}),sn(ao,{component:"input",ref:c,type:"file",multiple:!0,onChange:R=>{let L=Array.from(R.target.files??[]);L.length>0&&g(e,L),R.target.value=""},sx:{display:"none"}})]})}import{useState as t4}from"react";import{Checkbox as r4,Divider as n4,ListItemIcon as o4,Menu as i4,MenuItem as Np}from"@mui/material";import s4 from"@mui/icons-material/Add";import{useEffect as Y5,useState as Ap}from"react";import{Box as Gu,Button as X5}from"@mui/material";import{FormDialog as Z5}from"@ehfuse/mui-form-dialog";import{ClearTextField as J5}from"@ehfuse/mui-form-controls";import{ColorPicker as Q5}from"@ehfuse/mui-color-picker";import{ErrorAlert as e4}from"@ehfuse/alerts";import{jsx as ta,jsxs as Yu}from"react/jsx-runtime";var Dp="#2f80ed";function Pp({open:e,onClose:d,onSubmit:g}){let[l,o]=Ap(""),[s,r]=Ap(Dp);Y5(()=>{e&&(o(""),r(Dp))},[e]);let t=()=>{let i=l.trim();if(!i){e4("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(i,s),d()},n=Tf(s),c=Yu(Gu,{children:[Yu(Gu,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[ta(J5,{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}),ta(Q5,{value:s,onChange:i=>r(i),shape:"circle",colorSize:28})]}),Yu(Gu,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",ta(Dt,{option:{key:"__preview__",name:l.trim()||"\uB77C\uBCA8",...n}})]})]});return ta(Z5,{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:ta(X5,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}import{Fragment as a4,jsx as is,jsxs as $l}from"react/jsx-runtime";function Hl({anchorEl:e,selectedKeys:d,labelOptions:g,onToggle:l,onAddLabel:o,onClose:s}){let[r,t]=t4(!1),n=Kn();return $l(a4,{children:[$l(i4,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...n,children:[g.map(c=>{let i=d.includes(c.key);return $l(Np,{onClick:()=>l(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[is(r4,{size:"small",checked:i,sx:{p:0}}),is(Dt,{option:c})]},c.key)}),is(n4,{}),$l(Np,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[is(o4,{children:is(s4,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),is(Pp,{open:r,onClose:()=>t(!1),onSubmit:o})]})}function Lp(e,d){let g=Number(e.author_account_seq??0);return d.filter(l=>{let o=Number(l.account_seq??0);return o>0&&o!==g})}function zp(e,d){let g=(e.target_account_seqs??[]).filter(a=>a>0);if(g.length===0)return null;let l=new Set(g),o=Lp(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 g.forEach((a,h)=>{t.has(a)||i.push(n.get(a)??c[h]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:r,individualNames:i}}function Wl(e,d){let g=zp(e,d);return g?[...g.teamNames,...g.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function nj(e,d){let g=zp(e,d);return g?{kind:"members",teamNames:g.teamNames,individualNames:g.individualNames}:{kind:"everyone"}}function jp(e,d,g){let l=(e.target_account_seqs??[]).filter(f=>f>0),o=Lp(e,d),s=l.length>0?l.length:o.length,r=e.acks??[],t=g>0&&r.some(f=>f.account_seq===g),n=g>0&&Number(e.author_account_seq??0)===g,c=l.length===0||l.includes(g),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:g>0&&!n&&c&&!t&&!e.completed}}function Fp(e,d){let g=Number(d)||50,l=g*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 ${g}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
38
+ \uC81C\uC678\uB41C \uD30C\uC77C: ${o.map(t=>t.name).join(", ")}`:null;return{accepted:s,rejected:o,message:r}}import{DatePicker as y4}from"@ehfuse/mui-datetime-picker";import{Fragment as oa,jsx as st,jsxs as Bi}from"react/jsx-runtime";var Up="#0f9d58";function Ju({form:e,statusOptions:d,customTabs:g,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:b,onAddLabelOption:m,contentSyncKey:v="create",contentTemplates:k,onSaveContentTemplate:B,onRemoveContentTemplate:R}){let L=yo(),A=Rs(),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")??"",x=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"),M=e.useFormValue("checklist")??[],H=e.useFormValue("tab_key"),I=e.useFormValue("sprint_seq")??0,E=e.useFormValue("story_points")??0,F=g.find(oe=>oe.key===H&&oe.useSprints),U=F?l.filter(oe=>`custom-${oe.group_seq}`===H):[],[Y,G]=ra(null),W=e.useFormValue("label_keys"),[X,J]=ra(null),K=e.useFormValue("visibility")||"involved",ee=Number(e.useFormValue("visibility_group_seq")??0),[Z,re]=ra(null),ie=e.useFormValue("repeat_rule")||"",ne=e.useFormValue("repeat_until")||"",[ae,pe]=ra(null),[ue,ke]=ra(null),Ne=e.useFormValue("target_names"),Ce=e.useFormValue("target_account_seqs"),nt=L.useValue("createAttachmentFiles")??[],me=s?Wl({author_account_seq:a,target_names:Ne,target_account_seqs:Ce},i):"";return Bi(oa,{children:[n,s?null:st(Ci,{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(oe=>{let Ie=S?"bug":j?"event":"task",ve=Ie===oe.value;return st(l4,{onClick:()=>{if(Ie===oe.value)return;e.setFormValue("is_event",oe.value==="event"),e.setFormValue("is_bug",oe.value==="bug"),e.setFormValue("visibility",oe.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),oe.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let we=e.getFormValue("icon"),be=e.getFormValue("icon_color"),Me=[bo,"event",Os].includes(we),Fe=!be||be===Up||be===As;Me&&e.setFormValue("icon",oe.value==="event"?"event":oe.value==="bug"?Os:bo),Fe&&e.setFormValue("icon_color",oe.value==="event"?Up:oe.value==="bug"?As:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:ve?600:400,color:ve?"#ffffff":"#787774",bgcolor:ve?"#2563eb":"#f4f4f2"},children:oe.label},oe.label)})}),st(na,{sx:{borderColor:"#e6e6e3"}}),Bi(Ci,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[st(Ml,{hideProject:r,hideDueDate:!j&&!!ie,hideReminder:!!ie,values:{tabKey:H,managerName:D,receiverNames:N,startDate:q,dueDate:C,reminders:O,priority:z,eventTime:x,eventPlace:w,eventAddress:_},customTabs:g,avatarSrcByName:o,notice:s,event:j,onChangeEventTime:oe=>e.setFormValue("event_time",oe),onChangeEventPlace:oe=>e.setFormValue("event_place",oe),onChangeEventAddress:oe=>e.setFormValue("event_address",oe),targetSummary:me,onChangeProject:oe=>e.setFormValue("tab_key",oe),onAddProject:b,onChangeStartDate:oe=>e.setFormValue("start_date",oe),onChangeDueDate:oe=>e.setFormValue("due_date",oe),onChangeReminder:oe=>e.setFormValue("reminders",oe),onChangePriority:oe=>e.setFormValue("priority",oe),onMemberEdit:u,pinColumns:!0,beforeStart:Bi(oa,{children:[!s&&!S?st(gt,{icon:st(p4,{sx:{fontSize:17,...ie?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:oe=>pe(oe),sx:j?void 0:ir(2),children:ie?Tl(ie):st(Ci,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!s&&!S&&ie?st(gt,{icon:st(m4,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:oe=>ke(oe),sx:j?void 0:ir(2),children:ne?wn(ne):st(Ci,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:Bi(oa,{children:[s?null:st(gt,{icon:K==="all"?st($p,{sx:{fontSize:17,color:"#2f80ed"}}):K==="group"?st(Hp,{sx:{fontSize:17,color:"#d9730d"}}):st(qp,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:oe=>re(oe),sx:j?void 0:ir(1),children:K==="all"?"\uC804\uCCB4\uACF5\uAC1C":K==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${h.find(oe=>oe.seq===ee)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),F&&!j&&!s?Bi(oa,{children:[st(gt,{icon:st(h4,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:oe=>G(oe),sx:ir(1),children:I>0?U.find(oe=>oe.seq===I)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":st(Ci,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),st(gt,{icon:st(g4,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:ir(1),children:st(Ro,{value:E>0?String(E):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:oe=>e.setFormValue("story_points",Number(oe.replace(/[^0-9.]/g,""))||0)})})]}):null,S?st(Rl,{values:{repro:T,device:P,where:p,version:y},onChangeRepro:oe=>e.setFormValue("bug_repro",oe),onChangeDevice:oe=>e.setFormValue("bug_device",oe),onChangeWhere:oe=>e.setFormValue("bug_where",oe),onChangeVersion:oe=>e.setFormValue("bug_version",oe)}):null]}),leading:j||c?null:st(Ci,{sx:{gridColumn:"1 / -1"},children:st(gt,{icon:st(f4,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:oe=>J(oe),children:(W??[]).length>0?st(Uo,{labelKeys:W??[],labelOptions:d}):st(Ci,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),st(na,{sx:{my:1.5,borderColor:"#e6e6e3"}}),st(Tn,{icon:st(u4,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:k?st(Al,{content:$,templates:k,onApply:oe=>e.setFormValue("content",oe),onSave:B,onRemove:R}):void 0,children:st(Dl,{syncKey:v,value:$,onChange:oe=>e.setFormValue("content",oe)})}),j?null:st(na,{sx:{my:1.5,borderColor:"#e6e6e3"}}),j?null:st(Ll,{taskSeq:0,checklist:M,onAdd:(oe,Ie)=>e.setFormValue("checklist",[...M,{label:Ie,checked:!1}]),onToggle:(oe,Ie,ve)=>e.setFormValue("checklist",M.map((we,be)=>be===Ie?{...we,checked:ve}:we)),onRemove:(oe,Ie)=>e.setFormValue("checklist",M.filter((ve,we)=>we!==Ie)),onUpdate:(oe,Ie,ve)=>e.setFormValue("checklist",M.map((we,be)=>be===Ie?{...we,label:ve}:we))}),st(na,{sx:{my:1.5,borderColor:"#e6e6e3"}}),st(ql,{taskSeq:0,attachments:nt.map(oe=>({name:oe.name,size:oe.size})),onAdd:(oe,Ie)=>{let ve=Fp(Ie,A);ve.message&&Wp(ve.message),ve.accepted.length!==0&&L.setValue("createAttachmentFiles",[...L.getValue("createAttachmentFiles")??[],...ve.accepted])},onRemove:(oe,Ie)=>L.setValue("createAttachmentFiles",nt.filter((ve,we)=>we!==Ie))}),S?null:Bi(oa,{children:[st(na,{sx:{my:1.5,borderColor:"#e6e6e3"}}),st(Tn,{icon:st(d4,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:st(b4,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),st(Xu,{transitionDuration:0,anchorEl:Y,open:!!Y,onClose:()=>G(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...U.map(oe=>({seq:oe.seq,label:kn(oe)}))].map(oe=>st(Zu,{onClick:()=>{e.setFormValue("sprint_seq",oe.seq),G(null)},sx:{fontSize:14,minWidth:170},children:oe.label},oe.seq))}),st(Xu,{transitionDuration:0,anchorEl:ae,open:!!ae,onClose:()=>pe(null),children:[{value:"",label:"\uC5C6\uC74C"},...Zs].map(oe=>st(Zu,{selected:ie===oe.value,onClick:()=>{if(pe(null),oe.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Ie;if(j){if(Ie=String(e.getFormValue("due_date")??"").slice(0,10),!Ie){Wp("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Ie=String(e.getFormValue("start_date")??"").slice(0,10),!Ie){let ve=new Date,we=be=>String(be).padStart(2,"0");Ie=`${ve.getFullYear()}-${we(ve.getMonth()+1)}-${we(ve.getDate())}`}e.setFormValue("due_date",""),e.setFormValue("reminders",[])}e.setFormValue("repeat_rule",oe.value),e.setFormValue("repeat_until",Cl(Ie,oe.value))},sx:{fontSize:14,minWidth:140},children:oe.label},oe.value||"none"))}),st(y4,{anchorEl:ue,open:!!ue,onClose:()=>ke(null),selectedDate:ne?new Date(`${ne}T00:00:00`):new Date,onDateChange:oe=>{let Ie=ve=>String(ve).padStart(2,"0");e.setFormValue("repeat_until",`${oe.getFullYear()}-${Ie(oe.getMonth()+1)}-${Ie(oe.getDate())}`),ke(null)}}),st(Xu,{transitionDuration:0,anchorEl:Z,open:!!Z,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(qp,{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($p,{sx:{fontSize:17,color:"#2f80ed"}}),selected:K==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...h].sort((oe,Ie)=>oe.seq===f?-1:Ie.seq===f?1:0).map(oe=>({key:`group-${oe.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${oe.name}`,tip:`${oe.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:st(Hp,{sx:{fontSize:17,color:"#d9730d"}}),selected:K==="group"&&ee===oe.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",oe.seq)}}))].map(oe=>st(c4,{title:oe.tip,arrow:!0,disableInteractive:!0,placement:"right",children:Bi(Zu,{selected:oe.selected,onClick:()=>{oe.onPick(),re(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[oe.icon,oe.label]})},oe.key))}),st(Hl,{anchorEl:X,selectedKeys:W??[],labelOptions:d,onToggle:oe=>e.setFormValue("label_keys",Va(W??[],oe)),onAddLabel:(oe,Ie)=>m?.(oe,Ie),onClose:()=>J(null)})]})}import{Fragment as Gp,jsx as Jt,jsxs as ia}from"react/jsx-runtime";function Qj({open:e,onClose:d,...g}){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}=g,f=yo(),u=v4(!1),[b,m]=Vp(0),v=l.useFormValue("title"),k=l.useFormValue("icon"),B=l.useFormValue("icon_color"),R=!!l.useFormValue("is_event"),L=!!l.useFormValue("is_bug"),A=jt(),N=f.useValue("createSubmitting")??!1,q=a||R?Mt(k||(a?lr:dr)):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";x4(()=>{let x=u.current;u.current=e,!(!e||x)&&(l.setFormValues({...l.getFormValues(),title:o,icon:a?lr:h?Os:bo,icon_color:a?"#e5484d":h?As:"",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]=Vp(null),p=x=>q?R?Jt(S4,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Jt(w4,{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(Oo,{sx:[{display:"flex",color:B||"#1e3a8a"},x],children:Jt(q,{sx:{fontSize:20}})}):null,y=ia(Oo,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[p({p:0}),Jt(Oo,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:x=>l.setFormValue("title",x.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]});return A?Jt(Gp,{children:Jt(B4,{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(Qu,{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(Oo,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Jt(Ju,{...g,contentSyncKey:`create-${b}`,leadingRow:y})})}]})}):ia(Gp,{children:[Jt(_4,{anchor:"right",open:e,onClose:d,"aria-label":"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D",sx:{zIndex:x=>x.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ia(Oo,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[ia(Oo,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[p({px:.5}),Jt(Oo,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:x=>l.setFormValue("title",x.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),Jt(k4,{"aria-label":"\uB2EB\uAE30",onClick:d,sx:{color:"#6b7280"},children:Jt(T4,{})})]}),Jt(Kp,{sx:{borderColor:"#e6e6e3"}}),Jt(Oo,{sx:{flex:1,minHeight:0},children:Jt(C4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Jt(Ju,{...g,contentSyncKey:`create-${b}`})})}),Jt(Kp,{sx:{borderColor:"#e6e6e3"}}),ia(Oo,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Jt(Qu,{onClick:d,color:"inherit",disabled:N,children:"\uCDE8\uC18C"}),Jt(Qu,{onClick:l.submit,variant:"contained",disabled:N,children:N?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),Jt(Go,{anchorEl:T,value:k,color:B,onSelect:x=>{l.setFormValue("icon",x),P(null)},onSelectColor:x=>l.setFormValue("icon_color",x),onClose:()=>P(null)})]})}import{useEffect as xm,useRef as vm,useState as Zl}from"react";import{Box as Jl,Button as Ek,Divider as wm,Drawer as Mk,IconButton as Rk,ListItemIcon as dd,ListItemText as fd,Menu as Ok,MenuItem as hd}from"@mui/material";import Ak from"@mui/icons-material/MoreVert";import Dk from"@mui/icons-material/DeleteOutline";import Pk from"@mui/icons-material/ShareOutlined";import Nk from"@mui/icons-material/HistoryOutlined";import Lk from"@ehfuse/overlay-scrollbar";import{FormDialog as zk}from"@ehfuse/mui-form-dialog";import{SuccessAlert as _m}from"@ehfuse/alerts";import{useRef as td,useState as ss}from"react";import{Box as mt,Button as Yp,Chip as Ul,IconButton as qn,Tooltip as Qp}from"@mui/material";import Xp from"@mui/icons-material/Send";import{TextField as I4}from"@ehfuse/mui-form-controls";import Vl from"@mui/icons-material/Close";import E4 from"@mui/icons-material/EditOutlined";import M4 from"@mui/icons-material/Favorite";import R4 from"@mui/icons-material/FavoriteBorderOutlined";import O4 from"@mui/icons-material/CheckCircle";import A4 from"@mui/icons-material/CheckCircleOutlineOutlined";import as from"@mui/icons-material/AttachFileOutlined";import D4 from"@mui/icons-material/AddCircleOutline";import P4 from"@mui/icons-material/ImageOutlined";var ed=e=>{if(e===0)return"0 Bytes";let d=1024,g=["Bytes","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(d));return parseFloat((e/Math.pow(d,l)).toFixed(2))+" "+g[l]};import{Fragment as Jp,jsx as Ue,jsxs as sr}from"react/jsx-runtime";var N4=5;function Zp({kind:e,reactions:d,myAccountSeq:g,onToggle:l}){let o=d??[],s=g>0&&o.some(c=>c.account_seq===g),r=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",t=o.length===0?r:Ue(mt,{sx:{whiteSpace:"pre-line",fontSize:12},children:o.map(c=>`${c.name} \xB7 ${c.time}`).join(`
39
+ `)}),n=e==="like"?"#e5484d":"#2f80ed";return Ue(Qp,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:sr(mt,{sx:{display:"inline-flex",alignItems:"center"},children:[Ue(qn,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?Ue(M4,{sx:{fontSize:16}}):Ue(R4,{sx:{fontSize:16}}):s?Ue(O4,{sx:{fontSize:16}}):Ue(A4,{sx:{fontSize:16}})}),o.length>0?Ue(mt,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function em({taskSeq:e,comments:d,currentUserName:g="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=ss(null),h=td(null),[f,u]=ss(null),[b,m]=ss(!1),v=Math.max(0,d.length-N4),k=v>0&&!b,B=i?Math.min(i.index,v):v,R=d.map((q,j)=>({comment:q,index:j})).slice(k?B:0),L=Ms(),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=bt().slots?.avatar;return sr(mt,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[sr(mt,{sx:{display:"flex",alignItems:"center",gap:1},children:[Ue(Ko,{sx:{fontSize:18,display:"block",color:"#37352f"}}),sr(mt,{sx:{fontSize:zu,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",d.length>0?` (${d.length})`:""]}),v>0&&(!k||B>0)?Ue(mt,{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?Ue(mt,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,Ue(mt,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:R.map(({comment:q,index:j})=>{let S=!!g&&q.author===g;return sr(mt,{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?Ue(mt,{sx:{display:"inline-flex",flexShrink:0},children:Ue(N,{name:q.author,src:T||void 0,size:44})}):Ue(mt,{sx:{display:"inline-flex",flexShrink:0},children:Ue(vn,{src:T,name:q.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...$i[0]},iconFontSize:24})})})(),sr(mt,{sx:{flex:1,minWidth:0},children:[sr(mt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[Ue(mt,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q.author}),q.external?Ue(mt,{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,Ue(mt,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:q.time}),S?Ue(mt,{sx:{ml:"auto"}}):sr(mt,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[Ue(Zp,{kind:"like",reactions:q.likes,myAccountSeq:l,onToggle:()=>t?.(e,j,"like")}),Ue(Zp,{kind:"ack",reactions:q.acks,myAccountSeq:l,onToggle:()=>t?.(e,j,"ack")})]}),S?sr(mt,{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:[Ue(qn,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:j,text:q.text,attachments:[...q.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:Ue(E4,{sx:{fontSize:15}})}),Ue(qn,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:T=>u({anchorEl:T.currentTarget,index:j}),sx:{color:"#9a9a97"},children:Ue(Vl,{sx:{fontSize:15}})})]}):null]}),i?.index===j?sr(mt,{sx:{mt:.5},children:[Ue(mt,{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"}}),sr(mt,{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,x)=>x!==P)});return Kl(T.name)&&T.uuid?sr(mt,{sx:{position:"relative"},children:[Ue(mt,{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"}}),Ue(qn,{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:Ue(Vl,{sx:{fontSize:14}})})]},`kept-${T.uuid}-${P}`):Ue(Ul,{size:"small",icon:Ue(as,{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,x)=>x!==P)});return Kl(T.name)?sr(mt,{sx:{position:"relative"},children:[Ue(mt,{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"}}),Ue(qn,{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:Ue(Vl,{sx:{fontSize:14}})})]},`new-${T.name}-${P}`):Ue(Ul,{size:"small",icon:Ue(as,{sx:{fontSize:14}}),label:`${T.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${T.name}-${P}`)}),Ue(Qp,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:Ue(qn,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:Ue(D4,{sx:{fontSize:20}})})})]}),sr(mt,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[Ue(Yp,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),Ue(Yp,{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"})]}),Ue(mt,{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=""}})]}):sr(mt,{children:[q.text?Ue(mt,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:q.text}):null,(q.attachments??[]).length>0?Ue(mt,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(q.attachments??[]).map((T,P)=>{let p=!!T.uuid;if(Kl(T.name)&&p)return Ue(mt,{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 x=zl(T.name);return Ue(Ul,{size:"small",icon:Ue(as,{sx:{fontSize:14}}),label:`${T.name} (${ed(T.size)})`,clickable:p,onClick:p?()=>x?A(T):D(T):void 0,title:p?`${T.name} ${x?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:T.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${T.name}-${P}`)})}):null]})]})]},`${q.time}-${j}`)})}),Ue(Pt,{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 Kl(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function tm({onSubmit:e}){let[d,g]=ss(""),[l,o]=ss([]),[s,r]=ss(!1),t=td(null),n=td(null),c=jt(),i=f=>{let u=Array.from(f??[]);u.length!==0&&o(b=>[...b,...u].slice(0,10))},a=()=>{let f=d.trim();!f&&l.length===0||(e(f,l.length>0?l:void 0),g(""),o([]))},h=sr(Jp,{children:[Ue(qn,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:Ue(as,{sx:{fontSize:20}})}),Ue(qn,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:Ue(P4,{sx:{fontSize:20}})})]});return sr(mt,{children:[l.length>0?Ue(mt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((f,u)=>Kl(f.name)?sr(mt,{sx:{position:"relative"},children:[Ue(mt,{component:"img",src:URL.createObjectURL(f),alt:f.name,title:f.name,onLoad:b=>URL.revokeObjectURL(b.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),Ue(qn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>o(b=>b.filter((m,v)=>v!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:Ue(Vl,{sx:{fontSize:14}})})]},`${f.name}-${u}`):Ue(Ul,{size:"small",icon:Ue(as,{sx:{fontSize:14}}),label:`${f.name} (${ed(f.size)})`,onDelete:()=>o(b=>b.filter((m,v)=>v!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${f.name}-${u}`))}):null,sr(mt,{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?sr(mt,{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:[Ue(as,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,Ue(I4,{value:d,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:f=>g(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?sr(mt,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,Ue(qn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:Ue(Xp,{sx:{fontSize:22}})})]}):sr(Jp,{children:[Ue(mt,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),Ue(qn,{"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:Ue(Xp,{sx:{fontSize:22}})})]})]}),Ue(mt,{component:"input",ref:t,type:"file",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}}),Ue(mt,{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 cs}from"react";import{Box as us,Button as K4,ButtonBase as G4,IconButton as ds,Tooltip as fs}from"@mui/material";import Y4 from"@mui/icons-material/Close";import X4 from"@mui/icons-material/ArrowBack";import Z4 from"@mui/icons-material/ShareOutlined";import J4 from"@mui/icons-material/ContentCopyOutlined";import Q4 from"@mui/icons-material/HistoryOutlined";import ek from"@mui/icons-material/Print";import{useEffect as L4}from"react";import{Box as Ao,Button as z4,CircularProgress as j4}from"@mui/material";import{FormDialog as F4}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as q4}from"@ehfuse/overlay-scrollbar";import{jsx as Do,jsxs as Gl}from"react/jsx-runtime";var $4={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 rm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function H4(e){if(e.kind!=="field")return $4[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let d=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",g=String(e.old_value??"").trim(),l=String(e.new_value??"").trim();return!g&&l?`${d}\uC744(\uB97C) "${l}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:g&&!l?`${d}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${d}\uC744(\uB97C) "${rm(g)}" \u2192 "${rm(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Yl({open:e,taskSeq:d,items:g,loading:l,onLoad:o,onClose:s}){let r=jt();L4(()=>{e&&d>0&&!g&&o?.(d)},[e,d,g,o]);let t=Do(Ao,{sx:{height:r?"100%":420,minHeight:0},children:Do(q4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Gl(Ao,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!g?Gl(Ao,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[Do(j4,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,g&&g.length===0?Do(Ao,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(g??[]).map(n=>Gl(Ao,{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:[Do(Ao,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:fn(n.acted_time)}),Gl(Ao,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[Do(Ao,{component:"span",sx:{fontWeight:500},children:String(n.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),Do(Ao,{component:"span",sx:{ml:.5},children:H4(n)})]})]},n.seq))]})})});return Do(F4,{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${g&&g.length>0?` (${g.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:Do(z4,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{InfoAlert as W4,SuccessAlert as U4}from"@ehfuse/alerts";var nm=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(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&amp;/gi,"&").replace(/\n{3,}/g,`
42
42
 
43
- `).trim():"";function U4(e){let d=[`[\uC5C5\uBB34] ${e.title}`],g=wn(e.start_date),l=wn(e.due_date);(g||l)&&d.push(`\uAE30\uAC04: ${g&&l?`${g} ~ ${l}`:g||l}`),e.manager_name&&d.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let o=fr(e).name;o&&d.push(`\uC0C1\uD0DC: ${o}`);let s=nm(e.content);s&&d.push("",s);let r=String(e.note??"").trim();return r&&d.push("",`\uBE44\uACE0: ${r}`),d.join(`
44
- `)}function om(e){navigator.clipboard.writeText(e).then(()=>W4("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>H4("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function ls(e,d){let g=U4(e);if(d&&typeof navigator.share=="function"){navigator.share({text:g}).catch(l=>{l?.name!=="AbortError"&&om(g)});return}om(g)}import{Fragment as ek,jsx as Rt,jsxs as rd}from"react/jsx-runtime";function im({task:e,myAccountSeq:d=0,onToggleCompleted:g,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=jt(),[b,m]=cs(!1),[v,k]=cs(null),[B,R]=cs(null),[L,A]=cs(null),[D,N]=cs(null),[q,j]=cs(null),S=!!e.is_notice,T=!!e.is_event,P=S?Mt(e.icon||lr):T?Mt(e.icon||dr):null,p=S&&d>0&&(e.author_account_seq??0)===d,{onReturnTask:y,onReviewDone:x}=bt(),w=!!y&&rn(e,d),_=w&&!!x,C=!xo(e,d),O=!!h&&(f??(d>0&&(e.author_account_seq??0)===d)),z=!T&&(S?p:(e.author_account_seq??0)===d||(e.manager_account_seq??0)===d);return rd(ek,{children:[rd(us,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?Rt(ds,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:Rt(Y4,{})}):null,z&&!t?Rt(fs,{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:rd(us,{sx:{display:"flex",flexShrink:0,mr:1},children:[Rt(Gn,{onClick:$=>j({anchorEl:$.currentTarget,nextCompleted:!e.completed}),children:e.completed?w?"\uB418\uB3CC\uB9AC\uAE30":"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"}),_?Rt(V4,{variant:"contained",size:"small",disableElevation:!0,onClick:$=>N($.currentTarget),sx:{ml:1,...Hi},children:"\uAC80\uC218\uC644\uB8CC"}):null]})}):null,t||!P?null:T&&!C?Rt(fs,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Rt(K4,{onClick:$=>R($.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Rt(P,{sx:{fontSize:20}})})}):Rt(us,{sx:{display:"flex",px:.5,color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:Rt(P,{sx:{fontSize:20}})}),v!==null?Rt(us,{component:"input",autoFocus:!0,spellCheck:!1,value:v,onChange:$=>k($.target.value),onBlur:()=>{v.trim()&&v.trim()!==e.title&&l(e.seq,v.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(us,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":T?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Rt(us,{onClick:C?void 0:()=>k(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:C?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),i?Rt(fs,{title:"\uD65C\uB3D9",arrow:!0,children:Rt(ds,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:Rt(J4,{sx:{fontSize:20}})})}):null,Rt(fs,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Rt(ds,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>ls(e,u),sx:{color:"#6b7280"},children:u?Rt(X4,{sx:{fontSize:20}}):Rt(Z4,{sx:{fontSize:20}})})}),a?Rt(fs,{title:"\uC778\uC1C4",arrow:!0,children:Rt(ds,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:Rt(Q4,{sx:{fontSize:20}})})}):null,O?Rt(fs,{title:"\uC0AD\uC81C",arrow:!0,children:Rt(ds,{"aria-label":"\uC0AD\uC81C",onClick:$=>A($.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:Rt(pr,{sx:{fontSize:20}})})}):null,r&&!t?Rt(ds,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:Rt(G4,{})}):null]}),Rt(Ui,{anchorEl:D,onCancel:()=>N(null),onConfirm:()=>{x?.(e),N(null)}}),Rt(nn,{open:!!q,anchorEl:q?.anchorEl??null,nextCompleted:q?.nextCompleted??!1,returnMode:w,onCancel:()=>j(null),onConfirm:$=>{q&&($&&y?y(e,$):g(e.seq,q.nextCompleted)),j(null)}}),Rt(Go,{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(Pt,{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(Yl,{open:b,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}import{useRef as uk,useState as Cn}from"react";import{Box as Qt,Button as hs,ButtonBase as dm,Checkbox as dk,Divider as Ei,Menu as ad,MenuItem as ld}from"@mui/material";import fk from"@mui/icons-material/ExpandLess";import hk from"@mui/icons-material/ExpandMore";import pk from"@mui/icons-material/ConfirmationNumberOutlined";import fm from"@mui/icons-material/Check";import mk from"@mui/icons-material/DirectionsRunOutlined";import gk from"@mui/icons-material/SpeedOutlined";import cd from"@mui/icons-material/CheckCircle";import bk from"@mui/icons-material/CheckCircleOutlineOutlined";import ud from"@mui/icons-material/CheckCircleOutlined";import hm from"@mui/icons-material/AccessTimeOutlined";import yk from"@mui/icons-material/AutorenewOutlined";import xk from"@mui/icons-material/LabelOutlined";import vk from"@mui/icons-material/PersonOutlineOutlined";import wk from"@mui/icons-material/SubjectOutlined";import _k from"@mui/icons-material/StickyNote2Outlined";import kk from"@mui/icons-material/PanToolAltOutlined";import pm from"@mui/icons-material/LockOutlined";import mm from"@mui/icons-material/PublicOutlined";import gm from"@mui/icons-material/Group";import Sk from"@mui/icons-material/Repeat";import Tk from"@mui/icons-material/EventOutlined";import{ConfirmDialog as bm,InfoAlert as Ck}from"@ehfuse/alerts";import{DatePicker as Bk}from"@ehfuse/mui-datetime-picker";import{useState as tk}from"react";import{TextField as rk}from"@ehfuse/mui-form-controls";import{jsx as nk}from"react/jsx-runtime";function sm({value:e,onCommit:d,onDraftChange:g,readOnly:l=!1}){let[o,s]=tk(null);return nk(rk,{value:o??e,placeholder:l?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:l}},onChange:r=>{s(r.target.value),g?.(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 id,useState as sd}from"react";import{Box as Lr,Button as cm,IconButton as ok}from"@mui/material";import ik from"@mui/icons-material/AccountTreeOutlined";import sk from"@mui/icons-material/LinkOutlined";import ak from"@mui/icons-material/Close";import lk from"@mui/icons-material/RedoOutlined";function Ii(e){return e.relations??[]}function pq(e,d,g){return Ii(e).some(l=>l.type===g&&l.task_seq===d.seq)||Ii(d).some(l=>l.type===g&&l.task_seq===e.seq)}function am(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function nd(e,d){let g=new Map(d.map(u=>[u.seq,u]));g.set(e.seq,e);let l=new Map,o=(u,b)=>{l.has(u)||l.set(u,new Set),l.has(b)||l.set(b,new Set),l.get(u).add(b),l.get(b).add(u)};for(let u of g.values())for(let b of Ii(u))b.type==="follow_up"&&g.has(b.task_seq)&&o(u.seq,b.task_seq);let s=new Set([e.seq]),r=[e.seq];for(;r.length>0;){let u=r.shift();for(let b of l.get(u)??[])s.has(b)||(s.add(b),r.push(b))}let t=[...s].map(u=>g.get(u)).filter(u=>!!u).sort((u,b)=>am(u).localeCompare(am(b))),n=new Set;for(let u of Ii(e))u.type==="related"&&n.add(u.task_seq);for(let u of g.values())u.seq!==e.seq&&Ii(u).some(b=>b.type==="related"&&b.task_seq===e.seq)&&n.add(u.seq);let c=[...n].map(u=>g.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),i=[...g.values()].filter(u=>u.seq!==e.seq&&Ii(u).some(b=>b.type==="duplicate_of"&&b.task_seq===e.seq)),a=Ii(e).find(u=>u.type==="duplicate_of")?.task_seq,h=a?g.get(a)??null:null,f=[...g.values()].filter(u=>u.seq!==e.seq&&(u.checklist??[]).some(b=>Number(b.task_seq??0)===e.seq));return{lineage:t,related:c,duplicates:i,duplicateOf:h,parents:f}}function od(e,d){let g=nd(e,d);return(g.lineage.length>=2?g.lineage.length-1:0)+g.related.length+g.duplicates.length+(g.duplicateOf?1:0)+g.parents.length}function lm(e,d){return od(e,d)>0}import{Fragment as ck,jsx as Yt,jsxs as $n}from"react/jsx-runtime";function Xl({item:e,caption:d,onOpen:g,onUnlink:l}){let o=e.is_notice||e.is_event?Mt(e.icon||(e.is_notice?lr:dr)):null;return $n(Lr,{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?Yt(Lr,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:d}):null,o?Yt(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,$n(Lr,{component:"span",onClick:g,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...g?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),Yt(Dt,{option:fr(e),small:!0}),l?Yt(ok,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:l,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Yt(ak,{sx:{fontSize:15}})}):null]})}function um({task:e,tasks:d,readOnly:g=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=sd(!1),[c,i]=sd(null),[a,h]=sd(null),f=id(()=>nd(e,d),[e,d]),u=f.lineage.length>=2,b=id(()=>od(e,d),[e,d]),m=id(()=>{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]),v=(k,B,R)=>{h({anchorEl:k,targetSeq:B,type:R})};return $n(Tn,{icon:Yt(ik,{sx:{fontSize:19,display:"block"}}),title:$n(ck,{children:["\uAD00\uB828 \uC5C5\uBB34",b>0?Yt(Lr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:b}):null]}),titleExtra:g?null:$n(Lr,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?Yt(cm,{size:"small",color:"inherit",startIcon:Yt(lk,{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?Yt(cm,{size:"small",color:"inherit",startIcon:Yt(sk,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[$n(Lr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?Yt(Lr,{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 $n(Lr,{sx:{display:"flex",gap:1},children:[$n(Lr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Yt(Lr,{sx:{width:R?9:7,height:R?9:7,borderRadius:"50%",bgcolor:R?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),L?null:Yt(Lr,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),$n(Lr,{sx:{flex:1,minWidth:0,pb:L?0:.5},children:[$n(Lr,{sx:{display:"flex",alignItems:"center",gap:.75},children:[$n(Lr,{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]}),Yt(Dt,{option:fr(k),small:!0})]}),Yt(Lr,{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=>Yt(Xl,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),f.duplicateOf?Yt(Xl,{item:f.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:l?()=>l(f.duplicateOf.seq):void 0,onUnlink:!g&&s?k=>v(k.currentTarget,f.duplicateOf.seq,"duplicate_of"):void 0}):null,f.duplicates.map(k=>Yt(Xl,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?B=>v(B.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),f.related.map(k=>Yt(Xl,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?B=>v(B.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),b===0?Yt(Lr,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?Yt(Nl,{open:t,task:e,tasks:d,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,B)=>o(e.seq,k,B)}):null,Yt(Pt,{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)}}),Yt(Pt,{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 Vr,jsx as _e,jsxs as Xt}from"react/jsx-runtime";function ri({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return _e(Qt,{component:"span",sx:{color:"#9a9a97"},children:e})}function ym({task:e,customTabs:d,statusOptions:g,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:b=[],onChangeEventTime:m,onChangeEventPlace:v,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:x,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:C,relatedTasksPool:O,onOpenRelatedTask:z,onLinkRelatedTask:$,onUnlinkRelatedTask:V,onCreateFollowUpTask:M,onAddAttachments:H,onRemoveAttachment:I,onPreview:E,onDownload:F,onUpdateComment:U,onRemoveComment:Y,onToggleCommentReaction:G,currentUserName:W="",myAccountSeq:X=0,noticeAdmin:J=!1,hideProject:K=!1,hideLabel:ee=!1,showTitle:Z=!1,onChangeTitle:re,onToggleCompleted:ie,onChangeIcon:ne,onChangeIconColor:ae,employees:pe=[],onAckConfirm:ue,onRequestConfirm:ke,onChangeBugField:Ne,sprints:Ce=[],sprintProject:Oe=!1,hideSprint:nt=!1,onChangeSprint:me,onChangeStoryPoints:oe,onChangeResolution:Ie,onClaimTask:ve,onVerifyBug:we}){let[be,Me]=Cn(null),Fe=uk(!1),[vr,Ve]=Cn(null),[Ge,Tt]=Cn(null),[Qe,De]=Cn(null),[xe,ge]=Cn(!1),Be={[jn]:xe?{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"}},[Ze,qe]=Cn(null),[Pe,Ct]=Cn(null),[Ke,te]=Cn(null),[ce,de]=Cn(null),[Se,ct]=Cn(null),[Re,Le]=Cn(null),[wt,Ae]=Cn(null),Ee=!!e.is_notice,Je=!!e.is_event,ot=!!e.is_bug,ft=!!ve&&Ja(e,X),{onReturnTask:Bt}=bt(),ut=!!ve&&Qa(e,X),$t=!!we&&ot&&!!e.completed&&X>0&&(e.author_account_seq??0)===X&&!(e.acks??[]).some(se=>se.account_seq===X),xt=!xo(e,X),Wt=!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),Ut=e.is_notice||e.is_event?Mt(e.icon||(e.is_notice?lr:dr)):null,Q=Ee?!Za(e,X):xt,le=ft||ut?Xt(Gn,{onClick:se=>Ae(se.currentTarget),children:[_e(kk,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ye=Ee?Wl(e,pe):"",he=Ee?jp(e,pe,X):null,Te=Ee?null:Gi(e,X),$e=!!(Te&&Te.total>0||Ee&&he),We=(e.origin_license_seq??0)>0,et=!Ee&&!We,tt=Xt(Vr,{children:[_e(gt,{icon:_e(vk,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[oo(9),Be??null,...Je?[]:[ir(1)]],children:e.created_by?Xt(Vr,{children:[_e(Wr,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):_e(ri,{})}),_e(gt,{icon:_e(hm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[oo(11),Be??null,...Je?[]:[ir(2)]],children:e.created_time?fn(e.created_time):_e(ri,{})})]});return Xt(Vr,{children:[Z?Xt(Qt,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Wt?_e(dk,{checked:e.completed,icon:_e(bk,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:_e(cd,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(se,He)=>{Ge||Tt({anchorEl:se.currentTarget,nextCompleted:He})},sx:{p:0,mt:.25}}):null,Ut?Je&&!xt?_e(dm,{onClick:se=>Ve(se.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:_e(Ut,{sx:{fontSize:20}})}):_e(Qt,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Ee?"#e5484d":"#1e3a8a")},children:_e(Ut,{sx:{fontSize:20}})}):null,_e(Qt,{sx:{flex:1,minWidth:0},children:be!==null?_e(Qt,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:se=>{if(!se||se.dataset.focused)return;se.dataset.focused="1",se.focus();let He=document.createRange();He.selectNodeContents(se),He.collapse(!1);let yt=window.getSelection();yt?.removeAllRanges(),yt?.addRange(He)},onBlur:se=>{let He=(se.currentTarget.textContent??"").replace(/\n/g," ").trim();!Fe.current&&He&&He!==e.title&&re(e.seq,He),Fe.current=!1,Me(null)},onKeyDown:se=>{se.key==="Enter"&&(se.preventDefault(),se.target.blur()),se.key==="Escape"&&(Fe.current=!0,se.target.blur())},onPaste:se=>{se.preventDefault();let He=se.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,He)},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:be}):_e(Qt,{onClick:()=>Me(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})}),_e(nn,{open:!!Ge,anchorEl:Ge?.anchorEl??null,nextCompleted:Ge?.nextCompleted??!1,returnMode:!!Bt&&rn(e,X),onCancel:()=>Tt(null),onConfirm:se=>{Ge&&(se&&Bt?Bt(e,se):ie(e.seq,Ge.nextCompleted)),Tt(null)}})]}):null,Xt(Qt,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[jn]:{pb:0,"& > :last-child":{mb:0}}},children:[_e(Ml,{hideProject:K,pinColumns:!0,projectColumn:!Je&&!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:Xn(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:d,avatarSrcByName:el(e,l),hideDueDate:!Je&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Ee,event:Je,readOnly:xt,targetSummary:ye,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=>v?.(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:sl(e.support_type??"")}:void 0,leading:Xt(Vr,{children:[$t||le&&(Ee||Je)?Xt(Qt,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ee||Je?le:null,$t?Xt(Vr,{children:[_e(hs,{variant:"contained",size:"large",onClick:()=>we?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),_e(hs,{variant:"outlined",size:"large",color:"error",onClick:()=>we?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,ot&&e.ticket_no?_e(gt,{icon:_e(pk,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:ir(1),children:_e(Qt,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Je?null:_e(Qt,{sx:ot&&e.ticket_no||et||$e?ir(ot&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:_e(gt,{icon:_e(yk,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:xt||e.completed?void 0:se=>qe(se),children:_e(Dt,{option:fr(e)})})}),et?(()=>{let se=An(e),He=se==="all"?_e(mm,{sx:{fontSize:17,color:"#2f80ed"}}):se==="group"?_e(gm,{sx:{fontSize:17,color:"#d9730d"}}):_e(pm,{sx:{fontSize:17}}),yt=se==="all"?"\uC804\uCCB4\uACF5\uAC1C":se==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${b.find(It=>It.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return _e(Qt,{sx:Je?void 0:ir(ot?1:2),children:_e(gt,{icon:He,label:"\uACF5\uAC1C",onClick:xt||!f?void 0:It=>Ct(It),children:yt})})})():null,!Ee&&!ot&&!We?_e(Qt,{sx:Je?void 0:ir(1),children:_e(gt,{icon:_e(Sk,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:xt||!u?void 0:se=>te(se),children:e.repeat_rule?Tl(e.repeat_rule):_e(ri,{label:"\uC5C6\uC74C"})})}):null,!Ee&&!ot&&e.repeat_rule?_e(Qt,{sx:Je?void 0:ir(2),children:_e(gt,{icon:_e(Tk,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:xt||!u?void 0:se=>de(se),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:_e(ri,{})})}):null,Te&&Te.total>0?_e(Qt,{sx:Je?void 0:ir(2),children:_e(gt,{icon:_e(ud,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Te.canConfirm?_e(hs,{size:"small",variant:"contained",onClick:()=>ue?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Xt(hs,{size:"small",variant:"outlined",color:"inherit",startIcon:Te.myTime?_e(cd,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:se=>De({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,Ee&&he?_e(Qt,{sx:ir(2),children:_e(gt,{icon:_e(ud,{sx:{fontSize:17}}),label:"\uD655\uC778",children:_e(Qt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:he.canAck?_e(hs,{size:"small",variant:"contained",onClick:()=>ue?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):_e(hs,{size:"small",variant:"outlined",color:"inherit",startIcon:he.acked?_e(cd,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:se=>De({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:he.total>0&&he.count>=he.total?"\uC644\uB8CC":Xt(Vr,{children:[he.count,_e(Qt,{component:"span",sx:{mx:.4},children:"/"}),he.total]})})})})}):null,Oe&&!nt&&!Je&&!Ee?Xt(Vr,{children:[_e(gt,{icon:_e(mk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:xt?void 0:se=>ct(se),sx:ir(1),children:(e.sprint_seq??0)>0?Ce.find(se=>se.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":_e(ri,{label:"\uBBF8\uBC30\uC815"})}),_e(gt,{icon:_e(gk,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:ir(2),children:_e(Ro,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:xt,onCommit:se=>oe?.(e.seq,Number(se.replace(/[^0-9.]/g,""))||0)})})]}):null,Je||ee?null:_e(Qt,{sx:[K?{gridColumn:"1 / -1"}:ir(1),Be??null],children:_e(gt,{icon:_e(xk,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:xt?void 0:se=>Le(se),children:(e.label_keys??[]).length>0?_e(Uo,{labelKeys:e.label_keys??[],labelOptions:g}):_e(ri,{})})})]}),afterProject:Je?null:tt,trailing:Xt(Vr,{children:[ot?_e(Rl,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:xt,showResolution:!!e.completed,onChangeRepro:se=>Ne?.(e.seq,"bug_repro",se),onChangeDevice:se=>Ne?.(e.seq,"bug_device",se),onChangeWhere:se=>Ne?.(e.seq,"bug_where",se),onChangeVersion:se=>Ne?.(e.seq,"bug_version",se),onChangeResolution:se=>Ie?.(e.seq,se)}):null,Je?tt:null,e.completed?Xt(Vr,{children:[_e(gt,{icon:_e(ud,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[oo(10),Be??null,...Je?[]:[ir(1)]],children:e.completed_by?Xt(Vr,{children:[_e(Wr,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):_e(ri,{})}),_e(gt,{icon:_e(hm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[oo(12),Be??null,...Je?[]:[ir(2)]],children:e.completed_time?fn(e.completed_time):_e(ri,{})})]}):null]})}),Xt(Qt,{sx:{display:"none",[jn]:{display:"block",mt:1.5,mb:0}},children:[_e(Ei,{sx:{borderColor:"#e6e6e3"}}),_e(dm,{onClick:()=>ge(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:xe?Xt(Vr,{children:["\uC811\uAE30 ",_e(fk,{sx:{fontSize:18}})]}):Xt(Vr,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",_e(hk,{sx:{fontSize:18}})]})})]}),Xt(Qt,{children:[_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3",[jn]:{mt:0,mb:1.25}}}),_e(Tn,{icon:_e(wk,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:A&&!xt?_e(Al,{content:e.content??"",templates:A,onApply:se=>L?.(e.seq,se),onSave:D,onRemove:N}):void 0,children:_e(Qt,{sx:{userSelect:"text"},children:q?_e(Qt,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:_e(ul,{})}):_e(Dl,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:j?se=>j(e.seq,se):void 0,readOnly:xt,onChange:se=>L(e.seq,se)})})}),e.is_bug?null:Xt(Vr,{children:[_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Tn,{icon:_e(_k,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:_e(Qt,{sx:{userSelect:"text"},children:_e(sm,{value:e.note,readOnly:Q,onCommit:se=>B(e.seq,se),onDraftChange:R?se=>R(e.seq,se):void 0})})})]}),Je?null:Xt(Vr,{children:[_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Ll,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Q,onAdd:S,onToggle:T,onRemove:P,onUpdate:p,onReorder:y,onConvertToTask:x,onOpenLinkedTask:w,resolveLinkedTask:C,myAccountSeq:X,linkCandidates:O,linkBaseTask:e,onLinkExistingTask:_})]}),O&&!Je&&!Ee&&lm(e,O)?Xt(Vr,{children:[_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(um,{task:e,tasks:O,readOnly:xt,onOpenTask:z,onLink:$,onUnlink:V,onCreateFollowUp:M})]}):null,_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(ql,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Q,onAdd:H,onRemove:I,onPreview:E?se=>E({...se,taskSeq:e.seq}):void 0,onDownload:F?se=>F({...se,taskSeq:e.seq}):void 0})]}),_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(em,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:X,avatarSrcByName:l,onUpdate:U,onRemove:Y,onToggleReaction:G,onPreview:E?se=>E({...se,taskSeq:e.seq}):void 0,onDownload:F?se=>F({...se,taskSeq:e.seq}):void 0})]}),_e(Fi,{anchorEl:Ze,value:e.status,options:Ee?Ps:ot?hi:Ns,onSelect:se=>o(e.seq,se),onClose:()=>qe(null)}),_e(ad,{transitionDuration:0,anchorEl:Ke,open:!!Ke,onClose:()=>te(null),children:[{value:"",label:"\uC5C6\uC74C"},...Zs].map(se=>_e(ld,{selected:(e.repeat_rule??"")===se.value,onClick:()=>{te(null),(async()=>{let He=e.repeat_rule??"";if(se.value===He)return;if(se.value===""){await bm({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 yt=String(e.due_date??"").slice(0,10);if(!yt){Ck(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}He&&!await bm({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,Cl(yt,se.value))})()},sx:{fontSize:14,minWidth:140},children:se.label},se.value||"none"))}),_e(Bk,{anchorEl:ce,open:!!ce,onClose:()=>de(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:se=>{de(null);let He=_t=>String(_t).padStart(2,"0"),yt=`${se.getFullYear()}-${He(se.getMonth()+1)}-${He(se.getDate())}`,It=e.repeat_rule??"";It&&u?.(e.seq,It,yt)}}),_e(ad,{transitionDuration:0,anchorEl:Pe,open:!!Pe,onClose:()=>Ct(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:_e(pm,{sx:{fontSize:17,color:"#57564f"}}),selected:An(e)==="involved",onPick:()=>f?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:_e(mm,{sx:{fontSize:17,color:"#2f80ed"}}),selected:An(e)==="all",onPick:()=>f?.(e.seq,"all",0)},...b.map(se=>({key:`group-${se.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${se.name}`,icon:_e(gm,{sx:{fontSize:17,color:"#d9730d"}}),selected:An(e)==="group"&&(e.visibility_group_seq??0)===se.seq,onPick:()=>f?.(e.seq,"group",se.seq)}))].map(se=>Xt(ld,{selected:se.selected,onClick:()=>{se.onPick(),Ct(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.icon,se.label,se.selected?_e(fm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},se.key))}),_e(ad,{transitionDuration:0,anchorEl:Se,open:!!Se,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=>Xt(ld,{onClick:()=>{me?.(e.seq,se.seq),ct(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.label,(e.sprint_seq??0)===se.seq?_e(fm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},se.seq))}),_e(fl,{anchorEl:Qe?.anchorEl??null,open:!!Qe?.open,acks:e.acks??[],total:he?.total??Te?.total??0,pendingNames:he?.pendingNames??Te?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:ke&&(he?he.count<he.total:Te&&Te.count<Te.total)?()=>{ke(e.seq),De(se=>se?{...se,open:!1}:null)}:void 0,onClose:()=>De(se=>se?{...se,open:!1}:null)}),_e(Hl,{anchorEl:Re,selectedKeys:e.label_keys??[],labelOptions:g,onToggle:se=>s(e.seq,Va(e.label_keys??[],se)),onAddLabel:r,onClose:()=>Le(null)}),_e(Go,{anchorEl:vr,value:e.icon??"",color:e.icon_color??"",onSelect:se=>{ne(e.seq,se),Ve(null)},onSelectColor:ae?se=>ae(e.seq,se):void 0,onClose:()=>Ve(null)}),_e(Pt,{open:!!wt,anchorEl:wt,title:ft?"\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:()=>Ae(null),onConfirm:()=>{ve?.(e.seq),Ae(null)}})]})}import{Fragment as zk,jsx as Kt,jsxs as ps}from"react/jsx-runtime";function nH(){let e=new Date,d=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function oH({open:e,task:d,onClose:g,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:b,canDelete:m,...v}){let k=jt(),B=vm(null);d&&(B.current=d);let R=d??B.current,[L,A]=Zl(!1),[D,N]=Zl(null),[q,j]=Zl(null),S=!!b&&(m??(r>0&&(R?.author_account_seq??0)===r)),[T,P]=Zl({}),p=Object.keys(T).length>0;xm(()=>{P({})},[d?.seq,e]);let y=vm(null);if(xm(()=>{y.current?.scrollTo({top:0})},[d?.seq]),!R)return null;let x=k&&p?{...R,...T}:R,w=x.checklist??[],_=(M,H)=>{k?P(I=>({...I,...M})):H()},C=()=>{let M=T;P({});let H=R.seq,I=M.title===void 0?void 0:String(M.title).trim();if(o){let E={...M};I!==void 0&&(I?E.title=I:delete E.title),Object.keys(E).length>0&&o(H,E),_m({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}I&&n(H,I),M.icon!==void 0&&c(H,String(M.icon)),M.icon_color!==void 0&&i?.(H,String(M.icon_color)),M.status!==void 0&&v.onChangeStatus(H,M.status),M.label_keys!==void 0&&v.onChangeLabels(H,M.label_keys??[]),M.tab_key!==void 0&&v.onChangeProject(H,String(M.tab_key??"")),M.start_date!==void 0&&v.onChangeDate(H,"start_date",String(M.start_date??"")),M.due_date!==void 0&&v.onChangeDate(H,"due_date",String(M.due_date??"")),M.reminders!==void 0&&v.onChangeReminder(H,M.reminders),M.priority!==void 0&&v.onChangePriority(H,M.priority),M.event_time!==void 0&&v.onChangeEventTime?.(H,String(M.event_time??"")),M.event_place!==void 0&&v.onChangeEventPlace?.(H,String(M.event_place??"")),M.event_address!==void 0&&v.onChangeEventAddress?.(H,String(M.event_address??"")),M.content!==void 0&&v.onChangeContent(H,String(M.content??"")),M.note!==void 0&&v.onChangeNote(H,String(M.note??"")),M.visibility!==void 0&&v.onChangeVisibility?.(H,M.visibility,Number(M.visibility_group_seq??0)),_m({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},O={...v,onChangeStatus:(M,H)=>_({status:H},()=>v.onChangeStatus(M,H)),onChangeLabels:(M,H)=>_({label_keys:H},()=>v.onChangeLabels(M,H)),onChangeProject:(M,H)=>_({tab_key:H},()=>v.onChangeProject(M,H)),onChangeDate:(M,H,I)=>_({[H]:I},()=>v.onChangeDate(M,H,I)),onChangeReminder:(M,H)=>_({reminders:H},()=>v.onChangeReminder(M,H)),onChangePriority:(M,H)=>_({priority:H},()=>v.onChangePriority(M,H)),onChangeEventTime:(M,H)=>_({event_time:H},()=>v.onChangeEventTime?.(M,H)),onChangeEventPlace:(M,H)=>_({event_place:H},()=>v.onChangeEventPlace?.(M,H)),onChangeEventAddress:(M,H)=>_({event_address:H},()=>v.onChangeEventAddress?.(M,H)),onChangeContent:(M,H)=>_({content:H},()=>v.onChangeContent(M,H)),onChangeNote:(M,H)=>_({note:H},()=>v.onChangeNote(M,H)),onMemberEdit:(M,H)=>v.onMemberEdit(M,H,k?I=>P(E=>({...E,...I})):null),onChangeNoteDraft:k?(M,H)=>_({note:H},()=>{}):void 0,onChangeVisibility:v.onChangeVisibility?(M,H,I)=>_({visibility:H,visibility_group_seq:I},()=>v.onChangeVisibility?.(M,H,I)):void 0,onAddChecklistItem:(M,H)=>_({checklist:[...w,{label:H,checked:!1}]},()=>v.onAddChecklistItem(M,H)),onToggleChecklistItem:(M,H,I)=>_({checklist:w.map((E,F)=>F===H?{...E,checked:I}:E)},()=>v.onToggleChecklistItem(M,H,I)),onRemoveChecklistItem:(M,H)=>_({checklist:w.filter((I,E)=>E!==H)},()=>v.onRemoveChecklistItem(M,H)),onUpdateChecklistItem:v.onUpdateChecklistItem?(M,H,I)=>_({checklist:w.map((E,F)=>F===H?{...E,label:I}:E)},()=>v.onUpdateChecklistItem?.(M,H,I)):void 0,onReorderChecklist:v.onReorderChecklist?(M,H)=>_({checklist:H},()=>v.onReorderChecklist?.(M,H)):void 0,onLinkChecklistTask:v.onLinkChecklistTask?(M,H,I)=>_({checklist:[...w,{label:I,checked:!1,task_seq:H}]},()=>v.onLinkChecklistTask?.(M,H,I)):void 0},z=Kt(ym,{...O,task:x,myAccountSeq:r,onChangeTitle:(M,H)=>_({title:H},()=>n(M,H)),onToggleCompleted:t,onChangeIcon:(M,H)=>_({icon:H},()=>c(M,H)),onChangeIconColor:(M,H)=>_({icon_color:H},()=>i?.(M,H)),showTitle:k||s==="dialog"}),$=Kt(tm,{onSubmit:(M,H)=>l(x.seq,M,H)},x.seq);return k||s==="dialog"?ps(zk,{children:[Kt(Lk,{open:e,onClose:g,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:x.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":x.is_event?"\uC77C\uC815":x.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{raw:!0,icon:Kt(Mk,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:M=>N(M.currentTarget),children:Kt(Ok,{sx:{color:"#6b7280"}})})},...k?[{raw:!0,icon:Kt(Ik,{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:Kt(Jl,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:z})}]},R.seq),ps(Rk,{open:!!D,anchorEl:D,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[f?ps(hd,{onClick:()=>{N(null),A(!0)},children:[Kt(dd,{children:Kt(Pk,{fontSize:"small"})}),Kt(fd,{children:"\uD65C\uB3D9"})]}):null,ps(hd,{onClick:()=>{N(null),ls(x,!0)},children:[Kt(dd,{children:Kt(Dk,{fontSize:"small"})}),Kt(fd,{children:"\uACF5\uC720\uD558\uAE30"})]}),S?ps(hd,{onClick:M=>{let H=D??M.currentTarget;N(null),j(H)},sx:{color:"#e5484d"},children:[Kt(dd,{children:Kt(Ak,{fontSize:"small",sx:{color:"#e5484d"}})}),Kt(fd,{children:"\uC0AD\uC81C"})]}):null]}),Kt(Pt,{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),b?.(x)}}),Kt(Yl,{open:L,taskSeq:x.seq,items:a,loading:h,onLoad:f,onClose:()=>A(!1)})]}):Kt(Ek,{anchor:"right",open:e,onClose:g,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:M=>M.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ps(Jl,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Kt(im,{task:x,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:g,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:b,canDelete:m}),Kt(wm,{sx:{borderColor:"#e6e6e3"}}),Kt(Jl,{sx:{flex:1,minHeight:0},children:Kt(Nk,{ref:y,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:z})}),Kt(wm,{sx:{borderColor:"#37352f"}}),Kt(Jl,{sx:{flexShrink:0},children:$})]})})}import{useEffect as Kk,useState as No}from"react";import{Box as Kr,Button as bd,IconButton as Tm}from"@mui/material";import{FormDialog as Cm}from"@ehfuse/mui-form-dialog";import Gk from"@mui/icons-material/Add";import Yk from"@mui/icons-material/DirectionsRunOutlined";import Xk from"@mui/icons-material/EditOutlined";import{ErrorAlert as Bm}from"@ehfuse/alerts";import{ClearTextField as Im,DateTextField as Em,LabelSelect as Mm}from"@ehfuse/mui-form-controls";import{useEffect as jk,useState as km}from"react";import{Box as Po,Button as Fk,FormControlLabel as pd,Radio as md,RadioGroup as qk}from"@mui/material";import{FormDialog as $k}from"@ehfuse/mui-form-dialog";import{LabelSelect as Hk}from"@ehfuse/mui-form-controls";import Wk from"@ehfuse/overlay-scrollbar";import{Fragment as Uk,jsx as zr,jsxs as ms}from"react/jsx-runtime";function Sm({open:e,sprint:d,remainingTasks:g,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]=km("backlog"),[c,i]=km(0);jk(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=g.length>0;return zr($k,{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:zr(Fk,{variant:"contained",onClick:()=>s({mode:a?t:"keep",moveToSprintSeq:t==="move"?c:0,taskSeqs:g.map(h=>h.seq)}),disabled:a&&t==="move"&&!(c>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:ms(Po,{sx:{display:"flex",flexDirection:"column",gap:2},children:[ms(Po,{sx:{fontSize:18,color:"#37352f"},children:[zr(Po,{component:"span",sx:{fontWeight:600},children:d?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?ms(Uk,{children:[ms(Po,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",g.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),zr(Po,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:zr(Wk,{style:{maxHeight:220},thumb:{width:6},children:g.map(h=>ms(Po,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[zr(Po,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),zr(Dt,{option:fr(h)})]},h.seq))})}),ms(qk,{value:t,onChange:(h,f)=>n(f),children:[r.length>0?zr(pd,{value:"move",control:zr(md,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?zr(Po,{sx:{pl:4,pb:1},children:zr(Hk,{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,zr(pd,{value:"backlog",control:zr(md,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),zr(pd,{value:"keep",control:zr(md,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):zr(Po,{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 gd="custom-";function Vk(e){return e.startsWith(gd)}function gH(e){return e>0?`${gd}${e}`:""}function ni(e){if(!Vk(e))return 0;let d=Number(e.slice(gd.length));return Number.isInteger(d)&&d>0?d:0}import{Fragment as Om,jsx as Ht,jsxs as oi}from"react/jsx-runtime";var Zk=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Rm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function EH({open:e,customTabs:d,sprints:g,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]=No(""),[f,u]=No(""),[b,m]=No(""),[v,k]=No(""),[B,R]=No(""),[L,A]=No(!1),[D,N]=No(!1),[q,j]=No(null),S=q?t.filter(O=>(O.sprint_seq??0)===q.seq&&!O.completed):[],[T,P]=No(0);Kk(()=>{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)},x=T>0||D,w=async()=>{let O=ni(a);if(!O){Bm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!f.trim()){Bm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}A(!0);try{if(T>0){s(T,{name:f.trim(),goal:b.trim(),start_date:v,end_date:B}),p();return}await o({group_seq:O,name:f.trim(),goal:b.trim(),start_date:v,end_date:B})&&p()}finally{A(!1)}},_=new Map(d.map(O=>[ni(O.key),O.label])),C=Ht(Kr,{children:i.length===0?Ht(Kr,{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(Om,{children:Ht(Kr,{children:g.length===0?oi(Kr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ht(Yk,{sx:{fontSize:48,color:"#d9d9d6"}}),Ht(Kr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):g.map(O=>oi(Kr,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[oi(Kr,{sx:{minWidth:0},children:[oi(Kr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Ht(Kr,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:O.name}),Ht(Kr,{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"}),oi(Kr,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Rm(O.start_date)," ~"," ",Rm(O.end_date)]})]}),O.goal?Ht(Kr,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:O.goal}):null]}),oi(Kr,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ht(Mm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:O.status,options:Zk.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(Tm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(O),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Ht(Xk,{sx:{fontSize:18}})}),Ht(Tm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(O.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ht(pr,{style:{width:16,height:16}})})]})]},O.seq))})})});return oi(Om,{children:[Ht(Cm,{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(bd,{startIcon:Ht(Gk,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Ht(bd,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),Ht(Sm,{open:q!==null,sprint:q,remainingTasks:S,sprints:g,onClose:()=>j(null),onConfirm:O=>{q&&n?.(q.seq,O),j(null)}}),Ht(Cm,{open:x,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(Kr,{sx:{pt:1},children:oi(Kr,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Ht(Mm,{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(Im,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:f,onChange:O=>u(O.target.value)}),Ht(Em,{size:"medium",label:"\uC2DC\uC791\uC77C",value:v,onChange:O=>k(O.target.value)}),Ht(Em,{size:"medium",label:"\uC885\uB8CC\uC77C",value:B,onChange:O=>R(O.target.value)}),Ht(Im,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:b,onChange:O=>m(O.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Ht(bd,{variant:"contained",onClick:()=>{w()},disabled:L,children:T>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as an,Button as Nm,Tooltip as Jk}from"@mui/material";import{FormDialog as Qk}from"@ehfuse/mui-form-dialog";import e6 from"@mui/icons-material/CalendarMonthOutlined";import t6 from"@mui/icons-material/FileUploadOutlined";import r6 from"@mui/icons-material/FileDownloadOutlined";var yd={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."}},Am=Object.values(yd);function Ql(e){return yd[e??"google"]??yd.google}import{jsx as gr,jsxs as gs}from"react/jsx-runtime";function jH({open:e,imports:d=[],onOpenExport:g,onOpenImport:l,onClose:o}){let s=gs(an,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[gs(an,{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:[gr(an,{children:gs(an,{component:"span",children:[gr("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uB2E4\uB978 \uCE98\uB9B0\uB354\uC5D0\uC11C"," ",gr("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uBCF4\uAC8C \uD569\uB2C8\uB2E4."]})}),gr(an,{children:gs(an,{component:"span",children:[gr("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."]})}),gr(an,{children:gr(an,{component:"span",children:"\uB450 \uBC29\uD5A5 \uBAA8\uB450 \uC6D0\uBCF8\uC744 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})})]}),gr(an,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Am.map((r,t)=>gs(an,{sx:{display:"flex",alignItems:"center",gap:2,px:2,py:1.75,borderTop:t>0?"1px solid #f2f2f0":"none"},children:[gr(e6,{sx:{fontSize:22,color:"#787774",flexShrink:0}}),gs(an,{sx:{flex:1,minWidth:0},children:[gr(an,{sx:{fontSize:16,color:"#37352f"},children:r.name}),r.exportBlockedReason??r.importBlockedReason?gr(an,{sx:{fontSize:13.5,color:"#8a6d1d",mt:.25,lineHeight:1.6},children:r.exportBlockedReason??r.importBlockedReason}):null]}),gr(Pm,{label:"\uB0B4\uBCF4\uB0B4\uAE30",icon:gr(t6,{sx:{fontSize:18}}),supported:r.exportSupported,reason:r.exportBlockedReason,onClick:()=>g(r.key)}),gr(Pm,{label:Dm(d,r.key)>0?`\uAC00\uC838\uC624\uAE30 (${Dm(d,r.key)})`:"\uAC00\uC838\uC624\uAE30",icon:gr(r6,{sx:{fontSize:18}}),supported:r.importSupported,reason:r.importBlockedReason,onClick:()=>l(r.key)})]},r.key))})]});return gr(Qk,{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:gr(Nm,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})}})}function Dm(e,d){return e.filter(g=>g.provider===d).length}function Pm({label:e,icon:d,supported:g,reason:l,onClick:o}){let s=gr(an,{component:"span",sx:{flexShrink:0},children:gr(Nm,{size:"medium",variant:"outlined",startIcon:d,disabled:!g,onClick:o,sx:{minWidth:132,whiteSpace:"nowrap"},children:e})});return g?s:gr(Jk,{title:l??"\uC774 \uC11C\uBE44\uC2A4\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",arrow:!0,children:s})}import{useState as Lm}from"react";import{Box as Ir,Button as vd,Divider as i6,IconButton as s6,TextField as a6}from"@mui/material";import{FormDialog as l6}from"@ehfuse/mui-form-dialog";import c6 from"@mui/icons-material/OpenInNewOutlined";import u6 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as d6}from"@ehfuse/alerts";import{Fragment as n6}from"react";import{Fragment as o6,jsx as xd}from"react/jsx-runtime";function sa({text:e}){let d=String(e??"").split("**");return xd(o6,{children:d.map((g,l)=>l%2===1?xd("b",{children:g},l):xd(n6,{children:g},l))})}import{jsx as qt,jsxs as aa}from"react/jsx-runtime";function eW({open:e,imports:d,provider:g,onRegister:l,onRemove:o,onClose:s}){let r=Ql(g),[t,n]=Lm(""),[c,i]=Lm(!1),a=async()=>{let u=t.trim();if(u){i(!0);try{await l(u)&&n("")}finally{i(!1)}}},h=async u=>{await d6({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=aa(Ir,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[aa(Ir,{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(Ir,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),d.length>0?qt(Ir,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:d.map((u,b)=>aa(Ir,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:b>0?"1px solid #efefed":"none"},children:[qt(u6,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),qt(Ir,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.name||r.defaultCalendarName}),qt(s6,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{h(u)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:qt(pr,{sx:{fontSize:18}})})]},u.seq))}):qt(Ir,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),qt(i6,{sx:{my:1,borderColor:"#e6e6e3"}}),qt(Ir,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),aa(Ir,{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(Ir,{children:qt(Ir,{component:"span",children:qt(sa,{text:u})})},u)),qt(Ir,{children:qt(Ir,{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(Ir,{children:qt(Ir,{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(Ir,{children:qt(Ir,{component:"span",children:qt(sa,{text:r.importWarning})})}):null]}),aa(Ir,{sx:{display:"flex",gap:2,alignItems:"center"},children:[qt(a6,{value:t,onChange:u=>n(u.target.value),fullWidth:!0,label:"iCal \uC8FC\uC18C",placeholder:r.importPlaceholder,slotProps:{input:{spellCheck:!1}}}),qt(vd,{variant:"contained",disabled:!t.trim()||c,onClick:()=>{a()},sx:{flexShrink:0},children:c?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return qt(l6,{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(vd,{variant:"outlined",startIcon:qt(c6,{sx:{fontSize:16}}),onClick:()=>window.open(r.homeUrl,"_blank"),children:r.name}),right:qt(vd,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{Box as Mi,Button as la,TextField as f6}from"@mui/material";import{FormDialog as h6}from"@ehfuse/mui-form-dialog";import p6 from"@mui/icons-material/ContentCopyOutlined";import zm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as jm}from"@ehfuse/alerts";import{Fragment as g6,jsx as Or,jsxs as Ri}from"react/jsx-runtime";function m6(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function uW({open:e,feed:d,feedTaskCount:g,provider:l,buildFeedUrl:o,onSubscribe:s,onClose:r}){let t=Ql(l),n=o??m6,c=d.subscribed?n(d.token):"",i=()=>{navigator.clipboard.writeText(c).then(()=>jm("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>jm("\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=Ri(Mi,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ri(Mi,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Or("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C ",t.name,"\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),g===0?Ri(Mi,{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.",Or("br",{}),Or("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?Ri(g6,{children:[Or(f6,{value:c,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Ri(Mi,{sx:{display:"flex",gap:2},children:[Or(la,{variant:"outlined",startIcon:Or(p6,{}),onClick:i,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),t.buildSubscribeUrl?Ri(la,{variant:"contained",startIcon:Or(zm,{}),onClick:a,children:[t.name,"\uC5D0 \uCD94\uAC00"]}):null]}),Ri(Mi,{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=>Or(Mi,{children:Or("span",{children:Or(sa,{text:f})})},f)),Or(Mi,{children:Or("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."})})]})]}):Or(la,{variant:"contained",onClick:s,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Or(h6,{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:Or(la,{variant:"outlined",startIcon:Or(zm,{sx:{fontSize:16}}),onClick:()=>window.open(t.homeUrl,"_blank"),children:t.name}),right:Or(la,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{useEffect as b6,useMemo as wd,useState as _d}from"react";import{Box as ca,Button as y6,Typography as x6}from"@mui/material";import{FormDialog as v6}from"@ehfuse/mui-form-dialog";import{SearchTextField as w6}from"@ehfuse/mui-form-controls";import{TreeView as _6}from"@ehfuse/tree-view";import{Fragment as I6,jsx as Hn,jsxs as E6}from"react/jsx-runtime";function Fm(e){return`${e.name}#${e.seq}`}function k6(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function S6(e){let d=[],g=l=>{for(let o of l.employees??[])d.push(o);for(let o of l.groups??[])g(o)};for(let l of e)g(l);return d}function T6(e,d){return d?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(g=>String(g).toLowerCase().includes(d)):!0}function C6(e){let d=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Fm(e),renderLabel:Hn(ca,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Hn(ca,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:d})})}}function qm(e,d){let g=(e.groups??[]).map(o=>qm(o,d)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>T6(o,d)).map(C6);return g.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...g,...l]}}function B6({groups:e,allEmployees:d,initialSelectedSeqs:g,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=_d(""),n=wd(()=>e.map(i=>qm(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=wd(()=>d.filter(i=>g.includes(i.seq)).map(Fm),[]);return E6(I6,{children:[Hn(ca,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Hn(w6,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Hn(ca,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Hn(_6,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(k6).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function xW({open:e,title:d="\uC9C1\uC6D0 \uC120\uD0DD",hint:g="",groups:l,multiple:o=!1,selectedSeqs:s,confirmText:r="\uD655\uC778",onConfirm:t,onClose:n}){let c=jt(),[i,a]=_d([]),[h,f]=_d(0),u=wd(()=>S6(l),[l]),b=s??[];b6(()=>{e&&(a(b),f(v=>v+1))},[e]);let m=()=>{let v=u.filter(k=>i.includes(k.seq));t(o?v:v.slice(0,1)),n()};return Hn(v6,{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:Hn(ca,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:Hn(B6,{groups:l,allEmployees:u,initialSelectedSeqs:b,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:g?Hn(x6,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:g}):void 0,right:Hn(y6,{variant:"contained",onClick:m,children:r})}})}import{useEffect as Q8,useMemo as _0,useState as ga}from"react";import{Box as jo,Button as k0}from"@mui/material";import{FormDialog as eS}from"@ehfuse/mui-form-dialog";import{LabelSelect as Od}from"@ehfuse/mui-form-controls";import tS from"@mui/icons-material/SpeedOutlined";import{useEffect as M6,useState as R6}from"react";import{Box as ln,Button as O6}from"@mui/material";import{FormDialog as A6}from"@ehfuse/mui-form-dialog";import{LabelSelect as D6,NumberField as $m}from"@ehfuse/mui-form-controls";import P6 from"@ehfuse/overlay-scrollbar";import{jsx as Gr,jsxs as ua}from"react/jsx-runtime";var N6=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function Hm({open:e,capacity:d,employees:g,onClose:l,onSave:o}){let[s,r]=R6(d??go);M6(()=>{e&&r(d??go)},[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 Gr(A6,{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:Gr(O6,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:ua(ln,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Gr(ln,{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."}),ua(ln,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Gr(ln,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),Gr(D6,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:N6,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),ua(ln,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Gr(ln,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),Gr($m,{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))}))})]}),Gr(ln,{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`}),Gr(ln,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),g.length===0?Gr(ln,{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."}):Gr(ln,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Gr(P6,{style:{maxHeight:260},thumb:{width:6},children:g.filter(c=>Number(c.account_seq)>0).map(c=>ua(ln,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[ua(ln,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?Gr(ln,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),Gr(ln,{sx:{width:132,flexShrink:0},children:Gr($m,{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 tc}from"@mui/material";import{Bar as F6,BarChart as q6,CartesianGrid as $6,Cell as H6,ReferenceLine as W6,ResponsiveContainer as U6,Tooltip as V6,XAxis as K6,YAxis as G6}from"recharts";import{Box as L6}from"@mui/material";import{jsx as z6}from"react/jsx-runtime";function Yr({text:e,height:d}){return z6(L6,{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 j6}from"react";var ec="#2f80ed",Wm="#a9c9f5",Oi="#9a9a97",kd="#2e9e6b",lo="#3d7eff",Sd="#c3c8ce",da="#f2a30f",fa={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},bs={...fa,cursor:!1},ys={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>j6("span",{style:{paddingRight:14,color:"#37352f"}},e)};function br(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var jr={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 Wn,jsxs as ha}from"react/jsx-runtime";function Y6(e,d){let g=d.filter(l=>l.sprint_seq===e.seq&&!l.archived&&l.completed);return{points:g.reduce((l,o)=>l+(o.story_points??0),0),count:g.length}}function Um({sprints:e,tasks:d,height:g=200}){let o=[...e].sort((i,a)=>`${i.start_date}|${i.seq}`.localeCompare(`${a.start_date}|${a.seq}`)).map(i=>({sprint:i,...Y6(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?Wn(Yr,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:g}):ha(tc,{sx:br(g),children:[ha(tc,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ha("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?ha("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Wn(tc,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),Wn(tc,{sx:co(g),children:Wn(U6,{width:"100%",height:"100%",children:ha(q6,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[Wn($6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Wn(K6,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),Wn(G6,{tick:{fontSize:13},width:40,allowDecimals:!1}),Wn(V6,{...bs,formatter:i=>`${Number(i??0)}${r}`}),n!==null?Wn(W6,{y:n,stroke:Oi,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,Wn(F6,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>Wn(H6,{fill:i.closed?ec:Wm},i.\uBAA9\uD45C))})]})})})]})}import{useMemo as X6}from"react";import{Box as uo}from"@mui/material";import{CartesianGrid as Z6,Line as Vm,LineChart as J6,ResponsiveContainer as Q6,Tooltip as e8,XAxis as t8,YAxis as r8}from"recharts";import{jsx as cn,jsxs as ii}from"react/jsx-runtime";function Km(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function n8(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function o8(e){return e.slice(5).replace("-",".")}function Gm({sprint:e,tasks:d,todayStr:g,height:l=200,headerLeft:o}){let s=X6(()=>{let a=Km(e.start_date),h=Km(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 b=u.some(D=>(D.story_points??0)>0),m=D=>b?D.story_points??0:1,v=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(n8(D));let R=v,L=v;return{empty:!1,data:B.map((D,N)=>{let q=B.length===1?0:v*(1-N/(B.length-1));return D<=g&&(R-=k.get(D)??0,L=Math.max(0,R)),{\uB0A0\uC9DC:o8(D),\uC774\uC0C1:Math.round(q*10)/10,\uB0A8\uC740\uB7C9:D<=g?Math.max(0,R):null}}),total:v,usePoints:b,last:L}},[e,d,g]);if(!s)return ii(uo,{sx:br(l),children:[o?cn(uo,{sx:jr,children:o}):null,cn(Yr,{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 ii(uo,{sx:br(l),children:[o?cn(uo,{sx:jr,children:o}):null,cn(Yr,{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 ii(uo,{sx:br(l),children:[ii(uo,{sx:jr,children:[o?cn(uo,{sx:{flexShrink:0},children:o}):null,ii(uo,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ii("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),ii("span",{children:["\uD604\uC7AC"," ",cn(uo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),cn(uo,{sx:co(l),children:cn(Q6,{width:"100%",height:"100%",children:ii(J6,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[cn(Z6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),cn(t8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),cn(r8,{tick:{fontSize:13},width:40,allowDecimals:!1}),cn(e8,{...fa,formatter:a=>`${Number(a??0)}${i}`}),cn(Vm,{type:"linear",dataKey:"\uC774\uC0C1",stroke:Oi,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),cn(Vm,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:ec,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}import{useMemo as t0}from"react";import{Box as fo}from"@mui/material";import{Area as Bd,AreaChart as l8,CartesianGrid as c8,Legend as u8,ResponsiveContainer as d8,Tooltip as f8,XAxis as h8,YAxis as p8}from"recharts";function Lo(e){let d=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function rc(e,d=new Date){let g=new Date(d);return g.setMonth(g.getMonth()-e),g}function GW(e=new Date){return{fromDate:Lo(rc(1,e)),toDate:Lo(e)}}var Cd=864e5,pa=[0,1,2,3,5,8,13,21];function Zm(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function Td(e){let d=String(e??"").trim(),g=/^(\d{4}-\d{2}-\d{2})(?:[ T](\d{2}:\d{2}))?/.exec(d);if(!g)return null;let l=new Date(`${g[1]}T${g[2]??"00:00"}:00`).getTime();return Number.isNaN(l)?null:l}function xs(e){let d=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(d)?d.slice(0,10):""}function i8(e){let d=xs(e.created_time)||xs(e.start_date)||xs(e.completed_time);if(!d)return null;let g=xs(e.start_date),l=g&&g>d?g:d,o=e.completed?xs(e.completed_time)||d:"";return{created:d,started:l,done:o}}function Jm(e,d){let g=/^\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(Lo(new Date(g.getTime()-s*Cd)));return o}function Qm(e,d,g){let l=Jm(d,g),o=e.filter(Zm).map(i8).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 s8(e,d){if(e.length===0)return 0;let g=Math.min(e.length-1,Math.max(0,Math.ceil(e.length*d)-1));return e[g]}function Ym(e){if(e.length===0)return null;let d=[...e].sort((s,r)=>s-r),g=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:g(o),average:g(d.reduce((s,r)=>s+r,0)/d.length),p85:g(s8(d,.85))}}function Xm(e){for(let d=pa.length-1;d>=0;d-=1)if(e>=pa[d])return d;return 0}function a8(){return pa.map((e,d)=>d===pa.length-1?`${e}\uC77C+`:`${e}~${pa[d+1]}\uC77C`)}function e0(e,d,g){let l=Jm(d,g),o=l[0],s=l[l.length-1],r=a8(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!Zm(a)||!a.completed)continue;let h=xs(a.completed_time);if(!h||h<o||h>s)continue;let f=Td(a.completed_time),u=Td(a.created_time);if(f===null||u===null)continue;let b=Math.max(0,(f-u)/Cd);c.push(b),t[Xm(b)]+=1;let m=Td(a.start_date);if(m===null||m>f)continue;let v=Math.max(0,(f-Math.max(m,u))/Cd);i.push(v),n[Xm(v)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:Ym(c),cycle:Ym(i)}}import{jsx as Xr,jsxs as si}from"react/jsx-runtime";function m8(e){return e.slice(5).replace("-",".")}function r0({tasks:e,todayStr:d,days:g=30,height:l=220,headerLeft:o}){let s=t0(()=>Qm(e,g,d),[e,g,d]),r=t0(()=>s.points.map(n=>({\uB0A0\uC9DC:m8(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=si(fo,{sx:jr,children:[o?Xr(fo,{sx:{flexShrink:0},children:o}):null,si(fo,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[si(fo,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[si("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),si("span",{children:["\uC9C4\uD589 \uC911"," ",Xr(fo,{component:"span",sx:{color:lo,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),Xr(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?si(fo,{sx:br(l),children:[o?Xr(fo,{sx:jr,children:o}):null,Xr(Yr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):si(fo,{sx:br(l),children:[t,Xr(fo,{sx:co(l),children:Xr(d8,{width:"100%",height:"100%",children:si(l8,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[Xr(c8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Xr(h8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),Xr(p8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Xr(f8,{...fa,formatter:n=>`${Number(n??0)}\uAC74`}),Xr(u8,{...ys}),Xr(Bd,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:kd,fill:kd,fillOpacity:.9}),Xr(Bd,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:lo,fill:lo,fillOpacity:.85}),Xr(Bd,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:Sd,fill:Sd,fillOpacity:.9})]})})})]})}import{useMemo as n0}from"react";import{Box as un}from"@mui/material";import{Bar as o0,BarChart as g8,CartesianGrid as b8,Legend as y8,ResponsiveContainer as x8,Tooltip as v8,XAxis as w8,YAxis as _8}from"recharts";import{jsx as Er,jsxs as Bn}from"react/jsx-runtime";function i0({label:e,color:d,summary:g}){let l=Bn(un,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Er(un,{sx:{width:10,height:10,borderRadius:.5,bgcolor:d,flexShrink:0}}),Er(un,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return g?Bn(un,{sx:{display:"contents"},children:[l,Bn("span",{children:[g.count,"\uAC74"]}),Bn("span",{children:["\uC911\uC559\uAC12"," ",Er(un,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:g.median}),"\uC77C"]}),Bn("span",{children:["\uD3C9\uADE0 ",g.average,"\uC77C"]}),Bn("span",{children:["85% ",g.p85,"\uC77C \uC774\uB0B4"]})]}):Bn(un,{sx:{display:"contents"},children:[l,Er(un,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function s0({tasks:e,todayStr:d,days:g=30,height:l=200,headerLeft:o}){let s=n0(()=>e0(e,g,d),[e,g,d]),r=n0(()=>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(un,{sx:br(l),children:[Bn(un,{sx:jr,children:[o?Er(un,{sx:{flexShrink:0},children:o}):null,Bn(un,{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:[Er(i0,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:lo,summary:s.lead}),Er(i0,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:da,summary:s.cycle})]})]}),Er(un,{sx:co(l),children:Er(x8,{width:"100%",height:"100%",children:Bn(g8,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[Er(b8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Er(w8,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),Er(_8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Er(v8,{...bs,formatter:t=>`${Number(t??0)}\uAC74`}),Er(y8,{...ys}),Er(o0,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:lo,radius:[3,3,0,0]}),Er(o0,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:da,radius:[3,3,0,0]})]})})})]}):Bn(un,{sx:br(l),children:[o?Er(un,{sx:jr,children:o}):null,Er(Yr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}import{useMemo as u0}from"react";import{Box as Ai}from"@mui/material";import{Bar as Ed,BarChart as B8,CartesianGrid as I8,Cell as E8,Legend as M8,ReferenceLine as d0,ResponsiveContainer as R8,Tooltip as O8,XAxis as A8,YAxis as D8}from"recharts";function k8(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let g=new Date(`${e}T00:00:00`).getTime(),l=new Date(`${d}T00:00:00`).getTime();return Number.isNaN(g)||Number.isNaN(l)?null:Math.round((l-g)/864e5)}function S8(e,d,g){let l=String(e.due_date??"").slice(0,10),o=k8(d,l);return o===null?"later":o<0?"overdue":o<=g?"soon":"later"}function nc(e,d){let{todayStr:g,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=d,t=r??go,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[S8(i,g,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=T8(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 oc(e,d){return e.filter(g=>g.completed||g.archived||g.is_notice||g.is_event||g.linked_only?!1:Number(g.manager_account_seq??0)===d).sort((g,l)=>{let o=String(g.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(g.title??"").localeCompare(String(l.title??""))})}function T8(e,d){if(!(e>0))return 0;let g=Math.max(0,Math.floor(Number(d.by_account?.[e])||0));return g>0?g:Math.max(0,Math.floor(Number(d.default_capacity)||0))}function ic(e){return e.capacity>0&&e.load>e.capacity}function a0(e,d){return d>0&&e.total>=d}function l0(e){let d=e.filter(g=>g.accountSeq>0);return d.length===0?0:d.reduce((g,l)=>g+l.total,0)/d.length}function Id(e,d){let g=new Date(`${e}T00:00:00`);g.setDate(g.getDate()+d);let l=o=>String(o).padStart(2,"0");return`${g.getFullYear()}-${l(g.getMonth()+1)}-${l(g.getDate())}`}function C8(e){let d=new Date(`${e}T00:00:00`);if(Number.isNaN(d.getTime()))return e;let g=(d.getDay()+6)%7;return Id(e,-g)}function c0(e,d){let{todayStr:g,includeUnassigned:l=!0,weeks:o=6,limit:s}=d,r=C8(g),t=Array.from({length:Math.max(1,o)},(f,u)=>{let b=Id(r,u*7),m=Id(b,6),[,v,k]=b.split("-");return{start:b,end:m,label:`${Number(v)}/${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 b=u?String(f.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",m=c.get(u)??{accountSeq:u,name:b,overdue:0,byWeek:new Array(t.length).fill(0),noDue:0,total:0,beyond:0},v=String(f.due_date??"").slice(0,10);if(m.total+=1,!/^\d{4}-\d{2}-\d{2}$/.test(v))m.noDue+=1;else if(v<g)m.overdue+=1;else if(v>n)m.beyond+=1;else{let k=t.findIndex(B=>v>=B.start&&v<=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 f0,jsx as Mr,jsxs as ai}from"react/jsx-runtime";var ma="#e5484d";function h0({tasks:e,todayStr:d,soonDays:g=7,overloadThreshold:l=0,capacity:o=go,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=u0(()=>nc(e,{todayStr:d,soonDays:g,capacity:o}),[e,d,g,o]),i=u0(()=>l0(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(b=>b.accountSeq>0&&(h?ic(b):a0(b,a))).length;return c.length===0?ai(Ai,{sx:br(s),children:[r?Mr(Ai,{sx:jr,children:r}):null,Mr(Yr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):ai(Ai,{sx:br(s),children:[ai(Ai,{sx:jr,children:[r,ai(Ai,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",Mr("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?ai(f0,{children:["\uC6A9\uB7C9 ",Mr("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?f:""]}):ai(f0,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",Mr("b",{children:a}),"\uAC74"]}),u>0?ai(Ai,{component:"span",sx:{ml:1,color:ma,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),Mr(Ai,{sx:co(s),children:Mr(R8,{width:"100%",height:"100%",children:ai(B8,{data:c,layout:"vertical",onClick:n?b=>{let m=c.find(v=>v.name===String(b?.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:[Mr(I8,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),Mr(A8,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),Mr(D8,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),Mr(O8,{...bs,formatter:(b,m)=>[`${Number(b)||0}\uAC74`,String(m)],labelFormatter:b=>{let m=c.find(v=>v.name===b);return!m||!(m.capacity>0)?String(b):`${b} \u2014 \uC6A9\uB7C9 ${m.capacity}${f} \uC911 ${m.load} (${Math.round(m.ratio*100)}%)`}}),Mr(M8,{...ys}),i>0?Mr(d0,{x:i,stroke:Oi,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:Oi}}):null,o.default_capacity>0?Mr(d0,{x:o.default_capacity,stroke:ma,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:ma}}):null,Mr(Ed,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:ma}),Mr(Ed,{dataKey:"soon",name:`\uC784\uBC15(${g}\uC77C)`,stackId:"load",fill:da}),Mr(Ed,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:lo,radius:[0,3,3,0],children:c.map(b=>Mr(E8,{fill:h&&ic(b)?ma:lo,fillOpacity:h&&ic(b)?.45:1,stroke:b.accountSeq===t?"#37352f":void 0,strokeWidth:b.accountSeq===t?1.5:0},b.accountSeq))})]})})})]})}import{useEffect as $8,useState as H8}from"react";import{Box as W8,Button as U8}from"@mui/material";import{FormDialog as V8}from"@ehfuse/mui-form-dialog";import{useState as P8}from"react";import{Box as yr,Button as N8,Menu as L8,MenuItem as z8}from"@mui/material";import j8 from"@mui/icons-material/PersonOutlineOutlined";import F8 from"@ehfuse/overlay-scrollbar";import{jsx as Ar,jsxs as zo}from"react/jsx-runtime";var p0=56,m0=68,g0=96;function q8(e){let d=String(e.due_date??"").slice(0,10);return d?d.slice(5).replace("-","/"):"-"}function b0(e,d){let g=String(e.due_date??"").slice(0,10);return!!g&&g<d}function y0({tasks:e,row:d,todayStr:g,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=P8(null),a=oc(e,d.accountSeq),h=f=>o.find(u=>u.accountSeq===f)?.total??0;return zo(yr,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:zo(yr,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[Ar(yr,{component:"span",sx:{fontWeight:700},children:d.name}),zo(yr,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),d.capacity>0?zo(yr,{component:"span",sx:{color:d.load>d.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",d.capacity," \uC911 ",d.load]}):null]}),zo(yr,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[zo(yr,{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:[Ar(yr,{sx:{width:p0,flexShrink:0},children:"\uB9C8\uAC10"}),Ar(yr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Ar(yr,{sx:{width:m0,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?Ar(yr,{sx:{width:g0,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),Ar(yr,{sx:{flex:1,minHeight:0},children:Ar(F8,{style:{height:"100%"},thumb:{width:6},children:a.length===0?Ar(yr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(f=>zo(yr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[Ar(yr,{sx:{width:p0,flexShrink:0,fontSize:13.5,color:b0(f,g)?"#e5484d":"#787774",fontWeight:b0(f,g)?700:400},children:q8(f)}),Ar(yr,{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}),Ar(yr,{sx:{width:m0,flexShrink:0,display:"flex",justifyContent:"center"},children:Ar(Hr,{priority:f.priority})}),t?Ar(yr,{sx:{width:g0,flexShrink:0,display:"flex",justifyContent:"center"},children:Ar(N8,{size:"small",variant:"outlined",startIcon:Ar(j8,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:f.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},f.seq))})})]}),Ar(L8,{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=>zo(z8,{onClick:()=>{c&&t&&t(c.taskSeq,Number(f.account_seq),f.name),i(null)},sx:{fontSize:14,minWidth:200},children:[Ar(yr,{sx:{flex:1},children:f.name}),zo(yr,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(f.account_seq)),"\uAC74"]})]},f.account_seq))})]})}import{jsx as sc}from"react/jsx-runtime";function x0({open:e,row:d,rows:g,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=H8(d);$8(()=>{d&&i(d)},[d]);let a=d??c,h=a?oc(l,a.accountSeq).length:0;return sc(V8,{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:sc(U8,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:sc(W8,{sx:{minHeight:0},children:a?sc(y0,{tasks:l,row:a,rows:g,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}import{useMemo as K8}from"react";import{Box as gn,Tooltip as G8}from"@mui/material";import{OverlayScrollbar as Y8}from"@ehfuse/overlay-scrollbar";import{jsx as Zr,jsxs as lc}from"react/jsx-runtime";var v0="#e5484d",X8="#2f80ed",Z8="#9a9a97",Md=30,J8=96,ac=56;function Rd({count:e,max:d,color:g,title:l}){let o=e>0&&d>0?.18+e/d*.72:0;return Zr(G8,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:Zr(gn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:o>0?`${g}${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 w0({tasks:e,todayStr:d,weeks:g=6,height:l=200}){let o=K8(()=>c0(e,{todayStr:d,weeks:g}),[e,d,g]);if(o.rows.length===0)return Zr(gn,{sx:br(l),children:Zr(Yr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${J8}px ${ac}px repeat(${o.weeks.length}, minmax(${ac}px, 1fr)) ${ac}px ${ac}px`,r={height:Md,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 Zr(gn,{sx:br(l),children:Zr(Y8,{style:{height:"100%"},thumb:{width:8},children:lc(gn,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${Md}px repeat(${o.rows.length}, minmax(${Md}px, 1fr))`},children:[Zr(gn,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),Zr(gn,{sx:{...r,color:v0},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>Zr(gn,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),Zr(gn,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),Zr(gn,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>lc(gn,{sx:{display:"contents"},children:[Zr(gn,{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}),Zr(Rd,{count:t.overdue,max:o.maxCell,color:v0,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>Zr(Rd,{count:n,max:o.maxCell,color:X8,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),Zr(Rd,{count:t.noDue,max:o.maxCell,color:Z8,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),lc(gn,{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?lc(gn,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}import{Fragment as S0,jsx as er,jsxs as cc}from"react/jsx-runtime";var T0="min(560px, 62vh)",rS=`calc(${T0} - 4px)`,nS=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function fV({open:e,sprints:d,tasks:g,todayStr:l,showSprintCharts:o,capacity:s=go,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,f]=ga(0),[u,b]=ga(30);Q8(()=>{if(!e)return;let y=d.find(w=>w.status==="active")??d[0],x=d.find(w=>w.seq===i)??y;f(x?.seq??0)},[e]);let m=_0(()=>d.find(y=>y.seq===h)??null,[d,h]),v={height:rS,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=er(Od,{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]=ga("distribution"),L=er(Od,{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]=ga(!1),[N,q]=ga(0),j=_0(()=>nc(g,{todayStr:l,capacity:s}),[g,l,s]),S=j.find(y=>y.accountSeq===N)??null,T=cc(S0,{children:[L,t?er(k0,{size:"small",variant:"outlined",startIcon:er(tS,{sx:{fontSize:18}}),onClick:()=>D(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),P=o??d.length>0,p=er(Od,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:nS,onChange:y=>b(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return cc(S0,{children:[er(eS,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:T0,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(jo,{sx:v,children:er(Um,{sprints:d,tasks:g,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:er(jo,{sx:v,children:m?er(Gm,{sprint:m,tasks:g,todayStr:l,height:"100%",headerLeft:k}):cc(jo,{sx:br("100%"),children:[er(jo,{sx:jr,children:k}),er(Yr,{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(jo,{sx:v,children:er(r0,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:er(jo,{sx:v,children:B==="timeline"?cc(jo,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[er(jo,{sx:jr,children:T}),er(w0,{tasks:g,todayStr:l,height:"100%"})]}):er(h0,{tasks:g,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(jo,{sx:v,children:er(s0,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:er(k0,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),er(x0,{open:N>0,row:S,rows:j,tasks:g,todayStr:l,employees:r,onClose:()=>q(0),onChangeManager:n,onOpenTask:c}),t?er(Hm,{open:A,capacity:s,employees:r,onClose:()=>D(!1),onSave:async y=>{await t(y),D(!1)}}):null]})}import{Checkbox as oS,Divider as iS,Menu as sS,MenuItem as Ad}from"@mui/material";import{jsx as ba,jsxs as C0}from"react/jsx-runtime";function bV({anchorEl:e,candidates:d,selectedNames:g,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return C0(sS,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[d.length===0?ba(Ad,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):d.map(t=>{let n=g.includes(t.name);return C0(Ad,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[ba(oS,{size:"small",checked:n,sx:{p:0}}),ba(Wr,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),ba(iS,{}),ba(Ad,{disabled:g.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as aS}from"react";import{ButtonBase as lS,Menu as cS,MenuItem as uS}from"@mui/material";import dS from"@mui/icons-material/KeyboardArrowDown";import fS from"@mui/icons-material/Check";import{Fragment as hS,jsx as Dd,jsxs as Pd}from"react/jsx-runtime";function TV({value:e,onChange:d,options:g}){let[l,o]=aS(null),s=g??jc,r=jc.find(t=>t.value===e)?.label??"";return Pd(hS,{children:[Pd(lS,{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,Dd(dS,{sx:{fontSize:17,color:"#9a9a97"}})]}),Dd(cS,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>Pd(uS,{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?Dd(fS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}import{Box as uc,ButtonBase as pS}from"@mui/material";import{DateTextField as B0}from"@ehfuse/mui-form-controls";import{jsx as ya,jsxs as I0}from"react/jsx-runtime";var mS=[{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 E0({fromDate:e,toDate:d,onChange:g}){let l=s=>{if(s<=0){g("","");return}g(Lo(rc(s)),Lo(new Date))},o=s=>s<=0?!e&&!d:!e||!d?!1:e===Lo(rc(s))&&d===Lo(new Date);return I0(uc,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[ya(uc,{sx:{display:"flex",alignItems:"center",gap:1.5},children:mS.map(s=>{let r=o(s.months);return ya(pS,{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)})}),I0(uc,{sx:{display:"flex",alignItems:"center",gap:.5},children:[ya(B0,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>g(s.target.value,d),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),ya(uc,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),ya(B0,{value:d,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>g(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as gS}from"@mui/material";import{jsx as M0}from"react/jsx-runtime";function PV({anchorEl:e,fromDate:d,toDate:g,onChange:l,onClose:o}){return M0(gS,{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:M0(E0,{fromDate:d,toDate:g,onChange:l})})}import{Box as bS,ButtonBase as yS,Tab as xS,Tabs as vS}from"@mui/material";import wS from"@mui/icons-material/Checklist";import _S from"@mui/icons-material/Face";import kS from"@mui/icons-material/Publish";import SS from"@mui/icons-material/NotificationsOutlined";import TS from"@mui/icons-material/BugReportOutlined";import CS from"@mui/icons-material/SupportAgentOutlined";import BS from"@mui/icons-material/DescriptionOutlined";import IS from"@mui/icons-material/Inventory2Outlined";import{jsx as In}from"react/jsx-runtime";function R0(e,d){return d>0?`${e} (${d})`:e}var YV=[{id:"my",label:"\uC804\uCCB4",icon:In(wS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:In(_S,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:In(kS,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:In(CS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:In(TS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:In(SS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:In(IS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:In(BS,{sx:{fontSize:18}}),hideCount:!0}];function ES(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 XV({items:e,activeTab:d,counts:g,onChange:l,compact:o=!1}){let s=it(),r=ES(s.tabs),t=e;return o?In(bS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=d===n.id;return In(yS,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Sr(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:R0(n.label,n.hideCount?0:g[n.id]??0)},n.id)})}):In(vS,{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(xS,{value:n.id,label:R0(n.label,n.hideCount?0:g[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}import{useEffect as MS,useMemo as RS,useState as Nd}from"react";import{Divider as dc,ListItemIcon as Jr,Menu as Ld,MenuItem as Rr}from"@mui/material";import OS from"@mui/icons-material/OpenInNewOutlined";import AS from"@mui/icons-material/RestoreFromTrashOutlined";import DS from"@mui/icons-material/Check";import PS from"@mui/icons-material/CheckCircleOutlined";import NS from"@mui/icons-material/RadioButtonUnchecked";import LS from"@mui/icons-material/SendOutlined";import zS from"@mui/icons-material/EventOutlined";import jS from"@mui/icons-material/PersonOutlineOutlined";import FS from"@mui/icons-material/ViewKanbanOutlined";import qS from"@mui/icons-material/ContentCopyOutlined";import $S from"@mui/icons-material/NextPlanOutlined";import HS from"@mui/icons-material/ContentPasteOutlined";import WS from"@mui/icons-material/ShareOutlined";import US from"@mui/icons-material/DirectionsRunOutlined";import O0 from"@mui/icons-material/ChevronRight";import VS from"@mui/icons-material/ArchiveOutlined";import KS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as A0}from"@ehfuse/alerts";import{Fragment as D0,jsx as dt,jsxs as xr}from"react/jsx-runtime";function IK({target:e,onClose:d,customTabs:g,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:b,onArchiveToggle:m,onDelete:v,onRestore:k,onPurge:B}){let R=jt(),L=Kn(),[A,D]=Nd(null),[N,q]=Nd(null),[j,S]=Nd(null);MS(()=>{e||(D(null),q(null),S(null))},[e]);let T=e?.task??null,P=!!T?.is_notice,p=!!T?.is_event,y=T?!xo(T,o):!1,x=!!T?.deleted,w=RS(()=>new Set(g.filter(z=>z.useSprints).map(z=>z.key)),[g]),_=async(z="one")=>{let $=T;if(d(),!$)return;await A0({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?`})&&v($.seq,z)},C=async()=>{let z=T;if(d(),!z)return;await A0({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 xr(D0,{children:[xr(Ld,{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:[xr(Rr,{onClick:()=>{T&&s(T),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(OS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),x?dt(dc,{}):null,x&&k?xr(Rr,{onClick:()=>{T&&k(T.seq),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(AS,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,x&&B?xr(Rr,{onClick:()=>{C()},sx:{fontSize:14,color:"#e5484d"},children:[dt(Jr,{children:dt(pr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,x?null:xr(D0,{children:[xr(Rr,{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:[dt(Jr,{children:T?.completed?dt(NS,{sx:{fontSize:19}}):dt(PS,{sx:{fontSize:19}})}),T?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!P&&t?xr(Rr,{disabled:!(T?.manager_account_seq??0)&&(T?.receiver_account_seqs??[]).length===0,onClick:()=>{T&&t(T),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(LS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:dt(dc,{}),p?null:xr(Rr,{disabled:y,onClick:z=>{T&&D({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[dt(Jr,{children:dt(zS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!P&&!p&&i?xr(Rr,{onClick:()=>{T&&i(T,"manager"),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(jS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:xr(Rr,{disabled:y,onClick:z=>{T&&q({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[dt(Jr,{children:dt(FS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",dt(O0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),dt(dc,{}),h?xr(Rr,{disabled:y,onClick:()=>{T&&h(T.seq),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(qS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,f&&T&&!T.is_event&&!T.is_notice?xr(Rr,{onClick:()=>{T&&f(T.seq),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt($S,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,xr(Rr,{onClick:()=>{T&&(u?u(T):ls(T,R)),d()},sx:{fontSize:14},children:[dt(Jr,{children:R?dt(WS,{sx:{fontSize:19}}):dt(HS,{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??""))&&b?xr(Rr,{onClick:z=>S(z.currentTarget),sx:{fontSize:14},children:[dt(Jr,{children:dt(US,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",dt(O0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,xr(Rr,{onClick:O,disabled:y||!T?.archived&&!(T&&Ha(T)),sx:{fontSize:14},children:[dt(Jr,{children:T?.archived?dt(KS,{sx:{fontSize:19}}):dt(VS,{sx:{fontSize:19}})}),T?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),dt(dc,{}),xr(Rr,{disabled:y,onClick:()=>{_("one")},sx:{fontSize:14,color:"#e5484d"},children:[dt(Jr,{children:dt(pr,{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?xr(Rr,{disabled:y,onClick:()=>{_("series")},sx:{fontSize:14,color:"#e5484d"},children:[dt(Jr,{children:dt(pr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),dt(_n,{anchorEl:A?.anchorEl??null,open:!!A,date:A?.task.due_date??"",reminders:Xn(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)}}),xr(Ld,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{q(null),d()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...L,children:[dt(Rr,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),q(null),d()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),g.filter(z=>!z.archived).map(z=>dt(Rr,{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))]}),dt(Ld,{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=>xr(Rr,{onClick:()=>{T&&b?.(T.seq,z.seq),S(null),d()},sx:{fontSize:14,minWidth:160,gap:1},children:[z.label,(T?.sprint_seq??0)===z.seq?dt(DS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},z.seq))})]})}import{Checkbox as GS,Divider as YS,Menu as XS,MenuItem as P0}from"@mui/material";import{jsx as fc,jsxs as N0}from"react/jsx-runtime";function AK({anchorEl:e,labelOptions:d,selectedKeys:g,onToggle:l,onClear:o,onClose:s}){return N0(XS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[d.map(r=>{let t=g.includes(r.key);return N0(P0,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[fc(GS,{size:"small",checked:t,sx:{p:0}}),fc(Dt,{option:r})]},r.key)}),fc(YS,{}),fc(P0,{disabled:g.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as ZS,Menu as JS,MenuItem as L0}from"@mui/material";import QS from"@mui/icons-material/Check";import eT from"@mui/icons-material/SettingsOutlined";import{jsx as zd,jsxs as jd}from"react/jsx-runtime";function FK(e){let{anchorEl:d,sprints:g,value:l,onSelect:o,onManage:s,onClose:r}=e;return jd(JS,{transitionDuration:0,anchorEl:d,open:!!d,onClose:r,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...g.map(t=>({seq:t.seq,label:kn(t)}))].map(t=>jd(L0,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?zd(QS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),zd(ZS,{}),jd(L0,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[zd(eT,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var tT={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function rT(e){return tT[e]??"tasks"}var j0={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"},z0=["list","calendar","month","card","kanban","sprint","timeline"],nT=["list","kanban"],oT=["list","card"];function HK(e){let d=rT(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:z0,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:nT,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:d,viewOptions:oT,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:z0,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 iT}from"react";import{useKeyboardState as sT}from"@ehfuse/keyboard-state";var F0=[{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 GK(e,d={}){let{enabled:g=!0,views:l}=d,{onCreateTask:o,onFocusSearch:s,onToggleHelp:r,onChangeView:t,onRefresh:n,onEscape:c}=e,i=l?l.join(","):"",a=iT(()=>{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 q0(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]);sT(g?a:[])}function q0(e){if(!e)return F0;let d=new Set(e);return F0.filter(g=>d.has(g.view))}function xa(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...q0(e).map(d=>({keys:d.key.split(" ").map(g=>g.toUpperCase()).join(" \u2192 "),description:`${j0[d.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var YK=xa();import{Box as va,Button as aT}from"@mui/material";import lT from"@mui/icons-material/ArrowRightAlt";import{FormDialog as cT}from"@ehfuse/mui-form-dialog";import{jsx as li,jsxs as $0}from"react/jsx-runtime";function uT({keys:e}){return li(va,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((d,g)=>$0(va,{sx:{display:"flex",alignItems:"center",gap:.5},children:[g>0?li(lT,{sx:{fontSize:18,color:"#9a9a97"}}):null,li(va,{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}-${g}`))})}function tG({open:e,onClose:d,views:g}){let l=xa(g);return li(cT,{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:li(va,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>$0(va,{sx:{display:"contents"},children:[li(uT,{keys:o.keys}),li("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:li(aT,{variant:"contained",onClick:d,children:"\uB2EB\uAE30"})}})}import{Fragment as pc,useEffect as dT,useState as fT}from"react";import{Box as tr,Button as hT}from"@mui/material";import pT from"@mui/icons-material/ArrowRightAlt";import mT from"@mui/icons-material/ArrowForwardRounded";import gT from"@mui/icons-material/ChevronRightRounded";import{FormDialog as bT}from"@ehfuse/mui-form-dialog";var H0={id:"concept",tabTitle:"\uAC1C\uB150",intro:"\uC5C5\uBB34\uD568\uC740 '\uB204\uAC00 \uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD558\uB294\uC9C0'\uB97C \uD55C \uACF3\uC5D0 \uBAA8\uC73C\uB294 \uB3C4\uAD6C\uC785\uB2C8\uB2E4. \uBA54\uC2E0\uC800\uC5D0 \uD769\uC5B4\uC9C4 \uC9C0\uC2DC\uC640 \uC5D1\uC140\uC5D0 \uC801\uC5B4 \uB454 \uAE30\uD55C \uB300\uC2E0, \uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C\uACFC \uBC1B\uC740 \uC0AC\uB78C\uC774 \uAC19\uC740 \uD654\uBA74\uC744 \uBD05\uB2C8\uB2E4.",topics:[{title:"\uC138 \uAC78\uC74C\uC774\uBA74 \uB05D",lead:"\uC5C5\uBB34 \uD558\uB098\uC758 \uC0DD\uC560\uB294 \uC774 \uC138 \uAC78\uC74C\uC785\uB2C8\uB2E4. \uB098\uBA38\uC9C0 \uAE30\uB2A5\uC740 \uC804\uBD80 \uC774 \uD750\uB984\uC744 \uB3D5\uB294 \uAC83\uC774\uB77C, \uC774\uAC83\uB9CC \uC54C\uBA74 \uCCAB\uB0A0\uBD80\uD130 \uC501\uB2C8\uB2E4.",steps:[{title:"\uB4F1\uB85D",desc:"\uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uAE30\uD55C\uB9CC \uC801\uC5B4 \uBCF4\uB0C5\uB2C8\uB2E4."},{title:"\uD655\uC778",desc:"\uBC1B\uC740 \uC0AC\uB78C\uC774 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC\uD569\uB2C8\uB2E4."},{title:"\uBCF4\uAD00",desc:"\uB05D\uB09C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC5D0 \uB0A8\uC544 \uC5B8\uC81C\uB4E0 \uB2E4\uC2DC \uCC3E\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5C5\uBB34\uB97C \uB458\uB7EC\uC2FC \uC138 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C \uD558\uB098, \uBC1B\uC740 \uC0AC\uB78C \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC138 \uC5ED\uD560\uC774 \uBAA8\uB450 '\uAD00\uC5EC\uC790'\uC774\uACE0, \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uB294 **\uC5ED\uD560** \uD0ED\uC5D0 \uBAA8\uC544 \uB450\uC5C8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"\uC5C5\uBB34\uB97C \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uD55C \uBA85)."},{term:"\uCC38\uC870\uC790",desc:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85)."}]},{title:"\uBC1B\uC740 \uC5C5\uBB34\uC640 \uBCF4\uB0B8 \uC5C5\uBB34",lead:"\uD0ED\uC740 '\uB0B4\uAC00 \uBC1B\uC740 \uAC83'\uACFC '\uB0B4\uAC00 \uBCF4\uB0B8 \uAC83'\uC744 \uAC00\uB974\uB294 \uCD95\uC785\uB2C8\uB2E4. \uB0A8\uC774 \uC2DC\uD0A8 \uC77C\uACFC \uB0B4\uAC00 \uC2DC\uD0A8 \uC77C\uC774 \uC11E\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",items:[{term:"\uB0B4 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uC778 \uC5C5\uBB34 \u2014 \uBC1B\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uBCF4\uB0B8 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uC804\uCCB4",desc:"\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."},{term:"\uACF5\uC9C0\uC0AC\uD56D",desc:"\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."},{term:"\uBCF4\uAD00\uD568",desc:'\uB05D\uB098\uC11C \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815\uACFC \uD734\uC9C0\uD1B5. "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uAD6C\uBD84\uC744 \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.'}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",subtitle:"\uC138 \uAC00\uC9C0 \uB2E4\uB978 \uB9D0",lead:"\uB2E4\uC2DC \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uB418\uB294 \uC774\uC720\uAC00 \uC5EC\uAE30 \uC788\uC2B5\uB2C8\uB2E4. \uC77D\uC5C8\uB294\uC9C0, \uB05D\uB0AC\uB294\uC9C0, \uAC80\uC218\uD588\uB294\uC9C0\uAC00 \uAC01\uAC01 \uD45C\uC2DC\uB85C \uB0A8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uD655\uC778",desc:'"\uC77D\uC5C8\uB2E4". \uBC1B\uC740 \uC0AC\uB78C\uC774 **\uD655\uC778** \uBC84\uD2BC\uC744 \uB20C\uB7EC \uB0A8\uAE41\uB2C8\uB2E4. \uC544\uC9C1 \uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.'},{term:"\uC644\uB8CC",desc:'"\uB05D\uB0AC\uB2E4". \uCC45\uC784\uC790\uB098 \uC791\uC131\uC790\uAC00 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4.'},{term:"\uAC80\uC218\uC644\uB8CC",desc:'"\uBD24\uB2E4, \uAD1C\uCC2E\uB2E4". \uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uACE0, \uC791\uC131\uC790\uAC00 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098 \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**.'}]},{title:"\uB450 \uAC1C\uC758 \uB0A0\uC9DC",lead:"\uC5C5\uBB34\uC5D0\uB294 \uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815 \uB450 \uB0A0\uC9DC\uAC00 \uC788\uACE0, \uC54C\uB9BC\uACFC \uCE98\uB9B0\uB354\uB294 \uC804\uBD80 \uC774 \uB458\uC744 \uAE30\uC900\uC73C\uB85C \uC6C0\uC9C1\uC785\uB2C8\uB2E4.",items:[{term:"\uC2DC\uC791\uC77C\uC2DC",desc:"\uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4. \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4."},{term:"\uB9C8\uAC10\uC608\uC815",desc:"\uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\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."}]}]};var W0={id:"roles",tabTitle:"\uC5ED\uD560",intro:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C(\uC791\uC131\uC790) \uD558\uB098, \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uCC45\uC784\uC790) \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uCC38\uC870\uC790)\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC14B \uB2E4 '\uAD00\uC5EC\uC790'\uB77C\uC11C \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uAC00 \uC774 \uD0ED\uC758 \uB0B4\uC6A9\uC785\uB2C8\uB2E4.",topics:[{title:"\uC791\uC131\uC790",subtitle:"\uC5C5\uBB34\uC758 \uC8FC\uC778",lead:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC815\uD558\uACE0 \uACB0\uACFC\uB97C \uAC80\uC218\uD558\uB294 \uC790\uB9AC\uB77C, \uC5C5\uBB34\uB97C \uC5C6\uC568 \uC218 \uC788\uB294 \uC720\uC77C\uD55C \uC5ED\uD560\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD560\uC9C0 \uC801\uC5B4 \uCC45\uC784\uC790\uC5D0\uAC8C \uBCF4\uB0C5\uB2C8\uB2E4. \uB05D\uB09C \uB4A4 \uACB0\uACFC\uB97C \uBCF4\uACE0 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098, \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**."},{term:"\uC218\uC815",desc:"\uC81C\uBAA9\xB7\uAE30\uD55C\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uB0B4\uC6A9 \uC804\uBD80 \uACE0\uCE69\uB2C8\uB2E4. \uBC14\uAFBC \uB0B4\uC6A9\uC740 \uC7A0\uC2DC \uBAA8\uC544 \uD55C \uAC74\uC758 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC644\uB8CC",desc:"\uC9C1\uC811 \uC644\uB8CC \uCCB4\uD06C\uB97C \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBCF8\uC778\uC774 \uC644\uB8CC\uD558\uBA74 \uAC80\uC218 \uB2E8\uACC4\uAC00 \uC5C6\uC5B4 \uADF8\uB300\uB85C \uB05D\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB97C **\uAC80\uC218 \uB300\uAE30\uC778 \uB3D9\uC548\uB9CC** \uC0AC\uC720\uC640 \uD568\uAED8 \uB418\uB3CC\uB9BD\uB2C8\uB2E4. \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790 \uBCF8\uC778\uB9CC \uC0AD\uC81C\uD569\uB2C8\uB2E4(\uAD00\uB9AC\uC790 \uAD8C\uD55C\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB985\uB2C8\uB2E4). \uC0AD\uC81C\uD55C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC758 \uD734\uC9C0\uD1B5\uC5D0 \uB0A8\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC5D0\uC11C **\uBE60\uC9D1\uB2C8\uB2E4** \u2014 \uB0B4\uAC00 \uC4F4 \uAE00\uC744 \uB0B4\uAC00 \uC77D\uC5C8\uB2E4\uACE0 \uB0A8\uAE38 \uC77C\uC740 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uCC45\uC784\uC790",subtitle:"\uBC1B\uC544\uC11C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB97C \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uB97C \uBC1B\uC73C\uBA74 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uC54C\uB9BC\uC774 \uC624\uACE0, \uBAA9\uB85D\uC5D0\uC11C\uB294 '\uB0B4 \uC5C5\uBB34'\uB85C \uBAA8\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4. \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB118\uC5B4\uAC11\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:'**\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C "\uC77D\uC5C8\uB2E4"\uB97C \uB0A8\uAE41\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.'},{term:"\uC218\uC815",desc:"\uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uC9C4\uD589\uD558\uB2E4 \uBCF4\uBA74 \uAE30\uD55C\xB7\uB0B4\uC6A9\uC774 \uB2EC\uB77C\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uC0C1\uD0DC\xB7\uBE44\uACE0\xB7\uD560\uC77C\uB3C4 \uBAA9\uB85D\uC5D0\uC11C \uBC14\uB85C \uACE0\uCE69\uB2C8\uB2E4."},{term:"\uD560\uC77C\uB85C \uB098\uB204\uAE30",desc:"\uD070 \uC5C5\uBB34\uB294 \uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8)\uB85C \uCABC\uAC1C\uACE0, \uD544\uC694\uD558\uBA74 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE41\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB0A8\uC774 \uB9E1\uAE34 \uC77C\uC744 \uBC1B\uC740 \uCABD\uC774 \uC5C6\uC568 \uC218\uB294 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4 \u2014 \uB418\uB3CC\uB9B4 \uC77C\uC774\uBA74 \uB313\uAE00\uB85C \uC54C\uB9BD\uB2C8\uB2E4."},{term:"\uD55C \uBA85\uBFD0",desc:"\uCC45\uC784\uC790\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5EC\uB7FF\uC774 \uB098\uB220\uC57C \uD558\uB294 \uC77C\uC740 \uD560\uC77C\uB85C \uCABC\uAC1C\uAC70\uB098 \uC5C5\uBB34\uB97C \uB098\uB220 \uB4F1\uB85D\uD569\uB2C8\uB2E4."}]},{title:"\uCC38\uC870\uC790",subtitle:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4",lead:"\uC9C1\uC811 \uCC98\uB9AC\uD558\uC9C0\uB294 \uC54A\uC9C0\uB9CC \uB0B4\uC6A9\uC744 \uC54C\uC544\uC57C \uD558\uB294 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4. \uC5EC\uB7EC \uBA85\uC744 \uB458 \uC218 \uC788\uACE0, \uC77D\uC5C8\uB2E4\uB294 \uD45C\uC2DC\uB9CC \uB0A8\uAE41\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uC77D\uACE0 \uD544\uC694\uD558\uBA74 \uB313\uAE00\uB85C \uC758\uACAC\uC744 \uB2F5\uB2C8\uB2E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC785\uB2C8\uB2E4. \uCC38\uC870\uC790\uC758 \uD655\uC778\uC740 \uC54C\uB9BC\uC744 \uB9CC\uB4E4\uC9C0 \uC54A\uACE0 \uD655\uC778 \uD604\uD669(n/m)\uC5D0\uB9CC \uBC18\uC601\uB429\uB2C8\uB2E4 \u2014 \uC0AC\uB78C\uC774 \uB9CE\uC544 \uC54C\uB9BC\uC774 \uC2DC\uB044\uB7EC\uC6CC\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uAD00\uC5EC\uC790\uB77C\uC11C). \uB2E4\uB9CC \uC644\uB8CC \uCCB4\uD06C\uB294 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uB204\uB985\uB2C8\uB2E4."},{term:"\uC644\uB8CC \xB7 \uC0AD\uC81C",desc:"\uB458 \uB2E4 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uCC38\uC870\uB294 '\uBCF4\uB294 \uC790\uB9AC'\uC785\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uC54C\uB9BC",desc:"\uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB9C8\uAC10 \uACC4\uC5F4 \uC54C\uB9BC\uC740 \uCC45\uC784\uC790\xB7\uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4(\uCC38\uC870\uC790\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4)."}]},{title:"\uAD8C\uD55C \uD55C\uB208\uC5D0",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBCF4\uACE0 \uC788\uC5B4\uB3C4 \uB204\uB97C \uC218 \uC788\uB294 \uBC84\uD2BC\uC774 \uB2E4\uB985\uB2C8\uB2E4. \uBC84\uD2BC\uC774 \uC548 \uBCF4\uC774\uBA74 \uAD8C\uD55C\uC774 \uC5C6\uB294 \uAC83\uC785\uB2C8\uB2E4(\uC7A0\uAE34 \uCC44\uB85C \uBCF4\uC774\uC9C0 \uC54A\uACE0 \uC544\uC608 \uC228\uC2B5\uB2C8\uB2E4).",items:[{term:"\uC218\uC815",desc:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790 \u2014 \uAD00\uC5EC\uC790 \uC804\uC6D0. \uAD00\uC5EC\uC790\uAC00 \uC544\uB2C8\uBA74 \uC5F4\uB78C\uB9CC \uB429\uB2C8\uB2E4."},{term:"\uC644\uB8CC \xB7 \uC644\uB8CC \uD574\uC81C",desc:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790."},{term:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",desc:"\uC791\uC131\uC790\uB9CC. \uB0A8\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uAC00 \uAC80\uC218 \uB300\uAE30\uC77C \uB54C\uB9CC \uB098\uC635\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790\uB9CC."},{term:"\uD655\uC778",desc:"\uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790 \u2014 \uC791\uC131\uC790\uB294 \uC81C\uC678."},{term:"\uB313\uAE00",desc:"\uBCFC \uC218 \uC788\uB294 \uC0AC\uB78C \uB204\uAD6C\uB098."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D\uC740 \uADDC\uCE59\uC774 \uB2E4\uB985\uB2C8\uB2E4",lead:"\uACF5\uC9C0\uB294 '\uB9E1\uAE30\uB294 \uC77C'\uC774 \uC544\uB2C8\uB77C '\uC54C\uB9AC\uB294 \uAE00'\uC774\uB77C \uCC45\uC784\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC0C1\uC790\uAC00 \uACE7 \uC77D\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uACF5\uC9C0\uB97C \uC62C\uB9B0 \uC0AC\uB78C. \uC218\uC815\xB7\uAC8C\uC2DC\uC885\uB8CC\xB7\uC0AD\uC81C\uB97C \uD63C\uC790 \uB9E1\uC2B5\uB2C8\uB2E4(\uAD00\uB9AC\uC790\uB3C4 \uB0A8\uC758 \uACF5\uC9C0\uB294 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)."},{term:"\uB300\uC0C1\uC790",desc:"\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE30\uACE0, \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uB204\uAC00 \uC548 \uC77D\uC5C8\uB294\uC9C0 \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC54C\uB9BC",desc:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD574\uB3C4 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC804 \uC9C1\uC6D0 \uACF5\uC9C0\uB77C\uBA74 \uC54C\uB9BC\uC774 \uC0AC\uB78C \uC218\uB9CC\uD07C \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uACE0\uAC1D\uC13C\uD130 \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uAC00 \uC678\uBD80\uC785\uB2C8\uB2E4",feature:"support",lead:"\uAC00\uB9F9\uC810\xB7\uD648\uD398\uC774\uC9C0\uC5D0\uC11C \uB4E4\uC5B4\uC628 \uBB38\uC758\uB294 \uC791\uC131\uC790\uAC00 \uC6B0\uB9AC \uC9C1\uC6D0\uC774 \uC544\uB2C8\uB77C, \uAD00\uC5EC\uC790 \uADDC\uCE59\uC744 \uADF8\uB300\uB85C \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uBB38\uC758\uB97C \uB0A8\uAE34 \uACE0\uAC1D(\uC9C1\uC6D0 \uBA85\uBD80\uC5D0 \uC5C6\uB294 \uC678\uBD80 \uACC4\uC815). \uC6B0\uB9AC \uCABD \uAD00\uC5EC\uC790 \uD310\uC815\uC5D0\uC11C\uB294 \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC5F4\uB78C\uD560 \uC218 \uC788\uB294 \uC9C1\uC6D0 \uB204\uAD6C\uB098 \uACE0\uCE69\uB2C8\uB2E4 \u2014 \uAD00\uC5EC\uC790\uAC00 \uC5C6\uC5B4 \uC544\uBB34\uB3C4 \uC190\uB300\uC9C0 \uBABB\uD558\uBA74 \uB2F5\uBCC0\uC744 \uB2EC \uC218 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"**\uAC00\uC838\uAC00\uAE30**\uB85C \uC815\uD574\uC9D1\uB2C8\uB2E4. \uBA3C\uC800 \uC7A1\uC740 \uC0AC\uB78C\uC774 \uB2F5\uBCC0\uC744 \uB9E1\uC2B5\uB2C8\uB2E4."},{term:"\uB2F5\uBCC0",desc:"\uC9C1\uC6D0\uC774 \uB2E8 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4. \uACE0\uAC1D\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0, \uC5C5\uBB34\uD568\uC758 \uB2E4\uB978 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778 \xB7 \uAC80\uC218",desc:"\uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uACE0\uAC1D\uC774 \uD655\uC778 \uBC84\uD2BC\uC744 \uB204\uB97C \uD654\uBA74\uC774 \uC5C6\uC5B4 \uD655\uC778\xB7\uAC80\uC218 \uC6CC\uD06C\uD50C\uB85C\uB97C \uD0DC\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var U0={id:"basics",tabTitle:"\uAE30\uBCF8 \uC0AC\uC6A9",intro:"\uB9E4\uC77C \uC4F0\uB294 \uC870\uC791\uB9CC \uBAA8\uC558\uC2B5\uB2C8\uB2E4. \uAC1C\uB150 \uD0ED\uC758 \uC138 \uAC78\uC74C \uC21C\uC11C \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",topics:[{title:"1. \uB4F1\uB85D\uD558\uAE30",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC(\uB2E8\uCD95\uD0A4 **N**) \u203A \uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uC744 \uC801\uACE0 \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB0B4\uC6A9\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uC911\uC694\uB3C4\uB294 \uD544\uC694\uD560 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** : \uBE44\uACF5\uAC1C(\uAD00\uC5EC\uC790\uB9CC) / \uBD80\uC11C\uACF5\uAC1C / \uC804\uCCB4\uACF5\uAC1C. \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** \uC5C5\uBB34\uB294 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uD68C\uCC28\uB85C \uB9CC\uB4E4\uC5B4\uC9C0\uACE0, **\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\uB77C \uC644\uB8CC \uB300\uC2E0 \uCE98\uB9B0\uB354\uC5D0 \uB193\uC785\uB2C8\uB2E4."]},{title:"2. \uC5F4\uC5B4 \uBCF4\uACE0 \uB300\uD654\uD558\uAE30",lines:["\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD\uC5D0 \uC0C1\uC138\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74). \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uADF8 \uC790\uB9AC\uC5D0\uC11C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","\uC5C5\uBB34 \uB300\uD654\uB294 **\uB313\uAE00**\uB85C \uD569\uB2C8\uB2E4. \uD30C\uC77C\uC744 \uBD99\uC774\uACE0, **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC73C\uB85C \uC77D\uC5C8\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC11C \uB2F5\uAE00 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC5D0\uC11C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 **\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:"3. \uD655\uC778\uD558\uAE30",lines:["\uBC1B\uC740 \uC5C5\uBB34\uB294 **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED(\uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9)\uC5D0 \uBAA8\uC5EC \uC788\uC2B5\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."]},{title:"4. \uC9C4\uD589\uD558\uACE0 \uC644\uB8CC\uD558\uAE30",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4."]},{title:"5. \uAC80\uC218\uD558\uAE30",subtitle:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",lines:["\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC758 \uBAA9\uB85D \uB9E8 \uC704\uC5D0 **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uC2B5\uB2C8\uB2E4(\uC644\uB8CC \uC228\uAE30\uAE30\uC640 \uBB34\uAD00, \uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9).","\uACB0\uACFC\uAC00 \uAD1C\uCC2E\uC73C\uBA74 **\uAC80\uC218\uC644\uB8CC** \uBC84\uD2BC\uC73C\uB85C \uB0B4\uB9BD\uB2C8\uB2E4. \uBBF8\uD761\uD558\uBA74 \uC644\uB8CC \uCCB4\uD06C\uB97C \uD574\uC81C(\uC0C1\uC138\uC758 **\uB418\uB3CC\uB9AC\uAE30**)\uD558\uBA70 \uC0AC\uC720\uB97C \uC801\uC2B5\uB2C8\uB2E4 \u2014 \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0, \uC0C1\uD0DC\uB294 \uC9C4\uD589\uC911\uC73C\uB85C \uB3CC\uC544\uAC00\uACE0, \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.","**\uB418\uB3CC\uB9AC\uAE30\uB294 \uAC80\uC218 \uC804\uC5D0\uB9CC** \uB098\uC635\uB2C8\uB2E4 \u2014 \uAC80\uC218\uC644\uB8CC\uB97C \uB204\uB978 \uB4A4\uC5D0\uB294 \uC0AC\uC720 \uC5C6\uC774 \uB0B4\uB9AC\uB294 **\uC644\uB8CC \uD574\uC81C**\uB85C \uBC14\uB01D\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uAC80\uC218 \uB300\uC0C1\uC774 \uC544\uB2C8\uB77C \uCC98\uC74C\uBD80\uD130 **\uC644\uB8CC \uD574\uC81C**\uC785\uB2C8\uB2E4."]},{title:"6. \uBCF4\uAD00\uD558\uAE30 \xB7 \uC0AD\uC81C\uD558\uAE30",lines:["\uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C) \uB4A4 \uC0C8\uBCBD\uC5D0 \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\uB0B4\uACE0, \uBCF4\uAD00\uD568\uC758 **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","\uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58). \uC9C0\uC6B4 \uC5C5\uBB34\uB294 **\uD734\uC9C0\uD1B5**\uC5D0\uC11C \uB418\uC0B4\uB9B4 \uC218 \uC788\uACE0, \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB294 \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.']}]};var V0={id:"notify",tabTitle:"\uC54C\uB9BC",intro:"\uC54C\uB9BC\uC740 \uBCA8(\uC5C5\uBB34\uD568 \uC548)\uACFC \uC571 \uD478\uC2DC \uB450 \uAC08\uB798\uB85C \uAC11\uB2C8\uB2E4. \uC544\uB798 \uD45C\uC758 '\uBC1B\uB294 \uC0AC\uB78C'\uC5D0 \uC5C6\uC73C\uBA74 \uADF8 \uC77C\uC774 \uC77C\uC5B4\uB098\uB3C4 \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC54C\uB9BC\uC744 \uC904\uC774\uB294 \uCABD\uC73C\uB85C \uC815\uD55C \uADDC\uCE59\uC774 \uB9CE\uC544, \uAD00\uC5EC\uC790\uB77C\uACE0 \uC804\uBD80 \uBC1B\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4.",topics:[{title:"\uC5C5\uBB34\uB97C \uB9E1\uACE0 \uBC1B\uC744 \uB54C",items:[{term:"\uCC45\uC784\uC790\uB85C \uC9C0\uC815",desc:"\uC0C8 **\uCC45\uC784\uC790**\uC5D0\uAC8C. \uCC45\uC784\uC790\uB97C \uBC14\uAFB8\uBA74 \uC0C8 \uCC45\uC784\uC790\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uB85C \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uCC38\uC870\uC790**\uC5D0\uAC8C\uB9CC. \uC6D0\uB798 \uC788\uB358 \uCC38\uC870\uC790\uB294 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791\uC77C\uC2DC \uB3C4\uB2EC",desc:"**\uCC45\uC784\uC790**\uC5D0\uAC8C. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uC790\uB3D9\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC77C\uC815 \uCD08\uB300",desc:"\uC77C\uC815\uC758 **\uCC38\uC11D\uC790**\uC5D0\uAC8C."}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",items:[{term:"\uCC45\uC784\uC790\uAC00 \uD655\uC778",desc:"**\uC791\uC131\uC790**\uC5D0\uAC8C. \uBC1B\uC740 \uC0AC\uB78C\uC774 \uC77D\uC5C8\uB2E4\uB294 \uC2E0\uD638\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uC790\uAC00 \uC5EC\uB7EC \uBA85\uC774\uB77C \uC0AC\uB78C \uC218\uB9CC\uD07C \uC54C\uB9BC\uC774 \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C\uB9CC \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC694\uCCAD(\uB9AC\uB9C8\uC778\uB4DC)",desc:"\uC544\uC9C1 **\uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC. \uC774\uBBF8 \uD655\uC778\uD55C \uC0AC\uB78C\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC644\uB8CC \uCC98\uB9AC",desc:"**\uC791\uC131\uC790 + \uCC38\uC870\uC790**\uC5D0\uAC8C. \uC644\uB8CC\uB97C \uB204\uB978 \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uAC80\uC218\uC644\uB8CC",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC2B9\uC778\uC774 \uC544\uB2C8\uB77C \uC791\uC131\uC790 \uD654\uBA74\uC758 \uD45C\uC2DC\uB97C \uB0B4\uB9AC\uB294 \uAC83\uC77C \uBFD0\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"**\uC644\uB8CC\uB97C \uCC98\uB9AC\uD55C \uC0AC\uB78C**(\uBCF4\uD1B5 \uCC45\uC784\uC790)\uC5D0\uAC8C. \uC0AC\uC720\uAC00 \uD568\uAED8 \uC804\uB2EC\uB418\uACE0 \uB313\uAE00\uB85C\uB3C4 \uB0A8\uC2B5\uB2C8\uB2E4."}]},{title:"\uB9C8\uAC10 \uAD00\uB828",lead:"\uB9C8\uAC10 \uACC4\uC5F4\uC740 \uC804\uBD80 \uCC45\uC784\uC790\uC640 \uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4. \uCC38\uC870\uC790\uB294 \uB9C8\uAC10 \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC54C\uB9BC\uC774 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4.",items:[{term:"\uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uC5C5\uBB34\uB9C8\uB2E4 \uACE0\uB978 \uC2DC\uC810(\uC608: 1\uC77C \uC804)\uC5D0 \uAC11\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uB2F9\uC77C",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uB9C8\uAC10 \uACBD\uACFC(\uC9C0\uC5F0)",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB9C8\uAC10\uC774 \uC9C0\uB0AC\uB294\uB370 \uC644\uB8CC\uB418\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790",desc:"\uC704 \uC14B \uBAA8\uB450 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB313\uAE00 \xB7 \uBC18\uC751",lead:"\uB313\uAE00 \uC54C\uB9BC\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0\uC5D0\uAC8C \uBCF4\uB0B4\uB2E4\uAC00 \uC54C\uB9BC \uD3ED\uC8FC\uB85C \uC904\uC600\uC2B5\uB2C8\uB2E4. \uC9C0\uAE08\uC740 '\uB300\uD654\uC5D0 \uC9C1\uC811 \uC5BD\uD78C \uC0AC\uB78C'\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uB313\uAE00",desc:"\uC5C5\uBB34 **\uC791\uC131\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uC791\uC131\uC790\uAC00 \uC790\uAE30 \uC5C5\uBB34\uC5D0 \uB313\uAE00",desc:"**\uCC45\uC784\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uCC45\uC784\uC790 \uC5C6\uB294 \uC5C5\uBB34\uC758 \uB313\uAE00",desc:"\uC704\uC5D0 \uB354\uD574 **\uCC38\uC870\uC790 \uC804\uC6D0**\uC5D0\uAC8C. \uB204\uAC00 \uB9E1\uC744\uC9C0 \uC815\uD558\uB294 \uB300\uD654\uB77C \uCC38\uC870\uC790\uB4E4\uC774 \uC54C\uC544\uC57C \uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uC815\uD574\uC9C0\uBA74 \uB2E4\uC2DC \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uB313\uAE00 \uC88B\uC544\uC694 \xB7 \uD655\uC778",desc:"\uADF8 **\uB313\uAE00\uC744 \uC4F4 \uC0AC\uB78C**\uC5D0\uAC8C\uB9CC."},{term:"\uACF5\uC9C0 \uB313\uAE00",desc:"**\uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C\uB9CC \u2014 \uB300\uC0C1\uC790\uAC00 \uC804 \uC9C1\uC6D0\uC774\uB77C \uD655\uC7A5 \uADDC\uCE59\uC744 \uC801\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB0B4\uC6A9\uC774 \uBC14\uB014 \uB54C",lead:"\uC218\uC815 \uC54C\uB9BC\uC740 \uACE7\uBC14\uB85C \uBCF4\uB0B4\uC9C0 \uC54A\uACE0, \uD3B8\uC9D1\uC774 \uB05D\uB098 \uC870\uC6A9\uD574\uC9C4 \uB4A4 \uD55C \uAC74\uC73C\uB85C \uBAA8\uC544 \uBCF4\uB0C5\uB2C8\uB2E4 \u2014 \uACE0\uCE58\uB294 \uB3C4\uC911\uC5D0 \uC54C\uB9BC\uC774 \uC5EC\uB7EC \uBC88 \uAC00\uC9C0 \uC54A\uAC8C \uD558\uB824\uB294 \uAC83\uC785\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uC5C5\uBB34 \uC218\uC815",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB204\uAC00 \uACE0\uCCE4\uB4E0 \uB098\uBA38\uC9C0 \uD55C\uCABD\uC774 \uBC1B\uC2B5\uB2C8\uB2E4(\uACE0\uCE5C \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678). \uCC38\uC870\uC790\uB294 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uACF5\uC9C0 \uC218\uC815",desc:"**\uC791\uC131\uC790 + \uB300\uC0C1\uC790**\uC5D0\uAC8C."},{term:"\uD569\uC0B0 \uBC1C\uC1A1",desc:"\uC5EC\uB7EC \uD544\uB4DC\uB97C \uC5F0\uB2EC\uC544 \uACE0\uCCD0\uB3C4 \uD55C \uAC74\uC73C\uB85C \uBB36\uC5EC \uAC11\uB2C8\uB2E4. \uBB34\uC5C7\uC774 \uC5B4\uB5BB\uAC8C \uBC14\uB00C\uC5C8\uB294\uC9C0 \uC694\uC57D\uC774 \uB2F4\uAE41\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uC774 \uC548 \uAC00\uB294 \uBCC0\uACBD",desc:"\uC644\uB8CC \xB7 \uBCF4\uAD00 \xB7 \uC815\uB82C \uC21C\uC11C \xB7 \uCC45\uC784\uC790/\uCC38\uC870\uC790 \uBCC0\uACBD \u2014 \uAC01\uAC01 \uC804\uC6A9 \uC54C\uB9BC\uC774 \uB530\uB85C \uC788\uC5B4 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C\uB294 \uC138\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8) \uBCC0\uACBD",desc:"\uC218\uC815 \uC54C\uB9BC\uACFC \uAC19\uC740 **\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uBB34\uC5C7\uC744 \uCD94\uAC00\xB7\uC0AD\uC81C\xB7\uC218\uC815\uD588\uB294\uC9C0 \uAD6C\uCCB4\uC801\uC73C\uB85C \uB2F4\uAE41\uB2C8\uB2E4. \uCCB4\uD06C\uB9CC \uCF1C\uACE0 \uB044\uAC70\uB098 \uC21C\uC11C\uB9CC \uBC14\uAFB8\uBA74 \uC54C\uB9BC\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D",items:[{term:"\uACF5\uC9C0 \uB4F1\uB85D",desc:"**\uB300\uC0C1\uC790 \uC804\uC6D0**\uC5D0\uAC8C(\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4)."},{term:"\uB300\uC0C1\uC790 \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC."},{term:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uBD05\uB2C8\uB2E4."}]},{title:"\uC54C\uC544 \uB450\uBA74 \uC88B\uC740 \uAC83",items:[{term:"\uB0B4 \uD589\uB3D9\uC740 \uC81C\uC678",desc:"\uB0B4\uAC00 \uB204\uB978 \uC77C\uB85C\uB294 \uB098\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB0B4\uAC00 \uC644\uB8CC\uD588\uC73C\uBA74 \uB098\uB294 \uC644\uB8CC \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC",desc:"\uC2DC\uC791\uC77C\uC2DC\uAC00 \uC544\uC9C1 \uC548 \uB41C \uC5C5\uBB34\uC758 \uCC45\uC784\uC790 \uB300\uC0C1 \uC54C\uB9BC\uC740 \uBCA8\uC5D0\uB9CC \uC313\uC774\uACE0 \uC571 \uD478\uC2DC\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uD478\uC2DC\uAC00 \uC624\uAE30 \uC2DC\uC791\uD569\uB2C8\uB2E4(\uC77C\uC815\xB7\uACF5\uC9C0\uB294 \uC608\uC678 \uC5C6\uC774 \uBC14\uB85C)."},{term:"\uC885\uB958\uBCC4\uB85C \uB044\uAE30",desc:"**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uC218\uC2E0\uC744 \uB055\uB2C8\uB2E4. \uB048 \uC885\uB958\uB294 \uBCA8\xB7\uD478\uC2DC \uBAA8\uB450 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB2E4\uB9CC \uD655\uC778 \uC694\uCCAD\uC740 \uB04C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uD1A1\uC740 \uC5C6\uC74C",desc:"\uC5C5\uBB34\uD568 \uC54C\uB9BC\uC740 \uBCA8\uACFC \uC571 \uD478\uC2DC\uBFD0\uC785\uB2C8\uB2E4 \u2014 \uBB38\uC790\xB7\uC54C\uB9BC\uD1A1\uC73C\uB85C\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var K0={id:"more",tabTitle:"\uB354 \uC54C\uC544\uBCF4\uAE30",intro:"\uC775\uC219\uD574\uC9C4 \uB4A4\uC5D0 \uC4F0\uBA74 \uC88B\uC740 \uAE30\uB2A5\uB4E4\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uB048 \uAE30\uB2A5\uC740 \uC5EC\uAE30\uC5D0\uB3C4 \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",topics:[{title:"\uBCF4\uAE30 \uBC14\uAFB8\uAE30",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBAA9\uB85D\xB7\uBCF4\uB4DC\xB7\uCE98\uB9B0\uB354\uB85C \uB2E4\uB974\uAC8C \uBD05\uB2C8\uB2E4. \uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC\uC73C\uB85C \uBC14\uAFB8\uACE0 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4).",lines:["**\uBAA9\uB85D** : \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC815\uB82C(\uC81C\uBAA9\xB7\uB0A0\uC9DC) \uB610\uB294 \uD544\uD130(\uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4)\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4. **\uADF8\uB8F9** \uBA54\uB274\uB85C \uBB36\uB294 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","**\uBCF4\uB4DC**(\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C) \u2014 \uCE74\uB4DC\uB97C \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4. \uCEEC\uB7FC **\u22EE** \uBA54\uB274\uC5D0 \uB4F1\uB85D\xB7\uC218\uC815\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4.","**\uC8FC\uAC04\xB7\uC6D4\uAC04** : \uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uB193\uC774\uACE0, \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4. \uBE48 \uCE78\uC5D0 \uC62C\uB9AC\uBA74 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC73C\uB85C \uAD6C\uAE00\xB7\uC560\uD50C\xB7\uB124\uC774\uBC84\uC640 \uC8FC\uACE0\uBC1B\uC2B5\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 \uBD05\uB2C8\uB2E4. \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uACE0, \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\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\uC744, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4. \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78(\uB2E8\uCD95\uD0A4 **/**)\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4. \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 \xB7 \uCC45\uC784\uC790 \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0 \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\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 \uAC70\uB974\uACE0, \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."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** : \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.","**\uBAA8\uB4E0 \uC9C1\uC6D0** : (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4. **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** : \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\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:"\uD560\uC77C\uACFC \uC5C5\uBB34 \uB098\uB204\uAE30",lead:"\uD070 \uC5C5\uBB34 \uD558\uB098\uB97C \uBC1B\uC740 \uCC45\uC784\uC790\uAC00 \uD560\uC77C\uC744 \uD300\uC6D0 \uBAAB\uC758 \uC5C5\uBB34\uB85C \uCABC\uAC1C\uACE0, \uD300\uC6D0\uC774 \uB05D\uB0B4\uBA74 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uC774 \uC800\uC808\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4.",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 \uBCF4\uC785\uB2C8\uB2E4.',"\uD560\uC77C \uD56D\uBAA9\uC758 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB85C \uAC01 \uD56D\uBAA9\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uCC45\uC784\uC790\xB7\uB9C8\uAC10\uC608\uC815\uC744 \uC815\uD574 \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4. \uD300\uC6D0\uC774 \uC644\uB8CC\uD558\uBA74 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uB3C4 \uC644\uB8CC\uB85C \uD45C\uC2DC\uB418\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."]},{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\xB7\uBAA9\uD45C\uC5D0 \uB123\uAE30\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]},{title:"\uD504\uB85C\uC81D\uD2B8",feature:"project",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uBCF4\uB4DC \uB9E8 \uB05D \uC810\uC120 \uCE78\uC774\uB098 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD558\uACE0, \uC5C5\uBB34\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4.","\uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4. \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."]},{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 \xB7 \uBCF8\uBB38 \uC591\uC2DD",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.","**\uBCF8\uBB38 \uC591\uC2DD**(\uB0B4\uC6A9 \uC81C\uBAA9\uC758 \u22EE)\uC740 \uC790\uC8FC \uC4F0\uB294 \uBCF8\uBB38\uC744 \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC635\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 \u203A \uCC98\uB9AC \u203A \uC885\uB8CC\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uAC1C\uBC1C\uC0AC \uC804\uC6A9\uC774\uBA70, \uACE0\uAC1D\uC774 \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:["\uACE0\uAC1D\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\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\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4(\uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC11\uB2C8\uB2E4). \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC73C\uB85C \uC62E\uACA8\uC9D1\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 G0={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var Fd=[H0,W0,U0,V0,K0,G0];import{Fragment as kT,jsx as Lt,jsxs as ho}from"react/jsx-runtime";function hc(e){return e.split(/(\*\*[^*]+\*\*)/g).filter(g=>g.length>0).map((g,l)=>g.startsWith("**")&&g.endsWith("**")?Lt(tr,{component:"strong",sx:{fontWeight:700},children:g.slice(2,-2)},l):Lt(pc,{children:g},l))}function yT({keys:e}){let d=it();return Lt(tr,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((g,l)=>ho(tr,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?Lt(pT,{sx:{fontSize:18,color:d.colors.textMuted}}):null,Lt(tr,{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:g})]},`${g}-${l}`))})}function xT({steps:e}){let d=it();return Lt(tr,{sx:{display:"flex",flexWrap:"wrap",alignItems:"stretch",gap:1,mt:1.5},children:e.map((g,l)=>ho(pc,{children:[l>0?Lt(tr,{sx:{display:"flex",alignItems:"center",color:d.colors.textMuted,px:.25},children:Lt(mT,{sx:{fontSize:20}})}):null,ho(tr,{sx:{flex:"1 1 160px",minWidth:0,display:"flex",gap:1.25,alignItems:"center",p:1.5,borderRadius:2,bgcolor:d.colors.surfaceSubtle,border:`1px solid ${d.colors.border}`},children:[Lt(tr,{sx:{flexShrink:0,width:28,height:28,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:800,bgcolor:d.colors.accent,color:d.colors.accentContrast},children:l+1}),ho(tr,{sx:{minWidth:0},children:[Lt(tr,{sx:{fontSize:16,fontWeight:700,color:d.colors.textStrong,lineHeight:1.3},children:g.title}),Lt(tr,{sx:{mt:.5,fontSize:15,lineHeight:1.5,color:d.colors.textSecondary,wordBreak:"keep-all"},children:g.desc})]})]})]},g.title))})}var vT=148;function wT({items:e}){let d=it();return Lt(tr,{sx:{mt:1.5,display:"grid",gridTemplateColumns:{xs:"1fr",sm:`${vT}px minmax(0, 1fr)`},fontSize:15,lineHeight:1.6,color:d.colors.textPrimary,border:`1px solid ${d.colors.border}`,borderRadius:1.5,overflow:"hidden","& > *":{px:1.5,py:1.35,borderTop:`1px solid ${d.colors.border}`},"& > *:nth-of-type(even)":{borderLeft:{sm:`1px solid ${d.colors.border}`}},"& > *:nth-of-type(1)":{borderTop:0},"& > *:nth-of-type(2)":{borderTop:{xs:`1px solid ${d.colors.border}`,sm:0}}},children:e.map(g=>ho(pc,{children:[Lt(tr,{sx:{fontWeight:500,color:d.colors.textStrong,wordBreak:"keep-all",bgcolor:d.colors.surfaceSubtle,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:g.term}),Lt(tr,{sx:{wordBreak:"keep-all"},children:hc(g.desc)})]},g.term))})}function _T({topic:e}){let d=it();return ho(tr,{component:"section",sx:{py:{xs:3,sm:4},borderBottom:`1px solid ${d.colors.border}`,"&:last-of-type":{pb:0,borderBottom:0}},children:[ho(tr,{component:"h3",sx:{m:0,mb:1.75,fontSize:24,fontWeight:500,letterSpacing:"-0.01em",lineHeight:1.3,color:d.colors.textStrong,wordBreak:"keep-all",display:"flex",alignItems:"center",flexWrap:"wrap"},children:[e.title,e.subtitle?ho(kT,{children:[Lt(gT,{sx:{fontSize:22,color:d.colors.textMuted,mx:1,flexShrink:0}}),Lt(tr,{component:"span",sx:{fontSize:18,fontWeight:400,color:d.colors.textPrimary},children:e.subtitle})]}):null]}),e.lead?Lt(tr,{sx:{fontSize:15.5,lineHeight:1.65,color:d.colors.textPrimary,wordBreak:"keep-all"},children:hc(e.lead)}):null,e.steps?.length?Lt(xT,{steps:e.steps}):null,e.items?.length?Lt(wT,{items:e.items}):null,e.lines?.length?Lt(tr,{component:"ul",sx:{m:0,mt:e.lead||e.steps||e.items?1.25:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:15,lineHeight:1.6,color:d.colors.textPrimary,wordBreak:"keep-all"},children:e.lines.map((g,l)=>Lt("li",{children:hc(g)},l))}):null]})}function CG({open:e,onClose:d,views:g,features:l={},initialTab:o}){let s=it(),[r,t]=fT(0);dT(()=>{if(!e)return;let h=Fd.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=xa(g),i=Fd.filter(a=>n(a.feature)).map(a=>({id:a.id,tabTitle:a.tabTitle,showTitle:!1,children:a.id==="shortcuts"?Lt(tr,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100%",px:.5},children:Lt(tr,{sx:{display:"grid",gridTemplateColumns:"auto auto",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:15,color:s.colors.textPrimary},children:c.map(h=>ho(pc,{children:[Lt(yT,{keys:h.keys}),Lt("span",{children:h.description})]},h.keys))})}):ho(tr,{sx:{display:"flex",flexDirection:"column",px:.5},children:[a.intro?Lt(tr,{sx:{p:2,borderRadius:2,bgcolor:s.colors.accentSoft,color:s.colors.textStrong,fontSize:15.5,lineHeight:1.65,wordBreak:"keep-all"},children:hc(a.intro)}):null,a.topics.filter(h=>n(h.feature)).map(h=>Lt(_T,{topic:h},h.title))]})}));return Lt(bT,{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:Lt(hT,{variant:"contained",onClick:d,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as Y0,useRef as ST,useState as vs}from"react";import{Box as ar,Button as Un,IconButton as qd,Menu as X0,MenuItem as Z0,Switch as TT,Tooltip as J0}from"@mui/material";import{FormDialog as Q0}from"@ehfuse/mui-form-dialog";import $d from"@mui/icons-material/Add";import CT from"@mui/icons-material/ArrowRightAlt";import BT from"@mui/icons-material/BoltOutlined";import IT from"@mui/icons-material/Close";import ET from"@mui/icons-material/EditOutlined";import{ErrorAlert as eg}from"@ehfuse/alerts";import{ClearTextField as wa,LabelSelect as bn}from"@ehfuse/mui-form-controls";import{Fragment as rg,jsx as Ye,jsxs as En}from"react/jsx-runtime";var Hd=[{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."}],_a=[{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"}],bc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function mc(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function gc(e){return dn.find(d=>d.key===e)?.name??e}function MT(e,d,g){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=d.find(c=>ni(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=${bc.find(n=>n.value===l.priority)?.label}`),l.label_key&&s.push(`\uB77C\uBCA8=${g.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=${gc(l.status)}`),l.from_status&&s.push(`${gc(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${gc(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(`${_a.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=${gc(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${bc.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 + ${g.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=Hd.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 tg={fontSize:16,fontWeight:700,color:"#37352f"},RT={display:"flex",alignItems:"center",gap:1},OT={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function $G({open:e,rules:d,customTabs:g,statusOptions:l,contentTemplates:o=[],onPickAccount:s,onClose:r,onCreate:t,onUpdate:n,onToggle:c,onRemove:i}){let[a,h]=vs(!1),[f,u]=vs(0),[b,m]=vs(mc()),[v,k]=vs(!1),B=ST(null),[R,L]=vs(null),[A,D]=vs(null);Y0(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(mc())},500);return()=>window.clearTimeout(W)},[e]),Y0(()=>{if(!a)return;let W=window.setTimeout(()=>B.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=f>0,q=b.trigger,j=()=>{h(!1),u(0),m(mc())},S=(W,X)=>{m(J=>{let K={...J.condition};return X===""||X===void 0||X===null?delete K[W]:K[W]=X,{...J,condition:K}})},T=(W,X)=>{m(J=>{let K={...J.action};return X===""||X===void 0||X===null?delete K[W]:K[W]=X,{...J,action:K}})},P=W=>{m(X=>{let J={...X.condition};return W!=="status_changed"&&(delete J.from_status,delete J.to_status),W!=="overdue"&&delete J.overdue_days,W!=="field_changed"&&delete J.changed_field,W!=="commented"&&(delete J.comment_contains,delete J.comment_by_others),W==="field_changed"&&J.changed_field===void 0&&(J.changed_field=_a[0]?.value??""),{...X,trigger:W,condition:J}})},p=g.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),x=dn.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(ni(W.key)),label:W.label})),{condition:_,action:C}=b,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,J=await s(X,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");J&&m(K=>{let ee={...K.condition};return W==="manager_account"?(ee.manager_account_seq=J.accountSeq,ee.manager_name=J.name):(ee.receiver_account_seq=J.accountSeq,ee.receiver_name=J.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",dn[0]?.key??""):W==="to_status"?S("to_status",dn[0]?.key??""):W==="changed_field"?S("changed_field",_a[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)},M=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,J=await s(X,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");J&&m(K=>{let ee={...K.action};return W==="assign_manager"?(ee.assign_manager_account_seq=J.accountSeq,ee.assign_manager_name=J.name):W==="add_receiver"?(ee.add_receiver_account_seq=J.accountSeq,ee.add_receiver_name=J.name):(ee.notify_account_seq=J.accountSeq,ee.notify_name=J.name),{...K,action:ee}})},E=W=>{if(D(null),W==="set_status")T("set_status",dn[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(J=>({...J,action:{...J.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(!b.name.trim()){eg({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(b.action).length===0){eg({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?b.sort_no:d.reduce((J,K)=>Math.max(J,K.sort_no),0)+1;k(!0);let X=N?await n(f,{...b,sort_no:W}):await t({...b,sort_no:W});k(!1),X&&j()},Y=(W,X,J,K)=>En(ar,{sx:RT,children:[Ye(ar,{sx:OT,children:W}),En(ar,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:K?"column":"row",alignItems:K?"stretch":"center",gap:K?.5:1},children:[X,K?Ye(ar,{sx:{fontSize:13.5,color:"#37352f"},children:K}):null]}),Ye(J0,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:Ye(qd,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:J,children:Ye(IT,{sx:{fontSize:16}})})})]}),G=()=>En(ar,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ye(wa,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:B,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:b.name,onChange:W=>m(X=>({...X,name:W.target.value}))}),Ye(ar,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Hd.map(W=>{let X=q===W.value;return Ye(Un,{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(ar,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Hd.find(W=>W.value===q)?.hint}),En(ar,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ye(ar,{sx:tg,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),z.length>0?Ye(Un,{size:"small",startIcon:Ye($d,{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(bn,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>S("group_seq",Number(W.target.value)||"")}),()=>M("group_seq")):null,O?Y("\uC885\uB958",Ye(bn,{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)}}),()=>M("kind")):null,_.priority!==void 0?Y("\uC911\uC694\uB3C4",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:bc,onChange:W=>S("priority",W.target.value)}),()=>M("priority")):null,_.label_key!==void 0?Y("\uB77C\uBCA8",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>S("label_key",W.target.value)}),()=>M("label_key")):null,_.title_contains!==void 0?Y("\uC81C\uBAA9",Ye(wa,{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}}))}),()=>M("title_contains")):null,_.manager_empty!==void 0?Y("\uCC45\uC784\uC790",Ye(bn,{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")}),()=>M("manager_empty")):null,_.manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Ye(Un,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>M("manager_account")):null,_.receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Ye(Un,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>M("receiver_account")):null,_.from_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:x,onChange:W=>S("from_status",W.target.value)}),()=>M("from_status")):null,_.to_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uB85C",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:x,onChange:W=>S("to_status",W.target.value)}),()=>M("to_status")):null,_.changed_field!==void 0?Y("\uBCC0\uACBD \uD544\uB4DC",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:_a,onChange:W=>S("changed_field",W.target.value)}),()=>M("changed_field")):null,_.comment_contains!==void 0?Y("\uB313\uAE00 \uB0B1\uB9D0",Ye(wa,{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}}))}),()=>M("comment_contains")):null,_.comment_by_others!==void 0?Y("\uB313\uAE00 \uC791\uC131\uC790",Ye(bn,{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")}),()=>M("comment_by_others")):null,_.overdue_days!==void 0?Y("\uACBD\uACFC\uC77C",Ye(wa,{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"}),()=>M("overdue_days")):null,Object.keys(_).length===0?Ye(ar,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,En(ar,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ye(ar,{sx:tg,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),H.length>0?Ye(Un,{size:"small",startIcon:Ye($d,{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(bn,{size:"medium",fullWidth:!0,label:"",value:C.set_status,options:x,onChange:W=>T("set_status",W.target.value)}),()=>F("set_status")):null,C.set_priority!==void 0?Y("\uC911\uC694\uB3C4",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:C.set_priority,options:bc,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(bn,{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(J=>String(J.seq)===String(W.target.value));m(J=>({...J,action:{...J.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(bn,{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(Un,{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(Un,{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",En(rg,{children:[Ye(Un,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("notify")},sx:{flexShrink:0},children:C.notify_name||`\uACC4\uC815 #${C.notify_account_seq}`}),Ye(wa,{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(ar,{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(X0,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>L(null),children:z.map(W=>Ye(Z0,{dense:!0,onClick:()=>V(W.key),sx:{fontSize:14},children:W.label},W.key))}),Ye(X0,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>D(null),children:H.map(W=>Ye(Z0,{dense:!0,onClick:()=>E(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return En(rg,{children:[Ye(Q0,{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:En(ar,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[d.length===0?En(ar,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ye(BT,{sx:{fontSize:48,color:"#d9d9d6"}}),Ye(ar,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,d.map(W=>En(ar,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[Ye(J0,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:Ye(TT,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(X,J)=>c(W.seq,J)})}),En(ar,{sx:{flex:1,minWidth:0},children:[Ye(ar,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let X=MT(W,g,l);return En(ar,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[Ye(ar,{component:"span",children:X.left}),Ye(CT,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),Ye(ar,{component:"span",children:X.right})]})})()]}),Ye(qd,{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:_a[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:Ye(ET,{sx:{fontSize:18}})}),Ye(qd,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:Ye(pr,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:Ye(Un,{startIcon:Ye($d,{}),onClick:()=>{u(0),m(mc()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:Ye(Un,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),Ye(Q0,{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(Un,{variant:"contained",onClick:()=>{U()},disabled:v,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as ng,useRef as Wd,useState as ws}from"react";import{Box as rr,Button as _s,IconButton as ka,Tooltip as Sa}from"@mui/material";import og from"@mui/icons-material/Add";import AT from"@mui/icons-material/EditOutlined";import DT from"@mui/icons-material/ContentCopyOutlined";import PT from"@mui/icons-material/DragIndicator";import NT from"@mui/icons-material/Close";import LT from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as zT,PointerSensor as jT,closestCenter as FT,useSensor as qT,useSensors as $T}from"@dnd-kit/core";import{restrictToParentElement as HT,restrictToVerticalAxis as WT}from"@dnd-kit/modifiers";import{SortableContext as UT,arrayMove as ig,useSortable as VT,verticalListSortingStrategy as KT}from"@dnd-kit/sortable";import{CSS as GT}from"@dnd-kit/utilities";import{FormDialog as sg}from"@ehfuse/mui-form-dialog";import{ClearTextField as Ud,LabelSelect as ag,NumberField as lg}from"@ehfuse/mui-form-controls";import YT from"@ehfuse/overlay-scrollbar";import{ConfirmDialog as XT,ErrorAlert as cg}from"@ehfuse/alerts";import{Fragment as t7,jsx as at,jsxs as Mn}from"react/jsx-runtime";var ZT=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],ug="\uC5C5\uBB34 \uC81C\uBAA9",Vd=2,yc={flex:1,minWidth:0},dg=56,fg=20,JT=`${fg+Vd*8}px`;function xc(){return{name:"",description:"",group_seq:0,items:[]}}function QT(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function e7({id:e,children:d}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=VT({id:e});return at(rr,{ref:o,sx:{transform:GT.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...g,...l},dragging:t})})}function cY({open:e,templates:d,customTabs:g,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=ws(!1),[a,h]=ws(0),[f,u]=ws(xc()),[b,m]=ws(!1),[v,k]=ws([]),B=Wd(0),[R,L]=ws(0),A=Wd(null),D=Wd(null);ng(()=>{if(e)return;let z=window.setTimeout(()=>{i(!1),h(0),u(xc()),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,$)=>v[$]??`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="${ug}"]`);return V.length?V[V.length-1]:null};ng(()=>{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))},M=window.requestAnimationFrame(V);return()=>{window.cancelAnimationFrame(M),window.clearTimeout($)}},[R]);let P=g.filter(z=>!z.archived).map(z=>({value:String(ni(z.key)),label:z.label})),p=(z,$)=>{u(V=>({...V,items:V.items.map((M,H)=>H===z?{...M,...$}:M)}))},y=$T(qT(jT,{activationConstraint:{distance:5}})),x=z=>{let $=String(z.active?.id??""),V=String(z.over?.id??"");if(!$||!V||$===V)return;let M=j.indexOf($),H=j.indexOf(V);M<0||H<0||(u(I=>({...I,items:ig(I.items,M,H)})),k(I=>ig(I,M,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){cg({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){cg({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let V={...f,name:z,items:$},M=a>0?await r(a,V):await s(V);m(!1),M&&(i(!1),h(0),u(xc()))},C=at(rr,{children:d.length===0?Mn(rr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[at(LT,{sx:{fontSize:48,color:"#d9d9d6"}}),at(rr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):d.map(z=>Mn(rr,{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:[Mn(rr,{sx:{flex:1,minWidth:0},children:[at(rr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:z.name}),Mn(rr,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",z.items.length,"\uAC74",z.description?` \xB7 ${z.description}`:""]})]}),n?at(_s,{size:"medium",variant:"outlined",onClick:()=>n(z),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,at(Sa,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:at(ka,{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(AT,{sx:{fontSize:19}})})}),at(Sa,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:at(ka,{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(DT,{sx:{fontSize:18}})})}),at(Sa,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:at(ka,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await XT({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(pr,{sx:{fontSize:18}})})})]},z.seq))}),O=Mn(rr,{sx:{display:"flex",flexDirection:"column",gap:3},children:[at(Ud,{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}))}),Mn(rr,{sx:{display:"grid",gridTemplateColumns:P.length>0?"1fr 1fr":"1fr",gap:2},children:[at(Ud,{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(ag,{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]}),Mn(rr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[at(rr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),at(rr,{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(rr,{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(rr,{ref:A,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:at(YT,{ref:D,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:at(zT,{sensors:y,collisionDetection:FT,modifiers:[WT,HT],onDragEnd:x,children:at(UT,{items:j,strategy:KT,children:f.items.map((z,$)=>at(e7,{id:j[$],children:({handleProps:V})=>Mn(rr,{sx:{borderBottom:$===f.items.length-1?"none":"1px solid #f2f2f0",px:Vd,py:2,gap:2,display:"flex",flexDirection:"column"},children:[Mn(rr,{sx:{display:"flex",alignItems:"center",gap:Vd},children:[at(rr,{...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(PT,{sx:{fontSize:fg}})}),at(Ud,{size:"medium",fullWidth:!0,placeholder:ug,slotProps:{htmlInput:{"data-template-title":$}},value:z.title,onChange:M=>p($,{title:M.target.value})})]}),Mn(rr,{sx:{display:"flex",alignItems:"center",gap:2,pl:JT},children:[at(rr,{sx:yc,children:at(lg,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.start_offset_days??null,onValueChange:M=>p($,{start_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),at(rr,{sx:yc,children:at(lg,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.due_offset_days??null,onValueChange:M=>p($,{due_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),at(rr,{sx:yc,children:at(ag,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:z.priority??"medium",options:ZT,onChange:M=>p($,{priority:M.target.value})})}),l?Mn(rr,{sx:{...yc,position:"relative"},children:[at(_s,{variant:"outlined",fullWidth:!0,onClick:()=>{w($)},sx:{height:dg,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${dg-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(Sa,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:at(ka,{size:"small","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:M=>{M.stopPropagation(),p($,{manager_account_seq:0,manager_name:""})},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:at(NT,{sx:{fontSize:18}})})}):null]}):null,at(Sa,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:at(ka,{size:"medium","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(M=>({...M,items:M.items.filter((H,I)=>I!==$)})),k(M=>M.filter((H,I)=>I!==$))},children:at(pr,{sx:{fontSize:18}})})})]})]})},j[$]))})})})})]});return Mn(t7,{children:[at(sg,{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(_s,{startIcon:at(og,{sx:{fontSize:18}}),onClick:()=>q(0,xc()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:at(_s,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),at(sg,{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(_s,{startIcon:at(og,{sx:{fontSize:18}}),onClick:()=>{u(z=>({...z,items:[...z.items,QT()]})),k(z=>[...z,N()]),L(z=>z+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:at(_s,{variant:"contained",disabled:b,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:O}]})]})}import{useEffect as hg,useState as pg}from"react";import{Box as Fr,Button as r7}from"@mui/material";import{FormDialog as n7}from"@ehfuse/mui-form-dialog";import{DateTextField as o7}from"@ehfuse/mui-form-controls";import i7 from"@ehfuse/overlay-scrollbar";import{jsx as Qr,jsxs as Ta}from"react/jsx-runtime";function xY({open:e,template:d,todayStr:g,running:l=!1,onClose:o,onRun:s}){let[r,t]=pg(g),[n,c]=pg(d);hg(()=>{d&&c(d)},[d]),hg(()=>{e&&t(g)},[e]);let i=d??n,a=i?fp(i,r):[];return Qr(n7,{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:Qr(r7,{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:Ta(Fr,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Ta(Fr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Qr(Fr,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),Qr(o7,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),Qr(Fr,{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."}),Ta(Fr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Ta(Fr,{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:[Qr(Fr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Qr(Fr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),Qr(Fr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),Qr(Fr,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),Qr(i7,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?Qr(Fr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,f)=>Ta(Fr,{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:[Qr(Fr,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Qr(Fr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:Vc(h.start_date)||"-"}),Qr(Fr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:Vc(h.due_date)||"-"}),Qr(Fr,{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 s7={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function a7(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function Kd(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 ks(e){let d=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function Gd(e,d){let l=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),o=Kd(e.due_date),s=String(e.start_date??"").slice(11,16).trim(),r=Kd(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:fr(e).name,projectLabel:e.tab_key?d.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:a7(t),receiverNamesFull:t.join(", "),startDate:r!=="-"&&s?`${r} ${s}`:r,dueDate:o!=="-"&&l?`${o} ${l}`:o,priorityName:s7[String(e.priority??"")]??"",checklist:n,note:String(e.note??"").trim(),completed:!!e.completed}}function zt(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function l7(e,d){if(e===" ")return d*.3;let g=e.codePointAt(0)??0,l=g>=4352&&g<=4607||g>=12288&&g<=40959||g>=44032&&g<=55203||g>=63744&&g<=64255||g>=65280&&g<=65519;return d*(l?1:.55)}function vc(e,d){let g=0;for(let l of String(e??""))g+=l7(l,d);return g}function Ss(e,d){let g=String(e??"").trim();if(!g)return["-"];let l=[],o="";for(let s of g){if(s===`
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 Di(e,d,g){let l=String(e??"").replace(/\s+/g," ").trim();if(!l)return"";if(vc(l,g)<=d)return l;let o=vc("\u2026",g),s="",r=0;for(let t of l){let n=vc(t,g);if(r+n+o>d)break;s+=t,r+=n}return`${s}\u2026`}var Ba=595.28,Ia=841.89,Ea=841.89,Ma=595.28,qr=28,Rn=96,yn=44,c7="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",u7="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",Ca="#cbd5e1",d7=[`text { font-family: ${c7}; fill: #000000; }`,`.doc-title { font-family: ${u7}; 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: ${Ca}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${Ca}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${Ca}; stroke-width: 0.5; }`,`.hline { stroke: ${Ca}; stroke-width: 0.5; }`,`.vline { stroke: ${Ca}; 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 Fo(e,d,g){let l=g-qr;return[`<text x="${qr}" y="46" class="doc-title">${zt(e.documentTitle)}</text>`,`<text x="${qr}" y="66" class="doc-sub">${zt(e.subtitle)}</text>`,`<text x="${l}" y="42" class="doc-meta" text-anchor="end">${zt(e.facilityName)}</text>`,`<text x="${l}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${zt(ks(e.printedAt))}${e.printedBy?` \xB7 ${zt(e.printedBy)}`:""}</text>`,d?`<text x="${l}" y="74" class="doc-meta" text-anchor="end">${zt(d)}</text>`:""].join("")}function qo(e){let{width:d,height:g,body:l,pageIndex:o,pageCount:s}=e;return[`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${g}" viewBox="0 0 ${d} ${g}">`,`<style>${d7}</style>`,`<rect x="0" y="0" width="${d}" height="${g}" fill="#ffffff" />`,l,`<text x="${d/2}" y="${g-22}" class="pageno" text-anchor="middle">${o+1} / ${s}</text>`,"</svg>"].join("")}var Xd=Ea,gg=Ma,$o=qr,Ra=Xd-qr,Aa=22,Pi=20,Ni=22,Oa=5,bg=Rn,yg=yn,mg=gg-46,Da=[{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"}],Yd=Da.reduce((e,d,g)=>(e.push(g===0?$o:e[g-1]+Da[g-1].width),e),[]);function f7(e){let d=[],g=[],l=bg+Aa,o=(s,r)=>{d.push(g),g=[],l=yg+Aa,s&&(g.push({kind:"group",label:s,count:r,continued:!0}),l+=Ni)};for(let s of e){s.label&&(l+Ni+Pi>mg&&o("",0),g.push({kind:"group",label:s.label,count:s.rows.length,continued:!1}),l+=Ni);for(let r of s.rows)l+Pi>mg&&o(s.label,s.rows.length),g.push({kind:"row",completed:r.completed,values:Da.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+=Pi}return d.push(g),d.filter((s,r)=>r===0||s.length>0)}function h7(e,d){let g=[];g.push(`<rect x="${$o}" y="${d}" width="${Ra-$o}" height="${Aa}" class="head" />`),Da.forEach((o,s)=>{let r=Yd[s],t=o.align==="middle"?r+o.width/2:r+Oa;g.push(`<text x="${t}" y="${d+Aa-7}" class="th" text-anchor="${o.align}">${zt(o.label)}</text>`)});let l=d+Aa;for(let o of e){if(o.kind==="group"){g.push(`<rect x="${$o}" y="${l}" width="${Ra-$o}" height="${Ni}" class="group" />`,`<text x="${$o+Oa}" y="${l+Ni-7}" class="gt">${zt(o.continued?`${o.label} (\uC774\uC5B4\uC11C)`:o.label)}</text>`,`<text x="${Ra-Oa}" y="${l+Ni-7}" class="gt" text-anchor="end">${o.count}\uAC74</text>`),l+=Ni;continue}Da.forEach((s,r)=>{let t=Yd[r],n=s.align==="middle"?t+s.width/2:t+Oa;g.push(`<text x="${n}" y="${l+Pi-6}" class="${o.completed?"td done":"td"}" text-anchor="${s.align}">${zt(Di(o.values[r]??"",s.width-Oa*2,9))}</text>`)}),g.push(`<line x1="${$o}" y1="${l+Pi}" x2="${Ra}" y2="${l+Pi}" class="hline" />`),l+=Pi}return Yd.slice(1).forEach(o=>{g.push(`<line x1="${o}" y1="${d}" x2="${o}" y2="${l}" class="vline" />`)}),g.push(`<rect x="${$o}" y="${d}" width="${Ra-$o}" height="${l-d}" class="frame" />`),g.join("")}async function p7(e,d){let g=f7(d),l=d.reduce((o,s)=>o+s.rows.length,0);return g.map((o,s)=>{let r=s===0?bg:yg,t=[s===0?Fo(e,`\uC804\uCCB4 ${l}\uAC74`,Xd):"",h7(o,r)].join("");return qo({width:Xd,height:gg,body:t,pageIndex:s,pageCount:g.length})})}var Jd=Ba,xg=Ia,po=qr,wc=Jd-qr,m7=xg-46,vg=22,g7=68,b7=(wc-po)/2,y7=14,Zd=58;function Ts(e){switch(e.kind){case"title":return 34;case"props":return Math.ceil(e.pairs.length/2)*vg+10;case"section":return 26;default:return y7}}function x7(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
- `).flatMap(l=>l.trim()?Ss(l,Zd):[""]):["(\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=>{Ss(l.label,Zd-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}),Ss(l.text,Zd).forEach(o=>d.push({kind:"line",text:o}))})),d}function v7(e){let d=[],g=[],l=Rn;for(let o of e){let s=Ts(o);l+s>m7&&(d.push(g),g=[],l=yn),g.push(o),l+=s}return d.push(g),d}function w7(e,d){switch(e.kind){case"title":{let g=e.ticket?`<text x="${wc}" y="${d+16}" class="doc-meta" text-anchor="end">${zt(e.ticket)}</text>`:"";return{markup:`<text x="${po}" y="${d+16}" class="section" style="font-size:14px">${zt(e.text)}</text>${g}<line x1="${po}" y1="${d+24}" x2="${wc}" y2="${d+24}" class="hline" />`,nextY:d+Ts(e)}}case"props":{let g=[];return e.pairs.forEach((l,o)=>{let s=o%2,r=Math.floor(o/2),t=po+s*b7,n=d+r*vg;g.push(`<text x="${t}" y="${n+14}" class="label">${zt(l.label)}</text>`,`<text x="${t+g7}" y="${n+14}" class="value">${zt(Ss(l.value||"-",26)[0]??"-")}</text>`)}),{markup:g.join(""),nextY:d+Ts(e)}}case"section":return{markup:`<text x="${po}" y="${d+16}" class="section">${zt(e.text)}</text><line x1="${po}" y1="${d+21}" x2="${wc}" y2="${d+21}" class="hline" />`,nextY:d+Ts(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"}">${zt(e.text)}</text>`,nextY:d+Ts(e)};default:return{markup:`<text x="${po}" y="${d+10}" class="${e.muted?"td done":"td"}">${zt(e.text)}</text>`,nextY:d+Ts(e)}}}async function _7(e,d){let g=v7(x7(d));return g.map((l,o)=>{let s=o===0?Rn:yn,r=[o===0?Fo(e,"",Jd):`<text x="${po}" y="${yn-12}" class="doc-meta">${zt(`${d.title} (\uC774\uC5B4\uC11C)`)}</text>`];for(let t of l){let n=w7(t,s);r.push(n.markup),s=n.nextY}return qo({width:Jd,height:xg,body:r.join(""),pageIndex:o,pageCount:g.length})})}var ef=Ea,kg=Ma,_c=qr,Pa=ef-qr,wg=kg-46,_g=210,ci=20,Qd=24;function ui(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 Sg(e,d){return Math.round((d.getTime()-e.getTime())/864e5)}function k7(e,d){let g=[];e.forEach(r=>{let t=ui(r.startDate),n=ui(r.dueDate);t&&g.push(t),n&&g.push(n)});let l=ui(d)??new Date;if(g.length===0)return{start:l,days:30};let o=new Date(Math.min(...g.map(r=>r.getTime()))),s=new Date(Math.max(...g.map(r=>r.getTime())));return o.setDate(o.getDate()-1),s.setDate(s.getDate()+1),{start:o,days:Math.max(7,Sg(o,s)+1)}}async function S7(e,d,g){let l=k7(d,g),o=_c+_g,r=(Pa-o)/l.days,t=ui(g),n=f=>o+Sg(l.start,f)*r,c=Math.max(1,Math.floor((wg-Rn-Qd)/ci)),i=Math.max(1,Math.floor((wg-yn-Qd)/ci)),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 b=u===0?Rn:yn,m=[u===0?Fo(e,`\uC804\uCCB4 ${d.length}\uAC74`,ef):""],v=b+Qd;m.push(`<line x1="${_c}" y1="${v}" x2="${Pa}" y2="${v}" 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="${v}" x2="${R}" y2="${v+f.length*ci}" class="hline" />`,`<text x="${R+2}" y="${v-6}" class="label">${B.getMonth()+1}.${B.getDate()}</text>`)}if(t&&t>=l.start){let k=n(t);k>=o&&k<=Pa&&m.push(`<line x1="${k}" y1="${v}" x2="${k}" y2="${v+f.length*ci}" stroke="#f87171" stroke-width="0.8" />`)}return f.forEach((k,B)=>{let R=v+B*ci,L=Di(k.title,_g-64,9);m.push(`<text x="${_c}" y="${R+14}" class="${k.completed?"td done":"td"}">${zt(L)}</text>`,`<text x="${o-6}" y="${R+14}" class="label" text-anchor="end">${zt(k.managerName)}</text>`,`<line x1="${_c}" y1="${R+ci}" x2="${Pa}" y2="${R+ci}" class="hline" />`);let A=ui(k.startDate)??ui(k.dueDate),D=ui(k.dueDate)??ui(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,Pa)-N)}" height="${ci-10}" rx="2" class="${j}" />`)}),qo({width:ef,height:kg,body:m.join(""),pageIndex:u,pageCount:a.length})})}function T7(e,d,g,l){return{title:e.title,managerName:e.managerName,startDate:String(d??"").slice(0,10),dueDate:String(g??"").slice(0,10),completed:e.completed,overdue:!e.completed&&!!g&&String(g).slice(0,10)<l}}var tf=Ba,Cg=Ia,Cs=qr,kc=tf-qr,Tg=Cg-46,Bs=30,Is=18,Bg=12;function C7(e){let d=[],g=[],l=Rn,o=(s,r)=>{d.push(g),g=[],l=yn,s&&(g.push({kind:"column",label:s,summary:r,continued:!0,gapBefore:!1}),l+=Bs)};for(let s of e){let r=g.length>0,t=r?Bg:0;if(l+t+Bs+Is>Tg?(o("",""),g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:!1}),l+=Bs):(g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:r}),l+=t+Bs),s.items.length===0){g.push({kind:"empty"}),l+=Is;continue}for(let n of s.items)l+Is>Tg&&o(s.label,s.summary),g.push({kind:"item",title:n.title,meta:n.meta,completed:n.completed}),l+=Is}return d.push(g),d}async function B7(e,d,g){let l=C7(d);return l.map((o,s)=>{let r=s===0?Rn:yn,t=[s===0?Fo(e,g,tf):""];for(let n of o){if(n.kind==="column"){n.gapBefore&&(r+=Bg),t.push(`<rect x="${Cs}" y="${r}" width="${kc-Cs}" height="${Bs-6}" class="group" />`,`<text x="${Cs+6}" y="${r+16}" class="gt">${zt(n.continued?`${n.label} (\uC774\uC5B4\uC11C)`:n.label)}</text>`,`<text x="${kc-6}" y="${r+16}" class="label" text-anchor="end">${zt(n.summary)}</text>`),r+=Bs;continue}if(n.kind==="empty"){t.push(`<text x="${Cs+12}" y="${r+12}" class="td done">(\uC5C5\uBB34 \uC5C6\uC74C)</text>`),r+=Is;continue}t.push(`<text x="${Cs+12}" y="${r+12}" class="${n.completed?"td done":"td"}">${zt(Di(n.title,kc-Cs-12-120,9))}</text>`,`<text x="${kc-6}" y="${r+12}" class="label" text-anchor="end">${zt(n.meta)}</text>`),r+=Is}return qo({width:tf,height:Cg,body:t.join(""),pageIndex:s,pageCount:l.length})})}var I7=[{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}],E7="FFEEF2F7",Sc="FFCBD5E1";function M7(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()||"\uC5C5\uBB34\uBAA9\uB85D"}async function R7(e,d){let g=await Promise.resolve().then(()=>Lg(Eg(),1)),l=new g.Workbook,o=l.addWorksheet("\uC5C5\uBB34\uBAA9\uB85D",{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0,fitToWidth:1,fitToHeight:0}});o.columns=I7.map(i=>({header:i.header,width:i.width})),o.spliceRows(1,0,[`${e.documentTitle}`],[`${e.subtitle} \xB7 ${e.facilityName} \xB7 \uCD9C\uB825 ${ks(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:E7}},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:Sc}},left:{style:"thin",color:{argb:Sc}},bottom:{style:"thin",color:{argb:Sc}},right:{style:"thin",color:{argb:Sc}}}});o.views=[{state:"frozen",ySplit:3}];let t=await l.xlsx.writeBuffer(),n=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),c=ks(e.printedAt).replace(/[: ]/g,"").slice(0,13);return{blob:n,fileName:`${M7(e.documentTitle)}_${c}.xlsx`}}function O7(e){return String(e??"").replace(/<br\s*\/?>(?=.)/gi,`
43
+ `).trim():"";function V4(e){let d=[`[\uC5C5\uBB34] ${e.title}`],g=wn(e.start_date),l=wn(e.due_date);(g||l)&&d.push(`\uAE30\uAC04: ${g&&l?`${g} ~ ${l}`:g||l}`),e.manager_name&&d.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let o=fr(e).name;o&&d.push(`\uC0C1\uD0DC: ${o}`);let s=nm(e.content);s&&d.push("",s);let r=String(e.note??"").trim();return r&&d.push("",`\uBE44\uACE0: ${r}`),d.join(`
44
+ `)}function om(e){navigator.clipboard.writeText(e).then(()=>U4("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>W4("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function ls(e,d){let g=V4(e);if(d&&typeof navigator.share=="function"){navigator.share({text:g}).catch(l=>{l?.name!=="AbortError"&&om(g)});return}om(g)}import{Fragment as tk,jsx as Rt,jsxs as rd}from"react/jsx-runtime";function im({task:e,myAccountSeq:d=0,onToggleCompleted:g,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=jt(),[b,m]=cs(!1),[v,k]=cs(null),[B,R]=cs(null),[L,A]=cs(null),[D,N]=cs(null),[q,j]=cs(null),S=!!e.is_notice,T=!!e.is_event,P=S?Mt(e.icon||lr):T?Mt(e.icon||dr):null,p=S&&d>0&&(e.author_account_seq??0)===d,{onReturnTask:y,onReviewDone:x}=bt(),w=!!y&&rn(e,d),_=w&&!!x,C=!xo(e,d),O=!!h&&(f??(d>0&&(e.author_account_seq??0)===d)),z=!T&&(S?p:(e.author_account_seq??0)===d||(e.manager_account_seq??0)===d);return rd(tk,{children:[rd(us,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?Rt(ds,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:Rt(X4,{})}):null,z&&!t?Rt(fs,{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:rd(us,{sx:{display:"flex",flexShrink:0,mr:1},children:[Rt(Gn,{onClick:$=>j({anchorEl:$.currentTarget,nextCompleted:!e.completed}),children:e.completed?w?"\uB418\uB3CC\uB9AC\uAE30":"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"}),_?Rt(K4,{variant:"contained",size:"small",disableElevation:!0,onClick:$=>N($.currentTarget),sx:{ml:1,...Hi},children:"\uAC80\uC218\uC644\uB8CC"}):null]})}):null,t||!P?null:T&&!C?Rt(fs,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Rt(G4,{onClick:$=>R($.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Rt(P,{sx:{fontSize:20}})})}):Rt(us,{sx:{display:"flex",px:.5,color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:Rt(P,{sx:{fontSize:20}})}),v!==null?Rt(us,{component:"input",autoFocus:!0,spellCheck:!1,value:v,onChange:$=>k($.target.value),onBlur:()=>{v.trim()&&v.trim()!==e.title&&l(e.seq,v.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(us,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":T?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Rt(us,{onClick:C?void 0:()=>k(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:C?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),i?Rt(fs,{title:"\uD65C\uB3D9",arrow:!0,children:Rt(ds,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:Rt(Q4,{sx:{fontSize:20}})})}):null,Rt(fs,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Rt(ds,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>ls(e,u),sx:{color:"#6b7280"},children:u?Rt(Z4,{sx:{fontSize:20}}):Rt(J4,{sx:{fontSize:20}})})}),a?Rt(fs,{title:"\uC778\uC1C4",arrow:!0,children:Rt(ds,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:Rt(ek,{sx:{fontSize:20}})})}):null,O?Rt(fs,{title:"\uC0AD\uC81C",arrow:!0,children:Rt(ds,{"aria-label":"\uC0AD\uC81C",onClick:$=>A($.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:Rt(pr,{sx:{fontSize:20}})})}):null,r&&!t?Rt(ds,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:Rt(Y4,{})}):null]}),Rt(Ui,{anchorEl:D,onCancel:()=>N(null),onConfirm:()=>{x?.(e),N(null)}}),Rt(nn,{open:!!q,anchorEl:q?.anchorEl??null,nextCompleted:q?.nextCompleted??!1,returnMode:w,onCancel:()=>j(null),onConfirm:$=>{q&&($&&y?y(e,$):g(e.seq,q.nextCompleted)),j(null)}}),Rt(Go,{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(Pt,{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(Yl,{open:b,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}import{useRef as dk,useState as Cn}from"react";import{Box as Qt,Button as hs,ButtonBase as dm,Checkbox as fk,Divider as Ei,Menu as ad,MenuItem as ld}from"@mui/material";import hk from"@mui/icons-material/ExpandLess";import pk from"@mui/icons-material/ExpandMore";import mk from"@mui/icons-material/ConfirmationNumberOutlined";import fm from"@mui/icons-material/Check";import gk from"@mui/icons-material/DirectionsRunOutlined";import bk from"@mui/icons-material/SpeedOutlined";import cd from"@mui/icons-material/CheckCircle";import yk from"@mui/icons-material/CheckCircleOutlineOutlined";import ud from"@mui/icons-material/CheckCircleOutlined";import hm from"@mui/icons-material/AccessTimeOutlined";import xk from"@mui/icons-material/AutorenewOutlined";import vk from"@mui/icons-material/LabelOutlined";import wk from"@mui/icons-material/PersonOutlineOutlined";import _k from"@mui/icons-material/SubjectOutlined";import kk from"@mui/icons-material/StickyNote2Outlined";import Sk from"@mui/icons-material/PanToolAltOutlined";import pm from"@mui/icons-material/LockOutlined";import mm from"@mui/icons-material/PublicOutlined";import gm from"@mui/icons-material/Group";import Tk from"@mui/icons-material/Repeat";import Ck from"@mui/icons-material/EventOutlined";import{ConfirmDialog as bm,InfoAlert as Bk}from"@ehfuse/alerts";import{DatePicker as Ik}from"@ehfuse/mui-datetime-picker";import{useState as rk}from"react";import{TextField as nk}from"@ehfuse/mui-form-controls";import{jsx as ok}from"react/jsx-runtime";function sm({value:e,onCommit:d,onDraftChange:g,readOnly:l=!1}){let[o,s]=rk(null);return ok(nk,{value:o??e,placeholder:l?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:l}},onChange:r=>{s(r.target.value),g?.(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 id,useState as sd}from"react";import{Box as Lr,Button as cm,IconButton as ik}from"@mui/material";import sk from"@mui/icons-material/AccountTreeOutlined";import ak from"@mui/icons-material/LinkOutlined";import lk from"@mui/icons-material/Close";import ck from"@mui/icons-material/RedoOutlined";function Ii(e){return e.relations??[]}function mq(e,d,g){return Ii(e).some(l=>l.type===g&&l.task_seq===d.seq)||Ii(d).some(l=>l.type===g&&l.task_seq===e.seq)}function am(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function nd(e,d){let g=new Map(d.map(u=>[u.seq,u]));g.set(e.seq,e);let l=new Map,o=(u,b)=>{l.has(u)||l.set(u,new Set),l.has(b)||l.set(b,new Set),l.get(u).add(b),l.get(b).add(u)};for(let u of g.values())for(let b of Ii(u))b.type==="follow_up"&&g.has(b.task_seq)&&o(u.seq,b.task_seq);let s=new Set([e.seq]),r=[e.seq];for(;r.length>0;){let u=r.shift();for(let b of l.get(u)??[])s.has(b)||(s.add(b),r.push(b))}let t=[...s].map(u=>g.get(u)).filter(u=>!!u).sort((u,b)=>am(u).localeCompare(am(b))),n=new Set;for(let u of Ii(e))u.type==="related"&&n.add(u.task_seq);for(let u of g.values())u.seq!==e.seq&&Ii(u).some(b=>b.type==="related"&&b.task_seq===e.seq)&&n.add(u.seq);let c=[...n].map(u=>g.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),i=[...g.values()].filter(u=>u.seq!==e.seq&&Ii(u).some(b=>b.type==="duplicate_of"&&b.task_seq===e.seq)),a=Ii(e).find(u=>u.type==="duplicate_of")?.task_seq,h=a?g.get(a)??null:null,f=[...g.values()].filter(u=>u.seq!==e.seq&&(u.checklist??[]).some(b=>Number(b.task_seq??0)===e.seq));return{lineage:t,related:c,duplicates:i,duplicateOf:h,parents:f}}function od(e,d){let g=nd(e,d);return(g.lineage.length>=2?g.lineage.length-1:0)+g.related.length+g.duplicates.length+(g.duplicateOf?1:0)+g.parents.length}function lm(e,d){return od(e,d)>0}import{Fragment as uk,jsx as Yt,jsxs as $n}from"react/jsx-runtime";function Xl({item:e,caption:d,onOpen:g,onUnlink:l}){let o=e.is_notice||e.is_event?Mt(e.icon||(e.is_notice?lr:dr)):null;return $n(Lr,{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?Yt(Lr,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:d}):null,o?Yt(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,$n(Lr,{component:"span",onClick:g,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...g?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),Yt(Dt,{option:fr(e),small:!0}),l?Yt(ik,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:l,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Yt(lk,{sx:{fontSize:15}})}):null]})}function um({task:e,tasks:d,readOnly:g=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=sd(!1),[c,i]=sd(null),[a,h]=sd(null),f=id(()=>nd(e,d),[e,d]),u=f.lineage.length>=2,b=id(()=>od(e,d),[e,d]),m=id(()=>{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]),v=(k,B,R)=>{h({anchorEl:k,targetSeq:B,type:R})};return $n(Tn,{icon:Yt(sk,{sx:{fontSize:19,display:"block"}}),title:$n(uk,{children:["\uAD00\uB828 \uC5C5\uBB34",b>0?Yt(Lr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:b}):null]}),titleExtra:g?null:$n(Lr,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?Yt(cm,{size:"small",color:"inherit",startIcon:Yt(ck,{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?Yt(cm,{size:"small",color:"inherit",startIcon:Yt(ak,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[$n(Lr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?Yt(Lr,{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 $n(Lr,{sx:{display:"flex",gap:1},children:[$n(Lr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Yt(Lr,{sx:{width:R?9:7,height:R?9:7,borderRadius:"50%",bgcolor:R?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),L?null:Yt(Lr,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),$n(Lr,{sx:{flex:1,minWidth:0,pb:L?0:.5},children:[$n(Lr,{sx:{display:"flex",alignItems:"center",gap:.75},children:[$n(Lr,{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]}),Yt(Dt,{option:fr(k),small:!0})]}),Yt(Lr,{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=>Yt(Xl,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),f.duplicateOf?Yt(Xl,{item:f.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:l?()=>l(f.duplicateOf.seq):void 0,onUnlink:!g&&s?k=>v(k.currentTarget,f.duplicateOf.seq,"duplicate_of"):void 0}):null,f.duplicates.map(k=>Yt(Xl,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?B=>v(B.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),f.related.map(k=>Yt(Xl,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?B=>v(B.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),b===0?Yt(Lr,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?Yt(Nl,{open:t,task:e,tasks:d,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,B)=>o(e.seq,k,B)}):null,Yt(Pt,{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)}}),Yt(Pt,{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 Vr,jsx as _e,jsxs as Xt}from"react/jsx-runtime";function ri({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return _e(Qt,{component:"span",sx:{color:"#9a9a97"},children:e})}function ym({task:e,customTabs:d,statusOptions:g,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:b=[],onChangeEventTime:m,onChangeEventPlace:v,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:x,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:C,relatedTasksPool:O,onOpenRelatedTask:z,onLinkRelatedTask:$,onUnlinkRelatedTask:V,onCreateFollowUpTask:M,onAddAttachments:H,onRemoveAttachment:I,onPreview:E,onDownload:F,onUpdateComment:U,onRemoveComment:Y,onToggleCommentReaction:G,currentUserName:W="",myAccountSeq:X=0,noticeAdmin:J=!1,hideProject:K=!1,hideLabel:ee=!1,showTitle:Z=!1,onChangeTitle:re,onToggleCompleted:ie,onChangeIcon:ne,onChangeIconColor:ae,employees:pe=[],onAckConfirm:ue,onRequestConfirm:ke,onChangeBugField:Ne,sprints:Ce=[],sprintProject:Oe=!1,hideSprint:nt=!1,onChangeSprint:me,onChangeStoryPoints:oe,onChangeResolution:Ie,onClaimTask:ve,onVerifyBug:we}){let[be,Me]=Cn(null),Fe=dk(!1),[vr,Ve]=Cn(null),[Ge,Tt]=Cn(null),[Qe,De]=Cn(null),[xe,ge]=Cn(!1),Be={[jn]:xe?{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"}},[Ze,qe]=Cn(null),[Pe,Ct]=Cn(null),[Ke,te]=Cn(null),[ce,de]=Cn(null),[Se,ct]=Cn(null),[Re,Le]=Cn(null),[wt,Ae]=Cn(null),Ee=!!e.is_notice,Je=!!e.is_event,ot=!!e.is_bug,ft=!!ve&&Ja(e,X),{onReturnTask:Bt}=bt(),ut=!!ve&&Qa(e,X),$t=!!we&&ot&&!!e.completed&&X>0&&(e.author_account_seq??0)===X&&!(e.acks??[]).some(se=>se.account_seq===X),xt=!xo(e,X),Wt=!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),Ut=e.is_notice||e.is_event?Mt(e.icon||(e.is_notice?lr:dr)):null,Q=Ee?!Za(e,X):xt,le=ft||ut?Xt(Gn,{onClick:se=>Ae(se.currentTarget),children:[_e(Sk,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ye=Ee?Wl(e,pe):"",he=Ee?jp(e,pe,X):null,Te=Ee?null:Gi(e,X),$e=!!(Te&&Te.total>0||Ee&&he),We=(e.origin_license_seq??0)>0,et=!Ee&&!We,tt=Xt(Vr,{children:[_e(gt,{icon:_e(wk,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[oo(9),Be??null,...Je?[]:[ir(1)]],children:e.created_by?Xt(Vr,{children:[_e(Wr,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):_e(ri,{})}),_e(gt,{icon:_e(hm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[oo(11),Be??null,...Je?[]:[ir(2)]],children:e.created_time?fn(e.created_time):_e(ri,{})})]});return Xt(Vr,{children:[Z?Xt(Qt,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Wt?_e(fk,{checked:e.completed,icon:_e(yk,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:_e(cd,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(se,He)=>{Ge||Tt({anchorEl:se.currentTarget,nextCompleted:He})},sx:{p:0,mt:.25}}):null,Ut?Je&&!xt?_e(dm,{onClick:se=>Ve(se.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:_e(Ut,{sx:{fontSize:20}})}):_e(Qt,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Ee?"#e5484d":"#1e3a8a")},children:_e(Ut,{sx:{fontSize:20}})}):null,_e(Qt,{sx:{flex:1,minWidth:0},children:be!==null?_e(Qt,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:se=>{if(!se||se.dataset.focused)return;se.dataset.focused="1",se.focus();let He=document.createRange();He.selectNodeContents(se),He.collapse(!1);let yt=window.getSelection();yt?.removeAllRanges(),yt?.addRange(He)},onBlur:se=>{let He=(se.currentTarget.textContent??"").replace(/\n/g," ").trim();!Fe.current&&He&&He!==e.title&&re(e.seq,He),Fe.current=!1,Me(null)},onKeyDown:se=>{se.key==="Enter"&&(se.preventDefault(),se.target.blur()),se.key==="Escape"&&(Fe.current=!0,se.target.blur())},onPaste:se=>{se.preventDefault();let He=se.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,He)},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:be}):_e(Qt,{onClick:()=>Me(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})}),_e(nn,{open:!!Ge,anchorEl:Ge?.anchorEl??null,nextCompleted:Ge?.nextCompleted??!1,returnMode:!!Bt&&rn(e,X),onCancel:()=>Tt(null),onConfirm:se=>{Ge&&(se&&Bt?Bt(e,se):ie(e.seq,Ge.nextCompleted)),Tt(null)}})]}):null,Xt(Qt,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[jn]:{pb:0,"& > :last-child":{mb:0}}},children:[_e(Ml,{hideProject:K,pinColumns:!0,projectColumn:!Je&&!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:Xn(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:d,avatarSrcByName:el(e,l),hideDueDate:!Je&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Ee,event:Je,readOnly:xt,targetSummary:ye,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=>v?.(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:sl(e.support_type??"")}:void 0,leading:Xt(Vr,{children:[$t||le&&(Ee||Je)?Xt(Qt,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ee||Je?le:null,$t?Xt(Vr,{children:[_e(hs,{variant:"contained",size:"large",onClick:()=>we?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),_e(hs,{variant:"outlined",size:"large",color:"error",onClick:()=>we?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,ot&&e.ticket_no?_e(gt,{icon:_e(mk,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:ir(1),children:_e(Qt,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Je?null:_e(Qt,{sx:ot&&e.ticket_no||et||$e?ir(ot&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:_e(gt,{icon:_e(xk,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:xt||e.completed?void 0:se=>qe(se),children:_e(Dt,{option:fr(e)})})}),et?(()=>{let se=An(e),He=se==="all"?_e(mm,{sx:{fontSize:17,color:"#2f80ed"}}):se==="group"?_e(gm,{sx:{fontSize:17,color:"#d9730d"}}):_e(pm,{sx:{fontSize:17}}),yt=se==="all"?"\uC804\uCCB4\uACF5\uAC1C":se==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${b.find(It=>It.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return _e(Qt,{sx:Je?void 0:ir(ot?1:2),children:_e(gt,{icon:He,label:"\uACF5\uAC1C",onClick:xt||!f?void 0:It=>Ct(It),children:yt})})})():null,!Ee&&!ot&&!We?_e(Qt,{sx:Je?void 0:ir(1),children:_e(gt,{icon:_e(Tk,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:xt||!u?void 0:se=>te(se),children:e.repeat_rule?Tl(e.repeat_rule):_e(ri,{label:"\uC5C6\uC74C"})})}):null,!Ee&&!ot&&e.repeat_rule?_e(Qt,{sx:Je?void 0:ir(2),children:_e(gt,{icon:_e(Ck,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:xt||!u?void 0:se=>de(se),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:_e(ri,{})})}):null,Te&&Te.total>0?_e(Qt,{sx:Je?void 0:ir(2),children:_e(gt,{icon:_e(ud,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Te.canConfirm?_e(hs,{size:"small",variant:"contained",onClick:()=>ue?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Xt(hs,{size:"small",variant:"outlined",color:"inherit",startIcon:Te.myTime?_e(cd,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:se=>De({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,Ee&&he?_e(Qt,{sx:ir(2),children:_e(gt,{icon:_e(ud,{sx:{fontSize:17}}),label:"\uD655\uC778",children:_e(Qt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:he.canAck?_e(hs,{size:"small",variant:"contained",onClick:()=>ue?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):_e(hs,{size:"small",variant:"outlined",color:"inherit",startIcon:he.acked?_e(cd,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:se=>De({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:he.total>0&&he.count>=he.total?"\uC644\uB8CC":Xt(Vr,{children:[he.count,_e(Qt,{component:"span",sx:{mx:.4},children:"/"}),he.total]})})})})}):null,Oe&&!nt&&!Je&&!Ee?Xt(Vr,{children:[_e(gt,{icon:_e(gk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:xt?void 0:se=>ct(se),sx:ir(1),children:(e.sprint_seq??0)>0?Ce.find(se=>se.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":_e(ri,{label:"\uBBF8\uBC30\uC815"})}),_e(gt,{icon:_e(bk,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:ir(2),children:_e(Ro,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:xt,onCommit:se=>oe?.(e.seq,Number(se.replace(/[^0-9.]/g,""))||0)})})]}):null,Je||ee?null:_e(Qt,{sx:[K?{gridColumn:"1 / -1"}:ir(1),Be??null],children:_e(gt,{icon:_e(vk,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:xt?void 0:se=>Le(se),children:(e.label_keys??[]).length>0?_e(Uo,{labelKeys:e.label_keys??[],labelOptions:g}):_e(ri,{})})})]}),afterProject:Je?null:tt,trailing:Xt(Vr,{children:[ot?_e(Rl,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:xt,showResolution:!!e.completed,onChangeRepro:se=>Ne?.(e.seq,"bug_repro",se),onChangeDevice:se=>Ne?.(e.seq,"bug_device",se),onChangeWhere:se=>Ne?.(e.seq,"bug_where",se),onChangeVersion:se=>Ne?.(e.seq,"bug_version",se),onChangeResolution:se=>Ie?.(e.seq,se)}):null,Je?tt:null,e.completed?Xt(Vr,{children:[_e(gt,{icon:_e(ud,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[oo(10),Be??null,...Je?[]:[ir(1)]],children:e.completed_by?Xt(Vr,{children:[_e(Wr,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):_e(ri,{})}),_e(gt,{icon:_e(hm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[oo(12),Be??null,...Je?[]:[ir(2)]],children:e.completed_time?fn(e.completed_time):_e(ri,{})})]}):null]})}),Xt(Qt,{sx:{display:"none",[jn]:{display:"block",mt:1.5,mb:0}},children:[_e(Ei,{sx:{borderColor:"#e6e6e3"}}),_e(dm,{onClick:()=>ge(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:xe?Xt(Vr,{children:["\uC811\uAE30 ",_e(hk,{sx:{fontSize:18}})]}):Xt(Vr,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",_e(pk,{sx:{fontSize:18}})]})})]}),Xt(Qt,{children:[_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3",[jn]:{mt:0,mb:1.25}}}),_e(Tn,{icon:_e(_k,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:A&&!xt?_e(Al,{content:e.content??"",templates:A,onApply:se=>L?.(e.seq,se),onSave:D,onRemove:N}):void 0,children:_e(Qt,{sx:{userSelect:"text"},children:q?_e(Qt,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:_e(ul,{})}):_e(Dl,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:j?se=>j(e.seq,se):void 0,readOnly:xt,onChange:se=>L(e.seq,se)})})}),e.is_bug?null:Xt(Vr,{children:[_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Tn,{icon:_e(kk,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:_e(Qt,{sx:{userSelect:"text"},children:_e(sm,{value:e.note,readOnly:Q,onCommit:se=>B(e.seq,se),onDraftChange:R?se=>R(e.seq,se):void 0})})})]}),Je?null:Xt(Vr,{children:[_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Ll,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Q,onAdd:S,onToggle:T,onRemove:P,onUpdate:p,onReorder:y,onConvertToTask:x,onOpenLinkedTask:w,resolveLinkedTask:C,myAccountSeq:X,linkCandidates:O,linkBaseTask:e,onLinkExistingTask:_})]}),O&&!Je&&!Ee&&lm(e,O)?Xt(Vr,{children:[_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(um,{task:e,tasks:O,readOnly:xt,onOpenTask:z,onLink:$,onUnlink:V,onCreateFollowUp:M})]}):null,_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(ql,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Q,onAdd:H,onRemove:I,onPreview:E?se=>E({...se,taskSeq:e.seq}):void 0,onDownload:F?se=>F({...se,taskSeq:e.seq}):void 0})]}),_e(Ei,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(em,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:X,avatarSrcByName:l,onUpdate:U,onRemove:Y,onToggleReaction:G,onPreview:E?se=>E({...se,taskSeq:e.seq}):void 0,onDownload:F?se=>F({...se,taskSeq:e.seq}):void 0})]}),_e(Fi,{anchorEl:Ze,value:e.status,options:Ee?Ps:ot?hi:Ns,onSelect:se=>o(e.seq,se),onClose:()=>qe(null)}),_e(ad,{transitionDuration:0,anchorEl:Ke,open:!!Ke,onClose:()=>te(null),children:[{value:"",label:"\uC5C6\uC74C"},...Zs].map(se=>_e(ld,{selected:(e.repeat_rule??"")===se.value,onClick:()=>{te(null),(async()=>{let He=e.repeat_rule??"";if(se.value===He)return;if(se.value===""){await bm({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 yt=String(e.due_date??"").slice(0,10);if(!yt){Bk(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}He&&!await bm({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,Cl(yt,se.value))})()},sx:{fontSize:14,minWidth:140},children:se.label},se.value||"none"))}),_e(Ik,{anchorEl:ce,open:!!ce,onClose:()=>de(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:se=>{de(null);let He=_t=>String(_t).padStart(2,"0"),yt=`${se.getFullYear()}-${He(se.getMonth()+1)}-${He(se.getDate())}`,It=e.repeat_rule??"";It&&u?.(e.seq,It,yt)}}),_e(ad,{transitionDuration:0,anchorEl:Pe,open:!!Pe,onClose:()=>Ct(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:_e(pm,{sx:{fontSize:17,color:"#57564f"}}),selected:An(e)==="involved",onPick:()=>f?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:_e(mm,{sx:{fontSize:17,color:"#2f80ed"}}),selected:An(e)==="all",onPick:()=>f?.(e.seq,"all",0)},...b.map(se=>({key:`group-${se.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${se.name}`,icon:_e(gm,{sx:{fontSize:17,color:"#d9730d"}}),selected:An(e)==="group"&&(e.visibility_group_seq??0)===se.seq,onPick:()=>f?.(e.seq,"group",se.seq)}))].map(se=>Xt(ld,{selected:se.selected,onClick:()=>{se.onPick(),Ct(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.icon,se.label,se.selected?_e(fm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},se.key))}),_e(ad,{transitionDuration:0,anchorEl:Se,open:!!Se,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=>Xt(ld,{onClick:()=>{me?.(e.seq,se.seq),ct(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.label,(e.sprint_seq??0)===se.seq?_e(fm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},se.seq))}),_e(fl,{anchorEl:Qe?.anchorEl??null,open:!!Qe?.open,acks:e.acks??[],total:he?.total??Te?.total??0,pendingNames:he?.pendingNames??Te?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:ke&&(he?he.count<he.total:Te&&Te.count<Te.total)?()=>{ke(e.seq),De(se=>se?{...se,open:!1}:null)}:void 0,onClose:()=>De(se=>se?{...se,open:!1}:null)}),_e(Hl,{anchorEl:Re,selectedKeys:e.label_keys??[],labelOptions:g,onToggle:se=>s(e.seq,Va(e.label_keys??[],se)),onAddLabel:r,onClose:()=>Le(null)}),_e(Go,{anchorEl:vr,value:e.icon??"",color:e.icon_color??"",onSelect:se=>{ne(e.seq,se),Ve(null)},onSelectColor:ae?se=>ae(e.seq,se):void 0,onClose:()=>Ve(null)}),_e(Pt,{open:!!wt,anchorEl:wt,title:ft?"\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:()=>Ae(null),onConfirm:()=>{ve?.(e.seq),Ae(null)}})]})}import{Fragment as jk,jsx as Kt,jsxs as ps}from"react/jsx-runtime";function oH(){let e=new Date,d=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function iH({open:e,task:d,onClose:g,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:b,canDelete:m,...v}){let k=jt(),B=vm(null);d&&(B.current=d);let R=d??B.current,[L,A]=Zl(!1),[D,N]=Zl(null),[q,j]=Zl(null),S=!!b&&(m??(r>0&&(R?.author_account_seq??0)===r)),[T,P]=Zl({}),p=Object.keys(T).length>0;xm(()=>{P({})},[d?.seq,e]);let y=vm(null);if(xm(()=>{y.current?.scrollTo({top:0})},[d?.seq]),!R)return null;let x=k&&p?{...R,...T}:R,w=x.checklist??[],_=(M,H)=>{k?P(I=>({...I,...M})):H()},C=()=>{let M=T;P({});let H=R.seq,I=M.title===void 0?void 0:String(M.title).trim();if(o){let E={...M};I!==void 0&&(I?E.title=I:delete E.title),Object.keys(E).length>0&&o(H,E),_m({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}I&&n(H,I),M.icon!==void 0&&c(H,String(M.icon)),M.icon_color!==void 0&&i?.(H,String(M.icon_color)),M.status!==void 0&&v.onChangeStatus(H,M.status),M.label_keys!==void 0&&v.onChangeLabels(H,M.label_keys??[]),M.tab_key!==void 0&&v.onChangeProject(H,String(M.tab_key??"")),M.start_date!==void 0&&v.onChangeDate(H,"start_date",String(M.start_date??"")),M.due_date!==void 0&&v.onChangeDate(H,"due_date",String(M.due_date??"")),M.reminders!==void 0&&v.onChangeReminder(H,M.reminders),M.priority!==void 0&&v.onChangePriority(H,M.priority),M.event_time!==void 0&&v.onChangeEventTime?.(H,String(M.event_time??"")),M.event_place!==void 0&&v.onChangeEventPlace?.(H,String(M.event_place??"")),M.event_address!==void 0&&v.onChangeEventAddress?.(H,String(M.event_address??"")),M.content!==void 0&&v.onChangeContent(H,String(M.content??"")),M.note!==void 0&&v.onChangeNote(H,String(M.note??"")),M.visibility!==void 0&&v.onChangeVisibility?.(H,M.visibility,Number(M.visibility_group_seq??0)),_m({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},O={...v,onChangeStatus:(M,H)=>_({status:H},()=>v.onChangeStatus(M,H)),onChangeLabels:(M,H)=>_({label_keys:H},()=>v.onChangeLabels(M,H)),onChangeProject:(M,H)=>_({tab_key:H},()=>v.onChangeProject(M,H)),onChangeDate:(M,H,I)=>_({[H]:I},()=>v.onChangeDate(M,H,I)),onChangeReminder:(M,H)=>_({reminders:H},()=>v.onChangeReminder(M,H)),onChangePriority:(M,H)=>_({priority:H},()=>v.onChangePriority(M,H)),onChangeEventTime:(M,H)=>_({event_time:H},()=>v.onChangeEventTime?.(M,H)),onChangeEventPlace:(M,H)=>_({event_place:H},()=>v.onChangeEventPlace?.(M,H)),onChangeEventAddress:(M,H)=>_({event_address:H},()=>v.onChangeEventAddress?.(M,H)),onChangeContent:(M,H)=>_({content:H},()=>v.onChangeContent(M,H)),onChangeNote:(M,H)=>_({note:H},()=>v.onChangeNote(M,H)),onMemberEdit:(M,H)=>v.onMemberEdit(M,H,k?I=>P(E=>({...E,...I})):null),onChangeNoteDraft:k?(M,H)=>_({note:H},()=>{}):void 0,onChangeVisibility:v.onChangeVisibility?(M,H,I)=>_({visibility:H,visibility_group_seq:I},()=>v.onChangeVisibility?.(M,H,I)):void 0,onAddChecklistItem:(M,H)=>_({checklist:[...w,{label:H,checked:!1}]},()=>v.onAddChecklistItem(M,H)),onToggleChecklistItem:(M,H,I)=>_({checklist:w.map((E,F)=>F===H?{...E,checked:I}:E)},()=>v.onToggleChecklistItem(M,H,I)),onRemoveChecklistItem:(M,H)=>_({checklist:w.filter((I,E)=>E!==H)},()=>v.onRemoveChecklistItem(M,H)),onUpdateChecklistItem:v.onUpdateChecklistItem?(M,H,I)=>_({checklist:w.map((E,F)=>F===H?{...E,label:I}:E)},()=>v.onUpdateChecklistItem?.(M,H,I)):void 0,onReorderChecklist:v.onReorderChecklist?(M,H)=>_({checklist:H},()=>v.onReorderChecklist?.(M,H)):void 0,onLinkChecklistTask:v.onLinkChecklistTask?(M,H,I)=>_({checklist:[...w,{label:I,checked:!1,task_seq:H}]},()=>v.onLinkChecklistTask?.(M,H,I)):void 0},z=Kt(ym,{...O,task:x,myAccountSeq:r,onChangeTitle:(M,H)=>_({title:H},()=>n(M,H)),onToggleCompleted:t,onChangeIcon:(M,H)=>_({icon:H},()=>c(M,H)),onChangeIconColor:(M,H)=>_({icon_color:H},()=>i?.(M,H)),showTitle:k||s==="dialog"}),$=Kt(tm,{onSubmit:(M,H)=>l(x.seq,M,H)},x.seq);return k||s==="dialog"?ps(jk,{children:[Kt(zk,{open:e,onClose:g,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:x.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":x.is_event?"\uC77C\uC815":x.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{raw:!0,icon:Kt(Rk,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:M=>N(M.currentTarget),children:Kt(Ak,{sx:{color:"#6b7280"}})})},...k?[{raw:!0,icon:Kt(Ek,{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:Kt(Jl,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:z})}]},R.seq),ps(Ok,{open:!!D,anchorEl:D,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[f?ps(hd,{onClick:()=>{N(null),A(!0)},children:[Kt(dd,{children:Kt(Nk,{fontSize:"small"})}),Kt(fd,{children:"\uD65C\uB3D9"})]}):null,ps(hd,{onClick:()=>{N(null),ls(x,!0)},children:[Kt(dd,{children:Kt(Pk,{fontSize:"small"})}),Kt(fd,{children:"\uACF5\uC720\uD558\uAE30"})]}),S?ps(hd,{onClick:M=>{let H=D??M.currentTarget;N(null),j(H)},sx:{color:"#e5484d"},children:[Kt(dd,{children:Kt(Dk,{fontSize:"small",sx:{color:"#e5484d"}})}),Kt(fd,{children:"\uC0AD\uC81C"})]}):null]}),Kt(Pt,{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),b?.(x)}}),Kt(Yl,{open:L,taskSeq:x.seq,items:a,loading:h,onLoad:f,onClose:()=>A(!1)})]}):Kt(Mk,{anchor:"right",open:e,onClose:g,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:M=>M.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ps(Jl,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Kt(im,{task:x,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:g,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:b,canDelete:m}),Kt(wm,{sx:{borderColor:"#e6e6e3"}}),Kt(Jl,{sx:{flex:1,minHeight:0},children:Kt(Lk,{ref:y,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:z})}),Kt(wm,{sx:{borderColor:"#37352f"}}),Kt(Jl,{sx:{flexShrink:0},children:$})]})})}import{useEffect as Gk,useState as No}from"react";import{Box as Kr,Button as bd,IconButton as Tm}from"@mui/material";import{FormDialog as Cm}from"@ehfuse/mui-form-dialog";import Yk from"@mui/icons-material/Add";import Xk from"@mui/icons-material/DirectionsRunOutlined";import Zk from"@mui/icons-material/EditOutlined";import{ErrorAlert as Bm}from"@ehfuse/alerts";import{ClearTextField as Im,DateTextField as Em,LabelSelect as Mm}from"@ehfuse/mui-form-controls";import{useEffect as Fk,useState as km}from"react";import{Box as Po,Button as qk,FormControlLabel as pd,Radio as md,RadioGroup as $k}from"@mui/material";import{FormDialog as Hk}from"@ehfuse/mui-form-dialog";import{LabelSelect as Wk}from"@ehfuse/mui-form-controls";import Uk from"@ehfuse/overlay-scrollbar";import{Fragment as Vk,jsx as zr,jsxs as ms}from"react/jsx-runtime";function Sm({open:e,sprint:d,remainingTasks:g,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]=km("backlog"),[c,i]=km(0);Fk(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=g.length>0;return zr(Hk,{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:zr(qk,{variant:"contained",onClick:()=>s({mode:a?t:"keep",moveToSprintSeq:t==="move"?c:0,taskSeqs:g.map(h=>h.seq)}),disabled:a&&t==="move"&&!(c>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:ms(Po,{sx:{display:"flex",flexDirection:"column",gap:2},children:[ms(Po,{sx:{fontSize:18,color:"#37352f"},children:[zr(Po,{component:"span",sx:{fontWeight:600},children:d?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?ms(Vk,{children:[ms(Po,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",g.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),zr(Po,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:zr(Uk,{style:{maxHeight:220},thumb:{width:6},children:g.map(h=>ms(Po,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[zr(Po,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),zr(Dt,{option:fr(h)})]},h.seq))})}),ms($k,{value:t,onChange:(h,f)=>n(f),children:[r.length>0?zr(pd,{value:"move",control:zr(md,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?zr(Po,{sx:{pl:4,pb:1},children:zr(Wk,{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,zr(pd,{value:"backlog",control:zr(md,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),zr(pd,{value:"keep",control:zr(md,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):zr(Po,{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 gd="custom-";function Kk(e){return e.startsWith(gd)}function bH(e){return e>0?`${gd}${e}`:""}function ni(e){if(!Kk(e))return 0;let d=Number(e.slice(gd.length));return Number.isInteger(d)&&d>0?d:0}import{Fragment as Om,jsx as Ht,jsxs as oi}from"react/jsx-runtime";var Jk=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Rm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function MH({open:e,customTabs:d,sprints:g,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]=No(""),[f,u]=No(""),[b,m]=No(""),[v,k]=No(""),[B,R]=No(""),[L,A]=No(!1),[D,N]=No(!1),[q,j]=No(null),S=q?t.filter(O=>(O.sprint_seq??0)===q.seq&&!O.completed):[],[T,P]=No(0);Gk(()=>{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)},x=T>0||D,w=async()=>{let O=ni(a);if(!O){Bm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!f.trim()){Bm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}A(!0);try{if(T>0){s(T,{name:f.trim(),goal:b.trim(),start_date:v,end_date:B}),p();return}await o({group_seq:O,name:f.trim(),goal:b.trim(),start_date:v,end_date:B})&&p()}finally{A(!1)}},_=new Map(d.map(O=>[ni(O.key),O.label])),C=Ht(Kr,{children:i.length===0?Ht(Kr,{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(Om,{children:Ht(Kr,{children:g.length===0?oi(Kr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ht(Xk,{sx:{fontSize:48,color:"#d9d9d6"}}),Ht(Kr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):g.map(O=>oi(Kr,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[oi(Kr,{sx:{minWidth:0},children:[oi(Kr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Ht(Kr,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:O.name}),Ht(Kr,{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"}),oi(Kr,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Rm(O.start_date)," ~"," ",Rm(O.end_date)]})]}),O.goal?Ht(Kr,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:O.goal}):null]}),oi(Kr,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ht(Mm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:O.status,options:Jk.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(Tm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(O),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Ht(Zk,{sx:{fontSize:18}})}),Ht(Tm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(O.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ht(pr,{style:{width:16,height:16}})})]})]},O.seq))})})});return oi(Om,{children:[Ht(Cm,{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(bd,{startIcon:Ht(Yk,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Ht(bd,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),Ht(Sm,{open:q!==null,sprint:q,remainingTasks:S,sprints:g,onClose:()=>j(null),onConfirm:O=>{q&&n?.(q.seq,O),j(null)}}),Ht(Cm,{open:x,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(Kr,{sx:{pt:1},children:oi(Kr,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Ht(Mm,{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(Im,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:f,onChange:O=>u(O.target.value)}),Ht(Em,{size:"medium",label:"\uC2DC\uC791\uC77C",value:v,onChange:O=>k(O.target.value)}),Ht(Em,{size:"medium",label:"\uC885\uB8CC\uC77C",value:B,onChange:O=>R(O.target.value)}),Ht(Im,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:b,onChange:O=>m(O.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Ht(bd,{variant:"contained",onClick:()=>{w()},disabled:L,children:T>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as an,Button as Nm,Tooltip as Qk}from"@mui/material";import{FormDialog as e6}from"@ehfuse/mui-form-dialog";import t6 from"@mui/icons-material/CalendarMonthOutlined";import r6 from"@mui/icons-material/FileUploadOutlined";import n6 from"@mui/icons-material/FileDownloadOutlined";var yd={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."}},Am=Object.values(yd);function Ql(e){return yd[e??"google"]??yd.google}import{jsx as gr,jsxs as gs}from"react/jsx-runtime";function FH({open:e,imports:d=[],onOpenExport:g,onOpenImport:l,onClose:o}){let s=gs(an,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[gs(an,{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:[gr(an,{children:gs(an,{component:"span",children:[gr("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uB2E4\uB978 \uCE98\uB9B0\uB354\uC5D0\uC11C"," ",gr("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uBCF4\uAC8C \uD569\uB2C8\uB2E4."]})}),gr(an,{children:gs(an,{component:"span",children:[gr("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."]})}),gr(an,{children:gr(an,{component:"span",children:"\uB450 \uBC29\uD5A5 \uBAA8\uB450 \uC6D0\uBCF8\uC744 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})})]}),gr(an,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Am.map((r,t)=>gs(an,{sx:{display:"flex",alignItems:"center",gap:2,px:2,py:1.75,borderTop:t>0?"1px solid #f2f2f0":"none"},children:[gr(t6,{sx:{fontSize:22,color:"#787774",flexShrink:0}}),gs(an,{sx:{flex:1,minWidth:0},children:[gr(an,{sx:{fontSize:16,color:"#37352f"},children:r.name}),r.exportBlockedReason??r.importBlockedReason?gr(an,{sx:{fontSize:13.5,color:"#8a6d1d",mt:.25,lineHeight:1.6},children:r.exportBlockedReason??r.importBlockedReason}):null]}),gr(Pm,{label:"\uB0B4\uBCF4\uB0B4\uAE30",icon:gr(r6,{sx:{fontSize:18}}),supported:r.exportSupported,reason:r.exportBlockedReason,onClick:()=>g(r.key)}),gr(Pm,{label:Dm(d,r.key)>0?`\uAC00\uC838\uC624\uAE30 (${Dm(d,r.key)})`:"\uAC00\uC838\uC624\uAE30",icon:gr(n6,{sx:{fontSize:18}}),supported:r.importSupported,reason:r.importBlockedReason,onClick:()=>l(r.key)})]},r.key))})]});return gr(e6,{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:gr(Nm,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})}})}function Dm(e,d){return e.filter(g=>g.provider===d).length}function Pm({label:e,icon:d,supported:g,reason:l,onClick:o}){let s=gr(an,{component:"span",sx:{flexShrink:0},children:gr(Nm,{size:"medium",variant:"outlined",startIcon:d,disabled:!g,onClick:o,sx:{minWidth:132,whiteSpace:"nowrap"},children:e})});return g?s:gr(Qk,{title:l??"\uC774 \uC11C\uBE44\uC2A4\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",arrow:!0,children:s})}import{useState as Lm}from"react";import{Box as Ir,Button as vd,Divider as s6,IconButton as a6,TextField as l6}from"@mui/material";import{FormDialog as c6}from"@ehfuse/mui-form-dialog";import u6 from"@mui/icons-material/OpenInNewOutlined";import d6 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as f6}from"@ehfuse/alerts";import{Fragment as o6}from"react";import{Fragment as i6,jsx as xd}from"react/jsx-runtime";function sa({text:e}){let d=String(e??"").split("**");return xd(i6,{children:d.map((g,l)=>l%2===1?xd("b",{children:g},l):xd(o6,{children:g},l))})}import{jsx as qt,jsxs as aa}from"react/jsx-runtime";function tW({open:e,imports:d,provider:g,onRegister:l,onRemove:o,onClose:s}){let r=Ql(g),[t,n]=Lm(""),[c,i]=Lm(!1),a=async()=>{let u=t.trim();if(u){i(!0);try{await l(u)&&n("")}finally{i(!1)}}},h=async u=>{await f6({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=aa(Ir,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[aa(Ir,{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(Ir,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),d.length>0?qt(Ir,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:d.map((u,b)=>aa(Ir,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:b>0?"1px solid #efefed":"none"},children:[qt(d6,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),qt(Ir,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.name||r.defaultCalendarName}),qt(a6,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{h(u)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:qt(pr,{sx:{fontSize:18}})})]},u.seq))}):qt(Ir,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),qt(s6,{sx:{my:1,borderColor:"#e6e6e3"}}),qt(Ir,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),aa(Ir,{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(Ir,{children:qt(Ir,{component:"span",children:qt(sa,{text:u})})},u)),qt(Ir,{children:qt(Ir,{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(Ir,{children:qt(Ir,{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(Ir,{children:qt(Ir,{component:"span",children:qt(sa,{text:r.importWarning})})}):null]}),aa(Ir,{sx:{display:"flex",gap:2,alignItems:"center"},children:[qt(l6,{value:t,onChange:u=>n(u.target.value),fullWidth:!0,label:"iCal \uC8FC\uC18C",placeholder:r.importPlaceholder,slotProps:{input:{spellCheck:!1}}}),qt(vd,{variant:"contained",disabled:!t.trim()||c,onClick:()=>{a()},sx:{flexShrink:0},children:c?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return qt(c6,{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(vd,{variant:"outlined",startIcon:qt(u6,{sx:{fontSize:16}}),onClick:()=>window.open(r.homeUrl,"_blank"),children:r.name}),right:qt(vd,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{Box as Mi,Button as la,TextField as h6}from"@mui/material";import{FormDialog as p6}from"@ehfuse/mui-form-dialog";import m6 from"@mui/icons-material/ContentCopyOutlined";import zm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as jm}from"@ehfuse/alerts";import{Fragment as b6,jsx as Or,jsxs as Ri}from"react/jsx-runtime";function g6(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function dW({open:e,feed:d,feedTaskCount:g,provider:l,buildFeedUrl:o,onSubscribe:s,onClose:r}){let t=Ql(l),n=o??g6,c=d.subscribed?n(d.token):"",i=()=>{navigator.clipboard.writeText(c).then(()=>jm("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>jm("\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=Ri(Mi,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ri(Mi,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Or("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C ",t.name,"\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),g===0?Ri(Mi,{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.",Or("br",{}),Or("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?Ri(b6,{children:[Or(h6,{value:c,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Ri(Mi,{sx:{display:"flex",gap:2},children:[Or(la,{variant:"outlined",startIcon:Or(m6,{}),onClick:i,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),t.buildSubscribeUrl?Ri(la,{variant:"contained",startIcon:Or(zm,{}),onClick:a,children:[t.name,"\uC5D0 \uCD94\uAC00"]}):null]}),Ri(Mi,{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=>Or(Mi,{children:Or("span",{children:Or(sa,{text:f})})},f)),Or(Mi,{children:Or("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."})})]})]}):Or(la,{variant:"contained",onClick:s,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Or(p6,{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:Or(la,{variant:"outlined",startIcon:Or(zm,{sx:{fontSize:16}}),onClick:()=>window.open(t.homeUrl,"_blank"),children:t.name}),right:Or(la,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{useEffect as y6,useMemo as wd,useState as _d}from"react";import{Box as ca,Button as x6,Typography as v6}from"@mui/material";import{FormDialog as w6}from"@ehfuse/mui-form-dialog";import{SearchTextField as _6}from"@ehfuse/mui-form-controls";import{TreeView as k6}from"@ehfuse/tree-view";import{Fragment as E6,jsx as Hn,jsxs as M6}from"react/jsx-runtime";function Fm(e){return`${e.name}#${e.seq}`}function S6(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function T6(e){let d=[],g=l=>{for(let o of l.employees??[])d.push(o);for(let o of l.groups??[])g(o)};for(let l of e)g(l);return d}function C6(e,d){return d?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(g=>String(g).toLowerCase().includes(d)):!0}function B6(e){let d=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Fm(e),renderLabel:Hn(ca,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Hn(ca,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:d})})}}function qm(e,d){let g=(e.groups??[]).map(o=>qm(o,d)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>C6(o,d)).map(B6);return g.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...g,...l]}}function I6({groups:e,allEmployees:d,initialSelectedSeqs:g,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=_d(""),n=wd(()=>e.map(i=>qm(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=wd(()=>d.filter(i=>g.includes(i.seq)).map(Fm),[]);return M6(E6,{children:[Hn(ca,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Hn(_6,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Hn(ca,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Hn(k6,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(S6).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function vW({open:e,title:d="\uC9C1\uC6D0 \uC120\uD0DD",hint:g="",groups:l,multiple:o=!1,selectedSeqs:s,confirmText:r="\uD655\uC778",onConfirm:t,onClose:n}){let c=jt(),[i,a]=_d([]),[h,f]=_d(0),u=wd(()=>T6(l),[l]),b=s??[];y6(()=>{e&&(a(b),f(v=>v+1))},[e]);let m=()=>{let v=u.filter(k=>i.includes(k.seq));t(o?v:v.slice(0,1)),n()};return Hn(w6,{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:Hn(ca,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:Hn(I6,{groups:l,allEmployees:u,initialSelectedSeqs:b,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:g?Hn(v6,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:g}):void 0,right:Hn(x6,{variant:"contained",onClick:m,children:r})}})}import{useEffect as eS,useMemo as _0,useState as ga}from"react";import{Box as jo,Button as k0}from"@mui/material";import{FormDialog as tS}from"@ehfuse/mui-form-dialog";import{LabelSelect as Od}from"@ehfuse/mui-form-controls";import rS from"@mui/icons-material/SpeedOutlined";import{useEffect as R6,useState as O6}from"react";import{Box as ln,Button as A6}from"@mui/material";import{FormDialog as D6}from"@ehfuse/mui-form-dialog";import{LabelSelect as P6,NumberField as $m}from"@ehfuse/mui-form-controls";import N6 from"@ehfuse/overlay-scrollbar";import{jsx as Gr,jsxs as ua}from"react/jsx-runtime";var L6=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function Hm({open:e,capacity:d,employees:g,onClose:l,onSave:o}){let[s,r]=O6(d??go);R6(()=>{e&&r(d??go)},[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 Gr(D6,{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:Gr(A6,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:ua(ln,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Gr(ln,{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."}),ua(ln,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Gr(ln,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),Gr(P6,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:L6,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),ua(ln,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Gr(ln,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),Gr($m,{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))}))})]}),Gr(ln,{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`}),Gr(ln,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),g.length===0?Gr(ln,{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."}):Gr(ln,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Gr(N6,{style:{maxHeight:260},thumb:{width:6},children:g.filter(c=>Number(c.account_seq)>0).map(c=>ua(ln,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[ua(ln,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?Gr(ln,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),Gr(ln,{sx:{width:132,flexShrink:0},children:Gr($m,{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 tc}from"@mui/material";import{Bar as q6,BarChart as $6,CartesianGrid as H6,Cell as W6,ReferenceLine as U6,ResponsiveContainer as V6,Tooltip as K6,XAxis as G6,YAxis as Y6}from"recharts";import{Box as z6}from"@mui/material";import{jsx as j6}from"react/jsx-runtime";function Yr({text:e,height:d}){return j6(z6,{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 F6}from"react";var ec="#2f80ed",Wm="#a9c9f5",Oi="#9a9a97",kd="#2e9e6b",lo="#3d7eff",Sd="#c3c8ce",da="#f2a30f",fa={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},bs={...fa,cursor:!1},ys={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>F6("span",{style:{paddingRight:14,color:"#37352f"}},e)};function br(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var jr={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 Wn,jsxs as ha}from"react/jsx-runtime";function X6(e,d){let g=d.filter(l=>l.sprint_seq===e.seq&&!l.archived&&l.completed);return{points:g.reduce((l,o)=>l+(o.story_points??0),0),count:g.length}}function Um({sprints:e,tasks:d,height:g=200}){let o=[...e].sort((i,a)=>`${i.start_date}|${i.seq}`.localeCompare(`${a.start_date}|${a.seq}`)).map(i=>({sprint:i,...X6(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?Wn(Yr,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:g}):ha(tc,{sx:br(g),children:[ha(tc,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ha("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?ha("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Wn(tc,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),Wn(tc,{sx:co(g),children:Wn(V6,{width:"100%",height:"100%",children:ha($6,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[Wn(H6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Wn(G6,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),Wn(Y6,{tick:{fontSize:13},width:40,allowDecimals:!1}),Wn(K6,{...bs,formatter:i=>`${Number(i??0)}${r}`}),n!==null?Wn(U6,{y:n,stroke:Oi,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,Wn(q6,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>Wn(W6,{fill:i.closed?ec:Wm},i.\uBAA9\uD45C))})]})})})]})}import{useMemo as Z6}from"react";import{Box as uo}from"@mui/material";import{CartesianGrid as J6,Line as Vm,LineChart as Q6,ResponsiveContainer as e8,Tooltip as t8,XAxis as r8,YAxis as n8}from"recharts";import{jsx as cn,jsxs as ii}from"react/jsx-runtime";function Km(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function o8(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function i8(e){return e.slice(5).replace("-",".")}function Gm({sprint:e,tasks:d,todayStr:g,height:l=200,headerLeft:o}){let s=Z6(()=>{let a=Km(e.start_date),h=Km(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 b=u.some(D=>(D.story_points??0)>0),m=D=>b?D.story_points??0:1,v=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(o8(D));let R=v,L=v;return{empty:!1,data:B.map((D,N)=>{let q=B.length===1?0:v*(1-N/(B.length-1));return D<=g&&(R-=k.get(D)??0,L=Math.max(0,R)),{\uB0A0\uC9DC:i8(D),\uC774\uC0C1:Math.round(q*10)/10,\uB0A8\uC740\uB7C9:D<=g?Math.max(0,R):null}}),total:v,usePoints:b,last:L}},[e,d,g]);if(!s)return ii(uo,{sx:br(l),children:[o?cn(uo,{sx:jr,children:o}):null,cn(Yr,{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 ii(uo,{sx:br(l),children:[o?cn(uo,{sx:jr,children:o}):null,cn(Yr,{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 ii(uo,{sx:br(l),children:[ii(uo,{sx:jr,children:[o?cn(uo,{sx:{flexShrink:0},children:o}):null,ii(uo,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ii("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),ii("span",{children:["\uD604\uC7AC"," ",cn(uo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),cn(uo,{sx:co(l),children:cn(e8,{width:"100%",height:"100%",children:ii(Q6,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[cn(J6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),cn(r8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),cn(n8,{tick:{fontSize:13},width:40,allowDecimals:!1}),cn(t8,{...fa,formatter:a=>`${Number(a??0)}${i}`}),cn(Vm,{type:"linear",dataKey:"\uC774\uC0C1",stroke:Oi,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),cn(Vm,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:ec,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}import{useMemo as t0}from"react";import{Box as fo}from"@mui/material";import{Area as Bd,AreaChart as c8,CartesianGrid as u8,Legend as d8,ResponsiveContainer as f8,Tooltip as h8,XAxis as p8,YAxis as m8}from"recharts";function Lo(e){let d=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function rc(e,d=new Date){let g=new Date(d);return g.setMonth(g.getMonth()-e),g}function YW(e=new Date){return{fromDate:Lo(rc(1,e)),toDate:Lo(e)}}var Cd=864e5,pa=[0,1,2,3,5,8,13,21];function Zm(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function Td(e){let d=String(e??"").trim(),g=/^(\d{4}-\d{2}-\d{2})(?:[ T](\d{2}:\d{2}))?/.exec(d);if(!g)return null;let l=new Date(`${g[1]}T${g[2]??"00:00"}:00`).getTime();return Number.isNaN(l)?null:l}function xs(e){let d=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(d)?d.slice(0,10):""}function s8(e){let d=xs(e.created_time)||xs(e.start_date)||xs(e.completed_time);if(!d)return null;let g=xs(e.start_date),l=g&&g>d?g:d,o=e.completed?xs(e.completed_time)||d:"";return{created:d,started:l,done:o}}function Jm(e,d){let g=/^\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(Lo(new Date(g.getTime()-s*Cd)));return o}function Qm(e,d,g){let l=Jm(d,g),o=e.filter(Zm).map(s8).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 a8(e,d){if(e.length===0)return 0;let g=Math.min(e.length-1,Math.max(0,Math.ceil(e.length*d)-1));return e[g]}function Ym(e){if(e.length===0)return null;let d=[...e].sort((s,r)=>s-r),g=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:g(o),average:g(d.reduce((s,r)=>s+r,0)/d.length),p85:g(a8(d,.85))}}function Xm(e){for(let d=pa.length-1;d>=0;d-=1)if(e>=pa[d])return d;return 0}function l8(){return pa.map((e,d)=>d===pa.length-1?`${e}\uC77C+`:`${e}~${pa[d+1]}\uC77C`)}function e0(e,d,g){let l=Jm(d,g),o=l[0],s=l[l.length-1],r=l8(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!Zm(a)||!a.completed)continue;let h=xs(a.completed_time);if(!h||h<o||h>s)continue;let f=Td(a.completed_time),u=Td(a.created_time);if(f===null||u===null)continue;let b=Math.max(0,(f-u)/Cd);c.push(b),t[Xm(b)]+=1;let m=Td(a.start_date);if(m===null||m>f)continue;let v=Math.max(0,(f-Math.max(m,u))/Cd);i.push(v),n[Xm(v)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:Ym(c),cycle:Ym(i)}}import{jsx as Xr,jsxs as si}from"react/jsx-runtime";function g8(e){return e.slice(5).replace("-",".")}function r0({tasks:e,todayStr:d,days:g=30,height:l=220,headerLeft:o}){let s=t0(()=>Qm(e,g,d),[e,g,d]),r=t0(()=>s.points.map(n=>({\uB0A0\uC9DC:g8(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=si(fo,{sx:jr,children:[o?Xr(fo,{sx:{flexShrink:0},children:o}):null,si(fo,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[si(fo,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[si("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),si("span",{children:["\uC9C4\uD589 \uC911"," ",Xr(fo,{component:"span",sx:{color:lo,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),Xr(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?si(fo,{sx:br(l),children:[o?Xr(fo,{sx:jr,children:o}):null,Xr(Yr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):si(fo,{sx:br(l),children:[t,Xr(fo,{sx:co(l),children:Xr(f8,{width:"100%",height:"100%",children:si(c8,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[Xr(u8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Xr(p8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),Xr(m8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Xr(h8,{...fa,formatter:n=>`${Number(n??0)}\uAC74`}),Xr(d8,{...ys}),Xr(Bd,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:kd,fill:kd,fillOpacity:.9}),Xr(Bd,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:lo,fill:lo,fillOpacity:.85}),Xr(Bd,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:Sd,fill:Sd,fillOpacity:.9})]})})})]})}import{useMemo as n0}from"react";import{Box as un}from"@mui/material";import{Bar as o0,BarChart as b8,CartesianGrid as y8,Legend as x8,ResponsiveContainer as v8,Tooltip as w8,XAxis as _8,YAxis as k8}from"recharts";import{jsx as Er,jsxs as Bn}from"react/jsx-runtime";function i0({label:e,color:d,summary:g}){let l=Bn(un,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Er(un,{sx:{width:10,height:10,borderRadius:.5,bgcolor:d,flexShrink:0}}),Er(un,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return g?Bn(un,{sx:{display:"contents"},children:[l,Bn("span",{children:[g.count,"\uAC74"]}),Bn("span",{children:["\uC911\uC559\uAC12"," ",Er(un,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:g.median}),"\uC77C"]}),Bn("span",{children:["\uD3C9\uADE0 ",g.average,"\uC77C"]}),Bn("span",{children:["85% ",g.p85,"\uC77C \uC774\uB0B4"]})]}):Bn(un,{sx:{display:"contents"},children:[l,Er(un,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function s0({tasks:e,todayStr:d,days:g=30,height:l=200,headerLeft:o}){let s=n0(()=>e0(e,g,d),[e,g,d]),r=n0(()=>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(un,{sx:br(l),children:[Bn(un,{sx:jr,children:[o?Er(un,{sx:{flexShrink:0},children:o}):null,Bn(un,{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:[Er(i0,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:lo,summary:s.lead}),Er(i0,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:da,summary:s.cycle})]})]}),Er(un,{sx:co(l),children:Er(v8,{width:"100%",height:"100%",children:Bn(b8,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[Er(y8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Er(_8,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),Er(k8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Er(w8,{...bs,formatter:t=>`${Number(t??0)}\uAC74`}),Er(x8,{...ys}),Er(o0,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:lo,radius:[3,3,0,0]}),Er(o0,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:da,radius:[3,3,0,0]})]})})})]}):Bn(un,{sx:br(l),children:[o?Er(un,{sx:jr,children:o}):null,Er(Yr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}import{useMemo as u0}from"react";import{Box as Ai}from"@mui/material";import{Bar as Ed,BarChart as I8,CartesianGrid as E8,Cell as M8,Legend as R8,ReferenceLine as d0,ResponsiveContainer as O8,Tooltip as A8,XAxis as D8,YAxis as P8}from"recharts";function S8(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let g=new Date(`${e}T00:00:00`).getTime(),l=new Date(`${d}T00:00:00`).getTime();return Number.isNaN(g)||Number.isNaN(l)?null:Math.round((l-g)/864e5)}function T8(e,d,g){let l=String(e.due_date??"").slice(0,10),o=S8(d,l);return o===null?"later":o<0?"overdue":o<=g?"soon":"later"}function nc(e,d){let{todayStr:g,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=d,t=r??go,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[T8(i,g,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=C8(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 oc(e,d){return e.filter(g=>g.completed||g.archived||g.is_notice||g.is_event||g.linked_only?!1:Number(g.manager_account_seq??0)===d).sort((g,l)=>{let o=String(g.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(g.title??"").localeCompare(String(l.title??""))})}function C8(e,d){if(!(e>0))return 0;let g=Math.max(0,Math.floor(Number(d.by_account?.[e])||0));return g>0?g:Math.max(0,Math.floor(Number(d.default_capacity)||0))}function ic(e){return e.capacity>0&&e.load>e.capacity}function a0(e,d){return d>0&&e.total>=d}function l0(e){let d=e.filter(g=>g.accountSeq>0);return d.length===0?0:d.reduce((g,l)=>g+l.total,0)/d.length}function Id(e,d){let g=new Date(`${e}T00:00:00`);g.setDate(g.getDate()+d);let l=o=>String(o).padStart(2,"0");return`${g.getFullYear()}-${l(g.getMonth()+1)}-${l(g.getDate())}`}function B8(e){let d=new Date(`${e}T00:00:00`);if(Number.isNaN(d.getTime()))return e;let g=(d.getDay()+6)%7;return Id(e,-g)}function c0(e,d){let{todayStr:g,includeUnassigned:l=!0,weeks:o=6,limit:s}=d,r=B8(g),t=Array.from({length:Math.max(1,o)},(f,u)=>{let b=Id(r,u*7),m=Id(b,6),[,v,k]=b.split("-");return{start:b,end:m,label:`${Number(v)}/${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 b=u?String(f.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",m=c.get(u)??{accountSeq:u,name:b,overdue:0,byWeek:new Array(t.length).fill(0),noDue:0,total:0,beyond:0},v=String(f.due_date??"").slice(0,10);if(m.total+=1,!/^\d{4}-\d{2}-\d{2}$/.test(v))m.noDue+=1;else if(v<g)m.overdue+=1;else if(v>n)m.beyond+=1;else{let k=t.findIndex(B=>v>=B.start&&v<=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 f0,jsx as Mr,jsxs as ai}from"react/jsx-runtime";var ma="#e5484d";function h0({tasks:e,todayStr:d,soonDays:g=7,overloadThreshold:l=0,capacity:o=go,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=u0(()=>nc(e,{todayStr:d,soonDays:g,capacity:o}),[e,d,g,o]),i=u0(()=>l0(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(b=>b.accountSeq>0&&(h?ic(b):a0(b,a))).length;return c.length===0?ai(Ai,{sx:br(s),children:[r?Mr(Ai,{sx:jr,children:r}):null,Mr(Yr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):ai(Ai,{sx:br(s),children:[ai(Ai,{sx:jr,children:[r,ai(Ai,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",Mr("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?ai(f0,{children:["\uC6A9\uB7C9 ",Mr("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?f:""]}):ai(f0,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",Mr("b",{children:a}),"\uAC74"]}),u>0?ai(Ai,{component:"span",sx:{ml:1,color:ma,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),Mr(Ai,{sx:co(s),children:Mr(O8,{width:"100%",height:"100%",children:ai(I8,{data:c,layout:"vertical",onClick:n?b=>{let m=c.find(v=>v.name===String(b?.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:[Mr(E8,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),Mr(D8,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),Mr(P8,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),Mr(A8,{...bs,formatter:(b,m)=>[`${Number(b)||0}\uAC74`,String(m)],labelFormatter:b=>{let m=c.find(v=>v.name===b);return!m||!(m.capacity>0)?String(b):`${b} \u2014 \uC6A9\uB7C9 ${m.capacity}${f} \uC911 ${m.load} (${Math.round(m.ratio*100)}%)`}}),Mr(R8,{...ys}),i>0?Mr(d0,{x:i,stroke:Oi,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:Oi}}):null,o.default_capacity>0?Mr(d0,{x:o.default_capacity,stroke:ma,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:ma}}):null,Mr(Ed,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:ma}),Mr(Ed,{dataKey:"soon",name:`\uC784\uBC15(${g}\uC77C)`,stackId:"load",fill:da}),Mr(Ed,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:lo,radius:[0,3,3,0],children:c.map(b=>Mr(M8,{fill:h&&ic(b)?ma:lo,fillOpacity:h&&ic(b)?.45:1,stroke:b.accountSeq===t?"#37352f":void 0,strokeWidth:b.accountSeq===t?1.5:0},b.accountSeq))})]})})})]})}import{useEffect as H8,useState as W8}from"react";import{Box as U8,Button as V8}from"@mui/material";import{FormDialog as K8}from"@ehfuse/mui-form-dialog";import{useState as N8}from"react";import{Box as yr,Button as L8,Menu as z8,MenuItem as j8}from"@mui/material";import F8 from"@mui/icons-material/PersonOutlineOutlined";import q8 from"@ehfuse/overlay-scrollbar";import{jsx as Ar,jsxs as zo}from"react/jsx-runtime";var p0=56,m0=68,g0=96;function $8(e){let d=String(e.due_date??"").slice(0,10);return d?d.slice(5).replace("-","/"):"-"}function b0(e,d){let g=String(e.due_date??"").slice(0,10);return!!g&&g<d}function y0({tasks:e,row:d,todayStr:g,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=N8(null),a=oc(e,d.accountSeq),h=f=>o.find(u=>u.accountSeq===f)?.total??0;return zo(yr,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:zo(yr,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[Ar(yr,{component:"span",sx:{fontWeight:700},children:d.name}),zo(yr,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),d.capacity>0?zo(yr,{component:"span",sx:{color:d.load>d.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",d.capacity," \uC911 ",d.load]}):null]}),zo(yr,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[zo(yr,{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:[Ar(yr,{sx:{width:p0,flexShrink:0},children:"\uB9C8\uAC10"}),Ar(yr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Ar(yr,{sx:{width:m0,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?Ar(yr,{sx:{width:g0,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),Ar(yr,{sx:{flex:1,minHeight:0},children:Ar(q8,{style:{height:"100%"},thumb:{width:6},children:a.length===0?Ar(yr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(f=>zo(yr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[Ar(yr,{sx:{width:p0,flexShrink:0,fontSize:13.5,color:b0(f,g)?"#e5484d":"#787774",fontWeight:b0(f,g)?700:400},children:$8(f)}),Ar(yr,{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}),Ar(yr,{sx:{width:m0,flexShrink:0,display:"flex",justifyContent:"center"},children:Ar(Hr,{priority:f.priority})}),t?Ar(yr,{sx:{width:g0,flexShrink:0,display:"flex",justifyContent:"center"},children:Ar(L8,{size:"small",variant:"outlined",startIcon:Ar(F8,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:f.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},f.seq))})})]}),Ar(z8,{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=>zo(j8,{onClick:()=>{c&&t&&t(c.taskSeq,Number(f.account_seq),f.name),i(null)},sx:{fontSize:14,minWidth:200},children:[Ar(yr,{sx:{flex:1},children:f.name}),zo(yr,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(f.account_seq)),"\uAC74"]})]},f.account_seq))})]})}import{jsx as sc}from"react/jsx-runtime";function x0({open:e,row:d,rows:g,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=W8(d);H8(()=>{d&&i(d)},[d]);let a=d??c,h=a?oc(l,a.accountSeq).length:0;return sc(K8,{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:sc(V8,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:sc(U8,{sx:{minHeight:0},children:a?sc(y0,{tasks:l,row:a,rows:g,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}import{useMemo as G8}from"react";import{Box as gn,Tooltip as Y8}from"@mui/material";import{OverlayScrollbar as X8}from"@ehfuse/overlay-scrollbar";import{jsx as Zr,jsxs as lc}from"react/jsx-runtime";var v0="#e5484d",Z8="#2f80ed",J8="#9a9a97",Md=30,Q8=96,ac=56;function Rd({count:e,max:d,color:g,title:l}){let o=e>0&&d>0?.18+e/d*.72:0;return Zr(Y8,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:Zr(gn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:o>0?`${g}${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 w0({tasks:e,todayStr:d,weeks:g=6,height:l=200}){let o=G8(()=>c0(e,{todayStr:d,weeks:g}),[e,d,g]);if(o.rows.length===0)return Zr(gn,{sx:br(l),children:Zr(Yr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${Q8}px ${ac}px repeat(${o.weeks.length}, minmax(${ac}px, 1fr)) ${ac}px ${ac}px`,r={height:Md,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 Zr(gn,{sx:br(l),children:Zr(X8,{style:{height:"100%"},thumb:{width:8},children:lc(gn,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${Md}px repeat(${o.rows.length}, minmax(${Md}px, 1fr))`},children:[Zr(gn,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),Zr(gn,{sx:{...r,color:v0},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>Zr(gn,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),Zr(gn,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),Zr(gn,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>lc(gn,{sx:{display:"contents"},children:[Zr(gn,{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}),Zr(Rd,{count:t.overdue,max:o.maxCell,color:v0,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>Zr(Rd,{count:n,max:o.maxCell,color:Z8,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),Zr(Rd,{count:t.noDue,max:o.maxCell,color:J8,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),lc(gn,{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?lc(gn,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}import{Fragment as S0,jsx as er,jsxs as cc}from"react/jsx-runtime";var T0="min(560px, 62vh)",nS=`calc(${T0} - 4px)`,oS=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function hV({open:e,sprints:d,tasks:g,todayStr:l,showSprintCharts:o,capacity:s=go,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,f]=ga(0),[u,b]=ga(30);eS(()=>{if(!e)return;let y=d.find(w=>w.status==="active")??d[0],x=d.find(w=>w.seq===i)??y;f(x?.seq??0)},[e]);let m=_0(()=>d.find(y=>y.seq===h)??null,[d,h]),v={height:nS,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=er(Od,{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]=ga("distribution"),L=er(Od,{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]=ga(!1),[N,q]=ga(0),j=_0(()=>nc(g,{todayStr:l,capacity:s}),[g,l,s]),S=j.find(y=>y.accountSeq===N)??null,T=cc(S0,{children:[L,t?er(k0,{size:"small",variant:"outlined",startIcon:er(rS,{sx:{fontSize:18}}),onClick:()=>D(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),P=o??d.length>0,p=er(Od,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:oS,onChange:y=>b(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return cc(S0,{children:[er(tS,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:T0,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(jo,{sx:v,children:er(Um,{sprints:d,tasks:g,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:er(jo,{sx:v,children:m?er(Gm,{sprint:m,tasks:g,todayStr:l,height:"100%",headerLeft:k}):cc(jo,{sx:br("100%"),children:[er(jo,{sx:jr,children:k}),er(Yr,{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(jo,{sx:v,children:er(r0,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:er(jo,{sx:v,children:B==="timeline"?cc(jo,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[er(jo,{sx:jr,children:T}),er(w0,{tasks:g,todayStr:l,height:"100%"})]}):er(h0,{tasks:g,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(jo,{sx:v,children:er(s0,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:er(k0,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),er(x0,{open:N>0,row:S,rows:j,tasks:g,todayStr:l,employees:r,onClose:()=>q(0),onChangeManager:n,onOpenTask:c}),t?er(Hm,{open:A,capacity:s,employees:r,onClose:()=>D(!1),onSave:async y=>{await t(y),D(!1)}}):null]})}import{Checkbox as iS,Divider as sS,Menu as aS,MenuItem as Ad}from"@mui/material";import{jsx as ba,jsxs as C0}from"react/jsx-runtime";function yV({anchorEl:e,candidates:d,selectedNames:g,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return C0(aS,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[d.length===0?ba(Ad,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):d.map(t=>{let n=g.includes(t.name);return C0(Ad,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[ba(iS,{size:"small",checked:n,sx:{p:0}}),ba(Wr,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),ba(sS,{}),ba(Ad,{disabled:g.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as lS}from"react";import{ButtonBase as cS,Menu as uS,MenuItem as dS}from"@mui/material";import fS from"@mui/icons-material/KeyboardArrowDown";import hS from"@mui/icons-material/Check";import{Fragment as pS,jsx as Dd,jsxs as Pd}from"react/jsx-runtime";function CV({value:e,onChange:d,options:g}){let[l,o]=lS(null),s=g??jc,r=jc.find(t=>t.value===e)?.label??"";return Pd(pS,{children:[Pd(cS,{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,Dd(fS,{sx:{fontSize:17,color:"#9a9a97"}})]}),Dd(uS,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>Pd(dS,{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?Dd(hS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}import{Box as uc,ButtonBase as mS}from"@mui/material";import{DateTextField as B0}from"@ehfuse/mui-form-controls";import{jsx as ya,jsxs as I0}from"react/jsx-runtime";var gS=[{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 E0({fromDate:e,toDate:d,onChange:g}){let l=s=>{if(s<=0){g("","");return}g(Lo(rc(s)),Lo(new Date))},o=s=>s<=0?!e&&!d:!e||!d?!1:e===Lo(rc(s))&&d===Lo(new Date);return I0(uc,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[ya(uc,{sx:{display:"flex",alignItems:"center",gap:1.5},children:gS.map(s=>{let r=o(s.months);return ya(mS,{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)})}),I0(uc,{sx:{display:"flex",alignItems:"center",gap:.5},children:[ya(B0,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>g(s.target.value,d),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),ya(uc,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),ya(B0,{value:d,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>g(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as bS}from"@mui/material";import{jsx as M0}from"react/jsx-runtime";function NV({anchorEl:e,fromDate:d,toDate:g,onChange:l,onClose:o}){return M0(bS,{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:M0(E0,{fromDate:d,toDate:g,onChange:l})})}import{Box as yS,ButtonBase as xS,Tab as vS,Tabs as wS}from"@mui/material";import _S from"@mui/icons-material/Checklist";import kS from"@mui/icons-material/Face";import SS from"@mui/icons-material/Publish";import TS from"@mui/icons-material/NotificationsOutlined";import CS from"@mui/icons-material/BugReportOutlined";import BS from"@mui/icons-material/SupportAgentOutlined";import IS from"@mui/icons-material/DescriptionOutlined";import ES from"@mui/icons-material/Inventory2Outlined";import{jsx as In}from"react/jsx-runtime";function R0(e,d){return d>0?`${e} (${d})`:e}var XV=[{id:"my",label:"\uC804\uCCB4",icon:In(_S,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:In(kS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:In(SS,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:In(BS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:In(CS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:In(TS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:In(ES,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:In(IS,{sx:{fontSize:18}}),hideCount:!0}];function MS(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 ZV({items:e,activeTab:d,counts:g,onChange:l,compact:o=!1}){let s=it(),r=MS(s.tabs),t=e;return o?In(yS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=d===n.id;return In(xS,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Sr(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:R0(n.label,n.hideCount?0:g[n.id]??0)},n.id)})}):In(wS,{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(vS,{value:n.id,label:R0(n.label,n.hideCount?0:g[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}import{useEffect as RS,useMemo as OS,useState as Nd}from"react";import{Divider as dc,ListItemIcon as Jr,Menu as Ld,MenuItem as Rr}from"@mui/material";import AS from"@mui/icons-material/OpenInNewOutlined";import DS from"@mui/icons-material/RestoreFromTrashOutlined";import PS from"@mui/icons-material/Check";import NS from"@mui/icons-material/CheckCircleOutlined";import LS from"@mui/icons-material/RadioButtonUnchecked";import zS from"@mui/icons-material/SendOutlined";import jS from"@mui/icons-material/EventOutlined";import FS from"@mui/icons-material/PersonOutlineOutlined";import qS from"@mui/icons-material/ViewKanbanOutlined";import $S from"@mui/icons-material/ContentCopyOutlined";import HS from"@mui/icons-material/NextPlanOutlined";import WS from"@mui/icons-material/ContentPasteOutlined";import US from"@mui/icons-material/ShareOutlined";import VS from"@mui/icons-material/DirectionsRunOutlined";import O0 from"@mui/icons-material/ChevronRight";import KS from"@mui/icons-material/ArchiveOutlined";import GS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as A0}from"@ehfuse/alerts";import{Fragment as D0,jsx as dt,jsxs as xr}from"react/jsx-runtime";function EK({target:e,onClose:d,customTabs:g,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:b,onArchiveToggle:m,onDelete:v,onRestore:k,onPurge:B}){let R=jt(),L=Kn(),[A,D]=Nd(null),[N,q]=Nd(null),[j,S]=Nd(null);RS(()=>{e||(D(null),q(null),S(null))},[e]);let T=e?.task??null,P=!!T?.is_notice,p=!!T?.is_event,y=T?!xo(T,o):!1,x=!!T?.deleted,w=OS(()=>new Set(g.filter(z=>z.useSprints).map(z=>z.key)),[g]),_=async(z="one")=>{let $=T;if(d(),!$)return;await A0({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?`})&&v($.seq,z)},C=async()=>{let z=T;if(d(),!z)return;await A0({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 xr(D0,{children:[xr(Ld,{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:[xr(Rr,{onClick:()=>{T&&s(T),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(AS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),x?dt(dc,{}):null,x&&k?xr(Rr,{onClick:()=>{T&&k(T.seq),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(DS,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,x&&B?xr(Rr,{onClick:()=>{C()},sx:{fontSize:14,color:"#e5484d"},children:[dt(Jr,{children:dt(pr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,x?null:xr(D0,{children:[xr(Rr,{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:[dt(Jr,{children:T?.completed?dt(LS,{sx:{fontSize:19}}):dt(NS,{sx:{fontSize:19}})}),T?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!P&&t?xr(Rr,{disabled:!(T?.manager_account_seq??0)&&(T?.receiver_account_seqs??[]).length===0,onClick:()=>{T&&t(T),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(zS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:dt(dc,{}),p?null:xr(Rr,{disabled:y,onClick:z=>{T&&D({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[dt(Jr,{children:dt(jS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!P&&!p&&i?xr(Rr,{onClick:()=>{T&&i(T,"manager"),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(FS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:xr(Rr,{disabled:y,onClick:z=>{T&&q({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[dt(Jr,{children:dt(qS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",dt(O0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),dt(dc,{}),h?xr(Rr,{disabled:y,onClick:()=>{T&&h(T.seq),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt($S,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,f&&T&&!T.is_event&&!T.is_notice?xr(Rr,{onClick:()=>{T&&f(T.seq),d()},sx:{fontSize:14},children:[dt(Jr,{children:dt(HS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,xr(Rr,{onClick:()=>{T&&(u?u(T):ls(T,R)),d()},sx:{fontSize:14},children:[dt(Jr,{children:R?dt(US,{sx:{fontSize:19}}):dt(WS,{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??""))&&b?xr(Rr,{onClick:z=>S(z.currentTarget),sx:{fontSize:14},children:[dt(Jr,{children:dt(VS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",dt(O0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,xr(Rr,{onClick:O,disabled:y||!T?.archived&&!(T&&Ha(T)),sx:{fontSize:14},children:[dt(Jr,{children:T?.archived?dt(GS,{sx:{fontSize:19}}):dt(KS,{sx:{fontSize:19}})}),T?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),dt(dc,{}),xr(Rr,{disabled:y,onClick:()=>{_("one")},sx:{fontSize:14,color:"#e5484d"},children:[dt(Jr,{children:dt(pr,{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?xr(Rr,{disabled:y,onClick:()=>{_("series")},sx:{fontSize:14,color:"#e5484d"},children:[dt(Jr,{children:dt(pr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),dt(_n,{anchorEl:A?.anchorEl??null,open:!!A,date:A?.task.due_date??"",reminders:Xn(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)}}),xr(Ld,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{q(null),d()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...L,children:[dt(Rr,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),q(null),d()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),g.filter(z=>!z.archived).map(z=>dt(Rr,{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))]}),dt(Ld,{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=>xr(Rr,{onClick:()=>{T&&b?.(T.seq,z.seq),S(null),d()},sx:{fontSize:14,minWidth:160,gap:1},children:[z.label,(T?.sprint_seq??0)===z.seq?dt(PS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},z.seq))})]})}import{Checkbox as YS,Divider as XS,Menu as ZS,MenuItem as P0}from"@mui/material";import{jsx as fc,jsxs as N0}from"react/jsx-runtime";function DK({anchorEl:e,labelOptions:d,selectedKeys:g,onToggle:l,onClear:o,onClose:s}){return N0(ZS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[d.map(r=>{let t=g.includes(r.key);return N0(P0,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[fc(YS,{size:"small",checked:t,sx:{p:0}}),fc(Dt,{option:r})]},r.key)}),fc(XS,{}),fc(P0,{disabled:g.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as JS,Menu as QS,MenuItem as L0}from"@mui/material";import eT from"@mui/icons-material/Check";import tT from"@mui/icons-material/SettingsOutlined";import{jsx as zd,jsxs as jd}from"react/jsx-runtime";function qK(e){let{anchorEl:d,sprints:g,value:l,onSelect:o,onManage:s,onClose:r}=e;return jd(QS,{transitionDuration:0,anchorEl:d,open:!!d,onClose:r,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...g.map(t=>({seq:t.seq,label:kn(t)}))].map(t=>jd(L0,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?zd(eT,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),zd(JS,{}),jd(L0,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[zd(tT,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var rT={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function nT(e){return rT[e]??"tasks"}var j0={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"},z0=["list","calendar","month","card","kanban","sprint","timeline"],oT=["list","kanban"],iT=["list","card"];function WK(e){let d=nT(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:z0,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:oT,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:d,viewOptions:iT,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:z0,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 sT}from"react";import{useKeyboardState as aT}from"@ehfuse/keyboard-state";var F0=[{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 YK(e,d={}){let{enabled:g=!0,views:l}=d,{onCreateTask:o,onFocusSearch:s,onToggleHelp:r,onChangeView:t,onRefresh:n,onEscape:c}=e,i=l?l.join(","):"",a=sT(()=>{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 q0(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]);aT(g?a:[])}function q0(e){if(!e)return F0;let d=new Set(e);return F0.filter(g=>d.has(g.view))}function xa(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...q0(e).map(d=>({keys:d.key.split(" ").map(g=>g.toUpperCase()).join(" \u2192 "),description:`${j0[d.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var XK=xa();import{Box as va,Button as lT}from"@mui/material";import cT from"@mui/icons-material/ArrowRightAlt";import{FormDialog as uT}from"@ehfuse/mui-form-dialog";import{jsx as li,jsxs as $0}from"react/jsx-runtime";function dT({keys:e}){return li(va,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((d,g)=>$0(va,{sx:{display:"flex",alignItems:"center",gap:.5},children:[g>0?li(cT,{sx:{fontSize:18,color:"#9a9a97"}}):null,li(va,{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}-${g}`))})}function rG({open:e,onClose:d,views:g}){let l=xa(g);return li(uT,{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:li(va,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>$0(va,{sx:{display:"contents"},children:[li(dT,{keys:o.keys}),li("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:li(lT,{variant:"contained",onClick:d,children:"\uB2EB\uAE30"})}})}import{Fragment as pc,useEffect as fT,useState as hT}from"react";import{Box as tr,Button as pT}from"@mui/material";import mT from"@mui/icons-material/ArrowRightAlt";import gT from"@mui/icons-material/ArrowForwardRounded";import bT from"@mui/icons-material/ChevronRightRounded";import{FormDialog as yT}from"@ehfuse/mui-form-dialog";var H0={id:"concept",tabTitle:"\uAC1C\uB150",intro:"\uC5C5\uBB34\uD568\uC740 '\uB204\uAC00 \uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD558\uB294\uC9C0'\uB97C \uD55C \uACF3\uC5D0 \uBAA8\uC73C\uB294 \uB3C4\uAD6C\uC785\uB2C8\uB2E4. \uBA54\uC2E0\uC800\uC5D0 \uD769\uC5B4\uC9C4 \uC9C0\uC2DC\uC640 \uC5D1\uC140\uC5D0 \uC801\uC5B4 \uB454 \uAE30\uD55C \uB300\uC2E0, \uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C\uACFC \uBC1B\uC740 \uC0AC\uB78C\uC774 \uAC19\uC740 \uD654\uBA74\uC744 \uBD05\uB2C8\uB2E4.",topics:[{title:"\uC138 \uAC78\uC74C\uC774\uBA74 \uB05D",lead:"\uC5C5\uBB34 \uD558\uB098\uC758 \uC0DD\uC560\uB294 \uC774 \uC138 \uAC78\uC74C\uC785\uB2C8\uB2E4. \uB098\uBA38\uC9C0 \uAE30\uB2A5\uC740 \uC804\uBD80 \uC774 \uD750\uB984\uC744 \uB3D5\uB294 \uAC83\uC774\uB77C, \uC774\uAC83\uB9CC \uC54C\uBA74 \uCCAB\uB0A0\uBD80\uD130 \uC501\uB2C8\uB2E4.",steps:[{title:"\uB4F1\uB85D",desc:"\uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uAE30\uD55C\uB9CC \uC801\uC5B4 \uBCF4\uB0C5\uB2C8\uB2E4."},{title:"\uD655\uC778",desc:"\uBC1B\uC740 \uC0AC\uB78C\uC774 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC\uD569\uB2C8\uB2E4."},{title:"\uBCF4\uAD00",desc:"\uB05D\uB09C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC5D0 \uB0A8\uC544 \uC5B8\uC81C\uB4E0 \uB2E4\uC2DC \uCC3E\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5C5\uBB34\uB97C \uB458\uB7EC\uC2FC \uC138 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C \uD558\uB098, \uBC1B\uC740 \uC0AC\uB78C \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC138 \uC5ED\uD560\uC774 \uBAA8\uB450 '\uAD00\uC5EC\uC790'\uC774\uACE0, \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uB294 **\uC5ED\uD560** \uD0ED\uC5D0 \uBAA8\uC544 \uB450\uC5C8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"\uC5C5\uBB34\uB97C \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uD55C \uBA85)."},{term:"\uCC38\uC870\uC790",desc:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85)."}]},{title:"\uBC1B\uC740 \uC5C5\uBB34\uC640 \uBCF4\uB0B8 \uC5C5\uBB34",lead:"\uD0ED\uC740 '\uB0B4\uAC00 \uBC1B\uC740 \uAC83'\uACFC '\uB0B4\uAC00 \uBCF4\uB0B8 \uAC83'\uC744 \uAC00\uB974\uB294 \uCD95\uC785\uB2C8\uB2E4. \uB0A8\uC774 \uC2DC\uD0A8 \uC77C\uACFC \uB0B4\uAC00 \uC2DC\uD0A8 \uC77C\uC774 \uC11E\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",items:[{term:"\uB0B4 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uC778 \uC5C5\uBB34 \u2014 \uBC1B\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uBCF4\uB0B8 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uC804\uCCB4",desc:"\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."},{term:"\uACF5\uC9C0\uC0AC\uD56D",desc:"\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."},{term:"\uBCF4\uAD00\uD568",desc:'\uB05D\uB098\uC11C \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815\uACFC \uD734\uC9C0\uD1B5. "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uAD6C\uBD84\uC744 \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.'}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",subtitle:"\uC138 \uAC00\uC9C0 \uB2E4\uB978 \uB9D0",lead:"\uB2E4\uC2DC \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uB418\uB294 \uC774\uC720\uAC00 \uC5EC\uAE30 \uC788\uC2B5\uB2C8\uB2E4. \uC77D\uC5C8\uB294\uC9C0, \uB05D\uB0AC\uB294\uC9C0, \uAC80\uC218\uD588\uB294\uC9C0\uAC00 \uAC01\uAC01 \uD45C\uC2DC\uB85C \uB0A8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uD655\uC778",desc:'"\uC77D\uC5C8\uB2E4". \uBC1B\uC740 \uC0AC\uB78C\uC774 **\uD655\uC778** \uBC84\uD2BC\uC744 \uB20C\uB7EC \uB0A8\uAE41\uB2C8\uB2E4. \uC544\uC9C1 \uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.'},{term:"\uC644\uB8CC",desc:'"\uB05D\uB0AC\uB2E4". \uCC45\uC784\uC790\uB098 \uC791\uC131\uC790\uAC00 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4.'},{term:"\uAC80\uC218\uC644\uB8CC",desc:'"\uBD24\uB2E4, \uAD1C\uCC2E\uB2E4". \uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uACE0, \uC791\uC131\uC790\uAC00 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098 \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**.'}]},{title:"\uB450 \uAC1C\uC758 \uB0A0\uC9DC",lead:"\uC5C5\uBB34\uC5D0\uB294 \uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815 \uB450 \uB0A0\uC9DC\uAC00 \uC788\uACE0, \uC54C\uB9BC\uACFC \uCE98\uB9B0\uB354\uB294 \uC804\uBD80 \uC774 \uB458\uC744 \uAE30\uC900\uC73C\uB85C \uC6C0\uC9C1\uC785\uB2C8\uB2E4.",items:[{term:"\uC2DC\uC791\uC77C\uC2DC",desc:"\uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4. \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4."},{term:"\uB9C8\uAC10\uC608\uC815",desc:"\uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\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."}]}]};var W0={id:"roles",tabTitle:"\uC5ED\uD560",intro:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C(\uC791\uC131\uC790) \uD558\uB098, \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uCC45\uC784\uC790) \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uCC38\uC870\uC790)\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC14B \uB2E4 '\uAD00\uC5EC\uC790'\uB77C\uC11C \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uAC00 \uC774 \uD0ED\uC758 \uB0B4\uC6A9\uC785\uB2C8\uB2E4.",topics:[{title:"\uC791\uC131\uC790",subtitle:"\uC5C5\uBB34\uC758 \uC8FC\uC778",lead:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC815\uD558\uACE0 \uACB0\uACFC\uB97C \uAC80\uC218\uD558\uB294 \uC790\uB9AC\uB77C, \uC5C5\uBB34\uB97C \uC5C6\uC568 \uC218 \uC788\uB294 \uC720\uC77C\uD55C \uC5ED\uD560\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD560\uC9C0 \uC801\uC5B4 \uCC45\uC784\uC790\uC5D0\uAC8C \uBCF4\uB0C5\uB2C8\uB2E4. \uB05D\uB09C \uB4A4 \uACB0\uACFC\uB97C \uBCF4\uACE0 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098, \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**."},{term:"\uC218\uC815",desc:"\uC81C\uBAA9\xB7\uAE30\uD55C\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uB0B4\uC6A9 \uC804\uBD80 \uACE0\uCE69\uB2C8\uB2E4. \uBC14\uAFBC \uB0B4\uC6A9\uC740 \uC7A0\uC2DC \uBAA8\uC544 \uD55C \uAC74\uC758 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC644\uB8CC",desc:"\uC9C1\uC811 \uC644\uB8CC \uCCB4\uD06C\uB97C \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBCF8\uC778\uC774 \uC644\uB8CC\uD558\uBA74 \uAC80\uC218 \uB2E8\uACC4\uAC00 \uC5C6\uC5B4 \uADF8\uB300\uB85C \uB05D\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB97C **\uAC80\uC218 \uB300\uAE30\uC778 \uB3D9\uC548\uB9CC** \uC0AC\uC720\uC640 \uD568\uAED8 \uB418\uB3CC\uB9BD\uB2C8\uB2E4. \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790 \uBCF8\uC778\uB9CC \uC0AD\uC81C\uD569\uB2C8\uB2E4(\uAD00\uB9AC\uC790 \uAD8C\uD55C\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB985\uB2C8\uB2E4). \uC0AD\uC81C\uD55C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC758 \uD734\uC9C0\uD1B5\uC5D0 \uB0A8\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC5D0\uC11C **\uBE60\uC9D1\uB2C8\uB2E4** \u2014 \uB0B4\uAC00 \uC4F4 \uAE00\uC744 \uB0B4\uAC00 \uC77D\uC5C8\uB2E4\uACE0 \uB0A8\uAE38 \uC77C\uC740 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uCC45\uC784\uC790",subtitle:"\uBC1B\uC544\uC11C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB97C \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uB97C \uBC1B\uC73C\uBA74 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uC54C\uB9BC\uC774 \uC624\uACE0, \uBAA9\uB85D\uC5D0\uC11C\uB294 '\uB0B4 \uC5C5\uBB34'\uB85C \uBAA8\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4. \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB118\uC5B4\uAC11\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:'**\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C "\uC77D\uC5C8\uB2E4"\uB97C \uB0A8\uAE41\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.'},{term:"\uC218\uC815",desc:"\uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uC9C4\uD589\uD558\uB2E4 \uBCF4\uBA74 \uAE30\uD55C\xB7\uB0B4\uC6A9\uC774 \uB2EC\uB77C\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uC0C1\uD0DC\xB7\uBE44\uACE0\xB7\uD560\uC77C\uB3C4 \uBAA9\uB85D\uC5D0\uC11C \uBC14\uB85C \uACE0\uCE69\uB2C8\uB2E4."},{term:"\uD560\uC77C\uB85C \uB098\uB204\uAE30",desc:"\uD070 \uC5C5\uBB34\uB294 \uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8)\uB85C \uCABC\uAC1C\uACE0, \uD544\uC694\uD558\uBA74 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE41\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB0A8\uC774 \uB9E1\uAE34 \uC77C\uC744 \uBC1B\uC740 \uCABD\uC774 \uC5C6\uC568 \uC218\uB294 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4 \u2014 \uB418\uB3CC\uB9B4 \uC77C\uC774\uBA74 \uB313\uAE00\uB85C \uC54C\uB9BD\uB2C8\uB2E4."},{term:"\uD55C \uBA85\uBFD0",desc:"\uCC45\uC784\uC790\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5EC\uB7FF\uC774 \uB098\uB220\uC57C \uD558\uB294 \uC77C\uC740 \uD560\uC77C\uB85C \uCABC\uAC1C\uAC70\uB098 \uC5C5\uBB34\uB97C \uB098\uB220 \uB4F1\uB85D\uD569\uB2C8\uB2E4."}]},{title:"\uCC38\uC870\uC790",subtitle:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4",lead:"\uC9C1\uC811 \uCC98\uB9AC\uD558\uC9C0\uB294 \uC54A\uC9C0\uB9CC \uB0B4\uC6A9\uC744 \uC54C\uC544\uC57C \uD558\uB294 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4. \uC5EC\uB7EC \uBA85\uC744 \uB458 \uC218 \uC788\uACE0, \uC77D\uC5C8\uB2E4\uB294 \uD45C\uC2DC\uB9CC \uB0A8\uAE41\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uC77D\uACE0 \uD544\uC694\uD558\uBA74 \uB313\uAE00\uB85C \uC758\uACAC\uC744 \uB2F5\uB2C8\uB2E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC785\uB2C8\uB2E4. \uCC38\uC870\uC790\uC758 \uD655\uC778\uC740 \uC54C\uB9BC\uC744 \uB9CC\uB4E4\uC9C0 \uC54A\uACE0 \uD655\uC778 \uD604\uD669(n/m)\uC5D0\uB9CC \uBC18\uC601\uB429\uB2C8\uB2E4 \u2014 \uC0AC\uB78C\uC774 \uB9CE\uC544 \uC54C\uB9BC\uC774 \uC2DC\uB044\uB7EC\uC6CC\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uAD00\uC5EC\uC790\uB77C\uC11C). \uB2E4\uB9CC \uC644\uB8CC \uCCB4\uD06C\uB294 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uB204\uB985\uB2C8\uB2E4."},{term:"\uC644\uB8CC \xB7 \uC0AD\uC81C",desc:"\uB458 \uB2E4 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uCC38\uC870\uB294 '\uBCF4\uB294 \uC790\uB9AC'\uC785\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uC54C\uB9BC",desc:"\uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB9C8\uAC10 \uACC4\uC5F4 \uC54C\uB9BC\uC740 \uCC45\uC784\uC790\xB7\uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4(\uCC38\uC870\uC790\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4)."}]},{title:"\uAD8C\uD55C \uD55C\uB208\uC5D0",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBCF4\uACE0 \uC788\uC5B4\uB3C4 \uB204\uB97C \uC218 \uC788\uB294 \uBC84\uD2BC\uC774 \uB2E4\uB985\uB2C8\uB2E4. \uBC84\uD2BC\uC774 \uC548 \uBCF4\uC774\uBA74 \uAD8C\uD55C\uC774 \uC5C6\uB294 \uAC83\uC785\uB2C8\uB2E4(\uC7A0\uAE34 \uCC44\uB85C \uBCF4\uC774\uC9C0 \uC54A\uACE0 \uC544\uC608 \uC228\uC2B5\uB2C8\uB2E4).",items:[{term:"\uC218\uC815",desc:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790 \u2014 \uAD00\uC5EC\uC790 \uC804\uC6D0. \uAD00\uC5EC\uC790\uAC00 \uC544\uB2C8\uBA74 \uC5F4\uB78C\uB9CC \uB429\uB2C8\uB2E4."},{term:"\uC644\uB8CC \xB7 \uC644\uB8CC \uD574\uC81C",desc:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790."},{term:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",desc:"\uC791\uC131\uC790\uB9CC. \uB0A8\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uAC00 \uAC80\uC218 \uB300\uAE30\uC77C \uB54C\uB9CC \uB098\uC635\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790\uB9CC."},{term:"\uD655\uC778",desc:"\uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790 \u2014 \uC791\uC131\uC790\uB294 \uC81C\uC678."},{term:"\uB313\uAE00",desc:"\uBCFC \uC218 \uC788\uB294 \uC0AC\uB78C \uB204\uAD6C\uB098."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D\uC740 \uADDC\uCE59\uC774 \uB2E4\uB985\uB2C8\uB2E4",lead:"\uACF5\uC9C0\uB294 '\uB9E1\uAE30\uB294 \uC77C'\uC774 \uC544\uB2C8\uB77C '\uC54C\uB9AC\uB294 \uAE00'\uC774\uB77C \uCC45\uC784\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC0C1\uC790\uAC00 \uACE7 \uC77D\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uACF5\uC9C0\uB97C \uC62C\uB9B0 \uC0AC\uB78C. \uC218\uC815\xB7\uAC8C\uC2DC\uC885\uB8CC\xB7\uC0AD\uC81C\uB97C \uD63C\uC790 \uB9E1\uC2B5\uB2C8\uB2E4(\uAD00\uB9AC\uC790\uB3C4 \uB0A8\uC758 \uACF5\uC9C0\uB294 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)."},{term:"\uB300\uC0C1\uC790",desc:"\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE30\uACE0, \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uB204\uAC00 \uC548 \uC77D\uC5C8\uB294\uC9C0 \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC54C\uB9BC",desc:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD574\uB3C4 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC804 \uC9C1\uC6D0 \uACF5\uC9C0\uB77C\uBA74 \uC54C\uB9BC\uC774 \uC0AC\uB78C \uC218\uB9CC\uD07C \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uACE0\uAC1D\uC13C\uD130 \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uAC00 \uC678\uBD80\uC785\uB2C8\uB2E4",feature:"support",lead:"\uAC00\uB9F9\uC810\xB7\uD648\uD398\uC774\uC9C0\uC5D0\uC11C \uB4E4\uC5B4\uC628 \uBB38\uC758\uB294 \uC791\uC131\uC790\uAC00 \uC6B0\uB9AC \uC9C1\uC6D0\uC774 \uC544\uB2C8\uB77C, \uAD00\uC5EC\uC790 \uADDC\uCE59\uC744 \uADF8\uB300\uB85C \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uBB38\uC758\uB97C \uB0A8\uAE34 \uACE0\uAC1D(\uC9C1\uC6D0 \uBA85\uBD80\uC5D0 \uC5C6\uB294 \uC678\uBD80 \uACC4\uC815). \uC6B0\uB9AC \uCABD \uAD00\uC5EC\uC790 \uD310\uC815\uC5D0\uC11C\uB294 \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC5F4\uB78C\uD560 \uC218 \uC788\uB294 \uC9C1\uC6D0 \uB204\uAD6C\uB098 \uACE0\uCE69\uB2C8\uB2E4 \u2014 \uAD00\uC5EC\uC790\uAC00 \uC5C6\uC5B4 \uC544\uBB34\uB3C4 \uC190\uB300\uC9C0 \uBABB\uD558\uBA74 \uB2F5\uBCC0\uC744 \uB2EC \uC218 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"**\uAC00\uC838\uAC00\uAE30**\uB85C \uC815\uD574\uC9D1\uB2C8\uB2E4. \uBA3C\uC800 \uC7A1\uC740 \uC0AC\uB78C\uC774 \uB2F5\uBCC0\uC744 \uB9E1\uC2B5\uB2C8\uB2E4."},{term:"\uB2F5\uBCC0",desc:"\uC9C1\uC6D0\uC774 \uB2E8 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4. \uACE0\uAC1D\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0, \uC5C5\uBB34\uD568\uC758 \uB2E4\uB978 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778 \xB7 \uAC80\uC218",desc:"\uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uACE0\uAC1D\uC774 \uD655\uC778 \uBC84\uD2BC\uC744 \uB204\uB97C \uD654\uBA74\uC774 \uC5C6\uC5B4 \uD655\uC778\xB7\uAC80\uC218 \uC6CC\uD06C\uD50C\uB85C\uB97C \uD0DC\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var U0={id:"basics",tabTitle:"\uAE30\uBCF8 \uC0AC\uC6A9",intro:"\uB9E4\uC77C \uC4F0\uB294 \uC870\uC791\uB9CC \uBAA8\uC558\uC2B5\uB2C8\uB2E4. \uAC1C\uB150 \uD0ED\uC758 \uC138 \uAC78\uC74C \uC21C\uC11C \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",topics:[{title:"1. \uB4F1\uB85D\uD558\uAE30",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC(\uB2E8\uCD95\uD0A4 **N**) \u203A \uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uC744 \uC801\uACE0 \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB0B4\uC6A9\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uC911\uC694\uB3C4\uB294 \uD544\uC694\uD560 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** : \uBE44\uACF5\uAC1C(\uAD00\uC5EC\uC790\uB9CC) / \uBD80\uC11C\uACF5\uAC1C / \uC804\uCCB4\uACF5\uAC1C. \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** \uC5C5\uBB34\uB294 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uD68C\uCC28\uB85C \uB9CC\uB4E4\uC5B4\uC9C0\uACE0, **\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\uB77C \uC644\uB8CC \uB300\uC2E0 \uCE98\uB9B0\uB354\uC5D0 \uB193\uC785\uB2C8\uB2E4."]},{title:"2. \uC5F4\uC5B4 \uBCF4\uACE0 \uB300\uD654\uD558\uAE30",lines:["\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD\uC5D0 \uC0C1\uC138\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74). \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uADF8 \uC790\uB9AC\uC5D0\uC11C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","\uC5C5\uBB34 \uB300\uD654\uB294 **\uB313\uAE00**\uB85C \uD569\uB2C8\uB2E4. \uD30C\uC77C\uC744 \uBD99\uC774\uACE0, **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC73C\uB85C \uC77D\uC5C8\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC11C \uB2F5\uAE00 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC5D0\uC11C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 **\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:"3. \uD655\uC778\uD558\uAE30",lines:["\uBC1B\uC740 \uC5C5\uBB34\uB294 **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED(\uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9)\uC5D0 \uBAA8\uC5EC \uC788\uC2B5\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."]},{title:"4. \uC9C4\uD589\uD558\uACE0 \uC644\uB8CC\uD558\uAE30",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4."]},{title:"5. \uAC80\uC218\uD558\uAE30",subtitle:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",lines:["\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC758 \uBAA9\uB85D \uB9E8 \uC704\uC5D0 **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uC2B5\uB2C8\uB2E4(\uC644\uB8CC \uC228\uAE30\uAE30\uC640 \uBB34\uAD00, \uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9).","\uACB0\uACFC\uAC00 \uAD1C\uCC2E\uC73C\uBA74 **\uAC80\uC218\uC644\uB8CC** \uBC84\uD2BC\uC73C\uB85C \uB0B4\uB9BD\uB2C8\uB2E4. \uBBF8\uD761\uD558\uBA74 \uC644\uB8CC \uCCB4\uD06C\uB97C \uD574\uC81C(\uC0C1\uC138\uC758 **\uB418\uB3CC\uB9AC\uAE30**)\uD558\uBA70 \uC0AC\uC720\uB97C \uC801\uC2B5\uB2C8\uB2E4 \u2014 \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0, \uC0C1\uD0DC\uB294 \uC9C4\uD589\uC911\uC73C\uB85C \uB3CC\uC544\uAC00\uACE0, \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.","**\uB418\uB3CC\uB9AC\uAE30\uB294 \uAC80\uC218 \uC804\uC5D0\uB9CC** \uB098\uC635\uB2C8\uB2E4 \u2014 \uAC80\uC218\uC644\uB8CC\uB97C \uB204\uB978 \uB4A4\uC5D0\uB294 \uC0AC\uC720 \uC5C6\uC774 \uB0B4\uB9AC\uB294 **\uC644\uB8CC \uD574\uC81C**\uB85C \uBC14\uB01D\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uAC80\uC218 \uB300\uC0C1\uC774 \uC544\uB2C8\uB77C \uCC98\uC74C\uBD80\uD130 **\uC644\uB8CC \uD574\uC81C**\uC785\uB2C8\uB2E4."]},{title:"6. \uBCF4\uAD00\uD558\uAE30 \xB7 \uC0AD\uC81C\uD558\uAE30",lines:["\uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C) \uB4A4 \uC0C8\uBCBD\uC5D0 \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\uB0B4\uACE0, \uBCF4\uAD00\uD568\uC758 **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","\uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58). \uC9C0\uC6B4 \uC5C5\uBB34\uB294 **\uD734\uC9C0\uD1B5**\uC5D0\uC11C \uB418\uC0B4\uB9B4 \uC218 \uC788\uACE0, \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB294 \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.']}]};var V0={id:"notify",tabTitle:"\uC54C\uB9BC",intro:"\uC54C\uB9BC\uC740 \uBCA8(\uC5C5\uBB34\uD568 \uC548)\uACFC \uC571 \uD478\uC2DC \uB450 \uAC08\uB798\uB85C \uAC11\uB2C8\uB2E4. \uC544\uB798 \uD45C\uC758 '\uBC1B\uB294 \uC0AC\uB78C'\uC5D0 \uC5C6\uC73C\uBA74 \uADF8 \uC77C\uC774 \uC77C\uC5B4\uB098\uB3C4 \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC54C\uB9BC\uC744 \uC904\uC774\uB294 \uCABD\uC73C\uB85C \uC815\uD55C \uADDC\uCE59\uC774 \uB9CE\uC544, \uAD00\uC5EC\uC790\uB77C\uACE0 \uC804\uBD80 \uBC1B\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4.",topics:[{title:"\uC5C5\uBB34\uB97C \uB9E1\uACE0 \uBC1B\uC744 \uB54C",items:[{term:"\uCC45\uC784\uC790\uB85C \uC9C0\uC815",desc:"\uC0C8 **\uCC45\uC784\uC790**\uC5D0\uAC8C. \uCC45\uC784\uC790\uB97C \uBC14\uAFB8\uBA74 \uC0C8 \uCC45\uC784\uC790\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uB85C \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uCC38\uC870\uC790**\uC5D0\uAC8C\uB9CC. \uC6D0\uB798 \uC788\uB358 \uCC38\uC870\uC790\uB294 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791\uC77C\uC2DC \uB3C4\uB2EC",desc:"**\uCC45\uC784\uC790**\uC5D0\uAC8C. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uC790\uB3D9\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC77C\uC815 \uCD08\uB300",desc:"\uC77C\uC815\uC758 **\uCC38\uC11D\uC790**\uC5D0\uAC8C."}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",items:[{term:"\uCC45\uC784\uC790\uAC00 \uD655\uC778",desc:"**\uC791\uC131\uC790**\uC5D0\uAC8C. \uBC1B\uC740 \uC0AC\uB78C\uC774 \uC77D\uC5C8\uB2E4\uB294 \uC2E0\uD638\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uC790\uAC00 \uC5EC\uB7EC \uBA85\uC774\uB77C \uC0AC\uB78C \uC218\uB9CC\uD07C \uC54C\uB9BC\uC774 \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C\uB9CC \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC694\uCCAD(\uB9AC\uB9C8\uC778\uB4DC)",desc:"\uC544\uC9C1 **\uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC. \uC774\uBBF8 \uD655\uC778\uD55C \uC0AC\uB78C\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC644\uB8CC \uCC98\uB9AC",desc:"**\uC791\uC131\uC790 + \uCC38\uC870\uC790**\uC5D0\uAC8C. \uC644\uB8CC\uB97C \uB204\uB978 \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uAC80\uC218\uC644\uB8CC",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC2B9\uC778\uC774 \uC544\uB2C8\uB77C \uC791\uC131\uC790 \uD654\uBA74\uC758 \uD45C\uC2DC\uB97C \uB0B4\uB9AC\uB294 \uAC83\uC77C \uBFD0\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"**\uC644\uB8CC\uB97C \uCC98\uB9AC\uD55C \uC0AC\uB78C**(\uBCF4\uD1B5 \uCC45\uC784\uC790)\uC5D0\uAC8C. \uC0AC\uC720\uAC00 \uD568\uAED8 \uC804\uB2EC\uB418\uACE0 \uB313\uAE00\uB85C\uB3C4 \uB0A8\uC2B5\uB2C8\uB2E4."}]},{title:"\uB9C8\uAC10 \uAD00\uB828",lead:"\uB9C8\uAC10 \uACC4\uC5F4\uC740 \uC804\uBD80 \uCC45\uC784\uC790\uC640 \uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4. \uCC38\uC870\uC790\uB294 \uB9C8\uAC10 \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC54C\uB9BC\uC774 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4.",items:[{term:"\uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uC5C5\uBB34\uB9C8\uB2E4 \uACE0\uB978 \uC2DC\uC810(\uC608: 1\uC77C \uC804)\uC5D0 \uAC11\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uB2F9\uC77C",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uB9C8\uAC10 \uACBD\uACFC(\uC9C0\uC5F0)",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB9C8\uAC10\uC774 \uC9C0\uB0AC\uB294\uB370 \uC644\uB8CC\uB418\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790",desc:"\uC704 \uC14B \uBAA8\uB450 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB313\uAE00 \xB7 \uBC18\uC751",lead:"\uB313\uAE00 \uC54C\uB9BC\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0\uC5D0\uAC8C \uBCF4\uB0B4\uB2E4\uAC00 \uC54C\uB9BC \uD3ED\uC8FC\uB85C \uC904\uC600\uC2B5\uB2C8\uB2E4. \uC9C0\uAE08\uC740 '\uB300\uD654\uC5D0 \uC9C1\uC811 \uC5BD\uD78C \uC0AC\uB78C'\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uB313\uAE00",desc:"\uC5C5\uBB34 **\uC791\uC131\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uC791\uC131\uC790\uAC00 \uC790\uAE30 \uC5C5\uBB34\uC5D0 \uB313\uAE00",desc:"**\uCC45\uC784\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uCC45\uC784\uC790 \uC5C6\uB294 \uC5C5\uBB34\uC758 \uB313\uAE00",desc:"\uC704\uC5D0 \uB354\uD574 **\uCC38\uC870\uC790 \uC804\uC6D0**\uC5D0\uAC8C. \uB204\uAC00 \uB9E1\uC744\uC9C0 \uC815\uD558\uB294 \uB300\uD654\uB77C \uCC38\uC870\uC790\uB4E4\uC774 \uC54C\uC544\uC57C \uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uC815\uD574\uC9C0\uBA74 \uB2E4\uC2DC \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uB313\uAE00 \uC88B\uC544\uC694 \xB7 \uD655\uC778",desc:"\uADF8 **\uB313\uAE00\uC744 \uC4F4 \uC0AC\uB78C**\uC5D0\uAC8C\uB9CC."},{term:"\uACF5\uC9C0 \uB313\uAE00",desc:"**\uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C\uB9CC \u2014 \uB300\uC0C1\uC790\uAC00 \uC804 \uC9C1\uC6D0\uC774\uB77C \uD655\uC7A5 \uADDC\uCE59\uC744 \uC801\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB0B4\uC6A9\uC774 \uBC14\uB014 \uB54C",lead:"\uC218\uC815 \uC54C\uB9BC\uC740 \uACE7\uBC14\uB85C \uBCF4\uB0B4\uC9C0 \uC54A\uACE0, \uD3B8\uC9D1\uC774 \uB05D\uB098 \uC870\uC6A9\uD574\uC9C4 \uB4A4 \uD55C \uAC74\uC73C\uB85C \uBAA8\uC544 \uBCF4\uB0C5\uB2C8\uB2E4 \u2014 \uACE0\uCE58\uB294 \uB3C4\uC911\uC5D0 \uC54C\uB9BC\uC774 \uC5EC\uB7EC \uBC88 \uAC00\uC9C0 \uC54A\uAC8C \uD558\uB824\uB294 \uAC83\uC785\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uC5C5\uBB34 \uC218\uC815",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB204\uAC00 \uACE0\uCCE4\uB4E0 \uB098\uBA38\uC9C0 \uD55C\uCABD\uC774 \uBC1B\uC2B5\uB2C8\uB2E4(\uACE0\uCE5C \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678). \uCC38\uC870\uC790\uB294 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uACF5\uC9C0 \uC218\uC815",desc:"**\uC791\uC131\uC790 + \uB300\uC0C1\uC790**\uC5D0\uAC8C."},{term:"\uD569\uC0B0 \uBC1C\uC1A1",desc:"\uC5EC\uB7EC \uD544\uB4DC\uB97C \uC5F0\uB2EC\uC544 \uACE0\uCCD0\uB3C4 \uD55C \uAC74\uC73C\uB85C \uBB36\uC5EC \uAC11\uB2C8\uB2E4. \uBB34\uC5C7\uC774 \uC5B4\uB5BB\uAC8C \uBC14\uB00C\uC5C8\uB294\uC9C0 \uC694\uC57D\uC774 \uB2F4\uAE41\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uC774 \uC548 \uAC00\uB294 \uBCC0\uACBD",desc:"\uC644\uB8CC \xB7 \uBCF4\uAD00 \xB7 \uC815\uB82C \uC21C\uC11C \xB7 \uCC45\uC784\uC790/\uCC38\uC870\uC790 \uBCC0\uACBD \u2014 \uAC01\uAC01 \uC804\uC6A9 \uC54C\uB9BC\uC774 \uB530\uB85C \uC788\uC5B4 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C\uB294 \uC138\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8) \uBCC0\uACBD",desc:"\uC218\uC815 \uC54C\uB9BC\uACFC \uAC19\uC740 **\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uBB34\uC5C7\uC744 \uCD94\uAC00\xB7\uC0AD\uC81C\xB7\uC218\uC815\uD588\uB294\uC9C0 \uAD6C\uCCB4\uC801\uC73C\uB85C \uB2F4\uAE41\uB2C8\uB2E4. \uCCB4\uD06C\uB9CC \uCF1C\uACE0 \uB044\uAC70\uB098 \uC21C\uC11C\uB9CC \uBC14\uAFB8\uBA74 \uC54C\uB9BC\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D",items:[{term:"\uACF5\uC9C0 \uB4F1\uB85D",desc:"**\uB300\uC0C1\uC790 \uC804\uC6D0**\uC5D0\uAC8C(\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4)."},{term:"\uB300\uC0C1\uC790 \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC."},{term:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uBD05\uB2C8\uB2E4."}]},{title:"\uC54C\uC544 \uB450\uBA74 \uC88B\uC740 \uAC83",items:[{term:"\uB0B4 \uD589\uB3D9\uC740 \uC81C\uC678",desc:"\uB0B4\uAC00 \uB204\uB978 \uC77C\uB85C\uB294 \uB098\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB0B4\uAC00 \uC644\uB8CC\uD588\uC73C\uBA74 \uB098\uB294 \uC644\uB8CC \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC",desc:"\uC2DC\uC791\uC77C\uC2DC\uAC00 \uC544\uC9C1 \uC548 \uB41C \uC5C5\uBB34\uC758 \uCC45\uC784\uC790 \uB300\uC0C1 \uC54C\uB9BC\uC740 \uBCA8\uC5D0\uB9CC \uC313\uC774\uACE0 \uC571 \uD478\uC2DC\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uD478\uC2DC\uAC00 \uC624\uAE30 \uC2DC\uC791\uD569\uB2C8\uB2E4(\uC77C\uC815\xB7\uACF5\uC9C0\uB294 \uC608\uC678 \uC5C6\uC774 \uBC14\uB85C)."},{term:"\uC885\uB958\uBCC4\uB85C \uB044\uAE30",desc:"**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uC218\uC2E0\uC744 \uB055\uB2C8\uB2E4. \uB048 \uC885\uB958\uB294 \uBCA8\xB7\uD478\uC2DC \uBAA8\uB450 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB2E4\uB9CC \uD655\uC778 \uC694\uCCAD\uC740 \uB04C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uD1A1\uC740 \uC5C6\uC74C",desc:"\uC5C5\uBB34\uD568 \uC54C\uB9BC\uC740 \uBCA8\uACFC \uC571 \uD478\uC2DC\uBFD0\uC785\uB2C8\uB2E4 \u2014 \uBB38\uC790\xB7\uC54C\uB9BC\uD1A1\uC73C\uB85C\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var K0={id:"more",tabTitle:"\uB354 \uC54C\uC544\uBCF4\uAE30",intro:"\uC775\uC219\uD574\uC9C4 \uB4A4\uC5D0 \uC4F0\uBA74 \uC88B\uC740 \uAE30\uB2A5\uB4E4\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uB048 \uAE30\uB2A5\uC740 \uC5EC\uAE30\uC5D0\uB3C4 \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",topics:[{title:"\uBCF4\uAE30 \uBC14\uAFB8\uAE30",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBAA9\uB85D\xB7\uBCF4\uB4DC\xB7\uCE98\uB9B0\uB354\uB85C \uB2E4\uB974\uAC8C \uBD05\uB2C8\uB2E4. \uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC\uC73C\uB85C \uBC14\uAFB8\uACE0 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4).",lines:["**\uBAA9\uB85D** : \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC815\uB82C(\uC81C\uBAA9\xB7\uB0A0\uC9DC) \uB610\uB294 \uD544\uD130(\uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4)\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4. **\uADF8\uB8F9** \uBA54\uB274\uB85C \uBB36\uB294 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","**\uBCF4\uB4DC**(\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C) \u2014 \uCE74\uB4DC\uB97C \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4. \uCEEC\uB7FC **\u22EE** \uBA54\uB274\uC5D0 \uB4F1\uB85D\xB7\uC218\uC815\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4.","**\uC8FC\uAC04\xB7\uC6D4\uAC04** : \uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uB193\uC774\uACE0, \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4. \uBE48 \uCE78\uC5D0 \uC62C\uB9AC\uBA74 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC73C\uB85C \uAD6C\uAE00\xB7\uC560\uD50C\xB7\uB124\uC774\uBC84\uC640 \uC8FC\uACE0\uBC1B\uC2B5\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 \uBD05\uB2C8\uB2E4. \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uACE0, \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\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\uC744, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4. \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78(\uB2E8\uCD95\uD0A4 **/**)\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4. \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 \xB7 \uCC45\uC784\uC790 \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0 \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\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 \uAC70\uB974\uACE0, \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."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** : \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.","**\uBAA8\uB4E0 \uC9C1\uC6D0** : (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4. **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** : \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\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:"\uD560\uC77C\uACFC \uC5C5\uBB34 \uB098\uB204\uAE30",lead:"\uD070 \uC5C5\uBB34 \uD558\uB098\uB97C \uBC1B\uC740 \uCC45\uC784\uC790\uAC00 \uD560\uC77C\uC744 \uD300\uC6D0 \uBAAB\uC758 \uC5C5\uBB34\uB85C \uCABC\uAC1C\uACE0, \uD300\uC6D0\uC774 \uB05D\uB0B4\uBA74 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uC774 \uC800\uC808\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4.",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 \uBCF4\uC785\uB2C8\uB2E4.',"\uD560\uC77C \uD56D\uBAA9\uC758 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB85C \uAC01 \uD56D\uBAA9\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uCC45\uC784\uC790\xB7\uB9C8\uAC10\uC608\uC815\uC744 \uC815\uD574 \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4. \uD300\uC6D0\uC774 \uC644\uB8CC\uD558\uBA74 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uB3C4 \uC644\uB8CC\uB85C \uD45C\uC2DC\uB418\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."]},{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\xB7\uBAA9\uD45C\uC5D0 \uB123\uAE30\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]},{title:"\uD504\uB85C\uC81D\uD2B8",feature:"project",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uBCF4\uB4DC \uB9E8 \uB05D \uC810\uC120 \uCE78\uC774\uB098 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD558\uACE0, \uC5C5\uBB34\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4.","\uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4. \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."]},{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 \xB7 \uBCF8\uBB38 \uC591\uC2DD",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.","**\uBCF8\uBB38 \uC591\uC2DD**(\uB0B4\uC6A9 \uC81C\uBAA9\uC758 \u22EE)\uC740 \uC790\uC8FC \uC4F0\uB294 \uBCF8\uBB38\uC744 \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC635\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 \u203A \uCC98\uB9AC \u203A \uC885\uB8CC\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uAC1C\uBC1C\uC0AC \uC804\uC6A9\uC774\uBA70, \uACE0\uAC1D\uC774 \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:["\uACE0\uAC1D\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\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\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4(\uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC11\uB2C8\uB2E4). \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC73C\uB85C \uC62E\uACA8\uC9D1\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 G0={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var Fd=[H0,W0,U0,V0,K0,G0];import{Fragment as ST,jsx as Lt,jsxs as ho}from"react/jsx-runtime";function hc(e){return e.split(/(\*\*[^*]+\*\*)/g).filter(g=>g.length>0).map((g,l)=>g.startsWith("**")&&g.endsWith("**")?Lt(tr,{component:"strong",sx:{fontWeight:700},children:g.slice(2,-2)},l):Lt(pc,{children:g},l))}function xT({keys:e}){let d=it();return Lt(tr,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((g,l)=>ho(tr,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?Lt(mT,{sx:{fontSize:18,color:d.colors.textMuted}}):null,Lt(tr,{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:g})]},`${g}-${l}`))})}function vT({steps:e}){let d=it();return Lt(tr,{sx:{display:"flex",flexWrap:"wrap",alignItems:"stretch",gap:1,mt:1.5},children:e.map((g,l)=>ho(pc,{children:[l>0?Lt(tr,{sx:{display:"flex",alignItems:"center",color:d.colors.textMuted,px:.25},children:Lt(gT,{sx:{fontSize:20}})}):null,ho(tr,{sx:{flex:"1 1 160px",minWidth:0,display:"flex",gap:1.25,alignItems:"center",p:1.5,borderRadius:2,bgcolor:d.colors.surfaceSubtle,border:`1px solid ${d.colors.border}`},children:[Lt(tr,{sx:{flexShrink:0,width:28,height:28,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:800,bgcolor:d.colors.accent,color:d.colors.accentContrast},children:l+1}),ho(tr,{sx:{minWidth:0},children:[Lt(tr,{sx:{fontSize:16,fontWeight:700,color:d.colors.textStrong,lineHeight:1.3},children:g.title}),Lt(tr,{sx:{mt:.5,fontSize:15,lineHeight:1.5,color:d.colors.textSecondary,wordBreak:"keep-all"},children:g.desc})]})]})]},g.title))})}var Y0="70vh",wT=148;function _T({items:e}){let d=it();return Lt(tr,{sx:{mt:1.5,display:"grid",gridTemplateColumns:{xs:"1fr",sm:`${wT}px minmax(0, 1fr)`},fontSize:15,lineHeight:1.6,color:d.colors.textPrimary,border:`1px solid ${d.colors.border}`,borderRadius:1.5,overflow:"hidden","& > *":{px:1.5,py:1.35,borderTop:`1px solid ${d.colors.border}`},"& > *:nth-of-type(even)":{borderLeft:{sm:`1px solid ${d.colors.border}`}},"& > *:nth-of-type(1)":{borderTop:0},"& > *:nth-of-type(2)":{borderTop:{xs:`1px solid ${d.colors.border}`,sm:0}}},children:e.map(g=>ho(pc,{children:[Lt(tr,{sx:{fontWeight:500,color:d.colors.textStrong,wordBreak:"keep-all",bgcolor:d.colors.surfaceSubtle,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:g.term}),Lt(tr,{sx:{wordBreak:"keep-all"},children:hc(g.desc)})]},g.term))})}function kT({topic:e}){let d=it();return ho(tr,{component:"section",sx:{py:{xs:3,sm:4},borderBottom:`1px solid ${d.colors.border}`,"&:last-of-type":{pb:0,borderBottom:0}},children:[ho(tr,{component:"h3",sx:{m:0,mb:1.75,fontSize:24,fontWeight:500,letterSpacing:"-0.01em",lineHeight:1.3,color:d.colors.textStrong,wordBreak:"keep-all",display:"flex",alignItems:"center",flexWrap:"wrap"},children:[e.title,e.subtitle?ho(ST,{children:[Lt(bT,{sx:{fontSize:22,color:d.colors.textMuted,mx:1,flexShrink:0}}),Lt(tr,{component:"span",sx:{fontSize:18,fontWeight:400,color:d.colors.textPrimary},children:e.subtitle})]}):null]}),e.lead?Lt(tr,{sx:{fontSize:15.5,lineHeight:1.65,color:d.colors.textPrimary,wordBreak:"keep-all"},children:hc(e.lead)}):null,e.steps?.length?Lt(vT,{steps:e.steps}):null,e.items?.length?Lt(_T,{items:e.items}):null,e.lines?.length?Lt(tr,{component:"ul",sx:{m:0,mt:e.lead||e.steps||e.items?1.25:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:15,lineHeight:1.6,color:d.colors.textPrimary,wordBreak:"keep-all"},children:e.lines.map((g,l)=>Lt("li",{children:hc(g)},l))}):null]})}function BG({open:e,onClose:d,views:g,features:l={},initialTab:o}){let s=it(),[r,t]=hT(0);fT(()=>{if(!e)return;let h=Fd.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=xa(g),i=Fd.filter(a=>n(a.feature)).map(a=>({id:a.id,tabTitle:a.tabTitle,showTitle:!1,children:a.id==="shortcuts"?Lt(tr,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:`min(${Y0}, 100%)`,px:.5},children:Lt(tr,{sx:{display:"grid",gridTemplateColumns:"auto auto",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:15,color:s.colors.textPrimary},children:c.map(h=>ho(pc,{children:[Lt(xT,{keys:h.keys}),Lt("span",{children:h.description})]},h.keys))})}):ho(tr,{sx:{display:"flex",flexDirection:"column",px:.5},children:[a.intro?Lt(tr,{sx:{p:2,borderRadius:2,bgcolor:s.colors.accentSoft,color:s.colors.textStrong,fontSize:15.5,lineHeight:1.65,wordBreak:"keep-all"},children:hc(a.intro)}):null,a.topics.filter(h=>n(h.feature)).map(h=>Lt(kT,{topic:h},h.title))]})}));return Lt(yT,{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:Y0,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:i,actions:{showCancelButton:!1,right:Lt(pT,{variant:"contained",onClick:d,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as X0,useRef as TT,useState as vs}from"react";import{Box as ar,Button as Un,IconButton as qd,Menu as Z0,MenuItem as J0,Switch as CT,Tooltip as Q0}from"@mui/material";import{FormDialog as eg}from"@ehfuse/mui-form-dialog";import $d from"@mui/icons-material/Add";import BT from"@mui/icons-material/ArrowRightAlt";import IT from"@mui/icons-material/BoltOutlined";import ET from"@mui/icons-material/Close";import MT from"@mui/icons-material/EditOutlined";import{ErrorAlert as tg}from"@ehfuse/alerts";import{ClearTextField as wa,LabelSelect as bn}from"@ehfuse/mui-form-controls";import{Fragment as ng,jsx as Ye,jsxs as En}from"react/jsx-runtime";var Hd=[{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."}],_a=[{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"}],bc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function mc(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function gc(e){return dn.find(d=>d.key===e)?.name??e}function RT(e,d,g){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=d.find(c=>ni(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=${bc.find(n=>n.value===l.priority)?.label}`),l.label_key&&s.push(`\uB77C\uBCA8=${g.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=${gc(l.status)}`),l.from_status&&s.push(`${gc(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${gc(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(`${_a.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=${gc(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${bc.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 + ${g.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=Hd.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 rg={fontSize:16,fontWeight:700,color:"#37352f"},OT={display:"flex",alignItems:"center",gap:1},AT={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function HG({open:e,rules:d,customTabs:g,statusOptions:l,contentTemplates:o=[],onPickAccount:s,onClose:r,onCreate:t,onUpdate:n,onToggle:c,onRemove:i}){let[a,h]=vs(!1),[f,u]=vs(0),[b,m]=vs(mc()),[v,k]=vs(!1),B=TT(null),[R,L]=vs(null),[A,D]=vs(null);X0(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(mc())},500);return()=>window.clearTimeout(W)},[e]),X0(()=>{if(!a)return;let W=window.setTimeout(()=>B.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=f>0,q=b.trigger,j=()=>{h(!1),u(0),m(mc())},S=(W,X)=>{m(J=>{let K={...J.condition};return X===""||X===void 0||X===null?delete K[W]:K[W]=X,{...J,condition:K}})},T=(W,X)=>{m(J=>{let K={...J.action};return X===""||X===void 0||X===null?delete K[W]:K[W]=X,{...J,action:K}})},P=W=>{m(X=>{let J={...X.condition};return W!=="status_changed"&&(delete J.from_status,delete J.to_status),W!=="overdue"&&delete J.overdue_days,W!=="field_changed"&&delete J.changed_field,W!=="commented"&&(delete J.comment_contains,delete J.comment_by_others),W==="field_changed"&&J.changed_field===void 0&&(J.changed_field=_a[0]?.value??""),{...X,trigger:W,condition:J}})},p=g.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),x=dn.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(ni(W.key)),label:W.label})),{condition:_,action:C}=b,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,J=await s(X,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");J&&m(K=>{let ee={...K.condition};return W==="manager_account"?(ee.manager_account_seq=J.accountSeq,ee.manager_name=J.name):(ee.receiver_account_seq=J.accountSeq,ee.receiver_name=J.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",dn[0]?.key??""):W==="to_status"?S("to_status",dn[0]?.key??""):W==="changed_field"?S("changed_field",_a[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)},M=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,J=await s(X,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");J&&m(K=>{let ee={...K.action};return W==="assign_manager"?(ee.assign_manager_account_seq=J.accountSeq,ee.assign_manager_name=J.name):W==="add_receiver"?(ee.add_receiver_account_seq=J.accountSeq,ee.add_receiver_name=J.name):(ee.notify_account_seq=J.accountSeq,ee.notify_name=J.name),{...K,action:ee}})},E=W=>{if(D(null),W==="set_status")T("set_status",dn[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(J=>({...J,action:{...J.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(!b.name.trim()){tg({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(b.action).length===0){tg({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?b.sort_no:d.reduce((J,K)=>Math.max(J,K.sort_no),0)+1;k(!0);let X=N?await n(f,{...b,sort_no:W}):await t({...b,sort_no:W});k(!1),X&&j()},Y=(W,X,J,K)=>En(ar,{sx:OT,children:[Ye(ar,{sx:AT,children:W}),En(ar,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:K?"column":"row",alignItems:K?"stretch":"center",gap:K?.5:1},children:[X,K?Ye(ar,{sx:{fontSize:13.5,color:"#37352f"},children:K}):null]}),Ye(Q0,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:Ye(qd,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:J,children:Ye(ET,{sx:{fontSize:16}})})})]}),G=()=>En(ar,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ye(wa,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:B,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:b.name,onChange:W=>m(X=>({...X,name:W.target.value}))}),Ye(ar,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Hd.map(W=>{let X=q===W.value;return Ye(Un,{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(ar,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Hd.find(W=>W.value===q)?.hint}),En(ar,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ye(ar,{sx:rg,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),z.length>0?Ye(Un,{size:"small",startIcon:Ye($d,{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(bn,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>S("group_seq",Number(W.target.value)||"")}),()=>M("group_seq")):null,O?Y("\uC885\uB958",Ye(bn,{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)}}),()=>M("kind")):null,_.priority!==void 0?Y("\uC911\uC694\uB3C4",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:bc,onChange:W=>S("priority",W.target.value)}),()=>M("priority")):null,_.label_key!==void 0?Y("\uB77C\uBCA8",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>S("label_key",W.target.value)}),()=>M("label_key")):null,_.title_contains!==void 0?Y("\uC81C\uBAA9",Ye(wa,{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}}))}),()=>M("title_contains")):null,_.manager_empty!==void 0?Y("\uCC45\uC784\uC790",Ye(bn,{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")}),()=>M("manager_empty")):null,_.manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Ye(Un,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>M("manager_account")):null,_.receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Ye(Un,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>M("receiver_account")):null,_.from_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:x,onChange:W=>S("from_status",W.target.value)}),()=>M("from_status")):null,_.to_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uB85C",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:x,onChange:W=>S("to_status",W.target.value)}),()=>M("to_status")):null,_.changed_field!==void 0?Y("\uBCC0\uACBD \uD544\uB4DC",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:_a,onChange:W=>S("changed_field",W.target.value)}),()=>M("changed_field")):null,_.comment_contains!==void 0?Y("\uB313\uAE00 \uB0B1\uB9D0",Ye(wa,{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}}))}),()=>M("comment_contains")):null,_.comment_by_others!==void 0?Y("\uB313\uAE00 \uC791\uC131\uC790",Ye(bn,{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")}),()=>M("comment_by_others")):null,_.overdue_days!==void 0?Y("\uACBD\uACFC\uC77C",Ye(wa,{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"}),()=>M("overdue_days")):null,Object.keys(_).length===0?Ye(ar,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,En(ar,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ye(ar,{sx:rg,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),H.length>0?Ye(Un,{size:"small",startIcon:Ye($d,{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(bn,{size:"medium",fullWidth:!0,label:"",value:C.set_status,options:x,onChange:W=>T("set_status",W.target.value)}),()=>F("set_status")):null,C.set_priority!==void 0?Y("\uC911\uC694\uB3C4",Ye(bn,{size:"medium",fullWidth:!0,label:"",value:C.set_priority,options:bc,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(bn,{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(J=>String(J.seq)===String(W.target.value));m(J=>({...J,action:{...J.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(bn,{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(Un,{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(Un,{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",En(ng,{children:[Ye(Un,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("notify")},sx:{flexShrink:0},children:C.notify_name||`\uACC4\uC815 #${C.notify_account_seq}`}),Ye(wa,{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(ar,{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(Z0,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>L(null),children:z.map(W=>Ye(J0,{dense:!0,onClick:()=>V(W.key),sx:{fontSize:14},children:W.label},W.key))}),Ye(Z0,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>D(null),children:H.map(W=>Ye(J0,{dense:!0,onClick:()=>E(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return En(ng,{children:[Ye(eg,{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:En(ar,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[d.length===0?En(ar,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ye(IT,{sx:{fontSize:48,color:"#d9d9d6"}}),Ye(ar,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,d.map(W=>En(ar,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[Ye(Q0,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:Ye(CT,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(X,J)=>c(W.seq,J)})}),En(ar,{sx:{flex:1,minWidth:0},children:[Ye(ar,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let X=RT(W,g,l);return En(ar,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[Ye(ar,{component:"span",children:X.left}),Ye(BT,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),Ye(ar,{component:"span",children:X.right})]})})()]}),Ye(qd,{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:_a[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:Ye(MT,{sx:{fontSize:18}})}),Ye(qd,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:Ye(pr,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:Ye(Un,{startIcon:Ye($d,{}),onClick:()=>{u(0),m(mc()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:Ye(Un,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),Ye(eg,{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(Un,{variant:"contained",onClick:()=>{U()},disabled:v,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as og,useRef as Wd,useState as ws}from"react";import{Box as rr,Button as _s,IconButton as ka,Tooltip as Sa}from"@mui/material";import ig from"@mui/icons-material/Add";import DT from"@mui/icons-material/EditOutlined";import PT from"@mui/icons-material/ContentCopyOutlined";import NT from"@mui/icons-material/DragIndicator";import LT from"@mui/icons-material/Close";import zT from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as jT,PointerSensor as FT,closestCenter as qT,useSensor as $T,useSensors as HT}from"@dnd-kit/core";import{restrictToParentElement as WT,restrictToVerticalAxis as UT}from"@dnd-kit/modifiers";import{SortableContext as VT,arrayMove as sg,useSortable as KT,verticalListSortingStrategy as GT}from"@dnd-kit/sortable";import{CSS as YT}from"@dnd-kit/utilities";import{FormDialog as ag}from"@ehfuse/mui-form-dialog";import{ClearTextField as Ud,LabelSelect as lg,NumberField as cg}from"@ehfuse/mui-form-controls";import XT from"@ehfuse/overlay-scrollbar";import{ConfirmDialog as ZT,ErrorAlert as ug}from"@ehfuse/alerts";import{Fragment as r7,jsx as at,jsxs as Mn}from"react/jsx-runtime";var JT=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],dg="\uC5C5\uBB34 \uC81C\uBAA9",Vd=2,yc={flex:1,minWidth:0},fg=56,hg=20,QT=`${hg+Vd*8}px`;function xc(){return{name:"",description:"",group_seq:0,items:[]}}function e7(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function t7({id:e,children:d}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=KT({id:e});return at(rr,{ref:o,sx:{transform:YT.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...g,...l},dragging:t})})}function uY({open:e,templates:d,customTabs:g,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=ws(!1),[a,h]=ws(0),[f,u]=ws(xc()),[b,m]=ws(!1),[v,k]=ws([]),B=Wd(0),[R,L]=ws(0),A=Wd(null),D=Wd(null);og(()=>{if(e)return;let z=window.setTimeout(()=>{i(!1),h(0),u(xc()),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,$)=>v[$]??`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="${dg}"]`);return V.length?V[V.length-1]:null};og(()=>{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))},M=window.requestAnimationFrame(V);return()=>{window.cancelAnimationFrame(M),window.clearTimeout($)}},[R]);let P=g.filter(z=>!z.archived).map(z=>({value:String(ni(z.key)),label:z.label})),p=(z,$)=>{u(V=>({...V,items:V.items.map((M,H)=>H===z?{...M,...$}:M)}))},y=HT($T(FT,{activationConstraint:{distance:5}})),x=z=>{let $=String(z.active?.id??""),V=String(z.over?.id??"");if(!$||!V||$===V)return;let M=j.indexOf($),H=j.indexOf(V);M<0||H<0||(u(I=>({...I,items:sg(I.items,M,H)})),k(I=>sg(I,M,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){ug({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){ug({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let V={...f,name:z,items:$},M=a>0?await r(a,V):await s(V);m(!1),M&&(i(!1),h(0),u(xc()))},C=at(rr,{children:d.length===0?Mn(rr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[at(zT,{sx:{fontSize:48,color:"#d9d9d6"}}),at(rr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):d.map(z=>Mn(rr,{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:[Mn(rr,{sx:{flex:1,minWidth:0},children:[at(rr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:z.name}),Mn(rr,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",z.items.length,"\uAC74",z.description?` \xB7 ${z.description}`:""]})]}),n?at(_s,{size:"medium",variant:"outlined",onClick:()=>n(z),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,at(Sa,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:at(ka,{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(DT,{sx:{fontSize:19}})})}),at(Sa,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:at(ka,{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(PT,{sx:{fontSize:18}})})}),at(Sa,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:at(ka,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await ZT({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(pr,{sx:{fontSize:18}})})})]},z.seq))}),O=Mn(rr,{sx:{display:"flex",flexDirection:"column",gap:3},children:[at(Ud,{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}))}),Mn(rr,{sx:{display:"grid",gridTemplateColumns:P.length>0?"1fr 1fr":"1fr",gap:2},children:[at(Ud,{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(lg,{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]}),Mn(rr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[at(rr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),at(rr,{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(rr,{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(rr,{ref:A,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:at(XT,{ref:D,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:at(jT,{sensors:y,collisionDetection:qT,modifiers:[UT,WT],onDragEnd:x,children:at(VT,{items:j,strategy:GT,children:f.items.map((z,$)=>at(t7,{id:j[$],children:({handleProps:V})=>Mn(rr,{sx:{borderBottom:$===f.items.length-1?"none":"1px solid #f2f2f0",px:Vd,py:2,gap:2,display:"flex",flexDirection:"column"},children:[Mn(rr,{sx:{display:"flex",alignItems:"center",gap:Vd},children:[at(rr,{...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(NT,{sx:{fontSize:hg}})}),at(Ud,{size:"medium",fullWidth:!0,placeholder:dg,slotProps:{htmlInput:{"data-template-title":$}},value:z.title,onChange:M=>p($,{title:M.target.value})})]}),Mn(rr,{sx:{display:"flex",alignItems:"center",gap:2,pl:QT},children:[at(rr,{sx:yc,children:at(cg,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.start_offset_days??null,onValueChange:M=>p($,{start_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),at(rr,{sx:yc,children:at(cg,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.due_offset_days??null,onValueChange:M=>p($,{due_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),at(rr,{sx:yc,children:at(lg,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:z.priority??"medium",options:JT,onChange:M=>p($,{priority:M.target.value})})}),l?Mn(rr,{sx:{...yc,position:"relative"},children:[at(_s,{variant:"outlined",fullWidth:!0,onClick:()=>{w($)},sx:{height:fg,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${fg-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(Sa,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:at(ka,{size:"small","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:M=>{M.stopPropagation(),p($,{manager_account_seq:0,manager_name:""})},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:at(LT,{sx:{fontSize:18}})})}):null]}):null,at(Sa,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:at(ka,{size:"medium","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(M=>({...M,items:M.items.filter((H,I)=>I!==$)})),k(M=>M.filter((H,I)=>I!==$))},children:at(pr,{sx:{fontSize:18}})})})]})]})},j[$]))})})})})]});return Mn(r7,{children:[at(ag,{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(_s,{startIcon:at(ig,{sx:{fontSize:18}}),onClick:()=>q(0,xc()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:at(_s,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),at(ag,{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(_s,{startIcon:at(ig,{sx:{fontSize:18}}),onClick:()=>{u(z=>({...z,items:[...z.items,e7()]})),k(z=>[...z,N()]),L(z=>z+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:at(_s,{variant:"contained",disabled:b,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:O}]})]})}import{useEffect as pg,useState as mg}from"react";import{Box as Fr,Button as n7}from"@mui/material";import{FormDialog as o7}from"@ehfuse/mui-form-dialog";import{DateTextField as i7}from"@ehfuse/mui-form-controls";import s7 from"@ehfuse/overlay-scrollbar";import{jsx as Qr,jsxs as Ta}from"react/jsx-runtime";function vY({open:e,template:d,todayStr:g,running:l=!1,onClose:o,onRun:s}){let[r,t]=mg(g),[n,c]=mg(d);pg(()=>{d&&c(d)},[d]),pg(()=>{e&&t(g)},[e]);let i=d??n,a=i?fp(i,r):[];return Qr(o7,{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:Qr(n7,{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:Ta(Fr,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Ta(Fr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Qr(Fr,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),Qr(i7,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),Qr(Fr,{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."}),Ta(Fr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Ta(Fr,{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:[Qr(Fr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Qr(Fr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),Qr(Fr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),Qr(Fr,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),Qr(s7,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?Qr(Fr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,f)=>Ta(Fr,{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:[Qr(Fr,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Qr(Fr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:Vc(h.start_date)||"-"}),Qr(Fr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:Vc(h.due_date)||"-"}),Qr(Fr,{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 a7={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function l7(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function Kd(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 ks(e){let d=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function Gd(e,d){let l=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),o=Kd(e.due_date),s=String(e.start_date??"").slice(11,16).trim(),r=Kd(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:fr(e).name,projectLabel:e.tab_key?d.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:l7(t),receiverNamesFull:t.join(", "),startDate:r!=="-"&&s?`${r} ${s}`:r,dueDate:o!=="-"&&l?`${o} ${l}`:o,priorityName:a7[String(e.priority??"")]??"",checklist:n,note:String(e.note??"").trim(),completed:!!e.completed}}function zt(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function c7(e,d){if(e===" ")return d*.3;let g=e.codePointAt(0)??0,l=g>=4352&&g<=4607||g>=12288&&g<=40959||g>=44032&&g<=55203||g>=63744&&g<=64255||g>=65280&&g<=65519;return d*(l?1:.55)}function vc(e,d){let g=0;for(let l of String(e??""))g+=c7(l,d);return g}function Ss(e,d){let g=String(e??"").trim();if(!g)return["-"];let l=[],o="";for(let s of g){if(s===`
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 Di(e,d,g){let l=String(e??"").replace(/\s+/g," ").trim();if(!l)return"";if(vc(l,g)<=d)return l;let o=vc("\u2026",g),s="",r=0;for(let t of l){let n=vc(t,g);if(r+n+o>d)break;s+=t,r+=n}return`${s}\u2026`}var Ba=595.28,Ia=841.89,Ea=841.89,Ma=595.28,qr=28,Rn=96,yn=44,u7="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",d7="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",Ca="#cbd5e1",f7=[`text { font-family: ${u7}; fill: #000000; }`,`.doc-title { font-family: ${d7}; 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: ${Ca}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${Ca}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${Ca}; stroke-width: 0.5; }`,`.hline { stroke: ${Ca}; stroke-width: 0.5; }`,`.vline { stroke: ${Ca}; 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 Fo(e,d,g){let l=g-qr;return[`<text x="${qr}" y="46" class="doc-title">${zt(e.documentTitle)}</text>`,`<text x="${qr}" y="66" class="doc-sub">${zt(e.subtitle)}</text>`,`<text x="${l}" y="42" class="doc-meta" text-anchor="end">${zt(e.facilityName)}</text>`,`<text x="${l}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${zt(ks(e.printedAt))}${e.printedBy?` \xB7 ${zt(e.printedBy)}`:""}</text>`,d?`<text x="${l}" y="74" class="doc-meta" text-anchor="end">${zt(d)}</text>`:""].join("")}function qo(e){let{width:d,height:g,body:l,pageIndex:o,pageCount:s}=e;return[`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${g}" viewBox="0 0 ${d} ${g}">`,`<style>${f7}</style>`,`<rect x="0" y="0" width="${d}" height="${g}" fill="#ffffff" />`,l,`<text x="${d/2}" y="${g-22}" class="pageno" text-anchor="middle">${o+1} / ${s}</text>`,"</svg>"].join("")}var Xd=Ea,bg=Ma,$o=qr,Ra=Xd-qr,Aa=22,Pi=20,Ni=22,Oa=5,yg=Rn,xg=yn,gg=bg-46,Da=[{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"}],Yd=Da.reduce((e,d,g)=>(e.push(g===0?$o:e[g-1]+Da[g-1].width),e),[]);function h7(e){let d=[],g=[],l=yg+Aa,o=(s,r)=>{d.push(g),g=[],l=xg+Aa,s&&(g.push({kind:"group",label:s,count:r,continued:!0}),l+=Ni)};for(let s of e){s.label&&(l+Ni+Pi>gg&&o("",0),g.push({kind:"group",label:s.label,count:s.rows.length,continued:!1}),l+=Ni);for(let r of s.rows)l+Pi>gg&&o(s.label,s.rows.length),g.push({kind:"row",completed:r.completed,values:Da.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+=Pi}return d.push(g),d.filter((s,r)=>r===0||s.length>0)}function p7(e,d){let g=[];g.push(`<rect x="${$o}" y="${d}" width="${Ra-$o}" height="${Aa}" class="head" />`),Da.forEach((o,s)=>{let r=Yd[s],t=o.align==="middle"?r+o.width/2:r+Oa;g.push(`<text x="${t}" y="${d+Aa-7}" class="th" text-anchor="${o.align}">${zt(o.label)}</text>`)});let l=d+Aa;for(let o of e){if(o.kind==="group"){g.push(`<rect x="${$o}" y="${l}" width="${Ra-$o}" height="${Ni}" class="group" />`,`<text x="${$o+Oa}" y="${l+Ni-7}" class="gt">${zt(o.continued?`${o.label} (\uC774\uC5B4\uC11C)`:o.label)}</text>`,`<text x="${Ra-Oa}" y="${l+Ni-7}" class="gt" text-anchor="end">${o.count}\uAC74</text>`),l+=Ni;continue}Da.forEach((s,r)=>{let t=Yd[r],n=s.align==="middle"?t+s.width/2:t+Oa;g.push(`<text x="${n}" y="${l+Pi-6}" class="${o.completed?"td done":"td"}" text-anchor="${s.align}">${zt(Di(o.values[r]??"",s.width-Oa*2,9))}</text>`)}),g.push(`<line x1="${$o}" y1="${l+Pi}" x2="${Ra}" y2="${l+Pi}" class="hline" />`),l+=Pi}return Yd.slice(1).forEach(o=>{g.push(`<line x1="${o}" y1="${d}" x2="${o}" y2="${l}" class="vline" />`)}),g.push(`<rect x="${$o}" y="${d}" width="${Ra-$o}" height="${l-d}" class="frame" />`),g.join("")}async function m7(e,d){let g=h7(d),l=d.reduce((o,s)=>o+s.rows.length,0);return g.map((o,s)=>{let r=s===0?yg:xg,t=[s===0?Fo(e,`\uC804\uCCB4 ${l}\uAC74`,Xd):"",p7(o,r)].join("");return qo({width:Xd,height:bg,body:t,pageIndex:s,pageCount:g.length})})}var Jd=Ba,vg=Ia,po=qr,wc=Jd-qr,g7=vg-46,wg=22,b7=68,y7=(wc-po)/2,x7=14,Zd=58;function Ts(e){switch(e.kind){case"title":return 34;case"props":return Math.ceil(e.pairs.length/2)*wg+10;case"section":return 26;default:return x7}}function v7(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
+ `).flatMap(l=>l.trim()?Ss(l,Zd):[""]):["(\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=>{Ss(l.label,Zd-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}),Ss(l.text,Zd).forEach(o=>d.push({kind:"line",text:o}))})),d}function w7(e){let d=[],g=[],l=Rn;for(let o of e){let s=Ts(o);l+s>g7&&(d.push(g),g=[],l=yn),g.push(o),l+=s}return d.push(g),d}function _7(e,d){switch(e.kind){case"title":{let g=e.ticket?`<text x="${wc}" y="${d+16}" class="doc-meta" text-anchor="end">${zt(e.ticket)}</text>`:"";return{markup:`<text x="${po}" y="${d+16}" class="section" style="font-size:14px">${zt(e.text)}</text>${g}<line x1="${po}" y1="${d+24}" x2="${wc}" y2="${d+24}" class="hline" />`,nextY:d+Ts(e)}}case"props":{let g=[];return e.pairs.forEach((l,o)=>{let s=o%2,r=Math.floor(o/2),t=po+s*y7,n=d+r*wg;g.push(`<text x="${t}" y="${n+14}" class="label">${zt(l.label)}</text>`,`<text x="${t+b7}" y="${n+14}" class="value">${zt(Ss(l.value||"-",26)[0]??"-")}</text>`)}),{markup:g.join(""),nextY:d+Ts(e)}}case"section":return{markup:`<text x="${po}" y="${d+16}" class="section">${zt(e.text)}</text><line x1="${po}" y1="${d+21}" x2="${wc}" y2="${d+21}" class="hline" />`,nextY:d+Ts(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"}">${zt(e.text)}</text>`,nextY:d+Ts(e)};default:return{markup:`<text x="${po}" y="${d+10}" class="${e.muted?"td done":"td"}">${zt(e.text)}</text>`,nextY:d+Ts(e)}}}async function k7(e,d){let g=w7(v7(d));return g.map((l,o)=>{let s=o===0?Rn:yn,r=[o===0?Fo(e,"",Jd):`<text x="${po}" y="${yn-12}" class="doc-meta">${zt(`${d.title} (\uC774\uC5B4\uC11C)`)}</text>`];for(let t of l){let n=_7(t,s);r.push(n.markup),s=n.nextY}return qo({width:Jd,height:vg,body:r.join(""),pageIndex:o,pageCount:g.length})})}var ef=Ea,Sg=Ma,_c=qr,Pa=ef-qr,_g=Sg-46,kg=210,ci=20,Qd=24;function ui(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 Tg(e,d){return Math.round((d.getTime()-e.getTime())/864e5)}function S7(e,d){let g=[];e.forEach(r=>{let t=ui(r.startDate),n=ui(r.dueDate);t&&g.push(t),n&&g.push(n)});let l=ui(d)??new Date;if(g.length===0)return{start:l,days:30};let o=new Date(Math.min(...g.map(r=>r.getTime()))),s=new Date(Math.max(...g.map(r=>r.getTime())));return o.setDate(o.getDate()-1),s.setDate(s.getDate()+1),{start:o,days:Math.max(7,Tg(o,s)+1)}}async function T7(e,d,g){let l=S7(d,g),o=_c+kg,r=(Pa-o)/l.days,t=ui(g),n=f=>o+Tg(l.start,f)*r,c=Math.max(1,Math.floor((_g-Rn-Qd)/ci)),i=Math.max(1,Math.floor((_g-yn-Qd)/ci)),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 b=u===0?Rn:yn,m=[u===0?Fo(e,`\uC804\uCCB4 ${d.length}\uAC74`,ef):""],v=b+Qd;m.push(`<line x1="${_c}" y1="${v}" x2="${Pa}" y2="${v}" 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="${v}" x2="${R}" y2="${v+f.length*ci}" class="hline" />`,`<text x="${R+2}" y="${v-6}" class="label">${B.getMonth()+1}.${B.getDate()}</text>`)}if(t&&t>=l.start){let k=n(t);k>=o&&k<=Pa&&m.push(`<line x1="${k}" y1="${v}" x2="${k}" y2="${v+f.length*ci}" stroke="#f87171" stroke-width="0.8" />`)}return f.forEach((k,B)=>{let R=v+B*ci,L=Di(k.title,kg-64,9);m.push(`<text x="${_c}" y="${R+14}" class="${k.completed?"td done":"td"}">${zt(L)}</text>`,`<text x="${o-6}" y="${R+14}" class="label" text-anchor="end">${zt(k.managerName)}</text>`,`<line x1="${_c}" y1="${R+ci}" x2="${Pa}" y2="${R+ci}" class="hline" />`);let A=ui(k.startDate)??ui(k.dueDate),D=ui(k.dueDate)??ui(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,Pa)-N)}" height="${ci-10}" rx="2" class="${j}" />`)}),qo({width:ef,height:Sg,body:m.join(""),pageIndex:u,pageCount:a.length})})}function C7(e,d,g,l){return{title:e.title,managerName:e.managerName,startDate:String(d??"").slice(0,10),dueDate:String(g??"").slice(0,10),completed:e.completed,overdue:!e.completed&&!!g&&String(g).slice(0,10)<l}}var tf=Ba,Bg=Ia,Cs=qr,kc=tf-qr,Cg=Bg-46,Bs=30,Is=18,Ig=12;function B7(e){let d=[],g=[],l=Rn,o=(s,r)=>{d.push(g),g=[],l=yn,s&&(g.push({kind:"column",label:s,summary:r,continued:!0,gapBefore:!1}),l+=Bs)};for(let s of e){let r=g.length>0,t=r?Ig:0;if(l+t+Bs+Is>Cg?(o("",""),g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:!1}),l+=Bs):(g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:r}),l+=t+Bs),s.items.length===0){g.push({kind:"empty"}),l+=Is;continue}for(let n of s.items)l+Is>Cg&&o(s.label,s.summary),g.push({kind:"item",title:n.title,meta:n.meta,completed:n.completed}),l+=Is}return d.push(g),d}async function I7(e,d,g){let l=B7(d);return l.map((o,s)=>{let r=s===0?Rn:yn,t=[s===0?Fo(e,g,tf):""];for(let n of o){if(n.kind==="column"){n.gapBefore&&(r+=Ig),t.push(`<rect x="${Cs}" y="${r}" width="${kc-Cs}" height="${Bs-6}" class="group" />`,`<text x="${Cs+6}" y="${r+16}" class="gt">${zt(n.continued?`${n.label} (\uC774\uC5B4\uC11C)`:n.label)}</text>`,`<text x="${kc-6}" y="${r+16}" class="label" text-anchor="end">${zt(n.summary)}</text>`),r+=Bs;continue}if(n.kind==="empty"){t.push(`<text x="${Cs+12}" y="${r+12}" class="td done">(\uC5C5\uBB34 \uC5C6\uC74C)</text>`),r+=Is;continue}t.push(`<text x="${Cs+12}" y="${r+12}" class="${n.completed?"td done":"td"}">${zt(Di(n.title,kc-Cs-12-120,9))}</text>`,`<text x="${kc-6}" y="${r+12}" class="label" text-anchor="end">${zt(n.meta)}</text>`),r+=Is}return qo({width:tf,height:Bg,body:t.join(""),pageIndex:s,pageCount:l.length})})}var E7=[{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}],M7="FFEEF2F7",Sc="FFCBD5E1";function R7(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()||"\uC5C5\uBB34\uBAA9\uB85D"}async function O7(e,d){let g=await Promise.resolve().then(()=>zg(Mg(),1)),l=new g.Workbook,o=l.addWorksheet("\uC5C5\uBB34\uBAA9\uB85D",{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0,fitToWidth:1,fitToHeight:0}});o.columns=E7.map(i=>({header:i.header,width:i.width})),o.spliceRows(1,0,[`${e.documentTitle}`],[`${e.subtitle} \xB7 ${e.facilityName} \xB7 \uCD9C\uB825 ${ks(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:M7}},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:Sc}},left:{style:"thin",color:{argb:Sc}},bottom:{style:"thin",color:{argb:Sc}},right:{style:"thin",color:{argb:Sc}}}});o.views=[{state:"frozen",ySplit:3}];let t=await l.xlsx.writeBuffer(),n=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),c=ks(e.printedAt).replace(/[: ]/g,"").slice(0,13);return{blob:n,fileName:`${R7(e.documentTitle)}_${c}.xlsx`}}function A7(e){return String(e??"").replace(/<br\s*\/?>(?=.)/gi,`
47
47
  `).replace(/<\/(p|div|li|h[1-6])>/gi,`
48
- `).replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function A7(e,d){let g=Gd(e,d);return{title:g.title,ticketNo:String(e.ticket_no??"").trim(),properties:[{label:"\uC0C1\uD0DC",value:g.statusName},{label:"\uD504\uB85C\uC81D\uD2B8",value:g.projectLabel||"\uAE30\uBCF8"},{label:"\uCC45\uC784\uC790",value:g.managerName},{label:"\uCC38\uC870\uC790",value:g.receiverNamesFull},{label:"\uC2DC\uC791\uC77C\uC2DC",value:g.startDate},{label:"\uB9C8\uAC10\uC608\uC815",value:g.dueDate},{label:"\uC911\uC694\uB3C4",value:g.priorityName},{label:"\uC791\uC131\uC790",value:String(e.created_by??"")}],content:O7(e.content),checklist:(e.checklist??[]).map(l=>({label:String(l.label??""),checked:!!l.checked})),comments:(e.comments??[]).map(l=>({author:String(l.author??""),time:String(l.time??""),text:String(l.text??"")})),includeComments:!0}}export{nE as ALL_TASK_VIEWER_ACCOUNT_SEQS,Pp as AddLabelDialog,cl as AddTabDialog,Rp as AttachmentUploadGauge,Ku as AttachmentUploadPercent,Dc as BUG_DEVICE_OPTIONS,Hy as BUG_GROUP_KEY,As as BUG_ICON_COLOR,aI as BUG_KANBAN_COLUMNS,Ac as BUG_REPRO_OPTIONS,Pc as BUG_RESOLUTION_OPTIONS,hi as BUG_STATUS_OPTIONS,Os as BUG_TASK_ICON,Rl as BugPropertiesGrid,yd as CALENDAR_PROVIDERS,Am as CALENDAR_PROVIDER_LIST,Rf as COLUMN_WIDTHS,Ds as COMPLETED_STATUS_OPTION,yn as CONT_BODY_TOP,gd as CUSTOM_TAB_KEY_PREFIX,eW as CalendarImportDialog,jH as CalendarLinkDialog,uW as CalendarSubscribeDialog,Yr as ChartEmptyMessage,Ko as CommentBubbleIcon,Wi as ConfirmCountButton,r0 as CumulativeFlowChart,oh as DATE_REMINDER_OPTIONS,F_ as DEFAULT_COMPACT_COLUMNS,Bc as DEFAULT_PROJECT_ICON,YV as DEFAULT_TASKBOX_TAB_ITEMS,bo as DEFAULT_TASK_ICON,go as DEFAULT_WORKLOAD_CAPACITY,zu as DRAWER_SECTION_TITLE_FONT_SIZE,PV as DateRangeFilterPopover,Tn as DrawerSection,_n as DueDatePickerPopover,Py as ENDED_EVENT_STATUS_OPTION,Up as EVENT_ICON_COLOR,dr as EVENT_TASK_ICON,xW as EmployeeSelectDialog,Rn as FIRST_BODY_TOP,jc as GROUP_BY_OPTIONS,Qi as GoogleEventChip,TV as GroupByMenuButton,ll as IconPickerGrid,gp as InlineAddressInput,Ro as InlineTextValue,Lc as KANBAN_CLOSED_COLUMN_KEY,Ma as LANDSCAPE_HEIGHT,Ea as LANDSCAPE_WIDTH,AK as LabelFilterMenu,Hl as LabelSelectMenu,s0 as LeadTimeDistributionChart,Ns as MANUAL_TASK_STATUS_OPTIONS,qr as MARGIN_X,bV as MemberFilterMenu,$y as NOTICE_GROUP_KEY,Ps as NOTICE_STATUS_OPTIONS,lr as NOTICE_TASK_ICON,bf as NO_TASK_ICON,Ia as PORTRAIT_HEIGHT,Ba as PORTRAIT_WIDTH,Ic as PROJECT_ICON_OPTIONS,gt as PropertyRow,$i as RECEIVER_AVATAR_COLORS,ih as REMINDER_OPTIONS,Hi as REVIEW_DONE_BUTTON_SX,Wr as ReceiverAvatarStack,um as RelatedTasksSection,P7 as STATUS_KEY_REPLIED,af as STATUS_KEY_WAITING,Wy as SUPPORT_GROUP_KEY,tG as ShortcutHelpDialog,mh as SortableTaskCard,Gm as SprintBurndownChart,fV as SprintChartsDialog,Sm as SprintCloseDialog,FK as SprintFilterMenu,EH as SprintManageDialog,Um as SprintVelocityChart,Fi as StatusSelectMenu,Ya as TASKBOX_COLUMNS,jn as TASKBOX_DRAWER_NARROW_MQ,YK as TASKBOX_SHORTCUT_HELP,yf as TASKBOX_UI_STATE_ID,j0 as TASKBOX_VIEW_LABELS,DD as TASKBOX_VIEW_MODES,lu as TASK_CARD_DRAG_HANDLE_CLASS,Zs as TASK_REPEAT_RULE_OPTIONS,dn as TASK_STATUS_OPTIONS,hv as TIME_REMINDER_OPTIONS,fl as TaskAckListPopover,Gn as TaskActionButton,Yl as TaskActivityDialog,ql as TaskAttachmentsSection,ep as TaskBoxColumnSummary,rN as TaskBoxCompactTable,mu as TaskBoxGroupBoard,BP as TaskBoxMobileList,Vh as TaskBoxMonthAgenda,qh as TaskBoxMonthCalendar,GD as TaskBoxSprintColumnSummary,dh as TaskBoxTable,XV as TaskBoxTabs,Jh as TaskBoxTimeline,AD as TaskBoxView,Nh as TaskBoxWeekCalendar,Hs as TaskCardContent,Ll as TaskChecklistSection,tm as TaskCommentInput,em as TaskCommentsSection,Dl as TaskContentEditor,Al as TaskContentTemplateMenu,IK as TaskContextMenu,Ml as TaskCorePropertiesGrid,Ju as TaskCreateBody,Jj as TaskCreateDrawer,E0 as TaskDateRangeFilter,ym as TaskDetailBody,oH as TaskDetailDrawer,im as TaskDetailHeader,Go as TaskIconPickerPopover,Uo as TaskLabelChips,Nl as TaskLinkDialog,sm as TaskNoteField,Hr as TaskPriorityChip,$G as TaskRuleManageDialog,Dt as TaskStatusChip,mI as TaskStatusChips,cY as TaskTemplateManageDialog,xY as TaskTemplateRunDialog,CG as TaskboxManualDialog,qg as TaskboxProvider,Hm as WorkloadCapacityDialog,h0 as WorkloadChart,y0 as WorkloadPersonTasks,x0 as WorkloadPersonTasksDialog,w0 as WorkloadTimelineGrid,dp as addDaysToDate,l0 as averageWorkload,m6 as buildCalendarFeedUrl,hl as buildCardBaseSx,Qm as buildCumulativeFlow,e0 as buildLeadCycleDistribution,U_ as buildPlannedTask,Tf as buildStatusOptionColors,B7 as buildTaskColumnsPrintSvgPages,A7 as buildTaskDetailPrintData,_7 as buildTaskDetailPrintSvgPages,Ga as buildTaskGroupSections,p7 as buildTaskListPrintSvgPages,R7 as buildTaskListXlsx,nd as buildTaskRelationsModel,U4 as buildTaskShareText,S7 as buildTaskTimelinePrintSvgPages,xa as buildTaskboxShortcutHelp,qa as buildTaskboxTheme,fp as buildTemplateTasks,nc as buildWorkloadRows,c0 as buildWorkloadTimeline,zf as canAssignBugManager,Ja as canClaimTaskItem,Ff as canCompleteTaskItem,xo as canEditTaskItem,Za as canViewTaskItem,Qa as canVolunteerTaskItem,Di as clampPrintText,od as countTaskRelations,tp as countWorkdays,Ry as createTaskboxTheme,Qh as daysLeftUntil,Cl as defaultRepeatUntil,Ec as defaultTaskBoxFormValues,Mc as defaultTaskboxUiStateValues,zt as escapePrintXml,vc as estimatePrintTextWidth,Fp as filterFilesWithinLimit,AR as formatConfirmTime,qD as formatHours,wn as formatKoreanDate,fn as formatKoreanDateTime,Vc as formatMonthDay,sN as formatOffsetLabel,Kd as formatPrintDate,ks as formatPrintStamp,kn as formatSprintOptionLabel,kf as getBugDeviceName,_f as getBugReproName,$a as getBugResolutionName,Ny as getBugStatusOption,GW as getDefaultDateRange,Ls as getEventDisplayStatusOption,cI as getNoDueStatusRank,jp as getNoticeAckInfo,Sf as getNoticeStatusOption,rj as getNoticeTargetDisplay,AB as getProjectIconAnchorComponent,Mt as getProjectIconComponent,pv as getReminderLabel,Qc as getReminderOptions,eu as getRemindersLabel,Tl as getRepeatRuleLabel,Ua as getStatusOptionsForTask,HK as getTabHeaderConfig,Xa as getTaskBoxColumnDefs,Af as getTaskBoxGridMinWidth,Of as getTaskBoxGridTemplate,rT as getTaskBoxTabKind,Gi as getTaskConfirmInfo,fr as getTaskDisplayStatusOption,Wa as getTaskStatusOption,Xi as groupGoogleEventsByDate,ni as groupSeqFromTabKey,pq as hasRelation,lm as hasTaskRelations,e5 as htmlToPlainText,Vk as isCustomTabKey,Zm as isFlowTask,Lf as isOpenPoolTaskItem,ic as isOverCapacity,a0 as isOverloaded,Nc as isPastEvent,jf as isSupportOriginTaskItem,Ha as isTaskDone,lI as isWaitingTask,rc as monthsAgoDate,oo as narrowOrderSx,nH as nowDateTimeString,d_ as parseEstimatedHours,Td as parseTaskTimeMs,oc as pickPersonWorkloadTasks,Ii as relationsOf,Fo as renderPrintHeader,Ql as resolveCalendarProvider,Xn as resolveReminders,T8 as resolveRowCapacity,ji as resolveTaskStatusOptions,Oc as resolveTaskboxTheme,L7 as resolveWorkloadCapacity,tN as selectDepartmentSharedTasks,ls as shareTaskText,$D as sumRemainingHours,Wl as summarizeNoticeTargets,gH as tabKeyFromGroupSeq,An as taskVisibilityOf,Gd as toTaskPrintRow,T7 as toTimelinePrintRow,Lo as toYmd,Va as toggleLabelKey,al as toggleReminder,Ms as useBuildFileUrl,Mp as useTaskAttachmentUploadMeta,bt as useTaskboxConfig,Cy as useTaskboxForm,GK as useTaskboxShortcuts,it as useTaskboxTheme,yo as useTaskboxUiState,Rs as useUploadMaxMb,ir as wideColumnSx,el as withOriginAuthorAvatar,qo as wrapPrintPage,Ss as wrapPrintText};
48
+ `).replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function D7(e,d){let g=Gd(e,d);return{title:g.title,ticketNo:String(e.ticket_no??"").trim(),properties:[{label:"\uC0C1\uD0DC",value:g.statusName},{label:"\uD504\uB85C\uC81D\uD2B8",value:g.projectLabel||"\uAE30\uBCF8"},{label:"\uCC45\uC784\uC790",value:g.managerName},{label:"\uCC38\uC870\uC790",value:g.receiverNamesFull},{label:"\uC2DC\uC791\uC77C\uC2DC",value:g.startDate},{label:"\uB9C8\uAC10\uC608\uC815",value:g.dueDate},{label:"\uC911\uC694\uB3C4",value:g.priorityName},{label:"\uC791\uC131\uC790",value:String(e.created_by??"")}],content:A7(e.content),checklist:(e.checklist??[]).map(l=>({label:String(l.label??""),checked:!!l.checked})),comments:(e.comments??[]).map(l=>({author:String(l.author??""),time:String(l.time??""),text:String(l.text??"")})),includeComments:!0}}export{oE as ALL_TASK_VIEWER_ACCOUNT_SEQS,Pp as AddLabelDialog,cl as AddTabDialog,Rp as AttachmentUploadGauge,Ku as AttachmentUploadPercent,Dc as BUG_DEVICE_OPTIONS,Wy as BUG_GROUP_KEY,As as BUG_ICON_COLOR,lI as BUG_KANBAN_COLUMNS,Ac as BUG_REPRO_OPTIONS,Pc as BUG_RESOLUTION_OPTIONS,hi as BUG_STATUS_OPTIONS,Os as BUG_TASK_ICON,Rl as BugPropertiesGrid,yd as CALENDAR_PROVIDERS,Am as CALENDAR_PROVIDER_LIST,Rf as COLUMN_WIDTHS,Ds as COMPLETED_STATUS_OPTION,yn as CONT_BODY_TOP,gd as CUSTOM_TAB_KEY_PREFIX,tW as CalendarImportDialog,FH as CalendarLinkDialog,dW as CalendarSubscribeDialog,Yr as ChartEmptyMessage,Ko as CommentBubbleIcon,Wi as ConfirmCountButton,r0 as CumulativeFlowChart,oh as DATE_REMINDER_OPTIONS,q_ as DEFAULT_COMPACT_COLUMNS,Bc as DEFAULT_PROJECT_ICON,XV as DEFAULT_TASKBOX_TAB_ITEMS,bo as DEFAULT_TASK_ICON,go as DEFAULT_WORKLOAD_CAPACITY,zu as DRAWER_SECTION_TITLE_FONT_SIZE,NV as DateRangeFilterPopover,Tn as DrawerSection,_n as DueDatePickerPopover,Ny as ENDED_EVENT_STATUS_OPTION,Up as EVENT_ICON_COLOR,dr as EVENT_TASK_ICON,vW as EmployeeSelectDialog,Rn as FIRST_BODY_TOP,jc as GROUP_BY_OPTIONS,Qi as GoogleEventChip,CV as GroupByMenuButton,ll as IconPickerGrid,gp as InlineAddressInput,Ro as InlineTextValue,Lc as KANBAN_CLOSED_COLUMN_KEY,Ma as LANDSCAPE_HEIGHT,Ea as LANDSCAPE_WIDTH,DK as LabelFilterMenu,Hl as LabelSelectMenu,s0 as LeadTimeDistributionChart,Ns as MANUAL_TASK_STATUS_OPTIONS,qr as MARGIN_X,yV as MemberFilterMenu,Hy as NOTICE_GROUP_KEY,Ps as NOTICE_STATUS_OPTIONS,lr as NOTICE_TASK_ICON,bf as NO_TASK_ICON,Ia as PORTRAIT_HEIGHT,Ba as PORTRAIT_WIDTH,Ic as PROJECT_ICON_OPTIONS,gt as PropertyRow,$i as RECEIVER_AVATAR_COLORS,ih as REMINDER_OPTIONS,Hi as REVIEW_DONE_BUTTON_SX,Wr as ReceiverAvatarStack,um as RelatedTasksSection,N7 as STATUS_KEY_REPLIED,af as STATUS_KEY_WAITING,Uy as SUPPORT_GROUP_KEY,rG as ShortcutHelpDialog,mh as SortableTaskCard,Gm as SprintBurndownChart,hV as SprintChartsDialog,Sm as SprintCloseDialog,qK as SprintFilterMenu,MH as SprintManageDialog,Um as SprintVelocityChart,Fi as StatusSelectMenu,Ya as TASKBOX_COLUMNS,jn as TASKBOX_DRAWER_NARROW_MQ,XK as TASKBOX_SHORTCUT_HELP,yf as TASKBOX_UI_STATE_ID,j0 as TASKBOX_VIEW_LABELS,PD as TASKBOX_VIEW_MODES,lu as TASK_CARD_DRAG_HANDLE_CLASS,Zs as TASK_REPEAT_RULE_OPTIONS,dn as TASK_STATUS_OPTIONS,pv as TIME_REMINDER_OPTIONS,fl as TaskAckListPopover,Gn as TaskActionButton,Yl as TaskActivityDialog,ql as TaskAttachmentsSection,ep as TaskBoxColumnSummary,nN as TaskBoxCompactTable,mu as TaskBoxGroupBoard,IP as TaskBoxMobileList,Vh as TaskBoxMonthAgenda,qh as TaskBoxMonthCalendar,YD as TaskBoxSprintColumnSummary,dh as TaskBoxTable,ZV as TaskBoxTabs,Jh as TaskBoxTimeline,DD as TaskBoxView,Nh as TaskBoxWeekCalendar,Hs as TaskCardContent,Ll as TaskChecklistSection,tm as TaskCommentInput,em as TaskCommentsSection,Dl as TaskContentEditor,Al as TaskContentTemplateMenu,EK as TaskContextMenu,Ml as TaskCorePropertiesGrid,Ju as TaskCreateBody,Qj as TaskCreateDrawer,E0 as TaskDateRangeFilter,ym as TaskDetailBody,iH as TaskDetailDrawer,im as TaskDetailHeader,Go as TaskIconPickerPopover,Uo as TaskLabelChips,Nl as TaskLinkDialog,sm as TaskNoteField,Hr as TaskPriorityChip,HG as TaskRuleManageDialog,Dt as TaskStatusChip,gI as TaskStatusChips,uY as TaskTemplateManageDialog,vY as TaskTemplateRunDialog,BG as TaskboxManualDialog,$g as TaskboxProvider,Hm as WorkloadCapacityDialog,h0 as WorkloadChart,y0 as WorkloadPersonTasks,x0 as WorkloadPersonTasksDialog,w0 as WorkloadTimelineGrid,dp as addDaysToDate,l0 as averageWorkload,g6 as buildCalendarFeedUrl,hl as buildCardBaseSx,Qm as buildCumulativeFlow,e0 as buildLeadCycleDistribution,V_ as buildPlannedTask,Tf as buildStatusOptionColors,I7 as buildTaskColumnsPrintSvgPages,D7 as buildTaskDetailPrintData,k7 as buildTaskDetailPrintSvgPages,Ga as buildTaskGroupSections,m7 as buildTaskListPrintSvgPages,O7 as buildTaskListXlsx,nd as buildTaskRelationsModel,V4 as buildTaskShareText,T7 as buildTaskTimelinePrintSvgPages,xa as buildTaskboxShortcutHelp,qa as buildTaskboxTheme,fp as buildTemplateTasks,nc as buildWorkloadRows,c0 as buildWorkloadTimeline,zf as canAssignBugManager,Ja as canClaimTaskItem,Ff as canCompleteTaskItem,xo as canEditTaskItem,Za as canViewTaskItem,Qa as canVolunteerTaskItem,Di as clampPrintText,od as countTaskRelations,tp as countWorkdays,Oy as createTaskboxTheme,Qh as daysLeftUntil,Cl as defaultRepeatUntil,Ec as defaultTaskBoxFormValues,Mc as defaultTaskboxUiStateValues,zt as escapePrintXml,vc as estimatePrintTextWidth,Fp as filterFilesWithinLimit,DR as formatConfirmTime,$D as formatHours,wn as formatKoreanDate,fn as formatKoreanDateTime,Vc as formatMonthDay,aN as formatOffsetLabel,Kd as formatPrintDate,ks as formatPrintStamp,kn as formatSprintOptionLabel,kf as getBugDeviceName,_f as getBugReproName,$a as getBugResolutionName,Ly as getBugStatusOption,YW as getDefaultDateRange,Ls as getEventDisplayStatusOption,uI as getNoDueStatusRank,jp as getNoticeAckInfo,Sf as getNoticeStatusOption,nj as getNoticeTargetDisplay,DB as getProjectIconAnchorComponent,Mt as getProjectIconComponent,mv as getReminderLabel,Qc as getReminderOptions,eu as getRemindersLabel,Tl as getRepeatRuleLabel,Ua as getStatusOptionsForTask,WK as getTabHeaderConfig,Xa as getTaskBoxColumnDefs,Af as getTaskBoxGridMinWidth,Of as getTaskBoxGridTemplate,nT as getTaskBoxTabKind,Gi as getTaskConfirmInfo,fr as getTaskDisplayStatusOption,Wa as getTaskStatusOption,Xi as groupGoogleEventsByDate,ni as groupSeqFromTabKey,mq as hasRelation,lm as hasTaskRelations,t5 as htmlToPlainText,Kk as isCustomTabKey,Zm as isFlowTask,Lf as isOpenPoolTaskItem,ic as isOverCapacity,a0 as isOverloaded,Nc as isPastEvent,jf as isSupportOriginTaskItem,Ha as isTaskDone,cI as isWaitingTask,rc as monthsAgoDate,oo as narrowOrderSx,oH as nowDateTimeString,f_ as parseEstimatedHours,Td as parseTaskTimeMs,oc as pickPersonWorkloadTasks,Ii as relationsOf,Fo as renderPrintHeader,Ql as resolveCalendarProvider,Xn as resolveReminders,C8 as resolveRowCapacity,ji as resolveTaskStatusOptions,Oc as resolveTaskboxTheme,z7 as resolveWorkloadCapacity,rN as selectDepartmentSharedTasks,ls as shareTaskText,HD as sumRemainingHours,Wl as summarizeNoticeTargets,bH as tabKeyFromGroupSeq,An as taskVisibilityOf,Gd as toTaskPrintRow,C7 as toTimelinePrintRow,Lo as toYmd,Va as toggleLabelKey,al as toggleReminder,Ms as useBuildFileUrl,Mp as useTaskAttachmentUploadMeta,bt as useTaskboxConfig,By as useTaskboxForm,YK as useTaskboxShortcuts,it as useTaskboxTheme,yo as useTaskboxUiState,Rs as useUploadMaxMb,ir as wideColumnSx,el as withOriginAuthorAvatar,qo as wrapPrintPage,Ss as wrapPrintText};
49
49
  /*! Bundled license information:
50
50
 
51
51
  exceljs/dist/exceljs.min.js: